wicked-core-ts 0.4.1 → 0.6.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 +98 -0
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -25,6 +25,12 @@ 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
|
|
28
34
|
}
|
|
29
35
|
/**
|
|
30
36
|
* A handle to a wicked-core runtime. Construct with [`Core::spawn`] (production engine: real
|
|
@@ -148,6 +154,80 @@ export declare class Core {
|
|
|
148
154
|
registerRepo(name: string, rootPath: string): Promise<string>
|
|
149
155
|
/** List every registered repository, as a JSON array of `RepoEntry` objects. */
|
|
150
156
|
listRepos(): Promise<string>
|
|
157
|
+
/**
|
|
158
|
+
* Create a project. Resolves to the persisted `Project` as a JSON object
|
|
159
|
+
* (`{ id, name, description, status, scope, created_at, updated_at }`). Rejects on an
|
|
160
|
+
* empty/overlong name or a name already used by an ACTIVE project (the API's 409).
|
|
161
|
+
*/
|
|
162
|
+
projectCreate(name: string, description?: string | undefined | null): Promise<string>
|
|
163
|
+
/**
|
|
164
|
+
* Rename / describe / archive / restore a project (`status`: `active` | `archived`;
|
|
165
|
+
* `description: ""` clears it). Resolves to the updated `Project` JSON. Rejects for the
|
|
166
|
+
* synthesized `default` project or an unknown id.
|
|
167
|
+
*/
|
|
168
|
+
projectUpdate(id: string, name?: string | undefined | null, description?: string | undefined | null, status?: string | undefined | null): Promise<string>
|
|
169
|
+
/**
|
|
170
|
+
* Every project on the store (all statuses — the caller filters), newest first, as a JSON
|
|
171
|
+
* array of `Project` objects. The synthesized `default` project is an API-layer concept and
|
|
172
|
+
* is NOT in this list.
|
|
173
|
+
*/
|
|
174
|
+
projectList(): Promise<string>
|
|
175
|
+
/** One project by id, as a JSON `Project` object — or the JSON literal `null` when unknown. */
|
|
176
|
+
projectGet(id: string): Promise<string>
|
|
177
|
+
/**
|
|
178
|
+
* The LIVE members of a project, oldest attach first, as a JSON array of `ProjectMember`
|
|
179
|
+
* objects (`{ id, project_id, member_kind, member_ref, meta, attached_at, attached_by }`).
|
|
180
|
+
*/
|
|
181
|
+
projectMembers(projectId: string): Promise<string>
|
|
182
|
+
/**
|
|
183
|
+
* Attach a member (`memberKind` is the open `<product>.<noun>` grammar, e.g. `crew.run`,
|
|
184
|
+
* `interactive.doc`; `metaJson` is opaque JSON text; `attachedBy` ∈ studio|interactive|cli|api).
|
|
185
|
+
* Idempotent on `(project, kind, ref)`. Resolves to `{ "member": ProjectMember, "created":
|
|
186
|
+
* boolean }` — emit the membership.attached event only when `created` is true.
|
|
187
|
+
*/
|
|
188
|
+
projectMemberAttach(projectId: string, memberKind: string, memberRef: string, metaJson?: string | undefined | null, attachedBy?: string | undefined | null): Promise<string>
|
|
189
|
+
/**
|
|
190
|
+
* Detach a member. Resolves to `"true"` when a live membership was removed, `"false"` when
|
|
191
|
+
* no such live member exists on that project (the caller answers 404). Detaching never
|
|
192
|
+
* touches the member's own data (the run, the doc dir).
|
|
193
|
+
*/
|
|
194
|
+
projectMemberDetach(projectId: string, memberId: string): Promise<string>
|
|
195
|
+
/**
|
|
196
|
+
* The project ids holding a live membership for `(memberKind, memberRef)` — the reverse read
|
|
197
|
+
* (run → projects) the daemon uses to tag frames and synthesize the `default` project. JSON
|
|
198
|
+
* array of strings.
|
|
199
|
+
*/
|
|
200
|
+
memberProjects(memberKind: string, memberRef: string): Promise<string>
|
|
201
|
+
/**
|
|
202
|
+
* Durable interaction requests (DES-PROJECT-001 §5.3), newest first, optionally filtered by
|
|
203
|
+
* run and/or status (`open` | `answered` | `expired` | `cancelled`). JSON array of
|
|
204
|
+
* `{ id, session_id, kind, ord, reviewing_ord, prompt, status, answer, created_at,
|
|
205
|
+
* resolved_at }`. This is the durable truth the daemon's gate/elicitation caches demote to
|
|
206
|
+
* latency layers over — it survives a daemon restart because the actor wrote it in the same
|
|
207
|
+
* batch as the run's `awaiting_human` transition.
|
|
208
|
+
*/
|
|
209
|
+
interactionRequests(sessionId?: string | undefined | null, status?: string | undefined | null): Promise<string>
|
|
210
|
+
/**
|
|
211
|
+
* Capture an episodic memory at `scope` (STRICT `kind:id[/kind:id...]` path; `""` = root —
|
|
212
|
+
* a malformed segment REJECTS rather than silently re-rooting). Resolves to `"ok"`.
|
|
213
|
+
*/
|
|
214
|
+
captureMemory(content: string, scope: string): Promise<string>
|
|
215
|
+
/**
|
|
216
|
+
* LIST memories within `scope`'s subtree (strict path; `""` = all), newest first, up to
|
|
217
|
+
* `limit`. JSON array of `{ content, score, tier }`. `listMemories("project:<id>", …).length
|
|
218
|
+
* > 0` is the cheap "does this project have a record?" probe (the ADR's memory.coverage).
|
|
219
|
+
*/
|
|
220
|
+
listMemories(scope: string, limit: number): Promise<string>
|
|
221
|
+
/**
|
|
222
|
+
* Ingest a document (title + chunks) into the knowledge store. `chunksJson` is a JSON array
|
|
223
|
+
* of strings. Resolves to the ingested chunk count as a JSON number.
|
|
224
|
+
*/
|
|
225
|
+
ingestKnowledge(title: string, chunksJson: string): Promise<string>
|
|
226
|
+
/**
|
|
227
|
+
* Recall up to `k` knowledge chunks relevant to `query`. JSON array of
|
|
228
|
+
* `{ content, score, source }`.
|
|
229
|
+
*/
|
|
230
|
+
recallKnowledge(query: string, k: number): Promise<string>
|
|
151
231
|
/** All registered governance policies, as a JSON array of `Policy` objects. */
|
|
152
232
|
listPolicies(): Promise<string>
|
|
153
233
|
/** All conformance rules on the store (Pattern + Policy types), as a JSON array. */
|
|
@@ -210,6 +290,24 @@ export declare class Core {
|
|
|
210
290
|
* never blocks the single-writer actor.
|
|
211
291
|
*/
|
|
212
292
|
getCoverageReport(): Promise<string>
|
|
293
|
+
/**
|
|
294
|
+
* Coverage for ONE registered repo, computed over that repo's OWN code graph — not the daemon's
|
|
295
|
+
* bookkeeping store (FINDING-009). `get_coverage_report` above reads `self.db_path` (the daemon
|
|
296
|
+
* `core.db`), which holds run/governance nodes but none of a repo's domain/requirement nodes, so
|
|
297
|
+
* it reports a vacuous `coverage: 1.0` over an empty denominator and cannot name a repo. This
|
|
298
|
+
* resolves the repo from the registry, opens its `code_graph_db` (`<root>/.codegraph/estate.db`,
|
|
299
|
+
* the one spelling every consumer shares), and recomputes over it. An unknown `repo_ref` is an
|
|
300
|
+
* ERROR, never a silent vacuous report — the caller must name a real repo.
|
|
301
|
+
* Resolves to the coverage report as a JSON string (`ts_return_type` pins it — the crew adapter
|
|
302
|
+
* used to cast away an `unknown` here; #225 review).
|
|
303
|
+
*/
|
|
304
|
+
getCoverageReportForRepo(repoRef: string): Promise<string>
|
|
305
|
+
/**
|
|
306
|
+
* Node-count-by-kind summary of ONE registered repo's code graph, over that repo's OWN store
|
|
307
|
+
* (#122). Resolves to a JSON string: an array of `{ "kind": string, "count": number }`,
|
|
308
|
+
* kind-sorted. An unknown `repo_ref` REJECTS — never a silent empty summary.
|
|
309
|
+
*/
|
|
310
|
+
getGraphKindsForRepo(repoRef: string): Promise<string>
|
|
213
311
|
/**
|
|
214
312
|
* Open a PTY terminal session running `cmd` (or the login shell if omitted) in `cwd`, sized
|
|
215
313
|
* `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.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.6.0",
|
|
45
|
+
"wicked-core-ts-darwin-x64": "0.6.0",
|
|
46
|
+
"wicked-core-ts-linux-arm64-gnu": "0.6.0",
|
|
47
|
+
"wicked-core-ts-linux-x64-gnu": "0.6.0",
|
|
48
|
+
"wicked-core-ts-win32-x64-msvc": "0.6.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@napi-rs/cli": "^2.18.4"
|