@probelabs/probe 0.6.0-rc294 → 0.6.0-rc296

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-rc294-aarch64-apple-darwin.tar.gz → probe-v0.6.0-rc296-aarch64-apple-darwin.tar.gz} +0 -0
  3. package/bin/binaries/{probe-v0.6.0-rc294-aarch64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc296-aarch64-unknown-linux-musl.tar.gz} +0 -0
  4. package/bin/binaries/{probe-v0.6.0-rc294-x86_64-apple-darwin.tar.gz → probe-v0.6.0-rc296-x86_64-apple-darwin.tar.gz} +0 -0
  5. package/bin/binaries/{probe-v0.6.0-rc294-x86_64-pc-windows-msvc.zip → probe-v0.6.0-rc296-x86_64-pc-windows-msvc.zip} +0 -0
  6. package/bin/binaries/{probe-v0.6.0-rc294-x86_64-unknown-linux-musl.tar.gz → probe-v0.6.0-rc296-x86_64-unknown-linux-musl.tar.gz} +0 -0
  7. package/build/agent/ProbeAgent.d.ts +10 -0
  8. package/build/agent/ProbeAgent.js +868 -29
  9. package/build/agent/mcp/client.js +81 -4
  10. package/build/agent/mcp/xmlBridge.js +11 -0
  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 +1004 -48
  18. package/cjs/agent/simpleTelemetry.cjs +112 -0
  19. package/cjs/index.cjs +1116 -48
  20. package/index.d.ts +26 -0
  21. package/package.json +1 -1
  22. package/src/agent/ProbeAgent.d.ts +10 -0
  23. package/src/agent/ProbeAgent.js +868 -29
  24. package/src/agent/mcp/client.js +81 -4
  25. package/src/agent/mcp/xmlBridge.js +11 -0
  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/README.md CHANGED
@@ -140,6 +140,13 @@ export MODEL_NAME=claude-sonnet-4-6
140
140
  - **Session management** - Maintain conversation context across calls
141
141
  - **Token tracking** - Monitor usage and costs
142
142
  - **Configurable personas** - Engineer, architect, code-review, and more
143
+ - **Smart timeout handling** - Three timeout modes (graceful, hard, negotiated) with two-phase graceful stop for delegates and MCP servers
144
+
145
+ ### Timeout Modes
146
+
147
+ ProbeAgent supports three timeout behaviors (`graceful`, `hard`, `negotiated`) for controlling what happens when `maxOperationTimeout` is reached. The `negotiated` mode uses an independent observer LLM call that works even when the main loop is blocked by delegates. Delegates inherit timeout settings from the parent and are budget-aware — their timeout is capped to the parent's remaining budget. MCP servers that expose a `graceful_stop` tool get cooperative shutdown signals.
148
+
149
+ See [Timeout Architecture](../docs/probe-agent/sdk/timeout-modes.md) for the full reference.
143
150
 
144
151
  ### Agent Skills (repo-local)
145
152
 
@@ -106,6 +106,16 @@ 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, '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
+ /** Number of bonus steps during graceful timeout wind-down (default: 4, range: 1-20). Env var: GRACEFUL_TIMEOUT_BONUS_STEPS */
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;
109
119
  }
110
120
 
111
121
  /**