oh-my-opencode 3.1.10 → 3.2.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.
Files changed (87) hide show
  1. package/README.ja.md +20 -0
  2. package/README.ko.md +20 -0
  3. package/README.md +21 -1
  4. package/README.zh-cn.md +20 -0
  5. package/dist/agents/hephaestus.d.ts +6 -0
  6. package/dist/agents/index.d.ts +1 -0
  7. package/dist/agents/metis.d.ts +1 -1
  8. package/dist/agents/prometheus/behavioral-summary.d.ts +6 -0
  9. package/dist/agents/prometheus/high-accuracy-mode.d.ts +6 -0
  10. package/dist/agents/prometheus/identity-constraints.d.ts +7 -0
  11. package/dist/agents/prometheus/index.d.ts +39 -0
  12. package/dist/agents/prometheus/interview-mode.d.ts +7 -0
  13. package/dist/agents/prometheus/plan-generation.d.ts +7 -0
  14. package/dist/agents/prometheus/plan-template.d.ts +7 -0
  15. package/dist/agents/sisyphus.d.ts +2 -0
  16. package/dist/agents/types.d.ts +1 -1
  17. package/dist/cli/doctor/checks/opencode.d.ts +5 -0
  18. package/dist/cli/index.js +3588 -2306
  19. package/dist/config/schema.d.ts +167 -12
  20. package/dist/features/background-agent/constants.d.ts +44 -0
  21. package/dist/features/background-agent/index.d.ts +2 -1
  22. package/dist/features/background-agent/manager.d.ts +1 -0
  23. package/dist/features/background-agent/result-handler.d.ts +15 -0
  24. package/dist/features/background-agent/spawner.d.ts +14 -0
  25. package/dist/features/background-agent/state.d.ts +35 -0
  26. package/dist/features/background-agent/types.d.ts +6 -0
  27. package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -0
  28. package/dist/features/builtin-commands/types.d.ts +1 -1
  29. package/dist/features/builtin-skills/skills/dev-browser.d.ts +2 -0
  30. package/dist/features/builtin-skills/skills/frontend-ui-ux.d.ts +2 -0
  31. package/dist/features/builtin-skills/skills/git-master.d.ts +2 -0
  32. package/dist/features/builtin-skills/skills/index.d.ts +4 -0
  33. package/dist/features/builtin-skills/skills/playwright.d.ts +3 -0
  34. package/dist/features/sisyphus-tasks/types.d.ts +3 -3
  35. package/dist/features/skill-mcp-manager/manager.d.ts +2 -0
  36. package/dist/features/tmux-subagent/types.d.ts +2 -0
  37. package/dist/hooks/claude-code-hooks/transcript.d.ts +0 -4
  38. package/dist/hooks/directory-agents-injector/storage.d.ts +1 -3
  39. package/dist/hooks/directory-readme-injector/storage.d.ts +1 -3
  40. package/dist/hooks/index.d.ts +3 -1
  41. package/dist/hooks/keyword-detector/analyze/default.d.ts +12 -0
  42. package/dist/hooks/keyword-detector/analyze/index.d.ts +1 -0
  43. package/dist/hooks/keyword-detector/constants.d.ts +7 -14
  44. package/dist/hooks/keyword-detector/detector.d.ts +2 -2
  45. package/dist/hooks/keyword-detector/search/default.d.ts +12 -0
  46. package/dist/hooks/keyword-detector/search/index.d.ts +1 -0
  47. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +10 -0
  48. package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +16 -0
  49. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +17 -0
  50. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +6 -0
  51. package/dist/hooks/keyword-detector/ultrawork/utils.d.ts +24 -0
  52. package/dist/hooks/rules-injector/output-path.d.ts +5 -0
  53. package/dist/hooks/rules-injector/output-path.test.d.ts +1 -0
  54. package/dist/hooks/session-notification-utils.d.ts +6 -6
  55. package/dist/hooks/stop-continuation-guard/index.d.ts +16 -0
  56. package/dist/hooks/stop-continuation-guard/index.test.d.ts +1 -0
  57. package/dist/hooks/think-mode/switcher.d.ts +12 -0
  58. package/dist/hooks/todo-continuation-enforcer.d.ts +2 -0
  59. package/dist/hooks/unstable-agent-babysitter/index.d.ts +50 -0
  60. package/dist/hooks/unstable-agent-babysitter/index.test.d.ts +1 -0
  61. package/dist/index.js +20947 -5733
  62. package/dist/shared/binary-downloader.d.ts +10 -0
  63. package/dist/shared/index.d.ts +2 -1
  64. package/dist/shared/model-availability.d.ts +4 -0
  65. package/dist/shared/model-requirements.d.ts +1 -0
  66. package/dist/shared/model-resolution-pipeline.d.ts +24 -0
  67. package/dist/shared/opencode-version.d.ts +0 -2
  68. package/dist/shared/session-injected-paths.d.ts +10 -0
  69. package/dist/shared/snake-case.d.ts +1 -0
  70. package/dist/tools/background-task/constants.d.ts +1 -1
  71. package/dist/tools/background-task/index.d.ts +1 -0
  72. package/dist/tools/background-task/tools.d.ts +44 -4
  73. package/dist/tools/background-task/tools.test.d.ts +1 -0
  74. package/dist/tools/background-task/types.d.ts +6 -0
  75. package/dist/tools/delegate-task/categories.d.ts +17 -0
  76. package/dist/tools/delegate-task/executor.d.ts +75 -0
  77. package/dist/tools/delegate-task/helpers.d.ts +30 -0
  78. package/dist/tools/delegate-task/index.d.ts +2 -1
  79. package/dist/tools/delegate-task/prompt-builder.d.ts +6 -0
  80. package/dist/tools/delegate-task/tools.d.ts +5 -36
  81. package/dist/tools/delegate-task/types.d.ts +34 -0
  82. package/package.json +8 -8
  83. package/dist/agents/prometheus-prompt.d.ts +0 -29
  84. package/dist/hooks/directory-agents-injector/types.d.ts +0 -5
  85. package/dist/hooks/directory-readme-injector/types.d.ts +0 -5
  86. package/dist/shared/case-insensitive.d.ts +0 -24
  87. /package/dist/{shared/case-insensitive.test.d.ts → features/builtin-commands/templates/stop-continuation.test.d.ts} +0 -0
@@ -1,14 +1,15 @@
1
1
  import { z } from "zod";
2
2
  export declare const BuiltinAgentNameSchema: z.ZodEnum<{
3
+ "multimodal-looker": "multimodal-looker";
4
+ oracle: "oracle";
5
+ librarian: "librarian";
3
6
  sisyphus: "sisyphus";
4
7
  prometheus: "prometheus";
5
8
  atlas: "atlas";
6
9
  metis: "metis";
7
10
  momus: "momus";
8
- oracle: "oracle";
9
- librarian: "librarian";
10
11
  explore: "explore";
11
- "multimodal-looker": "multimodal-looker";
12
+ hephaestus: "hephaestus";
12
13
  }>;
13
14
  export declare const BuiltinSkillNameSchema: z.ZodEnum<{
14
15
  playwright: "playwright";
@@ -17,6 +18,9 @@ export declare const BuiltinSkillNameSchema: z.ZodEnum<{
17
18
  "git-master": "git-master";
18
19
  }>;
19
20
  export declare const OverridableAgentNameSchema: z.ZodEnum<{
21
+ "multimodal-looker": "multimodal-looker";
22
+ oracle: "oracle";
23
+ librarian: "librarian";
20
24
  plan: "plan";
21
25
  sisyphus: "sisyphus";
22
26
  prometheus: "prometheus";
@@ -25,22 +29,21 @@ export declare const OverridableAgentNameSchema: z.ZodEnum<{
25
29
  momus: "momus";
26
30
  "sisyphus-junior": "sisyphus-junior";
27
31
  build: "build";
28
- oracle: "oracle";
29
- librarian: "librarian";
30
32
  explore: "explore";
31
- "multimodal-looker": "multimodal-looker";
33
+ hephaestus: "hephaestus";
32
34
  "OpenCode-Builder": "OpenCode-Builder";
33
35
  }>;
34
36
  export declare const AgentNameSchema: z.ZodEnum<{
37
+ "multimodal-looker": "multimodal-looker";
38
+ oracle: "oracle";
39
+ librarian: "librarian";
35
40
  sisyphus: "sisyphus";
36
41
  prometheus: "prometheus";
37
42
  atlas: "atlas";
38
43
  metis: "metis";
39
44
  momus: "momus";
40
- oracle: "oracle";
41
- librarian: "librarian";
42
45
  explore: "explore";
43
- "multimodal-looker": "multimodal-looker";
46
+ hephaestus: "hephaestus";
44
47
  }>;
45
48
  export declare const HookNameSchema: z.ZodEnum<{
46
49
  atlas: "atlas";
@@ -75,6 +78,8 @@ export declare const HookNameSchema: z.ZodEnum<{
75
78
  "prometheus-md-only": "prometheus-md-only";
76
79
  "sisyphus-junior-notepad": "sisyphus-junior-notepad";
77
80
  "start-work": "start-work";
81
+ "unstable-agent-babysitter": "unstable-agent-babysitter";
82
+ "stop-continuation-guard": "stop-continuation-guard";
78
83
  }>;
79
84
  export declare const BuiltinCommandNameSchema: z.ZodEnum<{
80
85
  "start-work": "start-work";
@@ -361,6 +366,76 @@ export declare const AgentOverridesSchema: z.ZodObject<{
361
366
  }>>;
362
367
  providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
363
368
  }, z.core.$strip>>;
369
+ hephaestus: z.ZodOptional<z.ZodObject<{
370
+ model: z.ZodOptional<z.ZodString>;
371
+ variant: z.ZodOptional<z.ZodString>;
372
+ category: z.ZodOptional<z.ZodString>;
373
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
374
+ temperature: z.ZodOptional<z.ZodNumber>;
375
+ top_p: z.ZodOptional<z.ZodNumber>;
376
+ prompt: z.ZodOptional<z.ZodString>;
377
+ prompt_append: z.ZodOptional<z.ZodString>;
378
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
379
+ disable: z.ZodOptional<z.ZodBoolean>;
380
+ description: z.ZodOptional<z.ZodString>;
381
+ mode: z.ZodOptional<z.ZodEnum<{
382
+ subagent: "subagent";
383
+ primary: "primary";
384
+ all: "all";
385
+ }>>;
386
+ color: z.ZodOptional<z.ZodString>;
387
+ permission: z.ZodOptional<z.ZodObject<{
388
+ edit: z.ZodOptional<z.ZodEnum<{
389
+ allow: "allow";
390
+ deny: "deny";
391
+ ask: "ask";
392
+ }>>;
393
+ bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
394
+ allow: "allow";
395
+ deny: "deny";
396
+ ask: "ask";
397
+ }>, z.ZodRecord<z.ZodString, z.ZodEnum<{
398
+ allow: "allow";
399
+ deny: "deny";
400
+ ask: "ask";
401
+ }>>]>>;
402
+ webfetch: z.ZodOptional<z.ZodEnum<{
403
+ allow: "allow";
404
+ deny: "deny";
405
+ ask: "ask";
406
+ }>>;
407
+ doom_loop: z.ZodOptional<z.ZodEnum<{
408
+ allow: "allow";
409
+ deny: "deny";
410
+ ask: "ask";
411
+ }>>;
412
+ external_directory: z.ZodOptional<z.ZodEnum<{
413
+ allow: "allow";
414
+ deny: "deny";
415
+ ask: "ask";
416
+ }>>;
417
+ }, z.core.$strip>>;
418
+ maxTokens: z.ZodOptional<z.ZodNumber>;
419
+ thinking: z.ZodOptional<z.ZodObject<{
420
+ type: z.ZodEnum<{
421
+ enabled: "enabled";
422
+ disabled: "disabled";
423
+ }>;
424
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
425
+ }, z.core.$strip>>;
426
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
427
+ low: "low";
428
+ medium: "medium";
429
+ high: "high";
430
+ xhigh: "xhigh";
431
+ }>>;
432
+ textVerbosity: z.ZodOptional<z.ZodEnum<{
433
+ low: "low";
434
+ medium: "medium";
435
+ high: "high";
436
+ }>>;
437
+ providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
438
+ }, z.core.$strip>>;
364
439
  "sisyphus-junior": z.ZodOptional<z.ZodObject<{
365
440
  model: z.ZodOptional<z.ZodString>;
366
441
  variant: z.ZodOptional<z.ZodString>;
@@ -1274,6 +1349,9 @@ export declare const BackgroundTaskConfigSchema: z.ZodObject<{
1274
1349
  export declare const NotificationConfigSchema: z.ZodObject<{
1275
1350
  force_enable: z.ZodOptional<z.ZodBoolean>;
1276
1351
  }, z.core.$strip>;
1352
+ export declare const BabysittingConfigSchema: z.ZodObject<{
1353
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1354
+ }, z.core.$strip>;
1277
1355
  export declare const GitMasterConfigSchema: z.ZodObject<{
1278
1356
  commit_footer: z.ZodDefault<z.ZodBoolean>;
1279
1357
  include_co_authored_by: z.ZodDefault<z.ZodBoolean>;
@@ -1344,15 +1422,16 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
1344
1422
  $schema: z.ZodOptional<z.ZodString>;
1345
1423
  disabled_mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
1346
1424
  disabled_agents: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1425
+ "multimodal-looker": "multimodal-looker";
1426
+ oracle: "oracle";
1427
+ librarian: "librarian";
1347
1428
  sisyphus: "sisyphus";
1348
1429
  prometheus: "prometheus";
1349
1430
  atlas: "atlas";
1350
1431
  metis: "metis";
1351
1432
  momus: "momus";
1352
- oracle: "oracle";
1353
- librarian: "librarian";
1354
1433
  explore: "explore";
1355
- "multimodal-looker": "multimodal-looker";
1434
+ hephaestus: "hephaestus";
1356
1435
  }>>>;
1357
1436
  disabled_skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1358
1437
  playwright: "playwright";
@@ -1393,6 +1472,8 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
1393
1472
  "prometheus-md-only": "prometheus-md-only";
1394
1473
  "sisyphus-junior-notepad": "sisyphus-junior-notepad";
1395
1474
  "start-work": "start-work";
1475
+ "unstable-agent-babysitter": "unstable-agent-babysitter";
1476
+ "stop-continuation-guard": "stop-continuation-guard";
1396
1477
  }>>>;
1397
1478
  disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1398
1479
  "start-work": "start-work";
@@ -1609,6 +1690,76 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
1609
1690
  }>>;
1610
1691
  providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1611
1692
  }, z.core.$strip>>;
1693
+ hephaestus: z.ZodOptional<z.ZodObject<{
1694
+ model: z.ZodOptional<z.ZodString>;
1695
+ variant: z.ZodOptional<z.ZodString>;
1696
+ category: z.ZodOptional<z.ZodString>;
1697
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
1698
+ temperature: z.ZodOptional<z.ZodNumber>;
1699
+ top_p: z.ZodOptional<z.ZodNumber>;
1700
+ prompt: z.ZodOptional<z.ZodString>;
1701
+ prompt_append: z.ZodOptional<z.ZodString>;
1702
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1703
+ disable: z.ZodOptional<z.ZodBoolean>;
1704
+ description: z.ZodOptional<z.ZodString>;
1705
+ mode: z.ZodOptional<z.ZodEnum<{
1706
+ subagent: "subagent";
1707
+ primary: "primary";
1708
+ all: "all";
1709
+ }>>;
1710
+ color: z.ZodOptional<z.ZodString>;
1711
+ permission: z.ZodOptional<z.ZodObject<{
1712
+ edit: z.ZodOptional<z.ZodEnum<{
1713
+ allow: "allow";
1714
+ deny: "deny";
1715
+ ask: "ask";
1716
+ }>>;
1717
+ bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
1718
+ allow: "allow";
1719
+ deny: "deny";
1720
+ ask: "ask";
1721
+ }>, z.ZodRecord<z.ZodString, z.ZodEnum<{
1722
+ allow: "allow";
1723
+ deny: "deny";
1724
+ ask: "ask";
1725
+ }>>]>>;
1726
+ webfetch: z.ZodOptional<z.ZodEnum<{
1727
+ allow: "allow";
1728
+ deny: "deny";
1729
+ ask: "ask";
1730
+ }>>;
1731
+ doom_loop: z.ZodOptional<z.ZodEnum<{
1732
+ allow: "allow";
1733
+ deny: "deny";
1734
+ ask: "ask";
1735
+ }>>;
1736
+ external_directory: z.ZodOptional<z.ZodEnum<{
1737
+ allow: "allow";
1738
+ deny: "deny";
1739
+ ask: "ask";
1740
+ }>>;
1741
+ }, z.core.$strip>>;
1742
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1743
+ thinking: z.ZodOptional<z.ZodObject<{
1744
+ type: z.ZodEnum<{
1745
+ enabled: "enabled";
1746
+ disabled: "disabled";
1747
+ }>;
1748
+ budgetTokens: z.ZodOptional<z.ZodNumber>;
1749
+ }, z.core.$strip>>;
1750
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
1751
+ low: "low";
1752
+ medium: "medium";
1753
+ high: "high";
1754
+ xhigh: "xhigh";
1755
+ }>>;
1756
+ textVerbosity: z.ZodOptional<z.ZodEnum<{
1757
+ low: "low";
1758
+ medium: "medium";
1759
+ high: "high";
1760
+ }>>;
1761
+ providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1762
+ }, z.core.$strip>>;
1612
1763
  "sisyphus-junior": z.ZodOptional<z.ZodObject<{
1613
1764
  model: z.ZodOptional<z.ZodString>;
1614
1765
  variant: z.ZodOptional<z.ZodString>;
@@ -2425,6 +2576,9 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
2425
2576
  notification: z.ZodOptional<z.ZodObject<{
2426
2577
  force_enable: z.ZodOptional<z.ZodBoolean>;
2427
2578
  }, z.core.$strip>>;
2579
+ babysitting: z.ZodOptional<z.ZodObject<{
2580
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
2581
+ }, z.core.$strip>>;
2428
2582
  git_master: z.ZodOptional<z.ZodObject<{
2429
2583
  commit_footer: z.ZodDefault<z.ZodBoolean>;
2430
2584
  include_co_authored_by: z.ZodDefault<z.ZodBoolean>;
@@ -2482,6 +2636,7 @@ export type SkillsConfig = z.infer<typeof SkillsConfigSchema>;
2482
2636
  export type SkillDefinition = z.infer<typeof SkillDefinitionSchema>;
2483
2637
  export type RalphLoopConfig = z.infer<typeof RalphLoopConfigSchema>;
2484
2638
  export type NotificationConfig = z.infer<typeof NotificationConfigSchema>;
2639
+ export type BabysittingConfig = z.infer<typeof BabysittingConfigSchema>;
2485
2640
  export type CategoryConfig = z.infer<typeof CategoryConfigSchema>;
2486
2641
  export type CategoriesConfig = z.infer<typeof CategoriesConfigSchema>;
2487
2642
  export type BuiltinCategoryName = z.infer<typeof BuiltinCategoryNameSchema>;
@@ -0,0 +1,44 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { BackgroundTask, LaunchInput } from "./types";
3
+ export declare const TASK_TTL_MS: number;
4
+ export declare const MIN_STABILITY_TIME_MS: number;
5
+ export declare const DEFAULT_STALE_TIMEOUT_MS = 180000;
6
+ export declare const MIN_RUNTIME_BEFORE_STALE_MS = 30000;
7
+ export declare const MIN_IDLE_TIME_MS = 5000;
8
+ export declare const POLLING_INTERVAL_MS = 3000;
9
+ export declare const TASK_CLEANUP_DELAY_MS: number;
10
+ export declare const TMUX_CALLBACK_DELAY_MS = 200;
11
+ export type ProcessCleanupEvent = NodeJS.Signals | "beforeExit" | "exit";
12
+ export type OpencodeClient = PluginInput["client"];
13
+ export interface MessagePartInfo {
14
+ sessionID?: string;
15
+ type?: string;
16
+ tool?: string;
17
+ }
18
+ export interface EventProperties {
19
+ sessionID?: string;
20
+ info?: {
21
+ id?: string;
22
+ };
23
+ [key: string]: unknown;
24
+ }
25
+ export interface BackgroundEvent {
26
+ type: string;
27
+ properties?: EventProperties;
28
+ }
29
+ export interface Todo {
30
+ content: string;
31
+ status: string;
32
+ priority: string;
33
+ id: string;
34
+ }
35
+ export interface QueueItem {
36
+ task: BackgroundTask;
37
+ input: LaunchInput;
38
+ }
39
+ export interface SubagentSessionCreatedEvent {
40
+ sessionID: string;
41
+ parentID: string;
42
+ title: string;
43
+ }
44
+ export type OnSubagentSessionCreated = (event: SubagentSessionCreatedEvent) => Promise<void>;
@@ -1,3 +1,4 @@
1
1
  export * from "./types";
2
- export { BackgroundManager } from "./manager";
2
+ export { BackgroundManager, type SubagentSessionCreatedEvent, type OnSubagentSessionCreated } from "./manager";
3
3
  export { ConcurrencyManager } from "./concurrency";
4
+ export { TaskStateManager } from "./state";
@@ -36,6 +36,7 @@ export declare class BackgroundManager {
36
36
  private onShutdown?;
37
37
  private queuesByKey;
38
38
  private processingKeys;
39
+ private completionTimers;
39
40
  constructor(ctx: PluginInput, config?: BackgroundTaskConfig, options?: {
40
41
  tmuxConfig?: TmuxConfig;
41
42
  onSubagentSessionCreated?: OnSubagentSessionCreated;
@@ -0,0 +1,15 @@
1
+ import type { BackgroundTask } from "./types";
2
+ import type { OpencodeClient } from "./constants";
3
+ import type { ConcurrencyManager } from "./concurrency";
4
+ import type { TaskStateManager } from "./state";
5
+ export interface ResultHandlerContext {
6
+ client: OpencodeClient;
7
+ concurrencyManager: ConcurrencyManager;
8
+ state: TaskStateManager;
9
+ }
10
+ export declare function checkSessionTodos(client: OpencodeClient, sessionID: string): Promise<boolean>;
11
+ export declare function validateSessionHasOutput(client: OpencodeClient, sessionID: string): Promise<boolean>;
12
+ export declare function formatDuration(start: Date, end?: Date): string;
13
+ export declare function getMessageDir(sessionID: string): string | null;
14
+ export declare function tryCompleteTask(task: BackgroundTask, source: string, ctx: ResultHandlerContext): Promise<boolean>;
15
+ export declare function notifyParentSession(task: BackgroundTask, ctx: ResultHandlerContext): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import type { BackgroundTask, LaunchInput, ResumeInput } from "./types";
2
+ import type { OpencodeClient, OnSubagentSessionCreated, QueueItem } from "./constants";
3
+ import type { ConcurrencyManager } from "./concurrency";
4
+ export interface SpawnerContext {
5
+ client: OpencodeClient;
6
+ directory: string;
7
+ concurrencyManager: ConcurrencyManager;
8
+ tmuxEnabled: boolean;
9
+ onSubagentSessionCreated?: OnSubagentSessionCreated;
10
+ onTaskError: (task: BackgroundTask, error: Error) => void;
11
+ }
12
+ export declare function createTask(input: LaunchInput): BackgroundTask;
13
+ export declare function startTask(item: QueueItem, ctx: SpawnerContext): Promise<void>;
14
+ export declare function resumeTask(task: BackgroundTask, input: ResumeInput, ctx: Pick<SpawnerContext, "client" | "concurrencyManager" | "onTaskError">): Promise<void>;
@@ -0,0 +1,35 @@
1
+ import type { BackgroundTask, LaunchInput } from "./types";
2
+ import type { QueueItem } from "./constants";
3
+ export declare class TaskStateManager {
4
+ readonly tasks: Map<string, BackgroundTask>;
5
+ readonly notifications: Map<string, BackgroundTask[]>;
6
+ readonly pendingByParent: Map<string, Set<string>>;
7
+ readonly queuesByKey: Map<string, QueueItem[]>;
8
+ readonly processingKeys: Set<string>;
9
+ readonly completionTimers: Map<string, ReturnType<typeof setTimeout>>;
10
+ getTask(id: string): BackgroundTask | undefined;
11
+ findBySession(sessionID: string): BackgroundTask | undefined;
12
+ getTasksByParentSession(sessionID: string): BackgroundTask[];
13
+ getAllDescendantTasks(sessionID: string): BackgroundTask[];
14
+ getRunningTasks(): BackgroundTask[];
15
+ getCompletedTasks(): BackgroundTask[];
16
+ hasRunningTasks(): boolean;
17
+ getConcurrencyKeyFromInput(input: LaunchInput): string;
18
+ getConcurrencyKeyFromTask(task: BackgroundTask): string;
19
+ addTask(task: BackgroundTask): void;
20
+ removeTask(taskId: string): void;
21
+ trackPendingTask(parentSessionID: string, taskId: string): void;
22
+ cleanupPendingByParent(task: BackgroundTask): void;
23
+ markForNotification(task: BackgroundTask): void;
24
+ getPendingNotifications(sessionID: string): BackgroundTask[];
25
+ clearNotifications(sessionID: string): void;
26
+ clearNotificationsForTask(taskId: string): void;
27
+ addToQueue(key: string, item: QueueItem): void;
28
+ getQueue(key: string): QueueItem[] | undefined;
29
+ removeFromQueue(key: string, taskId: string): boolean;
30
+ setCompletionTimer(taskId: string, timer: ReturnType<typeof setTimeout>): void;
31
+ clearCompletionTimer(taskId: string): void;
32
+ clearAllCompletionTimers(): void;
33
+ clear(): void;
34
+ cancelPendingTask(taskId: string): boolean;
35
+ }
@@ -36,6 +36,10 @@ export interface BackgroundTask {
36
36
  concurrencyGroup?: string;
37
37
  /** Parent session's agent name for notification */
38
38
  parentAgent?: string;
39
+ /** Marks if the task was launched from an unstable agent/category */
40
+ isUnstableAgent?: boolean;
41
+ /** Category used for this task (e.g., 'quick', 'visual-engineering') */
42
+ category?: string;
39
43
  /** Last message count for stability detection */
40
44
  lastMsgCount?: number;
41
45
  /** Number of consecutive polls with stable message count */
@@ -57,8 +61,10 @@ export interface LaunchInput {
57
61
  modelID: string;
58
62
  variant?: string;
59
63
  };
64
+ isUnstableAgent?: boolean;
60
65
  skills?: string[];
61
66
  skillContent?: string;
67
+ category?: string;
62
68
  }
63
69
  export interface ResumeInput {
64
70
  sessionId: string;
@@ -0,0 +1 @@
1
+ export declare const STOP_CONTINUATION_TEMPLATE = "Stop all continuation mechanisms for the current session.\n\nThis command will:\n1. Stop the todo-continuation-enforcer from automatically continuing incomplete tasks\n2. Cancel any active Ralph Loop\n3. Clear the boulder state for the current project\n\nAfter running this command:\n- The session will not auto-continue when idle\n- You can manually continue work when ready\n- The stop state is per-session and clears when the session ends\n\nUse this when you need to pause automated continuation and take manual control.";
@@ -1,5 +1,5 @@
1
1
  import type { CommandDefinition } from "../claude-code-command-loader";
2
- export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work";
2
+ export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation";
3
3
  export interface BuiltinCommandConfig {
4
4
  disabled_commands?: BuiltinCommandName[];
5
5
  }
@@ -0,0 +1,2 @@
1
+ import type { BuiltinSkill } from "../types";
2
+ export declare const devBrowserSkill: BuiltinSkill;
@@ -0,0 +1,2 @@
1
+ import type { BuiltinSkill } from "../types";
2
+ export declare const frontendUiUxSkill: BuiltinSkill;
@@ -0,0 +1,2 @@
1
+ import type { BuiltinSkill } from "../types";
2
+ export declare const gitMasterSkill: BuiltinSkill;
@@ -0,0 +1,4 @@
1
+ export { playwrightSkill, agentBrowserSkill } from "./playwright";
2
+ export { frontendUiUxSkill } from "./frontend-ui-ux";
3
+ export { gitMasterSkill } from "./git-master";
4
+ export { devBrowserSkill } from "./dev-browser";
@@ -0,0 +1,3 @@
1
+ import type { BuiltinSkill } from "../types";
2
+ export declare const playwrightSkill: BuiltinSkill;
3
+ export declare const agentBrowserSkill: BuiltinSkill;
@@ -1,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  export declare const TaskStatusSchema: z.ZodEnum<{
3
3
  pending: "pending";
4
- in_progress: "in_progress";
5
4
  completed: "completed";
5
+ in_progress: "in_progress";
6
6
  }>;
7
7
  export type TaskStatus = z.infer<typeof TaskStatusSchema>;
8
8
  export declare const TaskSchema: z.ZodObject<{
@@ -13,8 +13,8 @@ export declare const TaskSchema: z.ZodObject<{
13
13
  owner: z.ZodOptional<z.ZodString>;
14
14
  status: z.ZodEnum<{
15
15
  pending: "pending";
16
- in_progress: "in_progress";
17
16
  completed: "completed";
17
+ in_progress: "in_progress";
18
18
  }>;
19
19
  blocks: z.ZodArray<z.ZodString>;
20
20
  blockedBy: z.ZodArray<z.ZodString>;
@@ -35,8 +35,8 @@ export declare const TaskUpdateInputSchema: z.ZodObject<{
35
35
  activeForm: z.ZodOptional<z.ZodString>;
36
36
  status: z.ZodOptional<z.ZodEnum<{
37
37
  pending: "pending";
38
- in_progress: "in_progress";
39
38
  completed: "completed";
39
+ in_progress: "in_progress";
40
40
  deleted: "deleted";
41
41
  }>>;
42
42
  addBlocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -8,6 +8,7 @@ export declare class SkillMcpManager {
8
8
  private authProviders;
9
9
  private cleanupRegistered;
10
10
  private cleanupInterval;
11
+ private cleanupHandlers;
11
12
  private readonly IDLE_TIMEOUT;
12
13
  private getClientKey;
13
14
  /**
@@ -16,6 +17,7 @@ export declare class SkillMcpManager {
16
17
  */
17
18
  private getOrCreateAuthProvider;
18
19
  private registerProcessCleanup;
20
+ private unregisterProcessCleanup;
19
21
  getOrCreateClient(info: SkillMcpClientInfo, config: ClaudeCodeMcpServer): Promise<Client>;
20
22
  private createClient;
21
23
  /**
@@ -4,6 +4,8 @@ export interface TrackedSession {
4
4
  description: string;
5
5
  createdAt: Date;
6
6
  lastSeenAt: Date;
7
+ lastMessageCount?: number;
8
+ stableIdlePolls?: number;
7
9
  }
8
10
  export declare const MIN_PANE_WIDTH = 52;
9
11
  export declare const MIN_PANE_HEIGHT = 11;
@@ -1,10 +1,6 @@
1
1
  import type { TranscriptEntry } from "./types";
2
2
  export declare function getTranscriptPath(sessionId: string): string;
3
3
  export declare function appendTranscriptEntry(sessionId: string, entry: TranscriptEntry): void;
4
- export declare function recordToolUse(sessionId: string, toolName: string, toolInput: Record<string, unknown>): void;
5
- export declare function recordToolResult(sessionId: string, toolName: string, toolInput: Record<string, unknown>, toolOutput: Record<string, unknown>): void;
6
- export declare function recordUserMessage(sessionId: string, content: string): void;
7
- export declare function recordAssistantMessage(sessionId: string, content: string): void;
8
4
  /**
9
5
  * Build Claude Code compatible transcript from session messages
10
6
  *
@@ -1,3 +1 @@
1
- export declare function loadInjectedPaths(sessionID: string): Set<string>;
2
- export declare function saveInjectedPaths(sessionID: string, paths: Set<string>): void;
3
- export declare function clearInjectedPaths(sessionID: string): void;
1
+ export declare const loadInjectedPaths: (sessionID: string) => Set<string>, saveInjectedPaths: (sessionID: string, paths: Set<string>) => void, clearInjectedPaths: (sessionID: string) => void;
@@ -1,3 +1 @@
1
- export declare function loadInjectedPaths(sessionID: string): Set<string>;
2
- export declare function saveInjectedPaths(sessionID: string, paths: Set<string>): void;
3
- export declare function clearInjectedPaths(sessionID: string): void;
1
+ export declare const loadInjectedPaths: (sessionID: string) => Set<string>, saveInjectedPaths: (sessionID: string, paths: Set<string>) => void, clearInjectedPaths: (sessionID: string) => void;
@@ -8,7 +8,6 @@ export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
8
8
  export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
9
9
  export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
10
10
  export { createAnthropicContextWindowLimitRecoveryHook, type AnthropicContextWindowLimitRecoveryOptions } from "./anthropic-context-window-limit-recovery";
11
- export { createCompactionContextInjector } from "./compaction-context-injector";
12
11
  export { createThinkModeHook } from "./think-mode";
13
12
  export { createClaudeCodeHooksHook } from "./claude-code-hooks";
14
13
  export { createRulesInjectorHook } from "./rules-injector";
@@ -31,3 +30,6 @@ export { createAtlasHook } from "./atlas";
31
30
  export { createDelegateTaskRetryHook } from "./delegate-task-retry";
32
31
  export { createQuestionLabelTruncatorHook } from "./question-label-truncator";
33
32
  export { createSubagentQuestionBlockerHook } from "./subagent-question-blocker";
33
+ export { createStopContinuationGuardHook, type StopContinuationGuard } from "./stop-continuation-guard";
34
+ export { createCompactionContextInjector, type SummarizeContext } from "./compaction-context-injector";
35
+ export { createUnstableAgentBabysitterHook } from "./unstable-agent-babysitter";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Analyze mode keyword detector.
3
+ *
4
+ * Triggers on analysis-related keywords across multiple languages:
5
+ * - English: analyze, analyse, investigate, examine, research, study, deep-dive, inspect, audit, evaluate, assess, review, diagnose, scrutinize, dissect, debug, comprehend, interpret, breakdown, understand, why is, how does, how to
6
+ * - Korean: 분석, 조사, 파악, 연구, 검토, 진단, 이해, 설명, 원인, 이유, 뜯어봐, 따져봐, 평가, 해석, 디버깅, 디버그, 어떻게, 왜, 살펴
7
+ * - Japanese: 分析, 調査, 解析, 検討, 研究, 診断, 理解, 説明, 検証, 精査, 究明, デバッグ, なぜ, どう, 仕組み
8
+ * - Chinese: 调查, 检查, 剖析, 深入, 诊断, 解释, 调试, 为什么, 原理, 搞清楚, 弄明白
9
+ * - Vietnamese: phân tích, điều tra, nghiên cứu, kiểm tra, xem xét, chẩn đoán, giải thích, tìm hiểu, gỡ lỗi, tại sao
10
+ */
11
+ export declare const ANALYZE_PATTERN: RegExp;
12
+ export declare const ANALYZE_MESSAGE = "[analyze-mode]\nANALYSIS MODE. Gather context before diving deep:\n\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, AST-grep, LSP for targeted searches\n\nIF COMPLEX - DO NOT STRUGGLE ALONE. Consult specialists:\n- **Oracle**: Conventional problems (architecture, debugging, complex logic)\n- **Artistry**: Non-conventional problems (different approach needed)\n\nSYNTHESIZE findings before proceeding.";
@@ -0,0 +1 @@
1
+ export { ANALYZE_PATTERN, ANALYZE_MESSAGE } from "./default";
@@ -1,17 +1,10 @@
1
1
  export declare const CODE_BLOCK_PATTERN: RegExp;
2
2
  export declare const INLINE_CODE_PATTERN: RegExp;
3
- /**
4
- * Determines if the agent is a planner-type agent.
5
- * Planner agents should NOT be told to call plan agent (they ARE the planner).
6
- */
7
- export declare function isPlannerAgent(agentName?: string): boolean;
8
- /**
9
- * Generates the ultrawork message based on agent context.
10
- * Planner agents get context-gathering focused instructions.
11
- * Other agents get the original strong agent utilization instructions.
12
- */
13
- export declare function getUltraworkMessage(agentName?: string): string;
14
- export declare const KEYWORD_DETECTORS: Array<{
3
+ export { isPlannerAgent, getUltraworkMessage } from "./ultrawork";
4
+ export { SEARCH_PATTERN, SEARCH_MESSAGE } from "./search";
5
+ export { ANALYZE_PATTERN, ANALYZE_MESSAGE } from "./analyze";
6
+ export type KeywordDetector = {
15
7
  pattern: RegExp;
16
- message: string | ((agentName?: string) => string);
17
- }>;
8
+ message: string | ((agentName?: string, modelID?: string) => string);
9
+ };
10
+ export declare const KEYWORD_DETECTORS: KeywordDetector[];
@@ -3,8 +3,8 @@ export interface DetectedKeyword {
3
3
  message: string;
4
4
  }
5
5
  export declare function removeCodeBlocks(text: string): string;
6
- export declare function detectKeywords(text: string, agentName?: string): string[];
7
- export declare function detectKeywordsWithType(text: string, agentName?: string): DetectedKeyword[];
6
+ export declare function detectKeywords(text: string, agentName?: string, modelID?: string): string[];
7
+ export declare function detectKeywordsWithType(text: string, agentName?: string, modelID?: string): DetectedKeyword[];
8
8
  export declare function extractPromptText(parts: Array<{
9
9
  type: string;
10
10
  text?: string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Search mode keyword detector.
3
+ *
4
+ * Triggers on search-related keywords across multiple languages:
5
+ * - English: search, find, locate, lookup, explore, discover, scan, grep, query, browse, detect, trace, seek, track, pinpoint, hunt, where is, show me, list all
6
+ * - Korean: 검색, 찾아, 탐색, 조회, 스캔, 서치, 뒤져, 찾기, 어디, 추적, 탐지, 찾아봐, 찾아내, 보여줘, 목록
7
+ * - Japanese: 検索, 探して, 見つけて, サーチ, 探索, スキャン, どこ, 発見, 捜索, 見つけ出す, 一覧
8
+ * - Chinese: 搜索, 查找, 寻找, 查询, 检索, 定位, 扫描, 发现, 在哪里, 找出来, 列出
9
+ * - Vietnamese: tìm kiếm, tra cứu, định vị, quét, phát hiện, truy tìm, tìm ra, ở đâu, liệt kê
10
+ */
11
+ export declare const SEARCH_PATTERN: RegExp;
12
+ export declare const SEARCH_MESSAGE = "[search-mode]\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\n- explore agents (codebase patterns, file structures, ast-grep)\n- librarian agents (remote repos, official docs, GitHub examples)\nPlus direct tools: Grep, ripgrep (rg), ast-grep (sg)\nNEVER stop at first result - be exhaustive.";
@@ -0,0 +1 @@
1
+ export { SEARCH_PATTERN, SEARCH_MESSAGE } from "./default";