@sentry/junior 0.133.0 → 0.135.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-EMXDAD2K.js} +9 -9
- package/dist/api/schema/task.d.ts +36 -0
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +1 -1
- package/dist/api.js +39 -20
- package/dist/app.js +46 -24
- package/dist/{catalog-runtime-VGB3DWXZ.js → catalog-runtime-NVPT6HA5.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 +28 -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-XTQGVNM3.js → chunk-45DPXMI3.js} +6 -12
- package/dist/{chunk-TU7P77FI.js → chunk-5EX36ZCD.js} +12 -12
- package/dist/{chunk-VL7OYSHD.js → chunk-5LD6EBH2.js} +1 -1
- package/dist/{chunk-HJ4KDO4N.js → chunk-6UNZ5DHG.js} +1 -1
- package/dist/{chunk-IVTHTAVK.js → chunk-AGAHACF7.js} +2 -2
- package/dist/{chunk-HX236W2U.js → chunk-CDQ4YIZM.js} +9 -0
- package/dist/{chunk-5ZAZHLIW.js → chunk-EBRB6ZBF.js} +1 -1
- package/dist/{chunk-VQA25AL4.js → chunk-EJT7EPP3.js} +6 -6
- package/dist/{chunk-FX6BLEDP.js → chunk-HDGTBCQR.js} +1 -1
- package/dist/{chunk-AH5HTUYX.js → chunk-IRTIVX42.js} +1 -1
- package/dist/{chunk-ECUILEUX.js → chunk-NGX2V4WY.js} +430 -29
- package/dist/{chunk-TBVS7GBE.js → chunk-OSCF2BDE.js} +9 -8
- package/dist/{chunk-HTGXUNEC.js → chunk-P2D7IW57.js} +7 -7
- package/dist/{chunk-EJRJWBKG.js → chunk-QQCEMMVN.js} +1 -1
- package/dist/{chunk-LDRO4OQ4.js → chunk-RMI6OX52.js} +2 -2
- package/dist/{chunk-QVEXYYFM.js → chunk-TRZSM67C.js} +11 -1
- package/dist/{chunk-TLN54TOQ.js → chunk-TYEDZVRM.js} +32 -32
- package/dist/{chunk-QWGZ273D.js → chunk-U37P4IIP.js} +81 -27
- package/dist/{chunk-JLN4XSPR.js → chunk-UXYZPEWP.js} +1 -1
- package/dist/{chunk-LNYNTR27.js → chunk-VZEKCQLD.js} +3 -3
- package/dist/{chunk-T5FPIBU2.js → chunk-Y6627MTY.js} +788 -674
- package/dist/{chunk-IKO5LFIU.js → chunk-YPKPXLMS.js} +1 -1
- package/dist/chunk-Z67KVHMJ.js +233 -0
- package/dist/{chunk-WHEMUEXT.js → chunk-ZBQIA5NI.js} +8 -6
- 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-UA6OFL25.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-IJDYBSTX.js} +18 -18
- package/dist/{runner-A3LVGZR6.js → runner-K6GID4HN.js} +12 -12
- package/dist/{skills-P7Q6Z6PN.js → skills-KJVS753I.js} +6 -6
- package/dist/{validation-RYHOWBET.js → validation-7VDJGK7K.js} +6 -6
- package/dist/version.js +1 -1
- package/migrations/0019_lowly_valkyrie.sql +14 -0
- package/migrations/0020_restrict_task_execution_kinds.sql +2 -0
- package/migrations/meta/0019_snapshot.json +1904 -0
- package/migrations/meta/0020_snapshot.json +1848 -0
- package/migrations/meta/_journal.json +15 -1
- package/package.json +4 -4
- package/dist/chunk-V365UVCU.js +0 -115
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import {
|
|
2
|
+
healthReportSchema
|
|
3
|
+
} from "./chunk-UTL3MHPC.js";
|
|
4
|
+
import {
|
|
5
|
+
parseSlackThreadId
|
|
6
|
+
} from "./chunk-IRTIVX42.js";
|
|
7
|
+
import {
|
|
8
|
+
normalizeSlackConversationId
|
|
9
|
+
} from "./chunk-ZBQIA5NI.js";
|
|
10
|
+
import {
|
|
11
|
+
getDb
|
|
12
|
+
} from "./chunk-VZEKCQLD.js";
|
|
13
|
+
import {
|
|
14
|
+
juniorTaskExecutions
|
|
15
|
+
} from "./chunk-U37P4IIP.js";
|
|
16
|
+
import {
|
|
17
|
+
logWarn
|
|
18
|
+
} from "./chunk-QQCEMMVN.js";
|
|
19
|
+
|
|
20
|
+
// src/handlers/health.ts
|
|
21
|
+
function readHealthReport() {
|
|
22
|
+
return healthReportSchema.parse({
|
|
23
|
+
status: "ok",
|
|
24
|
+
service: "junior",
|
|
25
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function GET() {
|
|
29
|
+
return Response.json(readHealthReport());
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/chat/tasks/execution-stats.ts
|
|
33
|
+
import { and, asc, count, desc, eq, gte, lte, max, sql } from "drizzle-orm";
|
|
34
|
+
function utcDate(nowMs) {
|
|
35
|
+
return new Date(nowMs).toISOString().slice(0, 10);
|
|
36
|
+
}
|
|
37
|
+
function emptyDay(date) {
|
|
38
|
+
return { date, event: 0, scheduled: 0 };
|
|
39
|
+
}
|
|
40
|
+
async function recordTaskExecution(type, taskId, options) {
|
|
41
|
+
const namespace = options.namespace ?? "junior";
|
|
42
|
+
const nowMs = options.nowMs ?? Date.now();
|
|
43
|
+
try {
|
|
44
|
+
await getDb().insert(juniorTaskExecutions).values({
|
|
45
|
+
conversationId: options.conversationId,
|
|
46
|
+
executedAtMs: nowMs,
|
|
47
|
+
executionId: options.executionId,
|
|
48
|
+
kind: type,
|
|
49
|
+
namespace,
|
|
50
|
+
taskId
|
|
51
|
+
}).onConflictDoNothing({
|
|
52
|
+
target: [
|
|
53
|
+
juniorTaskExecutions.kind,
|
|
54
|
+
juniorTaskExecutions.namespace,
|
|
55
|
+
juniorTaskExecutions.executionId
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
} catch (error) {
|
|
59
|
+
logWarn("task.execution.stat_failed", {
|
|
60
|
+
error,
|
|
61
|
+
"app.task.execution.id": options.executionId,
|
|
62
|
+
"app.task.execution.namespace": namespace,
|
|
63
|
+
"app.task.execution.task_id": taskId,
|
|
64
|
+
"app.task.execution.type": type
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async function readTaskExecutionSummaries(type, namespace, options = {}) {
|
|
69
|
+
const sevenDaysAgoMs = (options.nowMs ?? Date.now()) - 7 * 24 * 60 * 60 * 1e3;
|
|
70
|
+
const db = getDb();
|
|
71
|
+
const latest = db.selectDistinctOn([juniorTaskExecutions.taskId], {
|
|
72
|
+
conversationId: juniorTaskExecutions.conversationId,
|
|
73
|
+
taskId: juniorTaskExecutions.taskId
|
|
74
|
+
}).from(juniorTaskExecutions).where(
|
|
75
|
+
and(
|
|
76
|
+
eq(juniorTaskExecutions.kind, type),
|
|
77
|
+
eq(juniorTaskExecutions.namespace, namespace)
|
|
78
|
+
)
|
|
79
|
+
).orderBy(
|
|
80
|
+
juniorTaskExecutions.taskId,
|
|
81
|
+
desc(juniorTaskExecutions.executedAtMs),
|
|
82
|
+
desc(juniorTaskExecutions.executionId)
|
|
83
|
+
).as("latest_task_execution");
|
|
84
|
+
const rows = await db.select({
|
|
85
|
+
lastConversationId: latest.conversationId,
|
|
86
|
+
lastExecutedAtMs: max(juniorTaskExecutions.executedAtMs),
|
|
87
|
+
runsLast7Days: sql`count(*) filter (where ${juniorTaskExecutions.executedAtMs} >= ${sevenDaysAgoMs})::int`,
|
|
88
|
+
taskId: juniorTaskExecutions.taskId,
|
|
89
|
+
totalRuns: sql`count(*)::int`
|
|
90
|
+
}).from(juniorTaskExecutions).innerJoin(latest, eq(latest.taskId, juniorTaskExecutions.taskId)).where(
|
|
91
|
+
and(
|
|
92
|
+
eq(juniorTaskExecutions.kind, type),
|
|
93
|
+
eq(juniorTaskExecutions.namespace, namespace)
|
|
94
|
+
)
|
|
95
|
+
).groupBy(juniorTaskExecutions.taskId, latest.conversationId);
|
|
96
|
+
return new Map(
|
|
97
|
+
rows.map((row) => [
|
|
98
|
+
row.taskId,
|
|
99
|
+
{
|
|
100
|
+
lastConversationId: row.lastConversationId,
|
|
101
|
+
...row.lastExecutedAtMs !== null ? { lastExecutedAtMs: row.lastExecutedAtMs } : {},
|
|
102
|
+
runsLast7Days: row.runsLast7Days,
|
|
103
|
+
totalRuns: row.totalRuns
|
|
104
|
+
}
|
|
105
|
+
])
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
async function readTaskExecutionDays(dayCount = 90, options = {}) {
|
|
109
|
+
const nowMs = options.nowMs ?? Date.now();
|
|
110
|
+
const end = utcDate(nowMs);
|
|
111
|
+
const endMs = Date.parse(`${end}T23:59:59.999Z`);
|
|
112
|
+
const startMs = Date.parse(`${end}T00:00:00.000Z`) - (dayCount - 1) * 864e5;
|
|
113
|
+
const executionDate = sql`to_char(to_timestamp(${juniorTaskExecutions.executedAtMs} / 1000.0) at time zone 'UTC', 'YYYY-MM-DD')`;
|
|
114
|
+
const rows = await getDb().select({
|
|
115
|
+
count: count(),
|
|
116
|
+
date: executionDate,
|
|
117
|
+
kind: juniorTaskExecutions.kind
|
|
118
|
+
}).from(juniorTaskExecutions).where(
|
|
119
|
+
and(
|
|
120
|
+
gte(juniorTaskExecutions.executedAtMs, startMs),
|
|
121
|
+
lte(juniorTaskExecutions.executedAtMs, endMs)
|
|
122
|
+
)
|
|
123
|
+
).groupBy(executionDate, juniorTaskExecutions.kind).orderBy(asc(executionDate), asc(juniorTaskExecutions.kind));
|
|
124
|
+
const byDate = /* @__PURE__ */ new Map();
|
|
125
|
+
for (let offset = 0; offset < dayCount; offset += 1) {
|
|
126
|
+
const date = utcDate(startMs + offset * 864e5);
|
|
127
|
+
byDate.set(date, emptyDay(date));
|
|
128
|
+
}
|
|
129
|
+
for (const row of rows) {
|
|
130
|
+
const day = byDate.get(row.date);
|
|
131
|
+
if (!day) continue;
|
|
132
|
+
if (row.kind === "scheduled") day.scheduled = row.count;
|
|
133
|
+
else if (row.kind === "event") day.event = row.count;
|
|
134
|
+
}
|
|
135
|
+
return [...byDate.values()];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// src/chat/slack/conversation-context.ts
|
|
139
|
+
function normalizeConversationName(type, channelName) {
|
|
140
|
+
const trimmed = channelName?.trim();
|
|
141
|
+
if (!trimmed) return void 0;
|
|
142
|
+
if (type === "public_channel" || type === "private_channel" || type === "private_channel_or_group_dm") {
|
|
143
|
+
return trimmed.startsWith("#") ? trimmed : `#${trimmed}`;
|
|
144
|
+
}
|
|
145
|
+
return trimmed;
|
|
146
|
+
}
|
|
147
|
+
function typeFromSlackChannelType(channelType) {
|
|
148
|
+
if (channelType === "channel") return "public_channel";
|
|
149
|
+
if (channelType === "group") return "private_channel";
|
|
150
|
+
if (channelType === "mpim") return "group_dm";
|
|
151
|
+
if (channelType === "im") return "direct_message";
|
|
152
|
+
return void 0;
|
|
153
|
+
}
|
|
154
|
+
function typeFromChannelId(channelId, channelName) {
|
|
155
|
+
const normalized = normalizeSlackConversationId(channelId);
|
|
156
|
+
if (!normalized) return void 0;
|
|
157
|
+
if (normalized.startsWith("C")) return "public_channel";
|
|
158
|
+
if (normalized.startsWith("D")) return "direct_message";
|
|
159
|
+
if (normalized.startsWith("G")) {
|
|
160
|
+
return channelName?.trim().startsWith("mpdm-") ? "group_dm" : "private_channel_or_group_dm";
|
|
161
|
+
}
|
|
162
|
+
return void 0;
|
|
163
|
+
}
|
|
164
|
+
function toSlackEventChannelType(channelType) {
|
|
165
|
+
if (channelType === "channel" || channelType === "group" || channelType === "mpim" || channelType === "im") {
|
|
166
|
+
return channelType;
|
|
167
|
+
}
|
|
168
|
+
return void 0;
|
|
169
|
+
}
|
|
170
|
+
function conversationVisibilityFromSlackChannelType(channelType) {
|
|
171
|
+
if (!channelType) return void 0;
|
|
172
|
+
return channelType === "channel" ? "public" : "private";
|
|
173
|
+
}
|
|
174
|
+
function resolveSlackChannelTypeFromMessage(message) {
|
|
175
|
+
const raw = message.raw;
|
|
176
|
+
if (!raw || typeof raw !== "object") {
|
|
177
|
+
return void 0;
|
|
178
|
+
}
|
|
179
|
+
const channelType = raw.channel_type;
|
|
180
|
+
return typeof channelType === "string" ? toSlackEventChannelType(channelType.trim()) : void 0;
|
|
181
|
+
}
|
|
182
|
+
function resolveSlackConversationContext(input) {
|
|
183
|
+
const type = typeFromSlackChannelType(input.channelType) ?? typeFromChannelId(input.channelId, input.channelName);
|
|
184
|
+
if (!type) return void 0;
|
|
185
|
+
const name = normalizeConversationName(type, input.channelName);
|
|
186
|
+
const visibility = conversationVisibilityFromSlackChannelType(
|
|
187
|
+
input.channelType
|
|
188
|
+
);
|
|
189
|
+
return {
|
|
190
|
+
type,
|
|
191
|
+
...name ? { name } : {},
|
|
192
|
+
...visibility ? { visibility } : {}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function resolveSlackConversationContextFromThreadId(input) {
|
|
196
|
+
const slackThread = parseSlackThreadId(input.threadId);
|
|
197
|
+
const context = resolveSlackConversationContext({
|
|
198
|
+
channelId: slackThread?.channelId,
|
|
199
|
+
channelName: input.channelName
|
|
200
|
+
});
|
|
201
|
+
if (!context || !input.visibility) {
|
|
202
|
+
return context;
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
...context,
|
|
206
|
+
type: input.visibility === "private" && context.type === "public_channel" ? "private_channel" : context.type,
|
|
207
|
+
visibility: input.visibility
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
function formatSlackConversationTypeLabel(type) {
|
|
211
|
+
if (type === "public_channel") return "Public Channel";
|
|
212
|
+
if (type === "private_channel") return "Private Channel";
|
|
213
|
+
if (type === "group_dm") return "Group DM";
|
|
214
|
+
if (type === "direct_message") return "Direct Message";
|
|
215
|
+
return "Private Channel or Group DM";
|
|
216
|
+
}
|
|
217
|
+
function formatSlackConversationRedactedLabel(context) {
|
|
218
|
+
if (!context) return void 0;
|
|
219
|
+
return formatSlackConversationTypeLabel(context.type);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export {
|
|
223
|
+
readHealthReport,
|
|
224
|
+
GET,
|
|
225
|
+
recordTaskExecution,
|
|
226
|
+
readTaskExecutionSummaries,
|
|
227
|
+
readTaskExecutionDays,
|
|
228
|
+
conversationVisibilityFromSlackChannelType,
|
|
229
|
+
resolveSlackChannelTypeFromMessage,
|
|
230
|
+
resolveSlackConversationContext,
|
|
231
|
+
resolveSlackConversationContextFromThreadId,
|
|
232
|
+
formatSlackConversationRedactedLabel
|
|
233
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConversationEventStore,
|
|
3
3
|
getDb
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VZEKCQLD.js";
|
|
5
5
|
import {
|
|
6
6
|
juniorConversationAnnotations,
|
|
7
7
|
juniorConversationEvents,
|
|
8
8
|
juniorIdentities,
|
|
9
9
|
juniorUsers
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-U37P4IIP.js";
|
|
11
11
|
import {
|
|
12
12
|
SANDBOX_WORKSPACE_ROOT,
|
|
13
13
|
getStateAdapter,
|
|
14
14
|
sleep
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TYEDZVRM.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-RMI6OX52.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-QQCEMMVN.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
|
};
|
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-Y6627MTY.js";
|
|
5
5
|
import "../chunk-DIB4GX3G.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-P2D7IW57.js";
|
|
7
|
+
import "../chunk-NGX2V4WY.js";
|
|
8
8
|
import "../chunk-EPBBYMNE.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-OSCF2BDE.js";
|
|
10
|
+
import "../chunk-45DPXMI3.js";
|
|
11
|
+
import "../chunk-IRTIVX42.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-ZBQIA5NI.js";
|
|
19
|
+
import "../chunk-VZEKCQLD.js";
|
|
20
|
+
import "../chunk-U37P4IIP.js";
|
|
21
|
+
import "../chunk-TYEDZVRM.js";
|
|
22
|
+
import "../chunk-RMI6OX52.js";
|
|
23
23
|
import "../chunk-VFUK3X5B.js";
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-5LD6EBH2.js";
|
|
25
|
+
import "../chunk-AGAHACF7.js";
|
|
26
|
+
import "../chunk-UXYZPEWP.js";
|
|
27
|
+
import "../chunk-6UNZ5DHG.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-QQCEMMVN.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-HDGTBCQR.js";
|
|
36
|
+
import "../chunk-YPKPXLMS.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-EMXDAD2K.js"),
|
|
160
|
+
import("../catalog-runtime-NVPT6HA5.js"),
|
|
161
|
+
import("../validation-7VDJGK7K.js"),
|
|
162
|
+
import("../db-UA6OFL25.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-K6GID4HN.js");
|
|
227
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-IJDYBSTX.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-AGAHACF7.js";
|
|
4
|
+
import "../chunk-UXYZPEWP.js";
|
|
5
5
|
import {
|
|
6
6
|
parseInlinePluginManifest,
|
|
7
7
|
parsePluginManifest
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-6UNZ5DHG.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-QQCEMMVN.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-HDGTBCQR.js";
|
|
21
|
+
import "../chunk-YPKPXLMS.js";
|
|
22
22
|
import "../chunk-MLKGABMK.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/check.ts
|
package/dist/cli/init.js
CHANGED
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validatePluginEgressCredentialHooks,
|
|
3
3
|
validatePluginRegistrations
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-EBRB6ZBF.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginCatalogConfigFromPluginSet,
|
|
7
7
|
pluginCliRegistrationsFromPluginSet,
|
|
@@ -14,28 +14,28 @@ import {
|
|
|
14
14
|
createPluginLogger,
|
|
15
15
|
setPlugins,
|
|
16
16
|
validatePlugins
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-ZBQIA5NI.js";
|
|
18
18
|
import {
|
|
19
19
|
getDb
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-VZEKCQLD.js";
|
|
21
|
+
import "../chunk-U37P4IIP.js";
|
|
22
|
+
import "../chunk-TYEDZVRM.js";
|
|
23
|
+
import "../chunk-RMI6OX52.js";
|
|
24
24
|
import "../chunk-VFUK3X5B.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-5LD6EBH2.js";
|
|
26
26
|
import {
|
|
27
27
|
pluginCatalogRuntime
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-UXYZPEWP.js";
|
|
29
|
+
import "../chunk-6UNZ5DHG.js";
|
|
30
30
|
import "../chunk-77VDLF3Z.js";
|
|
31
31
|
import "../chunk-HZF5P5UN.js";
|
|
32
32
|
import "../chunk-F3B2YJ76.js";
|
|
33
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-QQCEMMVN.js";
|
|
34
34
|
import "../chunk-6GWA276C.js";
|
|
35
35
|
import "../chunk-OOUNJNMR.js";
|
|
36
36
|
import "../chunk-H4HBKISO.js";
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-HDGTBCQR.js";
|
|
38
|
+
import "../chunk-YPKPXLMS.js";
|
|
39
39
|
import "../chunk-MLKGABMK.js";
|
|
40
40
|
|
|
41
41
|
// src/cli/plugins.ts
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
create,
|
|
3
3
|
resolve
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-OSCF2BDE.js";
|
|
5
5
|
import {
|
|
6
6
|
disconnectStateAdapter
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-TYEDZVRM.js";
|
|
8
|
+
import "../chunk-RMI6OX52.js";
|
|
9
|
+
import "../chunk-5LD6EBH2.js";
|
|
10
10
|
import {
|
|
11
11
|
pluginCatalogRuntime
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-UXYZPEWP.js";
|
|
13
|
+
import "../chunk-6UNZ5DHG.js";
|
|
14
14
|
import "../chunk-77VDLF3Z.js";
|
|
15
15
|
import "../chunk-HZF5P5UN.js";
|
|
16
16
|
import "../chunk-F3B2YJ76.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-QQCEMMVN.js";
|
|
18
18
|
import "../chunk-6GWA276C.js";
|
|
19
19
|
import "../chunk-OOUNJNMR.js";
|
|
20
20
|
import "../chunk-H4HBKISO.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-HDGTBCQR.js";
|
|
22
|
+
import "../chunk-YPKPXLMS.js";
|
|
23
23
|
import "../chunk-MLKGABMK.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/snapshot-create.ts
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -8,24 +8,24 @@ import {
|
|
|
8
8
|
} from "../chunk-Y2CM7HXH.js";
|
|
9
9
|
import {
|
|
10
10
|
createJuniorSqlExecutor
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-U37P4IIP.js";
|
|
12
12
|
import {
|
|
13
13
|
getChatConfig
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-RMI6OX52.js";
|
|
15
15
|
import "../chunk-VFUK3X5B.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-5LD6EBH2.js";
|
|
17
17
|
import {
|
|
18
18
|
createPluginCatalogRuntime
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-6UNZ5DHG.js";
|
|
20
20
|
import "../chunk-77VDLF3Z.js";
|
|
21
21
|
import "../chunk-HZF5P5UN.js";
|
|
22
22
|
import "../chunk-F3B2YJ76.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-QQCEMMVN.js";
|
|
24
24
|
import "../chunk-6GWA276C.js";
|
|
25
25
|
import "../chunk-OOUNJNMR.js";
|
|
26
26
|
import "../chunk-H4HBKISO.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-HDGTBCQR.js";
|
|
28
|
+
import "../chunk-YPKPXLMS.js";
|
|
29
29
|
import "../chunk-MLKGABMK.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/conversations/sql/migrations.ts
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/** One successful task execution linked to its durable conversation. */
|
|
2
|
+
export declare const juniorTaskExecutions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3
|
+
name: "junior_task_executions";
|
|
4
|
+
schema: undefined;
|
|
5
|
+
columns: {
|
|
6
|
+
executionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
7
|
+
name: "execution_id";
|
|
8
|
+
tableName: "junior_task_executions";
|
|
9
|
+
dataType: "string";
|
|
10
|
+
columnType: "PgText";
|
|
11
|
+
data: string;
|
|
12
|
+
driverParam: string;
|
|
13
|
+
notNull: true;
|
|
14
|
+
hasDefault: false;
|
|
15
|
+
isPrimaryKey: false;
|
|
16
|
+
isAutoincrement: false;
|
|
17
|
+
hasRuntimeDefault: false;
|
|
18
|
+
enumValues: [string, ...string[]];
|
|
19
|
+
baseColumn: never;
|
|
20
|
+
identity: undefined;
|
|
21
|
+
generated: undefined;
|
|
22
|
+
}, {}, {}>;
|
|
23
|
+
kind: import("drizzle-orm/pg-core").PgColumn<{
|
|
24
|
+
name: "kind";
|
|
25
|
+
tableName: "junior_task_executions";
|
|
26
|
+
dataType: "string";
|
|
27
|
+
columnType: "PgText";
|
|
28
|
+
data: string;
|
|
29
|
+
driverParam: string;
|
|
30
|
+
notNull: true;
|
|
31
|
+
hasDefault: false;
|
|
32
|
+
isPrimaryKey: false;
|
|
33
|
+
isAutoincrement: false;
|
|
34
|
+
hasRuntimeDefault: false;
|
|
35
|
+
enumValues: [string, ...string[]];
|
|
36
|
+
baseColumn: never;
|
|
37
|
+
identity: undefined;
|
|
38
|
+
generated: undefined;
|
|
39
|
+
}, {}, {}>;
|
|
40
|
+
namespace: import("drizzle-orm/pg-core").PgColumn<{
|
|
41
|
+
name: "namespace";
|
|
42
|
+
tableName: "junior_task_executions";
|
|
43
|
+
dataType: "string";
|
|
44
|
+
columnType: "PgText";
|
|
45
|
+
data: string;
|
|
46
|
+
driverParam: string;
|
|
47
|
+
notNull: true;
|
|
48
|
+
hasDefault: false;
|
|
49
|
+
isPrimaryKey: false;
|
|
50
|
+
isAutoincrement: false;
|
|
51
|
+
hasRuntimeDefault: false;
|
|
52
|
+
enumValues: [string, ...string[]];
|
|
53
|
+
baseColumn: never;
|
|
54
|
+
identity: undefined;
|
|
55
|
+
generated: undefined;
|
|
56
|
+
}, {}, {}>;
|
|
57
|
+
taskId: import("drizzle-orm/pg-core").PgColumn<{
|
|
58
|
+
name: "task_id";
|
|
59
|
+
tableName: "junior_task_executions";
|
|
60
|
+
dataType: "string";
|
|
61
|
+
columnType: "PgText";
|
|
62
|
+
data: string;
|
|
63
|
+
driverParam: string;
|
|
64
|
+
notNull: true;
|
|
65
|
+
hasDefault: false;
|
|
66
|
+
isPrimaryKey: false;
|
|
67
|
+
isAutoincrement: false;
|
|
68
|
+
hasRuntimeDefault: false;
|
|
69
|
+
enumValues: [string, ...string[]];
|
|
70
|
+
baseColumn: never;
|
|
71
|
+
identity: undefined;
|
|
72
|
+
generated: undefined;
|
|
73
|
+
}, {}, {}>;
|
|
74
|
+
conversationId: import("drizzle-orm/pg-core").PgColumn<{
|
|
75
|
+
name: "conversation_id";
|
|
76
|
+
tableName: "junior_task_executions";
|
|
77
|
+
dataType: "string";
|
|
78
|
+
columnType: "PgText";
|
|
79
|
+
data: string;
|
|
80
|
+
driverParam: string;
|
|
81
|
+
notNull: true;
|
|
82
|
+
hasDefault: false;
|
|
83
|
+
isPrimaryKey: false;
|
|
84
|
+
isAutoincrement: false;
|
|
85
|
+
hasRuntimeDefault: false;
|
|
86
|
+
enumValues: [string, ...string[]];
|
|
87
|
+
baseColumn: never;
|
|
88
|
+
identity: undefined;
|
|
89
|
+
generated: undefined;
|
|
90
|
+
}, {}, {}>;
|
|
91
|
+
executedAtMs: import("drizzle-orm/pg-core").PgColumn<{
|
|
92
|
+
name: "executed_at_ms";
|
|
93
|
+
tableName: "junior_task_executions";
|
|
94
|
+
dataType: "number";
|
|
95
|
+
columnType: "PgBigInt53";
|
|
96
|
+
data: number;
|
|
97
|
+
driverParam: string | number;
|
|
98
|
+
notNull: true;
|
|
99
|
+
hasDefault: false;
|
|
100
|
+
isPrimaryKey: false;
|
|
101
|
+
isAutoincrement: false;
|
|
102
|
+
hasRuntimeDefault: false;
|
|
103
|
+
enumValues: undefined;
|
|
104
|
+
baseColumn: never;
|
|
105
|
+
identity: undefined;
|
|
106
|
+
generated: undefined;
|
|
107
|
+
}, {}, {}>;
|
|
108
|
+
};
|
|
109
|
+
dialect: "pg";
|
|
110
|
+
}>;
|