@sentry/junior 0.272.0 → 0.274.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-BDYDi1F9.js → adapter-4qThDhgF.js} +1 -1
- package/dist/{admin-Dj7EFycG.js → admin-c7ASvs6x.js} +1 -1
- package/dist/{agent-runner-Cl6Usx2Y.js → agent-runner-CLHM48dh.js} +780 -396
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +5 -5
- package/dist/api.d.ts +1 -1
- package/dist/api.js +58 -575
- package/dist/{app-DjZblE2J.d.ts → app-BlmPpPoR.d.ts} +4 -9
- package/dist/app.d.ts +1 -1
- package/dist/app.js +673 -127
- package/dist/{assistant-reply-DN2w6JL_.js → assistant-reply-2IwdFWuQ.js} +1 -1
- package/dist/{automation-CV7g5h3A.js → automation-BGrd03QO.js} +1 -1
- package/dist/{briefs-PysAqnjV.js → briefs-C1-NOh8m.js} +4 -4
- package/dist/{catalog-runtime-BNeCWIaF.js → catalog-runtime-BnIJimKZ.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +1 -1
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-FRphcDWW.js → client-C0ZIxoDr.js} +63 -5
- package/dist/{reporting-schema-CZREhYc-.js → common-Eu6sx09c.js} +4 -1
- package/dist/{config-BUP9wjiR.js → config-DS-QLVSL.js} +6 -14
- package/dist/{connections-CesHau9u.js → connections-Djb6ANAh.js} +11 -11
- package/dist/{conversation-BtQzLoK8.js → conversation-BjTo9ZFL.js} +11 -1
- package/dist/{conversation-privacy-DiGvA9a3.js → conversation-privacy-3IMUZSHC.js} +1 -1
- package/dist/{credential-sync-D2odJC30.js → credential-sync-ig88EB_v.js} +15 -16
- package/dist/{db-BPLmOwXf.d.ts → db-BMZhoYKj.d.ts} +1 -1
- package/dist/{executor-DGDpyegI.js → executor-C2moGIHS.js} +2 -2
- package/dist/instrumentation.js +114 -3
- package/dist/{job-queue-CjB97sii.js → job-queue-Bh9sFO9t.js} +3 -3
- package/dist/{logging-CjkDr-jP.js → logging-DYRS7E8s.js} +14 -2
- package/dist/{media-U6Tuz6Mi.js → media-DstkkoNP.js} +21 -2
- package/dist/{message-D9y8PKA1.js → message-CicNrhCv.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-02Pej6hj.js → oauth-callback-server-BXyrepfY.js} +2 -2
- package/dist/{credentialed-CgTulRDH.js → projection-CMRrv9Pt.js} +4595 -51
- package/dist/{prompt-vfceH0c-.js → prompt-JEWUUpLW.js} +1 -1
- package/dist/{registry-7XgwNgQe.js → registry-D92WLl5I.js} +2 -2
- package/dist/{resolve-CuuxNfWG.js → resolve-C-Dh14ps.js} +3 -3
- package/dist/{result-BRhb6iN1.js → result-DZ8TCQkd.js} +9 -9
- package/dist/{runner-DaWCofuS.js → runner-BBmhrQTM.js} +11 -11
- package/dist/{sandbox-egress-signals-Bn6FA1UC.js → sandbox-egress-signals-Cehpq6hC.js} +1 -1
- package/dist/{schema-D5VLF4NT.js → schema-CX9XGKCm.js} +18 -9
- package/dist/{schema-CNjAzYOw.d.ts → schema-DfdHlBnb.d.ts} +22 -2
- package/dist/{service-account-H45LIAG2.js → service-account-Bapo6l0R.js} +3 -3
- package/dist/{service-account-D9vrsi8d.js → service-account-Ce1465Fn.js} +3 -3
- package/dist/{session-stop-HKl0ECX0.js → session-stop-CI5qJU7a.js} +11 -11
- package/dist/{skills-CsiKu3-g.js → skills-D-d79XQ6.js} +2 -2
- package/dist/{spawn-DqjBxqWh.js → spawn-C_FETz5x.js} +2 -2
- package/dist/{list-JZUP1yog.js → stop-CmwFHwiN.js} +1003 -436
- package/dist/{store-DyVKH0QB.js → store-BIQYXvoV.js} +4 -4
- package/dist/{store-CPF2kzbu.js → store-BvI3yBGS.js} +3 -3
- package/dist/{task-queue-BbQXCcNX.js → task-queue-BdB0pab8.js} +4 -4
- package/dist/{task-runner-ChzW5E7R.js → task-runner-DQr2QfvJ.js} +7 -7
- package/dist/{thread-state-Ds8JTsX6.js → thread-state-ngCvtWNa.js} +4 -5
- package/dist/{turn-failure-response-DCMvjsA0.js → turn-failure-response-BDT3sT2v.js} +7 -8
- package/dist/{turn-lifecycle-DM_77q33.js → turn-lifecycle-B7O6rZEX.js} +1 -1
- package/dist/turn-session-routing-DIeqG2pO.js +1625 -0
- package/dist/{validation-DcGelbBi.js → validation-D3Xik64v.js} +1 -1
- package/dist/{version-C48azPKq.js → version-BoWLhNzj.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BCRuO8Wg.js → viewer-D25XOUHc.js} +41 -20
- package/dist/{work-zxkmbJAp.js → work-D12-wcf4.js} +11 -39
- package/dist/{worker-CNNxHF1V.js → worker-DGxfDtES.js} +6 -6
- package/package.json +4 -4
- package/dist/turn-session-routing-BV_gX7n3.js +0 -6072
- package/dist/{oauth-relay-CTygMkNx.js → oauth-relay-C6ZAyJgf.js} +1 -1
package/dist/instrumentation.js
CHANGED
|
@@ -1,7 +1,117 @@
|
|
|
1
|
-
import { F as getDeploymentServiceVersion, I as getDeploymentTelemetryAttributes } from "./logging-
|
|
2
|
-
import { a as getClient, c as init, o as getGlobalScope } from "./sentry-MDkYAVPV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
1
|
+
import { F as getDeploymentServiceVersion, I as getDeploymentTelemetryAttributes } from "./logging-DYRS7E8s.js";
|
|
2
|
+
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON } from "./sentry-MDkYAVPV.js";
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-3IMUZSHC.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
|
+
import { performance } from "node:perf_hooks";
|
|
6
|
+
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
7
|
+
// src/chat/pi/gateway-request-timing.ts
|
|
8
|
+
const PHASE_ATTRIBUTES = [
|
|
9
|
+
"app.ai.http.queue_ms",
|
|
10
|
+
"app.ai.http.connection_reused",
|
|
11
|
+
"app.ai.http.connect_ms",
|
|
12
|
+
"app.ai.http.body_send_ms",
|
|
13
|
+
"app.ai.http.response_wait_ms",
|
|
14
|
+
"http.request.body.size"
|
|
15
|
+
];
|
|
16
|
+
function elapsedMs(fromMs, toMs) {
|
|
17
|
+
return Math.round(toMs - fromMs);
|
|
18
|
+
}
|
|
19
|
+
function connectKey(params) {
|
|
20
|
+
return `${String(params?.hostname)}:${String(params?.port)}`;
|
|
21
|
+
}
|
|
22
|
+
function gatewayChatSpan(request) {
|
|
23
|
+
const span = getActiveSpan();
|
|
24
|
+
if (!span || typeof request.origin !== "string") return;
|
|
25
|
+
const { attributes } = spanToJSON(span);
|
|
26
|
+
if (attributes["sentry.op"] !== "gen_ai.chat") return;
|
|
27
|
+
const host = URL.parse(request.origin)?.hostname;
|
|
28
|
+
return host && host === attributes["server.address"] ? span : void 0;
|
|
29
|
+
}
|
|
30
|
+
function createGatewayRequestTimingHandlers() {
|
|
31
|
+
const now = () => performance.now();
|
|
32
|
+
const requests = /* @__PURE__ */ new WeakMap();
|
|
33
|
+
const attempts = /* @__PURE__ */ new WeakMap();
|
|
34
|
+
const usedSockets = /* @__PURE__ */ new WeakSet();
|
|
35
|
+
const connectMsBySocket = /* @__PURE__ */ new WeakMap();
|
|
36
|
+
const pendingConnects = /* @__PURE__ */ new Map();
|
|
37
|
+
const takePendingConnect = (key) => {
|
|
38
|
+
const starts = pendingConnects.get(key);
|
|
39
|
+
pendingConnects.delete(key);
|
|
40
|
+
return starts?.length === 1 ? starts[0] : void 0;
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
"undici:request:create": (message) => {
|
|
44
|
+
const { request } = message;
|
|
45
|
+
const span = gatewayChatSpan(request);
|
|
46
|
+
if (!span) return;
|
|
47
|
+
const attempt = (attempts.get(span) ?? 0) + 1;
|
|
48
|
+
attempts.set(span, attempt);
|
|
49
|
+
requests.set(request, {
|
|
50
|
+
span,
|
|
51
|
+
createdAtMs: now()
|
|
52
|
+
});
|
|
53
|
+
if (attempt > 1) for (const key of PHASE_ATTRIBUTES) span.setAttribute(key, void 0);
|
|
54
|
+
span.setAttribute("app.ai.http.attempt_count", attempt);
|
|
55
|
+
if (typeof request.contentLength === "number") span.setAttribute("http.request.body.size", request.contentLength);
|
|
56
|
+
},
|
|
57
|
+
"undici:client:beforeConnect": (message) => {
|
|
58
|
+
const { connectParams } = message;
|
|
59
|
+
const key = connectKey(connectParams);
|
|
60
|
+
pendingConnects.set(key, [...pendingConnects.get(key) ?? [], now()]);
|
|
61
|
+
},
|
|
62
|
+
"undici:client:connected": (message) => {
|
|
63
|
+
const { connectParams, socket } = message;
|
|
64
|
+
const startedAtMs = takePendingConnect(connectKey(connectParams));
|
|
65
|
+
if (startedAtMs !== void 0) connectMsBySocket.set(socket, elapsedMs(startedAtMs, now()));
|
|
66
|
+
},
|
|
67
|
+
"undici:client:connectError": (message) => {
|
|
68
|
+
const { connectParams } = message;
|
|
69
|
+
takePendingConnect(connectKey(connectParams));
|
|
70
|
+
},
|
|
71
|
+
"undici:client:sendHeaders": (message) => {
|
|
72
|
+
const { request, socket } = message;
|
|
73
|
+
const timing = requests.get(request);
|
|
74
|
+
if (!timing) return;
|
|
75
|
+
timing.sendHeadersAtMs = now();
|
|
76
|
+
const reused = usedSockets.has(socket);
|
|
77
|
+
usedSockets.add(socket);
|
|
78
|
+
timing.span.setAttribute("app.ai.http.queue_ms", elapsedMs(timing.createdAtMs, timing.sendHeadersAtMs));
|
|
79
|
+
timing.span.setAttribute("app.ai.http.connection_reused", reused);
|
|
80
|
+
const connectMs = reused ? void 0 : connectMsBySocket.get(socket);
|
|
81
|
+
if (connectMs !== void 0) timing.span.setAttribute("app.ai.http.connect_ms", connectMs);
|
|
82
|
+
},
|
|
83
|
+
"undici:request:bodySent": (message) => {
|
|
84
|
+
const { request } = message;
|
|
85
|
+
const timing = requests.get(request);
|
|
86
|
+
if (!timing || timing.sendHeadersAtMs === void 0) return;
|
|
87
|
+
timing.bodySentAtMs = now();
|
|
88
|
+
timing.span.setAttribute("app.ai.http.body_send_ms", elapsedMs(timing.sendHeadersAtMs, timing.bodySentAtMs));
|
|
89
|
+
},
|
|
90
|
+
"undici:request:headers": (message) => {
|
|
91
|
+
const { request } = message;
|
|
92
|
+
const timing = requests.get(request);
|
|
93
|
+
if (!timing || timing.bodySentAtMs === void 0) return;
|
|
94
|
+
timing.span.setAttribute("app.ai.http.response_wait_ms", elapsedMs(timing.bodySentAtMs, now()));
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Subscribes to undici's diagnostics channels and writes the HTTP phases of
|
|
100
|
+
* AI Gateway model requests onto their `gen_ai.chat` span. Telemetry must not
|
|
101
|
+
* fail a request, so handler errors are dropped. Returns a function that
|
|
102
|
+
* removes the subscriptions.
|
|
103
|
+
*/
|
|
104
|
+
function subscribeGatewayRequestTiming() {
|
|
105
|
+
const handlers = Object.entries(createGatewayRequestTimingHandlers()).map(([name, handler]) => [name, (message) => {
|
|
106
|
+
try {
|
|
107
|
+
handler(message);
|
|
108
|
+
} catch {}
|
|
109
|
+
}]);
|
|
110
|
+
for (const [name, handler] of handlers) subscribe(name, handler);
|
|
111
|
+
return () => {
|
|
112
|
+
for (const [name, handler] of handlers) unsubscribe(name, handler);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
5
115
|
// src/chat/sentry-payload-filter.ts
|
|
6
116
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
7
117
|
"app.message.input",
|
|
@@ -178,5 +288,6 @@ function initSentry() {
|
|
|
178
288
|
integrations: (defaultIntegrations) => defaultIntegrations.filter((integration) => !MANUAL_GEN_AI_INTEGRATIONS.has(integration.name))
|
|
179
289
|
});
|
|
180
290
|
getGlobalScope().setAttributes(deploymentSpanAttributes);
|
|
291
|
+
subscribeGatewayRequestTiming();
|
|
181
292
|
}
|
|
182
293
|
export { initSentry };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, m as logInfo, p as logException } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-DS-QLVSL.js";
|
|
2
|
+
import { E as withSpan, m as logInfo, p as logException } from "./logging-DYRS7E8s.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
|
-
import { z } from "zod";
|
|
5
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
5
|
+
import { z } from "zod";
|
|
6
6
|
import { QueueClient, handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
7
7
|
/** Validate the v2 conversation work hint sent through Vercel Queue. */
|
|
8
8
|
const conversationQueueMessageSchema = z.object({
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-MDkYAVPV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-BoWLhNzj.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
|
+
import { randomUUID } from "node:crypto";
|
|
7
8
|
// src/chat/coerce.ts
|
|
8
9
|
/** Narrow an unknown value to a non-empty string, or undefined. */
|
|
9
10
|
function toOptionalString(value) {
|
|
@@ -84,6 +85,13 @@ function runWithLogContext(context, attributes, callback) {
|
|
|
84
85
|
...attributes
|
|
85
86
|
}, callback));
|
|
86
87
|
}
|
|
88
|
+
/** Run an operation with raw attributes, restoring its parent on completion. */
|
|
89
|
+
function runWithLogAttributes(attributes, callback) {
|
|
90
|
+
return logContextStorage.run({
|
|
91
|
+
...logContextStorage.getStore(),
|
|
92
|
+
...attributes
|
|
93
|
+
}, callback);
|
|
94
|
+
}
|
|
87
95
|
/** Merge context and attributes into the current scoped operation. */
|
|
88
96
|
function updateLogContext(context, attributes) {
|
|
89
97
|
const currentContext = typedLogContextStorage.getStore();
|
|
@@ -108,6 +116,7 @@ const JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE = "/api/internal/agent/continue";
|
|
|
108
116
|
const JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE = "/api/internal/plugin/tasks";
|
|
109
117
|
const JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE = "/api/internal/workspace/snapshots";
|
|
110
118
|
const LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION = "api/internal/agent/continue.ts";
|
|
119
|
+
const SERVICE_INSTANCE_ID = randomUUID();
|
|
111
120
|
function toOptionalTrimmed(value) {
|
|
112
121
|
const trimmed = value?.trim();
|
|
113
122
|
return trimmed ? trimmed : void 0;
|
|
@@ -124,7 +133,10 @@ function getDeploymentTelemetryAttributes() {
|
|
|
124
133
|
const attributes = {};
|
|
125
134
|
const serviceVersion = getDeploymentServiceVersion();
|
|
126
135
|
const deploymentId = toOptionalTrimmed(process.env.VERCEL_DEPLOYMENT_ID);
|
|
136
|
+
const region = toOptionalTrimmed(process.env.VERCEL_REGION);
|
|
127
137
|
attributes["app.junior.version"] = JUNIOR_VERSION;
|
|
138
|
+
attributes["service.instance.id"] = SERVICE_INSTANCE_ID;
|
|
139
|
+
if (region) attributes["cloud.region"] = region;
|
|
128
140
|
if (serviceVersion) attributes["service.version"] = serviceVersion;
|
|
129
141
|
if (deploymentId) attributes["deployment.id"] = deploymentId;
|
|
130
142
|
return attributes;
|
|
@@ -1232,4 +1244,4 @@ function extractGenAiUsageAttributes(...sources) {
|
|
|
1232
1244
|
...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
|
|
1233
1245
|
};
|
|
1234
1246
|
}
|
|
1235
|
-
export { JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as A,
|
|
1247
|
+
export { JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as A, normalizeIdentityEmail as B, summarizeMessageText as C, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as D, withSpan as E, getDeploymentServiceVersion as F, toOptionalNumber as H, getDeploymentTelemetryAttributes as I, runWithLogAttributes as L, JUNIOR_RETENTION_ROUTE as M, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as N, JUNIOR_HEARTBEAT_CRON_SCHEDULE as O, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as P, GOOGLE_IDENTITY_PROVIDER as R, setTags as S, withLogContext as T, toOptionalString as U, isRecord as V, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_RETENTION_CRON_SCHEDULE as j, JUNIOR_HEARTBEAT_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, isNativeIdentityProvider as z };
|
|
@@ -400,6 +400,21 @@ const subagentEndedEventDataSchema = z.object({
|
|
|
400
400
|
]),
|
|
401
401
|
errorCode: z.string().min(1).optional()
|
|
402
402
|
}).strict();
|
|
403
|
+
const compactionRequestedEventDataSchema = z.object({
|
|
404
|
+
type: z.literal("compaction_requested"),
|
|
405
|
+
markSeq: z.number().int().nonnegative(),
|
|
406
|
+
historyVersion: z.number().int().nonnegative(),
|
|
407
|
+
modelProfile: modelProfileSchema,
|
|
408
|
+
modelId: z.string().min(1)
|
|
409
|
+
}).strict();
|
|
410
|
+
const compactionPreparedFields = compactionRequestedEventDataSchema.extend({ type: z.literal("compaction_prepared") });
|
|
411
|
+
const compactionPreparedEventDataSchema = z.discriminatedUnion("outcome", [compactionPreparedFields.extend({
|
|
412
|
+
outcome: z.literal("ready"),
|
|
413
|
+
summary: z.string().min(1)
|
|
414
|
+
}), compactionPreparedFields.extend({
|
|
415
|
+
outcome: z.literal("failed"),
|
|
416
|
+
errorType: z.string().min(1).max(64)
|
|
417
|
+
})]);
|
|
403
418
|
/** Prevent ordinary appends from bypassing history-replacement validation. */
|
|
404
419
|
const appendableConversationEventDataSchema = z.union([
|
|
405
420
|
messageEventDataSchema,
|
|
@@ -420,7 +435,9 @@ const appendableConversationEventDataSchema = z.union([
|
|
|
420
435
|
turnCompletedEventDataSchema,
|
|
421
436
|
turnFailedEventDataSchema,
|
|
422
437
|
subagentStartedEventDataSchema,
|
|
423
|
-
subagentEndedEventDataSchema
|
|
438
|
+
subagentEndedEventDataSchema,
|
|
439
|
+
compactionRequestedEventDataSchema,
|
|
440
|
+
compactionPreparedEventDataSchema
|
|
424
441
|
]);
|
|
425
442
|
/** Strict event-data contract reused by the SQL row codec. */
|
|
426
443
|
const conversationEventDataSchema = z.union([
|
|
@@ -453,7 +470,9 @@ const KNOWN_CONVERSATION_EVENT_TYPES = [
|
|
|
453
470
|
"subagent_started",
|
|
454
471
|
"subagent_ended",
|
|
455
472
|
"handoff",
|
|
456
|
-
"compaction"
|
|
473
|
+
"compaction",
|
|
474
|
+
"compaction_requested",
|
|
475
|
+
"compaction_prepared"
|
|
457
476
|
];
|
|
458
477
|
const knownConversationEventTypeSchema = z.enum(KNOWN_CONVERSATION_EVENT_TYPES);
|
|
459
478
|
const unknownConversationEventDataSchema = z.object({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { A as AgentMessagePausedError, I as PARENT_AGENT_TARGET, M as AgentMessageTargetError, P as findChildAgentConversationId, i as createAgentInvocationForMessage, o as getActiveAgentInvocationForConversation } from "./store-
|
|
7
|
-
import { T as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, k as admitAutomatedTurn } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentMessageToParent } from "./result-
|
|
10
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { wa as readConversationAccessFromSql } from "./projection-CMRrv9Pt.js";
|
|
3
|
+
import { n as botConfig } from "./config-DS-QLVSL.js";
|
|
4
|
+
import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-D25XOUHc.js";
|
|
5
|
+
import { Nt as actorFromRun, Pt as toolInvocationDestination } from "./agent-runner-CLHM48dh.js";
|
|
6
|
+
import { A as AgentMessagePausedError, I as PARENT_AGENT_TARGET, M as AgentMessageTargetError, P as findChildAgentConversationId, i as createAgentInvocationForMessage, o as getActiveAgentInvocationForConversation } from "./store-BIQYXvoV.js";
|
|
7
|
+
import { T as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, k as admitAutomatedTurn } from "./session-stop-CI5qJU7a.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-BvI3yBGS.js";
|
|
9
|
+
import { r as enqueueAgentMessageToParent } from "./result-DZ8TCQkd.js";
|
|
10
|
+
import { r as enqueueAgentInvocation } from "./work-D12-wcf4.js";
|
|
11
11
|
// src/chat/agent-invocations/top-level-message.ts
|
|
12
12
|
const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
|
|
13
13
|
/** Event type of a message from another top-level agent. */
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-BlmPpPoR.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, F as getDeploymentServiceVersion, M as JUNIOR_RETENTION_ROUTE, N as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_CRON_SCHEDULE, j as JUNIOR_RETENTION_CRON_SCHEDULE, k as JUNIOR_HEARTBEAT_ROUTE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, F as getDeploymentServiceVersion, M as JUNIOR_RETENTION_ROUTE, N as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_CRON_SCHEDULE, j as JUNIOR_RETENTION_CRON_SCHEDULE, k as JUNIOR_HEARTBEAT_ROUTE } from "./logging-DYRS7E8s.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-Bh9sFO9t.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BdB0pab8.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Sn as createUserTokenStore } from "./projection-CMRrv9Pt.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-ig88EB_v.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|