@north-light/crouter-api 0.3.208 → 0.3.209
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/api/client.d.ts +3 -1
- package/dist/api/client.js +4 -0
- package/dist/api/dto/broker-ops.d.ts +2 -12
- package/dist/api/dto/nodes.d.ts +16 -0
- package/dist/api/routes.d.ts +1 -0
- package/dist/api/routes.js +1 -0
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DaemonRestartDTO, HealthDTO, StatusDTO } from './dto/health.js';
|
|
2
2
|
import type { BashJobStatusDTO, BashJobStopResultDTO } from './dto/bash-jobs.js';
|
|
3
|
-
import type { ArtifactListDTO, ArtifactsQuery, ContextListDTO, CreateNodeRequest, ListNodesQuery, NodeDetailDTO, NodeMessagesPageDTO, NodeMessagesQuery, NodeSessionDTO, NodeSnapshotDTO, NodeSummaryDTO, TranscriptDTO, TranscriptQuery } from './dto/nodes.js';
|
|
3
|
+
import type { ArtifactListDTO, ArtifactsQuery, ContextListDTO, CreateNodeRequest, ListNodesQuery, NodeDetailDTO, NodeMessagesPageDTO, NodeMessagesQuery, NodeSessionDTO, NodeSnapshotDTO, NodeSubjectDTO, NodeSummaryDTO, TranscriptDTO, TranscriptQuery } from './dto/nodes.js';
|
|
4
4
|
import type { InterruptResultDTO, MessageResultDTO, SendMessageRequest } from './dto/messages.js';
|
|
5
5
|
import type { PushReportRequest, PushReportResultDTO, ReportDTO, ReportsQuery } from './dto/reports.js';
|
|
6
6
|
import type { CloseRequest, CloseResultDTO, PromoteRequest, RelaunchRootResultDTO, ReviveRequest, ReviveResultDTO, WaitRequest, YieldRequest } from './dto/lifecycle.js';
|
|
@@ -143,6 +143,8 @@ export declare class CrtrClient {
|
|
|
143
143
|
getReports(id: string, q?: ReportsQuery): Promise<ReportDTO[]>;
|
|
144
144
|
getTranscript(id: string, q?: TranscriptQuery): Promise<TranscriptDTO>;
|
|
145
145
|
getSnapshot(id: string): Promise<NodeSnapshotDTO>;
|
|
146
|
+
/** The node-config subject substrate gates evaluate against. */
|
|
147
|
+
nodeSubject(id: string): Promise<NodeSubjectDTO>;
|
|
146
148
|
getNodeMessages(id: string, q?: NodeMessagesQuery): Promise<NodeMessagesPageDTO>;
|
|
147
149
|
/** The node's conversation exactly as it ran — raw `.jsonl` bytes plus the
|
|
148
150
|
* assembled system prompt. For exports; `getSnapshot` is for renderers. */
|
package/dist/api/client.js
CHANGED
|
@@ -253,6 +253,10 @@ export class CrtrClient {
|
|
|
253
253
|
getSnapshot(id) {
|
|
254
254
|
return this.request('GET', routes.nodeSnapshot(this.nodePath(id)));
|
|
255
255
|
}
|
|
256
|
+
/** The node-config subject substrate gates evaluate against. */
|
|
257
|
+
nodeSubject(id) {
|
|
258
|
+
return this.request('GET', routes.nodeSubject(this.nodePath(id)));
|
|
259
|
+
}
|
|
256
260
|
getNodeMessages(id, q) {
|
|
257
261
|
return this.request('GET', withQuery(routes.nodeMessages(this.nodePath(id)), q));
|
|
258
262
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExitIntentDTO, NodeStatusDTO } from './common.js';
|
|
2
|
+
import type { NodeSubjectDTO } from './nodes.js';
|
|
2
3
|
/** `POST /v1/nodes/{id}/broker/session-bound` body. Pi's session-start reason
|
|
3
4
|
* distinguishes an ordinary boot/resume from `/new`, whose child-side session
|
|
4
5
|
* reset is a different durable operation. `reviewBoundaryIds` reports only the
|
|
@@ -95,18 +96,7 @@ export interface BrokerExtensionNodeDTO {
|
|
|
95
96
|
};
|
|
96
97
|
created: string;
|
|
97
98
|
}
|
|
98
|
-
export
|
|
99
|
-
kind: string;
|
|
100
|
-
mode: 'base' | 'orchestrator';
|
|
101
|
-
lifecycle: 'terminal' | 'resident';
|
|
102
|
-
hasManager: boolean;
|
|
103
|
-
cwd: string;
|
|
104
|
-
scope: 'user' | 'project';
|
|
105
|
-
orchestration: {
|
|
106
|
-
depth: number;
|
|
107
|
-
};
|
|
108
|
-
profile: string | null;
|
|
109
|
-
}
|
|
99
|
+
export type BrokerExtensionSubjectDTO = NodeSubjectDTO;
|
|
110
100
|
/** One resolved report sender. Report contents stay broker-local filesystem
|
|
111
101
|
* data; this daemon projection supplies only existence and display metadata. */
|
|
112
102
|
export interface BrokerReportNodeDTO {
|
package/dist/api/dto/nodes.d.ts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import type { Cursor, ExitIntentDTO, IsoTime, LifecycleDTO, ModeDTO, NodeIdDTO, NodeStatusDTO } from './common.js';
|
|
2
|
+
/** `GET /v1/nodes/{id}/subject` — the node-config subject substrate gate
|
|
3
|
+
* predicates evaluate against. Mirrors `NodeConfigSubject`; this narrow
|
|
4
|
+
* endpoint exists so a CLI process (the `memory read` leaf) can gate-check
|
|
5
|
+
* docs without reaching canvas state. */
|
|
6
|
+
export interface NodeSubjectDTO {
|
|
7
|
+
kind: string;
|
|
8
|
+
mode: ModeDTO;
|
|
9
|
+
lifecycle: LifecycleDTO;
|
|
10
|
+
hasManager: boolean;
|
|
11
|
+
cwd: string;
|
|
12
|
+
scope: 'user' | 'project';
|
|
13
|
+
orchestration: {
|
|
14
|
+
depth: number;
|
|
15
|
+
};
|
|
16
|
+
profile: string | null;
|
|
17
|
+
}
|
|
2
18
|
/** `POST /v1/nodes` body. Carries the full immediate spawn recipe. */
|
|
3
19
|
export interface CreateNodeRequest {
|
|
4
20
|
kind: string;
|
package/dist/api/routes.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const routes: {
|
|
|
9
9
|
readonly reviveAll: () => string;
|
|
10
10
|
readonly node: (id: string) => string;
|
|
11
11
|
readonly nodeSnapshot: (id: string) => string;
|
|
12
|
+
readonly nodeSubject: (id: string) => string;
|
|
12
13
|
readonly nodeSession: (id: string) => string;
|
|
13
14
|
readonly nodeTranscript: (id: string) => string;
|
|
14
15
|
readonly nodeContext: (id: string) => string;
|
package/dist/api/routes.js
CHANGED
|
@@ -25,6 +25,7 @@ export const routes = {
|
|
|
25
25
|
node: (id) => `${V}/nodes/${id}`,
|
|
26
26
|
// Node reads
|
|
27
27
|
nodeSnapshot: (id) => `${V}/nodes/${id}/snapshot`,
|
|
28
|
+
nodeSubject: (id) => `${V}/nodes/${id}/subject`,
|
|
28
29
|
nodeSession: (id) => `${V}/nodes/${id}/session`,
|
|
29
30
|
nodeTranscript: (id) => `${V}/nodes/${id}/transcript`,
|
|
30
31
|
nodeContext: (id) => `${V}/nodes/${id}/context`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/crouter-api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.209",
|
|
4
4
|
"description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, and the CrtrClient. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/api/index.js",
|