@sentry/junior 0.184.0 → 0.186.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-hooks-XTZVALGQ.js → agent-hooks-4B3Z4WRK.js} +13 -11
- package/dist/api/acp/schema.d.ts +20 -2
- package/dist/api/code/overview.d.ts +39 -0
- package/dist/api/locations/detail.d.ts +1 -1
- package/dist/api/people/code.d.ts +22 -0
- package/dist/api/schema/code.d.ts +46 -0
- package/dist/api/schema/conversation.d.ts +108 -20
- package/dist/api/schema/location.d.ts +1 -1
- package/dist/api/schema/person.d.ts +1 -1
- package/dist/api/schema.d.ts +4 -4
- package/dist/api/schema.js +12 -1
- package/dist/api.js +368 -78
- package/dist/app.js +1412 -538
- package/dist/{catalog-runtime-5357XR4F.js → catalog-runtime-AFJCAOHC.js} +4 -4
- package/dist/chat/api-turns/accepted-reply.d.ts +11 -0
- package/dist/chat/api-turns/cancellation.d.ts +3 -5
- package/dist/chat/api-turns/mailbox-input.d.ts +7 -0
- package/dist/chat/api-turns/routing.d.ts +18 -3
- package/dist/chat/api-turns/work.d.ts +4 -9
- package/dist/chat/app/conversation-work.d.ts +1 -1
- package/dist/chat/app/factory.d.ts +4 -0
- package/dist/chat/app/services.d.ts +4 -3
- package/dist/chat/conversations/history.d.ts +83 -9
- package/dist/chat/conversations/turn-lifecycle.d.ts +6 -3
- package/dist/chat/providers/slack/input.d.ts +32 -0
- package/dist/chat/{runtime → providers/slack}/processing-reaction.d.ts +6 -8
- package/dist/chat/{runtime/slack-resume.d.ts → providers/slack/resume.d.ts} +16 -19
- package/dist/chat/providers/slack/runtime.d.ts +1 -12
- package/dist/chat/providers/slack/turn.d.ts +10 -25
- package/dist/chat/resource-events/actor.d.ts +7 -2
- package/dist/chat/resource-events/app-publisher.d.ts +18 -0
- package/dist/chat/resource-events/catalog.d.ts +19 -0
- package/dist/chat/resource-events/ingest.d.ts +0 -1
- package/dist/chat/resource-events/notification.d.ts +28 -3
- package/dist/chat/resource-events/runtime-catalog.d.ts +7 -2
- package/dist/chat/resource-events/store.d.ts +2 -14
- package/dist/chat/resource-events/tool-support.d.ts +0 -5
- package/dist/chat/resource-events/workspace.d.ts +7 -3
- package/dist/chat/runtime/turn-execution.d.ts +7 -2
- package/dist/chat/sandbox/egress/credentials.d.ts +5 -4
- package/dist/chat/sandbox/egress/session.d.ts +10 -11
- package/dist/chat/sandbox/errors.d.ts +1 -1
- package/dist/chat/sandbox/ref.d.ts +1 -1
- package/dist/chat/sandbox/snapshot/events.d.ts +8 -1
- package/dist/chat/sandbox/snapshot/not-ready-error.d.ts +6 -1
- package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
- package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
- package/dist/chat/scheduled-tasks/types.d.ts +1 -1
- package/dist/chat/sentry-links.d.ts +2 -0
- package/dist/chat/services/provider-retry.d.ts +2 -0
- package/dist/chat/services/turn-failure-response.d.ts +4 -0
- package/dist/chat/services/turn-session-routing.d.ts +20 -5
- package/dist/chat/task-execution/paused-turn.d.ts +0 -2
- package/dist/chat/task-execution/slack-resource-event.d.ts +47 -0
- package/dist/chat/task-execution/slack-work.d.ts +0 -21
- package/dist/chat/task-execution/state.d.ts +2 -2
- package/dist/chat/task-execution/store.d.ts +1 -1
- package/dist/chat/task-execution/turn-wake.d.ts +12 -0
- package/dist/chat/tool-support/action-review.d.ts +1 -1
- package/dist/chat/tools/event-tasks.d.ts +1 -1
- package/dist/chat/tools/resource-events.d.ts +2 -2
- package/dist/chat/tools/search-conversation-events.d.ts +1 -1
- package/dist/chat/tools/types.d.ts +1 -1
- package/dist/chat/tools/watch-resource-events.d.ts +2 -2
- package/dist/{chunk-Z3QAXJR7.js → chunk-2IBDVE62.js} +12 -9
- package/dist/{chunk-4RONS3WR.js → chunk-2U7EPTRZ.js} +11 -5
- package/dist/{chunk-3S7ULUWW.js → chunk-3CVEE6LA.js} +1 -1
- package/dist/{chunk-IZDYYYGP.js → chunk-43LODHJM.js} +24 -384
- package/dist/{chunk-LHXIZLFF.js → chunk-64WF2GQ3.js} +1 -1
- package/dist/{chunk-YKX6MTLU.js → chunk-7EOWT62G.js} +1 -1
- package/dist/{chunk-UBOIHNTH.js → chunk-7EU4YSZ4.js} +362 -188
- package/dist/{chunk-UF6BUA5W.js → chunk-ACGWTJ74.js} +3 -3
- package/dist/{chunk-6UDPINOX.js → chunk-AD64YMEC.js} +19 -44
- package/dist/{chunk-MLSQX2EX.js → chunk-BRKB5R7P.js} +1 -1
- package/dist/{chunk-E57WPXWY.js → chunk-CM6RTYSO.js} +5 -5
- package/dist/{chunk-MAPJFUMV.js → chunk-CV5CPRVG.js} +3 -3
- package/dist/chunk-D4YV5TDV.js +45 -0
- package/dist/{chunk-HIPUIPJM.js → chunk-DHYZ4VKG.js} +383 -254
- package/dist/{chunk-DUKIDPF6.js → chunk-DOP3FIQC.js} +1 -1
- package/dist/{chunk-BT53RIGJ.js → chunk-EWRPUXE3.js} +12 -50
- package/dist/{chunk-BHYRYYLY.js → chunk-FFYDRLXW.js} +1 -1
- package/dist/chunk-GFBR4S3Q.js +406 -0
- package/dist/chunk-GQMQCY7H.js +58 -0
- package/dist/{chunk-JNO2GUDS.js → chunk-GSB3NTNS.js} +926 -1856
- package/dist/{chunk-2ZQPVX7C.js → chunk-H7X2G2KS.js} +25 -12
- package/dist/{chunk-WQFEWULF.js → chunk-HKFLRIBD.js} +2 -2
- package/dist/{chunk-SHJK75Z2.js → chunk-HWXP6RHG.js} +38 -4
- package/dist/{chunk-RF6J3DIO.js → chunk-INQHUE72.js} +84 -1
- package/dist/{chunk-4CNDGK25.js → chunk-JFPY6XFF.js} +911 -993
- package/dist/{chunk-6WGC3SO4.js → chunk-MCLWOBPN.js} +80 -18
- package/dist/{chunk-PJPRXO2T.js → chunk-NRMAOGRS.js} +1 -1
- package/dist/{chunk-ACPDVEJO.js → chunk-O6GQO7VP.js} +201 -218
- package/dist/{chunk-M5YWNMTE.js → chunk-OZG7E22Y.js} +24 -6
- package/dist/{chunk-WVIA7V3M.js → chunk-PFAZSRGR.js} +29 -1
- package/dist/{chunk-LCP4EDKR.js → chunk-PZZOGHVR.js} +14 -4
- package/dist/{chunk-QABCY33S.js → chunk-QBL2AVFF.js} +2 -2
- package/dist/{chunk-FKEZZMXS.js → chunk-QU3URVWG.js} +9 -94
- package/dist/{chunk-M3QYTBQ6.js → chunk-STOCCPWH.js} +11 -2
- package/dist/{chunk-K7VDC2QW.js → chunk-TXLBLGNQ.js} +6 -6
- package/dist/{chunk-JA43DV4Y.js → chunk-VOGOTEW7.js} +1 -1
- package/dist/{chunk-HUXFMDBZ.js → chunk-VQIWBJOP.js} +1 -1
- package/dist/{chunk-JM2COLGC.js → chunk-VQZYIVYN.js} +6 -6
- package/dist/{chunk-BCHYQS4B.js → chunk-VXL2LBPK.js} +1 -1
- package/dist/{chunk-6VOYP4M6.js → chunk-YXSBZRP7.js} +1 -1
- package/dist/cli/chat.js +35 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +14 -12
- package/dist/cli/snapshot-create.js +10 -9
- package/dist/cli/upgrade.js +7 -6
- package/dist/{db-MA52H62H.js → db-7XL4UPAE.js} +8 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +7 -6
- package/dist/{oauth-callback-server-DXGHKN6S.js → oauth-callback-server-RAOYHWDI.js} +30 -27
- package/dist/{runner-4IXUAQNK.js → runner-KMPBWRPM.js} +24 -19
- package/dist/{skills-X3DY7AXO.js → skills-IPCALGLQ.js} +5 -5
- package/dist/spawn-OSOWTMBG.js +41 -0
- package/dist/task-runner-IQNBA3RY.js +34 -0
- package/dist/{validation-Z6JXSTJS.js → validation-BSRCCX6N.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-OKWRFBDW.js → work-T6UFTOJY.js} +24 -19
- package/dist/worker-L35OG7VA.js +24 -0
- package/package.json +5 -5
- package/dist/spawn-43WGS6CH.js +0 -37
- package/dist/task-runner-VDRKITPV.js +0 -32
- package/dist/worker-B236AE72.js +0 -22
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CM6RTYSO.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginTaskId,
|
|
7
7
|
pluginTaskParamsSchema,
|
|
8
8
|
sendVercelPluginTask
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ACGWTJ74.js";
|
|
10
10
|
import {
|
|
11
11
|
getPiMessageRole,
|
|
12
12
|
getTurnRecord,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isToolResultMessage,
|
|
17
17
|
normalizeToolNameFromResult,
|
|
18
18
|
stripRuntimeTurnContext
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-H7X2G2KS.js";
|
|
20
20
|
import {
|
|
21
21
|
createPluginConversationEvents,
|
|
22
22
|
createPluginEmbedder,
|
|
@@ -25,22 +25,24 @@ import {
|
|
|
25
25
|
createPluginState,
|
|
26
26
|
getPlugins,
|
|
27
27
|
readActorIdentity
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JFPY6XFF.js";
|
|
29
29
|
import {
|
|
30
30
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
31
31
|
} from "./chunk-3Y47VMHV.js";
|
|
32
32
|
import {
|
|
33
33
|
getConversationStore,
|
|
34
|
-
getDb
|
|
35
|
-
|
|
36
|
-
} from "./chunk-IZDYYYGP.js";
|
|
34
|
+
getDb
|
|
35
|
+
} from "./chunk-43LODHJM.js";
|
|
37
36
|
import {
|
|
38
37
|
juniorConversations,
|
|
39
38
|
juniorTaskExecutions
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VXL2LBPK.js";
|
|
41
40
|
import {
|
|
42
41
|
getStateAdapter
|
|
43
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-DOP3FIQC.js";
|
|
43
|
+
import {
|
|
44
|
+
sameActorIdentity
|
|
45
|
+
} from "./chunk-GFBR4S3Q.js";
|
|
44
46
|
import {
|
|
45
47
|
credentialSubjectSchema
|
|
46
48
|
} from "./chunk-CEMMLV5L.js";
|
|
@@ -49,26 +51,85 @@ import {
|
|
|
49
51
|
} from "./chunk-N7TMSOZH.js";
|
|
50
52
|
import {
|
|
51
53
|
logWarn
|
|
52
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-3CVEE6LA.js";
|
|
53
55
|
|
|
54
56
|
// src/chat/plugins/task-runner.ts
|
|
55
57
|
import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
|
|
56
58
|
|
|
57
59
|
// src/chat/services/turn-session-routing.ts
|
|
60
|
+
async function loadConversationChain(conversationId, conversationStore) {
|
|
61
|
+
const chain = [];
|
|
62
|
+
const seen = /* @__PURE__ */ new Set();
|
|
63
|
+
let cursor = conversationId;
|
|
64
|
+
while (cursor && !seen.has(cursor)) {
|
|
65
|
+
seen.add(cursor);
|
|
66
|
+
const conversation = await conversationStore.get({ conversationId: cursor });
|
|
67
|
+
if (!conversation) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
chain.push(conversation);
|
|
71
|
+
cursor = conversation.lineage?.parentConversationId;
|
|
72
|
+
}
|
|
73
|
+
return chain;
|
|
74
|
+
}
|
|
75
|
+
function slackSourceForDestination(args) {
|
|
76
|
+
if (args.source?.platform !== "slack" || args.source.channelId !== args.destination.channelId) {
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
79
|
+
const threadTs = args.source.threadTs?.trim();
|
|
80
|
+
return {
|
|
81
|
+
platform: "slack",
|
|
82
|
+
visibility: args.source.visibility ?? "public",
|
|
83
|
+
teamId: args.source.teamId?.trim() || args.destination.teamId,
|
|
84
|
+
channelId: args.source.channelId,
|
|
85
|
+
...threadTs ? { threadTs } : void 0
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
async function resolveConversationRouting(args) {
|
|
89
|
+
const conversationStore = args.conversationStore ?? (await import("./db-7XL4UPAE.js")).getConversationStore();
|
|
90
|
+
const chain = await loadConversationChain(
|
|
91
|
+
args.conversationId,
|
|
92
|
+
conversationStore
|
|
93
|
+
);
|
|
94
|
+
let destination;
|
|
95
|
+
let source;
|
|
96
|
+
let locationId;
|
|
97
|
+
for (const conversation of chain) {
|
|
98
|
+
destination ??= conversation.destination;
|
|
99
|
+
source ??= conversation.sessionSource;
|
|
100
|
+
locationId ??= conversation.location?.id;
|
|
101
|
+
if (destination && source) {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (!destination) {
|
|
106
|
+
return void 0;
|
|
107
|
+
}
|
|
108
|
+
if (destination.platform === "slack") {
|
|
109
|
+
const slackSource = slackSourceForDestination({ destination, source });
|
|
110
|
+
return {
|
|
111
|
+
destination,
|
|
112
|
+
...locationId ? { locationId } : void 0,
|
|
113
|
+
...slackSource ? { source: slackSource } : void 0
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
destination,
|
|
118
|
+
...locationId ? { locationId } : void 0,
|
|
119
|
+
...source ? { source } : void 0
|
|
120
|
+
};
|
|
121
|
+
}
|
|
58
122
|
async function resolveTurnSessionRouting(args) {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
conversationId: args.conversationId
|
|
62
|
-
});
|
|
63
|
-
if (!conversation?.destination || !conversation.sessionSource) {
|
|
123
|
+
const routing = await resolveConversationRouting(args);
|
|
124
|
+
if (!routing?.destination || !routing.source) {
|
|
64
125
|
throw new Error(
|
|
65
126
|
`Conversation ${args.conversationId} is missing durable routing metadata`
|
|
66
127
|
);
|
|
67
128
|
}
|
|
68
129
|
return {
|
|
69
|
-
destination:
|
|
70
|
-
|
|
71
|
-
|
|
130
|
+
destination: routing.destination,
|
|
131
|
+
source: routing.source,
|
|
132
|
+
...routing.locationId ? { locationId: routing.locationId } : void 0
|
|
72
133
|
};
|
|
73
134
|
}
|
|
74
135
|
|
|
@@ -1021,6 +1082,7 @@ export {
|
|
|
1021
1082
|
listPendingDispatchMailboxAppends,
|
|
1022
1083
|
claimDispatchMailboxAppend,
|
|
1023
1084
|
getPluginDispatchProjection,
|
|
1085
|
+
resolveConversationRouting,
|
|
1024
1086
|
resolveTurnSessionRouting,
|
|
1025
1087
|
scheduleSessionCompletedPluginTasks,
|
|
1026
1088
|
processPluginTask
|