@sentry/junior 0.238.1 → 0.240.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/{admin-leAJ2k0P.js → admin-D6fRPRgC.js} +1 -1
- package/dist/{agent-hooks-p3UA9FI1.js → agent-hooks-JFbgedMZ.js} +116 -10
- package/dist/{agent-runner-DjQSEVuD.js → agent-runner-0IjJxsL1.js} +60 -121
- package/dist/api/schema.d.ts +43 -4
- package/dist/api/schema.js +2 -2
- package/dist/api.d.ts +1 -1
- package/dist/api.js +21 -20
- package/dist/{app-FB2hmHpZ.d.ts → app-MEd7wbF0.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +24 -23
- package/dist/{automation-CrQGQ2MT.js → automation-B5_c8hEb.js} +2 -253
- package/dist/{briefs-mzUaJkBX.js → briefs-BGWTp-nz.js} +2 -2
- package/dist/cadence-D00SCzT1.js +256 -0
- package/dist/{catalog-runtime-xq-njrMs.js → catalog-runtime-DdigNl7s.js} +1 -1
- package/dist/{checkpoint-C37Xgtj-.js → checkpoint-C1ZnSz7r.js} +15 -11
- package/dist/cli/chat.js +12 -12
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-BZdqKg6S.js → client-Cn73E7br.js} +2 -2
- package/dist/{config-CGK_VplU.js → config-B0S86yw9.js} +2 -2
- package/dist/{conversation-privacy-Ci3QLNOb.js → conversation-privacy-BKlX7D_R.js} +1 -1
- package/dist/{credential-sync-BBeYpK4k.js → credential-sync-DeNQm7st.js} +14 -14
- package/dist/{db-CWZP77Ex.d.ts → db-Ca9Nt5ci.d.ts} +1 -1
- package/dist/{executor-DmIad4GI.js → executor-BQ-A5nov.js} +2 -2
- package/dist/{images-1xUjTHGf.js → images-C7OKd6uy.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-CXpx6KfD.js → job-queue-DgXLqoeB.js} +1 -1
- package/dist/{logging-Bne7JUXI.js → logging-BSNF167N.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-O8N3knp9.js → oauth-authorization-BM7g61od.js} +1 -1
- package/dist/{oauth-callback-server-Cb-HPZPS.js → oauth-callback-server-Dw-BwI6x.js} +2 -2
- package/dist/{pending-auth-C6w4Gwve.js → pending-auth-Chn_EA1_.js} +2 -2
- package/dist/{profile-DIcHBAxe.js → profile-3t9H_IwL.js} +4 -4
- package/dist/{registry-VSrEYeaD.js → registry-DLZlAhdP.js} +1 -1
- package/dist/{resolve-BkpWmZgN.js → resolve-9_cIPQsq.js} +2 -2
- package/dist/{runner-52ezCnZF.js → runner-C_eUbFyp.js} +9 -9
- package/dist/{sandbox-egress-signals-Cmhf3P6Y.js → sandbox-egress-signals-C1ycxTNA.js} +1 -1
- package/dist/{schema-CxWAN2zq.js → schema-C4XwHTY4.js} +1 -1
- package/dist/{skills-PHvy-ZgH.js → skills-Dqgjr_Tl.js} +2 -2
- package/dist/{spawn-CY34_HCm.js → spawn-BfEr3t7b.js} +2 -2
- package/dist/{store-BxxbxBlm.d.ts → store-DoewL5mG.d.ts} +0 -7
- package/dist/{task-queue-B9uJqkal.js → task-queue-CuFZDOXn.js} +3 -3
- package/dist/{task-runner-BZUoctJ1.js → task-runner-c7gwV8dj.js} +10 -10
- package/dist/{thread-state-SnFcB9Rk.js → thread-state-exTu-G1w.js} +6 -6
- package/dist/{turn-failure-response-CrSc1Vtn.js → turn-failure-response-DFp99ziF.js} +8 -8
- package/dist/{turn-lifecycle-D49hJbjm.js → turn-lifecycle-C4TjuOzG.js} +1 -1
- package/dist/{turn-session-routing-cMvumCLK.js → turn-session-routing-Vpg8jUD1.js} +1 -1
- package/dist/{validation-DsLyiOfn.js → validation-D2lULEG9.js} +1 -1
- package/dist/{version-Dayi_ng2.js → version-BjBMCc2o.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DF3HTfW5.js → viewer-XE3nFqKM.js} +9 -11
- package/dist/{web-authorization-Dg_R1tMc.js → web-authorization-8E8IrWOj.js} +6 -6
- package/dist/{web-input-qVi8134S.js → web-input-DF4GGJrf.js} +28 -44
- package/dist/{work-BbcghZZp.js → work-Dt_JjfbX.js} +7 -7
- package/dist/{worker-B-uRQzKw.js → worker-BrbnLmD3.js} +5 -5
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-D00SCzT1.js";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
3
4
|
//#region src/chat/task-outcomes-schema.ts
|
|
@@ -8,249 +9,6 @@ const taskOutcomeInputSchema = z.object({
|
|
|
8
9
|
destination: taskMessageDestinationInputSchema
|
|
9
10
|
}).strict();
|
|
10
11
|
//#endregion
|
|
11
|
-
//#region src/chat/scheduled-automations/cadence.ts
|
|
12
|
-
const FORMATTERS = /* @__PURE__ */ new Map();
|
|
13
|
-
function getFormatter(timezone) {
|
|
14
|
-
const existing = FORMATTERS.get(timezone);
|
|
15
|
-
if (existing) return existing;
|
|
16
|
-
const formatter = new Intl.DateTimeFormat("en-US", {
|
|
17
|
-
timeZone: timezone,
|
|
18
|
-
hour12: false,
|
|
19
|
-
year: "numeric",
|
|
20
|
-
month: "2-digit",
|
|
21
|
-
day: "2-digit",
|
|
22
|
-
hour: "2-digit",
|
|
23
|
-
minute: "2-digit",
|
|
24
|
-
second: "2-digit"
|
|
25
|
-
});
|
|
26
|
-
FORMATTERS.set(timezone, formatter);
|
|
27
|
-
return formatter;
|
|
28
|
-
}
|
|
29
|
-
function normalizeHour(hour) {
|
|
30
|
-
return hour === 24 ? 0 : hour;
|
|
31
|
-
}
|
|
32
|
-
function getLocalDateWeekday(date) {
|
|
33
|
-
return new Date(Date.UTC(date.year, date.month - 1, date.day)).getUTCDay();
|
|
34
|
-
}
|
|
35
|
-
function getWeekStart(date) {
|
|
36
|
-
return addDays(date, -((getLocalDateWeekday(date) + 6) % 7));
|
|
37
|
-
}
|
|
38
|
-
/** Resolve a UTC timestamp into calendar parts for a named time zone. */
|
|
39
|
-
function getZonedDateTimeParts(timestampMs, timezone) {
|
|
40
|
-
const parts = getFormatter(timezone).formatToParts(new Date(timestampMs));
|
|
41
|
-
const values = new Map(parts.map((part) => [part.type, part.value]));
|
|
42
|
-
const year = Number(values.get("year"));
|
|
43
|
-
const month = Number(values.get("month"));
|
|
44
|
-
const day = Number(values.get("day"));
|
|
45
|
-
return {
|
|
46
|
-
year,
|
|
47
|
-
month,
|
|
48
|
-
day,
|
|
49
|
-
hour: normalizeHour(Number(values.get("hour"))),
|
|
50
|
-
minute: Number(values.get("minute")),
|
|
51
|
-
second: Number(values.get("second")),
|
|
52
|
-
weekday: getLocalDateWeekday({
|
|
53
|
-
year,
|
|
54
|
-
month,
|
|
55
|
-
day
|
|
56
|
-
})
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function getTimeZoneOffsetMs(timestampMs, timezone) {
|
|
60
|
-
const parts = getZonedDateTimeParts(timestampMs, timezone);
|
|
61
|
-
return Date.UTC(parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second) - timestampMs;
|
|
62
|
-
}
|
|
63
|
-
function localDateTimeToTimestampMs(args) {
|
|
64
|
-
const localAsUtcMs = Date.UTC(args.date.year, args.date.month - 1, args.date.day, args.time.hour, args.time.minute, 0);
|
|
65
|
-
const offsets = /* @__PURE__ */ new Set();
|
|
66
|
-
for (const probeDeltaMs of [
|
|
67
|
-
-1296e5,
|
|
68
|
-
-432e5,
|
|
69
|
-
0,
|
|
70
|
-
432e5,
|
|
71
|
-
1296e5
|
|
72
|
-
]) offsets.add(getTimeZoneOffsetMs(localAsUtcMs + probeDeltaMs, args.timezone));
|
|
73
|
-
const matches = [...offsets].map((offsetMs) => localAsUtcMs - offsetMs).filter((timestampMs) => {
|
|
74
|
-
const parts = getZonedDateTimeParts(timestampMs, args.timezone);
|
|
75
|
-
return parts.year === args.date.year && parts.month === args.date.month && parts.day === args.date.day && parts.hour === args.time.hour && parts.minute === args.time.minute;
|
|
76
|
-
});
|
|
77
|
-
if (matches.length === 0) return;
|
|
78
|
-
return Math.min(...matches);
|
|
79
|
-
}
|
|
80
|
-
/** Resolve local time, rejecting DST gaps and choosing the earlier instant in a fold. */
|
|
81
|
-
function resolveLocalScheduleAtMs(args) {
|
|
82
|
-
const date = parseLocalDate(args.date);
|
|
83
|
-
if (!date) return;
|
|
84
|
-
return localDateTimeToTimestampMs({
|
|
85
|
-
date,
|
|
86
|
-
time: args.time,
|
|
87
|
-
timezone: args.timezone
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
function daysBetween(left, right) {
|
|
91
|
-
return Math.floor((Date.UTC(right.year, right.month - 1, right.day) - Date.UTC(left.year, left.month - 1, left.day)) / 864e5);
|
|
92
|
-
}
|
|
93
|
-
function weeklyRecurrenceMatchesDate(date, start, recurrence) {
|
|
94
|
-
if (compareDate(date, start) < 0) return false;
|
|
95
|
-
return normalizeWeekdays(recurrence.weekdays).includes(getLocalDateWeekday(date)) && Math.floor(daysBetween(getWeekStart(start), getWeekStart(date)) / 7) % recurrence.interval === 0;
|
|
96
|
-
}
|
|
97
|
-
function greatestCommonDivisor(left, right) {
|
|
98
|
-
let a = Math.abs(left);
|
|
99
|
-
let b = Math.abs(right);
|
|
100
|
-
while (b !== 0) [a, b] = [b, a % b];
|
|
101
|
-
return a;
|
|
102
|
-
}
|
|
103
|
-
function findNextRunAtMs(args) {
|
|
104
|
-
const start = parseLocalDate(args.recurrence.startDate);
|
|
105
|
-
const interval = args.recurrence.interval;
|
|
106
|
-
if (!start || !Number.isInteger(interval) || interval <= 0) return;
|
|
107
|
-
const searchFrom = compareDate(args.searchFrom, start) < 0 ? start : args.searchFrom;
|
|
108
|
-
if (args.recurrence.frequency === "daily") {
|
|
109
|
-
const offsetDays = daysBetween(start, searchFrom);
|
|
110
|
-
let candidateDate = addDays(start, Math.ceil(offsetDays / interval) * interval);
|
|
111
|
-
const gregorianCycleDays = 146097;
|
|
112
|
-
const candidateCount = gregorianCycleDays / greatestCommonDivisor(gregorianCycleDays, interval);
|
|
113
|
-
for (let attempts = 0; attempts < candidateCount; attempts += 1) {
|
|
114
|
-
const candidate = buildCandidate({
|
|
115
|
-
date: candidateDate,
|
|
116
|
-
recurrence: args.recurrence,
|
|
117
|
-
timezone: args.timezone
|
|
118
|
-
});
|
|
119
|
-
if (candidate !== void 0 && candidate > args.afterMs) return candidate;
|
|
120
|
-
candidateDate = addDays(candidateDate, interval);
|
|
121
|
-
}
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
if (args.recurrence.frequency === "weekly") {
|
|
125
|
-
if (normalizeWeekdays(args.recurrence.weekdays).length === 0) return;
|
|
126
|
-
let candidateDate = searchFrom;
|
|
127
|
-
const gregorianCycleDays = 146097;
|
|
128
|
-
const cadenceDays = interval * 7;
|
|
129
|
-
const searchDays = gregorianCycleDays * cadenceDays / greatestCommonDivisor(gregorianCycleDays, cadenceDays);
|
|
130
|
-
for (let attempts = 0; attempts < searchDays; attempts += 1) {
|
|
131
|
-
if (weeklyRecurrenceMatchesDate(candidateDate, start, args.recurrence)) {
|
|
132
|
-
const candidate = buildCandidate({
|
|
133
|
-
date: candidateDate,
|
|
134
|
-
recurrence: args.recurrence,
|
|
135
|
-
timezone: args.timezone
|
|
136
|
-
});
|
|
137
|
-
if (candidate !== void 0 && candidate > args.afterMs) return candidate;
|
|
138
|
-
}
|
|
139
|
-
candidateDate = addDays(candidateDate, 1);
|
|
140
|
-
}
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (args.recurrence.frequency === "monthly") {
|
|
144
|
-
const startMonth = start.year * 12 + start.month - 1;
|
|
145
|
-
const searchMonth = searchFrom.year * 12 + searchFrom.month - 1;
|
|
146
|
-
let candidateMonth = startMonth + Math.ceil((searchMonth - startMonth) / interval) * interval;
|
|
147
|
-
const gregorianCycleMonths = 4800;
|
|
148
|
-
const candidateCount = gregorianCycleMonths / greatestCommonDivisor(gregorianCycleMonths, interval);
|
|
149
|
-
for (let attempts = 0; attempts < candidateCount; attempts += 1) {
|
|
150
|
-
const candidateDate = {
|
|
151
|
-
year: Math.floor(candidateMonth / 12),
|
|
152
|
-
month: candidateMonth % 12 + 1,
|
|
153
|
-
day: args.recurrence.dayOfMonth ?? 0
|
|
154
|
-
};
|
|
155
|
-
if (compareDate(candidateDate, searchFrom) >= 0) {
|
|
156
|
-
const candidate = buildCandidate({
|
|
157
|
-
date: candidateDate,
|
|
158
|
-
recurrence: args.recurrence,
|
|
159
|
-
timezone: args.timezone
|
|
160
|
-
});
|
|
161
|
-
if (candidate !== void 0 && candidate > args.afterMs) return candidate;
|
|
162
|
-
}
|
|
163
|
-
candidateMonth += interval;
|
|
164
|
-
}
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
let candidateYear = start.year + Math.ceil((searchFrom.year - start.year) / interval) * interval;
|
|
168
|
-
const candidateCount = 400 / greatestCommonDivisor(400, interval);
|
|
169
|
-
for (let attempts = 0; attempts < candidateCount; attempts += 1) {
|
|
170
|
-
const candidateDate = {
|
|
171
|
-
year: candidateYear,
|
|
172
|
-
month: args.recurrence.month ?? 0,
|
|
173
|
-
day: args.recurrence.dayOfMonth ?? 0
|
|
174
|
-
};
|
|
175
|
-
if (compareDate(candidateDate, searchFrom) >= 0) {
|
|
176
|
-
const candidate = buildCandidate({
|
|
177
|
-
date: candidateDate,
|
|
178
|
-
recurrence: args.recurrence,
|
|
179
|
-
timezone: args.timezone
|
|
180
|
-
});
|
|
181
|
-
if (candidate !== void 0 && candidate > args.afterMs) return candidate;
|
|
182
|
-
}
|
|
183
|
-
candidateYear += interval;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
/** Compute the first recurring calendar occurrence strictly after a timestamp. */
|
|
187
|
-
function getFirstRunAtMs(args) {
|
|
188
|
-
return findNextRunAtMs({
|
|
189
|
-
...args,
|
|
190
|
-
searchFrom: getLocalDate(args.afterMs, args.timezone)
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
function compareDate(left, right) {
|
|
194
|
-
return Date.UTC(left.year, left.month - 1, left.day) - Date.UTC(right.year, right.month - 1, right.day);
|
|
195
|
-
}
|
|
196
|
-
function addDays(date, days) {
|
|
197
|
-
const next = new Date(Date.UTC(date.year, date.month - 1, date.day + days));
|
|
198
|
-
return {
|
|
199
|
-
year: next.getUTCFullYear(),
|
|
200
|
-
month: next.getUTCMonth() + 1,
|
|
201
|
-
day: next.getUTCDate()
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
function daysInMonth(year, month) {
|
|
205
|
-
return new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
206
|
-
}
|
|
207
|
-
function parseLocalDate(value) {
|
|
208
|
-
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
|
|
209
|
-
if (!match) return;
|
|
210
|
-
const year = Number(match[1]);
|
|
211
|
-
const month = Number(match[2]);
|
|
212
|
-
const day = Number(match[3]);
|
|
213
|
-
if (!Number.isInteger(year) || !Number.isInteger(month) || !Number.isInteger(day) || month < 1 || month > 12 || day < 1 || day > daysInMonth(year, month)) return;
|
|
214
|
-
return {
|
|
215
|
-
year,
|
|
216
|
-
month,
|
|
217
|
-
day
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
function getLocalDate(timestampMs, timezone) {
|
|
221
|
-
const parts = getZonedDateTimeParts(timestampMs, timezone);
|
|
222
|
-
return {
|
|
223
|
-
year: parts.year,
|
|
224
|
-
month: parts.month,
|
|
225
|
-
day: parts.day
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
function normalizeWeekdays(values) {
|
|
229
|
-
return [...new Set((values ?? []).filter((value) => value >= 0 && value <= 6))].sort((a, b) => a - b);
|
|
230
|
-
}
|
|
231
|
-
function buildCandidate(args) {
|
|
232
|
-
return localDateTimeToTimestampMs({
|
|
233
|
-
date: args.date,
|
|
234
|
-
time: args.recurrence.time,
|
|
235
|
-
timezone: args.timezone
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
/** Return the next fire time after a completed run, when the task recurs. */
|
|
239
|
-
function getNextRunAtMs(task, scheduledForMs, afterMs = scheduledForMs) {
|
|
240
|
-
if (task.schedule.kind !== "recurring") return;
|
|
241
|
-
const recurrence = task.schedule.recurrence;
|
|
242
|
-
if (!recurrence || !Number.isFinite(recurrence.interval) || recurrence.interval <= 0) return;
|
|
243
|
-
const timezone = task.schedule.timezone;
|
|
244
|
-
const afterDate = getLocalDate(afterMs, timezone);
|
|
245
|
-
const nextScheduledDate = addDays(getLocalDate(scheduledForMs, timezone), 1);
|
|
246
|
-
return findNextRunAtMs({
|
|
247
|
-
afterMs,
|
|
248
|
-
recurrence,
|
|
249
|
-
searchFrom: compareDate(afterDate, nextScheduledDate) < 0 ? nextScheduledDate : afterDate,
|
|
250
|
-
timezone
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
//#endregion
|
|
254
12
|
//#region src/chat/scheduled-automations/schedule-intent.ts
|
|
255
13
|
/**
|
|
256
14
|
* Owns model-facing schedule intent and materializes it against the trusted
|
|
@@ -367,15 +125,6 @@ function localDateAt(timestampMs, timezone) {
|
|
|
367
125
|
parts.day
|
|
368
126
|
].map((value, index) => index === 0 ? String(value).padStart(4, "0") : String(value).padStart(2, "0")).join("-");
|
|
369
127
|
}
|
|
370
|
-
/** Whether the runtime accepts this IANA timezone name. */
|
|
371
|
-
function isValidTimeZone(timezone) {
|
|
372
|
-
try {
|
|
373
|
-
new Intl.DateTimeFormat("en-US", { timeZone: timezone }).format();
|
|
374
|
-
return true;
|
|
375
|
-
} catch {
|
|
376
|
-
return false;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
128
|
function plural(value, unit) {
|
|
380
129
|
return value === 1 ? unit : `${unit}s`;
|
|
381
130
|
}
|
|
@@ -890,4 +639,4 @@ const automationEventCatalogSchema = z.array(pluginEventTypeSchema.safeExtend({
|
|
|
890
639
|
const automationScheduleIntentSchema = scheduleIntentSchema;
|
|
891
640
|
const automationSchedulePreviewSchema = scheduledAutomationSchema.pick({ schedule: true }).extend({ nextRunAtMs: z.number() }).strict();
|
|
892
641
|
//#endregion
|
|
893
|
-
export { eventAutomationSchema as A, eventAutomationSummarySchema as C, scheduledRunSchema as D, scheduledAutomationSchema as E,
|
|
642
|
+
export { eventAutomationSchema as A, eventAutomationSummarySchema as C, scheduledRunSchema as D, scheduledAutomationSchema as E, taskOutcomeInputSchema as F, compileScheduleIntent as M, scheduleIntentSchema as N, automationInstructionToolSchema as O, weekdaySchema as P, automationVersionSchema as S, SCHEDULED_AUTOMATION_SYSTEM_ACTOR as T, automationSummarySchema as _, automationExecutionSchema as a, automationVersionListSchema as b, automationLifecycleSchema as c, automationParamsSchema as d, automationRunListSchema as f, automationSchedulePreviewSchema as g, automationScheduleIntentSchema as h, automationExecutionListSchema as i, ScheduleIntentError as j, automationTitleSchema as k, automationListQuerySchema as l, automationRunWindowsSchema as m, automationEditSchema as n, automationExecutionStatusDaySchema as o, automationRunSchema as p, automationEventCatalogSchema as r, automationExecutionStatusSchema as s, automationEditErrorSchema as t, automationListSchema as u, automationUpdateSchema as v, scheduledAutomationSummarySchema as w, automationVersionParamsSchema as x, automationVersionActivateSchema as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as completeObject } from "./client-
|
|
1
|
+
import { r as completeObject } from "./client-Cn73E7br.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
3
3
|
import { B as parseBriefInput, I as briefCodeChangeSchema, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-DwD-vquD.js";
|
|
4
4
|
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-CMU-B4FA.js";
|
|
@@ -269,7 +269,7 @@ async function parseRunOptions(argv) {
|
|
|
269
269
|
* `DATABASE_URL` at import, and `briefs pull` must work with only a token.
|
|
270
270
|
*/
|
|
271
271
|
async function configuredDefaultModelId() {
|
|
272
|
-
const { botConfig } = await import("./config-
|
|
272
|
+
const { botConfig } = await import("./config-B0S86yw9.js").then((n) => n.r);
|
|
273
273
|
return defaultModelId(botConfig);
|
|
274
274
|
}
|
|
275
275
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
//#region src/chat/scheduled-automations/cadence.ts
|
|
2
|
+
const FORMATTERS = /* @__PURE__ */ new Map();
|
|
3
|
+
function getFormatter(timezone) {
|
|
4
|
+
const existing = FORMATTERS.get(timezone);
|
|
5
|
+
if (existing) return existing;
|
|
6
|
+
const formatter = new Intl.DateTimeFormat("en-US", {
|
|
7
|
+
timeZone: timezone,
|
|
8
|
+
hour12: false,
|
|
9
|
+
year: "numeric",
|
|
10
|
+
month: "2-digit",
|
|
11
|
+
day: "2-digit",
|
|
12
|
+
hour: "2-digit",
|
|
13
|
+
minute: "2-digit",
|
|
14
|
+
second: "2-digit"
|
|
15
|
+
});
|
|
16
|
+
FORMATTERS.set(timezone, formatter);
|
|
17
|
+
return formatter;
|
|
18
|
+
}
|
|
19
|
+
function normalizeHour(hour) {
|
|
20
|
+
return hour === 24 ? 0 : hour;
|
|
21
|
+
}
|
|
22
|
+
function getLocalDateWeekday(date) {
|
|
23
|
+
return new Date(Date.UTC(date.year, date.month - 1, date.day)).getUTCDay();
|
|
24
|
+
}
|
|
25
|
+
function getWeekStart(date) {
|
|
26
|
+
return addDays(date, -((getLocalDateWeekday(date) + 6) % 7));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Check that a value is an IANA time zone that this runtime knows. This module
|
|
30
|
+
* has no runtime imports, so the dashboard client bundle can use it.
|
|
31
|
+
*/
|
|
32
|
+
function isValidTimeZone(timezone) {
|
|
33
|
+
try {
|
|
34
|
+
new Intl.DateTimeFormat("en-US", { timeZone: timezone }).format();
|
|
35
|
+
return true;
|
|
36
|
+
} catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Resolve a UTC timestamp into calendar parts for a named time zone. */
|
|
41
|
+
function getZonedDateTimeParts(timestampMs, timezone) {
|
|
42
|
+
const parts = getFormatter(timezone).formatToParts(new Date(timestampMs));
|
|
43
|
+
const values = new Map(parts.map((part) => [part.type, part.value]));
|
|
44
|
+
const year = Number(values.get("year"));
|
|
45
|
+
const month = Number(values.get("month"));
|
|
46
|
+
const day = Number(values.get("day"));
|
|
47
|
+
return {
|
|
48
|
+
year,
|
|
49
|
+
month,
|
|
50
|
+
day,
|
|
51
|
+
hour: normalizeHour(Number(values.get("hour"))),
|
|
52
|
+
minute: Number(values.get("minute")),
|
|
53
|
+
second: Number(values.get("second")),
|
|
54
|
+
weekday: getLocalDateWeekday({
|
|
55
|
+
year,
|
|
56
|
+
month,
|
|
57
|
+
day
|
|
58
|
+
})
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function getTimeZoneOffsetMs(timestampMs, timezone) {
|
|
62
|
+
const parts = getZonedDateTimeParts(timestampMs, timezone);
|
|
63
|
+
return Date.UTC(parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second) - timestampMs;
|
|
64
|
+
}
|
|
65
|
+
function localDateTimeToTimestampMs(args) {
|
|
66
|
+
const localAsUtcMs = Date.UTC(args.date.year, args.date.month - 1, args.date.day, args.time.hour, args.time.minute, 0);
|
|
67
|
+
const offsets = /* @__PURE__ */ new Set();
|
|
68
|
+
for (const probeDeltaMs of [
|
|
69
|
+
-1296e5,
|
|
70
|
+
-432e5,
|
|
71
|
+
0,
|
|
72
|
+
432e5,
|
|
73
|
+
1296e5
|
|
74
|
+
]) offsets.add(getTimeZoneOffsetMs(localAsUtcMs + probeDeltaMs, args.timezone));
|
|
75
|
+
const matches = [...offsets].map((offsetMs) => localAsUtcMs - offsetMs).filter((timestampMs) => {
|
|
76
|
+
const parts = getZonedDateTimeParts(timestampMs, args.timezone);
|
|
77
|
+
return parts.year === args.date.year && parts.month === args.date.month && parts.day === args.date.day && parts.hour === args.time.hour && parts.minute === args.time.minute;
|
|
78
|
+
});
|
|
79
|
+
if (matches.length === 0) return;
|
|
80
|
+
return Math.min(...matches);
|
|
81
|
+
}
|
|
82
|
+
/** Resolve local time, rejecting DST gaps and choosing the earlier instant in a fold. */
|
|
83
|
+
function resolveLocalScheduleAtMs(args) {
|
|
84
|
+
const date = parseLocalDate(args.date);
|
|
85
|
+
if (!date) return;
|
|
86
|
+
return localDateTimeToTimestampMs({
|
|
87
|
+
date,
|
|
88
|
+
time: args.time,
|
|
89
|
+
timezone: args.timezone
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function daysBetween(left, right) {
|
|
93
|
+
return Math.floor((Date.UTC(right.year, right.month - 1, right.day) - Date.UTC(left.year, left.month - 1, left.day)) / 864e5);
|
|
94
|
+
}
|
|
95
|
+
function weeklyRecurrenceMatchesDate(date, start, recurrence) {
|
|
96
|
+
if (compareDate(date, start) < 0) return false;
|
|
97
|
+
return normalizeWeekdays(recurrence.weekdays).includes(getLocalDateWeekday(date)) && Math.floor(daysBetween(getWeekStart(start), getWeekStart(date)) / 7) % recurrence.interval === 0;
|
|
98
|
+
}
|
|
99
|
+
function greatestCommonDivisor(left, right) {
|
|
100
|
+
let a = Math.abs(left);
|
|
101
|
+
let b = Math.abs(right);
|
|
102
|
+
while (b !== 0) [a, b] = [b, a % b];
|
|
103
|
+
return a;
|
|
104
|
+
}
|
|
105
|
+
function findNextRunAtMs(args) {
|
|
106
|
+
const start = parseLocalDate(args.recurrence.startDate);
|
|
107
|
+
const interval = args.recurrence.interval;
|
|
108
|
+
if (!start || !Number.isInteger(interval) || interval <= 0) return;
|
|
109
|
+
const searchFrom = compareDate(args.searchFrom, start) < 0 ? start : args.searchFrom;
|
|
110
|
+
if (args.recurrence.frequency === "daily") {
|
|
111
|
+
const offsetDays = daysBetween(start, searchFrom);
|
|
112
|
+
let candidateDate = addDays(start, Math.ceil(offsetDays / interval) * interval);
|
|
113
|
+
const gregorianCycleDays = 146097;
|
|
114
|
+
const candidateCount = gregorianCycleDays / greatestCommonDivisor(gregorianCycleDays, interval);
|
|
115
|
+
for (let attempts = 0; attempts < candidateCount; attempts += 1) {
|
|
116
|
+
const candidate = buildCandidate({
|
|
117
|
+
date: candidateDate,
|
|
118
|
+
recurrence: args.recurrence,
|
|
119
|
+
timezone: args.timezone
|
|
120
|
+
});
|
|
121
|
+
if (candidate !== void 0 && candidate > args.afterMs) return candidate;
|
|
122
|
+
candidateDate = addDays(candidateDate, interval);
|
|
123
|
+
}
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (args.recurrence.frequency === "weekly") {
|
|
127
|
+
if (normalizeWeekdays(args.recurrence.weekdays).length === 0) return;
|
|
128
|
+
let candidateDate = searchFrom;
|
|
129
|
+
const gregorianCycleDays = 146097;
|
|
130
|
+
const cadenceDays = interval * 7;
|
|
131
|
+
const searchDays = gregorianCycleDays * cadenceDays / greatestCommonDivisor(gregorianCycleDays, cadenceDays);
|
|
132
|
+
for (let attempts = 0; attempts < searchDays; attempts += 1) {
|
|
133
|
+
if (weeklyRecurrenceMatchesDate(candidateDate, start, args.recurrence)) {
|
|
134
|
+
const candidate = buildCandidate({
|
|
135
|
+
date: candidateDate,
|
|
136
|
+
recurrence: args.recurrence,
|
|
137
|
+
timezone: args.timezone
|
|
138
|
+
});
|
|
139
|
+
if (candidate !== void 0 && candidate > args.afterMs) return candidate;
|
|
140
|
+
}
|
|
141
|
+
candidateDate = addDays(candidateDate, 1);
|
|
142
|
+
}
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (args.recurrence.frequency === "monthly") {
|
|
146
|
+
const startMonth = start.year * 12 + start.month - 1;
|
|
147
|
+
const searchMonth = searchFrom.year * 12 + searchFrom.month - 1;
|
|
148
|
+
let candidateMonth = startMonth + Math.ceil((searchMonth - startMonth) / interval) * interval;
|
|
149
|
+
const gregorianCycleMonths = 4800;
|
|
150
|
+
const candidateCount = gregorianCycleMonths / greatestCommonDivisor(gregorianCycleMonths, interval);
|
|
151
|
+
for (let attempts = 0; attempts < candidateCount; attempts += 1) {
|
|
152
|
+
const candidateDate = {
|
|
153
|
+
year: Math.floor(candidateMonth / 12),
|
|
154
|
+
month: candidateMonth % 12 + 1,
|
|
155
|
+
day: args.recurrence.dayOfMonth ?? 0
|
|
156
|
+
};
|
|
157
|
+
if (compareDate(candidateDate, searchFrom) >= 0) {
|
|
158
|
+
const candidate = buildCandidate({
|
|
159
|
+
date: candidateDate,
|
|
160
|
+
recurrence: args.recurrence,
|
|
161
|
+
timezone: args.timezone
|
|
162
|
+
});
|
|
163
|
+
if (candidate !== void 0 && candidate > args.afterMs) return candidate;
|
|
164
|
+
}
|
|
165
|
+
candidateMonth += interval;
|
|
166
|
+
}
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
let candidateYear = start.year + Math.ceil((searchFrom.year - start.year) / interval) * interval;
|
|
170
|
+
const candidateCount = 400 / greatestCommonDivisor(400, interval);
|
|
171
|
+
for (let attempts = 0; attempts < candidateCount; attempts += 1) {
|
|
172
|
+
const candidateDate = {
|
|
173
|
+
year: candidateYear,
|
|
174
|
+
month: args.recurrence.month ?? 0,
|
|
175
|
+
day: args.recurrence.dayOfMonth ?? 0
|
|
176
|
+
};
|
|
177
|
+
if (compareDate(candidateDate, searchFrom) >= 0) {
|
|
178
|
+
const candidate = buildCandidate({
|
|
179
|
+
date: candidateDate,
|
|
180
|
+
recurrence: args.recurrence,
|
|
181
|
+
timezone: args.timezone
|
|
182
|
+
});
|
|
183
|
+
if (candidate !== void 0 && candidate > args.afterMs) return candidate;
|
|
184
|
+
}
|
|
185
|
+
candidateYear += interval;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
/** Compute the first recurring calendar occurrence strictly after a timestamp. */
|
|
189
|
+
function getFirstRunAtMs(args) {
|
|
190
|
+
return findNextRunAtMs({
|
|
191
|
+
...args,
|
|
192
|
+
searchFrom: getLocalDate(args.afterMs, args.timezone)
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function compareDate(left, right) {
|
|
196
|
+
return Date.UTC(left.year, left.month - 1, left.day) - Date.UTC(right.year, right.month - 1, right.day);
|
|
197
|
+
}
|
|
198
|
+
function addDays(date, days) {
|
|
199
|
+
const next = new Date(Date.UTC(date.year, date.month - 1, date.day + days));
|
|
200
|
+
return {
|
|
201
|
+
year: next.getUTCFullYear(),
|
|
202
|
+
month: next.getUTCMonth() + 1,
|
|
203
|
+
day: next.getUTCDate()
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function daysInMonth(year, month) {
|
|
207
|
+
return new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
208
|
+
}
|
|
209
|
+
function parseLocalDate(value) {
|
|
210
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
|
|
211
|
+
if (!match) return;
|
|
212
|
+
const year = Number(match[1]);
|
|
213
|
+
const month = Number(match[2]);
|
|
214
|
+
const day = Number(match[3]);
|
|
215
|
+
if (!Number.isInteger(year) || !Number.isInteger(month) || !Number.isInteger(day) || month < 1 || month > 12 || day < 1 || day > daysInMonth(year, month)) return;
|
|
216
|
+
return {
|
|
217
|
+
year,
|
|
218
|
+
month,
|
|
219
|
+
day
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function getLocalDate(timestampMs, timezone) {
|
|
223
|
+
const parts = getZonedDateTimeParts(timestampMs, timezone);
|
|
224
|
+
return {
|
|
225
|
+
year: parts.year,
|
|
226
|
+
month: parts.month,
|
|
227
|
+
day: parts.day
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function normalizeWeekdays(values) {
|
|
231
|
+
return [...new Set((values ?? []).filter((value) => value >= 0 && value <= 6))].sort((a, b) => a - b);
|
|
232
|
+
}
|
|
233
|
+
function buildCandidate(args) {
|
|
234
|
+
return localDateTimeToTimestampMs({
|
|
235
|
+
date: args.date,
|
|
236
|
+
time: args.recurrence.time,
|
|
237
|
+
timezone: args.timezone
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
/** Return the next fire time after a completed run, when the task recurs. */
|
|
241
|
+
function getNextRunAtMs(task, scheduledForMs, afterMs = scheduledForMs) {
|
|
242
|
+
if (task.schedule.kind !== "recurring") return;
|
|
243
|
+
const recurrence = task.schedule.recurrence;
|
|
244
|
+
if (!recurrence || !Number.isFinite(recurrence.interval) || recurrence.interval <= 0) return;
|
|
245
|
+
const timezone = task.schedule.timezone;
|
|
246
|
+
const afterDate = getLocalDate(afterMs, timezone);
|
|
247
|
+
const nextScheduledDate = addDays(getLocalDate(scheduledForMs, timezone), 1);
|
|
248
|
+
return findNextRunAtMs({
|
|
249
|
+
afterMs,
|
|
250
|
+
recurrence,
|
|
251
|
+
searchFrom: compareDate(afterDate, nextScheduledDate) < 0 ? nextScheduledDate : afterDate,
|
|
252
|
+
timezone
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
export { resolveLocalScheduleAtMs as a, isValidTimeZone as i, getNextRunAtMs as n, getZonedDateTimeParts as r, getFirstRunAtMs as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-DLZlAhdP.js";
|
|
3
3
|
//#region src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-
|
|
2
|
-
import { d as logException, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
1
|
+
import { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-Cn73E7br.js";
|
|
2
|
+
import { d as logException, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-BSNF167N.js";
|
|
3
|
+
import { n as botConfig } from "./config-B0S86yw9.js";
|
|
4
4
|
import { c as toStoredSlackActor, g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
|
|
5
|
-
import {
|
|
5
|
+
import { c as getConversationEventStore, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, v as startLocationThread, x as addAgentTurnUsage, y as bindProviderConversation } from "./viewer-XE3nFqKM.js";
|
|
6
6
|
import { d as instructionActors, f as instructionProvenanceFor, n as agentHistoryItemSchema, u as contextProvenance } from "./history-BLTUgFYO.js";
|
|
7
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
8
|
-
import {
|
|
7
|
+
import { p as credentialSubjectSchema } from "./registry-DLZlAhdP.js";
|
|
8
|
+
import { Jt as agentsInstructionsUpdatedEvent, Xt as authenticationUnlinkedEvent, Yt as authenticationLinkedEvent, qt as JUNIOR_NATIVE_EVENT_NAMESPACE } from "./agent-hooks-JFbgedMZ.js";
|
|
9
9
|
import { H as messageCardRef } from "./conversation-DwD-vquD.js";
|
|
10
|
-
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-
|
|
10
|
+
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-3t9H_IwL.js";
|
|
11
11
|
import { isDeepStrictEqual } from "node:util";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
@@ -960,10 +960,14 @@ async function commitAcceptedReply(args) {
|
|
|
960
960
|
conversationId: args.conversationId,
|
|
961
961
|
...args.repliedAtMs === void 0 ? void 0 : { repliedAtMs: args.repliedAtMs }
|
|
962
962
|
});
|
|
963
|
-
for (const
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
963
|
+
for (const reference of args.providerConversationBindings ?? []) {
|
|
964
|
+
const binding = {
|
|
965
|
+
conversationId: args.conversationId,
|
|
966
|
+
...reference
|
|
967
|
+
};
|
|
968
|
+
await bindProviderConversation(executor, binding);
|
|
969
|
+
await startLocationThread(executor, binding);
|
|
970
|
+
}
|
|
967
971
|
}));
|
|
968
972
|
}
|
|
969
973
|
async function commitMessagesLocked(args, executor) {
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-0IjJxsL1.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -100,10 +100,10 @@ async function loadLocalPluginSet() {
|
|
|
100
100
|
async function configureLocalChatPlugins(pluginSet) {
|
|
101
101
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
102
102
|
import("../plugins-egKWjgue.js").then((n) => n.o),
|
|
103
|
-
import("../agent-hooks-
|
|
104
|
-
import("../catalog-runtime-
|
|
105
|
-
import("../validation-
|
|
106
|
-
import("../viewer-
|
|
103
|
+
import("../agent-hooks-JFbgedMZ.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-DdigNl7s.js").then((n) => n.t),
|
|
105
|
+
import("../validation-D2lULEG9.js").then((n) => n.r),
|
|
106
|
+
import("../viewer-XE3nFqKM.js").then((n) => n.s)
|
|
107
107
|
]);
|
|
108
108
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
109
109
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -155,16 +155,16 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
155
155
|
await configureLocalChatPlugins(pluginSet);
|
|
156
156
|
const { setExperimentalFeatures } = await import("../experimental-Qn9rKLgx.js").then((n) => n.t);
|
|
157
157
|
setExperimentalFeatures({ subagents: true });
|
|
158
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
158
|
+
const { setBriefsConfig } = await import("../agent-hooks-JFbgedMZ.js").then((n) => n.m);
|
|
159
159
|
setBriefsConfig({ enabled: true });
|
|
160
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
161
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
160
|
+
const { runLocalAgentTurn } = await import("../runner-C_eUbFyp.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-Dw-BwI6x.js");
|
|
162
162
|
const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
|
|
163
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
164
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
165
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
163
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-C1ycxTNA.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-BfEr3t7b.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-Dt_JjfbX.js").then((n) => n.a);
|
|
166
166
|
const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
|
|
167
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-BrbnLmD3.js").then((n) => n.n);
|
|
168
168
|
let agentRunner;
|
|
169
169
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
170
170
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
2
|
-
import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-BSNF167N.js";
|
|
2
|
+
import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-DLZlAhdP.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-Dqgjr_Tl.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,10 +25,10 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runAdmin(argv) {
|
|
28
|
-
return await (await import("../admin-
|
|
28
|
+
return await (await import("../admin-D6fRPRgC.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runBriefs(argv) {
|
|
31
|
-
return await (await import("../briefs-
|
|
31
|
+
return await (await import("../briefs-BGWTp-nz.js")).runBriefs(argv);
|
|
32
32
|
}
|
|
33
33
|
function topLevelCommand(argv) {
|
|
34
34
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|