@wolfx/oh-my-openagent 3.17.14 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +153 -113
- package/README.ko.md +196 -149
- package/README.md +53 -50
- package/README.ru.md +92 -70
- package/README.zh-cn.md +112 -71
- package/dist/agents/agent-skill-resolution.d.ts +1 -0
- 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/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 +1 -0
- package/dist/config/schema/keyword-detector.d.ts +21 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +70 -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 +3 -0
- package/dist/features/background-agent/manager.d.ts +3 -0
- package/dist/features/background-agent/types.d.ts +4 -0
- package/dist/features/boulder-state/storage.d.ts +1 -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/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/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/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/hooks/atlas/atlas-hook.d.ts +1 -1
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +2 -3
- package/dist/hooks/atlas/recent-model-resolver.d.ts +9 -1
- package/dist/hooks/atlas/tool-execute-after.d.ts +2 -1
- package/dist/hooks/atlas/tool-execute-before.d.ts +1 -0
- package/dist/hooks/atlas/types.d.ts +8 -2
- package/dist/hooks/index.d.ts +3 -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/session-recovery/recover-tool-result-missing.d.ts +2 -2
- 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 +38 -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/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 +89536 -80765
- package/dist/oh-my-opencode.schema.json +191 -47
- package/dist/plugin/hooks/create-core-hooks.d.ts +3 -0
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -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/tool-registry.d.ts +16 -0
- package/dist/shared/bun-spawn-shim.d.ts +40 -0
- package/dist/shared/project-discovery-dirs.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +1 -0
- package/dist/shared/tmux/constants.d.ts +1 -1
- package/dist/shared/tmux/index.d.ts +1 -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/spawn-process.d.ts +1 -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/tools/delegate-task/openai-categories.d.ts +1 -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/types.d.ts +1 -0
- package/dist/tools/index.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 -1
|
@@ -62,12 +62,12 @@ export declare const MemberSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
62
62
|
subagent_type: z.ZodString;
|
|
63
63
|
prompt: z.ZodOptional<z.ZodString>;
|
|
64
64
|
}, z.core.$strict>], "kind">;
|
|
65
|
-
export declare const TeamSpecSchema: z.ZodObject<{
|
|
66
|
-
version: z.ZodLiteral<1
|
|
65
|
+
export declare const TeamSpecSchema: z.ZodPipe<z.ZodObject<{
|
|
66
|
+
version: z.ZodDefault<z.ZodLiteral<1>>;
|
|
67
67
|
name: z.ZodString;
|
|
68
68
|
description: z.ZodOptional<z.ZodString>;
|
|
69
|
-
createdAt: z.ZodNumber
|
|
70
|
-
leadAgentId: z.ZodString
|
|
69
|
+
createdAt: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
leadAgentId: z.ZodOptional<z.ZodString>;
|
|
71
71
|
teamAllowedPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
72
|
sessionPermission: z.ZodOptional<z.ZodString>;
|
|
73
73
|
members: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -99,7 +99,69 @@ export declare const TeamSpecSchema: z.ZodObject<{
|
|
|
99
99
|
subagent_type: z.ZodString;
|
|
100
100
|
prompt: z.ZodOptional<z.ZodString>;
|
|
101
101
|
}, z.core.$strict>], "kind">>;
|
|
102
|
-
}, z.core.$strip
|
|
102
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
103
|
+
version: 1;
|
|
104
|
+
name: string;
|
|
105
|
+
createdAt: number;
|
|
106
|
+
members: ({
|
|
107
|
+
name: string;
|
|
108
|
+
backendType: "tmux" | "in-process";
|
|
109
|
+
isActive: boolean;
|
|
110
|
+
kind: "category";
|
|
111
|
+
category: string;
|
|
112
|
+
prompt: string;
|
|
113
|
+
cwd?: string | undefined;
|
|
114
|
+
worktreePath?: string | undefined;
|
|
115
|
+
subscriptions?: string[] | undefined;
|
|
116
|
+
color?: string | undefined;
|
|
117
|
+
} | {
|
|
118
|
+
name: string;
|
|
119
|
+
backendType: "tmux" | "in-process";
|
|
120
|
+
isActive: boolean;
|
|
121
|
+
kind: "subagent_type";
|
|
122
|
+
subagent_type: string;
|
|
123
|
+
cwd?: string | undefined;
|
|
124
|
+
worktreePath?: string | undefined;
|
|
125
|
+
subscriptions?: string[] | undefined;
|
|
126
|
+
color?: string | undefined;
|
|
127
|
+
prompt?: string | undefined;
|
|
128
|
+
})[];
|
|
129
|
+
description?: string | undefined;
|
|
130
|
+
leadAgentId?: string | undefined;
|
|
131
|
+
teamAllowedPaths?: string[] | undefined;
|
|
132
|
+
sessionPermission?: string | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
version: 1;
|
|
135
|
+
name: string;
|
|
136
|
+
createdAt: number;
|
|
137
|
+
members: ({
|
|
138
|
+
name: string;
|
|
139
|
+
backendType: "tmux" | "in-process";
|
|
140
|
+
isActive: boolean;
|
|
141
|
+
kind: "category";
|
|
142
|
+
category: string;
|
|
143
|
+
prompt: string;
|
|
144
|
+
cwd?: string | undefined;
|
|
145
|
+
worktreePath?: string | undefined;
|
|
146
|
+
subscriptions?: string[] | undefined;
|
|
147
|
+
color?: string | undefined;
|
|
148
|
+
} | {
|
|
149
|
+
name: string;
|
|
150
|
+
backendType: "tmux" | "in-process";
|
|
151
|
+
isActive: boolean;
|
|
152
|
+
kind: "subagent_type";
|
|
153
|
+
subagent_type: string;
|
|
154
|
+
cwd?: string | undefined;
|
|
155
|
+
worktreePath?: string | undefined;
|
|
156
|
+
subscriptions?: string[] | undefined;
|
|
157
|
+
color?: string | undefined;
|
|
158
|
+
prompt?: string | undefined;
|
|
159
|
+
})[];
|
|
160
|
+
description?: string | undefined;
|
|
161
|
+
leadAgentId?: string | undefined;
|
|
162
|
+
teamAllowedPaths?: string[] | undefined;
|
|
163
|
+
sessionPermission?: string | undefined;
|
|
164
|
+
}>>;
|
|
103
165
|
export declare const MessageSchema: z.ZodObject<{
|
|
104
166
|
version: z.ZodLiteral<1>;
|
|
105
167
|
messageId: z.ZodString;
|
|
@@ -143,6 +205,46 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
143
205
|
updatedAt: z.ZodNumber;
|
|
144
206
|
claimedAt: z.ZodOptional<z.ZodNumber>;
|
|
145
207
|
}, z.core.$strip>;
|
|
208
|
+
declare const RuntimeStateMemberSchema: z.ZodObject<{
|
|
209
|
+
name: z.ZodString;
|
|
210
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
211
|
+
tmuxPaneId: z.ZodOptional<z.ZodString>;
|
|
212
|
+
tmuxGridPaneId: z.ZodOptional<z.ZodString>;
|
|
213
|
+
agentType: z.ZodEnum<{
|
|
214
|
+
leader: "leader";
|
|
215
|
+
"general-purpose": "general-purpose";
|
|
216
|
+
}>;
|
|
217
|
+
subagent_type: z.ZodOptional<z.ZodString>;
|
|
218
|
+
category: z.ZodOptional<z.ZodString>;
|
|
219
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
providerID: z.ZodString;
|
|
221
|
+
modelID: z.ZodString;
|
|
222
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
223
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
224
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
225
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
thinking: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
type: z.ZodEnum<{
|
|
229
|
+
enabled: "enabled";
|
|
230
|
+
disabled: "disabled";
|
|
231
|
+
}>;
|
|
232
|
+
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
}, z.core.$strict>>;
|
|
235
|
+
status: z.ZodEnum<{
|
|
236
|
+
pending: "pending";
|
|
237
|
+
completed: "completed";
|
|
238
|
+
running: "running";
|
|
239
|
+
idle: "idle";
|
|
240
|
+
shutdown_approved: "shutdown_approved";
|
|
241
|
+
errored: "errored";
|
|
242
|
+
}>;
|
|
243
|
+
color: z.ZodOptional<z.ZodString>;
|
|
244
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
245
|
+
lastInjectedTurnMarker: z.ZodOptional<z.ZodString>;
|
|
246
|
+
pendingInjectedMessageIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
247
|
+
}, z.core.$strict>;
|
|
146
248
|
export declare const RuntimeStateSchema: z.ZodObject<{
|
|
147
249
|
version: z.ZodLiteral<1>;
|
|
148
250
|
teamRunId: z.ZodString;
|
|
@@ -162,14 +264,39 @@ export declare const RuntimeStateSchema: z.ZodObject<{
|
|
|
162
264
|
orphaned: "orphaned";
|
|
163
265
|
}>;
|
|
164
266
|
leadSessionId: z.ZodOptional<z.ZodString>;
|
|
267
|
+
tmuxLayout: z.ZodOptional<z.ZodObject<{
|
|
268
|
+
ownedSession: z.ZodBoolean;
|
|
269
|
+
targetSessionId: z.ZodString;
|
|
270
|
+
focusWindowId: z.ZodOptional<z.ZodString>;
|
|
271
|
+
gridWindowId: z.ZodOptional<z.ZodString>;
|
|
272
|
+
}, z.core.$strict>>;
|
|
165
273
|
members: z.ZodArray<z.ZodObject<{
|
|
166
274
|
name: z.ZodString;
|
|
167
275
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
168
276
|
tmuxPaneId: z.ZodOptional<z.ZodString>;
|
|
277
|
+
tmuxGridPaneId: z.ZodOptional<z.ZodString>;
|
|
169
278
|
agentType: z.ZodEnum<{
|
|
170
279
|
leader: "leader";
|
|
171
280
|
"general-purpose": "general-purpose";
|
|
172
281
|
}>;
|
|
282
|
+
subagent_type: z.ZodOptional<z.ZodString>;
|
|
283
|
+
category: z.ZodOptional<z.ZodString>;
|
|
284
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
285
|
+
providerID: z.ZodString;
|
|
286
|
+
modelID: z.ZodString;
|
|
287
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
288
|
+
reasoningEffort: z.ZodOptional<z.ZodString>;
|
|
289
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
291
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
thinking: z.ZodOptional<z.ZodObject<{
|
|
293
|
+
type: z.ZodEnum<{
|
|
294
|
+
enabled: "enabled";
|
|
295
|
+
disabled: "disabled";
|
|
296
|
+
}>;
|
|
297
|
+
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
298
|
+
}, z.core.$strip>>;
|
|
299
|
+
}, z.core.$strict>>;
|
|
173
300
|
status: z.ZodEnum<{
|
|
174
301
|
pending: "pending";
|
|
175
302
|
completed: "completed";
|
|
@@ -185,9 +312,11 @@ export declare const RuntimeStateSchema: z.ZodObject<{
|
|
|
185
312
|
}, z.core.$strict>>;
|
|
186
313
|
shutdownRequests: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
187
314
|
memberId: z.ZodString;
|
|
315
|
+
requesterName: z.ZodString;
|
|
188
316
|
requestedAt: z.ZodNumber;
|
|
189
317
|
approvedAt: z.ZodOptional<z.ZodNumber>;
|
|
190
318
|
rejectedReason: z.ZodOptional<z.ZodString>;
|
|
319
|
+
rejectedAt: z.ZodOptional<z.ZodNumber>;
|
|
191
320
|
}, z.core.$strict>>>;
|
|
192
321
|
bounds: z.ZodObject<{
|
|
193
322
|
maxMembers: z.ZodDefault<z.ZodNumber>;
|
|
@@ -201,10 +330,13 @@ export declare const AGENT_ELIGIBILITY_REGISTRY: Readonly<Record<string, {
|
|
|
201
330
|
verdict: "eligible" | "conditional" | "hard-reject";
|
|
202
331
|
rejectionMessage?: string;
|
|
203
332
|
}>>;
|
|
333
|
+
export declare function parseMember(input: unknown): Member;
|
|
204
334
|
export type TeamSpec = z.infer<typeof TeamSpecSchema>;
|
|
205
335
|
export type Member = z.infer<typeof MemberSchema>;
|
|
206
336
|
export type CategoryMember = z.infer<typeof CategoryMemberSchema>;
|
|
207
337
|
export type SubagentMember = z.infer<typeof SubagentMemberSchema>;
|
|
208
338
|
export type Message = z.infer<typeof MessageSchema>;
|
|
209
339
|
export type Task = z.infer<typeof TaskSchema>;
|
|
340
|
+
export type RuntimeStateMember = z.infer<typeof RuntimeStateMemberSchema>;
|
|
210
341
|
export type RuntimeState = z.infer<typeof RuntimeStateSchema>;
|
|
342
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const ATTACHABLE_SESSION_STATUSES: readonly ["idle", "running"];
|
|
2
|
+
export type AttachableSessionStatus = (typeof ATTACHABLE_SESSION_STATUSES)[number];
|
|
3
|
+
export declare function isAttachableSessionStatus(status: string | undefined): status is AttachableSessionStatus;
|
|
4
|
+
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { TmuxConfig } from "../../config/schema";
|
|
3
|
+
import type { WindowState } from "./types";
|
|
4
|
+
import * as sharedModule from "../../shared";
|
|
5
|
+
type OpencodeClient = PluginInput["client"];
|
|
3
6
|
interface SessionCreatedEvent {
|
|
4
7
|
type: string;
|
|
5
8
|
properties?: {
|
|
@@ -13,14 +16,24 @@ interface SessionCreatedEvent {
|
|
|
13
16
|
export interface TmuxUtilDeps {
|
|
14
17
|
isInsideTmux: () => boolean;
|
|
15
18
|
getCurrentPaneId: () => string | undefined;
|
|
19
|
+
queryWindowState: (paneId: string) => Promise<WindowState | null>;
|
|
20
|
+
waitForSessionReady: (params: {
|
|
21
|
+
client: OpencodeClient;
|
|
22
|
+
sessionId: string;
|
|
23
|
+
}) => Promise<boolean>;
|
|
24
|
+
log: typeof sharedModule.log;
|
|
16
25
|
}
|
|
17
26
|
export declare class TmuxSessionManager {
|
|
18
27
|
private client;
|
|
19
28
|
private tmuxConfig;
|
|
29
|
+
private projectDirectory;
|
|
20
30
|
private serverUrl;
|
|
21
31
|
private sourcePaneId;
|
|
22
32
|
private sessions;
|
|
23
33
|
private pendingSessions;
|
|
34
|
+
private failedReadinessSessions;
|
|
35
|
+
private closedByPolling;
|
|
36
|
+
private failedReadinessSweepInterval?;
|
|
24
37
|
private spawnQueue;
|
|
25
38
|
private deferredSessions;
|
|
26
39
|
private deferredQueue;
|
|
@@ -34,7 +47,7 @@ export declare class TmuxSessionManager {
|
|
|
34
47
|
private isolatedContainerNullStateCount;
|
|
35
48
|
private staleSweepCompleted;
|
|
36
49
|
private staleSweepInProgress;
|
|
37
|
-
constructor(ctx: PluginInput, tmuxConfig: TmuxConfig, deps?: TmuxUtilDeps);
|
|
50
|
+
constructor(ctx: PluginInput, tmuxConfig: TmuxConfig, deps?: Partial<TmuxUtilDeps>);
|
|
38
51
|
private isEnabled;
|
|
39
52
|
private isIsolated;
|
|
40
53
|
private getEffectiveSourcePaneId;
|
|
@@ -42,11 +55,14 @@ export declare class TmuxSessionManager {
|
|
|
42
55
|
private getCapacityConfig;
|
|
43
56
|
private getSessionMappings;
|
|
44
57
|
getTrackedPaneId(sessionId: string): string | undefined;
|
|
58
|
+
getServerUrl(): string;
|
|
45
59
|
private removeTrackedSession;
|
|
46
60
|
private reassignIsolatedContainerAnchor;
|
|
47
61
|
private cleanupIsolatedContainerAfterSessionDeletion;
|
|
48
62
|
private markSessionClosePending;
|
|
49
63
|
private queryWindowStateSafely;
|
|
64
|
+
private windowStateContainsPane;
|
|
65
|
+
private finalizeForceRemoveCandidate;
|
|
50
66
|
private closeTrackedSessionPane;
|
|
51
67
|
private finalizeTrackedSessionClose;
|
|
52
68
|
private closeTrackedSession;
|
|
@@ -55,15 +71,28 @@ export declare class TmuxSessionManager {
|
|
|
55
71
|
private removeDeferredSession;
|
|
56
72
|
private startDeferredAttachLoop;
|
|
57
73
|
private stopDeferredAttachLoop;
|
|
74
|
+
private beginPendingSession;
|
|
75
|
+
private ensureSessionReadyBeforeSpawn;
|
|
76
|
+
private getSessionStatusType;
|
|
77
|
+
private rememberFailedReadinessSession;
|
|
78
|
+
private clearFailedReadinessSession;
|
|
79
|
+
private startFailedReadinessSweep;
|
|
80
|
+
private stopFailedReadinessSweep;
|
|
81
|
+
private isFailedReadinessSessionExpired;
|
|
82
|
+
private sweepExpiredFailedReadinessSessions;
|
|
83
|
+
private getFailedReadinessSession;
|
|
84
|
+
private spawnPendingSession;
|
|
85
|
+
private getEventSessionId;
|
|
86
|
+
private retryFailedReadinessSession;
|
|
58
87
|
private tryAttachDeferredSession;
|
|
59
|
-
private logSessionReadinessInBackground;
|
|
60
|
-
private waitForSessionReady;
|
|
61
88
|
onSessionCreated(event: SessionCreatedEvent): Promise<void>;
|
|
62
89
|
private enqueueSpawn;
|
|
63
90
|
onSessionDeleted(event: {
|
|
64
91
|
sessionID: string;
|
|
65
92
|
}): Promise<void>;
|
|
66
93
|
private closeSessionById;
|
|
94
|
+
private closeSessionFromPolling;
|
|
95
|
+
private shouldSkipRespawnAfterPollingClose;
|
|
67
96
|
onEvent(event: {
|
|
68
97
|
type: string;
|
|
69
98
|
properties?: Record<string, unknown>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import type { WindowState } from "./types";
|
|
2
|
+
import { getTmuxPath } from "../../tools/interactive-bash/tmux-path-resolver";
|
|
3
|
+
import { log } from "../../shared";
|
|
4
|
+
import type { TmuxCommandResult } from "../../shared/tmux";
|
|
5
|
+
type QueryWindowStateDeps = {
|
|
6
|
+
getTmuxPath: typeof getTmuxPath;
|
|
7
|
+
runTmuxCommand: (tmuxPath: string, args: string[]) => Promise<TmuxCommandResult>;
|
|
8
|
+
log: typeof log;
|
|
9
|
+
};
|
|
10
|
+
export declare function queryWindowStateWithDeps(sourcePaneId: string, deps: QueryWindowStateDeps): Promise<WindowState | null>;
|
|
2
11
|
export declare function queryWindowState(sourcePaneId: string): Promise<WindowState | null>;
|
|
12
|
+
export {};
|
|
@@ -12,6 +12,7 @@ export interface SessionPollingController {
|
|
|
12
12
|
export declare function createSessionPollingController(params: {
|
|
13
13
|
client: OpencodeClient;
|
|
14
14
|
tmuxConfig: TmuxConfig;
|
|
15
|
+
directory: string;
|
|
15
16
|
serverUrl: string;
|
|
16
17
|
sourcePaneId: string | undefined;
|
|
17
18
|
sessions: Map<string, TrackedSession>;
|
|
@@ -15,5 +15,5 @@ export declare function createAtlasHook(ctx: PluginInput, options?: AtlasHookOpt
|
|
|
15
15
|
args: Record<string, unknown>;
|
|
16
16
|
message?: string;
|
|
17
17
|
}) => Promise<void>;
|
|
18
|
-
"tool.execute.after": (toolInput: import("./types").ToolExecuteAfterInput, toolOutput: import("./types").ToolExecuteAfterOutput) => Promise<void>;
|
|
18
|
+
"tool.execute.after": (toolInput: import("./types").ToolExecuteAfterInput, toolOutput: import("./types").ToolExecuteAfterOutput | undefined) => Promise<void>;
|
|
19
19
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type {
|
|
3
|
-
import type { SessionState } from "./types";
|
|
2
|
+
import type { BackgroundTaskStatusProvider, SessionState } from "./types";
|
|
4
3
|
export type BoulderContinuationResult = "injected" | "skipped_background_tasks" | "skipped_agent_unavailable" | "failed";
|
|
5
4
|
export declare function injectBoulderContinuation(input: {
|
|
6
5
|
ctx: PluginInput;
|
|
@@ -12,6 +11,6 @@ export declare function injectBoulderContinuation(input: {
|
|
|
12
11
|
worktreePath?: string;
|
|
13
12
|
preferredTaskSessionId?: string;
|
|
14
13
|
preferredTaskTitle?: string;
|
|
15
|
-
backgroundManager?:
|
|
14
|
+
backgroundManager?: BackgroundTaskStatusProvider;
|
|
16
15
|
sessionState: SessionState;
|
|
17
16
|
}): Promise<BoulderContinuationResult>;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import { findNearestMessageWithFields, findNearestMessageWithFieldsFromSDK } from "../../features/hook-message-injector";
|
|
3
|
+
import { getMessageDir, isSqliteBackend } from "../../shared";
|
|
2
4
|
import type { ModelInfo } from "./types";
|
|
3
5
|
type PromptContext = {
|
|
4
6
|
model?: ModelInfo;
|
|
5
7
|
tools?: Record<string, boolean>;
|
|
6
8
|
};
|
|
7
|
-
|
|
9
|
+
type RecentPromptContextDeps = {
|
|
10
|
+
isSqliteBackend: typeof isSqliteBackend;
|
|
11
|
+
getMessageDir: typeof getMessageDir;
|
|
12
|
+
findNearestMessageWithFields: typeof findNearestMessageWithFields;
|
|
13
|
+
findNearestMessageWithFieldsFromSDK: typeof findNearestMessageWithFieldsFromSDK;
|
|
14
|
+
};
|
|
15
|
+
export declare function resolveRecentPromptContextForSession(ctx: PluginInput, sessionID: string, deps?: RecentPromptContextDeps): Promise<PromptContext>;
|
|
8
16
|
export declare function resolveRecentModelForSession(ctx: PluginInput, sessionID: string): Promise<ModelInfo | undefined>;
|
|
9
17
|
export {};
|
|
@@ -7,4 +7,5 @@ export declare function createToolExecuteAfterHandler(input: {
|
|
|
7
7
|
pendingTaskRefs: Map<string, PendingTaskRef>;
|
|
8
8
|
autoCommit: boolean;
|
|
9
9
|
getState: (sessionID: string) => SessionState;
|
|
10
|
-
|
|
10
|
+
isCallerOrchestrator?: (sessionID: string | undefined) => Promise<boolean>;
|
|
11
|
+
}): (toolInput: ToolExecuteAfterInput, toolOutput: ToolExecuteAfterOutput | undefined) => Promise<void>;
|
|
@@ -4,6 +4,7 @@ export declare function createToolExecuteBeforeHandler(input: {
|
|
|
4
4
|
ctx: PluginInput;
|
|
5
5
|
pendingFilePaths: Map<string, string>;
|
|
6
6
|
pendingTaskRefs: Map<string, PendingTaskRef>;
|
|
7
|
+
isCallerOrchestrator?: (sessionID: string | undefined) => Promise<boolean>;
|
|
7
8
|
}): (toolInput: {
|
|
8
9
|
tool: string;
|
|
9
10
|
sessionID?: string;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import type { AgentOverrides } from "../../config";
|
|
2
|
-
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
2
|
import type { TopLevelTaskRef } from "../../features/boulder-state";
|
|
4
3
|
export type ModelInfo = {
|
|
5
4
|
providerID: string;
|
|
6
5
|
modelID: string;
|
|
7
6
|
variant?: string;
|
|
8
7
|
};
|
|
8
|
+
export interface BackgroundTaskStatusProvider {
|
|
9
|
+
getTasksByParentSession: (sessionID: string) => Array<{
|
|
10
|
+
status: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
9
13
|
export interface AtlasHookOptions {
|
|
10
14
|
directory: string;
|
|
11
|
-
backgroundManager?:
|
|
15
|
+
backgroundManager?: BackgroundTaskStatusProvider;
|
|
12
16
|
isContinuationStopped?: (sessionID: string) => boolean;
|
|
17
|
+
isCallerOrchestrator?: (sessionID: string | undefined) => Promise<boolean>;
|
|
13
18
|
agentOverrides?: AgentOverrides;
|
|
14
19
|
/** Enable auto-commit after each atomic task completion (default: true) */
|
|
15
20
|
autoCommit?: boolean;
|
|
@@ -38,6 +43,7 @@ export type PendingTaskRef = {
|
|
|
38
43
|
};
|
|
39
44
|
export interface SessionState {
|
|
40
45
|
lastEventWasAbortError?: boolean;
|
|
46
|
+
skipNextIdleAfterRuntimeErrorRetry?: boolean;
|
|
41
47
|
lastContinuationInjectedAt?: number;
|
|
42
48
|
isInjectingContinuation?: boolean;
|
|
43
49
|
promptFailureCount: number;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export { createKeywordDetectorHook } from "./keyword-detector";
|
|
|
23
23
|
export { createNonInteractiveEnvHook } from "./non-interactive-env";
|
|
24
24
|
export { createInteractiveBashSessionHook } from "./interactive-bash-session";
|
|
25
25
|
export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
|
|
26
|
+
export { createTeamMailboxInjector } from "./team-mailbox-injector";
|
|
27
|
+
export { createTeamModeStatusInjector } from "./team-mode-status-injector";
|
|
26
28
|
export { createToolPairValidatorHook } from "./tool-pair-validator";
|
|
27
29
|
export { createCategorySkillReminderHook } from "./category-skill-reminder";
|
|
28
30
|
export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
|
|
@@ -35,6 +37,7 @@ export { createSisyphusJuniorNotepadHook } from "./sisyphus-junior-notepad";
|
|
|
35
37
|
export { createTaskResumeInfoHook } from "./task-resume-info";
|
|
36
38
|
export { createStartWorkHook } from "./start-work";
|
|
37
39
|
export { createAtlasHook } from "./atlas";
|
|
40
|
+
export { createTeamToolGating } from "./team-tool-gating";
|
|
38
41
|
export { createDelegateTaskRetryHook } from "./delegate-task-retry";
|
|
39
42
|
export { createQuestionLabelTruncatorHook } from "./question-label-truncator";
|
|
40
43
|
export { createStopContinuationGuardHook, type StopContinuationGuard } from "./stop-continuation-guard";
|
|
@@ -3,7 +3,13 @@ export declare const INLINE_CODE_PATTERN: RegExp;
|
|
|
3
3
|
export { isPlannerAgent, isNonOmoAgent, getUltraworkMessage } from "./ultrawork";
|
|
4
4
|
export { SEARCH_PATTERN, SEARCH_MESSAGE } from "./search";
|
|
5
5
|
export { ANALYZE_PATTERN, ANALYZE_MESSAGE } from "./analyze";
|
|
6
|
+
export { TEAM_PATTERN, TEAM_MESSAGE } from "./team";
|
|
7
|
+
export { HYPERPLAN_PATTERN, HYPERPLAN_MESSAGE } from "./hyperplan";
|
|
8
|
+
import type { KeywordType } from "../../config/schema/keyword-detector";
|
|
9
|
+
export declare const HYPERPLAN_ULTRAWORK_PATTERN: RegExp;
|
|
10
|
+
export declare function getHyperplanUltraworkMessage(agentName?: string, modelID?: string): string;
|
|
6
11
|
export type KeywordDetector = {
|
|
12
|
+
type: KeywordType;
|
|
7
13
|
pattern: RegExp;
|
|
8
14
|
message: string | ((agentName?: string, modelID?: string) => string);
|
|
9
15
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import type { KeywordType } from "../../config/schema/keyword-detector";
|
|
1
2
|
export interface DetectedKeyword {
|
|
2
|
-
type:
|
|
3
|
+
type: KeywordType;
|
|
3
4
|
message: string;
|
|
4
5
|
}
|
|
5
6
|
export declare function removeCodeBlocks(text: string): string;
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function looksLikeSlashCommand(text: string): boolean;
|
|
8
|
+
export declare function detectKeywords(text: string, agentName?: string, modelID?: string, disabledKeywords?: ReadonlyArray<KeywordType>): string[];
|
|
9
|
+
export declare function detectKeywordsWithType(text: string, agentName?: string, modelID?: string, disabledKeywords?: ReadonlyArray<KeywordType>): DetectedKeyword[];
|
|
8
10
|
export declare function extractPromptText(parts: Array<{
|
|
9
11
|
type: string;
|
|
10
12
|
text?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { KeywordDetectorConfig } from "../../config/schema/keyword-detector";
|
|
2
3
|
import type { ContextCollector } from "../../features/context-injector";
|
|
3
4
|
import type { RalphLoopHook } from "../ralph-loop";
|
|
4
|
-
export declare function createKeywordDetectorHook(ctx: PluginInput, _collector?: ContextCollector, _ralphLoop?: Pick<RalphLoopHook, "startLoop"
|
|
5
|
+
export declare function createKeywordDetectorHook(ctx: PluginInput, _collector?: ContextCollector, _ralphLoop?: Pick<RalphLoopHook, "startLoop">, config?: KeywordDetectorConfig): {
|
|
5
6
|
"chat.message": (input: {
|
|
6
7
|
sessionID: string;
|
|
7
8
|
agent?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hyperplan keyword detector.
|
|
3
|
+
*
|
|
4
|
+
* Triggers when the user wants adversarial multi-agent planning via team-mode.
|
|
5
|
+
*
|
|
6
|
+
* Triggers (case-insensitive, word-bounded):
|
|
7
|
+
* - English: hyperplan, hpp
|
|
8
|
+
*
|
|
9
|
+
* The detector injects a thin wrapper that loads the `hyperplan` skill, which
|
|
10
|
+
* carries the full orchestration instructions for the 5-member adversarial team.
|
|
11
|
+
*/
|
|
12
|
+
export declare const HYPERPLAN_PATTERN: RegExp;
|
|
13
|
+
export declare const HYPERPLAN_MESSAGE = "<hyperplan-mode>\n**MANDATORY**: Say \"HYPERPLAN MODE ENABLED!\" as your first response, exactly once.\n\nThe user invoked **hyperplan mode** \u2014 adversarial multi-agent planning via team-mode.\n\nLOAD THE HYPERPLAN SKILL IMMEDIATELY:\n\n```\nskill(name=\"hyperplan\")\n```\n\nAfter loading, follow the skill's full workflow EXACTLY:\n1. Acknowledge and capture the planning request\n2. Spawn the adversarial team via `team_create` with category members `unspecified-low`, `unspecified-high`, `ultrabrain`, and `artistry`; include `deep` only if the category is enabled\n3. Round 1 \u2014 Independent analysis (each member produces findings)\n4. Round 2 \u2014 Cross-attack (each member ruthlessly attacks the other 4's findings)\n5. Round 3 \u2014 Defend, refine, or concede\n6. Distill defensible insights into a structured bundle (Lead does NOT write the plan)\n7. MANDATORY: hand the bundle to the `plan` agent via `task(subagent_type=\"plan\", ...)` \u2014 the plan agent owns sequencing, parallelization, and verification gates\n8. Present the plan agent's output verbatim with provenance line, then clean up the team\n\nDo NOT improvise. Do NOT skip rounds. Do NOT write the plan yourself in step 6 \u2014 the handoff to the plan agent in step 7 is non-negotiable. Be the lead orchestrator and let the adversarial members do the cross-critique.\n\nIf team-mode is unavailable (`team_*` tools missing), instruct the user to set `team_mode.enabled: true` in `~/.config/opencode/oh-my-opencode.jsonc` and restart opencode.\n</hyperplan-mode>";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HYPERPLAN_PATTERN, HYPERPLAN_MESSAGE } from "./default";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Team mode keyword detector.
|
|
3
|
+
*
|
|
4
|
+
* Triggers when the user explicitly invokes team-mode work:
|
|
5
|
+
* - English: team mode, team-mode, team_mode, teammode (case-insensitive)
|
|
6
|
+
* - Korean: 팀 모드, 팀모드, 팀으로
|
|
7
|
+
*
|
|
8
|
+
* The Korean variants use a negative lookbehind on Hangul syllables (가-힣)
|
|
9
|
+
* to prevent false positives like "스팀으로" matching "팀으로", or
|
|
10
|
+
* "스팀모드" matching "팀모드".
|
|
11
|
+
*/
|
|
12
|
+
export declare const TEAM_PATTERN: RegExp;
|
|
13
|
+
export declare const TEAM_MESSAGE = "[team-mode]\nTeam mode reference detected. If user wants team-mode work, MUST orchestrate via team_* tools (team_create -> team_task_create + team_send_message). NEVER substitute with delegate_task - it is not equivalent. If team_* tools are unavailable (team_mode disabled in config), instruct user to set team_mode.enabled=true and restart opencode.";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TEAM_PATTERN, TEAM_MESSAGE } from "./default";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { createOpencodeClient } from "@opencode-ai/sdk";
|
|
2
|
-
import type { MessageData } from "./types";
|
|
2
|
+
import type { MessageData, ResumeConfig } from "./types";
|
|
3
3
|
type Client = ReturnType<typeof createOpencodeClient>;
|
|
4
|
-
export declare function recoverToolResultMissing(client: Client, sessionID: string, failedAssistantMsg: MessageData): Promise<boolean>;
|
|
4
|
+
export declare function recoverToolResultMissing(client: Client, sessionID: string, failedAssistantMsg: MessageData, resumeConfig?: ResumeConfig): Promise<boolean>;
|
|
5
5
|
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../config/schema/team-mode";
|
|
2
|
+
import type { PluginContext } from "../../plugin/types";
|
|
3
|
+
import type { ExecutorContext } from "../../tools/delegate-task/executor-types";
|
|
4
|
+
type HookContext = ExecutorContext | PluginContext | Record<string, never>;
|
|
5
|
+
type TransformPart = {
|
|
6
|
+
type: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
synthetic?: boolean;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
type TransformMessageInfo = {
|
|
12
|
+
role: string;
|
|
13
|
+
sessionID?: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
type MessageWithParts = {
|
|
17
|
+
info: TransformMessageInfo;
|
|
18
|
+
parts: TransformPart[];
|
|
19
|
+
};
|
|
20
|
+
type TeamMailboxInjectorInput = {
|
|
21
|
+
sessionID?: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
type TeamMailboxInjectorOutput = {
|
|
25
|
+
messages: MessageWithParts[];
|
|
26
|
+
};
|
|
27
|
+
export type TeamMailboxInjectorHook = {
|
|
28
|
+
"experimental.chat.messages.transform"?: (input: TeamMailboxInjectorInput, output: TeamMailboxInjectorOutput) => Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
export declare function createTeamMailboxInjector(_ctx: HookContext, config: TeamModeConfig): TeamMailboxInjectorHook;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../config/schema/team-mode";
|
|
2
|
+
type TransformPart = {
|
|
3
|
+
type: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
synthetic?: boolean;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
type TransformMessageInfo = {
|
|
9
|
+
role: string;
|
|
10
|
+
sessionID?: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
type MessageWithParts = {
|
|
14
|
+
info: TransformMessageInfo;
|
|
15
|
+
parts: TransformPart[];
|
|
16
|
+
};
|
|
17
|
+
type TeamModeStatusInjectorInput = {
|
|
18
|
+
sessionID?: string;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
type TeamModeStatusInjectorOutput = {
|
|
22
|
+
messages: MessageWithParts[];
|
|
23
|
+
};
|
|
24
|
+
export type TeamModeStatusInjectorHook = {
|
|
25
|
+
"experimental.chat.messages.transform"?: (input: TeamModeStatusInjectorInput, output: TeamModeStatusInjectorOutput) => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
export declare function createTeamModeStatusInjector(config: TeamModeConfig): TeamModeStatusInjectorHook;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createTeamModeStatusInjector } from "./hook";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../config/schema/team-mode";
|
|
2
|
+
type PromptAsyncInput = {
|
|
3
|
+
path: {
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
body: {
|
|
7
|
+
parts: Array<{
|
|
8
|
+
type: "text";
|
|
9
|
+
text: string;
|
|
10
|
+
}>;
|
|
11
|
+
agent?: string;
|
|
12
|
+
model?: {
|
|
13
|
+
providerID: string;
|
|
14
|
+
modelID: string;
|
|
15
|
+
};
|
|
16
|
+
variant?: string;
|
|
17
|
+
};
|
|
18
|
+
query: {
|
|
19
|
+
directory: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type TeamIdleWakeHintContext = {
|
|
23
|
+
directory: string;
|
|
24
|
+
client: {
|
|
25
|
+
session: {
|
|
26
|
+
promptAsync?: (input: PromptAsyncInput) => Promise<unknown>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
type HookInput = {
|
|
31
|
+
event: {
|
|
32
|
+
type: string;
|
|
33
|
+
properties?: unknown;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type HookImpl = (input: HookInput) => Promise<void>;
|
|
37
|
+
export declare function createTeamIdleWakeHint(ctx: TeamIdleWakeHintContext, config: TeamModeConfig): HookImpl;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TeamModeConfig } from "../../config/schema/team-mode";
|
|
2
|
+
import type { BackgroundManager } from "../../features/background-agent/manager";
|
|
3
|
+
import type { TmuxSessionManager } from "../../features/tmux-subagent/manager";
|
|
4
|
+
type HookInput = {
|
|
5
|
+
event: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties?: unknown;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type HookImpl = (input: HookInput) => Promise<void>;
|
|
11
|
+
export declare function createTeamLeadOrphanHandler(config: TeamModeConfig, tmuxMgr?: TmuxSessionManager, bgMgr?: BackgroundManager): HookImpl;
|
|
12
|
+
export {};
|