@alook/cli 0.0.59 → 0.0.60
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/dist/index.js +13 -13
- package/dist/session-runner.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -486,17 +486,6 @@ Usage: ${cmdPrefix()} register --token <token>`);
|
|
|
486
486
|
console.error(`Error: failed to verify token: ${err instanceof Error ? err.message : err}`);
|
|
487
487
|
process.exit(1);
|
|
488
488
|
}
|
|
489
|
-
let workspaces;
|
|
490
|
-
try {
|
|
491
|
-
workspaces = await client.getJSON("/api/workspaces");
|
|
492
|
-
} catch (err) {
|
|
493
|
-
console.error(`Error: failed to fetch workspaces: ${err instanceof Error ? err.message : err}`);
|
|
494
|
-
process.exit(1);
|
|
495
|
-
}
|
|
496
|
-
if (!workspaces.length) {
|
|
497
|
-
console.error("Error: no workspaces found for this user");
|
|
498
|
-
process.exit(1);
|
|
499
|
-
}
|
|
500
489
|
console.log("Scanning for AI runtimes...");
|
|
501
490
|
const runtimes = detectRuntimes();
|
|
502
491
|
if (runtimes.length === 0) {
|
|
@@ -523,6 +512,17 @@ Usage: ${cmdPrefix()} register --token <token>`);
|
|
|
523
512
|
console.error(`Error: failed to activate: ${err instanceof Error ? err.message : err}`);
|
|
524
513
|
process.exit(1);
|
|
525
514
|
}
|
|
515
|
+
let workspaces;
|
|
516
|
+
try {
|
|
517
|
+
workspaces = await client.getJSON("/api/workspaces");
|
|
518
|
+
} catch (err) {
|
|
519
|
+
console.error(`Error: failed to fetch workspaces: ${err instanceof Error ? err.message : err}`);
|
|
520
|
+
process.exit(1);
|
|
521
|
+
}
|
|
522
|
+
if (!workspaces.length) {
|
|
523
|
+
console.error("Error: no workspaces found for this user");
|
|
524
|
+
process.exit(1);
|
|
525
|
+
}
|
|
526
526
|
const ws = workspaces.find((w) => w.id === activateResp.workspace_id) || workspaces[0];
|
|
527
527
|
const wsClient = new APIClient(serverUrl, token, ws.id);
|
|
528
528
|
let agentIds = [];
|
|
@@ -15053,7 +15053,7 @@ var ActivateTokenRequestSchema = exports_external.object({
|
|
|
15053
15053
|
runtimes: exports_external.array(ActivateTokenRuntimeSchema).min(1)
|
|
15054
15054
|
});
|
|
15055
15055
|
var RegisterDaemonRequestSchema = exports_external.object({
|
|
15056
|
-
workspace_id: exports_external.string().min(1),
|
|
15056
|
+
workspace_id: exports_external.string().min(1).optional(),
|
|
15057
15057
|
daemon_id: exports_external.string().min(1),
|
|
15058
15058
|
device_name: exports_external.string().optional().default(""),
|
|
15059
15059
|
cli_version: exports_external.string().optional().default(""),
|
|
@@ -17157,7 +17157,7 @@ var meetingSession = sqliteTable("meeting_session", {
|
|
|
17157
17157
|
var machineToken = sqliteTable("machine_token", {
|
|
17158
17158
|
id: text("id").primaryKey().$defaultFn(() => nanoid3()),
|
|
17159
17159
|
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
17160
|
-
workspaceId: text("workspace_id").
|
|
17160
|
+
workspaceId: text("workspace_id").references(() => workspace.id, { onDelete: "cascade" }),
|
|
17161
17161
|
token: text("token").unique().notNull(),
|
|
17162
17162
|
name: text("name").notNull().default(""),
|
|
17163
17163
|
status: text("status").notNull().default("active"),
|
package/dist/session-runner.js
CHANGED
|
@@ -14480,7 +14480,7 @@ var ActivateTokenRequestSchema = exports_external.object({
|
|
|
14480
14480
|
runtimes: exports_external.array(ActivateTokenRuntimeSchema).min(1)
|
|
14481
14481
|
});
|
|
14482
14482
|
var RegisterDaemonRequestSchema = exports_external.object({
|
|
14483
|
-
workspace_id: exports_external.string().min(1),
|
|
14483
|
+
workspace_id: exports_external.string().min(1).optional(),
|
|
14484
14484
|
daemon_id: exports_external.string().min(1),
|
|
14485
14485
|
device_name: exports_external.string().optional().default(""),
|
|
14486
14486
|
cli_version: exports_external.string().optional().default(""),
|
|
@@ -16584,7 +16584,7 @@ var meetingSession = sqliteTable("meeting_session", {
|
|
|
16584
16584
|
var machineToken = sqliteTable("machine_token", {
|
|
16585
16585
|
id: text("id").primaryKey().$defaultFn(() => nanoid3()),
|
|
16586
16586
|
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
16587
|
-
workspaceId: text("workspace_id").
|
|
16587
|
+
workspaceId: text("workspace_id").references(() => workspace.id, { onDelete: "cascade" }),
|
|
16588
16588
|
token: text("token").unique().notNull(),
|
|
16589
16589
|
name: text("name").notNull().default(""),
|
|
16590
16590
|
status: text("status").notNull().default("active"),
|