@aui.io/apollo 0.1.71 → 0.1.76
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/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.d.ts +0 -12
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js +9 -76
- 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/hierarchy.js +1 -7
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/hierarchy.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/meta.d.ts +11 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/meta.js +49 -45
- package/node_modules/@aui.io/apollo-cli/dist/src/meta.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 +11 -108
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js +2 -13
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/build-area.d.ts +2 -14
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/build-area.js +2 -19
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/build-area.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.d.ts +0 -10
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.js +0 -26
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.d.ts +15 -60
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js +27 -139
- 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.js +3 -11
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
|
@@ -44,56 +44,24 @@ export interface EraCensus {
|
|
|
44
44
|
}[];
|
|
45
45
|
[key: string]: unknown;
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
file: string;
|
|
54
|
-
message: string;
|
|
55
|
-
fix: "mechanical" | "judgment" | null;
|
|
56
|
-
}
|
|
57
|
-
/** The build-bundle audit's block on a validate answer. Every error here
|
|
58
|
-
* refuses a push; only some refuse `valid` (the layout ones). */
|
|
59
|
-
export interface BundleAudit {
|
|
60
|
-
errors: BundleFinding[];
|
|
61
|
-
warnings: BundleFinding[];
|
|
62
|
-
advisories: BundleFinding[];
|
|
63
|
-
}
|
|
64
|
-
/** One mechanical repair `fix: true` planned (validation design §6): a file
|
|
65
|
-
* to write (`content`) or to remove (`content` null), in step order. */
|
|
66
|
-
export interface BundleFix {
|
|
67
|
-
step: number;
|
|
68
|
-
op: "write" | "delete";
|
|
69
|
-
path: string;
|
|
70
|
-
content: string | null;
|
|
71
|
-
why: string;
|
|
72
|
-
}
|
|
47
|
+
/** The validate answer AS IT ARRIVES — a wire shape, not a promise. One
|
|
48
|
+
* console build meets many builder-api versions (a custom lane, a staging
|
|
49
|
+
* lane, production), and a lane that predates a block simply omits it: a
|
|
50
|
+
* field this type swears is present is `undefined` at runtime, and the
|
|
51
|
+
* reader that trusted it dies rendering a verdict the gate already gave.
|
|
52
|
+
* Everything optional here is normalized once, in `validateLocalBundle`. */
|
|
73
53
|
export interface BuilderValidation {
|
|
74
54
|
valid: boolean;
|
|
75
|
-
/** What a push would say: no program error and no audit error of any
|
|
76
|
-
* layer, a missing brief included. `apollo push` reads this beside its
|
|
77
|
-
* runtime pre-flight. */
|
|
78
|
-
pushable: boolean;
|
|
79
55
|
errors: BuilderFinding[];
|
|
80
56
|
warnings: BuilderFinding[];
|
|
81
|
-
bundle: BundleAudit;
|
|
82
57
|
/** id / version / config_fingerprint — `{}` when the tree does not load. */
|
|
83
|
-
program
|
|
58
|
+
program?: {
|
|
84
59
|
id?: string;
|
|
85
60
|
version?: string;
|
|
86
61
|
config_fingerprint?: string;
|
|
87
62
|
};
|
|
88
|
-
orphans
|
|
89
|
-
era_census
|
|
90
|
-
/** Only with `fix: true`: the repairs, and the verdict after writing them. */
|
|
91
|
-
fixes?: BundleFix[] | null;
|
|
92
|
-
fixed?: {
|
|
93
|
-
valid: boolean;
|
|
94
|
-
pushable: boolean;
|
|
95
|
-
bundle: BundleAudit;
|
|
96
|
-
} | null;
|
|
63
|
+
orphans?: OrphanCensus;
|
|
64
|
+
era_census?: EraCensus;
|
|
97
65
|
}
|
|
98
66
|
export interface ScenarioFailure {
|
|
99
67
|
name: string;
|
|
@@ -188,27 +156,7 @@ export interface RunReceipt {
|
|
|
188
156
|
judge_model?: string | null;
|
|
189
157
|
warnings?: string[];
|
|
190
158
|
}
|
|
191
|
-
/** One
|
|
192
|
-
export type JudgeGrade = "pass" | "fail" | "not_validated";
|
|
193
|
-
/** The §10 rule folded over both judges: red if either failed, green only
|
|
194
|
-
* when both passed, otherwise not validated. */
|
|
195
|
-
export type FinalGrade = "green" | "red" | "not_validated";
|
|
196
|
-
/** The three grades on one covered case, with the symbolic judge's reasons
|
|
197
|
-
* and its per-declaration expectation rows. */
|
|
198
|
-
export interface CaseGrades {
|
|
199
|
-
symbolic: JudgeGrade;
|
|
200
|
-
neural: JudgeGrade;
|
|
201
|
-
final: FinalGrade;
|
|
202
|
-
reasons?: string[];
|
|
203
|
-
expectations?: {
|
|
204
|
-
text?: string;
|
|
205
|
-
met?: boolean;
|
|
206
|
-
evidence?: string;
|
|
207
|
-
}[];
|
|
208
|
-
}
|
|
209
|
-
/** One trial row — `thread_id` opens the minted conversation. The three
|
|
210
|
-
* grade columns and `cases` are absent (null) on rows settled before the
|
|
211
|
-
* symbolic judge existed. */
|
|
159
|
+
/** One trial row — `thread_id` opens the minted conversation. */
|
|
212
160
|
export interface EvaluationTrial {
|
|
213
161
|
scenario_code: string;
|
|
214
162
|
iteration: number;
|
|
@@ -225,44 +173,6 @@ export interface EvaluationTrial {
|
|
|
225
173
|
} | null;
|
|
226
174
|
turns: number | null;
|
|
227
175
|
error: string | null;
|
|
228
|
-
/** The trace check over every covered case. */
|
|
229
|
-
symbolic?: JudgeGrade | null;
|
|
230
|
-
/** The judge's verdict; `not_validated` when the judge was off. */
|
|
231
|
-
neural?: JudgeGrade | null;
|
|
232
|
-
/** What the trial counts as — an evaluation counts the judge alone. */
|
|
233
|
-
final?: FinalGrade | null;
|
|
234
|
-
/** Per covered case id, the same three grades plus the reasons. */
|
|
235
|
-
cases?: Record<string, CaseGrades> | null;
|
|
236
|
-
}
|
|
237
|
-
/** One case on the certificate (build-bundle-schema-design.md §10). */
|
|
238
|
-
export interface CertificateCase {
|
|
239
|
-
id: string;
|
|
240
|
-
/** The need the case belongs to, when the query names it. */
|
|
241
|
-
need?: string;
|
|
242
|
-
symbolic: JudgeGrade;
|
|
243
|
-
neural: JudgeGrade;
|
|
244
|
-
final: FinalGrade;
|
|
245
|
-
/** The newest revision of the family where `final` was green; null when never. */
|
|
246
|
-
last_green: string | null;
|
|
247
|
-
}
|
|
248
|
-
/** The latest completed FULL regression on a version family, read per case
|
|
249
|
-
* — what `apollo pull` writes as `bundle/build/certification.yaml`. */
|
|
250
|
-
export interface Certificate {
|
|
251
|
-
/** The family (`v4`). */
|
|
252
|
-
version: string;
|
|
253
|
-
/** The revision the full run ran against (`v4.5`). */
|
|
254
|
-
revision: string | null;
|
|
255
|
-
/** The regression id the verdicts come from. */
|
|
256
|
-
run: string;
|
|
257
|
-
/** The tree it stands on. */
|
|
258
|
-
src_hash: string | null;
|
|
259
|
-
/** Epoch seconds — the run's creation time. */
|
|
260
|
-
taken_at: number | null;
|
|
261
|
-
cases: CertificateCase[];
|
|
262
|
-
}
|
|
263
|
-
export interface CertificateView {
|
|
264
|
-
agent_id: string;
|
|
265
|
-
certificate: Certificate;
|
|
266
176
|
}
|
|
267
177
|
/** One reading a person (or the builder) left on a settled run. The latest
|
|
268
178
|
* entry carrying a `verdict` is the run's `effective_verdict`. */
|
|
@@ -387,9 +297,7 @@ export declare class BuilderApiClient {
|
|
|
387
297
|
* connections' secret names — without it every vault-held credential
|
|
388
298
|
* draws an `unresolved-secret` warning for wiring that is fine where it
|
|
389
299
|
* matters. Names only ride into the gate, never values. */
|
|
390
|
-
validateTree(files: BuilderTree, agentId?: string
|
|
391
|
-
fix?: boolean;
|
|
392
|
-
}): Promise<BuilderValidation>;
|
|
300
|
+
validateTree(files: BuilderTree, agentId?: string): Promise<BuilderValidation>;
|
|
393
301
|
/** Enqueue one advisor turn (202 immediately — the answer comes by poll). */
|
|
394
302
|
advise(ask: AdvisorAsk): Promise<AdvisorStarted>;
|
|
395
303
|
adviceView(turnId: string): Promise<AdvisorView>;
|
|
@@ -416,9 +324,4 @@ export declare class BuilderApiClient {
|
|
|
416
324
|
* idempotency key makes a network retry the SAME build, not a second one. */
|
|
417
325
|
startBuild(build: BuildRequest, idempotencyKey: string): Promise<BuildStarted>;
|
|
418
326
|
buildView(buildId: string): Promise<BuildView>;
|
|
419
|
-
/** The certificate for a version family — the latest completed full
|
|
420
|
-
* regression on it, per case. `version` may be the family (`v4`) or any
|
|
421
|
-
* tag in it (`v4.5`). 404 `no_certificate` when the family has no such
|
|
422
|
-
* run; the caller treats that as "nothing to write". */
|
|
423
|
-
certificate(agentId: string, version: string): Promise<CertificateView>;
|
|
424
327
|
}
|
|
@@ -11,14 +11,10 @@ export class BuilderApiClient {
|
|
|
11
11
|
* connections' secret names — without it every vault-held credential
|
|
12
12
|
* draws an `unresolved-secret` warning for wiring that is fine where it
|
|
13
13
|
* matters. Names only ride into the gate, never values. */
|
|
14
|
-
validateTree(files, agentId
|
|
14
|
+
validateTree(files, agentId) {
|
|
15
15
|
return this.http.request("/v1/builder/validate", {
|
|
16
16
|
method: "POST",
|
|
17
|
-
body: {
|
|
18
|
-
files,
|
|
19
|
-
...(agentId ? { agent_id: agentId } : {}),
|
|
20
|
-
...(options.fix ? { fix: true } : {}),
|
|
21
|
-
},
|
|
17
|
+
body: { files, ...(agentId ? { agent_id: agentId } : {}) },
|
|
22
18
|
});
|
|
23
19
|
}
|
|
24
20
|
/** Enqueue one advisor turn (202 immediately — the answer comes by poll). */
|
|
@@ -74,12 +70,5 @@ export class BuilderApiClient {
|
|
|
74
70
|
buildView(buildId) {
|
|
75
71
|
return this.http.request(`/v1/builder/build/${buildId}`);
|
|
76
72
|
}
|
|
77
|
-
/** The certificate for a version family — the latest completed full
|
|
78
|
-
* regression on it, per case. `version` may be the family (`v4`) or any
|
|
79
|
-
* tag in it (`v4.5`). 404 `no_certificate` when the family has no such
|
|
80
|
-
* run; the caller treats that as "nothing to write". */
|
|
81
|
-
certificate(agentId, version) {
|
|
82
|
-
return this.http.request(`/v1/builder/agents/${encodeURIComponent(agentId)}/certificate?version=${encodeURIComponent(version)}`);
|
|
83
|
-
}
|
|
84
73
|
}
|
|
85
74
|
//# sourceMappingURL=builder-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-api.js","sourceRoot":"","sources":["../../../src/api/builder-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builder-api.js","sourceRoot":"","sources":["../../../src/api/builder-api.ts"],"names":[],"mappings":"AAqPA,sCAAsC;AACtC,SAAS,QAAQ,CAAC,IAAa;IAC7B,OAAO,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;AAC/D,CAAC;AA2CD,MAAM,OAAO,gBAAgB;IACS;IAApC,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExD;;;gEAG4D;IACrD,YAAY,CACjB,KAAkB,EAClB,OAAgB;QAEhB,OAAO,IAAI,CAAC,IAAI,CAAC,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,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAC7B,CAAC;IACJ,CAAC;IAED,4EAA4E;IACrE,WAAW,CAChB,IAAa,EACb,KAAa,EACb,UAAiE;QAEjE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,eAAe,QAAQ,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,cAAc,EACxE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,CACrC,CAAC;IACJ,CAAC;IAED;6CACyC;IAClC,YAAY,CAAC,IAAa,EAAE,KAAa,EAAE,GAAG,GAAG,IAAI;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,eAAe,QAAQ,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,kBAAkB,GAAG,EAAE,CAClF,CAAC;IACJ,CAAC;IAED;kFAC8E;IACvE,UAAU,CAAC,KAAmB,EAAE,cAAsB;QAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC;IAEM,SAAS,CAAC,OAAe;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -3,21 +3,9 @@ export interface BuildFiles {
|
|
|
3
3
|
/** POSIX path relative to `bundle/build/` → raw bytes. */
|
|
4
4
|
files: Record<string, Buffer>;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* §10). The area's read and hash both skip it, so it never reaches the
|
|
9
|
-
* baseline, the dirty check, the diff or a push. */
|
|
10
|
-
export declare const CERTIFICATION_FILE = "certification.yaml";
|
|
11
|
-
/** True for the files the platform writes into the area for the reader's
|
|
12
|
-
* benefit — not proof material, not the author's work. */
|
|
13
|
-
export declare function isWrittenBuildFile(relativePath: string): boolean;
|
|
14
|
-
/** Every file under the area, dotfiles and the platform-written files
|
|
15
|
-
* skipped. A missing directory reads as an empty area — "no proof material
|
|
16
|
-
* yet" is a normal state. */
|
|
6
|
+
/** Every file under the area, dotfiles skipped. A missing directory reads
|
|
7
|
+
* as an empty area — "no proof material yet" is a normal state. */
|
|
17
8
|
export declare function readBuildFiles(root: string): Promise<BuildFiles>;
|
|
18
|
-
/** Sorted sha256 per file — the baseline's record of the area. A written
|
|
19
|
-
* file is dropped here too, so a snapshot that carries one (a remote
|
|
20
|
-
* bundle from before the rule) never records it either. */
|
|
21
9
|
export declare function hashBuildFiles(files: Record<string, Buffer>): Record<string, string>;
|
|
22
10
|
/** Exact sync to the given snapshot: write everything, delete what the
|
|
23
11
|
* snapshot no longer holds, prune emptied directories. */
|
|
@@ -16,16 +16,6 @@
|
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
17
17
|
import { mkdir, readdir, readFile, rmdir, unlink, writeFile } from "node:fs/promises";
|
|
18
18
|
import path from "node:path";
|
|
19
|
-
/** `bundle/build/certification.yaml` — WRITTEN by `apollo pull` from the
|
|
20
|
-
* certificate query, never authored, never pushed (build-bundle-schema-design.md
|
|
21
|
-
* §10). The area's read and hash both skip it, so it never reaches the
|
|
22
|
-
* baseline, the dirty check, the diff or a push. */
|
|
23
|
-
export const CERTIFICATION_FILE = "certification.yaml";
|
|
24
|
-
/** True for the files the platform writes into the area for the reader's
|
|
25
|
-
* benefit — not proof material, not the author's work. */
|
|
26
|
-
export function isWrittenBuildFile(relativePath) {
|
|
27
|
-
return relativePath === CERTIFICATION_FILE;
|
|
28
|
-
}
|
|
29
19
|
function safeBuildRel(relativePath) {
|
|
30
20
|
const normalised = path.posix.normalize(relativePath.replaceAll("\\", "/"));
|
|
31
21
|
if (path.posix.isAbsolute(normalised) ||
|
|
@@ -42,9 +32,8 @@ function resolveInside(root, relativePath) {
|
|
|
42
32
|
}
|
|
43
33
|
return target;
|
|
44
34
|
}
|
|
45
|
-
/** Every file under the area, dotfiles
|
|
46
|
-
*
|
|
47
|
-
* yet" is a normal state. */
|
|
35
|
+
/** Every file under the area, dotfiles skipped. A missing directory reads
|
|
36
|
+
* as an empty area — "no proof material yet" is a normal state. */
|
|
48
37
|
export async function readBuildFiles(root) {
|
|
49
38
|
const absoluteRoot = path.resolve(root);
|
|
50
39
|
const files = {};
|
|
@@ -65,8 +54,6 @@ export async function readBuildFiles(root) {
|
|
|
65
54
|
const relativePath = relativeDirectory
|
|
66
55
|
? `${relativeDirectory}/${entry.name}`
|
|
67
56
|
: entry.name;
|
|
68
|
-
if (isWrittenBuildFile(relativePath))
|
|
69
|
-
continue;
|
|
70
57
|
const absolutePath = path.join(directory, entry.name);
|
|
71
58
|
if (entry.isDirectory()) {
|
|
72
59
|
await walk(absolutePath, relativePath);
|
|
@@ -79,12 +66,8 @@ export async function readBuildFiles(root) {
|
|
|
79
66
|
await walk(absoluteRoot);
|
|
80
67
|
return { root: absoluteRoot, files };
|
|
81
68
|
}
|
|
82
|
-
/** Sorted sha256 per file — the baseline's record of the area. A written
|
|
83
|
-
* file is dropped here too, so a snapshot that carries one (a remote
|
|
84
|
-
* bundle from before the rule) never records it either. */
|
|
85
69
|
export function hashBuildFiles(files) {
|
|
86
70
|
return Object.fromEntries(Object.entries(files)
|
|
87
|
-
.filter(([relativePath]) => !isWrittenBuildFile(relativePath))
|
|
88
71
|
.sort(([left], [right]) => left.localeCompare(right))
|
|
89
72
|
.map(([relativePath, content]) => [
|
|
90
73
|
relativePath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-area.js","sourceRoot":"","sources":["../../../src/bundle/build-area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,OAAO,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D,KAAK,GAAG,KAAK,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { BundleAudit } from "../api/builder-api.js";
|
|
2
1
|
export interface ValidationFinding {
|
|
3
2
|
file: string;
|
|
4
3
|
path: string;
|
|
@@ -39,12 +38,3 @@ export declare function mapRuntimeValidation(response: RuntimeValidateResponse):
|
|
|
39
38
|
*/
|
|
40
39
|
export declare function renderValidation(result: ValidationResult): string;
|
|
41
40
|
export declare function assertValidProgram(result: ValidationResult): ValidationResult;
|
|
42
|
-
/**
|
|
43
|
-
* The build-bundle audit as text — errors, warnings, then advisories, one
|
|
44
|
-
* `✗ [code] file: message` line each, under its own heading, so a reader
|
|
45
|
-
* tells the builder's opinion of the proof material from the engine's
|
|
46
|
-
* opinion of the program. Empty when the audit has nothing to say.
|
|
47
|
-
*/
|
|
48
|
-
export declare function renderBundleAudit(audit: BundleAudit | undefined): string[];
|
|
49
|
-
/** Refuse when the audit carries an error: every one refuses a push. */
|
|
50
|
-
export declare function assertPushableBundle(audit: BundleAudit | undefined): void;
|
|
@@ -102,30 +102,4 @@ function summarizeReport(name, body) {
|
|
|
102
102
|
const compact = JSON.stringify(body);
|
|
103
103
|
return compact.length > 120 ? `${compact.slice(0, 117)}...` : compact;
|
|
104
104
|
}
|
|
105
|
-
const EMPTY_AUDIT = { errors: [], warnings: [], advisories: [] };
|
|
106
|
-
/**
|
|
107
|
-
* The build-bundle audit as text — errors, warnings, then advisories, one
|
|
108
|
-
* `✗ [code] file: message` line each, under its own heading, so a reader
|
|
109
|
-
* tells the builder's opinion of the proof material from the engine's
|
|
110
|
-
* opinion of the program. Empty when the audit has nothing to say.
|
|
111
|
-
*/
|
|
112
|
-
export function renderBundleAudit(audit) {
|
|
113
|
-
const block = audit ?? EMPTY_AUDIT;
|
|
114
|
-
const line = (f, tag) => `${tag} [${f.code}] ${f.file}: ${f.message}`;
|
|
115
|
-
const lines = [
|
|
116
|
-
...block.errors.map((f) => line(f, "✗")),
|
|
117
|
-
...block.warnings.map((f) => line(f, "⚠")),
|
|
118
|
-
...block.advisories.map((f) => line(f, "·")),
|
|
119
|
-
];
|
|
120
|
-
return lines.length > 0 ? ["build bundle:", ...lines] : [];
|
|
121
|
-
}
|
|
122
|
-
/** Refuse when the audit carries an error: every one refuses a push. */
|
|
123
|
-
export function assertPushableBundle(audit) {
|
|
124
|
-
if (audit && audit.errors.length > 0) {
|
|
125
|
-
throw new ValidationError([
|
|
126
|
-
"The build bundle cannot ship — fix these before pushing:",
|
|
127
|
-
...renderBundleAudit({ ...audit, warnings: [], advisories: [] }).slice(1),
|
|
128
|
-
].join("\n"));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
105
|
//# sourceMappingURL=validate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/bundle/validate.ts"],"names":[],"mappings":"
|
|
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,CAClC,QAAiC;IAEjC,MAAM,QAAQ,GAAwB;QACpC,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACnC,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAgB;SACxB,CAAC,CAAC;QACH,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACrC,IAAI,EAAE,EAAE;YACR,IAAI,E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,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentSettingsClient, BuildBundlePushResponse } from "../api/agent-settings.js";
|
|
2
2
|
import { type AgentVersion, type ManagementClient, type VersionPull, type VersionPush } from "../api/management.js";
|
|
3
|
-
import type { BuilderApiClient,
|
|
3
|
+
import type { BuilderApiClient, EraCensus, OrphanCensus } from "../api/builder-api.js";
|
|
4
4
|
import type { RuntimeApiClient } from "../api/runtime-api.js";
|
|
5
5
|
import { type FileDiff } from "../bundle/baseline.js";
|
|
6
6
|
import { type ValidationResult } from "../bundle/validate.js";
|
|
@@ -12,7 +12,6 @@ export declare function requireAgent(context: Context): string;
|
|
|
12
12
|
/** The checkout root the context is bound to (exported for the sibling
|
|
13
13
|
* services that anchor per-checkout state there, e.g. the advisor thread). */
|
|
14
14
|
export declare function agentRoot(context: Context): string;
|
|
15
|
-
export declare function bundleSourceRoot(context: Context, root?: string): string;
|
|
16
15
|
/** What one pull moved in the build area, when the agent has a build bundle. */
|
|
17
16
|
export interface BuildAreaSync {
|
|
18
17
|
version: number;
|
|
@@ -112,12 +111,6 @@ export interface PullCheckoutResult {
|
|
|
112
111
|
removed: string[];
|
|
113
112
|
/** The build area sync, when the agent has a build bundle. */
|
|
114
113
|
build?: BuildAreaSync;
|
|
115
|
-
/**
|
|
116
|
-
* The certificate written as `bundle/build/certification.yaml` — the
|
|
117
|
-
* pulled version's family has a completed full regression. Absent when it
|
|
118
|
-
* has none (any stale file was removed) or the query failed (see `note`).
|
|
119
|
-
*/
|
|
120
|
-
certificate?: Certificate;
|
|
121
114
|
/** The engine build every fetch above was routed to, when pinned. */
|
|
122
115
|
runtimeVersion?: string;
|
|
123
116
|
skills?: string[];
|
|
@@ -146,12 +139,7 @@ export declare function pullCheckout(context: Context, clients: {
|
|
|
146
139
|
management: ManagementClient;
|
|
147
140
|
runtime: RuntimeApiClient;
|
|
148
141
|
agentSettings: AgentSettingsClient;
|
|
149
|
-
builder: BuilderApiClient;
|
|
150
142
|
}, options?: PullCheckoutOptions): Promise<PullCheckoutResult>;
|
|
151
|
-
/** `bundle/build/certification.yaml` as text — build-bundle-schema-design.md
|
|
152
|
-
* §10, the wire answer laid out in the schema's order. Epoch `taken_at`
|
|
153
|
-
* becomes the ISO stamp the schema shows. */
|
|
154
|
-
export declare function renderCertification(certificate: Certificate): string;
|
|
155
143
|
/** Both lanes against the baseline in one report: program paths bare (as
|
|
156
144
|
* ever), build paths under a `build/` prefix — same dialect as the push
|
|
157
145
|
* and pull dirty-guard messages. */
|
|
@@ -188,13 +176,6 @@ export interface PushCheckoutResult {
|
|
|
188
176
|
* (tau-airlines desk, ENGINE-REQUESTS-3, platform item 1).
|
|
189
177
|
*/
|
|
190
178
|
validationLane?: "runtime" | "builder";
|
|
191
|
-
/**
|
|
192
|
-
* The builder's audit of the proof material (`bundle/build/**`), the push's
|
|
193
|
-
* SECOND check: the engine says whether the program runs, the builder says
|
|
194
|
-
* whether the brief, needs, cases, scenarios and world are present, well
|
|
195
|
-
* formed and consistent. Every error here refused the push; warnings ride.
|
|
196
|
-
*/
|
|
197
|
-
bundle?: BundleAudit;
|
|
198
179
|
}
|
|
199
180
|
/**
|
|
200
181
|
* Publish the checkout, both lanes: a changed program becomes a new agent
|
|
@@ -208,12 +189,7 @@ export declare function pushBundle(context: Context, clients: {
|
|
|
208
189
|
management: ManagementClient;
|
|
209
190
|
runtime: RuntimeApiClient;
|
|
210
191
|
agentSettings: AgentSettingsClient;
|
|
211
|
-
/**
|
|
212
|
-
* The builder's audit of the proof material — a push's second check
|
|
213
|
-
* (build-bundle-validation-design.md §3), and the fallback gate when the
|
|
214
|
-
* runtime validate lane is dead. Optional in the type for the callers
|
|
215
|
-
* that never push; a push without it refuses.
|
|
216
|
-
*/
|
|
192
|
+
/** Optional: the fallback gate when the runtime validate lane is dead. */
|
|
217
193
|
builder?: BuilderApiClient;
|
|
218
194
|
}, options?: {
|
|
219
195
|
root?: string;
|
|
@@ -226,50 +202,29 @@ export declare function validateProgramBundle(runtime: RuntimeApiClient, files:
|
|
|
226
202
|
agentId?: string): Promise<ValidationResult>;
|
|
227
203
|
/**
|
|
228
204
|
* The checkout as builder-api's stateless gates see it: the program under
|
|
229
|
-
* `src/**`, and the
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* regression go red" needs the suite the question is
|
|
234
|
-
* (authoring-modes-design.md F4). Named files, not the whole area — the
|
|
235
|
-
* build tree also holds transcripts and binaries that a JSON payload
|
|
236
|
-
* business carrying. A legacy `bundle/src/scenarios.yaml` is NOT
|
|
237
|
-
* here — it rides as `src/scenarios.yaml` and the
|
|
238
|
-
* finding that teaches the move (headless-authoring-design.md).
|
|
205
|
+
* `src/**`, and the authored YAML the build tree holds — the scripted suite
|
|
206
|
+
* (`scenarios.yaml`), the case bank (`cases.yaml`), the needs and the world
|
|
207
|
+
* (`needs.yaml`, `world.yaml`) — under `build/**`. The records ride for the
|
|
208
|
+
* reader, not the gates: the advisor ships this identical tree, and advice
|
|
209
|
+
* on "why does this regression go red" needs the suite the question is
|
|
210
|
+
* about (authoring-modes-design.md F4). Named files, not the whole area — the
|
|
211
|
+
* build tree also holds transcripts and binaries that a JSON advice payload
|
|
212
|
+
* has no business carrying. A legacy `bundle/src/scenarios.yaml` is NOT
|
|
213
|
+
* lifted here — it rides as `src/scenarios.yaml` and the service refuses it
|
|
214
|
+
* with the finding that teaches the move (headless-authoring-design.md).
|
|
239
215
|
*/
|
|
240
216
|
export declare function readCheckoutTree(root: string): Promise<Record<string, string>>;
|
|
241
|
-
/** `ValidationResult` plus
|
|
242
|
-
*
|
|
243
|
-
* advisory censuses — the censuses never move `valid`. */
|
|
217
|
+
/** `ValidationResult` plus the two mandatory advisory censuses the builder
|
|
218
|
+
* gate returns alongside its verdict — neither moves `valid`. */
|
|
244
219
|
export interface BundleValidation extends ValidationResult {
|
|
245
|
-
/** No program error and no audit error of any layer — what a push says. */
|
|
246
|
-
pushable: boolean;
|
|
247
|
-
bundle: BundleAudit;
|
|
248
220
|
orphans: OrphanCensus;
|
|
249
221
|
eraCensus: EraCensus;
|
|
250
|
-
/** Only when asked with `fix`: the mechanical repairs builder-api planned
|
|
251
|
-
* over a copy of the tree (this checkout writes them), and the verdict
|
|
252
|
-
* after them. */
|
|
253
|
-
fixes?: BundleFix[];
|
|
254
|
-
fixed?: {
|
|
255
|
-
valid: boolean;
|
|
256
|
-
pushable: boolean;
|
|
257
|
-
bundle: BundleAudit;
|
|
258
|
-
};
|
|
259
222
|
}
|
|
260
223
|
/** Validation via builder-api's stateless gate. Unlike the push lane
|
|
261
224
|
* (`validateProgramBundle`, runtime-api, pinned engine), this is the
|
|
262
225
|
* builder's own opinion of the tree — structure, load, semantics, wiring,
|
|
263
226
|
* plus the orphan and era censuses. */
|
|
264
|
-
export declare function validateLocalBundle(context: Context, builder: BuilderApiClient, root?: string
|
|
265
|
-
fix?: boolean;
|
|
266
|
-
}): Promise<BundleValidation>;
|
|
267
|
-
/**
|
|
268
|
-
* Write builder-api's mechanical repairs onto the checkout: `src/**` paths
|
|
269
|
-
* land under the program root, `build/**` beside it, a null content removes
|
|
270
|
-
* the file. Returns the paths touched, in the plan's order.
|
|
271
|
-
*/
|
|
272
|
-
export declare function applyBundleFixes(fixes: BundleFix[], root: string): Promise<string[]>;
|
|
227
|
+
export declare function validateLocalBundle(context: Context, builder: BuilderApiClient, root?: string): Promise<BundleValidation>;
|
|
273
228
|
export declare function listVersions(context: Context, management: ManagementClient): Promise<{
|
|
274
229
|
results: AgentVersion[];
|
|
275
230
|
}>;
|