wicked-core-ts 0.3.0 → 0.4.0
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/index.d.ts +54 -1
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -75,7 +75,25 @@ export declare class Core {
|
|
|
75
75
|
chatSend(chatId: string, text: string, targetsJson?: string | undefined | null, cwd?: string | undefined | null): Promise<string>
|
|
76
76
|
/** The seats currently warm for a chat — JSON array of cli keys. */
|
|
77
77
|
chatSeats(chatId: string): Promise<string>
|
|
78
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Every chat currently holding pool state — JSON array of
|
|
80
|
+
* `[{chatId, seats, idleSecs}]`, sorted by id.
|
|
81
|
+
*
|
|
82
|
+
* Each warm seat pins an ACP bridge plus an agent child (~520 MB resident) and clients mint
|
|
83
|
+
* chat ids freely, so without this an accumulation is invisible until the host runs out of
|
|
84
|
+
* memory (FINDING-027). `idleSecs` is seconds since the chat's last open/ensure/turn, or
|
|
85
|
+
* `null` when no activity was ever recorded — which the reaper treats as idle-since-forever.
|
|
86
|
+
*
|
|
87
|
+
* `null` rather than the `u64::MAX` the Rust side uses for that case: a JS `number` is an
|
|
88
|
+
* f64, so `u64::MAX` arrives as `18446744073709552000` and no consumer can test for the
|
|
89
|
+
* sentinel by equality. `null` is checkable, and it stops a caller from doing arithmetic on a
|
|
90
|
+
* value that never meant a duration.
|
|
91
|
+
*/
|
|
92
|
+
chatList(): Promise<string>
|
|
93
|
+
/**
|
|
94
|
+
* Close a chat's warm sessions (idempotent); emits
|
|
95
|
+
* `chatClosed` with `reason: "requested"`.
|
|
96
|
+
*/
|
|
79
97
|
chatClose(chatId: string): Promise<string>
|
|
80
98
|
/**
|
|
81
99
|
* Launch an interactive, resumable run: plans + distributes, then executes each unit off-thread
|
|
@@ -108,6 +126,21 @@ export declare class Core {
|
|
|
108
126
|
sessionsDetail(): Promise<string>
|
|
109
127
|
/** A unit's captured work output (transcript), as a JSON value — a string, or `null` if none. */
|
|
110
128
|
workOutput(unitId: string): Promise<string>
|
|
129
|
+
/**
|
|
130
|
+
* A run's recorded event history, oldest first, as a JSON array. Each entry is the SAME tagged
|
|
131
|
+
* object the `/ws` stream carries ([`CoreEvent::to_json`]) plus a capture-time `ts` (epoch millis)
|
|
132
|
+
* and an ordering `seq`.
|
|
133
|
+
*
|
|
134
|
+
* The read half of FINDING-014: an evidence bundle assembled after a run must read what actually
|
|
135
|
+
* happened rather than re-derive pseudo-events from unit records, which cannot recover what it
|
|
136
|
+
* never saw and invents its own type names doing it. Because the log and the socket serialize
|
|
137
|
+
* through one mapping, an event named here is the event named live.
|
|
138
|
+
*
|
|
139
|
+
* Empty array for an unknown run, one that emitted nothing, or one predating the log — an absent
|
|
140
|
+
* history is not an error. Streaming chunk events (`cliOutputDelta`, `chatDelta`,
|
|
141
|
+
* `terminalOutput`, `heartbeat`) are excluded by design.
|
|
142
|
+
*/
|
|
143
|
+
runEvents(runId: string): Promise<string>
|
|
111
144
|
/**
|
|
112
145
|
* Register a git repository the orchestrator can run within. Validates it is a git repo with
|
|
113
146
|
* ≥1 commit; resolves to the persisted `RepoEntry` as a JSON object.
|
|
@@ -134,6 +167,26 @@ export declare class Core {
|
|
|
134
167
|
* Validates server-side (INV-C1/C2/C4). Idempotent on stable id.
|
|
135
168
|
*/
|
|
136
169
|
upsertConformanceRule(ruleJson: string): Promise<string>
|
|
170
|
+
/**
|
|
171
|
+
* Withdraw a governance policy from enforcement (FINDING-038 — governance state was otherwise
|
|
172
|
+
* append-only, so a mis-authored policy denied forever).
|
|
173
|
+
*
|
|
174
|
+
* Retire, not delete: the node stays readable so a past decision citing this id can still be
|
|
175
|
+
* explained, but SELECT stops returning it, so it can never decide another gate.
|
|
176
|
+
*
|
|
177
|
+
* Resolves to a JSON-encoded boolean: the four characters `true` if a policy with that id
|
|
178
|
+
* existed, the five characters `false` if none did. Like every method here it hands JS a
|
|
179
|
+
* `Promise<string>` carrying JSON, so it must be `JSON.parse`d — a bare truthiness test
|
|
180
|
+
* passes on BOTH values and would read a miss as a hit, losing exactly the 200-vs-404
|
|
181
|
+
* distinction this return value exists to carry.
|
|
182
|
+
*/
|
|
183
|
+
retirePolicy(id: string): Promise<string>
|
|
184
|
+
/**
|
|
185
|
+
* Withdraw a conformance rule from recall. Same retire-not-delete contract as
|
|
186
|
+
* [`Core::retire_policy`], and the same JSON-encoded `true`/`false` reply that must be
|
|
187
|
+
* parsed rather than tested for truthiness.
|
|
188
|
+
*/
|
|
189
|
+
retireConformanceRule(id: string): Promise<string>
|
|
137
190
|
/**
|
|
138
191
|
* Register (or replace) a workflow definition in the actor's runtime registry. `json` is a
|
|
139
192
|
* JSON-serialised `WorkflowDef` object (fields: id, description, phases — see the wicked-core
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-core-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Node/TypeScript bindings (napi-rs) for wicked-core: drive the in-process orchestration engine from JS/TS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"smoke:all": "node smoke.mjs && node smoke-lifecycle.mjs && node smoke-terminal.mjs"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"wicked-core-ts-darwin-arm64": "0.
|
|
45
|
-
"wicked-core-ts-darwin-x64": "0.
|
|
46
|
-
"wicked-core-ts-linux-arm64-gnu": "0.
|
|
47
|
-
"wicked-core-ts-linux-x64-gnu": "0.
|
|
48
|
-
"wicked-core-ts-win32-x64-msvc": "0.
|
|
44
|
+
"wicked-core-ts-darwin-arm64": "0.4.0",
|
|
45
|
+
"wicked-core-ts-darwin-x64": "0.4.0",
|
|
46
|
+
"wicked-core-ts-linux-arm64-gnu": "0.4.0",
|
|
47
|
+
"wicked-core-ts-linux-x64-gnu": "0.4.0",
|
|
48
|
+
"wicked-core-ts-win32-x64-msvc": "0.4.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@napi-rs/cli": "^2.18.4"
|