@north-light/crouter-api 0.3.200 → 0.3.202
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 +2 -1
- package/dist/api/client.js +3 -0
- package/dist/api/dto/inbox.d.ts +1 -1
- package/dist/api/dto/nodes.d.ts +16 -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, NodeSessionDTO, NodeSnapshotDTO, NodeSummaryDTO, TranscriptDTO, TranscriptQuery } from './dto/nodes.js';
|
|
3
|
+
import type { ArtifactListDTO, ArtifactsQuery, ContextListDTO, CreateNodeRequest, ListNodesQuery, NodeDetailDTO, NodeMessagesPageDTO, NodeMessagesQuery, NodeSessionDTO, NodeSnapshotDTO, 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,7 @@ 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
|
+
getNodeMessages(id: string, q?: NodeMessagesQuery): Promise<NodeMessagesPageDTO>;
|
|
146
147
|
/** The node's conversation exactly as it ran — raw `.jsonl` bytes plus the
|
|
147
148
|
* assembled system prompt. For exports; `getSnapshot` is for renderers. */
|
|
148
149
|
getSession(id: string): Promise<NodeSessionDTO>;
|
package/dist/api/client.js
CHANGED
|
@@ -253,6 +253,9 @@ export class CrtrClient {
|
|
|
253
253
|
getSnapshot(id) {
|
|
254
254
|
return this.request('GET', routes.nodeSnapshot(this.nodePath(id)));
|
|
255
255
|
}
|
|
256
|
+
getNodeMessages(id, q) {
|
|
257
|
+
return this.request('GET', withQuery(routes.nodeMessages(this.nodePath(id)), q));
|
|
258
|
+
}
|
|
256
259
|
/** The node's conversation exactly as it ran — raw `.jsonl` bytes plus the
|
|
257
260
|
* assembled system prompt. For exports; `getSnapshot` is for renderers. */
|
|
258
261
|
getSession(id) {
|
package/dist/api/dto/inbox.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface PageTicketSummaryDTO {
|
|
|
30
30
|
source: TicketSourceDTO;
|
|
31
31
|
slot_kinds: string[];
|
|
32
32
|
awaits_response: boolean;
|
|
33
|
-
state
|
|
33
|
+
state: 'pending' | 'resolved' | 'canceled' | 'passive';
|
|
34
34
|
/** Present only on resolved history entries; the stored one-line answer digest. */
|
|
35
35
|
answer_digest?: string;
|
|
36
36
|
}
|
package/dist/api/dto/nodes.d.ts
CHANGED
|
@@ -175,6 +175,22 @@ export interface NodeSnapshotDTO {
|
|
|
175
175
|
}[];
|
|
176
176
|
captured_at: IsoTime;
|
|
177
177
|
}
|
|
178
|
+
/** `GET /v1/nodes/{id}/messages` query. `cursor` walks backward from the
|
|
179
|
+
* newest messages; each returned page remains chronological. */
|
|
180
|
+
export interface NodeMessagesQuery {
|
|
181
|
+
cursor?: Cursor;
|
|
182
|
+
limit?: number;
|
|
183
|
+
}
|
|
184
|
+
/** `GET /v1/nodes/{id}/messages` — a backward-paged window over the node's
|
|
185
|
+
* cycle-flattened visible history. */
|
|
186
|
+
export interface NodeMessagesPageDTO {
|
|
187
|
+
node_id: NodeIdDTO;
|
|
188
|
+
/** pi AgentMessage[] JSON, chronological ascending within this page. */
|
|
189
|
+
messages: unknown[];
|
|
190
|
+
/** Opaque cursor toward older messages; null at the start of the session. */
|
|
191
|
+
next_cursor: Cursor | null;
|
|
192
|
+
captured_at: IsoTime;
|
|
193
|
+
}
|
|
178
194
|
/** `GET /v1/nodes/{id}/session` — the node's conversation exactly as it ran:
|
|
179
195
|
* the raw session `.jsonl` bytes plus the assembled system prompt. Unlike
|
|
180
196
|
* `NodeSnapshotDTO` nothing is reconstructed or flattened, so every
|
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.202",
|
|
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",
|