@alook/cli 0.0.31 → 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 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" }),
@@ -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" }),
@@ -16880,12 +16896,23 @@ those json are sorted by datetime in asc order.
16880
16896
  ## RULES
16881
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.
16882
16898
  - Read @memory.md(if exists) before your action.
16883
- - When you start a new task, read the last ~10 lines of today's timeline to understand what has been asked and done recently.
16884
- - if you don't know the current datetime, obtain the current datetime first.
16885
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).
16886
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.
16887
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.
16888
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
+ }
16889
16916
  function buildInstructionContent(task) {
16890
16917
  const displayName = task.agent?.name || "Alook Agent";
16891
16918
  const alookAddr = task.agent?.emailHandle ? toAlookAddress(task.agent.emailHandle) : null;
@@ -16910,8 +16937,8 @@ ${task.agent.instructions}
16910
16937
  ## Your Colleagues
16911
16938
  Below are your direct colleagues. You can reach them via email.
16912
16939
 
16913
- **Important:** When communicating with a colleague, 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.
16914
-
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.
16915
16942
  `;
16916
16943
  for (let i = 0;i < task.agent.colleagues.length; i++) {
16917
16944
  const c = task.agent.colleagues[i];
@@ -16921,7 +16948,7 @@ Below are your direct colleagues. You can reach them via email.
16921
16948
  content += `${c.description}
16922
16949
  `;
16923
16950
  if (c.instruction)
16924
- content += `**Relationship:** ${c.instruction}
16951
+ content += `**When to involve:** ${resolveInstruction(c.instruction, task.agentId)}
16925
16952
  `;
16926
16953
  if (i < task.agent.colleagues.length - 1)
16927
16954
  content += `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alook/cli",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "Alook CLI — Enable Your Person Colleague",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/alookai/alook#readme",