@cleocode/cant 2026.4.123 → 2026.4.125
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/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/native-loader.d.ts +48 -8
- package/dist/native-loader.js +54 -11
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export type { ConsolidateOptions, MentalModel, MentalModelObservation, MentalMod
|
|
|
12
12
|
export { consolidate, createEmptyModel, harvestObservations, renderMentalModel, } from './mental-model.js';
|
|
13
13
|
export type { ConvertedFile, MigrationOptions, MigrationResult, UnconvertedSection, } from './migrate/index';
|
|
14
14
|
export { migrateMarkdown, serializeCantDocument, showDiff, showSummary } from './migrate/index';
|
|
15
|
-
export type { AgentProfile, NativeDiagnostic, NativeParseDocumentResult, NativeParseError, NativeParseResult, NativePipelineResult, NativePipelineStep, NativeValidateResult, SeedPersonaId, } from './native-loader';
|
|
16
|
-
export { cantClassifyDirectiveNative, cantExecutePipelineNative, cantExtractAgentProfilesNative, cantParseDocumentNative, cantParseNative, cantValidateDocumentNative, extractAgentProfilesTyped, extractAgentSkills, initWasm, isNativeAvailable, isWasmAvailable, loadSeedAgentIdentities, SEED_PERSONA_IDS, validateAgentCantPath, } from './native-loader';
|
|
15
|
+
export type { AgentProfile, CleocodeDogfoodPersonaId, NativeDiagnostic, NativeParseDocumentResult, NativeParseError, NativeParseResult, NativePipelineResult, NativePipelineStep, NativeValidateResult, SeedPersonaId, } from './native-loader';
|
|
16
|
+
export { CLEOCODE_DOGFOOD_PERSONAS, cantClassifyDirectiveNative, cantExecutePipelineNative, cantExtractAgentProfilesNative, cantParseDocumentNative, cantParseNative, cantValidateDocumentNative, extractAgentProfilesTyped, extractAgentSkills, initWasm, isNativeAvailable, isWasmAvailable, loadSeedAgentIdentities, SEED_PERSONA_IDS, validateAgentCantPath, } from './native-loader';
|
|
17
17
|
export type { ParsedCANTMessage } from './parse';
|
|
18
18
|
export { initCantParser, parseCANTMessage } from './parse';
|
|
19
19
|
export type { CantAgentV3, CantContextSourceDef, CantContractBlock, CantContractClause, CantMentalModelRef, CantOverflowStrategy, CantPathPermissions, CantTier, DirectiveType, } from './types';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// JIT Agent Composer (ULTRAPLAN Wave 5)
|
|
3
3
|
// Wave 7a: BRAIN-backed ContextProvider (T432)
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.resolveWorktreeRoot = exports.mergeWorktree = exports.listWorktrees = exports.createWorktree = exports.isCantAgentV3 = exports.parseCANTMessage = exports.initCantParser = exports.validateAgentCantPath = exports.SEED_PERSONA_IDS = exports.loadSeedAgentIdentities = exports.isWasmAvailable = exports.isNativeAvailable = exports.initWasm = exports.extractAgentSkills = exports.extractAgentProfilesTyped = exports.cantValidateDocumentNative = exports.cantParseNative = exports.cantParseDocumentNative = exports.cantExtractAgentProfilesNative = exports.cantExecutePipelineNative = exports.cantClassifyDirectiveNative = exports.showSummary = exports.showDiff = exports.serializeCantDocument = exports.migrateMarkdown = exports.renderMentalModel = exports.harvestObservations = exports.createEmptyModel = exports.consolidate = exports.WORKER_FORBIDDEN_SPAWN_TOOLS = exports.validateSpawnRequest = exports.THIN_AGENT_TOOLS_STRIPPED = exports.stripSpawnToolsForWorker = exports.ORCHESTRATOR_FORBIDDEN_TOOLS = exports.LEAD_FORBIDDEN_TOOLS = exports.filterToolsForRole = exports.validateDocument = exports.parseDocument = exports.listSections = exports.executePipeline = exports.brainContextProvider = exports.TIER_CAPS = exports.estimateTokens = exports.escalateTier = exports.composeSpawnPayload = exports.toCantAgentV3 = exports.compileBundle = void 0;
|
|
5
|
+
exports.resolveWorktreeRoot = exports.mergeWorktree = exports.listWorktrees = exports.createWorktree = exports.isCantAgentV3 = exports.parseCANTMessage = exports.initCantParser = exports.validateAgentCantPath = exports.SEED_PERSONA_IDS = exports.loadSeedAgentIdentities = exports.isWasmAvailable = exports.isNativeAvailable = exports.initWasm = exports.extractAgentSkills = exports.extractAgentProfilesTyped = exports.cantValidateDocumentNative = exports.cantParseNative = exports.cantParseDocumentNative = exports.cantExtractAgentProfilesNative = exports.cantExecutePipelineNative = exports.cantClassifyDirectiveNative = exports.CLEOCODE_DOGFOOD_PERSONAS = exports.showSummary = exports.showDiff = exports.serializeCantDocument = exports.migrateMarkdown = exports.renderMentalModel = exports.harvestObservations = exports.createEmptyModel = exports.consolidate = exports.WORKER_FORBIDDEN_SPAWN_TOOLS = exports.validateSpawnRequest = exports.THIN_AGENT_TOOLS_STRIPPED = exports.stripSpawnToolsForWorker = exports.ORCHESTRATOR_FORBIDDEN_TOOLS = exports.LEAD_FORBIDDEN_TOOLS = exports.filterToolsForRole = exports.validateDocument = exports.parseDocument = exports.listSections = exports.executePipeline = exports.brainContextProvider = exports.TIER_CAPS = exports.estimateTokens = exports.escalateTier = exports.composeSpawnPayload = exports.toCantAgentV3 = exports.compileBundle = void 0;
|
|
6
6
|
// Bundle compiler
|
|
7
7
|
var bundle_1 = require("./bundle");
|
|
8
8
|
Object.defineProperty(exports, "compileBundle", { enumerable: true, get: function () { return bundle_1.compileBundle; } });
|
|
@@ -43,6 +43,8 @@ Object.defineProperty(exports, "showDiff", { enumerable: true, get: function ()
|
|
|
43
43
|
Object.defineProperty(exports, "showSummary", { enumerable: true, get: function () { return index_1.showSummary; } });
|
|
44
44
|
// Native loader (replaces wasm-loader)
|
|
45
45
|
var native_loader_1 = require("./native-loader");
|
|
46
|
+
// T1257 — CLEO dogfood personas (classifier output; NOT shipped)
|
|
47
|
+
Object.defineProperty(exports, "CLEOCODE_DOGFOOD_PERSONAS", { enumerable: true, get: function () { return native_loader_1.CLEOCODE_DOGFOOD_PERSONAS; } });
|
|
46
48
|
Object.defineProperty(exports, "cantClassifyDirectiveNative", { enumerable: true, get: function () { return native_loader_1.cantClassifyDirectiveNative; } });
|
|
47
49
|
Object.defineProperty(exports, "cantExecutePipelineNative", { enumerable: true, get: function () { return native_loader_1.cantExecutePipelineNative; } });
|
|
48
50
|
Object.defineProperty(exports, "cantExtractAgentProfilesNative", { enumerable: true, get: function () { return native_loader_1.cantExtractAgentProfilesNative; } });
|
package/dist/native-loader.d.ts
CHANGED
|
@@ -231,18 +231,58 @@ export declare function validateAgentCantPath(cantPath: string, rootDir: string)
|
|
|
231
231
|
*/
|
|
232
232
|
export declare function cantExecutePipelineNative(filePath: string, pipelineName: string): Promise<NativePipelineResult>;
|
|
233
233
|
/**
|
|
234
|
-
* Canonical IDs of the
|
|
234
|
+
* Canonical IDs of the ship-surface personas surfaced by
|
|
235
|
+
* {@link loadSeedAgentIdentities} — the universal protocol base plus the four
|
|
236
|
+
* generic role templates that `@cleocode/agents` publishes.
|
|
235
237
|
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* seed-agents path (either `seed-agents/<id>.cant` or `cleo-subagent.cant`).
|
|
238
|
+
* Per ADR-055 D032, the package ships exactly five loadable personas at this
|
|
239
|
+
* surface (plus `meta/agent-architect.cant`, the meta-agent, which the loader
|
|
240
|
+
* does not currently walk — tracked as follow-up for a loader extension).
|
|
240
241
|
*
|
|
241
|
-
*
|
|
242
|
+
* Note: filenames under `seed-agents/` carry a `-generic` suffix
|
|
243
|
+
* (`orchestrator-generic.cant` etc.), but the agent IDs DECLARED inside each
|
|
244
|
+
* template (via `agent <name>:`) are `project-*`. This list reflects the
|
|
245
|
+
* declared agent IDs the loader surfaces, not the filename stems.
|
|
246
|
+
*
|
|
247
|
+
* Declaration order: universal base first, then the four generic role
|
|
248
|
+
* templates. Used by the regression test and as documentation of the expected
|
|
249
|
+
* registry contents. Any persona on this list MUST be resolvable from the
|
|
250
|
+
* canonical seed-agents path (either `cleo-subagent.cant` at package root or
|
|
251
|
+
* `seed-agents/<filename>.cant`).
|
|
252
|
+
*
|
|
253
|
+
* @task T1257
|
|
254
|
+
* @see {@link CLEOCODE_DOGFOOD_PERSONAS} for classifier-produced IDs that live
|
|
255
|
+
* in this repo's `.cleo/cant/agents/` and are NOT shipped.
|
|
242
256
|
*/
|
|
243
|
-
export declare const SEED_PERSONA_IDS: readonly ["cleo-
|
|
244
|
-
/** Type-safe union of the
|
|
257
|
+
export declare const SEED_PERSONA_IDS: readonly ["cleo-subagent", "project-orchestrator", "project-dev-lead", "project-code-worker", "project-docs-worker"];
|
|
258
|
+
/** Type-safe union of the ship-surface persona IDs. */
|
|
245
259
|
export type SeedPersonaId = (typeof SEED_PERSONA_IDS)[number];
|
|
260
|
+
/**
|
|
261
|
+
* Classifier-produced CLEO dogfood persona IDs that live in this repo's
|
|
262
|
+
* project-tier `.cleo/cant/agents/` directory and are NOT shipped in the
|
|
263
|
+
* `@cleocode/agents` package (per ADR-055 D031).
|
|
264
|
+
*
|
|
265
|
+
* The T891 classifier in `packages/core/src/orchestration/classify.ts` can
|
|
266
|
+
* emit any of these IDs for a task. Per ADR-055 D035, resolution flows
|
|
267
|
+
* through the 5-tier resolver: when no project/global/packaged row exists
|
|
268
|
+
* and no filesystem fallback is found, the `universal` tier synthesises an
|
|
269
|
+
* envelope from `cleo-subagent.cant` so the orchestrator never hits
|
|
270
|
+
* `E_AGENT_NOT_FOUND`.
|
|
271
|
+
*
|
|
272
|
+
* Exported so the regression test in `seed-persona-registry.test.ts` can
|
|
273
|
+
* verify every classifier output remains routable — either because the
|
|
274
|
+
* dogfood `.cant` file is present in `.cleo/cant/agents/` or because the
|
|
275
|
+
* universal-tier fallback catches it.
|
|
276
|
+
*
|
|
277
|
+
* `cleoos-opus-orchestrator` is also present as a `DEPRECATED_ALIASES` entry
|
|
278
|
+
* in `packages/core/src/store/agent-resolver.ts` (remaps to `cleo-prime`) for
|
|
279
|
+
* backward compatibility with stale session records.
|
|
280
|
+
*
|
|
281
|
+
* @task T1257
|
|
282
|
+
*/
|
|
283
|
+
export declare const CLEOCODE_DOGFOOD_PERSONAS: readonly ["cleo-prime", "cleo-dev", "cleo-rust-lead", "cleo-db-lead", "cleo-historian", "cleoos-opus-orchestrator"];
|
|
284
|
+
/** Type-safe union of the CLEO dogfood persona IDs produced by the classifier. */
|
|
285
|
+
export type CleocodeDogfoodPersonaId = (typeof CLEOCODE_DOGFOOD_PERSONAS)[number];
|
|
246
286
|
/**
|
|
247
287
|
* Load all seed-agent {@link PeerIdentity} records from the canonical
|
|
248
288
|
* `packages/agents/` directory shipped with `@cleocode/agents`.
|
package/dist/native-loader.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* `packages/lafs/src/native-loader.ts`.
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.initWasm = exports.isWasmAvailable = exports.SEED_PERSONA_IDS = void 0;
|
|
15
|
+
exports.initWasm = exports.isWasmAvailable = exports.CLEOCODE_DOGFOOD_PERSONAS = exports.SEED_PERSONA_IDS = void 0;
|
|
16
16
|
exports.isNativeAvailable = isNativeAvailable;
|
|
17
17
|
exports.cantParseNative = cantParseNative;
|
|
18
18
|
exports.cantClassifyDirectiveNative = cantClassifyDirectiveNative;
|
|
@@ -233,22 +233,65 @@ function cantExecutePipelineNative(filePath, pipelineName) {
|
|
|
233
233
|
// Seed-agent identity loader (T1210 — PeerIdentity SDK surface)
|
|
234
234
|
// ============================================================================
|
|
235
235
|
/**
|
|
236
|
-
* Canonical IDs of the
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
236
|
+
* Canonical IDs of the ship-surface personas surfaced by
|
|
237
|
+
* {@link loadSeedAgentIdentities} — the universal protocol base plus the four
|
|
238
|
+
* generic role templates that `@cleocode/agents` publishes.
|
|
239
|
+
*
|
|
240
|
+
* Per ADR-055 D032, the package ships exactly five loadable personas at this
|
|
241
|
+
* surface (plus `meta/agent-architect.cant`, the meta-agent, which the loader
|
|
242
|
+
* does not currently walk — tracked as follow-up for a loader extension).
|
|
243
|
+
*
|
|
244
|
+
* Note: filenames under `seed-agents/` carry a `-generic` suffix
|
|
245
|
+
* (`orchestrator-generic.cant` etc.), but the agent IDs DECLARED inside each
|
|
246
|
+
* template (via `agent <name>:`) are `project-*`. This list reflects the
|
|
247
|
+
* declared agent IDs the loader surfaces, not the filename stems.
|
|
248
|
+
*
|
|
249
|
+
* Declaration order: universal base first, then the four generic role
|
|
250
|
+
* templates. Used by the regression test and as documentation of the expected
|
|
251
|
+
* registry contents. Any persona on this list MUST be resolvable from the
|
|
252
|
+
* canonical seed-agents path (either `cleo-subagent.cant` at package root or
|
|
253
|
+
* `seed-agents/<filename>.cant`).
|
|
254
|
+
*
|
|
255
|
+
* @task T1257
|
|
256
|
+
* @see {@link CLEOCODE_DOGFOOD_PERSONAS} for classifier-produced IDs that live
|
|
257
|
+
* in this repo's `.cleo/cant/agents/` and are NOT shipped.
|
|
244
258
|
*/
|
|
245
259
|
exports.SEED_PERSONA_IDS = [
|
|
260
|
+
'cleo-subagent',
|
|
261
|
+
'project-orchestrator',
|
|
262
|
+
'project-dev-lead',
|
|
263
|
+
'project-code-worker',
|
|
264
|
+
'project-docs-worker',
|
|
265
|
+
];
|
|
266
|
+
/**
|
|
267
|
+
* Classifier-produced CLEO dogfood persona IDs that live in this repo's
|
|
268
|
+
* project-tier `.cleo/cant/agents/` directory and are NOT shipped in the
|
|
269
|
+
* `@cleocode/agents` package (per ADR-055 D031).
|
|
270
|
+
*
|
|
271
|
+
* The T891 classifier in `packages/core/src/orchestration/classify.ts` can
|
|
272
|
+
* emit any of these IDs for a task. Per ADR-055 D035, resolution flows
|
|
273
|
+
* through the 5-tier resolver: when no project/global/packaged row exists
|
|
274
|
+
* and no filesystem fallback is found, the `universal` tier synthesises an
|
|
275
|
+
* envelope from `cleo-subagent.cant` so the orchestrator never hits
|
|
276
|
+
* `E_AGENT_NOT_FOUND`.
|
|
277
|
+
*
|
|
278
|
+
* Exported so the regression test in `seed-persona-registry.test.ts` can
|
|
279
|
+
* verify every classifier output remains routable — either because the
|
|
280
|
+
* dogfood `.cant` file is present in `.cleo/cant/agents/` or because the
|
|
281
|
+
* universal-tier fallback catches it.
|
|
282
|
+
*
|
|
283
|
+
* `cleoos-opus-orchestrator` is also present as a `DEPRECATED_ALIASES` entry
|
|
284
|
+
* in `packages/core/src/store/agent-resolver.ts` (remaps to `cleo-prime`) for
|
|
285
|
+
* backward compatibility with stale session records.
|
|
286
|
+
*
|
|
287
|
+
* @task T1257
|
|
288
|
+
*/
|
|
289
|
+
exports.CLEOCODE_DOGFOOD_PERSONAS = [
|
|
246
290
|
'cleo-prime',
|
|
247
291
|
'cleo-dev',
|
|
292
|
+
'cleo-rust-lead',
|
|
248
293
|
'cleo-db-lead',
|
|
249
294
|
'cleo-historian',
|
|
250
|
-
'cleo-rust-lead',
|
|
251
|
-
'cleo-subagent',
|
|
252
295
|
'cleoos-opus-orchestrator',
|
|
253
296
|
];
|
|
254
297
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleocode/cant",
|
|
3
|
-
"version": "2026.4.
|
|
3
|
+
"version": "2026.4.125",
|
|
4
4
|
"description": "CANT protocol parser and runtime for CLEO — wraps cant-core via napi-rs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"napi/"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@cleocode/
|
|
13
|
-
"@cleocode/
|
|
14
|
-
"@cleocode/
|
|
12
|
+
"@cleocode/core": "2026.4.125",
|
|
13
|
+
"@cleocode/lafs": "2026.4.125",
|
|
14
|
+
"@cleocode/contracts": "2026.4.125"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"typescript": "^6.0.2",
|