pulseed 0.4.19 → 0.5.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/README.md +34 -27
- package/dist/adapters/types/mcp.d.ts +6 -6
- package/dist/base/config/global-config.d.ts +4 -4
- package/dist/base/llm/codex-llm-client.d.ts +8 -2
- package/dist/base/llm/codex-llm-client.d.ts.map +1 -1
- package/dist/base/llm/codex-llm-client.js +75 -30
- package/dist/base/llm/codex-llm-client.js.map +1 -1
- package/dist/base/llm/provider-config.d.ts +14 -0
- package/dist/base/llm/provider-config.d.ts.map +1 -1
- package/dist/base/llm/provider-config.js +56 -2
- package/dist/base/llm/provider-config.js.map +1 -1
- package/dist/base/llm/provider-factory.d.ts.map +1 -1
- package/dist/base/llm/provider-factory.js +3 -0
- package/dist/base/llm/provider-factory.js.map +1 -1
- package/dist/grounding/contracts.d.ts +160 -0
- package/dist/grounding/contracts.d.ts.map +1 -0
- package/dist/grounding/contracts.js +2 -0
- package/dist/grounding/contracts.js.map +1 -0
- package/dist/grounding/gateway.d.ts +12 -0
- package/dist/grounding/gateway.d.ts.map +1 -0
- package/dist/grounding/gateway.js +116 -0
- package/dist/grounding/gateway.js.map +1 -0
- package/dist/grounding/profiles.d.ts +4 -0
- package/dist/grounding/profiles.d.ts.map +1 -0
- package/dist/grounding/profiles.js +159 -0
- package/dist/grounding/profiles.js.map +1 -0
- package/dist/grounding/providers/agents-provider.d.ts +14 -0
- package/dist/grounding/providers/agents-provider.d.ts.map +1 -0
- package/dist/grounding/providers/agents-provider.js +129 -0
- package/dist/grounding/providers/agents-provider.js.map +1 -0
- package/dist/grounding/providers/goal-state-provider.d.ts +3 -0
- package/dist/grounding/providers/goal-state-provider.d.ts.map +1 -0
- package/dist/grounding/providers/goal-state-provider.js +34 -0
- package/dist/grounding/providers/goal-state-provider.js.map +1 -0
- package/dist/grounding/providers/helpers.d.ts +13 -0
- package/dist/grounding/providers/helpers.d.ts.map +1 -0
- package/dist/grounding/providers/helpers.js +93 -0
- package/dist/grounding/providers/helpers.js.map +1 -0
- package/dist/grounding/providers/knowledge-provider.d.ts +3 -0
- package/dist/grounding/providers/knowledge-provider.d.ts.map +1 -0
- package/dist/grounding/providers/knowledge-provider.js +49 -0
- package/dist/grounding/providers/knowledge-provider.js.map +1 -0
- package/dist/grounding/providers/lessons-provider.d.ts +3 -0
- package/dist/grounding/providers/lessons-provider.d.ts.map +1 -0
- package/dist/grounding/providers/lessons-provider.js +36 -0
- package/dist/grounding/providers/lessons-provider.js.map +1 -0
- package/dist/grounding/providers/plugins-provider.d.ts +3 -0
- package/dist/grounding/providers/plugins-provider.d.ts.map +1 -0
- package/dist/grounding/providers/plugins-provider.js +35 -0
- package/dist/grounding/providers/plugins-provider.js.map +1 -0
- package/dist/grounding/providers/progress-history-provider.d.ts +3 -0
- package/dist/grounding/providers/progress-history-provider.d.ts.map +1 -0
- package/dist/grounding/providers/progress-history-provider.js +30 -0
- package/dist/grounding/providers/progress-history-provider.js.map +1 -0
- package/dist/grounding/providers/provider-state-provider.d.ts +3 -0
- package/dist/grounding/providers/provider-state-provider.d.ts.map +1 -0
- package/dist/grounding/providers/provider-state-provider.js +32 -0
- package/dist/grounding/providers/provider-state-provider.js.map +1 -0
- package/dist/grounding/providers/session-history-provider.d.ts +3 -0
- package/dist/grounding/providers/session-history-provider.d.ts.map +1 -0
- package/dist/grounding/providers/session-history-provider.js +72 -0
- package/dist/grounding/providers/session-history-provider.js.map +1 -0
- package/dist/grounding/providers/soil-provider.d.ts +3 -0
- package/dist/grounding/providers/soil-provider.d.ts.map +1 -0
- package/dist/grounding/providers/soil-provider.js +70 -0
- package/dist/grounding/providers/soil-provider.js.map +1 -0
- package/dist/grounding/providers/static-policy-provider.d.ts +8 -0
- package/dist/grounding/providers/static-policy-provider.d.ts.map +1 -0
- package/dist/grounding/providers/static-policy-provider.js +81 -0
- package/dist/grounding/providers/static-policy-provider.js.map +1 -0
- package/dist/grounding/providers/task-state-provider.d.ts +3 -0
- package/dist/grounding/providers/task-state-provider.d.ts.map +1 -0
- package/dist/grounding/providers/task-state-provider.js +55 -0
- package/dist/grounding/providers/task-state-provider.js.map +1 -0
- package/dist/grounding/providers/trust-state-provider.d.ts +3 -0
- package/dist/grounding/providers/trust-state-provider.d.ts.map +1 -0
- package/dist/grounding/providers/trust-state-provider.js +25 -0
- package/dist/grounding/providers/trust-state-provider.js.map +1 -0
- package/dist/grounding/providers/workspace-facts-provider.d.ts +3 -0
- package/dist/grounding/providers/workspace-facts-provider.d.ts.map +1 -0
- package/dist/grounding/providers/workspace-facts-provider.js +22 -0
- package/dist/grounding/providers/workspace-facts-provider.js.map +1 -0
- package/dist/grounding/renderers/debug-renderer.d.ts +3 -0
- package/dist/grounding/renderers/debug-renderer.d.ts.map +1 -0
- package/dist/grounding/renderers/debug-renderer.js +11 -0
- package/dist/grounding/renderers/debug-renderer.js.map +1 -0
- package/dist/grounding/renderers/prompt-renderer.d.ts +10 -0
- package/dist/grounding/renderers/prompt-renderer.d.ts.map +1 -0
- package/dist/grounding/renderers/prompt-renderer.js +23 -0
- package/dist/grounding/renderers/prompt-renderer.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/interface/chat/chat-event-state.d.ts +1 -0
- package/dist/interface/chat/chat-event-state.d.ts.map +1 -1
- package/dist/interface/chat/chat-event-state.js +12 -2
- package/dist/interface/chat/chat-event-state.js.map +1 -1
- package/dist/interface/chat/chat-runner.d.ts +18 -6
- package/dist/interface/chat/chat-runner.d.ts.map +1 -1
- package/dist/interface/chat/chat-runner.js +331 -148
- package/dist/interface/chat/chat-runner.js.map +1 -1
- package/dist/interface/chat/cross-platform-session-global.d.ts +5 -0
- package/dist/interface/chat/cross-platform-session-global.d.ts.map +1 -0
- package/dist/interface/chat/cross-platform-session-global.js +17 -0
- package/dist/interface/chat/cross-platform-session-global.js.map +1 -0
- package/dist/interface/chat/cross-platform-session.d.ts +22 -0
- package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
- package/dist/interface/chat/cross-platform-session.js +192 -61
- package/dist/interface/chat/cross-platform-session.js.map +1 -1
- package/dist/interface/chat/event-subscriber.d.ts +14 -0
- package/dist/interface/chat/event-subscriber.d.ts.map +1 -1
- package/dist/interface/chat/event-subscriber.js +138 -28
- package/dist/interface/chat/event-subscriber.js.map +1 -1
- package/dist/interface/chat/grounding.d.ts +22 -1
- package/dist/interface/chat/grounding.d.ts.map +1 -1
- package/dist/interface/chat/grounding.js +82 -127
- package/dist/interface/chat/grounding.js.map +1 -1
- package/dist/interface/chat/ingress-router.d.ts +110 -0
- package/dist/interface/chat/ingress-router.d.ts.map +1 -0
- package/dist/interface/chat/ingress-router.js +183 -0
- package/dist/interface/chat/ingress-router.js.map +1 -0
- package/dist/interface/cli/setup.d.ts.map +1 -1
- package/dist/interface/cli/setup.js +1 -0
- package/dist/interface/cli/setup.js.map +1 -1
- package/dist/interface/tui/app.d.ts +2 -2
- package/dist/interface/tui/app.d.ts.map +1 -1
- package/dist/interface/tui/app.js +9 -0
- package/dist/interface/tui/app.js.map +1 -1
- package/dist/interface/tui/chat/scroll.d.ts +1 -0
- package/dist/interface/tui/chat/scroll.d.ts.map +1 -1
- package/dist/interface/tui/chat/scroll.js +20 -1
- package/dist/interface/tui/chat/scroll.js.map +1 -1
- package/dist/interface/tui/chat/suggestions.d.ts.map +1 -1
- package/dist/interface/tui/chat/suggestions.js +6 -0
- package/dist/interface/tui/chat/suggestions.js.map +1 -1
- package/dist/interface/tui/chat/types.d.ts +2 -0
- package/dist/interface/tui/chat/types.d.ts.map +1 -1
- package/dist/interface/tui/chat/viewport.d.ts.map +1 -1
- package/dist/interface/tui/chat/viewport.js +1 -0
- package/dist/interface/tui/chat/viewport.js.map +1 -1
- package/dist/interface/tui/chat-surface.d.ts +20 -0
- package/dist/interface/tui/chat-surface.d.ts.map +1 -0
- package/dist/interface/tui/chat-surface.js +59 -0
- package/dist/interface/tui/chat-surface.js.map +1 -0
- package/dist/interface/tui/chat.d.ts +1 -1
- package/dist/interface/tui/chat.d.ts.map +1 -1
- package/dist/interface/tui/chat.js +7 -4
- package/dist/interface/tui/chat.js.map +1 -1
- package/dist/interface/tui/entry.d.ts.map +1 -1
- package/dist/interface/tui/entry.js +64 -8
- package/dist/interface/tui/entry.js.map +1 -1
- package/dist/interface/tui/flicker/MouseTracking.d.ts +1 -0
- package/dist/interface/tui/flicker/MouseTracking.d.ts.map +1 -1
- package/dist/interface/tui/flicker/MouseTracking.js +7 -0
- package/dist/interface/tui/flicker/MouseTracking.js.map +1 -1
- package/dist/interface/tui/flicker/frame-writer.d.ts.map +1 -1
- package/dist/interface/tui/flicker/frame-writer.js +5 -4
- package/dist/interface/tui/flicker/frame-writer.js.map +1 -1
- package/dist/interface/tui/flicker/index.d.ts +1 -1
- package/dist/interface/tui/flicker/index.d.ts.map +1 -1
- package/dist/interface/tui/flicker/index.js +1 -1
- package/dist/interface/tui/flicker/index.js.map +1 -1
- package/dist/interface/tui/fullscreen-chat.d.ts +28 -0
- package/dist/interface/tui/fullscreen-chat.d.ts.map +1 -1
- package/dist/interface/tui/fullscreen-chat.js +59 -33
- package/dist/interface/tui/fullscreen-chat.js.map +1 -1
- package/dist/interface/tui/help-overlay.d.ts.map +1 -1
- package/dist/interface/tui/help-overlay.js +1 -1
- package/dist/interface/tui/help-overlay.js.map +1 -1
- package/dist/interface/tui/markdown-renderer.d.ts +1 -1
- package/dist/interface/tui/markdown-renderer.d.ts.map +1 -1
- package/dist/interface/tui/markdown-renderer.js +137 -11
- package/dist/interface/tui/markdown-renderer.js.map +1 -1
- package/dist/interface/tui/test-entry.d.ts.map +1 -1
- package/dist/interface/tui/test-entry.js +3 -2
- package/dist/interface/tui/test-entry.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts +3 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js +76 -112
- package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts +11 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js +13 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-events.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js +8 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js +1 -0
- package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts +3 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +60 -50
- package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +239 -10
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +298 -96
- package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/prompted-tool-protocol.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/prompted-tool-protocol.js +1 -0
- package/dist/orchestrator/execution/agent-loop/prompted-tool-protocol.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts +2 -5
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js +10 -12
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.d.ts +2 -0
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.js +16 -9
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.js.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts +6 -6
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts.map +1 -1
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js +53 -36
- package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-policy.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop/phase-policy.js +87 -34
- package/dist/orchestrator/loop/core-loop/phase-policy.js.map +1 -1
- package/dist/orchestrator/loop/core-loop.d.ts +1 -0
- package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
- package/dist/orchestrator/loop/core-loop.js +191 -176
- package/dist/orchestrator/loop/core-loop.js.map +1 -1
- package/dist/platform/dream/dream-types.d.ts +14 -14
- package/dist/platform/knowledge/index.d.ts +3 -0
- package/dist/platform/knowledge/index.d.ts.map +1 -0
- package/dist/platform/knowledge/index.js +3 -0
- package/dist/platform/knowledge/index.js.map +1 -0
- package/dist/platform/knowledge/knowledge-manager.d.ts +1 -4
- package/dist/platform/knowledge/knowledge-manager.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-manager.js +1 -4
- package/dist/platform/knowledge/knowledge-manager.js.map +1 -1
- package/dist/platform/knowledge/public-api.d.ts +4 -0
- package/dist/platform/knowledge/public-api.d.ts.map +1 -0
- package/dist/platform/knowledge/public-api.js +4 -0
- package/dist/platform/knowledge/public-api.js.map +1 -0
- package/dist/platform/soil/contracts.d.ts +66 -66
- package/dist/runtime/daemon/runner-goal-cycle.d.ts.map +1 -1
- package/dist/runtime/daemon/runner-goal-cycle.js +36 -1
- package/dist/runtime/daemon/runner-goal-cycle.js.map +1 -1
- package/dist/runtime/plugin-loader.d.ts.map +1 -1
- package/dist/runtime/plugin-loader.js +3 -6
- package/dist/runtime/plugin-loader.js.map +1 -1
- package/dist/runtime/schedule/history.d.ts +3 -3
- package/dist/runtime/schedule/presets.d.ts +20 -20
- package/dist/runtime/schedule/source.d.ts +4 -4
- package/dist/runtime/store/runtime-operation-schemas.d.ts +2 -2
- package/dist/runtime/store/runtime-schemas.d.ts +2 -2
- package/dist/runtime/types/cron.d.ts +4 -4
- package/dist/runtime/types/schedule.d.ts +51 -51
- package/dist/runtime/types/trigger.d.ts +6 -6
- package/dist/tools/builtin/exports.d.ts +79 -0
- package/dist/tools/builtin/exports.d.ts.map +1 -0
- package/dist/tools/builtin/exports.js +78 -0
- package/dist/tools/builtin/exports.js.map +1 -0
- package/dist/tools/builtin/factory.d.ts +33 -0
- package/dist/tools/builtin/factory.d.ts.map +1 -0
- package/dist/tools/builtin/factory.js +182 -0
- package/dist/tools/builtin/factory.js.map +1 -0
- package/dist/tools/builtin/index.d.ts +3 -110
- package/dist/tools/builtin/index.d.ts.map +1 -1
- package/dist/tools/builtin/index.js +2 -262
- package/dist/tools/builtin/index.js.map +1 -1
- package/dist/tools/execution/SoilOpenTool/SoilOpenTool.d.ts +4 -4
- package/dist/tools/execution/SoilPublishTool/SoilPublishTool.d.ts +2 -2
- package/dist/tools/index.d.ts +5 -3
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/mutation/TaskCreateTool/TaskCreateTool.d.ts +4 -4
- package/dist/tools/network/GitHubCliTool/GitHubCliTool.d.ts +4 -4
- package/dist/tools/network/McpStdioTool/McpStdioTool.d.ts +8 -8
- package/dist/tools/schedule/CreateScheduleTool/CreateScheduleTool.d.ts +44 -44
- package/dist/tools/schedule/ListSchedulesTool/ListSchedulesTool.d.ts +4 -4
- package/dist/tools/schedule/UpdateScheduleTool/UpdateScheduleTool.d.ts +58 -58
- package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.d.ts +6 -6
- package/dist/tools/types.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,6 @@ Keep a goal moving until it is actually done.
|
|
|
10
10
|
[](https://www.npmjs.com/package/pulseed)
|
|
11
11
|
[](https://www.npmjs.com/package/pulseed)
|
|
12
12
|
[](https://github.com/my-name-is-yu/PulSeed/actions/workflows/ci.yml)
|
|
13
|
-
[](https://github.com/my-name-is-yu/PulSeed/actions/workflows/publish.yml)
|
|
14
13
|
[](https://nodejs.org/)
|
|
15
14
|
[](LICENSE)
|
|
16
15
|
|
|
@@ -23,7 +22,39 @@ looping until the goal is reached or the plan needs to change.
|
|
|
23
22
|
The primary entry point is `pulseed`. The normal flow is natural language, not a
|
|
24
23
|
menu of subcommands.
|
|
25
24
|
|
|
26
|
-
##
|
|
25
|
+
## Get Started
|
|
26
|
+
|
|
27
|
+
PulSeed supports Node.js 22 or 24.
|
|
28
|
+
|
|
29
|
+
Quick install (macOS / Linux):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
curl -fsSL https://raw.githubusercontent.com/my-name-is-yu/PulSeed/main/scripts/install.sh | bash
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Quick install (Windows / PowerShell):
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
irm https://raw.githubusercontent.com/my-name-is-yu/PulSeed/main/scripts/install.ps1 | iex
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Then start PulSeed:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pulseed
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For pinned-tag installs, fallback npm installs, and installer flags, see [Getting Started](docs/getting-started.md).
|
|
48
|
+
|
|
49
|
+
Then describe the goal in natural language:
|
|
50
|
+
|
|
51
|
+
- `Increase test coverage to 90%.`
|
|
52
|
+
- `Show me the current progress.`
|
|
53
|
+
- `Keep this goal moving in the background.`
|
|
54
|
+
|
|
55
|
+
PulSeed will guide provider and adapter setup when needed.
|
|
56
|
+
|
|
57
|
+
## Links
|
|
27
58
|
|
|
28
59
|
- [Get Started](docs/getting-started.md)
|
|
29
60
|
- [Docs Index](docs/index.md)
|
|
@@ -34,7 +65,7 @@ menu of subcommands.
|
|
|
34
65
|
- [Contributing](CONTRIBUTING.md)
|
|
35
66
|
- [Security](SECURITY.md)
|
|
36
67
|
|
|
37
|
-
## Why PulSeed
|
|
68
|
+
## Why PulSeed?
|
|
38
69
|
|
|
39
70
|
- Goal-first orchestration for long-running work
|
|
40
71
|
- Honest goal negotiation when a target is not realistic as stated
|
|
@@ -44,30 +75,6 @@ menu of subcommands.
|
|
|
44
75
|
- Multiple runtime surfaces: CLI, chat, TUI, daemon, and cron
|
|
45
76
|
- Support for OpenAI, Anthropic, Ollama, and adapter-based execution paths
|
|
46
77
|
|
|
47
|
-
## Start Here
|
|
48
|
-
|
|
49
|
-
PulSeed supports Node.js 22 and 24. The default install path below uses Node.js 24 via nvm.
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
|
|
53
|
-
export NVM_DIR="$HOME/.nvm"
|
|
54
|
-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
55
|
-
nvm install 24
|
|
56
|
-
nvm use 24
|
|
57
|
-
nvm alias default 24
|
|
58
|
-
npm install -g pulseed
|
|
59
|
-
pulseed
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Then describe the goal in natural language:
|
|
63
|
-
|
|
64
|
-
- `Increase test coverage to 90%.`
|
|
65
|
-
- `Show me the current progress.`
|
|
66
|
-
- `Keep this goal moving in the background.`
|
|
67
|
-
|
|
68
|
-
PulSeed will guide provider and adapter setup when needed. The recommended
|
|
69
|
-
default for most users is `agent_loop` with OpenAI or Anthropic.
|
|
70
|
-
|
|
71
78
|
## What It Does
|
|
72
79
|
|
|
73
80
|
- `CoreLoop` keeps a goal moving and decides whether to continue, refine,
|
|
@@ -46,8 +46,8 @@ export declare const MCPServerConfigSchema: z.ZodObject<{
|
|
|
46
46
|
args_template?: Record<string, unknown> | undefined;
|
|
47
47
|
}[];
|
|
48
48
|
url?: string | undefined;
|
|
49
|
-
env?: Record<string, string> | undefined;
|
|
50
49
|
command?: string | undefined;
|
|
50
|
+
env?: Record<string, string> | undefined;
|
|
51
51
|
args?: string[] | undefined;
|
|
52
52
|
}, {
|
|
53
53
|
name: string;
|
|
@@ -60,8 +60,8 @@ export declare const MCPServerConfigSchema: z.ZodObject<{
|
|
|
60
60
|
}[];
|
|
61
61
|
enabled?: boolean | undefined;
|
|
62
62
|
url?: string | undefined;
|
|
63
|
-
env?: Record<string, string> | undefined;
|
|
64
63
|
command?: string | undefined;
|
|
64
|
+
env?: Record<string, string> | undefined;
|
|
65
65
|
args?: string[] | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
export type MCPServerConfig = z.infer<typeof MCPServerConfigSchema>;
|
|
@@ -99,8 +99,8 @@ export declare const MCPServersConfigSchema: z.ZodObject<{
|
|
|
99
99
|
args_template?: Record<string, unknown> | undefined;
|
|
100
100
|
}[];
|
|
101
101
|
url?: string | undefined;
|
|
102
|
-
env?: Record<string, string> | undefined;
|
|
103
102
|
command?: string | undefined;
|
|
103
|
+
env?: Record<string, string> | undefined;
|
|
104
104
|
args?: string[] | undefined;
|
|
105
105
|
}, {
|
|
106
106
|
name: string;
|
|
@@ -113,8 +113,8 @@ export declare const MCPServersConfigSchema: z.ZodObject<{
|
|
|
113
113
|
}[];
|
|
114
114
|
enabled?: boolean | undefined;
|
|
115
115
|
url?: string | undefined;
|
|
116
|
-
env?: Record<string, string> | undefined;
|
|
117
116
|
command?: string | undefined;
|
|
117
|
+
env?: Record<string, string> | undefined;
|
|
118
118
|
args?: string[] | undefined;
|
|
119
119
|
}>, "many">;
|
|
120
120
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -129,8 +129,8 @@ export declare const MCPServersConfigSchema: z.ZodObject<{
|
|
|
129
129
|
args_template?: Record<string, unknown> | undefined;
|
|
130
130
|
}[];
|
|
131
131
|
url?: string | undefined;
|
|
132
|
-
env?: Record<string, string> | undefined;
|
|
133
132
|
command?: string | undefined;
|
|
133
|
+
env?: Record<string, string> | undefined;
|
|
134
134
|
args?: string[] | undefined;
|
|
135
135
|
}[];
|
|
136
136
|
}, {
|
|
@@ -145,8 +145,8 @@ export declare const MCPServersConfigSchema: z.ZodObject<{
|
|
|
145
145
|
}[];
|
|
146
146
|
enabled?: boolean | undefined;
|
|
147
147
|
url?: string | undefined;
|
|
148
|
-
env?: Record<string, string> | undefined;
|
|
149
148
|
command?: string | undefined;
|
|
149
|
+
env?: Record<string, string> | undefined;
|
|
150
150
|
args?: string[] | undefined;
|
|
151
151
|
}[];
|
|
152
152
|
}>;
|
|
@@ -15,7 +15,7 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
15
15
|
default_desktop_provider: string;
|
|
16
16
|
default_browser_provider: string;
|
|
17
17
|
default_research_provider: string;
|
|
18
|
-
require_approval: "
|
|
18
|
+
require_approval: "write" | "always" | "destructive";
|
|
19
19
|
allowed_apps: string[];
|
|
20
20
|
denied_apps: string[];
|
|
21
21
|
}, {
|
|
@@ -23,7 +23,7 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
23
23
|
default_desktop_provider?: string | undefined;
|
|
24
24
|
default_browser_provider?: string | undefined;
|
|
25
25
|
default_research_provider?: string | undefined;
|
|
26
|
-
require_approval?: "
|
|
26
|
+
require_approval?: "write" | "always" | "destructive" | undefined;
|
|
27
27
|
allowed_apps?: string[] | undefined;
|
|
28
28
|
denied_apps?: string[] | undefined;
|
|
29
29
|
}>>;
|
|
@@ -35,7 +35,7 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
35
35
|
default_desktop_provider: string;
|
|
36
36
|
default_browser_provider: string;
|
|
37
37
|
default_research_provider: string;
|
|
38
|
-
require_approval: "
|
|
38
|
+
require_approval: "write" | "always" | "destructive";
|
|
39
39
|
allowed_apps: string[];
|
|
40
40
|
denied_apps: string[];
|
|
41
41
|
};
|
|
@@ -47,7 +47,7 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
47
47
|
default_desktop_provider?: string | undefined;
|
|
48
48
|
default_browser_provider?: string | undefined;
|
|
49
49
|
default_research_provider?: string | undefined;
|
|
50
|
-
require_approval?: "
|
|
50
|
+
require_approval?: "write" | "always" | "destructive" | undefined;
|
|
51
51
|
allowed_apps?: string[] | undefined;
|
|
52
52
|
denied_apps?: string[] | undefined;
|
|
53
53
|
} | undefined;
|
|
@@ -9,8 +9,12 @@ export interface CodexLLMClientConfig {
|
|
|
9
9
|
lightModel?: string;
|
|
10
10
|
/** Repository path passed to Codex for workspace-aware execution. Default: "." */
|
|
11
11
|
repoPath?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Total request timeout per call in milliseconds. Default: 120000 (2 minutes) */
|
|
13
13
|
timeoutMs?: number;
|
|
14
|
+
/** Idle timeout after Codex emits output and then goes quiet. Defaults to timeoutMs. */
|
|
15
|
+
idleTimeoutMs?: number;
|
|
16
|
+
/** Total retry attempts including the initial call. Default: 3, capped at 5. */
|
|
17
|
+
retryAttempts?: number;
|
|
14
18
|
/** Sandbox passed to codex exec. Default: workspace-write. */
|
|
15
19
|
sandboxPolicy?: string;
|
|
16
20
|
/** Pass --skip-git-repo-check. Default: true. */
|
|
@@ -31,7 +35,9 @@ export declare class CodexLLMClient extends BaseLLMClient implements ILLMClient
|
|
|
31
35
|
private readonly cliPath;
|
|
32
36
|
private readonly model;
|
|
33
37
|
private readonly repoPath;
|
|
34
|
-
private readonly
|
|
38
|
+
private readonly totalTimeoutMs;
|
|
39
|
+
private readonly idleTimeoutMs;
|
|
40
|
+
private readonly retryAttempts;
|
|
35
41
|
private readonly sandboxPolicy;
|
|
36
42
|
private readonly skipGitRepoCheck;
|
|
37
43
|
constructor(config?: CodexLLMClientConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-llm-client.d.ts","sourceRoot":"","sources":["../../../src/base/llm/codex-llm-client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"codex-llm-client.d.ts","sourceRoot":"","sources":["../../../src/base/llm/codex-llm-client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAsCzB,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uGAAuG;IACvG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,qBAAa,cAAe,SAAQ,aAAc,YAAW,UAAU;IACrE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;IAC3C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAU;gBAE/B,MAAM,GAAE,oBAAyB;IAkB7C;;;OAGG;IACG,WAAW,CACf,QAAQ,EAAE,UAAU,EAAE,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,WAAW,CAAC;IAiCvB,6EAA6E;IAC7E,mBAAmB,IAAI,OAAO;IAE9B;;;OAGG;YACW,WAAW;CAyI1B"}
|
|
@@ -2,11 +2,15 @@ import * as fsp from "node:fs/promises";
|
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
|
-
import { BaseLLMClient
|
|
5
|
+
import { BaseLLMClient } from "./base-llm-client.js";
|
|
6
6
|
import { sleep } from "../utils/sleep.js";
|
|
7
7
|
import { LLMError } from "../utils/errors.js";
|
|
8
8
|
// ─── Constants ───
|
|
9
9
|
const DEFAULT_TIMEOUT_MS = 120_000; // 2 minutes per call
|
|
10
|
+
const DEFAULT_RETRY_ATTEMPTS = 3;
|
|
11
|
+
const MAX_RETRY_ATTEMPTS = 5;
|
|
12
|
+
const RETRY_DELAYS_MS = [1000, 2000, 4000, 8000];
|
|
13
|
+
const SIGKILL_DELAY_MS = 5000;
|
|
10
14
|
/**
|
|
11
15
|
* Build a single prompt string from messages and system prompt.
|
|
12
16
|
* Format:
|
|
@@ -42,7 +46,9 @@ export class CodexLLMClient extends BaseLLMClient {
|
|
|
42
46
|
cliPath;
|
|
43
47
|
model;
|
|
44
48
|
repoPath;
|
|
45
|
-
|
|
49
|
+
totalTimeoutMs;
|
|
50
|
+
idleTimeoutMs;
|
|
51
|
+
retryAttempts;
|
|
46
52
|
sandboxPolicy;
|
|
47
53
|
skipGitRepoCheck;
|
|
48
54
|
constructor(config = {}) {
|
|
@@ -51,7 +57,14 @@ export class CodexLLMClient extends BaseLLMClient {
|
|
|
51
57
|
this.model = config.model;
|
|
52
58
|
this.lightModel = config.lightModel;
|
|
53
59
|
this.repoPath = config.repoPath?.trim() || ".";
|
|
54
|
-
this.
|
|
60
|
+
this.totalTimeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
61
|
+
this.idleTimeoutMs = typeof config.idleTimeoutMs === "number" && Number.isFinite(config.idleTimeoutMs)
|
|
62
|
+
? Math.max(0, Math.trunc(config.idleTimeoutMs))
|
|
63
|
+
: this.totalTimeoutMs;
|
|
64
|
+
const requestedRetryAttempts = typeof config.retryAttempts === "number" && Number.isFinite(config.retryAttempts)
|
|
65
|
+
? Math.trunc(config.retryAttempts)
|
|
66
|
+
: DEFAULT_RETRY_ATTEMPTS;
|
|
67
|
+
this.retryAttempts = Math.max(1, Math.min(requestedRetryAttempts, MAX_RETRY_ATTEMPTS));
|
|
55
68
|
this.sandboxPolicy = config.sandboxPolicy ?? "workspace-write";
|
|
56
69
|
this.skipGitRepoCheck = config.skipGitRepoCheck ?? true;
|
|
57
70
|
}
|
|
@@ -64,7 +77,7 @@ export class CodexLLMClient extends BaseLLMClient {
|
|
|
64
77
|
const system = options?.system;
|
|
65
78
|
const prompt = buildPrompt(messages, system);
|
|
66
79
|
let lastError;
|
|
67
|
-
for (let attempt = 0; attempt <
|
|
80
|
+
for (let attempt = 0; attempt < this.retryAttempts; attempt++) {
|
|
68
81
|
try {
|
|
69
82
|
const content = await this._spawnCodex(prompt, model);
|
|
70
83
|
return {
|
|
@@ -78,8 +91,11 @@ export class CodexLLMClient extends BaseLLMClient {
|
|
|
78
91
|
}
|
|
79
92
|
catch (err) {
|
|
80
93
|
lastError = err;
|
|
81
|
-
if (
|
|
82
|
-
|
|
94
|
+
if (!isRetryableCodexError(err)) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
if (attempt < this.retryAttempts - 1) {
|
|
98
|
+
await sleep(RETRY_DELAYS_MS[attempt] ?? RETRY_DELAYS_MS[RETRY_DELAYS_MS.length - 1]);
|
|
83
99
|
}
|
|
84
100
|
}
|
|
85
101
|
}
|
|
@@ -119,21 +135,56 @@ export class CodexLLMClient extends BaseLLMClient {
|
|
|
119
135
|
cwd: this.repoPath,
|
|
120
136
|
});
|
|
121
137
|
let timedOut = false;
|
|
138
|
+
let timeoutReason;
|
|
139
|
+
let totalTimeoutHandle;
|
|
140
|
+
let idleTimeoutHandle;
|
|
141
|
+
let sigkillHandle;
|
|
122
142
|
let stderrData = "";
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
143
|
+
const clearTimers = () => {
|
|
144
|
+
if (totalTimeoutHandle)
|
|
145
|
+
clearTimeout(totalTimeoutHandle);
|
|
146
|
+
if (idleTimeoutHandle)
|
|
147
|
+
clearTimeout(idleTimeoutHandle);
|
|
148
|
+
if (sigkillHandle)
|
|
149
|
+
clearTimeout(sigkillHandle);
|
|
150
|
+
};
|
|
151
|
+
const cleanupTmp = () => {
|
|
152
|
+
clearTimers();
|
|
153
|
+
void _cleanupTmp(tmpDir, tmpFile).catch((cleanupErr) => {
|
|
154
|
+
console.debug("CodexLLMClient: _cleanupTmp failed (non-critical)", String(cleanupErr));
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
const triggerTimeout = (reason) => {
|
|
158
|
+
if (timedOut)
|
|
159
|
+
return;
|
|
126
160
|
timedOut = true;
|
|
161
|
+
timeoutReason = reason;
|
|
127
162
|
child.kill("SIGTERM");
|
|
128
|
-
setTimeout(() => {
|
|
163
|
+
sigkillHandle = setTimeout(() => {
|
|
129
164
|
try {
|
|
130
165
|
child.kill("SIGKILL");
|
|
131
166
|
}
|
|
132
167
|
catch {
|
|
133
168
|
// process already exited
|
|
134
169
|
}
|
|
135
|
-
},
|
|
136
|
-
}
|
|
170
|
+
}, SIGKILL_DELAY_MS);
|
|
171
|
+
};
|
|
172
|
+
const armIdleTimeout = () => {
|
|
173
|
+
if (this.idleTimeoutMs <= 0)
|
|
174
|
+
return;
|
|
175
|
+
if (idleTimeoutHandle)
|
|
176
|
+
clearTimeout(idleTimeoutHandle);
|
|
177
|
+
idleTimeoutHandle = setTimeout(() => triggerTimeout("idle"), this.idleTimeoutMs);
|
|
178
|
+
};
|
|
179
|
+
const markActivity = () => {
|
|
180
|
+
armIdleTimeout();
|
|
181
|
+
};
|
|
182
|
+
totalTimeoutHandle = setTimeout(() => triggerTimeout("total"), this.totalTimeoutMs);
|
|
183
|
+
child.stdout?.on("data", markActivity);
|
|
184
|
+
child.stderr.on("data", (chunk) => {
|
|
185
|
+
stderrData += chunk.toString();
|
|
186
|
+
markActivity();
|
|
187
|
+
});
|
|
137
188
|
// Suppress EPIPE errors on stdin
|
|
138
189
|
child.stdin.on("error", (err) => {
|
|
139
190
|
if (err.code !== "EPIPE")
|
|
@@ -143,25 +194,19 @@ export class CodexLLMClient extends BaseLLMClient {
|
|
|
143
194
|
child.stdin.write(prompt);
|
|
144
195
|
child.stdin.end();
|
|
145
196
|
child.on("error", (err) => {
|
|
146
|
-
|
|
147
|
-
_cleanupTmp(tmpDir, tmpFile).catch((cleanupErr) => {
|
|
148
|
-
console.debug("CodexLLMClient: _cleanupTmp failed (non-critical)", String(cleanupErr));
|
|
149
|
-
});
|
|
197
|
+
cleanupTmp();
|
|
150
198
|
reject(new LLMError(`CodexLLMClient: spawn error — ${err.message}`));
|
|
151
199
|
});
|
|
152
200
|
child.on("close", (code) => {
|
|
153
|
-
|
|
201
|
+
clearTimers();
|
|
154
202
|
if (timedOut) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
});
|
|
158
|
-
reject(new LLMError(`CodexLLMClient: timed out after ${this.timeoutMs}ms`));
|
|
203
|
+
cleanupTmp();
|
|
204
|
+
const timeoutLabel = timeoutReason === "idle" ? "idle timed out" : "request timed out";
|
|
205
|
+
reject(new LLMError(`CodexLLMClient: ${timeoutLabel} after ${timeoutReason === "idle" ? this.idleTimeoutMs : this.totalTimeoutMs}ms`));
|
|
159
206
|
return;
|
|
160
207
|
}
|
|
161
208
|
if (code !== 0) {
|
|
162
|
-
|
|
163
|
-
console.debug("CodexLLMClient: _cleanupTmp failed (non-critical)", String(cleanupErr));
|
|
164
|
-
});
|
|
209
|
+
cleanupTmp();
|
|
165
210
|
const detail = stderrData.trim() ? ` — ${stderrData.trim().slice(0, 500)}` : "";
|
|
166
211
|
reject(new LLMError(`CodexLLMClient: process exited with code ${code}${detail}`));
|
|
167
212
|
return;
|
|
@@ -169,21 +214,21 @@ export class CodexLLMClient extends BaseLLMClient {
|
|
|
169
214
|
// Read response from temp file
|
|
170
215
|
fsp.readFile(tmpFile, "utf-8")
|
|
171
216
|
.then((raw) => {
|
|
172
|
-
|
|
173
|
-
console.debug("CodexLLMClient: _cleanupTmp failed (non-critical)", String(cleanupErr));
|
|
174
|
-
});
|
|
217
|
+
cleanupTmp();
|
|
175
218
|
resolve(raw.trim());
|
|
176
219
|
})
|
|
177
220
|
.catch((readErr) => {
|
|
178
|
-
|
|
179
|
-
console.debug("CodexLLMClient: _cleanupTmp failed (non-critical)", String(cleanupErr));
|
|
180
|
-
});
|
|
221
|
+
cleanupTmp();
|
|
181
222
|
reject(new LLMError(`CodexLLMClient: failed to read output file — ${String(readErr)}`));
|
|
182
223
|
});
|
|
183
224
|
});
|
|
184
225
|
});
|
|
185
226
|
}
|
|
186
227
|
}
|
|
228
|
+
function isRetryableCodexError(err) {
|
|
229
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
230
|
+
return message.includes("CodexLLMClient: spawn error");
|
|
231
|
+
}
|
|
187
232
|
// ─── Helpers ───
|
|
188
233
|
async function _cleanupTmp(tmpDir, tmpFile) {
|
|
189
234
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-llm-client.js","sourceRoot":"","sources":["../../../src/base/llm/codex-llm-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"codex-llm-client.js","sourceRoot":"","sources":["../../../src/base/llm/codex-llm-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAOrD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,oBAAoB;AAEpB,MAAM,kBAAkB,GAAG,OAAO,CAAC,CAAC,qBAAqB;AACzD,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACjD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AE,EAAE;oBACZ,UAAU,EAAE,CAAC;oBACb,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;gBACtB,CAAC,CAAC;qBACD,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE;oBACjB,UAAU,EAAE,CAAC;oBACb,MAAM,CACJ,IAAI,QAAQ,CACV,gDAAgD,MAAM,CAAC,OAAO,CAAC,EAAE,CAClE,CACF,CAAC;gBACJ,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,SAAS,qBAAqB,CAAC,GAAY;IACzC,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,OAAO,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC;AACzD,CAAC;AAED,kBAAkB;AAElB,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,OAAe;IACxD,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC1B,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,8BAA8B;IAChC,CAAC;IACD,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,sBAAsB;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AgentLoopSecurityConfig } from "../../orchestrator/execution/agent-loop/execution-policy.js";
|
|
2
|
+
import type { AgentLoopWorktreePolicy } from "../../orchestrator/execution/agent-loop/task-agent-loop-worktree.js";
|
|
2
3
|
/** Check if a JWT access token is expired. Returns true if malformed or expired. */
|
|
3
4
|
export declare function isJwtExpired(token: string): boolean;
|
|
4
5
|
/** Read the OAuth access_token from ~/.codex/auth.json (written by `codex auth login`). */
|
|
@@ -27,6 +28,12 @@ export interface ProviderConfig {
|
|
|
27
28
|
base_url?: string;
|
|
28
29
|
/** CLI path for openai_codex_cli adapter */
|
|
29
30
|
codex_cli_path?: string;
|
|
31
|
+
/** Total Codex request timeout in milliseconds. */
|
|
32
|
+
codex_timeout_ms?: number;
|
|
33
|
+
/** Codex idle timeout in milliseconds. Disabled when omitted. */
|
|
34
|
+
codex_idle_timeout_ms?: number;
|
|
35
|
+
/** Maximum Codex retry attempts. */
|
|
36
|
+
codex_retry_attempts?: number;
|
|
30
37
|
/** Optional terminal backend for CLI execution adapters. */
|
|
31
38
|
terminal_backend?: {
|
|
32
39
|
type: "local" | "docker";
|
|
@@ -67,6 +74,11 @@ export interface ProviderConfig {
|
|
|
67
74
|
};
|
|
68
75
|
};
|
|
69
76
|
}
|
|
77
|
+
export type ProviderNativeAgentLoopConfig = NonNullable<ProviderConfig["agent_loop"]>;
|
|
78
|
+
export interface ResolvedProviderNativeAgentLoopDefaults {
|
|
79
|
+
security?: AgentLoopSecurityConfig;
|
|
80
|
+
worktreePolicy?: AgentLoopWorktreePolicy;
|
|
81
|
+
}
|
|
70
82
|
/** Old nested provider config format (for migration) */
|
|
71
83
|
interface LegacyProviderConfig {
|
|
72
84
|
llm_provider: "anthropic" | "openai" | "ollama" | "codex";
|
|
@@ -108,6 +120,8 @@ export interface LoadProviderConfigOptions {
|
|
|
108
120
|
baseDir?: string;
|
|
109
121
|
saveMigration?: boolean;
|
|
110
122
|
}
|
|
123
|
+
export declare function resolveProviderNativeAgentLoopDefaults(providerConfig?: Pick<ProviderConfig, "agent_loop"> | Partial<ProviderConfig>): ResolvedProviderNativeAgentLoopDefaults;
|
|
124
|
+
export declare function resolveProviderNativeAgentLoopConfig(providerConfig?: Pick<ProviderConfig, "agent_loop"> | Partial<ProviderConfig>): ProviderNativeAgentLoopConfig;
|
|
111
125
|
/**
|
|
112
126
|
* Load provider configuration.
|
|
113
127
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-config.d.ts","sourceRoot":"","sources":["../../../src/base/llm/provider-config.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;
|
|
1
|
+
{"version":3,"file":"provider-config.d.ts","sourceRoot":"","sources":["../../../src/base/llm/provider-config.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;AAC3G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qEAAqE,CAAC;AAInH,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAUnD;AAED,2FAA2F;AAC3F,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAevE;AAID;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAcnF,CAAC;AAIF,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,QAAQ,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;IAE5C,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IAEd;+CAC2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,yDAAyD;IACzD,OAAO,EAAE,iBAAiB,GAAG,YAAY,GAAG,kBAAkB,GAAG,YAAY,GAAG,YAAY,CAAC;IAE7F,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,iEAAiE;IACjE,qBAA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sB,CAAC,MAAM,EAAE,cAAc,GAAG,gBAAgB,CA+B/E;AA4ID,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA4FD,wBAAgB,sCAAsC,CACpD,cAAc,GAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,GAAG,OAAO,CAAC,cAAc,CAAM,GAChF,uCAAuC,CAMzC;AAED,wBAAgB,oCAAoC,CAClD,cAAc,GAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,GAAG,OAAO,CAAC,cAAc,CAAM,GAChF,6BAA6B,CAE/B;AAwCD;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,GAAE,yBAA8B,GAAG,OAAO,CAAC,cAAc,CAAC,CAUzG;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAYvE;AAED,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,MAAM,CAAC,CAsBrE;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAK9E;AAGD,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -82,6 +82,10 @@ const DEFAULT_PROVIDER_CONFIG = {
|
|
|
82
82
|
network_access: false,
|
|
83
83
|
trust_project_instructions: true,
|
|
84
84
|
},
|
|
85
|
+
worktree: {
|
|
86
|
+
enabled: true,
|
|
87
|
+
cleanup_policy: "on_success",
|
|
88
|
+
},
|
|
85
89
|
},
|
|
86
90
|
};
|
|
87
91
|
// Track whether we've already warned about provider config issues in this process
|
|
@@ -339,6 +343,12 @@ async function resolveProviderConfig(fileConfig, envFile) {
|
|
|
339
343
|
config.base_url = baseUrl;
|
|
340
344
|
if (fileConfig.codex_cli_path !== undefined)
|
|
341
345
|
config.codex_cli_path = fileConfig.codex_cli_path;
|
|
346
|
+
if (fileConfig.codex_timeout_ms !== undefined)
|
|
347
|
+
config.codex_timeout_ms = fileConfig.codex_timeout_ms;
|
|
348
|
+
if (fileConfig.codex_idle_timeout_ms !== undefined)
|
|
349
|
+
config.codex_idle_timeout_ms = fileConfig.codex_idle_timeout_ms;
|
|
350
|
+
if (fileConfig.codex_retry_attempts !== undefined)
|
|
351
|
+
config.codex_retry_attempts = fileConfig.codex_retry_attempts;
|
|
342
352
|
if (fileConfig.terminal_backend !== undefined)
|
|
343
353
|
config.terminal_backend = fileConfig.terminal_backend;
|
|
344
354
|
if (fileConfig.a2a !== undefined)
|
|
@@ -347,10 +357,19 @@ async function resolveProviderConfig(fileConfig, envFile) {
|
|
|
347
357
|
config.light_model = lightModel;
|
|
348
358
|
if (fileConfig.openclaw !== undefined)
|
|
349
359
|
config.openclaw = fileConfig.openclaw;
|
|
350
|
-
|
|
351
|
-
config.agent_loop = fileConfig.agent_loop;
|
|
360
|
+
config.agent_loop = resolveProviderNativeAgentLoopConfigShape(fileConfig);
|
|
352
361
|
return config;
|
|
353
362
|
}
|
|
363
|
+
export function resolveProviderNativeAgentLoopDefaults(providerConfig = {}) {
|
|
364
|
+
const resolved = resolveProviderNativeAgentLoopConfigShape(providerConfig);
|
|
365
|
+
return {
|
|
366
|
+
security: resolved.security,
|
|
367
|
+
worktreePolicy: resolveProviderNativeAgentLoopWorktreePolicy(resolved.worktree),
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
export function resolveProviderNativeAgentLoopConfig(providerConfig = {}) {
|
|
371
|
+
return resolveProviderNativeAgentLoopConfigShape(providerConfig);
|
|
372
|
+
}
|
|
354
373
|
function warnOnceForInvalidProviderConfig(config) {
|
|
355
374
|
const validation = validateProviderConfig(config);
|
|
356
375
|
if (validation.valid || _warnedOnce)
|
|
@@ -372,6 +391,12 @@ function providerFileOnlyConfig(fileConfig) {
|
|
|
372
391
|
fileOnly.base_url = fileConfig.base_url;
|
|
373
392
|
if (fileConfig.codex_cli_path !== undefined)
|
|
374
393
|
fileOnly.codex_cli_path = fileConfig.codex_cli_path;
|
|
394
|
+
if (fileConfig.codex_timeout_ms !== undefined)
|
|
395
|
+
fileOnly.codex_timeout_ms = fileConfig.codex_timeout_ms;
|
|
396
|
+
if (fileConfig.codex_idle_timeout_ms !== undefined)
|
|
397
|
+
fileOnly.codex_idle_timeout_ms = fileConfig.codex_idle_timeout_ms;
|
|
398
|
+
if (fileConfig.codex_retry_attempts !== undefined)
|
|
399
|
+
fileOnly.codex_retry_attempts = fileConfig.codex_retry_attempts;
|
|
375
400
|
if (fileConfig.terminal_backend !== undefined)
|
|
376
401
|
fileOnly.terminal_backend = fileConfig.terminal_backend;
|
|
377
402
|
if (fileConfig.a2a !== undefined)
|
|
@@ -433,6 +458,9 @@ export async function getProviderRuntimeFingerprint() {
|
|
|
433
458
|
light_model: config.light_model ?? null,
|
|
434
459
|
base_url: config.base_url ?? null,
|
|
435
460
|
codex_cli_path: config.codex_cli_path ?? null,
|
|
461
|
+
codex_timeout_ms: config.codex_timeout_ms ?? null,
|
|
462
|
+
codex_idle_timeout_ms: config.codex_idle_timeout_ms ?? null,
|
|
463
|
+
codex_retry_attempts: config.codex_retry_attempts ?? null,
|
|
436
464
|
terminal_backend: config.terminal_backend ?? null,
|
|
437
465
|
api_key_hash: config.api_key
|
|
438
466
|
? createHash("sha256").update(config.api_key).digest("hex")
|
|
@@ -455,4 +483,30 @@ export async function saveProviderConfig(config) {
|
|
|
455
483
|
}
|
|
456
484
|
// Re-export default for tests that need it
|
|
457
485
|
export { DEFAULT_PROVIDER_CONFIG };
|
|
486
|
+
function resolveProviderNativeAgentLoopConfigShape(providerConfig = {}) {
|
|
487
|
+
const defaults = DEFAULT_PROVIDER_CONFIG.agent_loop;
|
|
488
|
+
const configured = providerConfig.agent_loop;
|
|
489
|
+
return {
|
|
490
|
+
security: mergeAgentLoopConfig(defaults?.security, configured?.security),
|
|
491
|
+
worktree: mergeAgentLoopConfig(defaults?.worktree, configured?.worktree),
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
function resolveProviderNativeAgentLoopWorktreePolicy(worktree) {
|
|
495
|
+
if (!worktree)
|
|
496
|
+
return undefined;
|
|
497
|
+
return {
|
|
498
|
+
enabled: worktree.enabled,
|
|
499
|
+
baseDir: worktree.base_dir,
|
|
500
|
+
keepForDebug: worktree.keep_for_debug,
|
|
501
|
+
cleanupPolicy: worktree.cleanup_policy,
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
function mergeAgentLoopConfig(defaults, configured) {
|
|
505
|
+
if (!defaults && !configured)
|
|
506
|
+
return undefined;
|
|
507
|
+
return {
|
|
508
|
+
...(defaults ?? {}),
|
|
509
|
+
...(configured ?? {}),
|
|
510
|
+
};
|
|
511
|
+
}
|
|
458
512
|
//# sourceMappingURL=provider-config.js.map
|