@open-agent-toolkit/cli 0.2.58 → 0.2.62
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/assets/agents/oat-phase-implementer.md +27 -4
- package/assets/agents/oat-reviewer.md +25 -14
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/cli-utilities/configuration.md +16 -0
- package/assets/docs/cli-utilities/workflow-gates.md +91 -6
- package/assets/docs/contributing/skills.md +27 -5
- package/assets/docs/provider-sync/commands.md +23 -0
- package/assets/docs/reference/cli-reference.md +10 -3
- package/assets/docs/reference/oat-directory-structure.md +1 -0
- package/assets/docs/workflows/ideas/index.md +1 -1
- package/assets/docs/workflows/index.md +1 -0
- package/assets/docs/workflows/projects/artifacts.md +24 -3
- package/assets/docs/workflows/projects/autonomy.md +5 -2
- package/assets/docs/workflows/projects/dispatch-ceiling.md +43 -7
- package/assets/docs/workflows/projects/hill-checkpoints.md +21 -0
- package/assets/docs/workflows/projects/implementation-execution.md +10 -2
- package/assets/docs/workflows/projects/lifecycle.md +128 -10
- package/assets/docs/workflows/projects/pr-flow.md +2 -0
- package/assets/docs/workflows/projects/reviews.md +1 -1
- package/assets/docs/workflows/projects/state-machine.md +20 -0
- package/assets/docs/workflows/skills/index.md +2 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-brainstorm/SKILL.md +61 -12
- package/assets/skills/oat-docs/SKILL.md +13 -8
- package/assets/skills/oat-doctor/SKILL.md +3 -3
- package/assets/skills/oat-pjm-review-backlog/SKILL.md +2 -2
- package/assets/skills/oat-project-autonomous/SKILL.md +14 -9
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +59 -38
- package/assets/skills/oat-project-capture/SKILL.md +2 -2
- package/assets/skills/oat-project-design/SKILL.md +10 -5
- package/assets/skills/oat-project-discover/SKILL.md +15 -9
- package/assets/skills/oat-project-document/SKILL.md +11 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +59 -38
- package/assets/skills/oat-project-implement/SKILL.md +3 -3
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +149 -24
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +14 -8
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +59 -38
- package/assets/skills/oat-project-implement/references/phase-execution.md +16 -1
- package/assets/skills/oat-project-implement/references/plan-and-resume.md +19 -1
- package/assets/skills/oat-project-import-plan/SKILL.md +75 -6
- package/assets/skills/oat-project-lite/SKILL.md +467 -0
- package/assets/skills/oat-project-lite/references/docs/autonomy-contract.md +331 -0
- package/assets/skills/oat-project-next/SKILL.md +54 -11
- package/assets/skills/oat-project-plan/SKILL.md +42 -5
- package/assets/skills/oat-project-plan-writing/SKILL.md +100 -3
- package/assets/skills/oat-project-pr-final/SKILL.md +33 -7
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +59 -38
- package/assets/skills/oat-project-pr-progress/SKILL.md +3 -3
- package/assets/skills/oat-project-progress/SKILL.md +27 -3
- package/assets/skills/oat-project-promote-spec-driven/SKILL.md +3 -1
- package/assets/skills/oat-project-quick-start/SKILL.md +29 -4
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +59 -38
- package/assets/skills/oat-project-review-provide/SKILL.md +37 -11
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +12 -5
- package/assets/skills/oat-project-summary/SKILL.md +27 -3
- package/assets/templates/plan-lite.md +165 -0
- package/assets/templates/plan.md +1 -1
- package/assets/templates/state.md +5 -2
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +102 -8
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +16 -1
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +10 -1
- package/dist/commands/project/index.d.ts.map +1 -1
- package/dist/commands/project/index.js +2 -0
- package/dist/commands/project/new/index.d.ts +3 -2
- package/dist/commands/project/new/index.d.ts.map +1 -1
- package/dist/commands/project/new/index.js +2 -1
- package/dist/commands/project/new/scaffold.d.ts +5 -3
- package/dist/commands/project/new/scaffold.d.ts.map +1 -1
- package/dist/commands/project/new/scaffold.js +38 -10
- package/dist/commands/project/promote/index.d.ts +2 -0
- package/dist/commands/project/promote/index.d.ts.map +1 -0
- package/dist/commands/project/promote/index.js +1 -0
- package/dist/commands/project/promote/promote.d.ts +47 -0
- package/dist/commands/project/promote/promote.d.ts.map +1 -0
- package/dist/commands/project/promote/promote.js +322 -0
- package/dist/commands/project/split/run.d.ts.map +1 -1
- package/dist/commands/project/split/run.js +8 -1
- package/dist/commands/project/validate-plan/index.d.ts.map +1 -1
- package/dist/commands/project/validate-plan/index.js +25 -1
- package/dist/commands/project/validate-plan/validate-plan.d.ts +8 -0
- package/dist/commands/project/validate-plan/validate-plan.d.ts.map +1 -1
- package/dist/commands/project/validate-plan/validate-plan.js +49 -0
- package/dist/commands/remove/skill/remove-skill.d.ts.map +1 -1
- package/dist/commands/remove/skill/remove-skill.js +10 -1
- package/dist/commands/shared/frontmatter.d.ts +32 -1
- package/dist/commands/shared/frontmatter.d.ts.map +1 -1
- package/dist/commands/shared/frontmatter.js +93 -0
- package/dist/commands/state/generate.d.ts.map +1 -1
- package/dist/commands/state/generate.js +23 -0
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +8 -1
- package/dist/commands/sync/apply.d.ts.map +1 -1
- package/dist/commands/sync/apply.js +40 -6
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +11 -17
- package/dist/commands/sync/sync.types.d.ts +6 -6
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-manifest.d.ts.map +1 -1
- package/dist/commands/tools/shared/pack-manifest.js +2 -0
- package/dist/config/resolve.d.ts +16 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +16 -8
- package/dist/engine/execute-plan.d.ts.map +1 -1
- package/dist/engine/execute-plan.js +6 -0
- package/dist/manifest/index.d.ts +2 -1
- package/dist/manifest/index.d.ts.map +1 -1
- package/dist/manifest/index.js +1 -1
- package/dist/manifest/manager.d.ts +40 -0
- package/dist/manifest/manager.d.ts.map +1 -1
- package/dist/manifest/manager.js +35 -0
- package/package.json +2 -2
|
@@ -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
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
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
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
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
|
-
|
|
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
|
|
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;
|
|
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,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|
1
|
-
{"version":3,"file":"pack-manifest.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/pack-manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,GACf,CAAC;AAEF,eAAO,MAAM,UAAU,4GASiB,CAAC;AAEzC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,QAAQ,CAE3D;
|
|
1
|
+
{"version":3,"file":"pack-manifest.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/shared/pack-manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,GACf,CAAC;AAEF,eAAO,MAAM,UAAU,4GASiB,CAAC;AAEzC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,QAAQ,CAE3D;AAmID,eAAO,MAAM,aAAa,EAAE,SAAS,cAAc,EAyLlD,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,cAAc,CAMhE;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,QAAQ,EACd,IAAI,CAAC,EAAE,aAAa,GACnB,SAAS,mBAAmB,EAAE,CAGhC;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAC9C,MAAM,EAAE,CAQV;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,EAAE,CAIlE;AAoJD,wBAAgB,oBAAoB,CAClC,QAAQ,GAAE,SAAS,cAAc,EAAkB,GAClD,IAAI,CAiEN"}
|
|
@@ -86,6 +86,7 @@ const WORKFLOW_SKILL_NAMES = [
|
|
|
86
86
|
'oat-project-document',
|
|
87
87
|
'oat-project-implement',
|
|
88
88
|
'oat-project-import-plan',
|
|
89
|
+
'oat-project-lite',
|
|
89
90
|
'oat-project-new',
|
|
90
91
|
'oat-project-next',
|
|
91
92
|
'oat-project-open',
|
|
@@ -189,6 +190,7 @@ export const PACK_MANIFEST = [
|
|
|
189
190
|
'spec.md',
|
|
190
191
|
'design.md',
|
|
191
192
|
'plan.md',
|
|
193
|
+
'plan-lite.md',
|
|
192
194
|
'implementation.md',
|
|
193
195
|
'summary.md',
|
|
194
196
|
'project-log.md',
|
package/dist/config/resolve.d.ts
CHANGED
|
@@ -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,M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,CAAC,cAAc,CAAC,CAgFzB;AAED,wDAAwD;AACxD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACxB;;;;OAIG;IACH,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,MAAM,GAChB,sBAAsB,CAkBxB;AAED,wBAAgB,WAAW,CACzB,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,MAAM,GAChB,UAAU,GAAG,IAAI,CAEnB;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,cAAc,GACxB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAY5B;AAED,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,gBAAgB,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,cAAc,GACxB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAoDxC"}
|
package/dist/config/resolve.js
CHANGED
|
@@ -176,18 +176,26 @@ export async function resolveEffectiveConfig(repoRoot, userConfigDir, env = proc
|
|
|
176
176
|
resolved,
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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,CAAC;AAIxB,UAAU,2BAA2B;IACnC,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,YAAY,CAAC,EAAE,OAAO,eAAe,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,aAAa,CAAC;IACrC,sBAAsB,CAAC,EAAE,OAAO,sBAAsB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EAAE,OAAO,aAAa,CAAC;IACrC,sBAAsB,CAAC,EAAE,OAAO,sBAAsB,CAAC;IACvD,gCAAgC,CAAC,EAAE,OAAO,gCAAgC,CAAC;IAC3E,kCAAkC,CAAC,EAAE,OAAO,kCAAkC,CAAC;IAC/E,uBAAuB,CAAC,EAAE,OAAO,uBAAuB,CAAC;CAC1D;AAID,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IAC3C,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;IACjD,MAAM,EACF,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,QAAQ,GACR,SAAS,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG;IAC9C,iBAAiB,EAAE,yBAAyB,EAAE,CAAC;CAChD,CAAC;AAiFF,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAW5D;AAoqBD,wBAAsB,eAAe,CACnC,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,MAAM,EACpB,YAAY,GAAE,2BAAoE,GACjF,OAAO,CAAC,oBAAoB,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;
|
package/dist/manifest/index.d.ts
CHANGED
|
@@ -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"}
|
package/dist/manifest/index.js
CHANGED
|
@@ -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"}
|
package/dist/manifest/manager.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "0.2.62",
|
|
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.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.2.62"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|