@a5c-ai/babysitter-sdk 0.0.183-staging.38c5ca74 → 0.0.183-staging.4ebefe91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/sessionCreate.d.ts.map +1 -1
- package/dist/cli/commands/sessionCreate.js +1 -66
- package/dist/cli/commands/skill.d.ts +3 -3
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +63 -12
- package/dist/harness/codex.d.ts.map +1 -1
- package/dist/harness/codex.js +1 -22
- package/dist/harness/pi.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionCreate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sessionCreate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,OAAO,KAAK,EACV,sBAAsB,EAIvB,MAAM,qBAAqB,CAAC;AA0B7B,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA+ID,wBAAgB,aAAa,CAC3B,UAAU,EAAE,sBAAsB,EAAE,EACpC,SAAS,CAAC,EAAE,MAAM,GACjB,sBAAsB,GAAG,SAAS,CAYpC;
|
|
1
|
+
{"version":3,"file":"sessionCreate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sessionCreate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,OAAO,KAAK,EACV,sBAAsB,EAIvB,MAAM,qBAAqB,CAAC;AA0B7B,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA+ID,wBAAgB,aAAa,CAC3B,UAAU,EAAE,sBAAsB,EAAE,EACpC,SAAS,CAAC,EAAE,MAAM,GACjB,sBAAsB,GAAG,SAAS,CAYpC;AA69CD,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,MAAM,CAAC,CAiFjB"}
|
|
@@ -166,66 +166,6 @@ function buildMetaPrompt(userPrompt, workDir) {
|
|
|
166
166
|
template = template.replace("{{INTERVIEW_CONTEXT}}", "");
|
|
167
167
|
return template;
|
|
168
168
|
}
|
|
169
|
-
function buildFallbackProcessDefinitionSource(userPrompt) {
|
|
170
|
-
const serializedPrompt = JSON.stringify(userPrompt);
|
|
171
|
-
return `import { defineTask } from "@a5c-ai/babysitter-sdk";
|
|
172
|
-
|
|
173
|
-
const implementRequest = defineTask("implement-request", (args) => ({
|
|
174
|
-
kind: "agent",
|
|
175
|
-
title: "Implement the requested work",
|
|
176
|
-
agent: {
|
|
177
|
-
prompt: {
|
|
178
|
-
role: "delivery engineer",
|
|
179
|
-
task: "Implement the user's request in the current workspace.",
|
|
180
|
-
context: {
|
|
181
|
-
request: args.request,
|
|
182
|
-
},
|
|
183
|
-
instructions: [
|
|
184
|
-
"Create or update the necessary project files in the current workspace.",
|
|
185
|
-
"Keep the implementation as small and direct as possible while still satisfying the request.",
|
|
186
|
-
"Run lightweight verification where practical and include what you verified in the result.",
|
|
187
|
-
"Return JSON with summary, changedFiles, and verificationNotes."
|
|
188
|
-
],
|
|
189
|
-
outputFormat: "JSON with summary, changedFiles, verificationNotes"
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}));
|
|
193
|
-
|
|
194
|
-
const verifyRequest = defineTask("verify-request", (args) => ({
|
|
195
|
-
kind: "agent",
|
|
196
|
-
title: "Verify the requested work",
|
|
197
|
-
agent: {
|
|
198
|
-
prompt: {
|
|
199
|
-
role: "verification engineer",
|
|
200
|
-
task: "Verify that the user's request was completed and identify any remaining gaps.",
|
|
201
|
-
context: {
|
|
202
|
-
request: args.request,
|
|
203
|
-
implementation: args.implementation
|
|
204
|
-
},
|
|
205
|
-
instructions: [
|
|
206
|
-
"Inspect the workspace state produced by the implementation step.",
|
|
207
|
-
"Confirm whether the requested work exists and is usable.",
|
|
208
|
-
"If there are remaining issues, describe them precisely.",
|
|
209
|
-
"Return JSON with success, findings, and recommendedNextSteps."
|
|
210
|
-
],
|
|
211
|
-
outputFormat: "JSON with success, findings, recommendedNextSteps"
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}));
|
|
215
|
-
|
|
216
|
-
export async function process(inputs, ctx) {
|
|
217
|
-
const request = inputs?.prompt || ${serializedPrompt};
|
|
218
|
-
const implementation = await ctx.task(implementRequest, { request });
|
|
219
|
-
const verification = await ctx.task(verifyRequest, { request, implementation });
|
|
220
|
-
return {
|
|
221
|
-
request,
|
|
222
|
-
implementation,
|
|
223
|
-
verification,
|
|
224
|
-
success: verification?.success !== false,
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
`;
|
|
228
|
-
}
|
|
229
169
|
const POLL_INTERVAL_MS = 1_000;
|
|
230
170
|
const POLL_TIMEOUT_MS = 60_000;
|
|
231
171
|
async function waitForProcessFile(filePath, timeoutMs = POLL_TIMEOUT_MS) {
|
|
@@ -748,12 +688,7 @@ async function runProcessDefinitionPhase(args) {
|
|
|
748
688
|
}
|
|
749
689
|
catch {
|
|
750
690
|
if (!args.interactive) {
|
|
751
|
-
|
|
752
|
-
await node_fs_1.promises.writeFile(args.outputPath, fallbackSource, "utf8");
|
|
753
|
-
state.report = {
|
|
754
|
-
processPath: args.outputPath,
|
|
755
|
-
summary: "Recovered from phase-1 tool failure by writing a generic multi-step fallback process definition.",
|
|
756
|
-
};
|
|
691
|
+
throw new exceptions_1.BabysitterRuntimeError("ProcessDefinitionReportMissing", "The process-definition agent finished without calling babysitter_report_process_definition, and the expected process file was not created.", { category: exceptions_1.ErrorCategory.Runtime });
|
|
757
692
|
}
|
|
758
693
|
else {
|
|
759
694
|
throw new exceptions_1.BabysitterRuntimeError("ProcessDefinitionReportMissing", "The process-definition agent finished without calling babysitter_report_process_definition.", { category: exceptions_1.ErrorCategory.Runtime });
|
|
@@ -84,8 +84,7 @@ export interface ProcessDiscoveryResult {
|
|
|
84
84
|
* @skill <name> <relative-path-to-SKILL.md>
|
|
85
85
|
* @agent <name> <relative-path-to-AGENT.md>
|
|
86
86
|
*
|
|
87
|
-
* Paths are relative to the
|
|
88
|
-
* pluginRoot/skills/babysit/process/
|
|
87
|
+
* Paths are relative to the active process-library root.
|
|
89
88
|
*/
|
|
90
89
|
export declare function parseProcessFileMarkers(filePath: string): ProcessMarkersResult;
|
|
91
90
|
/**
|
|
@@ -95,7 +94,8 @@ export declare function parseProcessFileMarkers(filePath: string): ProcessMarker
|
|
|
95
94
|
*/
|
|
96
95
|
export declare function discoverFromProcessFile(options: {
|
|
97
96
|
processFilePath: string;
|
|
98
|
-
pluginRoot
|
|
97
|
+
pluginRoot?: string;
|
|
98
|
+
processRoot?: string;
|
|
99
99
|
}): ProcessDiscoveryResult | null;
|
|
100
100
|
/**
|
|
101
101
|
* Result from internal discovery.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/skill.ts"],"names":[],"mappings":"AAAA;;;GAGG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,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA4MhC;AAyDD;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuEjF;AA4JD;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CA0DpF"}
|
|
@@ -45,6 +45,7 @@ exports.handleSkillFetchRemote = handleSkillFetchRemote;
|
|
|
45
45
|
const node_fs_1 = require("node:fs");
|
|
46
46
|
const path = __importStar(require("node:path"));
|
|
47
47
|
const os = __importStar(require("node:os"));
|
|
48
|
+
const active_1 = require("../../processLibrary/active");
|
|
48
49
|
const DEFAULT_CACHE_TTL = 300; // 5 minutes
|
|
49
50
|
const CACHE_DIR = path.join(os.tmpdir(), 'babysitter-skill-cache');
|
|
50
51
|
// ---------------------------------------------------------------------------
|
|
@@ -424,8 +425,7 @@ function capPerSpecialization(items, cap) {
|
|
|
424
425
|
* @skill <name> <relative-path-to-SKILL.md>
|
|
425
426
|
* @agent <name> <relative-path-to-AGENT.md>
|
|
426
427
|
*
|
|
427
|
-
* Paths are relative to the
|
|
428
|
-
* pluginRoot/skills/babysit/process/
|
|
428
|
+
* Paths are relative to the active process-library root.
|
|
429
429
|
*/
|
|
430
430
|
function parseProcessFileMarkers(filePath) {
|
|
431
431
|
let content;
|
|
@@ -471,13 +471,12 @@ function parseProcessFileMarkers(filePath) {
|
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
473
|
/**
|
|
474
|
-
* Resolve parsed markers to full file paths using the
|
|
475
|
-
*
|
|
476
|
-
*
|
|
477
|
-
* Each marker's relativePath is resolved against processRoot.
|
|
474
|
+
* Resolve parsed markers to full file paths using the active process-library
|
|
475
|
+
* root when known, or the legacy plugin-local process root as a compatibility
|
|
476
|
+
* fallback.
|
|
478
477
|
*/
|
|
479
|
-
function resolveMarkersToMetadata(markers,
|
|
480
|
-
const processRoot =
|
|
478
|
+
function resolveMarkersToMetadata(markers, options) {
|
|
479
|
+
const processRoot = resolveStaticProcessRoot(options);
|
|
481
480
|
const resolveMarker = (marker) => {
|
|
482
481
|
if (!marker.relativePath) {
|
|
483
482
|
return { name: marker.name };
|
|
@@ -500,7 +499,55 @@ function discoverFromProcessFile(options) {
|
|
|
500
499
|
if (!markers.hasMarkers) {
|
|
501
500
|
return null;
|
|
502
501
|
}
|
|
503
|
-
return resolveMarkersToMetadata(markers,
|
|
502
|
+
return resolveMarkersToMetadata(markers, {
|
|
503
|
+
pluginRoot: options.pluginRoot,
|
|
504
|
+
processRoot: options.processRoot,
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
function resolveLegacyPluginProcessRoot(pluginRoot) {
|
|
508
|
+
return path.join(pluginRoot, 'skills', 'babysit', 'process');
|
|
509
|
+
}
|
|
510
|
+
function findRepoLibraryRoot(start) {
|
|
511
|
+
for (let current = path.resolve(start); current;) {
|
|
512
|
+
const candidate = path.join(current, 'library');
|
|
513
|
+
if ((0, node_fs_1.existsSync)(candidate)) {
|
|
514
|
+
return candidate;
|
|
515
|
+
}
|
|
516
|
+
const parent = path.dirname(current);
|
|
517
|
+
if (parent === current) {
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
current = parent;
|
|
521
|
+
}
|
|
522
|
+
return null;
|
|
523
|
+
}
|
|
524
|
+
function resolveStaticProcessRoot(options) {
|
|
525
|
+
if (options.processRoot) {
|
|
526
|
+
return path.resolve(options.processRoot);
|
|
527
|
+
}
|
|
528
|
+
if (options.pluginRoot) {
|
|
529
|
+
const repoLibraryRoot = findRepoLibraryRoot(options.pluginRoot);
|
|
530
|
+
if (repoLibraryRoot) {
|
|
531
|
+
return repoLibraryRoot;
|
|
532
|
+
}
|
|
533
|
+
return resolveLegacyPluginProcessRoot(options.pluginRoot);
|
|
534
|
+
}
|
|
535
|
+
return path.resolve(process.cwd(), 'library');
|
|
536
|
+
}
|
|
537
|
+
async function resolveDiscoveryProcessRoot(options) {
|
|
538
|
+
try {
|
|
539
|
+
const active = await (0, active_1.resolveActiveProcessLibrary)({
|
|
540
|
+
stateDir: path.resolve(process.cwd(), '.a5c'),
|
|
541
|
+
runId: options.runId,
|
|
542
|
+
});
|
|
543
|
+
if (active.binding?.dir) {
|
|
544
|
+
return path.resolve(active.binding.dir);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
catch {
|
|
548
|
+
// Fall back to repo-local/library or legacy plugin-local roots.
|
|
549
|
+
}
|
|
550
|
+
return resolveStaticProcessRoot({ pluginRoot: options.pluginRoot });
|
|
504
551
|
}
|
|
505
552
|
/**
|
|
506
553
|
* Internal discovery logic, extracted for reuse by other CLI commands
|
|
@@ -525,7 +572,11 @@ async function discoverSkillsInternal(options) {
|
|
|
525
572
|
if (!domain) {
|
|
526
573
|
domain = await detectRunDomain(runId, runsDir);
|
|
527
574
|
}
|
|
528
|
-
const
|
|
575
|
+
const processRoot = await resolveDiscoveryProcessRoot({
|
|
576
|
+
pluginRoot,
|
|
577
|
+
runId,
|
|
578
|
+
});
|
|
579
|
+
const specializationsDir = path.join(processRoot, 'specializations');
|
|
529
580
|
// ------------------------------------------------------------------
|
|
530
581
|
// Skills
|
|
531
582
|
// ------------------------------------------------------------------
|
|
@@ -536,7 +587,7 @@ async function discoverSkillsInternal(options) {
|
|
|
536
587
|
// 2. Scan plugin-level skills
|
|
537
588
|
const pluginSkillsDir = path.join(pluginRoot, 'skills');
|
|
538
589
|
const pluginSkills = await scanSkillsDirectory(pluginSkillsDir, 'local-plugin');
|
|
539
|
-
const filteredPluginSkills = pluginSkills.filter(s => !s.file?.includes('/specializations/'));
|
|
590
|
+
const filteredPluginSkills = pluginSkills.filter(s => !(s.file?.replace(/\\/g, '/').includes('/specializations/')));
|
|
540
591
|
allSkills.push(...filteredPluginSkills);
|
|
541
592
|
// 3. Scan repo-level skills (.a5c/skills)
|
|
542
593
|
const repoSkillsDir = '.a5c/skills';
|
|
@@ -591,7 +642,7 @@ async function discoverSkillsInternal(options) {
|
|
|
591
642
|
// Specializations dir may not exist
|
|
592
643
|
}
|
|
593
644
|
// 2. Methodology processes
|
|
594
|
-
const methodologiesDir = path.join(
|
|
645
|
+
const methodologiesDir = path.join(processRoot, 'methodologies');
|
|
595
646
|
try {
|
|
596
647
|
// Top-level methodology files
|
|
597
648
|
const topProcs = await scanProcessesDirectory(methodologiesDir, 'methodologies', 'library');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/harness/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,OAAO,KAAK,EACV,cAAc,EAMf,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/harness/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,OAAO,KAAK,EACV,cAAc,EAMf,MAAM,SAAS,CAAC;AA+XjB,wBAAgB,kBAAkB,IAAI,cAAc,CAmGnD"}
|
package/dist/harness/codex.js
CHANGED
|
@@ -86,11 +86,6 @@ function resolveCodexSessionId(parsed) {
|
|
|
86
86
|
return undefined;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function supportsCodexLifecycleHooks() {
|
|
90
|
-
if (process.env.BABYSITTER_CODEX_FORCE_HOOKS === "1")
|
|
91
|
-
return true;
|
|
92
|
-
return process.platform !== "win32";
|
|
93
|
-
}
|
|
94
89
|
function readStdin() {
|
|
95
90
|
return new Promise((resolve, reject) => {
|
|
96
91
|
let data = "";
|
|
@@ -354,9 +349,6 @@ async function installCodexPlugin(options) {
|
|
|
354
349
|
}
|
|
355
350
|
function createCodexAdapter() {
|
|
356
351
|
const claude = (0, claudeCode_1.createClaudeCodeAdapter)();
|
|
357
|
-
const unsupportedHookMessage = (hookType) => (`Codex lifecycle hook "${hookType}" is unavailable on this platform. ` +
|
|
358
|
-
`Use a hook-capable Codex install on Linux, macOS, or WSL for the ` +
|
|
359
|
-
`babysitter-codex plugin hook model.`);
|
|
360
352
|
return {
|
|
361
353
|
name: "codex",
|
|
362
354
|
isActive() {
|
|
@@ -382,14 +374,9 @@ function createCodexAdapter() {
|
|
|
382
374
|
"that provides a stable session/thread ID.");
|
|
383
375
|
},
|
|
384
376
|
supportsHookType(hookType) {
|
|
385
|
-
|
|
386
|
-
return supportsCodexLifecycleHooks();
|
|
387
|
-
}
|
|
377
|
+
void hookType;
|
|
388
378
|
return true;
|
|
389
379
|
},
|
|
390
|
-
getUnsupportedHookMessage(hookType) {
|
|
391
|
-
return unsupportedHookMessage(hookType);
|
|
392
|
-
},
|
|
393
380
|
async bindSession(opts) {
|
|
394
381
|
const stateDir = resolveCodexStateDir({
|
|
395
382
|
stateDir: opts.stateDir,
|
|
@@ -405,10 +392,6 @@ function createCodexAdapter() {
|
|
|
405
392
|
};
|
|
406
393
|
},
|
|
407
394
|
async handleStopHook(args) {
|
|
408
|
-
if (!supportsCodexLifecycleHooks()) {
|
|
409
|
-
process.stderr.write(`${unsupportedHookMessage("stop")}\n`);
|
|
410
|
-
return 1;
|
|
411
|
-
}
|
|
412
395
|
let rawInput = "";
|
|
413
396
|
try {
|
|
414
397
|
rawInput = await readStdin();
|
|
@@ -427,10 +410,6 @@ function createCodexAdapter() {
|
|
|
427
410
|
}));
|
|
428
411
|
},
|
|
429
412
|
handleSessionStartHook(args) {
|
|
430
|
-
if (!supportsCodexLifecycleHooks()) {
|
|
431
|
-
process.stderr.write(`${unsupportedHookMessage("session-start")}\n`);
|
|
432
|
-
return Promise.resolve(1);
|
|
433
|
-
}
|
|
434
413
|
return handleCodexSessionStartHookImpl(args);
|
|
435
414
|
},
|
|
436
415
|
findHookDispatcherPath(_startCwd) {
|
package/dist/harness/pi.js
CHANGED
|
@@ -87,7 +87,7 @@ async function installPiFamilyPlugin(args) {
|
|
|
87
87
|
if (!repoRoot) {
|
|
88
88
|
throw new exceptions_1.BabysitterRuntimeError("RepoRootNotFound", "Could not resolve the babysitter repo root for the repo-local pi plugin install.", { category: exceptions_1.ErrorCategory.Configuration });
|
|
89
89
|
}
|
|
90
|
-
const pluginDir = path.join(repoRoot, "plugins", "pi");
|
|
90
|
+
const pluginDir = path.join(repoRoot, "plugins", "babysitter-pi");
|
|
91
91
|
const command = "omp";
|
|
92
92
|
const commandArgs = ["plugin", "link", pluginDir];
|
|
93
93
|
if (args.options.dryRun) {
|
package/package.json
CHANGED