@aui.io/apollo 0.1.65 → 0.1.67
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 +37 -19
- 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/runtime-version.js +12 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/runtime-version.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/upgrade.d.ts +12 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/upgrade.js +21 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/commands/upgrade.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/index.d.ts +11 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/index.js +95 -8
- package/node_modules/@aui.io/apollo-cli/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-cli/dist/src/update-refresh.d.ts +1 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/update-refresh.js +21 -0
- package/node_modules/@aui.io/apollo-cli/dist/src/update-refresh.js.map +1 -0
- package/node_modules/@aui.io/apollo-cli/package.json +3 -3
- package/node_modules/@aui.io/apollo-core/dist/src/api/clone.d.ts +100 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/clone.js +30 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/clone.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/retry.js +6 -3
- package/node_modules/@aui.io/apollo-core/dist/src/api/retry.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/api/transport.d.ts +15 -0
- package/node_modules/@aui.io/apollo-core/dist/src/api/transport.js +12 -4
- package/node_modules/@aui.io/apollo-core/dist/src/api/transport.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/store.d.ts +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/config/store.js +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/config/store.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/index.d.ts +6 -3
- package/node_modules/@aui.io/apollo-core/dist/src/index.js +4 -1
- package/node_modules/@aui.io/apollo-core/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/output/index.d.ts +27 -5
- package/node_modules/@aui.io/apollo-core/dist/src/output/index.js +28 -5
- package/node_modules/@aui.io/apollo-core/dist/src/output/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.d.ts +28 -1
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.js +86 -7
- package/node_modules/@aui.io/apollo-core/dist/src/runtime-version/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.d.ts +3 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js +19 -12
- package/node_modules/@aui.io/apollo-core/dist/src/services/clients.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/clone.d.ts +80 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/clone.js +129 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/clone.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.js +13 -7
- package/node_modules/@aui.io/apollo-core/dist/src/services/status.service.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/dist/src/services/update-check.d.ts +105 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/update-check.js +265 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/update-check.js.map +1 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/upgrade.d.ts +11 -0
- package/node_modules/@aui.io/apollo-core/dist/src/services/upgrade.js +6 -2
- package/node_modules/@aui.io/apollo-core/dist/src/services/upgrade.js.map +1 -1
- package/node_modules/@aui.io/apollo-core/package.json +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/index.d.ts +2 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/index.js +2 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/index.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +41 -22
- 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/update.d.ts +16 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/update.js +21 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/lib/update.js.map +1 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +37 -19
- 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 +24 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js +41 -4
- package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/dist/src/theme/glyphs.d.ts +2 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/theme/glyphs.js +2 -0
- package/node_modules/@aui.io/apollo-tui/dist/src/theme/glyphs.js.map +1 -1
- package/node_modules/@aui.io/apollo-tui/package.json +2 -2
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aui.io/apollo-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.67",
|
|
4
4
|
"description": "Command-line client for the Apollo runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"test": "vitest run"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@aui.io/apollo-core": "0.1.
|
|
36
|
+
"@aui.io/apollo-core": "0.1.67",
|
|
37
37
|
"commander": "^14.0.3",
|
|
38
38
|
"picocolors": "^1.1.1"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
|
-
"@aui.io/apollo-tui": "0.1.
|
|
41
|
+
"@aui.io/apollo-tui": "0.1.67"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@eslint/js": "^9.39.5",
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent clone client — apollo-api's internal clone manager
|
|
3
|
+
* (`/internal/management/v1/clone/agents`). A clone is a background job:
|
|
4
|
+
* apollo validates the request synchronously, hands the write phase to a
|
|
5
|
+
* worker, and the caller polls the task. Apollo reads the source from the
|
|
6
|
+
* environment it is deployed in and writes the target itself — in the same
|
|
7
|
+
* environment or a peer one — so the console only ever talks to the SOURCE
|
|
8
|
+
* side and names the target in the body.
|
|
9
|
+
*/
|
|
10
|
+
import type { HttpClient } from "./client-types.js";
|
|
11
|
+
/** apollo's `Environment` enum value: `STAGING`, `PRODUCTION` or `CUSTOM`. */
|
|
12
|
+
export type CloneEnvironment = string;
|
|
13
|
+
export interface AgentCloneSourceScope {
|
|
14
|
+
environment: CloneEnvironment;
|
|
15
|
+
agent_id: string;
|
|
16
|
+
/** Omitted = the source agent's active version. */
|
|
17
|
+
version_id?: string;
|
|
18
|
+
organization_id: string;
|
|
19
|
+
/** Required on the wire; null when the checkout binds no project. */
|
|
20
|
+
project_id: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface AgentCloneTargetScope {
|
|
23
|
+
environment: CloneEnvironment;
|
|
24
|
+
organization_id: string;
|
|
25
|
+
project_id: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AgentCloneRequest {
|
|
28
|
+
source_scope: AgentCloneSourceScope;
|
|
29
|
+
target_scope: AgentCloneTargetScope;
|
|
30
|
+
/** The caller's identity user id in the SOURCE environment; apollo
|
|
31
|
+
* translates it for a cross-environment target. */
|
|
32
|
+
created_by: string;
|
|
33
|
+
overwrite_mock_db?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface AgentCloneAccepted {
|
|
36
|
+
task_id: string;
|
|
37
|
+
}
|
|
38
|
+
export interface AgentCloneReport {
|
|
39
|
+
completed_steps: string[];
|
|
40
|
+
skipped_steps: Record<string, string>;
|
|
41
|
+
created_resources: Record<string, string>;
|
|
42
|
+
thread_id_map?: Record<string, string>;
|
|
43
|
+
failed_task_imports?: Record<string, string>;
|
|
44
|
+
target_build_bundle_version?: number | null;
|
|
45
|
+
/** Vault secret names the clone still needs — values never leave the vault. */
|
|
46
|
+
secrets_to_set?: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface AgentCloneTargetAgent {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
account_id?: string | null;
|
|
52
|
+
organization_id?: string | null;
|
|
53
|
+
active_version_id?: string | null;
|
|
54
|
+
active_version_tag?: string | null;
|
|
55
|
+
}
|
|
56
|
+
export interface AgentCloneResult {
|
|
57
|
+
agent: AgentCloneTargetAgent;
|
|
58
|
+
target_version_id: string;
|
|
59
|
+
report: AgentCloneReport;
|
|
60
|
+
}
|
|
61
|
+
export interface AgentCloneDryRun {
|
|
62
|
+
source_agent_name: string;
|
|
63
|
+
resolved_source_version_id: string;
|
|
64
|
+
target_network_name: string;
|
|
65
|
+
knowledge_bases_mode: "same_environment" | "cross_environment";
|
|
66
|
+
build_bundle_version?: number | null;
|
|
67
|
+
scenarios_count?: number;
|
|
68
|
+
files_verified?: number;
|
|
69
|
+
threads_to_migrate?: number;
|
|
70
|
+
/** null = the mock-db clone would run. */
|
|
71
|
+
mock_db_skip_reason?: string | null;
|
|
72
|
+
mock_db_connections?: number;
|
|
73
|
+
secrets_to_set?: string[];
|
|
74
|
+
warnings?: string[];
|
|
75
|
+
completed_checks: string[];
|
|
76
|
+
skipped_checks: Record<string, string>;
|
|
77
|
+
}
|
|
78
|
+
export type AgentCloneState = "pending" | "started" | "success" | "failure";
|
|
79
|
+
export interface AgentCloneError {
|
|
80
|
+
status_code?: number | null;
|
|
81
|
+
code?: string | null;
|
|
82
|
+
message: string;
|
|
83
|
+
extra_data?: Record<string, unknown>;
|
|
84
|
+
}
|
|
85
|
+
/** `response` / `error` are set only once `state` is terminal. */
|
|
86
|
+
export interface AgentCloneStatus {
|
|
87
|
+
task_id: string;
|
|
88
|
+
state: AgentCloneState;
|
|
89
|
+
response?: AgentCloneResult | null;
|
|
90
|
+
error?: AgentCloneError | null;
|
|
91
|
+
}
|
|
92
|
+
export declare class CloneClient {
|
|
93
|
+
private readonly http;
|
|
94
|
+
constructor(http: HttpClient);
|
|
95
|
+
/** Validate, then enqueue the write phase — 202 with the task to poll. */
|
|
96
|
+
cloneAgent(body: AgentCloneRequest): Promise<AgentCloneAccepted>;
|
|
97
|
+
/** The full read phase, nothing written: what the clone would do. */
|
|
98
|
+
cloneAgentDryRun(body: AgentCloneRequest): Promise<AgentCloneDryRun>;
|
|
99
|
+
cloneAgentStatus(taskId: string): Promise<AgentCloneStatus>;
|
|
100
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const CLONE_AGENTS = "/internal/management/v1/clone/agents";
|
|
2
|
+
/** Apollo's read phase downloads and verifies the whole bundle tree before
|
|
3
|
+
* answering, so the two POSTs outlive the transport default on big agents. */
|
|
4
|
+
const CLONE_SUBMIT_TIMEOUT_MS = 180_000;
|
|
5
|
+
export class CloneClient {
|
|
6
|
+
http;
|
|
7
|
+
constructor(http) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
}
|
|
10
|
+
/** Validate, then enqueue the write phase — 202 with the task to poll. */
|
|
11
|
+
cloneAgent(body) {
|
|
12
|
+
return this.http.request(CLONE_AGENTS, {
|
|
13
|
+
method: "POST",
|
|
14
|
+
body,
|
|
15
|
+
timeoutMs: CLONE_SUBMIT_TIMEOUT_MS,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/** The full read phase, nothing written: what the clone would do. */
|
|
19
|
+
cloneAgentDryRun(body) {
|
|
20
|
+
return this.http.request(`${CLONE_AGENTS}/dry-run`, {
|
|
21
|
+
method: "POST",
|
|
22
|
+
body,
|
|
23
|
+
timeoutMs: CLONE_SUBMIT_TIMEOUT_MS,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
cloneAgentStatus(taskId) {
|
|
27
|
+
return this.http.request(`${CLONE_AGENTS}/${encodeURIComponent(taskId)}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=clone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../../src/api/clone.ts"],"names":[],"mappings":"AAWA,MAAM,YAAY,GAAG,sCAAsC,CAAC;AAE5D;8EAC8E;AAC9E,MAAM,uBAAuB,GAAG,OAAO,CAAC;AA+FxC,MAAM,OAAO,WAAW;IACc;IAApC,YAAoC,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExD,0EAA0E;IACnE,UAAU,CAAC,IAAuB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAqB,YAAY,EAAE;YACzD,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,SAAS,EAAE,uBAAuB;SACnC,CAAC,CAAC;IACL,CAAC;IAED,qEAAqE;IAC9D,gBAAgB,CAAC,IAAuB;QAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAmB,GAAG,YAAY,UAAU,EAAE;YACpE,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,SAAS,EAAE,uBAAuB;SACnC,CAAC,CAAC;IACL,CAAC;IAEM,gBAAgB,CAAC,MAAc;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACtB,GAAG,YAAY,IAAI,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAChD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -5,15 +5,18 @@
|
|
|
5
5
|
* have succeeded.
|
|
6
6
|
*
|
|
7
7
|
* Only transient failures are retried — network errors and 5xx answers. A
|
|
8
|
-
* 4xx is the server understanding the request and refusing it
|
|
9
|
-
*
|
|
8
|
+
* 4xx is the server understanding the request and refusing it, and a
|
|
9
|
+
* configuration or validation error is the console refusing its own input;
|
|
10
|
+
* asking again changes nothing.
|
|
10
11
|
*/
|
|
11
|
-
import { ApiError } from "../errors/index.js";
|
|
12
|
+
import { ApiError, CliError, ExitCode } from "../errors/index.js";
|
|
12
13
|
const ATTEMPTS = 3;
|
|
13
14
|
const BASE_DELAY_MS = 400;
|
|
14
15
|
function isTransient(error) {
|
|
15
16
|
if (error instanceof ApiError)
|
|
16
17
|
return error.status >= 500;
|
|
18
|
+
if (error instanceof CliError)
|
|
19
|
+
return error.exitCode === ExitCode.runtime;
|
|
17
20
|
return true;
|
|
18
21
|
}
|
|
19
22
|
export async function withRetries(fn, attempts = ATTEMPTS) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../src/api/retry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../src/api/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,QAAQ,GAAG,CAAC,CAAC;AACnB,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,YAAY,QAAQ;QAAE,OAAO,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC;IAC1D,IAAI,KAAK,YAAY,QAAQ;QAAE,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,CAAC;IAC1E,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,EAAoB,EACpB,QAAQ,GAAG,QAAQ;IAEnB,IAAI,SAAkB,CAAC;IACvB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,QAAQ,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC;QACxD,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,QAAQ;gBAAE,MAAM,KAAK,CAAC;YAC7D,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC5B,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC;YAC/C,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,MAAM,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -36,12 +36,26 @@ export interface TransportOptions {
|
|
|
36
36
|
* being set by the handful of endpoints that happen to care.
|
|
37
37
|
*/
|
|
38
38
|
headers?: Record<string, string>;
|
|
39
|
+
/**
|
|
40
|
+
* Where this service is served, when that depends on state the transport
|
|
41
|
+
* does not hold — a runtime pin resolves through the catalog to the
|
|
42
|
+
* deployment's own link, or to the gateway with a routable build in the
|
|
43
|
+
* header. Resolved once per request, before any retry; `baseUrl` with the
|
|
44
|
+
* transport headers is the answer when unset.
|
|
45
|
+
*/
|
|
46
|
+
resolveRoute?: () => Promise<TransportRoute>;
|
|
39
47
|
fetch?: typeof globalThis.fetch;
|
|
40
48
|
refresh?: () => Promise<string>;
|
|
41
49
|
/** Capture destination — defaults to the shared log; `false` opts out. */
|
|
42
50
|
captureSink?: CaptureSink | false;
|
|
43
51
|
authHeader?: string;
|
|
44
52
|
}
|
|
53
|
+
/** Where a request goes: a base URL, plus headers that override the
|
|
54
|
+
* transport's own for that destination. */
|
|
55
|
+
export interface TransportRoute {
|
|
56
|
+
baseUrl: string;
|
|
57
|
+
headers?: Record<string, string>;
|
|
58
|
+
}
|
|
45
59
|
/** One file part of a multipart request. */
|
|
46
60
|
export interface FormFilePart {
|
|
47
61
|
/** Multipart field name (repeatable, e.g. "files"). */
|
|
@@ -80,6 +94,7 @@ export declare class Transport {
|
|
|
80
94
|
private get token();
|
|
81
95
|
private set token(value);
|
|
82
96
|
request<T>(path: string, requestOptions?: RequestOptions): Promise<T>;
|
|
97
|
+
private route;
|
|
83
98
|
private perform;
|
|
84
99
|
private apiError;
|
|
85
100
|
}
|
|
@@ -19,11 +19,12 @@ export class Transport {
|
|
|
19
19
|
async request(path, requestOptions = {}) {
|
|
20
20
|
const method = requestOptions.method ?? "GET";
|
|
21
21
|
const authenticated = requestOptions.authenticated ?? true;
|
|
22
|
+
const route = await this.route();
|
|
22
23
|
let refreshed = false;
|
|
23
24
|
let networkRetried = false;
|
|
24
25
|
for (;;) {
|
|
25
26
|
try {
|
|
26
|
-
const response = await this.perform(path, requestOptions, method);
|
|
27
|
+
const response = await this.perform(route, path, requestOptions, method);
|
|
27
28
|
if (response.status === 401 &&
|
|
28
29
|
authenticated &&
|
|
29
30
|
!refreshed &&
|
|
@@ -51,18 +52,25 @@ export class Transport {
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
+
route() {
|
|
56
|
+
return this.options.resolveRoute === undefined
|
|
57
|
+
? Promise.resolve({ baseUrl: this.options.baseUrl })
|
|
58
|
+
: this.options.resolveRoute();
|
|
59
|
+
}
|
|
60
|
+
async perform(route, path, requestOptions, method) {
|
|
55
61
|
const authenticated = requestOptions.authenticated ?? true;
|
|
56
62
|
if (authenticated && this.token === undefined) {
|
|
57
63
|
throw new AuthError(`Authentication is required for ${this.options.service}.`);
|
|
58
64
|
}
|
|
59
|
-
const
|
|
60
|
-
const url = new URL(path.replace(/^\/+/, ""), baseUrl);
|
|
65
|
+
const url = new URL(path.replace(/^\/+/, ""), `${route.baseUrl.replace(/\/+$/, "")}/`);
|
|
61
66
|
for (const [key, value] of Object.entries(requestOptions.query ?? {})) {
|
|
62
67
|
if (value !== undefined)
|
|
63
68
|
url.searchParams.append(key, String(value));
|
|
64
69
|
}
|
|
65
70
|
const headers = new Headers(this.options.headers);
|
|
71
|
+
for (const [key, value] of Object.entries(route.headers ?? {})) {
|
|
72
|
+
headers.set(key, value);
|
|
73
|
+
}
|
|
66
74
|
for (const [key, value] of Object.entries(requestOptions.headers ?? {})) {
|
|
67
75
|
headers.set(key, value);
|
|
68
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../src/api/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAoB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../src/api/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAoB,MAAM,cAAc,CAAC;AA4F5D,MAAM,OAAO,SAAS;IAKS;IAJpB,QAAQ,GAAqB,EAAE,CAAC;IACxB,WAAW,CAAuB;IAClC,SAAS,CAA0B;IAEpD,YAA6B,OAAyB;QAAzB,YAAO,GAAP,OAAO,CAAkB;QACpD,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;QACrE,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC;IACrD,CAAC;IAED,IAAY,KAAK;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;IAClC,CAAC;IAED,IAAY,KAAK,CAAC,KAAyB;QACzC,IAAI,CAAC,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,OAAO,CACX,IAAY,EACZ,iBAAiC,EAAE;QAEnC,MAAM,MAAM,GAAG,cAAc,CAAC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AE,CAAC;QAChD,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC;YACpD,QAAQ;YACR,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC;SAC7B,CAAC,CACH,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,uEAAuE;IACvE,oEAAoE;IACpE,kEAAkE;IAClE,sCAAsC;IACtC,OAAO,kDAAkD,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -29,3 +29,4 @@ export declare function updateProfile(homeDir: string, profile: string): Promise
|
|
|
29
29
|
/** Bootstrap default project for one profile × environment (config.json). */
|
|
30
30
|
export declare function defaultProject(config: UserConfig, profile: string, environment: Environment): string | undefined;
|
|
31
31
|
export declare function setDefaultProject(homeDir: string, profile: string, environment: Environment, projectId: string | undefined): Promise<void>;
|
|
32
|
+
export declare function writeJsonAtomic(path: string, value: unknown, mode: number): Promise<void>;
|
|
@@ -143,7 +143,7 @@ export async function setDefaultProject(homeDir, profile, environment, projectId
|
|
|
143
143
|
}
|
|
144
144
|
await writeUserConfig(homeDir, next);
|
|
145
145
|
}
|
|
146
|
-
async function writeJsonAtomic(path, value, mode) {
|
|
146
|
+
export async function writeJsonAtomic(path, value, mode) {
|
|
147
147
|
await mkdir(dirname(path), { recursive: true, mode: 0o700 });
|
|
148
148
|
const temporary = `${path}.${process.pid}.tmp`;
|
|
149
149
|
await writeFile(temporary, `${JSON.stringify(value, null, 2)}\n`, { mode });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/config/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE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,CAAC,EAAE,CAAC;QACpC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;SAAM,CAAC;QACN,QAAQ,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IAC5B,CAAC;IACD,MAAM,IAAI,GAAe,EAAE,GAAG,MAAM,EAAE,CAAC;IACvC,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IACD,MAAM,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,IAAY,EACZ,KAAc,EACd,IAAY;IAEZ,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;IAC/C,MAAM,SAAS,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5E,MAAM,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -4,11 +4,12 @@ export type { HttpClient, Page, RequestOptions as HttpRequestOptions } from "./a
|
|
|
4
4
|
export { IdentityClient, browserLogin, type LoginResult, type Organization, } from "./api/identity.js";
|
|
5
5
|
export { findLiveVersion, ManagementClient, parseVersionTag, type Agent, type AgentVersion, type Project, type VersionPull, type VersionPush, type VersionSource, type VersionStatus, } from "./api/management.js";
|
|
6
6
|
export { MOCKDB_SERVICE_NAME, MockDbClient, mockDbErrorCode, type MockDbAuth, type MockDbClientOptions, type MockDbCloneResponse, type MockDbIdentitiesResponse, type MockDbIdentitiesUpsertResponse, type MockDbMgmtAuth, type MockDbProvisionResponse, type MockDbRuntimeAuth, type MockDbSampleData, type MockDbStatusResponse, type MockDbTokenAuth, } from "./api/mock-db.js";
|
|
7
|
+
export { CloneClient, type AgentCloneDryRun, type AgentCloneError, type AgentCloneReport, type AgentCloneRequest, type AgentCloneResult, type AgentCloneState, type AgentCloneStatus, type CloneEnvironment, } from "./api/clone.js";
|
|
7
8
|
export { VaultClient, type VaultScope, type VaultScopeType, type VaultSecret, type VaultSecretCreate, type VaultSecretUpdate, } from "./api/vault.js";
|
|
8
9
|
export { KbmClient, type BulkFilesResponse, type BulkResourceResult, type BulkWebsitesResponse, type IndexingJob, type KnowledgeBase, type UploadFilePart, } from "./api/kbm.js";
|
|
9
10
|
export { RuntimeApiClient, type AgentOverride, type Message, type RuntimeTrace, type SendMessageRequest, type SendMessageResponse, type SkillFile, type SkillIndexItem, type Thread, } from "./api/runtime-api.js";
|
|
10
11
|
export { BuilderApiClient, type AdvisorAsk, type AdvisorStarted, type AdvisorView, type BuilderFinding, type BuilderTree, type BuilderValidation, type BuildRequest, type BuildStarted, type BuildView, type EraCensus, type OrphanCensus, type ScenarioFailure, } from "./api/builder-api.js";
|
|
11
|
-
export { Transport, type FormBody, type FormFilePart, type RequestCapture, type TransportOptions, } from "./api/transport.js";
|
|
12
|
+
export { Transport, type FormBody, type FormFilePart, type RequestCapture, type TransportOptions, type TransportRoute, } from "./api/transport.js";
|
|
12
13
|
export { CaptureLog, captureLog, defaultCapturePath, type CaptureSink, } from "./api/capture.js";
|
|
13
14
|
export { pageLane, setPageLane, type PageLane } from "./api/lane.js";
|
|
14
15
|
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";
|
|
@@ -21,7 +22,7 @@ export { clearMockDbKeys, keyPrefixes, loadMockDbKeys, saveMockDbKeys, type Mock
|
|
|
21
22
|
export { apolloDir, findBinding, patchBinding, readBinding, readCredentials, readUserConfig, updateEnvironment, updateProfile, writeBinding, writeCredentials, writeUserConfig, type ConfigPaths, } from "./config/store.js";
|
|
22
23
|
export { type BaseUrls, type ConfigFlags, type Context, type Credential, type CredentialsFile, type Environment, type ProjectBinding, type UserConfig, type WorkspacePreferences, } from "./config/types.js";
|
|
23
24
|
export { ApiError, AuthError, CliError, ConfigError, ExitCode, RuntimeUnavailableError, ValidationError, runtimeUpgradeSuggestion, toCliError, type ExitCodeValue, type RuntimeUnavailableReason, } from "./errors/index.js";
|
|
24
|
-
export { Output, errorEnvelope, successEnvelope, type ErrorEnvelope, type OutputOptions, } from "./output/index.js";
|
|
25
|
+
export { Output, errorEnvelope, successEnvelope, type ErrorEnvelope, type OutputOptions, type SuccessEnvelope, } from "./output/index.js";
|
|
25
26
|
export { loginWithBrowser, loginWithOtp, loginWithToken, logout, requestOtp, } from "./services/auth.js";
|
|
26
27
|
export { DEFAULT_SKILL_TARGETS, RUNTIME_REFRESH_DIRECTIVE, agentRoot, importBundle, listVersions, localDiff, pullBundle, pullCheckout, pushBundle, readCheckoutTree, refreshRuntimeAssets, remoteDiff, validateLocalBundle, validateProgramBundle, type BuildAreaSync, type BundleValidation, type PullCheckoutOptions, type PullCheckoutResult, type PushCheckoutResult, type RuntimeAssetsOptions, type RuntimeAssetsResult, } from "./services/bundles.js";
|
|
27
28
|
export { ADVISE_DEADLINE_MS, adviseLocalBundle, readAdvisorState, writeAdvisorState, type AdviceResult, type AdviseOptions, type AdvisorState, } from "./services/advisor.js";
|
|
@@ -30,9 +31,10 @@ export { createClients, type Clients } from "./services/clients.js";
|
|
|
30
31
|
export { listEnvironments, setEnvironment, type EnvironmentResult, type EnvironmentSummary, } from "./services/env.service.js";
|
|
31
32
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, unlinkAgent, useOrganization, useProject, useVersion, } from "./services/hierarchy.js";
|
|
32
33
|
export { AVAILABILITY_CACHE_FILE, AVAILABILITY_CACHE_TTL_MS, assertRuntimeAvailable, availabilityCachePath, checkRuntimeAvailability, familyOf, probeRuntimeAvailability, verdictFromHealth, type AvailabilityOptions, type RuntimeAvailability, type RuntimeHealth, type RuntimePinCheck, } from "./runtime-version/availability.js";
|
|
33
|
-
export { isLegacyRuntime, latestRuntimeVersion, matchRuntimeVersion, resolveRuntimeVersion, runtimeVersionLabel, runtimeVersionOptions, RUNTIME_VERSION_HEADER, type ResolvedRuntimeVersion, type RuntimeVersionOption, } from "./runtime-version/index.js";
|
|
34
|
+
export { isLegacyRuntime, isRoutableRuntimeBuild, latestRuntimeVersion, matchRuntimeVersion, resolveRuntimeVersion, runtimeRouteResolver, runtimeVersionLabel, runtimeVersionOptions, RUNTIME_VERSION_HEADER, type ResolvedRuntimeVersion, type RuntimeVersionOption, } from "./runtime-version/index.js";
|
|
34
35
|
export { createThread, getThread, listMessages, listThreads, parseVariables, sendMessage, trace, } from "./services/messaging.js";
|
|
35
36
|
export { cloneMockDb, createCollection, createEndpoint, DEFAULT_MOCKDB_TOKEN_ENV, deleteEndpoint, deleteMockDb, describeMockDb, executeEndpoint, exportMockDb, getEndpoint, getIdentities, inspectSession, listCollections, listEndpoints, MOCKDB_GUIDE, normalizeAddColumns, normalizeSampleData, normalizeSchema, parseJsonFlag, provisionMockDb, readSampleDataInput, resetSession, resolveMockDb, rotateMgmtKey, rotateRuntimeKey, seedRows, setIdentities, statusMockDb, storedKeys, updateCollection, updateEndpoint, wireMockDbConnection, writeMockDbGuide, type CloneMockDbOptions, type MockDbProvisionResult, type MockDbResolved, type MockDbServiceOptions, type MockDbStatusReport, type MockDbStatusVerdict, type RuntimeKeyResync, type RuntimeKeySource, type WireResult, } from "./services/mockdb.js";
|
|
37
|
+
export { CLONE_POLL_INTERVAL_MS, CLONE_WAIT_TIMEOUT_MS, buildCloneRequest, cloneEnvironment, cloneStatus, dryRunClone, isTerminalCloneState, resolveCloneTarget, startClone, waitForClone, type CloneAgentParams, type CloneDryRunResult, type CloneServiceOptions, type CloneStarted, type CloneTarget, type WaitForCloneOptions, } from "./services/clone.js";
|
|
36
38
|
export { buildVaultScope, getSecretByName, listSecrets, parseVaultScopeLevel, removeSecretByName, scopeLevelLabel, setSecret, validateSecretName, vaultScopeLevels, type SetSecretParams, type VaultScopeLevel, type VaultServiceOptions, } from "./services/vault.js";
|
|
37
39
|
export { addFiles, addUrls, createHub, deleteHub, getHubByName, hubRefCheck, hubStatus, listHubs, programHubRefs, type HubStatus, type HubUploadResult, type KnowledgeServiceOptions, } from "./services/knowledge.js";
|
|
38
40
|
export { currentProfile, listProfiles, useProfile, type CurrentProfile, type ProfileSummary, } from "./services/profile.service.js";
|
|
@@ -40,6 +42,7 @@ export { captureFailed, filterCaptures, formatCurl, readCapturedRequests, type C
|
|
|
40
42
|
export { runDoctor, type DoctorCheck, type DoctorOptions, type DoctorReport, type DoctorSection, type DoctorStatus, } from "./services/doctor.js";
|
|
41
43
|
export { getStatus, type ServiceCheck, type StatusResult, } from "./services/status.service.js";
|
|
42
44
|
export { resolvePublishedVersion, upgradeCli, type NpmRunner, type UpgradeOptions, type UpgradeResult, } from "./services/upgrade.js";
|
|
45
|
+
export { PUBLIC_UPDATE_TARGET, UPDATE_CHECK_FILE, UPDATE_CHECK_TTL_MS, checkForUpdate, compareVersions, formatUpdateNotice, isUpdateEntryStale, readUpdateCache, readUpdateEntry, recordLatestVersion, refreshUpdateCache, setUpdateTarget, updateCheckDisabled, updateCheckPath, updateNoticeFrom, updateTarget, upgradeCommand, writeUpdateEntry, type RefreshUpdateCacheOptions, type UpdateCheckEntry, type UpdateCheckFile, type UpdateNotice, type UpdateTarget, } from "./services/update-check.js";
|
|
43
46
|
export { enterCheckout, enterKnownCheckout, listKnownCheckouts, type EnteredCheckout, } from "./services/checkouts.service.js";
|
|
44
47
|
export { installSkills, removeManagedSkills, type SkillTarget, } from "./skills/install.js";
|
|
45
48
|
export { installAgentsPage, type AgentsPageFacts, } from "./skills/agents-page.js";
|
|
@@ -3,6 +3,7 @@ export { normalizeArgv } from "./argv.js";
|
|
|
3
3
|
export { IdentityClient, browserLogin, } from "./api/identity.js";
|
|
4
4
|
export { findLiveVersion, ManagementClient, parseVersionTag, } from "./api/management.js";
|
|
5
5
|
export { MOCKDB_SERVICE_NAME, MockDbClient, mockDbErrorCode, } from "./api/mock-db.js";
|
|
6
|
+
export { CloneClient, } from "./api/clone.js";
|
|
6
7
|
export { VaultClient, } from "./api/vault.js";
|
|
7
8
|
export { KbmClient, } from "./api/kbm.js";
|
|
8
9
|
export { RuntimeApiClient, } from "./api/runtime-api.js";
|
|
@@ -28,9 +29,10 @@ export { createClients } from "./services/clients.js";
|
|
|
28
29
|
export { listEnvironments, setEnvironment, } from "./services/env.service.js";
|
|
29
30
|
export { agentRuntimeVersion, bindAgent, createAgent, createProject, initialVersionTag, latestPublishedRuntimeVersion, listAgents, listOrganizations, listProjects, unlinkAgent, useOrganization, useProject, useVersion, } from "./services/hierarchy.js";
|
|
30
31
|
export { AVAILABILITY_CACHE_FILE, AVAILABILITY_CACHE_TTL_MS, assertRuntimeAvailable, availabilityCachePath, checkRuntimeAvailability, familyOf, probeRuntimeAvailability, verdictFromHealth, } from "./runtime-version/availability.js";
|
|
31
|
-
export { isLegacyRuntime, latestRuntimeVersion, matchRuntimeVersion, resolveRuntimeVersion, runtimeVersionLabel, runtimeVersionOptions, RUNTIME_VERSION_HEADER, } from "./runtime-version/index.js";
|
|
32
|
+
export { isLegacyRuntime, isRoutableRuntimeBuild, latestRuntimeVersion, matchRuntimeVersion, resolveRuntimeVersion, runtimeRouteResolver, runtimeVersionLabel, runtimeVersionOptions, RUNTIME_VERSION_HEADER, } from "./runtime-version/index.js";
|
|
32
33
|
export { createThread, getThread, listMessages, listThreads, parseVariables, sendMessage, trace, } from "./services/messaging.js";
|
|
33
34
|
export { cloneMockDb, createCollection, createEndpoint, DEFAULT_MOCKDB_TOKEN_ENV, deleteEndpoint, deleteMockDb, describeMockDb, executeEndpoint, exportMockDb, getEndpoint, getIdentities, inspectSession, listCollections, listEndpoints, MOCKDB_GUIDE, normalizeAddColumns, normalizeSampleData, normalizeSchema, parseJsonFlag, provisionMockDb, readSampleDataInput, resetSession, resolveMockDb, rotateMgmtKey, rotateRuntimeKey, seedRows, setIdentities, statusMockDb, storedKeys, updateCollection, updateEndpoint, wireMockDbConnection, writeMockDbGuide, } from "./services/mockdb.js";
|
|
35
|
+
export { CLONE_POLL_INTERVAL_MS, CLONE_WAIT_TIMEOUT_MS, buildCloneRequest, cloneEnvironment, cloneStatus, dryRunClone, isTerminalCloneState, resolveCloneTarget, startClone, waitForClone, } from "./services/clone.js";
|
|
34
36
|
export { buildVaultScope, getSecretByName, listSecrets, parseVaultScopeLevel, removeSecretByName, scopeLevelLabel, setSecret, validateSecretName, vaultScopeLevels, } from "./services/vault.js";
|
|
35
37
|
export { addFiles, addUrls, createHub, deleteHub, getHubByName, hubRefCheck, hubStatus, listHubs, programHubRefs, } from "./services/knowledge.js";
|
|
36
38
|
export { currentProfile, listProfiles, useProfile, } from "./services/profile.service.js";
|
|
@@ -38,6 +40,7 @@ export { captureFailed, filterCaptures, formatCurl, readCapturedRequests, } from
|
|
|
38
40
|
export { runDoctor, } from "./services/doctor.js";
|
|
39
41
|
export { getStatus, } from "./services/status.service.js";
|
|
40
42
|
export { resolvePublishedVersion, upgradeCli, } from "./services/upgrade.js";
|
|
43
|
+
export { PUBLIC_UPDATE_TARGET, UPDATE_CHECK_FILE, UPDATE_CHECK_TTL_MS, checkForUpdate, compareVersions, formatUpdateNotice, isUpdateEntryStale, readUpdateCache, readUpdateEntry, recordLatestVersion, refreshUpdateCache, setUpdateTarget, updateCheckDisabled, updateCheckPath, updateNoticeFrom, updateTarget, upgradeCommand, writeUpdateEntry, } from "./services/update-check.js";
|
|
41
44
|
export { enterCheckout, enterKnownCheckout, listKnownCheckouts, } from "./services/checkouts.service.js";
|
|
42
45
|
export { installSkills, removeManagedSkills, } from "./skills/install.js";
|
|
43
46
|
export { installAgentsPage, } from "./skills/agents-page.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EACL,cAAc,EACd,YAAY,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAQhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,eAAe,GAYhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,GAMZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,SAAS,GAOV,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,GASjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,GAajB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EACL,cAAc,EACd,YAAY,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAQhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,eAAe,GAYhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,WAAW,GASZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,GAMZ,MAAM,gBAAgB,CAAC;AACxB,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AAuB,EACvB,UAAU,GAIX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,gBAAgB,GAMjB,MAAM,4BAA4B,CAAC;AACpC,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,GAElB,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"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { CliError } from "../errors/index.js";
|
|
2
|
+
import type { UpdateNotice } from "../services/update-check.js";
|
|
2
3
|
export interface OutputOptions {
|
|
3
4
|
json: boolean;
|
|
4
5
|
quiet: boolean;
|
|
5
6
|
verbose: boolean;
|
|
6
7
|
}
|
|
8
|
+
export interface SuccessEnvelope {
|
|
9
|
+
success: true;
|
|
10
|
+
data: unknown;
|
|
11
|
+
/** A newer console is published. Additive: absent unless one is known,
|
|
12
|
+
* so consumers that never look for it see the envelope they always did. */
|
|
13
|
+
update?: UpdateNotice;
|
|
14
|
+
}
|
|
7
15
|
export interface ErrorEnvelope {
|
|
8
16
|
success: false;
|
|
9
17
|
error: {
|
|
@@ -13,23 +21,37 @@ export interface ErrorEnvelope {
|
|
|
13
21
|
/** The upstream response body (or other context) behind the failure. */
|
|
14
22
|
detail?: unknown;
|
|
15
23
|
};
|
|
24
|
+
/** Same as on success — a failing run is exactly when the fix may be
|
|
25
|
+
* "upgrade", so the notice rides the error envelope too. */
|
|
26
|
+
update?: UpdateNotice;
|
|
16
27
|
}
|
|
17
|
-
export declare function successEnvelope(data: unknown):
|
|
18
|
-
|
|
19
|
-
data: unknown;
|
|
20
|
-
};
|
|
21
|
-
export declare function errorEnvelope(error: CliError): ErrorEnvelope;
|
|
28
|
+
export declare function successEnvelope(data: unknown, update?: UpdateNotice): SuccessEnvelope;
|
|
29
|
+
export declare function errorEnvelope(error: CliError, update?: UpdateNotice): ErrorEnvelope;
|
|
22
30
|
export declare class Output {
|
|
23
31
|
readonly options: OutputOptions;
|
|
24
32
|
private readonly stdout;
|
|
25
33
|
private readonly stderr;
|
|
34
|
+
private update;
|
|
26
35
|
constructor(options: OutputOptions, stdout?: NodeJS.WritableStream, stderr?: NodeJS.WritableStream);
|
|
36
|
+
/** The newer-version notice every envelope this Output emits will carry
|
|
37
|
+
* (and the trailing stderr line reports). Undefined clears it — the
|
|
38
|
+
* `upgrade` command does that, being the update surface itself. */
|
|
39
|
+
setUpdateNotice(update: UpdateNotice | undefined): void;
|
|
40
|
+
get updateNotice(): UpdateNotice | undefined;
|
|
27
41
|
result(data: unknown, renderHuman: (value: unknown) => string): void;
|
|
28
42
|
error(error: CliError): void;
|
|
29
43
|
/** A non-fatal caution — the command went through, but something the user
|
|
30
44
|
* should know about did not hold. Stderr in every mode (stdout stays the
|
|
31
45
|
* result envelope), silenced only by `--quiet`. */
|
|
32
46
|
warn(message: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* A one-line advisory on stderr — the update banner. Unlike `progress()`
|
|
49
|
+
* it does not need a TTY: a coding agent driving plain commands reads
|
|
50
|
+
* stderr and must see it. JSON runs stay silent here because the
|
|
51
|
+
* envelope's `update` field already carries the same fact; `--quiet`
|
|
52
|
+
* mutes it like every other advisory.
|
|
53
|
+
*/
|
|
54
|
+
notice(message: string): void;
|
|
33
55
|
progress(message: string): void;
|
|
34
56
|
debug(message: string): void;
|
|
35
57
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import pc from "picocolors";
|
|
2
|
-
export function successEnvelope(data) {
|
|
3
|
-
return { success: true, data };
|
|
2
|
+
export function successEnvelope(data, update) {
|
|
3
|
+
return { success: true, data, ...(update === undefined ? {} : { update }) };
|
|
4
4
|
}
|
|
5
|
-
export function errorEnvelope(error) {
|
|
5
|
+
export function errorEnvelope(error, update) {
|
|
6
6
|
return {
|
|
7
7
|
success: false,
|
|
8
8
|
error: {
|
|
@@ -11,6 +11,7 @@ export function errorEnvelope(error) {
|
|
|
11
11
|
...(error.suggestion === undefined ? {} : { suggestion: error.suggestion }),
|
|
12
12
|
...(error.detail === undefined ? {} : { detail: error.detail }),
|
|
13
13
|
},
|
|
14
|
+
...(update === undefined ? {} : { update }),
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
/** How much of an upstream error body the default (non-verbose) human
|
|
@@ -26,20 +27,30 @@ export class Output {
|
|
|
26
27
|
options;
|
|
27
28
|
stdout;
|
|
28
29
|
stderr;
|
|
30
|
+
update;
|
|
29
31
|
constructor(options, stdout = process.stdout, stderr = process.stderr) {
|
|
30
32
|
this.options = options;
|
|
31
33
|
this.stdout = stdout;
|
|
32
34
|
this.stderr = stderr;
|
|
33
35
|
}
|
|
36
|
+
/** The newer-version notice every envelope this Output emits will carry
|
|
37
|
+
* (and the trailing stderr line reports). Undefined clears it — the
|
|
38
|
+
* `upgrade` command does that, being the update surface itself. */
|
|
39
|
+
setUpdateNotice(update) {
|
|
40
|
+
this.update = update;
|
|
41
|
+
}
|
|
42
|
+
get updateNotice() {
|
|
43
|
+
return this.update;
|
|
44
|
+
}
|
|
34
45
|
result(data, renderHuman) {
|
|
35
46
|
const value = this.options.json
|
|
36
|
-
? JSON.stringify(successEnvelope(data))
|
|
47
|
+
? JSON.stringify(successEnvelope(data, this.update))
|
|
37
48
|
: renderHuman(data);
|
|
38
49
|
this.stdout.write(`${value}\n`);
|
|
39
50
|
}
|
|
40
51
|
error(error) {
|
|
41
52
|
const value = this.options.json
|
|
42
|
-
? JSON.stringify(errorEnvelope(error))
|
|
53
|
+
? JSON.stringify(errorEnvelope(error, this.update))
|
|
43
54
|
: `${pc.red("Error:")} ${error.message}${error.detail === undefined
|
|
44
55
|
? ""
|
|
45
56
|
: `\n${pc.dim(renderDetail(error.detail, this.options.verbose))}`}${error.suggestion === undefined ? "" : `\n${pc.dim(error.suggestion)}`}`;
|
|
@@ -54,6 +65,18 @@ export class Output {
|
|
|
54
65
|
this.stderr.write(`${pc.yellow("Warning:")} ${message}\n`);
|
|
55
66
|
}
|
|
56
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* A one-line advisory on stderr — the update banner. Unlike `progress()`
|
|
70
|
+
* it does not need a TTY: a coding agent driving plain commands reads
|
|
71
|
+
* stderr and must see it. JSON runs stay silent here because the
|
|
72
|
+
* envelope's `update` field already carries the same fact; `--quiet`
|
|
73
|
+
* mutes it like every other advisory.
|
|
74
|
+
*/
|
|
75
|
+
notice(message) {
|
|
76
|
+
if (this.options.quiet || this.options.json)
|
|
77
|
+
return;
|
|
78
|
+
this.stderr.write(`${pc.yellow(message)}\n`);
|
|
79
|
+
}
|
|
57
80
|
progress(message) {
|
|
58
81
|
const isTTY = "isTTY" in this.stderr && this.stderr.isTTY === true;
|
|
59
82
|
if (!this.options.quiet && !this.options.json && isTTY) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAiC5B,MAAM,UAAU,eAAe,CAC7B,IAAa,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