@a5c-ai/babysitter-sdk 5.0.1-staging.893fe96d → 5.0.1-staging.89df3b1fa

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 (30) hide show
  1. package/dist/cli/commands/skill/remoteDiscovery.js +1 -1
  2. package/dist/harness/amuxFallbackMetadata.d.ts.map +1 -1
  3. package/dist/harness/amuxFallbackMetadata.js +2 -1
  4. package/dist/harness/hooks/promptContexts.d.ts +6 -1
  5. package/dist/harness/hooks/promptContexts.d.ts.map +1 -1
  6. package/dist/harness/hooks/promptContexts.js +65 -142
  7. package/dist/harness/registry.d.ts.map +1 -1
  8. package/dist/harness/registry.js +64 -68
  9. package/dist/hooks/dispatcher.d.ts +2 -2
  10. package/dist/hooks/dispatcher.d.ts.map +1 -1
  11. package/dist/hooks/dispatcher.js +56 -15
  12. package/dist/prompts/capabilityCollector.d.ts.map +1 -1
  13. package/dist/prompts/capabilityCollector.js +23 -14
  14. package/dist/prompts/compose.d.ts.map +1 -1
  15. package/dist/prompts/compose.js +13 -2
  16. package/dist/prompts/parts/criticalRules.d.ts.map +1 -1
  17. package/dist/prompts/parts/criticalRules.js +14 -1
  18. package/dist/prompts/parts/runCreation.d.ts.map +1 -1
  19. package/dist/prompts/parts/runCreation.js +23 -3
  20. package/dist/prompts/parts/taskKinds.d.ts.map +1 -1
  21. package/dist/prompts/parts/taskKinds.js +11 -3
  22. package/dist/prompts/templates/commands/assimilate.md +1 -1
  23. package/dist/prompts/templates/commands/cleanup.md +31 -9
  24. package/dist/prompts/templates/commands/contrib.md +1 -1
  25. package/dist/prompts/templates/commands/doctor.md +3 -4
  26. package/dist/prompts/templates/commands/forever.md +1 -1
  27. package/dist/prompts/templates/commands/project-install.md +1 -1
  28. package/dist/prompts/templates/commands/retrospect.md +1 -1
  29. package/dist/prompts/templates/commands/user-install.md +1 -1
  30. package/package.json +4 -4
@@ -128,7 +128,7 @@ async function discoverWellKnown(url) {
128
128
  async function fetchRemoteSkillSources(_pluginRoot) {
129
129
  const remoteSkills = [];
130
130
  const sources = [
131
- { type: 'github', url: 'https://github.com/MaTriXy/babysitter/tree/main/plugins/babysitter/skills' },
131
+ { type: 'github', url: 'https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-unified/skills' },
132
132
  ];
133
133
  try {
134
134
  const content = await node_fs_1.promises.readFile('.a5c/skill-sources.json', 'utf8');
@@ -1 +1 @@
1
- {"version":3,"file":"amuxFallbackMetadata.d.ts","sourceRoot":"","sources":["../../src/harness/amuxFallbackMetadata.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAkM1D,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAiC,CAAC"}
1
+ {"version":3,"file":"amuxFallbackMetadata.d.ts","sourceRoot":"","sources":["../../src/harness/amuxFallbackMetadata.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAmM1D,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAiC,CAAC"}
@@ -176,7 +176,7 @@ const LOCAL_FALLBACK_METADATA = {
176
176
  };
177
177
  function buildStaticFallbackMetadata() {
178
178
  try {
179
- return Object.fromEntries(Object.values((0, agent_catalog_1.listFallbackHarnessMetadata)()).map((metadata) => [
179
+ const catalogMetadata = Object.fromEntries(Object.values((0, agent_catalog_1.listFallbackHarnessMetadata)()).map((metadata) => [
180
180
  metadata.adapterName,
181
181
  {
182
182
  name: metadata.adapterName,
@@ -185,6 +185,7 @@ function buildStaticFallbackMetadata() {
185
185
  sessionDir: resolveFallbackSessionDir(metadata.sessionDir),
186
186
  },
187
187
  ]));
188
+ return Object.keys(catalogMetadata).length > 0 ? catalogMetadata : LOCAL_FALLBACK_METADATA;
188
189
  }
189
190
  catch {
190
191
  return LOCAL_FALLBACK_METADATA;
@@ -4,9 +4,14 @@
4
4
  * @deprecated Adapters now derive their config from @a5c-ai/agent-mux metadata
5
5
  * via amuxMetadata.ts and derivePromptContext.ts. These factory functions are
6
6
  * retained for backward compatibility with prompts/context.ts re-exports.
7
- * New code should use createPromptContext() directly.
7
+ * New code should use createPromptContextForHarness() directly.
8
8
  */
9
9
  import type { PromptContext } from "../../prompts/types";
10
+ /**
11
+ * Build a PromptContext from catalog data for a given harness.
12
+ * Falls back to a minimal context when the catalog target is not found.
13
+ */
14
+ export declare function createPromptContextFromCatalog(harness: string, overrides?: Partial<PromptContext>): PromptContext;
10
15
  export declare function createCodexContext(overrides?: Partial<PromptContext>): PromptContext;
11
16
  export declare function createCursorContext(overrides?: Partial<PromptContext>): PromptContext;
12
17
  export declare function createGeminiCliContext(overrides?: Partial<PromptContext>): PromptContext;
@@ -1 +1 @@
1
- {"version":3,"file":"promptContexts.d.ts","sourceRoot":"","sources":["../../../src/harness/hooks/promptContexts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOzD,wBAAgB,kBAAkB,CAChC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAkBf;AAED,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAiBf;AAED,wBAAgB,sBAAsB,CACpC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAiBf;AAED,wBAAgB,0BAA0B,CACxC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAiBf;AAED,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAiBf;AAED,wBAAgB,qBAAqB,CACnC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAiBf;AAED,wBAAgB,qBAAqB,CACnC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAiBf;AAED,wBAAgB,eAAe,CAC7B,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAiBf;AAED,wBAAgB,uBAAuB,CACrC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAkBf"}
1
+ {"version":3,"file":"promptContexts.d.ts","sourceRoot":"","sources":["../../../src/harness/hooks/promptContexts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAuBzD;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAsCf;AAED,wBAAgB,kBAAkB,CAChC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf;AAED,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf;AAED,wBAAgB,sBAAsB,CACpC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf;AAED,wBAAgB,0BAA0B,CACxC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf;AAED,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf;AAED,wBAAgB,qBAAqB,CACnC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf;AAED,wBAAgB,qBAAqB,CACnC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf;AAED,wBAAgB,eAAe,CAC7B,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf;AAED,wBAAgB,uBAAuB,CACrC,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,CAEf"}
@@ -5,9 +5,10 @@
5
5
  * @deprecated Adapters now derive their config from @a5c-ai/agent-mux metadata
6
6
  * via amuxMetadata.ts and derivePromptContext.ts. These factory functions are
7
7
  * retained for backward compatibility with prompts/context.ts re-exports.
8
- * New code should use createPromptContext() directly.
8
+ * New code should use createPromptContextForHarness() directly.
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.createPromptContextFromCatalog = createPromptContextFromCatalog;
11
12
  exports.createCodexContext = createCodexContext;
12
13
  exports.createCursorContext = createCursorContext;
13
14
  exports.createGeminiCliContext = createGeminiCliContext;
@@ -18,166 +19,88 @@ exports.createOpenCodeContext = createOpenCodeContext;
18
19
  exports.createPiContext = createPiContext;
19
20
  exports.createClaudeCodeContext = createClaudeCodeContext;
20
21
  const contextShared_1 = require("../../prompts/contextShared");
21
- function createCodexContext(overrides) {
22
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
23
+ function getTargetDescriptors() {
24
+ return (0, agent_catalog_1.listPluginTargetDescriptors)();
25
+ }
26
+ function resolveCliSetupSnippet(target) {
27
+ if (target.cliSetupMode === 'claude-code')
28
+ return (0, contextShared_1.createClaudeCodeCliSetupSnippet)();
29
+ return (0, contextShared_1.createDefaultCliSetupSnippet)();
30
+ }
31
+ function resolvePluginRootVar(target) {
32
+ if (target.pluginRootEnvVar)
33
+ return `\${${target.pluginRootEnvVar}}`;
34
+ if (target.pluginRootEnvVarForExtension)
35
+ return `\${${target.pluginRootEnvVarForExtension}}`;
36
+ return '';
37
+ }
38
+ /**
39
+ * Build a PromptContext from catalog data for a given harness.
40
+ * Falls back to a minimal context when the catalog target is not found.
41
+ */
42
+ function createPromptContextFromCatalog(harness, overrides) {
43
+ const target = getTargetDescriptors().find(t => t.targetId === harness);
44
+ if (!target) {
45
+ return (0, contextShared_1.createPromptContext)({
46
+ harness,
47
+ harnessLabel: harness,
48
+ capabilities: [],
49
+ pluginRootVar: '',
50
+ loopControlTerm: 'in-turn',
51
+ sessionBindingFlags: '',
52
+ hookDriven: false,
53
+ interactiveToolName: '',
54
+ sessionEnvVars: '',
55
+ resumeFlags: '',
56
+ cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
57
+ iterateFlags: '',
58
+ hasIntentFidelityChecks: false,
59
+ hasNonNegotiables: false,
60
+ }, overrides);
61
+ }
22
62
  return (0, contextShared_1.createPromptContext)({
23
- harness: 'codex',
24
- harnessLabel: 'Codex',
25
- capabilities: ['hooks', 'stop-hook', 'ask-user-question', 'task-tool', 'breakpoint-routing'],
26
- pluginRootVar: '${CODEX_PLUGIN_ROOT}',
27
- loopControlTerm: 'stop-hook',
63
+ harness: target.targetId,
64
+ harnessLabel: target.displayName,
65
+ capabilities: target.promptCapabilities ?? [],
66
+ pluginRootVar: resolvePluginRootVar(target),
67
+ loopControlTerm: target.loopControlTerm ?? 'in-turn',
28
68
  sessionBindingFlags: '',
29
- hookDriven: true,
30
- interactiveToolName: 'AskUserQuestion tool',
31
- sessionEnvVars: 'PID-scoped session marker (authoritative); CODEX_THREAD_ID/CODEX_SESSION_ID and AGENT_SESSION_ID are fallbacks',
69
+ hookDriven: target.hookDriven ?? false,
70
+ interactiveToolName: target.interactiveToolName ?? '',
71
+ sessionEnvVars: target.sessionEnvVarsDescription ?? '',
32
72
  resumeFlags: '',
33
- cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
73
+ cliSetupSnippet: resolveCliSetupSnippet(target),
74
+ sdkVersionExpr: target.cliSetupMode === 'claude-code' ? '$SDK_VERSION' : '',
34
75
  iterateFlags: '',
35
- hasIntentFidelityChecks: true,
36
- hasNonNegotiables: true,
76
+ hasIntentFidelityChecks: target.hasIntentFidelityChecks ?? false,
77
+ hasNonNegotiables: target.hasNonNegotiables ?? false,
37
78
  }, overrides);
38
79
  }
80
+ function createCodexContext(overrides) {
81
+ return createPromptContextFromCatalog('codex', overrides);
82
+ }
39
83
  function createCursorContext(overrides) {
40
- return (0, contextShared_1.createPromptContext)({
41
- harness: 'cursor',
42
- harnessLabel: 'Cursor',
43
- capabilities: ['hooks', 'stop-hook', 'mcp', 'task-tool', 'breakpoint-routing'],
44
- pluginRootVar: '${CURSOR_PLUGIN_ROOT}',
45
- loopControlTerm: 'stop-hook',
46
- sessionBindingFlags: '',
47
- hookDriven: true,
48
- interactiveToolName: 'AskUserQuestion tool',
49
- sessionEnvVars: 'conversation_id from hook stdin (authoritative per-request); PID-scoped session marker; AGENT_SESSION_ID fallback',
50
- resumeFlags: '',
51
- cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
52
- iterateFlags: '',
53
- hasIntentFidelityChecks: false,
54
- hasNonNegotiables: false,
55
- }, overrides);
84
+ return createPromptContextFromCatalog('cursor', overrides);
56
85
  }
57
86
  function createGeminiCliContext(overrides) {
58
- return (0, contextShared_1.createPromptContext)({
59
- harness: 'gemini-cli',
60
- harnessLabel: 'Gemini CLI',
61
- capabilities: ['hooks', 'stop-hook', 'task-tool', 'breakpoint-routing'],
62
- pluginRootVar: '${GEMINI_EXTENSION_PATH}',
63
- loopControlTerm: 'stop-hook',
64
- sessionBindingFlags: '',
65
- hookDriven: true,
66
- interactiveToolName: 'AskUserQuestion tool',
67
- sessionEnvVars: 'PID-scoped session marker (authoritative); GEMINI_SESSION_ID and AGENT_SESSION_ID are fallbacks',
68
- resumeFlags: '',
69
- cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
70
- iterateFlags: '',
71
- hasIntentFidelityChecks: false,
72
- hasNonNegotiables: false,
73
- }, overrides);
87
+ return createPromptContextFromCatalog('gemini-cli', overrides);
74
88
  }
75
89
  function createGithubCopilotContext(overrides) {
76
- return (0, contextShared_1.createPromptContext)({
77
- harness: 'github-copilot',
78
- harnessLabel: 'GitHub Copilot CLI',
79
- capabilities: ['hooks', 'mcp', 'task-tool', 'breakpoint-routing'],
80
- pluginRootVar: '${COPILOT_PLUGIN_ROOT}',
81
- loopControlTerm: 'in-turn',
82
- sessionBindingFlags: '',
83
- hookDriven: false,
84
- interactiveToolName: 'AskUserQuestion tool',
85
- sessionEnvVars: 'PID-scoped session marker (authoritative); COPILOT_ENV_FILE / COPILOT_SESSION_ID and AGENT_SESSION_ID are fallbacks',
86
- resumeFlags: '',
87
- cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
88
- iterateFlags: '',
89
- hasIntentFidelityChecks: false,
90
- hasNonNegotiables: false,
91
- }, overrides);
90
+ return createPromptContextFromCatalog('github-copilot', overrides);
92
91
  }
93
92
  function createOhMyPiContext(overrides) {
94
- return (0, contextShared_1.createPromptContext)({
95
- harness: 'oh-my-pi',
96
- harnessLabel: 'oh-my-pi',
97
- capabilities: ['skills', 'slash-commands', 'task-tool', 'harness-routing', 'programmatic-session', 'mcp'],
98
- pluginRootVar: '${OMP_PLUGIN_ROOT}',
99
- loopControlTerm: 'skill-driven',
100
- sessionBindingFlags: '',
101
- hookDriven: false,
102
- interactiveToolName: 'AskUserQuestion',
103
- sessionEnvVars: 'PID-scoped session marker (authoritative); OMP_SESSION_ID and AGENT_SESSION_ID are fallbacks',
104
- resumeFlags: '',
105
- cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
106
- iterateFlags: '',
107
- hasIntentFidelityChecks: false,
108
- hasNonNegotiables: false,
109
- }, overrides);
93
+ return createPromptContextFromCatalog('oh-my-pi', overrides);
110
94
  }
111
95
  function createOpenClawContext(overrides) {
112
- return (0, contextShared_1.createPromptContext)({
113
- harness: 'openclaw',
114
- harnessLabel: 'OpenClaw',
115
- capabilities: ['session-binding', 'mcp', 'headless-prompt', 'task-tool', 'breakpoint-routing'],
116
- pluginRootVar: '',
117
- loopControlTerm: 'agent_end',
118
- sessionBindingFlags: '',
119
- hookDriven: false,
120
- interactiveToolName: 'AskUserQuestion tool',
121
- sessionEnvVars: 'PID-scoped session marker (authoritative); OPENCLAW_SHELL gateway injection and AGENT_SESSION_ID are fallbacks',
122
- resumeFlags: '',
123
- cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
124
- iterateFlags: '',
125
- hasIntentFidelityChecks: false,
126
- hasNonNegotiables: false,
127
- }, overrides);
96
+ return createPromptContextFromCatalog('openclaw', overrides);
128
97
  }
129
98
  function createOpenCodeContext(overrides) {
130
- return (0, contextShared_1.createPromptContext)({
131
- harness: 'opencode',
132
- harnessLabel: 'OpenCode',
133
- capabilities: ['task-tool', 'breakpoint-routing'],
134
- pluginRootVar: '',
135
- loopControlTerm: 'in-turn',
136
- sessionBindingFlags: '',
137
- hookDriven: false,
138
- interactiveToolName: '',
139
- sessionEnvVars: 'PID-scoped session marker (authoritative); shell.env-injected session ID and AGENT_SESSION_ID are fallbacks',
140
- resumeFlags: '',
141
- cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
142
- iterateFlags: '',
143
- hasIntentFidelityChecks: false,
144
- hasNonNegotiables: false,
145
- }, overrides);
99
+ return createPromptContextFromCatalog('opencode', overrides);
146
100
  }
147
101
  function createPiContext(overrides) {
148
- return (0, contextShared_1.createPromptContext)({
149
- harness: 'pi',
150
- harnessLabel: 'Pi Coding Agent',
151
- capabilities: ['skills', 'slash-commands', 'task-tool', 'harness-routing', 'programmatic-session'],
152
- pluginRootVar: '${PI_PLUGIN_ROOT}',
153
- loopControlTerm: 'skill-driven',
154
- sessionBindingFlags: '',
155
- hookDriven: false,
156
- interactiveToolName: 'AskUserQuestion',
157
- sessionEnvVars: 'PID-scoped session marker (authoritative); PI_SESSION_ID and AGENT_SESSION_ID are fallbacks',
158
- resumeFlags: '',
159
- cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
160
- iterateFlags: '',
161
- hasIntentFidelityChecks: false,
162
- hasNonNegotiables: false,
163
- }, overrides);
102
+ return createPromptContextFromCatalog('pi', overrides);
164
103
  }
165
104
  function createClaudeCodeContext(overrides) {
166
- return (0, contextShared_1.createPromptContext)({
167
- harness: 'claude-code',
168
- harnessLabel: 'Claude Code',
169
- capabilities: ['hooks', 'stop-hook', 'ask-user-question', 'task-tool', 'breakpoint-routing'],
170
- pluginRootVar: '${CLAUDE_PLUGIN_ROOT}',
171
- loopControlTerm: 'stop-hook',
172
- sessionBindingFlags: '',
173
- hookDriven: true,
174
- interactiveToolName: 'AskUserQuestion tool',
175
- sessionEnvVars: 'PID-scoped session marker (authoritative); CLAUDE_ENV_FILE and AGENT_SESSION_ID are fallbacks',
176
- resumeFlags: '',
177
- cliSetupSnippet: (0, contextShared_1.createClaudeCodeCliSetupSnippet)(),
178
- sdkVersionExpr: '$SDK_VERSION',
179
- iterateFlags: '',
180
- hasIntentFidelityChecks: false,
181
- hasNonNegotiables: false,
182
- }, overrides);
105
+ return createPromptContextFromCatalog('claude-code', overrides);
183
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/harness/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAM3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAiBvE,eAAO,MAAM,0BAA0B,EAAE,WAMxC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAM/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,WAMlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,WAMnC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,WAMvC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,WAM3C,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,WAMrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,WAMrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,WAMrC,CAAC;AAEF,YAAY,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAyEvE,eAAO,MAAM,eAAe,EAAE,SAAS,WAAW,EAYjD,CAAC;AAMF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAExE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAE9D;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,GAChB,wBAAwB,GAAG,IAAI,CAGjC;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,GAAG,IAAI,CAStB;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,cAAc,CAK9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAGpE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AAID;;GAEG;AACH,wBAAgB,UAAU,IAAI,cAAc,CAK3C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAExD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/harness/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAM3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAsEvE,eAAO,MAAM,0BAA0B,EAAE,WAAoC,CAAC;AAC9E,eAAO,MAAM,iBAAiB,EAAE,WAA2B,CAAC;AAC5D,eAAO,MAAM,oBAAoB,EAAE,WAA8B,CAAC;AAClE,eAAO,MAAM,qBAAqB,EAAE,WAA+B,CAAC;AACpE,eAAO,MAAM,yBAAyB,EAAE,WAAmC,CAAC;AAC5E,eAAO,MAAM,6BAA6B,EAAE,WAAuC,CAAC;AACpF,eAAO,MAAM,uBAAuB,EAAE,WAAiC,CAAC;AACxE,eAAO,MAAM,uBAAuB,EAAE,WAAiC,CAAC;AACxE,eAAO,MAAM,uBAAuB,EAAE,WAAiC,CAAC;AAExE,YAAY,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAyEvE,eAAO,MAAM,eAAe,EAAE,SAAS,WAAW,EAWjD,CAAC;AAMF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAExE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAE9D;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,GAChB,wBAAwB,GAAG,IAAI,CAGjC;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,aAAa,GAAG,IAAI,CAStB;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,cAAc,CAK9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAGpE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AAID;;GAEG;AACH,wBAAgB,UAAU,IAAI,cAAc,CAK3C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAExD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
@@ -31,71 +31,68 @@ const adapter_1 = require("./unified/adapter");
31
31
  const discovery_1 = require("./unified/discovery");
32
32
  const customAdapter_1 = require("./customAdapter");
33
33
  // ---------------------------------------------------------------------------
34
- // Inline discovery specs (previously in per-adapter discovery.ts files)
34
+ // Discovery specs derived from agent-catalog (which reads Atlas graph)
35
35
  // ---------------------------------------------------------------------------
36
- exports.CLAUDE_CODE_DISCOVERY_SPEC = {
37
- name: "claude-code",
38
- cli: "claude",
39
- callerEnvVars: ["CLAUDE_ENV_FILE"],
40
- capabilities: [types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.StopHook, types_1.HarnessCapability.Mcp, types_1.HarnessCapability.HeadlessPrompt],
41
- configPaths: [".claude"],
42
- };
43
- exports.PI_DISCOVERY_SPEC = {
44
- name: "pi",
45
- cli: "pi",
46
- callerEnvVars: ["PI_SESSION_ID"],
47
- capabilities: [types_1.HarnessCapability.Programmatic, types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.HeadlessPrompt],
48
- configPaths: [".pi"],
49
- };
50
- exports.CODEX_DISCOVERY_SPEC = {
51
- name: "codex",
52
- cli: "codex",
53
- callerEnvVars: ["CODEX_THREAD_ID", "CODEX_SESSION_ID", "CODEX_PLUGIN_ROOT"],
54
- capabilities: [types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.StopHook, types_1.HarnessCapability.HeadlessPrompt],
55
- configPaths: [".codex"],
56
- };
57
- exports.CURSOR_DISCOVERY_SPEC = {
58
- name: "cursor",
59
- cli: "cursor",
60
- callerEnvVars: ["CURSOR_PROJECT_DIR", "CURSOR_VERSION"],
61
- capabilities: [types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.StopHook, types_1.HarnessCapability.HeadlessPrompt],
62
- configPaths: [".cursor"],
63
- };
64
- exports.GEMINI_CLI_DISCOVERY_SPEC = {
65
- name: "gemini-cli",
66
- cli: "gemini",
67
- callerEnvVars: ["GEMINI_SESSION_ID", "GEMINI_CWD", "GEMINI_PROJECT_DIR"],
68
- capabilities: [types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.StopHook, types_1.HarnessCapability.HeadlessPrompt],
69
- configPaths: [".gemini"],
70
- };
71
- exports.GITHUB_COPILOT_DISCOVERY_SPEC = {
72
- name: "github-copilot",
73
- cli: "gh",
74
- callerEnvVars: ["COPILOT_SESSION_ID"],
75
- capabilities: [types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.StopHook, types_1.HarnessCapability.HeadlessPrompt],
76
- configPaths: [".github", ".copilot"],
77
- };
78
- exports.OH_MY_PI_DISCOVERY_SPEC = {
79
- name: "oh-my-pi",
80
- cli: "pi",
81
- callerEnvVars: ["OMP_SESSION_ID"],
82
- capabilities: [types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.StopHook, types_1.HarnessCapability.Programmatic],
83
- configPaths: [".omp"],
84
- };
85
- exports.OPENCODE_DISCOVERY_SPEC = {
86
- name: "opencode",
87
- cli: "opencode",
88
- callerEnvVars: ["AGENT_SESSION_ID", "OPENCODE_SESSION_ID"],
89
- capabilities: [types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.StopHook, types_1.HarnessCapability.HeadlessPrompt],
90
- configPaths: [".opencode"],
91
- };
92
- exports.OPENCLAW_DISCOVERY_SPEC = {
93
- name: "openclaw",
94
- cli: "openclaw",
95
- callerEnvVars: [],
96
- capabilities: [types_1.HarnessCapability.Programmatic, types_1.HarnessCapability.HeadlessPrompt],
97
- configPaths: [".openclaw"],
36
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
37
+ const CAPABILITY_MAP = {
38
+ SessionBinding: types_1.HarnessCapability.SessionBinding,
39
+ StopHook: types_1.HarnessCapability.StopHook,
40
+ Mcp: types_1.HarnessCapability.Mcp,
41
+ HeadlessPrompt: types_1.HarnessCapability.HeadlessPrompt,
42
+ Programmatic: types_1.HarnessCapability.Programmatic,
98
43
  };
44
+ function buildDiscoverySpecs() {
45
+ const specs = new Map();
46
+ try {
47
+ for (const target of (0, agent_catalog_1.listPluginTargetDescriptors)()) {
48
+ if (!target.cliCommand)
49
+ continue;
50
+ specs.set(target.targetId, {
51
+ name: target.targetId,
52
+ cli: target.cliCommand,
53
+ callerEnvVars: target.callerEnvVars ?? [],
54
+ capabilities: (target.harnessCapabilities ?? [])
55
+ .map((c) => CAPABILITY_MAP[c])
56
+ .filter((c) => c !== undefined),
57
+ configPaths: target.configPaths ?? [],
58
+ });
59
+ }
60
+ }
61
+ catch {
62
+ // Atlas/catalog not available (e.g. during initial bootstrap) — empty specs
63
+ }
64
+ return specs;
65
+ }
66
+ let cachedDiscoverySpecs;
67
+ function getDiscoverySpecs() {
68
+ if (!cachedDiscoverySpecs)
69
+ cachedDiscoverySpecs = buildDiscoverySpecs();
70
+ return cachedDiscoverySpecs;
71
+ }
72
+ function getDiscoverySpec(name) {
73
+ return getDiscoverySpecs().get(name);
74
+ }
75
+ // Named exports for backward compatibility (consumers import these directly).
76
+ // All fields are derived from the catalog with no hardcoded fallbacks --
77
+ // if the catalog is unavailable the spec returns empty defaults.
78
+ function specFor(id) {
79
+ return {
80
+ get name() { return getDiscoverySpec(id)?.name ?? id; },
81
+ get cli() { return getDiscoverySpec(id)?.cli ?? ''; },
82
+ get callerEnvVars() { return getDiscoverySpec(id)?.callerEnvVars ?? []; },
83
+ get capabilities() { return getDiscoverySpec(id)?.capabilities ?? []; },
84
+ get configPaths() { return getDiscoverySpec(id)?.configPaths ?? []; },
85
+ };
86
+ }
87
+ exports.CLAUDE_CODE_DISCOVERY_SPEC = specFor("claude-code");
88
+ exports.PI_DISCOVERY_SPEC = specFor("pi");
89
+ exports.CODEX_DISCOVERY_SPEC = specFor("codex");
90
+ exports.CURSOR_DISCOVERY_SPEC = specFor("cursor");
91
+ exports.GEMINI_CLI_DISCOVERY_SPEC = specFor("gemini-cli");
92
+ exports.GITHUB_COPILOT_DISCOVERY_SPEC = specFor("github-copilot");
93
+ exports.OH_MY_PI_DISCOVERY_SPEC = specFor("oh-my-pi");
94
+ exports.OPENCODE_DISCOVERY_SPEC = specFor("opencode");
95
+ exports.OPENCLAW_DISCOVERY_SPEC = specFor("openclaw");
99
96
  const HARNESS_REGISTRY = [
100
97
  {
101
98
  name: "codex",
@@ -157,14 +154,13 @@ const harnessRegistryByName = new Map(HARNESS_REGISTRY.map((entry) => [entry.nam
157
154
  exports.KNOWN_HARNESSES = [
158
155
  exports.CLAUDE_CODE_DISCOVERY_SPEC,
159
156
  exports.CODEX_DISCOVERY_SPEC,
160
- exports.CURSOR_DISCOVERY_SPEC,
157
+ exports.PI_DISCOVERY_SPEC,
158
+ exports.OH_MY_PI_DISCOVERY_SPEC,
161
159
  exports.GEMINI_CLI_DISCOVERY_SPEC,
162
- exports.GITHUB_COPILOT_DISCOVERY_SPEC,
160
+ exports.CURSOR_DISCOVERY_SPEC,
163
161
  exports.OPENCODE_DISCOVERY_SPEC,
164
- exports.OH_MY_PI_DISCOVERY_SPEC,
162
+ exports.GITHUB_COPILOT_DISCOVERY_SPEC,
165
163
  exports.OPENCLAW_DISCOVERY_SPEC,
166
- exports.PI_DISCOVERY_SPEC,
167
- // Unified is last — lowest priority in discovery and caller detection.
168
164
  discovery_1.UNIFIED_DISCOVERY_SPEC,
169
165
  ];
170
166
  function createKnownAdapters() {
@@ -6,14 +6,14 @@ import type { HookDispatcherOptions, HookResult } from "./types";
6
6
  export interface DiscoveredHook {
7
7
  path: string;
8
8
  name: string;
9
- location: "per-repo" | "per-user";
9
+ location: "per-repo" | "per-user" | "plugin";
10
10
  }
11
11
  /**
12
12
  * Discover hook scripts for a given hook type from project and user directories.
13
13
  */
14
14
  export declare function discoverHooks(hookType: string, cwd: string, homeDir?: string): Promise<DiscoveredHook[]>;
15
15
  /**
16
- * Find `plugins/babysitter/hooks/hook-dispatcher.sh` by walking up from cwd.
16
+ * Find `plugins/babysitter-unified/hooks/hook-dispatcher.sh` by walking up from cwd.
17
17
  * This allows running from nested projects/fixtures inside a mono-repo.
18
18
  *
19
19
  * First checks the active harness adapter for a harness-specific path
@@ -1 +1 @@
1
- {"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/hooks/dispatcher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EACV,qBAAqB,EACrB,UAAU,EAEX,MAAM,SAAS,CAAC;AAMjB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;CACnC;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,MAAqB,GAC7B,OAAO,CAAC,cAAc,EAAE,CAAC,CAmC3B;AAkED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAetE;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,UAAU,CAAC,CAyHrB"}
1
+ {"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/hooks/dispatcher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EACV,qBAAqB,EACrB,UAAU,EAEX,MAAM,SAAS,CAAC;AAMjB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;CAC9C;AAgCD;;GAEG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,MAAqB,GAC7B,OAAO,CAAC,cAAc,EAAE,CAAC,CA6C3B;AAkED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoBtE;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,UAAU,CAAC,CAqHrB"}
@@ -47,6 +47,36 @@ const path = __importStar(require("node:path"));
47
47
  const defaults_1 = require("../config/defaults");
48
48
  const harness_1 = require("../harness");
49
49
  const HOOK_SCRIPT_EXTENSIONS = new Set([".sh", ".js", ".ts", ".py", ".bash"]);
50
+ function findPluginHookPath(startCwd, hookType) {
51
+ const candidateNames = Array.from(HOOK_SCRIPT_EXTENSIONS, (ext) => `${hookType}${ext}`);
52
+ const adapterPluginRoot = (0, harness_1.getAdapter)().resolvePluginRoot({});
53
+ if (adapterPluginRoot) {
54
+ for (const candidateName of candidateNames) {
55
+ const candidate = path.join(adapterPluginRoot, "hooks", candidateName);
56
+ if ((0, node_fs_1.existsSync)(candidate))
57
+ return candidate;
58
+ }
59
+ }
60
+ let current = path.resolve(startCwd);
61
+ for (let i = 0; i < 50; i++) {
62
+ const hookRoots = [
63
+ path.join(current, "plugins", "babysitter-unified", "hooks"),
64
+ path.join(current, "plugins", "babysitter", "hooks"),
65
+ ];
66
+ for (const hookRoot of hookRoots) {
67
+ for (const candidateName of candidateNames) {
68
+ const candidate = path.join(hookRoot, candidateName);
69
+ if ((0, node_fs_1.existsSync)(candidate))
70
+ return candidate;
71
+ }
72
+ }
73
+ const parent = path.dirname(current);
74
+ if (parent === current)
75
+ break;
76
+ current = parent;
77
+ }
78
+ return null;
79
+ }
50
80
  /**
51
81
  * Discover hook scripts for a given hook type from project and user directories.
52
82
  */
@@ -80,7 +110,16 @@ async function discoverHooks(hookType, cwd, homeDir = os.homedir()) {
80
110
  readHooksFromDir(projectHookDir, "per-repo"),
81
111
  readHooksFromDir(userHookDir, "per-user"),
82
112
  ]);
83
- return [...projectHooks, ...userHooks];
113
+ const hooks = [...projectHooks, ...userHooks];
114
+ const pluginHookPath = findPluginHookPath(cwd, hookType);
115
+ if (pluginHookPath) {
116
+ hooks.push({
117
+ path: pluginHookPath,
118
+ name: path.basename(pluginHookPath),
119
+ location: "plugin",
120
+ });
121
+ }
122
+ return hooks;
84
123
  }
85
124
  /**
86
125
  * Execute discovered hook scripts sequentially, passing payload as stdin JSON.
@@ -134,7 +173,7 @@ async function executeDiscoveredHooks(hooks, payload, hookType, cwd, timeout) {
134
173
  };
135
174
  }
136
175
  /**
137
- * Find `plugins/babysitter/hooks/hook-dispatcher.sh` by walking up from cwd.
176
+ * Find `plugins/babysitter-unified/hooks/hook-dispatcher.sh` by walking up from cwd.
138
177
  * This allows running from nested projects/fixtures inside a mono-repo.
139
178
  *
140
179
  * First checks the active harness adapter for a harness-specific path
@@ -150,9 +189,14 @@ function findHookDispatcherPath(startCwd) {
150
189
  let current = path.resolve(startCwd);
151
190
  // Guard against infinite loops: stop once we stop making progress.
152
191
  for (let i = 0; i < 50; i++) {
153
- const candidate = path.join(current, "plugins", "babysitter", "hooks", "hook-dispatcher.sh");
154
- if ((0, node_fs_1.existsSync)(candidate))
155
- return candidate;
192
+ const candidates = [
193
+ path.join(current, "plugins", "babysitter-unified", "hooks", "hook-dispatcher.sh"),
194
+ path.join(current, "plugins", "babysitter", "hooks", "hook-dispatcher.sh"),
195
+ ];
196
+ for (const candidate of candidates) {
197
+ if ((0, node_fs_1.existsSync)(candidate))
198
+ return candidate;
199
+ }
156
200
  const parent = path.dirname(current);
157
201
  if (parent === current)
158
202
  break;
@@ -167,18 +211,15 @@ async function callHook(options) {
167
211
  const { hookType, payload, cwd = process.cwd(), timeout = defaults_1.DEFAULTS.hookTimeout, throwOnFailure = false, } = options;
168
212
  const dispatcherPath = findHookDispatcherPath(cwd);
169
213
  if (!dispatcherPath) {
170
- // Fall back to filesystem-discovered hooks
171
214
  const discoveredHooks = await discoverHooks(hookType, cwd);
172
- if (discoveredHooks.length > 0) {
173
- return executeDiscoveredHooks(discoveredHooks, payload, hookType, cwd, timeout);
215
+ if (discoveredHooks.length === 0) {
216
+ return {
217
+ hookType,
218
+ success: true,
219
+ executedHooks: [],
220
+ };
174
221
  }
175
- return {
176
- hookType,
177
- success: false,
178
- error: `Hook dispatcher not found. Expected plugins/babysitter/hooks/hook-dispatcher.sh ` +
179
- `in ${cwd} or any parent directory.`,
180
- executedHooks: [],
181
- };
222
+ return executeDiscoveredHooks(discoveredHooks, payload, hookType, cwd, timeout);
182
223
  }
183
224
  const payloadJson = JSON.stringify(payload);
184
225
  const startTime = Date.now();
@@ -1 +1 @@
1
- {"version":3,"file":"capabilityCollector.d.ts","sourceRoot":"","sources":["../../src/prompts/capabilityCollector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,4CAA4C;IAC5C,GAAG,EAAE,MAAM,EAAE,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,wDAAwD;IACxD,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAqBhC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EAAE,EACd,SAAS,EAAE,qBAAqB,GAC/B,MAAM,EAAE,CAGV"}
1
+ {"version":3,"file":"capabilityCollector.d.ts","sourceRoot":"","sources":["../../src/prompts/capabilityCollector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,4CAA4C;IAC5C,GAAG,EAAE,MAAM,EAAE,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,wDAAwD;IACxD,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAqBhC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EAAE,EACd,SAAS,EAAE,qBAAqB,GAC/B,MAAM,EAAE,CAGV"}
@@ -13,6 +13,7 @@ exports.collectCapabilities = collectCapabilities;
13
13
  exports.mergeCapabilities = mergeCapabilities;
14
14
  const registry_1 = require("../plugins/registry");
15
15
  const active_1 = require("../processLibrary/active");
16
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
16
17
  /**
17
18
  * Collect capabilities from installed plugins, process-library bindings,
18
19
  * harness adapters, and feature flags.
@@ -85,25 +86,33 @@ async function collectLibraryCapabilities(options) {
85
86
  }
86
87
  /**
87
88
  * Collect adapter capabilities from harness name.
88
- * Maps known harness capabilities to string identifiers.
89
+ * Reads capabilities from the agent-catalog (Atlas graph) instead of a
90
+ * hardcoded map. Falls back to empty when the catalog is unavailable.
89
91
  */
90
92
  function collectAdapterCapabilities(options) {
91
93
  if (!options.harness)
92
94
  return [];
93
- // Map known harness names to their intrinsic capabilities
94
- const harnessCapabilities = {
95
- 'claude-code': ['hooks', 'stop-hook', 'session-binding'],
96
- 'codex': ['hooks', 'stop-hook', 'session-binding'],
97
- 'cursor': ['hooks', 'stop-hook', 'mcp'],
98
- 'gemini-cli': ['hooks', 'stop-hook'],
99
- 'github-copilot': ['hooks', 'mcp'],
100
- 'pi': ['programmatic-session', 'skills'],
101
- 'oh-my-pi': ['programmatic-session', 'skills', 'mcp'],
102
- 'opencode': [],
103
- 'openclaw': ['session-binding', 'mcp', 'headless-prompt'],
104
- 'internal': ['programmatic-session', 'concurrent-effects', 'background-effects'],
95
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === options.harness);
96
+ if (target?.harnessCapabilities) {
97
+ return capabilityIdsToAdapterCapabilities(target.harnessCapabilities);
98
+ }
99
+ return [];
100
+ }
101
+ /** Map Atlas capability IDs (PascalCase) to adapter capability strings (kebab-case). */
102
+ function capabilityIdsToAdapterCapabilities(ids) {
103
+ const CAPABILITY_MAP = {
104
+ SessionBinding: 'session-binding',
105
+ StopHook: 'stop-hook',
106
+ Mcp: 'mcp',
107
+ HeadlessPrompt: 'headless-prompt',
108
+ Programmatic: 'programmatic-session',
105
109
  };
106
- return harnessCapabilities[options.harness] ?? [];
110
+ // Also include hooks if StopHook is present
111
+ const mapped = ids.map(id => CAPABILITY_MAP[id]).filter((c) => Boolean(c));
112
+ if (ids.includes('StopHook') && !mapped.includes('hooks')) {
113
+ mapped.unshift('hooks');
114
+ }
115
+ return mapped;
107
116
  }
108
117
  /**
109
118
  * Collect flag capabilities from feature flags.
@@ -1 +1 @@
1
- {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/prompts/compose.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxC;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAmFpE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAiBrE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAkBrE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAKlE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAEvD"}
1
+ {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/prompts/compose.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAcxC;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAmFpE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAiBrE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAkBrE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAKlE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAEvD"}
@@ -44,13 +44,24 @@ exports.composeOrchestrationPrompt = composeOrchestrationPrompt;
44
44
  exports.composeBreakpointPrompt = composeBreakpointPrompt;
45
45
  exports.joinNonEmpty = joinNonEmpty;
46
46
  const parts = __importStar(require("./parts"));
47
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
48
+ /**
49
+ * Resolve the orchestration step count from catalog metadata.
50
+ * Harnesses that consolidate steps (e.g. claude-code) report a lower count.
51
+ */
52
+ function resolveStepCount(ctx) {
53
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === ctx.harness);
54
+ if (target?.defaultStepCount)
55
+ return String(target.defaultStepCount);
56
+ return '8';
57
+ }
47
58
  /**
48
59
  * Full babysit skill prompt -- equivalent to the current SKILL.md content.
49
60
  * Used to generate SKILL.md files for each harness plugin.
50
61
  */
51
62
  function composeBabysitSkillPrompt(ctx) {
52
- // Determine step count based on harness
53
- const stepCount = ctx.harness === 'claude-code' ? '4' : '8';
63
+ // Determine step count from catalog-derived context or fallback
64
+ const stepCount = resolveStepCount(ctx);
54
65
  // Determine loop step description
55
66
  const loopStepDesc = ctx.loopControlTerm === 'stop-hook'
56
67
  ? `**Stop and yield** - the ${ctx.harnessLabel} ${ctx.loopControlTerm} decides whether to continue`
@@ -1 +1 @@
1
- {"version":3,"file":"criticalRules.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/criticalRules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAQ9D"}
1
+ {"version":3,"file":"criticalRules.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/criticalRules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAgB9C;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAQ9D"}
@@ -2,12 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderCriticalRules = renderCriticalRules;
4
4
  const templateRenderer_1 = require("../templateRenderer");
5
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
6
+ /**
7
+ * Resolve whether the current harness uses codex-style ambient env var
8
+ * session binding (CODEX_THREAD_ID / CODEX_SESSION_ID). Checks catalog
9
+ * callerEnvVars instead of comparing harness name.
10
+ */
11
+ function hasCodexAmbientSessionBinding(ctx) {
12
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === ctx.harness);
13
+ if (target?.callerEnvVars) {
14
+ return target.callerEnvVars.includes('CODEX_THREAD_ID') || target.callerEnvVars.includes('CODEX_SESSION_ID');
15
+ }
16
+ return false;
17
+ }
5
18
  /**
6
19
  * Renders the Critical Rules section, parameterized by harness context.
7
20
  * All content lives in the critical-rules.md template.
8
21
  */
9
22
  function renderCriticalRules(ctx) {
10
- const codexSessionIdRule = ctx.harness === 'codex'
23
+ const codexSessionIdRule = hasCodexAmbientSessionBinding(ctx)
11
24
  ? `CRITICAL RULE: Do not fabricate a session ID. The ${ctx.harnessLabel} adapter resolves\nthe session ID from direct ambient bindings first: \`CODEX_THREAD_ID\`/\`CODEX_SESSION_ID\`,\nthen \`AGENT_SESSION_ID\`, and only then falls back to the PID-scoped marker.\nDo not assume env vars are always present or fresh: they may be stale (inherited\nfrom an ancestor shell) or missing. The PID-scoped marker exists as the final\nrecovery path when env propagation is absent. For CI pipelines that deliberately export\n\`AGENT_SESSION_ID\`, set \`AGENT_TRUST_ENV_SESSION=1\` to force the legacy\ntrusted-env behavior explicitly.`
12
25
  : '';
13
26
  return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('critical-rules.md'), ctx, {
@@ -1 +1 @@
1
- {"version":3,"file":"runCreation.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/runCreation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAoC5D"}
1
+ {"version":3,"file":"runCreation.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/runCreation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAsB9C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAsC5D"}
@@ -2,6 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderRunCreation = renderRunCreation;
4
4
  const templateRenderer_1 = require("../templateRenderer");
5
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
6
+ /**
7
+ * Check whether the harness uses codex-style ambient env var session binding.
8
+ */
9
+ function hasCodexAmbientSessionBinding(ctx) {
10
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === ctx.harness);
11
+ if (target?.callerEnvVars) {
12
+ return target.callerEnvVars.includes('CODEX_THREAD_ID') || target.callerEnvVars.includes('CODEX_SESSION_ID');
13
+ }
14
+ return false;
15
+ }
16
+ /**
17
+ * Check whether the harness uses programmatic adapter family (pi-style).
18
+ */
19
+ function isProgrammaticAdapter(ctx) {
20
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === ctx.harness);
21
+ return target?.adapterFamily === 'programmatic';
22
+ }
5
23
  /**
6
24
  * Renders the run:create and session binding section.
7
25
  * Complex conditional logic is pre-computed and passed as extras to the template.
@@ -19,15 +37,17 @@ function renderRunCreation(ctx) {
19
37
  `- \`--harness ${ctx.harness}\` -- activates ${ctx.harnessLabel} session binding. The session ID is`,
20
38
  ` auto-resolved from ${ctx.sessionEnvVars}.`,
21
39
  ];
22
- const sessionIdNote = ctx.harness === 'codex'
40
+ const isCodexStyle = hasCodexAmbientSessionBinding(ctx);
41
+ const sessionIdNote = isCodexStyle
23
42
  ? `Do **not** pass \`--session-id\` explicitly inside a real ${ctx.harnessLabel} session. The\nsession ID auto-resolves from the **PID-scoped session marker** written by the\nsession-start hook (authoritative), with the harness env file and\n\`AGENT_SESSION_ID\` env var used only as last-resort fallbacks. Orchestrators\ncan verify the binding at any time via \`babysitter session:whoami --json\`. Only\npass \`--session-id\` in out-of-band recovery flows.\n`
24
43
  : `The session ID auto-resolves from the **PID-scoped session marker** written by\nthe session-start hook (authoritative), with the harness env file and\n\`AGENT_SESSION_ID\` env var used only as last-resort fallbacks. Orchestrators\ncan verify the binding at any time via \`babysitter session:whoami --json\`.\n`;
25
44
  const resumeFlagsLine = ctx.resumeFlags
26
45
  ? `\n ${ctx.resumeFlags} \\`
27
46
  : '';
28
- const mistakeHarnessNote = ctx.harness === 'codex'
47
+ const isProgrammatic = isProgrammaticAdapter(ctx);
48
+ const mistakeHarnessNote = isCodexStyle
29
49
  ? `- wrong: Trying to bind the session in a separate step after run creation\n- correct: Using \`--harness ${ctx.harness}\` with \`run:create\` to create the run AND\n auto-bind the session, relying on environment variables for honest session\n binding`
30
- : ctx.harness === 'pi'
50
+ : isProgrammatic
31
51
  ? `- correct: Using \`--harness ${ctx.harness}\` with \`run:create\` to create the run AND\n auto-bind the session, relying on the environment variables set by the\n extension for honest session binding.`
32
52
  : `- wrong: Trying to bind the session in a separate step after run creation instead of using \`--harness ${ctx.harness}\` to do both in one step.\n- correct: Using \`--harness ${ctx.harness}\` with \`run:create\` to create the run AND auto-bind the session without manual intervention and relying on the environment variables set by the hooks for honest session binding.`;
33
53
  return (0, templateRenderer_1.renderTemplate)((0, templateRenderer_1.resolveTemplatePath)('run-creation.md'), ctx, {
@@ -1 +1 @@
1
- {"version":3,"file":"taskKinds.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/taskKinds.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAW1D"}
1
+ {"version":3,"file":"taskKinds.d.ts","sourceRoot":"","sources":["../../../src/prompts/parts/taskKinds.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAY9C;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAS1D"}
@@ -2,13 +2,21 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderTaskKinds = renderTaskKinds;
4
4
  const templateRenderer_1 = require("../templateRenderer");
5
+ const agent_catalog_1 = require("@a5c-ai/agent-catalog");
6
+ /**
7
+ * Resolve the skill system label from catalog metadata.
8
+ */
9
+ function resolveSkillSystemLabel(ctx) {
10
+ const target = (0, agent_catalog_1.listPluginTargetDescriptors)().find(t => t.targetId === ctx.harness);
11
+ if (target?.skillSystemLabel)
12
+ return target.skillSystemLabel;
13
+ return 'Installed skill';
14
+ }
5
15
  /**
6
16
  * Renders the Task Kinds table and Effect Execution Hints section.
7
17
  */
8
18
  function renderTaskKinds(ctx) {
9
- const skillSystemLabel = ctx.harness === 'claude-code'
10
- ? 'Claude Code skill'
11
- : 'Installed skill';
19
+ const skillSystemLabel = resolveSkillSystemLabel(ctx);
12
20
  const augmentedCtx = {
13
21
  ...ctx,
14
22
  skillSystemLabel,
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter/commands/assimilate.md. Do not edit directly. -->
1
+ <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter-unified/commands/assimilate.md. Do not edit directly. -->
2
2
 
3
3
  [ASSIMILATE MODE] Assimilate an external methodology, harness, or specification into babysitter process definitions with skills and agents.
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter/commands/cleanup.md. Do not edit directly. -->
1
+ <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter-unified/commands/cleanup.md. Do not edit directly. -->
2
2
 
3
3
  [CLEANUP MODE] Clean up .a5c/runs and .a5c/processes directories. Aggregates insights from completed/failed runs into docs/run-history-insights.md, then removes old run data and orphaned process files.
4
4
 
@@ -20,13 +20,35 @@ Create and run a cleanup process using the process at `skills\babysit\process\cr
20
20
 
21
21
  Implementation notes (for the process):
22
22
  - Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
23
- - The process scans .a5c/runs/ for completed/failed runs, aggregates insights, writes summaries, then removes old data
24
- - Always show the user what will be removed before removing (in interactive mode via breakpoints)
25
- - In non-interactive mode (yolo), proceed with cleanup using defaults
26
- - The insights file goes to docs/run-history-insights.md
27
- - Only remove terminal runs (completed/failed) older than the keep-days threshold
28
- - Never remove active/in-progress runs
29
- - Remove orphaned process files not referenced by remaining runs
30
- - After cleanup, show remaining run count and disk usage
23
+
24
+ CRITICAL: The cleanup MUST follow this exact phase order. Do NOT delete any run before Phase 2 completes.
25
+
26
+ Phase 1 Scan:
27
+ - Scan .a5c/runs/ for all runs
28
+ - Classify each as terminal (completed/failed) or active (in-progress/created)
29
+ - Identify terminal runs older than the keep-days threshold as removal candidates
30
+ - Never mark active/in-progress runs for removal
31
+ - Count and report: total runs, terminal, active, removal candidates, disk usage
32
+
33
+ Phase 2 — Aggregate insights (BEFORE any deletion):
34
+ - For EVERY removal candidate, read its run.json and journal/ events
35
+ - Extract: processId, prompt, status, event count, created date, task summaries
36
+ - Group by process type and extract patterns (retry counts, convergence behavior, failure modes)
37
+ - Append a new dated section to docs/run-history-insights.md with:
38
+ - Summary statistics (runs removed, disk freed, runs retained)
39
+ - Run categories with counts and descriptions
40
+ - Key patterns observed (multi-batch convergence, retry behavior, etc.)
41
+ - What worked well / what didn't from the run data
42
+ - This file MUST be written and verified before proceeding to Phase 3
43
+
44
+ Phase 3 — Confirm removal:
45
+ - In interactive mode, show the user what will be removed via a breakpoint
46
+ - In non-interactive mode (yolo), proceed with defaults
47
+ - In dry-run mode, stop here and show what would be removed
48
+
49
+ Phase 4 — Remove:
50
+ - Delete the terminal runs older than keep-days threshold
51
+ - Identify and remove orphaned process files not referenced by remaining runs
52
+ - Show remaining run count and disk usage after cleanup
31
53
 
32
54
  {{#additionalInstructions}}Additional instructions: {{additionalInstructions}}{{/additionalInstructions}}
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter/commands/contrib.md. Do not edit directly. -->
1
+ <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter-unified/commands/contrib.md. Do not edit directly. -->
2
2
 
3
3
  [CONTRIB MODE] Submit feedback or contribute to babysitter project
4
4
  Route to the appropriate workflow based on arguments:
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter/commands/doctor.md. Do not edit directly. -->
1
+ <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter-unified/commands/doctor.md. Do not edit directly. -->
2
2
 
3
3
  [DOCTOR MODE] Diagnose babysitter run health - journal integrity, state cache, effects, locks, sessions, logs, and disk usage
4
4
 
@@ -156,7 +156,6 @@ If it exists:
156
156
  **Goal:** Inspect babysitter session files for health and detect runaway loops.
157
157
 
158
158
  - Search for session state files using Glob:
159
- - `plugins/babysitter/skills/babysit/state/*.md`
160
159
  - `.a5c/state/*.md`
161
160
  - `.a5c/state/*.json`
162
161
  - For each session state file found:
@@ -260,7 +259,7 @@ Mark as PASS if total size < 500MB and no files > 10MB. Mark as WARN if total si
260
259
 
261
260
  ### 10a. Hook Registration
262
261
 
263
- - Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var, or search for `plugins/babysitter/hooks/hooks.json` by walking up from the current directory.
262
+ - Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var first, or search for a babysitter `hooks.json` by walking up from the current directory.
264
263
  - If found, read `hooks.json` and verify:
265
264
  - A `Stop` hook entry exists with a command referencing `babysitter-stop-hook.sh`.
266
265
  - A `SessionStart` hook entry exists with a command referencing `babysitter-session-start-hook.sh`.
@@ -315,7 +314,7 @@ If the stop hook shows NO evidence of execution (no log entries, no journal even
315
314
 
316
315
  Perform these diagnostic steps in order and report the first failure found:
317
316
 
318
- 1. **Plugin not installed**: Check if `plugins/babysitter/` exists relative to the project root and if `CLAUDE_PLUGIN_ROOT` is set. If the plugin directory doesn't exist, report: "Plugin not installed — the babysitter plugin directory is missing."
317
+ 1. **Plugin not installed**: Check if `CLAUDE_PLUGIN_ROOT` is set or if a babysitter plugin directory exists relative to the project root. If neither exists, report: "Plugin not installed — the babysitter plugin directory is missing."
319
318
 
320
319
  2. **Plugin not enabled**: Check for Claude settings files:
321
320
  - `~/.claude/settings.json` — look for `babysitter` in `enabledPlugins`.
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter/commands/forever.md. Do not edit directly. -->
1
+ <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter-unified/commands/forever.md. Do not edit directly. -->
2
2
 
3
3
  [FOREVER MODE] Use this command to start babysitting a never-ending babysitter run.
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter/commands/project-install.md. Do not edit directly. -->
1
+ <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter-unified/commands/project-install.md. Do not edit directly. -->
2
2
 
3
3
  [PROJECT-INSTALL MODE] Set up a project for babysitting. Guides you through onboarding a new or existing project — researches the codebase, interviews you about goals and workflows, builds the project profile, installs the best tools, and optionally configures CI/CD integration.
4
4
  Resolve the active process library with `babysitter process-library:active --json`,
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter/commands/retrospect.md. Do not edit directly. -->
1
+ <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter-unified/commands/retrospect.md. Do not edit directly. -->
2
2
 
3
3
  [RETROSPECT MODE] Analysis for a run and its results, process, suggestions for process improvements, process optimizations, fixes, etc. for the next runs.
4
4
  Create and run a retrospect process that:
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter/commands/user-install.md. Do not edit directly. -->
1
+ <!-- Generated by scripts/sync-sdk-command-templates.cjs from plugins/babysitter-unified/commands/user-install.md. Do not edit directly. -->
2
2
 
3
3
  [USER-INSTALL MODE] Set up babysitter for yourself. Guides you through onboarding — installs dependencies, interviews you about your specialties and preferences, builds your user profile, and configures the best tools for your workflow.
4
4
  Resolve the active process library with `babysitter process-library:active --json`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a5c-ai/babysitter-sdk",
3
- "version": "5.0.1-staging.893fe96d",
3
+ "version": "5.0.1-staging.89df3b1fa",
4
4
  "description": "Storage and run-registry primitives for event-sourced babysitter workflows.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -39,8 +39,8 @@
39
39
  "smoke:cli": "node scripts/smoke-cli.js --runs-dir packages/sdk/test-fixtures/cli/runs/smoke"
40
40
  },
41
41
  "dependencies": {
42
- "@a5c-ai/agent-catalog": "5.0.1-staging.893fe96d",
43
- "@a5c-ai/agent-mux": "^0.4.9",
42
+ "@a5c-ai/agent-catalog": "5.0.1-staging.89df3b1fa",
43
+ "@a5c-ai/agent-mux": "5.0.1-staging.89df3b1fa",
44
44
  "@modelcontextprotocol/sdk": "^1.12.1",
45
45
  "@sinclair/typebox": "^0.34.48",
46
46
  "zod": "^4.0.0",
@@ -53,7 +53,7 @@
53
53
  "puppeteer": "^24.0.0"
54
54
  },
55
55
  "peerDependencies": {
56
- "@a5c-ai/breakpoints-mux": "5.0.1-staging.893fe96d"
56
+ "@a5c-ai/breakpoints-mux": "5.0.1-staging.89df3b1fa"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@a5c-ai/breakpoints-mux": {