@wolfx/oh-my-openagent 3.17.15 → 4.1.1
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 +178 -113
- package/README.ko.md +221 -149
- package/README.md +79 -51
- package/README.ru.md +118 -71
- package/README.zh-cn.md +139 -73
- package/dist/agents/agent-skill-resolution.d.ts +1 -0
- package/dist/agents/atlas/agent.d.ts +7 -12
- package/dist/agents/atlas/default-prompt-sections.d.ts +5 -5
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +4 -4
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +5 -5
- package/dist/agents/atlas/kimi-prompt-sections.d.ts +6 -0
- package/dist/agents/atlas/kimi.d.ts +2 -0
- package/dist/agents/atlas/opus-4-7-prompt-sections.d.ts +6 -0
- package/dist/agents/atlas/opus-4-7.d.ts +2 -0
- package/dist/agents/atlas/shared-prompt.d.ts +1 -1
- package/dist/agents/builtin-agents/available-skills.d.ts +1 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
- package/dist/agents/builtin-agents.d.ts +1 -1
- package/dist/agents/dynamic-agent-core-sections.d.ts +1 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
- package/dist/agents/hephaestus/gpt-5-5.d.ts +0 -4
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/agents/types.d.ts +1 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/config/schema/agent-names.d.ts +1 -0
- package/dist/config/schema/agent-overrides.d.ts +45 -0
- package/dist/config/schema/categories.d.ts +7 -1
- package/dist/config/schema/commands.d.ts +1 -0
- package/dist/config/schema/fallback-models.d.ts +5 -0
- package/dist/config/schema/hooks.d.ts +2 -0
- package/dist/config/schema/keyword-detector.d.ts +21 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +71 -0
- package/dist/config/schema/team-mode.d.ts +16 -0
- package/dist/config/schema.d.ts +2 -0
- package/dist/create-hooks.d.ts +4 -0
- package/dist/create-managers.d.ts +2 -0
- package/dist/features/background-agent/manager.d.ts +13 -0
- package/dist/features/background-agent/spawner.d.ts +4 -2
- package/dist/features/background-agent/task-poller.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +5 -0
- package/dist/features/boulder-state/format-duration.d.ts +1 -0
- package/dist/features/boulder-state/index.d.ts +1 -0
- package/dist/features/boulder-state/storage.d.ts +40 -1
- package/dist/features/boulder-state/types.d.ts +43 -0
- package/dist/features/builtin-commands/commands.d.ts +1 -0
- package/dist/features/builtin-commands/templates/hyperplan.d.ts +1 -0
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -0
- package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/history-search-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/overview.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/quick-reference.d.ts +1 -1
- package/dist/features/builtin-skills/skills/git-master-sections/rebase-workflow.d.ts +1 -1
- package/dist/features/builtin-skills/skills/index.d.ts +1 -0
- package/dist/features/builtin-skills/skills/team-mode.d.ts +2 -0
- package/dist/features/builtin-skills/skills.d.ts +1 -0
- package/dist/features/claude-code-plugin-loader/discovery.d.ts +1 -0
- package/dist/features/hook-message-injector/injector.d.ts +2 -2
- package/dist/features/opencode-skill-loader/loader.d.ts +2 -2
- package/dist/features/opencode-skill-loader/skill-resolution-options.d.ts +1 -0
- package/dist/features/team-mode/deps.d.ts +6 -0
- package/dist/features/team-mode/member-guidance.d.ts +2 -0
- package/dist/features/team-mode/member-parser.d.ts +16 -0
- package/dist/features/team-mode/member-session-resolution.d.ts +6 -0
- package/dist/features/team-mode/member-session-routing.d.ts +19 -0
- package/dist/features/team-mode/team-layout-tmux/close-team-member-pane.d.ts +4 -0
- package/dist/features/team-mode/team-layout-tmux/layout.d.ts +26 -6
- package/dist/features/team-mode/team-layout-tmux/rebalance-team-window.d.ts +9 -0
- package/dist/features/team-mode/team-layout-tmux/resolve-caller-tmux-session.d.ts +7 -0
- package/dist/features/team-mode/team-layout-tmux/sweep-stale-team-sessions.d.ts +8 -0
- package/dist/features/team-mode/team-mailbox/ack.d.ts +2 -0
- package/dist/features/team-mode/team-mailbox/inbox.d.ts +3 -0
- package/dist/features/team-mode/team-mailbox/index.d.ts +7 -0
- package/dist/features/team-mode/team-mailbox/poll.d.ts +10 -0
- package/dist/features/team-mode/team-mailbox/reservation.d.ts +11 -0
- package/dist/features/team-mode/team-mailbox/send.d.ts +27 -0
- package/dist/features/team-mode/team-registry/index.d.ts +3 -0
- package/dist/features/team-mode/team-registry/loader.d.ts +12 -0
- package/dist/features/team-mode/team-registry/paths.d.ts +13 -0
- package/dist/features/team-mode/team-registry/team-spec-input-normalizer.d.ts +6 -0
- package/dist/features/team-mode/team-registry/validator.d.ts +10 -0
- package/dist/features/team-mode/team-runtime/activate-team-layout.d.ts +4 -0
- package/dist/features/team-mode/team-runtime/cleanup-team-run-resources.d.ts +17 -0
- package/dist/features/team-mode/team-runtime/create.d.ts +25 -0
- package/dist/features/team-mode/team-runtime/delete-team.d.ts +16 -0
- package/dist/features/team-mode/team-runtime/index.d.ts +2 -0
- package/dist/features/team-mode/team-runtime/resolve-member-dependencies.d.ts +3 -0
- package/dist/features/team-mode/team-runtime/resolve-member.d.ts +17 -0
- package/dist/features/team-mode/team-runtime/session-cleanup.d.ts +21 -0
- package/dist/features/team-mode/team-runtime/session-team-run-registry.d.ts +4 -0
- package/dist/features/team-mode/team-runtime/shutdown-helpers.d.ts +11 -0
- package/dist/features/team-mode/team-runtime/shutdown-test-fixtures.d.ts +46 -0
- package/dist/features/team-mode/team-runtime/shutdown.d.ts +5 -0
- package/dist/features/team-mode/team-runtime/status.d.ts +36 -0
- package/dist/features/team-mode/team-session-registry.d.ts +11 -0
- package/dist/features/team-mode/team-state-store/index.d.ts +1 -0
- package/dist/features/team-mode/team-state-store/locks.d.ts +12 -0
- package/dist/features/team-mode/team-state-store/resume.d.ts +10 -0
- package/dist/features/team-mode/team-state-store/store.d.ts +21 -0
- package/dist/features/team-mode/team-tasklist/claim.d.ts +10 -0
- package/dist/features/team-mode/team-tasklist/dependencies.d.ts +2 -0
- package/dist/features/team-mode/team-tasklist/get.d.ts +3 -0
- package/dist/features/team-mode/team-tasklist/index.d.ts +6 -0
- package/dist/features/team-mode/team-tasklist/list.d.ts +8 -0
- package/dist/features/team-mode/team-tasklist/store.d.ts +3 -0
- package/dist/features/team-mode/team-tasklist/test-support.d.ts +9 -0
- package/dist/features/team-mode/team-tasklist/update.d.ts +9 -0
- package/dist/features/team-mode/tools/index.d.ts +1 -0
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +188 -0
- package/dist/features/team-mode/tools/lifecycle.d.ts +37 -0
- package/dist/features/team-mode/tools/messaging.d.ts +31 -0
- package/dist/features/team-mode/tools/query.d.ts +16 -0
- package/dist/features/team-mode/tools/tasks.d.ts +18 -0
- package/dist/features/team-mode/types.d.ts +137 -5
- package/dist/features/tmux-subagent/action-executor-core.d.ts +1 -0
- package/dist/features/tmux-subagent/action-executor.d.ts +1 -0
- package/dist/features/tmux-subagent/attachable-session-status.d.ts +4 -0
- package/dist/features/tmux-subagent/cleanup.d.ts +10 -0
- package/dist/features/tmux-subagent/manager.d.ts +32 -3
- package/dist/features/tmux-subagent/pane-state-querier.d.ts +10 -0
- package/dist/features/tmux-subagent/polling.d.ts +1 -0
- package/dist/features/tmux-subagent/session-created-handler.d.ts +23 -0
- package/dist/features/tmux-subagent/session-deleted-handler.d.ts +16 -0
- package/dist/hooks/atlas/atlas-hook.d.ts +1 -1
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +3 -4
- package/dist/hooks/atlas/recent-model-resolver.d.ts +9 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +1 -0
- package/dist/hooks/atlas/tool-execute-after.d.ts +3 -1
- package/dist/hooks/atlas/tool-execute-before.d.ts +2 -0
- package/dist/hooks/atlas/types.d.ts +10 -2
- package/dist/hooks/compaction-context-injector/recovery.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/types.d.ts +1 -0
- package/dist/hooks/compaction-todo-preserver/hook.d.ts +11 -0
- package/dist/hooks/fsync-skip-warning/index.d.ts +18 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/keyword-detector/constants.d.ts +6 -0
- package/dist/hooks/keyword-detector/detector.d.ts +5 -3
- package/dist/hooks/keyword-detector/hook.d.ts +2 -1
- package/dist/hooks/keyword-detector/hyperplan/default.d.ts +13 -0
- package/dist/hooks/keyword-detector/hyperplan/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/team/default.d.ts +13 -0
- package/dist/hooks/keyword-detector/team/index.d.ts +1 -0
- package/dist/hooks/ralph-loop/continuation-prompt-injector.d.ts +7 -1
- package/dist/hooks/ralph-loop/iteration-continuation.d.ts +9 -1
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +1 -0
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +3 -0
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +2 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/hooks/ralph-loop/verification-failure-handler.d.ts +3 -1
- package/dist/hooks/session-recovery/recover-tool-result-missing.d.ts +2 -2
- package/dist/hooks/shared/session-idle-settle.d.ts +11 -0
- package/dist/hooks/team-mailbox-injector/hook.d.ts +31 -0
- package/dist/hooks/team-mailbox-injector/index.d.ts +2 -0
- package/dist/hooks/team-mode-status-injector/hook.d.ts +28 -0
- package/dist/hooks/team-mode-status-injector/index.d.ts +1 -0
- package/dist/hooks/team-session-events/team-idle-wake-hint.d.ts +42 -0
- package/dist/hooks/team-session-events/team-lead-orphan-handler.d.ts +12 -0
- package/dist/hooks/team-session-events/team-member-error-handler.d.ts +10 -0
- package/dist/hooks/team-session-events/team-member-status-handler.d.ts +10 -0
- package/dist/hooks/team-tool-gating/hook.d.ts +3 -0
- package/dist/hooks/team-tool-gating/index.d.ts +1 -0
- package/dist/hooks/todo-description-override/description.d.ts +1 -1
- package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +2 -0
- package/dist/hooks/write-existing-file-guard/hook.d.ts +6 -1
- package/dist/hooks/write-existing-file-guard/tool-execute-before-handler.d.ts +1 -0
- package/dist/index.js +93264 -81453
- package/dist/oh-my-opencode.schema.json +199 -47
- package/dist/plugin/hooks/create-core-hooks.d.ts +4 -0
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -1
- package/dist/plugin/hooks/create-transform-hooks.d.ts +3 -1
- package/dist/plugin/recent-synthetic-idles.d.ts +1 -0
- package/dist/plugin/session-compacting.d.ts +31 -0
- package/dist/plugin/tool-registry.d.ts +16 -0
- package/dist/plugin-dispose.d.ts +13 -0
- package/dist/plugin-handlers/agent-priority-order.d.ts +6 -6
- package/dist/shared/agent-ordering.d.ts +8 -0
- package/dist/shared/agent-sort-shim.d.ts +8 -8
- package/dist/shared/agent-tool-restrictions.d.ts +5 -1
- package/dist/shared/bun-file-shim.d.ts +8 -0
- package/dist/shared/bun-hash-shim.d.ts +1 -0
- package/dist/shared/bun-spawn-shim.d.ts +1 -0
- package/dist/shared/bun-which-shim.d.ts +1 -0
- package/dist/shared/classify-path-environment.d.ts +3 -0
- package/dist/shared/event-session-id.d.ts +2 -0
- package/dist/shared/extract-semver.d.ts +1 -0
- package/dist/shared/fsync-skip-tracker.d.ts +12 -0
- package/dist/shared/fsync-skip-warning-formatter.d.ts +2 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/internal-initiator-marker.d.ts +8 -0
- package/dist/shared/model-capability-heuristics.d.ts +1 -0
- package/dist/shared/opencode-version.d.ts +14 -1
- package/dist/shared/project-discovery-dirs.d.ts +1 -0
- package/dist/shared/session-route.d.ts +18 -0
- package/dist/shared/shell-env.d.ts +1 -0
- package/dist/shared/tmux/cmux-detect.d.ts +8 -0
- package/dist/shared/tmux/constants.d.ts +1 -1
- package/dist/shared/tmux/index.d.ts +2 -0
- package/dist/shared/tmux/runner.d.ts +13 -0
- package/dist/shared/tmux/tmux-utils/pane-replace.d.ts +1 -1
- package/dist/shared/tmux/tmux-utils/pane-spawn.d.ts +13 -1
- package/dist/shared/tmux/tmux-utils/session-spawn.d.ts +13 -1
- package/dist/shared/tmux/tmux-utils/stale-session-sweep.d.ts +9 -2
- package/dist/shared/tmux/tmux-utils/window-spawn.d.ts +13 -1
- package/dist/shared/tmux/tmux-utils.d.ts +1 -1
- package/dist/shared/tolerant-fsync.d.ts +5 -0
- package/dist/shared/write-file-atomically.d.ts +4 -1
- package/dist/tools/call-omo-agent/agent-resolver.d.ts +5 -12
- package/dist/tools/call-omo-agent/constants.d.ts +2 -2
- package/dist/tools/delegate-task/model-string-parser.d.ts +9 -0
- package/dist/tools/delegate-task/openai-categories.d.ts +1 -0
- package/dist/tools/delegate-task/resolve-call-id.d.ts +2 -0
- package/dist/tools/delegate-task/skill-resolver.d.ts +1 -0
- package/dist/tools/delegate-task/subagent-resolver.d.ts +5 -1
- package/dist/tools/delegate-task/sync-prompt-sender.d.ts +1 -0
- package/dist/tools/delegate-task/sync-result-fetcher.d.ts +3 -1
- package/dist/tools/delegate-task/types.d.ts +1 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/interactive-bash/constants.d.ts +1 -0
- package/dist/tools/interactive-bash/tmux-path-resolver.d.ts +1 -0
- package/dist/tools/look-at/missing-file-error.d.ts +2 -0
- package/dist/tools/skill/types.d.ts +2 -0
- package/package.json +3 -4
- package/dist/hooks/ralph-loop/completion-promise-detector-test-input.d.ts +0 -11
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { AvailableCategory } from "../agents/dynamic-agent-prompt-builder";
|
|
2
2
|
import type { OhMyOpenCodeConfig } from "../config";
|
|
3
|
+
import { createTeamApproveShutdownTool, createTeamCreateTool, createTeamDeleteTool, createTeamRejectShutdownTool, createTeamShutdownRequestTool } from "../features/team-mode/tools/lifecycle";
|
|
4
|
+
import { createTeamSendMessageTool } from "../features/team-mode/tools/messaging";
|
|
5
|
+
import { createTeamListTool, createTeamStatusTool } from "../features/team-mode/tools/query";
|
|
6
|
+
import { createTeamTaskCreateTool, createTeamTaskGetTool, createTeamTaskListTool, createTeamTaskUpdateTool } from "../features/team-mode/tools/tasks";
|
|
3
7
|
import type { PluginContext, ToolsRecord } from "./types";
|
|
4
8
|
import { builtinTools, createBackgroundTools, createCallOmoAgent, createLookAt, createSkillMcpTool, createSkillTool, createGrepTools, createGlobTools, createAstGrepTools, createSessionManagerTools, createDelegateTask, discoverCommandsSync, interactive_bash, createTaskCreateTool, createTaskGetTool, createTaskList, createTaskUpdateTool, createHashlineEditTool } from "../tools";
|
|
5
9
|
import type { Managers } from "../create-managers";
|
|
@@ -23,6 +27,18 @@ type ToolRegistryFactories = {
|
|
|
23
27
|
createTaskList: typeof createTaskList;
|
|
24
28
|
createTaskUpdateTool: typeof createTaskUpdateTool;
|
|
25
29
|
createHashlineEditTool: typeof createHashlineEditTool;
|
|
30
|
+
createTeamApproveShutdownTool: typeof createTeamApproveShutdownTool;
|
|
31
|
+
createTeamCreateTool: typeof createTeamCreateTool;
|
|
32
|
+
createTeamDeleteTool: typeof createTeamDeleteTool;
|
|
33
|
+
createTeamRejectShutdownTool: typeof createTeamRejectShutdownTool;
|
|
34
|
+
createTeamShutdownRequestTool: typeof createTeamShutdownRequestTool;
|
|
35
|
+
createTeamSendMessageTool: typeof createTeamSendMessageTool;
|
|
36
|
+
createTeamTaskCreateTool: typeof createTeamTaskCreateTool;
|
|
37
|
+
createTeamTaskGetTool: typeof createTeamTaskGetTool;
|
|
38
|
+
createTeamTaskListTool: typeof createTeamTaskListTool;
|
|
39
|
+
createTeamTaskUpdateTool: typeof createTeamTaskUpdateTool;
|
|
40
|
+
createTeamStatusTool: typeof createTeamStatusTool;
|
|
41
|
+
createTeamListTool: typeof createTeamListTool;
|
|
26
42
|
};
|
|
27
43
|
export type ToolRegistryResult = {
|
|
28
44
|
filteredTools: ToolsRecord;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type PluginDispose = () => Promise<void>;
|
|
2
|
+
export declare function createPluginDispose(args: {
|
|
3
|
+
backgroundManager: {
|
|
4
|
+
shutdown: () => void | Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
skillMcpManager: {
|
|
7
|
+
disconnectAll: () => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
lspManager: {
|
|
10
|
+
stopAll: () => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
disposeHooks: () => void;
|
|
13
|
+
}): PluginDispose;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* The order is: sisyphus → hephaestus → prometheus → atlas
|
|
2
|
+
* Default source of truth for core agent ordering.
|
|
3
|
+
* The default order is: sisyphus → hephaestus → prometheus → atlas.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* User config may override the runtime order through `agent_order`; missing
|
|
6
|
+
* core agents still fall back to this default order. Do not reintroduce sort
|
|
7
|
+
* key prefixes or a second ordering constant.
|
|
8
8
|
*
|
|
9
9
|
* See: src/plugin-handlers/AGENTS.md for architectural context.
|
|
10
10
|
*/
|
|
11
11
|
export declare const CANONICAL_CORE_AGENT_ORDER: readonly ["sisyphus", "hephaestus", "prometheus", "atlas"];
|
|
12
|
-
export declare function reorderAgentsByPriority(agents: Record<string, unknown
|
|
12
|
+
export declare function reorderAgentsByPriority(agents: Record<string, unknown>, agentOrder?: readonly string[]): Record<string, unknown>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const DEFAULT_AGENT_ORDER: readonly ["sisyphus", "hephaestus", "prometheus", "atlas"];
|
|
2
|
+
export type AgentOrderValidation = {
|
|
3
|
+
order: string[];
|
|
4
|
+
invalid: string[];
|
|
5
|
+
duplicates: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function validateAgentOrder(agentOrder: readonly string[] | undefined): AgentOrderValidation;
|
|
8
|
+
export declare function resolveAgentOrderDisplayNames(agentOrder: readonly string[] | undefined): string[];
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* OpenCode 1.4.x ignores the agent `order` field (sst/opencode#19127) and
|
|
5
5
|
* sorts the agent list by `agent.name` via Remeda `sortBy(x => x.name, "asc")`
|
|
6
|
-
* at packages/opencode/src/agent/agent.ts. Without intervention,
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* order this project ships.
|
|
6
|
+
* at packages/opencode/src/agent/agent.ts. Without intervention, core agents
|
|
7
|
+
* collapse into name order, which can invert the default sisyphus -> hephaestus
|
|
8
|
+
* -> prometheus -> atlas order or a user's configured `agent_order`.
|
|
10
9
|
*
|
|
11
10
|
* Earlier attempts to bias the sort key with invisible characters (ZWSP,
|
|
12
11
|
* U+2060 WORD JOINER, U+00AD SOFT HYPHEN, ANSI escape) caused visible-gap
|
|
@@ -17,12 +16,13 @@
|
|
|
17
16
|
* 1. `isAgentArray` rejects any array element that is null, non-object, or
|
|
18
17
|
* lacks a string `name`, eliminating the throw-on-mixed-array failure
|
|
19
18
|
* mode that closed the original PR.
|
|
20
|
-
* 2. The activation predicate requires >= 2 elements whose `.name` is
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* 2. The activation predicate requires >= 2 elements whose `.name` is ranked
|
|
20
|
+
* by the active agent order, so unrelated `.sort()` and `.toSorted()` calls
|
|
21
|
+
* (string arrays, number arrays, generic objects) execute native behavior
|
|
22
|
+
* unchanged.
|
|
24
23
|
*
|
|
25
24
|
* Remove this shim once OpenCode honors the agent `order` field
|
|
26
25
|
* (sst/opencode#19127).
|
|
27
26
|
*/
|
|
27
|
+
export declare function setAgentSortOrder(agentOrder: readonly string[] | undefined): void;
|
|
28
28
|
export declare function installAgentSortShim(): void;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type AgentToolRestrictionsOptions = {
|
|
2
|
+
includeTeamToolDenylist?: boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare function getAgentToolRestrictions(agentName: string, options?: AgentToolRestrictionsOptions): Record<string, boolean>;
|
|
2
5
|
export declare function hasAgentToolRestrictions(agentName: string): boolean;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface BunFileLike {
|
|
2
|
+
text(): Promise<string>;
|
|
3
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
4
|
+
exists(): Promise<boolean>;
|
|
5
|
+
delete(): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare function bunFile(path: string): BunFileLike;
|
|
8
|
+
export declare function bunWrite(path: string, data: string | ArrayBuffer | Uint8Array): Promise<number>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function bunHashXxh32(input: string, seed: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function bunWhich(commandName: string): string | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type PathClassification = "icloud" | "onedrive" | "desktop-sync" | "network-drive" | "unknown";
|
|
2
|
+
export declare function classifyPathEnvironment(absolutePath: string): PathClassification;
|
|
3
|
+
export declare function describePathClassification(pathClassification: PathClassification): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractSemverFromOutput(output: string): string | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PathClassification } from "./classify-path-environment";
|
|
2
|
+
export type FsyncSkipEntry = {
|
|
3
|
+
filePath: string;
|
|
4
|
+
contextLabel: string;
|
|
5
|
+
errorCode: string;
|
|
6
|
+
message: string;
|
|
7
|
+
pathClassification: PathClassification;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function recordFsyncSkip(entry: Omit<FsyncSkipEntry, "timestamp">): void;
|
|
11
|
+
export declare function drainSkipsAfter(timestampMs: number): FsyncSkipEntry[];
|
|
12
|
+
export declare function clearAllSkips(): void;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export * from "./fallback-model-availability";
|
|
|
46
46
|
export * from "./connected-providers-cache";
|
|
47
47
|
export * from "./context-limit-resolver";
|
|
48
48
|
export * from "./session-utils";
|
|
49
|
+
export * from "./event-session-id";
|
|
49
50
|
export * from "./tmux";
|
|
50
51
|
export * from "./model-suggestion-retry";
|
|
51
52
|
export * from "./opencode-server-auth";
|
|
@@ -60,7 +61,9 @@ export * from "./opencode-message-dir";
|
|
|
60
61
|
export * from "./opencode-command-dirs";
|
|
61
62
|
export * from "./project-discovery-dirs";
|
|
62
63
|
export * from "./normalize-sdk-response";
|
|
64
|
+
export * from "./record-type-guard";
|
|
63
65
|
export * from "./session-directory-resolver";
|
|
66
|
+
export * from "./session-route";
|
|
64
67
|
export * from "./prompt-tools";
|
|
65
68
|
export * from "./compaction-marker";
|
|
66
69
|
export * from "./internal-initiator-marker";
|
|
@@ -4,3 +4,11 @@ export declare function createInternalAgentTextPart(text: string): {
|
|
|
4
4
|
type: "text";
|
|
5
5
|
text: string;
|
|
6
6
|
};
|
|
7
|
+
export declare function createInternalAgentContinuationTextPart(text: string): {
|
|
8
|
+
type: "text";
|
|
9
|
+
text: string;
|
|
10
|
+
synthetic: true;
|
|
11
|
+
metadata: {
|
|
12
|
+
compaction_continue: true;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -4,6 +4,7 @@ export type HeuristicModelFamilyDefinition = {
|
|
|
4
4
|
pattern?: RegExp;
|
|
5
5
|
variants?: string[];
|
|
6
6
|
reasoningEfforts?: string[];
|
|
7
|
+
reasoningEffortAliases?: Record<string, string>;
|
|
7
8
|
supportsThinking?: boolean;
|
|
8
9
|
};
|
|
9
10
|
export declare const HEURISTIC_MODEL_FAMILY_REGISTRY: ReadonlyArray<HeuristicModelFamilyDefinition>;
|
|
@@ -16,9 +16,22 @@ export declare const OPENCODE_NATIVE_AGENTS_INJECTION_VERSION = "1.1.37";
|
|
|
16
16
|
* When this version is detected AND opencode.db exists, SQLite backend is used.
|
|
17
17
|
*/
|
|
18
18
|
export declare const OPENCODE_SQLITE_VERSION = "1.1.53";
|
|
19
|
+
type ExecCommandOptions = {
|
|
20
|
+
encoding: "utf-8";
|
|
21
|
+
timeout: number;
|
|
22
|
+
stdio: ["pipe", "pipe", "pipe"];
|
|
23
|
+
};
|
|
24
|
+
export type OpenCodeVersionDeps = {
|
|
25
|
+
execCommand: (command: string, options: ExecCommandOptions) => string;
|
|
26
|
+
getBinaryPath: () => string | null;
|
|
27
|
+
exists: (filePath: string) => boolean;
|
|
28
|
+
realpath: (filePath: string) => string;
|
|
29
|
+
readText: (filePath: string) => string;
|
|
30
|
+
};
|
|
19
31
|
export declare function parseVersion(version: string): number[];
|
|
20
32
|
export declare function compareVersions(a: string, b: string): -1 | 0 | 1;
|
|
21
|
-
export declare function getOpenCodeVersion(): string | null;
|
|
33
|
+
export declare function getOpenCodeVersion(deps?: Partial<OpenCodeVersionDeps>): string | null;
|
|
22
34
|
export declare function isOpenCodeVersionAtLeast(version: string): boolean;
|
|
23
35
|
export declare function resetVersionCache(): void;
|
|
24
36
|
export declare function setVersionCache(version: string | null): void;
|
|
37
|
+
export {};
|
|
@@ -4,3 +4,4 @@ export declare function findProjectClaudeSkillDirs(startDirectory: string, stopD
|
|
|
4
4
|
export declare function findProjectAgentsSkillDirs(startDirectory: string, stopDirectory?: string): string[];
|
|
5
5
|
export declare function findProjectOpencodeSkillDirs(startDirectory: string, stopDirectory?: string): string[];
|
|
6
6
|
export declare function findProjectOpencodeCommandDirs(startDirectory: string, stopDirectory?: string): string[];
|
|
7
|
+
export declare function findProjectOpencodePluginConfigFiles(startDirectory: string, stopDirectory?: string): string[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import { promptSyncWithModelSuggestionRetry, promptWithModelSuggestionRetry } from "./model-suggestion-retry";
|
|
3
|
+
type OpencodeClient = PluginInput["client"];
|
|
4
|
+
type PromptAsyncArgs = Parameters<OpencodeClient["session"]["promptAsync"]>[0];
|
|
5
|
+
type SessionMessagesArgs = Parameters<OpencodeClient["session"]["messages"]>[0];
|
|
6
|
+
type PromptRetryClient = Parameters<typeof promptWithModelSuggestionRetry>[0];
|
|
7
|
+
type PromptRetryArgs = Parameters<typeof promptWithModelSuggestionRetry>[1];
|
|
8
|
+
type PromptSyncRetryClient = Parameters<typeof promptSyncWithModelSuggestionRetry>[0];
|
|
9
|
+
type PromptSyncRetryArgs = Parameters<typeof promptSyncWithModelSuggestionRetry>[1];
|
|
10
|
+
export declare function routeSessionPrompt(args: PromptAsyncArgs, directory: string): PromptAsyncArgs;
|
|
11
|
+
export declare function routePromptRetry(args: PromptRetryArgs, directory: string): PromptRetryArgs;
|
|
12
|
+
export declare function routePromptSyncRetry(args: PromptSyncRetryArgs, directory: string): PromptSyncRetryArgs;
|
|
13
|
+
export declare function routeSessionMessages(args: SessionMessagesArgs, directory: string): SessionMessagesArgs;
|
|
14
|
+
export declare function promptAsyncInDirectory(client: OpencodeClient, args: PromptAsyncArgs, directory: string): Promise<unknown>;
|
|
15
|
+
export declare function promptWithRetryInDirectory(client: PromptRetryClient, args: PromptRetryArgs, directory: string): Promise<void>;
|
|
16
|
+
export declare function promptSyncWithRetryInDirectory(client: PromptSyncRetryClient, args: PromptSyncRetryArgs, directory: string): Promise<void>;
|
|
17
|
+
export declare function messagesInDirectory(client: OpencodeClient, args: SessionMessagesArgs, directory: string): Promise<unknown>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detect whether we are running inside cmux (cmux omo).
|
|
3
|
+
* When cmux-omo sets up the environment it injects a tmux shim and sets
|
|
4
|
+
* CMUX_SOCKET_PATH / TMUX. If detected, redirect tmux commands to
|
|
5
|
+
* `cmux __tmux-compat` so they become native cmux splits instead of
|
|
6
|
+
* failing because there is no real tmux server running.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isCmuxCompatEnvironment(): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const POLL_INTERVAL_BACKGROUND_MS = 2000;
|
|
2
2
|
export declare const SESSION_TIMEOUT_MS: number;
|
|
3
|
-
export declare const SESSION_MISSING_GRACE_MS
|
|
3
|
+
export declare const SESSION_MISSING_GRACE_MS: number;
|
|
4
4
|
export declare const SESSION_READY_POLL_INTERVAL_MS = 500;
|
|
5
5
|
export declare const SESSION_READY_TIMEOUT_MS = 10000;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type RunTmuxOptions = {
|
|
2
|
+
retry?: number;
|
|
3
|
+
timeoutMs?: number;
|
|
4
|
+
};
|
|
5
|
+
export type TmuxCommandResult = {
|
|
6
|
+
success: boolean;
|
|
7
|
+
output: string;
|
|
8
|
+
stdout: string;
|
|
9
|
+
stderr: string;
|
|
10
|
+
exitCode: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function runTmuxCommand(tmuxPath: string, args: string[], options?: RunTmuxOptions): Promise<TmuxCommandResult>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TmuxConfig } from "../../../config/schema";
|
|
2
2
|
import type { SpawnPaneResult } from "../types";
|
|
3
|
-
export declare function replaceTmuxPane(paneId: string, sessionId: string, description: string, config: TmuxConfig, serverUrl: string): Promise<SpawnPaneResult>;
|
|
3
|
+
export declare function replaceTmuxPane(paneId: string, sessionId: string, description: string, config: TmuxConfig, serverUrl: string, directory: string): Promise<SpawnPaneResult>;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import type { TmuxConfig } from "../../../config/schema";
|
|
2
|
+
import { getTmuxPath } from "../../../tools/interactive-bash/tmux-path-resolver";
|
|
2
3
|
import type { SpawnPaneResult } from "../types";
|
|
4
|
+
import type { runTmuxCommand as RunTmuxCommand } from "../runner";
|
|
3
5
|
import type { SplitDirection } from "./environment";
|
|
4
|
-
|
|
6
|
+
import { isInsideTmux } from "./environment";
|
|
7
|
+
import { isServerRunning } from "./server-health";
|
|
8
|
+
type SpawnTmuxPaneDeps = {
|
|
9
|
+
log: (message: string, data?: unknown) => void;
|
|
10
|
+
runTmuxCommand: typeof RunTmuxCommand;
|
|
11
|
+
isInsideTmux: typeof isInsideTmux;
|
|
12
|
+
isServerRunning: typeof isServerRunning;
|
|
13
|
+
getTmuxPath: typeof getTmuxPath;
|
|
14
|
+
};
|
|
15
|
+
export declare function spawnTmuxPane(sessionId: string, description: string, config: TmuxConfig, serverUrl: string, directory: string, targetPaneId?: string, splitDirection?: SplitDirection, depsInput?: Partial<SpawnTmuxPaneDeps>): Promise<SpawnPaneResult>;
|
|
16
|
+
export {};
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import type { TmuxConfig } from "../../../config/schema";
|
|
2
|
+
import { getTmuxPath } from "../../../tools/interactive-bash/tmux-path-resolver";
|
|
2
3
|
import type { SpawnPaneResult } from "../types";
|
|
4
|
+
import type { runTmuxCommand as RunTmuxCommand } from "../runner";
|
|
5
|
+
import { isInsideTmux } from "./environment";
|
|
6
|
+
import { isServerRunning } from "./server-health";
|
|
7
|
+
type SpawnTmuxSessionDeps = {
|
|
8
|
+
log: (message: string, data?: unknown) => void;
|
|
9
|
+
runTmuxCommand: typeof RunTmuxCommand;
|
|
10
|
+
isInsideTmux: typeof isInsideTmux;
|
|
11
|
+
isServerRunning: typeof isServerRunning;
|
|
12
|
+
getTmuxPath: typeof getTmuxPath;
|
|
13
|
+
};
|
|
3
14
|
export declare function getIsolatedSessionName(pid?: number): string;
|
|
4
|
-
export declare function spawnTmuxSession(sessionId: string, description: string, config: TmuxConfig, serverUrl: string, sourcePaneId?: string): Promise<SpawnPaneResult>;
|
|
15
|
+
export declare function spawnTmuxSession(sessionId: string, description: string, config: TmuxConfig, serverUrl: string, directory: string, sourcePaneId?: string, depsInput?: Partial<SpawnTmuxSessionDeps>): Promise<SpawnPaneResult>;
|
|
16
|
+
export {};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type SweepTmuxSessionsDeps = {
|
|
2
2
|
isInsideTmux: () => boolean;
|
|
3
3
|
getTmuxPath: () => Promise<string | null | undefined>;
|
|
4
4
|
listCandidateSessions: (tmux: string) => Promise<string[]>;
|
|
5
5
|
killSession: (sessionName: string) => Promise<boolean>;
|
|
6
|
+
log: (message: string, payload?: unknown) => void;
|
|
7
|
+
};
|
|
8
|
+
export type SweepDeps = SweepTmuxSessionsDeps & {
|
|
6
9
|
processAlive: (pid: number) => boolean;
|
|
7
10
|
currentPid: number;
|
|
8
|
-
log: (message: string, payload?: unknown) => void;
|
|
9
11
|
};
|
|
12
|
+
export type SweepTmuxSessionsOptions = {
|
|
13
|
+
prefix?: string;
|
|
14
|
+
predicate?: (sessionName: string) => boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function sweepTmuxSessionsWith(deps: SweepTmuxSessionsDeps, options: SweepTmuxSessionsOptions): Promise<string[]>;
|
|
10
17
|
export declare function sweepStaleOmoAgentSessionsWith(deps: SweepDeps): Promise<number>;
|
|
11
18
|
export declare function sweepStaleOmoAgentSessions(): Promise<number>;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import type { TmuxConfig } from "../../../config/schema";
|
|
2
|
+
import { getTmuxPath } from "../../../tools/interactive-bash/tmux-path-resolver";
|
|
2
3
|
import type { SpawnPaneResult } from "../types";
|
|
3
|
-
|
|
4
|
+
import { isInsideTmux } from "./environment";
|
|
5
|
+
import { isServerRunning } from "./server-health";
|
|
6
|
+
import type { runTmuxCommand as RunTmuxCommand } from "../runner";
|
|
7
|
+
type SpawnTmuxWindowDeps = {
|
|
8
|
+
log: (message: string, data?: unknown) => void;
|
|
9
|
+
runTmuxCommand: typeof RunTmuxCommand;
|
|
10
|
+
isInsideTmux: typeof isInsideTmux;
|
|
11
|
+
isServerRunning: typeof isServerRunning;
|
|
12
|
+
getTmuxPath: typeof getTmuxPath;
|
|
13
|
+
};
|
|
14
|
+
export declare function spawnTmuxWindow(sessionId: string, description: string, config: TmuxConfig, serverUrl: string, directory: string, depsInput?: Partial<SpawnTmuxWindowDeps>): Promise<SpawnPaneResult>;
|
|
15
|
+
export {};
|
|
@@ -9,5 +9,5 @@ export { replaceTmuxPane } from "./tmux-utils/pane-replace";
|
|
|
9
9
|
export { spawnTmuxWindow } from "./tmux-utils/window-spawn";
|
|
10
10
|
export { spawnTmuxSession, getIsolatedSessionName } from "./tmux-utils/session-spawn";
|
|
11
11
|
export { killTmuxSessionIfExists } from "./tmux-utils/session-kill";
|
|
12
|
-
export { sweepStaleOmoAgentSessions } from "./tmux-utils/stale-session-sweep";
|
|
12
|
+
export { sweepStaleOmoAgentSessions, sweepTmuxSessionsWith } from "./tmux-utils/stale-session-sweep";
|
|
13
13
|
export { applyLayout, enforceMainPaneWidth } from "./tmux-utils/layout";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { fsyncSync } from "node:fs";
|
|
2
|
+
import type { FileHandle } from "node:fs/promises";
|
|
3
|
+
export declare function isToleratedFsyncError(error: unknown): boolean;
|
|
4
|
+
export declare function tolerantFsync(fileHandle: FileHandle, contextLabel: string): Promise<void>;
|
|
5
|
+
export declare function tolerantFsyncSync(fileDescriptor: number, contextLabel: string, fsyncImpl?: typeof fsyncSync): void;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type fsyncSync as FsyncSync } from "node:fs";
|
|
2
|
+
export declare function writeFileAtomically(filePath: string, content: string, deps?: {
|
|
3
|
+
fsyncSync?: typeof FsyncSync;
|
|
4
|
+
}): void;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
export declare function clearCallableAgentsCache(): void;
|
|
3
3
|
/**
|
|
4
|
-
* Resolves the set of callable agent names
|
|
5
|
-
* hardcoded `ALLOWED_AGENTS` with any additional agents discovered dynamically
|
|
6
|
-
* via `client.app.agents()`. Custom agents loaded from registered agent
|
|
7
|
-
* directories appear here alongside built-ins.
|
|
4
|
+
* Resolves the set of callable agent names for call_omo_agent.
|
|
8
5
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @param client - The plugin client with access to the agent registry
|
|
14
|
-
* @param sessionId - Optional session ID for cache scoping
|
|
15
|
-
* @returns Array of lowercase callable agent names (excludes primary-mode agents)
|
|
6
|
+
* This tool is deliberately narrower than delegate-task: it may only launch
|
|
7
|
+
* the research lookup agents used by worker-style agents while they continue
|
|
8
|
+
* local work. Dynamic agents and other built-ins must go through task().
|
|
16
9
|
*/
|
|
17
|
-
export declare function resolveCallableAgents(
|
|
10
|
+
export declare function resolveCallableAgents(_client?: PluginInput["client"], _sessionId?: string): Promise<string[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALLOWED_AGENTS: readonly ["explore", "librarian"
|
|
2
|
-
export declare const CALL_OMO_AGENT_DESCRIPTION = "Spawn explore/librarian agent
|
|
1
|
+
export declare const ALLOWED_AGENTS: readonly ["explore", "librarian"];
|
|
2
|
+
export declare const CALL_OMO_AGENT_DESCRIPTION = "Spawn explore/librarian agent. run_in_background REQUIRED (true=async with task_id, false=sync).\n\nAllowed agents:\n{agents}\n\nOther built-in agents, custom agents, and task categories are intentionally not supported by this tool.\n\nPass `session_id=<id>` to continue previous agent with full context. Nested subagent depth is tracked automatically and blocked past the configured limit. Prompts MUST be in English. Use `background_output` for async results.";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BuiltinCategoryDefinition } from "./builtin-category-definition";
|
|
2
2
|
export declare const DEEP_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on GOAL-ORIENTED AUTONOMOUS tasks.\n\nYou are NOT an interactive assistant. You are an autonomous problem-solver.\n\nBEFORE making ANY changes:\n1. Silently explore the codebase extensively (5-15 minutes of reading is normal)\n2. Read related files, trace dependencies, understand the full context\n3. Build a complete mental model of the problem space\n4. Do not ask clarifying questions - the goal is already defined\n\nYou receive a GOAL. When the goal includes numbered steps or phases, treat them as one atomic task broken into sub-steps, not as separate independent tasks. Figure out HOW to achieve it yourself. Thorough research before any action.\n\nSub-steps of ONE goal = execute all steps as phases of one atomic task.\nGenuinely independent tasks = flag and refuse, require separate delegations.\n\nApproach: explore extensively, understand deeply, then act decisively. Prefer comprehensive solutions over quick patches. If the goal is unclear, make reasonable assumptions and proceed.\n\nMinimal status updates. Focus on results, not play-by-play. Report completion with summary of changes.\n</Category_Context>";
|
|
3
|
+
export declare const DEEP_CATEGORY_PROMPT_APPEND_GPT_5_3_CODEX = "<Category_Context name=\"deep\">\nYou are operating in DEEP mode on GPT-5.3-Codex. This category is reserved for goal-oriented autonomous coding work on hairy problems that reward depth over speed and a complete solution over a quick patch.\n\nThe orchestrator routed you here for autonomous execution. Do not stop to ask the orchestrator for permission, do not produce an upfront plan and wait for approval, do not stop at a proof of concept.\n\n# Autonomy and persistence\n\n- Once the goal is given, gather context, implement, verify, and explain outcomes within this turn whenever feasible.\n- Persist end-to-end: do not stop at analysis or partial fixes; carry changes through implementation, verification, and a clear explanation unless you hit a genuine blocker (missing secret, design decision only the user can make, three materially different attempts all failed).\n- Bias to action: default to implementing with reasonable assumptions. Do not end your turn with clarifying questions unless truly blocked. Document assumptions in the final message instead.\n- Avoid excessive looping. If you find yourself re-reading or re-editing the same files without clear progress, stop and end the turn with a concise summary and any clarifying questions needed.\n\n# Goal, not plan\n\nYou receive a GOAL describing the desired outcome. You figure out HOW. The orchestrator deliberately did not hand you a step-by-step plan; producing one and pausing for approval is not what was asked.\n\nWhen the goal contains numbered steps or phases, treat them as sub-steps of ONE atomic task and execute them all in this turn. Splitting them across turns is wrong unless they reveal an architectural blocker that requires the user's input. If the steps turn out to be genuinely independent tasks that should have been separate delegations, flag that in your final message and refuse the ones beyond scope.\n\n# Exploration\n\n- Think first. Before any tool call, decide ALL files and resources you will need.\n- Batch everything. If you need multiple files (even from different places), read them together using parallel tool calls.\n- Always maximize parallelism: never read files one-by-one unless logically unavoidable. For broader questions fire 2-5 explore/librarian sub-agents in parallel.\n- Workflow: (a) plan all needed reads, (b) issue one parallel batch, (c) analyze results, (d) repeat if new unpredictable reads arise. Sequential reads only when you truly cannot know the next file without seeing a prior result first.\n\nBuild a complete mental model before the first edit. Exploration is an investment, not overhead - the orchestrator routed depth tasks here specifically because rushing to implementation is the failure mode.\n\n# Code implementation\n\n- Discerning engineer mindset: optimize for correctness, clarity, and reliability over speed. Cover the root cause, not just a symptom or a narrow slice. Trace at least two levels up before settling - a null check around `foo()` is a symptom; fixing what causes `foo()` to return unexpected values is the root.\n- Conform to codebase conventions: follow existing patterns, helpers, naming, formatting, localization. If you must diverge, state why.\n- Behavior-safe defaults: preserve intended behavior and UX; gate or flag intentional changes; add tests when behavior shifts.\n- Tight error handling: no broad try/catch blocks, no success-shaped fallbacks; propagate or surface errors explicitly. No silent failures - do not early-return on invalid input without logging consistent with repo patterns.\n- Efficient, coherent edits: read enough context before changing a file; batch logical edits together rather than thrashing with many tiny patches.\n- Type safety: changes must pass build and type-check; avoid `as any` or `as unknown as ...`; prefer proper types and guards; reuse existing helpers.\n- Reuse / DRY: search for prior art before adding helpers; reuse or extract a shared helper instead of duplicating.\n- Ambition scaled to context: greenfield = strong defaults, avoid AI-slop, produce work you would hand to another senior engineer. Existing codebase = surgical, respect existing patterns. Depth does not mean invasiveness.\n\n# Completion bar\n\n\"Simplified version\", \"proof of concept\", and \"you can extend this later\" are not acceptable for a deep task. The orchestrator routed here specifically for a complete solution. If you hit a genuine blocker, document it and return; otherwise, finish the task.\n\n# Worktree safety\n\n- NEVER revert existing changes you did not make unless explicitly requested - those changes were made by the user.\n- If asked to commit and there are unrelated changes in those files, do not revert them.\n- If you notice unexpected changes you did not make in unrelated files, ignore them.\n- If you notice unexpected mid-rollout changes you did not make and are not sure how to proceed, stop and ask.\n- NEVER use destructive commands like `git reset --hard` or `git checkout --` unless explicitly requested.\n\n# Status cadence\n\nThe user is not on the other side of this conversation; the orchestrator is, and they will synthesize your progress. Send commentary only at meaningful phase transitions (starting exploration, starting implementation, starting verification, hitting a genuine blocker). Do not narrate every tool call; silence during focused work is expected.\n\nIf you used a planning tool, mark every previously stated intention as Done, Blocked (one-sentence reason + targeted question), or Cancelled (with reason) before finishing. Do not end with in_progress or pending items.\n\n# Final message\n\n- Be concise; pragmatic, not chatty. Higher actionable information per token; fewer social flourishes.\n- Lead with a quick explanation of the change, then context covering where and why. Do not start with \"Summary\"; jump in.\n- Reference paths only - do not dump file contents. Do not say \"save/copy this file\" - the user is on the same machine.\n- For substantial work, summarize clearly with high-level headings.\n- File references: inline code with standalone path. Examples: `src/app.ts`, `src/app.ts:42`. Do not use `file://`, `vscode://`, or `https://` URIs. Do not provide line ranges.\n- Suggest natural next steps (tests, commits, build) only if there are real ones; otherwise omit.\n</Category_Context>";
|
|
3
4
|
export declare const DEEP_CATEGORY_PROMPT_APPEND_GPT_5_5 = "<Category_Context name=\"deep\">\nYou are operating in DEEP mode. This is the category reserved for goal-oriented autonomous work on hairy problems that reward thorough exploration and comprehensive solutions.\n\nThe orchestrator chose this category because the task benefits from depth over speed. You should feel empowered to spend the time needed: five to fifteen minutes of silent exploration before the first edit is normal and correct. Rushing to implementation on a deep task is a failure mode, not a feature.\n\n# How deep mode adjusts the base behavior\n\n**Exploration budget: generous.** Read the files you need, trace dependencies both directions, fire 2-5 explore/librarian sub-agents in parallel for broader questions. Build a complete mental model before the first `apply_patch`. Exploration here is an investment, not overhead.\n\n**Goal, not plan.** You receive a GOAL describing the desired outcome. You figure out HOW to achieve it. The orchestrator deliberately did not hand you a step-by-step plan; producing one and asking for approval is not what was asked. Execute.\n\n**Atomic task treatment.** When the goal contains numbered steps or phases, treat them as sub-steps of ONE task and execute them all in this turn. Splitting them across turns is wrong unless they reveal an architectural blocker that requires the user's input. If the \"steps\" turn out to be genuinely independent tasks that should have been separate delegations, flag that in your final message and refuse the ones beyond scope.\n\n**Root cause bias.** Prefer root-cause fixes over symptom fixes. A null check around `foo()` is a symptom fix; fixing whatever causes `foo()` to return unexpected values is the root fix. Trace at least two levels up before settling on an answer. In deep mode, you have permission (and the expectation) to do the deeper fix.\n\n**Ambition scaled to context.** For brand-new greenfield work, be ambitious. Choose strong defaults, avoid AI-slop aesthetics, produce something you would be proud to hand to another senior engineer. For changes in an existing codebase, be surgical and respect the existing patterns; depth does not mean invasiveness.\n\n**Completion bar: full delivery.** \"Simplified version\", \"proof of concept\", and \"you can extend this later\" are not acceptable deliveries for a deep task. The orchestrator routed here specifically for a complete solution. If you hit a genuine blocker (missing secret, design decision only the user can make, three materially different attempts all failed), document it and return; otherwise, finish the task.\n\n**Status cadence: sparse.** The user is not on the other side of this conversation; the orchestrator is, and they will synthesize your progress. Send commentary only at meaningful phase transitions (starting exploration, starting implementation, starting verification, hitting a genuine blocker). Do not narrate every tool call; silence during focused work is expected.\n</Category_Context>";
|
|
4
5
|
export declare function resolveDeepCategoryPromptAppend(model: string | undefined): string;
|
|
5
6
|
export declare const OPENAI_CATEGORIES: BuiltinCategoryDefinition[];
|
|
@@ -3,6 +3,7 @@ export declare function resolveSkillContent(skills: string[], options: {
|
|
|
3
3
|
gitMasterConfig?: GitMasterConfig;
|
|
4
4
|
browserProvider?: BrowserAutomationProvider;
|
|
5
5
|
disabledSkills?: Set<string>;
|
|
6
|
+
teamModeEnabled?: boolean;
|
|
6
7
|
directory?: string;
|
|
7
8
|
}): Promise<{
|
|
8
9
|
content: string | undefined;
|
|
@@ -2,7 +2,11 @@ import type { DelegateTaskArgs } from "./types";
|
|
|
2
2
|
import type { ExecutorContext } from "./executor-types";
|
|
3
3
|
import type { DelegatedModelConfig } from "./types";
|
|
4
4
|
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
5
|
-
export
|
|
5
|
+
export interface ResolveSubagentExecutionOptions {
|
|
6
|
+
allowSisyphusJuniorDirect?: boolean;
|
|
7
|
+
allowPrimaryAgentDelegation?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function resolveSubagentExecution(args: DelegateTaskArgs, executorCtx: ExecutorContext, parentAgent: string | undefined, categoryExamples: string, options?: ResolveSubagentExecutionOptions): Promise<{
|
|
6
10
|
agentToUse: string;
|
|
7
11
|
categoryModel: DelegatedModelConfig | undefined;
|
|
8
12
|
fallbackChain?: FallbackEntry[];
|
|
@@ -11,6 +11,7 @@ export declare function sendSyncPrompt(client: OpencodeClient, input: {
|
|
|
11
11
|
args: DelegateTaskArgs;
|
|
12
12
|
systemContent: string | undefined;
|
|
13
13
|
categoryModel: DelegatedModelConfig | undefined;
|
|
14
|
+
directory: string;
|
|
14
15
|
toastManager: {
|
|
15
16
|
removeTask: (id: string) => void;
|
|
16
17
|
} | null | undefined;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { OpencodeClient } from "./types";
|
|
2
|
-
export declare function fetchSyncResult(client: OpencodeClient, sessionID: string, anchorMessageCount?: number
|
|
2
|
+
export declare function fetchSyncResult(client: OpencodeClient, sessionID: string, anchorMessageCount?: number, options?: {
|
|
3
|
+
strictAbortRecovery?: boolean;
|
|
4
|
+
}): Promise<{
|
|
3
5
|
ok: true;
|
|
4
6
|
textContent: string;
|
|
5
7
|
} | {
|
|
@@ -57,6 +57,7 @@ export interface DelegateTaskToolOptions {
|
|
|
57
57
|
sisyphusJuniorModel?: string;
|
|
58
58
|
browserProvider?: BrowserAutomationProvider;
|
|
59
59
|
disabledSkills?: Set<string>;
|
|
60
|
+
teamModeEnabled?: boolean;
|
|
60
61
|
availableCategories?: AvailableCategory[];
|
|
61
62
|
availableSkills?: AvailableSkill[];
|
|
62
63
|
agentOverrides?: AgentOverrides;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -17,5 +17,6 @@ export { createLookAt } from "./look-at";
|
|
|
17
17
|
export { createDelegateTask } from "./delegate-task";
|
|
18
18
|
export { createTaskCreateTool, createTaskGetTool, createTaskList, createTaskUpdateTool, } from "./task";
|
|
19
19
|
export { createHashlineEditTool } from "./hashline-edit";
|
|
20
|
+
export { createTeamSendMessageTool } from "../features/team-mode/tools/messaging";
|
|
20
21
|
export declare function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition>;
|
|
21
22
|
export declare const builtinTools: Record<string, ToolDefinition>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const DEFAULT_TIMEOUT_MS = 60000;
|
|
2
2
|
export declare const BLOCKED_TMUX_SUBCOMMANDS: string[];
|
|
3
|
+
export declare const PROHIBITED_TMUX_SUBCOMMANDS: string[];
|
|
3
4
|
export declare const INTERACTIVE_BASH_DESCRIPTION = "WARNING: This is TMUX ONLY. Pass tmux subcommands directly (without 'tmux' prefix).\n\nExamples: new-session -d -s omo-dev, send-keys -t omo-dev \"vim\" Enter\n\nFor TUI apps needing ongoing interaction (vim, htop, pudb). One-shot commands \u2192 use Bash with &.";
|
|
@@ -32,6 +32,8 @@ export interface SkillLoadOptions {
|
|
|
32
32
|
disabledSkills?: Set<string>;
|
|
33
33
|
/** Browser automation provider for provider-gated skill filtering */
|
|
34
34
|
browserProvider?: BrowserAutomationProvider;
|
|
35
|
+
/** Whether team mode built-in docs should be exposed */
|
|
36
|
+
teamModeEnabled?: boolean;
|
|
35
37
|
/** Include Claude marketplace plugin commands in discovery (default: true) */
|
|
36
38
|
pluginsEnabled?: boolean;
|
|
37
39
|
/** Override plugin enablement from Claude settings by plugin key */
|