@aui.io/apollo 0.1.22 → 0.1.26
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/scenarios.js +3 -3
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/scenarios.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 +19 -21
- package/node_modules/@aui.io/apollo-core/dist/src/api/agent-settings.js +11 -20
- 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/index.d.ts +2 -2
- package/node_modules/@aui.io/apollo-core/dist/src/index.js +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.d.ts +15 -8
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.js +80 -58
- package/node_modules/@aui.io/apollo-core/dist/src/services/scenarios.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +2 -2
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/SplashCard.js +9 -5
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/SplashCard.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/wordmark.d.ts +40 -29
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/wordmark.js +409 -202
- package/node_modules/@aui.io/apollo-tui/dist/src/ui/wordmark.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
|
@@ -42,12 +42,12 @@ export function registerScenarios(program, runtime) {
|
|
|
42
42
|
: { bundleVersion: Number(options.bundle) }),
|
|
43
43
|
});
|
|
44
44
|
run.output.result(result, () => result.found
|
|
45
|
-
? `Pulled bundle v${String(result.version)} — ${String(result.
|
|
45
|
+
? `Pulled bundle v${String(result.version)} — ${String(result.filesCount)} file(s) (${String(result.scenariosCount)} scenario(s)).`
|
|
46
46
|
: "No scenarios bundle for this agent yet — `apollo scenarios generate` to start one.");
|
|
47
47
|
});
|
|
48
48
|
scenarios
|
|
49
49
|
.command("push")
|
|
50
|
-
.description(`Push ${
|
|
50
|
+
.description(`Push ${SCENARIOS_DIR}/ (${SCENARIOS_FILE} + extras) as a new bundle version, then ${SCORES_FILE} when present`)
|
|
51
51
|
.option("--notes <text>", "notes stored on the bundle version")
|
|
52
52
|
.option("--skip-scores", `push the bundle only, ignore ${SCORES_FILE}`)
|
|
53
53
|
.action(async (options) => {
|
|
@@ -57,7 +57,7 @@ export function registerScenarios(program, runtime) {
|
|
|
57
57
|
...(options.notes === undefined ? {} : { notes: options.notes }),
|
|
58
58
|
});
|
|
59
59
|
const lines = [
|
|
60
|
-
`Pushed bundle v${String(bundle.version)} — ${String(bundle.
|
|
60
|
+
`Pushed bundle v${String(bundle.version)} — ${String(bundle.filesCount)} file(s) (${String(bundle.scenariosCount)} scenario(s)).`,
|
|
61
61
|
];
|
|
62
62
|
let scores;
|
|
63
63
|
const hasScores = options.skipScores !== true &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenarios.js","sourceRoot":"","sources":["../../../src/commands/scenarios.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EACL,UAAU,EACV,aAAa,EACb,cAAc,EACd,WAAW,EACX,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,cAAc,GACf,MAAM,2CAA2C,CAAC;AAGnD,SAAS,eAAe,CAAC,GAAmB;IAC1C,IAAI,CAAC,GAAG,C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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aui.io/apollo-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Command-line client for the Apollo runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"test": "vitest run"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aui.io/apollo-core": "0.1.
|
|
31
|
+
"@aui.io/apollo-core": "0.1.26",
|
|
32
32
|
"commander": "^14.0.3",
|
|
33
33
|
"picocolors": "^1.1.1"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@aui.io/apollo-tui": "0.1.
|
|
36
|
+
"@aui.io/apollo-tui": "0.1.26"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@eslint/js": "^9.39.5",
|
|
@@ -25,14 +25,10 @@
|
|
|
25
25
|
*
|
|
26
26
|
* GET /v1/runtime-versions
|
|
27
27
|
*
|
|
28
|
-
* A build bundle is
|
|
29
|
-
*
|
|
30
|
-
* server contract); the local checkout spells it `scenarios/scenarios.json`
|
|
31
|
-
* — the mapping lives here so nothing above sees the v1 name.
|
|
28
|
+
* A build bundle is an opaque tree of relative POSIX paths. Local checkouts
|
|
29
|
+
* still live under `scenarios/`; the wire uses those relative paths as-is.
|
|
32
30
|
*/
|
|
33
31
|
import type { HttpClient } from "./client-types.js";
|
|
34
|
-
/** Wire filename of the scenarios file inside a build bundle. */
|
|
35
|
-
export declare const WIRE_SCENARIOS_FILE = "scenarios.aui.json";
|
|
36
32
|
/** A single scenario inside the bundle. */
|
|
37
33
|
export interface Scenario {
|
|
38
34
|
/** Stable identifier, unique within the bundle. */
|
|
@@ -42,13 +38,19 @@ export interface Scenario {
|
|
|
42
38
|
/** Extra per-scenario keys preserved verbatim on the server. */
|
|
43
39
|
extra?: Record<string, unknown>;
|
|
44
40
|
}
|
|
41
|
+
/** One file listed on a pulled build bundle. */
|
|
42
|
+
export interface BuildBundleFile {
|
|
43
|
+
path: string;
|
|
44
|
+
size: number;
|
|
45
|
+
}
|
|
45
46
|
/** 201 response body from `build-bundles/push`. */
|
|
46
47
|
export interface BuildBundlePushResponse {
|
|
47
48
|
agent_id: string;
|
|
48
49
|
bundle_id: string;
|
|
49
50
|
version: number;
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
/** Optional on the wire: older deployments omit it, so callers count
|
|
52
|
+
* what they uploaded instead. */
|
|
53
|
+
files_count?: number;
|
|
52
54
|
created_at: string;
|
|
53
55
|
}
|
|
54
56
|
/** The bundle document returned by `build-bundles/pull`. */
|
|
@@ -56,11 +58,7 @@ export interface BuildBundle {
|
|
|
56
58
|
id: string;
|
|
57
59
|
agent_id: string;
|
|
58
60
|
version: number;
|
|
59
|
-
|
|
60
|
-
intents: {
|
|
61
|
-
filename: string;
|
|
62
|
-
size: number;
|
|
63
|
-
}[];
|
|
61
|
+
files?: BuildBundleFile[];
|
|
64
62
|
notes?: string | null;
|
|
65
63
|
created_at: string;
|
|
66
64
|
created_by: string;
|
|
@@ -68,8 +66,9 @@ export interface BuildBundle {
|
|
|
68
66
|
/** 200 response body from `build-bundles/pull`. */
|
|
69
67
|
export interface BuildBundlePullResponse {
|
|
70
68
|
bundle: BuildBundle;
|
|
71
|
-
/**
|
|
72
|
-
|
|
69
|
+
/** Relative POSIX path → short-lived signed GCS URL. Optional on the wire:
|
|
70
|
+
* an empty bundle omits the map rather than sending `{}`. */
|
|
71
|
+
file_urls?: Record<string, string>;
|
|
73
72
|
expires_at: string;
|
|
74
73
|
}
|
|
75
74
|
export type ScenarioResultStatus = "pass" | "open";
|
|
@@ -154,8 +153,8 @@ export interface EvaluationScoreRead extends ScoreReportBlocks {
|
|
|
154
153
|
}
|
|
155
154
|
/** A file to upload inside a build-bundle push. */
|
|
156
155
|
export interface BundleUploadFile {
|
|
157
|
-
/**
|
|
158
|
-
|
|
156
|
+
/** Relative POSIX path inside the bundle (e.g. `scenarios.json`, `intent/faq.md`). */
|
|
157
|
+
path: string;
|
|
159
158
|
content: Uint8Array;
|
|
160
159
|
contentType?: string;
|
|
161
160
|
}
|
|
@@ -289,15 +288,14 @@ export declare class AgentSettingsClient {
|
|
|
289
288
|
* own surface, not a republished apollo route.
|
|
290
289
|
*/
|
|
291
290
|
listRuntimeVersions(size?: number): Promise<RuntimeVersionRecord[]>;
|
|
292
|
-
/** Push one bundle version:
|
|
291
|
+
/** Push one bundle version: every file under the local scenarios tree. */
|
|
293
292
|
pushBuildBundle(agentId: string, input: {
|
|
294
|
-
|
|
295
|
-
intents: BundleUploadFile[];
|
|
293
|
+
files: BundleUploadFile[];
|
|
296
294
|
createdBy: string;
|
|
297
295
|
notes?: string;
|
|
298
296
|
}): Promise<BuildBundlePushResponse>;
|
|
299
297
|
/**
|
|
300
|
-
* Pull a bundle (latest by default).
|
|
298
|
+
* Pull a bundle (latest by default). File bytes are NOT proxied — the
|
|
301
299
|
* response carries short-lived signed URLs the caller downloads directly.
|
|
302
300
|
* 404 = the agent has no bundle yet; callers map it to "nothing to pull".
|
|
303
301
|
*/
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** Wire filename of the scenarios file inside a build bundle. */
|
|
2
|
-
export const WIRE_SCENARIOS_FILE = "scenarios.aui.json";
|
|
3
1
|
/**
|
|
4
2
|
* Normalize one catalog row. A record without an id or a routable build
|
|
5
3
|
* cannot be pinned, so it is dropped rather than surfaced half-formed.
|
|
@@ -100,36 +98,29 @@ export class AgentSettingsClient {
|
|
|
100
98
|
.map((item) => runtimeVersionRecord(item))
|
|
101
99
|
.filter((record) => record !== undefined);
|
|
102
100
|
}
|
|
103
|
-
/** Push one bundle version:
|
|
101
|
+
/** Push one bundle version: every file under the local scenarios tree. */
|
|
104
102
|
async pushBuildBundle(agentId, input) {
|
|
105
103
|
return this.http.request(`/v1/agents/${encodeURIComponent(agentId)}/build-bundles/push`, {
|
|
106
104
|
method: "POST",
|
|
107
105
|
form: {
|
|
108
|
-
files:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
field: "files",
|
|
117
|
-
filename: file.filename,
|
|
118
|
-
content: file.content,
|
|
119
|
-
...(file.contentType === undefined
|
|
120
|
-
? {}
|
|
121
|
-
: { contentType: file.contentType }),
|
|
122
|
-
})),
|
|
123
|
-
],
|
|
106
|
+
files: input.files.map((file) => ({
|
|
107
|
+
field: "files",
|
|
108
|
+
filename: file.path,
|
|
109
|
+
content: file.content,
|
|
110
|
+
...(file.contentType === undefined
|
|
111
|
+
? {}
|
|
112
|
+
: { contentType: file.contentType }),
|
|
113
|
+
})),
|
|
124
114
|
fields: {
|
|
125
115
|
created_by: input.createdBy,
|
|
116
|
+
paths: JSON.stringify(input.files.map((file) => file.path)),
|
|
126
117
|
...(input.notes === undefined ? {} : { notes: input.notes }),
|
|
127
118
|
},
|
|
128
119
|
},
|
|
129
120
|
});
|
|
130
121
|
}
|
|
131
122
|
/**
|
|
132
|
-
* Pull a bundle (latest by default).
|
|
123
|
+
* Pull a bundle (latest by default). File bytes are NOT proxied — the
|
|
133
124
|
* response carries short-lived signed URLs the caller downloads directly.
|
|
134
125
|
* 404 = the agent has no bundle yet; callers map it to "nothing to pull".
|
|
135
126
|
*/
|
|
@@ -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":"AA0PA;;;GAGG;AACH,SAAS,oBAAoB,CAC3B,GAA4B;IAE5B,MAAM,EAAE,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IA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AAoD,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;IAED,mEAAmE;IAC5D,KAAK,CAAC,mBAAmB,CAC9B,OAAe,EACf,IAAyB;QAEzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,cAAc,kBAAkB,CAAC,OAAO,CAAC,yBAAyB,EAClE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CACzB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,oBAAoB,CAC/B,OAAe,EACf,OAA4E;QAE5E,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,cAAc,kBAAkB,CAAC,OAAO,CAAC,yBAAyB,EAClE;YACE,KAAK,EAAE;gBACL,UAAU,EAAE,OAAO,CAAC,SAAS;gBAC7B,WAAW,EAAE,OAAO,CAAC,UAAU;gBAC/B,0BAA0B,EAAE,OAAO,CAAC,aAAa;aAClD;SACF,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -9,7 +9,7 @@ export { KbmClient, type BulkFilesResponse, type BulkResourceResult, type BulkWe
|
|
|
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
10
|
export { Transport, type FormBody, type FormFilePart, type RequestCapture, type TransportOptions, } from "./api/transport.js";
|
|
11
11
|
export { CaptureLog, captureLog, defaultCapturePath, type CaptureSink, } from "./api/capture.js";
|
|
12
|
-
export { AgentSettingsClient, type AgentBlobStats, type AgentRecord, type AgentRecordKind, type AgentRecordScope, type AgentVersionRecord, type RuntimeVersionRecord, type BuildBundle, type BuildBundlePullResponse, type BuildBundlePushResponse, type BundleUploadFile, type EvaluationScorePush, type EvaluationScoreRead, type Scenario, type ScenarioResult, type ScenarioResultStatus, type ScoreReportBlocks, } from "./api/agent-settings.js";
|
|
12
|
+
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";
|
|
13
13
|
export { NetworkClient, type Network } from "./api/network.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";
|
|
@@ -31,7 +31,7 @@ export { createThread, debugInteraction, getThread, listMessages, listThreads, p
|
|
|
31
31
|
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";
|
|
32
32
|
export { buildVaultScope, getSecretByName, listSecrets, parseVaultScopeLevel, removeSecretByName, scopeLevelLabel, setSecret, validateSecretName, vaultScopeLevels, type SetSecretParams, type VaultScopeLevel, type VaultServiceOptions, } from "./services/vault.js";
|
|
33
33
|
export { addFiles, addUrls, createHub, deleteHub, getHubByName, hubRefCheck, hubStatus, listHubs, programHubRefs, type HubStatus, type HubUploadResult, type KnowledgeServiceOptions, } from "./services/knowledge.js";
|
|
34
|
-
export { INTENT_DIR, REPORT_BLOCK_KEYS, SCENARIOS_DIR, SCENARIOS_FILE, SCORES_FILE, assembleBundleUpload, 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";
|
|
34
|
+
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";
|
|
35
35
|
export { currentProfile, listProfiles, useProfile, type CurrentProfile, type ProfileSummary, } from "./services/profile.service.js";
|
|
36
36
|
export { captureFailed, filterCaptures, formatCurl, readCapturedRequests, type CaptureFilters, } from "./services/requests.js";
|
|
37
37
|
export { runDoctor, type DoctorCheck, type DoctorOptions, type DoctorReport, type DoctorSection, type DoctorStatus, } from "./services/doctor.js";
|
|
@@ -30,7 +30,7 @@ export { createThread, debugInteraction, getThread, listMessages, listThreads, p
|
|
|
30
30
|
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";
|
|
31
31
|
export { buildVaultScope, getSecretByName, listSecrets, parseVaultScopeLevel, removeSecretByName, scopeLevelLabel, setSecret, validateSecretName, vaultScopeLevels, } from "./services/vault.js";
|
|
32
32
|
export { addFiles, addUrls, createHub, deleteHub, getHubByName, hubRefCheck, hubStatus, listHubs, programHubRefs, } from "./services/knowledge.js";
|
|
33
|
-
export { INTENT_DIR, REPORT_BLOCK_KEYS, SCENARIOS_DIR, SCENARIOS_FILE, SCORES_FILE, assembleBundleUpload, listIntentFiles, pullScenarios, pullScores, pushScenarioBundle, pushScores, readLocalScenarios, readLocalScores, scaffoldScenarios, scenariosPaths, scoresToPushBody, syncScenarios, validateScenariosFile, writeLocalScenarios, writeLocalScores, } from "./services/scenarios.js";
|
|
33
|
+
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";
|
|
34
34
|
export { currentProfile, listProfiles, useProfile, } from "./services/profile.service.js";
|
|
35
35
|
export { captureFailed, filterCaptures, formatCurl, readCapturedRequests, } from "./services/requests.js";
|
|
36
36
|
export { runDoctor, } from "./services/doctor.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,YAAY,GAOb,MAAM,kBAA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Z,UAAU,GAGX,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,aAAa,EACb,cAAc,EACd,UAAU,EACV,oBAAoB,GAErB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,SAAS,GAMV,MAAM,sBAAsB,CAAC;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,EAAE,aAAa,EAAoB,MAAM,qBAAqB,CAAC;AAEtE,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"}
|
|
@@ -49,28 +49,33 @@ export declare function readLocalScores(checkoutRoot: string): Promise<LocalScor
|
|
|
49
49
|
export declare function writeLocalScores(checkoutRoot: string, data: LocalScores): Promise<void>;
|
|
50
50
|
/** Absolute paths of every file directly under `scenarios/intent/`. */
|
|
51
51
|
export declare function listIntentFiles(checkoutRoot: string): Promise<string[]>;
|
|
52
|
+
/** Every file under `scenarios/` except `scores.json`, as relative POSIX paths. */
|
|
53
|
+
export declare function listBundleFiles(checkoutRoot: string): Promise<{
|
|
54
|
+
rel: string;
|
|
55
|
+
abs: string;
|
|
56
|
+
}[]>;
|
|
52
57
|
/**
|
|
53
58
|
* Pre-flight the suite against the server contract so a push fails here
|
|
54
59
|
* with a clear message instead of a remote 422. Returns the scenarios.
|
|
55
60
|
*/
|
|
56
61
|
export declare function validateScenariosFile(file: ScenariosFile): LocalScenario[];
|
|
57
62
|
export interface AssembledBundle {
|
|
58
|
-
|
|
59
|
-
intents: BundleUploadFile[];
|
|
63
|
+
files: BundleUploadFile[];
|
|
60
64
|
scenariosCount: number;
|
|
61
65
|
}
|
|
62
66
|
/**
|
|
63
67
|
* Assemble a bundle push from the checkout: the validated suite plus every
|
|
64
|
-
*
|
|
65
|
-
*
|
|
68
|
+
* other file under `scenarios/` except `scores.json`. Throws when the suite
|
|
69
|
+
* is missing/invalid or a file is too large.
|
|
66
70
|
*/
|
|
67
71
|
export declare function assembleBundleUpload(checkoutRoot: string): Promise<AssembledBundle>;
|
|
68
72
|
export interface PushBundleResult {
|
|
69
73
|
version: number;
|
|
70
74
|
scenariosCount: number;
|
|
75
|
+
filesCount: number;
|
|
71
76
|
intentsCount: number;
|
|
72
77
|
}
|
|
73
|
-
/** Push the checkout's
|
|
78
|
+
/** Push the checkout's scenarios tree as a new bundle version. */
|
|
74
79
|
export declare function pushScenarioBundle(context: Context, params?: {
|
|
75
80
|
notes?: string;
|
|
76
81
|
}, options?: ScenariosServiceOptions): Promise<PushBundleResult>;
|
|
@@ -102,12 +107,13 @@ export interface PullScenariosResult {
|
|
|
102
107
|
found: boolean;
|
|
103
108
|
version?: number;
|
|
104
109
|
scenariosCount?: number;
|
|
110
|
+
filesCount?: number;
|
|
105
111
|
intentsCount?: number;
|
|
106
112
|
}
|
|
107
113
|
/**
|
|
108
|
-
* Pull the latest (or a specific) bundle into `scenarios/`:
|
|
109
|
-
*
|
|
110
|
-
*
|
|
114
|
+
* Pull the latest (or a specific) bundle into `scenarios/`: downloads every
|
|
115
|
+
* file via its signed URL. `found: false` (no throw) when the agent has no
|
|
116
|
+
* bundle yet.
|
|
111
117
|
*/
|
|
112
118
|
export declare function pullScenarios(context: Context, params?: {
|
|
113
119
|
bundleVersion?: number;
|
|
@@ -129,6 +135,7 @@ export interface SyncScenariosResult {
|
|
|
129
135
|
found: boolean;
|
|
130
136
|
version?: number;
|
|
131
137
|
scenariosCount?: number;
|
|
138
|
+
filesCount?: number;
|
|
132
139
|
intentsCount?: number;
|
|
133
140
|
scoresFound?: boolean;
|
|
134
141
|
/** Set when the pull failed; callers note it but do NOT fail. */
|
|
@@ -9,11 +9,10 @@
|
|
|
9
9
|
* scores.json last evaluation result (written by the scoring skill)
|
|
10
10
|
* intent/ raw source material: intent docs, sample data
|
|
11
11
|
*
|
|
12
|
-
* Remote truth is
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* layout only.
|
|
12
|
+
* Remote truth is agent-settings: opaque build bundles (any relative path,
|
|
13
|
+
* versioned) and evaluation scores (append-only per agent version). The
|
|
14
|
+
* wire uses those relative paths as-is; everything here speaks the local
|
|
15
|
+
* `scenarios/` layout only.
|
|
17
16
|
*/
|
|
18
17
|
import { mkdir, readdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
19
18
|
import path from "node:path";
|
|
@@ -125,6 +124,38 @@ export async function listIntentFiles(checkoutRoot) {
|
|
|
125
124
|
}
|
|
126
125
|
return files;
|
|
127
126
|
}
|
|
127
|
+
const SKIP_BUNDLE_DIRS = new Set([".git", "__pycache__", ".venv", "node_modules"]);
|
|
128
|
+
/** Every file under `scenarios/` except `scores.json`, as relative POSIX paths. */
|
|
129
|
+
export async function listBundleFiles(checkoutRoot) {
|
|
130
|
+
const { dir } = scenariosPaths(checkoutRoot);
|
|
131
|
+
const out = [];
|
|
132
|
+
async function walk(current) {
|
|
133
|
+
let entries;
|
|
134
|
+
try {
|
|
135
|
+
entries = await readdir(current, { withFileTypes: true });
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
141
|
+
const abs = path.join(current, entry.name);
|
|
142
|
+
if (entry.isDirectory()) {
|
|
143
|
+
if (SKIP_BUNDLE_DIRS.has(entry.name))
|
|
144
|
+
continue;
|
|
145
|
+
await walk(abs);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
if (!entry.isFile())
|
|
149
|
+
continue;
|
|
150
|
+
const rel = path.relative(dir, abs).split(path.sep).join("/");
|
|
151
|
+
if (rel === SCORES_FILE)
|
|
152
|
+
continue;
|
|
153
|
+
out.push({ rel, abs });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
await walk(dir);
|
|
157
|
+
return out;
|
|
158
|
+
}
|
|
128
159
|
// ─── Validation ───
|
|
129
160
|
/**
|
|
130
161
|
* Pre-flight the suite against the server contract so a push fails here
|
|
@@ -170,8 +201,8 @@ function requireUserId(context) {
|
|
|
170
201
|
}
|
|
171
202
|
/**
|
|
172
203
|
* Assemble a bundle push from the checkout: the validated suite plus every
|
|
173
|
-
*
|
|
174
|
-
*
|
|
204
|
+
* other file under `scenarios/` except `scores.json`. Throws when the suite
|
|
205
|
+
* is missing/invalid or a file is too large.
|
|
175
206
|
*/
|
|
176
207
|
export async function assembleBundleUpload(checkoutRoot) {
|
|
177
208
|
const suite = await readLocalScenarios(checkoutRoot);
|
|
@@ -182,40 +213,33 @@ export async function assembleBundleUpload(checkoutRoot) {
|
|
|
182
213
|
});
|
|
183
214
|
}
|
|
184
215
|
const scenarios = validateScenariosFile(suite);
|
|
185
|
-
const
|
|
186
|
-
for (const
|
|
187
|
-
const
|
|
188
|
-
const content = await readFile(intentPath);
|
|
189
|
-
if (content.length === 0) {
|
|
190
|
-
throw new ValidationError(`Intent file "${filename}" is empty.`);
|
|
191
|
-
}
|
|
216
|
+
const files = [];
|
|
217
|
+
for (const { rel, abs } of await listBundleFiles(checkoutRoot)) {
|
|
218
|
+
const content = await readFile(abs);
|
|
192
219
|
if (content.length > MAX_FILE_BYTES) {
|
|
193
|
-
throw new ValidationError(`
|
|
220
|
+
throw new ValidationError(`File "${rel}" exceeds the 5 MB limit (${String(content.length)} bytes).`);
|
|
194
221
|
}
|
|
195
|
-
|
|
222
|
+
files.push({ path: rel, content });
|
|
196
223
|
}
|
|
197
|
-
return {
|
|
198
|
-
scenariosJson: `${JSON.stringify(suite, null, 2)}\n`,
|
|
199
|
-
intents,
|
|
200
|
-
scenariosCount: scenarios.length,
|
|
201
|
-
};
|
|
224
|
+
return { files, scenariosCount: scenarios.length };
|
|
202
225
|
}
|
|
203
|
-
/** Push the checkout's
|
|
226
|
+
/** Push the checkout's scenarios tree as a new bundle version. */
|
|
204
227
|
export async function pushScenarioBundle(context, params = {}, options = {}) {
|
|
205
228
|
const root = requireCheckout(context);
|
|
206
229
|
const agentId = requireAgentId(context);
|
|
207
230
|
const createdBy = requireUserId(context);
|
|
208
231
|
const assembled = await assembleBundleUpload(root);
|
|
209
232
|
const response = await clientsFor(context, options).agentSettings.pushBuildBundle(agentId, {
|
|
210
|
-
|
|
211
|
-
intents: assembled.intents,
|
|
233
|
+
files: assembled.files,
|
|
212
234
|
createdBy,
|
|
213
235
|
...(params.notes ? { notes: params.notes } : {}),
|
|
214
236
|
});
|
|
237
|
+
const filesCount = response.files_count ?? assembled.files.length;
|
|
215
238
|
return {
|
|
216
239
|
version: response.version,
|
|
217
|
-
scenariosCount:
|
|
218
|
-
|
|
240
|
+
scenariosCount: assembled.scenariosCount,
|
|
241
|
+
filesCount,
|
|
242
|
+
intentsCount: Math.max(0, filesCount - (assembled.files.some((f) => f.path === SCENARIOS_FILE) ? 1 : 0)),
|
|
219
243
|
};
|
|
220
244
|
}
|
|
221
245
|
/**
|
|
@@ -297,22 +321,24 @@ export async function pushScores(context, params = {}, options = {}) {
|
|
|
297
321
|
versionTag: response.version_tag,
|
|
298
322
|
};
|
|
299
323
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
324
|
+
function safeBundleRel(rel) {
|
|
325
|
+
const normalized = rel.replaceAll("\\", "/").replace(/^\/+/, "");
|
|
326
|
+
if (!normalized || normalized.split("/").includes(".."))
|
|
327
|
+
return undefined;
|
|
328
|
+
return normalized;
|
|
329
|
+
}
|
|
330
|
+
async function downloadBundleFile(dest, signedUrl, label, fetchImpl) {
|
|
331
|
+
const download = await fetchImpl(signedUrl);
|
|
332
|
+
if (!download.ok) {
|
|
333
|
+
throw new CliError(`Failed to download "${label}": ${String(download.status)} ${download.statusText}`);
|
|
309
334
|
}
|
|
310
|
-
|
|
335
|
+
await mkdir(path.dirname(dest), { recursive: true });
|
|
336
|
+
await writeFile(dest, Buffer.from(await download.arrayBuffer()));
|
|
311
337
|
}
|
|
312
338
|
/**
|
|
313
|
-
* Pull the latest (or a specific) bundle into `scenarios/`:
|
|
314
|
-
*
|
|
315
|
-
*
|
|
339
|
+
* Pull the latest (or a specific) bundle into `scenarios/`: downloads every
|
|
340
|
+
* file via its signed URL. `found: false` (no throw) when the agent has no
|
|
341
|
+
* bundle yet.
|
|
316
342
|
*/
|
|
317
343
|
export async function pullScenarios(context, params = {}, options = {}) {
|
|
318
344
|
const root = requireCheckout(context);
|
|
@@ -332,30 +358,25 @@ export async function pullScenarios(context, params = {}, options = {}) {
|
|
|
332
358
|
}
|
|
333
359
|
throw error;
|
|
334
360
|
}
|
|
335
|
-
const { bundle
|
|
336
|
-
|
|
337
|
-
scenarios: bundle.scenarios.map(scenarioToLocal),
|
|
338
|
-
});
|
|
339
|
-
const { intentDir } = scenariosPaths(root);
|
|
361
|
+
const { bundle } = response;
|
|
362
|
+
const { dir } = scenariosPaths(root);
|
|
340
363
|
const fetchImpl = fetchFor(options);
|
|
341
|
-
let
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
if (!download.ok) {
|
|
349
|
-
throw new CliError(`Failed to download intent "${safeName}": ${String(download.status)} ${download.statusText}`);
|
|
350
|
-
}
|
|
351
|
-
await writeFile(path.join(intentDir, safeName), Buffer.from(await download.arrayBuffer()));
|
|
352
|
-
intentsCount += 1;
|
|
364
|
+
let filesCount = 0;
|
|
365
|
+
for (const [rel, signedUrl] of Object.entries(response.file_urls ?? {})) {
|
|
366
|
+
const safeRel = safeBundleRel(rel);
|
|
367
|
+
if (!safeRel || typeof signedUrl !== "string" || !signedUrl)
|
|
368
|
+
continue;
|
|
369
|
+
await downloadBundleFile(path.join(dir, ...safeRel.split("/")), signedUrl, safeRel, fetchImpl);
|
|
370
|
+
filesCount += 1;
|
|
353
371
|
}
|
|
372
|
+
const suite = await readLocalScenarios(root);
|
|
373
|
+
const scenariosCount = suite?.scenarios.length ?? 0;
|
|
354
374
|
return {
|
|
355
375
|
found: true,
|
|
356
376
|
version: bundle.version,
|
|
357
|
-
scenariosCount
|
|
358
|
-
|
|
377
|
+
scenariosCount,
|
|
378
|
+
filesCount,
|
|
379
|
+
intentsCount: Math.max(0, filesCount - (suite ? 1 : 0)),
|
|
359
380
|
};
|
|
360
381
|
}
|
|
361
382
|
/**
|
|
@@ -418,6 +439,7 @@ export async function syncScenarios(context, options = {}) {
|
|
|
418
439
|
...(bundle.scenariosCount === undefined
|
|
419
440
|
? {}
|
|
420
441
|
: { scenariosCount: bundle.scenariosCount }),
|
|
442
|
+
...(bundle.filesCount === undefined ? {} : { filesCount: bundle.filesCount }),
|
|
421
443
|
...(bundle.intentsCount === undefined
|
|
422
444
|
? {}
|
|
423
445
|
: { intentsCount: bundle.intentsCount }),
|