@sentry/junior 0.192.0 → 0.194.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-3JY76L5X.js → agent-hooks-IDX764FD.js} +11 -11
- package/dist/api/conversations/aggregate.d.ts +2 -0
- package/dist/api/conversations/list.d.ts +1 -1
- package/dist/api/conversations/projection.d.ts +1 -1
- package/dist/api/locations/detail.d.ts +1 -1
- package/dist/api/schema/conversation.d.ts +3 -3
- package/dist/api/schema/location.d.ts +1 -1
- package/dist/api/schema/person.d.ts +1 -1
- package/dist/api/schema/task.d.ts +71 -8
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +3 -1
- package/dist/api.js +106 -187
- package/dist/app.js +55 -83
- package/dist/{catalog-runtime-5JVLWXRY.js → catalog-runtime-MICXEBLK.js} +4 -4
- package/dist/chat/agent/prompt.d.ts +1 -1
- package/dist/chat/agent/resume.d.ts +2 -0
- package/dist/chat/agent-dispatch/types.d.ts +2 -1
- package/dist/chat/agent-dispatch/validation.d.ts +1 -1
- package/dist/chat/agent-invocations/types.d.ts +24 -28
- package/dist/chat/config.d.ts +1 -0
- package/dist/chat/conversations/history.d.ts +4 -2
- package/dist/chat/event-tasks/tool-support.d.ts +10 -1
- package/dist/chat/plugins/agent-hooks.d.ts +2 -2
- package/dist/chat/prompt.d.ts +4 -5
- package/dist/chat/services/turn-limit.d.ts +11 -1
- package/dist/chat/services/turn-session-routing.d.ts +4 -3
- package/dist/chat/slack/{source-link.d.ts → location-url.d.ts} +1 -1
- package/dist/chat/slack/tool-support/context.d.ts +3 -6
- package/dist/chat/source.d.ts +4 -6
- package/dist/chat/task-execution/checkpoint.d.ts +2 -0
- package/dist/chat/task-execution/turn-cursor.d.ts +3 -0
- package/dist/chat/tasks/execution-stats.d.ts +13 -1
- package/dist/chat/tools/delete-event-task.d.ts +1 -1
- package/dist/chat/tools/types.d.ts +10 -9
- package/dist/chat/tools/update-event-task.d.ts +1 -1
- package/dist/chat/usage.d.ts +4 -0
- package/dist/{chunk-YRWGJ5OO.js → chunk-2NL3Y47F.js} +5 -5
- package/dist/{chunk-BGLMT6KP.js → chunk-53IEEFFP.js} +3 -3
- package/dist/{chunk-PXUBRZBU.js → chunk-6H2MKVV5.js} +1 -1
- package/dist/{chunk-47JFLZSF.js → chunk-73JEAQRT.js} +4 -4
- package/dist/{chunk-6LX6KV5C.js → chunk-7ANA7PBB.js} +3 -3
- package/dist/{chunk-AKR6W7VV.js → chunk-ADEACKAH.js} +82 -69
- package/dist/{chunk-YE6DVM43.js → chunk-AWZS5SVX.js} +8 -8
- package/dist/{chunk-BUTAWPUV.js → chunk-CCTYK5RH.js} +37 -31
- package/dist/{chunk-RWBZZMW6.js → chunk-CFGBKPWQ.js} +3 -3
- package/dist/{chunk-G4E5WIRL.js → chunk-E53C73ML.js} +4 -4
- package/dist/{chunk-3UJSII43.js → chunk-ELCYG6UU.js} +3 -3
- package/dist/{chunk-SSR6YBWW.js → chunk-ENWIHU54.js} +11 -7
- package/dist/{chunk-4CCQZHD3.js → chunk-F2KSURTJ.js} +11 -11
- package/dist/{chunk-7XO7PTZE.js → chunk-G35QGPO2.js} +1 -1
- package/dist/{chunk-4B4DQGOM.js → chunk-G4RARFNT.js} +101 -66
- package/dist/{chunk-Z4DNJI5F.js → chunk-GY5SEFVL.js} +5 -5
- package/dist/{chunk-KR5F3QSP.js → chunk-H4DCWLTR.js} +8 -8
- package/dist/{chunk-ARSUYYQG.js → chunk-IME5OW4Y.js} +1 -1
- package/dist/{chunk-3O2NXVGB.js → chunk-INTBMGNX.js} +23 -25
- package/dist/{chunk-4WIA45WD.js → chunk-IOGDKPVU.js} +1 -1
- package/dist/{chunk-EYNUOZCN.js → chunk-JOI3DHML.js} +1 -1
- package/dist/{chunk-5V4BAUCH.js → chunk-KNIAWMBU.js} +1 -1
- package/dist/{chunk-ITTEDZGY.js → chunk-NPO24LAN.js} +32 -25
- package/dist/{chunk-SZ2O3CGS.js → chunk-NWWDFHXP.js} +1 -1
- package/dist/{chunk-VF3EDS7P.js → chunk-OEQOAONV.js} +60 -29
- package/dist/{chunk-PYVGXGKC.js → chunk-P2P6MUQ4.js} +2 -2
- package/dist/{chunk-PXP2M32M.js → chunk-QMEF4Z7R.js} +6 -7
- package/dist/{chunk-OBN7UEQJ.js → chunk-RFE7DCZK.js} +24 -2
- package/dist/{chunk-6FCKJDKS.js → chunk-S7GX44BU.js} +1 -1
- package/dist/{chunk-4Z7B5WVV.js → chunk-U76RWMFR.js} +4 -2
- package/dist/{chunk-LRTEMMCZ.js → chunk-V4HXV5MY.js} +1 -1
- package/dist/{chunk-MB2CTEPD.js → chunk-VOB2DKO6.js} +174 -34
- package/dist/{chunk-EIYOABL4.js → chunk-WMJS5DDV.js} +12 -8
- package/dist/{chunk-FGYWKKTJ.js → chunk-WWXJUURQ.js} +1 -1
- package/dist/{chunk-3ADPXQBL.js → chunk-X76JVHQ4.js} +1 -1
- package/dist/{chunk-IBO4YFFZ.js → chunk-XLWZRHX5.js} +1 -1
- package/dist/{chunk-H5Q2T5VC.js → chunk-XND3J6AT.js} +1 -1
- package/dist/{chunk-4AFSQJD6.js → chunk-XRDSML3K.js} +3 -4
- package/dist/{chunk-EYIMZY5O.js → chunk-YSLIB7ER.js} +18 -3
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/db/schema/agent-invocations.d.ts +16 -0
- package/dist/db/schema.d.ts +16 -0
- package/dist/{db-LRM6AP66.js → db-3IEVINAY.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-BKCDVYVH.js → oauth-callback-server-N7L2BB4L.js} +29 -29
- package/dist/{runner-RUXGS3E6.js → runner-PTTZV3WU.js} +21 -21
- package/dist/{skills-DXP2RCJF.js → skills-POMWS2RR.js} +5 -5
- package/dist/spawn-R75MXXKE.js +42 -0
- package/dist/task-runner-OQLRHADB.js +36 -0
- package/dist/{validation-F4KYLIF2.js → validation-U6LOMXR7.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-UUNMNSML.js → work-FHA3BS4L.js} +21 -21
- package/dist/{worker-PMIJ5NLD.js → worker-GR4UNVVP.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-HH7GH7XT.js +0 -42
- package/dist/task-runner-H5I7R3LJ.js +0 -36
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getConversationEventStore,
|
|
6
6
|
getDb,
|
|
7
7
|
getSqlExecutor
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ADEACKAH.js";
|
|
9
9
|
import {
|
|
10
10
|
juniorCodeChanges,
|
|
11
11
|
juniorCodeRepositories,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
juniorUsers,
|
|
17
17
|
juniorWorkspaceRepos,
|
|
18
18
|
juniorWorkspaces
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XLWZRHX5.js";
|
|
20
20
|
import {
|
|
21
21
|
SANDBOX_WORKSPACE_ROOT,
|
|
22
22
|
getVercelSandboxCredentials,
|
|
@@ -24,16 +24,16 @@ import {
|
|
|
24
24
|
isSandboxMissingError,
|
|
25
25
|
runNonInteractiveCommand,
|
|
26
26
|
sleep
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7ANA7PBB.js";
|
|
28
28
|
import {
|
|
29
29
|
getStateAdapter
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-V4HXV5MY.js";
|
|
31
31
|
import {
|
|
32
32
|
botConfig,
|
|
33
33
|
completeObject,
|
|
34
34
|
embedTexts,
|
|
35
35
|
getSlackBotToken
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-U76RWMFR.js";
|
|
37
37
|
import {
|
|
38
38
|
defaultModelId
|
|
39
39
|
} from "./chunk-D4YV5TDV.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
setSpanAttributes,
|
|
53
53
|
setSpanStatus,
|
|
54
54
|
withSpan
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-X76JVHQ4.js";
|
|
56
56
|
|
|
57
57
|
// src/chat/plugins/agent-hooks.ts
|
|
58
58
|
import {
|
|
@@ -940,31 +940,30 @@ var RESOURCE_WATCH_TOOL_SOURCE = {
|
|
|
940
940
|
|
|
941
941
|
// src/chat/slack/tool-support/context.ts
|
|
942
942
|
function getSlackToolContext(context) {
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
943
|
+
const source = context.source.kind === "slack" ? context.source : void 0;
|
|
944
|
+
const location = context.location?.provider === "slack" ? context.location : source ? {
|
|
945
|
+
provider: "slack",
|
|
946
|
+
teamId: source.teamId,
|
|
947
|
+
channelId: source.channelId,
|
|
948
|
+
threadTs: source.threadTs
|
|
949
|
+
} : void 0;
|
|
950
|
+
if (!location) return void 0;
|
|
949
951
|
const destinationChannelId = parseSlackChannelReferenceId(
|
|
950
|
-
context.destination.channelId
|
|
952
|
+
context.destination.platform === "slack" ? context.destination.channelId : location.channelId
|
|
951
953
|
);
|
|
952
|
-
const
|
|
953
|
-
|
|
954
|
-
)
|
|
955
|
-
const teamId = parseSlackTeamId(context.source.teamId);
|
|
956
|
-
if (!destinationChannelId || !sourceChannelId || !teamId) {
|
|
954
|
+
const locationChannelId = parseSlackChannelReferenceId(location.channelId);
|
|
955
|
+
const teamId = parseSlackTeamId(location.teamId);
|
|
956
|
+
if (!destinationChannelId || !locationChannelId || !teamId) {
|
|
957
957
|
return void 0;
|
|
958
958
|
}
|
|
959
959
|
return {
|
|
960
|
-
destination: context.destination,
|
|
961
|
-
source: context.source,
|
|
962
960
|
actor: context.actor?.platform === "slack" ? context.actor : void 0,
|
|
963
961
|
destinationChannelId,
|
|
964
|
-
|
|
965
|
-
|
|
962
|
+
locationChannelId,
|
|
963
|
+
messageChannelId: source ? parseSlackChannelReferenceId(source.channelId) : void 0,
|
|
964
|
+
messageTs: parseSlackMessageTs(source?.messageTs),
|
|
966
965
|
teamId,
|
|
967
|
-
threadTs: parseSlackMessageTs(
|
|
966
|
+
threadTs: parseSlackMessageTs(location.threadTs)
|
|
968
967
|
};
|
|
969
968
|
}
|
|
970
969
|
|
|
@@ -2377,9 +2376,13 @@ function pluginInvocationContext(context) {
|
|
|
2377
2376
|
source: context.source
|
|
2378
2377
|
};
|
|
2379
2378
|
case "resource_event":
|
|
2379
|
+
case "scheduled_task":
|
|
2380
|
+
case "event_task":
|
|
2381
|
+
case "plugin_dispatch":
|
|
2382
|
+
case "agent_invocation":
|
|
2380
2383
|
return {
|
|
2381
2384
|
...common,
|
|
2382
|
-
actor: context.actor
|
|
2385
|
+
actor: context.actor,
|
|
2383
2386
|
destination: context.destination,
|
|
2384
2387
|
source: context.source
|
|
2385
2388
|
};
|
|
@@ -2565,7 +2568,7 @@ function applyPluginFormatMarkdown(text) {
|
|
|
2565
2568
|
}
|
|
2566
2569
|
return transformed;
|
|
2567
2570
|
}
|
|
2568
|
-
async function getPluginSystemPromptContributions(
|
|
2571
|
+
async function getPluginSystemPromptContributions(platform) {
|
|
2569
2572
|
const contributions = [];
|
|
2570
2573
|
let totalChars = 0;
|
|
2571
2574
|
for (const plugin of getPlugins()) {
|
|
@@ -2577,8 +2580,7 @@ async function getPluginSystemPromptContributions(source) {
|
|
|
2577
2580
|
try {
|
|
2578
2581
|
const pluginContributions = await hook({
|
|
2579
2582
|
...systemPromptPluginContext(plugin),
|
|
2580
|
-
|
|
2581
|
-
platform: source.kind === "slack" ? "slack" : "local"
|
|
2583
|
+
platform
|
|
2582
2584
|
});
|
|
2583
2585
|
const result = systemPromptMessageArraySchema.safeParse(pluginContributions);
|
|
2584
2586
|
if (!result.success) {
|
|
@@ -2693,7 +2695,7 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
2693
2695
|
}
|
|
2694
2696
|
const slackToolContext = getSlackToolContext(context);
|
|
2695
2697
|
const credentialSubject = slackToolContext ? createSlackDirectCredentialSubject({
|
|
2696
|
-
channelId: slackToolContext.
|
|
2698
|
+
channelId: slackToolContext.locationChannelId,
|
|
2697
2699
|
teamId: slackToolContext.teamId,
|
|
2698
2700
|
userId: slackToolContext.actor?.userId
|
|
2699
2701
|
}) : void 0;
|
|
@@ -2702,7 +2704,7 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
2702
2704
|
);
|
|
2703
2705
|
const slackContext = slackToolContext ? {
|
|
2704
2706
|
channelCapabilities: resolveChannelCapabilities(
|
|
2705
|
-
slackToolContext.
|
|
2707
|
+
slackToolContext.locationChannelId
|
|
2706
2708
|
),
|
|
2707
2709
|
...dashboardConversationUrl ? { conversationLink: { url: dashboardConversationUrl } } : void 0,
|
|
2708
2710
|
...credentialSubject ? { credentialSubject } : void 0
|
|
@@ -2758,6 +2760,7 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
2758
2760
|
annotations,
|
|
2759
2761
|
conversationId: context.conversationId,
|
|
2760
2762
|
locationId: context.locationId,
|
|
2763
|
+
...slackContext ? { slack: slackContext } : void 0,
|
|
2761
2764
|
userText: context.userText,
|
|
2762
2765
|
embedder: createPluginEmbedder(pluginName),
|
|
2763
2766
|
egress: context.egress,
|
|
@@ -2785,7 +2788,6 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
2785
2788
|
...common,
|
|
2786
2789
|
actor: context.actor?.platform === "slack" ? context.actor : void 0,
|
|
2787
2790
|
destination: context.destination,
|
|
2788
|
-
slack: slackContext,
|
|
2789
2791
|
source: context.source
|
|
2790
2792
|
};
|
|
2791
2793
|
break;
|
|
@@ -2811,9 +2813,13 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
2811
2813
|
};
|
|
2812
2814
|
break;
|
|
2813
2815
|
case "resource_event":
|
|
2816
|
+
case "scheduled_task":
|
|
2817
|
+
case "event_task":
|
|
2818
|
+
case "plugin_dispatch":
|
|
2819
|
+
case "agent_invocation":
|
|
2814
2820
|
pluginContext = {
|
|
2815
2821
|
...common,
|
|
2816
|
-
actor: context.actor
|
|
2822
|
+
actor: context.actor,
|
|
2817
2823
|
destination: context.destination,
|
|
2818
2824
|
source: context.source
|
|
2819
2825
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithTurnRequestDeadline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NWWDFHXP.js";
|
|
4
4
|
import {
|
|
5
5
|
QUEUE_SIGNATURE_MAX_AGE_MS,
|
|
6
6
|
createVercelQueueClient,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7H2VZTWN.js";
|
|
10
10
|
import {
|
|
11
11
|
logWarn
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-X76JVHQ4.js";
|
|
13
13
|
|
|
14
14
|
// src/chat/plugins/task-queue.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -129,7 +129,7 @@ function pluginTaskCallback() {
|
|
|
129
129
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
130
130
|
// Load the runner on first use so this module can send without a cycle.
|
|
131
131
|
run: async (message) => {
|
|
132
|
-
const { processPluginTask } = await import("./task-runner-
|
|
132
|
+
const { processPluginTask } = await import("./task-runner-OQLRHADB.js");
|
|
133
133
|
await processPluginTask(message);
|
|
134
134
|
},
|
|
135
135
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ADEACKAH.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-V4HXV5MY.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-U76RWMFR.js";
|
|
19
19
|
import {
|
|
20
20
|
parseStoredSlackActor
|
|
21
21
|
} from "./chunk-N7TMSOZH.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isRecord,
|
|
24
24
|
toOptionalNumber,
|
|
25
25
|
toOptionalString
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-X76JVHQ4.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
isStale,
|
|
7
7
|
runNonInteractiveCommand,
|
|
8
8
|
sleep
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7ANA7PBB.js";
|
|
10
10
|
import {
|
|
11
11
|
getStateAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-V4HXV5MY.js";
|
|
13
13
|
import {
|
|
14
14
|
setSpanAttributes,
|
|
15
15
|
withSpan
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-X76JVHQ4.js";
|
|
17
17
|
|
|
18
18
|
// src/chat/sandbox/resources.ts
|
|
19
19
|
var configuredResources;
|
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
isDmChannel,
|
|
9
9
|
normalizeSlackConversationId,
|
|
10
10
|
withSlackRetries
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CCTYK5RH.js";
|
|
12
12
|
import {
|
|
13
13
|
parseDestination
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ADEACKAH.js";
|
|
15
15
|
import {
|
|
16
16
|
getStateAdapter
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-V4HXV5MY.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeSlackEmojiName
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-U76RWMFR.js";
|
|
21
21
|
import {
|
|
22
22
|
pluginCatalogRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WWXJUURQ.js";
|
|
24
24
|
import {
|
|
25
25
|
parseSlackMessageTs,
|
|
26
26
|
parseSlackUserId
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
isRecord,
|
|
30
30
|
logInfo,
|
|
31
31
|
logWarn
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-X76JVHQ4.js";
|
|
33
33
|
|
|
34
34
|
// src/chat/agent/types.ts
|
|
35
35
|
var RetryableDeliveryError = class extends Error {
|
|
@@ -109,7 +109,11 @@ function assertRunConsistency(run) {
|
|
|
109
109
|
break;
|
|
110
110
|
}
|
|
111
111
|
case "resource_event":
|
|
112
|
-
|
|
112
|
+
case "scheduled_task":
|
|
113
|
+
case "event_task":
|
|
114
|
+
case "plugin_dispatch":
|
|
115
|
+
case "agent_invocation":
|
|
116
|
+
return;
|
|
113
117
|
}
|
|
114
118
|
const actor = run.dispatch?.actor ?? run.actor;
|
|
115
119
|
if (!actor || actor.platform === "system") {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRunError,
|
|
3
3
|
executeTurn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-53IEEFFP.js";
|
|
5
5
|
import {
|
|
6
6
|
ConversationTurnLifecycleService
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6H2MKVV5.js";
|
|
8
8
|
import {
|
|
9
9
|
getPersistedSandboxState,
|
|
10
10
|
getPersistedThreadState,
|
|
11
11
|
persistThreadStateById
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GY5SEFVL.js";
|
|
13
13
|
import {
|
|
14
14
|
AgentInvocationBusyError,
|
|
15
15
|
AgentInvocationLimitError,
|
|
@@ -18,32 +18,32 @@ import {
|
|
|
18
18
|
agentBindingSchema,
|
|
19
19
|
agentInvocationSchema,
|
|
20
20
|
createAgentInvocationSchema
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QMEF4Z7R.js";
|
|
22
22
|
import {
|
|
23
23
|
TurnInputCommitLostError,
|
|
24
24
|
getAssistantReplyText,
|
|
25
25
|
getConversationTurnBoundaryError,
|
|
26
26
|
isTurnInputCommitLostError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-G35QGPO2.js";
|
|
28
28
|
import {
|
|
29
29
|
failTurnRecord,
|
|
30
30
|
getTerminalAssistantMessages,
|
|
31
31
|
getTurnRecord,
|
|
32
32
|
openConversationProjection,
|
|
33
33
|
saveTurnCheckpoint
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-OEQOAONV.js";
|
|
35
35
|
import {
|
|
36
36
|
appendAndEnqueueInboundMessage
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-E53C73ML.js";
|
|
38
38
|
import {
|
|
39
39
|
getConversationEventStore,
|
|
40
40
|
getConversationStore,
|
|
41
41
|
getSqlExecutor
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-ADEACKAH.js";
|
|
43
43
|
import {
|
|
44
44
|
juniorAgentBindings,
|
|
45
45
|
juniorAgentInvocations
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-XLWZRHX5.js";
|
|
47
47
|
|
|
48
48
|
// src/chat/agent-invocations/work.ts
|
|
49
49
|
import { z } from "zod";
|
|
@@ -111,7 +111,7 @@ function invocationFromRow(row) {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
function sameCreateInput(invocation, input) {
|
|
114
|
-
return invocation.parentConversationId === input.parentConversationId && invocation.agentName === input.agentName && invocation.input === input.input && invocation.reasoningLevel === input.reasoningLevel && JSON.stringify(invocation.actor) === JSON.stringify(input.actor) && JSON.stringify(invocation.credentialContext) === JSON.stringify(input.credentialContext) && JSON.stringify(invocation.destination) === JSON.stringify(input.destination)
|
|
114
|
+
return invocation.parentConversationId === input.parentConversationId && invocation.agentName === input.agentName && invocation.input === input.input && invocation.reasoningLevel === input.reasoningLevel && JSON.stringify(invocation.actor) === JSON.stringify(input.actor) && JSON.stringify(invocation.credentialContext) === JSON.stringify(input.credentialContext) && JSON.stringify(invocation.destination) === JSON.stringify(input.destination);
|
|
115
115
|
}
|
|
116
116
|
async function getAgentBinding(args) {
|
|
117
117
|
const rows = await getSqlExecutor().db().select().from(juniorAgentBindings).where(
|
|
@@ -223,7 +223,7 @@ async function createAgentInvocation(rawInput, nowMs = Date.now()) {
|
|
|
223
223
|
input: input.input,
|
|
224
224
|
actor: input.actor,
|
|
225
225
|
credentialContext: input.credentialContext ?? null,
|
|
226
|
-
source:
|
|
226
|
+
source: { kind: "agent_invocation" },
|
|
227
227
|
destination: input.destination,
|
|
228
228
|
reasoningLevel: input.reasoningLevel ?? null,
|
|
229
229
|
status: "pending",
|