@alook/cli 0.1.12 → 0.1.14
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 +95 -34
- package/dist/session-runner.js +84 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17384,6 +17384,7 @@ var CommunityMachineSummarySchema = exports_external.object({
|
|
|
17384
17384
|
var HostReadyMessageSchema = exports_external.object({
|
|
17385
17385
|
type: exports_external.literal("ready"),
|
|
17386
17386
|
runtimeReport: CommunityMachineRuntimeListSchema,
|
|
17387
|
+
capabilities: exports_external.array(exports_external.string().min(1).max(64)).max(16).optional().default([]),
|
|
17387
17388
|
runningAgents: exports_external.array(exports_external.string()).default([]),
|
|
17388
17389
|
hostname: exports_external.string().optional(),
|
|
17389
17390
|
platform: exports_external.string().optional(),
|
|
@@ -17435,6 +17436,14 @@ var AgentWakeAckMessageSchema = exports_external.object({
|
|
|
17435
17436
|
status: exports_external.enum(["ok", "error"]),
|
|
17436
17437
|
error: exports_external.object({ code: exports_external.string().optional(), message: exports_external.string().optional() }).optional()
|
|
17437
17438
|
});
|
|
17439
|
+
var MachineHeartbeatAckMessageSchema = exports_external.strictObject({
|
|
17440
|
+
type: exports_external.literal("machine_heartbeat_ack"),
|
|
17441
|
+
nonce: exports_external.string().min(1).max(128)
|
|
17442
|
+
});
|
|
17443
|
+
var DiagnosticCommandAckMessageSchema = exports_external.strictObject({
|
|
17444
|
+
type: exports_external.literal("diagnostics_ack"),
|
|
17445
|
+
reportId: DiagnosticReportIdSchema
|
|
17446
|
+
});
|
|
17438
17447
|
var CommunityPairTokenResponseSchema = exports_external.object({
|
|
17439
17448
|
tokenId: exports_external.string(),
|
|
17440
17449
|
expiresAt: exports_external.string()
|
|
@@ -17443,6 +17452,7 @@ var CommunityDaemonActivateRequestSchema = exports_external.object({
|
|
|
17443
17452
|
hostname: exports_external.string(),
|
|
17444
17453
|
platform: exports_external.string(),
|
|
17445
17454
|
arch: exports_external.string(),
|
|
17455
|
+
expectedMachineId: exports_external.string().min(1).optional(),
|
|
17446
17456
|
osRelease: exports_external.string().optional(),
|
|
17447
17457
|
daemonVersion: exports_external.string().optional(),
|
|
17448
17458
|
runtimeReport: CommunityMachineRuntimeListSchema.optional()
|
|
@@ -17450,7 +17460,12 @@ var CommunityDaemonActivateRequestSchema = exports_external.object({
|
|
|
17450
17460
|
var CommunityDaemonActivateResponseSchema = exports_external.object({
|
|
17451
17461
|
credential: exports_external.string(),
|
|
17452
17462
|
machineId: exports_external.string(),
|
|
17453
|
-
expiresAt: exports_external.string().nullable()
|
|
17463
|
+
expiresAt: exports_external.string().nullable(),
|
|
17464
|
+
sessionOutcome: exports_external.literal("committed")
|
|
17465
|
+
});
|
|
17466
|
+
var CommunityDaemonActivateErrorResponseSchema = exports_external.object({
|
|
17467
|
+
error: exports_external.string(),
|
|
17468
|
+
sessionOutcome: exports_external.enum(["not_committed", "unknown"])
|
|
17454
17469
|
});
|
|
17455
17470
|
var CommunityDaemonEnrollAgentRequestSchema = exports_external.object({
|
|
17456
17471
|
agentId: exports_external.string().min(1).max(128)
|
|
@@ -17637,6 +17652,10 @@ var HostBotAuditEventFrameSchema = exports_external.object({
|
|
|
17637
17652
|
});
|
|
17638
17653
|
// ../shared/src/community-cli-contract.ts
|
|
17639
17654
|
var HostCommandSchema = exports_external.discriminatedUnion("type", [
|
|
17655
|
+
exports_external.strictObject({
|
|
17656
|
+
type: exports_external.literal("machine:heartbeat"),
|
|
17657
|
+
nonce: exports_external.string().min(1).max(128)
|
|
17658
|
+
}),
|
|
17640
17659
|
exports_external.object({
|
|
17641
17660
|
type: exports_external.literal("agent:wake"),
|
|
17642
17661
|
agentId: exports_external.string().min(1),
|
|
@@ -18158,26 +18177,6 @@ var channelJoinBaselineGuard = sql`${communityMessage.createdAt} > COALESCE(${co
|
|
|
18158
18177
|
|
|
18159
18178
|
// ../shared/src/db/queries/community/mention.ts
|
|
18160
18179
|
var MENTION_INSERT_MAX_ROWS = maxRowsPerInsert(5);
|
|
18161
|
-
// ../shared/src/community/bot-activity-presets.ts
|
|
18162
|
-
var BOT_ACTIVITY_PRESETS = {
|
|
18163
|
-
idle: { emoji: "\uD83D\uDCA4", text: "Idle" },
|
|
18164
|
-
starting: { emoji: "\uD83C\uDF00", text: "Waking up" },
|
|
18165
|
-
stopping: { emoji: "\uD83C\uDF19", text: "Wrapping up" }
|
|
18166
|
-
};
|
|
18167
|
-
var RUNNING_PRESETS = [
|
|
18168
|
-
{ emoji: "⚡", text: "Working on it" },
|
|
18169
|
-
{ emoji: "\uD83D\uDEE0️", text: "Cooking" },
|
|
18170
|
-
{ emoji: "\uD83E\uDDE0", text: "Thinking hard" },
|
|
18171
|
-
{ emoji: "\uD83D\uDD27", text: "Tinkering" },
|
|
18172
|
-
{ emoji: "\uD83D\uDE80", text: "On it" },
|
|
18173
|
-
{ emoji: "\uD83D\uDD25", text: "In the zone" }
|
|
18174
|
-
];
|
|
18175
|
-
var BOT_ACTIVITY_STATUS_PAIRS = [
|
|
18176
|
-
BOT_ACTIVITY_PRESETS.idle,
|
|
18177
|
-
BOT_ACTIVITY_PRESETS.starting,
|
|
18178
|
-
BOT_ACTIVITY_PRESETS.stopping,
|
|
18179
|
-
...RUNNING_PRESETS
|
|
18180
|
-
];
|
|
18181
18180
|
// ../shared/src/community-ws-events.ts
|
|
18182
18181
|
var string4 = exports_external.string();
|
|
18183
18182
|
var nullableString = string4.nullable();
|
|
@@ -18634,6 +18633,68 @@ var WS_EVENTS = {
|
|
|
18634
18633
|
BOT_AUDIT_EVENT: "community:bot.audit_event"
|
|
18635
18634
|
};
|
|
18636
18635
|
var COMMUNITY_EVENT_TYPES = new Set(Object.values(WS_EVENTS));
|
|
18636
|
+
var COMMUNITY_USER_TARGET_MAX_BYTES = 128;
|
|
18637
|
+
function utf8ByteLength(value) {
|
|
18638
|
+
return new TextEncoder().encode(value).byteLength;
|
|
18639
|
+
}
|
|
18640
|
+
function isWellFormedUnicode(value) {
|
|
18641
|
+
for (let index2 = 0;index2 < value.length; index2 += 1) {
|
|
18642
|
+
const codeUnit = value.charCodeAt(index2);
|
|
18643
|
+
if (codeUnit >= 55296 && codeUnit <= 56319) {
|
|
18644
|
+
const next = value.charCodeAt(index2 + 1);
|
|
18645
|
+
if (!Number.isInteger(next) || next < 56320 || next > 57343)
|
|
18646
|
+
return false;
|
|
18647
|
+
index2 += 1;
|
|
18648
|
+
} else if (codeUnit >= 56320 && codeUnit <= 57343) {
|
|
18649
|
+
return false;
|
|
18650
|
+
}
|
|
18651
|
+
}
|
|
18652
|
+
return true;
|
|
18653
|
+
}
|
|
18654
|
+
function isValidCommunityUserTarget(value) {
|
|
18655
|
+
return typeof value === "string" && value.length > 0 && isWellFormedUnicode(value) && utf8ByteLength(value) <= COMMUNITY_USER_TARGET_MAX_BYTES;
|
|
18656
|
+
}
|
|
18657
|
+
|
|
18658
|
+
// ../shared/src/community-message-delivery.ts
|
|
18659
|
+
var MESSAGE_DELIVERY_MAX_USERS = 1000;
|
|
18660
|
+
var target = exports_external.string().refine(isValidCommunityUserTarget);
|
|
18661
|
+
var targetList = exports_external.array(target).max(MESSAGE_DELIVERY_MAX_USERS);
|
|
18662
|
+
var memberAddedSchema = exports_external.strictObject({
|
|
18663
|
+
userId: target,
|
|
18664
|
+
serverId: exports_external.string().min(1),
|
|
18665
|
+
channelId: exports_external.string().min(1)
|
|
18666
|
+
});
|
|
18667
|
+
var batchShape = exports_external.strictObject({
|
|
18668
|
+
messageId: exports_external.string().min(1),
|
|
18669
|
+
messageEvent: exports_external.unknown(),
|
|
18670
|
+
contentUserIds: targetList,
|
|
18671
|
+
unreadPlainUserIds: targetList,
|
|
18672
|
+
unreadMentionUserIds: targetList,
|
|
18673
|
+
mentionUserIds: targetList,
|
|
18674
|
+
memberAdded: memberAddedSchema.optional(),
|
|
18675
|
+
parentProjection: exports_external.unknown().optional(),
|
|
18676
|
+
parentProjectionUserIds: targetList.optional()
|
|
18677
|
+
});
|
|
18678
|
+
// ../shared/src/community/bot-activity-presets.ts
|
|
18679
|
+
var BOT_ACTIVITY_PRESETS = {
|
|
18680
|
+
idle: { emoji: "\uD83D\uDCA4", text: "Idle" },
|
|
18681
|
+
starting: { emoji: "\uD83C\uDF00", text: "Waking up" },
|
|
18682
|
+
stopping: { emoji: "\uD83C\uDF19", text: "Wrapping up" }
|
|
18683
|
+
};
|
|
18684
|
+
var RUNNING_PRESETS = [
|
|
18685
|
+
{ emoji: "⚡", text: "Working on it" },
|
|
18686
|
+
{ emoji: "\uD83D\uDEE0️", text: "Cooking" },
|
|
18687
|
+
{ emoji: "\uD83E\uDDE0", text: "Thinking hard" },
|
|
18688
|
+
{ emoji: "\uD83D\uDD27", text: "Tinkering" },
|
|
18689
|
+
{ emoji: "\uD83D\uDE80", text: "On it" },
|
|
18690
|
+
{ emoji: "\uD83D\uDD25", text: "In the zone" }
|
|
18691
|
+
];
|
|
18692
|
+
var BOT_ACTIVITY_STATUS_PAIRS = [
|
|
18693
|
+
BOT_ACTIVITY_PRESETS.idle,
|
|
18694
|
+
BOT_ACTIVITY_PRESETS.starting,
|
|
18695
|
+
BOT_ACTIVITY_PRESETS.stopping,
|
|
18696
|
+
...RUNNING_PRESETS
|
|
18697
|
+
];
|
|
18637
18698
|
// ../shared/src/db/index.ts
|
|
18638
18699
|
var allSchema = { ...exports_schema, ...exports_community_schema, ...exports_community_machine_schema };
|
|
18639
18700
|
// ../shared/src/db/queries/task.ts
|
|
@@ -21441,8 +21502,8 @@ function ensureSymlinks(workDir) {
|
|
|
21441
21502
|
try {
|
|
21442
21503
|
const stat = lstatSync(aliasPath);
|
|
21443
21504
|
if (stat.isSymbolicLink()) {
|
|
21444
|
-
const
|
|
21445
|
-
if (
|
|
21505
|
+
const target2 = readlinkSync(aliasPath);
|
|
21506
|
+
if (target2 === CANONICAL_FILE)
|
|
21446
21507
|
continue;
|
|
21447
21508
|
unlinkSync2(aliasPath);
|
|
21448
21509
|
} else {
|
|
@@ -23889,32 +23950,32 @@ function runScan() {
|
|
|
23889
23950
|
}
|
|
23890
23951
|
}
|
|
23891
23952
|
const targets = discoverTargets();
|
|
23892
|
-
for (const
|
|
23893
|
-
if (!
|
|
23953
|
+
for (const target2 of targets) {
|
|
23954
|
+
if (!target2.workdir)
|
|
23894
23955
|
continue;
|
|
23895
23956
|
try {
|
|
23896
|
-
const skills = getAgentScanner(
|
|
23957
|
+
const skills = getAgentScanner(target2.runtime)(target2.workdir);
|
|
23897
23958
|
const hash2 = computeHash(skills);
|
|
23898
|
-
const prevHash = readCacheHash(agentCachePath(
|
|
23959
|
+
const prevHash = readCacheHash(agentCachePath(target2.agentId, target2.runtime));
|
|
23899
23960
|
if (prevHash !== hash2) {
|
|
23900
23961
|
const skillItems = skills.map((s) => ({ name: s.name, description: s.description }));
|
|
23901
|
-
log11.debug(`Syncing ${
|
|
23902
|
-
clientRef.syncSkills(
|
|
23962
|
+
log11.debug(`Syncing ${target2.agentId}:${target2.runtime} — ${skills.length} agent skills`);
|
|
23963
|
+
clientRef.syncSkills(target2.token, {
|
|
23903
23964
|
scope: "agent",
|
|
23904
|
-
agent_id:
|
|
23905
|
-
runtime:
|
|
23965
|
+
agent_id: target2.agentId,
|
|
23966
|
+
runtime: target2.runtime,
|
|
23906
23967
|
skills: skillItems
|
|
23907
23968
|
}).then(() => {
|
|
23908
|
-
writeCacheFile(agentCachePath(
|
|
23969
|
+
writeCacheFile(agentCachePath(target2.agentId, target2.runtime), hash2, skills);
|
|
23909
23970
|
}).catch((e) => {
|
|
23910
23971
|
if (isClientError2(e)) {
|
|
23911
|
-
writeCacheFile(agentCachePath(
|
|
23972
|
+
writeCacheFile(agentCachePath(target2.agentId, target2.runtime), hash2, skills);
|
|
23912
23973
|
}
|
|
23913
23974
|
log11.debug("Agent skill sync failed", e);
|
|
23914
23975
|
});
|
|
23915
23976
|
}
|
|
23916
23977
|
} catch (e) {
|
|
23917
|
-
log11.debug(`Agent scan error for ${
|
|
23978
|
+
log11.debug(`Agent scan error for ${target2.agentId}:${target2.runtime}`, e);
|
|
23918
23979
|
}
|
|
23919
23980
|
}
|
|
23920
23981
|
}
|
package/dist/session-runner.js
CHANGED
|
@@ -17289,6 +17289,7 @@ var CommunityMachineSummarySchema = exports_external.object({
|
|
|
17289
17289
|
var HostReadyMessageSchema = exports_external.object({
|
|
17290
17290
|
type: exports_external.literal("ready"),
|
|
17291
17291
|
runtimeReport: CommunityMachineRuntimeListSchema,
|
|
17292
|
+
capabilities: exports_external.array(exports_external.string().min(1).max(64)).max(16).optional().default([]),
|
|
17292
17293
|
runningAgents: exports_external.array(exports_external.string()).default([]),
|
|
17293
17294
|
hostname: exports_external.string().optional(),
|
|
17294
17295
|
platform: exports_external.string().optional(),
|
|
@@ -17340,6 +17341,14 @@ var AgentWakeAckMessageSchema = exports_external.object({
|
|
|
17340
17341
|
status: exports_external.enum(["ok", "error"]),
|
|
17341
17342
|
error: exports_external.object({ code: exports_external.string().optional(), message: exports_external.string().optional() }).optional()
|
|
17342
17343
|
});
|
|
17344
|
+
var MachineHeartbeatAckMessageSchema = exports_external.strictObject({
|
|
17345
|
+
type: exports_external.literal("machine_heartbeat_ack"),
|
|
17346
|
+
nonce: exports_external.string().min(1).max(128)
|
|
17347
|
+
});
|
|
17348
|
+
var DiagnosticCommandAckMessageSchema = exports_external.strictObject({
|
|
17349
|
+
type: exports_external.literal("diagnostics_ack"),
|
|
17350
|
+
reportId: DiagnosticReportIdSchema
|
|
17351
|
+
});
|
|
17343
17352
|
var CommunityPairTokenResponseSchema = exports_external.object({
|
|
17344
17353
|
tokenId: exports_external.string(),
|
|
17345
17354
|
expiresAt: exports_external.string()
|
|
@@ -17348,6 +17357,7 @@ var CommunityDaemonActivateRequestSchema = exports_external.object({
|
|
|
17348
17357
|
hostname: exports_external.string(),
|
|
17349
17358
|
platform: exports_external.string(),
|
|
17350
17359
|
arch: exports_external.string(),
|
|
17360
|
+
expectedMachineId: exports_external.string().min(1).optional(),
|
|
17351
17361
|
osRelease: exports_external.string().optional(),
|
|
17352
17362
|
daemonVersion: exports_external.string().optional(),
|
|
17353
17363
|
runtimeReport: CommunityMachineRuntimeListSchema.optional()
|
|
@@ -17355,7 +17365,12 @@ var CommunityDaemonActivateRequestSchema = exports_external.object({
|
|
|
17355
17365
|
var CommunityDaemonActivateResponseSchema = exports_external.object({
|
|
17356
17366
|
credential: exports_external.string(),
|
|
17357
17367
|
machineId: exports_external.string(),
|
|
17358
|
-
expiresAt: exports_external.string().nullable()
|
|
17368
|
+
expiresAt: exports_external.string().nullable(),
|
|
17369
|
+
sessionOutcome: exports_external.literal("committed")
|
|
17370
|
+
});
|
|
17371
|
+
var CommunityDaemonActivateErrorResponseSchema = exports_external.object({
|
|
17372
|
+
error: exports_external.string(),
|
|
17373
|
+
sessionOutcome: exports_external.enum(["not_committed", "unknown"])
|
|
17359
17374
|
});
|
|
17360
17375
|
var CommunityDaemonEnrollAgentRequestSchema = exports_external.object({
|
|
17361
17376
|
agentId: exports_external.string().min(1).max(128)
|
|
@@ -17542,6 +17557,10 @@ var HostBotAuditEventFrameSchema = exports_external.object({
|
|
|
17542
17557
|
});
|
|
17543
17558
|
// ../shared/src/community-cli-contract.ts
|
|
17544
17559
|
var HostCommandSchema = exports_external.discriminatedUnion("type", [
|
|
17560
|
+
exports_external.strictObject({
|
|
17561
|
+
type: exports_external.literal("machine:heartbeat"),
|
|
17562
|
+
nonce: exports_external.string().min(1).max(128)
|
|
17563
|
+
}),
|
|
17545
17564
|
exports_external.object({
|
|
17546
17565
|
type: exports_external.literal("agent:wake"),
|
|
17547
17566
|
agentId: exports_external.string().min(1),
|
|
@@ -18063,26 +18082,6 @@ var channelJoinBaselineGuard = sql`${communityMessage.createdAt} > COALESCE(${co
|
|
|
18063
18082
|
|
|
18064
18083
|
// ../shared/src/db/queries/community/mention.ts
|
|
18065
18084
|
var MENTION_INSERT_MAX_ROWS = maxRowsPerInsert(5);
|
|
18066
|
-
// ../shared/src/community/bot-activity-presets.ts
|
|
18067
|
-
var BOT_ACTIVITY_PRESETS = {
|
|
18068
|
-
idle: { emoji: "\uD83D\uDCA4", text: "Idle" },
|
|
18069
|
-
starting: { emoji: "\uD83C\uDF00", text: "Waking up" },
|
|
18070
|
-
stopping: { emoji: "\uD83C\uDF19", text: "Wrapping up" }
|
|
18071
|
-
};
|
|
18072
|
-
var RUNNING_PRESETS = [
|
|
18073
|
-
{ emoji: "⚡", text: "Working on it" },
|
|
18074
|
-
{ emoji: "\uD83D\uDEE0️", text: "Cooking" },
|
|
18075
|
-
{ emoji: "\uD83E\uDDE0", text: "Thinking hard" },
|
|
18076
|
-
{ emoji: "\uD83D\uDD27", text: "Tinkering" },
|
|
18077
|
-
{ emoji: "\uD83D\uDE80", text: "On it" },
|
|
18078
|
-
{ emoji: "\uD83D\uDD25", text: "In the zone" }
|
|
18079
|
-
];
|
|
18080
|
-
var BOT_ACTIVITY_STATUS_PAIRS = [
|
|
18081
|
-
BOT_ACTIVITY_PRESETS.idle,
|
|
18082
|
-
BOT_ACTIVITY_PRESETS.starting,
|
|
18083
|
-
BOT_ACTIVITY_PRESETS.stopping,
|
|
18084
|
-
...RUNNING_PRESETS
|
|
18085
|
-
];
|
|
18086
18085
|
// ../shared/src/community-ws-events.ts
|
|
18087
18086
|
var string4 = exports_external.string();
|
|
18088
18087
|
var nullableString = string4.nullable();
|
|
@@ -18539,6 +18538,68 @@ var WS_EVENTS = {
|
|
|
18539
18538
|
BOT_AUDIT_EVENT: "community:bot.audit_event"
|
|
18540
18539
|
};
|
|
18541
18540
|
var COMMUNITY_EVENT_TYPES = new Set(Object.values(WS_EVENTS));
|
|
18541
|
+
var COMMUNITY_USER_TARGET_MAX_BYTES = 128;
|
|
18542
|
+
function utf8ByteLength(value) {
|
|
18543
|
+
return new TextEncoder().encode(value).byteLength;
|
|
18544
|
+
}
|
|
18545
|
+
function isWellFormedUnicode(value) {
|
|
18546
|
+
for (let index2 = 0;index2 < value.length; index2 += 1) {
|
|
18547
|
+
const codeUnit = value.charCodeAt(index2);
|
|
18548
|
+
if (codeUnit >= 55296 && codeUnit <= 56319) {
|
|
18549
|
+
const next = value.charCodeAt(index2 + 1);
|
|
18550
|
+
if (!Number.isInteger(next) || next < 56320 || next > 57343)
|
|
18551
|
+
return false;
|
|
18552
|
+
index2 += 1;
|
|
18553
|
+
} else if (codeUnit >= 56320 && codeUnit <= 57343) {
|
|
18554
|
+
return false;
|
|
18555
|
+
}
|
|
18556
|
+
}
|
|
18557
|
+
return true;
|
|
18558
|
+
}
|
|
18559
|
+
function isValidCommunityUserTarget(value) {
|
|
18560
|
+
return typeof value === "string" && value.length > 0 && isWellFormedUnicode(value) && utf8ByteLength(value) <= COMMUNITY_USER_TARGET_MAX_BYTES;
|
|
18561
|
+
}
|
|
18562
|
+
|
|
18563
|
+
// ../shared/src/community-message-delivery.ts
|
|
18564
|
+
var MESSAGE_DELIVERY_MAX_USERS = 1000;
|
|
18565
|
+
var target = exports_external.string().refine(isValidCommunityUserTarget);
|
|
18566
|
+
var targetList = exports_external.array(target).max(MESSAGE_DELIVERY_MAX_USERS);
|
|
18567
|
+
var memberAddedSchema = exports_external.strictObject({
|
|
18568
|
+
userId: target,
|
|
18569
|
+
serverId: exports_external.string().min(1),
|
|
18570
|
+
channelId: exports_external.string().min(1)
|
|
18571
|
+
});
|
|
18572
|
+
var batchShape = exports_external.strictObject({
|
|
18573
|
+
messageId: exports_external.string().min(1),
|
|
18574
|
+
messageEvent: exports_external.unknown(),
|
|
18575
|
+
contentUserIds: targetList,
|
|
18576
|
+
unreadPlainUserIds: targetList,
|
|
18577
|
+
unreadMentionUserIds: targetList,
|
|
18578
|
+
mentionUserIds: targetList,
|
|
18579
|
+
memberAdded: memberAddedSchema.optional(),
|
|
18580
|
+
parentProjection: exports_external.unknown().optional(),
|
|
18581
|
+
parentProjectionUserIds: targetList.optional()
|
|
18582
|
+
});
|
|
18583
|
+
// ../shared/src/community/bot-activity-presets.ts
|
|
18584
|
+
var BOT_ACTIVITY_PRESETS = {
|
|
18585
|
+
idle: { emoji: "\uD83D\uDCA4", text: "Idle" },
|
|
18586
|
+
starting: { emoji: "\uD83C\uDF00", text: "Waking up" },
|
|
18587
|
+
stopping: { emoji: "\uD83C\uDF19", text: "Wrapping up" }
|
|
18588
|
+
};
|
|
18589
|
+
var RUNNING_PRESETS = [
|
|
18590
|
+
{ emoji: "⚡", text: "Working on it" },
|
|
18591
|
+
{ emoji: "\uD83D\uDEE0️", text: "Cooking" },
|
|
18592
|
+
{ emoji: "\uD83E\uDDE0", text: "Thinking hard" },
|
|
18593
|
+
{ emoji: "\uD83D\uDD27", text: "Tinkering" },
|
|
18594
|
+
{ emoji: "\uD83D\uDE80", text: "On it" },
|
|
18595
|
+
{ emoji: "\uD83D\uDD25", text: "In the zone" }
|
|
18596
|
+
];
|
|
18597
|
+
var BOT_ACTIVITY_STATUS_PAIRS = [
|
|
18598
|
+
BOT_ACTIVITY_PRESETS.idle,
|
|
18599
|
+
BOT_ACTIVITY_PRESETS.starting,
|
|
18600
|
+
BOT_ACTIVITY_PRESETS.stopping,
|
|
18601
|
+
...RUNNING_PRESETS
|
|
18602
|
+
];
|
|
18542
18603
|
// ../shared/src/db/index.ts
|
|
18543
18604
|
var allSchema = { ...exports_schema, ...exports_community_schema, ...exports_community_machine_schema };
|
|
18544
18605
|
// ../shared/src/db/queries/task.ts
|
|
@@ -20982,8 +21043,8 @@ function ensureSymlinks(workDir) {
|
|
|
20982
21043
|
try {
|
|
20983
21044
|
const stat = lstatSync(aliasPath);
|
|
20984
21045
|
if (stat.isSymbolicLink()) {
|
|
20985
|
-
const
|
|
20986
|
-
if (
|
|
21046
|
+
const target2 = readlinkSync(aliasPath);
|
|
21047
|
+
if (target2 === CANONICAL_FILE)
|
|
20987
21048
|
continue;
|
|
20988
21049
|
unlinkSync(aliasPath);
|
|
20989
21050
|
} else {
|