@deepstrike/core 0.1.15 → 0.2.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 +11 -104
- package/package.json +8 -8
package/index.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export interface ToolResult {
|
|
|
37
37
|
callId: string
|
|
38
38
|
output: string
|
|
39
39
|
isError: boolean
|
|
40
|
+
isFatal?: boolean
|
|
41
|
+
errorKind?: string
|
|
40
42
|
tokenCount?: number
|
|
41
43
|
}
|
|
42
44
|
export interface ToolSchema {
|
|
@@ -134,31 +136,6 @@ export interface RenderedContext {
|
|
|
134
136
|
*/
|
|
135
137
|
turns: Array<Message>
|
|
136
138
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Discriminated union. Inspect `kind`:
|
|
139
|
-
* - `"call_llm"` → `context` (RenderedContext), `tools`
|
|
140
|
-
* - `"execute_tools"` → `calls`
|
|
141
|
-
* - `"done"` → `result`
|
|
142
|
-
*/
|
|
143
|
-
export interface LoopAction {
|
|
144
|
-
kind: string
|
|
145
|
-
context?: RenderedContext
|
|
146
|
-
tools?: Array<ToolSchema>
|
|
147
|
-
calls?: Array<ToolCall>
|
|
148
|
-
result?: LoopResult
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Discriminated union for observations:
|
|
152
|
-
* - `"compressed"` → `action`, `rho_after`
|
|
153
|
-
* - `"renewed"` → `sprint`
|
|
154
|
-
*/
|
|
155
|
-
export interface LoopObservation {
|
|
156
|
-
kind: string
|
|
157
|
-
action?: string
|
|
158
|
-
rhoAfter?: number
|
|
159
|
-
/** Sprint number after renewal. Set when `kind === "renewed"`. */
|
|
160
|
-
sprint?: number
|
|
161
|
-
}
|
|
162
139
|
/**
|
|
163
140
|
* Format a VerificationContract as a markdown string suitable for injection
|
|
164
141
|
* into an agent's system prompt. The returned string is ready to pass to
|
|
@@ -257,89 +234,19 @@ export interface EvalPipelineAction {
|
|
|
257
234
|
details?: Array<CriterionResult>
|
|
258
235
|
skillCandidate?: SkillCandidate
|
|
259
236
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
pressure(): number
|
|
266
|
-
totalTokens(): number
|
|
267
|
-
/**
|
|
268
|
-
* Run compression at the level the current pressure recommends.
|
|
269
|
-
* Returns tokens saved.
|
|
270
|
-
*/
|
|
271
|
-
compress(): number
|
|
272
|
-
render(): RenderedContext
|
|
273
|
-
/**
|
|
274
|
-
* Replace the available-skills set with frontmatter-only metadata.
|
|
275
|
-
* The kernel will auto-inject the `skill` meta-tool into every `CallLLM` action.
|
|
276
|
-
*/
|
|
277
|
-
setAvailableSkills(skills: Array<SkillMetadata>): void
|
|
278
|
-
}
|
|
279
|
-
export declare class LoopStateMachine {
|
|
237
|
+
/**
|
|
238
|
+
* Versioned kernel ABI runtime. Accepts/returns JSON encoded
|
|
239
|
+
* `KernelInput`/`KernelStep` payloads from deepstrike-core.
|
|
240
|
+
*/
|
|
241
|
+
export declare class KernelRuntime {
|
|
280
242
|
constructor(policy: LoopPolicy)
|
|
281
|
-
|
|
282
|
-
* Convenience: register skills directly on the state machine without
|
|
283
|
-
* reaching into the inner ContextEngine.
|
|
284
|
-
*/
|
|
285
|
-
setAvailableSkills(skills: Array<SkillMetadata>): void
|
|
286
|
-
/**
|
|
287
|
-
* Enable the `memory` meta-tool. Call with `true` when a DreamStore and agentId
|
|
288
|
-
* are configured — the SDK layer intercepts `memory` tool calls and runs the search.
|
|
289
|
-
*/
|
|
290
|
-
setMemoryEnabled(enabled: boolean): void
|
|
291
|
-
/**
|
|
292
|
-
* Enable the `knowledge` meta-tool. Call with `true` when a KnowledgeSource
|
|
293
|
-
* is configured — the SDK layer intercepts `knowledge` tool calls and runs retrieval.
|
|
294
|
-
*/
|
|
295
|
-
setKnowledgeEnabled(enabled: boolean): void
|
|
296
|
-
/**
|
|
297
|
-
* Prepend a system-level instruction to the context. Must be called before `start`.
|
|
298
|
-
* `tokens` is a caller-supplied estimate (use `content.length / 4` if unsure).
|
|
299
|
-
* The renderer skips messages with `tokens == 0`, so always pass at least 1.
|
|
300
|
-
*/
|
|
301
|
-
addSystemMessage(content: string, tokens: number): void
|
|
302
|
-
/**
|
|
303
|
-
* Pre-populate the memory partition with a long-term memory snippet.
|
|
304
|
-
* Must be called before `start`. Use for seeding known context from past sessions.
|
|
305
|
-
* `tokens` is a caller-supplied estimate; pass at least 1.
|
|
306
|
-
*/
|
|
307
|
-
addMemoryMessage(content: string, tokens: number): void
|
|
308
|
-
/**
|
|
309
|
-
* Pre-populate the history partition with a prior transcript message.
|
|
310
|
-
* Must be called before `start`.
|
|
311
|
-
*/
|
|
312
|
-
addHistoryMessage(message: Message, tokens: number): void
|
|
313
|
-
/**
|
|
314
|
-
* Inject a VerificationContract into the system partition.
|
|
315
|
-
* The contract is formatted as markdown and pushed to the `system` partition
|
|
316
|
-
* (Priority::Critical) so it survives context renewal and compression.
|
|
317
|
-
* Call before `start()`.
|
|
318
|
-
*/
|
|
319
|
-
setContract(contract: VerificationContract): void
|
|
320
|
-
setTools(tools: Array<ToolSchema>): void
|
|
321
|
-
start(task: RuntimeTask): LoopAction
|
|
322
|
-
feedLlmResponse(message: Message): LoopAction
|
|
323
|
-
feedToolResults(results: Array<ToolResult>): LoopAction
|
|
324
|
-
feedTimeout(): LoopAction
|
|
243
|
+
step(inputJson: string): string
|
|
325
244
|
isTerminal(): boolean
|
|
326
245
|
turn(): number
|
|
327
|
-
|
|
328
|
-
/** Drain observations emitted during the most recent feed call. */
|
|
329
|
-
takeObservations(): Array<LoopObservation>
|
|
330
|
-
/**
|
|
331
|
-
* Pre-populate history with messages from a prior session.
|
|
332
|
-
* Call before `start()` to restore conversational continuity across runs.
|
|
333
|
-
*/
|
|
334
|
-
preloadHistory(messages: Array<Message>): void
|
|
335
|
-
/** Continue from preloaded history without a new user turn (mid-run recovery). */
|
|
336
|
-
resumeAfterPreload(): LoopAction
|
|
337
|
-
/**
|
|
338
|
-
* Return only messages added during the current run (since the last `preload_history`
|
|
339
|
-
* or construction). Use this to persist the session delta to `SessionStore.saveSession`.
|
|
340
|
-
*/
|
|
341
|
-
drainNewMessages(): Array<Message>
|
|
246
|
+
recoveryContentBytes(): number
|
|
342
247
|
render(): RenderedContext
|
|
248
|
+
drainNewMessages(): Array<Message>
|
|
249
|
+
preservedRefs(): Array<string>
|
|
343
250
|
}
|
|
344
251
|
export declare class SignalRouter {
|
|
345
252
|
constructor(maxQueueSize: number)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepstrike/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "DeepStrike kernel — pre-built native addon",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@deepstrike/core-darwin-arm64": "0.
|
|
27
|
-
"@deepstrike/core-darwin-x64": "0.
|
|
28
|
-
"@deepstrike/core-linux-arm64-gnu": "0.
|
|
29
|
-
"@deepstrike/core-linux-arm64-musl": "0.
|
|
30
|
-
"@deepstrike/core-linux-x64-gnu": "0.
|
|
31
|
-
"@deepstrike/core-linux-x64-musl": "0.
|
|
32
|
-
"@deepstrike/core-win32-x64-msvc": "0.
|
|
26
|
+
"@deepstrike/core-darwin-arm64": "0.2.0",
|
|
27
|
+
"@deepstrike/core-darwin-x64": "0.2.0",
|
|
28
|
+
"@deepstrike/core-linux-arm64-gnu": "0.2.0",
|
|
29
|
+
"@deepstrike/core-linux-arm64-musl": "0.2.0",
|
|
30
|
+
"@deepstrike/core-linux-x64-gnu": "0.2.0",
|
|
31
|
+
"@deepstrike/core-linux-x64-musl": "0.2.0",
|
|
32
|
+
"@deepstrike/core-win32-x64-msvc": "0.2.0"
|
|
33
33
|
}
|
|
34
34
|
}
|