oh-my-codex 0.8.1 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.de.md +5 -1
  2. package/README.es.md +5 -1
  3. package/README.fr.md +5 -1
  4. package/README.it.md +5 -1
  5. package/README.ja.md +5 -1
  6. package/README.ko.md +5 -1
  7. package/README.md +5 -1
  8. package/README.pt.md +5 -1
  9. package/README.ru.md +5 -1
  10. package/README.tr.md +5 -1
  11. package/README.vi.md +5 -1
  12. package/README.zh-TW.md +5 -1
  13. package/README.zh.md +5 -1
  14. package/dist/cli/__tests__/index.test.js +3 -2
  15. package/dist/cli/__tests__/index.test.js.map +1 -1
  16. package/dist/cli/__tests__/setup-skills-overwrite.test.js +100 -1
  17. package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
  18. package/dist/cli/catalog-contract.d.ts.map +1 -1
  19. package/dist/cli/catalog-contract.js +8 -2
  20. package/dist/cli/catalog-contract.js.map +1 -1
  21. package/dist/cli/setup.d.ts.map +1 -1
  22. package/dist/cli/setup.js +34 -0
  23. package/dist/cli/setup.js.map +1 -1
  24. package/dist/config/__tests__/models.test.js +11 -11
  25. package/dist/config/__tests__/models.test.js.map +1 -1
  26. package/dist/config/models.d.ts +4 -3
  27. package/dist/config/models.d.ts.map +1 -1
  28. package/dist/config/models.js +6 -5
  29. package/dist/config/models.js.map +1 -1
  30. package/dist/hooks/__tests__/keyword-detector.test.js +46 -3
  31. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  32. package/dist/hooks/__tests__/notify-fallback-watcher.test.js +24 -3
  33. package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
  34. package/dist/hooks/keyword-detector.d.ts +2 -1
  35. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  36. package/dist/hooks/keyword-detector.js +41 -4
  37. package/dist/hooks/keyword-detector.js.map +1 -1
  38. package/dist/hooks/keyword-registry.d.ts.map +1 -1
  39. package/dist/hooks/keyword-registry.js +5 -0
  40. package/dist/hooks/keyword-registry.js.map +1 -1
  41. package/dist/mcp/team-server.d.ts.map +1 -1
  42. package/dist/mcp/team-server.js +28 -7
  43. package/dist/mcp/team-server.js.map +1 -1
  44. package/dist/openclaw/__tests__/dispatcher.test.js +10 -6
  45. package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
  46. package/dist/openclaw/dispatcher.d.ts +1 -1
  47. package/dist/openclaw/dispatcher.js +3 -3
  48. package/dist/openclaw/dispatcher.js.map +1 -1
  49. package/dist/team/__tests__/runtime-cli.test.js +6 -0
  50. package/dist/team/__tests__/runtime-cli.test.js.map +1 -1
  51. package/dist/team/__tests__/runtime.test.js +96 -0
  52. package/dist/team/__tests__/runtime.test.js.map +1 -1
  53. package/dist/team/__tests__/tmux-claude-workers-demo.test.js +15 -0
  54. package/dist/team/__tests__/tmux-claude-workers-demo.test.js.map +1 -1
  55. package/dist/team/__tests__/tmux-session.test.js +52 -2
  56. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  57. package/dist/team/runtime-cli.d.ts +3 -0
  58. package/dist/team/runtime-cli.d.ts.map +1 -1
  59. package/dist/team/runtime-cli.js +24 -2
  60. package/dist/team/runtime-cli.js.map +1 -1
  61. package/dist/team/runtime.d.ts.map +1 -1
  62. package/dist/team/runtime.js +98 -63
  63. package/dist/team/runtime.js.map +1 -1
  64. package/dist/team/scaling.js.map +1 -1
  65. package/dist/team/state/types.d.ts +1 -1
  66. package/dist/team/state/types.d.ts.map +1 -1
  67. package/dist/team/state.d.ts +1 -1
  68. package/dist/team/state.d.ts.map +1 -1
  69. package/dist/team/tmux-session.d.ts +5 -4
  70. package/dist/team/tmux-session.d.ts.map +1 -1
  71. package/dist/team/tmux-session.js +29 -11
  72. package/dist/team/tmux-session.js.map +1 -1
  73. package/package.json +1 -1
  74. package/skills/configure-notifications/SKILL.md +11 -5
  75. package/templates/AGENTS.md +7 -3
  76. package/templates/catalog-manifest.json +39 -0
  77. package/dist/hooks/__tests__/emulator.test.d.ts +0 -2
  78. package/dist/hooks/__tests__/emulator.test.d.ts.map +0 -1
  79. package/dist/hooks/__tests__/emulator.test.js +0 -53
  80. package/dist/hooks/__tests__/emulator.test.js.map +0 -1
  81. package/dist/hooks/emulator.d.ts +0 -44
  82. package/dist/hooks/emulator.d.ts.map +0 -1
  83. package/dist/hooks/emulator.js +0 -105
  84. package/dist/hooks/emulator.js.map +0 -1
@@ -1,105 +0,0 @@
1
- /**
2
- * Hook Emulation Layer for oh-my-codex
3
- *
4
- * Since Codex CLI's hooks are limited (AfterAgent + AfterToolUse only, fire-and-forget),
5
- * we emulate the full OMC hook pipeline through alternative mechanisms:
6
- *
7
- * 1. SessionStart -> AGENTS.md (native Codex CLI, no hook needed)
8
- * 2. PreToolUse -> AGENTS.md instructions (inline guidance, no hook needed)
9
- * 3. PostToolUse -> notify config (fire-and-forget, no context injection)
10
- * 4. UserPromptSubmit -> AGENTS.md keyword detection instructions
11
- * 5. SubagentStart/Stop -> Codex CLI multi_agent system (native tracking)
12
- * 6. PreCompact -> Not available (Codex manages compaction internally)
13
- * 7. Stop -> notify config (can detect turn completion)
14
- *
15
- * For features that require context injection (keyword detection triggering
16
- * skill loading), we rely on the AGENTS.md orchestration brain to instruct
17
- * the model to self-invoke skills when it detects keywords.
18
- *
19
- * This is the key architectural difference from OMC:
20
- * - OMC: External hook detects keyword -> injects skill prompt via system-reminder
21
- * - OMX: AGENTS.md instructs model -> model self-detects keyword -> model loads skill
22
- */
23
- import { KEYWORD_TRIGGER_DEFINITIONS } from './keyword-registry.js';
24
- /**
25
- * Mapping of OMC hook capabilities to OMX equivalents
26
- */
27
- export const HOOK_MAPPING = {
28
- SessionStart: {
29
- mechanism: 'AGENTS.md native loading + runtime overlay',
30
- capability: 'full',
31
- notes: 'Codex CLI reads AGENTS.md at start; omx preLaunch injects dynamic overlay (modes, notepad, memory, compaction protocol)',
32
- },
33
- PreToolUse: {
34
- mechanism: 'AGENTS.md inline guidance',
35
- capability: 'partial',
36
- notes: 'No pre-tool interception, but AGENTS.md can instruct model behavior before tool use',
37
- },
38
- PostToolUse: {
39
- mechanism: 'notify config (fire-and-forget)',
40
- capability: 'partial',
41
- notes: 'Can log and update state, but cannot inject context back into conversation',
42
- },
43
- UserPromptSubmit: {
44
- mechanism: 'AGENTS.md self-detection instructions',
45
- capability: 'partial',
46
- notes: 'Model detects keywords via AGENTS.md instructions instead of external hook',
47
- },
48
- SubagentStart: {
49
- mechanism: 'Codex CLI multi_agent system',
50
- capability: 'full',
51
- notes: 'Native sub-agent lifecycle tracking via multi_agent feature',
52
- },
53
- SubagentStop: {
54
- mechanism: 'Codex CLI multi_agent system',
55
- capability: 'full',
56
- notes: 'Native sub-agent lifecycle tracking via multi_agent feature',
57
- },
58
- PreCompact: {
59
- mechanism: 'AGENTS.md overlay compaction protocol',
60
- capability: 'partial',
61
- notes: 'Overlay includes compaction survival instructions; no event interception but model is instructed to checkpoint state',
62
- },
63
- Stop: {
64
- mechanism: 'notify config + postLaunch cleanup',
65
- capability: 'full',
66
- notes: 'notify fires on agent-turn-complete; postLaunch strips overlay and archives session on exit',
67
- },
68
- SessionEnd: {
69
- mechanism: 'omx postLaunch lifecycle phase',
70
- capability: 'partial',
71
- notes: 'postLaunch runs after Codex exits: strips overlay, archives session, cancels active modes',
72
- },
73
- };
74
- /**
75
- * Keyword detection configuration (embedded in AGENTS.md)
76
- * Instead of external hook detection, the model is instructed to self-detect
77
- */
78
- export const KEYWORD_TRIGGERS = Object.fromEntries(KEYWORD_TRIGGER_DEFINITIONS.map(({ keyword, guidance }) => [keyword, guidance]));
79
- /**
80
- * Generate the keyword detection section for AGENTS.md
81
- */
82
- export function generateKeywordDetectionSection() {
83
- const lines = KEYWORD_TRIGGER_DEFINITIONS
84
- .map(({ keyword, guidance }) => `- When user says "${keyword}": ${guidance}`)
85
- .join('\n');
86
- return `
87
- <keyword_detection>
88
- When you see these keywords in user messages, activate the corresponding skill:
89
- ${lines}
90
-
91
- Ralplan-first execution gate:
92
- - Before implementation/tool execution, ensure both artifacts exist in \`.omx/plans/\`: \`prd-*.md\` and \`test-spec-*.md\`.
93
- - If ralph is active and either artifact is missing, stay in planning mode and do not execute implementation tools.
94
- - Only begin implementation after the planning gate is complete.
95
-
96
- To activate a skill, use the corresponding slash command or invoke the skill directly.
97
- If a keyword is detected, announce the activation to the user before proceeding.
98
-
99
- Pre-execution gate: When an execution keyword (ralph, autopilot, team, ultrawork) is detected but the prompt lacks specific files, functions, issue numbers, or structured steps, redirect to $ralplan for scoping before execution. User can bypass with "force:" or "!" prefix.
100
-
101
- Visual iteration gate: For visual tasks (reference image(s) + generated screenshot), invoke $visual-verdict every iteration before the next edit and persist structured feedback (score + qualitative next actions) to progress tracking.
102
- </keyword_detection>
103
- `;
104
- }
105
- //# sourceMappingURL=emulator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emulator.js","sourceRoot":"","sources":["../../src/hooks/emulator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAgBpE;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAIpB;IACH,YAAY,EAAE;QACZ,SAAS,EAAE,4CAA4C;QACvD,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,yHAAyH;KACjI;IACD,UAAU,EAAE;QACV,SAAS,EAAE,2BAA2B;QACtC,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,qFAAqF;KAC7F;IACD,WAAW,EAAE;QACX,SAAS,EAAE,iCAAiC;QAC5C,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,4EAA4E;KACpF;IACD,gBAAgB,EAAE;QAChB,SAAS,EAAE,uCAAuC;QAClD,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,4EAA4E;KACpF;IACD,aAAa,EAAE;QACb,SAAS,EAAE,8BAA8B;QACzC,UAAU,EAAE,MAAM;QA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