@aui.io/apollo 0.1.40 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/auth.js +4 -7
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/auth.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/bundles.js +130 -51
- 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 +1 -9
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/index.js +0 -2
- package/node_modules/@aui.io/apollo-cli/dist/src/index.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 +11 -100
- package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.js +0 -17
- package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.d.ts +71 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/builder-api.js +17 -0
- 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 -16
- 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/bundle/baseline.d.ts +12 -1
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/baseline.js +8 -2
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/baseline.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/build-area.d.ts +15 -0
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/build-area.js +121 -0
- package/node_modules/@aui.io/apollo-core/dist/src/bundle/build-area.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/index.d.ts +2 -3
- package/node_modules/@aui.io/apollo-core/dist/src/index.js +1 -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/bundles.d.ts +55 -8
- package/node_modules/@aui.io/apollo-core/dist/src/services/bundles.js +189 -41
- 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/env.service.js +6 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/env.service.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/evaluations.d.ts +42 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/evaluations.js +106 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/evaluations.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.d.ts +5 -3
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.js +15 -6
- package/node_modules/@aui.io/apollo-core/dist/src/skills/agents-page.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js +0 -28
- package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.js +0 -3
- package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.d.ts +1 -3
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js +3 -3
- package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +3 -82
- 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.js +0 -43
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +15 -159
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.d.ts +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js +0 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.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-cli/dist/src/commands/scenarios.d.ts +0 -3
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/scenarios.js +0 -124
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/scenarios.js.map +0 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.d.ts +0 -158
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.js +0 -481
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.js.map +0 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/author/ScenariosView.d.ts +0 -22
- package/node_modules/@aui.io/apollo-tui/dist/src/author/ScenariosView.js +0 -99
- package/node_modules/@aui.io/apollo-tui/dist/src/author/ScenariosView.js.map +0 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/author/scenarios.d.ts +0 -47
- package/node_modules/@aui.io/apollo-tui/dist/src/author/scenarios.js +0 -284
- package/node_modules/@aui.io/apollo-tui/dist/src/author/scenarios.js.map +0 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* agent-settings client —
|
|
3
|
-
* management-shaped (agent create included) lives on apollo-api,
|
|
4
|
-
* schemas moved to runtime-api.
|
|
2
|
+
* agent-settings client — build-bundle push/pull and agent record reads.
|
|
3
|
+
* Everything management-shaped (agent create included) lives on apollo-api,
|
|
4
|
+
* and program schemas moved to runtime-api.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Legacy TUI scenarios lane removed; the living path is
|
|
7
|
+
* bundle/build/** + `apollo evaluate`.
|
|
8
|
+
*
|
|
9
|
+
* 1. Build bundles (certification scenarios in bundle/build/scenarios.yaml).
|
|
7
10
|
*
|
|
8
11
|
* POST /v1/agents/{agent_id}/build-bundles/push (multipart)
|
|
9
12
|
* GET /v1/agents/{agent_id}/build-bundles/pull
|
|
10
|
-
* POST /v1/agents/{agent_id}/evaluation-scores/push (JSON)
|
|
11
|
-
* GET /v1/agents/{agent_id}/evaluation-scores/pull (array)
|
|
12
13
|
*
|
|
13
14
|
* 2. The raw agent record — the only place `active_blob_stats` (and with it
|
|
14
15
|
* the runtime an agent actually runs on) is readable, since apollo's
|
|
@@ -21,8 +22,9 @@
|
|
|
21
22
|
*
|
|
22
23
|
* GET /v1/runtime-versions
|
|
23
24
|
*
|
|
24
|
-
* A build bundle is an opaque tree of relative POSIX paths.
|
|
25
|
-
*
|
|
25
|
+
* A build bundle is an opaque tree of relative POSIX paths. The CLI build
|
|
26
|
+
* lane keeps it at `<checkout>/bundle/build/**` (paths relative to that
|
|
27
|
+
* root); the TUI's legacy scenarios flow still uses `scenarios/`.
|
|
26
28
|
*/
|
|
27
29
|
import type { HttpClient } from "./client-types.js";
|
|
28
30
|
/** A single scenario inside the bundle. */
|
|
@@ -67,89 +69,9 @@ export interface BuildBundlePullResponse {
|
|
|
67
69
|
file_urls?: Record<string, string>;
|
|
68
70
|
expires_at: string;
|
|
69
71
|
}
|
|
70
|
-
export type ScenarioResultStatus = "pass" | "open";
|
|
71
|
-
/** Per-scenario result row inside an evaluation score. */
|
|
72
|
-
export interface ScenarioResult {
|
|
73
|
-
/** Matches a `Scenario.code` from the linked bundle. */
|
|
74
|
-
scenario_code: string;
|
|
75
|
-
status: ScenarioResultStatus;
|
|
76
|
-
/** Total attempts the scenario was run. */
|
|
77
|
-
k?: number;
|
|
78
|
-
/** How many of the `k` attempts passed — a pass@k signal. */
|
|
79
|
-
passed?: number;
|
|
80
|
-
/** Conversation/session ids the evaluator used. */
|
|
81
|
-
session_ids?: string[];
|
|
82
|
-
comments?: string | null;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Free-text report blocks shared by score push and read shapes. Written by
|
|
86
|
-
* the scoring skill; rendered as markdown in the TUI scenarios subview.
|
|
87
|
-
*/
|
|
88
|
-
export interface ScoreReportBlocks {
|
|
89
|
-
/** RESULT block — headline outcome of the run. */
|
|
90
|
-
result?: string | null;
|
|
91
|
-
/** GROUND block — data provenance and volumes graded. */
|
|
92
|
-
ground?: string | null;
|
|
93
|
-
/** SKILLS block — skills exercised and their convergence status. */
|
|
94
|
-
skills?: string | null;
|
|
95
|
-
/** DEPTH block — declared vs realized turn depth per batch. */
|
|
96
|
-
depth?: string | null;
|
|
97
|
-
/** SPEED block — per-turn wall time and rerun statistics. */
|
|
98
|
-
speed?: string | null;
|
|
99
|
-
/** GRADING block — methodology, fault attribution, corrections. */
|
|
100
|
-
grading?: string | null;
|
|
101
|
-
/** CUSTOM block — free-form operator notes / rulings. */
|
|
102
|
-
custom?: string | null;
|
|
103
|
-
/** WEAKNESSES block — known open issues surfaced by the run. */
|
|
104
|
-
weaknesses?: string | null;
|
|
105
|
-
/** SHIPS block — deployment / activation notes. */
|
|
106
|
-
ships?: string | null;
|
|
107
|
-
}
|
|
108
|
-
/** Request body for `evaluation-scores/push` (append-only per version). */
|
|
109
|
-
export interface EvaluationScorePush extends ScoreReportBlocks {
|
|
110
|
-
version_id: string;
|
|
111
|
-
version_tag?: string;
|
|
112
|
-
agent_build_bundle_version?: number;
|
|
113
|
-
summary?: string | null;
|
|
114
|
-
total_scenarios?: number;
|
|
115
|
-
pass_scenarios?: number;
|
|
116
|
-
residuals?: string | null;
|
|
117
|
-
scenarios?: ScenarioResult[];
|
|
118
|
-
/** Run-level session ids (distinct from per-scenario ones). */
|
|
119
|
-
session_ids?: string[];
|
|
120
|
-
created_by: string;
|
|
121
|
-
}
|
|
122
|
-
/** 201 response body from `evaluation-scores/push`. */
|
|
123
|
-
export interface EvaluationScorePushResponse {
|
|
124
|
-
id: string;
|
|
125
|
-
agent_id: string;
|
|
126
|
-
version_id: string;
|
|
127
|
-
version_tag: string;
|
|
128
|
-
agent_build_bundle_version?: number | null;
|
|
129
|
-
total_scenarios: number;
|
|
130
|
-
pass_scenarios: number;
|
|
131
|
-
created_at: string;
|
|
132
|
-
}
|
|
133
|
-
/** Full evaluation-score document returned by pull. */
|
|
134
|
-
export interface EvaluationScoreRead extends ScoreReportBlocks {
|
|
135
|
-
id: string;
|
|
136
|
-
agent_id: string;
|
|
137
|
-
version_id: string;
|
|
138
|
-
version_tag: string;
|
|
139
|
-
agent_build_bundle_version?: number | null;
|
|
140
|
-
summary?: string | null;
|
|
141
|
-
total_scenarios: number;
|
|
142
|
-
pass_scenarios: number;
|
|
143
|
-
residuals?: string | null;
|
|
144
|
-
scenarios: ScenarioResult[];
|
|
145
|
-
/** Run-level session ids (distinct from per-scenario ones). */
|
|
146
|
-
session_ids?: string[];
|
|
147
|
-
created_at: string;
|
|
148
|
-
created_by: string;
|
|
149
|
-
}
|
|
150
72
|
/** A file to upload inside a build-bundle push. */
|
|
151
73
|
export interface BundleUploadFile {
|
|
152
|
-
/** Relative POSIX path inside the bundle (e.g. `scenarios.
|
|
74
|
+
/** Relative POSIX path inside the bundle (e.g. `scenarios.yaml`, `evaluation.yaml`). */
|
|
153
75
|
path: string;
|
|
154
76
|
content: Uint8Array;
|
|
155
77
|
contentType?: string;
|
|
@@ -253,15 +175,4 @@ export declare class AgentSettingsClient {
|
|
|
253
175
|
version?: number;
|
|
254
176
|
expiresIn?: number;
|
|
255
177
|
}): Promise<BuildBundlePullResponse>;
|
|
256
|
-
/** Append one evaluation-score document for a resolved version. */
|
|
257
|
-
pushEvaluationScore(agentId: string, body: EvaluationScorePush): Promise<EvaluationScorePushResponse>;
|
|
258
|
-
/**
|
|
259
|
-
* Every score for one agent version, newest first. Requires at least one
|
|
260
|
-
* of version id / tag. An empty array means "not run yet" (200, not 404).
|
|
261
|
-
*/
|
|
262
|
-
pullEvaluationScores(agentId: string, filters: {
|
|
263
|
-
versionId?: string;
|
|
264
|
-
versionTag?: string;
|
|
265
|
-
bundleVersion?: number;
|
|
266
|
-
}): Promise<EvaluationScoreRead[]>;
|
|
267
178
|
}
|
|
@@ -80,22 +80,5 @@ export class AgentSettingsClient {
|
|
|
80
80
|
},
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
/** Append one evaluation-score document for a resolved version. */
|
|
84
|
-
async pushEvaluationScore(agentId, body) {
|
|
85
|
-
return this.http.request(`/v1/agents/${encodeURIComponent(agentId)}/evaluation-scores/push`, { method: "POST", body });
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Every score for one agent version, newest first. Requires at least one
|
|
89
|
-
* of version id / tag. An empty array means "not run yet" (200, not 404).
|
|
90
|
-
*/
|
|
91
|
-
async pullEvaluationScores(agentId, filters) {
|
|
92
|
-
return this.http.request(`/v1/agents/${encodeURIComponent(agentId)}/evaluation-scores/pull`, {
|
|
93
|
-
query: {
|
|
94
|
-
version_id: filters.versionId,
|
|
95
|
-
version_tag: filters.versionTag,
|
|
96
|
-
agent_build_bundle_version: filters.bundleVersion,
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
83
|
}
|
|
101
84
|
//# sourceMappingURL=agent-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-settings.js","sourceRoot":"","sources":["../../../src/api/agent-settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-settings.js","sourceRoot":"","sources":["../../../src/api/agent-settings.ts"],"names":[],"mappings":"AAmKA;;;GAGG;AACH,SAAS,oBAAoB,CAC3B,GAA4B;IAE5B,MAAM,EAAE,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CA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AO;oBACrB,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS;wBAChC,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC;iBACvC,CAAC,CAAC;gBACH,MAAM,EAAE;oBACN,UAAU,EAAE,KAAK,CAAC,SAAS;oBAC3B,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAC3D,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;iBAC7D;aACF;SACF,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,eAAe,CAC1B,OAAe,EACf,UAAoD,EAAE;QAEtD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,cAAc,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,EAC9D;YACE,KAAK,EAAE;gBACL,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,UAAU,EAAE,OAAO,CAAC,SAAS;aAC9B;SACF,CACF,CAAC;IACJ,CAAC;CAEF"}
|
|
@@ -107,6 +107,69 @@ export interface AdvisorView {
|
|
|
107
107
|
answer: string | null;
|
|
108
108
|
usage: Record<string, unknown> | null;
|
|
109
109
|
}
|
|
110
|
+
/** One live evaluation over one shipped tree (the detached lane). `files`
|
|
111
|
+
* must carry `build/evaluation.yaml` and the `src/**` program; `agent_id`
|
|
112
|
+
* names whose workspace the trial threads belong to; `version_tag` labels
|
|
113
|
+
* them (absent: the agent's active tag); `scenarios` scopes the run to
|
|
114
|
+
* named codes — a scoped run is a fixing-loop tool, never promotable. */
|
|
115
|
+
export interface EvaluateRequest {
|
|
116
|
+
agent_id: string;
|
|
117
|
+
files: BuilderTree;
|
|
118
|
+
message?: string;
|
|
119
|
+
scenarios?: string[];
|
|
120
|
+
version_tag?: string;
|
|
121
|
+
}
|
|
122
|
+
/** The 202 — the run to poll, sized before a single trial moves. */
|
|
123
|
+
export interface EvaluationReceipt {
|
|
124
|
+
evaluation_id: string;
|
|
125
|
+
status: string;
|
|
126
|
+
scope: string;
|
|
127
|
+
total_trials: number;
|
|
128
|
+
scenarios: string[];
|
|
129
|
+
judge_model: string;
|
|
130
|
+
}
|
|
131
|
+
/** One trial row — `thread_id` opens the minted conversation. */
|
|
132
|
+
export interface EvaluationTrial {
|
|
133
|
+
scenario_code: string;
|
|
134
|
+
iteration: number;
|
|
135
|
+
status: string;
|
|
136
|
+
thread_id: string | null;
|
|
137
|
+
verdict: {
|
|
138
|
+
passed?: boolean;
|
|
139
|
+
reasons?: string[];
|
|
140
|
+
} | null;
|
|
141
|
+
turns: number | null;
|
|
142
|
+
error: string | null;
|
|
143
|
+
}
|
|
144
|
+
/** The poll view: the run row plus its trial rows. `verdict` and the
|
|
145
|
+
* tallies stay null until the run settles; `status` leaves
|
|
146
|
+
* queued/running/cancelling exactly once. */
|
|
147
|
+
export interface EvaluationView {
|
|
148
|
+
evaluation_id: string;
|
|
149
|
+
session_id: string | null;
|
|
150
|
+
agent_id: string | null;
|
|
151
|
+
status: string;
|
|
152
|
+
scope: string;
|
|
153
|
+
message: string | null;
|
|
154
|
+
judge_model: string | null;
|
|
155
|
+
verdict: string | null;
|
|
156
|
+
pass_scenarios: number | null;
|
|
157
|
+
total_scenarios: number | null;
|
|
158
|
+
result: {
|
|
159
|
+
threshold?: number;
|
|
160
|
+
scenarios?: {
|
|
161
|
+
code: string;
|
|
162
|
+
name: string;
|
|
163
|
+
k: number;
|
|
164
|
+
passed: number;
|
|
165
|
+
errors: number;
|
|
166
|
+
ungraded: number;
|
|
167
|
+
verdict: string;
|
|
168
|
+
}[];
|
|
169
|
+
} | null;
|
|
170
|
+
error: string | null;
|
|
171
|
+
trials: EvaluationTrial[];
|
|
172
|
+
}
|
|
110
173
|
/** One build over one pushed agent. No files ride in — the service pulls
|
|
111
174
|
* the agent's bundle itself; `version_tag` names the base (absent: the
|
|
112
175
|
* agent's current pin). */
|
|
@@ -163,6 +226,14 @@ export declare class BuilderApiClient {
|
|
|
163
226
|
/** Enqueue one advisor turn (202 immediately — the answer comes by poll). */
|
|
164
227
|
advise(ask: AdvisorAsk): Promise<AdvisorStarted>;
|
|
165
228
|
adviceView(turnId: string): Promise<AdvisorView>;
|
|
229
|
+
/** Enqueue one detached evaluation (202 immediately — the scoreboard
|
|
230
|
+
* comes by poll; there is no session and no SSE stream). */
|
|
231
|
+
startEvaluation(request: EvaluateRequest): Promise<EvaluationReceipt>;
|
|
232
|
+
evaluationView(evaluationId: string): Promise<EvaluationView>;
|
|
233
|
+
cancelEvaluation(evaluationId: string): Promise<{
|
|
234
|
+
evaluation_id: string;
|
|
235
|
+
status: string;
|
|
236
|
+
}>;
|
|
166
237
|
/** Enqueue one build (202 immediately — the verdict comes by poll). The
|
|
167
238
|
* idempotency key makes a network retry the SAME build, not a second one. */
|
|
168
239
|
startBuild(build: BuildRequest, idempotencyKey: string): Promise<BuildStarted>;
|
|
@@ -36,6 +36,23 @@ export class BuilderApiClient {
|
|
|
36
36
|
adviceView(turnId) {
|
|
37
37
|
return this.http.request(`/v1/builder/advisor/${turnId}`);
|
|
38
38
|
}
|
|
39
|
+
/** Enqueue one detached evaluation (202 immediately — the scoreboard
|
|
40
|
+
* comes by poll; there is no session and no SSE stream). */
|
|
41
|
+
startEvaluation(request) {
|
|
42
|
+
return this.http.request("/v1/builder/evaluate", {
|
|
43
|
+
method: "POST",
|
|
44
|
+
body: request,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
evaluationView(evaluationId) {
|
|
48
|
+
return this.http.request(`/v1/builder/evaluations/${evaluationId}`);
|
|
49
|
+
}
|
|
50
|
+
cancelEvaluation(evaluationId) {
|
|
51
|
+
return this.http.request(`/v1/builder/evaluations/${evaluationId}/cancel`, {
|
|
52
|
+
method: "POST",
|
|
53
|
+
body: {},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
39
56
|
/** Enqueue one build (202 immediately — the verdict comes by poll). The
|
|
40
57
|
* idempotency key makes a network retry the SAME build, not a second one. */
|
|
41
58
|
startBuild(build, idempotencyKey) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-api.js","sourceRoot":"","sources":["../../../src/api/builder-api.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH;iFACiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"builder-api.js","sourceRoot":"","sources":["../../../src/api/builder-api.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH;iFACiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAgN1C,MAAM,OAAO,gBAAgB;IACS;IAApC,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,YAAY,CAAC,KAAkB;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE;YAC/C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,KAAK,EAAE;SAChB,CAAC,CAAC;IACL,CAAC;IAEM,WAAW,CAChB,KAAkB,EAClB,SAAqC;QAErC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;YACpD,SAAS,EAAE,kBAAkB;SAC9B,CAAC,CAAC;IACL,CAAC;IAED,6EAA6E;IACtE,MAAM,CAAC,GAAe;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE;YAC9C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,GAAG;SACV,CAAC,CAAC;IACL,CAAC;IAEM,UAAU,CAAC,MAAc;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;iEAC6D;IACtD,eAAe,CAAC,OAAwB;QAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE;YAC/C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,OAAO;SACd,CAAC,CAAC;IACL,CAAC;IAEM,cAAc,CAAC,YAAoB;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,YAAY,EAAE,CAAC,CAAC;IACtE,CAAC;IAEM,gBAAgB,CACrB,YAAoB;QAEpB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,YAAY,SAAS,EAAE;YACzE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;IACL,CAAC;IAED;kFAC8E;IACvE,UAAU,CAAC,KAAmB,EAAE,cAAsB;QAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC;IAEM,SAAS,CAAC,OAAe;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -146,22 +146,6 @@ export declare class RuntimeApiClient {
|
|
|
146
146
|
runtime_version?: string;
|
|
147
147
|
reports?: Record<string, unknown>;
|
|
148
148
|
}>;
|
|
149
|
-
/** The demand-ledger audit: what callers ask, and what this bundle does about
|
|
150
|
-
* it. An unserved need is the RESULT, never a 4xx — same posture as validate. */
|
|
151
|
-
needsProgram(bundle: Record<string, unknown>): Promise<{
|
|
152
|
-
measured: boolean;
|
|
153
|
-
declared?: number;
|
|
154
|
-
served?: number;
|
|
155
|
-
dark?: number;
|
|
156
|
-
served_ratio?: number | null;
|
|
157
|
-
dark_number?: number | null;
|
|
158
|
-
report?: string;
|
|
159
|
-
refused?: string[];
|
|
160
|
-
errors?: {
|
|
161
|
-
code: string;
|
|
162
|
-
message: string;
|
|
163
|
-
}[];
|
|
164
|
-
}>;
|
|
165
149
|
/** The behavioural counterpart to validate: run the bundle's own scenario
|
|
166
150
|
* suite against it, graded by the runtime floor. Read-only on the server. */
|
|
167
151
|
certifyProgram(bundle: Record<string, unknown>, scenarios?: unknown[]): Promise<{
|
|
@@ -114,14 +114,6 @@ export class RuntimeApiClient {
|
|
|
114
114
|
body: { bundle },
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
/** The demand-ledger audit: what callers ask, and what this bundle does about
|
|
118
|
-
* it. An unserved need is the RESULT, never a 4xx — same posture as validate. */
|
|
119
|
-
needsProgram(bundle) {
|
|
120
|
-
return this.http.request("/api/v1/programs/needs", {
|
|
121
|
-
method: "POST",
|
|
122
|
-
body: { bundle },
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
117
|
/** The behavioural counterpart to validate: run the bundle's own scenario
|
|
126
118
|
* suite against it, graded by the runtime floor. Read-only on the server. */
|
|
127
119
|
certifyProgram(bundle, scenarios) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-api.js","sourceRoot":"","sources":["../../../src/api/runtime-api.ts"],"names":[],"mappings":"AAqFA;;;;;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,I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B,EAAE;YACnD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE;SACpE,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -4,6 +4,13 @@ export interface Baseline {
|
|
|
4
4
|
versionTag: string;
|
|
5
5
|
files: Record<string, string>;
|
|
6
6
|
fileLayout?: Record<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* The build area (`bundle/build/**`) as last synced — hashes keyed by the
|
|
9
|
+
* path relative to `bundle/build/`, matching the wire's relative paths.
|
|
10
|
+
* Absent on baselines written before the build lane existed; readers treat
|
|
11
|
+
* that as an empty area (everything local reads as new work to push).
|
|
12
|
+
*/
|
|
13
|
+
buildHashes?: Record<string, string>;
|
|
7
14
|
writtenAt: string;
|
|
8
15
|
}
|
|
9
16
|
export interface FileDiff {
|
|
@@ -11,7 +18,11 @@ export interface FileDiff {
|
|
|
11
18
|
changed: string[];
|
|
12
19
|
removed: string[];
|
|
13
20
|
}
|
|
14
|
-
export declare function writeBaseline(home: string, agentId: string, versionTag: string, files: Record<string, string>, fileLayout?: Record<string, string
|
|
21
|
+
export declare function writeBaseline(home: string, agentId: string, versionTag: string, files: Record<string, string>, fileLayout?: Record<string, string>,
|
|
22
|
+
/** Pre-hashed (build files may be binary, so contents never travel here). */
|
|
23
|
+
buildHashes?: Record<string, string>): Promise<void>;
|
|
15
24
|
export declare function readBaseline(home: string, agentId: string): Promise<Baseline | null>;
|
|
16
25
|
export declare function diffHashes(baseline: Record<string, string>, currentFiles: Record<string, string>): FileDiff;
|
|
26
|
+
/** Diff two pre-hashed maps — the build lane hashes Buffers itself. */
|
|
27
|
+
export declare function diffHashMaps(baseline: Record<string, string>, current: Record<string, string>): FileDiff;
|
|
17
28
|
export declare function isClean(diff: FileDiff): boolean;
|
|
@@ -4,7 +4,9 @@ import { hashFiles } from "./files.js";
|
|
|
4
4
|
function baselinePath(home, agentId) {
|
|
5
5
|
return path.join(home, ".apollo", "baselines", agentId, "baseline.json");
|
|
6
6
|
}
|
|
7
|
-
export async function writeBaseline(home, agentId, versionTag, files, fileLayout
|
|
7
|
+
export async function writeBaseline(home, agentId, versionTag, files, fileLayout,
|
|
8
|
+
/** Pre-hashed (build files may be binary, so contents never travel here). */
|
|
9
|
+
buildHashes) {
|
|
8
10
|
const target = baselinePath(home, agentId);
|
|
9
11
|
await mkdir(path.dirname(target), { recursive: true, mode: 0o700 });
|
|
10
12
|
const baseline = {
|
|
@@ -13,6 +15,7 @@ export async function writeBaseline(home, agentId, versionTag, files, fileLayout
|
|
|
13
15
|
versionTag,
|
|
14
16
|
files: hashFiles(files),
|
|
15
17
|
...(fileLayout ? { fileLayout } : {}),
|
|
18
|
+
...(buildHashes ? { buildHashes } : {}),
|
|
16
19
|
writtenAt: new Date().toISOString(),
|
|
17
20
|
};
|
|
18
21
|
await writeFile(target, `${JSON.stringify(baseline, null, 2)}\n`, {
|
|
@@ -31,7 +34,10 @@ export async function readBaseline(home, agentId) {
|
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
export function diffHashes(baseline, currentFiles) {
|
|
34
|
-
|
|
37
|
+
return diffHashMaps(baseline, hashFiles(currentFiles));
|
|
38
|
+
}
|
|
39
|
+
/** Diff two pre-hashed maps — the build lane hashes Buffers itself. */
|
|
40
|
+
export function diffHashMaps(baseline, current) {
|
|
35
41
|
const previousPaths = new Set(Object.keys(baseline));
|
|
36
42
|
const currentPaths = new Set(Object.keys(current));
|
|
37
43
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.js","sourceRoot":"","sources":["../../../src/bundle/baseline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,O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AC,GAAG,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;KAC7E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAc;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface BuildFiles {
|
|
2
|
+
root: string;
|
|
3
|
+
/** POSIX path relative to `bundle/build/` → raw bytes. */
|
|
4
|
+
files: Record<string, Buffer>;
|
|
5
|
+
}
|
|
6
|
+
/** Every file under the area, dotfiles skipped. A missing directory reads
|
|
7
|
+
* as an empty area — "no proof material yet" is a normal state. */
|
|
8
|
+
export declare function readBuildFiles(root: string): Promise<BuildFiles>;
|
|
9
|
+
export declare function hashBuildFiles(files: Record<string, Buffer>): Record<string, string>;
|
|
10
|
+
/** Exact sync to the given snapshot: write everything, delete what the
|
|
11
|
+
* snapshot no longer holds, prune emptied directories. */
|
|
12
|
+
export declare function writeBuildFiles(destination: string, files: Record<string, Buffer>): Promise<{
|
|
13
|
+
written: string[];
|
|
14
|
+
removed: string[];
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The build area — `<checkout>/bundle/build/**` as files on the wire.
|
|
3
|
+
*
|
|
4
|
+
* The tree law (AGENTS_HEADLESS.md §2): `bundle/src/**` is the program and
|
|
5
|
+
* rides agent versions; `bundle/build/**` is the proof material (the
|
|
6
|
+
* scenario suite, the live-eval pair, fixtures) and rides the agent's BUILD
|
|
7
|
+
* BUNDLE — a separately versioned tree on agent-settings whose wire paths
|
|
8
|
+
* are relative to `bundle/build/` (no prefix). This module is the disk half
|
|
9
|
+
* of that lane: read, hash, and exact-sync the area.
|
|
10
|
+
*
|
|
11
|
+
* Unlike the program scan (`files.ts`, text-only), the build area may hold
|
|
12
|
+
* binary fixtures — contents stay `Buffer` end to end and only hashes ever
|
|
13
|
+
* reach the baseline.
|
|
14
|
+
*/
|
|
15
|
+
import { createHash } from "node:crypto";
|
|
16
|
+
import { mkdir, readdir, readFile, rmdir, unlink, writeFile } from "node:fs/promises";
|
|
17
|
+
import path from "node:path";
|
|
18
|
+
function safeBuildRel(relativePath) {
|
|
19
|
+
const normalised = path.posix.normalize(relativePath.replaceAll("\\", "/"));
|
|
20
|
+
if (path.posix.isAbsolute(normalised) ||
|
|
21
|
+
normalised === ".." ||
|
|
22
|
+
normalised.startsWith("../")) {
|
|
23
|
+
throw new Error(`Build path escapes the build area: ${relativePath}`);
|
|
24
|
+
}
|
|
25
|
+
return normalised;
|
|
26
|
+
}
|
|
27
|
+
function resolveInside(root, relativePath) {
|
|
28
|
+
const target = path.resolve(root, safeBuildRel(relativePath));
|
|
29
|
+
if (target !== root && !target.startsWith(`${root}${path.sep}`)) {
|
|
30
|
+
throw new Error(`Build path escapes the build area: ${relativePath}`);
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
}
|
|
34
|
+
/** Every file under the area, dotfiles skipped. A missing directory reads
|
|
35
|
+
* as an empty area — "no proof material yet" is a normal state. */
|
|
36
|
+
export async function readBuildFiles(root) {
|
|
37
|
+
const absoluteRoot = path.resolve(root);
|
|
38
|
+
const files = {};
|
|
39
|
+
async function walk(directory, relativeDirectory = "") {
|
|
40
|
+
let entries;
|
|
41
|
+
try {
|
|
42
|
+
entries = await readdir(directory, { withFileTypes: true });
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (error.code === "ENOENT")
|
|
46
|
+
return;
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
entries.sort((left, right) => left.name.localeCompare(right.name));
|
|
50
|
+
for (const entry of entries) {
|
|
51
|
+
if (entry.name.startsWith("."))
|
|
52
|
+
continue;
|
|
53
|
+
const relativePath = relativeDirectory
|
|
54
|
+
? `${relativeDirectory}/${entry.name}`
|
|
55
|
+
: entry.name;
|
|
56
|
+
const absolutePath = path.join(directory, entry.name);
|
|
57
|
+
if (entry.isDirectory()) {
|
|
58
|
+
await walk(absolutePath, relativePath);
|
|
59
|
+
}
|
|
60
|
+
else if (entry.isFile()) {
|
|
61
|
+
files[relativePath] = await readFile(absolutePath);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
await walk(absoluteRoot);
|
|
66
|
+
return { root: absoluteRoot, files };
|
|
67
|
+
}
|
|
68
|
+
export function hashBuildFiles(files) {
|
|
69
|
+
return Object.fromEntries(Object.entries(files)
|
|
70
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
71
|
+
.map(([relativePath, content]) => [
|
|
72
|
+
relativePath,
|
|
73
|
+
createHash("sha256").update(content).digest("hex"),
|
|
74
|
+
]));
|
|
75
|
+
}
|
|
76
|
+
/** Exact sync to the given snapshot: write everything, delete what the
|
|
77
|
+
* snapshot no longer holds, prune emptied directories. */
|
|
78
|
+
export async function writeBuildFiles(destination, files) {
|
|
79
|
+
const root = path.resolve(destination);
|
|
80
|
+
await mkdir(root, { recursive: true });
|
|
81
|
+
const desired = new Map(Object.entries(files).map(([relativePath, content]) => [
|
|
82
|
+
safeBuildRel(relativePath),
|
|
83
|
+
content,
|
|
84
|
+
]));
|
|
85
|
+
const removed = [];
|
|
86
|
+
const existing = await readBuildFiles(root);
|
|
87
|
+
for (const relativePath of Object.keys(existing.files).sort()) {
|
|
88
|
+
if (desired.has(relativePath))
|
|
89
|
+
continue;
|
|
90
|
+
await unlink(resolveInside(root, relativePath));
|
|
91
|
+
removed.push(relativePath);
|
|
92
|
+
}
|
|
93
|
+
for (const [relativePath, content] of desired) {
|
|
94
|
+
const target = resolveInside(root, relativePath);
|
|
95
|
+
await mkdir(path.dirname(target), { recursive: true });
|
|
96
|
+
await writeFile(target, content);
|
|
97
|
+
}
|
|
98
|
+
await removeEmptyDirectories(root);
|
|
99
|
+
return { written: [...desired.keys()].sort(), removed };
|
|
100
|
+
}
|
|
101
|
+
async function removeEmptyDirectories(root) {
|
|
102
|
+
async function walk(directory) {
|
|
103
|
+
const entries = await readdir(directory, { withFileTypes: true });
|
|
104
|
+
let empty = true;
|
|
105
|
+
for (const entry of entries) {
|
|
106
|
+
const child = path.join(directory, entry.name);
|
|
107
|
+
if (entry.isDirectory()) {
|
|
108
|
+
if (await walk(child)) {
|
|
109
|
+
await rmdir(child);
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
empty = false;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
empty = false;
|
|
116
|
+
}
|
|
117
|
+
return empty;
|
|
118
|
+
}
|
|
119
|
+
await walk(root);
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=build-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-area.js","sourceRoot":"","sources":["../../../src/bundle/build-area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B,SAAS,YAAY,CAAC,YAAoB;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;IAC5E,IACE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC;QACjC,UAAU,KAAK,IAAI;QACnB,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,EAC5B,CAAC;QACD,MA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SAAiB;QACnC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,IAAI,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;oBACtB,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC;oBACnB,SAAS;gBACX,CAAC;gBACD,KAAK,GAAG,KAAK,CAAC;gBACd,SAAS;YACX,CAAC;YACD,KAAK,GAAG,KAAK,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -10,7 +10,7 @@ export { RuntimeApiClient, type AgentOverride, type Message, type RuntimeTrace,
|
|
|
10
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";
|
|
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
|
-
export { AgentSettingsClient, type AgentBlobStats, type AgentRecord, type AgentRecordKind, type AgentRecordScope, type RuntimeVersionRecord, type BuildBundle, type BuildBundleFile, type BuildBundlePullResponse, type BuildBundlePushResponse, type BundleUploadFile,
|
|
13
|
+
export { AgentSettingsClient, type AgentBlobStats, type AgentRecord, type AgentRecordKind, type AgentRecordScope, type RuntimeVersionRecord, type BuildBundle, type BuildBundleFile, type BuildBundlePullResponse, type BuildBundlePushResponse, type BundleUploadFile, } from "./api/agent-settings.js";
|
|
14
14
|
export { diffHashes, isClean, readBaseline, writeBaseline, type Baseline, type FileDiff, } from "./bundle/baseline.js";
|
|
15
15
|
export { contentDigest, hashFiles, readProgramFiles, type ProgramFiles, } from "./bundle/files.js";
|
|
16
16
|
export { assembleBundle, bundleFileLayout, bundleFiles, writeBundleFiles, type BundleDocument, } from "./bundle/materialize.js";
|
|
@@ -22,7 +22,7 @@ export { environments, type BaseUrls, type ConfigFlags, type Context, type Crede
|
|
|
22
22
|
export { ApiError, AuthError, CliError, ConfigError, ExitCode, ValidationError, toCliError, type ExitCodeValue, } from "./errors/index.js";
|
|
23
23
|
export { Output, errorEnvelope, successEnvelope, type ErrorEnvelope, type OutputOptions, } from "./output/index.js";
|
|
24
24
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
25
|
-
export { DEFAULT_SKILL_TARGETS, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, remoteDiff, validateLocalBundle, validateProgramBundle, type BundleValidation, type PullCheckoutOptions, type PullCheckoutResult, type PushCheckoutResult, certifyLocalBundle,
|
|
25
|
+
export { DEFAULT_SKILL_TARGETS, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, remoteDiff, validateLocalBundle, validateProgramBundle, type BuildAreaSync, type BundleValidation, type PullCheckoutOptions, type PullCheckoutResult, type PushCheckoutResult, certifyLocalBundle, } from "./services/bundles.js";
|
|
26
26
|
export { ADVISE_DEADLINE_MS, adviseLocalBundle, readAdvisorState, writeAdvisorState, type AdviceResult, type AdviseOptions, type AdvisorState, } from "./services/advisor.js";
|
|
27
27
|
export { BUILD_DEADLINE_MS, buildAgent, type BuildOptions, } from "./services/builds.js";
|
|
28
28
|
export { createClients, type Clients } from "./services/clients.js";
|
|
@@ -33,7 +33,6 @@ export { createThread, debugInteraction, getThread, listMessages, listThreads, p
|
|
|
33
33
|
export { createCollection, createEndpoint, deleteEndpoint, deleteMockDb, describeMockDb, executeEndpoint, exportMockDb, getEndpoint, inspectSession, listCollections, listEndpoints, normalizeSchema, parseJsonFlag, provisionMockDb, resetSession, resolveMockDb, rotateMgmtKey, rotateRuntimeKey, seedRows, statusMockDb, storedKeys, updateCollection, updateEndpoint, wireMockDbConnection, type MockDbResolved, type MockDbServiceOptions, type WireResult, } from "./services/mockdb.js";
|
|
34
34
|
export { buildVaultScope, getSecretByName, listSecrets, parseVaultScopeLevel, removeSecretByName, scopeLevelLabel, setSecret, validateSecretName, vaultScopeLevels, type SetSecretParams, type VaultScopeLevel, type VaultServiceOptions, } from "./services/vault.js";
|
|
35
35
|
export { addFiles, addUrls, createHub, deleteHub, getHubByName, hubRefCheck, hubStatus, listHubs, programHubRefs, type HubStatus, type HubUploadResult, type KnowledgeServiceOptions, } from "./services/knowledge.js";
|
|
36
|
-
export { INTENT_DIR, REPORT_BLOCK_KEYS, SCENARIOS_DIR, SCENARIOS_FILE, SCORES_FILE, assembleBundleUpload, listBundleFiles, listIntentFiles, pullScenarios, pullScores, pushScenarioBundle, pushScores, readLocalScenarios, readLocalScores, scaffoldScenarios, scenariosPaths, scoresToPushBody, syncScenarios, validateScenariosFile, writeLocalScenarios, writeLocalScores, type AssembledBundle, type LocalScenario, type LocalScores, type PullScenariosResult, type PullScoresResult, type PushBundleResult, type PushScoresResult, type ScaffoldResult, type ScenariosFile, type ScenariosServiceOptions, type SyncScenariosResult, } from "./services/scenarios.js";
|
|
37
36
|
export { currentProfile, listProfiles, useProfile, type CurrentProfile, type ProfileSummary, } from "./services/profile.service.js";
|
|
38
37
|
export { captureFailed, filterCaptures, formatCurl, readCapturedRequests, type CaptureFilters, } from "./services/requests.js";
|
|
39
38
|
export { runDoctor, type DoctorCheck, type DoctorOptions, type DoctorReport, type DoctorSection, type DoctorStatus, } from "./services/doctor.js";
|
|
@@ -21,7 +21,7 @@ export { environments, } from "./config/types.js";
|
|
|
21
21
|
export { ApiError, AuthError, CliError, ConfigError, ExitCode, ValidationError, 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, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, remoteDiff, validateLocalBundle, validateProgramBundle, certifyLocalBundle,
|
|
24
|
+
export { DEFAULT_SKILL_TARGETS, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, remoteDiff, validateLocalBundle, validateProgramBundle, certifyLocalBundle, } 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";
|
|
@@ -32,7 +32,6 @@ export { createThread, debugInteraction, getThread, listMessages, listThreads, p
|
|
|
32
32
|
export { createCollection, createEndpoint, deleteEndpoint, deleteMockDb, describeMockDb, executeEndpoint, exportMockDb, getEndpoint, inspectSession, listCollections, listEndpoints, normalizeSchema, parseJsonFlag, provisionMockDb, resetSession, resolveMockDb, rotateMgmtKey, rotateRuntimeKey, seedRows, statusMockDb, storedKeys, updateCollection, updateEndpoint, wireMockDbConnection, } from "./services/mockdb.js";
|
|
33
33
|
export { buildVaultScope, getSecretByName, listSecrets, parseVaultScopeLevel, removeSecretByName, scopeLevelLabel, setSecret, validateSecretName, vaultScopeLevels, } from "./services/vault.js";
|
|
34
34
|
export { addFiles, addUrls, createHub, deleteHub, getHubByName, hubRefCheck, hubStatus, listHubs, programHubRefs, } from "./services/knowledge.js";
|
|
35
|
-
export { INTENT_DIR, REPORT_BLOCK_KEYS, SCENARIOS_DIR, SCENARIOS_FILE, SCORES_FILE, assembleBundleUpload, listBundleFiles, listIntentFiles, pullScenarios, pullScores, pushScenarioBundle, pushScores, readLocalScenarios, readLocalScores, scaffoldScenarios, scenariosPaths, scoresToPushBody, syncScenarios, validateScenariosFile, writeLocalScenarios, writeLocalScores, } from "./services/scenarios.js";
|
|
36
35
|
export { currentProfile, listProfiles, useProfile, } from "./services/profile.service.js";
|
|
37
36
|
export { captureFailed, filterCaptures, formatCurl, readCapturedRequests, } from "./services/requests.js";
|
|
38
37
|
export { runDoctor, } from "./services/doctor.js";
|