@probelabs/probe 0.6.0-rc331 → 0.6.0-rc332
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/bin/binaries/{probe-v0.6.0-rc331-aarch64-apple-darwin.tar.gz → probe-v0.6.0-rc332-aarch64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc331-aarch64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc332-aarch64-unknown-linux-musl.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc331-x86_64-apple-darwin.tar.gz → probe-v0.6.0-rc332-x86_64-apple-darwin.tar.gz} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc331-x86_64-pc-windows-msvc.zip → probe-v0.6.0-rc332-x86_64-pc-windows-msvc.zip} +0 -0
- package/bin/binaries/{probe-v0.6.0-rc331-x86_64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc332-x86_64-unknown-linux-musl.tar.gz} +0 -0
- package/build/agent/ProbeAgent.d.ts +105 -4
- package/build/agent/ProbeAgent.js +209 -12
- package/build/agent/bashExecutor.js +36 -101
- package/build/agent/engines/codex.js +367 -88
- package/build/agent/engines/governed-answer-failure.js +152 -0
- package/build/agent/engines/governed-codex-profile.js +198 -0
- package/build/agent/governance/acknowledgedJsonlChannel.js +328 -0
- package/build/agent/governance/atomicTerminalReceipt.js +188 -0
- package/build/agent/governance/index.d.ts +130 -0
- package/build/agent/governance/index.js +8 -0
- package/build/agent/mcp/built-in-server.js +152 -53
- package/build/agent/mcp/index.d.ts +65 -0
- package/build/agent/mcp/index.js +6 -1
- package/build/agent/probeTool.js +1 -1
- package/build/agent/processSupervisor.js +351 -0
- package/build/agent/tools.js +14 -8
- package/build/index.js +2 -0
- package/cjs/agent/ProbeAgent.cjs +13238 -11968
- package/cjs/index.cjs +75955 -74126
- package/index.d.ts +149 -4
- package/package.json +6 -2
- package/src/agent/ProbeAgent.d.ts +105 -4
- package/src/agent/ProbeAgent.js +209 -12
- package/src/agent/bashExecutor.js +36 -101
- package/src/agent/engines/codex.js +367 -88
- package/src/agent/engines/governed-answer-failure.js +152 -0
- package/src/agent/engines/governed-codex-profile.js +198 -0
- package/src/agent/governance/acknowledgedJsonlChannel.js +328 -0
- package/src/agent/governance/atomicTerminalReceipt.js +188 -0
- package/src/agent/governance/index.d.ts +130 -0
- package/src/agent/governance/index.js +8 -0
- package/src/agent/mcp/built-in-server.js +152 -53
- package/src/agent/mcp/index.d.ts +65 -0
- package/src/agent/mcp/index.js +6 -1
- package/src/agent/probeTool.js +1 -1
- package/src/agent/processSupervisor.js +351 -0
- package/src/agent/tools.js +14 -8
- package/src/index.js +2 -0
package/index.d.ts
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
// TypeScript definitions for ProbeAgent SDK
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
|
|
4
|
+
export interface GovernedProcessSpec {
|
|
5
|
+
command: string;
|
|
6
|
+
args?: string[];
|
|
7
|
+
cwd?: string;
|
|
8
|
+
env?: NodeJS.ProcessEnv;
|
|
9
|
+
signal?: AbortSignal;
|
|
10
|
+
executionTimeoutMs?: number;
|
|
11
|
+
terminationGraceMs?: number;
|
|
12
|
+
/** Must be greater than or equal to terminationGraceMs. */
|
|
13
|
+
cleanupTimeoutMs?: number;
|
|
14
|
+
stdoutByteCap?: number;
|
|
15
|
+
stderrByteCap?: number;
|
|
16
|
+
signalScope?: 'child' | 'process-group';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface GovernedProcessFact {
|
|
20
|
+
sequence: number;
|
|
21
|
+
fact: 'exit' | 'signal' | 'signal-attempt' | 'barrier' | 'spawn-error';
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface GovernedProcessReceipt {
|
|
26
|
+
id: string;
|
|
27
|
+
classification: 'exited' | 'execution_timeout' | 'terminated' | 'aborted' | 'output_overflow' | 'spawn_error' | 'cleanup_timeout';
|
|
28
|
+
reason: string | null;
|
|
29
|
+
error?: string;
|
|
30
|
+
stdout: string;
|
|
31
|
+
stderr: string;
|
|
32
|
+
stdoutBytes: number;
|
|
33
|
+
stderrBytes: number;
|
|
34
|
+
exitCode: number | null;
|
|
35
|
+
signal: NodeJS.Signals | null;
|
|
36
|
+
barriers: Readonly<{ close: boolean; stdoutEOF: boolean; stderrEOF: boolean }>;
|
|
37
|
+
observed: readonly GovernedProcessFact[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface GovernedProcessHandle {
|
|
41
|
+
id: string;
|
|
42
|
+
terminate(reason?: string): Promise<GovernedProcessReceipt>;
|
|
43
|
+
result: Promise<GovernedProcessReceipt>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export declare function spawnGovernedProcess(spec: GovernedProcessSpec): GovernedProcessHandle;
|
|
47
|
+
|
|
4
48
|
/**
|
|
5
49
|
* Configuration options for creating a ProbeAgent instance
|
|
6
50
|
*/
|
|
@@ -24,7 +68,7 @@ export interface ProbeAgentOptions {
|
|
|
24
68
|
/** Working directory for resolving relative paths (independent of allowedFolders security) */
|
|
25
69
|
cwd?: string;
|
|
26
70
|
/** Force specific AI provider */
|
|
27
|
-
provider?: 'anthropic' | 'openai' | 'google';
|
|
71
|
+
provider?: 'anthropic' | 'openai' | 'google' | 'codex';
|
|
28
72
|
/** Override model name */
|
|
29
73
|
model?: string;
|
|
30
74
|
/** Enable debug mode */
|
|
@@ -45,6 +89,8 @@ export interface ProbeAgentOptions {
|
|
|
45
89
|
hooks?: Record<string, (data: any) => void | Promise<void>>;
|
|
46
90
|
/** List of allowed tool names. Use ['*'] for all tools (default), [] or null for no tools (raw AI mode), or specific tool names like ['search', 'query', 'extract']. Supports exclusion with '!' prefix (e.g., ['*', '!bash']). */
|
|
47
91
|
allowedTools?: string[] | null;
|
|
92
|
+
/** Attested, fail-closed Codex runtime profile. Requires provider codex and an exact allowedTools match. */
|
|
93
|
+
governedCodexProfile?: GovernedCodexProfile;
|
|
48
94
|
/** Convenience flag to disable all tools (equivalent to allowedTools: []). Takes precedence over allowedTools if set. */
|
|
49
95
|
disableTools?: boolean;
|
|
50
96
|
/** Disable automatic mermaid diagram validation and fixing */
|
|
@@ -93,6 +139,8 @@ export interface ProbeAgentOptions {
|
|
|
93
139
|
* Tool execution event data
|
|
94
140
|
*/
|
|
95
141
|
export interface ToolCallEvent {
|
|
142
|
+
/** Digest of validated arguments, or null only when an admitted call is rejected before validation. */
|
|
143
|
+
argumentsDigest?: string | null;
|
|
96
144
|
/** Unique tool call identifier */
|
|
97
145
|
id: string;
|
|
98
146
|
/** Name of the tool being called */
|
|
@@ -115,6 +163,13 @@ export interface ToolCallEvent {
|
|
|
115
163
|
duration?: number;
|
|
116
164
|
}
|
|
117
165
|
|
|
166
|
+
/** Content-free aggregate for attested Codex-native execution capability use. */
|
|
167
|
+
export interface GovernedCodexNativeToolAggregate {
|
|
168
|
+
name: 'exec';
|
|
169
|
+
status: 'completed';
|
|
170
|
+
count: number;
|
|
171
|
+
}
|
|
172
|
+
|
|
118
173
|
/**
|
|
119
174
|
* Token usage statistics
|
|
120
175
|
*/
|
|
@@ -258,6 +313,88 @@ export interface AnswerOptions {
|
|
|
258
313
|
maxIterations?: number;
|
|
259
314
|
}
|
|
260
315
|
|
|
316
|
+
export interface GovernedAnswerOptions extends AnswerOptions {
|
|
317
|
+
schema: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export interface GovernedInvocationAnswerOptions extends GovernedAnswerOptions {
|
|
321
|
+
invocationDigest: string;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export interface GovernedIdentifiedAnswerOptions extends GovernedInvocationAnswerOptions {
|
|
325
|
+
resultIdentity: 'probe.governed-result-identity/v1';
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export interface GovernedAnswerDispatchOptions {
|
|
329
|
+
schema: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface GovernedAnswerDispatch {
|
|
333
|
+
readonly source: 'probe-host-tools-call';
|
|
334
|
+
readonly tool: 'codex';
|
|
335
|
+
readonly promptDigest: `sha256:${string}`;
|
|
336
|
+
readonly promptBytes: number;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface GovernedResultIdentity {
|
|
340
|
+
version: 'probe.governed-result-identity/v1';
|
|
341
|
+
source: 'probe-host-schema-valid-json';
|
|
342
|
+
resultDigest: string;
|
|
343
|
+
canonicalBytes: number;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export type GovernedCodexProfile =
|
|
347
|
+
{ version: 'probe.governed-codex-profile/v1'; profileId: 'luna-xhigh-readonly-v1'; engine: 'codex'; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; cwd: string; probeTools: ['search', 'extract', 'listFiles']; fallback: false; retries: 0; }
|
|
348
|
+
/** Admits pinned-protocol `exec` inside the attested sandbox; does not claim commands are semantically safe. */
|
|
349
|
+
| { version: 'probe.governed-codex-profile/v2'; profileId: 'luna-xhigh-readonly-native-exec-v1'; engine: 'codex'; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; cwd: string; probeMcpTools: ['search', 'extract', 'listFiles']; codexNativeTools: ['exec']; fallback: false; retries: 0; };
|
|
350
|
+
|
|
351
|
+
export interface GovernedCodexRuntimeAttestation {
|
|
352
|
+
version: 'probe.governed-codex-attestation/v1';
|
|
353
|
+
profileId: 'luna-xhigh-readonly-v1';
|
|
354
|
+
requested: { profileDigest: string; cwdDigest: string; probeToolsDigest: string; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; };
|
|
355
|
+
observed: { source: 'session_configured'; model: 'gpt-5.6-luna'; modelProviderId: 'openai'; reasoningEffort: 'xhigh'; approvalPolicy: 'never'; cwdDigest: string; permissionProfileDigest: string; filesystem: 'restricted-read-root'; network: 'restricted'; };
|
|
356
|
+
evidence: { eventCount: 1; };
|
|
357
|
+
usage: { status: 'unavailable'; };
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export interface GovernedAnswerResult {
|
|
361
|
+
data: unknown;
|
|
362
|
+
runtimeAttestation: GovernedCodexRuntimeAttestation | GovernedCodexRuntimeAttestationV3;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export interface GovernedCodexRuntimeAttestationV2 {
|
|
366
|
+
version: 'probe.governed-codex-attestation/v2';
|
|
367
|
+
profileId: 'luna-xhigh-readonly-v1';
|
|
368
|
+
requested: { profileDigest: string; cwdDigest: string; probeToolsDigest: string; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; };
|
|
369
|
+
observed: { source: 'session_configured'; model: 'gpt-5.6-luna'; modelProviderId: 'openai'; reasoningEffort: 'xhigh'; approvalPolicy: 'never'; cwdDigest: string; permissionProfileDigest: string; filesystem: 'restricted-read-root'; network: 'restricted'; };
|
|
370
|
+
executionContext: { source: 'caller'; invocationDigest: string; };
|
|
371
|
+
dispatch: { source: 'probe-host-tools-call'; tool: 'codex'; promptDigest: string; promptBytes: number; };
|
|
372
|
+
evidence: { eventCount: 1; };
|
|
373
|
+
usage: { status: 'unavailable'; };
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export interface GovernedInvocationAnswerResult {
|
|
377
|
+
data: unknown;
|
|
378
|
+
runtimeAttestation: GovernedCodexRuntimeAttestationV2 | GovernedCodexRuntimeAttestationV3;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export interface GovernedIdentifiedAnswerResult {
|
|
382
|
+
data: unknown;
|
|
383
|
+
runtimeAttestation: GovernedCodexRuntimeAttestationV2 | GovernedCodexRuntimeAttestationV3;
|
|
384
|
+
resultIdentity: GovernedResultIdentity;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export interface GovernedCodexRuntimeAttestationV3 {
|
|
388
|
+
version: 'probe.governed-codex-attestation/v3';
|
|
389
|
+
profileId: 'luna-xhigh-readonly-native-exec-v1';
|
|
390
|
+
requested: { profileDigest: string; cwdDigest: string; probeMcpToolsDigest: string; codexNativeToolsDigest: string; probeMcpTools: ['search', 'extract', 'listFiles']; codexNativeTools: ['exec']; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; };
|
|
391
|
+
observed: { source: 'session_configured+raw_response_item'; model: 'gpt-5.6-luna'; modelProviderId: 'openai'; reasoningEffort: 'xhigh'; approvalPolicy: 'never'; cwdDigest: string; permissionProfileDigest: string; filesystem: 'restricted-read-root'; network: 'restricted'; nativeTools: { total: number; tools: GovernedCodexNativeToolAggregate[]; }; };
|
|
392
|
+
executionContext?: { source: 'caller'; invocationDigest: string; };
|
|
393
|
+
dispatch?: { source: 'probe-host-tools-call'; tool: 'codex'; promptDigest: string; promptBytes: number; };
|
|
394
|
+
evidence: { sessionEventCount: 1; nativeCallCount: number; probeMcpCallCount: number; };
|
|
395
|
+
usage: { status: 'unavailable'; };
|
|
396
|
+
}
|
|
397
|
+
|
|
261
398
|
/**
|
|
262
399
|
* Clone options for creating a new agent with shared history
|
|
263
400
|
*/
|
|
@@ -301,6 +438,7 @@ export declare class ProbeAgent {
|
|
|
301
438
|
|
|
302
439
|
/** Whether operations have been cancelled */
|
|
303
440
|
cancelled: boolean;
|
|
441
|
+
readonly abortSignal: AbortSignal;
|
|
304
442
|
|
|
305
443
|
/**
|
|
306
444
|
* Create a new ProbeAgent instance
|
|
@@ -324,6 +462,11 @@ export declare class ProbeAgent {
|
|
|
324
462
|
*/
|
|
325
463
|
answer(message: string, images?: any[], options?: AnswerOptions): Promise<string>;
|
|
326
464
|
|
|
465
|
+
answerGoverned(message: string, options: GovernedIdentifiedAnswerOptions, images?: any[]): Promise<GovernedIdentifiedAnswerResult>;
|
|
466
|
+
answerGoverned(message: string, options: GovernedInvocationAnswerOptions, images?: any[]): Promise<GovernedInvocationAnswerResult>;
|
|
467
|
+
answerGoverned(message: string, options: GovernedAnswerOptions, images?: any[]): Promise<GovernedAnswerResult>;
|
|
468
|
+
previewGovernedAnswerDispatch(message: string, options: GovernedAnswerDispatchOptions): Promise<Readonly<GovernedAnswerDispatch>>;
|
|
469
|
+
|
|
327
470
|
/**
|
|
328
471
|
* Get token usage statistics
|
|
329
472
|
* @returns Current token usage information
|
|
@@ -335,6 +478,8 @@ export declare class ProbeAgent {
|
|
|
335
478
|
*/
|
|
336
479
|
cancel(): void;
|
|
337
480
|
|
|
481
|
+
/** Close engine subprocess and MCP resources. */ close(): Promise<void>;
|
|
482
|
+
|
|
338
483
|
/**
|
|
339
484
|
* Clear the conversation history
|
|
340
485
|
*/
|
|
@@ -874,9 +1019,9 @@ export declare const tools: {
|
|
|
874
1019
|
* ProbeAgent Events interface
|
|
875
1020
|
*/
|
|
876
1021
|
export interface ProbeAgentEvents {
|
|
877
|
-
on(event: 'toolCall', listener: (event: ToolCallEvent) => void): this;
|
|
878
|
-
emit(event: 'toolCall', event: ToolCallEvent): boolean;
|
|
879
|
-
removeListener(event: 'toolCall', listener: (event: ToolCallEvent) => void): this;
|
|
1022
|
+
on(event: 'toolCall', listener: (event: ToolCallEvent | GovernedCodexNativeToolAggregate) => void): this;
|
|
1023
|
+
emit(event: 'toolCall', event: ToolCallEvent | GovernedCodexNativeToolAggregate): boolean;
|
|
1024
|
+
removeListener(event: 'toolCall', listener: (event: ToolCallEvent | GovernedCodexNativeToolAggregate) => void): this;
|
|
880
1025
|
removeAllListeners(event?: 'toolCall'): this;
|
|
881
1026
|
}
|
|
882
1027
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@probelabs/probe",
|
|
3
|
-
"version": "0.6.0-
|
|
3
|
+
"version": "0.6.0-rc332",
|
|
4
4
|
"description": "Node.js wrapper for the probe code search tool",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"./agent/mcp": {
|
|
25
25
|
"import": "./src/agent/mcp/index.js"
|
|
26
26
|
},
|
|
27
|
+
"./agent/governance": {
|
|
28
|
+
"types": "./src/agent/governance/index.d.ts",
|
|
29
|
+
"import": "./src/agent/governance/index.js"
|
|
30
|
+
},
|
|
27
31
|
"./agent/imageConfig": {
|
|
28
32
|
"import": "./src/agent/imageConfig.js"
|
|
29
33
|
}
|
|
@@ -80,7 +84,7 @@
|
|
|
80
84
|
"@ai-sdk/openai": "^3.0.41",
|
|
81
85
|
"@anthropic-ai/claude-agent-sdk": "^0.1.46",
|
|
82
86
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
83
|
-
"@nyariv/sandboxjs": "github
|
|
87
|
+
"@nyariv/sandboxjs": "git+https://github.com/probelabs/SandboxJS.git#d0d8c8ab3113d3b73e08b79b88a4b834ba3fae11",
|
|
84
88
|
"@probelabs/maid": "^0.0.29",
|
|
85
89
|
"acorn": "^8.15.0",
|
|
86
90
|
"acorn-walk": "^8.3.4",
|
|
@@ -63,7 +63,7 @@ export interface ProbeAgentOptions {
|
|
|
63
63
|
/** Use a delegated code-search subagent for the search tool (default: true) */
|
|
64
64
|
searchDelegate?: boolean;
|
|
65
65
|
/** Force specific AI provider */
|
|
66
|
-
provider?: 'anthropic' | 'openai' | 'google' | 'bedrock';
|
|
66
|
+
provider?: 'anthropic' | 'openai' | 'google' | 'bedrock' | 'codex';
|
|
67
67
|
/** Override model name */
|
|
68
68
|
model?: string;
|
|
69
69
|
/** Enable debug mode */
|
|
@@ -80,6 +80,8 @@ export interface ProbeAgentOptions {
|
|
|
80
80
|
mcpServers?: any[];
|
|
81
81
|
/** List of allowed tool names. Use ['*'] for all tools (default), [] or null for no tools (raw AI mode), or specific tool names like ['search', 'query', 'extract']. Supports exclusion with '!' prefix (e.g., ['*', '!bash']). */
|
|
82
82
|
allowedTools?: string[] | null;
|
|
83
|
+
/** Attested, fail-closed Codex runtime profile. Requires provider codex and an exact allowedTools match. */
|
|
84
|
+
governedCodexProfile?: GovernedCodexProfile;
|
|
83
85
|
/** Convenience flag to disable all tools (equivalent to allowedTools: []). Takes precedence over allowedTools if set. */
|
|
84
86
|
disableTools?: boolean;
|
|
85
87
|
/** Retry configuration for handling transient API failures */
|
|
@@ -154,6 +156,8 @@ export interface TimeoutWindingDownEvent {
|
|
|
154
156
|
* Tool execution event data
|
|
155
157
|
*/
|
|
156
158
|
export interface ToolCallEvent {
|
|
159
|
+
/** Digest of validated arguments, or null only when an admitted call is rejected before validation. */
|
|
160
|
+
argumentsDigest?: string | null;
|
|
157
161
|
/** Unique tool call identifier */
|
|
158
162
|
id: string;
|
|
159
163
|
/** Name of the tool being called */
|
|
@@ -176,6 +180,13 @@ export interface ToolCallEvent {
|
|
|
176
180
|
duration?: number;
|
|
177
181
|
}
|
|
178
182
|
|
|
183
|
+
/** Content-free aggregate for attested Codex-native execution capability use. */
|
|
184
|
+
export interface GovernedCodexNativeToolAggregate {
|
|
185
|
+
name: 'exec';
|
|
186
|
+
status: 'completed';
|
|
187
|
+
count: number;
|
|
188
|
+
}
|
|
189
|
+
|
|
179
190
|
/**
|
|
180
191
|
* Token usage statistics
|
|
181
192
|
*/
|
|
@@ -228,6 +239,88 @@ export interface AnswerOptions {
|
|
|
228
239
|
maxIterations?: number;
|
|
229
240
|
}
|
|
230
241
|
|
|
242
|
+
export interface GovernedAnswerOptions extends AnswerOptions {
|
|
243
|
+
schema: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface GovernedInvocationAnswerOptions extends GovernedAnswerOptions {
|
|
247
|
+
invocationDigest: string;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface GovernedIdentifiedAnswerOptions extends GovernedInvocationAnswerOptions {
|
|
251
|
+
resultIdentity: 'probe.governed-result-identity/v1';
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface GovernedAnswerDispatchOptions {
|
|
255
|
+
schema: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface GovernedAnswerDispatch {
|
|
259
|
+
readonly source: 'probe-host-tools-call';
|
|
260
|
+
readonly tool: 'codex';
|
|
261
|
+
readonly promptDigest: `sha256:${string}`;
|
|
262
|
+
readonly promptBytes: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface GovernedResultIdentity {
|
|
266
|
+
version: 'probe.governed-result-identity/v1';
|
|
267
|
+
source: 'probe-host-schema-valid-json';
|
|
268
|
+
resultDigest: string;
|
|
269
|
+
canonicalBytes: number;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export type GovernedCodexProfile =
|
|
273
|
+
{ version: 'probe.governed-codex-profile/v1'; profileId: 'luna-xhigh-readonly-v1'; engine: 'codex'; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; cwd: string; probeTools: ['search', 'extract', 'listFiles']; fallback: false; retries: 0; }
|
|
274
|
+
/** Admits pinned-protocol `exec` inside the attested sandbox; does not claim commands are semantically safe. */
|
|
275
|
+
| { version: 'probe.governed-codex-profile/v2'; profileId: 'luna-xhigh-readonly-native-exec-v1'; engine: 'codex'; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; cwd: string; probeMcpTools: ['search', 'extract', 'listFiles']; codexNativeTools: ['exec']; fallback: false; retries: 0; };
|
|
276
|
+
|
|
277
|
+
export interface GovernedCodexRuntimeAttestation {
|
|
278
|
+
version: 'probe.governed-codex-attestation/v1';
|
|
279
|
+
profileId: 'luna-xhigh-readonly-v1';
|
|
280
|
+
requested: { profileDigest: string; cwdDigest: string; probeToolsDigest: string; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; };
|
|
281
|
+
observed: { source: 'session_configured'; model: 'gpt-5.6-luna'; modelProviderId: 'openai'; reasoningEffort: 'xhigh'; approvalPolicy: 'never'; cwdDigest: string; permissionProfileDigest: string; filesystem: 'restricted-read-root'; network: 'restricted'; };
|
|
282
|
+
evidence: { eventCount: 1; };
|
|
283
|
+
usage: { status: 'unavailable'; };
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface GovernedAnswerResult {
|
|
287
|
+
data: unknown;
|
|
288
|
+
runtimeAttestation: GovernedCodexRuntimeAttestation | GovernedCodexRuntimeAttestationV3;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export interface GovernedCodexRuntimeAttestationV2 {
|
|
292
|
+
version: 'probe.governed-codex-attestation/v2';
|
|
293
|
+
profileId: 'luna-xhigh-readonly-v1';
|
|
294
|
+
requested: { profileDigest: string; cwdDigest: string; probeToolsDigest: string; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; };
|
|
295
|
+
observed: { source: 'session_configured'; model: 'gpt-5.6-luna'; modelProviderId: 'openai'; reasoningEffort: 'xhigh'; approvalPolicy: 'never'; cwdDigest: string; permissionProfileDigest: string; filesystem: 'restricted-read-root'; network: 'restricted'; };
|
|
296
|
+
executionContext: { source: 'caller'; invocationDigest: string; };
|
|
297
|
+
dispatch: { source: 'probe-host-tools-call'; tool: 'codex'; promptDigest: string; promptBytes: number; };
|
|
298
|
+
evidence: { eventCount: 1; };
|
|
299
|
+
usage: { status: 'unavailable'; };
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface GovernedInvocationAnswerResult {
|
|
303
|
+
data: unknown;
|
|
304
|
+
runtimeAttestation: GovernedCodexRuntimeAttestationV2 | GovernedCodexRuntimeAttestationV3;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface GovernedIdentifiedAnswerResult {
|
|
308
|
+
data: unknown;
|
|
309
|
+
runtimeAttestation: GovernedCodexRuntimeAttestationV2 | GovernedCodexRuntimeAttestationV3;
|
|
310
|
+
resultIdentity: GovernedResultIdentity;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface GovernedCodexRuntimeAttestationV3 {
|
|
314
|
+
version: 'probe.governed-codex-attestation/v3';
|
|
315
|
+
profileId: 'luna-xhigh-readonly-native-exec-v1';
|
|
316
|
+
requested: { profileDigest: string; cwdDigest: string; probeMcpToolsDigest: string; codexNativeToolsDigest: string; probeMcpTools: ['search', 'extract', 'listFiles']; codexNativeTools: ['exec']; model: 'gpt-5.6-luna'; reasoningEffort: 'xhigh'; sandbox: 'read-only'; approvalPolicy: 'never'; };
|
|
317
|
+
observed: { source: 'session_configured+raw_response_item'; model: 'gpt-5.6-luna'; modelProviderId: 'openai'; reasoningEffort: 'xhigh'; approvalPolicy: 'never'; cwdDigest: string; permissionProfileDigest: string; filesystem: 'restricted-read-root'; network: 'restricted'; nativeTools: { total: number; tools: GovernedCodexNativeToolAggregate[]; }; };
|
|
318
|
+
executionContext?: { source: 'caller'; invocationDigest: string; };
|
|
319
|
+
dispatch?: { source: 'probe-host-tools-call'; tool: 'codex'; promptDigest: string; promptBytes: number; };
|
|
320
|
+
evidence: { sessionEventCount: 1; nativeCallCount: number; probeMcpCallCount: number; };
|
|
321
|
+
usage: { status: 'unavailable'; };
|
|
322
|
+
}
|
|
323
|
+
|
|
231
324
|
/**
|
|
232
325
|
* Clone options for creating a new agent with shared history
|
|
233
326
|
*/
|
|
@@ -268,6 +361,7 @@ export declare class ProbeAgent {
|
|
|
268
361
|
|
|
269
362
|
/** Whether operations have been cancelled */
|
|
270
363
|
cancelled: boolean;
|
|
364
|
+
readonly abortSignal: AbortSignal;
|
|
271
365
|
|
|
272
366
|
/** AI provider being used */
|
|
273
367
|
readonly clientApiProvider?: string;
|
|
@@ -297,6 +391,11 @@ export declare class ProbeAgent {
|
|
|
297
391
|
*/
|
|
298
392
|
answer(message: string, images?: any[], options?: AnswerOptions): Promise<string>;
|
|
299
393
|
|
|
394
|
+
answerGoverned(message: string, options: GovernedIdentifiedAnswerOptions, images?: any[]): Promise<GovernedIdentifiedAnswerResult>;
|
|
395
|
+
answerGoverned(message: string, options: GovernedInvocationAnswerOptions, images?: any[]): Promise<GovernedInvocationAnswerResult>;
|
|
396
|
+
answerGoverned(message: string, options: GovernedAnswerOptions, images?: any[]): Promise<GovernedAnswerResult>;
|
|
397
|
+
previewGovernedAnswerDispatch(message: string, options: GovernedAnswerDispatchOptions): Promise<Readonly<GovernedAnswerDispatch>>;
|
|
398
|
+
|
|
300
399
|
/**
|
|
301
400
|
* Get token usage statistics
|
|
302
401
|
* @returns Current token usage information
|
|
@@ -308,6 +407,8 @@ export declare class ProbeAgent {
|
|
|
308
407
|
*/
|
|
309
408
|
cancel(): void;
|
|
310
409
|
|
|
410
|
+
/** Close engine subprocess and MCP resources. */ close(): Promise<void>;
|
|
411
|
+
|
|
311
412
|
/**
|
|
312
413
|
* Clear the conversation history
|
|
313
414
|
*/
|
|
@@ -337,9 +438,9 @@ export declare class ProbeAgent {
|
|
|
337
438
|
* ProbeAgent Events interface
|
|
338
439
|
*/
|
|
339
440
|
export interface ProbeAgentEvents {
|
|
340
|
-
on(event: 'toolCall', listener: (event: ToolCallEvent) => void): this;
|
|
341
|
-
emit(event: 'toolCall', event: ToolCallEvent): boolean;
|
|
342
|
-
removeListener(event: 'toolCall', listener: (event: ToolCallEvent) => void): this;
|
|
441
|
+
on(event: 'toolCall', listener: (event: ToolCallEvent | GovernedCodexNativeToolAggregate) => void): this;
|
|
442
|
+
emit(event: 'toolCall', event: ToolCallEvent | GovernedCodexNativeToolAggregate): boolean;
|
|
443
|
+
removeListener(event: 'toolCall', listener: (event: ToolCallEvent | GovernedCodexNativeToolAggregate) => void): this;
|
|
343
444
|
removeAllListeners(event?: 'toolCall'): this;
|
|
344
445
|
}
|
|
345
446
|
|