wicked-core-ts 0.5.0 → 0.6.1
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 +112 -0
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -25,6 +25,20 @@ export interface LaunchOptions {
|
|
|
25
25
|
* is data-driven from the def's phases; omit for the free-text planner.
|
|
26
26
|
*/
|
|
27
27
|
workflow?: string
|
|
28
|
+
/**
|
|
29
|
+
* The project to file this run into (DES-PROJECT-001). The `crew.run` membership is attached
|
|
30
|
+
* ATOMICALLY with the launch record (one store batch); an unknown or archived project rejects
|
|
31
|
+
* the launch with no session persisted. Omit for an unfiled run (the synthesized `default`).
|
|
32
|
+
*/
|
|
33
|
+
projectId?: string
|
|
34
|
+
/**
|
|
35
|
+
* ADDITIONAL absolute write roots for the run's deliverables (core#259) — e.g. an inbox dir
|
|
36
|
+
* the workflow contract names as the output destination. Widens the governed units'
|
|
37
|
+
* filesystem boundary by exactly these roots, after the unit cwd. Each root must be absolute
|
|
38
|
+
* and outside the engine's config/pin tree — an invalid root REJECTS the launch with no
|
|
39
|
+
* session persisted. Omit for runs that deliver inside their own workdir.
|
|
40
|
+
*/
|
|
41
|
+
extraWriteRoots?: Array<string>
|
|
28
42
|
}
|
|
29
43
|
/**
|
|
30
44
|
* A handle to a wicked-core runtime. Construct with [`Core::spawn`] (production engine: real
|
|
@@ -117,6 +131,12 @@ export declare class Core {
|
|
|
117
131
|
* token. Safe whether the run is executing or paused.
|
|
118
132
|
*/
|
|
119
133
|
cancelRun(runId: string): Promise<string>
|
|
134
|
+
/**
|
|
135
|
+
* Resolve a pending ACP elicitation. `action` must be `"accept"`, `"decline"`, or `"cancel"`;
|
|
136
|
+
* `response` is the human's typed/selected value as a JSON-typed value — pass `null` for
|
|
137
|
+
* `decline`/`cancel`. Resolves to `"ok"` on success, rejects if no matching elicitation exists.
|
|
138
|
+
*/
|
|
139
|
+
resolveElicitation(runId: string, elicitationId: string, action: string, response?: any | undefined | null): Promise<string>
|
|
120
140
|
/** The agent session ids currently on the store, as a JSON array of strings. */
|
|
121
141
|
sessions(): Promise<string>
|
|
122
142
|
/**
|
|
@@ -148,6 +168,80 @@ export declare class Core {
|
|
|
148
168
|
registerRepo(name: string, rootPath: string): Promise<string>
|
|
149
169
|
/** List every registered repository, as a JSON array of `RepoEntry` objects. */
|
|
150
170
|
listRepos(): Promise<string>
|
|
171
|
+
/**
|
|
172
|
+
* Create a project. Resolves to the persisted `Project` as a JSON object
|
|
173
|
+
* (`{ id, name, description, status, scope, created_at, updated_at }`). Rejects on an
|
|
174
|
+
* empty/overlong name or a name already used by an ACTIVE project (the API's 409).
|
|
175
|
+
*/
|
|
176
|
+
projectCreate(name: string, description?: string | undefined | null): Promise<string>
|
|
177
|
+
/**
|
|
178
|
+
* Rename / describe / archive / restore a project (`status`: `active` | `archived`;
|
|
179
|
+
* `description: ""` clears it). Resolves to the updated `Project` JSON. Rejects for the
|
|
180
|
+
* synthesized `default` project or an unknown id.
|
|
181
|
+
*/
|
|
182
|
+
projectUpdate(id: string, name?: string | undefined | null, description?: string | undefined | null, status?: string | undefined | null): Promise<string>
|
|
183
|
+
/**
|
|
184
|
+
* Every project on the store (all statuses — the caller filters), newest first, as a JSON
|
|
185
|
+
* array of `Project` objects. The synthesized `default` project is an API-layer concept and
|
|
186
|
+
* is NOT in this list.
|
|
187
|
+
*/
|
|
188
|
+
projectList(): Promise<string>
|
|
189
|
+
/** One project by id, as a JSON `Project` object — or the JSON literal `null` when unknown. */
|
|
190
|
+
projectGet(id: string): Promise<string>
|
|
191
|
+
/**
|
|
192
|
+
* The LIVE members of a project, oldest attach first, as a JSON array of `ProjectMember`
|
|
193
|
+
* objects (`{ id, project_id, member_kind, member_ref, meta, attached_at, attached_by }`).
|
|
194
|
+
*/
|
|
195
|
+
projectMembers(projectId: string): Promise<string>
|
|
196
|
+
/**
|
|
197
|
+
* Attach a member (`memberKind` is the open `<product>.<noun>` grammar, e.g. `crew.run`,
|
|
198
|
+
* `interactive.doc`; `metaJson` is opaque JSON text; `attachedBy` ∈ studio|interactive|cli|api).
|
|
199
|
+
* Idempotent on `(project, kind, ref)`. Resolves to `{ "member": ProjectMember, "created":
|
|
200
|
+
* boolean }` — emit the membership.attached event only when `created` is true.
|
|
201
|
+
*/
|
|
202
|
+
projectMemberAttach(projectId: string, memberKind: string, memberRef: string, metaJson?: string | undefined | null, attachedBy?: string | undefined | null): Promise<string>
|
|
203
|
+
/**
|
|
204
|
+
* Detach a member. Resolves to `"true"` when a live membership was removed, `"false"` when
|
|
205
|
+
* no such live member exists on that project (the caller answers 404). Detaching never
|
|
206
|
+
* touches the member's own data (the run, the doc dir).
|
|
207
|
+
*/
|
|
208
|
+
projectMemberDetach(projectId: string, memberId: string): Promise<string>
|
|
209
|
+
/**
|
|
210
|
+
* The project ids holding a live membership for `(memberKind, memberRef)` — the reverse read
|
|
211
|
+
* (run → projects) the daemon uses to tag frames and synthesize the `default` project. JSON
|
|
212
|
+
* array of strings.
|
|
213
|
+
*/
|
|
214
|
+
memberProjects(memberKind: string, memberRef: string): Promise<string>
|
|
215
|
+
/**
|
|
216
|
+
* Durable interaction requests (DES-PROJECT-001 §5.3), newest first, optionally filtered by
|
|
217
|
+
* run and/or status (`open` | `answered` | `expired` | `cancelled`). JSON array of
|
|
218
|
+
* `{ id, session_id, kind, ord, reviewing_ord, prompt, status, answer, created_at,
|
|
219
|
+
* resolved_at }`. This is the durable truth the daemon's gate/elicitation caches demote to
|
|
220
|
+
* latency layers over — it survives a daemon restart because the actor wrote it in the same
|
|
221
|
+
* batch as the run's `awaiting_human` transition.
|
|
222
|
+
*/
|
|
223
|
+
interactionRequests(sessionId?: string | undefined | null, status?: string | undefined | null): Promise<string>
|
|
224
|
+
/**
|
|
225
|
+
* Capture an episodic memory at `scope` (STRICT `kind:id[/kind:id...]` path; `""` = root —
|
|
226
|
+
* a malformed segment REJECTS rather than silently re-rooting). Resolves to `"ok"`.
|
|
227
|
+
*/
|
|
228
|
+
captureMemory(content: string, scope: string): Promise<string>
|
|
229
|
+
/**
|
|
230
|
+
* LIST memories within `scope`'s subtree (strict path; `""` = all), newest first, up to
|
|
231
|
+
* `limit`. JSON array of `{ content, score, tier }`. `listMemories("project:<id>", …).length
|
|
232
|
+
* > 0` is the cheap "does this project have a record?" probe (the ADR's memory.coverage).
|
|
233
|
+
*/
|
|
234
|
+
listMemories(scope: string, limit: number): Promise<string>
|
|
235
|
+
/**
|
|
236
|
+
* Ingest a document (title + chunks) into the knowledge store. `chunksJson` is a JSON array
|
|
237
|
+
* of strings. Resolves to the ingested chunk count as a JSON number.
|
|
238
|
+
*/
|
|
239
|
+
ingestKnowledge(title: string, chunksJson: string): Promise<string>
|
|
240
|
+
/**
|
|
241
|
+
* Recall up to `k` knowledge chunks relevant to `query`. JSON array of
|
|
242
|
+
* `{ content, score, source }`.
|
|
243
|
+
*/
|
|
244
|
+
recallKnowledge(query: string, k: number): Promise<string>
|
|
151
245
|
/** All registered governance policies, as a JSON array of `Policy` objects. */
|
|
152
246
|
listPolicies(): Promise<string>
|
|
153
247
|
/** All conformance rules on the store (Pattern + Policy types), as a JSON array. */
|
|
@@ -210,6 +304,24 @@ export declare class Core {
|
|
|
210
304
|
* never blocks the single-writer actor.
|
|
211
305
|
*/
|
|
212
306
|
getCoverageReport(): Promise<string>
|
|
307
|
+
/**
|
|
308
|
+
* Coverage for ONE registered repo, computed over that repo's OWN code graph — not the daemon's
|
|
309
|
+
* bookkeeping store (FINDING-009). `get_coverage_report` above reads `self.db_path` (the daemon
|
|
310
|
+
* `core.db`), which holds run/governance nodes but none of a repo's domain/requirement nodes, so
|
|
311
|
+
* it reports a vacuous `coverage: 1.0` over an empty denominator and cannot name a repo. This
|
|
312
|
+
* resolves the repo from the registry, opens its `code_graph_db` (`<root>/.codegraph/estate.db`,
|
|
313
|
+
* the one spelling every consumer shares), and recomputes over it. An unknown `repo_ref` is an
|
|
314
|
+
* ERROR, never a silent vacuous report — the caller must name a real repo.
|
|
315
|
+
* Resolves to the coverage report as a JSON string (`ts_return_type` pins it — the crew adapter
|
|
316
|
+
* used to cast away an `unknown` here; #225 review).
|
|
317
|
+
*/
|
|
318
|
+
getCoverageReportForRepo(repoRef: string): Promise<string>
|
|
319
|
+
/**
|
|
320
|
+
* Node-count-by-kind summary of ONE registered repo's code graph, over that repo's OWN store
|
|
321
|
+
* (#122). Resolves to a JSON string: an array of `{ "kind": string, "count": number }`,
|
|
322
|
+
* kind-sorted. An unknown `repo_ref` REJECTS — never a silent empty summary.
|
|
323
|
+
*/
|
|
324
|
+
getGraphKindsForRepo(repoRef: string): Promise<string>
|
|
213
325
|
/**
|
|
214
326
|
* Open a PTY terminal session running `cmd` (or the login shell if omitted) in `cwd`, sized
|
|
215
327
|
* `cols`x`rows`. `governed=false` is a loud, opt-in UNGOVERNED operator shell that bypasses the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-core-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
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.6.1",
|
|
45
|
+
"wicked-core-ts-darwin-x64": "0.6.1",
|
|
46
|
+
"wicked-core-ts-linux-arm64-gnu": "0.6.1",
|
|
47
|
+
"wicked-core-ts-linux-x64-gnu": "0.6.1",
|
|
48
|
+
"wicked-core-ts-win32-x64-msvc": "0.6.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@napi-rs/cli": "^2.18.4"
|