@sentry/junior 0.133.0 → 0.134.0
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/{agent-hooks-5BUIXVIX.js → agent-hooks-HGXNYOOD.js} +9 -9
- package/dist/api/schema/task.d.ts +60 -0
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +3 -1
- package/dist/api.js +90 -20
- package/dist/app.js +48 -24
- package/dist/{catalog-runtime-VGB3DWXZ.js → catalog-runtime-P6QHU6XE.js} +5 -5
- package/dist/chat/agent/prompt.d.ts +7 -5
- package/dist/chat/agent/repository-context.d.ts +20 -0
- package/dist/chat/agent/sandbox.d.ts +8 -0
- package/dist/chat/agent/tools.d.ts +3 -0
- package/dist/chat/plugins/agent-hooks.d.ts +2 -2
- package/dist/chat/repository-instructions.d.ts +44 -0
- package/dist/chat/sandbox/noninteractive-command.d.ts +2 -0
- package/dist/chat/sandbox/sandbox.d.ts +3 -0
- package/dist/chat/sandbox/session.d.ts +1 -0
- package/dist/chat/services/context-compaction.d.ts +1 -0
- package/dist/chat/slack/tools/user-lookup.d.ts +2 -6
- package/dist/chat/tasks/execution-stats.d.ts +29 -0
- package/dist/chat/tasks/registered.d.ts +3 -0
- package/dist/chat/tools/index.d.ts +2 -0
- package/dist/chat/tools/sandbox/bash.d.ts +1 -0
- package/dist/chat/tools/system-time.d.ts +11 -1
- package/dist/{chunk-VQA25AL4.js → chunk-52DIKFJV.js} +14 -6
- package/dist/{chunk-EJRJWBKG.js → chunk-6T3AYZT7.js} +1 -1
- package/dist/{chunk-ECUILEUX.js → chunk-7GKQ7UIO.js} +430 -29
- package/dist/{chunk-QVEXYYFM.js → chunk-7UTBPDXK.js} +24 -1
- package/dist/{chunk-V365UVCU.js → chunk-AS3I7OIL.js} +2 -2
- package/dist/{chunk-HX236W2U.js → chunk-CDQ4YIZM.js} +9 -0
- package/dist/{chunk-TLN54TOQ.js → chunk-FDNAUM7X.js} +32 -32
- package/dist/{chunk-TU7P77FI.js → chunk-FL466XX5.js} +12 -12
- package/dist/{chunk-IKO5LFIU.js → chunk-GSP5SMZJ.js} +1 -1
- package/dist/{chunk-XTQGVNM3.js → chunk-KWGJG4HO.js} +6 -12
- package/dist/{chunk-VL7OYSHD.js → chunk-LKK4XMUV.js} +1 -1
- package/dist/{chunk-AH5HTUYX.js → chunk-MFERLE3G.js} +1 -1
- package/dist/{chunk-T5FPIBU2.js → chunk-NF2TNZPD.js} +788 -674
- package/dist/chunk-NOA34AJY.js +122 -0
- package/dist/{chunk-5ZAZHLIW.js → chunk-NYWSCJVW.js} +1 -1
- package/dist/{chunk-QWGZ273D.js → chunk-QLEKAO7O.js} +71 -23
- package/dist/{chunk-IVTHTAVK.js → chunk-S6DMTEOM.js} +2 -2
- package/dist/{chunk-WHEMUEXT.js → chunk-TR6UEEYD.js} +8 -6
- package/dist/{chunk-FX6BLEDP.js → chunk-U3ZI7CCW.js} +1 -1
- package/dist/{chunk-JLN4XSPR.js → chunk-VEGF62FV.js} +1 -1
- package/dist/{chunk-HTGXUNEC.js → chunk-VGXJMECA.js} +7 -7
- package/dist/{chunk-HJ4KDO4N.js → chunk-VP6NCPRS.js} +1 -1
- package/dist/{chunk-LNYNTR27.js → chunk-VPYKNCTN.js} +3 -3
- package/dist/{chunk-LDRO4OQ4.js → chunk-XG5PHKPM.js} +2 -2
- package/dist/{chunk-TBVS7GBE.js → chunk-YNLQQ622.js} +9 -8
- package/dist/cli/chat.js +25 -25
- package/dist/cli/check.js +6 -6
- package/dist/cli/init.js +0 -1
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/db/schema/task-executions.d.ts +110 -0
- package/dist/db/schema.d.ts +111 -1
- package/dist/{db-RICMPUFT.js → db-GFK4NHWJ.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-YFVS4SAX.js → oauth-callback-server-HUJLAQ5N.js} +19 -18
- package/dist/{runner-A3LVGZR6.js → runner-T77AFAH4.js} +13 -12
- package/dist/{skills-P7Q6Z6PN.js → skills-3KUFJOOR.js} +6 -6
- package/dist/{validation-RYHOWBET.js → validation-FMWDHKYU.js} +6 -6
- package/dist/version.js +1 -1
- package/migrations/0019_lowly_valkyrie.sql +14 -0
- package/migrations/meta/0019_snapshot.json +1904 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +4 -4
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getDb
|
|
3
|
+
} from "./chunk-VPYKNCTN.js";
|
|
4
|
+
import {
|
|
5
|
+
juniorTaskExecutions
|
|
6
|
+
} from "./chunk-QLEKAO7O.js";
|
|
7
|
+
import {
|
|
8
|
+
logWarn
|
|
9
|
+
} from "./chunk-6T3AYZT7.js";
|
|
10
|
+
|
|
11
|
+
// src/chat/tasks/execution-stats.ts
|
|
12
|
+
import { and, asc, count, desc, eq, gte, lte, max, sql } from "drizzle-orm";
|
|
13
|
+
function utcDate(nowMs) {
|
|
14
|
+
return new Date(nowMs).toISOString().slice(0, 10);
|
|
15
|
+
}
|
|
16
|
+
function emptyDay(date) {
|
|
17
|
+
return { date, event: 0, registered: 0, scheduled: 0 };
|
|
18
|
+
}
|
|
19
|
+
async function recordTaskExecution(type, taskId, options) {
|
|
20
|
+
const namespace = options.namespace ?? "junior";
|
|
21
|
+
const nowMs = options.nowMs ?? Date.now();
|
|
22
|
+
try {
|
|
23
|
+
await getDb().insert(juniorTaskExecutions).values({
|
|
24
|
+
conversationId: options.conversationId,
|
|
25
|
+
executedAtMs: nowMs,
|
|
26
|
+
executionId: options.executionId,
|
|
27
|
+
kind: type,
|
|
28
|
+
namespace,
|
|
29
|
+
taskId
|
|
30
|
+
}).onConflictDoNothing({
|
|
31
|
+
target: [
|
|
32
|
+
juniorTaskExecutions.kind,
|
|
33
|
+
juniorTaskExecutions.namespace,
|
|
34
|
+
juniorTaskExecutions.executionId
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
} catch (error) {
|
|
38
|
+
logWarn("task.execution.stat_failed", {
|
|
39
|
+
error,
|
|
40
|
+
"app.task.execution.id": options.executionId,
|
|
41
|
+
"app.task.execution.namespace": namespace,
|
|
42
|
+
"app.task.execution.task_id": taskId,
|
|
43
|
+
"app.task.execution.type": type
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function readTaskExecutionSummaries(type, namespace, options = {}) {
|
|
48
|
+
const sevenDaysAgoMs = (options.nowMs ?? Date.now()) - 7 * 24 * 60 * 60 * 1e3;
|
|
49
|
+
const db = getDb();
|
|
50
|
+
const latest = db.selectDistinctOn([juniorTaskExecutions.taskId], {
|
|
51
|
+
conversationId: juniorTaskExecutions.conversationId,
|
|
52
|
+
taskId: juniorTaskExecutions.taskId
|
|
53
|
+
}).from(juniorTaskExecutions).where(
|
|
54
|
+
and(
|
|
55
|
+
eq(juniorTaskExecutions.kind, type),
|
|
56
|
+
eq(juniorTaskExecutions.namespace, namespace)
|
|
57
|
+
)
|
|
58
|
+
).orderBy(
|
|
59
|
+
juniorTaskExecutions.taskId,
|
|
60
|
+
desc(juniorTaskExecutions.executedAtMs),
|
|
61
|
+
desc(juniorTaskExecutions.executionId)
|
|
62
|
+
).as("latest_task_execution");
|
|
63
|
+
const rows = await db.select({
|
|
64
|
+
lastConversationId: latest.conversationId,
|
|
65
|
+
lastExecutedAtMs: max(juniorTaskExecutions.executedAtMs),
|
|
66
|
+
runsLast7Days: sql`count(*) filter (where ${juniorTaskExecutions.executedAtMs} >= ${sevenDaysAgoMs})::int`,
|
|
67
|
+
taskId: juniorTaskExecutions.taskId,
|
|
68
|
+
totalRuns: sql`count(*)::int`
|
|
69
|
+
}).from(juniorTaskExecutions).innerJoin(latest, eq(latest.taskId, juniorTaskExecutions.taskId)).where(
|
|
70
|
+
and(
|
|
71
|
+
eq(juniorTaskExecutions.kind, type),
|
|
72
|
+
eq(juniorTaskExecutions.namespace, namespace)
|
|
73
|
+
)
|
|
74
|
+
).groupBy(juniorTaskExecutions.taskId, latest.conversationId);
|
|
75
|
+
return new Map(
|
|
76
|
+
rows.map((row) => [
|
|
77
|
+
row.taskId,
|
|
78
|
+
{
|
|
79
|
+
lastConversationId: row.lastConversationId,
|
|
80
|
+
...row.lastExecutedAtMs !== null ? { lastExecutedAtMs: row.lastExecutedAtMs } : {},
|
|
81
|
+
runsLast7Days: row.runsLast7Days,
|
|
82
|
+
totalRuns: row.totalRuns
|
|
83
|
+
}
|
|
84
|
+
])
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
async function readTaskExecutionDays(dayCount = 90, options = {}) {
|
|
88
|
+
const nowMs = options.nowMs ?? Date.now();
|
|
89
|
+
const end = utcDate(nowMs);
|
|
90
|
+
const endMs = Date.parse(`${end}T23:59:59.999Z`);
|
|
91
|
+
const startMs = Date.parse(`${end}T00:00:00.000Z`) - (dayCount - 1) * 864e5;
|
|
92
|
+
const executionDate = sql`to_char(to_timestamp(${juniorTaskExecutions.executedAtMs} / 1000.0) at time zone 'UTC', 'YYYY-MM-DD')`;
|
|
93
|
+
const rows = await getDb().select({
|
|
94
|
+
count: count(),
|
|
95
|
+
date: executionDate,
|
|
96
|
+
kind: juniorTaskExecutions.kind
|
|
97
|
+
}).from(juniorTaskExecutions).where(
|
|
98
|
+
and(
|
|
99
|
+
gte(juniorTaskExecutions.executedAtMs, startMs),
|
|
100
|
+
lte(juniorTaskExecutions.executedAtMs, endMs)
|
|
101
|
+
)
|
|
102
|
+
).groupBy(executionDate, juniorTaskExecutions.kind).orderBy(asc(executionDate), asc(juniorTaskExecutions.kind));
|
|
103
|
+
const byDate = /* @__PURE__ */ new Map();
|
|
104
|
+
for (let offset = 0; offset < dayCount; offset += 1) {
|
|
105
|
+
const date = utcDate(startMs + offset * 864e5);
|
|
106
|
+
byDate.set(date, emptyDay(date));
|
|
107
|
+
}
|
|
108
|
+
for (const row of rows) {
|
|
109
|
+
const day = byDate.get(row.date);
|
|
110
|
+
if (!day) continue;
|
|
111
|
+
if (row.kind === "registered") day.registered = row.count;
|
|
112
|
+
else if (row.kind === "scheduled") day.scheduled = row.count;
|
|
113
|
+
else if (row.kind === "event") day.event = row.count;
|
|
114
|
+
}
|
|
115
|
+
return [...byDate.values()];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export {
|
|
119
|
+
recordTaskExecution,
|
|
120
|
+
readTaskExecutionSummaries,
|
|
121
|
+
readTaskExecutionDays
|
|
122
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_SQL_STATEMENT_TIMEOUT_MS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XG5PHKPM.js";
|
|
4
4
|
import {
|
|
5
5
|
juniorDestinations,
|
|
6
6
|
timestamptz
|
|
@@ -351,54 +351,100 @@ var juniorStats = pgTable9(
|
|
|
351
351
|
]
|
|
352
352
|
);
|
|
353
353
|
|
|
354
|
+
// src/db/schema/task-executions.ts
|
|
355
|
+
import {
|
|
356
|
+
bigint as bigint2,
|
|
357
|
+
foreignKey as foreignKey3,
|
|
358
|
+
index as index7,
|
|
359
|
+
pgTable as pgTable10,
|
|
360
|
+
primaryKey as primaryKey5,
|
|
361
|
+
text as text10
|
|
362
|
+
} from "drizzle-orm/pg-core";
|
|
363
|
+
var juniorTaskExecutions = pgTable10(
|
|
364
|
+
"junior_task_executions",
|
|
365
|
+
{
|
|
366
|
+
executionId: text10("execution_id").notNull(),
|
|
367
|
+
kind: text10("kind").notNull(),
|
|
368
|
+
namespace: text10("namespace").notNull(),
|
|
369
|
+
taskId: text10("task_id").notNull(),
|
|
370
|
+
conversationId: text10("conversation_id").notNull(),
|
|
371
|
+
executedAtMs: bigint2("executed_at_ms", { mode: "number" }).notNull()
|
|
372
|
+
},
|
|
373
|
+
(table) => [
|
|
374
|
+
primaryKey5({
|
|
375
|
+
name: "junior_task_executions_kind_namespace_execution_id_pk",
|
|
376
|
+
columns: [table.kind, table.namespace, table.executionId]
|
|
377
|
+
}),
|
|
378
|
+
foreignKey3({
|
|
379
|
+
name: "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk",
|
|
380
|
+
columns: [table.conversationId],
|
|
381
|
+
foreignColumns: [juniorConversations.conversationId]
|
|
382
|
+
}),
|
|
383
|
+
index7("junior_task_executions_task_time_idx").on(
|
|
384
|
+
table.kind,
|
|
385
|
+
table.namespace,
|
|
386
|
+
table.taskId,
|
|
387
|
+
table.executedAtMs
|
|
388
|
+
),
|
|
389
|
+
index7("junior_task_executions_time_kind_idx").on(
|
|
390
|
+
table.executedAtMs,
|
|
391
|
+
table.kind
|
|
392
|
+
),
|
|
393
|
+
index7("junior_task_executions_conversation_time_idx").on(
|
|
394
|
+
table.conversationId,
|
|
395
|
+
table.executedAtMs
|
|
396
|
+
)
|
|
397
|
+
]
|
|
398
|
+
);
|
|
399
|
+
|
|
354
400
|
// src/db/schema/scheduled-tasks.ts
|
|
355
401
|
import { sql as sql4 } from "drizzle-orm";
|
|
356
|
-
import { bigint as
|
|
357
|
-
var juniorSchedulerTasks =
|
|
402
|
+
import { bigint as bigint3, index as index8, jsonb as jsonb6, pgTable as pgTable11, text as text11 } from "drizzle-orm/pg-core";
|
|
403
|
+
var juniorSchedulerTasks = pgTable11(
|
|
358
404
|
"junior_scheduler_tasks",
|
|
359
405
|
{
|
|
360
|
-
id:
|
|
361
|
-
teamId:
|
|
406
|
+
id: text11("id").primaryKey(),
|
|
407
|
+
teamId: text11("team_id").notNull(),
|
|
362
408
|
// TODO(v0.128.0): Remove after v0.127.x runtimes no longer write this column.
|
|
363
|
-
creatorSlackUserId:
|
|
364
|
-
creatorIdentityId:
|
|
365
|
-
status:
|
|
366
|
-
nextRunAtMs:
|
|
367
|
-
runNowAtMs:
|
|
368
|
-
createdAtMs:
|
|
409
|
+
creatorSlackUserId: text11("creator_slack_user_id"),
|
|
410
|
+
creatorIdentityId: text11("creator_identity_id"),
|
|
411
|
+
status: text11("status").notNull(),
|
|
412
|
+
nextRunAtMs: bigint3("next_run_at_ms", { mode: "number" }),
|
|
413
|
+
runNowAtMs: bigint3("run_now_at_ms", { mode: "number" }),
|
|
414
|
+
createdAtMs: bigint3("created_at_ms", { mode: "number" }).notNull(),
|
|
369
415
|
record: jsonb6("record").$type().notNull()
|
|
370
416
|
},
|
|
371
417
|
(table) => [
|
|
372
418
|
// TODO(v0.128.0): Remove with creatorSlackUserId.
|
|
373
|
-
|
|
374
|
-
|
|
419
|
+
index8("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql4`${table.status} <> 'deleted'`),
|
|
420
|
+
index8("junior_scheduler_tasks_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(
|
|
375
421
|
sql4`${table.status} <> 'deleted' AND ${table.creatorIdentityId} IS NOT NULL`
|
|
376
422
|
),
|
|
377
|
-
|
|
378
|
-
|
|
423
|
+
index8("junior_scheduler_tasks_team_status_idx").on(table.teamId, table.createdAtMs, table.id).where(sql4`${table.status} <> 'deleted'`),
|
|
424
|
+
index8("junior_scheduler_tasks_run_now_due_idx").on(table.runNowAtMs, table.createdAtMs, table.id).where(
|
|
379
425
|
sql4`${table.status} = 'active' AND ${table.runNowAtMs} IS NOT NULL`
|
|
380
426
|
),
|
|
381
|
-
|
|
427
|
+
index8("junior_scheduler_tasks_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(
|
|
382
428
|
sql4`${table.status} = 'active' AND ${table.nextRunAtMs} IS NOT NULL`
|
|
383
429
|
)
|
|
384
430
|
]
|
|
385
431
|
);
|
|
386
|
-
var juniorSchedulerRuns =
|
|
432
|
+
var juniorSchedulerRuns = pgTable11(
|
|
387
433
|
"junior_scheduler_runs",
|
|
388
434
|
{
|
|
389
|
-
id:
|
|
390
|
-
taskId:
|
|
391
|
-
status:
|
|
392
|
-
scheduledForMs:
|
|
435
|
+
id: text11("id").primaryKey(),
|
|
436
|
+
taskId: text11("task_id").notNull(),
|
|
437
|
+
status: text11("status").notNull(),
|
|
438
|
+
scheduledForMs: bigint3("scheduled_for_ms", { mode: "number" }).notNull(),
|
|
393
439
|
record: jsonb6("record").$type().notNull()
|
|
394
440
|
},
|
|
395
441
|
(table) => [
|
|
396
|
-
|
|
442
|
+
index8("junior_scheduler_runs_task_status_idx").on(
|
|
397
443
|
table.taskId,
|
|
398
444
|
table.status,
|
|
399
445
|
table.scheduledForMs
|
|
400
446
|
),
|
|
401
|
-
|
|
447
|
+
index8("junior_scheduler_runs_status_idx").on(
|
|
402
448
|
table.status,
|
|
403
449
|
table.scheduledForMs
|
|
404
450
|
)
|
|
@@ -416,6 +462,7 @@ var juniorSqlSchema = {
|
|
|
416
462
|
juniorEventTasks,
|
|
417
463
|
juniorIdentities,
|
|
418
464
|
juniorStats,
|
|
465
|
+
juniorTaskExecutions,
|
|
419
466
|
juniorSchedulerRuns,
|
|
420
467
|
juniorSchedulerTasks,
|
|
421
468
|
juniorUsers
|
|
@@ -680,6 +727,7 @@ export {
|
|
|
680
727
|
juniorConversationBindings,
|
|
681
728
|
juniorEventTasks,
|
|
682
729
|
juniorStats,
|
|
730
|
+
juniorTaskExecutions,
|
|
683
731
|
juniorSchedulerTasks,
|
|
684
732
|
juniorSchedulerRuns,
|
|
685
733
|
createJuniorSqlExecutor
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConversationEventStore,
|
|
3
3
|
getDb
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VPYKNCTN.js";
|
|
5
5
|
import {
|
|
6
6
|
juniorConversationAnnotations,
|
|
7
7
|
juniorConversationEvents,
|
|
8
8
|
juniorIdentities,
|
|
9
9
|
juniorUsers
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QLEKAO7O.js";
|
|
11
11
|
import {
|
|
12
12
|
SANDBOX_WORKSPACE_ROOT,
|
|
13
13
|
getStateAdapter,
|
|
14
14
|
sleep
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FDNAUM7X.js";
|
|
16
16
|
import {
|
|
17
17
|
botConfig,
|
|
18
18
|
completeObject,
|
|
19
19
|
embedTexts,
|
|
20
20
|
getSlackBotToken,
|
|
21
21
|
standardModelId
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XG5PHKPM.js";
|
|
23
23
|
import {
|
|
24
24
|
isActorUserId,
|
|
25
25
|
parseActorUserId
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
setSpanAttributes,
|
|
38
38
|
setSpanStatus,
|
|
39
39
|
withSpan
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6T3AYZT7.js";
|
|
41
41
|
|
|
42
42
|
// src/chat/plugins/agent-hooks.ts
|
|
43
43
|
import {
|
|
@@ -1491,7 +1491,7 @@ async function getPluginUserPromptContributions(args) {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
return contributions;
|
|
1493
1493
|
}
|
|
1494
|
-
function getPluginTools(context) {
|
|
1494
|
+
function getPluginTools(context, sandbox = createSandboxCapability(context.workspace)) {
|
|
1495
1495
|
const tools = {};
|
|
1496
1496
|
for (const plugin of getPlugins()) {
|
|
1497
1497
|
const pluginName = plugin.manifest.name;
|
|
@@ -1544,6 +1544,7 @@ function getPluginTools(context) {
|
|
|
1544
1544
|
...mcp ? { mcp } : {},
|
|
1545
1545
|
model: createPluginModel(pluginName, plugin.model),
|
|
1546
1546
|
resourceEvents,
|
|
1547
|
+
sandbox,
|
|
1547
1548
|
state: createPluginState(pluginName),
|
|
1548
1549
|
users: { resolveActor }
|
|
1549
1550
|
};
|
|
@@ -1566,6 +1567,7 @@ function getPluginTools(context) {
|
|
|
1566
1567
|
...mcp ? { mcp } : {},
|
|
1567
1568
|
model: createPluginModel(pluginName, plugin.model),
|
|
1568
1569
|
resourceEvents,
|
|
1570
|
+
sandbox,
|
|
1569
1571
|
state: createPluginState(pluginName),
|
|
1570
1572
|
users: { resolveActor }
|
|
1571
1573
|
};
|
|
@@ -6,25 +6,25 @@ import {
|
|
|
6
6
|
isDmChannel,
|
|
7
7
|
normalizeSlackConversationId,
|
|
8
8
|
withSlackRetries
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TR6UEEYD.js";
|
|
10
10
|
import {
|
|
11
11
|
getDb,
|
|
12
12
|
parseDestination
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VPYKNCTN.js";
|
|
14
14
|
import {
|
|
15
15
|
acquireActiveLock,
|
|
16
16
|
getStateAdapter,
|
|
17
17
|
sleep
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FDNAUM7X.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeSlackEmojiName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XG5PHKPM.js";
|
|
22
22
|
import {
|
|
23
23
|
pluginCatalogRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VEGF62FV.js";
|
|
25
25
|
import {
|
|
26
26
|
fetchWithBoundedOAuthErrorBodies
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-VP6NCPRS.js";
|
|
28
28
|
import {
|
|
29
29
|
parseSlackMessageTs,
|
|
30
30
|
parseSlackUserId
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
isRecord,
|
|
34
34
|
logInfo,
|
|
35
35
|
logWarn
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-6T3AYZT7.js";
|
|
37
37
|
|
|
38
38
|
// src/chat/capabilities/router.ts
|
|
39
39
|
var ProviderCredentialRouter = class {
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
juniorConversations,
|
|
6
6
|
juniorIdentities,
|
|
7
7
|
juniorUsers
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QLEKAO7O.js";
|
|
9
9
|
import {
|
|
10
10
|
TURN_REASONING_LEVELS,
|
|
11
11
|
getChatConfig,
|
|
12
12
|
modelProfileSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XG5PHKPM.js";
|
|
14
14
|
import {
|
|
15
15
|
juniorDestinations
|
|
16
16
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-F3B2YJ76.js";
|
|
21
21
|
import {
|
|
22
22
|
normalizeIdentityEmail
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-6T3AYZT7.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/conversations/sql/store.ts
|
|
26
26
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LKK4XMUV.js";
|
|
7
7
|
import {
|
|
8
8
|
extractGenAiUsageAttributes,
|
|
9
9
|
logException,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
normalizeGenAiFinishReason,
|
|
12
12
|
serializeGenAiAttribute,
|
|
13
13
|
withSpan
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6T3AYZT7.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/config.ts
|
|
17
17
|
import { getModel as getModel2 } from "@earendil-works/pi-ai/compat";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
SANDBOX_WORKSPACE_ROOT,
|
|
3
3
|
getStateAdapter,
|
|
4
4
|
sleep
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FDNAUM7X.js";
|
|
6
6
|
import {
|
|
7
7
|
toOptionalTrimmed
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XG5PHKPM.js";
|
|
9
9
|
import {
|
|
10
10
|
pluginCatalogRuntime
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VEGF62FV.js";
|
|
12
12
|
import {
|
|
13
13
|
setSpanAttributes,
|
|
14
14
|
setSpanStatus,
|
|
15
15
|
withSpan
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6T3AYZT7.js";
|
|
17
17
|
|
|
18
18
|
// src/chat/sandbox/resources.ts
|
|
19
19
|
var configuredResources;
|
|
@@ -216,7 +216,7 @@ function buildEnvExports(options) {
|
|
|
216
216
|
}
|
|
217
217
|
return lines;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function buildCommandScript(input) {
|
|
220
220
|
return [shellQuote(input.cmd), ...(input.args ?? []).map(shellQuote)].join(
|
|
221
221
|
" "
|
|
222
222
|
);
|
|
@@ -229,7 +229,7 @@ function buildNonInteractiveCommand(input) {
|
|
|
229
229
|
cmd: "bash",
|
|
230
230
|
args: [
|
|
231
231
|
input.login ? "-lc" : "-c",
|
|
232
|
-
buildNonInteractiveShellScript(
|
|
232
|
+
buildNonInteractiveShellScript(buildCommandScript(input), {
|
|
233
233
|
env: input.env,
|
|
234
234
|
pathPrefix: input.pathPrefix
|
|
235
235
|
})
|
|
@@ -1065,6 +1065,9 @@ function isMissingError(error) {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
|
|
1067
1067
|
export {
|
|
1068
|
+
buildCommandScript,
|
|
1069
|
+
buildNonInteractiveShellScript,
|
|
1070
|
+
runNonInteractiveCommand,
|
|
1068
1071
|
isAlreadyExistsError,
|
|
1069
1072
|
isSandboxUnavailableError,
|
|
1070
1073
|
isSandboxMissingError,
|
|
@@ -1073,8 +1076,6 @@ export {
|
|
|
1073
1076
|
wrapSandboxSetupError,
|
|
1074
1077
|
throwSandboxOperationError,
|
|
1075
1078
|
getVercelSandboxCredentials,
|
|
1076
|
-
buildNonInteractiveShellScript,
|
|
1077
|
-
runNonInteractiveCommand,
|
|
1078
1079
|
getSandboxResourceConfig,
|
|
1079
1080
|
setSandboxResourceConfig,
|
|
1080
1081
|
getSandboxResources,
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAgentRunner,
|
|
3
3
|
executeAgentRun
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NF2TNZPD.js";
|
|
5
5
|
import "../chunk-DIB4GX3G.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-VGXJMECA.js";
|
|
7
|
+
import "../chunk-7GKQ7UIO.js";
|
|
8
8
|
import "../chunk-EPBBYMNE.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-YNLQQ622.js";
|
|
10
|
+
import "../chunk-KWGJG4HO.js";
|
|
11
|
+
import "../chunk-MFERLE3G.js";
|
|
12
|
+
import "../chunk-CDQ4YIZM.js";
|
|
13
13
|
import "../chunk-PDO5BLNM.js";
|
|
14
14
|
import "../chunk-UIE3R5XU.js";
|
|
15
15
|
import {
|
|
16
16
|
loadAppPluginSet
|
|
17
17
|
} from "../chunk-Y2CM7HXH.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-TR6UEEYD.js";
|
|
19
|
+
import "../chunk-VPYKNCTN.js";
|
|
20
|
+
import "../chunk-QLEKAO7O.js";
|
|
21
|
+
import "../chunk-FDNAUM7X.js";
|
|
22
|
+
import "../chunk-XG5PHKPM.js";
|
|
23
23
|
import "../chunk-VFUK3X5B.js";
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-LKK4XMUV.js";
|
|
25
|
+
import "../chunk-S6DMTEOM.js";
|
|
26
|
+
import "../chunk-VEGF62FV.js";
|
|
27
|
+
import "../chunk-VP6NCPRS.js";
|
|
28
28
|
import "../chunk-77VDLF3Z.js";
|
|
29
29
|
import "../chunk-HZF5P5UN.js";
|
|
30
30
|
import "../chunk-F3B2YJ76.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-6T3AYZT7.js";
|
|
32
32
|
import "../chunk-6GWA276C.js";
|
|
33
33
|
import "../chunk-OOUNJNMR.js";
|
|
34
34
|
import "../chunk-H4HBKISO.js";
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-U3ZI7CCW.js";
|
|
36
|
+
import "../chunk-GSP5SMZJ.js";
|
|
37
37
|
import "../chunk-MLKGABMK.js";
|
|
38
38
|
|
|
39
39
|
// src/cli/chat.ts
|
|
@@ -156,10 +156,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
156
156
|
databaseModule
|
|
157
157
|
] = await Promise.all([
|
|
158
158
|
import("../plugins-HW4VWW6G.js"),
|
|
159
|
-
import("../agent-hooks-
|
|
160
|
-
import("../catalog-runtime-
|
|
161
|
-
import("../validation-
|
|
162
|
-
import("../db-
|
|
159
|
+
import("../agent-hooks-HGXNYOOD.js"),
|
|
160
|
+
import("../catalog-runtime-P6QHU6XE.js"),
|
|
161
|
+
import("../validation-FMWDHKYU.js"),
|
|
162
|
+
import("../db-GFK4NHWJ.js")
|
|
163
163
|
]);
|
|
164
164
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
165
165
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -223,8 +223,8 @@ function localDevServerUrl() {
|
|
|
223
223
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
224
224
|
defaultStateAdapterForLocalChat();
|
|
225
225
|
await configureLocalChatPlugins(pluginSet);
|
|
226
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
227
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
226
|
+
const { runLocalAgentTurn } = await import("../runner-T77AFAH4.js");
|
|
227
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-HUJLAQ5N.js");
|
|
228
228
|
const { createLocalOAuthState } = await import("../oauth-relay-3ZU72UGL.js");
|
|
229
229
|
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-A5HWIQH4.js");
|
|
230
230
|
const agentRunner = createAgentRunner(executeAgentRun);
|
package/dist/cli/check.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-S6DMTEOM.js";
|
|
4
|
+
import "../chunk-VEGF62FV.js";
|
|
5
5
|
import {
|
|
6
6
|
parseInlinePluginManifest,
|
|
7
7
|
parsePluginManifest
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-VP6NCPRS.js";
|
|
9
9
|
import "../chunk-77VDLF3Z.js";
|
|
10
10
|
import "../chunk-HZF5P5UN.js";
|
|
11
11
|
import "../chunk-F3B2YJ76.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-6T3AYZT7.js";
|
|
13
13
|
import "../chunk-6GWA276C.js";
|
|
14
14
|
import "../chunk-OOUNJNMR.js";
|
|
15
15
|
import "../chunk-H4HBKISO.js";
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
|
18
18
|
JUNIOR_HEARTBEAT_ROUTE,
|
|
19
19
|
LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-U3ZI7CCW.js";
|
|
21
|
+
import "../chunk-GSP5SMZJ.js";
|
|
22
22
|
import "../chunk-MLKGABMK.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/check.ts
|