@cleocode/contracts 2026.4.109 → 2026.4.111
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/dist/agent-registry-v3.d.ts +14 -8
- package/dist/agent-registry-v3.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/operations/index.d.ts +1 -0
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +1 -0
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/variable-substitution.d.ts +194 -0
- package/dist/operations/variable-substitution.d.ts.map +1 -0
- package/dist/operations/variable-substitution.js +30 -0
- package/dist/operations/variable-substitution.js.map +1 -0
- package/package.json +1 -1
- package/src/agent-registry-v3.ts +14 -8
- package/src/index.ts +10 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/variable-substitution.ts +211 -0
|
@@ -14,15 +14,21 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* Tier where an agent is installed or resolved from.
|
|
16
16
|
*
|
|
17
|
-
* - `project`
|
|
18
|
-
* - `global`
|
|
19
|
-
* - `packaged`
|
|
20
|
-
* - `fallback`
|
|
17
|
+
* - `project` — installed in the current project (`.cleo/agents/`)
|
|
18
|
+
* - `global` — installed at the user/global scope (`$XDG_DATA_HOME/cleo/agents/`)
|
|
19
|
+
* - `packaged` — bundled with the CLEO distribution
|
|
20
|
+
* - `fallback` — synthesized at resolve-time when no concrete `.cant` exists
|
|
21
|
+
* for the requested agentId but a bundled seed-agent file matches
|
|
22
|
+
* - `universal` — synthesized at resolve-time from the universal protocol
|
|
23
|
+
* base (`@cleocode/agents/cleo-subagent.cant`). Acts as the
|
|
24
|
+
* final safety net so classifier output never produces
|
|
25
|
+
* `E_AGENT_NOT_FOUND` when the base file is reachable.
|
|
26
|
+
* Added in v2026.4.111 (T1241 / D035).
|
|
21
27
|
*
|
|
22
|
-
* @task T897
|
|
23
|
-
* @epic T889
|
|
28
|
+
* @task T897 / T1241
|
|
29
|
+
* @epic T889 / T1232
|
|
24
30
|
*/
|
|
25
|
-
export type AgentTier = 'project' | 'global' | 'packaged' | 'fallback';
|
|
31
|
+
export type AgentTier = 'project' | 'global' | 'packaged' | 'fallback' | 'universal';
|
|
26
32
|
/**
|
|
27
33
|
* Whether an agent is permitted to spawn other agents and its role in the
|
|
28
34
|
* orchestration hierarchy.
|
|
@@ -106,7 +112,7 @@ export interface ResolvedAgent {
|
|
|
106
112
|
/** Merged skill slugs (union of catalog bindings and `.cant`-declared skills). */
|
|
107
113
|
skills: string[];
|
|
108
114
|
/** Concrete source tier of the chosen row (mirrors `tier`). */
|
|
109
|
-
source: 'project' | 'global' | 'packaged' | 'fallback';
|
|
115
|
+
source: 'project' | 'global' | 'packaged' | 'fallback' | 'universal';
|
|
110
116
|
/** `true` when an alias redirected the lookup to another agentId. */
|
|
111
117
|
aliasApplied: boolean;
|
|
112
118
|
/** When `aliasApplied` is true, the terminal canonical agentId the alias pointed at. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-registry-v3.d.ts","sourceRoot":"","sources":["../src/agent-registry-v3.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH
|
|
1
|
+
{"version":3,"file":"agent-registry-v3.d.ts","sourceRoot":"","sources":["../src/agent-registry-v3.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;AAErF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAM9D;;;;;;;;;GASG;AACH,MAAM,WAAW,2BA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AAC;AAEZ;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,IAAI,EAAE,eAAe,CAAC;IACtB,+BAA+B;IAC/B,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,0BAA0B;IAC1B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export type { BrainState } from './operations/orchestrate.js';
|
|
|
52
52
|
export type { CittyArgDef, OperationParams, ParamCliDef, ParamDef, ParamType, } from './operations/params.js';
|
|
53
53
|
export { paramsToCittyArgs } from './operations/params.js';
|
|
54
54
|
export type { DecisionRecord, SessionBriefingShowParams, SessionBriefingShowResult, SessionContextDriftParams, SessionContextDriftResult, SessionDecisionLogParams, SessionDecisionLogResult, SessionEndParams, SessionEndResult, SessionFindParams, SessionFindResult, SessionGcParams, SessionGcResult, SessionHandoffShowParams, SessionHandoffShowResult, SessionListParams, SessionListResult, SessionOps, SessionRecordAssumptionParams, SessionRecordAssumptionResult, SessionRecordDecisionParams, SessionRecordDecisionResult, SessionResumeParams, SessionResumeResult, SessionShowParams, SessionShowResult, SessionStartParams, SessionStatusParams, SessionStatusResult, SessionSuspendParams, SessionSuspendResult, } from './operations/session.js';
|
|
55
|
+
export type { ResolvedVariable, SubstitutionContext, SubstitutionOptions, SubstitutionResult, SubstitutionSource, VariableResolver, } from './operations/variable-substitution.js';
|
|
55
56
|
export { type AgentHierarchy, type AgentHierarchyEntry, type EscalationChain, type OrchestrationHierarchyAPI, OrchestrationLevel, } from './orchestration-hierarchy.js';
|
|
56
57
|
export type { PlaybookAgenticNode, PlaybookApproval, PlaybookApprovalNode, PlaybookApprovalStatus, PlaybookDefinition, PlaybookDeterministicNode, PlaybookEdge, PlaybookEnsures, PlaybookErrorHandler, PlaybookInput, PlaybookNode, PlaybookNodeBase, PlaybookNodeOnFailure, PlaybookNodeType, PlaybookPolicy, PlaybookRequires, PlaybookRun, PlaybookRunStatus, } from './playbook.js';
|
|
57
58
|
export type { AdapterPathProvider } from './provider-paths.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,MAAM,6BAA6B,CAAC;AAErC,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE7E,YAAY,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,eAAe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ChB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,YAAY,EACV,WAAW,EACX,eAAe,EACf,WAAW,EACX,QAAQ,EACR,SAAS,GACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,YAAY,EACV,cAAc,EACd,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC3B,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,GACT,MAAM,sBAAsB,CAAC;A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AkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,wBAAwB,EACxB,SAAS,EACT,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,UAAU,EACV,eAAe,EACf,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACR,SAAS,GACV,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,2DAA2D;AAC3D,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,MAAM,6BAA6B,CAAC;AA0DrC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AA8ChC,iDAAiD;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAwE3D,0BAA0B;AAC1B,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,aAAa,EACb,WAAW,EACX,yBAAyB,EACzB,cAAc,EACd,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAmBrB,2DAA2D;AAC3D,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,qBAAqB;AACrB,OAAO,EACL,QAAQ,EACR,eAAe,EACf,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,aAAa,GACd,MAAM,iBAAiB,CAAC;AAgCzB,gCAAgC;AAChC,OAAO,EACL,uBAAuB,EACvB,WAAW,EACX,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAuCrB,8BAA8B;AAC9B,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,GACd,MAAM,WAAW,CAAC;AA2EnB,8FAA8F;AAC9F,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAW7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,2DAA2D;AAC3D,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,MAAM,6BAA6B,CAAC;AA0DrC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,wBAAwB,CA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,MAAM,sBAAsB,CAAC;AA8C9B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAiD5B,yCAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC"}
|
package/dist/operations/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variable Substitution Domain Operations — shared types for the mustache
|
|
3
|
+
* `{{var}}` template substitution engine used by `.cant` agents and
|
|
4
|
+
* `.cantbook` playbooks.
|
|
5
|
+
*
|
|
6
|
+
* Syntax: double-brace mustache placeholders (e.g. `{{tech_stack}}`,
|
|
7
|
+
* `{{context.foo.bar}}`) resolved lazily at spawn time.
|
|
8
|
+
*
|
|
9
|
+
* Resolver precedence (highest → lowest):
|
|
10
|
+
*
|
|
11
|
+
* 1. `bindings` — explicit caller overrides (e.g. payload-level hints).
|
|
12
|
+
* 2. `sessionContext` — session/task-scoped state.
|
|
13
|
+
* 3. `projectContext` — project-context.json (dot-notation capable).
|
|
14
|
+
* 4. `env` — `CLEO_<VAR>` / `CANT_<VAR>` prefixed environment variables.
|
|
15
|
+
* 5. Default value (when provided in {@link SubstitutionOptions}).
|
|
16
|
+
* 6. Missing — strict mode errors, lenient leaves the placeholder.
|
|
17
|
+
*
|
|
18
|
+
* SYNC: Canonical SDK implementation at
|
|
19
|
+
* packages/core/src/agents/variable-substitution.ts
|
|
20
|
+
*
|
|
21
|
+
* Integration: {@link packages/cleo/src/dispatch/engines/orchestrate-engine.ts}
|
|
22
|
+
* applies substitution inside `orchestrateSpawnExecute` before the CANT
|
|
23
|
+
* agent body is embedded in the spawn prompt.
|
|
24
|
+
*
|
|
25
|
+
* @task T1238 Variable substitution engine + contracts types
|
|
26
|
+
* @task T1232 CLEO Agents Architecture Remediation for v2026.4.110
|
|
27
|
+
* @see R2-VARIABLE-SYNTAX-DESIGN.md §4 — TypeScript interfaces.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Which resolver tier produced a {@link ResolvedVariable} value.
|
|
31
|
+
*
|
|
32
|
+
* `'missing'` indicates the variable was referenced but unresolved. Callers
|
|
33
|
+
* in lenient mode will see `source: 'missing'` for any variable that falls
|
|
34
|
+
* through every tier without matching.
|
|
35
|
+
*/
|
|
36
|
+
export type SubstitutionSource = 'bindings' | 'session' | 'project_context' | 'env' | 'default' | 'missing';
|
|
37
|
+
/**
|
|
38
|
+
* A resolved value from one tier of the substitution chain.
|
|
39
|
+
*
|
|
40
|
+
* The `value` field is always stringified for template insertion (numbers,
|
|
41
|
+
* booleans, and objects are coerced). `null` indicates an intentional null
|
|
42
|
+
* projection — NOT missing. Missing variables appear in the result's
|
|
43
|
+
* `missing` array and are never surfaced as {@link ResolvedVariable}s unless
|
|
44
|
+
* a `defaultValue` was used (in which case `source === 'default'`).
|
|
45
|
+
*/
|
|
46
|
+
export interface ResolvedVariable {
|
|
47
|
+
/** Variable name as it appeared between the `{{ }}` braces. */
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
* Resolved value (always stringified for template insertion) or `null`
|
|
51
|
+
* when the source intentionally projected `null`.
|
|
52
|
+
*/
|
|
53
|
+
value: string | null;
|
|
54
|
+
/** Which resolver tier provided this value. */
|
|
55
|
+
source: SubstitutionSource;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Options controlling substitution behaviour.
|
|
59
|
+
*
|
|
60
|
+
* Default posture is lenient (`strict: false`) to match the R2 design —
|
|
61
|
+
* partial substitution is preferred over hard failure so agents can still
|
|
62
|
+
* spawn with placeholder prompts. Callers needing fail-fast behaviour (e.g.
|
|
63
|
+
* playbook approval prompts) should pass `strict: true`.
|
|
64
|
+
*/
|
|
65
|
+
export interface SubstitutionOptions {
|
|
66
|
+
/**
|
|
67
|
+
* When `true`, missing variables cause {@link SubstitutionResult.success}
|
|
68
|
+
* to be `false` and populate {@link SubstitutionResult.error}. When
|
|
69
|
+
* `false` (default), missing variables are left as literal placeholders
|
|
70
|
+
* in the output text.
|
|
71
|
+
*/
|
|
72
|
+
strict?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Fallback string substituted for missing variables when {@link strict}
|
|
75
|
+
* is `false`. When omitted, the literal placeholder is kept in the output.
|
|
76
|
+
*/
|
|
77
|
+
defaultValue?: string;
|
|
78
|
+
/**
|
|
79
|
+
* When `true`, emits `console.warn` for each unresolved variable. Useful
|
|
80
|
+
* during development; disabled by default so production spawns stay quiet.
|
|
81
|
+
*/
|
|
82
|
+
warnMissing?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Optional whitelist of variable names permitted in the template. When
|
|
85
|
+
* provided, references to variables outside the list are treated as
|
|
86
|
+
* unresolved (strict mode fails; lenient leaves the placeholder).
|
|
87
|
+
*/
|
|
88
|
+
allowedVars?: readonly string[];
|
|
89
|
+
/**
|
|
90
|
+
* Environment prefix used to look up `CLEO_<VAR>` / `CANT_<VAR>` variables.
|
|
91
|
+
* Defaults to both `CLEO_` and `CANT_` (tried in that order). Callers can
|
|
92
|
+
* override to restrict or extend the prefix set.
|
|
93
|
+
*/
|
|
94
|
+
envPrefixes?: readonly string[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Envelope returned by every call to {@link VariableResolver.resolve}.
|
|
98
|
+
*
|
|
99
|
+
* `text` is the template after substitution. `resolved` lists every variable
|
|
100
|
+
* that was successfully replaced (including `'default'`-sourced fallbacks).
|
|
101
|
+
* `missing` lists every variable that fell through all tiers. `success` is
|
|
102
|
+
* `true` iff strict mode accepted the substitution (lenient mode always
|
|
103
|
+
* succeeds at this level — callers inspect `missing` to decide).
|
|
104
|
+
*/
|
|
105
|
+
export interface SubstitutionResult {
|
|
106
|
+
/** Template text after substitution. */
|
|
107
|
+
text: string;
|
|
108
|
+
/** Variables resolved during substitution, in discovery order. */
|
|
109
|
+
resolved: ResolvedVariable[];
|
|
110
|
+
/** Variables referenced but not resolved. Empty when strict succeeded. */
|
|
111
|
+
missing: string[];
|
|
112
|
+
/** `true` when substitution completed without strict-mode failure. */
|
|
113
|
+
success: boolean;
|
|
114
|
+
/** Human-readable error when `success === false`. */
|
|
115
|
+
error?: string;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Context payload consumed by {@link VariableResolver.resolve}.
|
|
119
|
+
*
|
|
120
|
+
* Every field is optional — resolvers fall through to the next tier when
|
|
121
|
+
* the current one is absent or does not contain the variable. The resolver
|
|
122
|
+
* only fails (strict mode) when ALL tiers produce no match.
|
|
123
|
+
*/
|
|
124
|
+
export interface SubstitutionContext {
|
|
125
|
+
/**
|
|
126
|
+
* Project-wide metadata loaded from `.cleo/project-context.json`. Supports
|
|
127
|
+
* dot-notation lookups (e.g. `{{testing.framework}}` → `context.testing.framework`).
|
|
128
|
+
*/
|
|
129
|
+
projectContext?: Record<string, unknown>;
|
|
130
|
+
/**
|
|
131
|
+
* Session/task-scoped state (e.g. `{ taskId, epicId, sessionId }`). Flat
|
|
132
|
+
* key lookup — dot-notation is NOT applied here (session keys are scalar).
|
|
133
|
+
*/
|
|
134
|
+
sessionContext?: Record<string, unknown>;
|
|
135
|
+
/**
|
|
136
|
+
* Raw environment variables (usually `process.env`). The resolver prefixes
|
|
137
|
+
* lookups with `CLEO_` / `CANT_` (or the override in
|
|
138
|
+
* {@link SubstitutionOptions.envPrefixes}) before matching.
|
|
139
|
+
*/
|
|
140
|
+
env?: Record<string, string | undefined>;
|
|
141
|
+
/**
|
|
142
|
+
* Explicit highest-priority bindings. Used for spawn-time overrides (e.g.
|
|
143
|
+
* classifier output, orchestrator hints). Flat key lookup only.
|
|
144
|
+
*/
|
|
145
|
+
bindings?: Record<string, unknown>;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Core resolver contract.
|
|
149
|
+
*
|
|
150
|
+
* Implementations MUST:
|
|
151
|
+
*
|
|
152
|
+
* - Use the mustache regex `/\{\{\s*([a-zA-Z_][a-zA-Z0-9_.]*)\s*\}\}/g`.
|
|
153
|
+
* - Apply the documented resolver precedence (bindings → session →
|
|
154
|
+
* project → env → default → missing).
|
|
155
|
+
* - Never recursively evaluate resolved values (values containing `{{…}}`
|
|
156
|
+
* are left intact; recursion is NOT supported per R2 §10.2).
|
|
157
|
+
* - Coerce non-string scalar values to strings. Objects are JSON-stringified.
|
|
158
|
+
* - Be case-sensitive (`{{tech_stack}}` ≠ `{{TECH_STACK}}`).
|
|
159
|
+
*/
|
|
160
|
+
export interface VariableResolver {
|
|
161
|
+
/**
|
|
162
|
+
* Resolve and substitute variables in `text` using the supplied context.
|
|
163
|
+
*
|
|
164
|
+
* @param text - Template containing `{{var}}` placeholders.
|
|
165
|
+
* @param context - Multi-tier resolver context.
|
|
166
|
+
* @param options - Optional behaviour tweaks (strict/lenient, prefixes…).
|
|
167
|
+
* @returns A {@link SubstitutionResult} envelope with text + diagnostics.
|
|
168
|
+
*/
|
|
169
|
+
resolve(text: string, context: SubstitutionContext, options?: SubstitutionOptions): SubstitutionResult;
|
|
170
|
+
/**
|
|
171
|
+
* Extract every unique variable name referenced by `text` WITHOUT
|
|
172
|
+
* resolving them. Useful for template validation and schema checks.
|
|
173
|
+
*
|
|
174
|
+
* @param text - Template to scan.
|
|
175
|
+
* @returns Deduplicated variable names in discovery order.
|
|
176
|
+
*/
|
|
177
|
+
extractVariables(text: string): string[];
|
|
178
|
+
/**
|
|
179
|
+
* Validate that every variable in `requiredVars` can be resolved from
|
|
180
|
+
* `context`. Returns the set of variables that would fail resolution,
|
|
181
|
+
* so callers can surface a full missing-var report up-front rather than
|
|
182
|
+
* discovering them one by one during resolve().
|
|
183
|
+
*
|
|
184
|
+
* @param requiredVars - Variables the caller considers mandatory.
|
|
185
|
+
* @param context - Resolver context to validate against.
|
|
186
|
+
* @returns `{ valid: true }` when every variable resolves, otherwise
|
|
187
|
+
* `{ valid: false, missing: [...] }`.
|
|
188
|
+
*/
|
|
189
|
+
validate(requiredVars: readonly string[], context: SubstitutionContext): {
|
|
190
|
+
valid: boolean;
|
|
191
|
+
missing: string[];
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=variable-substitution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable-substitution.d.ts","sourceRoot":"","sources":["../../src/operations/variable-substitution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAC1B,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,KAAK,GACL,SAAS,GACT,SAAS,CAAC;AAEd;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CA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AE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,kBAAkB,CAAC;IAEtB;;;;;;OAMG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzC;;;;;;;;;;OAUG;IACH,QAAQ,CACN,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,OAAO,EAAE,mBAAmB,GAC3B;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAC1C"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variable Substitution Domain Operations — shared types for the mustache
|
|
3
|
+
* `{{var}}` template substitution engine used by `.cant` agents and
|
|
4
|
+
* `.cantbook` playbooks.
|
|
5
|
+
*
|
|
6
|
+
* Syntax: double-brace mustache placeholders (e.g. `{{tech_stack}}`,
|
|
7
|
+
* `{{context.foo.bar}}`) resolved lazily at spawn time.
|
|
8
|
+
*
|
|
9
|
+
* Resolver precedence (highest → lowest):
|
|
10
|
+
*
|
|
11
|
+
* 1. `bindings` — explicit caller overrides (e.g. payload-level hints).
|
|
12
|
+
* 2. `sessionContext` — session/task-scoped state.
|
|
13
|
+
* 3. `projectContext` — project-context.json (dot-notation capable).
|
|
14
|
+
* 4. `env` — `CLEO_<VAR>` / `CANT_<VAR>` prefixed environment variables.
|
|
15
|
+
* 5. Default value (when provided in {@link SubstitutionOptions}).
|
|
16
|
+
* 6. Missing — strict mode errors, lenient leaves the placeholder.
|
|
17
|
+
*
|
|
18
|
+
* SYNC: Canonical SDK implementation at
|
|
19
|
+
* packages/core/src/agents/variable-substitution.ts
|
|
20
|
+
*
|
|
21
|
+
* Integration: {@link packages/cleo/src/dispatch/engines/orchestrate-engine.ts}
|
|
22
|
+
* applies substitution inside `orchestrateSpawnExecute` before the CANT
|
|
23
|
+
* agent body is embedded in the spawn prompt.
|
|
24
|
+
*
|
|
25
|
+
* @task T1238 Variable substitution engine + contracts types
|
|
26
|
+
* @task T1232 CLEO Agents Architecture Remediation for v2026.4.110
|
|
27
|
+
* @see R2-VARIABLE-SYNTAX-DESIGN.md §4 — TypeScript interfaces.
|
|
28
|
+
*/
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=variable-substitution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable-substitution.js","sourceRoot":"","sources":["../../src/operations/variable-substitution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
package/package.json
CHANGED
package/src/agent-registry-v3.ts
CHANGED
|
@@ -19,15 +19,21 @@
|
|
|
19
19
|
/**
|
|
20
20
|
* Tier where an agent is installed or resolved from.
|
|
21
21
|
*
|
|
22
|
-
* - `project`
|
|
23
|
-
* - `global`
|
|
24
|
-
* - `packaged`
|
|
25
|
-
* - `fallback`
|
|
22
|
+
* - `project` — installed in the current project (`.cleo/agents/`)
|
|
23
|
+
* - `global` — installed at the user/global scope (`$XDG_DATA_HOME/cleo/agents/`)
|
|
24
|
+
* - `packaged` — bundled with the CLEO distribution
|
|
25
|
+
* - `fallback` — synthesized at resolve-time when no concrete `.cant` exists
|
|
26
|
+
* for the requested agentId but a bundled seed-agent file matches
|
|
27
|
+
* - `universal` — synthesized at resolve-time from the universal protocol
|
|
28
|
+
* base (`@cleocode/agents/cleo-subagent.cant`). Acts as the
|
|
29
|
+
* final safety net so classifier output never produces
|
|
30
|
+
* `E_AGENT_NOT_FOUND` when the base file is reachable.
|
|
31
|
+
* Added in v2026.4.111 (T1241 / D035).
|
|
26
32
|
*
|
|
27
|
-
* @task T897
|
|
28
|
-
* @epic T889
|
|
33
|
+
* @task T897 / T1241
|
|
34
|
+
* @epic T889 / T1232
|
|
29
35
|
*/
|
|
30
|
-
export type AgentTier = 'project' | 'global' | 'packaged' | 'fallback';
|
|
36
|
+
export type AgentTier = 'project' | 'global' | 'packaged' | 'fallback' | 'universal';
|
|
31
37
|
|
|
32
38
|
/**
|
|
33
39
|
* Whether an agent is permitted to spawn other agents and its role in the
|
|
@@ -119,7 +125,7 @@ export interface ResolvedAgent {
|
|
|
119
125
|
/** Merged skill slugs (union of catalog bindings and `.cant`-declared skills). */
|
|
120
126
|
skills: string[];
|
|
121
127
|
/** Concrete source tier of the chosen row (mirrors `tier`). */
|
|
122
|
-
source: 'project' | 'global' | 'packaged' | 'fallback';
|
|
128
|
+
source: 'project' | 'global' | 'packaged' | 'fallback' | 'universal';
|
|
123
129
|
/** `true` when an alias redirected the lookup to another agentId. */
|
|
124
130
|
aliasApplied: boolean;
|
|
125
131
|
/** When `aliasApplied` is true, the terminal canonical agentId the alias pointed at. */
|
package/src/index.ts
CHANGED
|
@@ -481,6 +481,16 @@ export type {
|
|
|
481
481
|
SessionSuspendParams,
|
|
482
482
|
SessionSuspendResult,
|
|
483
483
|
} from './operations/session.js';
|
|
484
|
+
// T1238 Variable substitution — re-exported at top level so SDK consumers can
|
|
485
|
+
// import resolver contracts without the `ops.` namespace hop.
|
|
486
|
+
export type {
|
|
487
|
+
ResolvedVariable,
|
|
488
|
+
SubstitutionContext,
|
|
489
|
+
SubstitutionOptions,
|
|
490
|
+
SubstitutionResult,
|
|
491
|
+
SubstitutionSource,
|
|
492
|
+
VariableResolver,
|
|
493
|
+
} from './operations/variable-substitution.js';
|
|
484
494
|
// === Orchestration Hierarchy ===
|
|
485
495
|
export {
|
|
486
496
|
type AgentHierarchy,
|
package/src/operations/index.ts
CHANGED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variable Substitution Domain Operations — shared types for the mustache
|
|
3
|
+
* `{{var}}` template substitution engine used by `.cant` agents and
|
|
4
|
+
* `.cantbook` playbooks.
|
|
5
|
+
*
|
|
6
|
+
* Syntax: double-brace mustache placeholders (e.g. `{{tech_stack}}`,
|
|
7
|
+
* `{{context.foo.bar}}`) resolved lazily at spawn time.
|
|
8
|
+
*
|
|
9
|
+
* Resolver precedence (highest → lowest):
|
|
10
|
+
*
|
|
11
|
+
* 1. `bindings` — explicit caller overrides (e.g. payload-level hints).
|
|
12
|
+
* 2. `sessionContext` — session/task-scoped state.
|
|
13
|
+
* 3. `projectContext` — project-context.json (dot-notation capable).
|
|
14
|
+
* 4. `env` — `CLEO_<VAR>` / `CANT_<VAR>` prefixed environment variables.
|
|
15
|
+
* 5. Default value (when provided in {@link SubstitutionOptions}).
|
|
16
|
+
* 6. Missing — strict mode errors, lenient leaves the placeholder.
|
|
17
|
+
*
|
|
18
|
+
* SYNC: Canonical SDK implementation at
|
|
19
|
+
* packages/core/src/agents/variable-substitution.ts
|
|
20
|
+
*
|
|
21
|
+
* Integration: {@link packages/cleo/src/dispatch/engines/orchestrate-engine.ts}
|
|
22
|
+
* applies substitution inside `orchestrateSpawnExecute` before the CANT
|
|
23
|
+
* agent body is embedded in the spawn prompt.
|
|
24
|
+
*
|
|
25
|
+
* @task T1238 Variable substitution engine + contracts types
|
|
26
|
+
* @task T1232 CLEO Agents Architecture Remediation for v2026.4.110
|
|
27
|
+
* @see R2-VARIABLE-SYNTAX-DESIGN.md §4 — TypeScript interfaces.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Which resolver tier produced a {@link ResolvedVariable} value.
|
|
32
|
+
*
|
|
33
|
+
* `'missing'` indicates the variable was referenced but unresolved. Callers
|
|
34
|
+
* in lenient mode will see `source: 'missing'` for any variable that falls
|
|
35
|
+
* through every tier without matching.
|
|
36
|
+
*/
|
|
37
|
+
export type SubstitutionSource =
|
|
38
|
+
| 'bindings'
|
|
39
|
+
| 'session'
|
|
40
|
+
| 'project_context'
|
|
41
|
+
| 'env'
|
|
42
|
+
| 'default'
|
|
43
|
+
| 'missing';
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A resolved value from one tier of the substitution chain.
|
|
47
|
+
*
|
|
48
|
+
* The `value` field is always stringified for template insertion (numbers,
|
|
49
|
+
* booleans, and objects are coerced). `null` indicates an intentional null
|
|
50
|
+
* projection — NOT missing. Missing variables appear in the result's
|
|
51
|
+
* `missing` array and are never surfaced as {@link ResolvedVariable}s unless
|
|
52
|
+
* a `defaultValue` was used (in which case `source === 'default'`).
|
|
53
|
+
*/
|
|
54
|
+
export interface ResolvedVariable {
|
|
55
|
+
/** Variable name as it appeared between the `{{ }}` braces. */
|
|
56
|
+
name: string;
|
|
57
|
+
/**
|
|
58
|
+
* Resolved value (always stringified for template insertion) or `null`
|
|
59
|
+
* when the source intentionally projected `null`.
|
|
60
|
+
*/
|
|
61
|
+
value: string | null;
|
|
62
|
+
/** Which resolver tier provided this value. */
|
|
63
|
+
source: SubstitutionSource;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Options controlling substitution behaviour.
|
|
68
|
+
*
|
|
69
|
+
* Default posture is lenient (`strict: false`) to match the R2 design —
|
|
70
|
+
* partial substitution is preferred over hard failure so agents can still
|
|
71
|
+
* spawn with placeholder prompts. Callers needing fail-fast behaviour (e.g.
|
|
72
|
+
* playbook approval prompts) should pass `strict: true`.
|
|
73
|
+
*/
|
|
74
|
+
export interface SubstitutionOptions {
|
|
75
|
+
/**
|
|
76
|
+
* When `true`, missing variables cause {@link SubstitutionResult.success}
|
|
77
|
+
* to be `false` and populate {@link SubstitutionResult.error}. When
|
|
78
|
+
* `false` (default), missing variables are left as literal placeholders
|
|
79
|
+
* in the output text.
|
|
80
|
+
*/
|
|
81
|
+
strict?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Fallback string substituted for missing variables when {@link strict}
|
|
84
|
+
* is `false`. When omitted, the literal placeholder is kept in the output.
|
|
85
|
+
*/
|
|
86
|
+
defaultValue?: string;
|
|
87
|
+
/**
|
|
88
|
+
* When `true`, emits `console.warn` for each unresolved variable. Useful
|
|
89
|
+
* during development; disabled by default so production spawns stay quiet.
|
|
90
|
+
*/
|
|
91
|
+
warnMissing?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Optional whitelist of variable names permitted in the template. When
|
|
94
|
+
* provided, references to variables outside the list are treated as
|
|
95
|
+
* unresolved (strict mode fails; lenient leaves the placeholder).
|
|
96
|
+
*/
|
|
97
|
+
allowedVars?: readonly string[];
|
|
98
|
+
/**
|
|
99
|
+
* Environment prefix used to look up `CLEO_<VAR>` / `CANT_<VAR>` variables.
|
|
100
|
+
* Defaults to both `CLEO_` and `CANT_` (tried in that order). Callers can
|
|
101
|
+
* override to restrict or extend the prefix set.
|
|
102
|
+
*/
|
|
103
|
+
envPrefixes?: readonly string[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Envelope returned by every call to {@link VariableResolver.resolve}.
|
|
108
|
+
*
|
|
109
|
+
* `text` is the template after substitution. `resolved` lists every variable
|
|
110
|
+
* that was successfully replaced (including `'default'`-sourced fallbacks).
|
|
111
|
+
* `missing` lists every variable that fell through all tiers. `success` is
|
|
112
|
+
* `true` iff strict mode accepted the substitution (lenient mode always
|
|
113
|
+
* succeeds at this level — callers inspect `missing` to decide).
|
|
114
|
+
*/
|
|
115
|
+
export interface SubstitutionResult {
|
|
116
|
+
/** Template text after substitution. */
|
|
117
|
+
text: string;
|
|
118
|
+
/** Variables resolved during substitution, in discovery order. */
|
|
119
|
+
resolved: ResolvedVariable[];
|
|
120
|
+
/** Variables referenced but not resolved. Empty when strict succeeded. */
|
|
121
|
+
missing: string[];
|
|
122
|
+
/** `true` when substitution completed without strict-mode failure. */
|
|
123
|
+
success: boolean;
|
|
124
|
+
/** Human-readable error when `success === false`. */
|
|
125
|
+
error?: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Context payload consumed by {@link VariableResolver.resolve}.
|
|
130
|
+
*
|
|
131
|
+
* Every field is optional — resolvers fall through to the next tier when
|
|
132
|
+
* the current one is absent or does not contain the variable. The resolver
|
|
133
|
+
* only fails (strict mode) when ALL tiers produce no match.
|
|
134
|
+
*/
|
|
135
|
+
export interface SubstitutionContext {
|
|
136
|
+
/**
|
|
137
|
+
* Project-wide metadata loaded from `.cleo/project-context.json`. Supports
|
|
138
|
+
* dot-notation lookups (e.g. `{{testing.framework}}` → `context.testing.framework`).
|
|
139
|
+
*/
|
|
140
|
+
projectContext?: Record<string, unknown>;
|
|
141
|
+
/**
|
|
142
|
+
* Session/task-scoped state (e.g. `{ taskId, epicId, sessionId }`). Flat
|
|
143
|
+
* key lookup — dot-notation is NOT applied here (session keys are scalar).
|
|
144
|
+
*/
|
|
145
|
+
sessionContext?: Record<string, unknown>;
|
|
146
|
+
/**
|
|
147
|
+
* Raw environment variables (usually `process.env`). The resolver prefixes
|
|
148
|
+
* lookups with `CLEO_` / `CANT_` (or the override in
|
|
149
|
+
* {@link SubstitutionOptions.envPrefixes}) before matching.
|
|
150
|
+
*/
|
|
151
|
+
env?: Record<string, string | undefined>;
|
|
152
|
+
/**
|
|
153
|
+
* Explicit highest-priority bindings. Used for spawn-time overrides (e.g.
|
|
154
|
+
* classifier output, orchestrator hints). Flat key lookup only.
|
|
155
|
+
*/
|
|
156
|
+
bindings?: Record<string, unknown>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Core resolver contract.
|
|
161
|
+
*
|
|
162
|
+
* Implementations MUST:
|
|
163
|
+
*
|
|
164
|
+
* - Use the mustache regex `/\{\{\s*([a-zA-Z_][a-zA-Z0-9_.]*)\s*\}\}/g`.
|
|
165
|
+
* - Apply the documented resolver precedence (bindings → session →
|
|
166
|
+
* project → env → default → missing).
|
|
167
|
+
* - Never recursively evaluate resolved values (values containing `{{…}}`
|
|
168
|
+
* are left intact; recursion is NOT supported per R2 §10.2).
|
|
169
|
+
* - Coerce non-string scalar values to strings. Objects are JSON-stringified.
|
|
170
|
+
* - Be case-sensitive (`{{tech_stack}}` ≠ `{{TECH_STACK}}`).
|
|
171
|
+
*/
|
|
172
|
+
export interface VariableResolver {
|
|
173
|
+
/**
|
|
174
|
+
* Resolve and substitute variables in `text` using the supplied context.
|
|
175
|
+
*
|
|
176
|
+
* @param text - Template containing `{{var}}` placeholders.
|
|
177
|
+
* @param context - Multi-tier resolver context.
|
|
178
|
+
* @param options - Optional behaviour tweaks (strict/lenient, prefixes…).
|
|
179
|
+
* @returns A {@link SubstitutionResult} envelope with text + diagnostics.
|
|
180
|
+
*/
|
|
181
|
+
resolve(
|
|
182
|
+
text: string,
|
|
183
|
+
context: SubstitutionContext,
|
|
184
|
+
options?: SubstitutionOptions,
|
|
185
|
+
): SubstitutionResult;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Extract every unique variable name referenced by `text` WITHOUT
|
|
189
|
+
* resolving them. Useful for template validation and schema checks.
|
|
190
|
+
*
|
|
191
|
+
* @param text - Template to scan.
|
|
192
|
+
* @returns Deduplicated variable names in discovery order.
|
|
193
|
+
*/
|
|
194
|
+
extractVariables(text: string): string[];
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Validate that every variable in `requiredVars` can be resolved from
|
|
198
|
+
* `context`. Returns the set of variables that would fail resolution,
|
|
199
|
+
* so callers can surface a full missing-var report up-front rather than
|
|
200
|
+
* discovering them one by one during resolve().
|
|
201
|
+
*
|
|
202
|
+
* @param requiredVars - Variables the caller considers mandatory.
|
|
203
|
+
* @param context - Resolver context to validate against.
|
|
204
|
+
* @returns `{ valid: true }` when every variable resolves, otherwise
|
|
205
|
+
* `{ valid: false, missing: [...] }`.
|
|
206
|
+
*/
|
|
207
|
+
validate(
|
|
208
|
+
requiredVars: readonly string[],
|
|
209
|
+
context: SubstitutionContext,
|
|
210
|
+
): { valid: boolean; missing: string[] };
|
|
211
|
+
}
|