fix: use Gitea-compatible package scope
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
## Decision
|
||||
|
||||
Keep extension sources under `extensions/*` and make each maintained extension directory a Bun workspace with its own package manifest. Use the `@_jb/pi-*` namespace, a root Bun catalog for external dependency versions, and `workspace:^` for repository-owned libraries. The repository root is private and is no longer itself a Pi package.
|
||||
Keep extension sources under `extensions/*` and make each maintained extension directory a Bun workspace with its own package manifest. Use the `@jbcode/pi-*` namespace, a root Bun catalog for external dependency versions, and `workspace:^` for repository-owned libraries. The repository root is private and is no longer itself a Pi package.
|
||||
|
||||
Publish packages to the `jb` owner endpoint of the Gitea npm registry. Repository configuration maps `@_jb` to `https://git.jb.codes/api/packages/jb/npm/`; credentials remain in the user environment or user-level npm configuration and are never committed.
|
||||
Publish packages to the `jb` owner endpoint of the Gitea npm registry. Repository configuration maps `@jbcode` to `https://git.jb.codes/api/packages/jb/npm/`; credentials remain in the user environment or user-level npm configuration and are never committed. Gitea rejected the initially proposed underscore-prefixed scope as an invalid package name, so the valid `@jbcode` scope is part of the registry contract.
|
||||
|
||||
`extensions/shared` is the publishable `@_jb/pi-shared` library. Extensions that import it declare a normal runtime dependency so Pi's production package installation receives the required code.
|
||||
`extensions/shared` is the publishable `@jbcode/pi-shared` library. Extensions that import it declare a normal runtime dependency so Pi's production package installation receives the required code.
|
||||
|
||||
`extensions/_workflows` is reference code, not a package or publishable extension. `@_jb/pi-workflow` remains a private workspace until the required reference runtime is merged under `extensions/workflow`; this prevents publishing two workflow packages or publishing an incomplete package.
|
||||
`extensions/_workflows` is reference code, not a package or publishable extension. `@jbcode/pi-workflow` remains a private workspace until the required reference runtime is merged under `extensions/workflow`; this prevents publishing two workflow packages or publishing an incomplete package.
|
||||
|
||||
The existing `config/pi-links.json` policy remains the authority for live-development exposure. Package boundaries and publication do not automatically enable extensions globally.
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@ Import the tracked files from the `main` branch of these repositories into Bun w
|
||||
|
||||
| Source | Imported commit | Workspace | Package |
|
||||
| --- | --- | --- | --- |
|
||||
| `jb/pi-interactive-subagents` | `a3cd328edef59ad491d4f35f9fbadf8ec80cadc4` | `extensions/interactive-subagents` | `@_jb/pi-interactive-subagents` |
|
||||
| `jb/pi-native-hooks` | `73fa3299bf30fd6da5abfc74a0ee7a36e0a07f0a` | `extensions/native-hooks` | `@_jb/pi-native-hooks` |
|
||||
| `jb/pi-todo-herdr` | `d9e1ffec51e25238e0baec48ce1303893f13849f` | `extensions/todo-herdr` | `@_jb/pi-todo-herdr` |
|
||||
| `jb/pi-interactive-subagents` | `a3cd328edef59ad491d4f35f9fbadf8ec80cadc4` | `extensions/interactive-subagents` | `@jbcode/pi-interactive-subagents` |
|
||||
| `jb/pi-native-hooks` | `73fa3299bf30fd6da5abfc74a0ee7a36e0a07f0a` | `extensions/native-hooks` | `@jbcode/pi-native-hooks` |
|
||||
| `jb/pi-todo-herdr` | `d9e1ffec51e25238e0baec48ce1303893f13849f` | `extensions/todo-herdr` | `@jbcode/pi-todo-herdr` |
|
||||
|
||||
Carry snapshots rather than submodules, subtrees, or unrelated Git histories. The monorepo owns package manifests, dependency normalization, compatibility changes, tests, and releases after import. Preserve source attribution in each package.
|
||||
|
||||
Record source URLs, branches, and commits in `config/imported-packages.json`. `bun run imports:check` compares those commits with current remote `main` heads. The staging command in `scripts/import-package-snapshots.mjs` clones fresh snapshots outside the repository for explicit review; it never overwrites the maintained workspaces.
|
||||
|
||||
Rename the private `pi-workflow` extension identity to `workflow`. Its workspace is `extensions/workflow`, its tool and user-facing runtime identifiers use `workflow`, and its configuration/state paths use the same name. The npm package remains `@_jb/pi-workflow` under the repository's `@_jb/pi-<name>` convention.
|
||||
Rename the private `pi-workflow` extension identity to `workflow`. Its workspace is `extensions/workflow`, its tool and user-facing runtime identifiers use `workflow`, and its configuration/state paths use the same name. The npm package remains `@jbcode/pi-workflow` under the repository's `@jbcode/pi-<name>` convention.
|
||||
|
||||
## Consequences
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The repository uses Bun workspaces under `extensions/*`. External dependency versions live in the root `package.json` catalog; repository-owned dependencies use `workspace:^`.
|
||||
|
||||
Publishable packages include the repository-native extensions plus the imported `@_jb/pi-interactive-subagents`, `@_jb/pi-native-hooks`, and `@_jb/pi-todo-herdr` snapshots. `config/imported-packages.json` records their source `main` commits; use `bun run imports:check` to detect upstream movement.
|
||||
Publishable packages include the repository-native extensions plus the imported `@jbcode/pi-interactive-subagents`, `@jbcode/pi-native-hooks`, and `@jbcode/pi-todo-herdr` snapshots. `config/imported-packages.json` records their source `main` commits; use `bun run imports:check` to detect upstream movement.
|
||||
|
||||
## Install and verify
|
||||
|
||||
@@ -16,10 +16,10 @@ Use plain `bun install` when intentionally updating `bun.lock`.
|
||||
|
||||
## Registry configuration
|
||||
|
||||
The tracked `.npmrc` routes only the `@_jb` scope:
|
||||
The tracked `.npmrc` routes only the `@jbcode` scope:
|
||||
|
||||
```ini
|
||||
@_jb:registry=https://git.jb.codes/api/packages/jb/npm/
|
||||
@jbcode:registry=https://git.jb.codes/api/packages/jb/npm/
|
||||
```
|
||||
|
||||
Configure a Gitea personal access token with package permissions outside the repository:
|
||||
@@ -40,7 +40,7 @@ bun pm pack --destination ../../dist
|
||||
bun publish
|
||||
```
|
||||
|
||||
Publish `@_jb/pi-shared` before a new version of any extension that depends on it. Gitea rejects republishing an existing name/version, so bump the changed package version first.
|
||||
Publish `@jbcode/pi-shared` before a new version of any extension that depends on it. Gitea rejects republishing an existing name/version, so bump the changed package version first.
|
||||
|
||||
`extensions/workflow` is intentionally private until the `_workflows` reference dependencies are merged into that package. `extensions/_workflows` must not be published.
|
||||
|
||||
@@ -49,11 +49,11 @@ Publish `@_jb/pi-shared` before a new version of any extension that depends on i
|
||||
After configuring the same scope and token in the npm configuration visible to Pi:
|
||||
|
||||
```bash
|
||||
pi install npm:@_jb/pi-dictate
|
||||
pi install npm:@_jb/pi-file-search
|
||||
pi install npm:@_jb/pi-interactive-subagents
|
||||
pi install npm:@_jb/pi-native-hooks
|
||||
pi install npm:@_jb/pi-todo-herdr
|
||||
pi install npm:@jbcode/pi-dictate
|
||||
pi install npm:@jbcode/pi-file-search
|
||||
pi install npm:@jbcode/pi-interactive-subagents
|
||||
pi install npm:@jbcode/pi-native-hooks
|
||||
pi install npm:@jbcode/pi-todo-herdr
|
||||
```
|
||||
|
||||
Pi installs runtime dependencies from the same scoped registry. The repository's symlink-based development exposure remains controlled separately by `config/pi-links.json`.
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
## Merge `_workflows` reference runtime into `workflow`
|
||||
|
||||
`extensions/_workflows` was retained only as a reference while `extensions/workflow` was developed, but `workflow` still imports its runner, model, prompt, and serialization modules. Move the required code under `extensions/workflow`, remove obsolete model-authored workflow surfaces, update tests and documentation, and then delete the reference directory. Until that work is complete, `@_jb/pi-workflow` must remain a private Bun workspace and `extensions/_workflows` must remain excluded from workspaces and publication. Acceptance requires `bun pm pack` for `workflow` to contain every runtime import without reaching outside the package root, followed by an isolated Pi package smoke test.
|
||||
`extensions/_workflows` was retained only as a reference while `extensions/workflow` was developed, but `workflow` still imports its runner, model, prompt, and serialization modules. Move the required code under `extensions/workflow`, remove obsolete model-authored workflow surfaces, update tests and documentation, and then delete the reference directory. Until that work is complete, `@jbcode/pi-workflow` must remain a private Bun workspace and `extensions/_workflows` must remain excluded from workspaces and publication. Acceptance requires `bun pm pack` for `workflow` to contain every runtime import without reaching outside the package root, followed by an isolated Pi package smoke test.
|
||||
|
||||
## Make `pi-links` checks work from linked worktrees
|
||||
|
||||
|
||||
Reference in New Issue
Block a user