@f5-sales-demo/xcsh 19.70.1 → 19.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -23
- package/package.json +8 -8
- package/src/internal-urls/build-info.generated.ts +8 -8
- package/src/prompts/agents/librarian.md +13 -10
- package/src/task/executor.ts +26 -1
package/CHANGELOG.md
CHANGED
|
@@ -23,23 +23,23 @@
|
|
|
23
23
|
|
|
24
24
|
### Changed
|
|
25
25
|
|
|
26
|
-
- Welcome screen fully plugin-driven: removed all hardcoded cloud service stubs (`getFixableServices` empty stub, `checkProfileStatus` dead code). Only F5 XC Context remains as a built-in service. All cloud connector status checks now come exclusively from the Extension API `registerServiceStatus()`. ([#1076](https://github.com/
|
|
26
|
+
- Welcome screen fully plugin-driven: removed all hardcoded cloud service stubs (`getFixableServices` empty stub, `checkProfileStatus` dead code). Only F5 XC Context remains as a built-in service. All cloud connector status checks now come exclusively from the Extension API `registerServiceStatus()`. ([#1076](https://github.com/f5-sales-demo/xcsh/issues/1076))
|
|
27
27
|
|
|
28
28
|
## [18.90.0] - 2026-06-01
|
|
29
29
|
|
|
30
30
|
### Added
|
|
31
31
|
|
|
32
|
-
- Plugin-based welcome screen service status via `registerServiceStatus()` Extension API: plugins can now contribute service status entries and auto-fix prompts to the xcsh welcome screen. ([#1066](https://github.com/
|
|
32
|
+
- Plugin-based welcome screen service status via `registerServiceStatus()` Extension API: plugins can now contribute service status entries and auto-fix prompts to the xcsh welcome screen. ([#1066](https://github.com/f5-sales-demo/xcsh/issues/1066))
|
|
33
33
|
|
|
34
34
|
### Changed
|
|
35
35
|
|
|
36
|
-
- All cloud connector integrations extracted to marketplace plugins: GitHub (9 tools), GitLab (4 tools), Azure, AWS, Google Cloud welcome checks are now installable via `xcsh plugin install`. Only F5 XC Context remains as a built-in service. ([#1069](https://github.com/
|
|
36
|
+
- All cloud connector integrations extracted to marketplace plugins: GitHub (9 tools), GitLab (4 tools), Azure, AWS, Google Cloud welcome checks are now installable via `xcsh plugin install`. Only F5 XC Context remains as a built-in service. ([#1069](https://github.com/f5-sales-demo/xcsh/issues/1069), [#1071](https://github.com/f5-sales-demo/xcsh/issues/1071))
|
|
37
37
|
|
|
38
38
|
## [18.88.0] - 2026-05-31
|
|
39
39
|
|
|
40
40
|
### Changed
|
|
41
41
|
|
|
42
|
-
- Salesforce tools extracted to marketplace plugin: sf_setup, sf_query, sf_org_display, and sf_pipeline_report are now available as an installable plugin (`@
|
|
42
|
+
- Salesforce tools extracted to marketplace plugin: sf_setup, sf_query, sf_org_display, and sf_pipeline_report are now available as an installable plugin (`@f5-sales-demo/xcsh-salesforce`) via the Extension API instead of built-in tools. Install with `xcsh plugin install salesforce`. Context discovery, pipeline reporting, and container-adapted authentication are preserved with full feature parity. ([#1059](https://github.com/f5-sales-demo/xcsh/issues/1059))
|
|
43
43
|
|
|
44
44
|
## [18.75.0] - 2026-05-23
|
|
45
45
|
|
|
@@ -51,40 +51,40 @@
|
|
|
51
51
|
|
|
52
52
|
### Fixed
|
|
53
53
|
|
|
54
|
-
- Welcome banner cloud provider hints: AWS SSO token expiry now correctly suggests `aws sso login` instead of `aws configure`; Google Cloud check replaced `gcloud auth list` (false positives on expired tokens) with `gcloud auth print-access-token`; F5 XC Context surfaces `errorClass` (network/URL) in hints; GitLab `project_inaccessible` gets its own hint; Salesforce differentiates `session_expired` and `not_configured` hints ([#825](https://github.com/
|
|
54
|
+
- Welcome banner cloud provider hints: AWS SSO token expiry now correctly suggests `aws sso login` instead of `aws configure`; Google Cloud check replaced `gcloud auth list` (false positives on expired tokens) with `gcloud auth print-access-token`; F5 XC Context surfaces `errorClass` (network/URL) in hints; GitLab `project_inaccessible` gets its own hint; Salesforce differentiates `session_expired` and `not_configured` hints ([#825](https://github.com/f5-sales-demo/xcsh/issues/825))
|
|
55
55
|
|
|
56
56
|
## [18.64.0] - 2026-05-13
|
|
57
57
|
|
|
58
58
|
### Added
|
|
59
59
|
|
|
60
|
-
- Auto-expand namespace discovery with spec-fetch v3: first namespace-scoped GET per session triggers a concurrent batch of 42 app/security resource type paths with compact 3-field spec summaries, reducing multi-resource discovery queries from ~20 sequential API calls to 1 ([#808](https://github.com/
|
|
61
|
-
- `paths[]` batch parameter on `xcsh_api` tool for explicit multi-path queries ([#808](https://github.com/
|
|
60
|
+
- Auto-expand namespace discovery with spec-fetch v3: first namespace-scoped GET per session triggers a concurrent batch of 42 app/security resource type paths with compact 3-field spec summaries, reducing multi-resource discovery queries from ~20 sequential API calls to 1 ([#808](https://github.com/f5-sales-demo/xcsh/pull/808))
|
|
61
|
+
- `paths[]` batch parameter on `xcsh_api` tool for explicit multi-path queries ([#808](https://github.com/f5-sales-demo/xcsh/pull/808))
|
|
62
62
|
|
|
63
63
|
## [18.58.1] - 2026-05-10
|
|
64
64
|
|
|
65
65
|
### Changed
|
|
66
66
|
|
|
67
|
-
- Regenerated API spec index from catalog v2.1.82: http_loadbalancer CRUD verification corrections (6 new server defaults, corrected minimum configs, cross-field dependencies, default_pool inline pool discovery, 5 composable routing approaches) and tcp_loadbalancer minimum config corrections (listen_port, origin_pools_weights, do_not_advertise format, 9 server defaults, forced hash_policy default) ([#753](https://github.com/
|
|
67
|
+
- Regenerated API spec index from catalog v2.1.82: http_loadbalancer CRUD verification corrections (6 new server defaults, corrected minimum configs, cross-field dependencies, default_pool inline pool discovery, 5 composable routing approaches) and tcp_loadbalancer minimum config corrections (listen_port, origin_pools_weights, do_not_advertise format, 9 server defaults, forced hash_policy default) ([#753](https://github.com/f5-sales-demo/xcsh/issues/753), [#757](https://github.com/f5-sales-demo/xcsh/issues/757))
|
|
68
68
|
|
|
69
69
|
## [18.53.0] - 2026-05-09
|
|
70
70
|
|
|
71
71
|
### Changed
|
|
72
72
|
|
|
73
|
-
- Autoresearch subsystem code quality: -513 lines (18.8% reduction), ~13% faster type checking. Un-exported internal symbols, relocated types, consolidated duplicate patterns, replaced manual deep copies with `structuredClone`, replaced `while(exec)` with `matchAll`, compressed control flow, extracted shared interfaces ([#734](https://github.com/
|
|
73
|
+
- Autoresearch subsystem code quality: -513 lines (18.8% reduction), ~13% faster type checking. Un-exported internal symbols, relocated types, consolidated duplicate patterns, replaced manual deep copies with `structuredClone`, replaced `while(exec)` with `matchAll`, compressed control flow, extracted shared interfaces ([#734](https://github.com/f5-sales-demo/xcsh/pull/734))
|
|
74
74
|
|
|
75
75
|
## [18.53.0] - 2026-05-09
|
|
76
76
|
|
|
77
77
|
### Fixed
|
|
78
78
|
|
|
79
|
-
- Replaced `xcsh --version` recommendation in `renderAboutDoc()` with authoritative intrinsic version guidance — the previous guidance misdirected to the installed binary, not the running session ([#722](https://github.com/
|
|
80
|
-
- System prompt `xcsh://about` entry now routes version questions to the workstation header (zero tool calls) and reserves `xcsh://about` for deeper identity ([#722](https://github.com/
|
|
79
|
+
- Replaced `xcsh --version` recommendation in `renderAboutDoc()` with authoritative intrinsic version guidance — the previous guidance misdirected to the installed binary, not the running session ([#722](https://github.com/f5-sales-demo/xcsh/pull/722))
|
|
80
|
+
- System prompt `xcsh://about` entry now routes version questions to the workstation header (zero tool calls) and reserves `xcsh://about` for deeper identity ([#722](https://github.com/f5-sales-demo/xcsh/pull/722))
|
|
81
81
|
|
|
82
82
|
### Added
|
|
83
83
|
|
|
84
|
-
- SE specialization block in `renderAboutDoc()` capabilities section: F5 XC API, Salesforce pipeline, user/computer profiling, SE-specific subagents ([#722](https://github.com/
|
|
85
|
-
- SE capability skills: account-planning, competitive, meeting-prep, roi-calculator, validation-plan ([#715](https://github.com/
|
|
86
|
-
- MEDDPICC qualification and competitive positioning sections in system prompt ([#715](https://github.com/
|
|
87
|
-
- Version self-awareness and capabilities completeness regression tests ([#722](https://github.com/
|
|
84
|
+
- SE specialization block in `renderAboutDoc()` capabilities section: F5 XC API, Salesforce pipeline, user/computer profiling, SE-specific subagents ([#722](https://github.com/f5-sales-demo/xcsh/pull/722))
|
|
85
|
+
- SE capability skills: account-planning, competitive, meeting-prep, roi-calculator, validation-plan ([#715](https://github.com/f5-sales-demo/xcsh/pull/715))
|
|
86
|
+
- MEDDPICC qualification and competitive positioning sections in system prompt ([#715](https://github.com/f5-sales-demo/xcsh/pull/715))
|
|
87
|
+
- Version self-awareness and capabilities completeness regression tests ([#722](https://github.com/f5-sales-demo/xcsh/pull/722))
|
|
88
88
|
|
|
89
89
|
## [18.40.0] - 2026-05-05
|
|
90
90
|
|
|
@@ -118,22 +118,22 @@
|
|
|
118
118
|
|
|
119
119
|
### Added
|
|
120
120
|
|
|
121
|
-
- `/context <name>` direct switch -- type a context name as a positional argument to switch without the `activate` verb, following `kubectx <name>` convention. ([#380](https://github.com/
|
|
122
|
-
- `/context -` previous context switching -- switch back to the last active context, following the `cd -` / `kubectx -` convention. Session-scoped, in-memory only. Calling `/context -` twice returns to the original context. ([#380](https://github.com/
|
|
123
|
-
- Mixed tab completion for `/context <Tab>` -- shows context names first, then `-` (when a previous context exists), then subcommand names. Context names display tenant URL hints. ([#380](https://github.com/
|
|
124
|
-
- Reserved subcommand name guard -- prevents creating, renaming, or importing contexts with names that collide with `/context` subcommands (19 reserved names including `list`, `create`, `delete`, `help`). Case-insensitive. ([#378](https://github.com/
|
|
125
|
-
- Previous context tracking in `ContextService` -- `previousContextName` getter, `activatePrevious()` method, automatic pointer maintenance on delete (cleared) and rename (updated). ([#379](https://github.com/
|
|
121
|
+
- `/context <name>` direct switch -- type a context name as a positional argument to switch without the `activate` verb, following `kubectx <name>` convention. ([#380](https://github.com/f5-sales-demo/xcsh/issues/380))
|
|
122
|
+
- `/context -` previous context switching -- switch back to the last active context, following the `cd -` / `kubectx -` convention. Session-scoped, in-memory only. Calling `/context -` twice returns to the original context. ([#380](https://github.com/f5-sales-demo/xcsh/issues/380))
|
|
123
|
+
- Mixed tab completion for `/context <Tab>` -- shows context names first, then `-` (when a previous context exists), then subcommand names. Context names display tenant URL hints. ([#380](https://github.com/f5-sales-demo/xcsh/issues/380))
|
|
124
|
+
- Reserved subcommand name guard -- prevents creating, renaming, or importing contexts with names that collide with `/context` subcommands (19 reserved names including `list`, `create`, `delete`, `help`). Case-insensitive. ([#378](https://github.com/f5-sales-demo/xcsh/issues/378))
|
|
125
|
+
- Previous context tracking in `ContextService` -- `previousContextName` getter, `activatePrevious()` method, automatic pointer maintenance on delete (cleared) and rename (updated). ([#379](https://github.com/f5-sales-demo/xcsh/issues/379))
|
|
126
126
|
|
|
127
127
|
## [18.18.4] - 2026-04-26
|
|
128
128
|
|
|
129
129
|
### Fixed
|
|
130
130
|
|
|
131
|
-
- Fixed gutter width propagation in the fallback tool renderer: `#formatToolExecution()` now receives the actual available width at render-time and uses it for line truncation instead of a hardcoded 80-column limit. On narrow terminals (<82 cols) this prevents content wider than the gutter-adjusted viewport; on wide terminals it allows longer output lines. ([#117](https://github.com/
|
|
132
|
-
- Fixed `resolveConfigValue` returning literal env var names (e.g. `"LITELLM_API_KEY"`) as API keys when the env var is unset, causing 401 errors on first launch. The resolver now rejects unresolved `ALL_CAPS_WITH_UNDERSCORES` patterns, matching the existing guard in `resolveYamlApiKeyConfig`. ([#241](https://github.com/
|
|
131
|
+
- Fixed gutter width propagation in the fallback tool renderer: `#formatToolExecution()` now receives the actual available width at render-time and uses it for line truncation instead of a hardcoded 80-column limit. On narrow terminals (<82 cols) this prevents content wider than the gutter-adjusted viewport; on wide terminals it allows longer output lines. ([#117](https://github.com/f5-sales-demo/xcsh/issues/117))
|
|
132
|
+
- Fixed `resolveConfigValue` returning literal env var names (e.g. `"LITELLM_API_KEY"`) as API keys when the env var is unset, causing 401 errors on first launch. The resolver now rejects unresolved `ALL_CAPS_WITH_UNDERSCORES` patterns, matching the existing guard in `resolveYamlApiKeyConfig`. ([#241](https://github.com/f5-sales-demo/xcsh/issues/241))
|
|
133
133
|
|
|
134
134
|
### Changed
|
|
135
135
|
|
|
136
|
-
- Renamed F5 XC credential system from "profile" to "context" to align with kubectl conventions. The `/profile` command is now `/context`, all types/classes use `Context*` naming (`ContextService`, `ContextStatus`, `F5XCContext`, etc.), on-disk paths changed from `profiles/` to `contexts/` and `active_profile` to `active_context`, and the status-line segment ID is now `context_f5xc`. ([#302](https://github.com/
|
|
136
|
+
- Renamed F5 XC credential system from "profile" to "context" to align with kubectl conventions. The `/profile` command is now `/context`, all types/classes use `Context*` naming (`ContextService`, `ContextStatus`, `F5XCContext`, etc.), on-disk paths changed from `profiles/` to `contexts/` and `active_profile` to `active_context`, and the status-line segment ID is now `context_f5xc`. ([#302](https://github.com/f5-sales-demo/xcsh/issues/302))
|
|
137
137
|
|
|
138
138
|
## [18.12.0] - 2026-04-23
|
|
139
139
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5-sales-demo/xcsh",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.71.0",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/f5-sales-demo/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@agentclientprotocol/sdk": "0.16.1",
|
|
58
58
|
"@mozilla/readability": "^0.6",
|
|
59
|
-
"@f5-sales-demo/xcsh-stats": "19.
|
|
60
|
-
"@f5-sales-demo/pi-agent-core": "19.
|
|
61
|
-
"@f5-sales-demo/pi-ai": "19.
|
|
62
|
-
"@f5-sales-demo/pi-natives": "19.
|
|
63
|
-
"@f5-sales-demo/pi-resource-management": "19.
|
|
64
|
-
"@f5-sales-demo/pi-tui": "19.
|
|
65
|
-
"@f5-sales-demo/pi-utils": "19.
|
|
59
|
+
"@f5-sales-demo/xcsh-stats": "19.71.0",
|
|
60
|
+
"@f5-sales-demo/pi-agent-core": "19.71.0",
|
|
61
|
+
"@f5-sales-demo/pi-ai": "19.71.0",
|
|
62
|
+
"@f5-sales-demo/pi-natives": "19.71.0",
|
|
63
|
+
"@f5-sales-demo/pi-resource-management": "19.71.0",
|
|
64
|
+
"@f5-sales-demo/pi-tui": "19.71.0",
|
|
65
|
+
"@f5-sales-demo/pi-utils": "19.71.0",
|
|
66
66
|
"@sinclair/typebox": "^0.34",
|
|
67
67
|
"@xterm/headless": "^6.0",
|
|
68
68
|
"ajv": "^8.20",
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "19.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "19.71.0",
|
|
21
|
+
"commit": "820c7a81493686a02db8bb81e628c6437143bd79",
|
|
22
|
+
"shortCommit": "820c7a8",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v19.
|
|
25
|
-
"commitDate": "2026-07-
|
|
26
|
-
"buildDate": "2026-07-
|
|
24
|
+
"tag": "v19.71.0",
|
|
25
|
+
"commitDate": "2026-07-22T01:27:46Z",
|
|
26
|
+
"buildDate": "2026-07-22T01:52:11.339Z",
|
|
27
27
|
"dirty": true,
|
|
28
28
|
"prNumber": "",
|
|
29
29
|
"repoUrl": "https://github.com/f5-sales-demo/xcsh",
|
|
30
30
|
"repoSlug": "f5-sales-demo/xcsh",
|
|
31
|
-
"commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/
|
|
32
|
-
"releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v19.
|
|
31
|
+
"commitUrl": "https://github.com/f5-sales-demo/xcsh/commit/820c7a81493686a02db8bb81e628c6437143bd79",
|
|
32
|
+
"releaseUrl": "https://github.com/f5-sales-demo/xcsh/releases/tag/v19.71.0"
|
|
33
33
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: librarian
|
|
3
|
-
description: Researches external libraries and
|
|
3
|
+
description: Researches external libraries, APIs, and authoritative documentation by reading source code and vendor docs. Returns definitive, source-verified answers.
|
|
4
4
|
tools: read, grep, find, bash, lsp, web_search, ast_grep
|
|
5
5
|
model: pi/smol
|
|
6
6
|
thinking-level: minimal
|
|
@@ -17,24 +17,25 @@ output:
|
|
|
17
17
|
properties:
|
|
18
18
|
repo:
|
|
19
19
|
metadata:
|
|
20
|
-
description: GitHub repo (owner/name) or
|
|
20
|
+
description: GitHub repo (owner/name), package name, or documentation site/domain
|
|
21
21
|
type: string
|
|
22
22
|
path:
|
|
23
23
|
metadata:
|
|
24
|
-
description: File path within the repo or node_modules
|
|
24
|
+
description: File path within the repo or node_modules, or the full page URL for a documentation source
|
|
25
25
|
type: string
|
|
26
|
+
excerpt:
|
|
27
|
+
metadata:
|
|
28
|
+
description: Verbatim code or doc excerpt proving the claim
|
|
29
|
+
type: string
|
|
30
|
+
optionalProperties:
|
|
26
31
|
line_start:
|
|
27
32
|
metadata:
|
|
28
|
-
description: First relevant line (1-indexed)
|
|
33
|
+
description: First relevant line (1-indexed); omit for documentation sources
|
|
29
34
|
type: number
|
|
30
35
|
line_end:
|
|
31
36
|
metadata:
|
|
32
|
-
description: Last relevant line (1-indexed)
|
|
37
|
+
description: Last relevant line (1-indexed); omit for documentation sources
|
|
33
38
|
type: number
|
|
34
|
-
excerpt:
|
|
35
|
-
metadata:
|
|
36
|
-
description: Verbatim code or doc excerpt proving the claim
|
|
37
|
-
type: string
|
|
38
39
|
api:
|
|
39
40
|
metadata:
|
|
40
41
|
description: Extracted API signatures, types, or config relevant to the question
|
|
@@ -79,10 +80,12 @@ Before acting, determine what kind of question this is:
|
|
|
79
80
|
- **Conceptual**: "How do I use X?", "Best practice for Y?" — Prioritize types, docs, and usage examples.
|
|
80
81
|
- **Implementation**: "How does X implement Y?", "Show me the source of Z" — Clone and read the actual code.
|
|
81
82
|
- **Behavioral**: "Why does X behave this way?", "What's the default for Y?" — Read implementation, find where values are set, check tests.
|
|
83
|
+
- **Documentation**: "What are the steps to configure X?", "What does the vendor doc say about Y?" — Fetch authoritative documentation pages and quote them verbatim.
|
|
82
84
|
|
|
83
85
|
## 2. Locate the source (local first)
|
|
84
86
|
- **Check local dependencies first**: Look in `node_modules/<package>`, `vendor/`, or similar. If the library is already installed, read it there — no clone needed. Prioritize `.d.ts` type definitions and exported types.
|
|
85
87
|
- **Otherwise clone**: Use `web_search` to find the canonical repo, then `git clone --depth 1 <url> /tmp/librarian-<name>`.
|
|
88
|
+
- **For documentation questions**: Use `web_search` to find the authoritative page (official docs or vendor portal), then use `read` on the URL to fetch page content. Quote verbatim excerpts with their exact URLs and cross-reference at least two pages.
|
|
86
89
|
- **For a specific version**: Clone then `git checkout tags/<version>`, or read the locally installed version.
|
|
87
90
|
|
|
88
91
|
## 3. Investigate
|
|
@@ -116,6 +119,6 @@ Before acting, determine what kind of question this is:
|
|
|
116
119
|
</directives>
|
|
117
120
|
|
|
118
121
|
<critical>
|
|
119
|
-
Source code is truth.
|
|
122
|
+
Source code is truth. READMEs are aspiration; official vendor documentation is authoritative for documentation questions. Training data is history.
|
|
120
123
|
You **MUST** keep going until you have a definitive, source-verified answer.
|
|
121
124
|
</critical>
|
package/src/task/executor.ts
CHANGED
|
@@ -1030,6 +1030,31 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
|
|
1030
1030
|
await session.setActiveToolsByName(filteredSubagentTools);
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
|
+
// Surface tools the agent declared but that are unavailable this session,
|
|
1034
|
+
// so the model can report the blocker instead of silently stalling.
|
|
1035
|
+
const declaredTools = agent.tools ?? [];
|
|
1036
|
+
let unavailableToolsNotice = "";
|
|
1037
|
+
if (declaredTools.length > 0) {
|
|
1038
|
+
const activeToolSet = new Set(session.getActiveToolNames());
|
|
1039
|
+
const execSatisfied = activeToolSet.has("python") || activeToolSet.has("bash");
|
|
1040
|
+
const managedToolNames = new Set(["submit_result", "todo_write", "resolve", "task"]);
|
|
1041
|
+
const isSafeToolName = (name: string) => /^[a-zA-Z0-9_-]+$/.test(name);
|
|
1042
|
+
const unavailableTools = declaredTools.filter(name => {
|
|
1043
|
+
if (activeToolSet.has(name)) return false;
|
|
1044
|
+
if (managedToolNames.has(name)) return false;
|
|
1045
|
+
if (!isSafeToolName(name)) return false;
|
|
1046
|
+
if (name === "exec") return !execSatisfied;
|
|
1047
|
+
return true;
|
|
1048
|
+
});
|
|
1049
|
+
if (unavailableTools.length > 0) {
|
|
1050
|
+
unavailableToolsNotice =
|
|
1051
|
+
"<system-reminder>\n" +
|
|
1052
|
+
`These tools you may expect are unavailable in this session: ${unavailableTools.join(", ")}. ` +
|
|
1053
|
+
"Do not attempt to use them. If a capability you need is missing, call submit_result with result.error describing the blocker.\n" +
|
|
1054
|
+
"</system-reminder>\n\n";
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1033
1058
|
session.sessionManager.appendSessionInit({
|
|
1034
1059
|
systemPrompt: session.agent.state.systemPrompt,
|
|
1035
1060
|
task,
|
|
@@ -1126,7 +1151,7 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
|
|
1126
1151
|
}
|
|
1127
1152
|
});
|
|
1128
1153
|
|
|
1129
|
-
await session.prompt(task
|
|
1154
|
+
await session.prompt(`${unavailableToolsNotice}${task}`, { attribution: "agent" });
|
|
1130
1155
|
await session.waitForIdle();
|
|
1131
1156
|
|
|
1132
1157
|
const reminderToolChoice = buildNamedToolChoice("submit_result", session.model);
|