@sentry/junior 0.305.0 → 0.307.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/{adapter-context-BpvbUki8.js → adapter-context-B69WPn6b.js} +2 -2
- package/dist/{admin-CoDt35ny.js → admin-nCJXMgkp.js} +2 -2
- package/dist/{agent-runner-C5d6rY5g.js → agent-runner-DdFcxAxG.js} +463 -303
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -8
- package/dist/api.d.ts +19 -4
- package/dist/api.js +437 -310
- package/dist/{app-Cs157Zc5.d.ts → app-EZur8cVC.d.ts} +12 -3
- package/dist/app.d.ts +2 -2
- package/dist/app.js +532 -439
- package/dist/background-compaction-queue-BhEe4UfU.js +231 -0
- package/dist/{briefs-BRdznF7c.js → briefs-Dl9lxi7J.js} +3 -3
- package/dist/{catalog-runtime-J52Tej47.js → catalog-runtime-OXrv2Ewn.js} +1 -1
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +17 -16
- package/dist/cli/check.js +58 -48
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +5 -5
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +3 -8
- package/dist/{config-CBZp0udd.js → config-362yMSIz.js} +183 -49
- package/dist/{connections-BYmuJ6Vm.js → connections-BJv3EjmB.js} +10 -8
- package/dist/{continue-in-slack-Cvot6S38.js → continue-in-slack-CFEevC7z.js} +5 -5
- package/dist/{conversation-BOqdRtUx.js → conversation--f85g4zL.js} +132 -132
- package/dist/{conversation-feed-CgpgP7yi.js → conversation-feed-BNs9KiqC.js} +1 -1
- package/dist/{conversation-privacy-D2pOzBNl.js → conversation-privacy-Tjj5P2W6.js} +1 -1
- package/dist/{conversation-turn-CI8WDpnK.js → conversation-turn-DU0_WDAr.js} +26 -72
- package/dist/{credential-sync-COqnZ1Dx.js → credential-sync-D6aFARKE.js} +28 -27
- package/dist/{db-DU84dCVu.js → db-Bcbd9zQc.js} +226 -18
- package/dist/{db-zbN5ZV_o.d.ts → db-C41UgdBj.d.ts} +1 -1
- package/dist/{executor-CFyrgOu1.js → executor-DBMBrpNV.js} +137 -33
- package/dist/{history-m2-ceTTX.js → history-N7IVbUom.js} +5 -1
- package/dist/{install-CQ76CfRw.js → install-CgoAbzfF.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{lineage-DLd2UxVP.js → lineage-CsZDmz3e.js} +2 -2
- package/dist/{logging-BPNTQVFu.js → logging-CHCuQ5iz.js} +1 -1
- package/dist/{message-BWJLeQ5e.js → message-B8vCbZZB.js} +8 -8
- package/dist/{model-input-DoM9Ht-d.js → model-input-Xluiy-1W.js} +3 -3
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +3 -4
- package/dist/{oauth-callback-server-DeHbnAQl.js → oauth-callback-server-BUuNvfvu.js} +2 -2
- package/dist/{oauth-relay-DAmfVmJu.js → oauth-relay-DGAZzg9m.js} +1 -1
- package/dist/{plugins-B_0Cr0MO.d.ts → plugins-fBrz8PCV.d.ts} +2 -0
- package/dist/{projection-CcFBVFUo.js → projection-xPpvqexa.js} +13423 -11432
- package/dist/{prompt-C5LREK2p.js → prompt-D8u4jFs_.js} +15 -7
- package/dist/{registry-BjZZqKqi.js → registry-D20hG3r6.js} +19 -9
- package/dist/{resolve-CeJgXuH1.js → resolve-BhCySRCW.js} +3 -3
- package/dist/{result-icDrueyB.js → result-DddO63S9.js} +13 -11
- package/dist/{runner-nVfMkMMB.js → runner-DQR9vYce.js} +13 -15
- package/dist/{sandbox-egress-signals-H9vQ5qRf.js → sandbox-egress-signals-DFlNUOnK.js} +1 -1
- package/dist/{automation-CuA3yEcD.js → schedule-BG1tEbRF.js} +380 -8
- package/dist/{schema-CKcu-IK6.d.ts → schema-CRXcj4fj.d.ts} +420 -143
- package/dist/{schema-Bx0Mlo32.js → schema-D4jdesIu.js} +62 -8
- package/dist/{service-account-DU5865XA.js → service-account-Bv5QwrEq.js} +8 -6
- package/dist/{service-account-Dw06p3zm.js → service-account-CNfycv0z.js} +3 -3
- package/dist/{session-stop-uotLtp4g.js → session-stop-BDdwyZaa.js} +878 -171
- package/dist/{skills-Bex1EaO5.js → skills-63i1Bcv1.js} +32 -28
- package/dist/{slack-conversation-unfurl-EPG3riWF.js → slack-conversation-unfurl-DtpBUlUu.js} +10 -9
- package/dist/{spawn-CoD3vDuS.js → spawn-mwimEY9_.js} +6 -6
- package/dist/{state-nCR4Muhn.js → state-BBn9L6gC.js} +4 -4
- package/dist/{stop-BFVd0P0m.js → stop-Da-Ug7tg.js} +172 -239
- package/dist/{store-Ca6G962n.js → store-CdWg2r2L.js} +5 -5
- package/dist/{background-compaction-queue-BTqMIfTA.js → task-queue-BcjAYWyB.js} +164 -180
- package/dist/{task-runner-xsOPIxCZ.js → task-runner-CoXmMlsW.js} +13 -11
- package/dist/{thread-context-BOvZhsKK.js → thread-context-ZPGqOjW7.js} +8 -91
- package/dist/turn-session-routing-DFYak28Q.js +263 -0
- package/dist/{turn-user-message-BrhuyYrH.js → turn-user-message-B1S8nOnG.js} +3 -3
- package/dist/users-DDbENg-I.js +181 -0
- package/dist/{validation-BnY9K5WB.js → validation-fl21ps-k.js} +1 -1
- package/dist/{version-qROlRQGF.js → version-DCdMMx_0.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CxUiOraX.js → viewer-DN_xzVKj.js} +3 -3
- package/dist/{warmup--Gkz7iB-.js → warmup-CxhEhm71.js} +842 -532
- package/dist/{web-message-id-lNodcCOI.js → web-message-id-BT8Mg8LL.js} +16 -1
- package/dist/{worker-DJ8d9fmD.js → worker-Btb1SB5h.js} +8 -7
- package/migrations/0114_plan_items.sql +22 -0
- package/migrations/0115_automation_creator_slack_index.sql +1 -0
- package/migrations/0116_conversation_event_search.sql +25 -0
- package/migrations/0117_automation_last_run.sql +46 -0
- package/migrations/0118_automation_last_run_index.sql +1 -0
- package/migrations/0119_money_micro_usd.sql +29 -0
- package/migrations/0120_conversation_cost_micro_usd.sql +8 -0
- package/migrations/meta/0114_snapshot.json +5203 -0
- package/migrations/meta/0115_snapshot.json +5225 -0
- package/migrations/meta/0116_snapshot.json +5388 -0
- package/migrations/meta/0117_snapshot.json +5413 -0
- package/migrations/meta/0118_snapshot.json +5428 -0
- package/migrations/meta/0119_snapshot.json +5441 -0
- package/migrations/meta/0120_snapshot.json +5441 -0
- package/migrations/meta/_journal.json +49 -0
- package/package.json +10 -9
- package/dist/queue-B2AAL3ym.js +0 -115
- package/dist/schedule-cP0AACm1.js +0 -344
- package/dist/secrets-DHaJ5TTn.js +0 -18
- package/dist/task-queue-BLPZU6kC.js +0 -89
- package/dist/turn-session-routing-2bW2qfeb.js +0 -1792
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { i as getChatConfig } from "./config-362yMSIz.js";
|
|
2
|
+
import { E as withSpan, h as logWarn } from "./logging-CHCuQ5iz.js";
|
|
3
|
+
import { _ as getQueueProvider, c as QUEUE_SIGNATURE_MAX_AGE_MS, h as queueCallback, l as signQueueMessage, u as verifyQueueMessage } from "./task-queue-BcjAYWyB.js";
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
|
+
/** Validate the v2 conversation work hint sent through Vercel Queue. */
|
|
7
|
+
const conversationQueueMessageSchema = z.object({
|
|
8
|
+
schemaVersion: z.literal(2),
|
|
9
|
+
conversationId: z.string().trim().min(1)
|
|
10
|
+
}).strict();
|
|
11
|
+
var ConversationQueueMessageRejectedError = class extends Error {
|
|
12
|
+
conversationId;
|
|
13
|
+
reason;
|
|
14
|
+
constructor(reason, message, options = {}) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.name = "ConversationQueueMessageRejectedError";
|
|
17
|
+
this.reason = reason;
|
|
18
|
+
this.conversationId = options.conversationId;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
/** Return whether an error means the queue message was permanently rejected. */
|
|
22
|
+
function isConversationQueueMessageRejectedError(error) {
|
|
23
|
+
return error instanceof ConversationQueueMessageRejectedError;
|
|
24
|
+
}
|
|
25
|
+
/** Build the idempotency key of a wake that one worker event sends. */
|
|
26
|
+
function nudgeIdempotencyKey(reason, conversationId, nowMs) {
|
|
27
|
+
return `${reason}:${conversationId}:${nowMs}`;
|
|
28
|
+
}
|
|
29
|
+
// src/chat/task-execution/queue-signing.ts
|
|
30
|
+
const conversationQueueSign = {
|
|
31
|
+
context: "junior.conversation_work_queue.v2",
|
|
32
|
+
schema: conversationQueueMessageSchema,
|
|
33
|
+
separator: ":",
|
|
34
|
+
signatureVersion: "v2",
|
|
35
|
+
parts: (message) => [message.conversationId]
|
|
36
|
+
};
|
|
37
|
+
const CONVERSATION_WORK_QUEUE_SIGNATURE_MAX_SKEW_MS = QUEUE_SIGNATURE_MAX_AGE_MS;
|
|
38
|
+
/** Sign a conversation queue payload before it crosses the public callback route. */
|
|
39
|
+
function signConversationQueueMessage(message, nowMs = Date.now()) {
|
|
40
|
+
return signQueueMessage(conversationQueueSign, message, nowMs);
|
|
41
|
+
}
|
|
42
|
+
/** Explain whether a queue payload is verified, rejected, or unavailable. */
|
|
43
|
+
function verifyConversationQueueMessage(value, nowMs = Date.now()) {
|
|
44
|
+
return verifyQueueMessage(conversationQueueSign, value, nowMs);
|
|
45
|
+
}
|
|
46
|
+
const CONVERSATION_WORK_QUEUE_RETENTION_SECONDS = CONVERSATION_WORK_QUEUE_SIGNATURE_MAX_SKEW_MS / 1e3;
|
|
47
|
+
let defaultQueue;
|
|
48
|
+
/** Resolve the Vercel Queue topic used for conversation wake-up nudges. */
|
|
49
|
+
function resolveConversationWorkQueueTopic(options = {}) {
|
|
50
|
+
return options.topic?.trim() || process.env["JUNIOR_CONVERSATION_WORK_QUEUE_TOPIC"]?.trim() || "junior_conversation_work";
|
|
51
|
+
}
|
|
52
|
+
function toDelaySeconds(options) {
|
|
53
|
+
if (!options?.delayMs || options.delayMs <= 0) return;
|
|
54
|
+
return Math.ceil(options.delayMs / 1e3);
|
|
55
|
+
}
|
|
56
|
+
/** Create the Vercel Queue implementation for conversation wake-up nudges. */
|
|
57
|
+
function createVercelConversationWorkQueue(options = {}) {
|
|
58
|
+
const topic = resolveConversationWorkQueueTopic(options);
|
|
59
|
+
const client = options.client ?? getQueueProvider();
|
|
60
|
+
return { async send(message, sendOptions) {
|
|
61
|
+
const payload = signConversationQueueMessage(message);
|
|
62
|
+
return await withSpan("conversation.work.publish", "queue.publish", { conversationId: message.conversationId }, async (setSpanAttributes) => {
|
|
63
|
+
const result = await client.send(topic, payload, {
|
|
64
|
+
idempotencyKey: sendOptions?.idempotencyKey,
|
|
65
|
+
delaySeconds: toDelaySeconds(sendOptions),
|
|
66
|
+
retentionSeconds: options.retentionSeconds ?? CONVERSATION_WORK_QUEUE_RETENTION_SECONDS
|
|
67
|
+
});
|
|
68
|
+
if (!result.messageId) return {};
|
|
69
|
+
setSpanAttributes({ "messaging.message.id": result.messageId });
|
|
70
|
+
return { messageId: result.messageId };
|
|
71
|
+
}, {
|
|
72
|
+
"messaging.destination.name": topic,
|
|
73
|
+
"messaging.message.body.size": Buffer.byteLength(JSON.stringify(payload)),
|
|
74
|
+
"messaging.system": getQueueProvider().messagingSystem
|
|
75
|
+
});
|
|
76
|
+
} };
|
|
77
|
+
}
|
|
78
|
+
/** Return the default production conversation work queue. */
|
|
79
|
+
function getVercelConversationWorkQueue() {
|
|
80
|
+
defaultQueue ??= createVercelConversationWorkQueue();
|
|
81
|
+
return defaultQueue;
|
|
82
|
+
}
|
|
83
|
+
// src/chat/sandbox/snapshot/job-queue.ts
|
|
84
|
+
/** Send Workspace snapshot build messages. */
|
|
85
|
+
const SIGNATURE_CONTEXT = "junior.workspace_snapshot_queue.v1";
|
|
86
|
+
const SIGNATURE_VERSION = "v1";
|
|
87
|
+
const WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC = "junior_workspace_snapshots";
|
|
88
|
+
const workspaceSnapshotJobSign = {
|
|
89
|
+
context: SIGNATURE_CONTEXT,
|
|
90
|
+
schema: z.object({
|
|
91
|
+
workspaceId: z.string().uuid(),
|
|
92
|
+
profileHash: z.string().min(1)
|
|
93
|
+
}).strict(),
|
|
94
|
+
signatureVersion: SIGNATURE_VERSION,
|
|
95
|
+
parts: (message) => [message.workspaceId, message.profileHash]
|
|
96
|
+
};
|
|
97
|
+
function jobId(message) {
|
|
98
|
+
return `workspace-snapshot_${createHash("sha256").update(message.workspaceId).update("\0").update(message.profileHash).digest("hex").slice(0, 32)}`;
|
|
99
|
+
}
|
|
100
|
+
/** Sign a Workspace snapshot job for tests and local checks. */
|
|
101
|
+
function signWorkspaceSnapshotJobMessage(message, nowMs = Date.now()) {
|
|
102
|
+
return signQueueMessage(workspaceSnapshotJobSign, message, nowMs);
|
|
103
|
+
}
|
|
104
|
+
/** Check that a recent queue message came from Junior. */
|
|
105
|
+
function verifyWorkspaceSnapshotJobMessage(value, nowMs = Date.now()) {
|
|
106
|
+
return verifyQueueMessage(workspaceSnapshotJobSign, value, nowMs);
|
|
107
|
+
}
|
|
108
|
+
async function send(message, idempotencyKey) {
|
|
109
|
+
const options = { retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3 };
|
|
110
|
+
if (idempotencyKey) options.idempotencyKey = idempotencyKey;
|
|
111
|
+
await getQueueProvider().send(WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, signWorkspaceSnapshotJobMessage(message), options);
|
|
112
|
+
}
|
|
113
|
+
/** Send a job unless the same Workspace build already has one. */
|
|
114
|
+
async function sendWorkspaceSnapshotJob(message) {
|
|
115
|
+
await send(message, jobId(message));
|
|
116
|
+
}
|
|
117
|
+
/** Send the next job for a Workspace build that is still running. */
|
|
118
|
+
async function sendNextWorkspaceSnapshotJob(message) {
|
|
119
|
+
await send(message);
|
|
120
|
+
}
|
|
121
|
+
// src/chat/cache-warming/queue.ts
|
|
122
|
+
/** Send and receive delayed cache warmup messages. */
|
|
123
|
+
/** Deploy topic name. Keep stable for Vercel queue wiring. */
|
|
124
|
+
const CACHE_WARMUP_QUEUE_TOPIC = "junior_cache_warmups";
|
|
125
|
+
const CACHE_WARMUP_DEV_CONSUMER_GROUP = "junior_cache_warmups_dev";
|
|
126
|
+
const cacheWarmupSign = {
|
|
127
|
+
context: "junior.cache_warmup_queue.v1",
|
|
128
|
+
schema: z.discriminatedUnion("kind", [z.object({
|
|
129
|
+
kind: z.literal("warmup"),
|
|
130
|
+
conversationId: z.string().min(1),
|
|
131
|
+
cycle: z.number().int().positive(),
|
|
132
|
+
generation: z.string().min(1),
|
|
133
|
+
cacheExpiresAtMs: z.number().int().positive()
|
|
134
|
+
}).strict(), z.object({
|
|
135
|
+
kind: z.literal("horizon"),
|
|
136
|
+
conversationId: z.string().min(1),
|
|
137
|
+
generation: z.string().min(1)
|
|
138
|
+
}).strict()]),
|
|
139
|
+
signatureVersion: "v1",
|
|
140
|
+
parts: (message) => [
|
|
141
|
+
message.kind,
|
|
142
|
+
message.conversationId,
|
|
143
|
+
message.generation,
|
|
144
|
+
message.kind === "warmup" ? String(message.cycle) : "",
|
|
145
|
+
message.kind === "warmup" ? String(message.cacheExpiresAtMs) : ""
|
|
146
|
+
]
|
|
147
|
+
};
|
|
148
|
+
/** Send a cache warming message that is delivered after `delayMs`. */
|
|
149
|
+
async function sendCacheWarmup(message, delayMs) {
|
|
150
|
+
await getQueueProvider().send(CACHE_WARMUP_QUEUE_TOPIC, signQueueMessage(cacheWarmupSign, message), {
|
|
151
|
+
delaySeconds: Math.max(0, Math.floor(delayMs / 1e3)),
|
|
152
|
+
retentionSeconds: message.kind === "warmup" ? Math.min(QUEUE_SIGNATURE_MAX_AGE_MS / 1e3, Math.ceil(Math.max(0, delayMs) / 1e3) + 120) : QUEUE_SIGNATURE_MAX_AGE_MS / 1e3,
|
|
153
|
+
idempotencyKey: `cache-warmup_${message.generation}_${message.kind === "warmup" ? message.cycle : message.kind}`
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function logCacheWarmupRejected(reason, metadata, error) {
|
|
157
|
+
logWarn("cache_warming.queue_message.rejected", {
|
|
158
|
+
"app.queue.consumer_group": metadata.consumerGroup,
|
|
159
|
+
"app.queue.delivery_count": metadata.deliveryCount,
|
|
160
|
+
"app.queue.message_id": metadata.messageId,
|
|
161
|
+
"app.queue.reject_reason": reason,
|
|
162
|
+
"app.queue.topic_name": metadata.topicName,
|
|
163
|
+
...error instanceof Error ? { "exception.message": error.message } : void 0
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function cacheWarmupCallback() {
|
|
167
|
+
return queueCallback({
|
|
168
|
+
consumerGroup: CACHE_WARMUP_DEV_CONSUMER_GROUP,
|
|
169
|
+
maxDeliveries: 1,
|
|
170
|
+
onRejected: logCacheWarmupRejected,
|
|
171
|
+
run: async (message) => {
|
|
172
|
+
const { runCacheWarmup } = await import("./warmup-CxhEhm71.js").then((n) => n.s);
|
|
173
|
+
await runCacheWarmup(message);
|
|
174
|
+
},
|
|
175
|
+
skip: () => !getChatConfig().cacheWarmingEnabled,
|
|
176
|
+
topic: CACHE_WARMUP_QUEUE_TOPIC,
|
|
177
|
+
verify: (value) => verifyQueueMessage(cacheWarmupSign, value)
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/** Create the HTTP route for cache warmup messages. */
|
|
181
|
+
function createVercelCacheWarmupCallback() {
|
|
182
|
+
return cacheWarmupCallback().create();
|
|
183
|
+
}
|
|
184
|
+
/** Return the queue consumer for cache warmups, for a pulling queue worker. */
|
|
185
|
+
function cacheWarmupQueueConsumer() {
|
|
186
|
+
return cacheWarmupCallback().consumer;
|
|
187
|
+
}
|
|
188
|
+
/** Receive cache warmup messages during local development. */
|
|
189
|
+
function registerVercelCacheWarmupDevConsumer() {
|
|
190
|
+
return cacheWarmupCallback().registerDev();
|
|
191
|
+
}
|
|
192
|
+
// src/chat/services/background-compaction-queue.ts
|
|
193
|
+
/**
|
|
194
|
+
* Messages of background compaction jobs.
|
|
195
|
+
*
|
|
196
|
+
* A message names one `compaction_requested` event. The event log holds the
|
|
197
|
+
* request, and the State adapter holds the request snapshot, so the message
|
|
198
|
+
* stays small.
|
|
199
|
+
*/
|
|
200
|
+
/** Deploy topic name. Keep stable for Vercel queue wiring. */
|
|
201
|
+
const BACKGROUND_COMPACTION_QUEUE_TOPIC = "junior_context_compaction";
|
|
202
|
+
const backgroundCompactionSign = {
|
|
203
|
+
context: "junior.context_compaction_queue.v1",
|
|
204
|
+
schema: z.object({
|
|
205
|
+
conversationId: z.string().min(1),
|
|
206
|
+
historyVersion: z.number().int().nonnegative(),
|
|
207
|
+
markSeq: z.number().int().nonnegative()
|
|
208
|
+
}).strict(),
|
|
209
|
+
signatureVersion: "v1",
|
|
210
|
+
parts: (message) => [
|
|
211
|
+
message.conversationId,
|
|
212
|
+
String(message.historyVersion),
|
|
213
|
+
String(message.markSeq)
|
|
214
|
+
]
|
|
215
|
+
};
|
|
216
|
+
/** Stable id of one request, for event, snapshot, and delivery dedupe. */
|
|
217
|
+
function backgroundCompactionId(message) {
|
|
218
|
+
return `context-compaction_${createHash("sha256").update(message.conversationId).update("\0").update(String(message.historyVersion)).update("\0").update(String(message.markSeq)).digest("hex").slice(0, 32)}`;
|
|
219
|
+
}
|
|
220
|
+
/** Check that a recent queue message came from Junior. */
|
|
221
|
+
function verifyBackgroundCompactionMessage(value) {
|
|
222
|
+
return verifyQueueMessage(backgroundCompactionSign, value);
|
|
223
|
+
}
|
|
224
|
+
/** The production queue for background compaction jobs. */
|
|
225
|
+
const vercelBackgroundCompactionQueue = { send: async (message) => {
|
|
226
|
+
await getQueueProvider().send(BACKGROUND_COMPACTION_QUEUE_TOPIC, signQueueMessage(backgroundCompactionSign, message), {
|
|
227
|
+
idempotencyKey: backgroundCompactionId(message),
|
|
228
|
+
retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
|
|
229
|
+
});
|
|
230
|
+
} };
|
|
231
|
+
export { ConversationQueueMessageRejectedError as _, CACHE_WARMUP_QUEUE_TOPIC as a, nudgeIdempotencyKey as b, registerVercelCacheWarmupDevConsumer as c, sendNextWorkspaceSnapshotJob as d, sendWorkspaceSnapshotJob as f, verifyConversationQueueMessage as g, resolveConversationWorkQueueTopic as h, verifyBackgroundCompactionMessage as i, sendCacheWarmup as l, getVercelConversationWorkQueue as m, backgroundCompactionId as n, cacheWarmupQueueConsumer as o, verifyWorkspaceSnapshotJobMessage as p, vercelBackgroundCompactionQueue as r, createVercelCacheWarmupCallback as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as u, conversationQueueMessageSchema as v, isConversationQueueMessageRejectedError as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { F as briefResourceLabel, L as parseBriefInput, M as briefCodeChangeSchema, f as conversationEventPageSchema, u as conversationDetailReportSchema } from "./conversation--f85g4zL.js";
|
|
2
|
+
import { c as generateBrief, n as briefEntriesFromReportEvents, t as BRIEF_PROMPT, u as completeObject } from "./prompt-D8u4jFs_.js";
|
|
3
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import path from "node:path";
|
|
@@ -264,7 +264,7 @@ async function parseRunOptions(argv) {
|
|
|
264
264
|
* token.
|
|
265
265
|
*/
|
|
266
266
|
async function configuredBot() {
|
|
267
|
-
const { botConfig } = await import("./config-
|
|
267
|
+
const { botConfig } = await import("./config-362yMSIz.js").then((n) => n.r);
|
|
268
268
|
return botConfig;
|
|
269
269
|
}
|
|
270
270
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-D20hG3r6.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
package/dist/cli/chat.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorPluginSet } from "../plugins-
|
|
1
|
+
import { n as JuniorPluginSet } from "../plugins-fBrz8PCV.js";
|
|
2
2
|
export declare const CHAT_USAGE = "usage: junior chat\n junior chat -p <message>";
|
|
3
3
|
export type ChatCommandOptions = {
|
|
4
4
|
mode: "interactive";
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
2
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
2
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-DdFcxAxG.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { stderr, stdin, stdout } from "node:process";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-Bkk0XRo2.js").then((n) => n.o),
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../db-
|
|
102
|
+
import("../projection-xPpvqexa.js").then((n) => n.Cn),
|
|
103
|
+
import("../catalog-runtime-OXrv2Ewn.js").then((n) => n.t),
|
|
104
|
+
import("../validation-fl21ps-k.js").then((n) => n.r),
|
|
105
|
+
import("../db-Bcbd9zQc.js").then((n) => n.n)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,19 +152,20 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../projection-
|
|
155
|
+
const { setBriefsConfig, setEventEmbeddingsConfig } = await import("../projection-xPpvqexa.js").then((n) => n.Bn);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
|
|
158
|
-
const {
|
|
159
|
-
const {
|
|
160
|
-
const {
|
|
161
|
-
const {
|
|
162
|
-
const {
|
|
163
|
-
const {
|
|
164
|
-
const {
|
|
165
|
-
const {
|
|
157
|
+
setEventEmbeddingsConfig({ enabled: true });
|
|
158
|
+
const { runLocalAgentTurn } = await import("../runner-DQR9vYce.js");
|
|
159
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BUuNvfvu.js");
|
|
160
|
+
const { createLocalOAuthState } = await import("../oauth-relay-DGAZzg9m.js").then((n) => n.t);
|
|
161
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DFlNUOnK.js");
|
|
162
|
+
const { bindSpawnAgent } = await import("../spawn-mwimEY9_.js").then((n) => n.n);
|
|
163
|
+
const { bindMessageAgent } = await import("../message-B8vCbZZB.js").then((n) => n.n);
|
|
164
|
+
const { createChildConversationWorker, createDeliverToParent } = await import("../result-DddO63S9.js").then((n) => n.o);
|
|
165
|
+
const { createConversationTurnWorker } = await import("../conversation-turn-DU0_WDAr.js").then((n) => n.t);
|
|
166
|
+
const { skipInputAfterConversationStop } = await import("../session-stop-BDdwyZaa.js").then((n) => n.a);
|
|
166
167
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
167
|
-
const { processConversationWork } = await import("../worker-
|
|
168
|
+
const { processConversationWork } = await import("../worker-Btb1SB5h.js").then((n) => n.n);
|
|
168
169
|
let agentRunner;
|
|
169
170
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
170
171
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { i as parseSkillFile } from "../skills-
|
|
2
|
-
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
3
|
-
import {
|
|
1
|
+
import { i as parseSkillFile } from "../skills-63i1Bcv1.js";
|
|
2
|
+
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-CHCuQ5iz.js";
|
|
3
|
+
import { b as parsePluginManifest, y as parseInlinePluginManifest } from "../registry-D20hG3r6.js";
|
|
4
|
+
import pLimit from "p-limit";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import fs from "node:fs/promises";
|
|
6
7
|
import { pathToFileURL } from "node:url";
|
|
@@ -94,12 +95,16 @@ async function collectPackageWarnings(rootDir, packages) {
|
|
|
94
95
|
const packageSpecByName = new Map(packages.map((declaredPackage) => [declaredPackage.name, declaredPackage.spec]));
|
|
95
96
|
const coreVersion = comparableVersion(await readInstalledPackageVersion(rootDir, "@sentry/junior") ?? packageSpecByName.get("@sentry/junior"));
|
|
96
97
|
if (!coreVersion) return warnings;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (!await packageHasPluginContent(rootDir, declaredPackage.name))
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
const limit = pLimit(8);
|
|
99
|
+
const pluginVersions = await Promise.all(packages.filter((declaredPackage) => declaredPackage.name.startsWith("@sentry/junior-")).map((declaredPackage) => limit(async () => {
|
|
100
|
+
if (!await packageHasPluginContent(rootDir, declaredPackage.name)) return;
|
|
101
|
+
const version = comparableVersion(await readInstalledPackageVersion(rootDir, declaredPackage.name) ?? declaredPackage.spec);
|
|
102
|
+
return {
|
|
103
|
+
name: declaredPackage.name,
|
|
104
|
+
version
|
|
105
|
+
};
|
|
106
|
+
})));
|
|
107
|
+
for (const plugin of pluginVersions) if (plugin?.version && plugin.version !== coreVersion) warnings.push(`${path.join(rootDir, "package.json")}: ${plugin.name} version ${plugin.version} does not match @sentry/junior version ${coreVersion}`);
|
|
103
108
|
return warnings;
|
|
104
109
|
}
|
|
105
110
|
async function validateSkillDirectory(skillDir, duplicateNames) {
|
|
@@ -210,25 +215,33 @@ function isPluginRegistrationLike(value) {
|
|
|
210
215
|
return isRecord(value) && isRecord(value["manifest"]);
|
|
211
216
|
}
|
|
212
217
|
async function collectPackageJsPluginSources(packageDir, packageName) {
|
|
218
|
+
if (packageName === "@sentry/junior") return [];
|
|
213
219
|
const entryPath = await resolvePackageEntryPath(packageDir);
|
|
214
220
|
if (!entryPath) return [];
|
|
221
|
+
const errorSource = (manifestPath, error) => ({
|
|
222
|
+
pluginDir: packageDir,
|
|
223
|
+
packageName,
|
|
224
|
+
manifestPath,
|
|
225
|
+
errors: [`${manifestPath}: ${error instanceof Error ? error.message : String(error)}`]
|
|
226
|
+
});
|
|
215
227
|
let moduleExports;
|
|
216
228
|
try {
|
|
217
229
|
moduleExports = await import(pathToFileURL(entryPath).href);
|
|
218
|
-
} catch {
|
|
219
|
-
return [];
|
|
230
|
+
} catch (error) {
|
|
231
|
+
return [errorSource(entryPath, error)];
|
|
220
232
|
}
|
|
221
233
|
const pluginSources = [];
|
|
222
234
|
for (const [exportName, exportedValue] of Object.entries(moduleExports).sort(([left], [right]) => left.localeCompare(right))) {
|
|
223
235
|
if (!isPluginFactoryExport(exportName, exportedValue)) continue;
|
|
236
|
+
const manifestPath = `${entryPath}#${exportName}`;
|
|
224
237
|
let registration;
|
|
225
238
|
try {
|
|
226
239
|
registration = await exportedValue();
|
|
227
|
-
} catch {
|
|
240
|
+
} catch (error) {
|
|
241
|
+
pluginSources.push(errorSource(manifestPath, error));
|
|
228
242
|
continue;
|
|
229
243
|
}
|
|
230
244
|
if (!isPluginRegistrationLike(registration)) continue;
|
|
231
|
-
const manifestPath = `${entryPath}#${exportName}`;
|
|
232
245
|
try {
|
|
233
246
|
pluginSources.push({
|
|
234
247
|
pluginDir: packageDir,
|
|
@@ -237,12 +250,7 @@ async function collectPackageJsPluginSources(packageDir, packageName) {
|
|
|
237
250
|
manifest: parseInlinePluginManifest(registration.manifest, packageDir)
|
|
238
251
|
});
|
|
239
252
|
} catch (error) {
|
|
240
|
-
pluginSources.push(
|
|
241
|
-
pluginDir: packageDir,
|
|
242
|
-
packageName,
|
|
243
|
-
manifestPath,
|
|
244
|
-
errors: [`${manifestPath}: ${error instanceof Error ? error.message : String(error)}`]
|
|
245
|
-
});
|
|
253
|
+
pluginSources.push(errorSource(manifestPath, error));
|
|
246
254
|
}
|
|
247
255
|
}
|
|
248
256
|
return pluginSources;
|
|
@@ -255,30 +263,30 @@ async function collectPluginDirectories(rootDir) {
|
|
|
255
263
|
} catch {
|
|
256
264
|
return pluginDirs;
|
|
257
265
|
}
|
|
258
|
-
|
|
259
|
-
|
|
266
|
+
const limit = pLimit(8);
|
|
267
|
+
await Promise.all(entries.filter((entry) => entry.isDirectory()).map((entry) => limit(async () => {
|
|
260
268
|
const pluginDir = path.join(contentRoot(rootDir, "plugins"), entry.name);
|
|
261
269
|
if (await pathIsFile(path.join(pluginDir, "plugin.yaml"))) pluginDirs.push(pluginDir);
|
|
262
|
-
}
|
|
270
|
+
})));
|
|
263
271
|
return pluginDirs.sort((left, right) => left.localeCompare(right));
|
|
264
272
|
}
|
|
265
273
|
async function collectPackagedContent(rootDir, packages) {
|
|
266
274
|
const pluginSources = [];
|
|
267
275
|
const skillRoots = [];
|
|
268
|
-
|
|
276
|
+
const limit = pLimit(8);
|
|
277
|
+
await Promise.all(packages.map(async (declaredPackage) => {
|
|
269
278
|
const packageDir = packageInstallDir(rootDir, declaredPackage.name);
|
|
270
|
-
if (!await pathIsDirectory(packageDir))
|
|
279
|
+
if (!await limit(() => pathIsDirectory(packageDir))) return;
|
|
271
280
|
const rootManifestPath = path.join(packageDir, "plugin.yaml");
|
|
272
|
-
const hasRootManifest = await pathIsFile(rootManifestPath);
|
|
273
281
|
const packageSkillsRoot = path.join(packageDir, "skills");
|
|
274
|
-
const hasPackageSkills = await pathIsDirectory(packageSkillsRoot);
|
|
282
|
+
const [hasRootManifest, hasPackageSkills] = await Promise.all([limit(() => pathIsFile(rootManifestPath)), limit(() => pathIsDirectory(packageSkillsRoot))]);
|
|
275
283
|
if (hasRootManifest) pluginSources.push({
|
|
276
284
|
pluginDir: packageDir,
|
|
277
285
|
manifestPath: rootManifestPath,
|
|
278
286
|
packageName: declaredPackage.name
|
|
279
287
|
});
|
|
280
288
|
else if (hasPackageSkills) {
|
|
281
|
-
const jsPluginSources = await collectPackageJsPluginSources(packageDir, declaredPackage.name);
|
|
289
|
+
const jsPluginSources = await limit(() => collectPackageJsPluginSources(packageDir, declaredPackage.name));
|
|
282
290
|
if (jsPluginSources.length > 0) pluginSources.push(...jsPluginSources);
|
|
283
291
|
else skillRoots.push({
|
|
284
292
|
root: packageSkillsRoot,
|
|
@@ -288,20 +296,20 @@ async function collectPackagedContent(rootDir, packages) {
|
|
|
288
296
|
const nestedPluginsRoot = path.join(packageDir, "plugins");
|
|
289
297
|
let nestedEntries;
|
|
290
298
|
try {
|
|
291
|
-
nestedEntries = await fs.readdir(nestedPluginsRoot, { withFileTypes: true });
|
|
299
|
+
nestedEntries = await limit(() => fs.readdir(nestedPluginsRoot, { withFileTypes: true }));
|
|
292
300
|
} catch {
|
|
293
|
-
|
|
301
|
+
return;
|
|
294
302
|
}
|
|
295
|
-
|
|
296
|
-
if (!entry.isDirectory()) continue;
|
|
303
|
+
await Promise.all(nestedEntries.filter((entry) => entry.isDirectory()).map(async (entry) => {
|
|
297
304
|
const pluginDir = path.join(nestedPluginsRoot, entry.name);
|
|
298
|
-
|
|
305
|
+
const manifestPath = path.join(pluginDir, "plugin.yaml");
|
|
306
|
+
if (await limit(() => pathIsFile(manifestPath))) pluginSources.push({
|
|
299
307
|
pluginDir,
|
|
300
|
-
manifestPath
|
|
308
|
+
manifestPath,
|
|
301
309
|
packageName: declaredPackage.name
|
|
302
310
|
});
|
|
303
|
-
}
|
|
304
|
-
}
|
|
311
|
+
}));
|
|
312
|
+
}));
|
|
305
313
|
return {
|
|
306
314
|
pluginSources: pluginSources.sort((left, right) => `${left.packageName}:${left.pluginDir}`.localeCompare(`${right.packageName}:${right.pluginDir}`)),
|
|
307
315
|
skillRoots: skillRoots.sort((left, right) => `${left.packageName}:${left.root}`.localeCompare(`${right.packageName}:${right.root}`))
|
|
@@ -434,18 +442,24 @@ async function validateDeploymentConfig(rootDir, packages) {
|
|
|
434
442
|
async function validateAppSourceFiles(rootDir, registeredConfigKeys) {
|
|
435
443
|
const errors = [];
|
|
436
444
|
const warnings = [];
|
|
437
|
-
|
|
445
|
+
const sources = await Promise.all([
|
|
438
446
|
"server.ts",
|
|
439
447
|
"server.js",
|
|
440
448
|
"nitro.config.ts"
|
|
441
|
-
]) {
|
|
449
|
+
].map(async (fileName) => {
|
|
442
450
|
const sourcePath = path.join(rootDir, fileName);
|
|
443
|
-
let source;
|
|
444
451
|
try {
|
|
445
|
-
|
|
452
|
+
return {
|
|
453
|
+
sourcePath,
|
|
454
|
+
source: await fs.readFile(sourcePath, "utf8")
|
|
455
|
+
};
|
|
446
456
|
} catch {
|
|
447
|
-
|
|
457
|
+
return;
|
|
448
458
|
}
|
|
459
|
+
}));
|
|
460
|
+
for (const file of sources) {
|
|
461
|
+
if (!file) continue;
|
|
462
|
+
const { source, sourcePath } = file;
|
|
449
463
|
if (/\bpluginPackages\s*:/.test(source)) errors.push(`${sourcePath}: pluginPackages is no longer supported. Export a defineJuniorPlugins(...) set and point juniorNitro({ plugins: "./plugins" }) at it.`);
|
|
450
464
|
if (/\bplugins\s*:\s*\{\s*packages\s*:/.test(source)) errors.push(`${sourcePath}: plugins.packages is no longer supported. Export a defineJuniorPlugins(...) set and point juniorNitro({ plugins: "./plugins" }) at it.`);
|
|
451
465
|
for (const defaultsBlock of source.matchAll(/\bconfigDefaults\s*:\s*\{([\s\S]*?)\}/g)) {
|
|
@@ -474,14 +488,12 @@ async function validateAppFiles(appDir) {
|
|
|
474
488
|
};
|
|
475
489
|
}
|
|
476
490
|
async function hasJuniorAppMarkers(appDir) {
|
|
477
|
-
|
|
491
|
+
return (await Promise.all([...[
|
|
478
492
|
"SOUL.md",
|
|
479
493
|
"WORLD.md",
|
|
480
494
|
"DESCRIPTION.md",
|
|
481
495
|
"ABOUT.md"
|
|
482
|
-
])
|
|
483
|
-
for (const dirName of ["skills", "plugins"]) if (await pathIsDirectory(path.join(appDir, dirName))) return true;
|
|
484
|
-
return false;
|
|
496
|
+
].map((fileName) => pathIsFile(path.join(appDir, fileName))), ...["skills", "plugins"].map((dirName) => pathIsDirectory(path.join(appDir, dirName)))])).includes(true);
|
|
485
497
|
}
|
|
486
498
|
async function runCheck(rootDir = process.cwd(), io = DEFAULT_IO) {
|
|
487
499
|
const resolvedRoot = path.resolve(rootDir);
|
|
@@ -496,10 +508,8 @@ async function runCheck(rootDir = process.cwd(), io = DEFAULT_IO) {
|
|
|
496
508
|
manifestPath: path.join(pluginDir, "plugin.yaml")
|
|
497
509
|
})), ...packagedPluginSources];
|
|
498
510
|
const appSkillDirs = await collectSkillDirectories(contentRoot(resolvedRoot, "skills"));
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
const packagedSkillDirsByPackage = /* @__PURE__ */ new Map();
|
|
502
|
-
for (const skillRoot of packagedContent.skillRoots) packagedSkillDirsByPackage.set(skillRoot.packageName, await collectSkillDirectories(skillRoot.root));
|
|
511
|
+
const limit = pLimit(8);
|
|
512
|
+
const [pluginSkillDirs, packagedSkillDirsByPackage] = await Promise.all([Promise.all(pluginSources.map(({ pluginDir }) => limit(async () => [pluginDir, await collectSkillDirectories(path.join(pluginDir, "skills"))]))).then((entries) => new Map(entries)), Promise.all(packagedContent.skillRoots.map((skillRoot) => limit(async () => [skillRoot.packageName, await collectSkillDirectories(skillRoot.root)]))).then((entries) => new Map(entries))]);
|
|
503
513
|
const packagedStandaloneSkillDirs = [...packagedSkillDirsByPackage.values()].flat();
|
|
504
514
|
const appAndLocalPluginSkillDirs = [...appSkillDirs, ...appPluginDirs.flatMap((pluginDir) => pluginSkillDirs.get(pluginDir) ?? [])].sort((left, right) => left.localeCompare(right));
|
|
505
515
|
const packagedSkillDirs = [...packagedPluginSources.flatMap(({ pluginDir }) => pluginSkillDirs.get(pluginDir) ?? []), ...packagedStandaloneSkillDirs].sort((left, right) => left.localeCompare(right));
|
package/dist/cli/main.js
CHANGED
|
@@ -45,13 +45,13 @@ async function runChat(argv, pluginSet) {
|
|
|
45
45
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
46
46
|
}
|
|
47
47
|
async function runAdmin(argv) {
|
|
48
|
-
return await (await import("../admin-
|
|
48
|
+
return await (await import("../admin-nCJXMgkp.js")).runAdmin(argv);
|
|
49
49
|
}
|
|
50
50
|
async function runServiceAccount(argv) {
|
|
51
|
-
return await (await import("../service-account-
|
|
51
|
+
return await (await import("../service-account-CNfycv0z.js")).runServiceAccount(argv);
|
|
52
52
|
}
|
|
53
53
|
async function runBriefs(argv) {
|
|
54
|
-
return await (await import("../briefs-
|
|
54
|
+
return await (await import("../briefs-Dl9lxi7J.js")).runBriefs(argv);
|
|
55
55
|
}
|
|
56
56
|
function topLevelCommand(argv) {
|
|
57
57
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorPluginSet } from "../plugins-
|
|
1
|
+
import { n as JuniorPluginSet } from "../plugins-fBrz8PCV.js";
|
|
2
2
|
import { PluginCliIo } from "@sentry/junior-plugin-api";
|
|
3
3
|
export type PluginCommandIo = PluginCliIo;
|
|
4
4
|
export interface CliPluginCommandDispatcher {
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as getDb } from "../db-
|
|
2
|
-
import {
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { o as getDb } from "../db-Bcbd9zQc.js";
|
|
2
|
+
import { Fn as setPlugins, In as validatePlugins, Ua as createPluginLogger } from "../projection-xPpvqexa.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-OXrv2Ewn.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-fl21ps-k.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
6
6
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-Bkk0XRo2.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { n as resolve } from "../resolve-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { i as getChatConfig } from "../config-362yMSIz.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-OXrv2Ewn.js";
|
|
3
|
+
import { n as resolve } from "../resolve-BhCySRCW.js";
|
|
4
|
+
import { Ki as create, wa as SANDBOX_RUNTIME } from "../projection-xPpvqexa.js";
|
|
5
|
+
import { Z as disconnectStateAdapter } from "../db-Bcbd9zQc.js";
|
|
6
6
|
// src/cli/snapshot-create.ts
|
|
7
7
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
|
8
8
|
function progressMessage(phase) {
|
package/dist/cli/upgrade.d.ts
CHANGED
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
1
|
+
import { i as getChatConfig } from "../config-362yMSIz.js";
|
|
2
|
+
import { n as isPostgresErrorCode, t as createJuniorSqlExecutor } from "../executor-DBMBrpNV.js";
|
|
3
3
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
4
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
4
|
+
import { t as createPluginCatalogRuntime } from "../registry-D20hG3r6.js";
|
|
5
5
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-Bkk0XRo2.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { readMigrationFiles } from "drizzle-orm/migrator";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
import { createJiti } from "jiti";
|
|
11
|
-
// src/db/postgres-error.ts
|
|
12
|
-
/** Return whether an unknown PostgreSQL failure has the requested SQLSTATE. */
|
|
13
|
-
function isPostgresErrorCode(error, code) {
|
|
14
|
-
return typeof error === "object" && error !== null && "code" in error && error.code === code;
|
|
15
|
-
}
|
|
16
11
|
// src/chat/conversations/sql/migrations.ts
|
|
17
12
|
/** SQL schema migrations for durable Junior records. */
|
|
18
13
|
const CORE_MIGRATION_BRIDGE_VERSION = "0.107.1";
|