@aui.io/apollo 0.1.67 → 0.1.71
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 +12 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js +75 -8
- 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 +7 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/hierarchy.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/status.js +6 -15
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/status.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 +105 -2
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js +13 -2
- 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 +14 -2
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/build-area.js +19 -2
- 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 +10 -0
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/validate.js +26 -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 +12 -0
- 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 +7 -0
- package/node_modules/@aui.io/apollo-core/dist/src/errors/index.d.ts +31 -0
- package/node_modules/@aui.io/apollo-core/dist/src/errors/index.js +54 -0
- package/node_modules/@aui.io/apollo-core/dist/src/errors/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/index.d.ts +3 -3
- package/node_modules/@aui.io/apollo-core/dist/src/index.js +3 -3
- package/node_modules/@aui.io/apollo-core/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/availability.d.ts +25 -2
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/availability.js +67 -14
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/availability.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.d.ts +60 -15
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js +141 -18
- 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 +11 -3
- 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/doctor.js +22 -3
- package/node_modules/@aui.io/apollo-core/dist/src/services/doctor.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.d.ts +8 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.js +23 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +11 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/runtime-gate.d.ts +41 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/runtime-gate.js +42 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/runtime-gate.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +32 -4
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
|
@@ -19,7 +19,7 @@ export { assertValidProgram, mapRuntimeValidation, renderValidation, } from "./b
|
|
|
19
19
|
export { environmentDefinition, knownEnvironments, parseEnvironment, registerEnvironment, resolveContext, } from "./config/index.js";
|
|
20
20
|
export { clearMockDbKeys, keyPrefixes, loadMockDbKeys, saveMockDbKeys, } from "./config/mockdb-keys.js";
|
|
21
21
|
export { apolloDir, findBinding, patchBinding, readBinding, readCredentials, readUserConfig, updateEnvironment, updateProfile, writeBinding, writeCredentials, writeUserConfig, } from "./config/store.js";
|
|
22
|
-
export { ApiError, AuthError, CliError, ConfigError, ExitCode, RuntimeUnavailableError, ValidationError, runtimeUpgradeSuggestion, toCliError, } from "./errors/index.js";
|
|
22
|
+
export { ApiError, AuthError, CliError, ConfigError, ExitCode, RuntimeBehindError, RuntimeUnavailableError, ValidationError, runtimeRepinSuggestion, runtimeUpgradeSuggestion, toCliError, } from "./errors/index.js";
|
|
23
23
|
export { Output, errorEnvelope, successEnvelope, } from "./output/index.js";
|
|
24
24
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
25
25
|
export { DEFAULT_SKILL_TARGETS, RUNTIME_REFRESH_DIRECTIVE, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, refreshRuntimeAssets, remoteDiff, validateLocalBundle, validateProgramBundle, } from "./services/bundles.js";
|
|
@@ -28,7 +28,7 @@ export { BUILD_DEADLINE_MS, buildAgent, } from "./services/builds.js";
|
|
|
28
28
|
export { createClients } from "./services/clients.js";
|
|
29
29
|
export { listEnvironments, setEnvironment, } from "./services/env.service.js";
|
|
30
30
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, unlinkAgent, useOrganization, useProject, useVersion, } from "./services/hierarchy.js";
|
|
31
|
-
export { AVAILABILITY_CACHE_FILE, AVAILABILITY_CACHE_TTL_MS, assertRuntimeAvailable, availabilityCachePath, checkRuntimeAvailability, familyOf, probeRuntimeAvailability, verdictFromHealth, } from "./runtime-version/availability.js";
|
|
31
|
+
export { AVAILABILITY_CACHE_FILE, AVAILABILITY_CACHE_TTL_MS, assertRuntimeAvailable, availabilityCachePath, behindBuild, checkRuntimeAvailability, familyOf, probeRuntimeAvailability, verdictFromHealth, } from "./runtime-version/availability.js";
|
|
32
32
|
export { isLegacyRuntime, isRoutableRuntimeBuild, latestRuntimeVersion, matchRuntimeVersion, resolveRuntimeVersion, runtimeRouteResolver, runtimeVersionLabel, runtimeVersionOptions, RUNTIME_VERSION_HEADER, } from "./runtime-version/index.js";
|
|
33
33
|
export { createThread, getThread, listMessages, listThreads, parseVariables, sendMessage, trace, } from "./services/messaging.js";
|
|
34
34
|
export { cloneMockDb, createCollection, createEndpoint, DEFAULT_MOCKDB_TOKEN_ENV, deleteEndpoint, deleteMockDb, describeMockDb, executeEndpoint, exportMockDb, getEndpoint, getIdentities, inspectSession, listCollections, listEndpoints, MOCKDB_GUIDE, normalizeAddColumns, normalizeSampleData, normalizeSchema, parseJsonFlag, provisionMockDb, readSampleDataInput, resetSession, resolveMockDb, rotateMgmtKey, rotateRuntimeKey, seedRows, setIdentities, statusMockDb, storedKeys, updateCollection, updateEndpoint, wireMockDbConnection, writeMockDbGuide, } from "./services/mockdb.js";
|
|
@@ -38,7 +38,7 @@ export { addFiles, addUrls, createHub, deleteHub, getHubByName, hubRefCheck, hub
|
|
|
38
38
|
export { currentProfile, listProfiles, useProfile, } from "./services/profile.service.js";
|
|
39
39
|
export { captureFailed, filterCaptures, formatCurl, readCapturedRequests, } from "./services/requests.js";
|
|
40
40
|
export { runDoctor, } from "./services/doctor.js";
|
|
41
|
-
export { getStatus, } from "./services/status.service.js";
|
|
41
|
+
export { describeRuntimePin, getStatus, } from "./services/status.service.js";
|
|
42
42
|
export { resolvePublishedVersion, upgradeCli, } from "./services/upgrade.js";
|
|
43
43
|
export { PUBLIC_UPDATE_TARGET, UPDATE_CHECK_FILE, UPDATE_CHECK_TTL_MS, checkForUpdate, compareVersions, formatUpdateNotice, isUpdateEntryStale, readUpdateCache, readUpdateEntry, recordLatestVersion, refreshUpdateCache, setUpdateTarget, updateCheckDisabled, updateCheckPath, updateNoticeFrom, updateTarget, upgradeCommand, writeUpdateEntry, } from "./services/update-check.js";
|
|
44
44
|
export { enterCheckout, enterKnownCheckout, listKnownCheckouts, } from "./services/checkouts.service.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,mBAAmB,EACnB,YAAY,EACZ,eAAe,GAYhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,GASZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,GAMZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,SAAS,GAOV,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,GASjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,GAajB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,SAAS,GAMV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,UAAU,EACV,kBAAkB,GAEnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,mBAAmB,GAWpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,UAAU,EACV,OAAO,EACP,YAAY,EACZ,aAAa,GAGd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,GAEjB,MAAM,mBA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,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"}
|
|
@@ -46,11 +46,32 @@ export interface RuntimePinCheck {
|
|
|
46
46
|
label?: string;
|
|
47
47
|
/** The catalog's newest published build — the re-pin target. */
|
|
48
48
|
latest?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The pinned FAMILY's current build when the pin is an older (or
|
|
51
|
+
* otherwise different) patch of it — the `runtime use` target that ends
|
|
52
|
+
* the drift. Distinct from `latest`, which names the newest family.
|
|
53
|
+
* Absent when current, unpinned by build, or the catalog was not read.
|
|
54
|
+
*/
|
|
55
|
+
behind?: string;
|
|
56
|
+
/** The pin came from `--runtime-version` or `APOLLO_RUNTIME_VERSION`, not
|
|
57
|
+
* `.apollorc` — an explicit choice for this command, so `behind` is
|
|
58
|
+
* reported but never enforced. */
|
|
59
|
+
overridden?: boolean;
|
|
49
60
|
/** The catalog could not be read; see `withoutCatalog`. */
|
|
50
61
|
catalogError?: string;
|
|
51
62
|
/** The verdict came from the on-disk cache, not a fresh probe. */
|
|
52
63
|
cached?: boolean;
|
|
53
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* The drift rule, pure. The family's current build when `pin` is a full
|
|
67
|
+
* build of the same family as `option` and not the build the catalog
|
|
68
|
+
* routes to; undefined otherwise. Custom records match by exact name and
|
|
69
|
+
* have no family; a family pin ("0.9"), a label ("v2.1") or any other
|
|
70
|
+
* non-build spelling is resolved to the current build at call time by the
|
|
71
|
+
* route resolver, so it cannot be behind. `!==` rather than "older than":
|
|
72
|
+
* a pin AHEAD of a rolled-back family must equal the routed build too.
|
|
73
|
+
*/
|
|
74
|
+
export declare function behindBuild(option: RuntimeVersionOption, pin: string): string | undefined;
|
|
54
75
|
export interface AvailabilityOptions {
|
|
55
76
|
fetch?: typeof globalThis.fetch;
|
|
56
77
|
/** `false` bypasses the on-disk verdict cache (neither read nor written). */
|
|
@@ -73,8 +94,10 @@ export declare function checkRuntimeAvailability(context: Context, clients: {
|
|
|
73
94
|
/**
|
|
74
95
|
* The gate every engine-needing verb runs first. Throws
|
|
75
96
|
* `RuntimeUnavailableError` (code `RUNTIME_UNAVAILABLE`) when the pin is no
|
|
76
|
-
* longer served
|
|
77
|
-
*
|
|
97
|
+
* longer served, else `RuntimeBehindError` (code `RUNTIME_BEHIND`) when the
|
|
98
|
+
* `.apollorc` pin is an older patch of a served family; returns quietly
|
|
99
|
+
* when unpinned, when the pin is served and current, under a flag/env
|
|
100
|
+
* override, or when the catalog cannot be read.
|
|
78
101
|
*/
|
|
79
102
|
export declare function assertRuntimeAvailable(context: Context, clients: {
|
|
80
103
|
agentSettings: Pick<AgentSettingsClient, "listRuntimeVersions">;
|
|
@@ -23,14 +23,24 @@
|
|
|
23
23
|
*
|
|
24
24
|
* A catalog outage never fails a command (the existing rule for everything
|
|
25
25
|
* runtime-version): the gate lets the command through.
|
|
26
|
+
*
|
|
27
|
+
* A second, weaker verdict rides the same catalog read: is the pin BEHIND
|
|
28
|
+
* its family? The gateway routes by family, so a pin of 0.9.2 already runs
|
|
29
|
+
* on the 0.9 family's current build (say 0.9.7) — the engine is right and
|
|
30
|
+
* nothing local knows it. Behind is `pin !== record.latest_version` for a
|
|
31
|
+
* full build in the same family, never across families (0.9 → 0.10 is an
|
|
32
|
+
* upgrade, a deliberate move with a builder turn), never for a family pin,
|
|
33
|
+
* a label or a custom record (those already follow the catalog at call
|
|
34
|
+
* time), never under a flag/env override, and never on a catalog outage.
|
|
35
|
+
* Unavailable wins over behind: a retired family is reported as retired.
|
|
26
36
|
*/
|
|
27
37
|
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
28
38
|
import { homedir } from "node:os";
|
|
29
39
|
import { dirname, join } from "node:path";
|
|
30
40
|
import { Transport } from "../api/transport.js";
|
|
31
41
|
import { apolloDir } from "../config/store.js";
|
|
32
|
-
import { ApiError, RuntimeUnavailableError, } from "../errors/index.js";
|
|
33
|
-
import { familyOf, matchRuntimeVersion, resolveRuntimeVersion, RUNTIME_VERSION_HEADER, } from "./index.js";
|
|
42
|
+
import { ApiError, RuntimeBehindError, RuntimeUnavailableError, } from "../errors/index.js";
|
|
43
|
+
import { familyOf, isRoutableRuntimeBuild, matchRuntimeVersion, resolveRuntimeVersion, RUNTIME_VERSION_HEADER, } from "./index.js";
|
|
34
44
|
export { familyOf };
|
|
35
45
|
/** One try of the health probe. */
|
|
36
46
|
export const PROBE_TIMEOUT_MS = 5_000;
|
|
@@ -168,6 +178,27 @@ function fresh(entry, now) {
|
|
|
168
178
|
const at = Date.parse(entry.at);
|
|
169
179
|
return !Number.isNaN(at) && now - at < AVAILABILITY_CACHE_TTL_MS;
|
|
170
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* The drift rule, pure. The family's current build when `pin` is a full
|
|
183
|
+
* build of the same family as `option` and not the build the catalog
|
|
184
|
+
* routes to; undefined otherwise. Custom records match by exact name and
|
|
185
|
+
* have no family; a family pin ("0.9"), a label ("v2.1") or any other
|
|
186
|
+
* non-build spelling is resolved to the current build at call time by the
|
|
187
|
+
* route resolver, so it cannot be behind. `!==` rather than "older than":
|
|
188
|
+
* a pin AHEAD of a rolled-back family must equal the routed build too.
|
|
189
|
+
*/
|
|
190
|
+
export function behindBuild(option, pin) {
|
|
191
|
+
if (option.type !== "published")
|
|
192
|
+
return undefined;
|
|
193
|
+
const wanted = pin.trim();
|
|
194
|
+
if (!isRoutableRuntimeBuild(wanted))
|
|
195
|
+
return undefined;
|
|
196
|
+
const family = familyOf(wanted);
|
|
197
|
+
if (family === undefined || family !== familyOf(option.runtime_version)) {
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
return option.latest_version === wanted ? undefined : option.latest_version;
|
|
201
|
+
}
|
|
171
202
|
/**
|
|
172
203
|
* The full rule for the context's pin, as a report. `undefined` when the
|
|
173
204
|
* checkout is unpinned (the gateway default is always served).
|
|
@@ -201,11 +232,22 @@ export async function checkRuntimeAvailability(context, clients, options = {}) {
|
|
|
201
232
|
};
|
|
202
233
|
}
|
|
203
234
|
}
|
|
235
|
+
// Drift is a catalog fact, so it is only ever derived on the branch that
|
|
236
|
+
// read one — the `withoutCatalog: "probe"` option above synthesises a
|
|
237
|
+
// record from the pin itself and must never look behind. It sits on the
|
|
238
|
+
// summary so the cached-verdict return below carries it too.
|
|
239
|
+
const behind = resolved.error === undefined ? behindBuild(option, pin) : undefined;
|
|
204
240
|
const summary = {
|
|
205
241
|
version: pin,
|
|
206
242
|
available: false,
|
|
207
243
|
...(resolved.error === undefined ? { label: option.display_name } : {}),
|
|
208
244
|
...(resolved.version ? { latest: resolved.version } : {}),
|
|
245
|
+
...(behind === undefined ? {} : { behind }),
|
|
246
|
+
...(behind !== undefined &&
|
|
247
|
+
context.runtimeVersionSource !== undefined &&
|
|
248
|
+
context.runtimeVersionSource !== "binding"
|
|
249
|
+
? { overridden: true }
|
|
250
|
+
: {}),
|
|
209
251
|
...(resolved.error === undefined ? {} : { catalogError: resolved.error }),
|
|
210
252
|
};
|
|
211
253
|
const useCache = options.cache !== false;
|
|
@@ -237,24 +279,35 @@ export async function checkRuntimeAvailability(context, clients, options = {}) {
|
|
|
237
279
|
/**
|
|
238
280
|
* The gate every engine-needing verb runs first. Throws
|
|
239
281
|
* `RuntimeUnavailableError` (code `RUNTIME_UNAVAILABLE`) when the pin is no
|
|
240
|
-
* longer served
|
|
241
|
-
*
|
|
282
|
+
* longer served, else `RuntimeBehindError` (code `RUNTIME_BEHIND`) when the
|
|
283
|
+
* `.apollorc` pin is an older patch of a served family; returns quietly
|
|
284
|
+
* when unpinned, when the pin is served and current, under a flag/env
|
|
285
|
+
* override, or when the catalog cannot be read.
|
|
242
286
|
*/
|
|
243
287
|
export async function assertRuntimeAvailable(context, clients, options = {}) {
|
|
244
288
|
const check = await checkRuntimeAvailability(context, clients, {
|
|
245
289
|
...options,
|
|
246
290
|
withoutCatalog: "skip",
|
|
247
291
|
});
|
|
248
|
-
if (check === undefined
|
|
292
|
+
if (check === undefined)
|
|
249
293
|
return;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
294
|
+
if (!check.available) {
|
|
295
|
+
throw new RuntimeUnavailableError({
|
|
296
|
+
pinned: check.version,
|
|
297
|
+
reason: check.reason ?? "unreachable",
|
|
298
|
+
...(check.label !== undefined ? { label: check.label } : {}),
|
|
299
|
+
...(check.latest !== undefined ? { latest: check.latest } : {}),
|
|
300
|
+
...(check.engine !== undefined
|
|
301
|
+
? { detail: `The gateway is serving engine ${check.engine} for this pin.` }
|
|
302
|
+
: {}),
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
if (check.behind !== undefined && !check.overridden) {
|
|
306
|
+
throw new RuntimeBehindError({
|
|
307
|
+
pinned: check.version,
|
|
308
|
+
current: check.behind,
|
|
309
|
+
...(check.label !== undefined ? { label: check.label } : {}),
|
|
310
|
+
});
|
|
311
|
+
}
|
|
259
312
|
}
|
|
260
313
|
//# sourceMappingURL=availability.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"availability.js","sourceRoot":"","sources":["../../../src/runtime-version/availability.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"availability.js","sourceRoot":"","sources":["../../../src/runtime-version/availability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,W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AAC;AACH,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, EraCensus, OrphanCensus } from "../api/builder-api.js";
|
|
3
|
+
import type { BuilderApiClient, BundleAudit, BundleFix, Certificate, 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,6 +12,7 @@ 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;
|
|
15
16
|
/** What one pull moved in the build area, when the agent has a build bundle. */
|
|
16
17
|
export interface BuildAreaSync {
|
|
17
18
|
version: number;
|
|
@@ -111,6 +112,12 @@ export interface PullCheckoutResult {
|
|
|
111
112
|
removed: string[];
|
|
112
113
|
/** The build area sync, when the agent has a build bundle. */
|
|
113
114
|
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;
|
|
114
121
|
/** The engine build every fetch above was routed to, when pinned. */
|
|
115
122
|
runtimeVersion?: string;
|
|
116
123
|
skills?: string[];
|
|
@@ -139,7 +146,12 @@ export declare function pullCheckout(context: Context, clients: {
|
|
|
139
146
|
management: ManagementClient;
|
|
140
147
|
runtime: RuntimeApiClient;
|
|
141
148
|
agentSettings: AgentSettingsClient;
|
|
149
|
+
builder: BuilderApiClient;
|
|
142
150
|
}, 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;
|
|
143
155
|
/** Both lanes against the baseline in one report: program paths bare (as
|
|
144
156
|
* ever), build paths under a `build/` prefix — same dialect as the push
|
|
145
157
|
* and pull dirty-guard messages. */
|
|
@@ -176,6 +188,13 @@ export interface PushCheckoutResult {
|
|
|
176
188
|
* (tau-airlines desk, ENGINE-REQUESTS-3, platform item 1).
|
|
177
189
|
*/
|
|
178
190
|
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;
|
|
179
198
|
}
|
|
180
199
|
/**
|
|
181
200
|
* Publish the checkout, both lanes: a changed program becomes a new agent
|
|
@@ -189,7 +208,12 @@ export declare function pushBundle(context: Context, clients: {
|
|
|
189
208
|
management: ManagementClient;
|
|
190
209
|
runtime: RuntimeApiClient;
|
|
191
210
|
agentSettings: AgentSettingsClient;
|
|
192
|
-
/**
|
|
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
|
+
*/
|
|
193
217
|
builder?: BuilderApiClient;
|
|
194
218
|
}, options?: {
|
|
195
219
|
root?: string;
|
|
@@ -202,29 +226,50 @@ export declare function validateProgramBundle(runtime: RuntimeApiClient, files:
|
|
|
202
226
|
agentId?: string): Promise<ValidationResult>;
|
|
203
227
|
/**
|
|
204
228
|
* The checkout as builder-api's stateless gates see it: the program under
|
|
205
|
-
* `src/**`, and the
|
|
206
|
-
*
|
|
207
|
-
* (
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
* build tree also holds transcripts and binaries that a JSON
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
229
|
+
* `src/**`, and the build records under `build/**` — the brief, the needs,
|
|
230
|
+
* the cases, the scripted suite, the world and the decision log. They ride
|
|
231
|
+
* for the AUDIT (the builder's check of the proof material: presence, shape,
|
|
232
|
+
* every relation) and for the advisor, whose advice on "why does this
|
|
233
|
+
* regression go red" needs the suite the question is about
|
|
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 has no
|
|
236
|
+
* business carrying. A legacy `bundle/src/scenarios.yaml` is NOT lifted
|
|
237
|
+
* here — it rides as `src/scenarios.yaml` and the audit refuses it with the
|
|
238
|
+
* finding that teaches the move (headless-authoring-design.md).
|
|
215
239
|
*/
|
|
216
240
|
export declare function readCheckoutTree(root: string): Promise<Record<string, string>>;
|
|
217
|
-
/** `ValidationResult` plus the
|
|
218
|
-
*
|
|
241
|
+
/** `ValidationResult` plus what only the builder's gate returns: the
|
|
242
|
+
* build-bundle audit, the push verdict it decides, and the two mandatory
|
|
243
|
+
* advisory censuses — the censuses never move `valid`. */
|
|
219
244
|
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;
|
|
220
248
|
orphans: OrphanCensus;
|
|
221
249
|
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
|
+
};
|
|
222
259
|
}
|
|
223
260
|
/** Validation via builder-api's stateless gate. Unlike the push lane
|
|
224
261
|
* (`validateProgramBundle`, runtime-api, pinned engine), this is the
|
|
225
262
|
* builder's own opinion of the tree — structure, load, semantics, wiring,
|
|
226
263
|
* plus the orphan and era censuses. */
|
|
227
|
-
export declare function validateLocalBundle(context: Context, builder: BuilderApiClient, root?: string
|
|
264
|
+
export declare function validateLocalBundle(context: Context, builder: BuilderApiClient, root?: string, options?: {
|
|
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[]>;
|
|
228
273
|
export declare function listVersions(context: Context, management: ManagementClient): Promise<{
|
|
229
274
|
results: AgentVersion[];
|
|
230
275
|
}>;
|