@alook/cli 0.0.33 → 0.0.35
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 +30 -8
- package/dist/session-runner.js +19 -6
- package/package.json +1 -1
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"),
|
|
@@ -15833,12 +15841,16 @@ var agentTaskQueue = sqliteTable("agent_task_queue", {
|
|
|
15833
15841
|
dispatchedAt: text("dispatched_at"),
|
|
15834
15842
|
startedAt: text("started_at"),
|
|
15835
15843
|
completedAt: text("completed_at"),
|
|
15836
|
-
error: text("error")
|
|
15844
|
+
error: text("error"),
|
|
15845
|
+
traceId: text("trace_id"),
|
|
15846
|
+
parentTaskId: text("parent_task_id")
|
|
15837
15847
|
}, (t) => [
|
|
15838
15848
|
index("idx_task_queue_pending").on(t.agentId, t.status).where(sql`status IN ('queued', 'dispatched')`),
|
|
15839
15849
|
index("idx_task_queue_workspace_active").on(t.workspaceId, t.status, t.agentId).where(sql`status IN ('queued', 'dispatched', 'running')`),
|
|
15840
15850
|
index("idx_task_queue_agent_history").on(t.agentId, t.workspaceId, t.createdAt),
|
|
15841
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),
|
|
15842
15854
|
foreignKey({
|
|
15843
15855
|
columns: [t.agentId, t.workspaceId],
|
|
15844
15856
|
foreignColumns: [agent.id, agent.workspaceId]
|
|
@@ -16361,7 +16373,9 @@ function fromApiTask(api2) {
|
|
|
16361
16373
|
} : undefined,
|
|
16362
16374
|
sender: api2.sender ? { name: api2.sender.name, email: api2.sender.email, isOwner: api2.sender.is_owner } : undefined,
|
|
16363
16375
|
repos: undefined,
|
|
16364
|
-
createdAt: api2.created_at
|
|
16376
|
+
createdAt: api2.created_at,
|
|
16377
|
+
traceId: api2.trace_id ?? null,
|
|
16378
|
+
parentTaskId: api2.parent_task_id ?? null
|
|
16365
16379
|
};
|
|
16366
16380
|
}
|
|
16367
16381
|
|
|
@@ -17935,6 +17949,8 @@ function emailCommand() {
|
|
|
17935
17949
|
}
|
|
17936
17950
|
}
|
|
17937
17951
|
const conversationId = process.env.ALOOK_CONVERSATION_ID;
|
|
17952
|
+
const traceId = process.env.ALOOK_TRACE_ID;
|
|
17953
|
+
const sourceTaskId = process.env.ALOOK_TASK_ID;
|
|
17938
17954
|
const res = await client.postJSON("/api/email/send", {
|
|
17939
17955
|
agentId: opts.agent_id,
|
|
17940
17956
|
to: opts.to,
|
|
@@ -17943,7 +17959,9 @@ function emailCommand() {
|
|
|
17943
17959
|
attachments,
|
|
17944
17960
|
...inReplyTo ? { inReplyTo, references } : {},
|
|
17945
17961
|
...opts.from ? { from: opts.from } : {},
|
|
17946
|
-
...conversationId ? { conversationId } : {}
|
|
17962
|
+
...conversationId ? { conversationId } : {},
|
|
17963
|
+
...traceId ? { traceId } : {},
|
|
17964
|
+
...sourceTaskId ? { sourceTaskId } : {}
|
|
17947
17965
|
});
|
|
17948
17966
|
console.log(`Sent email to ${res.to_email} (id: ${res.id})`);
|
|
17949
17967
|
} catch (err) {
|
|
@@ -18045,6 +18063,8 @@ function emailCommand() {
|
|
|
18045
18063
|
}
|
|
18046
18064
|
const subject = /^fwd:/i.test(original.subject) ? original.subject : `Fwd: ${original.subject}`;
|
|
18047
18065
|
const conversationId = process.env.ALOOK_CONVERSATION_ID;
|
|
18066
|
+
const traceId = process.env.ALOOK_TRACE_ID;
|
|
18067
|
+
const sourceTaskId = process.env.ALOOK_TASK_ID;
|
|
18048
18068
|
const res = await client.postJSON("/api/email/send", {
|
|
18049
18069
|
agentId: opts.agent_id,
|
|
18050
18070
|
to: opts.to,
|
|
@@ -18052,7 +18072,9 @@ function emailCommand() {
|
|
|
18052
18072
|
htmlBody,
|
|
18053
18073
|
attachments,
|
|
18054
18074
|
...opts.from ? { from: opts.from } : {},
|
|
18055
|
-
...conversationId ? { conversationId } : {}
|
|
18075
|
+
...conversationId ? { conversationId } : {},
|
|
18076
|
+
...traceId ? { traceId } : {},
|
|
18077
|
+
...sourceTaskId ? { sourceTaskId } : {}
|
|
18056
18078
|
});
|
|
18057
18079
|
console.log(`Forwarded email to ${res.to_email} (id: ${res.id})`);
|
|
18058
18080
|
} catch (err) {
|
package/dist/session-runner.js
CHANGED
|
@@ -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"),
|
|
@@ -15550,12 +15558,16 @@ var agentTaskQueue = sqliteTable("agent_task_queue", {
|
|
|
15550
15558
|
dispatchedAt: text("dispatched_at"),
|
|
15551
15559
|
startedAt: text("started_at"),
|
|
15552
15560
|
completedAt: text("completed_at"),
|
|
15553
|
-
error: text("error")
|
|
15561
|
+
error: text("error"),
|
|
15562
|
+
traceId: text("trace_id"),
|
|
15563
|
+
parentTaskId: text("parent_task_id")
|
|
15554
15564
|
}, (t) => [
|
|
15555
15565
|
index("idx_task_queue_pending").on(t.agentId, t.status).where(sql`status IN ('queued', 'dispatched')`),
|
|
15556
15566
|
index("idx_task_queue_workspace_active").on(t.workspaceId, t.status, t.agentId).where(sql`status IN ('queued', 'dispatched', 'running')`),
|
|
15557
15567
|
index("idx_task_queue_agent_history").on(t.agentId, t.workspaceId, t.createdAt),
|
|
15558
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),
|
|
15559
15571
|
foreignKey({
|
|
15560
15572
|
columns: [t.agentId, t.workspaceId],
|
|
15561
15573
|
foreignColumns: [agent.id, agent.workspaceId]
|
|
@@ -16148,7 +16160,7 @@ class CodexBackend {
|
|
|
16148
16160
|
this.cliPath = cliPath;
|
|
16149
16161
|
}
|
|
16150
16162
|
execute(prompt, options) {
|
|
16151
|
-
const proc = spawn2(this.cliPath, ["app-server", "--listen", "stdio://"], {
|
|
16163
|
+
const proc = spawn2(this.cliPath, ["app-server", "--listen", "stdio://", "--config", "sandbox_mode=danger-full-access"], {
|
|
16152
16164
|
cwd: options.cwd,
|
|
16153
16165
|
stdio: ["pipe", "pipe", "pipe"],
|
|
16154
16166
|
env: { ...process.env, ...options.env }
|
|
@@ -17148,6 +17160,7 @@ function prepare(config2, task) {
|
|
|
17148
17160
|
ALOOK_AGENT_ID: task.agentId,
|
|
17149
17161
|
ALOOK_TASK_ID: task.id,
|
|
17150
17162
|
ALOOK_CONVERSATION_ID: task.conversationId,
|
|
17163
|
+
ALOOK_TRACE_ID: task.traceId ?? "",
|
|
17151
17164
|
ALOOK_HEALTH_PORT: process.env.ALOOK_HEALTH_PORT || "19514"
|
|
17152
17165
|
};
|
|
17153
17166
|
return { workDir, timelineDir, env };
|