@probelabs/probe 0.6.0-rc276 → 0.6.0-rc278

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.
@@ -104,7 +104,6 @@ import {
104
104
  TaskManager,
105
105
  createTaskTool,
106
106
  taskSystemPrompt,
107
- taskGuidancePrompt,
108
107
  createTaskCompletionBlockedMessage
109
108
  } from './tasks/index.js';
110
109
  import { z } from 'zod';
@@ -197,6 +196,8 @@ export class ProbeAgent {
197
196
  this.tracer = options.tracer || null;
198
197
  this.outline = !!options.outline;
199
198
  this.searchDelegate = options.searchDelegate !== undefined ? !!options.searchDelegate : true;
199
+ this.searchDelegateProvider = options.searchDelegateProvider || null;
200
+ this.searchDelegateModel = options.searchDelegateModel || null;
200
201
  this.maxResponseTokens = options.maxResponseTokens || (() => {
201
202
  const val = parseInt(process.env.MAX_RESPONSE_TOKENS || '0', 10);
202
203
  if (isNaN(val) || val < 0 || val > 200000) {
@@ -788,6 +789,8 @@ export class ProbeAgent {
788
789
  architectureFileName: this.architectureFileName,
789
790
  provider: this.clientApiProvider,
790
791
  model: this.clientApiModel,
792
+ searchDelegateProvider: this.searchDelegateProvider,
793
+ searchDelegateModel: this.searchDelegateModel,
791
794
  delegationManager: this.delegationManager, // Per-instance delegation limits
792
795
  outputBuffer: this._outputBuffer,
793
796
  concurrencyLimiter: this.concurrencyLimiter, // Global AI concurrency limiter
@@ -3149,14 +3152,6 @@ Follow these instructions carefully:
3149
3152
  // Create user message with optional image support
3150
3153
  let userMessage = { role: 'user', content: message.trim() };
3151
3154
 
3152
- // START CHECKPOINT: Inject task guidance if tasks are enabled
3153
- if (this.enableTasks) {
3154
- userMessage.content = userMessage.content + '\n\n' + taskGuidancePrompt;
3155
- if (this.debug) {
3156
- console.log('[DEBUG] Task guidance injected into user message');
3157
- }
3158
- }
3159
-
3160
3155
  // If schema is provided, prepend JSON format requirement to user message
3161
3156
  if (options.schema && !options._schemaFormatted) {
3162
3157
  const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
@@ -9268,8 +9268,8 @@ var init_vercel = __esm({
9268
9268
  parentSessionId: sessionId,
9269
9269
  path: options.allowedFolders?.[0] || options.cwd || ".",
9270
9270
  allowedFolders: options.allowedFolders,
9271
- provider: options.provider || null,
9272
- model: options.model || null,
9271
+ provider: options.searchDelegateProvider || process.env.PROBE_SEARCH_DELEGATE_PROVIDER || options.provider || null,
9272
+ model: options.searchDelegateModel || process.env.PROBE_SEARCH_DELEGATE_MODEL || options.model || null,
9273
9273
  tracer: options.tracer || null,
9274
9274
  enableBash: false,
9275
9275
  bashConfig: null,
@@ -31932,7 +31932,7 @@ ${taskManager.formatTasksForPrompt()}`;
31932
31932
  }
31933
31933
  };
31934
31934
  }
31935
- var taskItemSchema, taskSchema, taskSystemPrompt, taskGuidancePrompt;
31935
+ var taskItemSchema, taskSchema, taskSystemPrompt;
31936
31936
  var init_taskTool = __esm({
31937
31937
  "src/agent/tasks/taskTool.js"() {
31938
31938
  "use strict";
@@ -31993,11 +31993,6 @@ Tasks = logical units of work, not files or steps.
31993
31993
  - Circular dependencies are rejected
31994
31994
  - attempt_completion is blocked while tasks remain unresolved
31995
31995
  `;
31996
- taskGuidancePrompt = `Does this request have MULTIPLE DISTINCT GOALS?
31997
- - "Do A AND B AND C" (multiple goals) \u2192 Create tasks for each goal
31998
- - "Investigate/explain/find X" (single goal) \u2192 Skip tasks, just answer directly
31999
- Multiple internal steps for ONE goal = NO tasks needed.
32000
- If creating tasks, use the task tool with action="create" first.`;
32001
31996
  }
32002
31997
  });
32003
31998
 
@@ -70753,8 +70748,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
70753
70748
  - Check imports and existing utilities before creating new helpers \u2014 the project may already have what you need.
70754
70749
 
70755
70750
  # Task Planning
70756
- - If the task tool is available, use it to break complex work into milestones before starting implementation.
70757
- - Stay flexible \u2014 if your understanding changes mid-task, add, remove, or reorganize tasks as needed. The plan should serve you, not constrain you.
70751
+ When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
70752
+ - Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
70753
+ - Update task status to "in_progress" when starting and "completed" when done.
70754
+ - All tasks must be completed or cancelled before calling attempt_completion.
70755
+ - Stay flexible \u2014 add, remove, or reorganize tasks as your understanding changes.
70756
+
70757
+ Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
70758
+
70759
+ # Discovering Project Commands
70760
+ Before building or testing, determine the project's toolchain:
70761
+ - Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
70762
+ - Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
70763
+ - Read README for build/test instructions if the above are unclear
70764
+ - Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
70758
70765
 
70759
70766
  # During Implementation
70760
70767
  - Always create a new branch before making changes to the codebase.
@@ -70765,12 +70772,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
70765
70772
  - When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) \u2014 it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
70766
70773
  - After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
70767
70774
 
70768
- # After Implementation
70769
- - Verify the project builds successfully. If it doesn't, fix the build before moving on.
70770
- - Run lint and typecheck commands if known for the project. Fix any new warnings or errors you introduced.
70771
- - Add tests for any new or changed functionality. Tests must cover the main path and important edge cases.
70772
- - Run the project's full test suite. If any tests fail (including pre-existing ones you may have broken), fix them before finishing.
70773
- - When the task is done, respond to the user with a concise summary of what was implemented, what files were changed, and any relevant details. Include links (e.g. pull request URL) so the user has everything they need.
70775
+ # Writing Tests
70776
+ Every change must include tests. Before writing them:
70777
+ - Find existing test files for the module you changed \u2014 look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
70778
+ - Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
70779
+ - Prefer extending an existing test file over creating a new one when your change is in the same module.
70780
+ - Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
70781
+ - When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
70782
+
70783
+ # Verify Changes
70784
+ Before committing or creating a PR, run through this checklist:
70785
+ 1. **Build** \u2014 run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
70786
+ 2. **Lint & typecheck** \u2014 run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
70787
+ 3. **Test** \u2014 run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
70788
+ 4. **Review** \u2014 re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
70789
+
70790
+ Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
70774
70791
 
70775
70792
  # GitHub Integration
70776
70793
  - Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
@@ -81875,6 +81892,8 @@ var init_ProbeAgent = __esm({
81875
81892
  this.tracer = options.tracer || null;
81876
81893
  this.outline = !!options.outline;
81877
81894
  this.searchDelegate = options.searchDelegate !== void 0 ? !!options.searchDelegate : true;
81895
+ this.searchDelegateProvider = options.searchDelegateProvider || null;
81896
+ this.searchDelegateModel = options.searchDelegateModel || null;
81878
81897
  this.maxResponseTokens = options.maxResponseTokens || (() => {
81879
81898
  const val = parseInt(process.env.MAX_RESPONSE_TOKENS || "0", 10);
81880
81899
  if (isNaN(val) || val < 0 || val > 2e5) {
@@ -82311,6 +82330,8 @@ var init_ProbeAgent = __esm({
82311
82330
  architectureFileName: this.architectureFileName,
82312
82331
  provider: this.clientApiProvider,
82313
82332
  model: this.clientApiModel,
82333
+ searchDelegateProvider: this.searchDelegateProvider,
82334
+ searchDelegateModel: this.searchDelegateModel,
82314
82335
  delegationManager: this.delegationManager,
82315
82336
  // Per-instance delegation limits
82316
82337
  outputBuffer: this._outputBuffer,
@@ -84225,12 +84246,6 @@ You are working with a workspace. Available paths: ${workspaceDesc}
84225
84246
  });
84226
84247
  const systemMessage = await this.getSystemMessage();
84227
84248
  let userMessage = { role: "user", content: message.trim() };
84228
- if (this.enableTasks) {
84229
- userMessage.content = userMessage.content + "\n\n" + taskGuidancePrompt;
84230
- if (this.debug) {
84231
- console.log("[DEBUG] Task guidance injected into user message");
84232
- }
84233
- }
84234
84249
  if (options.schema && !options._schemaFormatted) {
84235
84250
  const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
84236
84251
  userMessage.content = message.trim() + schemaInstructions;
@@ -86158,6 +86173,10 @@ function parseArgs() {
86158
86173
  config.provider = args[++i];
86159
86174
  } else if (arg === "--model" && i + 1 < args.length) {
86160
86175
  config.model = args[++i];
86176
+ } else if (arg === "--search-delegate-provider" && i + 1 < args.length) {
86177
+ config.searchDelegateProvider = args[++i];
86178
+ } else if (arg === "--search-delegate-model" && i + 1 < args.length) {
86179
+ config.searchDelegateModel = args[++i];
86161
86180
  } else if (arg === "--max-iterations" && i + 1 < args.length) {
86162
86181
  config.maxIterations = parseInt(args[++i], 10);
86163
86182
  } else if (arg === "--max-response-tokens" && i + 1 < args.length) {
@@ -86736,7 +86755,9 @@ async function main() {
86736
86755
  enableBash: config.enableBash,
86737
86756
  bashConfig,
86738
86757
  enableTasks: config.enableTasks,
86739
- thinkingEffort: config.thinkingEffort
86758
+ thinkingEffort: config.thinkingEffort,
86759
+ searchDelegateProvider: config.searchDelegateProvider,
86760
+ searchDelegateModel: config.searchDelegateModel
86740
86761
  };
86741
86762
  const agent = new ProbeAgent(agentConfig2);
86742
86763
  await agent.initialize();
@@ -81,8 +81,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
81
81
  - Check imports and existing utilities before creating new helpers — the project may already have what you need.
82
82
 
83
83
  # Task Planning
84
- - If the task tool is available, use it to break complex work into milestones before starting implementation.
85
- - Stay flexible if your understanding changes mid-task, add, remove, or reorganize tasks as needed. The plan should serve you, not constrain you.
84
+ When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
85
+ - Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
86
+ - Update task status to "in_progress" when starting and "completed" when done.
87
+ - All tasks must be completed or cancelled before calling attempt_completion.
88
+ - Stay flexible — add, remove, or reorganize tasks as your understanding changes.
89
+
90
+ Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
91
+
92
+ # Discovering Project Commands
93
+ Before building or testing, determine the project's toolchain:
94
+ - Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
95
+ - Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
96
+ - Read README for build/test instructions if the above are unclear
97
+ - Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
86
98
 
87
99
  # During Implementation
88
100
  - Always create a new branch before making changes to the codebase.
@@ -93,12 +105,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
93
105
  - When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) — it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
94
106
  - After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
95
107
 
96
- # After Implementation
97
- - Verify the project builds successfully. If it doesn't, fix the build before moving on.
98
- - Run lint and typecheck commands if known for the project. Fix any new warnings or errors you introduced.
99
- - Add tests for any new or changed functionality. Tests must cover the main path and important edge cases.
100
- - Run the project's full test suite. If any tests fail (including pre-existing ones you may have broken), fix them before finishing.
101
- - When the task is done, respond to the user with a concise summary of what was implemented, what files were changed, and any relevant details. Include links (e.g. pull request URL) so the user has everything they need.
108
+ # Writing Tests
109
+ Every change must include tests. Before writing them:
110
+ - Find existing test files for the module you changed look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
111
+ - Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
112
+ - Prefer extending an existing test file over creating a new one when your change is in the same module.
113
+ - Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
114
+ - When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
115
+
116
+ # Verify Changes
117
+ Before committing or creating a PR, run through this checklist:
118
+ 1. **Build** — run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
119
+ 2. **Lint & typecheck** — run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
120
+ 3. **Test** — run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
121
+ 4. **Review** — re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
122
+
123
+ Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
102
124
 
103
125
  # GitHub Integration
104
126
  - Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
@@ -268,8 +268,8 @@ export const searchTool = (options = {}) => {
268
268
  parentSessionId: sessionId,
269
269
  path: options.allowedFolders?.[0] || options.cwd || '.',
270
270
  allowedFolders: options.allowedFolders,
271
- provider: options.provider || null,
272
- model: options.model || null,
271
+ provider: options.searchDelegateProvider || process.env.PROBE_SEARCH_DELEGATE_PROVIDER || options.provider || null,
272
+ model: options.searchDelegateModel || process.env.PROBE_SEARCH_DELEGATE_MODEL || options.model || null,
273
273
  tracer: options.tracer || null,
274
274
  enableBash: false,
275
275
  bashConfig: null,
@@ -17538,7 +17538,7 @@ var require_package2 = __commonJS({
17538
17538
  module2.exports = {
17539
17539
  name: "@aws-sdk/client-bedrock-runtime",
17540
17540
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
17541
- version: "3.1002.0",
17541
+ version: "3.1003.0",
17542
17542
  scripts: {
17543
17543
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
17544
17544
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -17550,6 +17550,10 @@ var require_package2 = __commonJS({
17550
17550
  "extract:docs": "api-extractor run --local",
17551
17551
  "generate:client": "node ../../scripts/generate-clients/single-service --solo bedrock-runtime",
17552
17552
  test: "yarn g:vitest run --passWithNoTests",
17553
+ "test:browser": "yarn g:vitest run -c vitest.config.browser.e2e.mts",
17554
+ "test:browser:watch": "yarn g:vitest watch -c vitest.config.browser.e2e.mts",
17555
+ "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
17556
+ "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
17553
17557
  "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs",
17554
17558
  "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
17555
17559
  "test:integration:watch": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
@@ -17562,54 +17566,54 @@ var require_package2 = __commonJS({
17562
17566
  dependencies: {
17563
17567
  "@aws-crypto/sha256-browser": "5.2.0",
17564
17568
  "@aws-crypto/sha256-js": "5.2.0",
17565
- "@aws-sdk/core": "^3.973.17",
17566
- "@aws-sdk/credential-provider-node": "^3.972.16",
17567
- "@aws-sdk/eventstream-handler-node": "^3.972.9",
17568
- "@aws-sdk/middleware-eventstream": "^3.972.6",
17569
- "@aws-sdk/middleware-host-header": "^3.972.6",
17570
- "@aws-sdk/middleware-logger": "^3.972.6",
17571
- "@aws-sdk/middleware-recursion-detection": "^3.972.6",
17572
- "@aws-sdk/middleware-user-agent": "^3.972.17",
17573
- "@aws-sdk/middleware-websocket": "^3.972.11",
17574
- "@aws-sdk/region-config-resolver": "^3.972.6",
17575
- "@aws-sdk/token-providers": "3.1002.0",
17576
- "@aws-sdk/types": "^3.973.4",
17577
- "@aws-sdk/util-endpoints": "^3.996.3",
17578
- "@aws-sdk/util-user-agent-browser": "^3.972.6",
17579
- "@aws-sdk/util-user-agent-node": "^3.973.2",
17580
- "@smithy/config-resolver": "^4.4.9",
17581
- "@smithy/core": "^3.23.7",
17582
- "@smithy/eventstream-serde-browser": "^4.2.10",
17583
- "@smithy/eventstream-serde-config-resolver": "^4.3.10",
17584
- "@smithy/eventstream-serde-node": "^4.2.10",
17585
- "@smithy/fetch-http-handler": "^5.3.12",
17586
- "@smithy/hash-node": "^4.2.10",
17587
- "@smithy/invalid-dependency": "^4.2.10",
17588
- "@smithy/middleware-content-length": "^4.2.10",
17589
- "@smithy/middleware-endpoint": "^4.4.21",
17590
- "@smithy/middleware-retry": "^4.4.38",
17591
- "@smithy/middleware-serde": "^4.2.11",
17592
- "@smithy/middleware-stack": "^4.2.10",
17593
- "@smithy/node-config-provider": "^4.3.10",
17594
- "@smithy/node-http-handler": "^4.4.13",
17595
- "@smithy/protocol-http": "^5.3.10",
17596
- "@smithy/smithy-client": "^4.12.1",
17569
+ "@aws-sdk/core": "^3.973.18",
17570
+ "@aws-sdk/credential-provider-node": "^3.972.17",
17571
+ "@aws-sdk/eventstream-handler-node": "^3.972.10",
17572
+ "@aws-sdk/middleware-eventstream": "^3.972.7",
17573
+ "@aws-sdk/middleware-host-header": "^3.972.7",
17574
+ "@aws-sdk/middleware-logger": "^3.972.7",
17575
+ "@aws-sdk/middleware-recursion-detection": "^3.972.7",
17576
+ "@aws-sdk/middleware-user-agent": "^3.972.18",
17577
+ "@aws-sdk/middleware-websocket": "^3.972.12",
17578
+ "@aws-sdk/region-config-resolver": "^3.972.7",
17579
+ "@aws-sdk/token-providers": "3.1003.0",
17580
+ "@aws-sdk/types": "^3.973.5",
17581
+ "@aws-sdk/util-endpoints": "^3.996.4",
17582
+ "@aws-sdk/util-user-agent-browser": "^3.972.7",
17583
+ "@aws-sdk/util-user-agent-node": "^3.973.3",
17584
+ "@smithy/config-resolver": "^4.4.10",
17585
+ "@smithy/core": "^3.23.8",
17586
+ "@smithy/eventstream-serde-browser": "^4.2.11",
17587
+ "@smithy/eventstream-serde-config-resolver": "^4.3.11",
17588
+ "@smithy/eventstream-serde-node": "^4.2.11",
17589
+ "@smithy/fetch-http-handler": "^5.3.13",
17590
+ "@smithy/hash-node": "^4.2.11",
17591
+ "@smithy/invalid-dependency": "^4.2.11",
17592
+ "@smithy/middleware-content-length": "^4.2.11",
17593
+ "@smithy/middleware-endpoint": "^4.4.22",
17594
+ "@smithy/middleware-retry": "^4.4.39",
17595
+ "@smithy/middleware-serde": "^4.2.12",
17596
+ "@smithy/middleware-stack": "^4.2.11",
17597
+ "@smithy/node-config-provider": "^4.3.11",
17598
+ "@smithy/node-http-handler": "^4.4.14",
17599
+ "@smithy/protocol-http": "^5.3.11",
17600
+ "@smithy/smithy-client": "^4.12.2",
17597
17601
  "@smithy/types": "^4.13.0",
17598
- "@smithy/url-parser": "^4.2.10",
17599
- "@smithy/util-base64": "^4.3.1",
17600
- "@smithy/util-body-length-browser": "^4.2.1",
17601
- "@smithy/util-body-length-node": "^4.2.2",
17602
- "@smithy/util-defaults-mode-browser": "^4.3.37",
17603
- "@smithy/util-defaults-mode-node": "^4.2.40",
17604
- "@smithy/util-endpoints": "^3.3.1",
17605
- "@smithy/util-middleware": "^4.2.10",
17606
- "@smithy/util-retry": "^4.2.10",
17607
- "@smithy/util-stream": "^4.5.16",
17608
- "@smithy/util-utf8": "^4.2.1",
17602
+ "@smithy/url-parser": "^4.2.11",
17603
+ "@smithy/util-base64": "^4.3.2",
17604
+ "@smithy/util-body-length-browser": "^4.2.2",
17605
+ "@smithy/util-body-length-node": "^4.2.3",
17606
+ "@smithy/util-defaults-mode-browser": "^4.3.38",
17607
+ "@smithy/util-defaults-mode-node": "^4.2.41",
17608
+ "@smithy/util-endpoints": "^3.3.2",
17609
+ "@smithy/util-middleware": "^4.2.11",
17610
+ "@smithy/util-retry": "^4.2.11",
17611
+ "@smithy/util-stream": "^4.5.17",
17612
+ "@smithy/util-utf8": "^4.2.2",
17609
17613
  tslib: "^2.6.2"
17610
17614
  },
17611
17615
  devDependencies: {
17612
- "@smithy/snapshot-testing": "^1.0.8",
17616
+ "@smithy/snapshot-testing": "^1.0.9",
17613
17617
  "@tsconfig/node20": "20.1.8",
17614
17618
  "@types/node": "^20.14.8",
17615
17619
  concurrently: "7.0.0",
@@ -17622,7 +17626,7 @@ var require_package2 = __commonJS({
17622
17626
  node: ">=20.0.0"
17623
17627
  },
17624
17628
  typesVersions: {
17625
- "<4.0": {
17629
+ "<4.5": {
17626
17630
  "dist-types/*": [
17627
17631
  "dist-types/ts3.4/*"
17628
17632
  ]
@@ -18325,7 +18329,7 @@ var init_package = __esm({
18325
18329
  "node_modules/@aws-sdk/nested-clients/package.json"() {
18326
18330
  package_default = {
18327
18331
  name: "@aws-sdk/nested-clients",
18328
- version: "3.996.5",
18332
+ version: "3.996.6",
18329
18333
  description: "Nested clients for AWS SDK packages.",
18330
18334
  main: "./dist-cjs/index.js",
18331
18335
  module: "./dist-es/index.js",
@@ -18354,41 +18358,41 @@ var init_package = __esm({
18354
18358
  dependencies: {
18355
18359
  "@aws-crypto/sha256-browser": "5.2.0",
18356
18360
  "@aws-crypto/sha256-js": "5.2.0",
18357
- "@aws-sdk/core": "^3.973.17",
18358
- "@aws-sdk/middleware-host-header": "^3.972.6",
18359
- "@aws-sdk/middleware-logger": "^3.972.6",
18360
- "@aws-sdk/middleware-recursion-detection": "^3.972.6",
18361
- "@aws-sdk/middleware-user-agent": "^3.972.17",
18362
- "@aws-sdk/region-config-resolver": "^3.972.6",
18363
- "@aws-sdk/types": "^3.973.4",
18364
- "@aws-sdk/util-endpoints": "^3.996.3",
18365
- "@aws-sdk/util-user-agent-browser": "^3.972.6",
18366
- "@aws-sdk/util-user-agent-node": "^3.973.2",
18367
- "@smithy/config-resolver": "^4.4.9",
18368
- "@smithy/core": "^3.23.7",
18369
- "@smithy/fetch-http-handler": "^5.3.12",
18370
- "@smithy/hash-node": "^4.2.10",
18371
- "@smithy/invalid-dependency": "^4.2.10",
18372
- "@smithy/middleware-content-length": "^4.2.10",
18373
- "@smithy/middleware-endpoint": "^4.4.21",
18374
- "@smithy/middleware-retry": "^4.4.38",
18375
- "@smithy/middleware-serde": "^4.2.11",
18376
- "@smithy/middleware-stack": "^4.2.10",
18377
- "@smithy/node-config-provider": "^4.3.10",
18378
- "@smithy/node-http-handler": "^4.4.13",
18379
- "@smithy/protocol-http": "^5.3.10",
18380
- "@smithy/smithy-client": "^4.12.1",
18361
+ "@aws-sdk/core": "^3.973.18",
18362
+ "@aws-sdk/middleware-host-header": "^3.972.7",
18363
+ "@aws-sdk/middleware-logger": "^3.972.7",
18364
+ "@aws-sdk/middleware-recursion-detection": "^3.972.7",
18365
+ "@aws-sdk/middleware-user-agent": "^3.972.18",
18366
+ "@aws-sdk/region-config-resolver": "^3.972.7",
18367
+ "@aws-sdk/types": "^3.973.5",
18368
+ "@aws-sdk/util-endpoints": "^3.996.4",
18369
+ "@aws-sdk/util-user-agent-browser": "^3.972.7",
18370
+ "@aws-sdk/util-user-agent-node": "^3.973.3",
18371
+ "@smithy/config-resolver": "^4.4.10",
18372
+ "@smithy/core": "^3.23.8",
18373
+ "@smithy/fetch-http-handler": "^5.3.13",
18374
+ "@smithy/hash-node": "^4.2.11",
18375
+ "@smithy/invalid-dependency": "^4.2.11",
18376
+ "@smithy/middleware-content-length": "^4.2.11",
18377
+ "@smithy/middleware-endpoint": "^4.4.22",
18378
+ "@smithy/middleware-retry": "^4.4.39",
18379
+ "@smithy/middleware-serde": "^4.2.12",
18380
+ "@smithy/middleware-stack": "^4.2.11",
18381
+ "@smithy/node-config-provider": "^4.3.11",
18382
+ "@smithy/node-http-handler": "^4.4.14",
18383
+ "@smithy/protocol-http": "^5.3.11",
18384
+ "@smithy/smithy-client": "^4.12.2",
18381
18385
  "@smithy/types": "^4.13.0",
18382
- "@smithy/url-parser": "^4.2.10",
18383
- "@smithy/util-base64": "^4.3.1",
18384
- "@smithy/util-body-length-browser": "^4.2.1",
18385
- "@smithy/util-body-length-node": "^4.2.2",
18386
- "@smithy/util-defaults-mode-browser": "^4.3.37",
18387
- "@smithy/util-defaults-mode-node": "^4.2.40",
18388
- "@smithy/util-endpoints": "^3.3.1",
18389
- "@smithy/util-middleware": "^4.2.10",
18390
- "@smithy/util-retry": "^4.2.10",
18391
- "@smithy/util-utf8": "^4.2.1",
18386
+ "@smithy/url-parser": "^4.2.11",
18387
+ "@smithy/util-base64": "^4.3.2",
18388
+ "@smithy/util-body-length-browser": "^4.2.2",
18389
+ "@smithy/util-body-length-node": "^4.2.3",
18390
+ "@smithy/util-defaults-mode-browser": "^4.3.38",
18391
+ "@smithy/util-defaults-mode-node": "^4.2.41",
18392
+ "@smithy/util-endpoints": "^3.3.2",
18393
+ "@smithy/util-middleware": "^4.2.11",
18394
+ "@smithy/util-retry": "^4.2.11",
18395
+ "@smithy/util-utf8": "^4.2.2",
18392
18396
  tslib: "^2.6.2"
18393
18397
  },
18394
18398
  devDependencies: {
@@ -18398,7 +18402,7 @@ var init_package = __esm({
18398
18402
  typescript: "~5.8.3"
18399
18403
  },
18400
18404
  typesVersions: {
18401
- "<4.0": {
18405
+ "<4.5": {
18402
18406
  "dist-types/*": [
18403
18407
  "dist-types/ts3.4/*"
18404
18408
  ]
@@ -18418,8 +18422,10 @@ var init_package = __esm({
18418
18422
  "dist-*/**"
18419
18423
  ],
18420
18424
  browser: {
18425
+ "./dist-es/submodules/cognito-identity/runtimeConfig": "./dist-es/submodules/cognito-identity/runtimeConfig.browser",
18421
18426
  "./dist-es/submodules/signin/runtimeConfig": "./dist-es/submodules/signin/runtimeConfig.browser",
18422
18427
  "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser",
18428
+ "./dist-es/submodules/sso/runtimeConfig": "./dist-es/submodules/sso/runtimeConfig.browser",
18423
18429
  "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser"
18424
18430
  },
18425
18431
  "react-native": {},
@@ -36642,8 +36648,8 @@ var init_vercel = __esm({
36642
36648
  parentSessionId: sessionId,
36643
36649
  path: options.allowedFolders?.[0] || options.cwd || ".",
36644
36650
  allowedFolders: options.allowedFolders,
36645
- provider: options.provider || null,
36646
- model: options.model || null,
36651
+ provider: options.searchDelegateProvider || process.env.PROBE_SEARCH_DELEGATE_PROVIDER || options.provider || null,
36652
+ model: options.searchDelegateModel || process.env.PROBE_SEARCH_DELEGATE_MODEL || options.model || null,
36647
36653
  tracer: options.tracer || null,
36648
36654
  enableBash: false,
36649
36655
  bashConfig: null,
@@ -58872,7 +58878,7 @@ ${taskManager.formatTasksForPrompt()}`;
58872
58878
  }
58873
58879
  };
58874
58880
  }
58875
- var taskItemSchema, taskSchema, taskSystemPrompt, taskGuidancePrompt;
58881
+ var taskItemSchema, taskSchema, taskSystemPrompt;
58876
58882
  var init_taskTool = __esm({
58877
58883
  "src/agent/tasks/taskTool.js"() {
58878
58884
  "use strict";
@@ -58933,11 +58939,6 @@ Tasks = logical units of work, not files or steps.
58933
58939
  - Circular dependencies are rejected
58934
58940
  - attempt_completion is blocked while tasks remain unresolved
58935
58941
  `;
58936
- taskGuidancePrompt = `Does this request have MULTIPLE DISTINCT GOALS?
58937
- - "Do A AND B AND C" (multiple goals) \u2192 Create tasks for each goal
58938
- - "Investigate/explain/find X" (single goal) \u2192 Skip tasks, just answer directly
58939
- Multiple internal steps for ONE goal = NO tasks needed.
58940
- If creating tasks, use the task tool with action="create" first.`;
58941
58942
  }
58942
58943
  });
58943
58944
 
@@ -97694,8 +97695,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
97694
97695
  - Check imports and existing utilities before creating new helpers \u2014 the project may already have what you need.
97695
97696
 
97696
97697
  # Task Planning
97697
- - If the task tool is available, use it to break complex work into milestones before starting implementation.
97698
- - Stay flexible \u2014 if your understanding changes mid-task, add, remove, or reorganize tasks as needed. The plan should serve you, not constrain you.
97698
+ When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
97699
+ - Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
97700
+ - Update task status to "in_progress" when starting and "completed" when done.
97701
+ - All tasks must be completed or cancelled before calling attempt_completion.
97702
+ - Stay flexible \u2014 add, remove, or reorganize tasks as your understanding changes.
97703
+
97704
+ Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
97705
+
97706
+ # Discovering Project Commands
97707
+ Before building or testing, determine the project's toolchain:
97708
+ - Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
97709
+ - Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
97710
+ - Read README for build/test instructions if the above are unclear
97711
+ - Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
97699
97712
 
97700
97713
  # During Implementation
97701
97714
  - Always create a new branch before making changes to the codebase.
@@ -97706,12 +97719,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
97706
97719
  - When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) \u2014 it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
97707
97720
  - After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
97708
97721
 
97709
- # After Implementation
97710
- - Verify the project builds successfully. If it doesn't, fix the build before moving on.
97711
- - Run lint and typecheck commands if known for the project. Fix any new warnings or errors you introduced.
97712
- - Add tests for any new or changed functionality. Tests must cover the main path and important edge cases.
97713
- - Run the project's full test suite. If any tests fail (including pre-existing ones you may have broken), fix them before finishing.
97714
- - When the task is done, respond to the user with a concise summary of what was implemented, what files were changed, and any relevant details. Include links (e.g. pull request URL) so the user has everything they need.
97722
+ # Writing Tests
97723
+ Every change must include tests. Before writing them:
97724
+ - Find existing test files for the module you changed \u2014 look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
97725
+ - Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
97726
+ - Prefer extending an existing test file over creating a new one when your change is in the same module.
97727
+ - Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
97728
+ - When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
97729
+
97730
+ # Verify Changes
97731
+ Before committing or creating a PR, run through this checklist:
97732
+ 1. **Build** \u2014 run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
97733
+ 2. **Lint & typecheck** \u2014 run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
97734
+ 3. **Test** \u2014 run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
97735
+ 4. **Review** \u2014 re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
97736
+
97737
+ Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
97715
97738
 
97716
97739
  # GitHub Integration
97717
97740
  - Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
@@ -108815,6 +108838,8 @@ var init_ProbeAgent = __esm({
108815
108838
  this.tracer = options.tracer || null;
108816
108839
  this.outline = !!options.outline;
108817
108840
  this.searchDelegate = options.searchDelegate !== void 0 ? !!options.searchDelegate : true;
108841
+ this.searchDelegateProvider = options.searchDelegateProvider || null;
108842
+ this.searchDelegateModel = options.searchDelegateModel || null;
108818
108843
  this.maxResponseTokens = options.maxResponseTokens || (() => {
108819
108844
  const val = parseInt(process.env.MAX_RESPONSE_TOKENS || "0", 10);
108820
108845
  if (isNaN(val) || val < 0 || val > 2e5) {
@@ -109251,6 +109276,8 @@ var init_ProbeAgent = __esm({
109251
109276
  architectureFileName: this.architectureFileName,
109252
109277
  provider: this.clientApiProvider,
109253
109278
  model: this.clientApiModel,
109279
+ searchDelegateProvider: this.searchDelegateProvider,
109280
+ searchDelegateModel: this.searchDelegateModel,
109254
109281
  delegationManager: this.delegationManager,
109255
109282
  // Per-instance delegation limits
109256
109283
  outputBuffer: this._outputBuffer,
@@ -111165,12 +111192,6 @@ You are working with a workspace. Available paths: ${workspaceDesc}
111165
111192
  });
111166
111193
  const systemMessage = await this.getSystemMessage();
111167
111194
  let userMessage = { role: "user", content: message.trim() };
111168
- if (this.enableTasks) {
111169
- userMessage.content = userMessage.content + "\n\n" + taskGuidancePrompt;
111170
- if (this.debug) {
111171
- console.log("[DEBUG] Task guidance injected into user message");
111172
- }
111173
- }
111174
111195
  if (options.schema && !options._schemaFormatted) {
111175
111196
  const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
111176
111197
  userMessage.content = message.trim() + schemaInstructions;
package/cjs/index.cjs CHANGED
@@ -19395,7 +19395,7 @@ var require_package2 = __commonJS({
19395
19395
  module2.exports = {
19396
19396
  name: "@aws-sdk/client-bedrock-runtime",
19397
19397
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
19398
- version: "3.1002.0",
19398
+ version: "3.1003.0",
19399
19399
  scripts: {
19400
19400
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
19401
19401
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -19407,6 +19407,10 @@ var require_package2 = __commonJS({
19407
19407
  "extract:docs": "api-extractor run --local",
19408
19408
  "generate:client": "node ../../scripts/generate-clients/single-service --solo bedrock-runtime",
19409
19409
  test: "yarn g:vitest run --passWithNoTests",
19410
+ "test:browser": "yarn g:vitest run -c vitest.config.browser.e2e.mts",
19411
+ "test:browser:watch": "yarn g:vitest watch -c vitest.config.browser.e2e.mts",
19412
+ "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts",
19413
+ "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
19410
19414
  "test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs",
19411
19415
  "test:integration": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
19412
19416
  "test:integration:watch": "yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts",
@@ -19419,54 +19423,54 @@ var require_package2 = __commonJS({
19419
19423
  dependencies: {
19420
19424
  "@aws-crypto/sha256-browser": "5.2.0",
19421
19425
  "@aws-crypto/sha256-js": "5.2.0",
19422
- "@aws-sdk/core": "^3.973.17",
19423
- "@aws-sdk/credential-provider-node": "^3.972.16",
19424
- "@aws-sdk/eventstream-handler-node": "^3.972.9",
19425
- "@aws-sdk/middleware-eventstream": "^3.972.6",
19426
- "@aws-sdk/middleware-host-header": "^3.972.6",
19427
- "@aws-sdk/middleware-logger": "^3.972.6",
19428
- "@aws-sdk/middleware-recursion-detection": "^3.972.6",
19429
- "@aws-sdk/middleware-user-agent": "^3.972.17",
19430
- "@aws-sdk/middleware-websocket": "^3.972.11",
19431
- "@aws-sdk/region-config-resolver": "^3.972.6",
19432
- "@aws-sdk/token-providers": "3.1002.0",
19433
- "@aws-sdk/types": "^3.973.4",
19434
- "@aws-sdk/util-endpoints": "^3.996.3",
19435
- "@aws-sdk/util-user-agent-browser": "^3.972.6",
19436
- "@aws-sdk/util-user-agent-node": "^3.973.2",
19437
- "@smithy/config-resolver": "^4.4.9",
19438
- "@smithy/core": "^3.23.7",
19439
- "@smithy/eventstream-serde-browser": "^4.2.10",
19440
- "@smithy/eventstream-serde-config-resolver": "^4.3.10",
19441
- "@smithy/eventstream-serde-node": "^4.2.10",
19442
- "@smithy/fetch-http-handler": "^5.3.12",
19443
- "@smithy/hash-node": "^4.2.10",
19444
- "@smithy/invalid-dependency": "^4.2.10",
19445
- "@smithy/middleware-content-length": "^4.2.10",
19446
- "@smithy/middleware-endpoint": "^4.4.21",
19447
- "@smithy/middleware-retry": "^4.4.38",
19448
- "@smithy/middleware-serde": "^4.2.11",
19449
- "@smithy/middleware-stack": "^4.2.10",
19450
- "@smithy/node-config-provider": "^4.3.10",
19451
- "@smithy/node-http-handler": "^4.4.13",
19452
- "@smithy/protocol-http": "^5.3.10",
19453
- "@smithy/smithy-client": "^4.12.1",
19426
+ "@aws-sdk/core": "^3.973.18",
19427
+ "@aws-sdk/credential-provider-node": "^3.972.17",
19428
+ "@aws-sdk/eventstream-handler-node": "^3.972.10",
19429
+ "@aws-sdk/middleware-eventstream": "^3.972.7",
19430
+ "@aws-sdk/middleware-host-header": "^3.972.7",
19431
+ "@aws-sdk/middleware-logger": "^3.972.7",
19432
+ "@aws-sdk/middleware-recursion-detection": "^3.972.7",
19433
+ "@aws-sdk/middleware-user-agent": "^3.972.18",
19434
+ "@aws-sdk/middleware-websocket": "^3.972.12",
19435
+ "@aws-sdk/region-config-resolver": "^3.972.7",
19436
+ "@aws-sdk/token-providers": "3.1003.0",
19437
+ "@aws-sdk/types": "^3.973.5",
19438
+ "@aws-sdk/util-endpoints": "^3.996.4",
19439
+ "@aws-sdk/util-user-agent-browser": "^3.972.7",
19440
+ "@aws-sdk/util-user-agent-node": "^3.973.3",
19441
+ "@smithy/config-resolver": "^4.4.10",
19442
+ "@smithy/core": "^3.23.8",
19443
+ "@smithy/eventstream-serde-browser": "^4.2.11",
19444
+ "@smithy/eventstream-serde-config-resolver": "^4.3.11",
19445
+ "@smithy/eventstream-serde-node": "^4.2.11",
19446
+ "@smithy/fetch-http-handler": "^5.3.13",
19447
+ "@smithy/hash-node": "^4.2.11",
19448
+ "@smithy/invalid-dependency": "^4.2.11",
19449
+ "@smithy/middleware-content-length": "^4.2.11",
19450
+ "@smithy/middleware-endpoint": "^4.4.22",
19451
+ "@smithy/middleware-retry": "^4.4.39",
19452
+ "@smithy/middleware-serde": "^4.2.12",
19453
+ "@smithy/middleware-stack": "^4.2.11",
19454
+ "@smithy/node-config-provider": "^4.3.11",
19455
+ "@smithy/node-http-handler": "^4.4.14",
19456
+ "@smithy/protocol-http": "^5.3.11",
19457
+ "@smithy/smithy-client": "^4.12.2",
19454
19458
  "@smithy/types": "^4.13.0",
19455
- "@smithy/url-parser": "^4.2.10",
19456
- "@smithy/util-base64": "^4.3.1",
19457
- "@smithy/util-body-length-browser": "^4.2.1",
19458
- "@smithy/util-body-length-node": "^4.2.2",
19459
- "@smithy/util-defaults-mode-browser": "^4.3.37",
19460
- "@smithy/util-defaults-mode-node": "^4.2.40",
19461
- "@smithy/util-endpoints": "^3.3.1",
19462
- "@smithy/util-middleware": "^4.2.10",
19463
- "@smithy/util-retry": "^4.2.10",
19464
- "@smithy/util-stream": "^4.5.16",
19465
- "@smithy/util-utf8": "^4.2.1",
19459
+ "@smithy/url-parser": "^4.2.11",
19460
+ "@smithy/util-base64": "^4.3.2",
19461
+ "@smithy/util-body-length-browser": "^4.2.2",
19462
+ "@smithy/util-body-length-node": "^4.2.3",
19463
+ "@smithy/util-defaults-mode-browser": "^4.3.38",
19464
+ "@smithy/util-defaults-mode-node": "^4.2.41",
19465
+ "@smithy/util-endpoints": "^3.3.2",
19466
+ "@smithy/util-middleware": "^4.2.11",
19467
+ "@smithy/util-retry": "^4.2.11",
19468
+ "@smithy/util-stream": "^4.5.17",
19469
+ "@smithy/util-utf8": "^4.2.2",
19466
19470
  tslib: "^2.6.2"
19467
19471
  },
19468
19472
  devDependencies: {
19469
- "@smithy/snapshot-testing": "^1.0.8",
19473
+ "@smithy/snapshot-testing": "^1.0.9",
19470
19474
  "@tsconfig/node20": "20.1.8",
19471
19475
  "@types/node": "^20.14.8",
19472
19476
  concurrently: "7.0.0",
@@ -19479,7 +19483,7 @@ var require_package2 = __commonJS({
19479
19483
  node: ">=20.0.0"
19480
19484
  },
19481
19485
  typesVersions: {
19482
- "<4.0": {
19486
+ "<4.5": {
19483
19487
  "dist-types/*": [
19484
19488
  "dist-types/ts3.4/*"
19485
19489
  ]
@@ -20182,7 +20186,7 @@ var init_package = __esm({
20182
20186
  "node_modules/@aws-sdk/nested-clients/package.json"() {
20183
20187
  package_default = {
20184
20188
  name: "@aws-sdk/nested-clients",
20185
- version: "3.996.5",
20189
+ version: "3.996.6",
20186
20190
  description: "Nested clients for AWS SDK packages.",
20187
20191
  main: "./dist-cjs/index.js",
20188
20192
  module: "./dist-es/index.js",
@@ -20211,41 +20215,41 @@ var init_package = __esm({
20211
20215
  dependencies: {
20212
20216
  "@aws-crypto/sha256-browser": "5.2.0",
20213
20217
  "@aws-crypto/sha256-js": "5.2.0",
20214
- "@aws-sdk/core": "^3.973.17",
20215
- "@aws-sdk/middleware-host-header": "^3.972.6",
20216
- "@aws-sdk/middleware-logger": "^3.972.6",
20217
- "@aws-sdk/middleware-recursion-detection": "^3.972.6",
20218
- "@aws-sdk/middleware-user-agent": "^3.972.17",
20219
- "@aws-sdk/region-config-resolver": "^3.972.6",
20220
- "@aws-sdk/types": "^3.973.4",
20221
- "@aws-sdk/util-endpoints": "^3.996.3",
20222
- "@aws-sdk/util-user-agent-browser": "^3.972.6",
20223
- "@aws-sdk/util-user-agent-node": "^3.973.2",
20224
- "@smithy/config-resolver": "^4.4.9",
20225
- "@smithy/core": "^3.23.7",
20226
- "@smithy/fetch-http-handler": "^5.3.12",
20227
- "@smithy/hash-node": "^4.2.10",
20228
- "@smithy/invalid-dependency": "^4.2.10",
20229
- "@smithy/middleware-content-length": "^4.2.10",
20230
- "@smithy/middleware-endpoint": "^4.4.21",
20231
- "@smithy/middleware-retry": "^4.4.38",
20232
- "@smithy/middleware-serde": "^4.2.11",
20233
- "@smithy/middleware-stack": "^4.2.10",
20234
- "@smithy/node-config-provider": "^4.3.10",
20235
- "@smithy/node-http-handler": "^4.4.13",
20236
- "@smithy/protocol-http": "^5.3.10",
20237
- "@smithy/smithy-client": "^4.12.1",
20218
+ "@aws-sdk/core": "^3.973.18",
20219
+ "@aws-sdk/middleware-host-header": "^3.972.7",
20220
+ "@aws-sdk/middleware-logger": "^3.972.7",
20221
+ "@aws-sdk/middleware-recursion-detection": "^3.972.7",
20222
+ "@aws-sdk/middleware-user-agent": "^3.972.18",
20223
+ "@aws-sdk/region-config-resolver": "^3.972.7",
20224
+ "@aws-sdk/types": "^3.973.5",
20225
+ "@aws-sdk/util-endpoints": "^3.996.4",
20226
+ "@aws-sdk/util-user-agent-browser": "^3.972.7",
20227
+ "@aws-sdk/util-user-agent-node": "^3.973.3",
20228
+ "@smithy/config-resolver": "^4.4.10",
20229
+ "@smithy/core": "^3.23.8",
20230
+ "@smithy/fetch-http-handler": "^5.3.13",
20231
+ "@smithy/hash-node": "^4.2.11",
20232
+ "@smithy/invalid-dependency": "^4.2.11",
20233
+ "@smithy/middleware-content-length": "^4.2.11",
20234
+ "@smithy/middleware-endpoint": "^4.4.22",
20235
+ "@smithy/middleware-retry": "^4.4.39",
20236
+ "@smithy/middleware-serde": "^4.2.12",
20237
+ "@smithy/middleware-stack": "^4.2.11",
20238
+ "@smithy/node-config-provider": "^4.3.11",
20239
+ "@smithy/node-http-handler": "^4.4.14",
20240
+ "@smithy/protocol-http": "^5.3.11",
20241
+ "@smithy/smithy-client": "^4.12.2",
20238
20242
  "@smithy/types": "^4.13.0",
20239
- "@smithy/url-parser": "^4.2.10",
20240
- "@smithy/util-base64": "^4.3.1",
20241
- "@smithy/util-body-length-browser": "^4.2.1",
20242
- "@smithy/util-body-length-node": "^4.2.2",
20243
- "@smithy/util-defaults-mode-browser": "^4.3.37",
20244
- "@smithy/util-defaults-mode-node": "^4.2.40",
20245
- "@smithy/util-endpoints": "^3.3.1",
20246
- "@smithy/util-middleware": "^4.2.10",
20247
- "@smithy/util-retry": "^4.2.10",
20248
- "@smithy/util-utf8": "^4.2.1",
20243
+ "@smithy/url-parser": "^4.2.11",
20244
+ "@smithy/util-base64": "^4.3.2",
20245
+ "@smithy/util-body-length-browser": "^4.2.2",
20246
+ "@smithy/util-body-length-node": "^4.2.3",
20247
+ "@smithy/util-defaults-mode-browser": "^4.3.38",
20248
+ "@smithy/util-defaults-mode-node": "^4.2.41",
20249
+ "@smithy/util-endpoints": "^3.3.2",
20250
+ "@smithy/util-middleware": "^4.2.11",
20251
+ "@smithy/util-retry": "^4.2.11",
20252
+ "@smithy/util-utf8": "^4.2.2",
20249
20253
  tslib: "^2.6.2"
20250
20254
  },
20251
20255
  devDependencies: {
@@ -20255,7 +20259,7 @@ var init_package = __esm({
20255
20259
  typescript: "~5.8.3"
20256
20260
  },
20257
20261
  typesVersions: {
20258
- "<4.0": {
20262
+ "<4.5": {
20259
20263
  "dist-types/*": [
20260
20264
  "dist-types/ts3.4/*"
20261
20265
  ]
@@ -20275,8 +20279,10 @@ var init_package = __esm({
20275
20279
  "dist-*/**"
20276
20280
  ],
20277
20281
  browser: {
20282
+ "./dist-es/submodules/cognito-identity/runtimeConfig": "./dist-es/submodules/cognito-identity/runtimeConfig.browser",
20278
20283
  "./dist-es/submodules/signin/runtimeConfig": "./dist-es/submodules/signin/runtimeConfig.browser",
20279
20284
  "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser",
20285
+ "./dist-es/submodules/sso/runtimeConfig": "./dist-es/submodules/sso/runtimeConfig.browser",
20280
20286
  "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser"
20281
20287
  },
20282
20288
  "react-native": {},
@@ -36114,7 +36120,7 @@ ${taskManager.formatTasksForPrompt()}`;
36114
36120
  }
36115
36121
  };
36116
36122
  }
36117
- var taskItemSchema, taskSchema, taskSystemPrompt, taskGuidancePrompt;
36123
+ var taskItemSchema, taskSchema, taskSystemPrompt;
36118
36124
  var init_taskTool = __esm({
36119
36125
  "src/agent/tasks/taskTool.js"() {
36120
36126
  "use strict";
@@ -36175,11 +36181,6 @@ Tasks = logical units of work, not files or steps.
36175
36181
  - Circular dependencies are rejected
36176
36182
  - attempt_completion is blocked while tasks remain unresolved
36177
36183
  `;
36178
- taskGuidancePrompt = `Does this request have MULTIPLE DISTINCT GOALS?
36179
- - "Do A AND B AND C" (multiple goals) \u2192 Create tasks for each goal
36180
- - "Investigate/explain/find X" (single goal) \u2192 Skip tasks, just answer directly
36181
- Multiple internal steps for ONE goal = NO tasks needed.
36182
- If creating tasks, use the task tool with action="create" first.`;
36183
36184
  }
36184
36185
  });
36185
36186
 
@@ -82665,8 +82666,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
82665
82666
  - Check imports and existing utilities before creating new helpers \u2014 the project may already have what you need.
82666
82667
 
82667
82668
  # Task Planning
82668
- - If the task tool is available, use it to break complex work into milestones before starting implementation.
82669
- - Stay flexible \u2014 if your understanding changes mid-task, add, remove, or reorganize tasks as needed. The plan should serve you, not constrain you.
82669
+ When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
82670
+ - Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
82671
+ - Update task status to "in_progress" when starting and "completed" when done.
82672
+ - All tasks must be completed or cancelled before calling attempt_completion.
82673
+ - Stay flexible \u2014 add, remove, or reorganize tasks as your understanding changes.
82674
+
82675
+ Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
82676
+
82677
+ # Discovering Project Commands
82678
+ Before building or testing, determine the project's toolchain:
82679
+ - Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
82680
+ - Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
82681
+ - Read README for build/test instructions if the above are unclear
82682
+ - Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
82670
82683
 
82671
82684
  # During Implementation
82672
82685
  - Always create a new branch before making changes to the codebase.
@@ -82677,12 +82690,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
82677
82690
  - When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) \u2014 it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
82678
82691
  - After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
82679
82692
 
82680
- # After Implementation
82681
- - Verify the project builds successfully. If it doesn't, fix the build before moving on.
82682
- - Run lint and typecheck commands if known for the project. Fix any new warnings or errors you introduced.
82683
- - Add tests for any new or changed functionality. Tests must cover the main path and important edge cases.
82684
- - Run the project's full test suite. If any tests fail (including pre-existing ones you may have broken), fix them before finishing.
82685
- - When the task is done, respond to the user with a concise summary of what was implemented, what files were changed, and any relevant details. Include links (e.g. pull request URL) so the user has everything they need.
82693
+ # Writing Tests
82694
+ Every change must include tests. Before writing them:
82695
+ - Find existing test files for the module you changed \u2014 look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
82696
+ - Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
82697
+ - Prefer extending an existing test file over creating a new one when your change is in the same module.
82698
+ - Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
82699
+ - When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
82700
+
82701
+ # Verify Changes
82702
+ Before committing or creating a PR, run through this checklist:
82703
+ 1. **Build** \u2014 run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
82704
+ 2. **Lint & typecheck** \u2014 run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
82705
+ 3. **Test** \u2014 run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
82706
+ 4. **Review** \u2014 re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
82707
+
82708
+ Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
82686
82709
 
82687
82710
  # GitHub Integration
82688
82711
  - Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
@@ -106066,6 +106089,8 @@ var init_ProbeAgent = __esm({
106066
106089
  this.tracer = options.tracer || null;
106067
106090
  this.outline = !!options.outline;
106068
106091
  this.searchDelegate = options.searchDelegate !== void 0 ? !!options.searchDelegate : true;
106092
+ this.searchDelegateProvider = options.searchDelegateProvider || null;
106093
+ this.searchDelegateModel = options.searchDelegateModel || null;
106069
106094
  this.maxResponseTokens = options.maxResponseTokens || (() => {
106070
106095
  const val = parseInt(process.env.MAX_RESPONSE_TOKENS || "0", 10);
106071
106096
  if (isNaN(val) || val < 0 || val > 2e5) {
@@ -106502,6 +106527,8 @@ var init_ProbeAgent = __esm({
106502
106527
  architectureFileName: this.architectureFileName,
106503
106528
  provider: this.clientApiProvider,
106504
106529
  model: this.clientApiModel,
106530
+ searchDelegateProvider: this.searchDelegateProvider,
106531
+ searchDelegateModel: this.searchDelegateModel,
106505
106532
  delegationManager: this.delegationManager,
106506
106533
  // Per-instance delegation limits
106507
106534
  outputBuffer: this._outputBuffer,
@@ -108416,12 +108443,6 @@ You are working with a workspace. Available paths: ${workspaceDesc}
108416
108443
  });
108417
108444
  const systemMessage = await this.getSystemMessage();
108418
108445
  let userMessage = { role: "user", content: message.trim() };
108419
- if (this.enableTasks) {
108420
- userMessage.content = userMessage.content + "\n\n" + taskGuidancePrompt;
108421
- if (this.debug) {
108422
- console.log("[DEBUG] Task guidance injected into user message");
108423
- }
108424
- }
108425
108446
  if (options.schema && !options._schemaFormatted) {
108426
108447
  const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
108427
108448
  userMessage.content = message.trim() + schemaInstructions;
@@ -110716,8 +110737,8 @@ var init_vercel = __esm({
110716
110737
  parentSessionId: sessionId,
110717
110738
  path: options.allowedFolders?.[0] || options.cwd || ".",
110718
110739
  allowedFolders: options.allowedFolders,
110719
- provider: options.provider || null,
110720
- model: options.model || null,
110740
+ provider: options.searchDelegateProvider || process.env.PROBE_SEARCH_DELEGATE_PROVIDER || options.provider || null,
110741
+ model: options.searchDelegateModel || process.env.PROBE_SEARCH_DELEGATE_MODEL || options.model || null,
110721
110742
  tracer: options.tracer || null,
110722
110743
  enableBash: false,
110723
110744
  bashConfig: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@probelabs/probe",
3
- "version": "0.6.0-rc276",
3
+ "version": "0.6.0-rc278",
4
4
  "description": "Node.js wrapper for the probe code search tool",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -104,7 +104,6 @@ import {
104
104
  TaskManager,
105
105
  createTaskTool,
106
106
  taskSystemPrompt,
107
- taskGuidancePrompt,
108
107
  createTaskCompletionBlockedMessage
109
108
  } from './tasks/index.js';
110
109
  import { z } from 'zod';
@@ -197,6 +196,8 @@ export class ProbeAgent {
197
196
  this.tracer = options.tracer || null;
198
197
  this.outline = !!options.outline;
199
198
  this.searchDelegate = options.searchDelegate !== undefined ? !!options.searchDelegate : true;
199
+ this.searchDelegateProvider = options.searchDelegateProvider || null;
200
+ this.searchDelegateModel = options.searchDelegateModel || null;
200
201
  this.maxResponseTokens = options.maxResponseTokens || (() => {
201
202
  const val = parseInt(process.env.MAX_RESPONSE_TOKENS || '0', 10);
202
203
  if (isNaN(val) || val < 0 || val > 200000) {
@@ -788,6 +789,8 @@ export class ProbeAgent {
788
789
  architectureFileName: this.architectureFileName,
789
790
  provider: this.clientApiProvider,
790
791
  model: this.clientApiModel,
792
+ searchDelegateProvider: this.searchDelegateProvider,
793
+ searchDelegateModel: this.searchDelegateModel,
791
794
  delegationManager: this.delegationManager, // Per-instance delegation limits
792
795
  outputBuffer: this._outputBuffer,
793
796
  concurrencyLimiter: this.concurrencyLimiter, // Global AI concurrency limiter
@@ -3149,14 +3152,6 @@ Follow these instructions carefully:
3149
3152
  // Create user message with optional image support
3150
3153
  let userMessage = { role: 'user', content: message.trim() };
3151
3154
 
3152
- // START CHECKPOINT: Inject task guidance if tasks are enabled
3153
- if (this.enableTasks) {
3154
- userMessage.content = userMessage.content + '\n\n' + taskGuidancePrompt;
3155
- if (this.debug) {
3156
- console.log('[DEBUG] Task guidance injected into user message');
3157
- }
3158
- }
3159
-
3160
3155
  // If schema is provided, prepend JSON format requirement to user message
3161
3156
  if (options.schema && !options._schemaFormatted) {
3162
3157
  const schemaInstructions = generateSchemaInstructions(options.schema, { debug: this.debug });
@@ -194,6 +194,10 @@ function parseArgs() {
194
194
  config.provider = args[++i];
195
195
  } else if (arg === '--model' && i + 1 < args.length) {
196
196
  config.model = args[++i];
197
+ } else if (arg === '--search-delegate-provider' && i + 1 < args.length) {
198
+ config.searchDelegateProvider = args[++i];
199
+ } else if (arg === '--search-delegate-model' && i + 1 < args.length) {
200
+ config.searchDelegateModel = args[++i];
197
201
  } else if (arg === '--max-iterations' && i + 1 < args.length) {
198
202
  config.maxIterations = parseInt(args[++i], 10);
199
203
  } else if (arg === '--max-response-tokens' && i + 1 < args.length) {
@@ -872,7 +876,9 @@ async function main() {
872
876
  enableBash: config.enableBash,
873
877
  bashConfig: bashConfig,
874
878
  enableTasks: config.enableTasks,
875
- thinkingEffort: config.thinkingEffort
879
+ thinkingEffort: config.thinkingEffort,
880
+ searchDelegateProvider: config.searchDelegateProvider,
881
+ searchDelegateModel: config.searchDelegateModel
876
882
  };
877
883
 
878
884
  const agent = new ProbeAgent(agentConfig);
@@ -81,8 +81,20 @@ If the solution is clear, you can jump to implementation right away. If not, ask
81
81
  - Check imports and existing utilities before creating new helpers — the project may already have what you need.
82
82
 
83
83
  # Task Planning
84
- - If the task tool is available, use it to break complex work into milestones before starting implementation.
85
- - Stay flexible if your understanding changes mid-task, add, remove, or reorganize tasks as needed. The plan should serve you, not constrain you.
84
+ When the request has **multiple distinct goals** (e.g. "Fix bug A AND add feature B"), use the task tool to track them:
85
+ - Call the task tool with action="create" and a tasks array. Each task must have an "id" field.
86
+ - Update task status to "in_progress" when starting and "completed" when done.
87
+ - All tasks must be completed or cancelled before calling attempt_completion.
88
+ - Stay flexible — add, remove, or reorganize tasks as your understanding changes.
89
+
90
+ Do NOT create tasks for single-goal requests, even complex ones. Multiple internal steps for one goal (search, read, analyze, implement) do not need tasks.
91
+
92
+ # Discovering Project Commands
93
+ Before building or testing, determine the project's toolchain:
94
+ - Check for Makefile, package.json (scripts), Cargo.toml, go.mod, pyproject.toml, or similar
95
+ - Look for CI config (.github/workflows/, .gitlab-ci.yml) to see what commands CI runs
96
+ - Read README for build/test instructions if the above are unclear
97
+ - Common patterns: \`make build\`/\`make test\`, \`npm run build\`/\`npm test\`, \`cargo build\`/\`cargo test\`, \`go build ./...\`/\`go test ./...\`, \`python -m pytest\`
86
98
 
87
99
  # During Implementation
88
100
  - Always create a new branch before making changes to the codebase.
@@ -93,12 +105,22 @@ If the solution is clear, you can jump to implementation right away. If not, ask
93
105
  - When editing files, keep edits focused and minimal. For changes spanning more than a few lines, prefer line-targeted editing (start_line/end_line) over text replacement (old_string) — it constrains scope and prevents accidental removal of adjacent content. Never include unrelated sections in an edit operation.
94
106
  - After every significant change, verify the project still builds and passes linting. Do not wait until the end to discover breakage.
95
107
 
96
- # After Implementation
97
- - Verify the project builds successfully. If it doesn't, fix the build before moving on.
98
- - Run lint and typecheck commands if known for the project. Fix any new warnings or errors you introduced.
99
- - Add tests for any new or changed functionality. Tests must cover the main path and important edge cases.
100
- - Run the project's full test suite. If any tests fail (including pre-existing ones you may have broken), fix them before finishing.
101
- - When the task is done, respond to the user with a concise summary of what was implemented, what files were changed, and any relevant details. Include links (e.g. pull request URL) so the user has everything they need.
108
+ # Writing Tests
109
+ Every change must include tests. Before writing them:
110
+ - Find existing test files for the module you changed look in \`tests/\`, \`__tests__/\`, \`*_test.go\`, \`*.test.js\`, \`*.spec.ts\`, or co-located test modules (\`#[cfg(test)]\` in Rust).
111
+ - Read those tests to understand the project's testing patterns: framework, assertion style, mocking approach, file naming, test organization.
112
+ - Prefer extending an existing test file over creating a new one when your change is in the same module.
113
+ - Write tests that cover the main path and important edge cases. Include a failing-input test when relevant.
114
+ - When fixing a bug, write a failing test first that reproduces the bug, then fix the code to make it pass.
115
+
116
+ # Verify Changes
117
+ Before committing or creating a PR, run through this checklist:
118
+ 1. **Build** — run the project-appropriate build command (go build, npm run build, cargo build, make, etc.). Fix any compilation errors.
119
+ 2. **Lint & typecheck** — run linter/formatter if the project has one (eslint, clippy, golangci-lint, etc.). Fix any new warnings.
120
+ 3. **Test** — run the full test suite (go test ./..., npm test, cargo test, make test, pytest, etc.). Fix any failures, including pre-existing tests you may have broken.
121
+ 4. **Review** — re-read your diff. Ensure no debug code, no unrelated changes, no secrets, no missing files.
122
+
123
+ Do NOT skip verification. Do NOT proceed to PR creation with a broken build or failing tests.
102
124
 
103
125
  # GitHub Integration
104
126
  - Use the \`gh\` CLI for all GitHub operations: issues, pull requests, checks, releases.
@@ -268,8 +268,8 @@ export const searchTool = (options = {}) => {
268
268
  parentSessionId: sessionId,
269
269
  path: options.allowedFolders?.[0] || options.cwd || '.',
270
270
  allowedFolders: options.allowedFolders,
271
- provider: options.provider || null,
272
- model: options.model || null,
271
+ provider: options.searchDelegateProvider || process.env.PROBE_SEARCH_DELEGATE_PROVIDER || options.provider || null,
272
+ model: options.searchDelegateModel || process.env.PROBE_SEARCH_DELEGATE_MODEL || options.model || null,
273
273
  tracer: options.tracer || null,
274
274
  enableBash: false,
275
275
  bashConfig: null,