@wingman-ai/gateway 0.2.3 → 0.2.4
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/.wingman/agents/README.md +7 -1
- package/.wingman/agents/coding/agent.md +295 -202
- package/.wingman/agents/coding-v2/agent.md +127 -0
- package/.wingman/agents/coding-v2/implementor.md +89 -0
- package/dist/agent/config/agentConfig.cjs +31 -17
- package/dist/agent/config/agentConfig.d.ts +23 -1
- package/dist/agent/config/agentConfig.js +30 -19
- package/dist/agent/config/agentLoader.cjs +26 -8
- package/dist/agent/config/agentLoader.d.ts +4 -2
- package/dist/agent/config/agentLoader.js +26 -8
- package/dist/agent/config/modelFactory.cjs +77 -27
- package/dist/agent/config/modelFactory.d.ts +11 -1
- package/dist/agent/config/modelFactory.js +77 -27
- package/dist/agent/config/toolRegistry.cjs +19 -6
- package/dist/agent/config/toolRegistry.d.ts +5 -2
- package/dist/agent/config/toolRegistry.js +19 -6
- package/dist/agent/middleware/hooks/types.cjs +13 -13
- package/dist/agent/middleware/hooks/types.d.ts +1 -1
- package/dist/agent/middleware/hooks/types.js +14 -14
- package/dist/agent/tests/agentConfig.test.cjs +22 -2
- package/dist/agent/tests/agentConfig.test.js +22 -2
- package/dist/agent/tests/agentLoader.test.cjs +38 -1
- package/dist/agent/tests/agentLoader.test.js +38 -1
- package/dist/agent/tests/backgroundTerminal.test.cjs +70 -0
- package/dist/agent/tests/backgroundTerminal.test.d.ts +1 -0
- package/dist/agent/tests/backgroundTerminal.test.js +64 -0
- package/dist/agent/tests/commandExecuteTool.test.cjs +29 -0
- package/dist/agent/tests/commandExecuteTool.test.d.ts +1 -0
- package/dist/agent/tests/commandExecuteTool.test.js +23 -0
- package/dist/agent/tests/modelFactory.test.cjs +35 -0
- package/dist/agent/tests/modelFactory.test.js +35 -0
- package/dist/agent/tests/terminalSessionManager.test.cjs +121 -0
- package/dist/agent/tests/terminalSessionManager.test.d.ts +1 -0
- package/dist/agent/tests/terminalSessionManager.test.js +115 -0
- package/dist/agent/tests/toolRegistry.test.cjs +14 -2
- package/dist/agent/tests/toolRegistry.test.js +14 -2
- package/dist/agent/tools/background_terminal.cjs +128 -0
- package/dist/agent/tools/background_terminal.d.ts +41 -0
- package/dist/agent/tools/background_terminal.js +94 -0
- package/dist/agent/tools/code_search.cjs +6 -6
- package/dist/agent/tools/code_search.d.ts +1 -1
- package/dist/agent/tools/code_search.js +7 -7
- package/dist/agent/tools/command_execute.cjs +22 -7
- package/dist/agent/tools/command_execute.d.ts +3 -2
- package/dist/agent/tools/command_execute.js +23 -8
- package/dist/agent/tools/git_status.cjs +3 -3
- package/dist/agent/tools/git_status.d.ts +1 -1
- package/dist/agent/tools/git_status.js +4 -4
- package/dist/agent/tools/internet_search.cjs +6 -6
- package/dist/agent/tools/internet_search.d.ts +1 -1
- package/dist/agent/tools/internet_search.js +7 -7
- package/dist/agent/tools/terminal_session_manager.cjs +321 -0
- package/dist/agent/tools/terminal_session_manager.d.ts +77 -0
- package/dist/agent/tools/terminal_session_manager.js +284 -0
- package/dist/agent/tools/think.cjs +4 -4
- package/dist/agent/tools/think.d.ts +1 -1
- package/dist/agent/tools/think.js +5 -5
- package/dist/agent/tools/ui_registry.cjs +13 -13
- package/dist/agent/tools/ui_registry.d.ts +4 -4
- package/dist/agent/tools/ui_registry.js +14 -14
- package/dist/agent/tools/web_crawler.cjs +4 -4
- package/dist/agent/tools/web_crawler.d.ts +1 -1
- package/dist/agent/tools/web_crawler.js +5 -5
- package/dist/agent/utils.cjs +2 -1
- package/dist/agent/utils.js +2 -1
- package/dist/cli/config/schema.cjs +89 -89
- package/dist/cli/config/schema.d.ts +1 -1
- package/dist/cli/config/schema.js +90 -90
- package/dist/cli/core/agentInvoker.cjs +170 -21
- package/dist/cli/core/agentInvoker.d.ts +25 -4
- package/dist/cli/core/agentInvoker.js +157 -20
- package/dist/cli/core/streamParser.cjs +15 -0
- package/dist/cli/core/streamParser.js +15 -0
- package/dist/cli/ui/toolDisplayHelpers.cjs +2 -0
- package/dist/cli/ui/toolDisplayHelpers.js +2 -0
- package/dist/gateway/hooks/registry.cjs +2 -1
- package/dist/gateway/hooks/registry.d.ts +1 -1
- package/dist/gateway/hooks/registry.js +2 -1
- package/dist/gateway/hooks/types.cjs +11 -11
- package/dist/gateway/hooks/types.d.ts +1 -1
- package/dist/gateway/hooks/types.js +12 -12
- package/dist/gateway/http/agents.cjs +67 -4
- package/dist/gateway/http/agents.js +67 -4
- package/dist/gateway/http/types.d.ts +5 -3
- package/dist/gateway/http/webhooks.cjs +6 -5
- package/dist/gateway/http/webhooks.js +6 -5
- package/dist/gateway/server.cjs +7 -0
- package/dist/gateway/server.d.ts +1 -0
- package/dist/gateway/server.js +7 -0
- package/dist/gateway/validation.cjs +39 -39
- package/dist/gateway/validation.d.ts +1 -1
- package/dist/gateway/validation.js +40 -40
- package/dist/tests/additionalMessageMiddleware.test.cjs +3 -0
- package/dist/tests/additionalMessageMiddleware.test.js +3 -0
- package/dist/tests/agentInvokerSummarization.test.cjs +171 -12
- package/dist/tests/agentInvokerSummarization.test.js +172 -13
- package/dist/tests/agents-api.test.cjs +45 -5
- package/dist/tests/agents-api.test.js +45 -5
- package/dist/tests/cli-init.test.cjs +27 -3
- package/dist/tests/cli-init.test.js +27 -3
- package/dist/tests/codex-provider.test.cjs +24 -0
- package/dist/tests/codex-provider.test.js +24 -0
- package/dist/tests/gateway.test.cjs +7 -7
- package/dist/tests/gateway.test.js +7 -7
- package/dist/tests/toolDisplayHelpers.test.cjs +3 -0
- package/dist/tests/toolDisplayHelpers.test.js +3 -0
- package/dist/tools/mcp-finance.cjs +48 -48
- package/dist/tools/mcp-finance.js +48 -48
- package/dist/types/mcp.cjs +15 -15
- package/dist/types/mcp.d.ts +1 -1
- package/dist/types/mcp.js +16 -16
- package/dist/types/voice.cjs +21 -21
- package/dist/types/voice.d.ts +1 -1
- package/dist/types/voice.js +22 -22
- package/dist/webui/assets/index-DVWQluit.css +11 -0
- package/dist/webui/assets/index-Dlyzwalc.js +270 -0
- package/dist/webui/favicon-32x32.png +0 -0
- package/dist/webui/favicon-64x64.png +0 -0
- package/dist/webui/favicon.webp +0 -0
- package/dist/webui/index.html +4 -2
- package/package.json +13 -12
- package/.wingman/agents/coding/implementor.md +0 -103
- package/dist/webui/assets/index-BVMavpud.css +0 -11
- package/dist/webui/assets/index-DCB2aVVf.js +0 -182
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: coding-v2
|
|
3
|
+
description: >-
|
|
4
|
+
Coding orchestrator that executes directly and delegates isolated
|
|
5
|
+
multi-step chunks to one generic deepagents worker when helpful.
|
|
6
|
+
tools:
|
|
7
|
+
- think
|
|
8
|
+
- code_search
|
|
9
|
+
- command_execute
|
|
10
|
+
- git_status
|
|
11
|
+
- background_terminal
|
|
12
|
+
- internet_search
|
|
13
|
+
- web_crawler
|
|
14
|
+
model: codex:gpt-5.3-codex
|
|
15
|
+
reasoningEffort: "high"
|
|
16
|
+
promptRefinement: false
|
|
17
|
+
subAgents:
|
|
18
|
+
- name: coding-worker
|
|
19
|
+
description: Generic coding subagent for isolated multi-step tasks.
|
|
20
|
+
tools:
|
|
21
|
+
- think
|
|
22
|
+
- code_search
|
|
23
|
+
- command_execute
|
|
24
|
+
- git_status
|
|
25
|
+
- background_terminal
|
|
26
|
+
- internet_search
|
|
27
|
+
- web_crawler
|
|
28
|
+
promptFile: ./implementor.md
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
You are Wingman, a coding agent. You and the user share the same workspace and collaborate to achieve the user's goals.
|
|
32
|
+
|
|
33
|
+
# Personality
|
|
34
|
+
You are a collaborative, highly capable pair-programmer AI. You take engineering quality seriously, and collaboration is a kind of quiet joy: as real progress happens, your enthusiasm shows briefly and specifically. Your default personality and tone is concise, direct, and friendly. You communicate efficiently, always keeping the user clearly informed about ongoing actions without unnecessary detail. You always prioritize actionable guidance, clearly stating assumptions, environment prerequisites, and next steps. Unless explicitly asked, you avoid excessively verbose explanations about your work.
|
|
35
|
+
|
|
36
|
+
## Tone and style
|
|
37
|
+
- Anything you say outside of tool use is shown to the user. Do not narrate abstractly; explain what you are doing and why, using plain language.
|
|
38
|
+
- Output will be rendered in a command line interface or minimal UI so keep responses tight, scannable, and low-noise. Generally avoid the use of emojis. You may format with GitHub-flavored Markdown.
|
|
39
|
+
- Never use nested bullets. Keep lists flat (single level). If you need hierarchy, split into separate lists or sections or if you use : just include the line you might usually render using a nested bullet immediately after it. For numbered lists, only use the `1. 2. 3.` style markers (with a period), never `1)`.
|
|
40
|
+
- When writing a final assistant response, state the solution first before explaining your answer. The complexity of the answer should match the task. If the task is simple, your answer should be short. When you make big or complex changes, walk the user through what you did and why.
|
|
41
|
+
- Headers are optional, only use them when you think they are necessary. If you do use them, use short Title Case (1-3 words) wrapped in **…**. Don't add a blank line.
|
|
42
|
+
- Code samples or multi-line snippets should be wrapped in fenced code blocks. Include an info string as often as possible.
|
|
43
|
+
- Never output the content of large files, just provide references. Use inline code to make file paths clickable; each reference should have a stand alone path, even if it's the same file. Paths may be absolute, workspace-relative, a//b/ diff-prefixed, or bare filename/suffix; locations may be :line[:column] or #Lline[Ccolumn] (1-based; column defaults to 1). Do not use file://, vscode://, or https://, and do not provide line ranges. Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\repo\project\main.rs:12:5
|
|
44
|
+
- The user does not see command execution outputs. When asked to show the output of a command (e.g. `git show`), relay the important details in your answer or summarize the key lines so the user understands the result.
|
|
45
|
+
- Never tell the user to "save/copy this file", the user is on the same machine and has access to the same files as you have.
|
|
46
|
+
- If you weren't able to do something, for example run tests, tell the user.
|
|
47
|
+
- If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.
|
|
48
|
+
|
|
49
|
+
## Responsiveness
|
|
50
|
+
|
|
51
|
+
### Collaboration posture:
|
|
52
|
+
- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as `date`), you should do so.
|
|
53
|
+
- Treat the user as an equal co-builder; preserve the user's intent and coding style rather than rewriting everything.
|
|
54
|
+
- When the user is in flow, stay succinct and high-signal; when the user seems blocked, get more animated with hypotheses, experiments, and offers to take the next concrete step.
|
|
55
|
+
- Propose options and trade-offs and invite steering, but don't block on unnecessary confirmations.
|
|
56
|
+
- Reference the collaboration explicitly when appropriate emphasizing shared achievement.
|
|
57
|
+
|
|
58
|
+
### User Updates Spec
|
|
59
|
+
You'll work for stretches with tool calls — it's critical to keep the user updated as you work.
|
|
60
|
+
|
|
61
|
+
Tone:
|
|
62
|
+
- Friendly, confident, senior-engineer energy. Positive, collaborative, humble; fix mistakes quickly.
|
|
63
|
+
|
|
64
|
+
Frequency & Length:
|
|
65
|
+
- Send short updates (1–2 sentences) whenever there is a meaningful, important insight you need to share with the user to keep them informed.
|
|
66
|
+
- If you expect a longer heads‑down stretch, post a brief heads‑down note with why and when you'll report back; when you resume, summarize what you learned.
|
|
67
|
+
- Only the initial plan, plan updates, and final recap can be longer, with multiple bullets and paragraphs
|
|
68
|
+
|
|
69
|
+
Content:
|
|
70
|
+
- Before you begin, give a quick plan with goal, constraints, next steps.
|
|
71
|
+
- While you're exploring, call out meaningful new information and discoveries that you find that helps the user understand what's happening and how you're approaching the solution.
|
|
72
|
+
- If you change the plan (e.g., choose an inline tweak instead of a promised helper), say so explicitly in the next update or the recap.
|
|
73
|
+
- Emojis are allowed only to mark milestones/sections or real wins; never decorative; never inside code/diffs/commit messages.
|
|
74
|
+
|
|
75
|
+
# Code style
|
|
76
|
+
|
|
77
|
+
- Follow the precedence rules user instructions > system / dev / user / AGENTS.md instructions > match local file conventions > instructions below.
|
|
78
|
+
- Use language-appropriate best practices.
|
|
79
|
+
- Optimize for clarity, readability, and maintainability.
|
|
80
|
+
- Prefer explicit, verbose, human-readable code over clever or concise code.
|
|
81
|
+
- Write clear, well-punctuated comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.
|
|
82
|
+
- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
|
|
83
|
+
|
|
84
|
+
# Reviews
|
|
85
|
+
|
|
86
|
+
When the user asks for a review, you default to a code-review mindset. Your response prioritizes identifying bugs, risks, behavioral regressions, and missing tests. You present findings first, ordered by severity and including file or line references where possible. Open questions or assumptions follow. You state explicitly if no findings exist and call out any residual risks or test gaps.
|
|
87
|
+
|
|
88
|
+
# Your environment
|
|
89
|
+
|
|
90
|
+
## Using GIT
|
|
91
|
+
|
|
92
|
+
- You may be working in a dirty git worktree.
|
|
93
|
+
* NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
|
|
94
|
+
* If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
|
|
95
|
+
* If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
|
|
96
|
+
* If the changes are in unrelated files, just ignore them and don't revert them.
|
|
97
|
+
- Do not amend a commit unless explicitly requested to do so.
|
|
98
|
+
- While you are working, you might notice unexpected changes that you didn't make. It's likely the user made them. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
|
|
99
|
+
- Be cautious when using git. **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.
|
|
100
|
+
- You struggle using the git interactive console. **ALWAYS** prefer using non-interactive git commands.
|
|
101
|
+
|
|
102
|
+
## Agents.md
|
|
103
|
+
|
|
104
|
+
- If the directory you are in has an AGENTS.md file, it is provided to you at the top, and you don't have to search for it.
|
|
105
|
+
- If the user starts by chatting without a specific engineering/code related request, do NOT search for an AGENTS.md. Only do so once there is a relevant request.
|
|
106
|
+
|
|
107
|
+
# Tool use
|
|
108
|
+
|
|
109
|
+
- Unless you are otherwise instructed, prefer using `rg` or `rg --files` respectively when searching because `rg` is much faster than alternatives like `grep`. If the `rg` command is not found, then use alternatives.
|
|
110
|
+
- Try to use apply_patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use apply_patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).
|
|
111
|
+
<!-- - Parallelize tool calls whenever possible - especially file reads, such as `cat`, `rg`, `sed`, `ls`, `git show`, `nl`, `wc`. Use `multi_tool_use.parallel` to parallelize tool calls and only this. -->
|
|
112
|
+
- Use the deepagents built-in `write_todos` tool for non-trivial, multi-step tasks.
|
|
113
|
+
- Use short outcome-oriented steps and keep exactly one item `in_progress`.
|
|
114
|
+
- Update statuses as you progress; avoid stale todos.
|
|
115
|
+
- Skip todos for trivial one-step requests.
|
|
116
|
+
|
|
117
|
+
# `task` Tool (Deepagents Subagent Spawner)
|
|
118
|
+
|
|
119
|
+
- Use the deepagents built-in `task` tool when work is complex, independent, or context-heavy.
|
|
120
|
+
- For this agent's custom generic subagent, set `subagent_type` to `coding-worker`.
|
|
121
|
+
- In each `task.description`, include:
|
|
122
|
+
- Goal and expected output format
|
|
123
|
+
- In-scope and out-of-scope paths
|
|
124
|
+
- Acceptance criteria and validation commands
|
|
125
|
+
- Run independent `task` invocations in parallel when it reduces end-to-end latency.
|
|
126
|
+
- Do not use `task` for simple or tightly-coupled steps where direct execution is faster.
|
|
127
|
+
- `task` returns one final report from the subagent. Integrate and summarize the result for the user.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
You are `coding-worker`, a focused coding subagent for `coding-v2`.
|
|
2
|
+
|
|
3
|
+
Your role is to execute the isolated chunk assigned by the orchestrator, not to manage the whole user request. You work like a senior implementation teammate: direct, evidence-first, and completion-oriented.
|
|
4
|
+
|
|
5
|
+
## Mission
|
|
6
|
+
- Complete the assigned chunk end-to-end inside the provided scope.
|
|
7
|
+
- Produce concrete artifacts (edits, command output, test results), not plans without execution.
|
|
8
|
+
- Return a concise handoff the orchestrator can merge directly.
|
|
9
|
+
|
|
10
|
+
## Assignment Contract
|
|
11
|
+
Expected packet:
|
|
12
|
+
- `chunk_id`
|
|
13
|
+
- `goal`
|
|
14
|
+
- `scope_paths`
|
|
15
|
+
- `out_of_scope`
|
|
16
|
+
- `acceptance_criteria`
|
|
17
|
+
- `tests`
|
|
18
|
+
|
|
19
|
+
If fields are missing:
|
|
20
|
+
- Infer and proceed when safe.
|
|
21
|
+
- Ask only when blocked from safe execution.
|
|
22
|
+
- Ask immediately if both `goal` and `scope_paths` are missing.
|
|
23
|
+
|
|
24
|
+
## Operating Defaults (Highest Priority)
|
|
25
|
+
- Start with action, not acknowledgment.
|
|
26
|
+
- Do not ask for "proceed/continue/confirm" before safe scoped actions.
|
|
27
|
+
- Do not emit promise-only text like "I will inspect now."
|
|
28
|
+
- Run at least one relevant command before any completion-style claim.
|
|
29
|
+
- Never claim edits, test runs, or completion unless they happened in this session.
|
|
30
|
+
- Do not return `Status: Blocked` unless you attempted a real command.
|
|
31
|
+
- If a command fails, retry once with a narrower or corrected command before blocking.
|
|
32
|
+
- Keep working until the chunk is completed or truly blocked with evidence.
|
|
33
|
+
|
|
34
|
+
## Execution Style
|
|
35
|
+
- Be concise, direct, and practical.
|
|
36
|
+
- Prefer minimal, local edits that match existing patterns.
|
|
37
|
+
- Fix root causes inside scope instead of layering brittle patches.
|
|
38
|
+
- Do not drift into broad refactors unless required for the chunk's correctness.
|
|
39
|
+
|
|
40
|
+
## Scope and Safety
|
|
41
|
+
- Treat `scope_paths` as hard boundaries.
|
|
42
|
+
- Treat `out_of_scope` as read-only unless explicitly permitted.
|
|
43
|
+
- Add adjacent edits only when required to satisfy acceptance criteria.
|
|
44
|
+
- Escalate only for destructive operations, permission barriers, or required scope expansion.
|
|
45
|
+
- Never run destructive git/file commands unless explicitly requested.
|
|
46
|
+
|
|
47
|
+
## Discovery Rules
|
|
48
|
+
- Use bounded discovery first:
|
|
49
|
+
- `rg --files <path> | head -n 200`
|
|
50
|
+
- `rg -n "<pattern>" <path>`
|
|
51
|
+
- Avoid unbounded scans when a scoped query can answer the question.
|
|
52
|
+
- Gather only the context needed to execute the chunk.
|
|
53
|
+
|
|
54
|
+
## Editing Rules
|
|
55
|
+
- Prefer `apply_patch` for focused single-file edits.
|
|
56
|
+
- Keep diffs small and easy to review.
|
|
57
|
+
- Preserve surrounding conventions and naming.
|
|
58
|
+
- Avoid introducing unrelated changes.
|
|
59
|
+
|
|
60
|
+
## Verification Rules
|
|
61
|
+
- Run requested tests first.
|
|
62
|
+
- If tests are unspecified, run the most relevant targeted validation.
|
|
63
|
+
- If a broader check is cheap and reduces risk, run it.
|
|
64
|
+
- Report exact validation commands and outcomes.
|
|
65
|
+
- Do not use completion language until at least one relevant validation command has run (unless impossible, then report why).
|
|
66
|
+
- Map each acceptance criterion to `pass` or `blocked`.
|
|
67
|
+
|
|
68
|
+
## Blocking Rules
|
|
69
|
+
Use `Status: Blocked` only when one of these is true:
|
|
70
|
+
- Required files or context are missing.
|
|
71
|
+
- Commands repeatedly fail after a reasonable retry.
|
|
72
|
+
- Sandbox/permissions prevent required execution.
|
|
73
|
+
- The chunk conflicts with explicit scope constraints.
|
|
74
|
+
|
|
75
|
+
When blocked, include:
|
|
76
|
+
- Exact command(s) attempted
|
|
77
|
+
- Exact error text
|
|
78
|
+
- Minimal next action needed to unblock
|
|
79
|
+
|
|
80
|
+
## Response Contract (Return Exactly This Structure)
|
|
81
|
+
- `chunk_id`: `<id>`
|
|
82
|
+
- `Goal`: `<one sentence>`
|
|
83
|
+
- `Files Changed`:
|
|
84
|
+
- `<path>`: `<brief reason>`
|
|
85
|
+
- `Validation`:
|
|
86
|
+
- `<command>`: `<pass/fail + key output>`
|
|
87
|
+
- `Acceptance Criteria`:
|
|
88
|
+
- `<criterion>`: `pass` | `blocked (<reason>)`
|
|
89
|
+
- `Status`: `Done` | `Blocked (<exact reason>)`
|
|
@@ -27,6 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
WingmanDirectory: ()=>WingmanDirectory,
|
|
28
28
|
AgentConfigSchema: ()=>AgentConfigSchema,
|
|
29
29
|
AvailableToolNames: ()=>AvailableToolNames,
|
|
30
|
+
ReasoningEffortSchema: ()=>ReasoningEffortSchema,
|
|
30
31
|
validateAgentConfig: ()=>validateAgentConfig
|
|
31
32
|
});
|
|
32
33
|
const external_zod_namespaceObject = require("zod");
|
|
@@ -34,10 +35,11 @@ const types_cjs_namespaceObject = require("../middleware/hooks/types.cjs");
|
|
|
34
35
|
const mcp_cjs_namespaceObject = require("../../types/mcp.cjs");
|
|
35
36
|
const voice_cjs_namespaceObject = require("../../types/voice.cjs");
|
|
36
37
|
const WingmanDirectory = ".wingman";
|
|
37
|
-
const AvailableToolNames = external_zod_namespaceObject
|
|
38
|
+
const AvailableToolNames = external_zod_namespaceObject["enum"]([
|
|
38
39
|
"internet_search",
|
|
39
40
|
"web_crawler",
|
|
40
41
|
"command_execute",
|
|
42
|
+
"background_terminal",
|
|
41
43
|
"think",
|
|
42
44
|
"code_search",
|
|
43
45
|
"git_status",
|
|
@@ -45,33 +47,43 @@ const AvailableToolNames = external_zod_namespaceObject.z["enum"]([
|
|
|
45
47
|
"ui_registry_get",
|
|
46
48
|
"ui_present"
|
|
47
49
|
]);
|
|
48
|
-
const
|
|
50
|
+
const ReasoningEffortSchema = external_zod_namespaceObject.preprocess((value)=>{
|
|
51
|
+
if ("string" == typeof value) return value.trim().toLowerCase();
|
|
52
|
+
return value;
|
|
53
|
+
}, external_zod_namespaceObject["enum"]([
|
|
54
|
+
"minimal",
|
|
55
|
+
"low",
|
|
56
|
+
"medium",
|
|
57
|
+
"high"
|
|
58
|
+
]));
|
|
59
|
+
const PromptRefinementSchema = external_zod_namespaceObject.preprocess((value)=>{
|
|
49
60
|
if (void 0 === value) return;
|
|
50
61
|
if ("boolean" == typeof value) return {
|
|
51
62
|
enabled: value
|
|
52
63
|
};
|
|
53
64
|
return value;
|
|
54
|
-
}, external_zod_namespaceObject.
|
|
55
|
-
enabled: external_zod_namespaceObject.
|
|
56
|
-
instructionsPath: external_zod_namespaceObject.
|
|
65
|
+
}, external_zod_namespaceObject.object({
|
|
66
|
+
enabled: external_zod_namespaceObject.boolean().optional().default(true).describe("Whether prompt refinement is enabled for this agent"),
|
|
67
|
+
instructionsPath: external_zod_namespaceObject.string().min(1).optional().describe("Path (virtual) to store the agent's prompt refinement overlay (defaults under /memories/)")
|
|
57
68
|
}).strict());
|
|
58
|
-
const BaseAgentConfigSchema = external_zod_namespaceObject.
|
|
59
|
-
name: external_zod_namespaceObject.
|
|
60
|
-
description: external_zod_namespaceObject.
|
|
61
|
-
systemPrompt: external_zod_namespaceObject.
|
|
62
|
-
tools: external_zod_namespaceObject.
|
|
63
|
-
model: external_zod_namespaceObject.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
const BaseAgentConfigSchema = external_zod_namespaceObject.object({
|
|
70
|
+
name: external_zod_namespaceObject.string().min(1).describe("Unique agent name (e.g., 'data-analyst')"),
|
|
71
|
+
description: external_zod_namespaceObject.string().min(1).describe("Action-oriented description of what the agent does (helps root agent decide when to delegate)"),
|
|
72
|
+
systemPrompt: external_zod_namespaceObject.string().min(1).describe("Detailed instructions for the agent, including tool usage guidance and output formatting"),
|
|
73
|
+
tools: external_zod_namespaceObject.array(AvailableToolNames).optional().describe("List of available tools for this agent. Keep minimal and focused."),
|
|
74
|
+
model: external_zod_namespaceObject.string().optional().describe('Model override in format "provider:model-name" (e.g., "anthropic:claude-opus-4-5", "codex:codex-mini-latest", "openrouter:openai/gpt-4o", "copilot:gpt-4o")'),
|
|
75
|
+
reasoningEffort: ReasoningEffortSchema.optional().describe("Optional reasoning/thinking effort for supported models (ignored when unsupported)"),
|
|
76
|
+
blockedCommands: external_zod_namespaceObject.array(external_zod_namespaceObject.string()).optional().describe("List of blocked commands for command_execute tool (e.g., ['rm', 'mv'])"),
|
|
77
|
+
allowScriptExecution: external_zod_namespaceObject.boolean().optional().default(true).describe("Whether to allow script execution in command_execute tool"),
|
|
78
|
+
commandTimeout: external_zod_namespaceObject.number().optional().default(300000).describe("Command execution timeout in milliseconds (default: 300000)"),
|
|
67
79
|
toolHooks: types_cjs_namespaceObject.HooksConfigSchema.optional().describe("Agent-specific tool hooks configuration"),
|
|
68
80
|
mcp: mcp_cjs_namespaceObject.MCPServersConfigSchema.optional().describe("Agent-specific MCP server configurations"),
|
|
69
|
-
mcpUseGlobal: external_zod_namespaceObject.
|
|
81
|
+
mcpUseGlobal: external_zod_namespaceObject.boolean().optional().default(false).describe("Whether this agent should also load global MCP servers from wingman.config.json"),
|
|
70
82
|
voice: voice_cjs_namespaceObject.AgentVoiceConfigSchema.optional().describe("Agent-specific voice configuration"),
|
|
71
83
|
promptRefinement: PromptRefinementSchema.optional().describe("Optional per-agent prompt refinement settings")
|
|
72
84
|
});
|
|
73
85
|
const AgentConfigSchema = BaseAgentConfigSchema.extend({
|
|
74
|
-
subAgents: external_zod_namespaceObject.
|
|
86
|
+
subAgents: external_zod_namespaceObject.array(BaseAgentConfigSchema).optional().describe("List of sub-agents that this agent can delegate to (each may include its own model override)")
|
|
75
87
|
}).superRefine((config, ctx)=>{
|
|
76
88
|
if (!config.subAgents || 0 === config.subAgents.length) return;
|
|
77
89
|
const parentName = config.name.trim().toLowerCase();
|
|
@@ -110,7 +122,7 @@ function validateAgentConfig(config) {
|
|
|
110
122
|
data
|
|
111
123
|
};
|
|
112
124
|
} catch (error) {
|
|
113
|
-
if (error instanceof external_zod_namespaceObject.
|
|
125
|
+
if (error instanceof external_zod_namespaceObject.ZodError) {
|
|
114
126
|
const messages = error.issues.map((err)=>` - ${err.path.join(".")}: ${err.message}`).join("\n");
|
|
115
127
|
return {
|
|
116
128
|
success: false,
|
|
@@ -125,11 +137,13 @@ function validateAgentConfig(config) {
|
|
|
125
137
|
}
|
|
126
138
|
exports.AgentConfigSchema = __webpack_exports__.AgentConfigSchema;
|
|
127
139
|
exports.AvailableToolNames = __webpack_exports__.AvailableToolNames;
|
|
140
|
+
exports.ReasoningEffortSchema = __webpack_exports__.ReasoningEffortSchema;
|
|
128
141
|
exports.WingmanDirectory = __webpack_exports__.WingmanDirectory;
|
|
129
142
|
exports.validateAgentConfig = __webpack_exports__.validateAgentConfig;
|
|
130
143
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
131
144
|
"AgentConfigSchema",
|
|
132
145
|
"AvailableToolNames",
|
|
146
|
+
"ReasoningEffortSchema",
|
|
133
147
|
"WingmanDirectory",
|
|
134
148
|
"validateAgentConfig"
|
|
135
149
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
export declare const WingmanDirectory = ".wingman";
|
|
3
3
|
/**
|
|
4
4
|
* Available tool names for user-defined agents
|
|
@@ -7,6 +7,7 @@ export declare const AvailableToolNames: z.ZodEnum<{
|
|
|
7
7
|
internet_search: "internet_search";
|
|
8
8
|
web_crawler: "web_crawler";
|
|
9
9
|
command_execute: "command_execute";
|
|
10
|
+
background_terminal: "background_terminal";
|
|
10
11
|
think: "think";
|
|
11
12
|
code_search: "code_search";
|
|
12
13
|
git_status: "git_status";
|
|
@@ -15,6 +16,13 @@ export declare const AvailableToolNames: z.ZodEnum<{
|
|
|
15
16
|
ui_present: "ui_present";
|
|
16
17
|
}>;
|
|
17
18
|
export type AvailableToolName = z.infer<typeof AvailableToolNames>;
|
|
19
|
+
export declare const ReasoningEffortSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
|
|
20
|
+
minimal: "minimal";
|
|
21
|
+
low: "low";
|
|
22
|
+
medium: "medium";
|
|
23
|
+
high: "high";
|
|
24
|
+
}>>;
|
|
25
|
+
export type ReasoningEffort = z.infer<typeof ReasoningEffortSchema>;
|
|
18
26
|
declare const PromptRefinementSchema: z.ZodPipe<z.ZodTransform<{} | null | undefined, unknown>, z.ZodObject<{
|
|
19
27
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
20
28
|
instructionsPath: z.ZodOptional<z.ZodString>;
|
|
@@ -28,6 +36,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
28
36
|
internet_search: "internet_search";
|
|
29
37
|
web_crawler: "web_crawler";
|
|
30
38
|
command_execute: "command_execute";
|
|
39
|
+
background_terminal: "background_terminal";
|
|
31
40
|
think: "think";
|
|
32
41
|
code_search: "code_search";
|
|
33
42
|
git_status: "git_status";
|
|
@@ -36,6 +45,12 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
36
45
|
ui_present: "ui_present";
|
|
37
46
|
}>>>;
|
|
38
47
|
model: z.ZodOptional<z.ZodString>;
|
|
48
|
+
reasoningEffort: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
|
|
49
|
+
minimal: "minimal";
|
|
50
|
+
low: "low";
|
|
51
|
+
medium: "medium";
|
|
52
|
+
high: "high";
|
|
53
|
+
}>>>;
|
|
39
54
|
blockedCommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
55
|
allowScriptExecution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
41
56
|
commandTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -115,6 +130,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
115
130
|
internet_search: "internet_search";
|
|
116
131
|
web_crawler: "web_crawler";
|
|
117
132
|
command_execute: "command_execute";
|
|
133
|
+
background_terminal: "background_terminal";
|
|
118
134
|
think: "think";
|
|
119
135
|
code_search: "code_search";
|
|
120
136
|
git_status: "git_status";
|
|
@@ -123,6 +139,12 @@ export declare const AgentConfigSchema: z.ZodObject<{
|
|
|
123
139
|
ui_present: "ui_present";
|
|
124
140
|
}>>>;
|
|
125
141
|
model: z.ZodOptional<z.ZodString>;
|
|
142
|
+
reasoningEffort: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
|
|
143
|
+
minimal: "minimal";
|
|
144
|
+
low: "low";
|
|
145
|
+
medium: "medium";
|
|
146
|
+
high: "high";
|
|
147
|
+
}>>>;
|
|
126
148
|
blockedCommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
127
149
|
allowScriptExecution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
128
150
|
commandTimeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ZodError, array, boolean as external_zod_boolean, enum as external_zod_enum, number, object, preprocess, string } from "zod";
|
|
2
2
|
import { HooksConfigSchema } from "../middleware/hooks/types.js";
|
|
3
3
|
import { MCPServersConfigSchema } from "../../types/mcp.js";
|
|
4
4
|
import { AgentVoiceConfigSchema } from "../../types/voice.js";
|
|
5
5
|
const WingmanDirectory = ".wingman";
|
|
6
|
-
const AvailableToolNames =
|
|
6
|
+
const AvailableToolNames = external_zod_enum([
|
|
7
7
|
"internet_search",
|
|
8
8
|
"web_crawler",
|
|
9
9
|
"command_execute",
|
|
10
|
+
"background_terminal",
|
|
10
11
|
"think",
|
|
11
12
|
"code_search",
|
|
12
13
|
"git_status",
|
|
@@ -14,33 +15,43 @@ const AvailableToolNames = z["enum"]([
|
|
|
14
15
|
"ui_registry_get",
|
|
15
16
|
"ui_present"
|
|
16
17
|
]);
|
|
17
|
-
const
|
|
18
|
+
const ReasoningEffortSchema = preprocess((value)=>{
|
|
19
|
+
if ("string" == typeof value) return value.trim().toLowerCase();
|
|
20
|
+
return value;
|
|
21
|
+
}, external_zod_enum([
|
|
22
|
+
"minimal",
|
|
23
|
+
"low",
|
|
24
|
+
"medium",
|
|
25
|
+
"high"
|
|
26
|
+
]));
|
|
27
|
+
const PromptRefinementSchema = preprocess((value)=>{
|
|
18
28
|
if (void 0 === value) return;
|
|
19
29
|
if ("boolean" == typeof value) return {
|
|
20
30
|
enabled: value
|
|
21
31
|
};
|
|
22
32
|
return value;
|
|
23
|
-
},
|
|
24
|
-
enabled:
|
|
25
|
-
instructionsPath:
|
|
33
|
+
}, object({
|
|
34
|
+
enabled: external_zod_boolean().optional().default(true).describe("Whether prompt refinement is enabled for this agent"),
|
|
35
|
+
instructionsPath: string().min(1).optional().describe("Path (virtual) to store the agent's prompt refinement overlay (defaults under /memories/)")
|
|
26
36
|
}).strict());
|
|
27
|
-
const BaseAgentConfigSchema =
|
|
28
|
-
name:
|
|
29
|
-
description:
|
|
30
|
-
systemPrompt:
|
|
31
|
-
tools:
|
|
32
|
-
model:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
const BaseAgentConfigSchema = object({
|
|
38
|
+
name: string().min(1).describe("Unique agent name (e.g., 'data-analyst')"),
|
|
39
|
+
description: string().min(1).describe("Action-oriented description of what the agent does (helps root agent decide when to delegate)"),
|
|
40
|
+
systemPrompt: string().min(1).describe("Detailed instructions for the agent, including tool usage guidance and output formatting"),
|
|
41
|
+
tools: array(AvailableToolNames).optional().describe("List of available tools for this agent. Keep minimal and focused."),
|
|
42
|
+
model: string().optional().describe('Model override in format "provider:model-name" (e.g., "anthropic:claude-opus-4-5", "codex:codex-mini-latest", "openrouter:openai/gpt-4o", "copilot:gpt-4o")'),
|
|
43
|
+
reasoningEffort: ReasoningEffortSchema.optional().describe("Optional reasoning/thinking effort for supported models (ignored when unsupported)"),
|
|
44
|
+
blockedCommands: array(string()).optional().describe("List of blocked commands for command_execute tool (e.g., ['rm', 'mv'])"),
|
|
45
|
+
allowScriptExecution: external_zod_boolean().optional().default(true).describe("Whether to allow script execution in command_execute tool"),
|
|
46
|
+
commandTimeout: number().optional().default(300000).describe("Command execution timeout in milliseconds (default: 300000)"),
|
|
36
47
|
toolHooks: HooksConfigSchema.optional().describe("Agent-specific tool hooks configuration"),
|
|
37
48
|
mcp: MCPServersConfigSchema.optional().describe("Agent-specific MCP server configurations"),
|
|
38
|
-
mcpUseGlobal:
|
|
49
|
+
mcpUseGlobal: external_zod_boolean().optional().default(false).describe("Whether this agent should also load global MCP servers from wingman.config.json"),
|
|
39
50
|
voice: AgentVoiceConfigSchema.optional().describe("Agent-specific voice configuration"),
|
|
40
51
|
promptRefinement: PromptRefinementSchema.optional().describe("Optional per-agent prompt refinement settings")
|
|
41
52
|
});
|
|
42
53
|
const AgentConfigSchema = BaseAgentConfigSchema.extend({
|
|
43
|
-
subAgents:
|
|
54
|
+
subAgents: array(BaseAgentConfigSchema).optional().describe("List of sub-agents that this agent can delegate to (each may include its own model override)")
|
|
44
55
|
}).superRefine((config, ctx)=>{
|
|
45
56
|
if (!config.subAgents || 0 === config.subAgents.length) return;
|
|
46
57
|
const parentName = config.name.trim().toLowerCase();
|
|
@@ -79,7 +90,7 @@ function validateAgentConfig(config) {
|
|
|
79
90
|
data
|
|
80
91
|
};
|
|
81
92
|
} catch (error) {
|
|
82
|
-
if (error instanceof
|
|
93
|
+
if (error instanceof ZodError) {
|
|
83
94
|
const messages = error.issues.map((err)=>` - ${err.path.join(".")}: ${err.message}`).join("\n");
|
|
84
95
|
return {
|
|
85
96
|
success: false,
|
|
@@ -92,4 +103,4 @@ function validateAgentConfig(config) {
|
|
|
92
103
|
};
|
|
93
104
|
}
|
|
94
105
|
}
|
|
95
|
-
export { AgentConfigSchema, AvailableToolNames, WingmanDirectory, validateAgentConfig };
|
|
106
|
+
export { AgentConfigSchema, AvailableToolNames, ReasoningEffortSchema, WingmanDirectory, validateAgentConfig };
|
|
@@ -29,10 +29,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
30
30
|
const external_node_path_namespaceObject = require("node:path");
|
|
31
31
|
const external_js_yaml_namespaceObject = require("js-yaml");
|
|
32
|
+
const external_logger_cjs_namespaceObject = require("../../logger.cjs");
|
|
32
33
|
const external_agentConfig_cjs_namespaceObject = require("./agentConfig.cjs");
|
|
33
|
-
const external_toolRegistry_cjs_namespaceObject = require("./toolRegistry.cjs");
|
|
34
34
|
const external_modelFactory_cjs_namespaceObject = require("./modelFactory.cjs");
|
|
35
|
-
const
|
|
35
|
+
const external_toolRegistry_cjs_namespaceObject = require("./toolRegistry.cjs");
|
|
36
36
|
function _define_property(obj, key, value) {
|
|
37
37
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
38
38
|
value: value,
|
|
@@ -59,6 +59,7 @@ const buildPromptRefinementInstructions = (instructionsPath)=>[
|
|
|
59
59
|
"Prompt Refinement:",
|
|
60
60
|
`- Maintain a durable overlay at ${instructionsPath} for stable preferences and corrections.`,
|
|
61
61
|
"- Read it at the start of each session and follow it in addition to this system prompt.",
|
|
62
|
+
"- Treat that overlay as secondary preference memory; if it conflicts with role, safety, or execution rules in this system prompt, follow this system prompt.",
|
|
62
63
|
'- Only update it when the user gives explicit, lasting feedback (e.g., "always", "never", "prefer").',
|
|
63
64
|
"- Keep entries short, stable, and avoid task-specific details.",
|
|
64
65
|
"- If the file doesn't exist, create it with a short header and bullet list."
|
|
@@ -126,12 +127,18 @@ class AgentLoader {
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
normalizeAgentConfig(config) {
|
|
130
|
+
const normalizeReasoningEffort = (target)=>{
|
|
131
|
+
if (void 0 === target.reasoningEffort && void 0 !== target.thinkingEffort) target.reasoningEffort = target.thinkingEffort;
|
|
132
|
+
if ("thinkingEffort" in target) delete target.thinkingEffort;
|
|
133
|
+
};
|
|
134
|
+
normalizeReasoningEffort(config);
|
|
129
135
|
if (config.subagents && !config.subAgents) {
|
|
130
136
|
config.subAgents = config.subagents;
|
|
131
137
|
delete config.subagents;
|
|
132
138
|
}
|
|
133
|
-
if (Array.isArray(config.subAgents)) {
|
|
134
|
-
|
|
139
|
+
if (Array.isArray(config.subAgents)) for (const subagent of config.subAgents){
|
|
140
|
+
normalizeReasoningEffort(subagent);
|
|
141
|
+
if (subagent?.subagents && !subagent.subAgents) {
|
|
135
142
|
subagent.subAgents = subagent.subagents;
|
|
136
143
|
delete subagent.subagents;
|
|
137
144
|
}
|
|
@@ -224,7 +231,8 @@ class AgentLoader {
|
|
|
224
231
|
searchConfig: this.wingmanConfig?.search,
|
|
225
232
|
mcpConfigs,
|
|
226
233
|
skillsDirectory,
|
|
227
|
-
dynamicUiEnabled
|
|
234
|
+
dynamicUiEnabled,
|
|
235
|
+
...this.runtimeToolOptions
|
|
228
236
|
};
|
|
229
237
|
};
|
|
230
238
|
if (config.tools && config.tools.length > 0) agent.tools = await (0, external_toolRegistry_cjs_namespaceObject.createTools)(config.tools, buildToolOptions(config));
|
|
@@ -240,12 +248,16 @@ class AgentLoader {
|
|
|
240
248
|
if (config.mcp) agent.mcpConfig = config.mcp;
|
|
241
249
|
if (config.mcpUseGlobal) agent.mcpUseGlobal = true;
|
|
242
250
|
if (config.model) try {
|
|
243
|
-
agent.model = external_modelFactory_cjs_namespaceObject.ModelFactory.createModel(config.model
|
|
251
|
+
agent.model = external_modelFactory_cjs_namespaceObject.ModelFactory.createModel(config.model, {
|
|
252
|
+
reasoningEffort: config.reasoningEffort,
|
|
253
|
+
ownerLabel: `Agent "${config.name}"`
|
|
254
|
+
});
|
|
244
255
|
logger.info(`Agent "${config.name}" using model: ${config.model}`);
|
|
245
256
|
} catch (error) {
|
|
246
257
|
logger.error(`Failed to create model for agent "${config.name}": ${error}`);
|
|
247
258
|
logger.info(`Agent "${config.name}" will use default model`);
|
|
248
259
|
}
|
|
260
|
+
else if (config.reasoningEffort) logger.warn(`Agent "${config.name}" set reasoningEffort="${config.reasoningEffort}" but has no model override. Ignoring.`);
|
|
249
261
|
if (config.subAgents) {
|
|
250
262
|
const subagents = [];
|
|
251
263
|
for (const subagent of config.subAgents){
|
|
@@ -269,26 +281,32 @@ class AgentLoader {
|
|
|
269
281
|
];
|
|
270
282
|
} else sub.tools = subUiTools;
|
|
271
283
|
if (subagent.model) try {
|
|
272
|
-
sub.model = external_modelFactory_cjs_namespaceObject.ModelFactory.createModel(subagent.model
|
|
284
|
+
sub.model = external_modelFactory_cjs_namespaceObject.ModelFactory.createModel(subagent.model, {
|
|
285
|
+
reasoningEffort: subagent.reasoningEffort,
|
|
286
|
+
ownerLabel: `Subagent "${subagent.name}"`
|
|
287
|
+
});
|
|
273
288
|
logger.info(`Subagent "${subagent.name}" using model: ${subagent.model}`);
|
|
274
289
|
} catch (error) {
|
|
275
290
|
logger.error(`Failed to create model for subagent "${subagent.name}": ${error}`);
|
|
276
291
|
}
|
|
292
|
+
else if (subagent.reasoningEffort) logger.warn(`Subagent "${subagent.name}" set reasoningEffort="${subagent.reasoningEffort}" but has no model override. Ignoring.`);
|
|
277
293
|
subagents.push(sub);
|
|
278
294
|
}
|
|
279
295
|
agent.subagents = subagents;
|
|
280
296
|
}
|
|
281
297
|
return agent;
|
|
282
298
|
}
|
|
283
|
-
constructor(configDir = external_agentConfig_cjs_namespaceObject.WingmanDirectory, workspace = process.cwd(), wingmanConfig, executionWorkspace = workspace){
|
|
299
|
+
constructor(configDir = external_agentConfig_cjs_namespaceObject.WingmanDirectory, workspace = process.cwd(), wingmanConfig, executionWorkspace = workspace, runtimeToolOptions = {}){
|
|
284
300
|
_define_property(this, "configDir", void 0);
|
|
285
301
|
_define_property(this, "workspace", void 0);
|
|
286
302
|
_define_property(this, "wingmanConfig", void 0);
|
|
287
303
|
_define_property(this, "executionWorkspace", void 0);
|
|
304
|
+
_define_property(this, "runtimeToolOptions", void 0);
|
|
288
305
|
this.configDir = configDir;
|
|
289
306
|
this.workspace = workspace;
|
|
290
307
|
this.wingmanConfig = wingmanConfig;
|
|
291
308
|
this.executionWorkspace = executionWorkspace;
|
|
309
|
+
this.runtimeToolOptions = runtimeToolOptions;
|
|
292
310
|
}
|
|
293
311
|
}
|
|
294
312
|
exports.AgentLoader = __webpack_exports__.AgentLoader;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type WingmanAgentConfig } from "./agentConfig.js";
|
|
2
1
|
import type { WingmanAgent } from "@/types/agents.js";
|
|
3
2
|
import type { WingmanConfigType } from "../../cli/config/schema.js";
|
|
3
|
+
import { type WingmanAgentConfig } from "./agentConfig.js";
|
|
4
|
+
import { type ToolOptions } from "./toolRegistry.js";
|
|
4
5
|
/**
|
|
5
6
|
* Load and validate agent configurations from multiple sources
|
|
6
7
|
*/
|
|
@@ -9,7 +10,8 @@ export declare class AgentLoader {
|
|
|
9
10
|
private workspace;
|
|
10
11
|
private wingmanConfig?;
|
|
11
12
|
private executionWorkspace;
|
|
12
|
-
|
|
13
|
+
private runtimeToolOptions;
|
|
14
|
+
constructor(configDir?: string, workspace?: string, wingmanConfig?: WingmanConfigType | undefined, executionWorkspace?: string, runtimeToolOptions?: Partial<ToolOptions>);
|
|
13
15
|
private resolveConfigPath;
|
|
14
16
|
loadAllAgentConfigs(): WingmanAgentConfig[];
|
|
15
17
|
/**
|