@probelabs/probe 0.6.0-rc295 → 0.6.0-rc297

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.
Files changed (31) hide show
  1. package/README.md +7 -0
  2. package/bin/binaries/{probe-v0.6.0-rc295-aarch64-apple-darwin.tar.gz → probe-v0.6.0-rc297-aarch64-apple-darwin.tar.gz} +0 -0
  3. package/bin/binaries/{probe-v0.6.0-rc295-aarch64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc297-aarch64-unknown-linux-musl.tar.gz} +0 -0
  4. package/bin/binaries/{probe-v0.6.0-rc295-x86_64-apple-darwin.tar.gz → probe-v0.6.0-rc297-x86_64-apple-darwin.tar.gz} +0 -0
  5. package/bin/binaries/{probe-v0.6.0-rc295-x86_64-pc-windows-msvc.zip → probe-v0.6.0-rc297-x86_64-pc-windows-msvc.zip} +0 -0
  6. package/bin/binaries/{probe-v0.6.0-rc295-x86_64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc297-x86_64-unknown-linux-musl.tar.gz} +0 -0
  7. package/build/agent/ProbeAgent.d.ts +40 -2
  8. package/build/agent/ProbeAgent.js +703 -11
  9. package/build/agent/mcp/client.js +115 -4
  10. package/build/agent/mcp/xmlBridge.js +13 -1
  11. package/build/agent/otelLogBridge.js +184 -0
  12. package/build/agent/simpleTelemetry.js +8 -0
  13. package/build/delegate.js +75 -6
  14. package/build/index.js +6 -2
  15. package/build/tools/common.js +84 -11
  16. package/build/tools/vercel.js +78 -18
  17. package/cjs/agent/ProbeAgent.cjs +1095 -185
  18. package/cjs/agent/simpleTelemetry.cjs +112 -0
  19. package/cjs/index.cjs +1207 -185
  20. package/index.d.ts +26 -0
  21. package/package.json +2 -2
  22. package/src/agent/ProbeAgent.d.ts +40 -2
  23. package/src/agent/ProbeAgent.js +703 -11
  24. package/src/agent/mcp/client.js +115 -4
  25. package/src/agent/mcp/xmlBridge.js +13 -1
  26. package/src/agent/otelLogBridge.js +184 -0
  27. package/src/agent/simpleTelemetry.js +8 -0
  28. package/src/delegate.js +75 -6
  29. package/src/index.js +6 -2
  30. package/src/tools/common.js +84 -11
  31. package/src/tools/vercel.js +78 -18
package/index.d.ts CHANGED
@@ -61,6 +61,32 @@ export interface ProbeAgentOptions {
61
61
  skillDirs?: string[];
62
62
  /** Custom prompt to run after attempt_completion for validation/review (runs before mermaid/JSON validation) */
63
63
  completionPrompt?: string;
64
+ /** Enable task management system for tracking multi-step progress */
65
+ enableTasks?: boolean;
66
+ /** Timeout in ms for AI requests (default: 120000 or REQUEST_TIMEOUT env var). Used to abort hung requests. */
67
+ requestTimeout?: number;
68
+ /** Maximum timeout in ms for the entire operation including all retries and fallbacks (default: 300000 or MAX_OPERATION_TIMEOUT env var). */
69
+ maxOperationTimeout?: number;
70
+ /** Timeout behavior: 'graceful' winds down with bonus steps, 'hard' aborts immediately, 'negotiated' uses a timeout observer (separate LLM call) to decide extensions (default: 'graceful'). Env var: TIMEOUT_BEHAVIOR */
71
+ timeoutBehavior?: 'graceful' | 'hard' | 'negotiated';
72
+ /** Number of bonus steps during graceful timeout wind-down (default: 4, range: 1-20). Env var: GRACEFUL_TIMEOUT_BONUS_STEPS */
73
+ gracefulTimeoutBonusSteps?: number;
74
+ /** Total extra time budget in ms for negotiated timeout (default: 1800000 = 30 min). Env var: NEGOTIATED_TIMEOUT_BUDGET */
75
+ negotiatedTimeoutBudget?: number;
76
+ /** Max time extension requests for negotiated timeout (default: 3, range: 1-10). Env var: NEGOTIATED_TIMEOUT_MAX_REQUESTS */
77
+ negotiatedTimeoutMaxRequests?: number;
78
+ /** Max ms per extension request for negotiated timeout (default: 600000 = 10 min). Env var: NEGOTIATED_TIMEOUT_MAX_PER_REQUEST */
79
+ negotiatedTimeoutMaxPerRequest?: number;
80
+ /** How long to wait for subagents/MCP to wind down after observer declines (default: 45000 = 45s). Env var: GRACEFUL_STOP_DEADLINE */
81
+ gracefulStopDeadline?: number;
82
+ /** Retry configuration for handling transient API failures */
83
+ retry?: any;
84
+ /** Fallback configuration for multi-provider support */
85
+ fallback?: any;
86
+ /** Enable the delegate tool for task distribution to subagents */
87
+ enableDelegate?: boolean;
88
+ /** Enable bash tool for command execution */
89
+ enableBash?: boolean;
64
90
  }
65
91
 
66
92
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc295",
3
+ "version": "0.6.0-rc297",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -81,7 +81,7 @@
81
81
  "@anthropic-ai/claude-agent-sdk": "^0.1.46",
82
82
  "@modelcontextprotocol/sdk": "^1.0.0",
83
83
  "@nyariv/sandboxjs": "github:probelabs/SandboxJS",
84
- "@probelabs/maid": "^0.0.27",
84
+ "@probelabs/maid": "^0.0.28",
85
85
  "acorn": "^8.15.0",
86
86
  "acorn-walk": "^8.3.4",
87
87
  "adm-zip": "^0.5.16",
@@ -106,10 +106,48 @@ export interface ProbeAgentOptions {
106
106
  requestTimeout?: number;
107
107
  /** Maximum timeout in ms for the entire operation including all retries and fallbacks (default: 300000 or MAX_OPERATION_TIMEOUT env var). This is the absolute maximum time for streamTextWithRetryAndFallback. */
108
108
  maxOperationTimeout?: number;
109
- /** Timeout behavior: 'graceful' winds down with bonus steps giving the agent a chance to respond, 'hard' aborts immediately (default: 'graceful'). Env var: TIMEOUT_BEHAVIOR */
110
- timeoutBehavior?: 'graceful' | 'hard';
109
+ /** Timeout behavior: 'graceful' winds down with bonus steps, 'hard' aborts immediately, 'negotiated' uses a timeout observer (separate LLM call) to decide extensions (default: 'graceful'). Env var: TIMEOUT_BEHAVIOR */
110
+ timeoutBehavior?: 'graceful' | 'hard' | 'negotiated';
111
111
  /** Number of bonus steps during graceful timeout wind-down (default: 4, range: 1-20). Env var: GRACEFUL_TIMEOUT_BONUS_STEPS */
112
112
  gracefulTimeoutBonusSteps?: number;
113
+ /** Total extra time budget in ms for negotiated timeout (default: 1800000 = 30 min). Env var: NEGOTIATED_TIMEOUT_BUDGET */
114
+ negotiatedTimeoutBudget?: number;
115
+ /** Max time extension requests for negotiated timeout (default: 3, range: 1-10). Env var: NEGOTIATED_TIMEOUT_MAX_REQUESTS */
116
+ negotiatedTimeoutMaxRequests?: number;
117
+ /** Max ms per extension request for negotiated timeout (default: 600000 = 10 min). Env var: NEGOTIATED_TIMEOUT_MAX_PER_REQUEST */
118
+ negotiatedTimeoutMaxPerRequest?: number;
119
+ }
120
+
121
+ /**
122
+ * Emitted when the negotiated timeout observer grants a time extension.
123
+ * Parent processes should listen to this event and extend their own deadlines accordingly.
124
+ */
125
+ export interface TimeoutExtendedEvent {
126
+ /** Duration of the granted extension in milliseconds */
127
+ grantedMs: number;
128
+ /** Reason the observer granted the extension */
129
+ reason: string;
130
+ /** Number of extensions used so far */
131
+ extensionsUsed: number;
132
+ /** Number of extensions remaining */
133
+ extensionsRemaining: number;
134
+ /** Total extra time granted across all extensions in ms */
135
+ totalExtraTimeMs: number;
136
+ /** Remaining budget for future extensions in ms */
137
+ budgetRemainingMs: number;
138
+ }
139
+
140
+ /**
141
+ * Emitted when the negotiated timeout observer declines an extension and begins wind-down.
142
+ * After this event, the agent will produce its final answer and no more extensions will be granted.
143
+ */
144
+ export interface TimeoutWindingDownEvent {
145
+ /** Reason the observer declined the extension */
146
+ reason: string;
147
+ /** Number of extensions used before declining */
148
+ extensionsUsed: number;
149
+ /** Total extra time granted across all extensions in ms */
150
+ totalExtraTimeMs: number;
113
151
  }
114
152
 
115
153
  /**