@aui.io/apollo 0.1.32 → 0.1.33
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 +177 -22
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/package.json +3 -3
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.d.ts +170 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js +52 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.d.ts +15 -6
- package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js +9 -7
- 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/index.js +5 -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 +17 -0
- package/node_modules/@aui.io/apollo-core/dist/src/index.d.ts +7 -4
- package/node_modules/@aui.io/apollo-core/dist/src/index.js +5 -2
- package/node_modules/@aui.io/apollo-core/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/advisor.d.ts +37 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/advisor.js +86 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/advisor.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.d.ts +37 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.js +52 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/builds.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.d.ts +35 -16
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js +81 -29
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.d.ts +3 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js +10 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.d.ts +11 -4
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.js +28 -10
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/skills/install.d.ts +24 -2
- package/node_modules/@aui.io/apollo-core/dist/src/skills/install.js +53 -4
- package/node_modules/@aui.io/apollo-core/dist/src/skills/install.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/author/data.d.ts +2 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/author/data.js +2 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +1 -1
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
|
@@ -59,6 +59,13 @@ export interface SkillFile {
|
|
|
59
59
|
}
|
|
60
60
|
export interface AgentsMd {
|
|
61
61
|
content: string;
|
|
62
|
+
/**
|
|
63
|
+
* Which page this is — echoed by engines that ship per-audience pages.
|
|
64
|
+
* Absent on older engines, which ignore the query and always serve the
|
|
65
|
+
* authoring page; a headless caller MUST check this before trusting the
|
|
66
|
+
* content.
|
|
67
|
+
*/
|
|
68
|
+
audience?: string;
|
|
62
69
|
}
|
|
63
70
|
/**
|
|
64
71
|
* A send is synchronous on the wire — the response IS the agent's turn, and
|
|
@@ -103,13 +110,15 @@ export declare class RuntimeApiClient {
|
|
|
103
110
|
listSkills(): Promise<SkillIndexItem[]>;
|
|
104
111
|
getSkill(skillId: string, file?: string): Promise<SkillFile>;
|
|
105
112
|
/**
|
|
106
|
-
* The checkout's
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* older than the endpoint
|
|
113
|
+
* The checkout's standing page — the engine's own lifecycle page by
|
|
114
|
+
* default (the same bytes the builder appends after its instructions), or
|
|
115
|
+
* the self-contained headless brief for `audience: "headless"`. Not a
|
|
116
|
+
* skill: it belongs at the checkout root, so it has its own endpoint
|
|
117
|
+
* rather than a slot in the skills index. Engines older than the endpoint
|
|
118
|
+
* answer 404; engines older than the headless page ignore the query — see
|
|
119
|
+
* `AgentsMd.audience`.
|
|
111
120
|
*/
|
|
112
|
-
getAgentsMd(): Promise<AgentsMd>;
|
|
121
|
+
getAgentsMd(audience?: "headless"): Promise<AgentsMd>;
|
|
113
122
|
getProgramSchemas(file?: string): Promise<Record<string, unknown>>;
|
|
114
123
|
validateProgram(bundle: Record<string, unknown>): Promise<{
|
|
115
124
|
valid: boolean;
|
|
@@ -81,14 +81,16 @@ export class RuntimeApiClient {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* The checkout's
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* older than the endpoint
|
|
84
|
+
* The checkout's standing page — the engine's own lifecycle page by
|
|
85
|
+
* default (the same bytes the builder appends after its instructions), or
|
|
86
|
+
* the self-contained headless brief for `audience: "headless"`. Not a
|
|
87
|
+
* skill: it belongs at the checkout root, so it has its own endpoint
|
|
88
|
+
* rather than a slot in the skills index. Engines older than the endpoint
|
|
89
|
+
* answer 404; engines older than the headless page ignore the query — see
|
|
90
|
+
* `AgentsMd.audience`.
|
|
89
91
|
*/
|
|
90
|
-
getAgentsMd() {
|
|
91
|
-
return this.http.request("/api/v1/agents-md");
|
|
92
|
+
getAgentsMd(audience) {
|
|
93
|
+
return this.http.request("/api/v1/agents-md", { query: { audience } });
|
|
92
94
|
}
|
|
93
95
|
getProgramSchemas(file) {
|
|
94
96
|
return this.http.request("/api/v1/programs/schema", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-api.js","sourceRoot":"","sources":["../../../src/api/runtime-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-api.js","sourceRoot":"","sources":["../../../src/api/runtime-api.ts"],"names":[],"mappings":"AAyEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AAEvC,MAAM,OAAO,gBAAgB;IACS;IAApC,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,MAAM;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IAEM,WAAW,CAChB,OAA2B,EAC3B,KAAyB;QAEzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE;YACjD,MAAM,EAAE,MAAM;YACd,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,eAAe;SAC3B,CAAC,CAAC;IACL,CAAC;IAEM,YAAY,CAAC,KAMnB;QACC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,WAAW,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE;gBACpE,KAAK,EAAE;oBACL,QAAQ,EAAE,KAAK,CAAC,OAAO;oBACvB,UAAU,EAAE,KAAK,CAAC,SAAS;oBAC3B,WAAW,EAAE,KAAK,CAAC,UAAU;iBAC9B;gBACD,WAAW,EAAE,KAAK,CAAC,MAAM;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAEM,SAAS,CAAC,QAAgB;QAC/B,OAAO,IAAI,CAAC,IAAI,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CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE;YACnD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,MAAM,EAAE;SACjB,CAAC,CAAC;IACL,CAAC;IAED;uBACmB;IACZ,YAAY,CAAC,MAA+B;QAWjD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE;YACjD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,MAAM,EAAE;SACjB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -14,6 +14,7 @@ const environmentUrls = {
|
|
|
14
14
|
kbm: "https://api-staging-v3.internal-aui.io/knowledge-base-manager",
|
|
15
15
|
agentSettings: "https://api-staging-v3.internal-aui.io/agent-settings",
|
|
16
16
|
network: "https://api-staging-v3.internal-aui.io/api/network",
|
|
17
|
+
builder: "https://api-staging-v3.internal-aui.io/builder-api",
|
|
17
18
|
},
|
|
18
19
|
production: {
|
|
19
20
|
identity: "https://api-v3.aui.io/api",
|
|
@@ -24,6 +25,7 @@ const environmentUrls = {
|
|
|
24
25
|
kbm: "https://api-v3.aui.io/knowledge-base-manager",
|
|
25
26
|
agentSettings: "https://api-v3.aui.io/agent-settings",
|
|
26
27
|
network: "https://api-v3.aui.io/api/network",
|
|
28
|
+
builder: "https://api-v3.aui.io/builder-api",
|
|
27
29
|
},
|
|
28
30
|
eu: {
|
|
29
31
|
identity: "https://api-eu-v3.aui.io/api",
|
|
@@ -34,6 +36,7 @@ const environmentUrls = {
|
|
|
34
36
|
kbm: "https://api-eu-v3.aui.io/knowledge-base-manager",
|
|
35
37
|
agentSettings: "https://api-eu-v3.aui.io/agent-settings",
|
|
36
38
|
network: "https://api-eu-v3.aui.io/api/network",
|
|
39
|
+
builder: "https://api-eu-v3.aui.io/builder-api",
|
|
37
40
|
},
|
|
38
41
|
};
|
|
39
42
|
export function parseEnvironment(value) {
|
|
@@ -87,6 +90,7 @@ export async function resolveContext(options = {}) {
|
|
|
87
90
|
kbm: stripSlash(env.APOLLO_KBM_URL ?? defaults.kbm),
|
|
88
91
|
agentSettings: stripSlash(env.APOLLO_AGENT_SETTINGS_URL ?? defaults.agentSettings),
|
|
89
92
|
network: stripSlash(env.APOLLO_NETWORK_URL ?? defaults.network),
|
|
93
|
+
builder: stripSlash(env.APOLLO_BUILDER_URL ?? defaults.builder),
|
|
90
94
|
}),
|
|
91
95
|
...(flags.org ?? env.APOLLO_ORG_ID ?? binding?.org_id ?? claims.organizationId
|
|
92
96
|
? {
|
|
@@ -111,6 +115,7 @@ export async function resolveContext(options = {}) {
|
|
|
111
115
|
...(binding?.version_tag === undefined
|
|
112
116
|
? {}
|
|
113
117
|
: { versionTag: binding.version_tag }),
|
|
118
|
+
...(binding?.workspace === "headless" ? { workspace: "headless" } : {}),
|
|
114
119
|
// The pin is per checkout; the flag and env var override it for one
|
|
115
120
|
// command without ever being written back to `.apollorc`.
|
|
116
121
|
...(runtimeVersion === undefined ? {} : { runtimeVersion }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EACL,cAAc,EACd,WAAW,EACX,eAAe,EACf,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,YAAY,GAKb,MAAM,YAAY,CAAC;AAEpB,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,MAAM,eAAe,GAAkC;IACrD,OAAO,EAAE;QACP,QAAQ,EAAE,4CAA4C;QACtD,UAAU,EAAE,mDAAmD;QAC/D,OAAO,EAAE,gDAAgD;QACzD,MAAM,EAAE,oDAAoD;QAC5D,KAAK,EAAE,0DAA0D;QACjE,GAAG,EAAE,+DAA+D;QACpE,aAAa,EAAE,uDAA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;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CACvB,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CACxB,CAAC;QAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC;QAC3C,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC;QACxD,OAAO;YACL,GAAG,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjD,GAAG,CAAC,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,GAAG,CAAC,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAaD,OAAO,EACL,SAAS,EACT,cAAc,EACd,WAAW,EACX,YAAY,EACZ,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
|
@@ -13,7 +13,16 @@ export interface BaseUrls {
|
|
|
13
13
|
agentSettings: string;
|
|
14
14
|
/** network service — the network a new agent is scoped to (`agent create`). */
|
|
15
15
|
network: string;
|
|
16
|
+
/** builder-api — the headless authoring verbs (`validate`, `certify`). */
|
|
17
|
+
builder: string;
|
|
16
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* A checkout's skill profile. `authoring` (the default, and what an absent
|
|
21
|
+
* key means) installs the full skill packs; `headless` installs NONE — the
|
|
22
|
+
* checkout's whole brief is its `AGENTS.md`, and pulls delete any managed
|
|
23
|
+
* packs a mode switch left behind.
|
|
24
|
+
*/
|
|
25
|
+
export type WorkspaceMode = "authoring" | "headless";
|
|
17
26
|
export interface ProjectBinding {
|
|
18
27
|
config_version: 1;
|
|
19
28
|
org_id?: string;
|
|
@@ -27,6 +36,8 @@ export interface ProjectBinding {
|
|
|
27
36
|
* which is how every checkout behaved before pinning existed.
|
|
28
37
|
*/
|
|
29
38
|
runtime_version?: string;
|
|
39
|
+
/** Only ever written as `headless`; absent means authoring. */
|
|
40
|
+
workspace?: WorkspaceMode;
|
|
30
41
|
}
|
|
31
42
|
export interface UserConfig {
|
|
32
43
|
profile?: string;
|
|
@@ -81,6 +92,12 @@ export interface Context {
|
|
|
81
92
|
readonly bindingPath?: string;
|
|
82
93
|
/** The agent checkout containing the cwd (directory of `.apollorc`). */
|
|
83
94
|
readonly agentRoot?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The checkout's skill profile, from `.apollorc`. Only `headless` is ever
|
|
97
|
+
* carried — an absent key, an explicit `authoring`, or an unknown value all
|
|
98
|
+
* mean the default profile.
|
|
99
|
+
*/
|
|
100
|
+
readonly workspace?: "headless";
|
|
84
101
|
}
|
|
85
102
|
export interface ConfigFlags {
|
|
86
103
|
env?: string;
|
|
@@ -7,6 +7,7 @@ export { MockDbClient, type MockDbAuth, type MockDbClientOptions, type MockDbMgm
|
|
|
7
7
|
export { VaultClient, type VaultScope, type VaultSecret, type VaultSecretCreate, } from "./api/vault.js";
|
|
8
8
|
export { KbmClient, type BulkFilesResponse, type BulkResourceResult, type BulkWebsitesResponse, type IndexingJob, type KnowledgeBase, type UploadFilePart, } from "./api/kbm.js";
|
|
9
9
|
export { RuntimeApiClient, type AgentOverride, type Message, type RuntimeTrace, type SendMessageRequest, type SendMessageResponse, type SkillFile, type SkillIndexItem, type Thread, } from "./api/runtime-api.js";
|
|
10
|
+
export { BuilderApiClient, type AdvisorAsk, type AdvisorStarted, type AdvisorView, type BuilderCertification, type BuilderFinding, type BuilderTree, type BuilderValidation, type BuildRequest, type BuildStarted, type BuildView, type EraCensus, type OrphanCensus, type ScenarioFailure, } from "./api/builder-api.js";
|
|
10
11
|
export { Transport, type FormBody, type FormFilePart, type RequestCapture, type TransportOptions, } from "./api/transport.js";
|
|
11
12
|
export { CaptureLog, captureLog, defaultCapturePath, type CaptureSink, } from "./api/capture.js";
|
|
12
13
|
export { AgentSettingsClient, type AgentBlobStats, type AgentRecord, type AgentRecordKind, type AgentRecordScope, type AgentVersionRecord, type RuntimeVersionRecord, type BuildBundle, type BuildBundleFile, type BuildBundlePullResponse, type BuildBundlePushResponse, type BundleUploadFile, type EvaluationScorePush, type EvaluationScoreRead, type Scenario, type ScenarioResult, type ScenarioResultStatus, type ScoreReportBlocks, } from "./api/agent-settings.js";
|
|
@@ -18,11 +19,13 @@ export { assertValidProgram, mapRuntimeValidation, type RuntimeValidateResponse,
|
|
|
18
19
|
export { parseEnvironment, resolveContext, type ResolveConfigOptions, } from "./config/index.js";
|
|
19
20
|
export { clearMockDbKeys, keyPrefixes, loadMockDbKeys, saveMockDbKeys, type MockDbKeys, } from "./config/mockdb-keys.js";
|
|
20
21
|
export { apolloDir, findBinding, patchBinding, readBinding, readCredentials, readUserConfig, updateEnvironment, updateProfile, writeBinding, writeCredentials, writeUserConfig, type ConfigPaths, } from "./config/store.js";
|
|
21
|
-
export { environments, type BaseUrls, type ConfigFlags, type Context, type Credential, type CredentialsFile, type Environment, type ProjectBinding, type UserConfig, type WorkspacePreferences, } from "./config/types.js";
|
|
22
|
+
export { environments, type BaseUrls, type ConfigFlags, type Context, type Credential, type CredentialsFile, type Environment, type ProjectBinding, type UserConfig, type WorkspaceMode, type WorkspacePreferences, } from "./config/types.js";
|
|
22
23
|
export { ApiError, AuthError, CliError, ConfigError, ExitCode, ValidationError, toCliError, type ExitCodeValue, } from "./errors/index.js";
|
|
23
24
|
export { Output, errorEnvelope, successEnvelope, type ErrorEnvelope, type OutputOptions, } from "./output/index.js";
|
|
24
25
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
25
|
-
export { DEFAULT_SKILL_TARGETS, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, remoteDiff, validateLocalBundle, validateProgramBundle, type PullCheckoutOptions, type PullCheckoutResult, certifyLocalBundle, needsLocalBundle, } from "./services/bundles.js";
|
|
26
|
+
export { DEFAULT_SKILL_TARGETS, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, remoteDiff, validateLocalBundle, validateProgramBundle, type BundleValidation, type PullCheckoutOptions, type PullCheckoutResult, certifyLocalBundle, needsLocalBundle, } from "./services/bundles.js";
|
|
27
|
+
export { ADVISE_DEADLINE_MS, adviseLocalBundle, readAdvisorState, writeAdvisorState, type AdviceResult, type AdviseOptions, type AdvisorState, } from "./services/advisor.js";
|
|
28
|
+
export { BUILD_DEADLINE_MS, buildAgent, type BuildOptions, } from "./services/builds.js";
|
|
26
29
|
export { createClients, type Clients } from "./services/clients.js";
|
|
27
30
|
export { listEnvironments, setEnvironment, type EnvironmentResult, type EnvironmentSummary, } from "./services/env.service.js";
|
|
28
31
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, TEMPLATE_AGENT_ID, unlinkAgent, useOrganization, useProject, useVersion, type AgentCreateClients, } from "./services/hierarchy.js";
|
|
@@ -38,7 +41,7 @@ export { runDoctor, type DoctorCheck, type DoctorOptions, type DoctorReport, typ
|
|
|
38
41
|
export { getStatus, type ServiceCheck, type StatusResult, } from "./services/status.service.js";
|
|
39
42
|
export { resolvePublishedVersion, upgradeCli, type NpmRunner, type UpgradeOptions, type UpgradeResult, } from "./services/upgrade.js";
|
|
40
43
|
export { enterCheckout, enterKnownCheckout, listKnownCheckouts, type EnteredCheckout, } from "./services/checkouts.service.js";
|
|
41
|
-
export { installSkills, type SkillTarget } from "./skills/install.js";
|
|
42
|
-
export { installAgentsPage, type AgentsPageFacts, } from "./skills/agents-page.js";
|
|
44
|
+
export { installSkills, removeManagedSkills, type SkillTarget, } from "./skills/install.js";
|
|
45
|
+
export { installAgentsPage, type AgentsPageAudience, type AgentsPageFacts, } from "./skills/agents-page.js";
|
|
43
46
|
export { checkoutSchemasDir, installSchemas } from "./schemas/install.js";
|
|
44
47
|
export { checkoutAlive, defaultCheckoutDir, forgetCheckout, lastUsedCheckout, listCheckouts, readCheckoutRegistry, registerCheckout, registryFile, touchCheckout, type CheckoutEntry, } from "./checkouts/registry.js";
|
|
@@ -6,6 +6,7 @@ export { MockDbClient, } from "./api/mock-db.js";
|
|
|
6
6
|
export { VaultClient, } from "./api/vault.js";
|
|
7
7
|
export { KbmClient, } from "./api/kbm.js";
|
|
8
8
|
export { RuntimeApiClient, } from "./api/runtime-api.js";
|
|
9
|
+
export { BuilderApiClient, } from "./api/builder-api.js";
|
|
9
10
|
export { Transport, } from "./api/transport.js";
|
|
10
11
|
export { CaptureLog, captureLog, defaultCapturePath, } from "./api/capture.js";
|
|
11
12
|
export { AgentSettingsClient, } from "./api/agent-settings.js";
|
|
@@ -21,7 +22,9 @@ export { environments, } from "./config/types.js";
|
|
|
21
22
|
export { ApiError, AuthError, CliError, ConfigError, ExitCode, ValidationError, toCliError, } from "./errors/index.js";
|
|
22
23
|
export { Output, errorEnvelope, successEnvelope, } from "./output/index.js";
|
|
23
24
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
24
|
-
export { DEFAULT_SKILL_TARGETS, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, remoteDiff, validateLocalBundle, validateProgramBundle, certifyLocalBundle, needsLocalBundle, } from "./services/bundles.js";
|
|
25
|
+
export { DEFAULT_SKILL_TARGETS, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, remoteDiff, validateLocalBundle, validateProgramBundle, certifyLocalBundle, needsLocalBundle, } from "./services/bundles.js";
|
|
26
|
+
export { ADVISE_DEADLINE_MS, adviseLocalBundle, readAdvisorState, writeAdvisorState, } from "./services/advisor.js";
|
|
27
|
+
export { BUILD_DEADLINE_MS, buildAgent, } from "./services/builds.js";
|
|
25
28
|
export { createClients } from "./services/clients.js";
|
|
26
29
|
export { listEnvironments, setEnvironment, } from "./services/env.service.js";
|
|
27
30
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, TEMPLATE_AGENT_ID, unlinkAgent, useOrganization, useProject, useVersion, } from "./services/hierarchy.js";
|
|
@@ -37,7 +40,7 @@ export { runDoctor, } from "./services/doctor.js";
|
|
|
37
40
|
export { getStatus, } from "./services/status.service.js";
|
|
38
41
|
export { resolvePublishedVersion, upgradeCli, } from "./services/upgrade.js";
|
|
39
42
|
export { enterCheckout, enterKnownCheckout, listKnownCheckouts, } from "./services/checkouts.service.js";
|
|
40
|
-
export { installSkills } from "./skills/install.js";
|
|
43
|
+
export { installSkills, removeManagedSkills, } from "./skills/install.js";
|
|
41
44
|
export { installAgentsPage, } from "./skills/agents-page.js";
|
|
42
45
|
export { checkoutSchemasDir, installSchemas } from "./schemas/install.js";
|
|
43
46
|
export { checkoutAlive, defaultCheckoutDir, forgetCheckout, lastUsedCheckout, listCheckouts, readCheckoutRegistry, registerCheckout, registryFile, touchCheckout, } from "./checkouts/registry.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EACL,cAAc,EACd,YAAY,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAQhB,MAAM,qB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AAC9B,OAAO,EACL,SAAS,GAGV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,uBAAuB,EACvB,UAAU,GAIX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,mBAAmB,GAEpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,GAGlB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,aAAa,GAEd,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AdvisorView, BuilderApiClient } from "../api/builder-api.js";
|
|
2
|
+
import type { Context } from "../config/index.js";
|
|
3
|
+
/** An advisor turn is a model turn over the whole tree — minutes, not
|
|
4
|
+
* seconds. The poll loop's own deadline; each poll request stays cheap. */
|
|
5
|
+
export declare const ADVISE_DEADLINE_MS = 900000;
|
|
6
|
+
export interface AdvisorState {
|
|
7
|
+
advisor_session_id: string;
|
|
8
|
+
}
|
|
9
|
+
/** The saved thread handle, or nothing — a missing or corrupt file simply
|
|
10
|
+
* means the next question opens a fresh thread. */
|
|
11
|
+
export declare function readAdvisorState(root: string): Promise<AdvisorState | undefined>;
|
|
12
|
+
export declare function writeAdvisorState(root: string, state: AdvisorState): Promise<void>;
|
|
13
|
+
export interface AdviseOptions {
|
|
14
|
+
/** Checkout root (defaults to the bound checkout). */
|
|
15
|
+
root?: string;
|
|
16
|
+
/** Drop the saved thread and open a new one. */
|
|
17
|
+
fresh?: boolean;
|
|
18
|
+
model?: string;
|
|
19
|
+
maxUsd?: number;
|
|
20
|
+
pollIntervalMs?: number;
|
|
21
|
+
deadlineMs?: number;
|
|
22
|
+
/** Injectable for tests — real callers get a plain setTimeout sleep. */
|
|
23
|
+
sleep?: (ms: number) => Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export interface AdviceResult extends AdvisorView {
|
|
26
|
+
/** Whether this question continued the saved thread or opened a new one. */
|
|
27
|
+
thread: "new" | "continued";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Ask the advisor about this checkout and wait for the answer. The tree
|
|
31
|
+
* rides every call — follow-ups included — so the advisor always reads the
|
|
32
|
+
* caller's CURRENT files; the saved thread id only buys retained context.
|
|
33
|
+
* A saved thread the server no longer knows (purged, expired) falls back to
|
|
34
|
+
* a fresh one transparently: the id came from our own state file, so there
|
|
35
|
+
* is no typo to protect and nothing better to do than start over.
|
|
36
|
+
*/
|
|
37
|
+
export declare function adviseLocalBundle(context: Context, builder: BuilderApiClient, instruction: string, options?: AdviseOptions): Promise<AdviceResult>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { ApiError, CliError } from "../errors/index.js";
|
|
4
|
+
import { agentRoot, readCheckoutTree } from "./bundles.js";
|
|
5
|
+
/**
|
|
6
|
+
* The advice lane's console half (docs/headless-authoring-design.md §4.4):
|
|
7
|
+
* ship the checkout's current tree with a question, poll one advisor turn to
|
|
8
|
+
* its answer. Continuity is a LOCAL fact — the thread handle lives in the
|
|
9
|
+
* checkout's `.apollo/advisor.json`, never on the server's say-so — so two
|
|
10
|
+
* checkouts of one agent hold two threads, and deleting a checkout forgets
|
|
11
|
+
* its thread with it.
|
|
12
|
+
*/
|
|
13
|
+
/** Builder-api's terminal turn statuses (`domain/lifecycle.TERMINAL`). An
|
|
14
|
+
* advisor turn settles as `answered`; the rest are failure stories. */
|
|
15
|
+
const TERMINAL = new Set(["completed", "answered", "rejected", "failed", "exhausted"]);
|
|
16
|
+
/** An advisor turn is a model turn over the whole tree — minutes, not
|
|
17
|
+
* seconds. The poll loop's own deadline; each poll request stays cheap. */
|
|
18
|
+
export const ADVISE_DEADLINE_MS = 900_000;
|
|
19
|
+
const ADVISE_POLL_MS = 2_500;
|
|
20
|
+
function advisorStateFile(root) {
|
|
21
|
+
return path.join(root, ".apollo", "advisor.json");
|
|
22
|
+
}
|
|
23
|
+
/** The saved thread handle, or nothing — a missing or corrupt file simply
|
|
24
|
+
* means the next question opens a fresh thread. */
|
|
25
|
+
export async function readAdvisorState(root) {
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(await readFile(advisorStateFile(root), "utf8"));
|
|
28
|
+
return typeof parsed.advisor_session_id === "string"
|
|
29
|
+
? { advisor_session_id: parsed.advisor_session_id }
|
|
30
|
+
: undefined;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export async function writeAdvisorState(root, state) {
|
|
37
|
+
const file = advisorStateFile(root);
|
|
38
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
39
|
+
await writeFile(file, `${JSON.stringify(state, null, 2)}\n`, "utf8");
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Ask the advisor about this checkout and wait for the answer. The tree
|
|
43
|
+
* rides every call — follow-ups included — so the advisor always reads the
|
|
44
|
+
* caller's CURRENT files; the saved thread id only buys retained context.
|
|
45
|
+
* A saved thread the server no longer knows (purged, expired) falls back to
|
|
46
|
+
* a fresh one transparently: the id came from our own state file, so there
|
|
47
|
+
* is no typo to protect and nothing better to do than start over.
|
|
48
|
+
*/
|
|
49
|
+
export async function adviseLocalBundle(context, builder, instruction, options = {}) {
|
|
50
|
+
const root = options.root ?? agentRoot(context);
|
|
51
|
+
const files = await readCheckoutTree(path.join(root, "bundle", "src"));
|
|
52
|
+
const saved = options.fresh === true ? undefined : await readAdvisorState(root);
|
|
53
|
+
const ask = {
|
|
54
|
+
instruction,
|
|
55
|
+
files,
|
|
56
|
+
...(options.model ? { model: options.model } : {}),
|
|
57
|
+
...(options.maxUsd !== undefined ? { max_usd: options.maxUsd } : {}),
|
|
58
|
+
};
|
|
59
|
+
let thread = saved ? "continued" : "new";
|
|
60
|
+
let started;
|
|
61
|
+
try {
|
|
62
|
+
started = await builder.advise(saved ? { ...ask, advisor_session_id: saved.advisor_session_id } : ask);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
if (!saved || !(error instanceof ApiError) || error.status !== 404)
|
|
66
|
+
throw error;
|
|
67
|
+
thread = "new";
|
|
68
|
+
started = await builder.advise(ask);
|
|
69
|
+
}
|
|
70
|
+
await writeAdvisorState(root, { advisor_session_id: started.advisor_session_id });
|
|
71
|
+
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
72
|
+
const interval = options.pollIntervalMs ?? ADVISE_POLL_MS;
|
|
73
|
+
const deadline = Date.now() + (options.deadlineMs ?? ADVISE_DEADLINE_MS);
|
|
74
|
+
for (;;) {
|
|
75
|
+
const view = await builder.adviceView(started.turn_id);
|
|
76
|
+
if (TERMINAL.has(view.status))
|
|
77
|
+
return { ...view, thread };
|
|
78
|
+
if (Date.now() >= deadline) {
|
|
79
|
+
// The turn keeps running server-side; the state file already holds the
|
|
80
|
+
// thread, so the next question waits behind it (409) until it settles.
|
|
81
|
+
throw new CliError(`The advisor is still working (turn ${started.turn_id}).`, { suggestion: "Ask again in a moment — the same thread resumes." });
|
|
82
|
+
}
|
|
83
|
+
await sleep(interval);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=advisor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advisor.js","sourceRoot":"","sources":["../../../src/services/advisor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW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js";
|
|
2
|
+
import type { Context } from "../config/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* The shipping lane's console half (docs/headless-authoring-design.md §4.5):
|
|
5
|
+
* one instruction against the checkout's PUSHED agent — no files travel, the
|
|
6
|
+
* service pulls the bundle itself — then poll the whole story (turn, certify,
|
|
7
|
+
* optional evaluation, push, optional publish) to its terminal verdict.
|
|
8
|
+
*/
|
|
9
|
+
/** A build turn edits, validates and repairs; certify replays the suite; an
|
|
10
|
+
* evaluation runs real conversations. Hours-scale, so the poll loop's own
|
|
11
|
+
* deadline is generous — each poll request stays cheap. */
|
|
12
|
+
export declare const BUILD_DEADLINE_MS: number;
|
|
13
|
+
export interface BuildOptions {
|
|
14
|
+
/** The base to build from — a pushed version's tag (defaults to the pin). */
|
|
15
|
+
versionTag?: string;
|
|
16
|
+
/** The push message. */
|
|
17
|
+
message?: string;
|
|
18
|
+
model?: string;
|
|
19
|
+
maxUsd?: number;
|
|
20
|
+
/** Run the evaluation suite on the settled tree before approving. */
|
|
21
|
+
evaluate?: boolean;
|
|
22
|
+
/** Flip the agent's active pointer to the pushed revision. */
|
|
23
|
+
publish?: boolean;
|
|
24
|
+
pollIntervalMs?: number;
|
|
25
|
+
deadlineMs?: number;
|
|
26
|
+
/** Injectable for tests — real callers get a plain setTimeout sleep. */
|
|
27
|
+
sleep?: (ms: number) => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Run one build to its verdict. The POST rides a fresh idempotency key, so a
|
|
31
|
+
* retried request replays the SAME build; the returned view is terminal —
|
|
32
|
+
* `completed` (pushed), `refused` (a gate said no: the turn answered instead
|
|
33
|
+
* of completing, or certify came back red) or `failed` (infra story). The
|
|
34
|
+
* caller decides what each verdict is worth; this function only refuses to
|
|
35
|
+
* return a non-terminal view.
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildAgent(context: Context, builder: BuilderApiClient, instruction: string, options?: BuildOptions): Promise<BuildView>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { CliError } from "../errors/index.js";
|
|
3
|
+
import { requireAgent } from "./bundles.js";
|
|
4
|
+
/**
|
|
5
|
+
* The shipping lane's console half (docs/headless-authoring-design.md §4.5):
|
|
6
|
+
* one instruction against the checkout's PUSHED agent — no files travel, the
|
|
7
|
+
* service pulls the bundle itself — then poll the whole story (turn, certify,
|
|
8
|
+
* optional evaluation, push, optional publish) to its terminal verdict.
|
|
9
|
+
*/
|
|
10
|
+
/** A build turn edits, validates and repairs; certify replays the suite; an
|
|
11
|
+
* evaluation runs real conversations. Hours-scale, so the poll loop's own
|
|
12
|
+
* deadline is generous — each poll request stays cheap. */
|
|
13
|
+
export const BUILD_DEADLINE_MS = 2 * 3600_000;
|
|
14
|
+
const BUILD_POLL_MS = 5_000;
|
|
15
|
+
/**
|
|
16
|
+
* Run one build to its verdict. The POST rides a fresh idempotency key, so a
|
|
17
|
+
* retried request replays the SAME build; the returned view is terminal —
|
|
18
|
+
* `completed` (pushed), `refused` (a gate said no: the turn answered instead
|
|
19
|
+
* of completing, or certify came back red) or `failed` (infra story). The
|
|
20
|
+
* caller decides what each verdict is worth; this function only refuses to
|
|
21
|
+
* return a non-terminal view.
|
|
22
|
+
*/
|
|
23
|
+
export async function buildAgent(context, builder, instruction, options = {}) {
|
|
24
|
+
const request = {
|
|
25
|
+
agent_id: requireAgent(context),
|
|
26
|
+
instruction,
|
|
27
|
+
...(options.versionTag ? { version_tag: options.versionTag } : {}),
|
|
28
|
+
...(options.message ? { message: options.message } : {}),
|
|
29
|
+
...(options.model ? { model: options.model } : {}),
|
|
30
|
+
...(options.maxUsd !== undefined ? { max_usd: options.maxUsd } : {}),
|
|
31
|
+
...(options.evaluate === true ? { evaluate: true } : {}),
|
|
32
|
+
...(options.publish === true ? { publish: true } : {}),
|
|
33
|
+
};
|
|
34
|
+
const started = await builder.startBuild(request, randomUUID());
|
|
35
|
+
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
36
|
+
const interval = options.pollIntervalMs ?? BUILD_POLL_MS;
|
|
37
|
+
const deadline = Date.now() + (options.deadlineMs ?? BUILD_DEADLINE_MS);
|
|
38
|
+
for (;;) {
|
|
39
|
+
const view = await builder.buildView(started.build_id);
|
|
40
|
+
if (view.status !== "running")
|
|
41
|
+
return view;
|
|
42
|
+
if (Date.now() >= deadline) {
|
|
43
|
+
// The build keeps running server-side — the driver owns it, and the
|
|
44
|
+
// session id is a first-class handle every session surface answers on.
|
|
45
|
+
throw new CliError(`The build is still running (session ${started.session_id}).`, {
|
|
46
|
+
suggestion: "The server carries it to a verdict; check the session in the console.",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
await sleep(interval);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=builds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builds.js","sourceRoot":"","sources":["../../../src/services/builds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIzC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;;GAKG;AAEH;;4DAE4D;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAG,QAAQ,CAAC;AAE9C,MAAM,aAAa,GAAG,KAAK,CAAC;AAmB5B;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,OAAgB,EAChB,OAAyB,EACzB,WAAmB,EACnB,UAAwB,EAAE;IAE1B,MAAM,OAAO,GAAiB;QAC5B,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC;QAC/B,WAAW;QACX,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC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AI,CAAC,MAAM,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QAC3C,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,QAAQ,EAAE,CAAC;YAC3B,oEAAoE;YACpE,uEAAuE;YACvE,MAAM,IAAI,QAAQ,CAAC,uCAAuC,OAAO,CAAC,UAAU,IAAI,EAAE;gBAChF,UAAU,EAAE,uEAAuE;aACpF,CAAC,CAAC;QACL,CAAC;QACD,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { type AgentVersion, type ManagementClient, type VersionPull, type VersionPush } from "../api/management.js";
|
|
2
|
+
import type { BuilderApiClient, BuilderCertification, EraCensus, OrphanCensus } from "../api/builder-api.js";
|
|
2
3
|
import type { RuntimeApiClient } from "../api/runtime-api.js";
|
|
3
4
|
import { type FileDiff } from "../bundle/baseline.js";
|
|
4
5
|
import { type ValidationResult } from "../bundle/validate.js";
|
|
5
6
|
import { type Context, type ProjectBinding } from "../config/index.js";
|
|
6
7
|
import { type SkillTarget } from "../skills/install.js";
|
|
8
|
+
/** The bound agent id (exported for the sibling services that act on the
|
|
9
|
+
* checkout's agent remotely, e.g. the build lane). */
|
|
10
|
+
export declare function requireAgent(context: Context): string;
|
|
11
|
+
/** The checkout root the context is bound to (exported for the sibling
|
|
12
|
+
* services that anchor per-checkout state there, e.g. the advisor thread). */
|
|
13
|
+
export declare function agentRoot(context: Context): string;
|
|
7
14
|
export declare function pullBundle(context: Context, management: ManagementClient, options?: {
|
|
8
15
|
tag?: string;
|
|
9
16
|
destination?: string;
|
|
@@ -19,6 +26,8 @@ export declare function importBundle(context: Context, management: ManagementCli
|
|
|
19
26
|
homeDir?: string;
|
|
20
27
|
/** The engine build to pin the new checkout to (see `runtime-version/`). */
|
|
21
28
|
runtimeVersion?: string;
|
|
29
|
+
/** `headless` skips skill packs for the checkout's whole life — see `WorkspaceMode`. */
|
|
30
|
+
workspace?: "headless";
|
|
22
31
|
}): Promise<{
|
|
23
32
|
pull: VersionPull;
|
|
24
33
|
files: Record<string, string>;
|
|
@@ -43,6 +52,8 @@ export interface PullCheckoutResult {
|
|
|
43
52
|
/** The engine build every fetch above was routed to, when pinned. */
|
|
44
53
|
runtimeVersion?: string;
|
|
45
54
|
skills?: string[];
|
|
55
|
+
/** Managed skill packs deleted — reconciliation, or the headless sweep. */
|
|
56
|
+
removedSkills?: string[];
|
|
46
57
|
schemas?: string[];
|
|
47
58
|
/** True when this pull wrote the checkout's AGENTS.md. */
|
|
48
59
|
agentsPage?: boolean;
|
|
@@ -79,22 +90,30 @@ export declare function pushBundle(context: Context, management: ManagementClien
|
|
|
79
90
|
validation?: ValidationResult;
|
|
80
91
|
}>;
|
|
81
92
|
export declare function validateProgramBundle(runtime: RuntimeApiClient, files: Record<string, string>): Promise<ValidationResult>;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
/**
|
|
94
|
+
* The checkout as builder-api's stateless gates see it: the program under
|
|
95
|
+
* `src/**`, the scenario suite (when the build tree holds one) rehomed to
|
|
96
|
+
* `build/scenarios.yaml`. A legacy `bundle/src/scenarios.yaml` is NOT lifted
|
|
97
|
+
* here — it rides as `src/scenarios.yaml` and the service refuses it with
|
|
98
|
+
* the finding that teaches the move (headless-authoring-design.md). Exported
|
|
99
|
+
* because the advisor lane ships the identical tree.
|
|
100
|
+
*/
|
|
101
|
+
export declare function readCheckoutTree(root: string): Promise<Record<string, string>>;
|
|
102
|
+
/** `ValidationResult` plus the two mandatory advisory censuses the builder
|
|
103
|
+
* gate returns alongside its verdict — neither moves `valid`. */
|
|
104
|
+
export interface BundleValidation extends ValidationResult {
|
|
105
|
+
orphans: OrphanCensus;
|
|
106
|
+
eraCensus: EraCensus;
|
|
107
|
+
}
|
|
108
|
+
/** Validation via builder-api's stateless gate. Unlike the push lane
|
|
109
|
+
* (`validateProgramBundle`, runtime-api, pinned engine), this is the
|
|
110
|
+
* builder's own opinion of the tree — structure, load, semantics, wiring,
|
|
111
|
+
* plus the orphan and era censuses. */
|
|
112
|
+
export declare function validateLocalBundle(context: Context, builder: BuilderApiClient, root?: string): Promise<BundleValidation>;
|
|
113
|
+
/** Offline replay of the checkout's own suite via builder-api. Validation-
|
|
114
|
+
* first on the service: a red tree comes back as a failed report whose
|
|
115
|
+
* `program_errors` carry the findings — nothing ran. */
|
|
116
|
+
export declare function certifyLocalBundle(context: Context, builder: BuilderApiClient, root?: string): Promise<BuilderCertification>;
|
|
98
117
|
/** The demand-ledger audit via the existing runtime-api endpoint. */
|
|
99
118
|
export declare function needsLocalBundle(context: Context, runtime: RuntimeApiClient, root?: string): Promise<{
|
|
100
119
|
measured: boolean;
|