@north-light/crouter-api 0.3.175 → 0.3.177
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/client.d.ts +4 -4
- package/dist/client.js +2 -2
- package/dist/dto/lifecycle.d.ts +1 -1
- package/dist/dto/nodes.d.ts +7 -1
- package/dist/dto/profiles.d.ts +3 -0
- package/dist/dto/reports.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface CrtrClientOptions {
|
|
|
33
33
|
* autostart is on; after it resolves, the client polls `/healthz` and retries
|
|
34
34
|
* the original request once. Absent → a cold socket throws `daemon_unavailable`. */
|
|
35
35
|
onColdSocket?: () => Promise<void>;
|
|
36
|
-
/** Injected cold-start diagnostic
|
|
36
|
+
/** Injected cold-start diagnostic. Called ONLY when the bounded
|
|
37
37
|
* `/healthz` poll times out after `onColdSocket`, so the caller can attach
|
|
38
38
|
* operator-useful context (e.g. a bounded tail of crtrd's stderr log) to the
|
|
39
39
|
* `daemon_unavailable` error instead of it staying a bare message. Must
|
|
@@ -43,7 +43,7 @@ export interface CrtrClientOptions {
|
|
|
43
43
|
/** Bounded window (ms) to poll `/healthz` after `onColdSocket` resolves
|
|
44
44
|
* before giving up with `daemon_unavailable`. Defaults to
|
|
45
45
|
* `HEALTHZ_POLL_WINDOW_MS`. This must NOT silently drift from whatever
|
|
46
|
-
* window actually governs "did the daemon start"
|
|
46
|
+
* window actually governs "did the daemon start":
|
|
47
47
|
* `onColdSocket` is fire-and-forget, so this poll is the ONLY deadline that
|
|
48
48
|
* determines whether the CLI reports success. A caller whose `onColdSocket`
|
|
49
49
|
* hook triggers a differently-windowed startup verifier (e.g. the CLI's
|
|
@@ -253,8 +253,8 @@ export declare class CrtrClient {
|
|
|
253
253
|
private handleColdSocket;
|
|
254
254
|
}
|
|
255
255
|
/** Compose the cold-start `/healthz`-timeout `daemon_unavailable` message,
|
|
256
|
-
* appending the injected diagnostic
|
|
257
|
-
*
|
|
256
|
+
* appending the injected diagnostic when one is present instead of discarding
|
|
257
|
+
* the real startup failure behind a bare message. Exported (not
|
|
258
258
|
* from the package's public `index.ts` surface, which is dependency-light by
|
|
259
259
|
* design) purely so the regression test can assert the composition without
|
|
260
260
|
* waiting out the real poll window. */
|
package/dist/client.js
CHANGED
|
@@ -655,8 +655,8 @@ function sleep(ms) {
|
|
|
655
655
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
656
656
|
}
|
|
657
657
|
/** Compose the cold-start `/healthz`-timeout `daemon_unavailable` message,
|
|
658
|
-
* appending the injected diagnostic
|
|
659
|
-
*
|
|
658
|
+
* appending the injected diagnostic when one is present instead of discarding
|
|
659
|
+
* the real startup failure behind a bare message. Exported (not
|
|
660
660
|
* from the package's public `index.ts` surface, which is dependency-light by
|
|
661
661
|
* design) purely so the regression test can assert the composition without
|
|
662
662
|
* waiting out the real poll window. */
|
package/dist/dto/lifecycle.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { NodeIdDTO, NodeStatusDTO } from './common.js';
|
|
|
3
3
|
export interface ReviveRequest {
|
|
4
4
|
/** Resume the saved conversation (true) vs a fresh launch (false). */
|
|
5
5
|
resume?: boolean;
|
|
6
|
-
/** Clear the finalization latch before reviving (
|
|
6
|
+
/** Clear the finalization latch before reviving (the `--reopen` gate). The
|
|
7
7
|
* latch clear is a canvas write, so the gate is enforced server-side: with
|
|
8
8
|
* `reopen:false` (default) a finalized node is REJECTED (`node_finalized`);
|
|
9
9
|
* with `reopen:true` a node that is NOT finalized is rejected
|
package/dist/dto/nodes.d.ts
CHANGED
|
@@ -5,7 +5,13 @@ export interface CreateNodeRequest {
|
|
|
5
5
|
prompt?: string;
|
|
6
6
|
profile?: string;
|
|
7
7
|
mode?: ModeDTO;
|
|
8
|
+
/** The DIRECTORY CONTEXT the create came from — not necessarily where the
|
|
9
|
+
* node lands. It is what the daemon selects a profile from when the request
|
|
10
|
+
* neither names one nor inherits one from a parent. */
|
|
8
11
|
cwd?: string;
|
|
12
|
+
/** Pin the node to this exact directory, overriding the profile home a node
|
|
13
|
+
* otherwise runs in. See `crtr node new --cwd`. */
|
|
14
|
+
pin_cwd?: string;
|
|
9
15
|
/** Display name (tmux window + resume picker). Defaults to the kind. */
|
|
10
16
|
name?: string;
|
|
11
17
|
parent?: NodeIdDTO | null;
|
|
@@ -22,7 +28,7 @@ export interface CreateNodeRequest {
|
|
|
22
28
|
* HTTP 409 `node_id_exists`). See `crtr node new --node-id`. */
|
|
23
29
|
node_id?: string;
|
|
24
30
|
/** Serve this create from the warm pool when a pre-booted spare matches the
|
|
25
|
-
* request's frozen launch tuple (kind, mode, cwd, profile, model,
|
|
31
|
+
* request's frozen launch tuple (kind, mode, resolved cwd, profile, model,
|
|
26
32
|
* situational_context) — answering in milliseconds instead of waiting out a
|
|
27
33
|
* full engine boot. Only a bare root with no kickoff qualifies; anything the
|
|
28
34
|
* pool cannot honor (or an empty pool) falls back to an ordinary cold spawn,
|
package/dist/dto/profiles.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export interface ProfileDTO {
|
|
|
9
9
|
id: string;
|
|
10
10
|
name: string;
|
|
11
11
|
projects: string[];
|
|
12
|
+
/** Where nodes under this profile run — one of `projects` (the first unless
|
|
13
|
+
* re-pointed), or null when the profile owns none. */
|
|
14
|
+
home: string | null;
|
|
12
15
|
/** The directory this profile is pinned as default for, if any. */
|
|
13
16
|
default_dir?: string | null;
|
|
14
17
|
}
|
package/dist/dto/reports.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface PushReportResultDTO {
|
|
|
20
20
|
/** Present (and true) only for a `final` push whose reporting node owned a
|
|
21
21
|
* managed worktree with zero commits ahead of its base and no uncommitted
|
|
22
22
|
* changes: the server auto-dropped it instead of blocking on `node worktree
|
|
23
|
-
* close
|
|
23
|
+
* close`. A worktree with real unlanded work instead blocks with
|
|
24
24
|
* an `open_managed_worktree` error. */
|
|
25
25
|
worktree_auto_dropped?: boolean;
|
|
26
26
|
/** Present only alongside `worktree_auto_dropped`: the checkout path dropped. */
|
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.177",
|
|
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/index.js",
|