@open-agent-toolkit/cli 0.3.8 → 0.3.10
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 +3 -3
- package/assets/agents/oat-codebase-mapper.md +3 -2
- package/assets/agents/oat-reviewer.md +5 -13
- package/assets/agents/skeptical-evaluator.md +6 -2
- package/assets/bundle-metadata.json +1 -1
- package/assets/config/dispatch-matrix-recommendation.json +6 -6
- package/assets/docs/cli-utilities/backlog-lifecycle.md +3 -2
- package/assets/docs/cli-utilities/bootstrap.md +5 -2
- package/assets/docs/cli-utilities/config-and-local-state.md +13 -6
- package/assets/docs/cli-utilities/configuration.md +22 -17
- package/assets/docs/cli-utilities/tool-packs.md +60 -10
- package/assets/docs/cli-utilities/workflow-gates.md +1 -1
- package/assets/docs/contributing/code.md +9 -5
- package/assets/docs/contributing/updating-model-guidance.md +34 -6
- package/assets/docs/contributing/verifying-cursor-pins.md +38 -9
- package/assets/docs/provider-sync/commands.md +11 -8
- package/assets/docs/provider-sync/instruction-sync.md +241 -39
- package/assets/docs/provider-sync/providers.md +4 -4
- package/assets/docs/provider-sync/scope-and-surface.md +1 -1
- package/assets/docs/reference/cli-reference.md +2 -0
- package/assets/docs/reference/oat-directory-structure.md +12 -11
- package/assets/docs/reference/troubleshooting.md +19 -4
- package/assets/docs/workflows/projects/dispatch-ceiling.md +21 -14
- package/assets/docs/workflows/projects/implementation-execution.md +26 -9
- package/assets/docs/workflows/projects/lifecycle.md +4 -6
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/SKILL.md +4 -4
- package/assets/skills/oat-agent-instructions-analyze/references/analysis-artifact-template.md +5 -5
- package/assets/skills/oat-agent-instructions-analyze/references/docs/rules-files.md +14 -11
- package/assets/skills/oat-agent-instructions-analyze/references/quality-checklist.md +2 -2
- package/assets/skills/oat-agent-instructions-analyze/scripts/resolve-instruction-files.sh +4 -3
- package/assets/skills/oat-agent-instructions-apply/SKILL.md +3 -3
- package/assets/skills/oat-agent-instructions-apply/references/docs/rules-files.md +14 -11
- package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
- package/assets/skills/oat-dispatch-subagents/references/provider-cursor.md +5 -2
- package/assets/skills/oat-doctor/SKILL.md +17 -13
- package/assets/skills/oat-project-implement/SKILL.md +2 -2
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +33 -11
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +1 -1
- package/assets/skills/oat-project-implement/references/phase-execution.md +109 -8
- package/assets/skills/oat-project-lite/SKILL.md +23 -1
- package/assets/skills/oat-project-next/SKILL.md +3 -3
- package/assets/skills/oat-project-plan-writing/SKILL.md +3 -3
- package/assets/skills/oat-project-progress/SKILL.md +2 -2
- package/assets/skills/subagent-orchestration/SKILL.md +1 -1
- package/assets/skills/subagent-orchestration/references/evidence-and-refresh.md +20 -8
- package/assets/skills/subagent-orchestration/references/provider-claude.md +25 -12
- package/assets/skills/subagent-orchestration/references/provider-codex.md +27 -18
- package/assets/skills/subagent-orchestration/references/provider-cursor.md +40 -10
- package/assets/templates/docs-app-mkdocs/docs/contributing.md +1 -3
- package/assets/templates/pjm-agents.md +7 -3
- package/assets/templates/state.md +2 -2
- package/dist/commands/backlog/archive.d.ts +10 -2
- package/dist/commands/backlog/archive.d.ts.map +1 -1
- package/dist/commands/backlog/archive.js +22 -6
- package/dist/commands/backlog/index.d.ts.map +1 -1
- package/dist/commands/backlog/index.js +5 -1
- package/dist/commands/backlog/rewrite-references.d.ts +41 -0
- package/dist/commands/backlog/rewrite-references.d.ts.map +1 -0
- package/dist/commands/backlog/rewrite-references.js +516 -0
- package/dist/commands/config/index.d.ts +1 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +69 -34
- package/dist/commands/init/index.d.ts +6 -0
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +27 -4
- package/dist/commands/init/tools/index.d.ts +18 -1
- package/dist/commands/init/tools/index.d.ts.map +1 -1
- package/dist/commands/init/tools/index.js +84 -17
- package/dist/commands/init/tools/project-guidance.d.ts +19 -4
- package/dist/commands/init/tools/project-guidance.d.ts.map +1 -1
- package/dist/commands/init/tools/project-guidance.js +58 -15
- package/dist/commands/init/tools/workflows/index.d.ts.map +1 -1
- package/dist/commands/init/tools/workflows/index.js +5 -1
- package/dist/commands/instructions/instructions.types.d.ts +105 -4
- package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.types.js +4 -5
- package/dist/commands/instructions/instructions.utils.d.ts +161 -6
- package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.utils.js +650 -12
- package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
- package/dist/commands/instructions/sync/sync.js +256 -18
- package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
- package/dist/commands/instructions/validate/validate.js +36 -8
- package/dist/commands/pjm/index.d.ts.map +1 -1
- package/dist/commands/pjm/index.js +19 -4
- package/dist/commands/pjm/init.d.ts +3 -0
- package/dist/commands/pjm/init.d.ts.map +1 -1
- package/dist/commands/pjm/init.js +23 -5
- package/dist/commands/shared/agents-md.d.ts +26 -5
- package/dist/commands/shared/agents-md.d.ts.map +1 -1
- package/dist/commands/shared/agents-md.js +182 -3
- package/dist/commands/tools/guidance/index.d.ts +15 -0
- package/dist/commands/tools/guidance/index.d.ts.map +1 -0
- package/dist/commands/tools/guidance/index.js +81 -0
- package/dist/commands/tools/index.d.ts.map +1 -1
- package/dist/commands/tools/index.js +2 -0
- package/dist/config/oat-config.d.ts +49 -3
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +107 -14
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +12 -2
- package/dist/providers/claude/dispatch-envelope.d.ts.map +1 -1
- package/dist/providers/claude/dispatch-envelope.js +1 -0
- package/dist/providers/claude/targets.d.ts +1 -0
- package/dist/providers/claude/targets.d.ts.map +1 -1
- package/dist/providers/claude/targets.js +3 -1
- package/dist/providers/codex/codec/shared.d.ts +3 -0
- package/dist/providers/codex/codec/shared.d.ts.map +1 -1
- package/dist/providers/codex/codec/shared.js +4 -0
- package/dist/providers/cursor/codec/catalog.d.ts +2 -2
- package/dist/providers/cursor/codec/catalog.d.ts.map +1 -1
- package/dist/providers/cursor/codec/catalog.js +45 -0
- package/dist/providers/cursor/codec/mapping-validation.d.ts +4 -0
- package/dist/providers/cursor/codec/mapping-validation.d.ts.map +1 -0
- package/dist/providers/cursor/codec/mapping-validation.js +25 -0
- package/dist/providers/cursor/codec/materialize.d.ts.map +1 -1
- package/dist/providers/cursor/codec/materialize.js +2 -11
- package/dist/providers/cursor/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/cursor/codec/sync-extension.js +2 -11
- package/package.json +2 -2
|
@@ -8,6 +8,36 @@ import { normalizeDispatchMatrix, } from './dispatch-matrix.js';
|
|
|
8
8
|
import { parseJsonConfig } from './json.js';
|
|
9
9
|
import { resolveUserSyncConfig } from './user-sync-config.js';
|
|
10
10
|
export { VALID_DISPATCH_MATRIX_TIERS, isCodexMaterializedRouteTarget, isWorkflowDispatchCandidateLadder, isWorkflowDispatchFallbackRoute, toWorkflowDispatchCandidateLadder, validateDispatchRouteTarget, } from './dispatch-matrix.js';
|
|
11
|
+
/**
|
|
12
|
+
* The CLAUDE.md strategies `oat instructions sync` and
|
|
13
|
+
* `oat instructions validate` understand, and the values
|
|
14
|
+
* `instructions.claude.shims` accepts. `none` keeps no CLAUDE.md
|
|
15
|
+
* shims at all; the other three are the shim strategies.
|
|
16
|
+
*
|
|
17
|
+
* Declared here rather than in the instructions command so the config
|
|
18
|
+
* normalizer, the `oat config set` validator, and the commands share one list:
|
|
19
|
+
* a value the normalizer accepted but the commands did not understand would
|
|
20
|
+
* silently fall through to the built-in default.
|
|
21
|
+
*/
|
|
22
|
+
export const INSTRUCTION_SYNC_STRATEGIES = [
|
|
23
|
+
'none',
|
|
24
|
+
'pointer',
|
|
25
|
+
'symlink',
|
|
26
|
+
'copy',
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* The strategy used when neither `--strategy` nor
|
|
30
|
+
* `instructions.claude.shims` names one.
|
|
31
|
+
*
|
|
32
|
+
* `none` (DR-260927-claude-md-shims-are-opt): Claude Code reads AGENTS.md
|
|
33
|
+
* itself through its `agents-md` plugin, which stands down for the whole
|
|
34
|
+
* project while any CLAUDE.md exists, so shims are opt-in.
|
|
35
|
+
*/
|
|
36
|
+
export const DEFAULT_INSTRUCTION_SYNC_STRATEGY = 'none';
|
|
37
|
+
export function isInstructionSyncStrategy(value) {
|
|
38
|
+
return (typeof value === 'string' &&
|
|
39
|
+
INSTRUCTION_SYNC_STRATEGIES.includes(value));
|
|
40
|
+
}
|
|
11
41
|
export const MIN_GATE_TIMEOUT_MS = 1_000;
|
|
12
42
|
export const MAX_GATE_TIMEOUT_MS = 14_400_000;
|
|
13
43
|
export function isValidGateTimeoutMs(value) {
|
|
@@ -834,7 +864,7 @@ function normalizeDocumentationExcludes(value, configPath) {
|
|
|
834
864
|
return normalized;
|
|
835
865
|
}
|
|
836
866
|
/**
|
|
837
|
-
* Parse `
|
|
867
|
+
* Parse `instructions.claude.excludes` into a trimmed,
|
|
838
868
|
* de-duplicated, order-preserving list.
|
|
839
869
|
*
|
|
840
870
|
* Fails closed, exactly like its `documentation.excludes` sibling above and for
|
|
@@ -844,7 +874,7 @@ function normalizeDocumentationExcludes(value, configPath) {
|
|
|
844
874
|
* an error.
|
|
845
875
|
*
|
|
846
876
|
* The repair instruction names `oat config set` first and the file second: the
|
|
847
|
-
* command is catalogued (`oat config set
|
|
877
|
+
* command is catalogued (`oat config set instructions.claude.excludes`),
|
|
848
878
|
* and an operator repairing a malformed value should reach for the validated
|
|
849
879
|
* write path before hand-editing JSON.
|
|
850
880
|
*/
|
|
@@ -853,8 +883,8 @@ function normalizeInstructionPointerExcludes(value, configPath) {
|
|
|
853
883
|
return [];
|
|
854
884
|
}
|
|
855
885
|
const invalid = () => {
|
|
856
|
-
throw new CliError(`Invalid
|
|
857
|
-
'Repair it with `oat config set
|
|
886
|
+
throw new CliError(`Invalid instructions.claude.excludes in ${configPath}: expected an array of non-empty strings. ` +
|
|
887
|
+
'Repair it with `oat config set instructions.claude.excludes <path[,path...]>` (an empty value clears the key), or by editing that file.', 2);
|
|
858
888
|
};
|
|
859
889
|
if (!Array.isArray(value)) {
|
|
860
890
|
invalid();
|
|
@@ -871,6 +901,27 @@ function normalizeInstructionPointerExcludes(value, configPath) {
|
|
|
871
901
|
}
|
|
872
902
|
return normalized;
|
|
873
903
|
}
|
|
904
|
+
/**
|
|
905
|
+
* Parse `instructions.claude.shims`.
|
|
906
|
+
*
|
|
907
|
+
* Fails closed like `projects.defaultScope`: a misspelled strategy must never
|
|
908
|
+
* read as unset, because unset means the built-in default, and the default
|
|
909
|
+
* decides whether `oat instructions sync` writes CLAUDE.md files. An absent key
|
|
910
|
+
* is "not configured"; any present value outside the accepted list is an error
|
|
911
|
+
* that names the `oat config set` repair.
|
|
912
|
+
*/
|
|
913
|
+
function normalizeInstructionSyncStrategy(value, configPath) {
|
|
914
|
+
if (value === undefined) {
|
|
915
|
+
return undefined;
|
|
916
|
+
}
|
|
917
|
+
if (!isInstructionSyncStrategy(value)) {
|
|
918
|
+
const accepted = INSTRUCTION_SYNC_STRATEGIES.join('|');
|
|
919
|
+
throw new CliError(`Invalid instructions.claude.shims in ${configPath}: ${JSON.stringify(value)}. ` +
|
|
920
|
+
`Expected one of: ${INSTRUCTION_SYNC_STRATEGIES.join(', ')}. ` +
|
|
921
|
+
`Repair it with oat config set instructions.claude.shims <${accepted}>.`, 2);
|
|
922
|
+
}
|
|
923
|
+
return value;
|
|
924
|
+
}
|
|
874
925
|
/**
|
|
875
926
|
* Report a stored value whose type the normalizer cannot use.
|
|
876
927
|
*
|
|
@@ -1021,14 +1072,24 @@ function normalizeOatConfig(parsed, configPath = '.oat/config.json', onWarning)
|
|
|
1021
1072
|
if (excludes.length > 0) {
|
|
1022
1073
|
doc.excludes = excludes;
|
|
1023
1074
|
}
|
|
1024
|
-
const instructionPointerExcludes = normalizeInstructionPointerExcludes(parsed.documentation.instructionPointerExcludes, configPath);
|
|
1025
|
-
if (instructionPointerExcludes.length > 0) {
|
|
1026
|
-
doc.instructionPointerExcludes = instructionPointerExcludes;
|
|
1027
|
-
}
|
|
1028
1075
|
if (Object.keys(doc).length > 0) {
|
|
1029
1076
|
next.documentation = doc;
|
|
1030
1077
|
}
|
|
1031
1078
|
}
|
|
1079
|
+
if (isRecord(parsed.instructions) && isRecord(parsed.instructions.claude)) {
|
|
1080
|
+
const claude = {};
|
|
1081
|
+
const shims = normalizeInstructionSyncStrategy(parsed.instructions.claude.shims, configPath);
|
|
1082
|
+
if (shims !== undefined) {
|
|
1083
|
+
claude.shims = shims;
|
|
1084
|
+
}
|
|
1085
|
+
const excludes = normalizeInstructionPointerExcludes(parsed.instructions.claude.excludes, configPath);
|
|
1086
|
+
if (excludes.length > 0) {
|
|
1087
|
+
claude.excludes = excludes;
|
|
1088
|
+
}
|
|
1089
|
+
if (Object.keys(claude).length > 0) {
|
|
1090
|
+
next.instructions = { claude };
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1032
1093
|
if (Array.isArray(parsed.localPaths)) {
|
|
1033
1094
|
const filtered = parsed.localPaths.filter((v) => typeof v === 'string' && v.trim() !== '');
|
|
1034
1095
|
if (filtered.length > 0) {
|
|
@@ -1198,8 +1259,24 @@ export async function readOatConfigForDocumentationExcludesRepair(repoRoot) {
|
|
|
1198
1259
|
}
|
|
1199
1260
|
}
|
|
1200
1261
|
/**
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1262
|
+
* Return `parsed` with `instructions.claude.<key>` removed, leaving every other
|
|
1263
|
+
* value untouched, so a repair read can load the file whose value it replaces.
|
|
1264
|
+
*/
|
|
1265
|
+
function withoutInstructionsClaudeKey(parsed, key) {
|
|
1266
|
+
if (!isRecord(parsed) ||
|
|
1267
|
+
!isRecord(parsed.instructions) ||
|
|
1268
|
+
!isRecord(parsed.instructions.claude)) {
|
|
1269
|
+
return parsed;
|
|
1270
|
+
}
|
|
1271
|
+
const claude = Object.fromEntries(Object.entries(parsed.instructions.claude).filter(([name]) => name !== key));
|
|
1272
|
+
return {
|
|
1273
|
+
...parsed,
|
|
1274
|
+
instructions: { ...parsed.instructions, claude },
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Read the shared config with a malformed `instructions.claude.excludes`
|
|
1279
|
+
* dropped.
|
|
1203
1280
|
*
|
|
1204
1281
|
* The sibling of `readOatConfigForDocumentationExcludesRepair`, and it exists
|
|
1205
1282
|
* for the same reason: this key's own validation error now names
|
|
@@ -1211,11 +1288,27 @@ export async function readOatConfigForInstructionPointerExcludesRepair(repoRoot)
|
|
|
1211
1288
|
try {
|
|
1212
1289
|
const raw = await readFile(configPath, 'utf8');
|
|
1213
1290
|
const parsed = parseJsonConfig(raw, configPath);
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1291
|
+
return normalizeOatConfig(withoutInstructionsClaudeKey(parsed, 'excludes'), configPath);
|
|
1292
|
+
}
|
|
1293
|
+
catch (error) {
|
|
1294
|
+
if (isMissingFileError(error)) {
|
|
1295
|
+
return { ...DEFAULT_OAT_CONFIG };
|
|
1217
1296
|
}
|
|
1218
|
-
|
|
1297
|
+
throw error;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Read the shared config with a malformed `instructions.claude.shims`
|
|
1302
|
+
* dropped, so the
|
|
1303
|
+
* `oat config set`/`unset` repair its validation error names can load the file
|
|
1304
|
+
* it is repairing.
|
|
1305
|
+
*/
|
|
1306
|
+
export async function readOatConfigForInstructionSyncStrategyRepair(repoRoot) {
|
|
1307
|
+
const configPath = getConfigPath(repoRoot);
|
|
1308
|
+
try {
|
|
1309
|
+
const raw = await readFile(configPath, 'utf8');
|
|
1310
|
+
const parsed = parseJsonConfig(raw, configPath);
|
|
1311
|
+
return normalizeOatConfig(withoutInstructionsClaudeKey(parsed, 'shims'), configPath);
|
|
1219
1312
|
}
|
|
1220
1313
|
catch (error) {
|
|
1221
1314
|
if (isMissingFileError(error)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AAGtB,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;AA0HD,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,GAA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GETS, isWorkflowPostImplementStructuredSequence, readOatConfig, readOatLocalConfig, readUserConfig, } from './oat-config.js';
|
|
2
|
+
import { BUILTIN_EXEC_TARGETS, DEFAULT_INSTRUCTION_SYNC_STRATEGY, isWorkflowPostImplementStructuredSequence, readOatConfig, readOatLocalConfig, readUserConfig, } from './oat-config.js';
|
|
3
3
|
import { getOwnKey, setOwnKey } from './own-keys.js';
|
|
4
4
|
const DEFAULT_DEPENDENCIES = {
|
|
5
5
|
readOatConfig,
|
|
@@ -35,9 +35,19 @@ const DEFAULT_SHARED_CONFIG = {
|
|
|
35
35
|
// is absent here has no row at all while it is unset. `null` keeps meaning
|
|
36
36
|
// "not set at this layer", so a configured array still wins.
|
|
37
37
|
excludes: null,
|
|
38
|
-
instructionPointerExcludes: null,
|
|
39
38
|
requireForProjectCompletion: false,
|
|
40
39
|
},
|
|
40
|
+
instructions: {
|
|
41
|
+
claude: {
|
|
42
|
+
// The strategy `oat instructions sync` applies when neither
|
|
43
|
+
// `--strategy` nor this key names one, so `oat config get` reports what
|
|
44
|
+
// will happen.
|
|
45
|
+
shims: DEFAULT_INSTRUCTION_SYNC_STRATEGY,
|
|
46
|
+
// Listed for the same reason as `documentation.excludes`: `oat config
|
|
47
|
+
// dump` enumerates the resolved map, and `null` means "not set here".
|
|
48
|
+
excludes: null,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
41
51
|
tools: {
|
|
42
52
|
brainstorm: false,
|
|
43
53
|
core: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-envelope.d.ts","sourceRoot":"","sources":["../../../src/providers/claude/dispatch-envelope.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,qBAAqB,EAC3B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"dispatch-envelope.d.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,EAAE;IAChD,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB,GAAG,4BAA4B,CAgC/B;AASD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,OAAO,GAAG;IACpE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,UAAU,EAAE,sBAAsB,EAAE,CAAC;IACrC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAqDA;AAuDD;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,OAAO,EAClB,YAAY,EAAE,YAAY,GAAG,IAAI,GAChC;IAAE,UAAU,EAAE,sBAAsB,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAkE7D;AAMD;;;;GAIG;AACH,qBAAa,oCAAqC,SAAQ,KAAK;IAC7D,QAAQ,CAAC,UAAU,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACvD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAEpC,YACE,UAAU,EAAE,SAAS,sBAAsB,EAAE,EAC7C,OAAO,GAAE,SAAS,MAAM,EAAO,EAyBhC;CACF;AAmBD,kFAAkF;AAClF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,QAAQ,EAAE,4BAA4B,CAAC;IACvC,UAAU,EAAE,OAAO,CAAC;CACrB,GAAG,qBAAqB,CA2CxB"}
|
|
@@ -4,6 +4,7 @@ declare const CLAUDE_GENERATION_EFFORTS: {
|
|
|
4
4
|
readonly 'fable-5-1': readonly ["low", "medium", "high", "xhigh", "max"];
|
|
5
5
|
readonly 'fable-5': readonly ["low", "medium", "high", "xhigh", "max"];
|
|
6
6
|
readonly 'opus-5-5': readonly ["low", "medium", "high", "xhigh", "max"];
|
|
7
|
+
readonly 'sonnet-5-5': readonly ["low", "medium", "high", "xhigh", "max"];
|
|
7
8
|
readonly 'sonnet-5': readonly ["low", "medium", "high", "xhigh", "max"];
|
|
8
9
|
readonly 'opus-4-7': readonly ["low", "medium", "high", "xhigh", "max"];
|
|
9
10
|
readonly 'opus-4-6': readonly ["low", "medium", "high", "max"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../../../src/providers/claude/targets.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,YAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAEhF,eAAO,MAAM,mBAAmB,YAC9B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,CACG,CAAC;AAEX,QAAA,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../../../src/providers/claude/targets.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,YAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAEhF,eAAO,MAAM,mBAAmB,YAC9B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,CACG,CAAC;AAEX,QAAA,MAAM,yBAAyB;;;;;;;;;CASuB,CAAC;AAGvD,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,yBAAyB,CAAC;AAC3E,MAAM,MAAM,sBAAsB,GAC9B,mBAAmB,GACnB,qBAAqB,GACrB,wBAAwB,GACxB,8BAA8B,CAAC;AAEnC,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,sBAAsB,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,mBAAmB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC9C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AASD,MAAM,W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
|
13
|
+
'sonnet-5-5': CLAUDE_EFFORT_ORDER,
|
|
13
14
|
'sonnet-5': CLAUDE_EFFORT_ORDER,
|
|
14
15
|
'opus-4-7': CLAUDE_EFFORT_ORDER,
|
|
15
16
|
'opus-4-6': ['low', 'medium', 'high', 'max'],
|
|
@@ -35,7 +36,8 @@ function modelFamily(model) {
|
|
|
35
36
|
/** Extract a documented effort-capability generation from a provider model ID. */
|
|
36
37
|
export function claudeModelGeneration(model) {
|
|
37
38
|
const normalized = model.toLowerCase().replace(/\[1m\]$/u, '');
|
|
38
|
-
|
|
39
|
+
const generations = Object.keys(CLAUDE_GENERATION_EFFORTS).sort((left, right) => right.length - left.length);
|
|
40
|
+
for (const generation of generations) {
|
|
39
41
|
const [family, ...versionParts] = generation.split('-');
|
|
40
42
|
const version = versionParts.join('[-.]');
|
|
41
43
|
const pattern = new RegExp(`(?:^|[./:_-])(?:claude-)?${family}-${version}(?=$|[-@.:/[])`, 'u');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/providers/codex/codec/shared.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAC7D,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAC3D,eAAO,MAAM,6BAA6B,kBAAkB,CAAC;AAE7D,MAAM,MAAM,cAAc,GACtB,qBAAqB,GACrB,aAAa,GACb,gBAAgB,CAAC;AAoBrB,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/providers/codex/codec/shared.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAC7D,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAC3D,eAAO,MAAM,6BAA6B,kBAAkB,CAAC;AAE7D,MAAM,MAAM,cAAc,GACtB,qBAAqB,GACrB,aAAa,GACb,gBAAgB,CAAC;AAoBrB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;IA6B/B,CAAC;AAEX,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO5D;AAQD,wBAAgB,oCAAoC,CAAC,OAAO,EAAE;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,MAAM,CAiBT;AAgDD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAOT;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,MAAM,CAER;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,GACd,cAAc,GAAG,IAAI,CAEvB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,cAAc,GACpB,MAAM,CAkBR;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAErE"}
|
|
@@ -12,6 +12,10 @@ const STANDARD_SUPPORTED_CODEX_EFFORTS = [
|
|
|
12
12
|
'xhigh',
|
|
13
13
|
];
|
|
14
14
|
export const SUPPORTED_CODEX_ROLE_TARGETS = [
|
|
15
|
+
...[...STANDARD_SUPPORTED_CODEX_EFFORTS, 'max'].map((effort) => ({
|
|
16
|
+
model: 'gpt-6.1-sol',
|
|
17
|
+
effort,
|
|
18
|
+
})),
|
|
15
19
|
...[...STANDARD_SUPPORTED_CODEX_EFFORTS, 'max'].map((effort) => ({
|
|
16
20
|
model: 'gpt-6-astra',
|
|
17
21
|
effort,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CursorPinSyntaxFamily = 'gpt-reasoning' | 'claude-effort' | 'composer-fast' | 'grok-effort-fast';
|
|
1
|
+
export type CursorPinSyntaxFamily = 'explicit-model-id' | 'gpt-reasoning' | 'claude-effort' | 'composer-fast' | 'grok-effort-fast';
|
|
2
2
|
/**
|
|
3
3
|
* What a probe submitted and what the harness resolved it to, transcribed from
|
|
4
4
|
* the probe evidence.
|
|
@@ -29,7 +29,7 @@ export interface CursorModelPinMapping {
|
|
|
29
29
|
gateEvidence: CursorPinGateEvidence;
|
|
30
30
|
catalogue: boolean;
|
|
31
31
|
}
|
|
32
|
-
export declare const CURSOR_MODEL_PIN_MAPPINGS: readonly [CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping];
|
|
32
|
+
export declare const CURSOR_MODEL_PIN_MAPPINGS: readonly [CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping, CursorModelPinMapping];
|
|
33
33
|
export declare const SUPPORTED_CURSOR_ROLE_TARGETS: CursorModelPinMapping[];
|
|
34
34
|
export declare const SUPPORTED_CURSOR_BASE_ROLES: readonly ['oat-phase-implementer', 'oat-reviewer'];
|
|
35
35
|
export declare function findCursorModelPinMapping(ladderModelId: string): CursorModelPinMapping | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/providers/cursor/codec/catalog.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,eAAe,GACf,eAAe,GACf,eAAe,GACf,kBAAkB,CAAC;AAEvB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,qBAAqB,CAAC;IACpC,YAAY,EAAE,qBAAqB,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;CACpB;AA+BD,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/providers/cursor/codec/catalog.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,mBAAmB,GACnB,eAAe,GACf,eAAe,GACf,eAAe,GACf,kBAAkB,CAAC;AAEvB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,qBAAqB,CAAC;IACpC,YAAY,EAAE,qBAAqB,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;CACpB;AA+BD,eAAO,MAAM,yBAAyB,gzBAwXe,CAAC;AAEtD,eAAO,MAAM,6BAA6B,yBAEzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,YACtC,uBAAuB,EACvB,cAAc,CACN,CAAC;AAEX,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,MAAM,GACpB,qBAAqB,GAAG,SAAS,CAInC"}
|
|
@@ -27,6 +27,51 @@ export const CURSOR_MODEL_PIN_MAPPINGS = [
|
|
|
27
27
|
},
|
|
28
28
|
}),
|
|
29
29
|
approvedMapping('claude-sonnet-5-high', 'claude-sonnet-5[effort=high]', 'claude-effort', { catalogue: false }),
|
|
30
|
+
approvedMapping('claude-sonnet-5-5-low', 'claude-sonnet-5-5-low', 'explicit-model-id', {
|
|
31
|
+
probeName: 'zz-pin-probe-sonnet55-flat-low',
|
|
32
|
+
probeRecord: {
|
|
33
|
+
submittedSelector: 'claude-sonnet-5-5-low',
|
|
34
|
+
resolvedModel: 'claude-sonnet-5-5-low',
|
|
35
|
+
verifiedAt: '2026-10-01',
|
|
36
|
+
evidencePath: 'packages/cli/src/providers/cursor/codec/__fixtures__/cursor-pin-probe-2026-10-01.jsonl',
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
approvedMapping('claude-sonnet-5-5-medium', 'claude-sonnet-5-5-medium', 'explicit-model-id', {
|
|
40
|
+
probeName: 'zz-pin-probe-sonnet55-flat-medium',
|
|
41
|
+
probeRecord: {
|
|
42
|
+
submittedSelector: 'claude-sonnet-5-5-medium',
|
|
43
|
+
resolvedModel: 'claude-sonnet-5-5-medium',
|
|
44
|
+
verifiedAt: '2026-10-01',
|
|
45
|
+
evidencePath: 'packages/cli/src/providers/cursor/codec/__fixtures__/cursor-pin-probe-2026-10-01.jsonl',
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
approvedMapping('claude-sonnet-5-5-high', 'claude-sonnet-5-5-high', 'explicit-model-id', {
|
|
49
|
+
probeName: 'zz-pin-probe-sonnet55-flat-high',
|
|
50
|
+
probeRecord: {
|
|
51
|
+
submittedSelector: 'claude-sonnet-5-5-high',
|
|
52
|
+
resolvedModel: 'claude-sonnet-5-5-high',
|
|
53
|
+
verifiedAt: '2026-10-01',
|
|
54
|
+
evidencePath: 'packages/cli/src/providers/cursor/codec/__fixtures__/cursor-pin-probe-2026-10-01.jsonl',
|
|
55
|
+
},
|
|
56
|
+
}),
|
|
57
|
+
approvedMapping('claude-sonnet-5-5-xhigh', 'claude-sonnet-5-5-xhigh', 'explicit-model-id', {
|
|
58
|
+
probeName: 'zz-pin-probe-sonnet55-flat-xhigh',
|
|
59
|
+
probeRecord: {
|
|
60
|
+
submittedSelector: 'claude-sonnet-5-5-xhigh',
|
|
61
|
+
resolvedModel: 'claude-sonnet-5-5-xhigh',
|
|
62
|
+
verifiedAt: '2026-10-01',
|
|
63
|
+
evidencePath: 'packages/cli/src/providers/cursor/codec/__fixtures__/cursor-pin-probe-2026-10-01.jsonl',
|
|
64
|
+
},
|
|
65
|
+
}),
|
|
66
|
+
approvedMapping('claude-sonnet-5-5-max', 'claude-sonnet-5-5-max', 'explicit-model-id', {
|
|
67
|
+
probeName: 'zz-pin-probe-sonnet55-flat-max',
|
|
68
|
+
probeRecord: {
|
|
69
|
+
submittedSelector: 'claude-sonnet-5-5-max',
|
|
70
|
+
resolvedModel: 'claude-sonnet-5-5-max',
|
|
71
|
+
verifiedAt: '2026-10-01',
|
|
72
|
+
evidencePath: 'packages/cli/src/providers/cursor/codec/__fixtures__/cursor-pin-probe-2026-10-01.jsonl',
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
30
75
|
approvedMapping('claude-opus-5-5-low', 'claude-opus-5-5[effort=low]', 'claude-effort', {
|
|
31
76
|
probeName: 'zz-pin-probe-opus55-low',
|
|
32
77
|
probeRecord: {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CursorModelPinMapping } from './catalog.js';
|
|
2
|
+
/** Validate at both target collection and rendering, before any role writes. */
|
|
3
|
+
export declare function assertApprovedCursorModelPinMapping(mapping: CursorModelPinMapping): void;
|
|
4
|
+
//# sourceMappingURL=mapping-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping-validation.d.ts","sourceRoot":"","sources":["../../../../src/providers/cursor/codec/mapping-validation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,gFAAgF;AAChF,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,qBAAqB,GAC7B,IAAI,CAkCN"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CliError } from '../../../errors/index.js';
|
|
2
|
+
/** Validate at both target collection and rendering, before any role writes. */
|
|
3
|
+
export function assertApprovedCursorModelPinMapping(mapping) {
|
|
4
|
+
if (mapping.gateEvidence.gate !== 'g01' ||
|
|
5
|
+
mapping.gateEvidence.disposition !== 'approved' ||
|
|
6
|
+
!mapping.gateEvidence.probeName.trim()) {
|
|
7
|
+
throw new CliError(`Cannot materialize Cursor model ${mapping.ladderModelId}: mapping-specific gate g01 approval is required.`);
|
|
8
|
+
}
|
|
9
|
+
if (mapping.syntaxFamily === 'explicit-model-id') {
|
|
10
|
+
const record = mapping.gateEvidence.probeRecord;
|
|
11
|
+
if (!/^[a-z0-9]+(?:[.-][a-z0-9]+)*$/.test(mapping.frontmatterModel) ||
|
|
12
|
+
mapping.frontmatterModel !== mapping.ladderModelId ||
|
|
13
|
+
!record ||
|
|
14
|
+
record.submittedSelector !== mapping.frontmatterModel ||
|
|
15
|
+
record.resolvedModel !== mapping.ladderModelId ||
|
|
16
|
+
!/^\d{4}-\d{2}-\d{2}$/.test(record.verifiedAt) ||
|
|
17
|
+
!record.evidencePath.trim()) {
|
|
18
|
+
throw new CliError(`Cannot materialize Cursor model ${mapping.ladderModelId}: explicit model ID requires matching mapping-specific native probe evidence.`);
|
|
19
|
+
}
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (!/\[[^\]]+\]$/.test(mapping.frontmatterModel)) {
|
|
23
|
+
throw new CliError(`Cannot materialize Cursor model ${mapping.ladderModelId}: frontmatter model must include a non-empty bracket segment.`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../../../src/providers/cursor/codec/materialize.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAKhE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../../../src/providers/cursor/codec/materialize.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAKhE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;AAQlB,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,sBAAsB,CAAC;IAC9B,OAAO,EAAE,qBAAqB,CAAC;IAC/B,KAAK,EAAE,eAAe,CAAC;CACxB;AAWD,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,OAAO,EACP,KAAK,GACN,EAAE,6BAA6B,GAAG,uBAAuB,CA8BzD;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAC/C,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,OAAO,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC1C,KAAK,EAAE,eAAe,CAAC;CACxB,GAAG,uBAAuB,EAAE,CAwB5B;AAqCD,wBAAsB,sCAAsC,CAC1D,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,GACjC,OAAO,CAAC,IAAI,CAAC,CA0Ef"}
|
|
@@ -3,28 +3,19 @@ import { join } from 'node:path';
|
|
|
3
3
|
import { CliError } from '../../../errors/index.js';
|
|
4
4
|
import { validateRealPathWithinScope } from '../../../fs/paths.js';
|
|
5
5
|
import YAML from 'yaml';
|
|
6
|
+
import { assertApprovedCursorModelPinMapping } from './mapping-validation.js';
|
|
6
7
|
import { buildCursorMaterializedRoleName, isOatManagedCursorRoleFile, normalizeCursorRoleName, renderCursorManagedComments, } from './shared.js';
|
|
7
8
|
const CURSOR_AGENT_DISCOVERY_DIRECTORIES = [
|
|
8
9
|
'.cursor/agents',
|
|
9
10
|
'.claude/agents',
|
|
10
11
|
'.codex/agents',
|
|
11
12
|
];
|
|
12
|
-
function assertApprovedMapping(mapping) {
|
|
13
|
-
if (mapping.gateEvidence.gate !== 'g01' ||
|
|
14
|
-
mapping.gateEvidence.disposition !== 'approved' ||
|
|
15
|
-
!mapping.gateEvidence.probeName.trim()) {
|
|
16
|
-
throw new CliError(`Cannot materialize Cursor model ${mapping.ladderModelId}: mapping-specific gate g01 approval is required.`);
|
|
17
|
-
}
|
|
18
|
-
if (!/\[[^\]]+\]$/.test(mapping.frontmatterModel)) {
|
|
19
|
-
throw new CliError(`Cannot materialize Cursor model ${mapping.ladderModelId}: frontmatter model must include a non-empty bracket segment.`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
13
|
function optionalCursorBoolean(agent, field) {
|
|
23
14
|
const value = field === 'readonly' ? agent.readonly : agent.frontmatter[field];
|
|
24
15
|
return typeof value === 'boolean' ? value : undefined;
|
|
25
16
|
}
|
|
26
17
|
export function materializeCursorAgent({ agent, mapping, owner, }) {
|
|
27
|
-
|
|
18
|
+
assertApprovedCursorModelPinMapping(mapping);
|
|
28
19
|
const roleName = buildCursorMaterializedRoleName({
|
|
29
20
|
agentName: agent.name,
|
|
30
21
|
ladderModelId: mapping.ladderModelId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-extension.d.ts","sourceRoot":"","sources":["../../../../src/providers/cursor/codec/sync-extension.ts"],"names":[],"mappings":"AAqBA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAIL,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EACnC,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-extension.d.ts","sourceRoot":"","sources":["../../../../src/providers/cursor/codec/sync-extension.ts"],"names":[],"mappings":"AAqBA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAIL,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB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AuC,GAC/C,OAAO,CAAC,mBAAmB,CAAC,CAmH9B;AA6DD,wBAAsB,+BAA+B,CACnD,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,0BAA0B,CAAC,CA4DrC;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAE5E;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,GAAG;IACnE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAEA;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,mBAAmB,GACxB,wBAAwB,EAAE,CAM5B;AAED,eAAO,MAAM,8BAA8B,EAAE,wBAAwB,CACnE,mBAAmB,EACnB,sBAAsB,CAAC,kCAAkC,CAAC,CAY3D,CAAC"}
|
|
@@ -12,6 +12,7 @@ import { validateRealPathWithinScope } from '../../../fs/paths.js';
|
|
|
12
12
|
import { hasMaterializationChanges, summarizeMaterializationPlan, toMaterializationOperations, } from '../../shared/index.js';
|
|
13
13
|
import YAML from 'yaml';
|
|
14
14
|
import { CURSOR_MODEL_PIN_MAPPINGS, SUPPORTED_CURSOR_BASE_ROLES, SUPPORTED_CURSOR_ROLE_TARGETS, } from './catalog.js';
|
|
15
|
+
import { assertApprovedCursorModelPinMapping } from './mapping-validation.js';
|
|
15
16
|
import { assertNoUnmanagedCursorAgentCollisions, materializeCursorAgent, } from './materialize.js';
|
|
16
17
|
import { isOatManagedCursorRoleFile, readOatManagedCursorRoleOwner, readOatManagedCursorRoleName, } from './shared.js';
|
|
17
18
|
const OWNER_PRECEDENCE = {
|
|
@@ -29,22 +30,12 @@ function isUserCursorScope(scopeRoot, options) {
|
|
|
29
30
|
return Boolean(options.userConfigDir &&
|
|
30
31
|
resolve(scopeRoot) === resolve(options.userConfigDir, '..'));
|
|
31
32
|
}
|
|
32
|
-
function assertApprovedMapping(mapping) {
|
|
33
|
-
if (mapping.gateEvidence.gate !== 'g01' ||
|
|
34
|
-
mapping.gateEvidence.disposition !== 'approved' ||
|
|
35
|
-
!mapping.gateEvidence.probeName.trim()) {
|
|
36
|
-
throw new CliError(`Cannot materialize Cursor model ${mapping.ladderModelId}: mapping-specific gate g01 approval is required.`);
|
|
37
|
-
}
|
|
38
|
-
if (!/\[[^\]]+\]$/.test(mapping.frontmatterModel)) {
|
|
39
|
-
throw new CliError(`Cannot materialize Cursor model ${mapping.ladderModelId}: approved mapping must include a non-empty bracket segment.`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
33
|
function addCursorTarget(ladderModelId, owner, source, targets, mappings) {
|
|
43
34
|
const mapping = mappings.find((candidate) => candidate.ladderModelId === ladderModelId);
|
|
44
35
|
if (!mapping) {
|
|
45
36
|
throw new CliError(`Cannot materialize unknown Cursor model mapping "${ladderModelId}" from ${source}. Add mapping-specific gate g01 evidence before using this target.`);
|
|
46
37
|
}
|
|
47
|
-
|
|
38
|
+
assertApprovedCursorModelPinMapping(mapping);
|
|
48
39
|
const existing = targets.get(ladderModelId);
|
|
49
40
|
if (!existing ||
|
|
50
41
|
OWNER_PRECEDENCE[owner] >= OWNER_PRECEDENCE[existing.owner]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
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.3.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.3.10"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|