wicked-crew-api-types 0.126.0 → 0.128.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 +118 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -282,6 +282,11 @@ export interface HealthCapabilities {
|
|
|
282
282
|
* older daemon — read as `'required'`.
|
|
283
283
|
*/
|
|
284
284
|
qeAcceptance?: 'required' | 'off';
|
|
285
|
+
/**
|
|
286
|
+
* (api-types 0.128.0) `LaunchRunBody.primary` is accepted: a launch may name the seat that leads
|
|
287
|
+
* the run. ABSENT on an older daemon — do not send the field (its strict schema 400s on it).
|
|
288
|
+
*/
|
|
289
|
+
launchPrimary?: boolean;
|
|
285
290
|
}
|
|
286
291
|
|
|
287
292
|
/** One `GET /health.warnings[]` entry (additive; wicked-core#411 / wicked-crew#497). */
|
|
@@ -4746,6 +4751,15 @@ export interface LaunchRunBody {
|
|
|
4746
4751
|
problem: string;
|
|
4747
4752
|
sessionId?: string;
|
|
4748
4753
|
clisJson?: string;
|
|
4754
|
+
/**
|
|
4755
|
+
* (api-types 0.128.0; DES-TEAMING-002 §8.1) The seat that LEADS the run (the primary agent, PA):
|
|
4756
|
+
* a seat key from the launch roster (`clisJson`, else the daemon's default roster). The PA owns
|
|
4757
|
+
* every step not marked `owner: "team"`. Omitted: the engine picks one at random among the
|
|
4758
|
+
* eligible seats; either way the choice is recorded as `wicked.team.path.started.selection`
|
|
4759
|
+
* (`"chosen"` | `"random"`). A key that is not in the roster, or names a signed-out seat, is a 400.
|
|
4760
|
+
* Send only when `GET /health.capabilities.launchPrimary === true`.
|
|
4761
|
+
*/
|
|
4762
|
+
primary?: string;
|
|
4749
4763
|
entityMode?: EntityMode;
|
|
4750
4764
|
humanConfirm?: string;
|
|
4751
4765
|
repoRef?: string;
|
|
@@ -10081,7 +10095,11 @@ export interface McpSecretResponse {
|
|
|
10081
10095
|
/** `POST /mcp/call`: what the garden shim sends. `token` is the worker's `WICKED_MCP_TOKEN`. */
|
|
10082
10096
|
export interface McpCallBody {
|
|
10083
10097
|
token: string;
|
|
10084
|
-
/**
|
|
10098
|
+
/**
|
|
10099
|
+
* `mcp:<server>/<tool>`. The server name `estate` is reserved (wicked-core#1018): `mcp:estate/<tool>`
|
|
10100
|
+
* is the estate relay, a container seat's way to its run's estate (the read-only graph, memory,
|
|
10101
|
+
* knowledge and rules lookups, and `proposal.submit`), scoped by the daemon to the token's run.
|
|
10102
|
+
*/
|
|
10085
10103
|
subject: string;
|
|
10086
10104
|
/** The tool's arguments (a JSON object); absent = `{}`. */
|
|
10087
10105
|
args?: Record<string, unknown>;
|
|
@@ -10118,7 +10136,11 @@ export interface McpCallResponse {
|
|
|
10118
10136
|
subject: string;
|
|
10119
10137
|
/** The call record's span id (`GET /mcp/usage` and the run's Governance panel resolve it). */
|
|
10120
10138
|
callId: string | null;
|
|
10121
|
-
/**
|
|
10139
|
+
/**
|
|
10140
|
+
* The scrubbed `tools/call` result — only when `outcome` is `ok`. For `mcp:estate/<tool>`, a
|
|
10141
|
+
* JSON-RPC error estate answered (e.g. `-32602`, fix the arguments) is a tool error that keeps
|
|
10142
|
+
* its code: `{ content, isError: true, rpcError: { code, message } }`.
|
|
10143
|
+
*/
|
|
10122
10144
|
result?: Record<string, unknown>;
|
|
10123
10145
|
/** The rules or gates that decided (deny, ask, withheld). */
|
|
10124
10146
|
ruleIds: string[];
|
|
@@ -11125,3 +11147,97 @@ export interface McpInspectLogResponse {
|
|
|
11125
11147
|
state: McpInspectState;
|
|
11126
11148
|
error: string | null;
|
|
11127
11149
|
}
|
|
11150
|
+
|
|
11151
|
+
// ── Global search (`GET /search`; api-types 0.127.0) ─────────────────────────────────────────────
|
|
11152
|
+
//
|
|
11153
|
+
// One query over every major entity the daemon can read, answered grouped by type, ranked, with a
|
|
11154
|
+
// snippet per hit. The daemon keeps an in-memory text index it builds lazily on the first search
|
|
11155
|
+
// (off the request path) and keeps current from its own writes and engine frames. A query never
|
|
11156
|
+
// holds the event loop: it yields while it scans, stops at a hard time budget (`partial: true`)
|
|
11157
|
+
// and stops early when the client disconnects (a superseded query).
|
|
11158
|
+
|
|
11159
|
+
/** The searchable entity types, in the order the daemon answers them. */
|
|
11160
|
+
export type SearchType = 'run' | 'project' | 'repo' | 'transcript' | 'rule' | 'memory' | 'doc';
|
|
11161
|
+
|
|
11162
|
+
/** A half-open `[start, end)` UTF-16 range of matched text inside a hit's `title` or `snippet`. */
|
|
11163
|
+
export type SearchSpan = [number, number];
|
|
11164
|
+
|
|
11165
|
+
/** Where a hit opens. A skin maps each kind to its own address. */
|
|
11166
|
+
export type SearchTarget =
|
|
11167
|
+
| { kind: 'run'; run_id: string; chat_id: string | null }
|
|
11168
|
+
| { kind: 'project'; project_id: string }
|
|
11169
|
+
| { kind: 'repo'; repo_id: string }
|
|
11170
|
+
/** A chat's transcript (a live chat: chat transcripts are kept only while the chat is open). */
|
|
11171
|
+
| { kind: 'chat'; chat_id: string }
|
|
11172
|
+
/** One unit's captured output (its transcript) inside a run. */
|
|
11173
|
+
| { kind: 'unit'; run_id: string; ord: number; chat_id: string | null }
|
|
11174
|
+
| { kind: 'rule'; rule_id: string; steering_type: string | null }
|
|
11175
|
+
| { kind: 'memory'; memory_id: string; scope: string }
|
|
11176
|
+
| { kind: 'doc'; project_id: string; doc: string };
|
|
11177
|
+
|
|
11178
|
+
export interface SearchHit {
|
|
11179
|
+
type: SearchType;
|
|
11180
|
+
/** Unique within `type`. */
|
|
11181
|
+
id: string;
|
|
11182
|
+
title: string;
|
|
11183
|
+
/** The matched ranges in `title`. */
|
|
11184
|
+
title_spans: SearchSpan[];
|
|
11185
|
+
/** A short window of the matched body text (whitespace collapsed, `…` where cut); `null` when the hit has no body. */
|
|
11186
|
+
snippet: string | null;
|
|
11187
|
+
snippet_spans: SearchSpan[];
|
|
11188
|
+
/** Higher is better; comparable only within one group. */
|
|
11189
|
+
score: number;
|
|
11190
|
+
/** Unix MILLIS of the entity's last known change, when the daemon knows it. */
|
|
11191
|
+
updated_at: number | null;
|
|
11192
|
+
project_id: string | null;
|
|
11193
|
+
/** The entity's own state word where it has one (a run's status, `retired`, `archived`), else `null`. */
|
|
11194
|
+
status: string | null;
|
|
11195
|
+
target: SearchTarget;
|
|
11196
|
+
}
|
|
11197
|
+
|
|
11198
|
+
export interface SearchGroup {
|
|
11199
|
+
type: SearchType;
|
|
11200
|
+
/** Every match the query found in this type (a lower bound when `partial`). */
|
|
11201
|
+
total: number;
|
|
11202
|
+
/** This page, best first. */
|
|
11203
|
+
hits: SearchHit[];
|
|
11204
|
+
/** Pass back as `cursor` (with `types=<this type>`) for the next page; `null` on the last page. */
|
|
11205
|
+
next_cursor: string | null;
|
|
11206
|
+
}
|
|
11207
|
+
|
|
11208
|
+
/**
|
|
11209
|
+
* How much of a type the index holds. `indexing`: the first read of that source is still running
|
|
11210
|
+
* (search again shortly); `unavailable`: the source could not be read (`note` says why), so the
|
|
11211
|
+
* type was not searched.
|
|
11212
|
+
*/
|
|
11213
|
+
export interface SearchSourceState {
|
|
11214
|
+
type: SearchType;
|
|
11215
|
+
state: 'ready' | 'indexing' | 'unavailable';
|
|
11216
|
+
/** Entities of this type the index holds. */
|
|
11217
|
+
indexed: number;
|
|
11218
|
+
note: string | null;
|
|
11219
|
+
}
|
|
11220
|
+
|
|
11221
|
+
/**
|
|
11222
|
+
* `GET /search?q=&types=&limit=&cursor=` → 200.
|
|
11223
|
+
*
|
|
11224
|
+
* - `q` (required, 2–256 chars after trimming): words (each must match, case-insensitive, anywhere
|
|
11225
|
+
* in a title or body) and `"quoted phrases"`. 400 when missing, too short or too long.
|
|
11226
|
+
* - `types`: comma-separated `SearchType`s (default every type). 400 on an unknown type.
|
|
11227
|
+
* - `limit`: hits per group, 1–50 (default 5).
|
|
11228
|
+
* - `cursor`: a group's `next_cursor`; needs exactly one type in `types` (400 otherwise).
|
|
11229
|
+
*
|
|
11230
|
+
* Unit transcripts are indexed from a capped head and tail of each output (the full output stays at
|
|
11231
|
+
* `GET /runs/:id/units/:unit/output`); the oldest transcripts leave the index first when its text
|
|
11232
|
+
* budget is full.
|
|
11233
|
+
*/
|
|
11234
|
+
export interface SearchResponse {
|
|
11235
|
+
query: string;
|
|
11236
|
+
/** One group per searched type with at least one hit, in `SearchType` order. */
|
|
11237
|
+
groups: SearchGroup[];
|
|
11238
|
+
/** One row per requested type. */
|
|
11239
|
+
sources: SearchSourceState[];
|
|
11240
|
+
/** The time budget ran out before every type was scanned: totals are lower bounds. */
|
|
11241
|
+
partial: boolean;
|
|
11242
|
+
took_ms: number;
|
|
11243
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-crew-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.128.0",
|
|
4
4
|
"description": "The wire contract of the wicked-crew daemon's /api/v1 REST surface and /ws CoreEvent frames \u2014 types only, zero runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./index.d.ts",
|