@aui.io/apollo 0.1.32 → 0.1.34
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/README.md +2 -2
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/auth.js +3 -4
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/auth.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js +185 -39
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/env.js +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/env.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js +6 -3
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/package.json +3 -3
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.d.ts +170 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js +52 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.d.ts +52 -32
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js +35 -26
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/api/vault.d.ts +28 -16
- package/node_modules/@aui.io/apollo-core/dist/src/api/vault.js +17 -17
- package/node_modules/@aui.io/apollo-core/dist/src/api/vault.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.d.ts +12 -0
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.js +69 -0
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/index.js +4 -10
- package/node_modules/@aui.io/apollo-core/dist/src/config/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/types.d.ts +18 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/types.js +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/types.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/index.d.ts +8 -5
- package/node_modules/@aui.io/apollo-core/dist/src/index.js +6 -3
- package/node_modules/@aui.io/apollo-core/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/advisor.d.ts +37 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/advisor.js +86 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/advisor.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.d.ts +37 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.js +52 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.d.ts +36 -30
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js +81 -29
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.d.ts +3 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js +10 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/env.service.js +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/env.service.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.d.ts +7 -2
- package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js +4 -4
- package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/vault.d.ts +5 -3
- package/node_modules/@aui.io/apollo-core/dist/src/services/vault.js +7 -2
- package/node_modules/@aui.io/apollo-core/dist/src/services/vault.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.d.ts +11 -4
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.js +28 -10
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/skills/install.d.ts +24 -2
- package/node_modules/@aui.io/apollo-core/dist/src/skills/install.js +53 -4
- package/node_modules/@aui.io/apollo-core/dist/src/skills/install.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/author/data.d.ts +2 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/author/data.js +2 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +3 -5
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +1 -1
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../../src/api/vault.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../../src/api/vault.ts"],"names":[],"mappings":"AAaA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAoBrE;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAsB,EACtB,GAAkB;IAElB,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO;YACL,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,GAAG,CAAC,SAAS;YACzB,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC;AAC9D,CAAC;AAED;;uEAEuE;AACvE,MAAM,UAAU,iBAAiB,CAAC,KAAoC;IACpE,IAAI,KAAK,EAAE,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAChD,IAAI,KAAK,EAAE,IAAI,KAAK,cAAc;QAAE,OAAO,KAAK,CAAC;IACjD,OAAO,OAAO,CAAC;AACjB,CAAC;AAoCD,MAAM,OAAO,WAAW;IACc;IAApC,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExD,mEAAmE;IAC5D,YAAY,CAAC,IAAuB;QACzC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc,mBAAmB,EAAE;YACzD,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,WAAW,CAAC,GAAkB;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAgB,mBAAmB,EAAE;YAC3D,KAAK,EAAE;gBACL,QAAQ,EAAE,GAAG,CAAC,OAAO;gBACrB,UAAU,EAAE,GAAG,CAAC,SAAS;gBACzB,eAAe,EAAE,GAAG,CAAC,KAAK;aAC3B;SACF,CAAC,CAAC;IACL,CAAC;IAED,4EAA4E;IACrE,YAAY,CAAC,QAAgB;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,qBAAqB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EACnD,EAAE,MAAM,EAAE,QAAQ,EAAE,CACrB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -12,6 +12,8 @@ export interface ValidationResult {
|
|
|
12
12
|
id?: string;
|
|
13
13
|
version?: string;
|
|
14
14
|
};
|
|
15
|
+
/** Advisory reports from the runtime (ask_cost, orphans, authored, ...). */
|
|
16
|
+
reports?: Record<string, unknown>;
|
|
15
17
|
}
|
|
16
18
|
export interface RuntimeValidationFinding {
|
|
17
19
|
code: string;
|
|
@@ -25,6 +27,16 @@ export interface RuntimeValidateResponse {
|
|
|
25
27
|
id?: string;
|
|
26
28
|
version?: string;
|
|
27
29
|
};
|
|
30
|
+
reports?: Record<string, unknown>;
|
|
28
31
|
}
|
|
29
32
|
export declare function mapRuntimeValidation(response: RuntimeValidateResponse): ValidationResult;
|
|
33
|
+
/**
|
|
34
|
+
* The whole verdict as text — errors, then WARNINGS, then a by-code census when
|
|
35
|
+
* the list is long, then the verdict line. The CLI used to print only "Program
|
|
36
|
+
* is valid." on the success path, which silently dropped every advisory
|
|
37
|
+
* finding: 35 laundering warnings on a real bundle were invisible to its
|
|
38
|
+
* author. Warnings are the point of running validate after every authoring
|
|
39
|
+
* change; a renderer that hides them re-creates the blindness it exists to fix.
|
|
40
|
+
*/
|
|
41
|
+
export declare function renderValidation(result: ValidationResult): string;
|
|
30
42
|
export declare function assertValidProgram(result: ValidationResult): ValidationResult;
|
|
@@ -20,8 +20,61 @@ export function mapRuntimeValidation(response) {
|
|
|
20
20
|
valid: response.valid && response.errors.length === 0,
|
|
21
21
|
findings,
|
|
22
22
|
...(response.program ? { program: response.program } : {}),
|
|
23
|
+
...(response.reports ? { reports: response.reports } : {}),
|
|
23
24
|
};
|
|
24
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* The whole verdict as text — errors, then WARNINGS, then a by-code census when
|
|
28
|
+
* the list is long, then the verdict line. The CLI used to print only "Program
|
|
29
|
+
* is valid." on the success path, which silently dropped every advisory
|
|
30
|
+
* finding: 35 laundering warnings on a real bundle were invisible to its
|
|
31
|
+
* author. Warnings are the point of running validate after every authoring
|
|
32
|
+
* change; a renderer that hides them re-creates the blindness it exists to fix.
|
|
33
|
+
*/
|
|
34
|
+
export function renderValidation(result) {
|
|
35
|
+
const errors = result.findings.filter((f) => f.level !== "warning");
|
|
36
|
+
const warnings = result.findings.filter((f) => f.level === "warning");
|
|
37
|
+
const line = (f, tag) => {
|
|
38
|
+
const where = f.file ? `${f.file}: ` : "";
|
|
39
|
+
const code = f.code ?? (f.path || "");
|
|
40
|
+
return `${tag} ${where}${code ? `${code}: ` : ""}${f.message}`;
|
|
41
|
+
};
|
|
42
|
+
const lines = [
|
|
43
|
+
...errors.map((f) => line(f, "✗")),
|
|
44
|
+
...warnings.map((f) => line(f, "⚠")),
|
|
45
|
+
];
|
|
46
|
+
// The census, before the tally — same shape the engine's own validate prints:
|
|
47
|
+
// thirty findings on a real bundle are four codes, and the wall of identical
|
|
48
|
+
// sentences is what an author reads past.
|
|
49
|
+
if (result.findings.length > 3) {
|
|
50
|
+
const counts = new Map();
|
|
51
|
+
for (const f of result.findings) {
|
|
52
|
+
const code = f.code ?? (f.path || "(uncoded)");
|
|
53
|
+
counts.set(code, (counts.get(code) ?? 0) + 1);
|
|
54
|
+
}
|
|
55
|
+
const census = [...counts.entries()]
|
|
56
|
+
.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))
|
|
57
|
+
.map(([code, n]) => `${code} ×${n}`)
|
|
58
|
+
.join(" · ");
|
|
59
|
+
lines.push("", `by code: ${census}`);
|
|
60
|
+
}
|
|
61
|
+
// Advisory reports render GENERICALLY: any key the endpoint adds is shown
|
|
62
|
+
// without a console release (the referenceability wire of
|
|
63
|
+
// docs/method-adoption-plan.md item A). Known shapes get a one-line summary;
|
|
64
|
+
// everything else prints compact.
|
|
65
|
+
if (result.reports && Object.keys(result.reports).length > 0) {
|
|
66
|
+
const rlines = [];
|
|
67
|
+
for (const [name, body] of Object.entries(result.reports)) {
|
|
68
|
+
rlines.push(` ${name}: ${summarizeReport(name, body)}`);
|
|
69
|
+
}
|
|
70
|
+
lines.push("", "advisory reports:", ...rlines);
|
|
71
|
+
}
|
|
72
|
+
const who = result.program?.id
|
|
73
|
+
? `Program ${result.program.id}@${result.program.version ?? "?"}`
|
|
74
|
+
: "Program";
|
|
75
|
+
const verdict = `${who} ${result.valid ? "is valid" : "is INVALID"} — ${String(errors.length)} error(s), ${String(warnings.length)} warning(s).`;
|
|
76
|
+
return lines.length > 0 ? `${lines.join("\n")}\n\n${verdict}` : verdict;
|
|
77
|
+
}
|
|
25
78
|
export function assertValidProgram(result) {
|
|
26
79
|
const errors = result.findings.filter((finding) => finding.level !== "warning");
|
|
27
80
|
if (!result.valid || errors.length > 0) {
|
|
@@ -33,4 +86,20 @@ export function assertValidProgram(result) {
|
|
|
33
86
|
}
|
|
34
87
|
return result;
|
|
35
88
|
}
|
|
89
|
+
/** One line per advisory report — known shapes summarized, the rest compact. */
|
|
90
|
+
function summarizeReport(name, body) {
|
|
91
|
+
if (body == null)
|
|
92
|
+
return "(empty)";
|
|
93
|
+
if (typeof body === "object" && "unavailable" in body) {
|
|
94
|
+
return `unavailable (${String(body.unavailable)})`;
|
|
95
|
+
}
|
|
96
|
+
if (name === "authored" && typeof body === "object") {
|
|
97
|
+
const a = body;
|
|
98
|
+
return `${String(a.percent ?? "?")}% (${String(a.ruled ?? "?")}/${String(a.admits ?? "?")} slots ruled, ${String(a.counting ?? "")}, schema ${String(a.schema_set ?? "?").slice(0, 8)})`;
|
|
99
|
+
}
|
|
100
|
+
if (Array.isArray(body))
|
|
101
|
+
return `${String(body.length)} row(s)`;
|
|
102
|
+
const compact = JSON.stringify(body);
|
|
103
|
+
return compact.length > 120 ? `${compact.slice(0, 117)}...` : compact;
|
|
104
|
+
}
|
|
36
105
|
//# sourceMappingURL=validate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/bundle/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/bundle/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA+BrD,MAAM,UAAU,oBAAoB,C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AAC;QACpD,MAAM,CAAC,GAAG,IAGT,CAAC;QACF,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,IAAI,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC,iBAAiB,MAAM,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;IAC3L,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAChE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC"}
|
|
@@ -14,6 +14,7 @@ const environmentUrls = {
|
|
|
14
14
|
kbm: "https://api-staging-v3.internal-aui.io/knowledge-base-manager",
|
|
15
15
|
agentSettings: "https://api-staging-v3.internal-aui.io/agent-settings",
|
|
16
16
|
network: "https://api-staging-v3.internal-aui.io/api/network",
|
|
17
|
+
builder: "https://api-staging-v3.internal-aui.io/builder-api",
|
|
17
18
|
},
|
|
18
19
|
production: {
|
|
19
20
|
identity: "https://api-v3.aui.io/api",
|
|
@@ -24,16 +25,7 @@ const environmentUrls = {
|
|
|
24
25
|
kbm: "https://api-v3.aui.io/knowledge-base-manager",
|
|
25
26
|
agentSettings: "https://api-v3.aui.io/agent-settings",
|
|
26
27
|
network: "https://api-v3.aui.io/api/network",
|
|
27
|
-
|
|
28
|
-
eu: {
|
|
29
|
-
identity: "https://api-eu-v3.aui.io/api",
|
|
30
|
-
management: "https://api-eu-v3.aui.io/apollo-api",
|
|
31
|
-
runtime: "https://api-eu-v3.aui.io/runtime",
|
|
32
|
-
mockDb: "https://api-eu-v3.aui.io/api/mock-db",
|
|
33
|
-
vault: "https://api-eu-v3.aui.io/apollo-api-legacy",
|
|
34
|
-
kbm: "https://api-eu-v3.aui.io/knowledge-base-manager",
|
|
35
|
-
agentSettings: "https://api-eu-v3.aui.io/agent-settings",
|
|
36
|
-
network: "https://api-eu-v3.aui.io/api/network",
|
|
28
|
+
builder: "https://api-v3.aui.io/builder-api",
|
|
37
29
|
},
|
|
38
30
|
};
|
|
39
31
|
export function parseEnvironment(value) {
|
|
@@ -87,6 +79,7 @@ export async function resolveContext(options = {}) {
|
|
|
87
79
|
kbm: stripSlash(env.APOLLO_KBM_URL ?? defaults.kbm),
|
|
88
80
|
agentSettings: stripSlash(env.APOLLO_AGENT_SETTINGS_URL ?? defaults.agentSettings),
|
|
89
81
|
network: stripSlash(env.APOLLO_NETWORK_URL ?? defaults.network),
|
|
82
|
+
builder: stripSlash(env.APOLLO_BUILDER_URL ?? defaults.builder),
|
|
90
83
|
}),
|
|
91
84
|
...(flags.org ?? env.APOLLO_ORG_ID ?? binding?.org_id ?? claims.organizationId
|
|
92
85
|
? {
|
|
@@ -111,6 +104,7 @@ export async function resolveContext(options = {}) {
|
|
|
111
104
|
...(binding?.version_tag === undefined
|
|
112
105
|
? {}
|
|
113
106
|
: { versionTag: binding.version_tag }),
|
|
107
|
+
...(binding?.workspace === "headless" ? { workspace: "headless" } : {}),
|
|
114
108
|
// The pin is per checkout; the flag and env var override it for one
|
|
115
109
|
// command without ever being written back to `.apollorc`.
|
|
116
110
|
...(runtimeVersion === undefined ? {} : { runtimeVersion }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO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AC;QAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC;QAC3C,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC;QACxD,OAAO;YACL,GAAG,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjD,GAAG,CAAC,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,GAAG,CAAC,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAaD,OAAO,EACL,SAAS,EACT,cAAc,EACd,WAAW,EACX,YAAY,EACZ,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const environments: readonly ["staging", "production"
|
|
1
|
+
export declare const environments: readonly ["staging", "production"];
|
|
2
2
|
export type Environment = (typeof environments)[number];
|
|
3
3
|
export interface BaseUrls {
|
|
4
4
|
identity: string;
|
|
@@ -13,7 +13,16 @@ export interface BaseUrls {
|
|
|
13
13
|
agentSettings: string;
|
|
14
14
|
/** network service — the network a new agent is scoped to (`agent create`). */
|
|
15
15
|
network: string;
|
|
16
|
+
/** builder-api — the headless authoring verbs (`validate`, `certify`). */
|
|
17
|
+
builder: string;
|
|
16
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* A checkout's skill profile. `authoring` (the default, and what an absent
|
|
21
|
+
* key means) installs the full skill packs; `headless` installs NONE — the
|
|
22
|
+
* checkout's whole brief is its `AGENTS.md`, and pulls delete any managed
|
|
23
|
+
* packs a mode switch left behind.
|
|
24
|
+
*/
|
|
25
|
+
export type WorkspaceMode = "authoring" | "headless";
|
|
17
26
|
export interface ProjectBinding {
|
|
18
27
|
config_version: 1;
|
|
19
28
|
org_id?: string;
|
|
@@ -27,6 +36,8 @@ export interface ProjectBinding {
|
|
|
27
36
|
* which is how every checkout behaved before pinning existed.
|
|
28
37
|
*/
|
|
29
38
|
runtime_version?: string;
|
|
39
|
+
/** Only ever written as `headless`; absent means authoring. */
|
|
40
|
+
workspace?: WorkspaceMode;
|
|
30
41
|
}
|
|
31
42
|
export interface UserConfig {
|
|
32
43
|
profile?: string;
|
|
@@ -81,6 +92,12 @@ export interface Context {
|
|
|
81
92
|
readonly bindingPath?: string;
|
|
82
93
|
/** The agent checkout containing the cwd (directory of `.apollorc`). */
|
|
83
94
|
readonly agentRoot?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The checkout's skill profile, from `.apollorc`. Only `headless` is ever
|
|
97
|
+
* carried — an absent key, an explicit `authoring`, or an unknown value all
|
|
98
|
+
* mean the default profile.
|
|
99
|
+
*/
|
|
100
|
+
readonly workspace?: "headless";
|
|
84
101
|
}
|
|
85
102
|
export interface ConfigFlags {
|
|
86
103
|
env?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const environments = ["staging", "production"
|
|
1
|
+
export const environments = ["staging", "production"];
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU,CAAC"}
|
|
@@ -7,6 +7,7 @@ export { MockDbClient, type MockDbAuth, type MockDbClientOptions, type MockDbMgm
|
|
|
7
7
|
export { VaultClient, type VaultScope, type VaultSecret, type VaultSecretCreate, } from "./api/vault.js";
|
|
8
8
|
export { KbmClient, type BulkFilesResponse, type BulkResourceResult, type BulkWebsitesResponse, type IndexingJob, type KnowledgeBase, type UploadFilePart, } from "./api/kbm.js";
|
|
9
9
|
export { RuntimeApiClient, type AgentOverride, type Message, type RuntimeTrace, type SendMessageRequest, type SendMessageResponse, type SkillFile, type SkillIndexItem, type Thread, } from "./api/runtime-api.js";
|
|
10
|
+
export { BuilderApiClient, type AdvisorAsk, type AdvisorStarted, type AdvisorView, type BuilderCertification, type BuilderFinding, type BuilderTree, type BuilderValidation, type BuildRequest, type BuildStarted, type BuildView, type EraCensus, type OrphanCensus, type ScenarioFailure, } from "./api/builder-api.js";
|
|
10
11
|
export { Transport, type FormBody, type FormFilePart, type RequestCapture, type TransportOptions, } from "./api/transport.js";
|
|
11
12
|
export { CaptureLog, captureLog, defaultCapturePath, type CaptureSink, } from "./api/capture.js";
|
|
12
13
|
export { AgentSettingsClient, type AgentBlobStats, type AgentRecord, type AgentRecordKind, type AgentRecordScope, type AgentVersionRecord, type RuntimeVersionRecord, type BuildBundle, type BuildBundleFile, type BuildBundlePullResponse, type BuildBundlePushResponse, type BundleUploadFile, type EvaluationScorePush, type EvaluationScoreRead, type Scenario, type ScenarioResult, type ScenarioResultStatus, type ScoreReportBlocks, } from "./api/agent-settings.js";
|
|
@@ -14,15 +15,17 @@ export { NetworkClient, type Network } from "./api/network.js";
|
|
|
14
15
|
export { diffHashes, isClean, readBaseline, writeBaseline, type Baseline, type FileDiff, } from "./bundle/baseline.js";
|
|
15
16
|
export { contentDigest, hashFiles, readProgramFiles, type ProgramFiles, } from "./bundle/files.js";
|
|
16
17
|
export { assembleBundle, bundleFileLayout, bundleFiles, writeBundleFiles, type BundleDocument, } from "./bundle/materialize.js";
|
|
17
|
-
export { assertValidProgram, mapRuntimeValidation, type RuntimeValidateResponse, type RuntimeValidationFinding, type ValidationFinding, type ValidationResult, } from "./bundle/validate.js";
|
|
18
|
+
export { assertValidProgram, mapRuntimeValidation, renderValidation, type RuntimeValidateResponse, type RuntimeValidationFinding, type ValidationFinding, type ValidationResult, } from "./bundle/validate.js";
|
|
18
19
|
export { parseEnvironment, resolveContext, type ResolveConfigOptions, } from "./config/index.js";
|
|
19
20
|
export { clearMockDbKeys, keyPrefixes, loadMockDbKeys, saveMockDbKeys, type MockDbKeys, } from "./config/mockdb-keys.js";
|
|
20
21
|
export { apolloDir, findBinding, patchBinding, readBinding, readCredentials, readUserConfig, updateEnvironment, updateProfile, writeBinding, writeCredentials, writeUserConfig, type ConfigPaths, } from "./config/store.js";
|
|
21
|
-
export { environments, type BaseUrls, type ConfigFlags, type Context, type Credential, type CredentialsFile, type Environment, type ProjectBinding, type UserConfig, type WorkspacePreferences, } from "./config/types.js";
|
|
22
|
+
export { environments, type BaseUrls, type ConfigFlags, type Context, type Credential, type CredentialsFile, type Environment, type ProjectBinding, type UserConfig, type WorkspaceMode, type WorkspacePreferences, } from "./config/types.js";
|
|
22
23
|
export { ApiError, AuthError, CliError, ConfigError, ExitCode, ValidationError, toCliError, type ExitCodeValue, } from "./errors/index.js";
|
|
23
24
|
export { Output, errorEnvelope, successEnvelope, type ErrorEnvelope, type OutputOptions, } from "./output/index.js";
|
|
24
25
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
25
|
-
export { DEFAULT_SKILL_TARGETS, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, remoteDiff, validateLocalBundle, validateProgramBundle, type PullCheckoutOptions, type PullCheckoutResult, certifyLocalBundle, needsLocalBundle, } from "./services/bundles.js";
|
|
26
|
+
export { DEFAULT_SKILL_TARGETS, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, remoteDiff, validateLocalBundle, validateProgramBundle, type BundleValidation, type PullCheckoutOptions, type PullCheckoutResult, certifyLocalBundle, needsLocalBundle, } from "./services/bundles.js";
|
|
27
|
+
export { ADVISE_DEADLINE_MS, adviseLocalBundle, readAdvisorState, writeAdvisorState, type AdviceResult, type AdviseOptions, type AdvisorState, } from "./services/advisor.js";
|
|
28
|
+
export { BUILD_DEADLINE_MS, buildAgent, type BuildOptions, } from "./services/builds.js";
|
|
26
29
|
export { createClients, type Clients } from "./services/clients.js";
|
|
27
30
|
export { listEnvironments, setEnvironment, type EnvironmentResult, type EnvironmentSummary, } from "./services/env.service.js";
|
|
28
31
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, TEMPLATE_AGENT_ID, unlinkAgent, useOrganization, useProject, useVersion, type AgentCreateClients, } from "./services/hierarchy.js";
|
|
@@ -38,7 +41,7 @@ export { runDoctor, type DoctorCheck, type DoctorOptions, type DoctorReport, typ
|
|
|
38
41
|
export { getStatus, type ServiceCheck, type StatusResult, } from "./services/status.service.js";
|
|
39
42
|
export { resolvePublishedVersion, upgradeCli, type NpmRunner, type UpgradeOptions, type UpgradeResult, } from "./services/upgrade.js";
|
|
40
43
|
export { enterCheckout, enterKnownCheckout, listKnownCheckouts, type EnteredCheckout, } from "./services/checkouts.service.js";
|
|
41
|
-
export { installSkills, type SkillTarget } from "./skills/install.js";
|
|
42
|
-
export { installAgentsPage, type AgentsPageFacts, } from "./skills/agents-page.js";
|
|
44
|
+
export { installSkills, removeManagedSkills, type SkillTarget, } from "./skills/install.js";
|
|
45
|
+
export { installAgentsPage, type AgentsPageAudience, type AgentsPageFacts, } from "./skills/agents-page.js";
|
|
43
46
|
export { checkoutSchemasDir, installSchemas } from "./schemas/install.js";
|
|
44
47
|
export { checkoutAlive, defaultCheckoutDir, forgetCheckout, lastUsedCheckout, listCheckouts, readCheckoutRegistry, registerCheckout, registryFile, touchCheckout, type CheckoutEntry, } from "./checkouts/registry.js";
|
|
@@ -6,6 +6,7 @@ export { MockDbClient, } from "./api/mock-db.js";
|
|
|
6
6
|
export { VaultClient, } from "./api/vault.js";
|
|
7
7
|
export { KbmClient, } from "./api/kbm.js";
|
|
8
8
|
export { RuntimeApiClient, } from "./api/runtime-api.js";
|
|
9
|
+
export { BuilderApiClient, } from "./api/builder-api.js";
|
|
9
10
|
export { Transport, } from "./api/transport.js";
|
|
10
11
|
export { CaptureLog, captureLog, defaultCapturePath, } from "./api/capture.js";
|
|
11
12
|
export { AgentSettingsClient, } from "./api/agent-settings.js";
|
|
@@ -13,7 +14,7 @@ export { NetworkClient } from "./api/network.js";
|
|
|
13
14
|
export { diffHashes, isClean, readBaseline, writeBaseline, } from "./bundle/baseline.js";
|
|
14
15
|
export { contentDigest, hashFiles, readProgramFiles, } from "./bundle/files.js";
|
|
15
16
|
export { assembleBundle, bundleFileLayout, bundleFiles, writeBundleFiles, } from "./bundle/materialize.js";
|
|
16
|
-
export { assertValidProgram, mapRuntimeValidation, } from "./bundle/validate.js";
|
|
17
|
+
export { assertValidProgram, mapRuntimeValidation, renderValidation, } from "./bundle/validate.js";
|
|
17
18
|
export { parseEnvironment, resolveContext, } from "./config/index.js";
|
|
18
19
|
export { clearMockDbKeys, keyPrefixes, loadMockDbKeys, saveMockDbKeys, } from "./config/mockdb-keys.js";
|
|
19
20
|
export { apolloDir, findBinding, patchBinding, readBinding, readCredentials, readUserConfig, updateEnvironment, updateProfile, writeBinding, writeCredentials, writeUserConfig, } from "./config/store.js";
|
|
@@ -21,7 +22,9 @@ export { environments, } from "./config/types.js";
|
|
|
21
22
|
export { ApiError, AuthError, CliError, ConfigError, ExitCode, ValidationError, toCliError, } from "./errors/index.js";
|
|
22
23
|
export { Output, errorEnvelope, successEnvelope, } from "./output/index.js";
|
|
23
24
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
24
|
-
export { DEFAULT_SKILL_TARGETS, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, remoteDiff, validateLocalBundle, validateProgramBundle, certifyLocalBundle, needsLocalBundle, } from "./services/bundles.js";
|
|
25
|
+
export { DEFAULT_SKILL_TARGETS, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, remoteDiff, validateLocalBundle, validateProgramBundle, certifyLocalBundle, needsLocalBundle, } from "./services/bundles.js";
|
|
26
|
+
export { ADVISE_DEADLINE_MS, adviseLocalBundle, readAdvisorState, writeAdvisorState, } from "./services/advisor.js";
|
|
27
|
+
export { BUILD_DEADLINE_MS, buildAgent, } from "./services/builds.js";
|
|
25
28
|
export { createClients } from "./services/clients.js";
|
|
26
29
|
export { listEnvironments, setEnvironment, } from "./services/env.service.js";
|
|
27
30
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, TEMPLATE_AGENT_ID, unlinkAgent, useOrganization, useProject, useVersion, } from "./services/hierarchy.js";
|
|
@@ -37,7 +40,7 @@ export { runDoctor, } from "./services/doctor.js";
|
|
|
37
40
|
export { getStatus, } from "./services/status.service.js";
|
|
38
41
|
export { resolvePublishedVersion, upgradeCli, } from "./services/upgrade.js";
|
|
39
42
|
export { enterCheckout, enterKnownCheckout, listKnownCheckouts, } from "./services/checkouts.service.js";
|
|
40
|
-
export { installSkills } from "./skills/install.js";
|
|
43
|
+
export { installSkills, removeManagedSkills, } from "./skills/install.js";
|
|
41
44
|
export { installAgentsPage, } from "./skills/agents-page.js";
|
|
42
45
|
export { checkoutSchemasDir, installSchemas } from "./schemas/install.js";
|
|
43
46
|
export { checkoutAlive, defaultCheckoutDir, forgetCheckout, lastUsedCheckout, listCheckouts, readCheckoutRegistry, registerCheckout, registryFile, touchCheckout, } from "./checkouts/registry.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EACL,cAAc,EACd,YAAY,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAQhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,GAOb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,GAIZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,SAAS,GAOV,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,GASjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,SAAS,GAKV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,UAAU,EACV,kBAAkB,GAEnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,mBAAmB,GAkBpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAgB,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EACL,UAAU,EACV,OAAO,EACP,YAAY,EACZ,aAAa,GAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,GAEjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,gBAAgB,GAEjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EACL,cAAc,EACd,YAAY,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAQhB,M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C;AAC/B,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,mBAAmB,GAEpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,GAGlB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,aAAa,GAEd,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AdvisorView, BuilderApiClient } from "../api/builder-api.js";
|
|
2
|
+
import type { Context } from "../config/index.js";
|
|
3
|
+
/** An advisor turn is a model turn over the whole tree — minutes, not
|
|
4
|
+
* seconds. The poll loop's own deadline; each poll request stays cheap. */
|
|
5
|
+
export declare const ADVISE_DEADLINE_MS = 900000;
|
|
6
|
+
export interface AdvisorState {
|
|
7
|
+
advisor_session_id: string;
|
|
8
|
+
}
|
|
9
|
+
/** The saved thread handle, or nothing — a missing or corrupt file simply
|
|
10
|
+
* means the next question opens a fresh thread. */
|
|
11
|
+
export declare function readAdvisorState(root: string): Promise<AdvisorState | undefined>;
|
|
12
|
+
export declare function writeAdvisorState(root: string, state: AdvisorState): Promise<void>;
|
|
13
|
+
export interface AdviseOptions {
|
|
14
|
+
/** Checkout root (defaults to the bound checkout). */
|
|
15
|
+
root?: string;
|
|
16
|
+
/** Drop the saved thread and open a new one. */
|
|
17
|
+
fresh?: boolean;
|
|
18
|
+
model?: string;
|
|
19
|
+
maxUsd?: number;
|
|
20
|
+
pollIntervalMs?: number;
|
|
21
|
+
deadlineMs?: number;
|
|
22
|
+
/** Injectable for tests — real callers get a plain setTimeout sleep. */
|
|
23
|
+
sleep?: (ms: number) => Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export interface AdviceResult extends AdvisorView {
|
|
26
|
+
/** Whether this question continued the saved thread or opened a new one. */
|
|
27
|
+
thread: "new" | "continued";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Ask the advisor about this checkout and wait for the answer. The tree
|
|
31
|
+
* rides every call — follow-ups included — so the advisor always reads the
|
|
32
|
+
* caller's CURRENT files; the saved thread id only buys retained context.
|
|
33
|
+
* A saved thread the server no longer knows (purged, expired) falls back to
|
|
34
|
+
* a fresh one transparently: the id came from our own state file, so there
|
|
35
|
+
* is no typo to protect and nothing better to do than start over.
|
|
36
|
+
*/
|
|
37
|
+
export declare function adviseLocalBundle(context: Context, builder: BuilderApiClient, instruction: string, options?: AdviseOptions): Promise<AdviceResult>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { ApiError, CliError } from "../errors/index.js";
|
|
4
|
+
import { agentRoot, readCheckoutTree } from "./bundles.js";
|
|
5
|
+
/**
|
|
6
|
+
* The advice lane's console half (docs/headless-authoring-design.md §4.4):
|
|
7
|
+
* ship the checkout's current tree with a question, poll one advisor turn to
|
|
8
|
+
* its answer. Continuity is a LOCAL fact — the thread handle lives in the
|
|
9
|
+
* checkout's `.apollo/advisor.json`, never on the server's say-so — so two
|
|
10
|
+
* checkouts of one agent hold two threads, and deleting a checkout forgets
|
|
11
|
+
* its thread with it.
|
|
12
|
+
*/
|
|
13
|
+
/** Builder-api's terminal turn statuses (`domain/lifecycle.TERMINAL`). An
|
|
14
|
+
* advisor turn settles as `answered`; the rest are failure stories. */
|
|
15
|
+
const TERMINAL = new Set(["completed", "answered", "rejected", "failed", "exhausted"]);
|
|
16
|
+
/** An advisor turn is a model turn over the whole tree — minutes, not
|
|
17
|
+
* seconds. The poll loop's own deadline; each poll request stays cheap. */
|
|
18
|
+
export const ADVISE_DEADLINE_MS = 900_000;
|
|
19
|
+
const ADVISE_POLL_MS = 2_500;
|
|
20
|
+
function advisorStateFile(root) {
|
|
21
|
+
return path.join(root, ".apollo", "advisor.json");
|
|
22
|
+
}
|
|
23
|
+
/** The saved thread handle, or nothing — a missing or corrupt file simply
|
|
24
|
+
* means the next question opens a fresh thread. */
|
|
25
|
+
export async function readAdvisorState(root) {
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(await readFile(advisorStateFile(root), "utf8"));
|
|
28
|
+
return typeof parsed.advisor_session_id === "string"
|
|
29
|
+
? { advisor_session_id: parsed.advisor_session_id }
|
|
30
|
+
: undefined;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export async function writeAdvisorState(root, state) {
|
|
37
|
+
const file = advisorStateFile(root);
|
|
38
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
39
|
+
await writeFile(file, `${JSON.stringify(state, null, 2)}\n`, "utf8");
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Ask the advisor about this checkout and wait for the answer. The tree
|
|
43
|
+
* rides every call — follow-ups included — so the advisor always reads the
|
|
44
|
+
* caller's CURRENT files; the saved thread id only buys retained context.
|
|
45
|
+
* A saved thread the server no longer knows (purged, expired) falls back to
|
|
46
|
+
* a fresh one transparently: the id came from our own state file, so there
|
|
47
|
+
* is no typo to protect and nothing better to do than start over.
|
|
48
|
+
*/
|
|
49
|
+
export async function adviseLocalBundle(context, builder, instruction, options = {}) {
|
|
50
|
+
const root = options.root ?? agentRoot(context);
|
|
51
|
+
const files = await readCheckoutTree(path.join(root, "bundle", "src"));
|
|
52
|
+
const saved = options.fresh === true ? undefined : await readAdvisorState(root);
|
|
53
|
+
const ask = {
|
|
54
|
+
instruction,
|
|
55
|
+
files,
|
|
56
|
+
...(options.model ? { model: options.model } : {}),
|
|
57
|
+
...(options.maxUsd !== undefined ? { max_usd: options.maxUsd } : {}),
|
|
58
|
+
};
|
|
59
|
+
let thread = saved ? "continued" : "new";
|
|
60
|
+
let started;
|
|
61
|
+
try {
|
|
62
|
+
started = await builder.advise(saved ? { ...ask, advisor_session_id: saved.advisor_session_id } : ask);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
if (!saved || !(error instanceof ApiError) || error.status !== 404)
|
|
66
|
+
throw error;
|
|
67
|
+
thread = "new";
|
|
68
|
+
started = await builder.advise(ask);
|
|
69
|
+
}
|
|
70
|
+
await writeAdvisorState(root, { advisor_session_id: started.advisor_session_id });
|
|
71
|
+
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
72
|
+
const interval = options.pollIntervalMs ?? ADVISE_POLL_MS;
|
|
73
|
+
const deadline = Date.now() + (options.deadlineMs ?? ADVISE_DEADLINE_MS);
|
|
74
|
+
for (;;) {
|
|
75
|
+
const view = await builder.adviceView(started.turn_id);
|
|
76
|
+
if (TERMINAL.has(view.status))
|
|
77
|
+
return { ...view, thread };
|
|
78
|
+
if (Date.now() >= deadline) {
|
|
79
|
+
// The turn keeps running server-side; the state file already holds the
|
|
80
|
+
// thread, so the next question waits behind it (409) until it settles.
|
|
81
|
+
throw new CliError(`The advisor is still working (turn ${started.turn_id}).`, { suggestion: "Ask again in a moment — the same thread resumes." });
|
|
82
|
+
}
|
|
83
|
+
await sleep(interval);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=advisor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advisor.js","sourceRoot":"","sources":["../../../src/services/advisor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAS7B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,gBAAgB,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GAAG,KAAK,CAAC;QACf,OAAO,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACD,MAAM,iBAAiB,CAAC,IAAI,EAAE,EAAE,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAElF,MAAM,KAAK,GACT,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7F,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,IAAI,cAAc,CAAC;IAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,IAAI,kBAAkB,CAAC,CAAC;IACzE,SAAS,CAAC;QACR,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;QAC1D,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,QAAQ,EAAE,CAAC;YAC3B,uEAAuE;YACvE,uEAAuE;YACvE,MAAM,IAAI,QAAQ,CAChB,sCAAsC,OAAO,CAAC,OAAO,IAAI,EACzD,EAAE,UAAU,EAAE,kDAAkD,EAAE,CACnE,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { BuilderApiClient, BuildView } from "../api/builder-api.js";
|
|
2
|
+
import type { Context } from "../config/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* The shipping lane's console half (docs/headless-authoring-design.md §4.5):
|
|
5
|
+
* one instruction against the checkout's PUSHED agent — no files travel, the
|
|
6
|
+
* service pulls the bundle itself — then poll the whole story (turn, certify,
|
|
7
|
+
* optional evaluation, push, optional publish) to its terminal verdict.
|
|
8
|
+
*/
|
|
9
|
+
/** A build turn edits, validates and repairs; certify replays the suite; an
|
|
10
|
+
* evaluation runs real conversations. Hours-scale, so the poll loop's own
|
|
11
|
+
* deadline is generous — each poll request stays cheap. */
|
|
12
|
+
export declare const BUILD_DEADLINE_MS: number;
|
|
13
|
+
export interface BuildOptions {
|
|
14
|
+
/** The base to build from — a pushed version's tag (defaults to the pin). */
|
|
15
|
+
versionTag?: string;
|
|
16
|
+
/** The push message. */
|
|
17
|
+
message?: string;
|
|
18
|
+
model?: string;
|
|
19
|
+
maxUsd?: number;
|
|
20
|
+
/** Run the evaluation suite on the settled tree before approving. */
|
|
21
|
+
evaluate?: boolean;
|
|
22
|
+
/** Flip the agent's active pointer to the pushed revision. */
|
|
23
|
+
publish?: boolean;
|
|
24
|
+
pollIntervalMs?: number;
|
|
25
|
+
deadlineMs?: number;
|
|
26
|
+
/** Injectable for tests — real callers get a plain setTimeout sleep. */
|
|
27
|
+
sleep?: (ms: number) => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Run one build to its verdict. The POST rides a fresh idempotency key, so a
|
|
31
|
+
* retried request replays the SAME build; the returned view is terminal —
|
|
32
|
+
* `completed` (pushed), `refused` (a gate said no: the turn answered instead
|
|
33
|
+
* of completing, or certify came back red) or `failed` (infra story). The
|
|
34
|
+
* caller decides what each verdict is worth; this function only refuses to
|
|
35
|
+
* return a non-terminal view.
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildAgent(context: Context, builder: BuilderApiClient, instruction: string, options?: BuildOptions): Promise<BuildView>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { CliError } from "../errors/index.js";
|
|
3
|
+
import { requireAgent } from "./bundles.js";
|
|
4
|
+
/**
|
|
5
|
+
* The shipping lane's console half (docs/headless-authoring-design.md §4.5):
|
|
6
|
+
* one instruction against the checkout's PUSHED agent — no files travel, the
|
|
7
|
+
* service pulls the bundle itself — then poll the whole story (turn, certify,
|
|
8
|
+
* optional evaluation, push, optional publish) to its terminal verdict.
|
|
9
|
+
*/
|
|
10
|
+
/** A build turn edits, validates and repairs; certify replays the suite; an
|
|
11
|
+
* evaluation runs real conversations. Hours-scale, so the poll loop's own
|
|
12
|
+
* deadline is generous — each poll request stays cheap. */
|
|
13
|
+
export const BUILD_DEADLINE_MS = 2 * 3600_000;
|
|
14
|
+
const BUILD_POLL_MS = 5_000;
|
|
15
|
+
/**
|
|
16
|
+
* Run one build to its verdict. The POST rides a fresh idempotency key, so a
|
|
17
|
+
* retried request replays the SAME build; the returned view is terminal —
|
|
18
|
+
* `completed` (pushed), `refused` (a gate said no: the turn answered instead
|
|
19
|
+
* of completing, or certify came back red) or `failed` (infra story). The
|
|
20
|
+
* caller decides what each verdict is worth; this function only refuses to
|
|
21
|
+
* return a non-terminal view.
|
|
22
|
+
*/
|
|
23
|
+
export async function buildAgent(context, builder, instruction, options = {}) {
|
|
24
|
+
const request = {
|
|
25
|
+
agent_id: requireAgent(context),
|
|
26
|
+
instruction,
|
|
27
|
+
...(options.versionTag ? { version_tag: options.versionTag } : {}),
|
|
28
|
+
...(options.message ? { message: options.message } : {}),
|
|
29
|
+
...(options.model ? { model: options.model } : {}),
|
|
30
|
+
...(options.maxUsd !== undefined ? { max_usd: options.maxUsd } : {}),
|
|
31
|
+
...(options.evaluate === true ? { evaluate: true } : {}),
|
|
32
|
+
...(options.publish === true ? { publish: true } : {}),
|
|
33
|
+
};
|
|
34
|
+
const started = await builder.startBuild(request, randomUUID());
|
|
35
|
+
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
36
|
+
const interval = options.pollIntervalMs ?? BUILD_POLL_MS;
|
|
37
|
+
const deadline = Date.now() + (options.deadlineMs ?? BUILD_DEADLINE_MS);
|
|
38
|
+
for (;;) {
|
|
39
|
+
const view = await builder.buildView(started.build_id);
|
|
40
|
+
if (view.status !== "running")
|
|
41
|
+
return view;
|
|
42
|
+
if (Date.now() >= deadline) {
|
|
43
|
+
// The build keeps running server-side — the driver owns it, and the
|
|
44
|
+
// session id is a first-class handle every session surface answers on.
|
|
45
|
+
throw new CliError(`The build is still running (session ${started.session_id}).`, {
|
|
46
|
+
suggestion: "The server carries it to a verdict; check the session in the console.",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
await sleep(interval);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=builds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builds.js","sourceRoot":"","sources":["../../../src/services/builds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIzC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;GAKG;AAEH;;4DAE4D;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAG,QAAQ,CAAC;AAE9C,MAAM,aAAa,GAAG,KAAK,CAAC;AAmB5B;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,OAAgB,EAChB,OAAyB,EACzB,WAAmB,EACnB,UAAwB,EAAE;IAE1B,MAAM,OAAO,GAAiB;QAC5B,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC;QAC/B,WAAW;QACX,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CA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