@cleocode/contracts 2026.4.100 → 2026.4.102
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/brain-graph.d.ts +245 -0
- package/dist/brain-graph.d.ts.map +1 -0
- package/dist/brain-graph.js +30 -0
- package/dist/brain-graph.js.map +1 -0
- package/dist/branch-lock.d.ts +225 -0
- package/dist/branch-lock.d.ts.map +1 -0
- package/dist/branch-lock.js +43 -0
- package/dist/branch-lock.js.map +1 -0
- package/dist/exit-codes.d.ts +1 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +1 -1
- package/dist/exit-codes.js.map +1 -1
- package/dist/graph.d.ts +2 -0
- package/dist/graph.d.ts.map +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/nexus-contract-ops.d.ts +186 -0
- package/dist/nexus-contract-ops.d.ts.map +1 -0
- package/dist/nexus-contract-ops.js +11 -0
- package/dist/nexus-contract-ops.js.map +1 -0
- package/dist/nexus-living-brain-ops.d.ts +314 -0
- package/dist/nexus-living-brain-ops.d.ts.map +1 -0
- package/dist/nexus-living-brain-ops.js +15 -0
- package/dist/nexus-living-brain-ops.js.map +1 -0
- package/dist/nexus-query-ops.d.ts +82 -0
- package/dist/nexus-query-ops.d.ts.map +1 -0
- package/dist/nexus-query-ops.js +11 -0
- package/dist/nexus-query-ops.js.map +1 -0
- package/dist/nexus-route-ops.d.ts +103 -0
- package/dist/nexus-route-ops.d.ts.map +1 -0
- package/dist/nexus-route-ops.js +10 -0
- package/dist/nexus-route-ops.js.map +1 -0
- package/dist/nexus-tasks-bridge-ops.d.ts +68 -0
- package/dist/nexus-tasks-bridge-ops.d.ts.map +1 -0
- package/dist/nexus-tasks-bridge-ops.js +11 -0
- package/dist/nexus-tasks-bridge-ops.js.map +1 -0
- package/dist/nexus-wiki-ops.d.ts +127 -0
- package/dist/nexus-wiki-ops.d.ts.map +1 -0
- package/dist/nexus-wiki-ops.js +12 -0
- package/dist/nexus-wiki-ops.js.map +1 -0
- package/dist/operations/admin.d.ts +1781 -0
- package/dist/operations/admin.d.ts.map +1 -0
- package/dist/operations/admin.js +27 -0
- package/dist/operations/admin.js.map +1 -0
- package/dist/operations/brain.d.ts +34 -26
- package/dist/operations/brain.d.ts.map +1 -1
- package/dist/operations/brain.js +7 -6
- package/dist/operations/brain.js.map +1 -1
- package/dist/operations/docs.d.ts +279 -0
- package/dist/operations/docs.d.ts.map +1 -0
- package/dist/operations/docs.js +31 -0
- package/dist/operations/docs.js.map +1 -0
- package/dist/operations/intelligence.d.ts +319 -0
- package/dist/operations/intelligence.d.ts.map +1 -0
- package/dist/operations/intelligence.js +24 -0
- package/dist/operations/intelligence.js.map +1 -0
- package/dist/operations/orchestrate.d.ts +113 -2
- package/dist/operations/orchestrate.d.ts.map +1 -1
- package/dist/operations/orchestrate.js +3 -2
- package/dist/operations/orchestrate.js.map +1 -1
- package/dist/operations/session.d.ts +193 -47
- package/dist/operations/session.d.ts.map +1 -1
- package/dist/operations/session.js +7 -6
- package/dist/operations/session.js.map +1 -1
- package/dist/operations/sticky.d.ts +264 -0
- package/dist/operations/sticky.d.ts.map +1 -0
- package/dist/operations/sticky.js +19 -0
- package/dist/operations/sticky.js.map +1 -0
- package/dist/operations/validate.d.ts +145 -19
- package/dist/operations/validate.d.ts.map +1 -1
- package/dist/operations/validate.js +3 -3
- package/dist/task-record.d.ts +19 -0
- package/dist/task-record.d.ts.map +1 -1
- package/package.json +41 -1
- package/src/brain-graph.ts +282 -0
- package/src/branch-lock.ts +254 -0
- package/src/exit-codes.ts +1 -1
- package/src/graph.ts +2 -0
- package/src/index.ts +128 -0
- package/src/nexus-contract-ops.ts +244 -0
- package/src/nexus-living-brain-ops.ts +345 -0
- package/src/nexus-query-ops.ts +100 -0
- package/src/nexus-route-ops.ts +134 -0
- package/src/nexus-tasks-bridge-ops.ts +71 -0
- package/src/nexus-wiki-ops.ts +133 -0
- package/src/operations/admin.ts +2087 -0
- package/src/operations/brain.ts +34 -26
- package/src/operations/docs.ts +322 -0
- package/src/operations/intelligence.ts +399 -0
- package/src/operations/orchestrate.ts +117 -2
- package/src/operations/session.ts +225 -48
- package/src/operations/sticky.ts +308 -0
- package/src/operations/validate.ts +161 -55
- package/src/task-record.ts +19 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Brain unified-graph types.
|
|
3
|
+
*
|
|
4
|
+
* These are the **single source of truth** for `BrainNode`, `BrainEdge`,
|
|
5
|
+
* `BrainGraph`, and their supporting types across the entire CLEO monorepo.
|
|
6
|
+
*
|
|
7
|
+
* All other packages MUST import these types from `@cleocode/contracts`
|
|
8
|
+
* (or a relative path into this file) rather than defining their own copies.
|
|
9
|
+
* Runtime packages such as `@cleocode/brain` re-export these types directly
|
|
10
|
+
* so downstream consumers do not need to change their import path.
|
|
11
|
+
*
|
|
12
|
+
* ## Shape rationale
|
|
13
|
+
*
|
|
14
|
+
* The types here are the **runtime** shapes produced by the substrate
|
|
15
|
+
* adapters in `@cleocode/brain` and consumed by every graph renderer,
|
|
16
|
+
* SSE stream, and API route in `@cleocode/studio`. The wire-format
|
|
17
|
+
* operation contracts in `./operations/brain.ts` are intentionally distinct
|
|
18
|
+
* (they use `from`/`to`/`kind` field names and a separate `BrainSubstrateName`
|
|
19
|
+
* vocabulary) and are namespaced under `ops.*` to avoid collisions.
|
|
20
|
+
*
|
|
21
|
+
* @task T989 — canonical type unification (was split across packages/brain
|
|
22
|
+
* and packages/contracts/operations/brain)
|
|
23
|
+
* @task T973 — LB* → Brain* rename
|
|
24
|
+
* @task T969 — `@cleocode/brain` package extraction
|
|
25
|
+
* @see packages/brain/src/types.ts (re-exports from here for backwards compat)
|
|
26
|
+
* @see packages/contracts/src/operations/brain.ts (wire-format / ops contracts)
|
|
27
|
+
* @see docs/plans/brain-synaptic-visualization-research.md §5.2
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* All possible node kinds across the five CLEO substrates.
|
|
31
|
+
*
|
|
32
|
+
* - `observation` / `decision` / `pattern` / `learning` → BRAIN typed tables
|
|
33
|
+
* - `task` / `session` → TASKS
|
|
34
|
+
* - `symbol` / `file` → NEXUS
|
|
35
|
+
* - `agent` → SIGNALDOCK
|
|
36
|
+
* - `message` → CONDUIT
|
|
37
|
+
*/
|
|
38
|
+
export type BrainNodeKind = 'observation' | 'decision' | 'pattern' | 'learning' | 'task' | 'session' | 'symbol' | 'file' | 'agent' | 'message';
|
|
39
|
+
/**
|
|
40
|
+
* Which database a node or edge originates from.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* Uses the literal `'brain'` to match the on-disk `brain.db` filename.
|
|
44
|
+
* This differs from `BrainSubstrateName` in `./operations/brain.ts` which
|
|
45
|
+
* uses `'memory'` to align with the cognitive-memory domain rename. Callers
|
|
46
|
+
* that bridge runtime output to the wire format translate between the two
|
|
47
|
+
* naming planes at the adapter boundary.
|
|
48
|
+
*/
|
|
49
|
+
export type BrainSubstrate = 'brain' | 'nexus' | 'tasks' | 'conduit' | 'signaldock';
|
|
50
|
+
/**
|
|
51
|
+
* A single node in the unified CLEO Brain graph.
|
|
52
|
+
*
|
|
53
|
+
* The `id` field is always substrate-prefixed so nodes from different
|
|
54
|
+
* substrates can be merged without collisions:
|
|
55
|
+
* - `"brain:O-abc"` — a brain observation
|
|
56
|
+
* - `"nexus:sym-123"` — a nexus code symbol
|
|
57
|
+
* - `"tasks:T949"` — a CLEO task
|
|
58
|
+
* - `"conduit:msg-7f3a2b1c"` — a conduit message
|
|
59
|
+
* - `"signaldock:agent-cleo-prime"` — a SignalDock agent
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* This is the shape produced by all substrate adapters in `@cleocode/brain`
|
|
63
|
+
* and consumed by graph renderers and SSE streams. It differs from the
|
|
64
|
+
* `BrainNodeWire` wire-format type in `./operations/brain.ts` which uses
|
|
65
|
+
* `type`/`data` instead of `kind`/`meta`.
|
|
66
|
+
*/
|
|
67
|
+
export interface BrainNode {
|
|
68
|
+
/** Substrate-prefixed identifier, e.g. `"brain:O-abc"`, `"nexus:sym-123"`. */
|
|
69
|
+
id: string;
|
|
70
|
+
/** Semantic category of this node. */
|
|
71
|
+
kind: BrainNodeKind;
|
|
72
|
+
/** Source database. */
|
|
73
|
+
substrate: BrainSubstrate;
|
|
74
|
+
/** Human-readable display label. */
|
|
75
|
+
label: string;
|
|
76
|
+
/**
|
|
77
|
+
* Optional numeric weight in `[0, 1]`.
|
|
78
|
+
*
|
|
79
|
+
* - BRAIN: `quality_score` (0.0–1.0)
|
|
80
|
+
* - NEXUS: in-degree / caller count (normalised)
|
|
81
|
+
* - TASKS: priority rank (critical=4 → 1.0, low=1 → 0.25)
|
|
82
|
+
* - CONDUIT / SIGNALDOCK: omitted
|
|
83
|
+
*/
|
|
84
|
+
weight?: number;
|
|
85
|
+
/**
|
|
86
|
+
* ISO-8601 creation timestamp, or `null` when the substrate does not
|
|
87
|
+
* expose a timestamp for this node type.
|
|
88
|
+
*
|
|
89
|
+
* - BRAIN: `brain_*` tables `created_at` column (ISO text)
|
|
90
|
+
* - NEXUS: `nexus_nodes.indexed_at` column (ISO text)
|
|
91
|
+
* - TASKS: `tasks.created_at` / `sessions.started_at` column (ISO text)
|
|
92
|
+
* - CONDUIT: `messages.created_at` converted from UNIX epoch (INTEGER)
|
|
93
|
+
* - SIGNALDOCK: `agents.created_at` converted from UNIX epoch (INTEGER), or null
|
|
94
|
+
*/
|
|
95
|
+
createdAt: string | null;
|
|
96
|
+
/** Substrate-specific metadata (source row fields, opaque to super-graph callers). */
|
|
97
|
+
meta: Record<string, unknown>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* A directed edge between two nodes in the unified CLEO Brain graph.
|
|
101
|
+
*
|
|
102
|
+
* Both `source` and `target` reference `BrainNode.id` values
|
|
103
|
+
* (substrate-prefixed). Cross-substrate edges use `substrate: 'cross'`.
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* This type uses `source`/`target`/`type` field names (matching D3/Cosmograph
|
|
107
|
+
* conventions). The wire-format type `BrainEdgeWire` in `./operations/brain.ts`
|
|
108
|
+
* uses `from`/`to`/`kind` and is a separate concern.
|
|
109
|
+
*/
|
|
110
|
+
export interface BrainEdge {
|
|
111
|
+
/** Source node ID (substrate-prefixed, references {@link BrainNode.id}). */
|
|
112
|
+
source: string;
|
|
113
|
+
/** Target node ID (substrate-prefixed, references {@link BrainNode.id}). */
|
|
114
|
+
target: string;
|
|
115
|
+
/**
|
|
116
|
+
* Semantic edge type.
|
|
117
|
+
*
|
|
118
|
+
* In-substrate examples: `'supersedes'` | `'derived_from'` | `'calls'` | `'imports'`
|
|
119
|
+
* Cross-substrate examples: `'mentions'` | `'applies_to'` | `'authored_by'` | `'modified'`
|
|
120
|
+
*/
|
|
121
|
+
type: string;
|
|
122
|
+
/**
|
|
123
|
+
* Edge weight in `[0, 1]`. Higher = stronger / more confident.
|
|
124
|
+
*
|
|
125
|
+
* - BRAIN: `brain_page_edges.weight` (Hebbian/STDP-trained)
|
|
126
|
+
* - NEXUS: relation `confidence`
|
|
127
|
+
* - Others: `0.5` default
|
|
128
|
+
*/
|
|
129
|
+
weight: number;
|
|
130
|
+
/** Which substrate produced this edge, or `'cross'` for synthesized cross-substrate edges. */
|
|
131
|
+
substrate: BrainSubstrate | 'cross';
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Unified graph response returned by the Brain unified-graph API and the
|
|
135
|
+
* `getAllSubstrates` adapter in `@cleocode/brain`.
|
|
136
|
+
*
|
|
137
|
+
* - `nodes` / `edges`: combined projection across all requested substrates.
|
|
138
|
+
* - `counts`: per-substrate contribution breakdown.
|
|
139
|
+
* - `truncated`: `true` when results were capped by the `limit` parameter.
|
|
140
|
+
*/
|
|
141
|
+
export interface BrainGraph {
|
|
142
|
+
/** Merged, deduplicated nodes across all requested substrates. */
|
|
143
|
+
nodes: BrainNode[];
|
|
144
|
+
/** Directed edges (may reference stub nodes for cross-substrate targets). */
|
|
145
|
+
edges: BrainEdge[];
|
|
146
|
+
/** Per-substrate node/edge contribution counts. */
|
|
147
|
+
counts: {
|
|
148
|
+
/** Nodes contributed per substrate. */
|
|
149
|
+
nodes: Record<BrainSubstrate, number>;
|
|
150
|
+
/** Edges contributed per substrate (including `'cross'`). */
|
|
151
|
+
edges: Record<BrainSubstrate | 'cross', number>;
|
|
152
|
+
};
|
|
153
|
+
/** `true` when the response was capped by the node limit. */
|
|
154
|
+
truncated: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Minimum project context required by Brain substrate adapters to resolve
|
|
158
|
+
* per-project database paths.
|
|
159
|
+
*
|
|
160
|
+
* The studio's richer `ProjectContext` type carries additional fields
|
|
161
|
+
* (`projectId`, `name`, `brainDbExists`, etc.) and satisfies this interface
|
|
162
|
+
* via TypeScript structural typing.
|
|
163
|
+
*
|
|
164
|
+
* @remarks
|
|
165
|
+
* Defined here (rather than in `@cleocode/brain`) so that `BrainQueryOptions`
|
|
166
|
+
* can reference it without creating a circular dependency.
|
|
167
|
+
*/
|
|
168
|
+
export interface BrainProjectContext {
|
|
169
|
+
/** Absolute path to the project root. */
|
|
170
|
+
projectPath: string;
|
|
171
|
+
/** Absolute path to `brain.db` for this project. */
|
|
172
|
+
brainDbPath: string;
|
|
173
|
+
/** Absolute path to `tasks.db` for this project. */
|
|
174
|
+
tasksDbPath: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Query options forwarded from API route query parameters to substrate adapters.
|
|
178
|
+
*
|
|
179
|
+
* - `substrates`: filter to specific databases; omit for all five.
|
|
180
|
+
* - `limit`: cap on total node count (default 500, max 2000).
|
|
181
|
+
* - `minWeight`: excludes nodes/edges below this quality threshold.
|
|
182
|
+
* - `projectCtx`: resolves per-project DB paths; required for correct
|
|
183
|
+
* multi-project routing.
|
|
184
|
+
*/
|
|
185
|
+
export interface BrainQueryOptions {
|
|
186
|
+
/** Which substrates to include. Defaults to all five. */
|
|
187
|
+
substrates?: BrainSubstrate[];
|
|
188
|
+
/** Maximum number of nodes to return across all substrates. Default `500`. */
|
|
189
|
+
limit?: number;
|
|
190
|
+
/** Minimum quality/weight threshold for nodes and edges (0.0–1.0). Default `0`. */
|
|
191
|
+
minWeight?: number;
|
|
192
|
+
/**
|
|
193
|
+
* Active project context from `event.locals.projectCtx`.
|
|
194
|
+
* Per-project substrates (brain, tasks, conduit) use this to resolve DB paths.
|
|
195
|
+
* When absent, adapters fall back to the process-default paths.
|
|
196
|
+
*/
|
|
197
|
+
projectCtx?: BrainProjectContext;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Discriminated union of all SSE event payloads emitted by
|
|
201
|
+
* `GET /api/brain/stream`.
|
|
202
|
+
*
|
|
203
|
+
* Every variant carries a top-level `ts` field (ISO-8601 timestamp) so
|
|
204
|
+
* clients can sequence events even when they arrive out-of-order.
|
|
205
|
+
*
|
|
206
|
+
* - `hello` — sent immediately on connect; confirms the stream is live.
|
|
207
|
+
* - `heartbeat` — sent every 30 s to prevent connection timeout.
|
|
208
|
+
* - `node.create` — a new row was inserted into `brain_observations`.
|
|
209
|
+
* - `edge.strengthen` — a `brain_page_edges` row had its `weight` updated.
|
|
210
|
+
* - `task.status` — a `tasks` row changed its `status` column.
|
|
211
|
+
* - `message.send` — a new row was inserted into conduit messages.
|
|
212
|
+
*/
|
|
213
|
+
export type BrainStreamEvent = {
|
|
214
|
+
type: 'hello';
|
|
215
|
+
ts: string;
|
|
216
|
+
} | {
|
|
217
|
+
type: 'heartbeat';
|
|
218
|
+
ts: string;
|
|
219
|
+
} | {
|
|
220
|
+
type: 'node.create';
|
|
221
|
+
node: BrainNode;
|
|
222
|
+
ts: string;
|
|
223
|
+
} | {
|
|
224
|
+
type: 'edge.strengthen';
|
|
225
|
+
fromId: string;
|
|
226
|
+
toId: string;
|
|
227
|
+
edgeType: string;
|
|
228
|
+
weight: number;
|
|
229
|
+
ts: string;
|
|
230
|
+
} | {
|
|
231
|
+
type: 'task.status';
|
|
232
|
+
taskId: string;
|
|
233
|
+
status: string;
|
|
234
|
+
ts: string;
|
|
235
|
+
} | {
|
|
236
|
+
type: 'message.send';
|
|
237
|
+
messageId: string;
|
|
238
|
+
fromAgentId: string;
|
|
239
|
+
toAgentId: string;
|
|
240
|
+
preview: string;
|
|
241
|
+
ts: string;
|
|
242
|
+
};
|
|
243
|
+
/** Connection state for the SSE client subscription in the studio brain viewer. */
|
|
244
|
+
export type BrainConnectionStatus = 'connecting' | 'connected' | 'error' | 'disconnected';
|
|
245
|
+
//# sourceMappingURL=brain-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-graph.d.ts","sourceRoot":"","sources":["../src/brain-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,UAAU,GACV,SAAS,GACT,UAAU,GACV,MAAM,GACN,SAAS,GACT,QAAQ,GACR,MAAM,GACN,OAAO,GACP,SAAS,CAAC;AAEd;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAC;AAMpF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,SAAS;IACxB,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,IAAI,EAAE,aAAa,CAAC;IACpB,uBAAuB;IACvB,SAAS,EAAE,cAAc,CAAC;IAC1B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;OASG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAA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;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACpD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;CACZ,GACD;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACnE;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEN,mFAAmF;AACnF,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Brain unified-graph types.
|
|
3
|
+
*
|
|
4
|
+
* These are the **single source of truth** for `BrainNode`, `BrainEdge`,
|
|
5
|
+
* `BrainGraph`, and their supporting types across the entire CLEO monorepo.
|
|
6
|
+
*
|
|
7
|
+
* All other packages MUST import these types from `@cleocode/contracts`
|
|
8
|
+
* (or a relative path into this file) rather than defining their own copies.
|
|
9
|
+
* Runtime packages such as `@cleocode/brain` re-export these types directly
|
|
10
|
+
* so downstream consumers do not need to change their import path.
|
|
11
|
+
*
|
|
12
|
+
* ## Shape rationale
|
|
13
|
+
*
|
|
14
|
+
* The types here are the **runtime** shapes produced by the substrate
|
|
15
|
+
* adapters in `@cleocode/brain` and consumed by every graph renderer,
|
|
16
|
+
* SSE stream, and API route in `@cleocode/studio`. The wire-format
|
|
17
|
+
* operation contracts in `./operations/brain.ts` are intentionally distinct
|
|
18
|
+
* (they use `from`/`to`/`kind` field names and a separate `BrainSubstrateName`
|
|
19
|
+
* vocabulary) and are namespaced under `ops.*` to avoid collisions.
|
|
20
|
+
*
|
|
21
|
+
* @task T989 — canonical type unification (was split across packages/brain
|
|
22
|
+
* and packages/contracts/operations/brain)
|
|
23
|
+
* @task T973 — LB* → Brain* rename
|
|
24
|
+
* @task T969 — `@cleocode/brain` package extraction
|
|
25
|
+
* @see packages/brain/src/types.ts (re-exports from here for backwards compat)
|
|
26
|
+
* @see packages/contracts/src/operations/brain.ts (wire-format / ops contracts)
|
|
27
|
+
* @see docs/plans/brain-synaptic-visualization-research.md §5.2
|
|
28
|
+
*/
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=brain-graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-graph.js","sourceRoot":"","sources":["../src/brain-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branch-lock and owner-override authentication contracts for T1118.
|
|
3
|
+
*
|
|
4
|
+
* Defines types, error codes, and interfaces for the four-layer agent
|
|
5
|
+
* branch-protection system:
|
|
6
|
+
*
|
|
7
|
+
* - L1: Git worktree isolation per spawned agent
|
|
8
|
+
* - L2: cleo-git-shim binary on PATH for harness-agnostic enforcement
|
|
9
|
+
* - L3: Filesystem hardening via chmod (+ optional chattr on Linux)
|
|
10
|
+
* - L4: Owner-override HMAC session authentication with TTY + rate-limit gates
|
|
11
|
+
*
|
|
12
|
+
* @task T1118
|
|
13
|
+
* @adr ADR-055
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* State of an agent worktree created by orchestrate.spawn.
|
|
17
|
+
*
|
|
18
|
+
* @task T1118
|
|
19
|
+
* @task T1120
|
|
20
|
+
*/
|
|
21
|
+
export interface AgentWorktreeState {
|
|
22
|
+
/** Absolute path to the worktree directory. */
|
|
23
|
+
path: string;
|
|
24
|
+
/** Branch name (format: task/<taskId>). */
|
|
25
|
+
branch: string;
|
|
26
|
+
/** Task ID that owns this worktree. */
|
|
27
|
+
taskId: string;
|
|
28
|
+
/** Base ref the branch was created from (e.g. "main"). */
|
|
29
|
+
baseRef: string;
|
|
30
|
+
/** Project hash for env-var injection. */
|
|
31
|
+
projectHash: string;
|
|
32
|
+
/** ISO 8601 timestamp when the worktree was created. */
|
|
33
|
+
createdAt: string;
|
|
34
|
+
/** Whether git worktree lock was applied to this entry. */
|
|
35
|
+
locked: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Result of creating a worktree during spawn.
|
|
39
|
+
*
|
|
40
|
+
* @task T1118
|
|
41
|
+
* @task T1120
|
|
42
|
+
*/
|
|
43
|
+
export interface WorktreeSpawnResult {
|
|
44
|
+
/** The created worktree state. */
|
|
45
|
+
worktree: AgentWorktreeState;
|
|
46
|
+
/** Environment variables to inject into the agent's process. */
|
|
47
|
+
envVars: Record<string, string>;
|
|
48
|
+
/** CWD the agent MUST be started in. */
|
|
49
|
+
cwd: string;
|
|
50
|
+
/** Preamble text to prepend to the agent's spawn prompt. */
|
|
51
|
+
preamble: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Result from the orchestrate.worktree.complete operation.
|
|
55
|
+
*
|
|
56
|
+
* @task T1118
|
|
57
|
+
* @task T1120
|
|
58
|
+
*/
|
|
59
|
+
export interface WorktreeCompleteResult {
|
|
60
|
+
/** Task ID that was completed. */
|
|
61
|
+
taskId: string;
|
|
62
|
+
/** Whether the cherry-pick succeeded. */
|
|
63
|
+
cherryPicked: boolean;
|
|
64
|
+
/** Number of commits cherry-picked. */
|
|
65
|
+
commitCount: number;
|
|
66
|
+
/** Whether the worktree was removed. */
|
|
67
|
+
worktreeRemoved: boolean;
|
|
68
|
+
/** Whether the task branch was deleted. */
|
|
69
|
+
branchDeleted: boolean;
|
|
70
|
+
/** Error message if any step failed (non-fatal — caller decides). */
|
|
71
|
+
error?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Result from the orchestrate.worktree.cleanup operation.
|
|
75
|
+
*
|
|
76
|
+
* @task T1118
|
|
77
|
+
* @task T1120
|
|
78
|
+
*/
|
|
79
|
+
export interface WorktreeCleanupResult {
|
|
80
|
+
/** Number of stale worktrees removed. */
|
|
81
|
+
removed: number;
|
|
82
|
+
/** Paths that were removed. */
|
|
83
|
+
removedPaths: string[];
|
|
84
|
+
/** Paths that failed to remove (with reasons). */
|
|
85
|
+
errors: Array<{
|
|
86
|
+
path: string;
|
|
87
|
+
reason: string;
|
|
88
|
+
}>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Environment variables read by the cleo-git-shim binary.
|
|
92
|
+
*
|
|
93
|
+
* @task T1118
|
|
94
|
+
* @task T1121
|
|
95
|
+
*/
|
|
96
|
+
export interface GitShimEnv {
|
|
97
|
+
/** Agent role. When set to worker|lead|subagent, branch-mutating ops are blocked. */
|
|
98
|
+
CLEO_AGENT_ROLE?: 'orchestrator' | 'worker' | 'lead' | 'subagent';
|
|
99
|
+
/** When set to "1", bypass the branch-mutation denylist for one command. */
|
|
100
|
+
CLEO_ALLOW_BRANCH_OPS?: '1';
|
|
101
|
+
/** Worktree root path — informational for shim error messages. */
|
|
102
|
+
CLEO_WORKTREE_ROOT?: string;
|
|
103
|
+
/** Branch protection mode. */
|
|
104
|
+
CLEO_BRANCH_PROTECTION?: 'strict' | 'permissive' | 'off';
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A blocked git subcommand entry in the denylist.
|
|
108
|
+
*
|
|
109
|
+
* @task T1118
|
|
110
|
+
* @task T1121
|
|
111
|
+
*/
|
|
112
|
+
export interface DeniedGitOp {
|
|
113
|
+
/** The git subcommand (e.g. "checkout"). */
|
|
114
|
+
subcommand: string;
|
|
115
|
+
/** Optional flag that triggers the denial (e.g. "--hard" for reset). */
|
|
116
|
+
flag?: string;
|
|
117
|
+
/** Human-readable reason shown in the shim's stderr output. */
|
|
118
|
+
reason: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Platform capability report for filesystem hardening.
|
|
122
|
+
*
|
|
123
|
+
* @task T1118
|
|
124
|
+
* @task T1122
|
|
125
|
+
*/
|
|
126
|
+
export interface FsHardenCapabilities {
|
|
127
|
+
/** Whether chmod is available (always true on POSIX). */
|
|
128
|
+
chmod: boolean;
|
|
129
|
+
/** Whether chattr is available (Linux ext2/3/4/xfs only). */
|
|
130
|
+
chattr: boolean;
|
|
131
|
+
/** Whether chflags is available (macOS). */
|
|
132
|
+
chflags: boolean;
|
|
133
|
+
/** Detected platform. */
|
|
134
|
+
platform: 'linux' | 'macos' | 'windows' | 'wsl' | 'unknown';
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* State of the filesystem hard-lock for the orchestrator's HEAD.
|
|
138
|
+
*
|
|
139
|
+
* @task T1118
|
|
140
|
+
* @task T1122
|
|
141
|
+
*/
|
|
142
|
+
export interface FsHardenState {
|
|
143
|
+
/** Whether any lock is currently active. */
|
|
144
|
+
active: boolean;
|
|
145
|
+
/** Which mechanism was applied (chmod, chattr, or chflags). */
|
|
146
|
+
mechanism: 'chmod' | 'chattr' | 'chflags' | 'none';
|
|
147
|
+
/** Absolute path(s) that were locked. */
|
|
148
|
+
lockedPaths: string[];
|
|
149
|
+
/** ISO 8601 timestamp when the lock was applied. */
|
|
150
|
+
appliedAt?: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Record appended to force-bypass.jsonl when an override is used.
|
|
154
|
+
*
|
|
155
|
+
* Extends the base ForceBypassRecord with L4-specific authentication fields.
|
|
156
|
+
*
|
|
157
|
+
* @task T1118
|
|
158
|
+
* @task T1123
|
|
159
|
+
*/
|
|
160
|
+
export interface OwnerOverrideAuditRecord {
|
|
161
|
+
/** ISO 8601 timestamp. */
|
|
162
|
+
timestamp: string;
|
|
163
|
+
/** Task ID being verified (may be "*" for session-level). */
|
|
164
|
+
taskId: string;
|
|
165
|
+
/** Gate being bypassed. */
|
|
166
|
+
gate: string;
|
|
167
|
+
/** Write action performed. */
|
|
168
|
+
action: string;
|
|
169
|
+
/** Agent ID that performed the bypass. */
|
|
170
|
+
agent_id: string;
|
|
171
|
+
/** Session ID. */
|
|
172
|
+
session_id: string | null;
|
|
173
|
+
/** Whether the HMAC token was validated (L4a). */
|
|
174
|
+
token_validated: boolean;
|
|
175
|
+
/** Whether TTY was present (L4c). */
|
|
176
|
+
tty_present: boolean;
|
|
177
|
+
/** Override count within the current session (L4d). */
|
|
178
|
+
override_count: number;
|
|
179
|
+
/** Webhook delivery status (L4d). */
|
|
180
|
+
webhook_delivered?: boolean;
|
|
181
|
+
/** Reason supplied by the operator. */
|
|
182
|
+
reason: string;
|
|
183
|
+
/** Process ID. */
|
|
184
|
+
pid: number;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Configuration for the owner override system.
|
|
188
|
+
*
|
|
189
|
+
* @task T1118
|
|
190
|
+
* @task T1123
|
|
191
|
+
*/
|
|
192
|
+
export interface OwnerOverrideConfig {
|
|
193
|
+
/** Maximum number of overrides allowed per session (default: 3). */
|
|
194
|
+
maxPerSession: number;
|
|
195
|
+
/** Optional webhook URL to POST on each bypass. */
|
|
196
|
+
alertWebhook?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Error codes emitted by the branch-lock + override-auth system.
|
|
200
|
+
*
|
|
201
|
+
* @task T1118
|
|
202
|
+
*/
|
|
203
|
+
export declare const BRANCH_LOCK_ERROR_CODES: {
|
|
204
|
+
/** L2: git shim blocked a branch-mutating operation. */
|
|
205
|
+
readonly E_GIT_OP_BLOCKED: "E_GIT_OP_BLOCKED";
|
|
206
|
+
/** L1: spawn attempted without a worktree handle. */
|
|
207
|
+
readonly E_WORKTREE_REQUIRED: "E_WORKTREE_REQUIRED";
|
|
208
|
+
/** L1: worktree path does not exist or is not a valid git worktree. */
|
|
209
|
+
readonly E_WORKTREE_INVALID: "E_WORKTREE_INVALID";
|
|
210
|
+
/** L1: cherry-pick failed during worktree.complete. */
|
|
211
|
+
readonly E_CHERRY_PICK_FAILED: "E_CHERRY_PICK_FAILED";
|
|
212
|
+
/** L3: filesystem harden failed. */
|
|
213
|
+
readonly E_FS_HARDEN_FAILED: "E_FS_HARDEN_FAILED";
|
|
214
|
+
/** L4a: HMAC token invalid or missing. */
|
|
215
|
+
readonly E_OVERRIDE_TOKEN_INVALID: "E_OVERRIDE_TOKEN_INVALID";
|
|
216
|
+
/** L4b: caller has CLEO_AGENT_ROLE=worker|lead|subagent — override forbidden. */
|
|
217
|
+
readonly E_OVERRIDE_FORBIDDEN_AGENT_ROLE: "E_OVERRIDE_FORBIDDEN_AGENT_ROLE";
|
|
218
|
+
/** L4c: override requires TTY but stdin/stderr is not a TTY. */
|
|
219
|
+
readonly E_OVERRIDE_NEEDS_TTY: "E_OVERRIDE_NEEDS_TTY";
|
|
220
|
+
/** L4d: session override limit exceeded. */
|
|
221
|
+
readonly E_OVERRIDE_RATE_LIMIT: "E_OVERRIDE_RATE_LIMIT";
|
|
222
|
+
};
|
|
223
|
+
/** Union of all branch-lock error code strings. */
|
|
224
|
+
export type BranchLockErrorCode = (typeof BRANCH_LOCK_ERROR_CODES)[keyof typeof BRANCH_LOCK_ERROR_CODES];
|
|
225
|
+
//# sourceMappingURL=branch-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-lock.d.ts","sourceRo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AAM,CAAC;IACf,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,kDAAkD;IAClD,eAAe,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;IAClC,wDAAwD;;IAExD,qDAAqD;;IAErD,uEAAuE;;IAEvE,uDAAuD;;IAEvD,oCAAoC;;IAEpC,0CAA0C;;IAE1C,iFAAiF;;IAEjF,gEAAgE;;IAEhE,4CAA4C;;CAEpC,CAAC;AAEX,mDAAmD;AACnD,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branch-lock and owner-override authentication contracts for T1118.
|
|
3
|
+
*
|
|
4
|
+
* Defines types, error codes, and interfaces for the four-layer agent
|
|
5
|
+
* branch-protection system:
|
|
6
|
+
*
|
|
7
|
+
* - L1: Git worktree isolation per spawned agent
|
|
8
|
+
* - L2: cleo-git-shim binary on PATH for harness-agnostic enforcement
|
|
9
|
+
* - L3: Filesystem hardening via chmod (+ optional chattr on Linux)
|
|
10
|
+
* - L4: Owner-override HMAC session authentication with TTY + rate-limit gates
|
|
11
|
+
*
|
|
12
|
+
* @task T1118
|
|
13
|
+
* @adr ADR-055
|
|
14
|
+
*/
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// Error codes for branch-lock enforcement
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
/**
|
|
19
|
+
* Error codes emitted by the branch-lock + override-auth system.
|
|
20
|
+
*
|
|
21
|
+
* @task T1118
|
|
22
|
+
*/
|
|
23
|
+
export const BRANCH_LOCK_ERROR_CODES = {
|
|
24
|
+
/** L2: git shim blocked a branch-mutating operation. */
|
|
25
|
+
E_GIT_OP_BLOCKED: 'E_GIT_OP_BLOCKED',
|
|
26
|
+
/** L1: spawn attempted without a worktree handle. */
|
|
27
|
+
E_WORKTREE_REQUIRED: 'E_WORKTREE_REQUIRED',
|
|
28
|
+
/** L1: worktree path does not exist or is not a valid git worktree. */
|
|
29
|
+
E_WORKTREE_INVALID: 'E_WORKTREE_INVALID',
|
|
30
|
+
/** L1: cherry-pick failed during worktree.complete. */
|
|
31
|
+
E_CHERRY_PICK_FAILED: 'E_CHERRY_PICK_FAILED',
|
|
32
|
+
/** L3: filesystem harden failed. */
|
|
33
|
+
E_FS_HARDEN_FAILED: 'E_FS_HARDEN_FAILED',
|
|
34
|
+
/** L4a: HMAC token invalid or missing. */
|
|
35
|
+
E_OVERRIDE_TOKEN_INVALID: 'E_OVERRIDE_TOKEN_INVALID',
|
|
36
|
+
/** L4b: caller has CLEO_AGENT_ROLE=worker|lead|subagent — override forbidden. */
|
|
37
|
+
E_OVERRIDE_FORBIDDEN_AGENT_ROLE: 'E_OVERRIDE_FORBIDDEN_AGENT_ROLE',
|
|
38
|
+
/** L4c: override requires TTY but stdin/stderr is not a TTY. */
|
|
39
|
+
E_OVERRIDE_NEEDS_TTY: 'E_OVERRIDE_NEEDS_TTY',
|
|
40
|
+
/** L4d: session override limit exceeded. */
|
|
41
|
+
E_OVERRIDE_RATE_LIMIT: 'E_OVERRIDE_RATE_LIMIT',
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=branch-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch-lock.js","sourceRoot":"","sources":["../src/branch-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAgNH,8EAA8E;AAC9E,0CAA0C;AAC1C,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,wDAAwD;IACxD,gBAAgB,EAAE,kBAAkB;IACpC,qDAAqD;IACrD,mBAAmB,EAAE,qBAAqB;IAC1C,uEAAuE;IACvE,kBAAkB,EAAE,oBAAoB;IACxC,uDAAuD;IACvD,oBAAoB,EAAE,sBAAsB;IAC5C,oCAAoC;IACpC,kBAAkB,EAAE,oBAAoB;IACxC,0CAA0C;IAC1C,wBAAwB,EAAE,0BAA0B;IACpD,iFAAiF;IACjF,+BAA+B,EAAE,iCAAiC;IAClE,gEAAgE;IAChE,oBAAoB,EAAE,sBAAsB;IAC5C,4CAA4C;IAC5C,qBAAqB,EAAE,uBAAuB;CACtC,CAAC"}
|
package/dist/exit-codes.d.ts
CHANGED
package/dist/exit-codes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,oBAAY,QAAQ;IAElB,OAAO,IAAI;IAGX,aAAa,IAAI;IACjB,aAAa,IAAI;IACjB,UAAU,IAAI;IACd,SAAS,IAAI;IACb,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,YAAY,IAAI;IAChB,YAAY,IAAI;IAGhB,gBAAgB,KAAK;IACrB,cAAc,KAAK;IACnB,aAAa,KAAK;IAClB,mBAAmB,KAAK;IACxB,kBAAkB,KAAK;IACvB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;IACtB,qBAAqB,KAAK;IAG1B,qBAAqB,KAAK;IAC1B,aAAa,KAAK;IAClB,mBAAmB,KAAK;IACxB,4BAA4B,KAAK;IACjC,mBAAmB,KAAK;IAGxB,qBAAqB,KAAK;IAC1B,0BAA0B,KAAK;IAC/B,qBAAqB,KAAK;IAC1B,uBAAuB,KAAK;IAC5B,wBAAwB,KAAK;IAG7B,yBAAyB,KAAK;IAC9B,mBAAmB,KAAK;IACxB,iBAAiB,KAAK;IACtB,eAAe,KAAK;IACpB,mBAAmB,KAAK;IAGxB,iBAAiB,KAAK;IACtB,mBAAmB,KAAK;IACxB,mBAAmB,KAAK;IACxB,oBAAoB,KAAK;IACzB,sBAAsB,KAAK;IAG3B,OAAO,MAAM;IACb,cAAc,MAAM;IACpB,SAAS,MAAM;IACf,aAAa,MAAM;IAGnB;;;;;;;OAOG;IACH,cAAc,MAAM;CACrB;AAED,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEnD;AAED,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAErD;AAED,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEtD;AAED,gEAAgE;AAChE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CA0BzD;AAED,4CAA4C;AAC5C,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEtD"}
|
package/dist/exit-codes.js
CHANGED
|
@@ -102,7 +102,7 @@ export var ExitCode;
|
|
|
102
102
|
ExitCode[ExitCode["NEXUS_PROJECT_EXISTS"] = 76] = "NEXUS_PROJECT_EXISTS";
|
|
103
103
|
ExitCode[ExitCode["NEXUS_QUERY_FAILED"] = 77] = "NEXUS_QUERY_FAILED";
|
|
104
104
|
ExitCode[ExitCode["NEXUS_GRAPH_ERROR"] = 78] = "NEXUS_GRAPH_ERROR";
|
|
105
|
-
ExitCode[ExitCode["
|
|
105
|
+
ExitCode[ExitCode["NEXUS_IMPACT_CRITICAL"] = 79] = "NEXUS_IMPACT_CRITICAL";
|
|
106
106
|
// === LIFECYCLE ENFORCEMENT (80-84) ===
|
|
107
107
|
ExitCode[ExitCode["LIFECYCLE_GATE_FAILED"] = 80] = "LIFECYCLE_GATE_FAILED";
|
|
108
108
|
ExitCode[ExitCode["AUDIT_MISSING"] = 81] = "AUDIT_MISSING";
|
package/dist/exit-codes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAN,IAAY,QAqJX;AArJD,WAAY,QAAQ;IAClB,sBAAsB;IACtB,6CAAW,CAAA;IAEX,+BAA+B;IAC/B,yDAAiB,CAAA;IACjB,yDAAiB,CAAA;IACjB,mDAAc,CAAA;IACd,iDAAa,CAAA;IACb,+DAAoB,CAAA;IACpB,+DAAoB,CAAA;IACpB,uDAAgB,CAAA;IAChB,uDAAgB,CAAA;IAEhB,mCAAmC;IACnC,gEAAqB,CAAA;IACrB,4DAAmB,CAAA;IACnB,0DAAkB,CAAA;IAClB,sEAAwB,CAAA;IACxB,oEAAuB,CAAA;IACvB,8DAAoB,CAAA;IACpB,wDAAiB,CAAA;IACjB,4DAAmB,CAAA;IACnB,4DAAmB,CAAA;IACnB,4DAAmB,CAAA;IAEnB,qCAAqC;IACrC,kEAAsB,CAAA;IACtB,8EAA4B,CAAA;IAC5B,wDAAiB,CAAA;IAEjB,iCAAiC;IACjC,4DAAmB,CAAA;IACnB,kEAAsB,CAAA;IACtB,4DAAmB,CAAA;IACnB,0DAAkB,CAAA;IAClB,kEAAsB,CAAA;IACtB,wDAAiB,CAAA;IACjB,gEAAqB,CAAA;IACrB,0EAA0B,CAAA;IAC1B,wEAAyB,CAAA;IACzB,4DAAmB,CAAA;IA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B;QAC9B,QAAQ,CAAC,mBAAmB;QAC5B,QAAQ,CAAC,eAAe;QACxB,QAAQ,CAAC,eAAe;QACxB,QAAQ,CAAC,gBAAgB;QACzB,QAAQ,CAAC,iBAAiB;QAC1B,QAAQ,CAAC,aAAa;QACtB,QAAQ,CAAC,mBAAmB;QAC5B,QAAQ,CAAC,gBAAgB;QACzB,QAAQ,CAAC,uBAAuB;QAChC,QAAQ,CAAC,sBAAsB;QAC/B,QAAQ,CAAC,mBAAmB;QAC5B,QAAQ,CAAC,4BAA4B;QACrC,QAAQ,CAAC,qBAAqB;QAC9B,QAAQ,CAAC,wBAAwB;QACjC,QAAQ,CAAC,eAAe;KACzB,CAAC,CAAC;IAEH,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACrC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,eAAe,CAAC,IAAc;IAC5C,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;AACrC,CAAC"}
|
package/dist/graph.d.ts
CHANGED
|
@@ -66,6 +66,8 @@ export interface GraphNode {
|
|
|
66
66
|
processIds?: string[];
|
|
67
67
|
/** Kind-specific metadata blob (matches nexus_nodes.meta_json). */
|
|
68
68
|
meta?: Record<string, unknown>;
|
|
69
|
+
/** Whether this node represents an external module (unresolved import). */
|
|
70
|
+
isExternal?: boolean;
|
|
69
71
|
}
|
|
70
72
|
/**
|
|
71
73
|
* A directed relationship between two nodes in the code intelligence graph.
|
package/dist/graph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAErB,MAAM,GACN,QAAQ,GAER,QAAQ,GACR,WAAW,GAEX,UAA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