You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: move npm packages to the @PyModel scope (#70)
## Related Issue
No issue — follow-up to #66 (GitHub org migration). This PR moves the
npm side to the new org.
## Problem
The GitHub org moved to `PyModel` (#66), but every workspace package
still carries the `@pythoughts` npm scope, and releases still publish to
`@pythoughts/pythinker-code`. Newer versions must publish under the
`pymodel` npm org.
## What changed
- Renamed all 18 workspace packages from `@pythoughts/*` to
`@pymodel/*`: package names, workspace dependencies, imports, and every
tooling reference (changesets config, `flake.nix` workspace names, CI
workflows, release/native/brew/CDN scripts, docs, README badges).
- Fixed escaped-scope references a plain replace misses: the
api-extractor specifier-rewrite regex in the SDK dts build,
vitest/tsdown `alwaysBundle` regexes, and the Windows path marker in the
postinstall reach script.
- Regenerated `pnpm-lock.yaml`; the `flake.nix` `pnpmDeps` hash is
unchanged (verified by rebuilding — workspace names do not affect the
fetched dependency set).
- Added a `minor` changeset so the next release publishes
`@pymodel/pythinker-code`.
Out of scope: the VS Code Marketplace publisher
(`pythoughts.pythinker-code`), `api.pythoughts.com` platform URLs, and
the `ai.pythoughts.pythinker-server` LaunchAgent label — these are
separate identities, not npm scope.
## Merge order
Merge #67, #68, #69 first — their changesets name
`@pythoughts/pythinker-code` and would break `changeset version` if this
PR lands before them.
## Before the first publish (npm side, manual)
1. On npmjs.com, add a Trusted Publishing (OIDC) connection for
`@pymodel/pythinker-code`: repository `PyModel/pythinker-code`, workflow
`release.yml`.
2. After the first successful `@pymodel` release: `npm deprecate
@pythoughts/pythinker-code "Moved to @pymodel/pythinker-code"`.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [x] I have linked a related issue, or explained the problem above.
- [x] I have added tests that prove my feature works. (Mechanical
rename; existing suites cover it.)
- [x] Ran `gen-changesets` skill, or this PR needs no changeset.
- [x] Ran `gen-docs` skill, or this PR needs no doc update. (Docs
updated in the sweep.)
## Additional commits
- The sweep also caught encoded-scope references a plain replace misses:
api-extractor/tsdown/vitest regexes (`@pythoughts\/`), release-tag
parsing in `produce-manifest.mjs` and `install.sh`, `%40…%2F`
release-download URLs in the CDN build, and split specifiers in tests.
- One drive-along test-infra fix: `skill-session.test.ts` temp-dir
cleanup now retries, because a late journal flush races the recursive
delete under full-suite load and threw ENOTEMPTY twice while gating this
push.
Copy file name to clipboardExpand all lines: .agents/skills/gen-changesets/SKILL.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,25 +7,25 @@ description: Use when generating changesets in the pythinker-code repository, in
7
7
8
8
`pythinker-code` uses changesets to manage versions and changelogs. The current user-facing published package is:
9
9
10
-
-`@pythoughts/pythinker-code`: the CLI
10
+
-`@pymodel/pythinker-code`: the CLI
11
11
12
-
All other `@pythoughts/*` packages are treated as internal packages, including `@pythoughts/pythinker-code-sdk`, `agent-core`, `kosong`, `kaos`, `pythinker-code-oauth`, `pythinker-telemetry`, and `migration-legacy`.
12
+
All other `@pymodel/*` packages are treated as internal packages, including `@pymodel/pythinker-code-sdk`, `agent-core`, `kosong`, `kaos`, `pythinker-code-oauth`, `pythinker-telemetry`, and `migration-legacy`.
13
13
14
14
## Core Rules
15
15
16
16
1.**Inspect the actual changes first.** Use `git status` / `git diff --name-only` to identify which packages were actually changed.
17
17
2.**List packages that changesets can release.** If a changed package is ignored in `.changeset/config.json`, do not put that ignored package in frontmatter together with a non-ignored package; changesets rejects mixed ignored/non-ignored frontmatter.
18
-
3.**Map ignored internal changes to the affected released package.** If an ignored internal package changes CLI output or behavior, list `@pythoughts/pythinker-code` and describe the actual user-visible or release-artifact change in the changelog text.
19
-
4.**Internal package source changes that enter the CLI bundle must manually list the CLI.**`@pythoughts/pythinker-code` inline-bundles `@pythoughts/*` source, but those internal packages are devDependencies from the CLI's perspective, so changesets will not automatically propagate bumps. If a change enters the CLI output, list `@pythoughts/pythinker-code`.
20
-
-**Web app (`@pythoughts/pythinker-web`) changes always enter the CLI bundle.**`@pythoughts/pythinker-web` is ignored by changesets (see `.changeset/config.json`) and cannot be mixed with `@pythoughts/pythinker-code` in one changeset frontmatter. Describe the web change in the changelog text, but list `@pythoughts/pythinker-code` so the CLI release carries the bundled `dist-web` output.
18
+
3.**Map ignored internal changes to the affected released package.** If an ignored internal package changes CLI output or behavior, list `@pymodel/pythinker-code` and describe the actual user-visible or release-artifact change in the changelog text.
19
+
4.**Internal package source changes that enter the CLI bundle must manually list the CLI.**`@pymodel/pythinker-code` inline-bundles `@pymodel/*` source, but those internal packages are devDependencies from the CLI's perspective, so changesets will not automatically propagate bumps. If a change enters the CLI output, list `@pymodel/pythinker-code`.
20
+
-**Web app (`@pymodel/pythinker-web`) changes always enter the CLI bundle.**`@pymodel/pythinker-web` is ignored by changesets (see `.changeset/config.json`) and cannot be mixed with `@pymodel/pythinker-code` in one changeset frontmatter. Describe the web change in the changelog text, but list `@pymodel/pythinker-code` so the CLI release carries the bundled `dist-web` output.
21
21
5.**Docs-only and tests-only changes usually do not need a changeset.** README, internal docs, and `test/` changes that do not enter package output do not trigger a CLI bump.
22
-
6.`@pythoughts/dashboard` / `dashboard-server` / `dashboard-web` are ignored by changesets and should not be handled.
22
+
6.`@pymodel/dashboard` / `dashboard-server` / `dashboard-web` are ignored by changesets and should not be handled.
23
23
24
24
## Workflow
25
25
26
26
1. List the changed packages and check whether each one is ignored by `.changeset/config.json`.
27
27
2. Choose a bump level for each package.
28
-
3. If an ignored internal package change enters the CLI bundle, put `@pythoughts/pythinker-code` in frontmatter instead of mixing the ignored package into the same changeset.
28
+
3. If an ignored internal package change enters the CLI bundle, put `@pymodel/pythinker-code` in frontmatter instead of mixing the ignored package into the same changeset.
29
29
4. Create a short kebab-case file under `.changeset/`.
30
30
5. Split unrelated changes into separate changesets; keep one logical change in one file.
31
31
@@ -70,7 +70,7 @@ An internal package fixes a bug visible to CLI users:
70
70
71
71
```markdown
72
72
---
73
-
"@pythoughts/pythinker-code": patch
73
+
"@pymodel/pythinker-code": patch
74
74
---
75
75
76
76
Fix occasional loss of tool call results in long conversations.
@@ -80,7 +80,7 @@ An internal package has an internal-only change, but it enters the CLI bundle:
80
80
81
81
```markdown
82
82
---
83
-
"@pythoughts/pythinker-code": patch
83
+
"@pymodel/pythinker-code": patch
84
84
---
85
85
86
86
Unify tool execution metadata handling.
@@ -90,15 +90,15 @@ Only SDK source changed, and the CLI does not use it:
90
90
91
91
```markdown
92
92
---
93
-
"@pythoughts/pythinker-code-sdk": patch
93
+
"@pymodel/pythinker-code-sdk": patch
94
94
---
95
95
96
96
Clarify session status typing for internal SDK callers.
97
97
```
98
98
99
99
## Web app changes
100
100
101
-
`@pythoughts/pythinker-web` is ignored by changesets and must **never** appear in a changeset frontmatter. Because the web app is bundled into the CLI release artifact, any web change that ships must list `@pythoughts/pythinker-code` instead and describe the actual web-facing change in the text.
101
+
`@pymodel/pythinker-web` is ignored by changesets and must **never** appear in a changeset frontmatter. Because the web app is bundled into the CLI release artifact, any web change that ships must list `@pymodel/pythinker-code` instead and describe the actual web-facing change in the text.
102
102
103
103
- If a PR contains both web UI changes and server API changes, split them into separate changesets so each entry has a focused description.
104
104
- Do not enumerate every micro-tweak; keep it to one sentence that captures what the web user gets.
@@ -107,7 +107,7 @@ Web-only fix:
107
107
108
108
```markdown
109
109
---
110
-
"@pythoughts/pythinker-code": patch
110
+
"@pymodel/pythinker-code": patch
111
111
---
112
112
113
113
Fix the web chat not scrolling to the bottom after sending a message.
@@ -117,15 +117,15 @@ Web UI plus server APIs in the same PR (split into two changesets):
117
117
118
118
```markdown
119
119
---
120
-
"@pythoughts/pythinker-code": minor
120
+
"@pymodel/pythinker-code": minor
121
121
---
122
122
123
123
Add the server-hosted web UI, including chat layout and session list behaviors.
124
124
```
125
125
126
126
```markdown
127
127
---
128
-
"@pythoughts/pythinker-code": minor
128
+
"@pymodel/pythinker-code": minor
129
129
---
130
130
131
131
Add the server REST and WebSocket APIs that power the web UI.
@@ -134,9 +134,9 @@ Add the server REST and WebSocket APIs that power the web UI.
134
134
## Red Flags
135
135
136
136
- You are about to write `major` without asking the user.
137
-
- Internal package source enters the CLI bundle, but `@pythoughts/pythinker-code` is missing.
137
+
- Internal package source enters the CLI bundle, but `@pymodel/pythinker-code` is missing.
138
138
- A changeset frontmatter mixes ignored internal packages with non-ignored packages.
139
-
-`packages/node-sdk` was not changed, but `@pythoughts/pythinker-code-sdk` was listed for "internal package sync".
139
+
-`packages/node-sdk` was not changed, but `@pymodel/pythinker-code-sdk` was listed for "internal package sync".
140
140
- The changelog entry is in Chinese.
141
141
- The wording claims more than the diff actually did.
142
142
- The CLI wording mentions internal package names, class names, or PR numbers.
Copy file name to clipboardExpand all lines: .agents/skills/sync-changelog/SKILL.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ description: Use after a release succeeds, when maintainers need to sync apps/py
7
7
8
8
## Overview
9
9
10
-
`pythinker-code` uses changesets for versioning. Each package gets its own `CHANGELOG.md`. The user-facing CLI package, `@pythoughts/pythinker-code`, writes its changelog here:
10
+
`pythinker-code` uses changesets for versioning. Each package gets its own `CHANGELOG.md`. The user-facing CLI package, `@pymodel/pythinker-code`, writes its changelog here:
11
11
12
12
```text
13
13
apps/pythinker-code/CHANGELOG.md
@@ -38,7 +38,7 @@ Core rule: the English docs changelog is the source of truth for user-facing rel
38
38
39
39
Before editing, confirm:
40
40
41
-
- The released version exists on npm (`npm view @pythoughts/pythinker-code versions --json`) or has a matching GitHub Release tag on `PyModel/pythinker-code`.
41
+
- The released version exists on npm (`npm view @pymodel/pythinker-code versions --json`) or has a matching GitHub Release tag on `PyModel/pythinker-code`.
42
42
- The top of `apps/pythinker-code/CHANGELOG.md` is that new version.
43
43
- The current branch is clean, or you are on a dedicated docs-sync branch.
44
44
@@ -76,7 +76,7 @@ Keep:
76
76
77
77
Remove:
78
78
79
-
- The upstream H1 `# @pythoughts/pythinker-code` because the docs page already has `# Changelog`.
79
+
- The upstream H1 `# @pymodel/pythinker-code` because the docs page already has `# Changelog`.
80
80
- Changesets subheadings such as `### Patch Changes`, `### Minor Changes`, and `### Major Changes`.
81
81
- PR links such as `[#317](...)`.
82
82
- Commit hash links such as ``[`2f51db4`](...)``.
@@ -156,7 +156,7 @@ Every version heading must carry its release date in parentheses:
156
156
Take the date from the version's published GitHub Release tag, not from when you run the sync:
Use the half-width parenthesis form ` (YYYY-MM-DD)` on the English page. Never invent or guess a date; if the tag is missing, stop and confirm with the user.
Copy file name to clipboardExpand all lines: .agents/skills/write-tui/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ When a controller or `PythinkerTUI` section keeps growing, split pure functions,
35
35
The feature type decides the landing spot:
36
36
37
37
-**CLI arguments** → `src/cli/commands.ts` / `src/cli/options.ts`, passed into the TUI via `src/cli/run-shell.ts`. The CLI never operates on the session directly.
38
-
-**CLI subcommands** → `src/cli/sub/`, non-interactive only; reach core via `@pythoughts/pythinker-code-sdk`.
38
+
-**CLI subcommands** → `src/cli/sub/`, non-interactive only; reach core via `@pymodel/pythinker-code-sdk`.
39
39
-**Slash commands** → declare/parse/type under `src/tui/commands/`; add the execution entry in `PythinkerTUI`'s slash-command handler section; sink complex logic into `utils` or a focused component.
40
40
-**Skill-derived commands** → hook into `buildSkillSlashCommands` / the skill command map; do not hard-code a single skill.
41
41
-**Transcript message types** → define the shape in `src/tui/types.ts`, add/extend a `components/messages/` component, register the renderer in the transcript builder.
Copy file name to clipboardExpand all lines: .changeset/README.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,41 +10,41 @@ Current publishable packages:
10
10
11
11
| Package | Directory | Description |
12
12
| --- | --- | --- |
13
-
|`@pythoughts/pythinker-code`|`apps/pythinker-code`| CLI / TUI application — provides the `pythinker` command after install |
14
-
|`@pythoughts/pythinker-code-sdk`|`packages/node-sdk`| Public TypeScript SDK |
13
+
|`@pymodel/pythinker-code`|`apps/pythinker-code`| CLI / TUI application — provides the `pythinker` command after install |
14
+
|`@pymodel/pythinker-code-sdk`|`packages/node-sdk`| Public TypeScript SDK |
15
15
16
16
All other workspace packages are private internal packages, are not published to npm, and are excluded via `ignore` in `.changeset/config.json`:
17
17
18
-
-`@pythoughts/acp-adapter`
19
-
-`@pythoughts/agent-core`
20
-
-`@pythoughts/kaos`
21
-
-`@pythoughts/pythinker-code-oauth`
22
-
-`@pythoughts/pythinker-telemetry`
23
-
-`@pythoughts/pythinker-web`
24
-
-`@pythoughts/kosong`
25
-
-`@pythoughts/migration-legacy`
26
-
-`@pythoughts/protocol`
27
-
-`@pythoughts/server`
28
-
-`@pythoughts/server-e2e`
29
-
-`@pythoughts/dashboard`
30
-
-`@pythoughts/dashboard-server`
31
-
-`@pythoughts/dashboard-web`
18
+
-`@pymodel/acp-adapter`
19
+
-`@pymodel/agent-core`
20
+
-`@pymodel/kaos`
21
+
-`@pymodel/pythinker-code-oauth`
22
+
-`@pymodel/pythinker-telemetry`
23
+
-`@pymodel/pythinker-web`
24
+
-`@pymodel/kosong`
25
+
-`@pymodel/migration-legacy`
26
+
-`@pymodel/protocol`
27
+
-`@pymodel/server`
28
+
-`@pymodel/server-e2e`
29
+
-`@pymodel/dashboard`
30
+
-`@pymodel/dashboard-server`
31
+
-`@pymodel/dashboard-web`
32
32
-`pythinker-migration-legacy`
33
33
34
-
Version impact from internal dependencies must be judged manually. The published artifacts for CLI and SDK bundle internal workspace packages into the artifact itself; runtime `dependencies` of published packages must not include any `@pythoughts/*` internal workspace packages.
34
+
Version impact from internal dependencies must be judged manually. The published artifacts for CLI and SDK bundle internal workspace packages into the artifact itself; runtime `dependencies` of published packages must not include any `@pymodel/*` internal workspace packages.
35
35
36
36
The repository's `.changeset/config.json` sets `updateInternalDependencies: "patch"`. Because internal packages are not published, you still need to manually select all affected publishable packages in the changeset — do not rely solely on automatic dependency bumps to express user-visible changes.
37
37
38
38
Example scenarios:
39
39
40
40
| Change | Changeset selection |
41
41
| --- | --- |
42
-
| Only modifies TUI behavior in `@pythoughts/pythinker-code`| Add `patch` / `minor` / `major` to `@pythoughts/pythinker-code`|
42
+
| Only modifies TUI behavior in `@pymodel/pythinker-code`| Add `patch` / `minor` / `major` to `@pymodel/pythinker-code`|
43
43
| Only modifies internal packages, no user-visible change in SDK / CLI | Usually no changeset needed |
44
-
| Internal package fix changes the CLI user experience | Add a changeset to `@pythoughts/pythinker-code` describing the user-visible fix |
45
-
| Internal package adds a new capability exposed by the SDK | Add a changeset to `@pythoughts/pythinker-code-sdk`|
46
-
| SDK behavior change affects CLI user experience | Add changesets to both `@pythoughts/pythinker-code-sdk` and `@pythoughts/pythinker-code`|
47
-
| Provider abstraction change affects SDK / CLI | Add changesets to the affected `@pythoughts/pythinker-code-sdk` and/or `@pythoughts/pythinker-code`|
44
+
| Internal package fix changes the CLI user experience | Add a changeset to `@pymodel/pythinker-code` describing the user-visible fix |
45
+
| Internal package adds a new capability exposed by the SDK | Add a changeset to `@pymodel/pythinker-code-sdk`|
46
+
| SDK behavior change affects CLI user experience | Add changesets to both `@pymodel/pythinker-code-sdk` and `@pymodel/pythinker-code`|
47
+
| Provider abstraction change affects SDK / CLI | Add changesets to the affected `@pymodel/pythinker-code-sdk` and/or `@pymodel/pythinker-code`|
48
48
| Test-only, internal refactor, docs, or private debug tooling changes | Usually no changeset needed |
49
49
| Bundled official plugin change under `plugins/` (e.g. `pythinker-datasource`) | No changeset — the plugin is versioned via its own `pythinker.plugin.json` / `plugins/marketplace.json` and shipped through the marketplace CDN, not the npm package |
50
50
@@ -54,7 +54,7 @@ This repository uses npm's **Trusted Publishing** (OIDC-based) for publishing
54
54
55
55
### Configuration steps
56
56
57
-
1. Open each publishable package's page on the npm website, e.g. `https://www.npmjs.com/package/@pythoughts/pythinker-code`.
57
+
1. Open each publishable package's page on the npm website, e.g. `https://www.npmjs.com/package/@pymodel/pythinker-code`.
58
58
2. Go to **Settings** -> **Publishing access**.
59
59
3. Find **Automate publishing with GitHub Actions** or **Add trusted publisher**.
60
60
4. Click **Add a new trusted publisher**.
@@ -146,12 +146,12 @@ The root-level `pnpm run publish` first runs typecheck, lint, sherif, test, buil
146
146
## Notes
147
147
148
148
- Every PR that affects publishable-package behavior or public API should include a corresponding changeset.
149
-
- Changes under `plugins/` (the bundled official plugins such as `pythinker-datasource`) do **not** need a changeset: each plugin carries its own version in `pythinker.plugin.json` and `plugins/marketplace.json` and is distributed via the marketplace CDN, separately from the `@pythoughts/pythinker-code` npm package.
149
+
- Changes under `plugins/` (the bundled official plugins such as `pythinker-datasource`) do **not** need a changeset: each plugin carries its own version in `pythinker.plugin.json` and `plugins/marketplace.json` and is distributed via the marketplace CDN, separately from the `@pymodel/pythinker-code` npm package.
150
150
- Changeset files must be committed to the repository — release PRs are only triggered after they're merged.
151
151
- Release PRs require human review and merge; they will not publish automatically.
152
-
- Do not add release changesets for private internal packages; only select `@pythoughts/pythinker-code` and `@pythoughts/pythinker-code-sdk`.
153
-
- If a change in an underlying internal package alters user-visible behavior or public API of a publishable package, add a changeset to the affected publishable package. For example, when a bug fixed in `@pythoughts/agent-core` resolves an issue CLI users encounter, add a changeset to `@pythoughts/pythinker-code` describing the user-visible fix.
154
-
-`@pythoughts/pythinker-code` is the official CLI package name; after a global install it provides the `pythinker` command.
152
+
- Do not add release changesets for private internal packages; only select `@pymodel/pythinker-code` and `@pymodel/pythinker-code-sdk`.
153
+
- If a change in an underlying internal package alters user-visible behavior or public API of a publishable package, add a changeset to the affected publishable package. For example, when a bug fixed in `@pymodel/agent-core` resolves an issue CLI users encounter, add a changeset to `@pymodel/pythinker-code` describing the user-visible fix.
154
+
-`@pymodel/pythinker-code` is the official CLI package name; after a global install it provides the `pythinker` command.
155
155
- Make sure each publishable package on npm has a Trusted Publisher configured.
Keep the current thinking effort when switching models in the model picker instead of silently saving the new model's lowest level as the default, and repair a stale thinking mode in the config when saving an effort.
Publish the CLI under the @pymodel npm scope; install with `npm install -g @pymodel/pythinker-code`. The old @pythoughts scope is deprecated and no longer receives releases.
Show only the animated thinking indicator while the model thinks; the streamed thinking text no longer appears in the transcript unless expanded with Ctrl+O.
0 commit comments