@bohuyeshan/openagent-labforge-core 3.11.1 → 3.11.3
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.ja.md +34 -27
- package/README.ko.md +34 -27
- package/README.md +245 -188
- package/README.ru.md +28 -21
- package/README.zh-cn.md +245 -188
- package/bin/platform.test.ts +21 -20
- package/dist/agents/atlas/default.d.ts +1 -1
- package/dist/agents/atlas/gemini.d.ts +1 -1
- package/dist/agents/atlas/gpt.d.ts +1 -1
- package/dist/agents/bio-methodologist.d.ts +1 -1
- package/dist/agents/bio-pipeline-operator.d.ts +1 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +2 -0
- package/dist/agents/env-context.d.ts +1 -1
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/metis.d.ts +1 -1
- package/dist/agents/prometheus/gemini.d.ts +1 -1
- package/dist/agents/prometheus/gpt.d.ts +1 -1
- package/dist/agents/prometheus/interview-mode.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/agents/prometheus/plan-template.d.ts +1 -1
- package/dist/agents/prometheus/system-prompt.d.ts +1 -1
- package/dist/agents/types.d.ts +1 -1
- package/dist/cli/config-manager/bun-install.d.ts +6 -1
- package/dist/cli/config-manager/plugin-name-with-version.d.ts +1 -1
- package/dist/cli/doctor/constants.d.ts +1 -1
- package/dist/cli/index.js +763 -467
- package/dist/cli/install-validators.d.ts +1 -0
- package/dist/cli/model-fallback-types.d.ts +1 -0
- package/dist/cli/openai-only-model-catalog.d.ts +3 -0
- package/dist/cli/run/index.d.ts +1 -0
- package/dist/cli/run/model-resolver.d.ts +4 -0
- package/dist/cli/run/types.d.ts +1 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema/agent-names.d.ts +3 -1
- package/dist/config/schema/background-task.d.ts +2 -0
- package/dist/config/schema/git-env-prefix.d.ts +5 -0
- package/dist/config/schema/git-master.d.ts +1 -0
- package/dist/config/schema/hooks.d.ts +2 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +54 -1
- package/dist/config/schema.d.ts +1 -0
- package/dist/create-hooks.d.ts +13 -0
- package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +16 -1
- package/dist/features/background-agent/constants.d.ts +1 -1
- package/dist/features/background-agent/manager.d.ts +20 -4
- package/dist/features/background-agent/process-cleanup.d.ts +1 -1
- package/dist/features/background-agent/remove-task-toast-tracking.d.ts +1 -0
- package/dist/features/background-agent/subagent-spawn-limits.d.ts +23 -0
- package/dist/features/background-agent/task-history.d.ts +1 -0
- package/dist/features/background-agent/task-poller.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +4 -0
- package/dist/features/claude-code-agent-loader/claude-model-mapper.d.ts +4 -0
- package/dist/features/claude-code-agent-loader/loader.d.ts +3 -3
- package/dist/features/claude-code-agent-loader/types.d.ts +8 -1
- package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/types.d.ts +1 -1
- package/dist/features/opencode-skill-loader/git-master-template-injection.d.ts +1 -1
- package/dist/features/skill-mcp-manager/types.d.ts +4 -0
- package/dist/features/tmux-subagent/index.d.ts +1 -0
- package/dist/features/tmux-subagent/manager.d.ts +5 -0
- package/dist/features/tmux-subagent/pane-state-parser.d.ts +8 -0
- package/dist/features/tmux-subagent/tracked-session-state.d.ts +8 -0
- package/dist/features/tmux-subagent/types.d.ts +2 -0
- package/dist/hooks/atlas/boulder-session-lineage.d.ts +6 -0
- package/dist/hooks/atlas/final-wave-approval-gate.d.ts +4 -0
- package/dist/hooks/atlas/idle-event.d.ts +8 -0
- package/dist/hooks/atlas/resolve-active-boulder-session.d.ts +11 -0
- package/dist/hooks/atlas/tool-execute-after.d.ts +2 -0
- package/dist/hooks/atlas/types.d.ts +2 -0
- package/dist/hooks/atlas/verification-reminders.d.ts +4 -0
- package/dist/hooks/auto-slash-command/hook.d.ts +7 -0
- package/dist/hooks/auto-slash-command/processed-command-store.d.ts +7 -0
- package/dist/hooks/auto-update-checker/checker/sync-package-json.d.ts +7 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +3 -1
- package/dist/hooks/auto-update-checker/constants.d.ts +2 -2
- package/dist/hooks/comment-checker/downloader.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/compaction-context-prompt.d.ts +1 -0
- package/dist/hooks/compaction-context-injector/constants.d.ts +5 -0
- package/dist/hooks/compaction-context-injector/hook.d.ts +5 -1
- package/dist/hooks/compaction-context-injector/recovery-prompt-config.d.ts +6 -0
- package/dist/hooks/compaction-context-injector/recovery.d.ts +6 -0
- package/dist/hooks/compaction-context-injector/session-id.d.ts +2 -0
- package/dist/hooks/compaction-context-injector/session-prompt-config-resolver.d.ts +16 -0
- package/dist/hooks/compaction-context-injector/tail-monitor.d.ts +13 -0
- package/dist/hooks/compaction-context-injector/types.d.ts +43 -0
- package/dist/hooks/compaction-context-injector/validated-model.d.ts +13 -0
- package/dist/hooks/context-window-monitor.d.ts +2 -5
- package/dist/hooks/delegate-task-english-directive/hook.d.ts +14 -0
- package/dist/hooks/delegate-task-english-directive/index.d.ts +1 -0
- package/dist/hooks/gpt-permission-continuation/assistant-message.d.ts +23 -0
- package/dist/hooks/gpt-permission-continuation/constants.d.ts +4 -0
- package/dist/hooks/gpt-permission-continuation/detector.d.ts +1 -0
- package/dist/hooks/gpt-permission-continuation/handler.d.ts +12 -0
- package/dist/hooks/gpt-permission-continuation/index.d.ts +13 -0
- package/dist/hooks/gpt-permission-continuation/session-state.d.ts +15 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/keyword-detector/hook.d.ts +1 -0
- package/dist/hooks/preemptive-compaction.d.ts +2 -5
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +16 -0
- package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +10 -0
- package/dist/hooks/runtime-fallback/fallback-retry-dispatcher.d.ts +11 -0
- package/dist/hooks/runtime-fallback/hook.d.ts +2 -3
- package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +4 -0
- package/dist/hooks/runtime-fallback/message-update-handler.d.ts +1 -2
- package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +7 -0
- package/dist/hooks/runtime-fallback/session-messages.d.ts +9 -0
- package/dist/hooks/runtime-fallback/session-status-handler.d.ts +3 -0
- package/dist/hooks/runtime-fallback/types.d.ts +57 -3
- package/dist/hooks/runtime-fallback/visible-assistant-response.d.ts +3 -0
- package/dist/hooks/session-notification-content.d.ts +30 -0
- package/dist/hooks/session-notification-scheduler.d.ts +5 -3
- package/dist/hooks/session-notification.d.ts +2 -0
- package/dist/hooks/start-work/index.d.ts +1 -1
- package/dist/hooks/start-work/worktree-detector.d.ts +7 -0
- package/dist/hooks/todo-continuation-enforcer/constants.d.ts +6 -2
- package/dist/hooks/todo-continuation-enforcer/handler.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/idle-event.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +10 -1
- package/dist/hooks/todo-continuation-enforcer/stagnation-detection.d.ts +6 -0
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +5 -0
- package/dist/hooks/tool-output-truncator.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10581 -7245
- package/dist/openagent-labforge.schema.json +70 -4
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
- package/dist/plugin/normalize-tool-arg-schemas.d.ts +2 -0
- package/dist/plugin/ultrawork-model-override.d.ts +1 -15
- package/dist/plugin/ultrawork-variant-availability.d.ts +6 -0
- package/dist/plugin-dispose.d.ts +10 -0
- package/dist/plugin-handlers/agent-override-protection.d.ts +3 -0
- package/dist/plugin-state.d.ts +5 -0
- package/dist/shared/compaction-agent-config-checkpoint.d.ts +11 -0
- package/dist/shared/context-limit-resolver.d.ts +5 -0
- package/dist/shared/data-path.d.ts +2 -2
- package/dist/shared/dynamic-truncator.d.ts +4 -7
- package/dist/shared/external-plugin-detector.d.ts +1 -1
- package/dist/shared/fallback-chain-from-models.d.ts +3 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/model-error-classifier.d.ts +2 -1
- package/dist/shared/opencode-command-dirs.d.ts +3 -0
- package/dist/shared/plugin-identity.d.ts +7 -0
- package/dist/shared/question-denied-session-permission.d.ts +6 -0
- package/dist/shared/retry-status-utils.d.ts +2 -0
- package/dist/shared/system-directive.d.ts +6 -5
- package/dist/shared/vision-capable-models-cache.d.ts +4 -0
- package/dist/tools/call-omo-agent/background-executor.d.ts +2 -1
- package/dist/tools/call-omo-agent/constants.d.ts +1 -1
- package/dist/tools/call-omo-agent/sync-executor.d.ts +11 -3
- package/dist/tools/call-omo-agent/tools.d.ts +2 -1
- package/dist/tools/delegate-task/cancel-unstable-agent-task.d.ts +2 -0
- package/dist/tools/delegate-task/model-selection.d.ts +1 -0
- package/dist/tools/delegate-task/model-string-parser.d.ts +1 -3
- package/dist/tools/look-at/multimodal-fallback-chain.d.ts +4 -0
- package/dist/tools/lsp/constants.d.ts +1 -0
- package/dist/tools/lsp/directory-diagnostics.d.ts +1 -0
- package/dist/tools/lsp/lsp-client-transport.d.ts +4 -2
- package/dist/tools/lsp/lsp-client-wrapper.d.ts +2 -1
- package/dist/tools/lsp/server-path-bases.d.ts +1 -0
- package/generated/skills-bundles/catalog.json +282 -39
- package/generated/skills-bundles/full/INDEX.md +38 -10
- package/generated/skills-bundles/full/skills/data-analysis/experiment-monitoring/auto-claude__monitor-experiment/SKILL.md +63 -0
- package/generated/skills-bundles/full/skills/data-analysis/experiment-ops/auto-claude__run-experiment/SKILL.md +112 -0
- package/generated/skills-bundles/full/skills/data-analysis/optimization/auto-claude__dse-loop/SKILL.md +279 -0
- package/generated/skills-bundles/full/skills/data-analysis/statistics/auto-claude__analyze-results/SKILL.md +47 -0
- package/generated/skills-bundles/full/skills/data-analysis/visualization/auto-claude__paper-figure/SKILL.md +281 -0
- package/generated/skills-bundles/full/skills/productivity/communication/auto-claude__feishu-notify/SKILL.md +154 -0
- package/generated/skills-bundles/full/skills/productivity/visual-design/auto-claude__pixel-art/SKILL.md +138 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-compile/SKILL.md +252 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-plan/SKILL.md +254 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/SKILL.md +310 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/iclr2026.tex +84 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/icml2025.tex +87 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/math_commands.tex +48 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-write/templates/neurips2025.tex +80 -0
- package/generated/skills-bundles/full/skills/research/document-authoring/auto-claude__paper-writing/SKILL.md +255 -0
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__arxiv/SKILL.md +133 -0
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__novelty-check/SKILL.md +87 -0
- package/generated/skills-bundles/full/skills/research/literature-and-web-search/auto-claude__research-lit/SKILL.md +194 -0
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-creator/SKILL.md +228 -0
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-discovery/SKILL.md +186 -0
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__idea-discovery-robot/SKILL.md +351 -0
- package/generated/skills-bundles/full/skills/research/research-ideation/auto-claude__research-pipeline/SKILL.md +174 -0
- package/generated/skills-bundles/full/skills/research/theory-writing/auto-claude__proof-writer/SKILL.md +224 -0
- package/generated/skills-bundles/paper/INDEX.md +40 -0
- package/generated/skills-bundles/paper/skills/data-analysis/experiment-monitoring/auto-claude__monitor-experiment/SKILL.md +63 -0
- package/generated/skills-bundles/paper/skills/data-analysis/experiment-ops/auto-claude__run-experiment/SKILL.md +112 -0
- package/generated/skills-bundles/paper/skills/data-analysis/optimization/auto-claude__dse-loop/SKILL.md +279 -0
- package/generated/skills-bundles/paper/skills/data-analysis/statistics/auto-claude__analyze-results/SKILL.md +47 -0
- package/generated/skills-bundles/paper/skills/data-analysis/visualization/auto-claude__paper-figure/SKILL.md +281 -0
- package/generated/skills-bundles/paper/skills/productivity/communication/auto-claude__feishu-notify/SKILL.md +154 -0
- package/generated/skills-bundles/paper/skills/productivity/visual-design/auto-claude__pixel-art/SKILL.md +138 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-compile/SKILL.md +252 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-plan/SKILL.md +254 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/SKILL.md +310 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/iclr2026.tex +84 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/icml2025.tex +87 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/math_commands.tex +48 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-write/templates/neurips2025.tex +80 -0
- package/generated/skills-bundles/paper/skills/research/document-authoring/auto-claude__paper-writing/SKILL.md +255 -0
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__arxiv/SKILL.md +133 -0
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__novelty-check/SKILL.md +87 -0
- package/generated/skills-bundles/paper/skills/research/literature-and-web-search/auto-claude__research-lit/SKILL.md +194 -0
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-creator/SKILL.md +228 -0
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-discovery/SKILL.md +186 -0
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__idea-discovery-robot/SKILL.md +351 -0
- package/generated/skills-bundles/paper/skills/research/research-ideation/auto-claude__research-pipeline/SKILL.md +174 -0
- package/generated/skills-bundles/paper/skills/research/theory-writing/auto-claude__proof-writer/SKILL.md +224 -0
- package/package.json +21 -21
- package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/LICENSE.txt +0 -21
- package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/SKILL.md +0 -615
- package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/_meta.json +0 -11
- package/generated/skills-bundles/full/skills/engineering/virtualization/skills-main__virtualbox/scripts/virtualbox-utils.ts +0 -586
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/.clawhubsafe +0 -0
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/LICENSE +0 -21
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/README.md +0 -127
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/SECURITY.md +0 -68
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/SKILL.md +0 -141
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/_meta.json +0 -11
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/scripts/speak.sh +0 -52
- package/generated/skills-bundles/full/skills/productivity/voice-and-accessibility/skills-main__voiceclaw/scripts/transcribe.sh +0 -50
- package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/LICENSE.txt +0 -21
- package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/SKILL.md +0 -416
- package/generated/skills-bundles/full/skills/research/media-search/skills-main__youtube-search/_meta.json +0 -11
package/dist/cli/index.js
CHANGED
|
@@ -4930,7 +4930,7 @@ function log(message, data) {
|
|
|
4930
4930
|
}
|
|
4931
4931
|
var logFile;
|
|
4932
4932
|
var init_logger = __esm(() => {
|
|
4933
|
-
logFile = path.join(os.tmpdir(), "
|
|
4933
|
+
logFile = path.join(os.tmpdir(), "openagent-labforge.log");
|
|
4934
4934
|
});
|
|
4935
4935
|
|
|
4936
4936
|
// src/shared/deep-merge.ts
|
|
@@ -4977,6 +4977,9 @@ var init_tool_name = () => {};
|
|
|
4977
4977
|
// src/shared/file-utils.ts
|
|
4978
4978
|
var init_file_utils = () => {};
|
|
4979
4979
|
|
|
4980
|
+
// src/shared/context-limit-resolver.ts
|
|
4981
|
+
var init_context_limit_resolver = () => {};
|
|
4982
|
+
|
|
4980
4983
|
// src/shared/normalize-sdk-response.ts
|
|
4981
4984
|
function normalizeSDKResponse(response, fallback, options) {
|
|
4982
4985
|
if (response === null || response === undefined) {
|
|
@@ -5002,7 +5005,9 @@ function normalizeSDKResponse(response, fallback, options) {
|
|
|
5002
5005
|
}
|
|
5003
5006
|
|
|
5004
5007
|
// src/shared/dynamic-truncator.ts
|
|
5005
|
-
var init_dynamic_truncator = () => {
|
|
5008
|
+
var init_dynamic_truncator = __esm(() => {
|
|
5009
|
+
init_context_limit_resolver();
|
|
5010
|
+
});
|
|
5006
5011
|
|
|
5007
5012
|
// src/shared/data-path.ts
|
|
5008
5013
|
import * as path2 from "path";
|
|
@@ -5017,7 +5022,7 @@ function getCacheDir() {
|
|
|
5017
5022
|
return process.env.XDG_CACHE_HOME ?? path2.join(os2.homedir(), ".cache");
|
|
5018
5023
|
}
|
|
5019
5024
|
function getOmoOpenCodeCacheDir() {
|
|
5020
|
-
return path2.join(getCacheDir(), "
|
|
5025
|
+
return path2.join(getCacheDir(), "openagent-labforge");
|
|
5021
5026
|
}
|
|
5022
5027
|
function getOpenCodeCacheDir() {
|
|
5023
5028
|
return path2.join(getCacheDir(), "opencode");
|
|
@@ -6304,6 +6309,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6304
6309
|
model: "claude-opus-4-6",
|
|
6305
6310
|
variant: "max"
|
|
6306
6311
|
},
|
|
6312
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
6307
6313
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
6308
6314
|
{
|
|
6309
6315
|
providers: [
|
|
@@ -6349,22 +6355,22 @@ var init_model_requirements = __esm(() => {
|
|
|
6349
6355
|
providers: ["anthropic", "github-copilot", "opencode"],
|
|
6350
6356
|
model: "claude-opus-4-6",
|
|
6351
6357
|
variant: "max"
|
|
6352
|
-
}
|
|
6358
|
+
},
|
|
6359
|
+
{ providers: ["opencode-go"], model: "glm-5" }
|
|
6353
6360
|
]
|
|
6354
6361
|
},
|
|
6355
6362
|
librarian: {
|
|
6356
6363
|
fallbackChain: [
|
|
6357
|
-
{
|
|
6358
|
-
providers: ["google", "github-copilot", "opencode"],
|
|
6359
|
-
model: "gemini-3-flash"
|
|
6360
|
-
},
|
|
6364
|
+
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
|
6361
6365
|
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
|
6362
|
-
{ providers: ["opencode"], model: "
|
|
6366
|
+
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
|
6367
|
+
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
6363
6368
|
]
|
|
6364
6369
|
},
|
|
6365
6370
|
explore: {
|
|
6366
6371
|
fallbackChain: [
|
|
6367
6372
|
{ providers: ["github-copilot"], model: "grok-code-fast-1" },
|
|
6373
|
+
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
|
6368
6374
|
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
|
6369
6375
|
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
|
6370
6376
|
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
@@ -6372,21 +6378,10 @@ var init_model_requirements = __esm(() => {
|
|
|
6372
6378
|
},
|
|
6373
6379
|
"multimodal-looker": {
|
|
6374
6380
|
fallbackChain: [
|
|
6375
|
-
{
|
|
6376
|
-
|
|
6377
|
-
model: "gpt-5.4",
|
|
6378
|
-
variant: "medium"
|
|
6379
|
-
},
|
|
6380
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
6381
|
-
{
|
|
6382
|
-
providers: ["google", "github-copilot", "opencode"],
|
|
6383
|
-
model: "gemini-3-flash"
|
|
6384
|
-
},
|
|
6381
|
+
{ providers: ["openai", "opencode"], model: "gpt-5.4", variant: "medium" },
|
|
6382
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
6385
6383
|
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
|
6386
|
-
{
|
|
6387
|
-
providers: ["openai", "github-copilot", "opencode"],
|
|
6388
|
-
model: "gpt-5-nano"
|
|
6389
|
-
}
|
|
6384
|
+
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5-nano" }
|
|
6390
6385
|
]
|
|
6391
6386
|
},
|
|
6392
6387
|
"bio-methodologist": {
|
|
@@ -6405,7 +6400,17 @@ var init_model_requirements = __esm(() => {
|
|
|
6405
6400
|
providers: ["google", "github-copilot", "opencode"],
|
|
6406
6401
|
model: "gemini-3.1-pro",
|
|
6407
6402
|
variant: "high"
|
|
6408
|
-
}
|
|
6403
|
+
},
|
|
6404
|
+
{
|
|
6405
|
+
providers: ["anthropic", "github-copilot", "opencode"],
|
|
6406
|
+
model: "claude-sonnet-4-6"
|
|
6407
|
+
},
|
|
6408
|
+
{
|
|
6409
|
+
providers: ["google", "github-copilot", "opencode"],
|
|
6410
|
+
model: "gemini-3-flash"
|
|
6411
|
+
},
|
|
6412
|
+
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
|
6413
|
+
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
6409
6414
|
]
|
|
6410
6415
|
},
|
|
6411
6416
|
"bio-pipeline-operator": {
|
|
@@ -6422,7 +6427,9 @@ var init_model_requirements = __esm(() => {
|
|
|
6422
6427
|
{
|
|
6423
6428
|
providers: ["google", "github-copilot", "opencode"],
|
|
6424
6429
|
model: "gemini-3-flash"
|
|
6425
|
-
}
|
|
6430
|
+
},
|
|
6431
|
+
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
|
6432
|
+
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
6426
6433
|
]
|
|
6427
6434
|
},
|
|
6428
6435
|
"paper-evidence-synthesizer": {
|
|
@@ -6456,6 +6463,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6456
6463
|
model: "gpt-5.4",
|
|
6457
6464
|
variant: "high"
|
|
6458
6465
|
},
|
|
6466
|
+
{ providers: ["opencode-go"], model: "glm-5" },
|
|
6459
6467
|
{
|
|
6460
6468
|
providers: ["google", "github-copilot", "opencode"],
|
|
6461
6469
|
model: "gemini-3.1-pro"
|
|
@@ -6469,16 +6477,8 @@ var init_model_requirements = __esm(() => {
|
|
|
6469
6477
|
model: "claude-opus-4-6",
|
|
6470
6478
|
variant: "max"
|
|
6471
6479
|
},
|
|
6472
|
-
{
|
|
6473
|
-
|
|
6474
|
-
model: "gpt-5.4",
|
|
6475
|
-
variant: "high"
|
|
6476
|
-
},
|
|
6477
|
-
{
|
|
6478
|
-
providers: ["google", "github-copilot", "opencode"],
|
|
6479
|
-
model: "gemini-3.1-pro",
|
|
6480
|
-
variant: "high"
|
|
6481
|
-
}
|
|
6480
|
+
{ providers: ["opencode-go"], model: "glm-5" },
|
|
6481
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
6482
6482
|
]
|
|
6483
6483
|
},
|
|
6484
6484
|
momus: {
|
|
@@ -6497,16 +6497,21 @@ var init_model_requirements = __esm(() => {
|
|
|
6497
6497
|
providers: ["google", "github-copilot", "opencode"],
|
|
6498
6498
|
model: "gemini-3.1-pro",
|
|
6499
6499
|
variant: "high"
|
|
6500
|
-
}
|
|
6500
|
+
},
|
|
6501
|
+
{ providers: ["opencode-go"], model: "glm-5" }
|
|
6501
6502
|
]
|
|
6502
6503
|
},
|
|
6503
6504
|
atlas: {
|
|
6504
6505
|
fallbackChain: [
|
|
6505
|
-
{
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6506
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
|
|
6507
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" }
|
|
6508
|
+
]
|
|
6509
|
+
},
|
|
6510
|
+
"sisyphus-junior": {
|
|
6511
|
+
fallbackChain: [
|
|
6512
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
|
|
6513
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
6514
|
+
{ providers: ["opencode"], model: "big-pickle" }
|
|
6510
6515
|
]
|
|
6511
6516
|
}
|
|
6512
6517
|
};
|
|
@@ -6523,14 +6528,16 @@ var init_model_requirements = __esm(() => {
|
|
|
6523
6528
|
providers: ["anthropic", "github-copilot", "opencode"],
|
|
6524
6529
|
model: "claude-opus-4-6",
|
|
6525
6530
|
variant: "max"
|
|
6526
|
-
}
|
|
6531
|
+
},
|
|
6532
|
+
{ providers: ["opencode-go"], model: "glm-5" },
|
|
6533
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
6527
6534
|
]
|
|
6528
6535
|
},
|
|
6529
6536
|
ultrabrain: {
|
|
6530
6537
|
fallbackChain: [
|
|
6531
6538
|
{
|
|
6532
6539
|
providers: ["openai", "opencode"],
|
|
6533
|
-
model: "gpt-5.
|
|
6540
|
+
model: "gpt-5.4",
|
|
6534
6541
|
variant: "xhigh"
|
|
6535
6542
|
},
|
|
6536
6543
|
{
|
|
@@ -6542,7 +6549,8 @@ var init_model_requirements = __esm(() => {
|
|
|
6542
6549
|
providers: ["anthropic", "github-copilot", "opencode"],
|
|
6543
6550
|
model: "claude-opus-4-6",
|
|
6544
6551
|
variant: "max"
|
|
6545
|
-
}
|
|
6552
|
+
},
|
|
6553
|
+
{ providers: ["opencode-go"], model: "glm-5" }
|
|
6546
6554
|
]
|
|
6547
6555
|
},
|
|
6548
6556
|
deep: {
|
|
@@ -6591,6 +6599,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6591
6599
|
providers: ["google", "github-copilot", "opencode"],
|
|
6592
6600
|
model: "gemini-3-flash"
|
|
6593
6601
|
},
|
|
6602
|
+
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
|
6594
6603
|
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
6595
6604
|
]
|
|
6596
6605
|
},
|
|
@@ -6605,6 +6614,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6605
6614
|
model: "gpt-5.3-codex",
|
|
6606
6615
|
variant: "medium"
|
|
6607
6616
|
},
|
|
6617
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
6608
6618
|
{
|
|
6609
6619
|
providers: ["google", "github-copilot", "opencode"],
|
|
6610
6620
|
model: "gemini-3-flash"
|
|
@@ -6613,18 +6623,20 @@ var init_model_requirements = __esm(() => {
|
|
|
6613
6623
|
},
|
|
6614
6624
|
"unspecified-high": {
|
|
6615
6625
|
fallbackChain: [
|
|
6616
|
-
{
|
|
6617
|
-
providers: ["openai", "github-copilot", "opencode"],
|
|
6618
|
-
model: "gpt-5.4",
|
|
6619
|
-
variant: "high"
|
|
6620
|
-
},
|
|
6621
6626
|
{
|
|
6622
6627
|
providers: ["anthropic", "github-copilot", "opencode"],
|
|
6623
6628
|
model: "claude-opus-4-6",
|
|
6624
6629
|
variant: "max"
|
|
6625
6630
|
},
|
|
6631
|
+
{
|
|
6632
|
+
providers: ["openai", "github-copilot", "opencode"],
|
|
6633
|
+
model: "gpt-5.4",
|
|
6634
|
+
variant: "high"
|
|
6635
|
+
},
|
|
6626
6636
|
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
|
6627
6637
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
6638
|
+
{ providers: ["opencode-go"], model: "glm-5" },
|
|
6639
|
+
{ providers: ["opencode"], model: "kimi-k2.5" },
|
|
6628
6640
|
{
|
|
6629
6641
|
providers: [
|
|
6630
6642
|
"opencode",
|
|
@@ -6644,6 +6656,7 @@ var init_model_requirements = __esm(() => {
|
|
|
6644
6656
|
providers: ["google", "github-copilot", "opencode"],
|
|
6645
6657
|
model: "gemini-3-flash"
|
|
6646
6658
|
},
|
|
6659
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
6647
6660
|
{
|
|
6648
6661
|
providers: ["anthropic", "github-copilot", "opencode"],
|
|
6649
6662
|
model: "claude-sonnet-4-6"
|
|
@@ -7030,6 +7043,11 @@ var init_git_worktree = __esm(() => {
|
|
|
7030
7043
|
var init_safe_create_hook = __esm(() => {
|
|
7031
7044
|
init_logger();
|
|
7032
7045
|
});
|
|
7046
|
+
// src/shared/opencode-command-dirs.ts
|
|
7047
|
+
var init_opencode_command_dirs = __esm(() => {
|
|
7048
|
+
init_opencode_config_dir();
|
|
7049
|
+
});
|
|
7050
|
+
|
|
7033
7051
|
// src/shared/session-directory-resolver.ts
|
|
7034
7052
|
var init_session_directory_resolver = () => {};
|
|
7035
7053
|
|
|
@@ -7065,12 +7083,22 @@ var init_skill_loader = __esm(() => {
|
|
|
7065
7083
|
init_skill_path_resolver();
|
|
7066
7084
|
init_logger();
|
|
7067
7085
|
});
|
|
7086
|
+
// src/features/claude-code-agent-loader/claude-model-mapper.ts
|
|
7087
|
+
var ANTHROPIC_PREFIX = "anthropic/", CLAUDE_CODE_ALIAS_MAP;
|
|
7088
|
+
var init_claude_model_mapper = __esm(() => {
|
|
7089
|
+
CLAUDE_CODE_ALIAS_MAP = new Map([
|
|
7090
|
+
["sonnet", `${ANTHROPIC_PREFIX}claude-sonnet-4-6`],
|
|
7091
|
+
["opus", `${ANTHROPIC_PREFIX}claude-opus-4-6`],
|
|
7092
|
+
["haiku", `${ANTHROPIC_PREFIX}claude-haiku-4-5`]
|
|
7093
|
+
]);
|
|
7094
|
+
});
|
|
7068
7095
|
|
|
7069
7096
|
// src/features/claude-code-plugin-loader/agent-loader.ts
|
|
7070
7097
|
var init_agent_loader = __esm(() => {
|
|
7071
7098
|
init_frontmatter();
|
|
7072
7099
|
init_file_utils();
|
|
7073
7100
|
init_logger();
|
|
7101
|
+
init_claude_model_mapper();
|
|
7074
7102
|
});
|
|
7075
7103
|
// src/features/claude-code-mcp-loader/transformer.ts
|
|
7076
7104
|
var init_transformer = () => {};
|
|
@@ -7123,7 +7151,6 @@ var sessionCategoryMap;
|
|
|
7123
7151
|
var init_session_category_registry = __esm(() => {
|
|
7124
7152
|
sessionCategoryMap = new Map;
|
|
7125
7153
|
});
|
|
7126
|
-
|
|
7127
7154
|
// src/shared/index.ts
|
|
7128
7155
|
var init_shared = __esm(() => {
|
|
7129
7156
|
init_model_resolver();
|
|
@@ -7158,6 +7185,7 @@ var init_shared = __esm(() => {
|
|
|
7158
7185
|
init_model_availability();
|
|
7159
7186
|
init_fallback_model_availability();
|
|
7160
7187
|
init_connected_providers_cache();
|
|
7188
|
+
init_context_limit_resolver();
|
|
7161
7189
|
init_session_utils();
|
|
7162
7190
|
init_tmux();
|
|
7163
7191
|
init_model_suggestion_retry();
|
|
@@ -7168,6 +7196,7 @@ var init_shared = __esm(() => {
|
|
|
7168
7196
|
init_safe_create_hook();
|
|
7169
7197
|
init_opencode_storage_paths();
|
|
7170
7198
|
init_opencode_message_dir();
|
|
7199
|
+
init_opencode_command_dirs();
|
|
7171
7200
|
init_session_directory_resolver();
|
|
7172
7201
|
init_prompt_tools();
|
|
7173
7202
|
init_plugin_command_discovery();
|
|
@@ -7219,26 +7248,27 @@ async function fetchNpmDistTags(packageName) {
|
|
|
7219
7248
|
var NPM_FETCH_TIMEOUT_MS = 5000;
|
|
7220
7249
|
|
|
7221
7250
|
// src/cli/config-manager/plugin-name-with-version.ts
|
|
7222
|
-
function getFallbackEntry(version) {
|
|
7251
|
+
function getFallbackEntry(version, packageName) {
|
|
7223
7252
|
const prereleaseMatch = version.match(/-([a-zA-Z][a-zA-Z0-9-]*)(?:\.|$)/);
|
|
7224
7253
|
if (prereleaseMatch) {
|
|
7225
|
-
return `${
|
|
7254
|
+
return `${packageName}@${prereleaseMatch[1]}`;
|
|
7226
7255
|
}
|
|
7227
|
-
return
|
|
7256
|
+
return packageName;
|
|
7228
7257
|
}
|
|
7229
|
-
async function getPluginNameWithVersion(currentVersion) {
|
|
7230
|
-
const
|
|
7258
|
+
async function getPluginNameWithVersion(currentVersion, packageName = DEFAULT_PACKAGE_NAME) {
|
|
7259
|
+
const distTagPackage = packageName === LEGACY_PACKAGE_NAME ? NEW_PACKAGE_NAME : packageName;
|
|
7260
|
+
const distTags = await fetchNpmDistTags(distTagPackage);
|
|
7231
7261
|
if (distTags) {
|
|
7232
7262
|
const allTags = new Set([...PRIORITIZED_TAGS, ...Object.keys(distTags)]);
|
|
7233
7263
|
for (const tag of allTags) {
|
|
7234
7264
|
if (distTags[tag] === currentVersion) {
|
|
7235
|
-
return `${
|
|
7265
|
+
return `${packageName}@${tag}`;
|
|
7236
7266
|
}
|
|
7237
7267
|
}
|
|
7238
7268
|
}
|
|
7239
|
-
return getFallbackEntry(currentVersion);
|
|
7269
|
+
return getFallbackEntry(currentVersion, packageName);
|
|
7240
7270
|
}
|
|
7241
|
-
var
|
|
7271
|
+
var DEFAULT_PACKAGE_NAME = "@bohuyeshan/openagent-labforge-core", LEGACY_PACKAGE_NAME = "openagent-labforge", NEW_PACKAGE_NAME = "openagent-labforge", PRIORITIZED_TAGS;
|
|
7242
7272
|
var init_plugin_name_with_version = __esm(() => {
|
|
7243
7273
|
PRIORITIZED_TAGS = ["latest", "beta", "next"];
|
|
7244
7274
|
});
|
|
@@ -7348,7 +7378,7 @@ async function addPluginToOpenCodeConfig(currentVersion) {
|
|
|
7348
7378
|
};
|
|
7349
7379
|
}
|
|
7350
7380
|
const { format: format2, path: path3 } = detectConfigFormat();
|
|
7351
|
-
const pluginEntry = await getPluginNameWithVersion(currentVersion);
|
|
7381
|
+
const pluginEntry = await getPluginNameWithVersion(currentVersion, PACKAGE_NAME);
|
|
7352
7382
|
try {
|
|
7353
7383
|
if (format2 === "none") {
|
|
7354
7384
|
const config2 = { plugin: [pluginEntry] };
|
|
@@ -7366,7 +7396,7 @@ async function addPluginToOpenCodeConfig(currentVersion) {
|
|
|
7366
7396
|
}
|
|
7367
7397
|
const config = parseResult.config;
|
|
7368
7398
|
const plugins = config.plugin ?? [];
|
|
7369
|
-
const existingIndex = plugins.findIndex((p) => p ===
|
|
7399
|
+
const existingIndex = plugins.findIndex((p) => LEGACY_PACKAGE_NAMES.some((name) => p === name || p.startsWith(`${name}@`)));
|
|
7370
7400
|
if (existingIndex !== -1) {
|
|
7371
7401
|
if (plugins[existingIndex] === pluginEntry) {
|
|
7372
7402
|
return { success: true, configPath: path3 };
|
|
@@ -7405,13 +7435,19 @@ async function addPluginToOpenCodeConfig(currentVersion) {
|
|
|
7405
7435
|
};
|
|
7406
7436
|
}
|
|
7407
7437
|
}
|
|
7408
|
-
var
|
|
7438
|
+
var PACKAGE_NAME = "@bohuyeshan/openagent-labforge-core", LEGACY_PACKAGE_NAMES;
|
|
7409
7439
|
var init_add_plugin_to_opencode_config = __esm(() => {
|
|
7410
7440
|
init_config_context();
|
|
7411
7441
|
init_ensure_config_directory_exists();
|
|
7412
7442
|
init_opencode_config_format();
|
|
7413
7443
|
init_parse_opencode_config_file();
|
|
7414
7444
|
init_plugin_name_with_version();
|
|
7445
|
+
LEGACY_PACKAGE_NAMES = [
|
|
7446
|
+
PACKAGE_NAME,
|
|
7447
|
+
"@labforge/openagent-labforge-core",
|
|
7448
|
+
"openagent-labforge",
|
|
7449
|
+
"openagent-labforge"
|
|
7450
|
+
];
|
|
7415
7451
|
});
|
|
7416
7452
|
|
|
7417
7453
|
// src/cli/model-fallback-requirements.ts
|
|
@@ -7425,6 +7461,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7425
7461
|
model: "claude-opus-4-6",
|
|
7426
7462
|
variant: "max"
|
|
7427
7463
|
},
|
|
7464
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
7428
7465
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7429
7466
|
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "medium" },
|
|
7430
7467
|
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" }
|
|
@@ -7457,38 +7494,30 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7457
7494
|
providers: ["anthropic", "github-copilot", "opencode"],
|
|
7458
7495
|
model: "claude-opus-4-6",
|
|
7459
7496
|
variant: "max"
|
|
7460
|
-
}
|
|
7497
|
+
},
|
|
7498
|
+
{ providers: ["opencode-go"], model: "glm-5" }
|
|
7461
7499
|
]
|
|
7462
7500
|
},
|
|
7463
7501
|
librarian: {
|
|
7464
7502
|
fallbackChain: [
|
|
7465
|
-
{ providers: ["
|
|
7466
|
-
{ providers: ["opencode"], model: "
|
|
7467
|
-
{
|
|
7468
|
-
|
|
7469
|
-
model: "claude-sonnet-4-5"
|
|
7470
|
-
}
|
|
7503
|
+
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
|
7504
|
+
{ providers: ["opencode"], model: "minimax-m2.5-free" },
|
|
7505
|
+
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
|
7506
|
+
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
7471
7507
|
]
|
|
7472
7508
|
},
|
|
7473
7509
|
explore: {
|
|
7474
7510
|
fallbackChain: [
|
|
7475
7511
|
{ providers: ["github-copilot"], model: "grok-code-fast-1" },
|
|
7512
|
+
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
|
7476
7513
|
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
|
|
7477
7514
|
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
7478
7515
|
]
|
|
7479
7516
|
},
|
|
7480
7517
|
"multimodal-looker": {
|
|
7481
7518
|
fallbackChain: [
|
|
7482
|
-
{
|
|
7483
|
-
|
|
7484
|
-
model: "gpt-5.4",
|
|
7485
|
-
variant: "medium"
|
|
7486
|
-
},
|
|
7487
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7488
|
-
{
|
|
7489
|
-
providers: ["google", "github-copilot", "opencode"],
|
|
7490
|
-
model: "gemini-3-flash"
|
|
7491
|
-
},
|
|
7519
|
+
{ providers: ["openai", "opencode"], model: "gpt-5.4", variant: "medium" },
|
|
7520
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
7492
7521
|
{ providers: ["zai-coding-plan"], model: "glm-4.6v" },
|
|
7493
7522
|
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
7494
7523
|
]
|
|
@@ -7506,6 +7535,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7506
7535
|
model: "gpt-5.4",
|
|
7507
7536
|
variant: "high"
|
|
7508
7537
|
},
|
|
7538
|
+
{ providers: ["opencode-go"], model: "glm-5" },
|
|
7509
7539
|
{
|
|
7510
7540
|
providers: ["google", "github-copilot", "opencode"],
|
|
7511
7541
|
model: "gemini-3.1-pro"
|
|
@@ -7519,17 +7549,8 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7519
7549
|
model: "claude-opus-4-6",
|
|
7520
7550
|
variant: "max"
|
|
7521
7551
|
},
|
|
7522
|
-
{ providers: ["
|
|
7523
|
-
{
|
|
7524
|
-
providers: ["openai", "github-copilot", "opencode"],
|
|
7525
|
-
model: "gpt-5.4",
|
|
7526
|
-
variant: "high"
|
|
7527
|
-
},
|
|
7528
|
-
{
|
|
7529
|
-
providers: ["google", "github-copilot", "opencode"],
|
|
7530
|
-
model: "gemini-3.1-pro",
|
|
7531
|
-
variant: "high"
|
|
7532
|
-
}
|
|
7552
|
+
{ providers: ["opencode-go"], model: "glm-5" },
|
|
7553
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
7533
7554
|
]
|
|
7534
7555
|
},
|
|
7535
7556
|
momus: {
|
|
@@ -7548,21 +7569,21 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7548
7569
|
providers: ["google", "github-copilot", "opencode"],
|
|
7549
7570
|
model: "gemini-3.1-pro",
|
|
7550
7571
|
variant: "high"
|
|
7551
|
-
}
|
|
7572
|
+
},
|
|
7573
|
+
{ providers: ["opencode-go"], model: "glm-5" }
|
|
7552
7574
|
]
|
|
7553
7575
|
},
|
|
7554
7576
|
atlas: {
|
|
7555
7577
|
fallbackChain: [
|
|
7556
|
-
{ providers: ["
|
|
7557
|
-
{
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
{
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
}
|
|
7578
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" },
|
|
7579
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" }
|
|
7580
|
+
]
|
|
7581
|
+
},
|
|
7582
|
+
"sisyphus-junior": {
|
|
7583
|
+
fallbackChain: [
|
|
7584
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
|
|
7585
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
7586
|
+
{ providers: ["opencode"], model: "big-pickle" }
|
|
7566
7587
|
]
|
|
7567
7588
|
}
|
|
7568
7589
|
};
|
|
@@ -7580,7 +7601,8 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7580
7601
|
model: "claude-opus-4-6",
|
|
7581
7602
|
variant: "max"
|
|
7582
7603
|
},
|
|
7583
|
-
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
7604
|
+
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7605
|
+
{ providers: ["opencode-go"], model: "glm-5" }
|
|
7584
7606
|
]
|
|
7585
7607
|
},
|
|
7586
7608
|
ultrabrain: {
|
|
@@ -7599,7 +7621,8 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7599
7621
|
providers: ["anthropic", "github-copilot", "opencode"],
|
|
7600
7622
|
model: "claude-opus-4-6",
|
|
7601
7623
|
variant: "max"
|
|
7602
|
-
}
|
|
7624
|
+
},
|
|
7625
|
+
{ providers: ["opencode-go"], model: "glm-5" }
|
|
7603
7626
|
]
|
|
7604
7627
|
},
|
|
7605
7628
|
deep: {
|
|
@@ -7651,6 +7674,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7651
7674
|
providers: ["google", "github-copilot", "opencode"],
|
|
7652
7675
|
model: "gemini-3-flash"
|
|
7653
7676
|
},
|
|
7677
|
+
{ providers: ["opencode-go"], model: "minimax-m2.5" },
|
|
7654
7678
|
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
7655
7679
|
]
|
|
7656
7680
|
},
|
|
@@ -7665,6 +7689,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7665
7689
|
model: "gpt-5.3-codex",
|
|
7666
7690
|
variant: "medium"
|
|
7667
7691
|
},
|
|
7692
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
7668
7693
|
{
|
|
7669
7694
|
providers: ["google", "github-copilot", "opencode"],
|
|
7670
7695
|
model: "gemini-3-flash"
|
|
@@ -7685,7 +7710,8 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7685
7710
|
},
|
|
7686
7711
|
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
|
|
7687
7712
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
7688
|
-
{ providers: ["opencode"], model: "kimi-k2.5" }
|
|
7713
|
+
{ providers: ["opencode"], model: "kimi-k2.5" },
|
|
7714
|
+
{ providers: ["opencode-go"], model: "glm-5" }
|
|
7689
7715
|
]
|
|
7690
7716
|
},
|
|
7691
7717
|
writing: {
|
|
@@ -7695,6 +7721,7 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7695
7721
|
providers: ["google", "github-copilot", "opencode"],
|
|
7696
7722
|
model: "gemini-3-flash"
|
|
7697
7723
|
},
|
|
7724
|
+
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
|
7698
7725
|
{
|
|
7699
7726
|
providers: ["anthropic", "github-copilot", "opencode"],
|
|
7700
7727
|
model: "claude-sonnet-4-5"
|
|
@@ -7704,6 +7731,37 @@ var init_model_fallback_requirements = __esm(() => {
|
|
|
7704
7731
|
};
|
|
7705
7732
|
});
|
|
7706
7733
|
|
|
7734
|
+
// src/cli/openai-only-model-catalog.ts
|
|
7735
|
+
function isOpenAiOnlyAvailability(availability) {
|
|
7736
|
+
return availability.native.openai && !availability.native.claude && !availability.native.gemini && !availability.opencodeZen && !availability.copilot && !availability.zai && !availability.kimiForCoding;
|
|
7737
|
+
}
|
|
7738
|
+
function applyOpenAiOnlyModelCatalog(config) {
|
|
7739
|
+
return {
|
|
7740
|
+
...config,
|
|
7741
|
+
agents: {
|
|
7742
|
+
...config.agents,
|
|
7743
|
+
...OPENAI_ONLY_AGENT_OVERRIDES
|
|
7744
|
+
},
|
|
7745
|
+
categories: {
|
|
7746
|
+
...config.categories,
|
|
7747
|
+
...OPENAI_ONLY_CATEGORY_OVERRIDES
|
|
7748
|
+
}
|
|
7749
|
+
};
|
|
7750
|
+
}
|
|
7751
|
+
var OPENAI_ONLY_AGENT_OVERRIDES, OPENAI_ONLY_CATEGORY_OVERRIDES;
|
|
7752
|
+
var init_openai_only_model_catalog = __esm(() => {
|
|
7753
|
+
OPENAI_ONLY_AGENT_OVERRIDES = {
|
|
7754
|
+
explore: { model: "openai/gpt-5.4", variant: "medium" },
|
|
7755
|
+
librarian: { model: "openai/gpt-5.4", variant: "medium" }
|
|
7756
|
+
};
|
|
7757
|
+
OPENAI_ONLY_CATEGORY_OVERRIDES = {
|
|
7758
|
+
artistry: { model: "openai/gpt-5.4", variant: "xhigh" },
|
|
7759
|
+
quick: { model: "openai/gpt-5.3-codex", variant: "low" },
|
|
7760
|
+
"visual-engineering": { model: "openai/gpt-5.4", variant: "high" },
|
|
7761
|
+
writing: { model: "openai/gpt-5.4", variant: "medium" }
|
|
7762
|
+
};
|
|
7763
|
+
});
|
|
7764
|
+
|
|
7707
7765
|
// src/cli/provider-availability.ts
|
|
7708
7766
|
function toProviderAvailability(config) {
|
|
7709
7767
|
return {
|
|
@@ -7716,6 +7774,7 @@ function toProviderAvailability(config) {
|
|
|
7716
7774
|
copilot: config.hasCopilot,
|
|
7717
7775
|
zai: config.hasZaiCodingPlan,
|
|
7718
7776
|
kimiForCoding: config.hasKimiForCoding,
|
|
7777
|
+
opencodeGo: config.hasOpencodeGo,
|
|
7719
7778
|
isMaxPlan: config.isMax20
|
|
7720
7779
|
};
|
|
7721
7780
|
}
|
|
@@ -7727,7 +7786,8 @@ function isProviderAvailable(provider, availability) {
|
|
|
7727
7786
|
"github-copilot": availability.copilot,
|
|
7728
7787
|
opencode: availability.opencodeZen,
|
|
7729
7788
|
"zai-coding-plan": availability.zai,
|
|
7730
|
-
"kimi-for-coding": availability.kimiForCoding
|
|
7789
|
+
"kimi-for-coding": availability.kimiForCoding,
|
|
7790
|
+
"opencode-go": availability.opencodeGo
|
|
7731
7791
|
};
|
|
7732
7792
|
return mapping[provider] ?? false;
|
|
7733
7793
|
}
|
|
@@ -7773,7 +7833,7 @@ var init_fallback_chain_resolution = __esm(() => {
|
|
|
7773
7833
|
// src/cli/model-fallback.ts
|
|
7774
7834
|
function generateModelConfig(config) {
|
|
7775
7835
|
const avail = toProviderAvailability(config);
|
|
7776
|
-
const hasAnyProvider = avail.native.claude || avail.native.openai || avail.native.gemini || avail.opencodeZen || avail.copilot || avail.zai || avail.kimiForCoding;
|
|
7836
|
+
const hasAnyProvider = avail.native.claude || avail.native.openai || avail.native.gemini || avail.opencodeZen || avail.copilot || avail.zai || avail.kimiForCoding || avail.opencodeGo;
|
|
7777
7837
|
if (!hasAnyProvider) {
|
|
7778
7838
|
return {
|
|
7779
7839
|
$schema: SCHEMA_URL,
|
|
@@ -7784,8 +7844,12 @@ function generateModelConfig(config) {
|
|
|
7784
7844
|
const agents = {};
|
|
7785
7845
|
const categories = {};
|
|
7786
7846
|
for (const [role, req] of Object.entries(CLI_AGENT_MODEL_REQUIREMENTS)) {
|
|
7787
|
-
if (role === "librarian"
|
|
7788
|
-
|
|
7847
|
+
if (role === "librarian") {
|
|
7848
|
+
if (avail.opencodeGo) {
|
|
7849
|
+
agents[role] = { model: "opencode-go/minimax-m2.5" };
|
|
7850
|
+
} else if (avail.zai) {
|
|
7851
|
+
agents[role] = { model: ZAI_MODEL };
|
|
7852
|
+
}
|
|
7789
7853
|
continue;
|
|
7790
7854
|
}
|
|
7791
7855
|
if (role === "explore") {
|
|
@@ -7793,6 +7857,8 @@ function generateModelConfig(config) {
|
|
|
7793
7857
|
agents[role] = { model: "anthropic/claude-haiku-4-5" };
|
|
7794
7858
|
} else if (avail.opencodeZen) {
|
|
7795
7859
|
agents[role] = { model: "opencode/claude-haiku-4-5" };
|
|
7860
|
+
} else if (avail.opencodeGo) {
|
|
7861
|
+
agents[role] = { model: "opencode-go/minimax-m2.5" };
|
|
7796
7862
|
} else if (avail.copilot) {
|
|
7797
7863
|
agents[role] = { model: "github-copilot/gpt-5-mini" };
|
|
7798
7864
|
} else {
|
|
@@ -7842,15 +7908,17 @@ function generateModelConfig(config) {
|
|
|
7842
7908
|
categories[cat] = { model: ULTIMATE_FALLBACK };
|
|
7843
7909
|
}
|
|
7844
7910
|
}
|
|
7845
|
-
|
|
7911
|
+
const generatedConfig = {
|
|
7846
7912
|
$schema: SCHEMA_URL,
|
|
7847
7913
|
agents,
|
|
7848
7914
|
categories
|
|
7849
7915
|
};
|
|
7916
|
+
return isOpenAiOnlyAvailability(avail) ? applyOpenAiOnlyModelCatalog(generatedConfig) : generatedConfig;
|
|
7850
7917
|
}
|
|
7851
|
-
var ZAI_MODEL = "zai-coding-plan/glm-4.7", ULTIMATE_FALLBACK = "opencode/glm-4.7-free", SCHEMA_URL = "https://raw.githubusercontent.com/code-yeongyu/
|
|
7918
|
+
var ZAI_MODEL = "zai-coding-plan/glm-4.7", ULTIMATE_FALLBACK = "opencode/glm-4.7-free", SCHEMA_URL = "https://raw.githubusercontent.com/code-yeongyu/openagent-labforge/dev/assets/openagent-labforge.schema.json";
|
|
7852
7919
|
var init_model_fallback = __esm(() => {
|
|
7853
7920
|
init_model_fallback_requirements();
|
|
7921
|
+
init_openai_only_model_catalog();
|
|
7854
7922
|
init_fallback_chain_resolution();
|
|
7855
7923
|
});
|
|
7856
7924
|
|
|
@@ -8072,7 +8140,8 @@ function detectCurrentConfig() {
|
|
|
8072
8140
|
hasCopilot: false,
|
|
8073
8141
|
hasOpencodeZen: true,
|
|
8074
8142
|
hasZaiCodingPlan: false,
|
|
8075
|
-
hasKimiForCoding: false
|
|
8143
|
+
hasKimiForCoding: false,
|
|
8144
|
+
hasOpencodeGo: false
|
|
8076
8145
|
};
|
|
8077
8146
|
const { format: format2, path: path3 } = detectConfigFormat();
|
|
8078
8147
|
if (format2 === "none") {
|
|
@@ -8084,7 +8153,13 @@ function detectCurrentConfig() {
|
|
|
8084
8153
|
}
|
|
8085
8154
|
const openCodeConfig = parseResult.config;
|
|
8086
8155
|
const plugins = openCodeConfig.plugin ?? [];
|
|
8087
|
-
|
|
8156
|
+
const LEGACY_PACKAGE_NAMES2 = [
|
|
8157
|
+
"@bohuyeshan/openagent-labforge-core",
|
|
8158
|
+
"@labforge/openagent-labforge-core",
|
|
8159
|
+
"openagent-labforge",
|
|
8160
|
+
"openagent-labforge"
|
|
8161
|
+
];
|
|
8162
|
+
result.isInstalled = plugins.some((p) => LEGACY_PACKAGE_NAMES2.some((name) => p.startsWith(name)));
|
|
8088
8163
|
if (!result.isInstalled) {
|
|
8089
8164
|
return result;
|
|
8090
8165
|
}
|
|
@@ -8105,35 +8180,75 @@ var init_detect_current_config = __esm(() => {
|
|
|
8105
8180
|
});
|
|
8106
8181
|
|
|
8107
8182
|
// src/cli/config-manager/bun-install.ts
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8183
|
+
import { existsSync as existsSync9 } from "fs";
|
|
8184
|
+
function readProcessOutput(stream) {
|
|
8185
|
+
if (!stream) {
|
|
8186
|
+
return Promise.resolve("");
|
|
8187
|
+
}
|
|
8188
|
+
return Bun.readableStreamToText(stream);
|
|
8189
|
+
}
|
|
8190
|
+
function logCapturedOutputOnFailure(outputMode, output) {
|
|
8191
|
+
if (outputMode !== "pipe") {
|
|
8192
|
+
return;
|
|
8193
|
+
}
|
|
8194
|
+
const stdout = output.stdout.trim();
|
|
8195
|
+
const stderr = output.stderr.trim();
|
|
8196
|
+
if (!stdout && !stderr) {
|
|
8197
|
+
return;
|
|
8198
|
+
}
|
|
8199
|
+
log("[bun-install] Captured output from failed bun install", {
|
|
8200
|
+
stdout,
|
|
8201
|
+
stderr
|
|
8202
|
+
});
|
|
8111
8203
|
}
|
|
8112
|
-
async function runBunInstallWithDetails() {
|
|
8204
|
+
async function runBunInstallWithDetails(options) {
|
|
8205
|
+
const outputMode = options?.outputMode ?? "pipe";
|
|
8206
|
+
const cacheDir = getOpenCodeCacheDir();
|
|
8207
|
+
const packageJsonPath = `${cacheDir}/package.json`;
|
|
8208
|
+
if (!existsSync9(packageJsonPath)) {
|
|
8209
|
+
return {
|
|
8210
|
+
success: false,
|
|
8211
|
+
error: `Workspace not initialized: ${packageJsonPath} not found. OpenCode should create this on first run.`
|
|
8212
|
+
};
|
|
8213
|
+
}
|
|
8113
8214
|
try {
|
|
8114
8215
|
const proc = spawnWithWindowsHide(["bun", "install"], {
|
|
8115
|
-
cwd:
|
|
8116
|
-
stdout:
|
|
8117
|
-
stderr:
|
|
8216
|
+
cwd: cacheDir,
|
|
8217
|
+
stdout: outputMode,
|
|
8218
|
+
stderr: outputMode
|
|
8118
8219
|
});
|
|
8220
|
+
const outputPromise = Promise.all([readProcessOutput(proc.stdout), readProcessOutput(proc.stderr)]).then(([stdout, stderr]) => ({ stdout, stderr }));
|
|
8119
8221
|
let timeoutId;
|
|
8120
8222
|
const timeoutPromise = new Promise((resolve2) => {
|
|
8121
8223
|
timeoutId = setTimeout(() => resolve2("timeout"), BUN_INSTALL_TIMEOUT_MS);
|
|
8122
8224
|
});
|
|
8123
8225
|
const exitPromise = proc.exited.then(() => "completed");
|
|
8124
8226
|
const result = await Promise.race([exitPromise, timeoutPromise]);
|
|
8125
|
-
|
|
8227
|
+
if (timeoutId) {
|
|
8228
|
+
clearTimeout(timeoutId);
|
|
8229
|
+
}
|
|
8126
8230
|
if (result === "timeout") {
|
|
8127
8231
|
try {
|
|
8128
8232
|
proc.kill();
|
|
8129
|
-
} catch {
|
|
8233
|
+
} catch (err) {
|
|
8234
|
+
log("[cli/install] Failed to kill timed out bun install process:", err);
|
|
8235
|
+
}
|
|
8236
|
+
if (outputMode === "pipe") {
|
|
8237
|
+
outputPromise.then((output2) => {
|
|
8238
|
+
logCapturedOutputOnFailure(outputMode, output2);
|
|
8239
|
+
}).catch((err) => {
|
|
8240
|
+
log("[bun-install] Failed to read captured output after timeout:", err);
|
|
8241
|
+
});
|
|
8242
|
+
}
|
|
8130
8243
|
return {
|
|
8131
8244
|
success: false,
|
|
8132
8245
|
timedOut: true,
|
|
8133
|
-
error: `bun install timed out after ${BUN_INSTALL_TIMEOUT_SECONDS} seconds. Try running manually: cd ${
|
|
8246
|
+
error: `bun install timed out after ${BUN_INSTALL_TIMEOUT_SECONDS} seconds. Try running manually: cd "${cacheDir}" && bun i`
|
|
8134
8247
|
};
|
|
8135
8248
|
}
|
|
8249
|
+
const output = await outputPromise;
|
|
8136
8250
|
if (proc.exitCode !== 0) {
|
|
8251
|
+
logCapturedOutputOnFailure(outputMode, output);
|
|
8137
8252
|
return {
|
|
8138
8253
|
success: false,
|
|
8139
8254
|
error: `bun install failed with exit code ${proc.exitCode}`
|
|
@@ -8150,7 +8265,8 @@ async function runBunInstallWithDetails() {
|
|
|
8150
8265
|
}
|
|
8151
8266
|
var BUN_INSTALL_TIMEOUT_SECONDS = 60, BUN_INSTALL_TIMEOUT_MS;
|
|
8152
8267
|
var init_bun_install = __esm(() => {
|
|
8153
|
-
|
|
8268
|
+
init_data_path();
|
|
8269
|
+
init_logger();
|
|
8154
8270
|
init_spawn_with_windows_hide();
|
|
8155
8271
|
BUN_INSTALL_TIMEOUT_MS = BUN_INSTALL_TIMEOUT_SECONDS * 1000;
|
|
8156
8272
|
});
|
|
@@ -8228,27 +8344,22 @@ var require_src = __commonJS((exports, module) => {
|
|
|
8228
8344
|
// src/hooks/auto-update-checker/constants.ts
|
|
8229
8345
|
import * as path4 from "path";
|
|
8230
8346
|
import * as os3 from "os";
|
|
8231
|
-
function getCacheDir2() {
|
|
8232
|
-
if (process.platform === "win32") {
|
|
8233
|
-
return path4.join(process.env.LOCALAPPDATA ?? os3.homedir(), "opencode");
|
|
8234
|
-
}
|
|
8235
|
-
return path4.join(os3.homedir(), ".cache", "opencode");
|
|
8236
|
-
}
|
|
8237
8347
|
function getWindowsAppdataDir() {
|
|
8238
8348
|
if (process.platform !== "win32")
|
|
8239
8349
|
return null;
|
|
8240
8350
|
return process.env.APPDATA ?? path4.join(os3.homedir(), "AppData", "Roaming");
|
|
8241
8351
|
}
|
|
8242
|
-
var
|
|
8352
|
+
var PACKAGE_NAME2 = "openagent-labforge", NPM_REGISTRY_URL, NPM_FETCH_TIMEOUT = 5000, CACHE_DIR, VERSION_FILE, USER_CONFIG_DIR, USER_OPENCODE_CONFIG, USER_OPENCODE_CONFIG_JSONC, INSTALLED_PACKAGE_JSON;
|
|
8243
8353
|
var init_constants3 = __esm(() => {
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8354
|
+
init_data_path();
|
|
8355
|
+
init_opencode_config_dir();
|
|
8356
|
+
NPM_REGISTRY_URL = `https://registry.npmjs.org/-/package/${PACKAGE_NAME2}/dist-tags`;
|
|
8357
|
+
CACHE_DIR = getOpenCodeCacheDir();
|
|
8247
8358
|
VERSION_FILE = path4.join(CACHE_DIR, "version");
|
|
8248
8359
|
USER_CONFIG_DIR = getOpenCodeConfigDir({ binary: "opencode" });
|
|
8249
8360
|
USER_OPENCODE_CONFIG = path4.join(USER_CONFIG_DIR, "opencode.json");
|
|
8250
8361
|
USER_OPENCODE_CONFIG_JSONC = path4.join(USER_CONFIG_DIR, "opencode.jsonc");
|
|
8251
|
-
INSTALLED_PACKAGE_JSON = path4.join(
|
|
8362
|
+
INSTALLED_PACKAGE_JSON = path4.join(CACHE_DIR, "node_modules", PACKAGE_NAME2, "package.json");
|
|
8252
8363
|
});
|
|
8253
8364
|
|
|
8254
8365
|
// src/hooks/auto-update-checker/checker/config-paths.ts
|
|
@@ -8302,7 +8413,7 @@ function getLocalDevPath(directory) {
|
|
|
8302
8413
|
const config2 = JSON.parse(stripJsonComments(content));
|
|
8303
8414
|
const plugins = config2.plugin ?? [];
|
|
8304
8415
|
for (const entry of plugins) {
|
|
8305
|
-
if (entry.startsWith("file://") && entry.includes(
|
|
8416
|
+
if (entry.startsWith("file://") && entry.includes(PACKAGE_NAME2)) {
|
|
8306
8417
|
try {
|
|
8307
8418
|
return fileURLToPath(entry);
|
|
8308
8419
|
} catch {
|
|
@@ -8334,7 +8445,7 @@ function findPackageJsonUp(startPath) {
|
|
|
8334
8445
|
try {
|
|
8335
8446
|
const content = fs5.readFileSync(pkgPath, "utf-8");
|
|
8336
8447
|
const pkg = JSON.parse(content);
|
|
8337
|
-
if (pkg.name ===
|
|
8448
|
+
if (pkg.name === PACKAGE_NAME2)
|
|
8338
8449
|
return pkgPath;
|
|
8339
8450
|
} catch {}
|
|
8340
8451
|
}
|
|
@@ -8374,9 +8485,6 @@ var init_local_dev_version = __esm(() => {
|
|
|
8374
8485
|
|
|
8375
8486
|
// src/hooks/auto-update-checker/checker/plugin-entry.ts
|
|
8376
8487
|
import * as fs7 from "fs";
|
|
8377
|
-
function isExplicitVersionPin(pinnedVersion) {
|
|
8378
|
-
return /^\d+\.\d+\.\d+/.test(pinnedVersion);
|
|
8379
|
-
}
|
|
8380
8488
|
function findPluginEntry(directory) {
|
|
8381
8489
|
for (const configPath of getConfigPaths(directory)) {
|
|
8382
8490
|
try {
|
|
@@ -8386,12 +8494,12 @@ function findPluginEntry(directory) {
|
|
|
8386
8494
|
const config2 = JSON.parse(stripJsonComments(content));
|
|
8387
8495
|
const plugins = config2.plugin ?? [];
|
|
8388
8496
|
for (const entry of plugins) {
|
|
8389
|
-
if (entry ===
|
|
8497
|
+
if (entry === PACKAGE_NAME2) {
|
|
8390
8498
|
return { entry, isPinned: false, pinnedVersion: null, configPath };
|
|
8391
8499
|
}
|
|
8392
|
-
if (entry.startsWith(`${
|
|
8393
|
-
const pinnedVersion = entry.slice(
|
|
8394
|
-
const isPinned =
|
|
8500
|
+
if (entry.startsWith(`${PACKAGE_NAME2}@`)) {
|
|
8501
|
+
const pinnedVersion = entry.slice(PACKAGE_NAME2.length + 1);
|
|
8502
|
+
const isPinned = EXACT_SEMVER_REGEX.test(pinnedVersion.trim());
|
|
8395
8503
|
return { entry, isPinned, pinnedVersion, configPath };
|
|
8396
8504
|
}
|
|
8397
8505
|
}
|
|
@@ -8401,9 +8509,11 @@ function findPluginEntry(directory) {
|
|
|
8401
8509
|
}
|
|
8402
8510
|
return null;
|
|
8403
8511
|
}
|
|
8512
|
+
var EXACT_SEMVER_REGEX;
|
|
8404
8513
|
var init_plugin_entry = __esm(() => {
|
|
8405
8514
|
init_constants3();
|
|
8406
8515
|
init_config_paths();
|
|
8516
|
+
EXACT_SEMVER_REGEX = /^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/;
|
|
8407
8517
|
});
|
|
8408
8518
|
|
|
8409
8519
|
// src/hooks/auto-update-checker/checker/cached-version.ts
|
|
@@ -8452,52 +8562,6 @@ var init_cached_version = __esm(() => {
|
|
|
8452
8562
|
});
|
|
8453
8563
|
|
|
8454
8564
|
// src/hooks/auto-update-checker/checker/pinned-version-updater.ts
|
|
8455
|
-
import * as fs9 from "fs";
|
|
8456
|
-
function replacePluginEntry(configPath, oldEntry, newEntry) {
|
|
8457
|
-
try {
|
|
8458
|
-
const content = fs9.readFileSync(configPath, "utf-8");
|
|
8459
|
-
const pluginMatch = content.match(/"plugin"\s*:\s*\[/);
|
|
8460
|
-
if (!pluginMatch || pluginMatch.index === undefined) {
|
|
8461
|
-
log(`[auto-update-checker] No "plugin" array found in ${configPath}`);
|
|
8462
|
-
return false;
|
|
8463
|
-
}
|
|
8464
|
-
const startIndex = pluginMatch.index + pluginMatch[0].length;
|
|
8465
|
-
let bracketCount = 1;
|
|
8466
|
-
let endIndex = startIndex;
|
|
8467
|
-
for (let i2 = startIndex;i2 < content.length && bracketCount > 0; i2++) {
|
|
8468
|
-
if (content[i2] === "[")
|
|
8469
|
-
bracketCount++;
|
|
8470
|
-
else if (content[i2] === "]")
|
|
8471
|
-
bracketCount--;
|
|
8472
|
-
endIndex = i2;
|
|
8473
|
-
}
|
|
8474
|
-
const before = content.slice(0, startIndex);
|
|
8475
|
-
const pluginArrayContent = content.slice(startIndex, endIndex);
|
|
8476
|
-
const after = content.slice(endIndex);
|
|
8477
|
-
const escapedOldEntry = oldEntry.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
8478
|
-
const regex = new RegExp(`["']${escapedOldEntry}["']`);
|
|
8479
|
-
if (!regex.test(pluginArrayContent)) {
|
|
8480
|
-
log(`[auto-update-checker] Entry "${oldEntry}" not found in plugin array of ${configPath}`);
|
|
8481
|
-
return false;
|
|
8482
|
-
}
|
|
8483
|
-
const updatedPluginArray = pluginArrayContent.replace(regex, `"${newEntry}"`);
|
|
8484
|
-
const updatedContent = before + updatedPluginArray + after;
|
|
8485
|
-
if (updatedContent === content) {
|
|
8486
|
-
log(`[auto-update-checker] No changes made to ${configPath}`);
|
|
8487
|
-
return false;
|
|
8488
|
-
}
|
|
8489
|
-
fs9.writeFileSync(configPath, updatedContent, "utf-8");
|
|
8490
|
-
log(`[auto-update-checker] Updated ${configPath}: ${oldEntry} \u2192 ${newEntry}`);
|
|
8491
|
-
return true;
|
|
8492
|
-
} catch (err) {
|
|
8493
|
-
log(`[auto-update-checker] Failed to update config file ${configPath}:`, err);
|
|
8494
|
-
return false;
|
|
8495
|
-
}
|
|
8496
|
-
}
|
|
8497
|
-
function revertPinnedVersion(configPath, failedVersion, originalEntry) {
|
|
8498
|
-
const failedEntry = `${PACKAGE_NAME3}@${failedVersion}`;
|
|
8499
|
-
return replacePluginEntry(configPath, failedEntry, originalEntry);
|
|
8500
|
-
}
|
|
8501
8565
|
var init_pinned_version_updater = __esm(() => {
|
|
8502
8566
|
init_logger();
|
|
8503
8567
|
init_constants3();
|
|
@@ -8621,6 +8685,79 @@ var init_check_for_update = __esm(() => {
|
|
|
8621
8685
|
init_latest_version();
|
|
8622
8686
|
});
|
|
8623
8687
|
|
|
8688
|
+
// src/hooks/auto-update-checker/checker/sync-package-json.ts
|
|
8689
|
+
import * as crypto from "crypto";
|
|
8690
|
+
import * as fs9 from "fs";
|
|
8691
|
+
import * as path8 from "path";
|
|
8692
|
+
function safeUnlink(filePath) {
|
|
8693
|
+
try {
|
|
8694
|
+
fs9.unlinkSync(filePath);
|
|
8695
|
+
} catch (err) {
|
|
8696
|
+
log(`[auto-update-checker] Failed to cleanup temp file: ${filePath}`, err);
|
|
8697
|
+
}
|
|
8698
|
+
}
|
|
8699
|
+
function getIntentVersion(pluginInfo) {
|
|
8700
|
+
if (!pluginInfo.pinnedVersion) {
|
|
8701
|
+
return "latest";
|
|
8702
|
+
}
|
|
8703
|
+
return pluginInfo.pinnedVersion;
|
|
8704
|
+
}
|
|
8705
|
+
function syncCachePackageJsonToIntent(pluginInfo) {
|
|
8706
|
+
const cachePackageJsonPath = path8.join(CACHE_DIR, "package.json");
|
|
8707
|
+
if (!fs9.existsSync(cachePackageJsonPath)) {
|
|
8708
|
+
log("[auto-update-checker] Cache package.json not found, nothing to sync");
|
|
8709
|
+
return { synced: false, error: "file_not_found", message: "Cache package.json not found" };
|
|
8710
|
+
}
|
|
8711
|
+
let content;
|
|
8712
|
+
let pkgJson;
|
|
8713
|
+
try {
|
|
8714
|
+
content = fs9.readFileSync(cachePackageJsonPath, "utf-8");
|
|
8715
|
+
} catch (err) {
|
|
8716
|
+
log("[auto-update-checker] Failed to read cache package.json:", err);
|
|
8717
|
+
return { synced: false, error: "parse_error", message: "Failed to read cache package.json" };
|
|
8718
|
+
}
|
|
8719
|
+
try {
|
|
8720
|
+
pkgJson = JSON.parse(content);
|
|
8721
|
+
} catch (err) {
|
|
8722
|
+
log("[auto-update-checker] Failed to parse cache package.json:", err);
|
|
8723
|
+
return { synced: false, error: "parse_error", message: "Failed to parse cache package.json (malformed JSON)" };
|
|
8724
|
+
}
|
|
8725
|
+
if (!pkgJson || !pkgJson.dependencies?.[PACKAGE_NAME2]) {
|
|
8726
|
+
log("[auto-update-checker] Plugin not in cache package.json dependencies, nothing to sync");
|
|
8727
|
+
return { synced: false, error: "plugin_not_in_deps", message: "Plugin not in cache package.json dependencies" };
|
|
8728
|
+
}
|
|
8729
|
+
const currentVersion = pkgJson.dependencies[PACKAGE_NAME2];
|
|
8730
|
+
const intentVersion = getIntentVersion(pluginInfo);
|
|
8731
|
+
if (currentVersion === intentVersion) {
|
|
8732
|
+
log("[auto-update-checker] Cache package.json already matches intent:", intentVersion);
|
|
8733
|
+
return { synced: false, error: null, message: `Already matches intent: ${intentVersion}` };
|
|
8734
|
+
}
|
|
8735
|
+
const intentIsTag = !EXACT_SEMVER_REGEX2.test(intentVersion.trim());
|
|
8736
|
+
const currentIsSemver = EXACT_SEMVER_REGEX2.test(String(currentVersion).trim());
|
|
8737
|
+
if (intentIsTag && currentIsSemver) {
|
|
8738
|
+
log(`[auto-update-checker] Syncing cache package.json: "${currentVersion}" \u2192 "${intentVersion}" (opencode.json intent)`);
|
|
8739
|
+
} else {
|
|
8740
|
+
log(`[auto-update-checker] Updating cache package.json: "${currentVersion}" \u2192 "${intentVersion}"`);
|
|
8741
|
+
}
|
|
8742
|
+
pkgJson.dependencies[PACKAGE_NAME2] = intentVersion;
|
|
8743
|
+
const tmpPath = `${cachePackageJsonPath}.${crypto.randomUUID()}`;
|
|
8744
|
+
try {
|
|
8745
|
+
fs9.writeFileSync(tmpPath, JSON.stringify(pkgJson, null, 2));
|
|
8746
|
+
fs9.renameSync(tmpPath, cachePackageJsonPath);
|
|
8747
|
+
return { synced: true, error: null, message: `Updated: "${currentVersion}" \u2192 "${intentVersion}"` };
|
|
8748
|
+
} catch (err) {
|
|
8749
|
+
log("[auto-update-checker] Failed to write cache package.json:", err);
|
|
8750
|
+
safeUnlink(tmpPath);
|
|
8751
|
+
return { synced: false, error: "write_error", message: "Failed to write cache package.json" };
|
|
8752
|
+
}
|
|
8753
|
+
}
|
|
8754
|
+
var EXACT_SEMVER_REGEX2;
|
|
8755
|
+
var init_sync_package_json = __esm(() => {
|
|
8756
|
+
init_constants3();
|
|
8757
|
+
init_logger();
|
|
8758
|
+
EXACT_SEMVER_REGEX2 = /^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/;
|
|
8759
|
+
});
|
|
8760
|
+
|
|
8624
8761
|
// src/hooks/auto-update-checker/checker.ts
|
|
8625
8762
|
var init_checker = __esm(() => {
|
|
8626
8763
|
init_local_dev_path();
|
|
@@ -8630,18 +8767,16 @@ var init_checker = __esm(() => {
|
|
|
8630
8767
|
init_pinned_version_updater();
|
|
8631
8768
|
init_latest_version();
|
|
8632
8769
|
init_check_for_update();
|
|
8770
|
+
init_sync_package_json();
|
|
8633
8771
|
});
|
|
8634
8772
|
|
|
8635
8773
|
// src/hooks/auto-update-checker/cache.ts
|
|
8636
8774
|
import * as fs10 from "fs";
|
|
8637
|
-
import * as
|
|
8775
|
+
import * as path9 from "path";
|
|
8638
8776
|
function stripTrailingCommas(json3) {
|
|
8639
8777
|
return json3.replace(/,(\s*[}\]])/g, "$1");
|
|
8640
8778
|
}
|
|
8641
|
-
function
|
|
8642
|
-
const lockPath = path8.join(USER_CONFIG_DIR, "bun.lock");
|
|
8643
|
-
if (!fs10.existsSync(lockPath))
|
|
8644
|
-
return false;
|
|
8779
|
+
function removeFromTextBunLock(lockPath, packageName) {
|
|
8645
8780
|
try {
|
|
8646
8781
|
const content = fs10.readFileSync(lockPath, "utf-8");
|
|
8647
8782
|
const lock = JSON.parse(stripTrailingCommas(content));
|
|
@@ -8663,17 +8798,46 @@ function removeFromBunLock(packageName) {
|
|
|
8663
8798
|
return false;
|
|
8664
8799
|
}
|
|
8665
8800
|
}
|
|
8666
|
-
function
|
|
8801
|
+
function deleteBinaryBunLock(lockPath) {
|
|
8802
|
+
try {
|
|
8803
|
+
fs10.unlinkSync(lockPath);
|
|
8804
|
+
log(`[auto-update-checker] Removed bun.lockb to force re-resolution`);
|
|
8805
|
+
return true;
|
|
8806
|
+
} catch {
|
|
8807
|
+
return false;
|
|
8808
|
+
}
|
|
8809
|
+
}
|
|
8810
|
+
function removeFromBunLock(packageName) {
|
|
8811
|
+
const cacheTextLockPath = path9.join(CACHE_DIR, "bun.lock");
|
|
8812
|
+
const cacheBinaryLockPath = path9.join(CACHE_DIR, "bun.lockb");
|
|
8813
|
+
const userTextLockPath = path9.join(USER_CONFIG_DIR, "bun.lock");
|
|
8814
|
+
if (fs10.existsSync(cacheTextLockPath)) {
|
|
8815
|
+
return removeFromTextBunLock(cacheTextLockPath, packageName);
|
|
8816
|
+
}
|
|
8817
|
+
if (fs10.existsSync(cacheBinaryLockPath)) {
|
|
8818
|
+
return deleteBinaryBunLock(cacheBinaryLockPath);
|
|
8819
|
+
}
|
|
8820
|
+
if (fs10.existsSync(userTextLockPath)) {
|
|
8821
|
+
return removeFromTextBunLock(userTextLockPath, packageName);
|
|
8822
|
+
}
|
|
8823
|
+
return false;
|
|
8824
|
+
}
|
|
8825
|
+
function invalidatePackage(packageName = PACKAGE_NAME2) {
|
|
8667
8826
|
try {
|
|
8668
|
-
const
|
|
8669
|
-
|
|
8827
|
+
const pkgDirs = [
|
|
8828
|
+
path9.join(USER_CONFIG_DIR, "node_modules", packageName),
|
|
8829
|
+
path9.join(CACHE_DIR, "node_modules", packageName)
|
|
8830
|
+
];
|
|
8831
|
+
const pkgJsonPath = path9.join(USER_CONFIG_DIR, "package.json");
|
|
8670
8832
|
let packageRemoved = false;
|
|
8671
8833
|
let dependencyRemoved = false;
|
|
8672
8834
|
let lockRemoved = false;
|
|
8673
|
-
|
|
8674
|
-
fs10.
|
|
8675
|
-
|
|
8676
|
-
|
|
8835
|
+
for (const pkgDir of pkgDirs) {
|
|
8836
|
+
if (fs10.existsSync(pkgDir)) {
|
|
8837
|
+
fs10.rmSync(pkgDir, { recursive: true, force: true });
|
|
8838
|
+
log(`[auto-update-checker] Package removed: ${pkgDir}`);
|
|
8839
|
+
packageRemoved = true;
|
|
8840
|
+
}
|
|
8677
8841
|
}
|
|
8678
8842
|
if (fs10.existsSync(pkgJsonPath)) {
|
|
8679
8843
|
const content = fs10.readFileSync(pkgJsonPath, "utf-8");
|
|
@@ -8709,7 +8873,7 @@ var init_cache = __esm(() => {
|
|
|
8709
8873
|
async function showUpdateAvailableToast(ctx, latestVersion, getToastMessage) {
|
|
8710
8874
|
await ctx.client.tui.showToast({
|
|
8711
8875
|
body: {
|
|
8712
|
-
title: `
|
|
8876
|
+
title: `OpenAgent Labforge ${latestVersion}`,
|
|
8713
8877
|
message: getToastMessage(true, latestVersion),
|
|
8714
8878
|
variant: "info",
|
|
8715
8879
|
duration: 8000
|
|
@@ -8720,7 +8884,7 @@ async function showUpdateAvailableToast(ctx, latestVersion, getToastMessage) {
|
|
|
8720
8884
|
async function showAutoUpdatedToast(ctx, oldVersion, newVersion) {
|
|
8721
8885
|
await ctx.client.tui.showToast({
|
|
8722
8886
|
body: {
|
|
8723
|
-
title: "
|
|
8887
|
+
title: "OpenAgent Labforge Updated!",
|
|
8724
8888
|
message: `v${oldVersion} \u2192 v${newVersion}
|
|
8725
8889
|
Restart OpenCode to apply.`,
|
|
8726
8890
|
variant: "success",
|
|
@@ -8739,7 +8903,11 @@ function getPinnedVersionToastMessage(latestVersion) {
|
|
|
8739
8903
|
}
|
|
8740
8904
|
async function runBunInstallSafe() {
|
|
8741
8905
|
try {
|
|
8742
|
-
|
|
8906
|
+
const result = await runBunInstallWithDetails({ outputMode: "pipe" });
|
|
8907
|
+
if (!result.success && result.error) {
|
|
8908
|
+
log("[auto-update-checker] bun install error:", result.error);
|
|
8909
|
+
}
|
|
8910
|
+
return result.success;
|
|
8743
8911
|
} catch (err) {
|
|
8744
8912
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
8745
8913
|
log("[auto-update-checker] bun install error:", errorMessage);
|
|
@@ -8779,17 +8947,19 @@ async function runBackgroundUpdateCheck(ctx, autoUpdate, getToastMessage) {
|
|
|
8779
8947
|
log(`[auto-update-checker] User-pinned version detected (${pluginInfo.entry}), skipping auto-update. Notification only.`);
|
|
8780
8948
|
return;
|
|
8781
8949
|
}
|
|
8782
|
-
|
|
8950
|
+
const syncResult = syncCachePackageJsonToIntent(pluginInfo);
|
|
8951
|
+
if (syncResult.error) {
|
|
8952
|
+
log(`[auto-update-checker] Sync failed with error: ${syncResult.error}`, syncResult.message);
|
|
8953
|
+
await showUpdateAvailableToast(ctx, latestVersion, getToastMessage);
|
|
8954
|
+
return;
|
|
8955
|
+
}
|
|
8956
|
+
invalidatePackage(PACKAGE_NAME2);
|
|
8783
8957
|
const installSuccess = await runBunInstallSafe();
|
|
8784
8958
|
if (installSuccess) {
|
|
8785
8959
|
await showAutoUpdatedToast(ctx, currentVersion, latestVersion);
|
|
8786
8960
|
log(`[auto-update-checker] Update installed: ${currentVersion} \u2192 ${latestVersion}`);
|
|
8787
8961
|
return;
|
|
8788
8962
|
}
|
|
8789
|
-
if (pluginInfo.isPinned) {
|
|
8790
|
-
revertPinnedVersion(pluginInfo.configPath, latestVersion, pluginInfo.entry);
|
|
8791
|
-
log("[auto-update-checker] Config reverted due to install failure");
|
|
8792
|
-
}
|
|
8793
8963
|
await showUpdateAvailableToast(ctx, latestVersion, getToastMessage);
|
|
8794
8964
|
log("[auto-update-checker] bun install failed; update not installed (falling back to notification-only)");
|
|
8795
8965
|
}
|
|
@@ -8899,7 +9069,7 @@ async function showSpinnerToast(ctx, version2, message) {
|
|
|
8899
9069
|
const spinner = SISYPHUS_SPINNER[i2 % SISYPHUS_SPINNER.length];
|
|
8900
9070
|
await ctx.client.tui.showToast({
|
|
8901
9071
|
body: {
|
|
8902
|
-
title: `${spinner}
|
|
9072
|
+
title: `${spinner} OpenAgent Labforge ${version2}`,
|
|
8903
9073
|
message,
|
|
8904
9074
|
variant: "info",
|
|
8905
9075
|
duration: frameInterval + 50
|
|
@@ -9025,7 +9195,7 @@ var {
|
|
|
9025
9195
|
// package.json
|
|
9026
9196
|
var package_default = {
|
|
9027
9197
|
name: "@bohuyeshan/openagent-labforge-core",
|
|
9028
|
-
version: "3.11.
|
|
9198
|
+
version: "3.11.3",
|
|
9029
9199
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
9030
9200
|
main: "dist/index.js",
|
|
9031
9201
|
types: "dist/index.d.ts",
|
|
@@ -9073,20 +9243,20 @@ var package_default = {
|
|
|
9073
9243
|
license: "SUL-1.0",
|
|
9074
9244
|
repository: {
|
|
9075
9245
|
type: "git",
|
|
9076
|
-
url: "git+https://github.com/code-yeongyu/
|
|
9246
|
+
url: "git+https://github.com/code-yeongyu/openagent-labforge.git"
|
|
9077
9247
|
},
|
|
9078
9248
|
bugs: {
|
|
9079
|
-
url: "https://github.com/code-yeongyu/
|
|
9249
|
+
url: "https://github.com/code-yeongyu/openagent-labforge/issues"
|
|
9080
9250
|
},
|
|
9081
|
-
homepage: "https://github.com/code-yeongyu/
|
|
9251
|
+
homepage: "https://github.com/code-yeongyu/openagent-labforge#readme",
|
|
9082
9252
|
dependencies: {
|
|
9083
|
-
"@ast-grep/cli": "^0.
|
|
9084
|
-
"@ast-grep/napi": "^0.
|
|
9253
|
+
"@ast-grep/cli": "^0.41.1",
|
|
9254
|
+
"@ast-grep/napi": "^0.41.1",
|
|
9085
9255
|
"@clack/prompts": "^0.11.0",
|
|
9086
9256
|
"@code-yeongyu/comment-checker": "^0.7.0",
|
|
9087
9257
|
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
9088
|
-
"@opencode-ai/plugin": "^1.2.
|
|
9089
|
-
"@opencode-ai/sdk": "^1.2.
|
|
9258
|
+
"@opencode-ai/plugin": "^1.2.24",
|
|
9259
|
+
"@opencode-ai/sdk": "^1.2.24",
|
|
9090
9260
|
commander: "^14.0.2",
|
|
9091
9261
|
"detect-libc": "^2.0.0",
|
|
9092
9262
|
diff: "^8.0.3",
|
|
@@ -9100,24 +9270,24 @@ var package_default = {
|
|
|
9100
9270
|
devDependencies: {
|
|
9101
9271
|
"@types/js-yaml": "^4.0.9",
|
|
9102
9272
|
"@types/picomatch": "^3.0.2",
|
|
9103
|
-
"bun-types": "1.3.
|
|
9273
|
+
"bun-types": "1.3.10",
|
|
9104
9274
|
typescript: "^5.7.3"
|
|
9105
9275
|
},
|
|
9106
9276
|
optionalDependencies: {
|
|
9107
|
-
"openagent-labforge-darwin-arm64": "3.11.
|
|
9108
|
-
"openagent-labforge-darwin-x64": "3.11.
|
|
9109
|
-
"openagent-labforge-darwin-x64-baseline": "3.11.
|
|
9110
|
-
"openagent-labforge-linux-arm64": "3.11.
|
|
9111
|
-
"openagent-labforge-linux-arm64-musl": "3.11.
|
|
9112
|
-
"openagent-labforge-linux-x64": "3.11.
|
|
9113
|
-
"openagent-labforge-linux-x64-baseline": "3.11.
|
|
9114
|
-
"openagent-labforge-linux-x64-musl": "3.11.
|
|
9115
|
-
"openagent-labforge-linux-x64-musl-baseline": "3.11.
|
|
9116
|
-
"openagent-labforge-windows-x64": "3.11.
|
|
9117
|
-
"openagent-labforge-windows-x64-baseline": "3.11.
|
|
9277
|
+
"openagent-labforge-darwin-arm64": "3.11.2",
|
|
9278
|
+
"openagent-labforge-darwin-x64": "3.11.2",
|
|
9279
|
+
"openagent-labforge-darwin-x64-baseline": "3.11.2",
|
|
9280
|
+
"openagent-labforge-linux-arm64": "3.11.2",
|
|
9281
|
+
"openagent-labforge-linux-arm64-musl": "3.11.2",
|
|
9282
|
+
"openagent-labforge-linux-x64": "3.11.2",
|
|
9283
|
+
"openagent-labforge-linux-x64-baseline": "3.11.2",
|
|
9284
|
+
"openagent-labforge-linux-x64-musl": "3.11.2",
|
|
9285
|
+
"openagent-labforge-linux-x64-musl-baseline": "3.11.2",
|
|
9286
|
+
"openagent-labforge-windows-x64": "3.11.2",
|
|
9287
|
+
"openagent-labforge-windows-x64-baseline": "3.11.2"
|
|
9118
9288
|
},
|
|
9119
9289
|
overrides: {
|
|
9120
|
-
"@opencode-ai/sdk": "^1.2.
|
|
9290
|
+
"@opencode-ai/sdk": "^1.2.24"
|
|
9121
9291
|
},
|
|
9122
9292
|
trustedDependencies: [
|
|
9123
9293
|
"@ast-grep/cli",
|
|
@@ -9250,7 +9420,8 @@ function argsToConfig(args) {
|
|
|
9250
9420
|
hasCopilot: args.copilot === "yes",
|
|
9251
9421
|
hasOpencodeZen: args.opencodeZen === "yes",
|
|
9252
9422
|
hasZaiCodingPlan: args.zaiCodingPlan === "yes",
|
|
9253
|
-
hasKimiForCoding: args.kimiForCoding === "yes"
|
|
9423
|
+
hasKimiForCoding: args.kimiForCoding === "yes",
|
|
9424
|
+
hasOpencodeGo: args.opencodeGo === "yes"
|
|
9254
9425
|
};
|
|
9255
9426
|
}
|
|
9256
9427
|
function detectedToInitialValues(detected) {
|
|
@@ -9265,7 +9436,8 @@ function detectedToInitialValues(detected) {
|
|
|
9265
9436
|
copilot: detected.hasCopilot ? "yes" : "no",
|
|
9266
9437
|
opencodeZen: detected.hasOpencodeZen ? "yes" : "no",
|
|
9267
9438
|
zaiCodingPlan: detected.hasZaiCodingPlan ? "yes" : "no",
|
|
9268
|
-
kimiForCoding: detected.hasKimiForCoding ? "yes" : "no"
|
|
9439
|
+
kimiForCoding: detected.hasKimiForCoding ? "yes" : "no",
|
|
9440
|
+
opencodeGo: detected.hasOpencodeGo ? "yes" : "no"
|
|
9269
9441
|
};
|
|
9270
9442
|
}
|
|
9271
9443
|
|
|
@@ -9279,7 +9451,7 @@ async function runCliInstaller(args, version) {
|
|
|
9279
9451
|
console.log(` ${SYMBOLS.bullet} ${err}`);
|
|
9280
9452
|
}
|
|
9281
9453
|
console.log();
|
|
9282
|
-
printInfo("Usage: bunx
|
|
9454
|
+
printInfo("Usage: bunx openagent-labforge install --no-tui --claude=<no|yes|max20> --gemini=<no|yes> --copilot=<no|yes>");
|
|
9283
9455
|
console.log();
|
|
9284
9456
|
return 1;
|
|
9285
9457
|
}
|
|
@@ -9302,14 +9474,14 @@ async function runCliInstaller(args, version) {
|
|
|
9302
9474
|
printInfo(`Current config: Claude=${initial.claude}, Gemini=${initial.gemini}`);
|
|
9303
9475
|
}
|
|
9304
9476
|
const config = argsToConfig(args);
|
|
9305
|
-
printStep(step++, totalSteps, "Adding
|
|
9477
|
+
printStep(step++, totalSteps, "Adding openagent-labforge plugin...");
|
|
9306
9478
|
const pluginResult = await addPluginToOpenCodeConfig(version);
|
|
9307
9479
|
if (!pluginResult.success) {
|
|
9308
9480
|
printError(`Failed: ${pluginResult.error}`);
|
|
9309
9481
|
return 1;
|
|
9310
9482
|
}
|
|
9311
9483
|
printSuccess(`Plugin ${isUpdate ? "verified" : "added"} ${SYMBOLS.arrow} ${import_picocolors2.default.dim(pluginResult.configPath)}`);
|
|
9312
|
-
printStep(step++, totalSteps, "Writing
|
|
9484
|
+
printStep(step++, totalSteps, "Writing openagent-labforge configuration...");
|
|
9313
9485
|
const omoResult = writeOmoConfig(config);
|
|
9314
9486
|
if (!omoResult.success) {
|
|
9315
9487
|
printError(`Failed: ${omoResult.error}`);
|
|
@@ -9340,7 +9512,7 @@ async function runCliInstaller(args, version) {
|
|
|
9340
9512
|
` + `All features work like magic\u2014parallel agents, background tasks,
|
|
9341
9513
|
` + `deep exploration, and relentless execution until completion.`, "The Magic Word");
|
|
9342
9514
|
console.log(`${SYMBOLS.star} ${import_picocolors2.default.yellow("If you found this helpful, consider starring the repo!")}`);
|
|
9343
|
-
console.log(` ${import_picocolors2.default.dim("gh api --silent --method PUT /user/starred/code-yeongyu/
|
|
9515
|
+
console.log(` ${import_picocolors2.default.dim("gh api --silent --method PUT /user/starred/code-yeongyu/openagent-labforge >/dev/null 2>&1 || true")}`);
|
|
9344
9516
|
console.log();
|
|
9345
9517
|
console.log(import_picocolors2.default.dim("oMoMoMoMo... Enjoy!"));
|
|
9346
9518
|
console.log();
|
|
@@ -10025,6 +10197,16 @@ async function promptInstallConfig(detected) {
|
|
|
10025
10197
|
});
|
|
10026
10198
|
if (!kimiForCoding)
|
|
10027
10199
|
return null;
|
|
10200
|
+
const opencodeGo = await selectOrCancel({
|
|
10201
|
+
message: "Do you have an OpenCode Go subscription?",
|
|
10202
|
+
options: [
|
|
10203
|
+
{ value: "no", label: "No", hint: "Will use other configured providers" },
|
|
10204
|
+
{ value: "yes", label: "Yes", hint: "OpenCode Go for quick tasks" }
|
|
10205
|
+
],
|
|
10206
|
+
initialValue: initial.opencodeGo
|
|
10207
|
+
});
|
|
10208
|
+
if (!opencodeGo)
|
|
10209
|
+
return null;
|
|
10028
10210
|
return {
|
|
10029
10211
|
hasClaude: claude !== "no",
|
|
10030
10212
|
isMax20: claude === "max20",
|
|
@@ -10033,7 +10215,8 @@ async function promptInstallConfig(detected) {
|
|
|
10033
10215
|
hasCopilot: copilot === "yes",
|
|
10034
10216
|
hasOpencodeZen: opencodeZen === "yes",
|
|
10035
10217
|
hasZaiCodingPlan: zaiCodingPlan === "yes",
|
|
10036
|
-
hasKimiForCoding: kimiForCoding === "yes"
|
|
10218
|
+
hasKimiForCoding: kimiForCoding === "yes",
|
|
10219
|
+
hasOpencodeGo: opencodeGo === "yes"
|
|
10037
10220
|
};
|
|
10038
10221
|
}
|
|
10039
10222
|
|
|
@@ -10064,7 +10247,7 @@ async function runTuiInstaller(args, version) {
|
|
|
10064
10247
|
const config = await promptInstallConfig(detected);
|
|
10065
10248
|
if (!config)
|
|
10066
10249
|
return 1;
|
|
10067
|
-
spinner.start("Adding
|
|
10250
|
+
spinner.start("Adding openagent-labforge to OpenCode config");
|
|
10068
10251
|
const pluginResult = await addPluginToOpenCodeConfig(version);
|
|
10069
10252
|
if (!pluginResult.success) {
|
|
10070
10253
|
spinner.stop(`Failed to add plugin: ${pluginResult.error}`);
|
|
@@ -10072,7 +10255,7 @@ async function runTuiInstaller(args, version) {
|
|
|
10072
10255
|
return 1;
|
|
10073
10256
|
}
|
|
10074
10257
|
spinner.stop(`Plugin added to ${import_picocolors4.default.cyan(pluginResult.configPath)}`);
|
|
10075
|
-
spinner.start("Writing
|
|
10258
|
+
spinner.start("Writing openagent-labforge configuration");
|
|
10076
10259
|
const omoResult = writeOmoConfig(config);
|
|
10077
10260
|
if (!omoResult.success) {
|
|
10078
10261
|
spinner.stop(`Failed to write config: ${omoResult.error}`);
|
|
@@ -10103,7 +10286,7 @@ async function runTuiInstaller(args, version) {
|
|
|
10103
10286
|
` + `All features work like magic\u2014parallel agents, background tasks,
|
|
10104
10287
|
` + `deep exploration, and relentless execution until completion.`, "The Magic Word");
|
|
10105
10288
|
M2.message(`${import_picocolors4.default.yellow("\u2605")} If you found this helpful, consider starring the repo!`);
|
|
10106
|
-
M2.message(` ${import_picocolors4.default.dim("gh api --silent --method PUT /user/starred/code-yeongyu/
|
|
10289
|
+
M2.message(` ${import_picocolors4.default.dim("gh api --silent --method PUT /user/starred/code-yeongyu/openagent-labforge >/dev/null 2>&1 || true")}`);
|
|
10107
10290
|
Se(import_picocolors4.default.green("oMoMoMoMo... Enjoy!"));
|
|
10108
10291
|
if ((config.hasClaude || config.hasGemini || config.hasCopilot) && !args.skipAuth) {
|
|
10109
10292
|
const providers = [];
|
|
@@ -10132,7 +10315,7 @@ async function install(args) {
|
|
|
10132
10315
|
}
|
|
10133
10316
|
|
|
10134
10317
|
// src/cli/run/runner.ts
|
|
10135
|
-
var
|
|
10318
|
+
var import_picocolors14 = __toESM(require_picocolors(), 1);
|
|
10136
10319
|
|
|
10137
10320
|
// src/cli/run/event-state.ts
|
|
10138
10321
|
function createEventState() {
|
|
@@ -24377,7 +24560,8 @@ var BuiltinAgentNameSchema = exports_external.enum([
|
|
|
24377
24560
|
"paper-evidence-synthesizer",
|
|
24378
24561
|
"metis",
|
|
24379
24562
|
"momus",
|
|
24380
|
-
"atlas"
|
|
24563
|
+
"atlas",
|
|
24564
|
+
"sisyphus-junior"
|
|
24381
24565
|
]);
|
|
24382
24566
|
var BuiltinSkillNameSchema = exports_external.enum([
|
|
24383
24567
|
"playwright",
|
|
@@ -24490,6 +24674,8 @@ var BackgroundTaskConfigSchema = exports_external.object({
|
|
|
24490
24674
|
defaultConcurrency: exports_external.number().min(1).optional(),
|
|
24491
24675
|
providerConcurrency: exports_external.record(exports_external.string(), exports_external.number().min(0)).optional(),
|
|
24492
24676
|
modelConcurrency: exports_external.record(exports_external.string(), exports_external.number().min(0)).optional(),
|
|
24677
|
+
maxDepth: exports_external.number().int().min(1).optional(),
|
|
24678
|
+
maxDescendants: exports_external.number().int().min(1).optional(),
|
|
24493
24679
|
staleTimeoutMs: exports_external.number().min(60000).optional(),
|
|
24494
24680
|
messageStalenessTimeoutMs: exports_external.number().min(60000).optional(),
|
|
24495
24681
|
syncPollTimeoutMs: exports_external.number().min(60000).optional()
|
|
@@ -24606,13 +24792,25 @@ var ExperimentalConfigSchema = exports_external.object({
|
|
|
24606
24792
|
model_fallback_title: exports_external.boolean().optional(),
|
|
24607
24793
|
strict_user_model_priority: exports_external.boolean().optional()
|
|
24608
24794
|
});
|
|
24795
|
+
// src/config/schema/git-env-prefix.ts
|
|
24796
|
+
var GIT_ENV_ASSIGNMENT_PATTERN = /^(?:[A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_-]*)(?: [A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_-]*)*$/;
|
|
24797
|
+
var GIT_ENV_PREFIX_VALIDATION_MESSAGE = 'git_env_prefix must be empty or use shell-safe env assignments like "GIT_MASTER=1"';
|
|
24798
|
+
function isValidGitEnvPrefix(value) {
|
|
24799
|
+
if (value === "") {
|
|
24800
|
+
return true;
|
|
24801
|
+
}
|
|
24802
|
+
return GIT_ENV_ASSIGNMENT_PATTERN.test(value);
|
|
24803
|
+
}
|
|
24804
|
+
var GitEnvPrefixSchema = exports_external.string().refine(isValidGitEnvPrefix, { message: GIT_ENV_PREFIX_VALIDATION_MESSAGE }).default("GIT_MASTER=1");
|
|
24609
24805
|
// src/config/schema/git-master.ts
|
|
24610
24806
|
var GitMasterConfigSchema = exports_external.object({
|
|
24611
24807
|
commit_footer: exports_external.union([exports_external.boolean(), exports_external.string()]).default(true),
|
|
24612
|
-
include_co_authored_by: exports_external.boolean().default(true)
|
|
24808
|
+
include_co_authored_by: exports_external.boolean().default(true),
|
|
24809
|
+
git_env_prefix: GitEnvPrefixSchema
|
|
24613
24810
|
});
|
|
24614
24811
|
// src/config/schema/hooks.ts
|
|
24615
24812
|
var HookNameSchema = exports_external.enum([
|
|
24813
|
+
"gpt-permission-continuation",
|
|
24616
24814
|
"todo-continuation-enforcer",
|
|
24617
24815
|
"context-window-monitor",
|
|
24618
24816
|
"session-recovery",
|
|
@@ -24659,7 +24857,8 @@ var HookNameSchema = exports_external.enum([
|
|
|
24659
24857
|
"write-existing-file-guard",
|
|
24660
24858
|
"anthropic-effort",
|
|
24661
24859
|
"hashline-read-enhancer",
|
|
24662
|
-
"read-image-resizer"
|
|
24860
|
+
"read-image-resizer",
|
|
24861
|
+
"delegate-task-english-directive"
|
|
24663
24862
|
]);
|
|
24664
24863
|
// src/config/schema/i18n.ts
|
|
24665
24864
|
var I18nConfigSchema = exports_external.object({
|
|
@@ -24823,7 +25022,7 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
24823
25022
|
disabled_mcps: exports_external.array(AnyMcpNameSchema).optional(),
|
|
24824
25023
|
disabled_agents: exports_external.array(exports_external.string()).optional(),
|
|
24825
25024
|
disabled_skills: exports_external.array(BuiltinSkillNameSchema).optional(),
|
|
24826
|
-
disabled_hooks: exports_external.array(
|
|
25025
|
+
disabled_hooks: exports_external.array(HookNameSchema).optional(),
|
|
24827
25026
|
disabled_commands: exports_external.array(BuiltinCommandNameSchema).optional(),
|
|
24828
25027
|
disabled_tools: exports_external.array(exports_external.string()).optional(),
|
|
24829
25028
|
hashline_edit: exports_external.boolean().optional(),
|
|
@@ -24852,6 +25051,14 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
24852
25051
|
});
|
|
24853
25052
|
// src/plugin-config.ts
|
|
24854
25053
|
init_shared();
|
|
25054
|
+
var PARTIAL_STRING_ARRAY_KEYS = new Set([
|
|
25055
|
+
"disabled_mcps",
|
|
25056
|
+
"disabled_agents",
|
|
25057
|
+
"disabled_skills",
|
|
25058
|
+
"disabled_hooks",
|
|
25059
|
+
"disabled_commands",
|
|
25060
|
+
"disabled_tools"
|
|
25061
|
+
]);
|
|
24855
25062
|
function parseConfigPartially(rawConfig) {
|
|
24856
25063
|
const fullResult = OhMyOpenCodeConfigSchema.safeParse(rawConfig);
|
|
24857
25064
|
if (fullResult.success) {
|
|
@@ -24860,6 +25067,13 @@ function parseConfigPartially(rawConfig) {
|
|
|
24860
25067
|
const partialConfig = {};
|
|
24861
25068
|
const invalidSections = [];
|
|
24862
25069
|
for (const key of Object.keys(rawConfig)) {
|
|
25070
|
+
if (PARTIAL_STRING_ARRAY_KEYS.has(key)) {
|
|
25071
|
+
const sectionValue = rawConfig[key];
|
|
25072
|
+
if (Array.isArray(sectionValue) && sectionValue.every((value) => typeof value === "string")) {
|
|
25073
|
+
partialConfig[key] = sectionValue;
|
|
25074
|
+
}
|
|
25075
|
+
continue;
|
|
25076
|
+
}
|
|
24863
25077
|
const sectionResult = OhMyOpenCodeConfigSchema.safeParse({ [key]: rawConfig[key] });
|
|
24864
25078
|
if (sectionResult.success) {
|
|
24865
25079
|
const parsed = sectionResult.data;
|
|
@@ -24951,12 +25165,12 @@ function mergeConfigs(base, override) {
|
|
|
24951
25165
|
function loadPluginConfig(directory, ctx) {
|
|
24952
25166
|
const configDir = getOpenCodeConfigDir({ binary: "opencode" });
|
|
24953
25167
|
const userBasePath = path3.join(configDir, "openagent-labforge");
|
|
24954
|
-
const legacyUserBasePath = path3.join(configDir, "
|
|
25168
|
+
const legacyUserBasePath = path3.join(configDir, "openagent-labforge");
|
|
24955
25169
|
const userDetected = detectConfigFile(userBasePath);
|
|
24956
25170
|
const legacyUserDetected = detectConfigFile(legacyUserBasePath);
|
|
24957
25171
|
const userConfigPath = userDetected.format !== "none" ? userDetected.path : legacyUserDetected.format !== "none" ? legacyUserDetected.path : userBasePath + ".json";
|
|
24958
25172
|
const projectBasePath = path3.join(directory, ".opencode", "openagent-labforge");
|
|
24959
|
-
const legacyProjectBasePath = path3.join(directory, ".opencode", "
|
|
25173
|
+
const legacyProjectBasePath = path3.join(directory, ".opencode", "openagent-labforge");
|
|
24960
25174
|
const projectDetected = detectConfigFile(projectBasePath);
|
|
24961
25175
|
const legacyProjectDetected = detectConfigFile(legacyProjectBasePath);
|
|
24962
25176
|
const projectConfigPath = projectDetected.format !== "none" ? projectDetected.path : legacyProjectDetected.format !== "none" ? legacyProjectDetected.path : projectBasePath + ".json";
|
|
@@ -26599,7 +26813,7 @@ async function resolveSession(options) {
|
|
|
26599
26813
|
for (let attempt = 1;attempt <= SESSION_CREATE_MAX_RETRIES; attempt++) {
|
|
26600
26814
|
const res = await client3.session.create({
|
|
26601
26815
|
body: {
|
|
26602
|
-
title: "
|
|
26816
|
+
title: "openagent-labforge run",
|
|
26603
26817
|
permission: [
|
|
26604
26818
|
{ permission: "question", action: "deny", pattern: "*" }
|
|
26605
26819
|
]
|
|
@@ -26662,14 +26876,28 @@ function createJsonOutputManager(options = {}) {
|
|
|
26662
26876
|
|
|
26663
26877
|
// src/cli/run/on-complete-hook.ts
|
|
26664
26878
|
init_spawn_with_windows_hide();
|
|
26665
|
-
|
|
26879
|
+
init_shared();
|
|
26880
|
+
async function readOutput(stream, streamName) {
|
|
26881
|
+
if (!stream) {
|
|
26882
|
+
return "";
|
|
26883
|
+
}
|
|
26884
|
+
try {
|
|
26885
|
+
return await new Response(stream).text();
|
|
26886
|
+
} catch (error48) {
|
|
26887
|
+
log("Failed to read on-complete hook output", {
|
|
26888
|
+
stream: streamName,
|
|
26889
|
+
error: error48 instanceof Error ? error48.message : String(error48)
|
|
26890
|
+
});
|
|
26891
|
+
return "";
|
|
26892
|
+
}
|
|
26893
|
+
}
|
|
26666
26894
|
async function executeOnCompleteHook(options) {
|
|
26667
26895
|
const { command, sessionId, exitCode, durationMs, messageCount } = options;
|
|
26668
26896
|
const trimmedCommand = command.trim();
|
|
26669
26897
|
if (!trimmedCommand) {
|
|
26670
26898
|
return;
|
|
26671
26899
|
}
|
|
26672
|
-
|
|
26900
|
+
log("Running on-complete hook", { command: trimmedCommand });
|
|
26673
26901
|
try {
|
|
26674
26902
|
const proc = spawnWithWindowsHide(["sh", "-c", trimmedCommand], {
|
|
26675
26903
|
env: {
|
|
@@ -26679,21 +26907,37 @@ async function executeOnCompleteHook(options) {
|
|
|
26679
26907
|
DURATION_MS: String(durationMs),
|
|
26680
26908
|
MESSAGE_COUNT: String(messageCount)
|
|
26681
26909
|
},
|
|
26682
|
-
stdout: "
|
|
26683
|
-
stderr: "
|
|
26910
|
+
stdout: "pipe",
|
|
26911
|
+
stderr: "pipe"
|
|
26684
26912
|
});
|
|
26685
|
-
const hookExitCode = await
|
|
26913
|
+
const [hookExitCode, stdout, stderr] = await Promise.all([
|
|
26914
|
+
proc.exited,
|
|
26915
|
+
readOutput(proc.stdout, "stdout"),
|
|
26916
|
+
readOutput(proc.stderr, "stderr")
|
|
26917
|
+
]);
|
|
26918
|
+
if (stdout.trim()) {
|
|
26919
|
+
log("On-complete hook stdout", { command: trimmedCommand, stdout: stdout.trim() });
|
|
26920
|
+
}
|
|
26921
|
+
if (stderr.trim()) {
|
|
26922
|
+
log("On-complete hook stderr", { command: trimmedCommand, stderr: stderr.trim() });
|
|
26923
|
+
}
|
|
26686
26924
|
if (hookExitCode !== 0) {
|
|
26687
|
-
|
|
26925
|
+
log("On-complete hook exited with non-zero code", {
|
|
26926
|
+
command: trimmedCommand,
|
|
26927
|
+
exitCode: hookExitCode
|
|
26928
|
+
});
|
|
26688
26929
|
}
|
|
26689
26930
|
} catch (error48) {
|
|
26690
|
-
|
|
26931
|
+
log("Failed to execute on-complete hook", {
|
|
26932
|
+
command: trimmedCommand,
|
|
26933
|
+
error: error48 instanceof Error ? error48.message : String(error48)
|
|
26934
|
+
});
|
|
26691
26935
|
}
|
|
26692
26936
|
}
|
|
26693
26937
|
|
|
26694
26938
|
// src/cli/run/agent-resolver.ts
|
|
26695
26939
|
init_agent_display_names();
|
|
26696
|
-
var
|
|
26940
|
+
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
26697
26941
|
var CORE_AGENT_ORDER = ["sisyphus", "hephaestus", "prometheus", "atlas"];
|
|
26698
26942
|
var DEFAULT_AGENT = "sisyphus";
|
|
26699
26943
|
var normalizeAgentName = (agent) => {
|
|
@@ -26738,21 +26982,45 @@ var resolveRunAgent = (options, pluginConfig, env = process.env) => {
|
|
|
26738
26982
|
const fallbackName = getAgentDisplayName(fallback);
|
|
26739
26983
|
const fallbackDisabled = isAgentDisabled(fallback, pluginConfig);
|
|
26740
26984
|
if (fallbackDisabled) {
|
|
26741
|
-
console.log(
|
|
26985
|
+
console.log(import_picocolors11.default.yellow(`Requested agent "${resolved.resolvedName}" is disabled and no enabled core agent was found. Proceeding with "${fallbackName}".`));
|
|
26742
26986
|
return fallbackName;
|
|
26743
26987
|
}
|
|
26744
|
-
console.log(
|
|
26988
|
+
console.log(import_picocolors11.default.yellow(`Requested agent "${resolved.resolvedName}" is disabled. Falling back to "${fallbackName}".`));
|
|
26745
26989
|
return fallbackName;
|
|
26746
26990
|
}
|
|
26747
26991
|
return resolved.resolvedName;
|
|
26748
26992
|
};
|
|
26749
26993
|
|
|
26994
|
+
// src/cli/run/model-resolver.ts
|
|
26995
|
+
function resolveRunModel(modelString) {
|
|
26996
|
+
if (modelString === undefined) {
|
|
26997
|
+
return;
|
|
26998
|
+
}
|
|
26999
|
+
const trimmed = modelString.trim();
|
|
27000
|
+
if (trimmed.length === 0) {
|
|
27001
|
+
throw new Error("Model string cannot be empty");
|
|
27002
|
+
}
|
|
27003
|
+
const parts = trimmed.split("/");
|
|
27004
|
+
if (parts.length < 2) {
|
|
27005
|
+
throw new Error("Model string must be in 'provider/model' format");
|
|
27006
|
+
}
|
|
27007
|
+
const providerID = parts[0];
|
|
27008
|
+
if (providerID.length === 0) {
|
|
27009
|
+
throw new Error("Provider cannot be empty");
|
|
27010
|
+
}
|
|
27011
|
+
const modelID = parts.slice(1).join("/");
|
|
27012
|
+
if (modelID.length === 0) {
|
|
27013
|
+
throw new Error("Model ID cannot be empty");
|
|
27014
|
+
}
|
|
27015
|
+
return { providerID, modelID };
|
|
27016
|
+
}
|
|
27017
|
+
|
|
26750
27018
|
// src/cli/run/poll-for-completion.ts
|
|
26751
|
-
var
|
|
27019
|
+
var import_picocolors13 = __toESM(require_picocolors(), 1);
|
|
26752
27020
|
|
|
26753
27021
|
// src/cli/run/completion.ts
|
|
26754
27022
|
init_shared();
|
|
26755
|
-
var
|
|
27023
|
+
var import_picocolors12 = __toESM(require_picocolors(), 1);
|
|
26756
27024
|
// src/features/boulder-state/constants.ts
|
|
26757
27025
|
var BOULDER_DIR = ".sisyphus";
|
|
26758
27026
|
var BOULDER_FILE = "boulder.json";
|
|
@@ -26760,14 +27028,14 @@ var BOULDER_STATE_PATH = `${BOULDER_DIR}/${BOULDER_FILE}`;
|
|
|
26760
27028
|
var NOTEPAD_DIR = "notepads";
|
|
26761
27029
|
var NOTEPAD_BASE_PATH = `${BOULDER_DIR}/${NOTEPAD_DIR}`;
|
|
26762
27030
|
// src/features/boulder-state/storage.ts
|
|
26763
|
-
import { existsSync as
|
|
27031
|
+
import { existsSync as existsSync11, readFileSync as readFileSync9, writeFileSync as writeFileSync5, mkdirSync as mkdirSync3, readdirSync } from "fs";
|
|
26764
27032
|
import { dirname as dirname2, join as join9, basename } from "path";
|
|
26765
27033
|
function getBoulderFilePath(directory) {
|
|
26766
27034
|
return join9(directory, BOULDER_DIR, BOULDER_FILE);
|
|
26767
27035
|
}
|
|
26768
27036
|
function readBoulderState(directory) {
|
|
26769
27037
|
const filePath = getBoulderFilePath(directory);
|
|
26770
|
-
if (!
|
|
27038
|
+
if (!existsSync11(filePath)) {
|
|
26771
27039
|
return null;
|
|
26772
27040
|
}
|
|
26773
27041
|
try {
|
|
@@ -26785,7 +27053,7 @@ function readBoulderState(directory) {
|
|
|
26785
27053
|
}
|
|
26786
27054
|
}
|
|
26787
27055
|
function getPlanProgress(planPath) {
|
|
26788
|
-
if (!
|
|
27056
|
+
if (!existsSync11(planPath)) {
|
|
26789
27057
|
return { total: 0, completed: 0, isComplete: true };
|
|
26790
27058
|
}
|
|
26791
27059
|
try {
|
|
@@ -26806,14 +27074,14 @@ function getPlanProgress(planPath) {
|
|
|
26806
27074
|
// src/features/run-continuation-state/constants.ts
|
|
26807
27075
|
var CONTINUATION_MARKER_DIR = ".sisyphus/run-continuation";
|
|
26808
27076
|
// src/features/run-continuation-state/storage.ts
|
|
26809
|
-
import { existsSync as
|
|
27077
|
+
import { existsSync as existsSync12, mkdirSync as mkdirSync4, readFileSync as readFileSync10, rmSync, writeFileSync as writeFileSync6 } from "fs";
|
|
26810
27078
|
import { join as join10 } from "path";
|
|
26811
27079
|
function getMarkerPath(directory, sessionID) {
|
|
26812
27080
|
return join10(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
|
|
26813
27081
|
}
|
|
26814
27082
|
function readContinuationMarker(directory, sessionID) {
|
|
26815
27083
|
const markerPath = getMarkerPath(directory, sessionID);
|
|
26816
|
-
if (!
|
|
27084
|
+
if (!existsSync12(markerPath))
|
|
26817
27085
|
return null;
|
|
26818
27086
|
try {
|
|
26819
27087
|
const raw = readFileSync10(markerPath, "utf-8");
|
|
@@ -26841,7 +27109,7 @@ function getActiveContinuationMarkerReason(marker) {
|
|
|
26841
27109
|
}
|
|
26842
27110
|
// src/hooks/ralph-loop/storage.ts
|
|
26843
27111
|
init_frontmatter();
|
|
26844
|
-
import { existsSync as
|
|
27112
|
+
import { existsSync as existsSync13, readFileSync as readFileSync11, writeFileSync as writeFileSync7, unlinkSync, mkdirSync as mkdirSync5 } from "fs";
|
|
26845
27113
|
import { dirname as dirname3, join as join11 } from "path";
|
|
26846
27114
|
|
|
26847
27115
|
// src/hooks/ralph-loop/constants.ts
|
|
@@ -26855,7 +27123,7 @@ function getStateFilePath(directory, customPath) {
|
|
|
26855
27123
|
}
|
|
26856
27124
|
function readState(directory, customPath) {
|
|
26857
27125
|
const filePath = getStateFilePath(directory, customPath);
|
|
26858
|
-
if (!
|
|
27126
|
+
if (!existsSync13(filePath)) {
|
|
26859
27127
|
return null;
|
|
26860
27128
|
}
|
|
26861
27129
|
try {
|
|
@@ -26949,7 +27217,7 @@ async function checkCompletionConditions(ctx) {
|
|
|
26949
27217
|
}
|
|
26950
27218
|
return true;
|
|
26951
27219
|
} catch (err) {
|
|
26952
|
-
console.error(
|
|
27220
|
+
console.error(import_picocolors12.default.red(`[completion] API error: ${err}`));
|
|
26953
27221
|
return false;
|
|
26954
27222
|
}
|
|
26955
27223
|
}
|
|
@@ -27010,7 +27278,7 @@ function logWaiting(ctx, message) {
|
|
|
27010
27278
|
if (!ctx.verbose) {
|
|
27011
27279
|
return;
|
|
27012
27280
|
}
|
|
27013
|
-
console.log(
|
|
27281
|
+
console.log(import_picocolors12.default.dim(` Waiting: ${message}`));
|
|
27014
27282
|
}
|
|
27015
27283
|
|
|
27016
27284
|
// src/cli/run/poll-for-completion.ts
|
|
@@ -27041,10 +27309,10 @@ async function pollForCompletion(ctx, eventState, abortController, options = {})
|
|
|
27041
27309
|
if (eventState.mainSessionError) {
|
|
27042
27310
|
errorCycleCount++;
|
|
27043
27311
|
if (errorCycleCount >= ERROR_GRACE_CYCLES) {
|
|
27044
|
-
console.error(
|
|
27312
|
+
console.error(import_picocolors13.default.red(`
|
|
27045
27313
|
|
|
27046
27314
|
Session ended with error: ${eventState.lastError}`));
|
|
27047
|
-
console.error(
|
|
27315
|
+
console.error(import_picocolors13.default.yellow("Check if todos were completed before the error."));
|
|
27048
27316
|
return 1;
|
|
27049
27317
|
}
|
|
27050
27318
|
continue;
|
|
@@ -27055,7 +27323,7 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
27055
27323
|
if (eventState.lastEventTimestamp !== null) {
|
|
27056
27324
|
const timeSinceLastEvent = Date.now() - eventState.lastEventTimestamp;
|
|
27057
27325
|
if (timeSinceLastEvent > eventWatchdogMs) {
|
|
27058
|
-
console.log(
|
|
27326
|
+
console.log(import_picocolors13.default.yellow(`
|
|
27059
27327
|
No events for ${Math.round(timeSinceLastEvent / 1000)}s, verifying session status...`));
|
|
27060
27328
|
mainSessionStatus = await getMainSessionStatus(ctx);
|
|
27061
27329
|
if (mainSessionStatus === "idle") {
|
|
@@ -27104,7 +27372,7 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
27104
27372
|
const hasActiveWork = hasActiveChildren || hasActiveTodos;
|
|
27105
27373
|
if (hasActiveWork) {
|
|
27106
27374
|
eventState.hasReceivedMeaningfulWork = true;
|
|
27107
|
-
console.log(
|
|
27375
|
+
console.log(import_picocolors13.default.yellow(`
|
|
27108
27376
|
No meaningful work events for ${Math.round(secondaryMeaningfulWorkTimeoutMs / 1000)}s but session has active work - assuming in progress`));
|
|
27109
27377
|
}
|
|
27110
27378
|
}
|
|
@@ -27124,7 +27392,7 @@ Session ended with error: ${eventState.lastError}`));
|
|
|
27124
27392
|
}
|
|
27125
27393
|
consecutiveCompleteChecks++;
|
|
27126
27394
|
if (consecutiveCompleteChecks >= requiredConsecutive) {
|
|
27127
|
-
console.log(
|
|
27395
|
+
console.log(import_picocolors13.default.green(`
|
|
27128
27396
|
|
|
27129
27397
|
All tasks completed.`));
|
|
27130
27398
|
return 0;
|
|
@@ -27279,6 +27547,7 @@ async function run(options) {
|
|
|
27279
27547
|
timestampOutput?.enable();
|
|
27280
27548
|
const pluginConfig = loadPluginConfig(directory, { command: "run" });
|
|
27281
27549
|
const resolvedAgent = resolveRunAgent(options, pluginConfig);
|
|
27550
|
+
const resolvedModel = resolveRunModel(options.model);
|
|
27282
27551
|
const abortController = new AbortController;
|
|
27283
27552
|
try {
|
|
27284
27553
|
const { client: client3, cleanup: serverCleanup } = await createServerConnection({
|
|
@@ -27291,7 +27560,7 @@ async function run(options) {
|
|
|
27291
27560
|
};
|
|
27292
27561
|
const restoreInput = suppressRunInput();
|
|
27293
27562
|
const handleSigint = () => {
|
|
27294
|
-
console.log(
|
|
27563
|
+
console.log(import_picocolors14.default.yellow(`
|
|
27295
27564
|
Interrupted. Shutting down...`));
|
|
27296
27565
|
restoreInput();
|
|
27297
27566
|
cleanup();
|
|
@@ -27304,7 +27573,10 @@ Interrupted. Shutting down...`));
|
|
|
27304
27573
|
sessionId: options.sessionId,
|
|
27305
27574
|
directory
|
|
27306
27575
|
});
|
|
27307
|
-
console.log(
|
|
27576
|
+
console.log(import_picocolors14.default.dim(`Session: ${sessionID}`));
|
|
27577
|
+
if (resolvedModel) {
|
|
27578
|
+
console.log(import_picocolors14.default.dim(`Model: ${resolvedModel.providerID}/${resolvedModel.modelID}`));
|
|
27579
|
+
}
|
|
27308
27580
|
const ctx = {
|
|
27309
27581
|
client: client3,
|
|
27310
27582
|
sessionID,
|
|
@@ -27320,6 +27592,7 @@ Interrupted. Shutting down...`));
|
|
|
27320
27592
|
path: { id: sessionID },
|
|
27321
27593
|
body: {
|
|
27322
27594
|
agent: resolvedAgent,
|
|
27595
|
+
...resolvedModel ? { model: resolvedModel } : {},
|
|
27323
27596
|
tools: {
|
|
27324
27597
|
question: false
|
|
27325
27598
|
},
|
|
@@ -27365,7 +27638,7 @@ Interrupted. Shutting down...`));
|
|
|
27365
27638
|
if (err instanceof Error && err.name === "AbortError") {
|
|
27366
27639
|
return 130;
|
|
27367
27640
|
}
|
|
27368
|
-
console.error(
|
|
27641
|
+
console.error(import_picocolors14.default.red(`Error: ${serializeError(err)}`));
|
|
27369
27642
|
return 1;
|
|
27370
27643
|
} finally {
|
|
27371
27644
|
timestampOutput?.restore();
|
|
@@ -27375,53 +27648,53 @@ Interrupted. Shutting down...`));
|
|
|
27375
27648
|
init_checker();
|
|
27376
27649
|
|
|
27377
27650
|
// src/cli/get-local-version/formatter.ts
|
|
27378
|
-
var
|
|
27651
|
+
var import_picocolors15 = __toESM(require_picocolors(), 1);
|
|
27379
27652
|
var SYMBOLS2 = {
|
|
27380
|
-
check:
|
|
27381
|
-
cross:
|
|
27382
|
-
arrow:
|
|
27383
|
-
info:
|
|
27384
|
-
warn:
|
|
27385
|
-
pin:
|
|
27386
|
-
dev:
|
|
27653
|
+
check: import_picocolors15.default.green("[OK]"),
|
|
27654
|
+
cross: import_picocolors15.default.red("[X]"),
|
|
27655
|
+
arrow: import_picocolors15.default.cyan("->"),
|
|
27656
|
+
info: import_picocolors15.default.blue("[i]"),
|
|
27657
|
+
warn: import_picocolors15.default.yellow("[!]"),
|
|
27658
|
+
pin: import_picocolors15.default.magenta("[PINNED]"),
|
|
27659
|
+
dev: import_picocolors15.default.cyan("[DEV]")
|
|
27387
27660
|
};
|
|
27388
27661
|
function formatVersionOutput(info) {
|
|
27389
27662
|
const lines = [];
|
|
27390
27663
|
lines.push("");
|
|
27391
|
-
lines.push(
|
|
27392
|
-
lines.push(
|
|
27664
|
+
lines.push(import_picocolors15.default.bold(import_picocolors15.default.white("openagent-labforge Version Information")));
|
|
27665
|
+
lines.push(import_picocolors15.default.dim("\u2500".repeat(50)));
|
|
27393
27666
|
lines.push("");
|
|
27394
27667
|
if (info.currentVersion) {
|
|
27395
|
-
lines.push(` Current Version: ${
|
|
27668
|
+
lines.push(` Current Version: ${import_picocolors15.default.cyan(info.currentVersion)}`);
|
|
27396
27669
|
} else {
|
|
27397
|
-
lines.push(` Current Version: ${
|
|
27670
|
+
lines.push(` Current Version: ${import_picocolors15.default.dim("unknown")}`);
|
|
27398
27671
|
}
|
|
27399
27672
|
if (!info.isLocalDev && info.latestVersion) {
|
|
27400
|
-
lines.push(` Latest Version: ${
|
|
27673
|
+
lines.push(` Latest Version: ${import_picocolors15.default.cyan(info.latestVersion)}`);
|
|
27401
27674
|
}
|
|
27402
27675
|
lines.push("");
|
|
27403
27676
|
switch (info.status) {
|
|
27404
27677
|
case "up-to-date":
|
|
27405
|
-
lines.push(` ${SYMBOLS2.check} ${
|
|
27678
|
+
lines.push(` ${SYMBOLS2.check} ${import_picocolors15.default.green("You're up to date!")}`);
|
|
27406
27679
|
break;
|
|
27407
27680
|
case "outdated":
|
|
27408
|
-
lines.push(` ${SYMBOLS2.warn} ${
|
|
27409
|
-
lines.push(` ${
|
|
27681
|
+
lines.push(` ${SYMBOLS2.warn} ${import_picocolors15.default.yellow("Update available")}`);
|
|
27682
|
+
lines.push(` ${import_picocolors15.default.dim("Run:")} ${import_picocolors15.default.cyan("cd ~/.config/opencode && bun update openagent-labforge")}`);
|
|
27410
27683
|
break;
|
|
27411
27684
|
case "local-dev":
|
|
27412
|
-
lines.push(` ${SYMBOLS2.dev} ${
|
|
27413
|
-
lines.push(` ${
|
|
27685
|
+
lines.push(` ${SYMBOLS2.dev} ${import_picocolors15.default.cyan("Running in local development mode")}`);
|
|
27686
|
+
lines.push(` ${import_picocolors15.default.dim("Using file:// protocol from config")}`);
|
|
27414
27687
|
break;
|
|
27415
27688
|
case "pinned":
|
|
27416
|
-
lines.push(` ${SYMBOLS2.pin} ${
|
|
27417
|
-
lines.push(` ${
|
|
27689
|
+
lines.push(` ${SYMBOLS2.pin} ${import_picocolors15.default.magenta(`Version pinned to ${info.pinnedVersion}`)}`);
|
|
27690
|
+
lines.push(` ${import_picocolors15.default.dim("Update check skipped for pinned versions")}`);
|
|
27418
27691
|
break;
|
|
27419
27692
|
case "error":
|
|
27420
|
-
lines.push(` ${SYMBOLS2.cross} ${
|
|
27421
|
-
lines.push(` ${
|
|
27693
|
+
lines.push(` ${SYMBOLS2.cross} ${import_picocolors15.default.red("Unable to check for updates")}`);
|
|
27694
|
+
lines.push(` ${import_picocolors15.default.dim("Network error or npm registry unavailable")}`);
|
|
27422
27695
|
break;
|
|
27423
27696
|
case "unknown":
|
|
27424
|
-
lines.push(` ${SYMBOLS2.info} ${
|
|
27697
|
+
lines.push(` ${SYMBOLS2.info} ${import_picocolors15.default.yellow("Version information unavailable")}`);
|
|
27425
27698
|
break;
|
|
27426
27699
|
}
|
|
27427
27700
|
lines.push("");
|
|
@@ -27521,21 +27794,21 @@ async function getLocalVersion(options = {}) {
|
|
|
27521
27794
|
}
|
|
27522
27795
|
}
|
|
27523
27796
|
// src/cli/doctor/constants.ts
|
|
27524
|
-
var
|
|
27797
|
+
var import_picocolors16 = __toESM(require_picocolors(), 1);
|
|
27525
27798
|
var SYMBOLS3 = {
|
|
27526
|
-
check:
|
|
27527
|
-
cross:
|
|
27528
|
-
warn:
|
|
27529
|
-
info:
|
|
27530
|
-
arrow:
|
|
27531
|
-
bullet:
|
|
27532
|
-
skip:
|
|
27799
|
+
check: import_picocolors16.default.green("\u2713"),
|
|
27800
|
+
cross: import_picocolors16.default.red("\u2717"),
|
|
27801
|
+
warn: import_picocolors16.default.yellow("\u26A0"),
|
|
27802
|
+
info: import_picocolors16.default.blue("\u2139"),
|
|
27803
|
+
arrow: import_picocolors16.default.cyan("\u2192"),
|
|
27804
|
+
bullet: import_picocolors16.default.dim("\u2022"),
|
|
27805
|
+
skip: import_picocolors16.default.dim("\u25CB")
|
|
27533
27806
|
};
|
|
27534
27807
|
var STATUS_COLORS = {
|
|
27535
|
-
pass:
|
|
27536
|
-
fail:
|
|
27537
|
-
warn:
|
|
27538
|
-
skip:
|
|
27808
|
+
pass: import_picocolors16.default.green,
|
|
27809
|
+
fail: import_picocolors16.default.red,
|
|
27810
|
+
warn: import_picocolors16.default.yellow,
|
|
27811
|
+
skip: import_picocolors16.default.dim
|
|
27539
27812
|
};
|
|
27540
27813
|
var CHECK_IDS = {
|
|
27541
27814
|
SYSTEM: "system",
|
|
@@ -27554,34 +27827,34 @@ var EXIT_CODES = {
|
|
|
27554
27827
|
FAILURE: 1
|
|
27555
27828
|
};
|
|
27556
27829
|
var MIN_OPENCODE_VERSION = "1.0.150";
|
|
27557
|
-
var
|
|
27830
|
+
var PACKAGE_NAME3 = "@bohuyeshan/openagent-labforge-core";
|
|
27558
27831
|
var OPENCODE_BINARIES2 = ["opencode", "opencode-desktop"];
|
|
27559
27832
|
|
|
27560
27833
|
// src/cli/doctor/checks/system.ts
|
|
27561
|
-
import { existsSync as
|
|
27834
|
+
import { existsSync as existsSync23, readFileSync as readFileSync21 } from "fs";
|
|
27562
27835
|
|
|
27563
27836
|
// src/cli/doctor/checks/system-binary.ts
|
|
27564
27837
|
init_spawn_with_windows_hide();
|
|
27565
|
-
import { existsSync as
|
|
27838
|
+
import { existsSync as existsSync20 } from "fs";
|
|
27566
27839
|
import { homedir as homedir5 } from "os";
|
|
27567
|
-
import { join as
|
|
27840
|
+
import { join as join17 } from "path";
|
|
27568
27841
|
function getDesktopAppPaths(platform) {
|
|
27569
27842
|
const home = homedir5();
|
|
27570
27843
|
switch (platform) {
|
|
27571
27844
|
case "darwin":
|
|
27572
27845
|
return [
|
|
27573
27846
|
"/Applications/OpenCode.app/Contents/MacOS/OpenCode",
|
|
27574
|
-
|
|
27847
|
+
join17(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
|
|
27575
27848
|
];
|
|
27576
27849
|
case "win32": {
|
|
27577
27850
|
const programFiles = process.env.ProgramFiles;
|
|
27578
27851
|
const localAppData = process.env.LOCALAPPDATA;
|
|
27579
27852
|
const paths = [];
|
|
27580
27853
|
if (programFiles) {
|
|
27581
|
-
paths.push(
|
|
27854
|
+
paths.push(join17(programFiles, "OpenCode", "OpenCode.exe"));
|
|
27582
27855
|
}
|
|
27583
27856
|
if (localAppData) {
|
|
27584
|
-
paths.push(
|
|
27857
|
+
paths.push(join17(localAppData, "OpenCode", "OpenCode.exe"));
|
|
27585
27858
|
}
|
|
27586
27859
|
return paths;
|
|
27587
27860
|
}
|
|
@@ -27589,8 +27862,8 @@ function getDesktopAppPaths(platform) {
|
|
|
27589
27862
|
return [
|
|
27590
27863
|
"/usr/bin/opencode",
|
|
27591
27864
|
"/usr/lib/opencode/opencode",
|
|
27592
|
-
|
|
27593
|
-
|
|
27865
|
+
join17(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
|
|
27866
|
+
join17(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
|
|
27594
27867
|
];
|
|
27595
27868
|
default:
|
|
27596
27869
|
return [];
|
|
@@ -27602,7 +27875,7 @@ function buildVersionCommand(binaryPath, platform) {
|
|
|
27602
27875
|
}
|
|
27603
27876
|
return [binaryPath, "--version"];
|
|
27604
27877
|
}
|
|
27605
|
-
function findDesktopBinary(platform = process.platform, checkExists =
|
|
27878
|
+
function findDesktopBinary(platform = process.platform, checkExists = existsSync20) {
|
|
27606
27879
|
for (const desktopPath of getDesktopAppPaths(platform)) {
|
|
27607
27880
|
if (checkExists(desktopPath)) {
|
|
27608
27881
|
return { binary: "opencode", path: desktopPath };
|
|
@@ -27612,9 +27885,9 @@ function findDesktopBinary(platform = process.platform, checkExists = existsSync
|
|
|
27612
27885
|
}
|
|
27613
27886
|
async function findOpenCodeBinary() {
|
|
27614
27887
|
for (const binary2 of OPENCODE_BINARIES2) {
|
|
27615
|
-
const
|
|
27616
|
-
if (
|
|
27617
|
-
return { binary: binary2, path:
|
|
27888
|
+
const path10 = Bun.which(binary2);
|
|
27889
|
+
if (path10) {
|
|
27890
|
+
return { binary: binary2, path: path10 };
|
|
27618
27891
|
}
|
|
27619
27892
|
}
|
|
27620
27893
|
return findDesktopBinary();
|
|
@@ -27649,34 +27922,34 @@ function compareVersions(current, minimum) {
|
|
|
27649
27922
|
}
|
|
27650
27923
|
|
|
27651
27924
|
// src/cli/doctor/checks/system-plugin.ts
|
|
27652
|
-
import { existsSync as
|
|
27925
|
+
import { existsSync as existsSync21, readFileSync as readFileSync19 } from "fs";
|
|
27653
27926
|
init_shared();
|
|
27654
27927
|
function detectConfigPath() {
|
|
27655
27928
|
const paths = getOpenCodeConfigPaths({ binary: "opencode", version: null });
|
|
27656
|
-
if (
|
|
27929
|
+
if (existsSync21(paths.configJsonc))
|
|
27657
27930
|
return paths.configJsonc;
|
|
27658
|
-
if (
|
|
27931
|
+
if (existsSync21(paths.configJson))
|
|
27659
27932
|
return paths.configJson;
|
|
27660
27933
|
return null;
|
|
27661
27934
|
}
|
|
27662
27935
|
function parsePluginVersion(entry) {
|
|
27663
|
-
if (!entry.startsWith(`${
|
|
27936
|
+
if (!entry.startsWith(`${PACKAGE_NAME3}@`))
|
|
27664
27937
|
return null;
|
|
27665
|
-
const value = entry.slice(
|
|
27938
|
+
const value = entry.slice(PACKAGE_NAME3.length + 1);
|
|
27666
27939
|
if (!value || value === "latest")
|
|
27667
27940
|
return null;
|
|
27668
27941
|
return value;
|
|
27669
27942
|
}
|
|
27670
27943
|
function findPluginEntry2(entries) {
|
|
27671
|
-
const legacyName = "
|
|
27944
|
+
const legacyName = "openagent-labforge";
|
|
27672
27945
|
for (const entry of entries) {
|
|
27673
|
-
if (entry ===
|
|
27946
|
+
if (entry === PACKAGE_NAME3 || entry.startsWith(`${PACKAGE_NAME3}@`)) {
|
|
27674
27947
|
return { entry, isLocalDev: false };
|
|
27675
27948
|
}
|
|
27676
27949
|
if (entry === legacyName || entry.startsWith(`${legacyName}@`)) {
|
|
27677
27950
|
return { entry, isLocalDev: false };
|
|
27678
27951
|
}
|
|
27679
|
-
if (entry.startsWith("file://") && entry.includes(
|
|
27952
|
+
if (entry.startsWith("file://") && entry.includes(PACKAGE_NAME3)) {
|
|
27680
27953
|
return { entry, isLocalDev: true };
|
|
27681
27954
|
}
|
|
27682
27955
|
if (entry.startsWith("file://") && entry.includes(legacyName)) {
|
|
@@ -27735,29 +28008,29 @@ function getPluginInfo() {
|
|
|
27735
28008
|
// src/cli/doctor/checks/system-loaded-version.ts
|
|
27736
28009
|
init_checker();
|
|
27737
28010
|
init_auto_update_checker();
|
|
27738
|
-
import { existsSync as
|
|
28011
|
+
import { existsSync as existsSync22, readFileSync as readFileSync20 } from "fs";
|
|
27739
28012
|
import { homedir as homedir6 } from "os";
|
|
27740
|
-
import { join as
|
|
28013
|
+
import { join as join18 } from "path";
|
|
27741
28014
|
init_shared();
|
|
27742
28015
|
function getPlatformDefaultCacheDir(platform = process.platform) {
|
|
27743
28016
|
if (platform === "darwin")
|
|
27744
|
-
return
|
|
28017
|
+
return join18(homedir6(), "Library", "Caches");
|
|
27745
28018
|
if (platform === "win32")
|
|
27746
|
-
return process.env.LOCALAPPDATA ??
|
|
27747
|
-
return
|
|
28019
|
+
return process.env.LOCALAPPDATA ?? join18(homedir6(), "AppData", "Local");
|
|
28020
|
+
return join18(homedir6(), ".cache");
|
|
27748
28021
|
}
|
|
27749
28022
|
function resolveOpenCodeCacheDir() {
|
|
27750
28023
|
const xdgCacheHome = process.env.XDG_CACHE_HOME;
|
|
27751
28024
|
if (xdgCacheHome)
|
|
27752
|
-
return
|
|
28025
|
+
return join18(xdgCacheHome, "opencode");
|
|
27753
28026
|
const fromShared = getOpenCodeCacheDir();
|
|
27754
|
-
const platformDefault =
|
|
27755
|
-
if (
|
|
28027
|
+
const platformDefault = join18(getPlatformDefaultCacheDir(), "opencode");
|
|
28028
|
+
if (existsSync22(fromShared) || !existsSync22(platformDefault))
|
|
27756
28029
|
return fromShared;
|
|
27757
28030
|
return platformDefault;
|
|
27758
28031
|
}
|
|
27759
28032
|
function readPackageJson(filePath) {
|
|
27760
|
-
if (!
|
|
28033
|
+
if (!existsSync22(filePath))
|
|
27761
28034
|
return null;
|
|
27762
28035
|
try {
|
|
27763
28036
|
const content = readFileSync20(filePath, "utf-8");
|
|
@@ -27773,15 +28046,28 @@ function normalizeVersion(value) {
|
|
|
27773
28046
|
return match?.[0] ?? null;
|
|
27774
28047
|
}
|
|
27775
28048
|
function getLoadedPluginVersion() {
|
|
28049
|
+
const configPaths = getOpenCodeConfigPaths({ binary: "opencode" });
|
|
27776
28050
|
const cacheDir = resolveOpenCodeCacheDir();
|
|
27777
|
-
const
|
|
27778
|
-
|
|
28051
|
+
const candidates = [
|
|
28052
|
+
{
|
|
28053
|
+
cacheDir: configPaths.configDir,
|
|
28054
|
+
cachePackagePath: configPaths.packageJson,
|
|
28055
|
+
installedPackagePath: join18(configPaths.configDir, "node_modules", PACKAGE_NAME3, "package.json")
|
|
28056
|
+
},
|
|
28057
|
+
{
|
|
28058
|
+
cacheDir,
|
|
28059
|
+
cachePackagePath: join18(cacheDir, "package.json"),
|
|
28060
|
+
installedPackagePath: join18(cacheDir, "node_modules", PACKAGE_NAME3, "package.json")
|
|
28061
|
+
}
|
|
28062
|
+
];
|
|
28063
|
+
const selectedCandidate = candidates.find((candidate) => existsSync22(candidate.installedPackagePath)) ?? candidates[0];
|
|
28064
|
+
const { cacheDir: selectedDir, cachePackagePath, installedPackagePath } = selectedCandidate;
|
|
27779
28065
|
const cachePackage = readPackageJson(cachePackagePath);
|
|
27780
28066
|
const installedPackage = readPackageJson(installedPackagePath);
|
|
27781
|
-
const expectedVersion = normalizeVersion(cachePackage?.dependencies?.[
|
|
28067
|
+
const expectedVersion = normalizeVersion(cachePackage?.dependencies?.[PACKAGE_NAME3]);
|
|
27782
28068
|
const loadedVersion = normalizeVersion(installedPackage?.version);
|
|
27783
28069
|
return {
|
|
27784
|
-
cacheDir,
|
|
28070
|
+
cacheDir: selectedDir,
|
|
27785
28071
|
cachePackagePath,
|
|
27786
28072
|
installedPackagePath,
|
|
27787
28073
|
expectedVersion,
|
|
@@ -27801,7 +28087,7 @@ init_shared();
|
|
|
27801
28087
|
function isConfigValid(configPath) {
|
|
27802
28088
|
if (!configPath)
|
|
27803
28089
|
return true;
|
|
27804
|
-
if (!
|
|
28090
|
+
if (!existsSync23(configPath))
|
|
27805
28091
|
return false;
|
|
27806
28092
|
try {
|
|
27807
28093
|
parseJsonc(readFileSync21(configPath, "utf-8"));
|
|
@@ -27866,9 +28152,9 @@ async function checkSystem() {
|
|
|
27866
28152
|
}
|
|
27867
28153
|
if (!pluginInfo.registered) {
|
|
27868
28154
|
issues.push({
|
|
27869
|
-
title: "
|
|
28155
|
+
title: "openagent-labforge is not registered",
|
|
27870
28156
|
description: "Plugin entry is missing from OpenCode configuration.",
|
|
27871
|
-
fix: "Run: bunx
|
|
28157
|
+
fix: "Run: bunx openagent-labforge install",
|
|
27872
28158
|
severity: "error",
|
|
27873
28159
|
affects: ["all agents"]
|
|
27874
28160
|
});
|
|
@@ -27886,7 +28172,7 @@ async function checkSystem() {
|
|
|
27886
28172
|
issues.push({
|
|
27887
28173
|
title: "Loaded plugin is outdated",
|
|
27888
28174
|
description: `Loaded ${systemInfo.loadedVersion}, latest ${latestVersion}.`,
|
|
27889
|
-
fix: `Update: cd "${loadedInfo.cacheDir}" && bun add
|
|
28175
|
+
fix: `Update: cd "${loadedInfo.cacheDir}" && bun add openagent-labforge@${installTag}`,
|
|
27890
28176
|
severity: "warning",
|
|
27891
28177
|
affects: ["plugin features"]
|
|
27892
28178
|
});
|
|
@@ -27908,23 +28194,23 @@ async function checkSystem() {
|
|
|
27908
28194
|
|
|
27909
28195
|
// src/cli/doctor/checks/config.ts
|
|
27910
28196
|
import { readFileSync as readFileSync24 } from "fs";
|
|
27911
|
-
import { join as
|
|
28197
|
+
import { join as join22 } from "path";
|
|
27912
28198
|
init_shared();
|
|
27913
28199
|
|
|
27914
28200
|
// src/cli/doctor/checks/model-resolution-cache.ts
|
|
27915
28201
|
init_shared();
|
|
27916
|
-
import { existsSync as
|
|
28202
|
+
import { existsSync as existsSync24, readFileSync as readFileSync22 } from "fs";
|
|
27917
28203
|
import { homedir as homedir7 } from "os";
|
|
27918
|
-
import { join as
|
|
28204
|
+
import { join as join19 } from "path";
|
|
27919
28205
|
function getOpenCodeCacheDir2() {
|
|
27920
28206
|
const xdgCache = process.env.XDG_CACHE_HOME;
|
|
27921
28207
|
if (xdgCache)
|
|
27922
|
-
return
|
|
27923
|
-
return
|
|
28208
|
+
return join19(xdgCache, "opencode");
|
|
28209
|
+
return join19(homedir7(), ".cache", "opencode");
|
|
27924
28210
|
}
|
|
27925
28211
|
function loadAvailableModelsFromCache() {
|
|
27926
|
-
const cacheFile =
|
|
27927
|
-
if (!
|
|
28212
|
+
const cacheFile = join19(getOpenCodeCacheDir2(), "models.json");
|
|
28213
|
+
if (!existsSync24(cacheFile)) {
|
|
27928
28214
|
return { providers: [], modelCount: 0, cacheExists: false };
|
|
27929
28215
|
}
|
|
27930
28216
|
try {
|
|
@@ -27950,10 +28236,10 @@ init_model_requirements();
|
|
|
27950
28236
|
// src/cli/doctor/checks/model-resolution-config.ts
|
|
27951
28237
|
init_shared();
|
|
27952
28238
|
import { readFileSync as readFileSync23 } from "fs";
|
|
27953
|
-
import { join as
|
|
27954
|
-
var
|
|
27955
|
-
var USER_CONFIG_BASE =
|
|
27956
|
-
var PROJECT_CONFIG_BASE =
|
|
28239
|
+
import { join as join20 } from "path";
|
|
28240
|
+
var PACKAGE_NAME4 = "openagent-labforge";
|
|
28241
|
+
var USER_CONFIG_BASE = join20(getOpenCodeConfigPaths({ binary: "opencode", version: null }).configDir, PACKAGE_NAME4);
|
|
28242
|
+
var PROJECT_CONFIG_BASE = join20(process.cwd(), ".opencode", PACKAGE_NAME4);
|
|
27957
28243
|
function loadOmoConfig() {
|
|
27958
28244
|
const projectDetected = detectConfigFile(PROJECT_CONFIG_BASE);
|
|
27959
28245
|
if (projectDetected.format !== "none") {
|
|
@@ -27978,7 +28264,7 @@ function loadOmoConfig() {
|
|
|
27978
28264
|
|
|
27979
28265
|
// src/cli/doctor/checks/model-resolution-details.ts
|
|
27980
28266
|
init_shared();
|
|
27981
|
-
import { join as
|
|
28267
|
+
import { join as join21 } from "path";
|
|
27982
28268
|
|
|
27983
28269
|
// src/cli/doctor/checks/model-resolution-variant.ts
|
|
27984
28270
|
function formatModelWithVariant(model, variant) {
|
|
@@ -28017,7 +28303,7 @@ function getCategoryEffectiveVariant(categoryName, requirement, config2) {
|
|
|
28017
28303
|
// src/cli/doctor/checks/model-resolution-details.ts
|
|
28018
28304
|
function buildModelResolutionDetails(options) {
|
|
28019
28305
|
const details = [];
|
|
28020
|
-
const cacheFile =
|
|
28306
|
+
const cacheFile = join21(getOpenCodeCacheDir(), "models.json");
|
|
28021
28307
|
details.push("\u2550\u2550\u2550 Available Models (from cache) \u2550\u2550\u2550");
|
|
28022
28308
|
details.push("");
|
|
28023
28309
|
if (options.available.cacheExists) {
|
|
@@ -28129,10 +28415,10 @@ async function checkModels() {
|
|
|
28129
28415
|
}
|
|
28130
28416
|
|
|
28131
28417
|
// src/cli/doctor/checks/config.ts
|
|
28132
|
-
var USER_CONFIG_BASE2 =
|
|
28133
|
-
var USER_LEGACY_CONFIG_BASE =
|
|
28134
|
-
var PROJECT_CONFIG_BASE2 =
|
|
28135
|
-
var PROJECT_LEGACY_CONFIG_BASE =
|
|
28418
|
+
var USER_CONFIG_BASE2 = join22(getOpenCodeConfigDir({ binary: "opencode" }), "openagent-labforge");
|
|
28419
|
+
var USER_LEGACY_CONFIG_BASE = join22(getOpenCodeConfigDir({ binary: "opencode" }), "openagent-labforge");
|
|
28420
|
+
var PROJECT_CONFIG_BASE2 = join22(process.cwd(), ".opencode", "openagent-labforge");
|
|
28421
|
+
var PROJECT_LEGACY_CONFIG_BASE = join22(process.cwd(), ".opencode", "openagent-labforge");
|
|
28136
28422
|
function findConfigPath() {
|
|
28137
28423
|
const projectConfig = detectConfigFile(PROJECT_CONFIG_BASE2);
|
|
28138
28424
|
if (projectConfig.format !== "none")
|
|
@@ -28258,14 +28544,14 @@ async function checkConfig() {
|
|
|
28258
28544
|
|
|
28259
28545
|
// src/cli/doctor/checks/dependencies.ts
|
|
28260
28546
|
init_spawn_with_windows_hide();
|
|
28261
|
-
import { existsSync as
|
|
28547
|
+
import { existsSync as existsSync25 } from "fs";
|
|
28262
28548
|
import { createRequire } from "module";
|
|
28263
|
-
import { dirname as dirname6, join as
|
|
28549
|
+
import { dirname as dirname6, join as join23 } from "path";
|
|
28264
28550
|
async function checkBinaryExists(binary2) {
|
|
28265
28551
|
try {
|
|
28266
|
-
const
|
|
28267
|
-
if (
|
|
28268
|
-
return { exists: true, path:
|
|
28552
|
+
const path10 = Bun.which(binary2);
|
|
28553
|
+
if (path10) {
|
|
28554
|
+
return { exists: true, path: path10 };
|
|
28269
28555
|
}
|
|
28270
28556
|
} catch {}
|
|
28271
28557
|
return { exists: false, path: null };
|
|
@@ -28316,15 +28602,15 @@ async function checkAstGrepNapi() {
|
|
|
28316
28602
|
path: null
|
|
28317
28603
|
};
|
|
28318
28604
|
} catch {
|
|
28319
|
-
const { existsSync:
|
|
28320
|
-
const { join:
|
|
28605
|
+
const { existsSync: existsSync26 } = await import("fs");
|
|
28606
|
+
const { join: join24 } = await import("path");
|
|
28321
28607
|
const { homedir: homedir8 } = await import("os");
|
|
28322
28608
|
const pathsToCheck = [
|
|
28323
|
-
|
|
28324
|
-
|
|
28609
|
+
join24(homedir8(), ".config", "opencode", "node_modules", "@ast-grep", "napi"),
|
|
28610
|
+
join24(process.cwd(), "node_modules", "@ast-grep", "napi")
|
|
28325
28611
|
];
|
|
28326
28612
|
for (const napiPath of pathsToCheck) {
|
|
28327
|
-
if (
|
|
28613
|
+
if (existsSync26(napiPath)) {
|
|
28328
28614
|
return {
|
|
28329
28615
|
name: "AST-Grep NAPI",
|
|
28330
28616
|
required: false,
|
|
@@ -28349,8 +28635,8 @@ function findCommentCheckerPackageBinary() {
|
|
|
28349
28635
|
try {
|
|
28350
28636
|
const require2 = createRequire(import.meta.url);
|
|
28351
28637
|
const pkgPath = require2.resolve("@code-yeongyu/comment-checker/package.json");
|
|
28352
|
-
const binaryPath =
|
|
28353
|
-
if (
|
|
28638
|
+
const binaryPath = join23(dirname6(pkgPath), "bin", binaryName);
|
|
28639
|
+
if (existsSync25(binaryPath))
|
|
28354
28640
|
return binaryPath;
|
|
28355
28641
|
} catch {}
|
|
28356
28642
|
return null;
|
|
@@ -28468,15 +28754,31 @@ init_shared();
|
|
|
28468
28754
|
init_jsonc_parser();
|
|
28469
28755
|
|
|
28470
28756
|
// src/tools/lsp/server-installation.ts
|
|
28757
|
+
import { existsSync as existsSync26 } from "fs";
|
|
28758
|
+
import { delimiter as delimiter2, join as join25 } from "path";
|
|
28759
|
+
|
|
28760
|
+
// src/tools/lsp/server-path-bases.ts
|
|
28471
28761
|
init_shared();
|
|
28472
|
-
import {
|
|
28473
|
-
|
|
28762
|
+
import { join as join24 } from "path";
|
|
28763
|
+
function getLspServerAdditionalPathBases(workingDirectory) {
|
|
28764
|
+
const configDir = getOpenCodeConfigDir({ binary: "opencode" });
|
|
28765
|
+
const dataDir = join24(getDataDir(), "opencode");
|
|
28766
|
+
return [
|
|
28767
|
+
join24(workingDirectory, "node_modules", ".bin"),
|
|
28768
|
+
join24(configDir, "bin"),
|
|
28769
|
+
join24(configDir, "node_modules", ".bin"),
|
|
28770
|
+
join24(dataDir, "bin"),
|
|
28771
|
+
join24(dataDir, "bin", "node_modules", ".bin")
|
|
28772
|
+
];
|
|
28773
|
+
}
|
|
28774
|
+
|
|
28775
|
+
// src/tools/lsp/server-installation.ts
|
|
28474
28776
|
function isServerInstalled(command) {
|
|
28475
28777
|
if (command.length === 0)
|
|
28476
28778
|
return false;
|
|
28477
28779
|
const cmd = command[0];
|
|
28478
28780
|
if (cmd.includes("/") || cmd.includes("\\")) {
|
|
28479
|
-
if (
|
|
28781
|
+
if (existsSync26(cmd))
|
|
28480
28782
|
return true;
|
|
28481
28783
|
}
|
|
28482
28784
|
const isWindows = process.platform === "win32";
|
|
@@ -28494,27 +28796,17 @@ function isServerInstalled(command) {
|
|
|
28494
28796
|
if (isWindows && !pathEnv) {
|
|
28495
28797
|
pathEnv = process.env.Path || "";
|
|
28496
28798
|
}
|
|
28497
|
-
const
|
|
28498
|
-
const paths = pathEnv.split(pathSeparator);
|
|
28799
|
+
const paths = pathEnv.split(delimiter2);
|
|
28499
28800
|
for (const p2 of paths) {
|
|
28500
28801
|
for (const suffix of exts) {
|
|
28501
|
-
if (
|
|
28802
|
+
if (existsSync26(join25(p2, cmd + suffix))) {
|
|
28502
28803
|
return true;
|
|
28503
28804
|
}
|
|
28504
28805
|
}
|
|
28505
28806
|
}
|
|
28506
|
-
const
|
|
28507
|
-
const configDir = getOpenCodeConfigDir({ binary: "opencode" });
|
|
28508
|
-
const dataDir = join23(getDataDir(), "opencode");
|
|
28509
|
-
const additionalBases = [
|
|
28510
|
-
join23(cwd, "node_modules", ".bin"),
|
|
28511
|
-
join23(configDir, "bin"),
|
|
28512
|
-
join23(configDir, "node_modules", ".bin"),
|
|
28513
|
-
join23(dataDir, "bin")
|
|
28514
|
-
];
|
|
28515
|
-
for (const base of additionalBases) {
|
|
28807
|
+
for (const base of getLspServerAdditionalPathBases(process.cwd())) {
|
|
28516
28808
|
for (const suffix of exts) {
|
|
28517
|
-
if (
|
|
28809
|
+
if (existsSync26(join25(base, cmd + suffix))) {
|
|
28518
28810
|
return true;
|
|
28519
28811
|
}
|
|
28520
28812
|
}
|
|
@@ -28548,21 +28840,21 @@ function getLspServerStats(servers) {
|
|
|
28548
28840
|
|
|
28549
28841
|
// src/cli/doctor/checks/tools-mcp.ts
|
|
28550
28842
|
init_shared();
|
|
28551
|
-
import { existsSync as
|
|
28843
|
+
import { existsSync as existsSync27, readFileSync as readFileSync25 } from "fs";
|
|
28552
28844
|
import { homedir as homedir8 } from "os";
|
|
28553
|
-
import { join as
|
|
28845
|
+
import { join as join26 } from "path";
|
|
28554
28846
|
var BUILTIN_MCP_SERVERS = ["context7", "grep_app"];
|
|
28555
28847
|
function getMcpConfigPaths() {
|
|
28556
28848
|
return [
|
|
28557
|
-
|
|
28558
|
-
|
|
28559
|
-
|
|
28849
|
+
join26(homedir8(), ".claude", ".mcp.json"),
|
|
28850
|
+
join26(process.cwd(), ".mcp.json"),
|
|
28851
|
+
join26(process.cwd(), ".claude", ".mcp.json")
|
|
28560
28852
|
];
|
|
28561
28853
|
}
|
|
28562
28854
|
function loadUserMcpConfig() {
|
|
28563
28855
|
const servers = {};
|
|
28564
28856
|
for (const configPath of getMcpConfigPaths()) {
|
|
28565
|
-
if (!
|
|
28857
|
+
if (!existsSync27(configPath))
|
|
28566
28858
|
continue;
|
|
28567
28859
|
try {
|
|
28568
28860
|
const content = readFileSync25(configPath, "utf-8");
|
|
@@ -28726,10 +29018,10 @@ function getAllCheckDefinitions() {
|
|
|
28726
29018
|
}
|
|
28727
29019
|
|
|
28728
29020
|
// src/cli/doctor/format-default.ts
|
|
28729
|
-
var
|
|
29021
|
+
var import_picocolors18 = __toESM(require_picocolors(), 1);
|
|
28730
29022
|
|
|
28731
29023
|
// src/cli/doctor/format-shared.ts
|
|
28732
|
-
var
|
|
29024
|
+
var import_picocolors17 = __toESM(require_picocolors(), 1);
|
|
28733
29025
|
function formatStatusSymbol(status) {
|
|
28734
29026
|
const colorFn = STATUS_COLORS[status];
|
|
28735
29027
|
switch (status) {
|
|
@@ -28744,23 +29036,23 @@ function formatStatusSymbol(status) {
|
|
|
28744
29036
|
}
|
|
28745
29037
|
}
|
|
28746
29038
|
function formatStatusMark(available) {
|
|
28747
|
-
return available ?
|
|
29039
|
+
return available ? import_picocolors17.default.green(SYMBOLS3.check) : import_picocolors17.default.red(SYMBOLS3.cross);
|
|
28748
29040
|
}
|
|
28749
29041
|
function formatHeader() {
|
|
28750
29042
|
return `
|
|
28751
|
-
${
|
|
29043
|
+
${import_picocolors17.default.bgMagenta(import_picocolors17.default.white(" oMoMoMoMo Doctor "))}
|
|
28752
29044
|
`;
|
|
28753
29045
|
}
|
|
28754
29046
|
function formatIssue(issue2, index) {
|
|
28755
29047
|
const lines = [];
|
|
28756
|
-
const severityColor = issue2.severity === "error" ?
|
|
29048
|
+
const severityColor = issue2.severity === "error" ? import_picocolors17.default.red : import_picocolors17.default.yellow;
|
|
28757
29049
|
lines.push(`${index}. ${severityColor(issue2.title)}`);
|
|
28758
|
-
lines.push(` ${
|
|
29050
|
+
lines.push(` ${import_picocolors17.default.dim(issue2.description)}`);
|
|
28759
29051
|
if (issue2.fix) {
|
|
28760
|
-
lines.push(` ${
|
|
29052
|
+
lines.push(` ${import_picocolors17.default.cyan("Fix:")} ${import_picocolors17.default.dim(issue2.fix)}`);
|
|
28761
29053
|
}
|
|
28762
29054
|
if (issue2.affects && issue2.affects.length > 0) {
|
|
28763
|
-
lines.push(` ${
|
|
29055
|
+
lines.push(` ${import_picocolors17.default.cyan("Affects:")} ${import_picocolors17.default.dim(issue2.affects.join(", "))}`);
|
|
28764
29056
|
}
|
|
28765
29057
|
return lines.join(`
|
|
28766
29058
|
`);
|
|
@@ -28774,12 +29066,12 @@ function formatDefault(result) {
|
|
|
28774
29066
|
if (allIssues.length === 0) {
|
|
28775
29067
|
const opencodeVer = result.systemInfo.opencodeVersion ?? "unknown";
|
|
28776
29068
|
const pluginVer = result.systemInfo.pluginVersion ?? "unknown";
|
|
28777
|
-
lines.push(` ${
|
|
29069
|
+
lines.push(` ${import_picocolors18.default.green(SYMBOLS3.check)} ${import_picocolors18.default.green(`System OK (opencode ${opencodeVer} \xB7 openagent-labforge ${pluginVer})`)}`);
|
|
28778
29070
|
} else {
|
|
28779
29071
|
const issueCount = allIssues.filter((i2) => i2.severity === "error").length;
|
|
28780
29072
|
const warnCount = allIssues.filter((i2) => i2.severity === "warning").length;
|
|
28781
29073
|
const totalStr = `${issueCount + warnCount} ${issueCount + warnCount === 1 ? "issue" : "issues"}`;
|
|
28782
|
-
lines.push(` ${
|
|
29074
|
+
lines.push(` ${import_picocolors18.default.yellow(SYMBOLS3.warn)} ${totalStr} found:
|
|
28783
29075
|
`);
|
|
28784
29076
|
allIssues.forEach((issue2, index) => {
|
|
28785
29077
|
lines.push(formatIssue(issue2, index + 1));
|
|
@@ -28791,7 +29083,7 @@ function formatDefault(result) {
|
|
|
28791
29083
|
}
|
|
28792
29084
|
|
|
28793
29085
|
// src/cli/doctor/format-status.ts
|
|
28794
|
-
var
|
|
29086
|
+
var import_picocolors19 = __toESM(require_picocolors(), 1);
|
|
28795
29087
|
function formatStatus(result) {
|
|
28796
29088
|
const lines = [];
|
|
28797
29089
|
lines.push(formatHeader());
|
|
@@ -28802,7 +29094,7 @@ function formatStatus(result) {
|
|
|
28802
29094
|
const bunVer = systemInfo.bunVersion ?? "unknown";
|
|
28803
29095
|
lines.push(` ${padding}System ${opencodeVer} \xB7 ${pluginVer} \xB7 Bun ${bunVer}`);
|
|
28804
29096
|
const configPath = systemInfo.configPath ?? "unknown";
|
|
28805
|
-
const configStatus = systemInfo.configValid ?
|
|
29097
|
+
const configStatus = systemInfo.configValid ? import_picocolors19.default.green("(valid)") : import_picocolors19.default.red("(invalid)");
|
|
28806
29098
|
lines.push(` ${padding}Config ${configPath} ${configStatus}`);
|
|
28807
29099
|
const lspText = `LSP ${tools.lspInstalled}/${tools.lspTotal}`;
|
|
28808
29100
|
const astGrepMark = formatStatusMark(tools.astGrepCli);
|
|
@@ -28819,15 +29111,15 @@ function formatStatus(result) {
|
|
|
28819
29111
|
}
|
|
28820
29112
|
|
|
28821
29113
|
// src/cli/doctor/format-verbose.ts
|
|
28822
|
-
var
|
|
29114
|
+
var import_picocolors20 = __toESM(require_picocolors(), 1);
|
|
28823
29115
|
function formatVerbose(result) {
|
|
28824
29116
|
const lines = [];
|
|
28825
29117
|
lines.push(formatHeader());
|
|
28826
29118
|
const { systemInfo, tools, results, summary } = result;
|
|
28827
|
-
lines.push(`${
|
|
28828
|
-
lines.push(`${
|
|
29119
|
+
lines.push(`${import_picocolors20.default.bold("System Information")}`);
|
|
29120
|
+
lines.push(`${import_picocolors20.default.dim("\u2500".repeat(40))}`);
|
|
28829
29121
|
lines.push(` ${formatStatusSymbol("pass")} opencode ${systemInfo.opencodeVersion ?? "unknown"}`);
|
|
28830
|
-
lines.push(` ${formatStatusSymbol("pass")}
|
|
29122
|
+
lines.push(` ${formatStatusSymbol("pass")} openagent-labforge ${systemInfo.pluginVersion ?? "unknown"}`);
|
|
28831
29123
|
if (systemInfo.loadedVersion) {
|
|
28832
29124
|
lines.push(` ${formatStatusSymbol("pass")} loaded ${systemInfo.loadedVersion}`);
|
|
28833
29125
|
}
|
|
@@ -28836,33 +29128,33 @@ function formatVerbose(result) {
|
|
|
28836
29128
|
}
|
|
28837
29129
|
lines.push(` ${formatStatusSymbol("pass")} path ${systemInfo.opencodePath ?? "unknown"}`);
|
|
28838
29130
|
if (systemInfo.isLocalDev) {
|
|
28839
|
-
lines.push(` ${
|
|
29131
|
+
lines.push(` ${import_picocolors20.default.yellow("*")} ${import_picocolors20.default.dim("(local development mode)")}`);
|
|
28840
29132
|
}
|
|
28841
29133
|
lines.push("");
|
|
28842
|
-
lines.push(`${
|
|
28843
|
-
lines.push(`${
|
|
28844
|
-
const configStatus = systemInfo.configValid ?
|
|
29134
|
+
lines.push(`${import_picocolors20.default.bold("Configuration")}`);
|
|
29135
|
+
lines.push(`${import_picocolors20.default.dim("\u2500".repeat(40))}`);
|
|
29136
|
+
const configStatus = systemInfo.configValid ? import_picocolors20.default.green("valid") : import_picocolors20.default.red("invalid");
|
|
28845
29137
|
lines.push(` ${formatStatusSymbol(systemInfo.configValid ? "pass" : "fail")} ${systemInfo.configPath ?? "unknown"} (${configStatus})`);
|
|
28846
29138
|
lines.push("");
|
|
28847
|
-
lines.push(`${
|
|
28848
|
-
lines.push(`${
|
|
29139
|
+
lines.push(`${import_picocolors20.default.bold("Tools")}`);
|
|
29140
|
+
lines.push(`${import_picocolors20.default.dim("\u2500".repeat(40))}`);
|
|
28849
29141
|
lines.push(` ${formatStatusSymbol("pass")} LSP ${tools.lspInstalled}/${tools.lspTotal} installed`);
|
|
28850
29142
|
lines.push(` ${formatStatusSymbol(tools.astGrepCli ? "pass" : "fail")} ast-grep CLI ${tools.astGrepCli ? "installed" : "not found"}`);
|
|
28851
29143
|
lines.push(` ${formatStatusSymbol(tools.astGrepNapi ? "pass" : "fail")} ast-grep napi ${tools.astGrepNapi ? "installed" : "not found"}`);
|
|
28852
29144
|
lines.push(` ${formatStatusSymbol(tools.commentChecker ? "pass" : "fail")} comment-checker ${tools.commentChecker ? "installed" : "not found"}`);
|
|
28853
29145
|
lines.push(` ${formatStatusSymbol(tools.ghCli.installed && tools.ghCli.authenticated ? "pass" : "fail")} gh CLI ${tools.ghCli.installed ? "installed" : "not found"}${tools.ghCli.authenticated && tools.ghCli.username ? ` (${tools.ghCli.username})` : ""}`);
|
|
28854
29146
|
lines.push("");
|
|
28855
|
-
lines.push(`${
|
|
28856
|
-
lines.push(`${
|
|
29147
|
+
lines.push(`${import_picocolors20.default.bold("MCPs")}`);
|
|
29148
|
+
lines.push(`${import_picocolors20.default.dim("\u2500".repeat(40))}`);
|
|
28857
29149
|
if (tools.mcpBuiltin.length === 0) {
|
|
28858
|
-
lines.push(` ${
|
|
29150
|
+
lines.push(` ${import_picocolors20.default.dim("No built-in MCPs")}`);
|
|
28859
29151
|
} else {
|
|
28860
29152
|
for (const mcp of tools.mcpBuiltin) {
|
|
28861
29153
|
lines.push(` ${formatStatusSymbol("pass")} ${mcp}`);
|
|
28862
29154
|
}
|
|
28863
29155
|
}
|
|
28864
29156
|
if (tools.mcpUser.length > 0) {
|
|
28865
|
-
lines.push(` ${
|
|
29157
|
+
lines.push(` ${import_picocolors20.default.cyan("+")} ${tools.mcpUser.length} user MCP(s):`);
|
|
28866
29158
|
for (const mcp of tools.mcpUser) {
|
|
28867
29159
|
lines.push(` ${formatStatusSymbol("pass")} ${mcp}`);
|
|
28868
29160
|
}
|
|
@@ -28870,20 +29162,20 @@ function formatVerbose(result) {
|
|
|
28870
29162
|
lines.push("");
|
|
28871
29163
|
const allIssues = results.flatMap((r2) => r2.issues);
|
|
28872
29164
|
if (allIssues.length > 0) {
|
|
28873
|
-
lines.push(`${
|
|
28874
|
-
lines.push(`${
|
|
29165
|
+
lines.push(`${import_picocolors20.default.bold("Issues")}`);
|
|
29166
|
+
lines.push(`${import_picocolors20.default.dim("\u2500".repeat(40))}`);
|
|
28875
29167
|
allIssues.forEach((issue2, index) => {
|
|
28876
29168
|
lines.push(formatIssue(issue2, index + 1));
|
|
28877
29169
|
lines.push("");
|
|
28878
29170
|
});
|
|
28879
29171
|
}
|
|
28880
|
-
lines.push(`${
|
|
28881
|
-
lines.push(`${
|
|
28882
|
-
const passText = summary.passed > 0 ?
|
|
28883
|
-
const failText = summary.failed > 0 ?
|
|
28884
|
-
const warnText = summary.warnings > 0 ?
|
|
29172
|
+
lines.push(`${import_picocolors20.default.bold("Summary")}`);
|
|
29173
|
+
lines.push(`${import_picocolors20.default.dim("\u2500".repeat(40))}`);
|
|
29174
|
+
const passText = summary.passed > 0 ? import_picocolors20.default.green(`${summary.passed} passed`) : `${summary.passed} passed`;
|
|
29175
|
+
const failText = summary.failed > 0 ? import_picocolors20.default.red(`${summary.failed} failed`) : `${summary.failed} failed`;
|
|
29176
|
+
const warnText = summary.warnings > 0 ? import_picocolors20.default.yellow(`${summary.warnings} warnings`) : `${summary.warnings} warnings`;
|
|
28885
29177
|
lines.push(` ${passText}, ${failText}, ${warnText}`);
|
|
28886
|
-
lines.push(` ${
|
|
29178
|
+
lines.push(` ${import_picocolors20.default.dim(`Total: ${summary.total} checks in ${summary.duration}ms`)}`);
|
|
28887
29179
|
return lines.join(`
|
|
28888
29180
|
`);
|
|
28889
29181
|
}
|
|
@@ -28967,11 +29259,11 @@ async function doctor(options = { mode: "default" }) {
|
|
|
28967
29259
|
|
|
28968
29260
|
// src/features/mcp-oauth/storage.ts
|
|
28969
29261
|
init_shared();
|
|
28970
|
-
import { chmodSync, existsSync as
|
|
28971
|
-
import { dirname as dirname7, join as
|
|
29262
|
+
import { chmodSync, existsSync as existsSync28, mkdirSync as mkdirSync6, readFileSync as readFileSync26, unlinkSync as unlinkSync4, writeFileSync as writeFileSync10 } from "fs";
|
|
29263
|
+
import { dirname as dirname7, join as join27 } from "path";
|
|
28972
29264
|
var STORAGE_FILE_NAME = "mcp-oauth.json";
|
|
28973
29265
|
function getMcpOauthStoragePath() {
|
|
28974
|
-
return
|
|
29266
|
+
return join27(getOpenCodeConfigDir({ binary: "opencode" }), STORAGE_FILE_NAME);
|
|
28975
29267
|
}
|
|
28976
29268
|
function normalizeHost(serverHost) {
|
|
28977
29269
|
let host = serverHost.trim();
|
|
@@ -29008,7 +29300,7 @@ function buildKey(serverHost, resource) {
|
|
|
29008
29300
|
}
|
|
29009
29301
|
function readStore() {
|
|
29010
29302
|
const filePath = getMcpOauthStoragePath();
|
|
29011
|
-
if (!
|
|
29303
|
+
if (!existsSync28(filePath)) {
|
|
29012
29304
|
return null;
|
|
29013
29305
|
}
|
|
29014
29306
|
try {
|
|
@@ -29022,7 +29314,7 @@ function writeStore(store2) {
|
|
|
29022
29314
|
const filePath = getMcpOauthStoragePath();
|
|
29023
29315
|
try {
|
|
29024
29316
|
const dir = dirname7(filePath);
|
|
29025
|
-
if (!
|
|
29317
|
+
if (!existsSync28(dir)) {
|
|
29026
29318
|
mkdirSync6(dir, { recursive: true });
|
|
29027
29319
|
}
|
|
29028
29320
|
writeFileSync10(filePath, JSON.stringify(store2, null, 2), { encoding: "utf-8", mode: 384 });
|
|
@@ -29057,8 +29349,8 @@ function deleteToken(serverHost, resource) {
|
|
|
29057
29349
|
if (Object.keys(store2).length === 0) {
|
|
29058
29350
|
try {
|
|
29059
29351
|
const filePath = getMcpOauthStoragePath();
|
|
29060
|
-
if (
|
|
29061
|
-
|
|
29352
|
+
if (existsSync28(filePath)) {
|
|
29353
|
+
unlinkSync4(filePath);
|
|
29062
29354
|
}
|
|
29063
29355
|
return true;
|
|
29064
29356
|
} catch {
|
|
@@ -29412,7 +29704,7 @@ class McpOAuthProvider {
|
|
|
29412
29704
|
const clientInfo = await getOrRegisterClient({
|
|
29413
29705
|
registrationEndpoint: metadata.registrationEndpoint,
|
|
29414
29706
|
serverIdentifier: this.serverUrl,
|
|
29415
|
-
clientName: "
|
|
29707
|
+
clientName: "openagent-labforge",
|
|
29416
29708
|
redirectUris: [this.redirectUrl()],
|
|
29417
29709
|
tokenEndpointAuthMethod: "none",
|
|
29418
29710
|
clientId: this.configClientId,
|
|
@@ -29590,12 +29882,12 @@ function createMcpOAuthCommand() {
|
|
|
29590
29882
|
// src/cli/cli-program.ts
|
|
29591
29883
|
var VERSION2 = package_default.version;
|
|
29592
29884
|
var program2 = new Command;
|
|
29593
|
-
program2.name("
|
|
29594
|
-
program2.command("install").description("Install and configure
|
|
29885
|
+
program2.name("openagent-labforge").description("The ultimate OpenCode plugin - multi-model orchestration, LSP tools, and more").version(VERSION2, "-v, --version", "Show version number").enablePositionalOptions();
|
|
29886
|
+
program2.command("install").description("Install and configure openagent-labforge with interactive setup").option("--no-tui", "Run in non-interactive mode (requires all options)").option("--claude <value>", "Claude subscription: no, yes, max20").option("--openai <value>", "OpenAI/ChatGPT subscription: no, yes (default: no)").option("--gemini <value>", "Gemini integration: no, yes").option("--copilot <value>", "GitHub Copilot subscription: no, yes").option("--opencode-zen <value>", "OpenCode Zen access: no, yes (default: no)").option("--zai-coding-plan <value>", "Z.ai Coding Plan subscription: no, yes (default: no)").option("--kimi-for-coding <value>", "Kimi For Coding subscription: no, yes (default: no)").option("--opencode-go <value>", "OpenCode Go subscription: no, yes (default: no)").option("--skip-auth", "Skip authentication setup hints").addHelpText("after", `
|
|
29595
29887
|
Examples:
|
|
29596
|
-
$ bunx
|
|
29597
|
-
$ bunx
|
|
29598
|
-
$ bunx
|
|
29888
|
+
$ bunx openagent-labforge install
|
|
29889
|
+
$ bunx openagent-labforge install --no-tui --claude=max20 --openai=yes --gemini=yes --copilot=no
|
|
29890
|
+
$ bunx openagent-labforge install --no-tui --claude=no --gemini=no --copilot=yes --opencode-zen=yes
|
|
29599
29891
|
|
|
29600
29892
|
Model Providers (Priority: Native > Copilot > OpenCode Zen > Z.ai > Kimi):
|
|
29601
29893
|
Claude Native anthropic/ models (Opus, Sonnet, Haiku)
|
|
@@ -29615,25 +29907,28 @@ Model Providers (Priority: Native > Copilot > OpenCode Zen > Z.ai > Kimi):
|
|
|
29615
29907
|
opencodeZen: options.opencodeZen,
|
|
29616
29908
|
zaiCodingPlan: options.zaiCodingPlan,
|
|
29617
29909
|
kimiForCoding: options.kimiForCoding,
|
|
29910
|
+
opencodeGo: options.opencodeGo,
|
|
29618
29911
|
skipAuth: options.skipAuth ?? false
|
|
29619
29912
|
};
|
|
29620
29913
|
const exitCode = await install(args);
|
|
29621
29914
|
process.exit(exitCode);
|
|
29622
29915
|
});
|
|
29623
|
-
program2.command("run <message>").allowUnknownOption().passThroughOptions().description("Run opencode with todo/background task completion enforcement").option("-a, --agent <name>", "Agent to use (default: from CLI/env/config, fallback: Sisyphus)").option("-d, --directory <path>", "Working directory").option("-p, --port <port>", "Server port (attaches if port already in use)", parseInt).option("--attach <url>", "Attach to existing opencode server URL").option("--on-complete <command>", "Shell command to run after completion").option("--json", "Output structured JSON result to stdout").option("--no-timestamp", "Disable timestamp prefix in run output").option("--verbose", "Show full event stream (default: messages/tools only)").option("--session-id <id>", "Resume existing session instead of creating new one").addHelpText("after", `
|
|
29916
|
+
program2.command("run <message>").allowUnknownOption().passThroughOptions().description("Run opencode with todo/background task completion enforcement").option("-a, --agent <name>", "Agent to use (default: from CLI/env/config, fallback: Sisyphus)").option("-m, --model <provider/model>", "Model override (e.g., anthropic/claude-sonnet-4)").option("-d, --directory <path>", "Working directory").option("-p, --port <port>", "Server port (attaches if port already in use)", parseInt).option("--attach <url>", "Attach to existing opencode server URL").option("--on-complete <command>", "Shell command to run after completion").option("--json", "Output structured JSON result to stdout").option("--no-timestamp", "Disable timestamp prefix in run output").option("--verbose", "Show full event stream (default: messages/tools only)").option("--session-id <id>", "Resume existing session instead of creating new one").addHelpText("after", `
|
|
29624
29917
|
Examples:
|
|
29625
|
-
$ bunx
|
|
29626
|
-
$ bunx
|
|
29627
|
-
$ bunx
|
|
29628
|
-
$ bunx
|
|
29629
|
-
$ bunx
|
|
29630
|
-
$ bunx
|
|
29631
|
-
$ bunx
|
|
29918
|
+
$ bunx openagent-labforge run "Fix the bug in index.ts"
|
|
29919
|
+
$ bunx openagent-labforge run --agent Sisyphus "Implement feature X"
|
|
29920
|
+
$ bunx openagent-labforge run --port 4321 "Fix the bug"
|
|
29921
|
+
$ bunx openagent-labforge run --attach http://127.0.0.1:4321 "Fix the bug"
|
|
29922
|
+
$ bunx openagent-labforge run --json "Fix the bug" | jq .sessionId
|
|
29923
|
+
$ bunx openagent-labforge run --on-complete "notify-send Done" "Fix the bug"
|
|
29924
|
+
$ bunx openagent-labforge run --session-id ses_abc123 "Continue the work"
|
|
29925
|
+
$ bunx openagent-labforge run --model anthropic/claude-sonnet-4 "Fix the bug"
|
|
29926
|
+
$ bunx openagent-labforge run --agent Sisyphus --model openai/gpt-5.4 "Implement feature X"
|
|
29632
29927
|
|
|
29633
29928
|
Agent resolution order:
|
|
29634
29929
|
1) --agent flag
|
|
29635
29930
|
2) OPENCODE_DEFAULT_AGENT
|
|
29636
|
-
3)
|
|
29931
|
+
3) openagent-labforge.json "default_run_agent"
|
|
29637
29932
|
4) Sisyphus (fallback)
|
|
29638
29933
|
|
|
29639
29934
|
Available core agents:
|
|
@@ -29650,6 +29945,7 @@ Unlike 'opencode run', this command waits until:
|
|
|
29650
29945
|
const runOptions = {
|
|
29651
29946
|
message,
|
|
29652
29947
|
agent: options.agent,
|
|
29948
|
+
model: options.model,
|
|
29653
29949
|
directory: options.directory,
|
|
29654
29950
|
port: options.port,
|
|
29655
29951
|
attach: options.attach,
|
|
@@ -29664,9 +29960,9 @@ Unlike 'opencode run', this command waits until:
|
|
|
29664
29960
|
});
|
|
29665
29961
|
program2.command("get-local-version").description("Show current installed version and check for updates").option("-d, --directory <path>", "Working directory to check config from").option("--json", "Output in JSON format for scripting").addHelpText("after", `
|
|
29666
29962
|
Examples:
|
|
29667
|
-
$ bunx
|
|
29668
|
-
$ bunx
|
|
29669
|
-
$ bunx
|
|
29963
|
+
$ bunx openagent-labforge get-local-version
|
|
29964
|
+
$ bunx openagent-labforge get-local-version --json
|
|
29965
|
+
$ bunx openagent-labforge get-local-version --directory /path/to/project
|
|
29670
29966
|
|
|
29671
29967
|
This command shows:
|
|
29672
29968
|
- Current installed version
|
|
@@ -29681,12 +29977,12 @@ This command shows:
|
|
|
29681
29977
|
const exitCode = await getLocalVersion(versionOptions);
|
|
29682
29978
|
process.exit(exitCode);
|
|
29683
29979
|
});
|
|
29684
|
-
program2.command("doctor").description("Check
|
|
29980
|
+
program2.command("doctor").description("Check openagent-labforge installation health and diagnose issues").option("--status", "Show compact system dashboard").option("--verbose", "Show detailed diagnostic information").option("--json", "Output results in JSON format").addHelpText("after", `
|
|
29685
29981
|
Examples:
|
|
29686
|
-
$ bunx
|
|
29687
|
-
$ bunx
|
|
29688
|
-
$ bunx
|
|
29689
|
-
$ bunx
|
|
29982
|
+
$ bunx openagent-labforge doctor # Show problems only
|
|
29983
|
+
$ bunx openagent-labforge doctor --status # Compact dashboard
|
|
29984
|
+
$ bunx openagent-labforge doctor --verbose # Deep diagnostics
|
|
29985
|
+
$ bunx openagent-labforge doctor --json # JSON output
|
|
29690
29986
|
`).action(async (options) => {
|
|
29691
29987
|
const mode = options.status ? "status" : options.verbose ? "verbose" : "default";
|
|
29692
29988
|
const doctorOptions = {
|
|
@@ -29697,7 +29993,7 @@ Examples:
|
|
|
29697
29993
|
process.exit(exitCode);
|
|
29698
29994
|
});
|
|
29699
29995
|
program2.command("version").description("Show version information").action(() => {
|
|
29700
|
-
console.log(`
|
|
29996
|
+
console.log(`openagent-labforge v${VERSION2}`);
|
|
29701
29997
|
});
|
|
29702
29998
|
program2.addCommand(createMcpOAuthCommand());
|
|
29703
29999
|
function runCli() {
|