@a5c-ai/babysitter-sdk 0.0.183-staging.4ebefe91 → 0.0.183-staging.77d6ebc1
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/processLibrary.d.ts.map +1 -1
- package/dist/cli/commands/processLibrary.js +42 -38
- package/dist/cli/commands/sessionCreate.d.ts.map +1 -1
- package/dist/cli/commands/sessionCreate.js +2100 -128
- package/dist/cli/commands/sessionCreatePrompts.d.ts +6 -1
- package/dist/cli/commands/sessionCreatePrompts.d.ts.map +1 -1
- package/dist/cli/commands/sessionCreatePrompts.js +63 -15
- package/dist/cli/commands/templates/process-generation-prompt.md +6 -2
- package/dist/cli/main.js +5 -5
- package/dist/harness/codex.js +5 -5
- package/dist/harness/installSupport.js +2 -2
- package/dist/harness/invoker.d.ts +6 -1
- package/dist/harness/invoker.d.ts.map +1 -1
- package/dist/harness/invoker.js +113 -10
- package/dist/harness/piWrapper.d.ts.map +1 -1
- package/dist/harness/piWrapper.js +116 -24
- package/dist/processLibrary/active.d.ts +26 -0
- package/dist/processLibrary/active.d.ts.map +1 -1
- package/dist/processLibrary/active.js +103 -17
- package/dist/runtime/createRun.d.ts.map +1 -1
- package/dist/runtime/createRun.js +3 -2
- package/dist/runtime/orchestrateIteration.js +4 -1
- package/dist/tasks/registry.d.ts.map +1 -1
- package/dist/tasks/registry.js +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processLibrary.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/processLibrary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"processLibrary.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/processLibrary.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CA6BjB;AAED,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CA2BjB;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAgCjB;AAED,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAiBjB"}
|
|
@@ -6,26 +6,15 @@ exports.handleProcessLibraryUse = handleProcessLibraryUse;
|
|
|
6
6
|
exports.handleProcessLibraryActive = handleProcessLibraryActive;
|
|
7
7
|
exports.handleProcessLibraryCommand = handleProcessLibraryCommand;
|
|
8
8
|
const active_1 = require("../../processLibrary/active");
|
|
9
|
-
function requireArg(value, name, command, json) {
|
|
10
|
-
if (!value) {
|
|
11
|
-
const message = `[${command}] ${name} is required`;
|
|
12
|
-
if (json) {
|
|
13
|
-
console.log(JSON.stringify({ error: "missing_argument", message }));
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
console.error(message);
|
|
17
|
-
}
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
return value;
|
|
21
|
-
}
|
|
22
9
|
async function handleProcessLibraryClone(args) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
const defaults = (0, active_1.getDefaultProcessLibrarySpec)({
|
|
11
|
+
stateDir: args.stateDir,
|
|
12
|
+
repo: args.repo,
|
|
13
|
+
cloneDir: args.dir,
|
|
14
|
+
ref: args.ref,
|
|
15
|
+
});
|
|
16
|
+
const repo = args.repo ?? defaults.repo;
|
|
17
|
+
const dir = args.dir ?? defaults.cloneDir;
|
|
29
18
|
try {
|
|
30
19
|
const result = await (0, active_1.cloneProcessLibrary)({ repo, dir, ref: args.ref });
|
|
31
20
|
if (args.json) {
|
|
@@ -48,9 +37,12 @@ async function handleProcessLibraryClone(args) {
|
|
|
48
37
|
}
|
|
49
38
|
}
|
|
50
39
|
async function handleProcessLibraryUpdate(args) {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
const defaults = (0, active_1.getDefaultProcessLibrarySpec)({
|
|
41
|
+
stateDir: args.stateDir,
|
|
42
|
+
cloneDir: args.dir,
|
|
43
|
+
ref: args.ref,
|
|
44
|
+
});
|
|
45
|
+
const dir = args.dir ?? defaults.cloneDir;
|
|
54
46
|
try {
|
|
55
47
|
const result = await (0, active_1.updateProcessLibrary)({ dir, ref: args.ref });
|
|
56
48
|
if (args.json) {
|
|
@@ -73,22 +65,27 @@ async function handleProcessLibraryUpdate(args) {
|
|
|
73
65
|
}
|
|
74
66
|
}
|
|
75
67
|
async function handleProcessLibraryUse(args) {
|
|
76
|
-
const dir = requireArg(args.dir, "--dir", "process-library:use", args.json);
|
|
77
|
-
if (!dir)
|
|
78
|
-
return 1;
|
|
79
68
|
try {
|
|
80
|
-
const result =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
69
|
+
const result = args.dir
|
|
70
|
+
? await (0, active_1.bindActiveProcessLibrary)({
|
|
71
|
+
dir: args.dir,
|
|
72
|
+
stateDir: args.stateDir,
|
|
73
|
+
runId: args.runId,
|
|
74
|
+
sessionId: args.sessionId,
|
|
75
|
+
ref: args.ref,
|
|
76
|
+
})
|
|
77
|
+
: await (0, active_1.ensureActiveProcessLibrary)({
|
|
78
|
+
stateDir: args.stateDir,
|
|
79
|
+
runId: args.runId,
|
|
80
|
+
sessionId: args.sessionId,
|
|
81
|
+
ref: args.ref,
|
|
82
|
+
});
|
|
87
83
|
if (args.json) {
|
|
88
84
|
console.log(JSON.stringify({ success: true, ...result }, null, 2));
|
|
89
85
|
}
|
|
90
86
|
else {
|
|
91
|
-
|
|
87
|
+
const boundDir = result.binding?.dir ?? "(missing)";
|
|
88
|
+
console.log(`Active process library updated.\n Scope: ${result.bindingScope}\n Dir: ${boundDir}\n State: ${result.stateFile}`);
|
|
92
89
|
}
|
|
93
90
|
return 0;
|
|
94
91
|
}
|
|
@@ -105,7 +102,7 @@ async function handleProcessLibraryUse(args) {
|
|
|
105
102
|
}
|
|
106
103
|
async function handleProcessLibraryActive(args) {
|
|
107
104
|
try {
|
|
108
|
-
const result = await (0, active_1.
|
|
105
|
+
const result = await (0, active_1.ensureActiveProcessLibrary)({
|
|
109
106
|
stateDir: args.stateDir,
|
|
110
107
|
runId: args.runId,
|
|
111
108
|
sessionId: args.sessionId,
|
|
@@ -113,11 +110,18 @@ async function handleProcessLibraryActive(args) {
|
|
|
113
110
|
if (args.json) {
|
|
114
111
|
console.log(JSON.stringify(result, null, 2));
|
|
115
112
|
}
|
|
116
|
-
else if (!result.binding) {
|
|
117
|
-
console.log(`No active process-library binding found.\n State: ${result.stateFile}`);
|
|
118
|
-
}
|
|
119
113
|
else {
|
|
120
|
-
|
|
114
|
+
const lines = [
|
|
115
|
+
"Active process library.",
|
|
116
|
+
` Scope: ${result.bindingScope}`,
|
|
117
|
+
` Dir: ${result.binding?.dir ?? "(missing)"}`,
|
|
118
|
+
` Revision: ${result.binding?.revision ?? "unknown"}`,
|
|
119
|
+
` State: ${result.stateFile}`,
|
|
120
|
+
];
|
|
121
|
+
if (result.bootstrapped) {
|
|
122
|
+
lines.push(` Bootstrapped: yes (${result.defaultSpec.cloneDir})`);
|
|
123
|
+
}
|
|
124
|
+
console.log(lines.join("\n"));
|
|
121
125
|
}
|
|
122
126
|
return 0;
|
|
123
127
|
}
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"sessionCreate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sessionCreate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,OAAO,KAAK,EACV,sBAAsB,EAKvB,MAAM,qBAAqB,CAAC;AA6B7B,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;AA8LD,wBAAgB,aAAa,CAC3B,UAAU,EAAE,sBAAsB,EAAE,EACpC,SAAS,CAAC,EAAE,MAAM,GACjB,sBAAsB,GAAG,SAAS,CAkBpC;AA81HD,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,MAAM,CAAC,CAgFjB"}
|