@aui.io/apollo 0.1.58 → 0.1.65
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.js +236 -93
- 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/operate.js +4 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime-version.js +22 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime-version.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/status.js +19 -1
- 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/agent-settings.d.ts +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.d.ts +117 -41
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js +26 -25
- 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/api/runtime-api.d.ts +0 -18
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js +0 -8
- 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/config/types.d.ts +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/errors/index.d.ts +30 -0
- package/node_modules/@aui.io/apollo-core/dist/src/errors/index.js +47 -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 +4 -3
- package/node_modules/@aui.io/apollo-core/dist/src/index.js +3 -2
- package/node_modules/@aui.io/apollo-core/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/output/index.d.ts +4 -0
- package/node_modules/@aui.io/apollo-core/dist/src/output/index.js +8 -0
- package/node_modules/@aui.io/apollo-core/dist/src/output/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/availability.d.ts +81 -0
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/availability.js +260 -0
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/availability.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.d.ts +7 -0
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.js +2 -1
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.d.ts +5 -8
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.js +5 -7
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.d.ts +7 -11
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js +22 -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.d.ts +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/doctor.js +64 -2
- 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/runs.d.ts +84 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/runs.js +186 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/runs.js.map +1 -0
- 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 +15 -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.d.ts +10 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +42 -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/lib/commands.d.ts +3 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js +2 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
- package/node_modules/@aui.io/apollo-core/dist/src/services/evaluations.d.ts +0 -42
- package/node_modules/@aui.io/apollo-core/dist/src/services/evaluations.js +0 -106
- package/node_modules/@aui.io/apollo-core/dist/src/services/evaluations.js.map +0 -1
|
@@ -51,6 +51,53 @@ export class ValidationError extends CliError {
|
|
|
51
51
|
this.name = "ValidationError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* The checkout's pinned runtime is no longer served — its family was retired
|
|
56
|
+
* from the catalog, its deployment is gone, or the gateway now routes the pin
|
|
57
|
+
* to a different engine. Every engine-needing verb refuses on it; the fix is
|
|
58
|
+
* always the same three commands, so the suggestion spells them out.
|
|
59
|
+
*/
|
|
60
|
+
export class RuntimeUnavailableError extends CliError {
|
|
61
|
+
/** The pin as the checkout recorded it (e.g. "0.9.2"). */
|
|
62
|
+
pinned;
|
|
63
|
+
reason;
|
|
64
|
+
/** The catalog's newest published build — the re-pin target. */
|
|
65
|
+
latest;
|
|
66
|
+
constructor(options) {
|
|
67
|
+
const shown = options.label && options.label !== options.pinned
|
|
68
|
+
? `${options.pinned} (${options.label})`
|
|
69
|
+
: options.pinned;
|
|
70
|
+
const message = options.reason === "not-in-catalog"
|
|
71
|
+
? `This checkout is pinned to runtime ${shown}, which is no longer offered.`
|
|
72
|
+
: `This checkout is pinned to runtime ${shown}, which is no longer available.`;
|
|
73
|
+
super(message, {
|
|
74
|
+
code: "RUNTIME_UNAVAILABLE",
|
|
75
|
+
exitCode: ExitCode.runtime,
|
|
76
|
+
suggestion: runtimeUpgradeSuggestion(options.latest),
|
|
77
|
+
...(options.detail === undefined ? {} : { detail: options.detail }),
|
|
78
|
+
});
|
|
79
|
+
this.name = "RuntimeUnavailableError";
|
|
80
|
+
this.pinned = options.pinned;
|
|
81
|
+
this.reason = options.reason;
|
|
82
|
+
if (options.latest !== undefined)
|
|
83
|
+
this.latest = options.latest;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The three steps that move a checkout off a dead runtime, in order: re-pin
|
|
88
|
+
* (which refreshes the schemas/skills the new engine serves), checkpoint the
|
|
89
|
+
* current state, then let the builder upgrade the program under the new pin.
|
|
90
|
+
* `latest` is the catalog's newest published build; "latest" is the
|
|
91
|
+
* `apollo runtime use` alias when the catalog could not name one.
|
|
92
|
+
*/
|
|
93
|
+
export function runtimeUpgradeSuggestion(latest) {
|
|
94
|
+
const to = latest ?? "latest";
|
|
95
|
+
return [
|
|
96
|
+
`Re-pin and refresh the checkout: apollo runtime use ${to}`,
|
|
97
|
+
`Keep a copy of the current state: apollo push -m "Before upgrading to ${to}"`,
|
|
98
|
+
`Upgrade the program under it: apollo build "Upgrade this agent runtime version"`,
|
|
99
|
+
].join("\n");
|
|
100
|
+
}
|
|
54
101
|
export class ApiError extends CliError {
|
|
55
102
|
service;
|
|
56
103
|
status;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/errors/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,CAAC;CACR,CAAC;AAIX,MAAM,OAAO,QAAS,SAAQ,KAAK;IACxB,IAAI,CAAS;IACb,QAAQ,CAAgB;IACxB,UAAU,CAAU;IAC7B;;wEAEoE;IAC3D,MAAM,CAAW;IAE1B,YACE,OAAe,EACf,UAMI,EAAE;QAEN,KAAK,CAAC,OA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CAAS;IAEtB,YAAY,OAOX;QACC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;YACrB,IAAI,EAAE,OAAO,OAAO,CAAC,MAAM,EAAE;YAC7B,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;CACF;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,IAAI,KAAK,YAAY,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,IAAI,QAAQ,CAAC,+BAA+B,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -7,7 +7,7 @@ export { MOCKDB_SERVICE_NAME, MockDbClient, mockDbErrorCode, type MockDbAuth, ty
|
|
|
7
7
|
export { VaultClient, type VaultScope, type VaultScopeType, type VaultSecret, type VaultSecretCreate, type VaultSecretUpdate, } 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
|
|
10
|
+
export { BuilderApiClient, type AdvisorAsk, type AdvisorStarted, type AdvisorView, type BuilderFinding, type BuilderTree, type BuilderValidation, type BuildRequest, type BuildStarted, type BuildView, type EraCensus, type OrphanCensus, type ScenarioFailure, } from "./api/builder-api.js";
|
|
11
11
|
export { Transport, type FormBody, type FormFilePart, type RequestCapture, type TransportOptions, } from "./api/transport.js";
|
|
12
12
|
export { CaptureLog, captureLog, defaultCapturePath, type CaptureSink, } from "./api/capture.js";
|
|
13
13
|
export { pageLane, setPageLane, type PageLane } from "./api/lane.js";
|
|
@@ -20,15 +20,16 @@ export { environmentDefinition, knownEnvironments, parseEnvironment, registerEnv
|
|
|
20
20
|
export { clearMockDbKeys, keyPrefixes, loadMockDbKeys, saveMockDbKeys, type MockDbKeys, } from "./config/mockdb-keys.js";
|
|
21
21
|
export { apolloDir, findBinding, patchBinding, readBinding, readCredentials, readUserConfig, updateEnvironment, updateProfile, writeBinding, writeCredentials, writeUserConfig, type ConfigPaths, } from "./config/store.js";
|
|
22
22
|
export { type BaseUrls, type ConfigFlags, type Context, type Credential, type CredentialsFile, type Environment, type ProjectBinding, type UserConfig, type WorkspacePreferences, } from "./config/types.js";
|
|
23
|
-
export { ApiError, AuthError, CliError, ConfigError, ExitCode, ValidationError, toCliError, type ExitCodeValue, } from "./errors/index.js";
|
|
23
|
+
export { ApiError, AuthError, CliError, ConfigError, ExitCode, RuntimeUnavailableError, ValidationError, runtimeUpgradeSuggestion, toCliError, type ExitCodeValue, type RuntimeUnavailableReason, } from "./errors/index.js";
|
|
24
24
|
export { Output, errorEnvelope, successEnvelope, type ErrorEnvelope, type OutputOptions, } from "./output/index.js";
|
|
25
25
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
26
|
-
export { DEFAULT_SKILL_TARGETS, RUNTIME_REFRESH_DIRECTIVE, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, refreshRuntimeAssets, remoteDiff, validateLocalBundle, validateProgramBundle, type BuildAreaSync, type BundleValidation, type PullCheckoutOptions, type PullCheckoutResult, type PushCheckoutResult, type RuntimeAssetsOptions, type RuntimeAssetsResult,
|
|
26
|
+
export { DEFAULT_SKILL_TARGETS, RUNTIME_REFRESH_DIRECTIVE, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, refreshRuntimeAssets, remoteDiff, validateLocalBundle, validateProgramBundle, type BuildAreaSync, type BundleValidation, type PullCheckoutOptions, type PullCheckoutResult, type PushCheckoutResult, type RuntimeAssetsOptions, type RuntimeAssetsResult, } from "./services/bundles.js";
|
|
27
27
|
export { ADVISE_DEADLINE_MS, adviseLocalBundle, readAdvisorState, writeAdvisorState, type AdviceResult, type AdviseOptions, type AdvisorState, } from "./services/advisor.js";
|
|
28
28
|
export { BUILD_DEADLINE_MS, buildAgent, type BuildOptions, } from "./services/builds.js";
|
|
29
29
|
export { createClients, type Clients } from "./services/clients.js";
|
|
30
30
|
export { listEnvironments, setEnvironment, type EnvironmentResult, type EnvironmentSummary, } from "./services/env.service.js";
|
|
31
31
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, unlinkAgent, useOrganization, useProject, useVersion, } from "./services/hierarchy.js";
|
|
32
|
+
export { AVAILABILITY_CACHE_FILE, AVAILABILITY_CACHE_TTL_MS, assertRuntimeAvailable, availabilityCachePath, checkRuntimeAvailability, familyOf, probeRuntimeAvailability, verdictFromHealth, type AvailabilityOptions, type RuntimeAvailability, type RuntimeHealth, type RuntimePinCheck, } from "./runtime-version/availability.js";
|
|
32
33
|
export { isLegacyRuntime, latestRuntimeVersion, matchRuntimeVersion, resolveRuntimeVersion, runtimeVersionLabel, runtimeVersionOptions, RUNTIME_VERSION_HEADER, type ResolvedRuntimeVersion, type RuntimeVersionOption, } from "./runtime-version/index.js";
|
|
33
34
|
export { createThread, getThread, listMessages, listThreads, parseVariables, sendMessage, trace, } from "./services/messaging.js";
|
|
34
35
|
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, type CloneMockDbOptions, type MockDbProvisionResult, type MockDbResolved, type MockDbServiceOptions, type MockDbStatusReport, type MockDbStatusVerdict, type RuntimeKeyResync, type RuntimeKeySource, type WireResult, } from "./services/mockdb.js";
|
|
@@ -18,15 +18,16 @@ export { assertValidProgram, mapRuntimeValidation, renderValidation, } from "./b
|
|
|
18
18
|
export { environmentDefinition, knownEnvironments, parseEnvironment, registerEnvironment, resolveContext, } from "./config/index.js";
|
|
19
19
|
export { clearMockDbKeys, keyPrefixes, loadMockDbKeys, saveMockDbKeys, } from "./config/mockdb-keys.js";
|
|
20
20
|
export { apolloDir, findBinding, patchBinding, readBinding, readCredentials, readUserConfig, updateEnvironment, updateProfile, writeBinding, writeCredentials, writeUserConfig, } from "./config/store.js";
|
|
21
|
-
export { ApiError, AuthError, CliError, ConfigError, ExitCode, ValidationError, toCliError, } from "./errors/index.js";
|
|
21
|
+
export { ApiError, AuthError, CliError, ConfigError, ExitCode, RuntimeUnavailableError, ValidationError, runtimeUpgradeSuggestion, toCliError, } from "./errors/index.js";
|
|
22
22
|
export { Output, errorEnvelope, successEnvelope, } from "./output/index.js";
|
|
23
23
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
24
|
-
export { DEFAULT_SKILL_TARGETS, RUNTIME_REFRESH_DIRECTIVE, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, refreshRuntimeAssets, remoteDiff, validateLocalBundle, validateProgramBundle,
|
|
24
|
+
export { DEFAULT_SKILL_TARGETS, RUNTIME_REFRESH_DIRECTIVE, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, refreshRuntimeAssets, remoteDiff, validateLocalBundle, validateProgramBundle, } from "./services/bundles.js";
|
|
25
25
|
export { ADVISE_DEADLINE_MS, adviseLocalBundle, readAdvisorState, writeAdvisorState, } from "./services/advisor.js";
|
|
26
26
|
export { BUILD_DEADLINE_MS, buildAgent, } from "./services/builds.js";
|
|
27
27
|
export { createClients } from "./services/clients.js";
|
|
28
28
|
export { listEnvironments, setEnvironment, } from "./services/env.service.js";
|
|
29
29
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, unlinkAgent, useOrganization, useProject, useVersion, } from "./services/hierarchy.js";
|
|
30
|
+
export { AVAILABILITY_CACHE_FILE, AVAILABILITY_CACHE_TTL_MS, assertRuntimeAvailable, availabilityCachePath, checkRuntimeAvailability, familyOf, probeRuntimeAvailability, verdictFromHealth, } from "./runtime-version/availability.js";
|
|
30
31
|
export { isLegacyRuntime, latestRuntimeVersion, matchRuntimeVersion, resolveRuntimeVersion, runtimeVersionLabel, runtimeVersionOptions, RUNTIME_VERSION_HEADER, } from "./runtime-version/index.js";
|
|
31
32
|
export { createThread, getThread, listMessages, listThreads, parseVariables, sendMessage, trace, } from "./services/messaging.js";
|
|
32
33
|
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";
|
|
@@ -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,GAMZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,SAAS,GAOV,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,GASjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,
|
|
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,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,GAKV,MAAM,oBAAoB,CAAC;AAC5B,O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BAAgB,EAChB,YAAY,EACZ,aAAa,GAEd,MAAM,yBAAyB,CAAC"}
|
|
@@ -26,6 +26,10 @@ export declare class Output {
|
|
|
26
26
|
constructor(options: OutputOptions, stdout?: NodeJS.WritableStream, stderr?: NodeJS.WritableStream);
|
|
27
27
|
result(data: unknown, renderHuman: (value: unknown) => string): void;
|
|
28
28
|
error(error: CliError): void;
|
|
29
|
+
/** A non-fatal caution — the command went through, but something the user
|
|
30
|
+
* should know about did not hold. Stderr in every mode (stdout stays the
|
|
31
|
+
* result envelope), silenced only by `--quiet`. */
|
|
32
|
+
warn(message: string): void;
|
|
29
33
|
progress(message: string): void;
|
|
30
34
|
debug(message: string): void;
|
|
31
35
|
}
|
|
@@ -46,6 +46,14 @@ export class Output {
|
|
|
46
46
|
const target = this.options.json ? this.stdout : this.stderr;
|
|
47
47
|
target.write(`${value}\n`);
|
|
48
48
|
}
|
|
49
|
+
/** A non-fatal caution — the command went through, but something the user
|
|
50
|
+
* should know about did not hold. Stderr in every mode (stdout stays the
|
|
51
|
+
* result envelope), silenced only by `--quiet`. */
|
|
52
|
+
warn(message) {
|
|
53
|
+
if (!this.options.quiet) {
|
|
54
|
+
this.stderr.write(`${pc.yellow("Warning:")} ${message}\n`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
49
57
|
progress(message) {
|
|
50
58
|
const isTTY = "isTTY" in this.stderr && this.stderr.isTTY === true;
|
|
51
59
|
if (!this.options.quiet && !this.options.json && isTTY) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAqB5B,MAAM,UAAU,eAAe,CAAC,IAAa;IAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAe;IAC3C,OAAO;QACL,OAAO,EAAE,KAAK;QACd,KA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,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QAC7D,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED;;wDAEoD;IACpD,IAAI,CAAC,OAAe;QAClB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,OAAe;QACtB,MAAM,KAAK,GAAG,OAAO,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC;QACnE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,KAAK,EAAE,CAAC;YACvD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,KAAK,CAAC,OAAe;QACnB,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAChD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AgentSettingsClient } from "../api/agent-settings.js";
|
|
2
|
+
import type { Context } from "../config/types.js";
|
|
3
|
+
import { type RuntimeUnavailableReason } from "../errors/index.js";
|
|
4
|
+
import { familyOf, type RuntimeVersionOption } from "./index.js";
|
|
5
|
+
export { familyOf };
|
|
6
|
+
/** One try of the health probe. */
|
|
7
|
+
export declare const PROBE_TIMEOUT_MS = 5000;
|
|
8
|
+
export declare const PROBE_ATTEMPTS = 3;
|
|
9
|
+
/** Waits between tries — 1 s after the first failure, 2 s after the second. */
|
|
10
|
+
export declare const PROBE_BACKOFF_MS: readonly number[];
|
|
11
|
+
export declare const AVAILABILITY_CACHE_TTL_MS: number;
|
|
12
|
+
export declare const AVAILABILITY_CACHE_FILE = "runtime-availability.json";
|
|
13
|
+
export interface RuntimeAvailability {
|
|
14
|
+
available: boolean;
|
|
15
|
+
reason?: RuntimeUnavailableReason;
|
|
16
|
+
/** The engine the deployment reported, when it answered. */
|
|
17
|
+
engine?: string;
|
|
18
|
+
}
|
|
19
|
+
/** What `/health` says — only `engine` matters here. */
|
|
20
|
+
export interface RuntimeHealth {
|
|
21
|
+
status?: string;
|
|
22
|
+
build?: string;
|
|
23
|
+
engine?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The verdict for one health answer. Pure: status code + parsed body in,
|
|
27
|
+
* verdict out. Retryable failures (5xx, no answer) come back `unreachable` —
|
|
28
|
+
* the probe loop decides whether to try again.
|
|
29
|
+
*/
|
|
30
|
+
export declare function verdictFromHealth(option: RuntimeVersionOption, status: number, body: unknown): RuntimeAvailability;
|
|
31
|
+
/**
|
|
32
|
+
* Probe the deployment behind one catalog entry. Published entries go
|
|
33
|
+
* through the gateway with the routed build as the header; custom entries
|
|
34
|
+
* are probed at their own link. Unauthenticated: `/health` is public.
|
|
35
|
+
*/
|
|
36
|
+
export declare function probeRuntimeAvailability(context: Pick<Context, "baseUrls">, option: RuntimeVersionOption, fetchImpl?: typeof globalThis.fetch): Promise<RuntimeAvailability>;
|
|
37
|
+
export declare function availabilityCachePath(homeDir: string): string;
|
|
38
|
+
export interface RuntimePinCheck {
|
|
39
|
+
/** The pin as the context carries it (flag, env, or `.apollorc`). */
|
|
40
|
+
version: string;
|
|
41
|
+
available: boolean;
|
|
42
|
+
reason?: RuntimeUnavailableReason;
|
|
43
|
+
/** The engine the deployment reported, when it answered. */
|
|
44
|
+
engine?: string;
|
|
45
|
+
/** Catalog display name of the pinned family, when the catalog knows it. */
|
|
46
|
+
label?: string;
|
|
47
|
+
/** The catalog's newest published build — the re-pin target. */
|
|
48
|
+
latest?: string;
|
|
49
|
+
/** The catalog could not be read; see `withoutCatalog`. */
|
|
50
|
+
catalogError?: string;
|
|
51
|
+
/** The verdict came from the on-disk cache, not a fresh probe. */
|
|
52
|
+
cached?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface AvailabilityOptions {
|
|
55
|
+
fetch?: typeof globalThis.fetch;
|
|
56
|
+
/** `false` bypasses the on-disk verdict cache (neither read nor written). */
|
|
57
|
+
cache?: boolean;
|
|
58
|
+
homeDir?: string;
|
|
59
|
+
/**
|
|
60
|
+
* With the catalog unreachable: `skip` (default) trusts the pin — a
|
|
61
|
+
* catalog outage must never fail a command; `probe` still probes the pin
|
|
62
|
+
* as-is so a report can say what is served.
|
|
63
|
+
*/
|
|
64
|
+
withoutCatalog?: "skip" | "probe";
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The full rule for the context's pin, as a report. `undefined` when the
|
|
68
|
+
* checkout is unpinned (the gateway default is always served).
|
|
69
|
+
*/
|
|
70
|
+
export declare function checkRuntimeAvailability(context: Context, clients: {
|
|
71
|
+
agentSettings: Pick<AgentSettingsClient, "listRuntimeVersions">;
|
|
72
|
+
}, options?: AvailabilityOptions): Promise<RuntimePinCheck | undefined>;
|
|
73
|
+
/**
|
|
74
|
+
* The gate every engine-needing verb runs first. Throws
|
|
75
|
+
* `RuntimeUnavailableError` (code `RUNTIME_UNAVAILABLE`) when the pin is no
|
|
76
|
+
* longer served; returns quietly when unpinned, when the pin is served, or
|
|
77
|
+
* when the catalog cannot be read.
|
|
78
|
+
*/
|
|
79
|
+
export declare function assertRuntimeAvailable(context: Context, clients: {
|
|
80
|
+
agentSettings: Pick<AgentSettingsClient, "listRuntimeVersions">;
|
|
81
|
+
}, options?: AvailabilityOptions): Promise<void>;
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Is the runtime a checkout is pinned to still SERVED?
|
|
3
|
+
*
|
|
4
|
+
* A pin names a family whose deployment can be retired: the catalog record
|
|
5
|
+
* disappears, the gateway route is deleted, or the route falls through to
|
|
6
|
+
* the default deployment — which answers 200 with an engine that is NOT the
|
|
7
|
+
* one asked for. None of that surfaces on its own; chat, builds and runs
|
|
8
|
+
* simply fail or, worse, run on the wrong engine. So every engine-needing
|
|
9
|
+
* verb asks here first, and `status --check` / `doctor` report the answer.
|
|
10
|
+
*
|
|
11
|
+
* The rule (shared with the playground and admin apps — keep them aligned):
|
|
12
|
+
* 1. No pin → nothing to check; the gateway default is always served.
|
|
13
|
+
* 2. A pin the catalog cannot match → unavailable (`not-in-catalog`).
|
|
14
|
+
* 3. Otherwise probe `GET {runtime}/health` with the pin's routed build as
|
|
15
|
+
* the `runtime-version` header (a custom build: its own link, no header).
|
|
16
|
+
* 2xx whose `engine` shares the pin's major.minor → available; a
|
|
17
|
+
* different (or missing) engine → `routed-elsewhere`. 4xx means the
|
|
18
|
+
* deployment exists but refused → available (never block on auth).
|
|
19
|
+
* Connection failures, timeouts and 5xx retry 3× with 1 s / 2 s backoff;
|
|
20
|
+
* exhausted → `unreachable`.
|
|
21
|
+
* 4. `available` verdicts are cached on disk for five minutes; an
|
|
22
|
+
* unavailable verdict is never cached, so recovery is immediate.
|
|
23
|
+
*
|
|
24
|
+
* A catalog outage never fails a command (the existing rule for everything
|
|
25
|
+
* runtime-version): the gate lets the command through.
|
|
26
|
+
*/
|
|
27
|
+
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
28
|
+
import { homedir } from "node:os";
|
|
29
|
+
import { dirname, join } from "node:path";
|
|
30
|
+
import { Transport } from "../api/transport.js";
|
|
31
|
+
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";
|
|
34
|
+
export { familyOf };
|
|
35
|
+
/** One try of the health probe. */
|
|
36
|
+
export const PROBE_TIMEOUT_MS = 5_000;
|
|
37
|
+
export const PROBE_ATTEMPTS = 3;
|
|
38
|
+
/** Waits between tries — 1 s after the first failure, 2 s after the second. */
|
|
39
|
+
export const PROBE_BACKOFF_MS = [1_000, 2_000];
|
|
40
|
+
export const AVAILABILITY_CACHE_TTL_MS = 5 * 60_000;
|
|
41
|
+
export const AVAILABILITY_CACHE_FILE = "runtime-availability.json";
|
|
42
|
+
/**
|
|
43
|
+
* The verdict for one health answer. Pure: status code + parsed body in,
|
|
44
|
+
* verdict out. Retryable failures (5xx, no answer) come back `unreachable` —
|
|
45
|
+
* the probe loop decides whether to try again.
|
|
46
|
+
*/
|
|
47
|
+
export function verdictFromHealth(option, status, body) {
|
|
48
|
+
const engine = engineOf(body);
|
|
49
|
+
if (status >= 200 && status < 300) {
|
|
50
|
+
const wanted = familyOf(option.runtime_version);
|
|
51
|
+
// A custom build carries whatever version string its branch has — a
|
|
52
|
+
// 2xx from its own deployment is the whole answer. Same for a published
|
|
53
|
+
// record whose id is not semver: there is no family to compare.
|
|
54
|
+
if (option.type === "custom" || wanted === undefined) {
|
|
55
|
+
return { available: true, ...(engine ? { engine } : {}) };
|
|
56
|
+
}
|
|
57
|
+
if (engine !== undefined && familyOf(engine) === wanted) {
|
|
58
|
+
return { available: true, engine };
|
|
59
|
+
}
|
|
60
|
+
// The gateway answered from another deployment (or a deployment that
|
|
61
|
+
// does not report its engine — a real one always does).
|
|
62
|
+
return {
|
|
63
|
+
available: false,
|
|
64
|
+
reason: "routed-elsewhere",
|
|
65
|
+
...(engine ? { engine } : {}),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (status >= 400 && status < 500) {
|
|
69
|
+
// The deployment exists but refused or does not serve /health — not a
|
|
70
|
+
// reason to block. A custom link that 404s has nothing behind it.
|
|
71
|
+
if (option.type === "custom" && status === 404) {
|
|
72
|
+
return { available: false, reason: "unreachable" };
|
|
73
|
+
}
|
|
74
|
+
return { available: true };
|
|
75
|
+
}
|
|
76
|
+
return { available: false, reason: "unreachable" };
|
|
77
|
+
}
|
|
78
|
+
function engineOf(body) {
|
|
79
|
+
if (typeof body !== "object" || body === null)
|
|
80
|
+
return undefined;
|
|
81
|
+
const engine = body.engine;
|
|
82
|
+
return typeof engine === "string" && engine.trim() !== ""
|
|
83
|
+
? engine.trim()
|
|
84
|
+
: undefined;
|
|
85
|
+
}
|
|
86
|
+
/** 5xx and "no answer at all" are worth another try; anything else is final. */
|
|
87
|
+
function retryable(status) {
|
|
88
|
+
return status === 0 || status >= 500;
|
|
89
|
+
}
|
|
90
|
+
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
91
|
+
/**
|
|
92
|
+
* Probe the deployment behind one catalog entry. Published entries go
|
|
93
|
+
* through the gateway with the routed build as the header; custom entries
|
|
94
|
+
* are probed at their own link. Unauthenticated: `/health` is public.
|
|
95
|
+
*/
|
|
96
|
+
export async function probeRuntimeAvailability(context, option, fetchImpl) {
|
|
97
|
+
const custom = option.type === "custom" && option.custom_link;
|
|
98
|
+
const transport = new Transport({
|
|
99
|
+
service: "runtime-api",
|
|
100
|
+
baseUrl: custom ? option.custom_link : context.baseUrls.runtime,
|
|
101
|
+
timeoutMs: PROBE_TIMEOUT_MS,
|
|
102
|
+
...(custom
|
|
103
|
+
? {}
|
|
104
|
+
: { headers: { [RUNTIME_VERSION_HEADER]: option.latest_version } }),
|
|
105
|
+
...(fetchImpl ? { fetch: fetchImpl } : {}),
|
|
106
|
+
});
|
|
107
|
+
let verdict = { available: false, reason: "unreachable" };
|
|
108
|
+
for (let attempt = 0; attempt < PROBE_ATTEMPTS; attempt += 1) {
|
|
109
|
+
if (attempt > 0) {
|
|
110
|
+
await wait(PROBE_BACKOFF_MS[attempt - 1] ?? PROBE_BACKOFF_MS.at(-1) ?? 0);
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
const body = await transport.request("/health", {
|
|
114
|
+
authenticated: false,
|
|
115
|
+
});
|
|
116
|
+
return verdictFromHealth(option, 200, body);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
if (error instanceof ApiError) {
|
|
120
|
+
if (!retryable(error.status)) {
|
|
121
|
+
return verdictFromHealth(option, error.status, error.detail);
|
|
122
|
+
}
|
|
123
|
+
verdict = verdictFromHealth(option, error.status, error.detail);
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
// Timeout or connection failure — no status to judge; try again.
|
|
127
|
+
verdict = { available: false, reason: "unreachable" };
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return verdict;
|
|
131
|
+
}
|
|
132
|
+
export function availabilityCachePath(homeDir) {
|
|
133
|
+
return join(apolloDir(homeDir), AVAILABILITY_CACHE_FILE);
|
|
134
|
+
}
|
|
135
|
+
async function readCache(path) {
|
|
136
|
+
try {
|
|
137
|
+
const parsed = JSON.parse(await readFile(path, "utf8"));
|
|
138
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)
|
|
139
|
+
? parsed
|
|
140
|
+
: {};
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
// Missing or corrupt — a cache miss either way.
|
|
144
|
+
return {};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
async function writeCache(path, file) {
|
|
148
|
+
try {
|
|
149
|
+
await mkdir(dirname(path), { recursive: true, mode: 0o700 });
|
|
150
|
+
const temporary = `${path}.${process.pid}.tmp`;
|
|
151
|
+
await writeFile(temporary, `${JSON.stringify(file, null, 2)}\n`, {
|
|
152
|
+
mode: 0o644,
|
|
153
|
+
});
|
|
154
|
+
await rename(temporary, path);
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
// The cache is an optimisation; a read-only home must not fail a command.
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function cacheKey(option) {
|
|
161
|
+
return option.type === "custom" && option.custom_link
|
|
162
|
+
? option.custom_link
|
|
163
|
+
: option.latest_version;
|
|
164
|
+
}
|
|
165
|
+
function fresh(entry, now) {
|
|
166
|
+
if (entry?.verdict !== "available")
|
|
167
|
+
return false;
|
|
168
|
+
const at = Date.parse(entry.at);
|
|
169
|
+
return !Number.isNaN(at) && now - at < AVAILABILITY_CACHE_TTL_MS;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* The full rule for the context's pin, as a report. `undefined` when the
|
|
173
|
+
* checkout is unpinned (the gateway default is always served).
|
|
174
|
+
*/
|
|
175
|
+
export async function checkRuntimeAvailability(context, clients, options = {}) {
|
|
176
|
+
const pin = context.runtimeVersion;
|
|
177
|
+
if (!pin)
|
|
178
|
+
return undefined;
|
|
179
|
+
const resolved = await resolveRuntimeVersion(clients.agentSettings);
|
|
180
|
+
let option;
|
|
181
|
+
if (resolved.error !== undefined) {
|
|
182
|
+
if (options.withoutCatalog !== "probe") {
|
|
183
|
+
return { version: pin, available: true, catalogError: resolved.error };
|
|
184
|
+
}
|
|
185
|
+
// No catalog to translate the pin; probe it as the header value it is.
|
|
186
|
+
option = {
|
|
187
|
+
runtime_version: pin,
|
|
188
|
+
latest_version: pin,
|
|
189
|
+
display_name: pin,
|
|
190
|
+
type: familyOf(pin) ? "published" : "custom",
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
option = matchRuntimeVersion(resolved.options, pin);
|
|
195
|
+
if (!option) {
|
|
196
|
+
return {
|
|
197
|
+
version: pin,
|
|
198
|
+
available: false,
|
|
199
|
+
reason: "not-in-catalog",
|
|
200
|
+
...(resolved.version ? { latest: resolved.version } : {}),
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
const summary = {
|
|
205
|
+
version: pin,
|
|
206
|
+
available: false,
|
|
207
|
+
...(resolved.error === undefined ? { label: option.display_name } : {}),
|
|
208
|
+
...(resolved.version ? { latest: resolved.version } : {}),
|
|
209
|
+
...(resolved.error === undefined ? {} : { catalogError: resolved.error }),
|
|
210
|
+
};
|
|
211
|
+
const useCache = options.cache !== false;
|
|
212
|
+
const cachePath = availabilityCachePath(options.homeDir ?? homedir());
|
|
213
|
+
const key = cacheKey(option);
|
|
214
|
+
if (useCache) {
|
|
215
|
+
const entry = (await readCache(cachePath))[key];
|
|
216
|
+
if (fresh(entry, Date.now())) {
|
|
217
|
+
return {
|
|
218
|
+
...summary,
|
|
219
|
+
available: true,
|
|
220
|
+
cached: true,
|
|
221
|
+
...(entry?.engine ? { engine: entry.engine } : {}),
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
const verdict = await probeRuntimeAvailability(context, option, options.fetch);
|
|
226
|
+
if (verdict.available && useCache) {
|
|
227
|
+
const file = await readCache(cachePath);
|
|
228
|
+
file[key] = {
|
|
229
|
+
verdict: "available",
|
|
230
|
+
at: new Date().toISOString(),
|
|
231
|
+
...(verdict.engine ? { engine: verdict.engine } : {}),
|
|
232
|
+
};
|
|
233
|
+
await writeCache(cachePath, file);
|
|
234
|
+
}
|
|
235
|
+
return { ...summary, ...verdict };
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* The gate every engine-needing verb runs first. Throws
|
|
239
|
+
* `RuntimeUnavailableError` (code `RUNTIME_UNAVAILABLE`) when the pin is no
|
|
240
|
+
* longer served; returns quietly when unpinned, when the pin is served, or
|
|
241
|
+
* when the catalog cannot be read.
|
|
242
|
+
*/
|
|
243
|
+
export async function assertRuntimeAvailable(context, clients, options = {}) {
|
|
244
|
+
const check = await checkRuntimeAvailability(context, clients, {
|
|
245
|
+
...options,
|
|
246
|
+
withoutCatalog: "skip",
|
|
247
|
+
});
|
|
248
|
+
if (check === undefined || check.available)
|
|
249
|
+
return;
|
|
250
|
+
throw new RuntimeUnavailableError({
|
|
251
|
+
pinned: check.version,
|
|
252
|
+
reason: check.reason ?? "unreachable",
|
|
253
|
+
...(check.label !== undefined ? { label: check.label } : {}),
|
|
254
|
+
...(check.latest !== undefined ? { latest: check.latest } : {}),
|
|
255
|
+
...(check.engine !== undefined
|
|
256
|
+
? { detail: `The gateway is serving engine ${check.engine} for this pin.` }
|
|
257
|
+
: {}),
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=availability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.js","sourceRoot":"","sources":["../../../src/runtime-version/availability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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,WAAW,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EACL,QAAQ,EACR,uBAAuB,GAExB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,mCAAmC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AACtC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAChC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAClE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,GAAG,MAAM,CAAC;AACpD,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAC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,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS;YAC5B,CAAC,CAAC,EAAE,MAAM,EAAE,iCAAiC,KAAK,CAAC,MAAM,gBAAgB,EAAE;YAC3E,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -25,7 +25,14 @@ export interface RuntimeVersionOption {
|
|
|
25
25
|
latest_version: string;
|
|
26
26
|
display_name: string;
|
|
27
27
|
type: "published" | "custom";
|
|
28
|
+
/** A custom build's own deployment — probed directly, never via the gateway. */
|
|
29
|
+
custom_link?: string;
|
|
28
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* A semantic version's family — major.minor with the patch dropped
|
|
33
|
+
* ("0.2.5" → "0.2"). Undefined for non-semver values (custom runtime names).
|
|
34
|
+
*/
|
|
35
|
+
export declare function familyOf(value: string): string | undefined;
|
|
29
36
|
/**
|
|
30
37
|
* True when the record names the LEGACY (schema-1) engine — the 1.x family,
|
|
31
38
|
* labelled "v1.0". It only ever serves schema-1 agent versions, so a
|
|
@@ -4,7 +4,7 @@ export const RUNTIME_VERSION_HEADER = "runtime-version";
|
|
|
4
4
|
* A semantic version's family — major.minor with the patch dropped
|
|
5
5
|
* ("0.2.5" → "0.2"). Undefined for non-semver values (custom runtime names).
|
|
6
6
|
*/
|
|
7
|
-
function familyOf(value) {
|
|
7
|
+
export function familyOf(value) {
|
|
8
8
|
const match = /^(\d+)\.(\d+)(?:\.\S*)?$/.exec(value.trim());
|
|
9
9
|
return match ? `${match[1]}.${match[2]}` : undefined;
|
|
10
10
|
}
|
|
@@ -28,6 +28,7 @@ export function runtimeVersionOptions(records) {
|
|
|
28
28
|
latest_version: record.latest_version,
|
|
29
29
|
display_name: record.display_name,
|
|
30
30
|
type: record.type,
|
|
31
|
+
...(record.custom_link ? { custom_link: record.custom_link } : {}),
|
|
31
32
|
}));
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime-version/index.ts"],"names":[],"mappings":"AAuBA,gFAAgF;AAChF,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime-version/index.ts"],"names":[],"mappings":"AAuBA,gFAAgF;AAChF,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAYxD;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAa;IACpC,MAAM,KAAK,GAAG,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5D,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,MAA4B;IAC1D,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IAChD,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;IAChD,OAAO,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;AAC7D,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,qBAAqB,CACnC,OAA+B;IAE/B,OAAO,OAAO;SACX,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC;SACrC,GAAG,CAAC,CAAC,MAAM,E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