teamclaws 1.0.1 → 1.0.2
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 +3 -1
- package/dist/broker.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/output.js +2 -0
- package/dist/validation.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,10 +51,12 @@ Existing event names and schema version remain unchanged. The
|
|
|
51
51
|
login keeps running. Signed-out `auth_status` includes the non-executing
|
|
52
52
|
`login_command: "teamclaws login --json"`; status never starts device authorization.
|
|
53
53
|
|
|
54
|
-
`servers list` requests `GET /api/cli/v1/servers/?include_inventory=1`. Updated
|
|
54
|
+
`servers list` requests `GET /api/cli/v1/servers/?include_inventory=1&include_description=1`. Updated
|
|
55
55
|
brokers return `servers` and `workspace_count`: the count of all non-deleted
|
|
56
56
|
owned and eligible shared workspaces, including those without a hostname yet.
|
|
57
57
|
Individual server entries retain aliases, stable IDs, status and `pairing_ready`.
|
|
58
|
+
When supported, they also include the server description. Older brokers may
|
|
59
|
+
omit descriptions; nonempty descriptions appear under each readable list entry.
|
|
58
60
|
Older brokers may omit the count; the CLI reports it as null and never infers
|
|
59
61
|
an empty account from an empty filtered list.
|
|
60
62
|
|
package/dist/broker.js
CHANGED
|
@@ -15,7 +15,7 @@ export class BrokerClient {
|
|
|
15
15
|
return normalizedDeviceName(this.deviceName());
|
|
16
16
|
}
|
|
17
17
|
async servers(accessToken, signal) {
|
|
18
|
-
const response = await requestJson(this.fetcher, `${API_BASE}servers/?include_inventory=1`, {
|
|
18
|
+
const response = await requestJson(this.fetcher, `${API_BASE}servers/?include_inventory=1&include_description=1`, {
|
|
19
19
|
headers: requestHeaders(accessToken),
|
|
20
20
|
...(signal ? { signal } : {}),
|
|
21
21
|
});
|
package/dist/constants.js
CHANGED
package/dist/output.js
CHANGED
|
@@ -107,6 +107,8 @@ export class Output {
|
|
|
107
107
|
}
|
|
108
108
|
servers.forEach((server, index) => {
|
|
109
109
|
this.stdout.write(`${index + 1}. ${server.alias} — ${server.server_id} — ${server.workspace_url} — ${server.pairing_ready ? "ready to pair" : "not ready to pair"}\n`);
|
|
110
|
+
if (server.description)
|
|
111
|
+
this.stdout.write(` ${server.description}\n`);
|
|
110
112
|
});
|
|
111
113
|
}
|
|
112
114
|
}
|
package/dist/validation.js
CHANGED
|
@@ -353,15 +353,23 @@ export function parseServersResponse(value) {
|
|
|
353
353
|
exitCode: 9,
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
assertExactKeys(server, ["id", "alias", "workspace_url", "status", "pairing_ready"], [], "server");
|
|
356
|
+
assertExactKeys(server, ["id", "alias", "workspace_url", "status", "pairing_ready"], ["description"], "server");
|
|
357
357
|
if (typeof server.pairing_ready !== "boolean") {
|
|
358
358
|
throw new TeamClawsError("invalid_response", "TeamClaws returned an invalid server.", {
|
|
359
359
|
exitCode: 9,
|
|
360
360
|
});
|
|
361
361
|
}
|
|
362
|
+
if (server.description !== undefined &&
|
|
363
|
+
(typeof server.description !== "string" ||
|
|
364
|
+
server.description.length > 2_000)) {
|
|
365
|
+
throw new TeamClawsError("invalid_response", "TeamClaws returned an invalid server description.", { exitCode: 9 });
|
|
366
|
+
}
|
|
362
367
|
return {
|
|
363
368
|
server_id: normalizeUuid(server.id),
|
|
364
369
|
alias: requireString(server.alias, "server alias", 200),
|
|
370
|
+
...(typeof server.description === "string"
|
|
371
|
+
? { description: server.description }
|
|
372
|
+
: {}),
|
|
365
373
|
workspace_url: canonicalWorkspaceUrl(server.workspace_url),
|
|
366
374
|
status: requireString(server.status, "server status", 40),
|
|
367
375
|
pairing_ready: server.pairing_ready,
|