@alook/cli 0.0.32 → 0.0.34

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
@@ -13900,7 +13900,9 @@ var ClaimedTaskRowSchema = exports_external.object({
13900
13900
  dispatchedAt: exports_external.coerce.date().nullable(),
13901
13901
  startedAt: exports_external.coerce.date().nullable(),
13902
13902
  completedAt: exports_external.coerce.date().nullable(),
13903
- error: exports_external.string().nullable()
13903
+ error: exports_external.string().nullable(),
13904
+ traceId: exports_external.string().nullable().optional(),
13905
+ parentTaskId: exports_external.string().nullable().optional()
13904
13906
  });
13905
13907
  var ColleagueDataApiSchema = exports_external.object({
13906
13908
  name: exports_external.string(),
@@ -13935,7 +13937,9 @@ var TaskApiBaseSchema = exports_external.object({
13935
13937
  created_at: exports_external.string(),
13936
13938
  type: exports_external.string(),
13937
13939
  context_key: exports_external.string().nullable().optional(),
13938
- context: exports_external.unknown().nullable().optional()
13940
+ context: exports_external.unknown().nullable().optional(),
13941
+ trace_id: exports_external.string().nullable().optional(),
13942
+ parent_task_id: exports_external.string().nullable().optional()
13939
13943
  });
13940
13944
  var TaskSenderApiSchema = exports_external.object({
13941
13945
  name: exports_external.string(),
@@ -14129,7 +14133,9 @@ var SendEmailRequestSchema = exports_external.object({
14129
14133
  attachments: exports_external.array(EmailAttachmentSchema).optional(),
14130
14134
  customAccountId: exports_external.string().optional(),
14131
14135
  from: exports_external.string().email().optional(),
14132
- conversationId: exports_external.string().optional()
14136
+ conversationId: exports_external.string().optional(),
14137
+ traceId: exports_external.string().optional(),
14138
+ sourceTaskId: exports_external.string().optional()
14133
14139
  });
14134
14140
  var UpdateEmailStatusRequestSchema = exports_external.object({
14135
14141
  status: exports_external.enum(["unread", "read", "archived", "sent"])
@@ -14154,7 +14160,9 @@ var EmailNotifyRequestSchema = exports_external.object({
14154
14160
  inReplyTo: exports_external.string().optional().default(""),
14155
14161
  references: exports_external.string().optional().default(""),
14156
14162
  meetingInfo: MeetingInfoSchema.nullable().optional(),
14157
- attachments: exports_external.string().optional()
14163
+ attachments: exports_external.string().optional(),
14164
+ traceId: exports_external.string().optional(),
14165
+ sourceTaskId: exports_external.string().optional()
14158
14166
  });
14159
14167
  var CreateEmailAccountSchema = exports_external.object({
14160
14168
  emailAddress: exports_external.string().email("valid email required"),
@@ -15797,6 +15805,7 @@ var conversation = sqliteTable("conversation", {
15797
15805
  channel: text("channel").notNull().default("default"),
15798
15806
  createdAt: text("created_at").notNull().$defaultFn(() => new Date().toISOString())
15799
15807
  }, (t) => [
15808
+ index("idx_conversation_agent_lookup").on(t.workspaceId, t.agentId, t.userId, t.type, t.channel, t.createdAt),
15800
15809
  foreignKey({
15801
15810
  columns: [t.agentId, t.workspaceId],
15802
15811
  foreignColumns: [agent.id, agent.workspaceId]
@@ -15832,11 +15841,16 @@ var agentTaskQueue = sqliteTable("agent_task_queue", {
15832
15841
  dispatchedAt: text("dispatched_at"),
15833
15842
  startedAt: text("started_at"),
15834
15843
  completedAt: text("completed_at"),
15835
- error: text("error")
15844
+ error: text("error"),
15845
+ traceId: text("trace_id"),
15846
+ parentTaskId: text("parent_task_id")
15836
15847
  }, (t) => [
15837
15848
  index("idx_task_queue_pending").on(t.agentId, t.status).where(sql`status IN ('queued', 'dispatched')`),
15838
15849
  index("idx_task_queue_workspace_active").on(t.workspaceId, t.status, t.agentId).where(sql`status IN ('queued', 'dispatched', 'running')`),
15839
15850
  index("idx_task_queue_agent_history").on(t.agentId, t.workspaceId, t.createdAt),
15851
+ index("idx_task_queue_conversation_status").on(t.conversationId, t.status),
15852
+ index("idx_task_queue_trace").on(t.traceId),
15853
+ index("idx_task_queue_parent").on(t.parentTaskId),
15840
15854
  foreignKey({
15841
15855
  columns: [t.agentId, t.workspaceId],
15842
15856
  foreignColumns: [agent.id, agent.workspaceId]
@@ -16359,7 +16373,9 @@ function fromApiTask(api2) {
16359
16373
  } : undefined,
16360
16374
  sender: api2.sender ? { name: api2.sender.name, email: api2.sender.email, isOwner: api2.sender.is_owner } : undefined,
16361
16375
  repos: undefined,
16362
- createdAt: api2.created_at
16376
+ createdAt: api2.created_at,
16377
+ traceId: api2.trace_id ?? null,
16378
+ parentTaskId: api2.parent_task_id ?? null
16363
16379
  };
16364
16380
  }
16365
16381
 
@@ -17933,6 +17949,8 @@ function emailCommand() {
17933
17949
  }
17934
17950
  }
17935
17951
  const conversationId = process.env.ALOOK_CONVERSATION_ID;
17952
+ const traceId = process.env.ALOOK_TRACE_ID;
17953
+ const sourceTaskId = process.env.ALOOK_TASK_ID;
17936
17954
  const res = await client.postJSON("/api/email/send", {
17937
17955
  agentId: opts.agent_id,
17938
17956
  to: opts.to,
@@ -17941,7 +17959,9 @@ function emailCommand() {
17941
17959
  attachments,
17942
17960
  ...inReplyTo ? { inReplyTo, references } : {},
17943
17961
  ...opts.from ? { from: opts.from } : {},
17944
- ...conversationId ? { conversationId } : {}
17962
+ ...conversationId ? { conversationId } : {},
17963
+ ...traceId ? { traceId } : {},
17964
+ ...sourceTaskId ? { sourceTaskId } : {}
17945
17965
  });
17946
17966
  console.log(`Sent email to ${res.to_email} (id: ${res.id})`);
17947
17967
  } catch (err) {
@@ -18043,6 +18063,8 @@ function emailCommand() {
18043
18063
  }
18044
18064
  const subject = /^fwd:/i.test(original.subject) ? original.subject : `Fwd: ${original.subject}`;
18045
18065
  const conversationId = process.env.ALOOK_CONVERSATION_ID;
18066
+ const traceId = process.env.ALOOK_TRACE_ID;
18067
+ const sourceTaskId = process.env.ALOOK_TASK_ID;
18046
18068
  const res = await client.postJSON("/api/email/send", {
18047
18069
  agentId: opts.agent_id,
18048
18070
  to: opts.to,
@@ -18050,7 +18072,9 @@ function emailCommand() {
18050
18072
  htmlBody,
18051
18073
  attachments,
18052
18074
  ...opts.from ? { from: opts.from } : {},
18053
- ...conversationId ? { conversationId } : {}
18075
+ ...conversationId ? { conversationId } : {},
18076
+ ...traceId ? { traceId } : {},
18077
+ ...sourceTaskId ? { sourceTaskId } : {}
18054
18078
  });
18055
18079
  console.log(`Forwarded email to ${res.to_email} (id: ${res.id})`);
18056
18080
  } catch (err) {
@@ -13617,7 +13617,9 @@ var ClaimedTaskRowSchema = exports_external.object({
13617
13617
  dispatchedAt: exports_external.coerce.date().nullable(),
13618
13618
  startedAt: exports_external.coerce.date().nullable(),
13619
13619
  completedAt: exports_external.coerce.date().nullable(),
13620
- error: exports_external.string().nullable()
13620
+ error: exports_external.string().nullable(),
13621
+ traceId: exports_external.string().nullable().optional(),
13622
+ parentTaskId: exports_external.string().nullable().optional()
13621
13623
  });
13622
13624
  var ColleagueDataApiSchema = exports_external.object({
13623
13625
  name: exports_external.string(),
@@ -13652,7 +13654,9 @@ var TaskApiBaseSchema = exports_external.object({
13652
13654
  created_at: exports_external.string(),
13653
13655
  type: exports_external.string(),
13654
13656
  context_key: exports_external.string().nullable().optional(),
13655
- context: exports_external.unknown().nullable().optional()
13657
+ context: exports_external.unknown().nullable().optional(),
13658
+ trace_id: exports_external.string().nullable().optional(),
13659
+ parent_task_id: exports_external.string().nullable().optional()
13656
13660
  });
13657
13661
  var TaskSenderApiSchema = exports_external.object({
13658
13662
  name: exports_external.string(),
@@ -13846,7 +13850,9 @@ var SendEmailRequestSchema = exports_external.object({
13846
13850
  attachments: exports_external.array(EmailAttachmentSchema).optional(),
13847
13851
  customAccountId: exports_external.string().optional(),
13848
13852
  from: exports_external.string().email().optional(),
13849
- conversationId: exports_external.string().optional()
13853
+ conversationId: exports_external.string().optional(),
13854
+ traceId: exports_external.string().optional(),
13855
+ sourceTaskId: exports_external.string().optional()
13850
13856
  });
13851
13857
  var UpdateEmailStatusRequestSchema = exports_external.object({
13852
13858
  status: exports_external.enum(["unread", "read", "archived", "sent"])
@@ -13871,7 +13877,9 @@ var EmailNotifyRequestSchema = exports_external.object({
13871
13877
  inReplyTo: exports_external.string().optional().default(""),
13872
13878
  references: exports_external.string().optional().default(""),
13873
13879
  meetingInfo: MeetingInfoSchema.nullable().optional(),
13874
- attachments: exports_external.string().optional()
13880
+ attachments: exports_external.string().optional(),
13881
+ traceId: exports_external.string().optional(),
13882
+ sourceTaskId: exports_external.string().optional()
13875
13883
  });
13876
13884
  var CreateEmailAccountSchema = exports_external.object({
13877
13885
  emailAddress: exports_external.string().email("valid email required"),
@@ -15514,6 +15522,7 @@ var conversation = sqliteTable("conversation", {
15514
15522
  channel: text("channel").notNull().default("default"),
15515
15523
  createdAt: text("created_at").notNull().$defaultFn(() => new Date().toISOString())
15516
15524
  }, (t) => [
15525
+ index("idx_conversation_agent_lookup").on(t.workspaceId, t.agentId, t.userId, t.type, t.channel, t.createdAt),
15517
15526
  foreignKey({
15518
15527
  columns: [t.agentId, t.workspaceId],
15519
15528
  foreignColumns: [agent.id, agent.workspaceId]
@@ -15549,11 +15558,16 @@ var agentTaskQueue = sqliteTable("agent_task_queue", {
15549
15558
  dispatchedAt: text("dispatched_at"),
15550
15559
  startedAt: text("started_at"),
15551
15560
  completedAt: text("completed_at"),
15552
- error: text("error")
15561
+ error: text("error"),
15562
+ traceId: text("trace_id"),
15563
+ parentTaskId: text("parent_task_id")
15553
15564
  }, (t) => [
15554
15565
  index("idx_task_queue_pending").on(t.agentId, t.status).where(sql`status IN ('queued', 'dispatched')`),
15555
15566
  index("idx_task_queue_workspace_active").on(t.workspaceId, t.status, t.agentId).where(sql`status IN ('queued', 'dispatched', 'running')`),
15556
15567
  index("idx_task_queue_agent_history").on(t.agentId, t.workspaceId, t.createdAt),
15568
+ index("idx_task_queue_conversation_status").on(t.conversationId, t.status),
15569
+ index("idx_task_queue_trace").on(t.traceId),
15570
+ index("idx_task_queue_parent").on(t.parentTaskId),
15557
15571
  foreignKey({
15558
15572
  columns: [t.agentId, t.workspaceId],
15559
15573
  foreignColumns: [agent.id, agent.workspaceId]
@@ -16146,7 +16160,7 @@ class CodexBackend {
16146
16160
  this.cliPath = cliPath;
16147
16161
  }
16148
16162
  execute(prompt, options) {
16149
- const proc = spawn2(this.cliPath, ["app-server", "--listen", "stdio://", "--config", "sandbox_workspace_write.network_access=true"], {
16163
+ const proc = spawn2(this.cliPath, ["app-server", "--listen", "stdio://", "--sandbox", "danger-full-access"], {
16150
16164
  cwd: options.cwd,
16151
16165
  stdio: ["pipe", "pipe", "pipe"],
16152
16166
  env: { ...process.env, ...options.env }
@@ -16504,7 +16518,7 @@ class CodexBackend {
16504
16518
  } else {
16505
16519
  const threadParams = {
16506
16520
  cwd: options.cwd,
16507
- sandbox: "workspace-write",
16521
+ sandbox: "danger-full-access",
16508
16522
  persistExtendedHistory: true,
16509
16523
  experimentalRawEvents: false
16510
16524
  };
@@ -17146,6 +17160,7 @@ function prepare(config2, task) {
17146
17160
  ALOOK_AGENT_ID: task.agentId,
17147
17161
  ALOOK_TASK_ID: task.id,
17148
17162
  ALOOK_CONVERSATION_ID: task.conversationId,
17163
+ ALOOK_TRACE_ID: task.traceId ?? "",
17149
17164
  ALOOK_HEALTH_PORT: process.env.ALOOK_HEALTH_PORT || "19514"
17150
17165
  };
17151
17166
  return { workDir, timelineDir, env };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alook/cli",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "Alook CLI — Enable Your Person Colleague",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/alookai/alook#readme",