@open-agent-toolkit/cli 0.2.57 → 0.2.59

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.
Files changed (64) hide show
  1. package/assets/agents/oat-phase-implementer.md +44 -2
  2. package/assets/bundle-metadata.json +1 -1
  3. package/assets/docs/cli-utilities/configuration.md +16 -0
  4. package/assets/docs/cli-utilities/workflow-gates.md +88 -3
  5. package/assets/docs/contributing/skills.md +27 -5
  6. package/assets/docs/contributing/smoke-testing.md +44 -0
  7. package/assets/docs/provider-sync/commands.md +23 -0
  8. package/assets/docs/workflows/projects/autonomy.md +5 -2
  9. package/assets/docs/workflows/projects/dispatch-ceiling.md +43 -7
  10. package/assets/docs/workflows/projects/implementation-execution.md +6 -3
  11. package/assets/docs/workflows/projects/lifecycle.md +4 -3
  12. package/assets/public-package-versions.json +4 -4
  13. package/assets/skills/oat-project-autonomous/SKILL.md +1 -1
  14. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +45 -38
  15. package/assets/skills/oat-project-design/SKILL.md +24 -5
  16. package/assets/skills/oat-project-discover/SKILL.md +10 -5
  17. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +45 -38
  18. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  19. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +43 -9
  20. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +14 -8
  21. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +45 -38
  22. package/assets/skills/oat-project-implement/references/phase-execution.md +7 -3
  23. package/assets/skills/oat-project-import-plan/SKILL.md +29 -4
  24. package/assets/skills/oat-project-next/SKILL.md +29 -2
  25. package/assets/skills/oat-project-plan/SKILL.md +29 -4
  26. package/assets/skills/oat-project-plan-writing/SKILL.md +95 -1
  27. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +45 -38
  28. package/assets/skills/oat-project-progress/SKILL.md +12 -1
  29. package/assets/skills/oat-project-quick-start/SKILL.md +29 -4
  30. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +45 -38
  31. package/assets/skills/oat-project-review-provide/SKILL.md +13 -6
  32. package/assets/skills/oat-project-review-provide-remote/SKILL.md +12 -5
  33. package/assets/templates/state.md +4 -1
  34. package/dist/commands/gate/index.d.ts.map +1 -1
  35. package/dist/commands/gate/index.js +102 -8
  36. package/dist/commands/init/index.d.ts.map +1 -1
  37. package/dist/commands/init/index.js +16 -1
  38. package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
  39. package/dist/commands/project/dispatch-ceiling/index.js +10 -1
  40. package/dist/commands/remove/skill/remove-skill.d.ts.map +1 -1
  41. package/dist/commands/remove/skill/remove-skill.js +10 -1
  42. package/dist/commands/shared/frontmatter.d.ts +32 -1
  43. package/dist/commands/shared/frontmatter.d.ts.map +1 -1
  44. package/dist/commands/shared/frontmatter.js +92 -0
  45. package/dist/commands/status/index.d.ts.map +1 -1
  46. package/dist/commands/status/index.js +8 -1
  47. package/dist/commands/sync/apply.d.ts.map +1 -1
  48. package/dist/commands/sync/apply.js +40 -6
  49. package/dist/commands/sync/index.d.ts.map +1 -1
  50. package/dist/commands/sync/index.js +11 -17
  51. package/dist/commands/sync/sync.types.d.ts +6 -6
  52. package/dist/commands/sync/sync.types.d.ts.map +1 -1
  53. package/dist/config/resolve.d.ts +16 -0
  54. package/dist/config/resolve.d.ts.map +1 -1
  55. package/dist/config/resolve.js +16 -8
  56. package/dist/engine/execute-plan.d.ts.map +1 -1
  57. package/dist/engine/execute-plan.js +6 -0
  58. package/dist/manifest/index.d.ts +2 -1
  59. package/dist/manifest/index.d.ts.map +1 -1
  60. package/dist/manifest/index.js +1 -1
  61. package/dist/manifest/manager.d.ts +40 -0
  62. package/dist/manifest/manager.d.ts.map +1 -1
  63. package/dist/manifest/manager.js +35 -0
  64. package/package.json +2 -2
@@ -17,7 +17,7 @@ import { detectDrift, detectStrays, filterKnownStrays, } from '../../drift/index
17
17
  import { HOOK_DRIFT_WARNING, HOOK_STRAY_INFO, mergeUserScopeMaterializationEntries, scanBundledManagedAgents, scanCanonical, } from '../../engine/index.js';
18
18
  import { resolveAssetsRoot } from '../../fs/assets.js';
19
19
  import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../fs/paths.js';
20
- import { loadManifest, saveManifest } from '../../manifest/manager.js';
20
+ import { detectManifestVersionRestamp, formatManifestVersionRestampWarning, loadManifest, saveManifest, } from '../../manifest/manager.js';
21
21
  import { applyCodexProjectExtensionPlan, computeCodexProjectExtensionPlan, } from '../../providers/codex/codec/sync-extension.js';
22
22
  import { applyCursorProjectExtensionPlan, computeCursorProjectExtensionPlan, } from '../../providers/cursor/codec/sync-extension.js';
23
23
  import { getConfigAwareAdapters, getProviderRegistrations, getSyncMappings, resolveProviderScopeContext, } from '../../providers/shared/index.js';
@@ -651,6 +651,7 @@ async function collectScopeReports(scope, context, dependencies) {
651
651
  activeAdapterNames,
652
652
  userAgentMaterializationCoverage: scope === 'user' ? agentCoverage : 'none',
653
653
  providerContext,
654
+ versionRestamp: detectManifestVersionRestamp(scope, manifest),
654
655
  };
655
656
  }
656
657
  async function runStatusCommand(context, dependencies, options = {}) {
@@ -844,6 +845,12 @@ async function runStatusCommand(context, dependencies, options = {}) {
844
845
  }
845
846
  }
846
847
  if (manifestChanged) {
848
+ // Placed after the collection-migration block and immediately before
849
+ // the only status-owned save. An aborted migration never reaches
850
+ // here, so it never claims a restamp it did not perform.
851
+ if (scopeCollection.versionRestamp && !context.json) {
852
+ context.logger.warn(formatManifestVersionRestampWarning('status', scopeCollection.versionRestamp));
853
+ }
847
854
  await dependencies.saveManifest(scopeCollection.manifestPath, scopeCollection.manifest);
848
855
  }
849
856
  if (adoptedCount > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAiB3D,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EAExB,MAAM,cAAc,CAAC;AA2TtB,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,aAAa,EAAE,EAC3B,YAAY,EAAE,uBAAuB,GACpC,OAAO,CAAC,IAAI,CAAC,CA4Kf"}
1
+ {"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAiB3D,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EAExB,MAAM,cAAc,CAAC;AAgVtB,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,aAAa,EAAE,EAC3B,YAAY,EAAE,uBAAuB,GACpC,OAAO,CAAC,IAAI,CAAC,CAoMf"}
@@ -126,13 +126,26 @@ function coreHumanStatus(status) {
126
126
  return 'unknown';
127
127
  }
128
128
  }
129
- function formatCoreResults(plan, evidence, dependencies) {
129
+ /** The sentence `formatSyncPlan` appends to its heading for an empty plan. */
130
+ const EMPTY_PLAN_SUFFIX = '\nNo changes required.';
131
+ function formatCoreResults(plan, evidence, dependencies, restampOnly) {
130
132
  const operations = [...plan.entries, ...plan.removals];
131
133
  if (operations.length === 0) {
132
134
  if ((plan.collections?.length ?? 0) > 0) {
133
135
  return 'Core results\nNo per-entry operations.';
134
136
  }
135
- return dependencies.formatSyncPlan(plan, true);
137
+ const planOutput = dependencies.formatSyncPlan(plan, true);
138
+ if (!restampOnly || !planOutput.endsWith(EMPTY_PLAN_SUFFIX)) {
139
+ return planOutput;
140
+ }
141
+ // `formatSyncPlan` appends "No changes required." to its heading for any
142
+ // empty plan, and it is shared with dry-run and other callers, so it stays
143
+ // untouched. On the restamp-only path that sentence would contradict the
144
+ // trailing message two lines later, so the command layer drops exactly that
145
+ // known suffix and lets the trailing message be the run's single claim.
146
+ // Removing only a matching suffix, rather than keeping the first line,
147
+ // means an injected formatter's other content is never truncated.
148
+ return planOutput.slice(0, -EMPTY_PLAN_SUFFIX.length);
136
149
  }
137
150
  const resultsByIdentity = new Map((evidence?.operationResults ?? []).map((result) => [
138
151
  syncOperationIdentity(result),
@@ -155,7 +168,12 @@ function formatCoreResults(plan, evidence, dependencies) {
155
168
  : '';
156
169
  return `Core results${aggregate}\n${lines.join('\n')}`;
157
170
  }
158
- function formatAppliedOutput(scopePlans, coreApplyEvidence, dependencies) {
171
+ function formatAppliedOutput(scopePlans, coreApplyEvidence, dependencies,
172
+ // True when the run planned no operation at all and the manifest restamp is
173
+ // the only mutation. It is a whole-run state, matching the single trailing
174
+ // summary message, so with `--scope all` every scope's body is empty and at
175
+ // least one of them was restamped.
176
+ restampOnly) {
159
177
  if (scopePlans.length === 0) {
160
178
  return dependencies.formatSyncPlan({
161
179
  scope: 'project',
@@ -165,7 +183,7 @@ function formatAppliedOutput(scopePlans, coreApplyEvidence, dependencies) {
165
183
  }
166
184
  return scopePlans
167
185
  .map((scopePlan) => {
168
- const syncOutput = formatCoreResults(scopePlan.plan, coreApplyEvidence.find((evidence) => evidence.plan === scopePlan.plan), dependencies);
186
+ const syncOutput = formatCoreResults(scopePlan.plan, coreApplyEvidence.find((evidence) => evidence.plan === scopePlan.plan), dependencies, restampOnly);
169
187
  const collectionOutput = formatCollectionLifecycle(buildCollectionLifecycle(scopePlan, coreApplyEvidence.find((evidence) => evidence.plan === scopePlan.plan)
170
188
  ?.collectionResults));
171
189
  if (scopePlan.materializationExtensions.length === 0) {
@@ -310,9 +328,25 @@ export async function runSyncApply(context, scopePlans, dependencies) {
310
328
  });
311
329
  }
312
330
  else {
313
- context.logger.info(formatAppliedOutput(scopePlans, coreApplyEvidence, dependencies));
331
+ // A restamp is a real mutation: it overwrites the producing-version
332
+ // evidence even though no file operation was planned. Reporting "no
333
+ // changes required" for that case would contradict the advisory this same
334
+ // run just emitted, so the state is resolved once and threaded through
335
+ // both the plan body and the trailing message.
336
+ //
337
+ // `failed === 0` is load-bearing rather than defensive: a rejected
338
+ // collection is counted as a failure but is not a *planned* operation
339
+ // (`countPlannedOperations` admits only the mutating collection actions),
340
+ // so a run can fail with `plannedOperations === 0`. That run is not
341
+ // restamp-only and must never be described as needing no content changes.
342
+ const restampOnly = summary.plannedOperations === 0 &&
343
+ summary.failed === 0 &&
344
+ versionSkew.length > 0;
345
+ context.logger.info(formatAppliedOutput(scopePlans, coreApplyEvidence, dependencies, restampOnly));
314
346
  if (summary.plannedOperations === 0) {
315
- context.logger.info('\nNo changes required.');
347
+ context.logger.info(restampOnly
348
+ ? '\nManifest version refreshed; no content changes required.'
349
+ : '\nNo changes required.');
316
350
  }
317
351
  else if (summary.failed > 0) {
318
352
  context.logger.warn('\nSync completed with partial failures.');
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,eAAe,CAAC;AAWvB,OAAO,EAOL,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAI5C,OAAO,KAAK,EACV,aAAa,EAEb,uBAAuB,EAGxB,MAAM,cAAc,CAAC;AAEtB,KAAK,0BAA0B,GAAG,IAAI,CACpC,uBAAuB,EACvB,iBAAiB,GAAG,eAAe,CACpC,GAAG;IACF,aAAa,EAAE,CACb,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,aAAa,EACpB,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,KACrC,UAAU,CAAC,uBAAuB,CAAC,eAAe,CAAC,CAAC,CAAC;IAC1D,eAAe,EAAE,CACf,IAAI,EAAE,UAAU,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,C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AAsC,CAAC,EAAE,QAAQ,CAC/C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAClC,CAAC;KACH,KACE,UAAU,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5D,2BAA2B,CAAC,EAAE,CAAC,KAAK,EAAE;QACpC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9B,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,UAAU,CAAC;KACpB,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACrC,CAAC;AA2fF,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAClD,OAAO,CA+DT"}
@@ -8,9 +8,8 @@ import { DEFAULT_SYNC_CONFIG, loadSyncConfig, saveSyncConfig, } from '../../conf
8
8
  import { computeSyncPlan, executeSyncPlan, mergeUserScopeMaterializationEntries, scanBundledManagedAgents, scanCanonical, } from '../../engine/index.js';
9
9
  import { CliError } from '../../errors/index.js';
10
10
  import { resolveProjectRoot, resolveScopeRoot } from '../../fs/paths.js';
11
- import { loadManifest } from '../../manifest/index.js';
11
+ import { detectManifestVersionRestamp, loadManifest } from '../../manifest/index.js';
12
12
  import { getConfigAwareAdapters, getProviderRegistrations, recomputeProviderScopeContext, resolveProviderScopeContext, toMaterializationOperations, } from '../../providers/shared/index.js';
13
- import { OAT_VERSION } from '../../shared/oat-version.js';
14
13
  import { USER_SCOPE_MANAGED_AGENT_FILES, } from '../../shared/types.js';
15
14
  import { formatSyncPlan } from '../../ui/output.js';
16
15
  import { Command, Option } from 'commander';
@@ -165,26 +164,21 @@ async function maybeResolveProviderMismatches(context, scope, scopeRoot, configP
165
164
  /**
166
165
  * Derive the advisory version-skew diagnostic for a loaded scope manifest.
167
166
  *
168
- * This is the single source of truth for "this manifest was produced by a
169
- * different CLI version": `runSyncApply` keys its manifest restamp off the
170
- * presence of this diagnostic, so a restamp can never destroy the provenance
171
- * evidence without the advisory having been emitted first.
167
+ * `runSyncApply` keys its manifest restamp off the presence of this diagnostic,
168
+ * so a restamp can never destroy the provenance evidence without the advisory
169
+ * having been emitted first.
172
170
  *
173
- * Comparison is plain string inequality on identity, never semantic-version
174
- * ordering. An absent manifest therefore never reports skew, because
175
- * `loadManifest` deliberately creates an empty manifest stamped with the
176
- * invoking version and the two strings match. `ManifestSchema` rejects an
177
- * *empty* `oatVersion` before sync ever sees it, but it does admit other
171
+ * The comparison itself is `detectManifestVersionRestamp`, shared with every
172
+ * other command that saves a manifest: plain string inequality on identity,
173
+ * never semantic-version ordering. An absent manifest therefore never reports
174
+ * skew, because `loadManifest` deliberately creates an empty manifest stamped
175
+ * with the invoking version and the two strings match. `ManifestSchema` rejects
176
+ * an *empty* `oatVersion` before sync ever sees it, but it does admit other
178
177
  * degenerate strings such as whitespace-only values; those surface here as
179
178
  * ordinary skew rather than being reclassified as corruption.
180
179
  */
181
180
  function detectVersionSkew(scope, manifest) {
182
- const producingVersion = manifest.oatVersion;
183
- const invokingVersion = OAT_VERSION;
184
- if (producingVersion === invokingVersion) {
185
- return undefined;
186
- }
187
- return { scope, producingVersion, invokingVersion };
181
+ return detectManifestVersionRestamp(scope, manifest);
188
182
  }
189
183
  function isPathWithin(root, candidate) {
190
184
  const relativePath = relative(resolve(root), resolve(candidate));
@@ -4,7 +4,7 @@ import type { SyncConfig } from '../../config/index.js';
4
4
  import type { CollectionProjectionPlan, SyncOperationResult } from '../../engine/engine.types.js';
5
5
  import type { CollectionOperationResult } from '../../engine/execute-plan.js';
6
6
  import type { CanonicalEntry, ScanBundledManagedAgentsOptions, SyncPlan, SyncResult } from '../../engine/index.js';
7
- import type { Manifest } from '../../manifest/index.js';
7
+ import type { Manifest, ManifestVersionRestamp } from '../../manifest/index.js';
8
8
  import type { ConfigAwareAdaptersResult, MaterializationApplyResult, MaterializationExtension, MaterializationOperation, MaterializationPlan, ProviderAdapter } from '../../providers/shared/index.js';
9
9
  import type { MaterializationOperationResult } from '../../providers/shared/materialization-extension.js';
10
10
  import type { ConcreteScope, Scope } from '../../shared/types.js';
@@ -20,12 +20,12 @@ export interface CanonicalSyncFilter {
20
20
  * Advisory diagnostic emitted when the CLI version that produced a scope's sync
21
21
  * manifest differs from the CLI version invoking sync. Comparison is symmetric
22
22
  * string inequality: the contract is version identity, not which side is newer.
23
+ *
24
+ * Sync's scoped view of the shared manifest diagnostic. It is an alias rather
25
+ * than a parallel declaration so sync's semantics cannot drift from the
26
+ * comparison every other save site uses.
23
27
  */
24
- export interface SyncVersionSkew {
25
- scope: ConcreteScope;
26
- producingVersion: string;
27
- invokingVersion: string;
28
- }
28
+ export type SyncVersionSkew = ManifestVersionRestamp<ConcreteScope>;
29
29
  export interface ScopeSyncPlan {
30
30
  scope: ConcreteScope;
31
31
  scopeRoot: string;
@@ -1 +1 @@
1
- {"version":3,"file":"sync.types.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/sync.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EACV,cAAc,EACd,+BAA+B,EAC/B,QAAQ,EACR,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE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,KAAK,EAAE,aAAa,CAAC;QACrB,MAAM,EAAE,UAAU,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;QACjC,+BAA+B,CAAC,EAAE,SAAS;YACzC,QAAQ,EAAE,MAAM,CAAC;YACjB,WAAW,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;SACrC,EAAE,CAAC;KACL,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxB,eAAe,EAAE,CACf,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,MAAM,KACjB,OAAO,CACV,UAAU,GAAG;QAAE,iBAAiB,CAAC,EAAE,yBAAyB,EAAE,CAAA;KAAE,CACjE,CAAC;IACF,4BAA4B,EAAE,MAAM,4BAA4B,EAAE,CAAC;IACnE,iCAAiC,EAAE,CACjC,SAAS,EAAE,4BAA4B,EACvC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,mBAAmB,KACtB,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,cAAc,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;CAC9D"}
@@ -16,6 +16,22 @@ export interface ResolveEffectiveConfigDependencies {
16
16
  readUserConfig: (userConfigDir: string) => Promise<UserConfig>;
17
17
  }
18
18
  export declare function resolveEffectiveConfig(repoRoot: string, userConfigDir: string, env?: NodeJS.ProcessEnv, overrides?: Partial<ResolveEffectiveConfigDependencies>): Promise<ResolvedConfig>;
19
+ /** Concrete config layer that declared a skill gate. */
20
+ export type GateConfigSource = 'local' | 'shared' | 'user';
21
+ export interface ResolvedGateWithSource {
22
+ gate: GateConfig | null;
23
+ /**
24
+ * Layer that decided the result, or null when no layer declares the skill.
25
+ * A layer that declares the skill as `null` still owns the decision, so the
26
+ * source is reported even though the effective gate is null.
27
+ */
28
+ source: GateConfigSource | null;
29
+ }
30
+ /**
31
+ * Source-aware gate resolution. Identifies the deciding layer without changing
32
+ * the precedence `resolveGate` has always used.
33
+ */
34
+ export declare function resolveGateWithSource(effective: ResolvedConfig, skillName: string): ResolvedGateWithSource;
19
35
  export declare function resolveGate(effective: ResolvedConfig, skillName: string): GateConfig | null;
20
36
  export declare function resolveExecTargets(effective: ResolvedConfig): Record<string, ExecTarget>;
21
37
  export type ExecTargetOrigin = 'builtin' | 'user' | 'shared' | 'local';
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,GACR,OAAO,GACP,MAAM,GACN,KAAK,GACL,SAAS,CAAC;AAEd,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,kCAAkC;IACjD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CAChE;AAmHD,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,GAAE,MAAM,CAAC,UA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xB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAoDxC"}
@@ -176,18 +176,26 @@ export async function resolveEffectiveConfig(repoRoot, userConfigDir, env = proc
176
176
  resolved,
177
177
  };
178
178
  }
179
- export function resolveGate(effective, skillName) {
180
- for (const skills of [
181
- effective.local.workflow?.gates?.skills,
182
- effective.shared.workflow?.gates?.skills,
183
- effective.user.workflow?.gates?.skills,
184
- ]) {
179
+ /**
180
+ * Source-aware gate resolution. Identifies the deciding layer without changing
181
+ * the precedence `resolveGate` has always used.
182
+ */
183
+ export function resolveGateWithSource(effective, skillName) {
184
+ const layers = [
185
+ ['local', effective.local.workflow?.gates?.skills],
186
+ ['shared', effective.shared.workflow?.gates?.skills],
187
+ ['user', effective.user.workflow?.gates?.skills],
188
+ ];
189
+ for (const [source, skills] of layers) {
185
190
  if (!skills || !hasOwn(skills, skillName)) {
186
191
  continue;
187
192
  }
188
- return skills[skillName] ?? null;
193
+ return { gate: skills[skillName] ?? null, source };
189
194
  }
190
- return null;
195
+ return { gate: null, source: null };
196
+ }
197
+ export function resolveGate(effective, skillName) {
198
+ return resolveGateWithSource(effective, skillName).gate;
191
199
  }
192
200
  export function resolveExecTargets(effective) {
193
201
  const targets = cloneExecTargetRegistry(BUILTIN_EXEC_TARGETS);
@@ -1 +1 @@
1
- {"version":3,"file":"execute-plan.d.ts","sourceRoot":"","sources":["../../src/engine/execute-plan.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAGb,gCAAgC,EAEhC,sBAAsB,EACtB,kCAAkC,EAGnC,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACV,QAAQ,EAGT,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAGL,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,wBAAwB,EAExB,QAAQ,EAER,UAAU,EACX,MAAM,gBAAgB,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AAoB,CAAC,CAkK/B"}
@@ -377,6 +377,9 @@ async function executeCollectionTransaction(plans, manifest, blockedDeferredDire
377
377
  removedTransitionPlans.size > 0 ||
378
378
  absentTransitionPlans.size > 0;
379
379
  if (hasManifestMutation) {
380
+ // Sync-covered save site: this path is reached only through sync's
381
+ // `executeSyncPlan`, which emits the pre-mutation version-restamp
382
+ // advisory before dispatching the plan. It needs no advisory of its own.
380
383
  await dependencies.saveManifest(manifestPath, nextManifest);
381
384
  }
382
385
  const detachmentResults = [];
@@ -582,6 +585,9 @@ export async function executeSyncPlan(plan, manifest, manifestPath, dependencies
582
585
  const entryApplySucceeded = operationResults.some(({ status }) => status === 'changed' || status === 'current');
583
586
  const successfulNoOperationApply = operations.length === 0 && !collectionTransaction.attempted;
584
587
  if (entryApplySucceeded || successfulNoOperationApply) {
588
+ // Sync-covered save site: see the collection save above. Sync owns the
589
+ // advisory because only the command layer knows the scope, the output
590
+ // ordering, and whether the run is in JSON mode.
585
591
  await saveManifest(manifestPath, nextManifest);
586
592
  }
587
593
  const collectionApplied = collectionTransaction.results.filter(({ status }) => status === 'changed').length;
@@ -1,5 +1,6 @@
1
1
  export { computeDirectoryHash } from './hash.js';
2
- export { addEntry, createEmptyManifest, findEntry, loadManifest, removeEntry, saveManifest, } from './manager.js';
2
+ export { addEntry, createEmptyManifest, detectManifestVersionRestamp, findEntry, formatManifestVersionRestampWarning, loadManifest, removeEntry, saveManifest, } from './manager.js';
3
+ export type { ManifestVersionRestamp } from './manager.js';
3
4
  export type { Manifest, ManifestCollectionEntry, ManifestEntry, ManifestEntryV2, ManifestV1, ManifestV2, } from './manifest.types.js';
4
5
  export { ManifestCollectionEntrySchema, ManifestEntrySchema, ManifestSchema, ManifestV1Schema, ManifestV2Schema, } from './manifest.types.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,QAAQ,EACR,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,6BAA6B,EAC7B,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,4BAA4B,EAC5B,SAAS,EACT,mCAAmC,EACnC,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,YAAY,EACV,QAAQ,EACR,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,6BAA6B,EAC7B,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { computeDirectoryHash } from './hash.js';
2
- export { addEntry, createEmptyManifest, findEntry, loadManifest, removeEntry, saveManifest, } from './manager.js';
2
+ export { addEntry, createEmptyManifest, detectManifestVersionRestamp, findEntry, formatManifestVersionRestampWarning, loadManifest, removeEntry, saveManifest, } from './manager.js';
3
3
  export { ManifestCollectionEntrySchema, ManifestEntrySchema, ManifestSchema, ManifestV1Schema, ManifestV2Schema, } from './manifest.types.js';
@@ -1,5 +1,45 @@
1
1
  import { type Manifest, type ManifestEntry, type ManifestV2 } from './manifest.types.js';
2
2
  export declare function createEmptyManifest(): Manifest;
3
+ /**
4
+ * Structured evidence that the CLI version recorded in a manifest differs from
5
+ * the CLI version that is about to rewrite it.
6
+ *
7
+ * `saveManifest` unconditionally replaces `oatVersion` with `OAT_VERSION`, so
8
+ * this is the only record of the producing version once a save has happened.
9
+ * Commands compute it from the pre-mutation manifest and report it *before*
10
+ * their save, which is why it is a value rather than an output side effect.
11
+ */
12
+ export interface ManifestVersionRestamp<TScope extends string = string> {
13
+ scope: TScope;
14
+ producingVersion: string;
15
+ invokingVersion: string;
16
+ }
17
+ /**
18
+ * Derive the advisory restamp diagnostic for a loaded scope manifest.
19
+ *
20
+ * This is the single comparison used by every command that saves a manifest,
21
+ * so the semantics cannot drift between call sites. Comparison is plain string
22
+ * inequality on identity, never semantic-version ordering: "different" is the
23
+ * contract, not "older" or "newer".
24
+ *
25
+ * Only `oatVersion` is reported. The silent V1 -> V2 `version` upgrade that
26
+ * `loadManifest` performs in memory is deliberately out of scope for this
27
+ * advisory: it is a schema migration rather than a loss of producer evidence.
28
+ *
29
+ * An absent manifest never reports a restamp, because `loadManifest` returns an
30
+ * empty manifest already stamped with the invoking version and the two strings
31
+ * match. Invalid manifests never reach here at all; the loader and schema keep
32
+ * their existing fail-closed behavior.
33
+ */
34
+ export declare function detectManifestVersionRestamp<TScope extends string>(scope: TScope, manifest: Pick<ManifestV2, 'oatVersion'>): ManifestVersionRestamp<TScope> | undefined;
35
+ /**
36
+ * Render the human advisory for a restamp diagnostic.
37
+ *
38
+ * Formatting is shared so the message stays identical across commands, but
39
+ * *emitting* it stays with each command: only the command knows its output
40
+ * ordering and whether the run is in JSON mode.
41
+ */
42
+ export declare function formatManifestVersionRestampWarning(command: string, restamp: ManifestVersionRestamp): string;
3
43
  export declare function loadManifest(manifestPath: string): Promise<Manifest>;
4
44
  export declare function saveManifest(manifestPath: string, manifest: ManifestV2): Promise<void>;
5
45
  export declare function findEntry(manifest: Manifest, canonicalPath: string, provider: string): ManifestEntry | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/manifest/manager.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,UAAU,EAGhB,MAAM,kBAAkB,CAAC;AAa1B,wBAAgB,mBAAmB,IAAI,QAAQ,CAQ9C;AAED,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAmE1E;AAED,wBAAsB,YAAY,CAChC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,UAAU,GACnB,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAgB,SAAS,CACvB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,aAAa,GAAG,SAAS,CAK3B;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,CAc3E;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,QAAQ,CAeV"}
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/manifest/manager.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,UAAU,EAGhB,MAAM,kBAAkB,CAAC;AAa1B,wBAAgB,mBAAmB,IAAI,QAAQ,CAQ9C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,SAAS,MAAM,EAChE,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,GACvC,sBAAsB,CAAC,MAAM,CAAC,GAAG,SAAS,CAS5C;AAED;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,sBAAsB,GAC9B,MAAM,CAER;AAED,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAmE1E;AAED,wBAAsB,YAAY,CAChC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,UAAU,GACnB,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAgB,SAAS,CACvB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,aAAa,GAAG,SAAS,CAK3B;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,CAc3E;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,QAAQ,CAeV"}
@@ -22,6 +22,41 @@ export function createEmptyManifest() {
22
22
  lastUpdated: nowIso(),
23
23
  };
24
24
  }
25
+ /**
26
+ * Derive the advisory restamp diagnostic for a loaded scope manifest.
27
+ *
28
+ * This is the single comparison used by every command that saves a manifest,
29
+ * so the semantics cannot drift between call sites. Comparison is plain string
30
+ * inequality on identity, never semantic-version ordering: "different" is the
31
+ * contract, not "older" or "newer".
32
+ *
33
+ * Only `oatVersion` is reported. The silent V1 -> V2 `version` upgrade that
34
+ * `loadManifest` performs in memory is deliberately out of scope for this
35
+ * advisory: it is a schema migration rather than a loss of producer evidence.
36
+ *
37
+ * An absent manifest never reports a restamp, because `loadManifest` returns an
38
+ * empty manifest already stamped with the invoking version and the two strings
39
+ * match. Invalid manifests never reach here at all; the loader and schema keep
40
+ * their existing fail-closed behavior.
41
+ */
42
+ export function detectManifestVersionRestamp(scope, manifest) {
43
+ const producingVersion = manifest.oatVersion;
44
+ const invokingVersion = OAT_VERSION;
45
+ if (producingVersion === invokingVersion) {
46
+ return undefined;
47
+ }
48
+ return { scope, producingVersion, invokingVersion };
49
+ }
50
+ /**
51
+ * Render the human advisory for a restamp diagnostic.
52
+ *
53
+ * Formatting is shared so the message stays identical across commands, but
54
+ * *emitting* it stays with each command: only the command knows its output
55
+ * ordering and whether the run is in JSON mode.
56
+ */
57
+ export function formatManifestVersionRestampWarning(command, restamp) {
58
+ return `Manifest version restamp [${command} ${restamp.scope}]: manifest produced by oat "${restamp.producingVersion}" will be restamped to oat "${restamp.invokingVersion}".`;
59
+ }
25
60
  export async function loadManifest(manifestPath) {
26
61
  try {
27
62
  const raw = await readFile(manifestPath, 'utf8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-agent-toolkit/cli",
3
- "version": "0.2.57",
3
+ "version": "0.2.59",
4
4
  "private": false,
5
5
  "description": "Open Agent Toolkit CLI",
6
6
  "homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
@@ -34,7 +34,7 @@
34
34
  "ora": "^9.0.0",
35
35
  "yaml": "2.8.2",
36
36
  "zod": "^3.25.76",
37
- "@open-agent-toolkit/control-plane": "0.2.57"
37
+ "@open-agent-toolkit/control-plane": "0.2.59"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^22.10.0",