@w6w/cli 0.9.30 → 0.9.32
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 +19 -3
- package/dist/mod.d.ts +5 -5
- package/dist/mod.d.ts.map +1 -1
- package/dist/mod.js +54 -13
- package/dist/mod.js.map +1 -1
- package/dist/src/commands/agents-studio.d.ts.map +1 -1
- package/dist/src/commands/agents-studio.js +3 -0
- package/dist/src/commands/agents-studio.js.map +1 -1
- package/dist/src/commands/me.d.ts +4 -3
- package/dist/src/commands/me.d.ts.map +1 -1
- package/dist/src/commands/me.js +5 -8
- package/dist/src/commands/me.js.map +1 -1
- package/dist/src/commands/shared.d.ts +2 -0
- package/dist/src/commands/shared.d.ts.map +1 -1
- package/dist/src/commands/shared.js +4 -0
- package/dist/src/commands/shared.js.map +1 -1
- package/dist/src/commands/version.d.ts +37 -0
- package/dist/src/commands/version.d.ts.map +1 -0
- package/dist/src/commands/version.js +116 -0
- package/dist/src/commands/version.js.map +1 -0
- package/dist/src/help.generated.d.ts.map +1 -1
- package/dist/src/help.generated.js +49 -3
- package/dist/src/help.generated.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `w6w version` and `w6w --version` / `-v` — one handler, versions only.
|
|
3
|
+
*
|
|
4
|
+
* Prints this CLI's own version plus the server's `version` and `composition`,
|
|
5
|
+
* and **no identity**: nothing here says who the caller is (that is `w6w me`).
|
|
6
|
+
* The server half comes from `GET <resolved base URL>/version`, which is
|
|
7
|
+
* unauthenticated — so **no `Authorization` header is ever sent**, whatever
|
|
8
|
+
* token a flag, the environment or the store holds, and a missing token is
|
|
9
|
+
* irrelevant. The request is bounded by {@linkcode VERSION_TIMEOUT_MS}.
|
|
10
|
+
*
|
|
11
|
+
* It **never fails**. An invalid base URL, an unreadable store, a refused
|
|
12
|
+
* connection, a timeout, a non-2xx, a body that is not JSON or lacks string
|
|
13
|
+
* `version`/`composition` — each makes the server *unavailable*, reported as
|
|
14
|
+
* `server: unavailable (<reason>)`, and the exit code is still 0. A banner that
|
|
15
|
+
* could break a script because the server is down would be worse than no banner.
|
|
16
|
+
*
|
|
17
|
+
* Text applies the D5 display rule (`0.0.0` / empty shows as `dev`, shared with
|
|
18
|
+
* `w6w me`); `--json` carries the raw values, through the normal emit path:
|
|
19
|
+
* `{wrapper, server | null, composition | null, serverError?}`.
|
|
20
|
+
*
|
|
21
|
+
* @module
|
|
22
|
+
*/
|
|
23
|
+
import { resolveSettings } from "../client.js";
|
|
24
|
+
import { displayVersion } from "./shared.js";
|
|
25
|
+
/** How long the `/version` request may take before the server counts as unavailable. */
|
|
26
|
+
export const VERSION_TIMEOUT_MS = 3000;
|
|
27
|
+
/** The first line of an error's message, short enough to sit in parentheses. */
|
|
28
|
+
function reasonOf(error) {
|
|
29
|
+
const text = error instanceof Error ? error.message : String(error);
|
|
30
|
+
const line = text.split("\n")[0].trim();
|
|
31
|
+
return line.length > 0 ? line.slice(0, 120) : "request failed";
|
|
32
|
+
}
|
|
33
|
+
async function fetchServerVersions(context, fetchImpl) {
|
|
34
|
+
let baseUrl;
|
|
35
|
+
try {
|
|
36
|
+
// The resolver also resolves a token; a token it refuses (unsendable) is a
|
|
37
|
+
// reason unrelated to this command, so it is deliberately not our problem:
|
|
38
|
+
// retry the base URL alone with the token sources stripped.
|
|
39
|
+
baseUrl = resolveSettings({ ...context.invocation.globals, token: undefined }, (name) => name === "W6W_TOKEN" ? undefined : context.env(name), { ...context.stored, hosts: {} }).baseUrl;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
return { ok: false, reason: reasonOf(error) };
|
|
43
|
+
}
|
|
44
|
+
const controller = new AbortController();
|
|
45
|
+
let timer;
|
|
46
|
+
const timeout = new Promise((_, reject) => {
|
|
47
|
+
timer = setTimeout(() => {
|
|
48
|
+
reject(new Error(`timed out after ${VERSION_TIMEOUT_MS / 1000}s`));
|
|
49
|
+
controller.abort();
|
|
50
|
+
}, VERSION_TIMEOUT_MS);
|
|
51
|
+
});
|
|
52
|
+
try {
|
|
53
|
+
// Explicitly header-free: no Authorization, no credentials of any kind.
|
|
54
|
+
const response = await Promise.race([
|
|
55
|
+
fetchImpl(`${baseUrl}/version`, {
|
|
56
|
+
method: "GET",
|
|
57
|
+
headers: { accept: "application/json" },
|
|
58
|
+
signal: controller.signal,
|
|
59
|
+
}),
|
|
60
|
+
timeout,
|
|
61
|
+
]);
|
|
62
|
+
if (!response.ok)
|
|
63
|
+
return { ok: false, reason: `HTTP ${response.status}` };
|
|
64
|
+
let body;
|
|
65
|
+
try {
|
|
66
|
+
body = await Promise.race([response.json(), timeout]);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
if (error instanceof Error && error.message.startsWith("timed out"))
|
|
70
|
+
throw error;
|
|
71
|
+
return { ok: false, reason: "response was not JSON" };
|
|
72
|
+
}
|
|
73
|
+
const record = typeof body === "object" && body !== null && !Array.isArray(body)
|
|
74
|
+
? body
|
|
75
|
+
: {};
|
|
76
|
+
if (typeof record.version !== "string" || typeof record.composition !== "string") {
|
|
77
|
+
return { ok: false, reason: "unexpected response" };
|
|
78
|
+
}
|
|
79
|
+
return { ok: true, version: record.version, composition: record.composition };
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
return { ok: false, reason: reasonOf(error) };
|
|
83
|
+
}
|
|
84
|
+
finally {
|
|
85
|
+
clearTimeout(timer);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Report the wrapper and server versions. Always returns normally.
|
|
90
|
+
*
|
|
91
|
+
* @param context - The invocation, renderer, environment and stored config.
|
|
92
|
+
* @param wrapper - This CLI's own version.
|
|
93
|
+
* @param fetchImpl - The transport; defaults to `globalThis.fetch`.
|
|
94
|
+
*/
|
|
95
|
+
export async function reportVersions(context, wrapper, fetchImpl) {
|
|
96
|
+
const transport = fetchImpl ?? ((input, init) => globalThis.fetch(input, init));
|
|
97
|
+
const server = await fetchServerVersions(context, transport);
|
|
98
|
+
const payload = {
|
|
99
|
+
wrapper,
|
|
100
|
+
server: server.ok ? server.version : null,
|
|
101
|
+
composition: server.ok ? server.composition : null,
|
|
102
|
+
};
|
|
103
|
+
if (!server.ok)
|
|
104
|
+
payload.serverError = server.reason;
|
|
105
|
+
context.out.emit(payload, (_styles) => {
|
|
106
|
+
const lines = [`wrapper: ${displayVersion(wrapper)}`];
|
|
107
|
+
if (server.ok) {
|
|
108
|
+
lines.push(`server: ${displayVersion(server.version)}`, `composition: ${displayVersion(server.composition)}`);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
lines.push(`server: unavailable (${server.reason})`);
|
|
112
|
+
}
|
|
113
|
+
return lines.join("\n");
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/commands/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,wFAAwF;AACxF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAOvC,gFAAgF;AAChF,SAAS,QAAQ,CAAC,KAAc;IAC9B,MAAM,IAAI,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACxC,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,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;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,2CAA2C;AAC3C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,4EAA4E;AAC5E,eAAO,MAAM,SAAS,EAAE,QA8yMvB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,aAAa,EAAE,MAAM,EAAE,EAugBnC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,UAAU,EAAE,YAAY,EAqBpC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAU,CAAC;AACtC,eAAO,MAAM,UAAU,EAAE,MAAU,CAAC;AACpC,eAAO,MAAM,cAAc,EAAE,MAAU,CAAC;AACxC,eAAO,MAAM,gBAAgB,EAAE,MAAU,CAAC;AAE1C,wEAAwE;AACxE,eAAO,MAAM,YAAY,EAAE,cAAc,EAA0B,CAAC"}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
/** The command tree, generated from the shared wrapper surface contract. */
|
|
18
18
|
export const HELP_TREE = {
|
|
19
19
|
"binary": "w6w",
|
|
20
|
-
"contractVersion": "0.
|
|
20
|
+
"contractVersion": "0.16.0",
|
|
21
21
|
"tagline": "command-line client for the w6w workflow platform",
|
|
22
22
|
"usage": "w6w <command> [options]",
|
|
23
23
|
"docsUrl": "https://w6w.dev/docs/cli",
|
|
@@ -191,6 +191,35 @@ export const HELP_TREE = {
|
|
|
191
191
|
],
|
|
192
192
|
"notes": [],
|
|
193
193
|
},
|
|
194
|
+
{
|
|
195
|
+
"operation": "version",
|
|
196
|
+
"path": [
|
|
197
|
+
"version",
|
|
198
|
+
],
|
|
199
|
+
"name": "version",
|
|
200
|
+
"aliases": [],
|
|
201
|
+
"summary": "Show this CLI's version and the server's version and composition (no identity).",
|
|
202
|
+
"short": "Show this CLI's version and the server's version and composition (no identity)",
|
|
203
|
+
"headline": "show this CLI's version and the server's version and composition (no identity)",
|
|
204
|
+
"usage": "w6w version [options]",
|
|
205
|
+
"naming": "w6w version",
|
|
206
|
+
"status": "live",
|
|
207
|
+
"params": [
|
|
208
|
+
{
|
|
209
|
+
"name": "json",
|
|
210
|
+
"kind": "flag",
|
|
211
|
+
"display": "--json",
|
|
212
|
+
"description": "Output raw JSON instead of a table",
|
|
213
|
+
"required": false,
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
"examples": [
|
|
217
|
+
"w6w version",
|
|
218
|
+
"w6w version --json",
|
|
219
|
+
"w6w --version",
|
|
220
|
+
],
|
|
221
|
+
"notes": [],
|
|
222
|
+
},
|
|
194
223
|
{
|
|
195
224
|
"operation": "ls",
|
|
196
225
|
"path": [
|
|
@@ -4535,7 +4564,7 @@ export const HELP_TREE = {
|
|
|
4535
4564
|
"short": "Create an agent draft",
|
|
4536
4565
|
"headline": "create an agent draft",
|
|
4537
4566
|
"usage": "w6w agents create [options]",
|
|
4538
|
-
"naming": "w6w agents create [--name <n>] [--instructions <text>] [--model-route-id <id>] [--skills <json>] [--context <json>] [--visibility private|project|account] [--project <id>] [--temperature <n>] [--top-p <n>] [--max-output-tokens <n>] [--stop <text>]...",
|
|
4567
|
+
"naming": "w6w agents create [--name <n>] [--instructions <text>] [--model-route-id <id>] [--skills <json>] [--context <json>] [--visibility private|project|account] [--project <id>] [--temperature <n>] [--top-p <n>] [--max-output-tokens <n>] [--stop <text>]... [--tools <json>]",
|
|
4539
4568
|
"status": "required",
|
|
4540
4569
|
"params": [
|
|
4541
4570
|
{
|
|
@@ -4615,6 +4644,13 @@ export const HELP_TREE = {
|
|
|
4615
4644
|
"description": "Stop sequence; repeat the flag for more (at most 4)",
|
|
4616
4645
|
"required": false,
|
|
4617
4646
|
},
|
|
4647
|
+
{
|
|
4648
|
+
"name": "tools",
|
|
4649
|
+
"kind": "flag",
|
|
4650
|
+
"display": "--tools <json>",
|
|
4651
|
+
"description": 'Tools the agent may call (max 50), as a JSON array of {"kind":"action","uses":{"app":"…","action":"…"}} | {"kind":"function","function":"fn_…"} | {"kind":"workflow","workflow":"wf_…"}, each with an optional "description"',
|
|
4652
|
+
"required": false,
|
|
4653
|
+
},
|
|
4618
4654
|
{
|
|
4619
4655
|
"name": "json",
|
|
4620
4656
|
"kind": "flag",
|
|
@@ -4676,7 +4712,7 @@ export const HELP_TREE = {
|
|
|
4676
4712
|
"short": "Patch an agent draft",
|
|
4677
4713
|
"headline": "patch an agent draft",
|
|
4678
4714
|
"usage": "w6w agents update <id> --revision <n> [options]",
|
|
4679
|
-
"naming": "w6w agents update <id> --revision <n> [--name <n>] [--instructions <text>] [--model-route-id <id>] [--skills <json>] [--context <json>] [--visibility private|project|account] [--project <id>] [--if-unmodified-since <ts>] [--temperature <n>] [--top-p <n>] [--max-output-tokens <n>] [--stop <text>]...",
|
|
4715
|
+
"naming": "w6w agents update <id> --revision <n> [--name <n>] [--instructions <text>] [--model-route-id <id>] [--skills <json>] [--context <json>] [--visibility private|project|account] [--project <id>] [--if-unmodified-since <ts>] [--temperature <n>] [--top-p <n>] [--max-output-tokens <n>] [--stop <text>]... [--tools <json>]",
|
|
4680
4716
|
"status": "required",
|
|
4681
4717
|
"params": [
|
|
4682
4718
|
{
|
|
@@ -4777,6 +4813,13 @@ export const HELP_TREE = {
|
|
|
4777
4813
|
"description": "Stop sequence; repeat the flag for more (at most 4)",
|
|
4778
4814
|
"required": false,
|
|
4779
4815
|
},
|
|
4816
|
+
{
|
|
4817
|
+
"name": "tools",
|
|
4818
|
+
"kind": "flag",
|
|
4819
|
+
"display": "--tools <json>",
|
|
4820
|
+
"description": 'Tools the agent may call (max 50), as a JSON array of {"kind":"action","uses":{"app":"…","action":"…"}} | {"kind":"function","function":"fn_…"} | {"kind":"workflow","workflow":"wf_…"}, each with an optional "description"',
|
|
4821
|
+
"required": false,
|
|
4822
|
+
},
|
|
4780
4823
|
{
|
|
4781
4824
|
"name": "json",
|
|
4782
4825
|
"kind": "flag",
|
|
@@ -6324,6 +6367,9 @@ export const COMMAND_PATHS = [
|
|
|
6324
6367
|
[
|
|
6325
6368
|
"model-usage",
|
|
6326
6369
|
],
|
|
6370
|
+
[
|
|
6371
|
+
"version",
|
|
6372
|
+
],
|
|
6327
6373
|
[
|
|
6328
6374
|
"ls",
|
|
6329
6375
|
],
|