@alook/cli 0.0.30 → 0.0.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/dist/index.js +18 -2
- package/dist/session-runner.js +38 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14153,7 +14153,8 @@ var EmailNotifyRequestSchema = exports_external.object({
|
|
|
14153
14153
|
messageId: exports_external.string().optional().default(""),
|
|
14154
14154
|
inReplyTo: exports_external.string().optional().default(""),
|
|
14155
14155
|
references: exports_external.string().optional().default(""),
|
|
14156
|
-
meetingInfo: MeetingInfoSchema.nullable().optional()
|
|
14156
|
+
meetingInfo: MeetingInfoSchema.nullable().optional(),
|
|
14157
|
+
attachments: exports_external.string().optional()
|
|
14157
14158
|
});
|
|
14158
14159
|
var CreateEmailAccountSchema = exports_external.object({
|
|
14159
14160
|
emailAddress: exports_external.string().email("valid email required"),
|
|
@@ -15697,7 +15698,8 @@ var agentPin = sqliteTable("agent_pin", {
|
|
|
15697
15698
|
agentId: text("agent_id").notNull(),
|
|
15698
15699
|
workspaceId: text("workspace_id").notNull(),
|
|
15699
15700
|
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
15700
|
-
createdAt: text("created_at").notNull().$defaultFn(() => new Date().toISOString())
|
|
15701
|
+
createdAt: text("created_at").notNull().$defaultFn(() => new Date().toISOString()),
|
|
15702
|
+
position: integer2("position").notNull().default(0)
|
|
15701
15703
|
}, (t) => [
|
|
15702
15704
|
unique("agent_pin_agent_ws_user").on(t.agentId, t.workspaceId, t.userId),
|
|
15703
15705
|
index("idx_agent_pin_ws_user").on(t.workspaceId, t.userId),
|
|
@@ -15706,6 +15708,20 @@ var agentPin = sqliteTable("agent_pin", {
|
|
|
15706
15708
|
foreignColumns: [agent.id, agent.workspaceId]
|
|
15707
15709
|
}).onDelete("cascade")
|
|
15708
15710
|
]);
|
|
15711
|
+
var agentSidebarOrder = sqliteTable("agent_sidebar_order", {
|
|
15712
|
+
id: text("id").primaryKey().$defaultFn(() => nanoid3()),
|
|
15713
|
+
agentId: text("agent_id").notNull(),
|
|
15714
|
+
workspaceId: text("workspace_id").notNull(),
|
|
15715
|
+
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
15716
|
+
position: integer2("position").notNull().default(0)
|
|
15717
|
+
}, (t) => [
|
|
15718
|
+
unique("agent_sidebar_order_agent_ws_user").on(t.agentId, t.workspaceId, t.userId),
|
|
15719
|
+
index("idx_agent_sidebar_order_ws_user").on(t.workspaceId, t.userId),
|
|
15720
|
+
foreignKey({
|
|
15721
|
+
columns: [t.agentId, t.workspaceId],
|
|
15722
|
+
foreignColumns: [agent.id, agent.workspaceId]
|
|
15723
|
+
}).onDelete("cascade")
|
|
15724
|
+
]);
|
|
15709
15725
|
var machine = sqliteTable("machine", {
|
|
15710
15726
|
daemonId: text("daemon_id").notNull(),
|
|
15711
15727
|
workspaceId: text("workspace_id").notNull().references(() => workspace.id, { onDelete: "cascade" }),
|
package/dist/session-runner.js
CHANGED
|
@@ -13870,7 +13870,8 @@ var EmailNotifyRequestSchema = exports_external.object({
|
|
|
13870
13870
|
messageId: exports_external.string().optional().default(""),
|
|
13871
13871
|
inReplyTo: exports_external.string().optional().default(""),
|
|
13872
13872
|
references: exports_external.string().optional().default(""),
|
|
13873
|
-
meetingInfo: MeetingInfoSchema.nullable().optional()
|
|
13873
|
+
meetingInfo: MeetingInfoSchema.nullable().optional(),
|
|
13874
|
+
attachments: exports_external.string().optional()
|
|
13874
13875
|
});
|
|
13875
13876
|
var CreateEmailAccountSchema = exports_external.object({
|
|
13876
13877
|
emailAddress: exports_external.string().email("valid email required"),
|
|
@@ -15414,7 +15415,8 @@ var agentPin = sqliteTable("agent_pin", {
|
|
|
15414
15415
|
agentId: text("agent_id").notNull(),
|
|
15415
15416
|
workspaceId: text("workspace_id").notNull(),
|
|
15416
15417
|
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
15417
|
-
createdAt: text("created_at").notNull().$defaultFn(() => new Date().toISOString())
|
|
15418
|
+
createdAt: text("created_at").notNull().$defaultFn(() => new Date().toISOString()),
|
|
15419
|
+
position: integer2("position").notNull().default(0)
|
|
15418
15420
|
}, (t) => [
|
|
15419
15421
|
unique("agent_pin_agent_ws_user").on(t.agentId, t.workspaceId, t.userId),
|
|
15420
15422
|
index("idx_agent_pin_ws_user").on(t.workspaceId, t.userId),
|
|
@@ -15423,6 +15425,20 @@ var agentPin = sqliteTable("agent_pin", {
|
|
|
15423
15425
|
foreignColumns: [agent.id, agent.workspaceId]
|
|
15424
15426
|
}).onDelete("cascade")
|
|
15425
15427
|
]);
|
|
15428
|
+
var agentSidebarOrder = sqliteTable("agent_sidebar_order", {
|
|
15429
|
+
id: text("id").primaryKey().$defaultFn(() => nanoid3()),
|
|
15430
|
+
agentId: text("agent_id").notNull(),
|
|
15431
|
+
workspaceId: text("workspace_id").notNull(),
|
|
15432
|
+
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
15433
|
+
position: integer2("position").notNull().default(0)
|
|
15434
|
+
}, (t) => [
|
|
15435
|
+
unique("agent_sidebar_order_agent_ws_user").on(t.agentId, t.workspaceId, t.userId),
|
|
15436
|
+
index("idx_agent_sidebar_order_ws_user").on(t.workspaceId, t.userId),
|
|
15437
|
+
foreignKey({
|
|
15438
|
+
columns: [t.agentId, t.workspaceId],
|
|
15439
|
+
foreignColumns: [agent.id, agent.workspaceId]
|
|
15440
|
+
}).onDelete("cascade")
|
|
15441
|
+
]);
|
|
15426
15442
|
var machine = sqliteTable("machine", {
|
|
15427
15443
|
daemonId: text("daemon_id").notNull(),
|
|
15428
15444
|
workspaceId: text("workspace_id").notNull().references(() => workspace.id, { onDelete: "cascade" }),
|
|
@@ -16747,8 +16763,10 @@ class OpenCodeBackend {
|
|
|
16747
16763
|
clearTimeout(timeoutTimer);
|
|
16748
16764
|
if (timedOut) {
|
|
16749
16765
|
resultStatus = "timeout";
|
|
16750
|
-
} else if (code !== 0 && resultStatus === "completed") {
|
|
16751
|
-
|
|
16766
|
+
} else if (code !== 0 && resultStatus === "completed" && !turnDoneTriggered) {
|
|
16767
|
+
if (!lastOutput) {
|
|
16768
|
+
resultStatus = "failed";
|
|
16769
|
+
}
|
|
16752
16770
|
}
|
|
16753
16771
|
const stderr = stderrChunks.join("");
|
|
16754
16772
|
if (stderr && !lastError) {
|
|
@@ -16878,12 +16896,23 @@ those json are sorted by datetime in asc order.
|
|
|
16878
16896
|
## RULES
|
|
16879
16897
|
- DM task prompts include a \`sender\` object with the workspace member's name, email, and whether they are the agent owner (\`is_owner\`). Use this to personalize your responses.
|
|
16880
16898
|
- Read @memory.md(if exists) before your action.
|
|
16881
|
-
- When you start a new task, read the last ~10 lines of today's timeline to understand what has been asked and done recently.
|
|
16882
|
-
- if you don't know the current datetime, obtain the current datetime first.
|
|
16883
16899
|
- When user ask you something you don't have in your current context, try to read the timeline jsonl files for answer (today or previous days).
|
|
16884
16900
|
- Use grep tool to search in the context timeline jsonls if you have clean and focus keywords to recall.
|
|
16901
|
+
- if you don't know the current datetime, obtain the current datetime first.
|
|
16885
16902
|
- When access other local projects, make sure you read the CLAUDE.md/AGENTS.md file under the project root dir to understand the requirements.
|
|
16886
16903
|
`;
|
|
16904
|
+
function resolveInstruction(text2, selfAgentId) {
|
|
16905
|
+
let result = text2;
|
|
16906
|
+
result = result.replace(/\[@ id="([^"]*)" label="([^"]*)"\]/g, (_, id, label) => id === selfAgentId ? "YOU" : `@${label}`);
|
|
16907
|
+
result = result.replace(/<span[^>]*data-id="([^"]*)"[^>]*data-label="([^"]*)"[^>]*>[^<]*<\/span>/gi, (_, id, label) => id === selfAgentId ? "YOU" : `@${label ?? "unknown"}`);
|
|
16908
|
+
result = result.replace(/<\/p>\s*<p[^>]*>/gi, `
|
|
16909
|
+
`);
|
|
16910
|
+
result = result.replace(/<[^>]+>/g, "");
|
|
16911
|
+
result = result.replace(/\n{3,}/g, `
|
|
16912
|
+
|
|
16913
|
+
`).trim();
|
|
16914
|
+
return result;
|
|
16915
|
+
}
|
|
16887
16916
|
function buildInstructionContent(task) {
|
|
16888
16917
|
const displayName = task.agent?.name || "Alook Agent";
|
|
16889
16918
|
const alookAddr = task.agent?.emailHandle ? toAlookAddress(task.agent.emailHandle) : null;
|
|
@@ -16908,8 +16937,8 @@ ${task.agent.instructions}
|
|
|
16908
16937
|
## Your Colleagues
|
|
16909
16938
|
Below are your direct colleagues. You can reach them via email.
|
|
16910
16939
|
|
|
16911
|
-
**Important:**
|
|
16912
|
-
|
|
16940
|
+
**Important:**
|
|
16941
|
+
- When communicating with a colleague on the previous topics, always reply to the existing email thread instead of composing a new email. This keeps the full conversation context visible to your colleague so they can pick up where you left off. For a new topic, you can just start a new email.
|
|
16913
16942
|
`;
|
|
16914
16943
|
for (let i = 0;i < task.agent.colleagues.length; i++) {
|
|
16915
16944
|
const c = task.agent.colleagues[i];
|
|
@@ -16919,7 +16948,7 @@ Below are your direct colleagues. You can reach them via email.
|
|
|
16919
16948
|
content += `${c.description}
|
|
16920
16949
|
`;
|
|
16921
16950
|
if (c.instruction)
|
|
16922
|
-
content += `**
|
|
16951
|
+
content += `**When to involve:** ${resolveInstruction(c.instruction, task.agentId)}
|
|
16923
16952
|
`;
|
|
16924
16953
|
if (i < task.agent.colleagues.length - 1)
|
|
16925
16954
|
content += `
|