agentwheel 0.21.4 → 0.21.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/index.js +9 -3
- package/openpack.json +1 -1
- package/package.json +1 -1
- package/skills/agentwheel/SKILL.md +1 -1
- package/skills/agentwheel-discovery/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -139,6 +139,23 @@ refused unless `--carry-drift` is passed: the dry-run prints the runtime hash, t
|
|
|
139
139
|
`--expected-runtime-hash <sha256>`, and the manifest keeps the recorded hash so the next install
|
|
140
140
|
still reports the drift. Merge and managed-block entries never carry drift.
|
|
141
141
|
|
|
142
|
+
Use `--source-state-key <exact-key>` when an existing source manifest must be selected explicitly.
|
|
143
|
+
This is a command-local equivalent of a named agent's `stateKey`; it does not edit agent configuration,
|
|
144
|
+
move state files, or reconstruct graph locks. The key must be canonical and match the selected adapter
|
|
145
|
+
and installation type. The existing target identity, source owner, exact merge contribution, hash,
|
|
146
|
+
revision, pending-journal and migration guards still apply. For example:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
agentwheel ownership handoff mcp/example.json --local --agent local-codex \
|
|
150
|
+
--source-state-key codex.user.existing-state \
|
|
151
|
+
--from-workspace-root /old/workspace --to-workspace-root /new/workspace --dry-run
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Apply only the same reviewed selection with `--expected-hash` and `--expected-revision`. An explicit
|
|
155
|
+
key is never inferred from other claims and does not allow incomplete merge ownership or drift to
|
|
156
|
+
be carried for merge artifacts.
|
|
157
|
+
|
|
158
|
+
|
|
142
159
|
For a one-time MCP rename, keep the legacy artifact in a dedicated cutover workspace rather than
|
|
143
160
|
the canonical desired-state profile. Set the legacy manifest `stateKey` on its named agent, then
|
|
144
161
|
preview one runtime at a time:
|
package/dist/index.js
CHANGED
|
@@ -20032,7 +20032,7 @@ async function inspectInstalledState(source, destination, packageNames) {
|
|
|
20032
20032
|
if (!sourceGraphArtifacts.has(graphEntryIdentity(sourceEntry.entry))) {
|
|
20033
20033
|
throw new Error(`Source manifest entry is not covered by its graph lock: ${sourceEntry.renderedPath}`);
|
|
20034
20034
|
}
|
|
20035
|
-
if (sourceEntry.entry.owners.some((owner) => !
|
|
20035
|
+
if (sourceEntry.entry.owners.some((owner) => !ownerMatchesPackage(owner, selected))) {
|
|
20036
20036
|
throw new Error(`Partial ownership at ${sourceEntry.renderedPath} includes packages outside the normalization selection.`);
|
|
20037
20037
|
}
|
|
20038
20038
|
const destinationRenderedPath = renderedEntryPathForRoot(destinationState.installRoot, sourceEntry.entry.path);
|
|
@@ -21682,7 +21682,7 @@ ownershipCommand.command("release-claim").description("release one exact plain o
|
|
|
21682
21682
|
console.log(`Plan digest: ${result.planDigest}`);
|
|
21683
21683
|
if (!options.apply) console.log("Apply with this same scope and reason plus --apply --plan-digest, --expected-source-revision and --expected-inventory-revision from this plan.");
|
|
21684
21684
|
});
|
|
21685
|
-
ownershipCommand.command("handoff").description("transfer one managed artifact between Agentwheel workspace roots").argument("<selector>", "exact artifact selector in type/name form").option("--from-workspace-root <path>", "current owning workspace root").option("--from-unknown-owner", "hand off an artifact recorded as workspace:unknown", false).requiredOption("--to-workspace-root <path>", "new owning workspace root").option("--to-fleet <id>", "qualify the new owner with a registered fleet id").option("--expected-hash <sha256>", "expected recorded artifact hash; required when applying").option("--expected-revision <sha256>", "expected install manifest revision; required when applying").option("--carry-drift", "accept a file or directory whose runtime differs from the recorded hash; the recorded hash is kept", false).option("--expected-runtime-hash <sha256>", "expected drifted runtime hash; required when applying with --carry-drift").option("--adapter <adapter>", "built-in adapter").option("-i, --installation-type <type>", "installation type (for example local or user)").option("--user", "use the user workspace", false).option("--local", "use the nearest local workspace", false).option("--fleet <id>", "use one registered named fleet").option("--adapter-config <path>", "adapter JSON/JSONC file").option("--adapter-module <path>", "local programmatic adapter module").option("--allow-adapter-code", "allow loading local adapter code", false).option("-t, --target-root <path>", "runtime/project root").option("--agent <name>", "named agent from merged config").option("--profile <name>", "workspace runtime profile (must resolve to one target)").option("--dry-run", "validate all preconditions without writing the manifest", false).action(async (selector, options) => {
|
|
21685
|
+
ownershipCommand.command("handoff").description("transfer one managed artifact between Agentwheel workspace roots").argument("<selector>", "exact artifact selector in type/name form").option("--from-workspace-root <path>", "current owning workspace root").option("--from-unknown-owner", "hand off an artifact recorded as workspace:unknown", false).requiredOption("--to-workspace-root <path>", "new owning workspace root").option("--source-state-key <key>", "explicit source install-manifest state key for this handoff only").option("--to-fleet <id>", "qualify the new owner with a registered fleet id").option("--expected-hash <sha256>", "expected recorded artifact hash; required when applying").option("--expected-revision <sha256>", "expected install manifest revision; required when applying").option("--carry-drift", "accept a file or directory whose runtime differs from the recorded hash; the recorded hash is kept", false).option("--expected-runtime-hash <sha256>", "expected drifted runtime hash; required when applying with --carry-drift").option("--adapter <adapter>", "built-in adapter").option("-i, --installation-type <type>", "installation type (for example local or user)").option("--user", "use the user workspace", false).option("--local", "use the nearest local workspace", false).option("--fleet <id>", "use one registered named fleet").option("--adapter-config <path>", "adapter JSON/JSONC file").option("--adapter-module <path>", "local programmatic adapter module").option("--allow-adapter-code", "allow loading local adapter code", false).option("-t, --target-root <path>", "runtime/project root").option("--agent <name>", "named agent from merged config").option("--profile <name>", "workspace runtime profile (must resolve to one target)").option("--dry-run", "validate all preconditions without writing the manifest", false).action(async (selector, options) => {
|
|
21686
21686
|
if (!options.dryRun && (!options.expectedHash || !options.expectedRevision)) {
|
|
21687
21687
|
throw new Error("Applying an ownership handoff requires --expected-hash and --expected-revision from a reviewed --dry-run.");
|
|
21688
21688
|
}
|
|
@@ -21698,9 +21698,15 @@ ownershipCommand.command("handoff").description("transfer one managed artifact b
|
|
|
21698
21698
|
if (!artifactType || !artifactName || extra.length > 0) {
|
|
21699
21699
|
throw new Error(`Ownership handoff selector must be exactly type/name: ${selector}`);
|
|
21700
21700
|
}
|
|
21701
|
-
const target = targets[0];
|
|
21701
|
+
const target = options.sourceStateKey === void 0 ? targets[0] : { ...targets[0], stateKey: options.sourceStateKey };
|
|
21702
|
+
if (options.sourceStateKey !== void 0 && (stateKeyFor(target.adapter, { stateKey: options.sourceStateKey }) !== options.sourceStateKey || !options.sourceStateKey.startsWith(`${target.adapter}.`))) {
|
|
21703
|
+
throw new Error("The source state key must be exact, canonical, and scoped to the selected adapter.");
|
|
21704
|
+
}
|
|
21702
21705
|
const state = await resolveCliTargetState(target, normalizedOptions);
|
|
21703
21706
|
const { adapter, installationType } = state;
|
|
21707
|
+
if (options.sourceStateKey !== void 0 && options.sourceStateKey !== `${adapter.name}.${installationType}` && !options.sourceStateKey.startsWith(`${adapter.name}.${installationType}.`)) {
|
|
21708
|
+
throw new Error("The source state key must match the selected installation type.");
|
|
21709
|
+
}
|
|
21704
21710
|
if (state.migration) {
|
|
21705
21711
|
throw new Error(
|
|
21706
21712
|
"Migrate the target state before ownership handoff by running a full agentwheel install for this target."
|
package/openpack.json
CHANGED
package/package.json
CHANGED