@sentry/junior 0.114.0 → 0.116.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-WNBUY4OB.js → agent-hooks-67NFITDH.js} +13 -12
- package/dist/api/conversations/detail.d.ts +20 -0
- package/dist/api/conversations/event-list.d.ts +2 -0
- package/dist/api/conversations/event-page.d.ts +1 -1
- package/dist/api/conversations/events.d.ts +1 -1
- package/dist/api/health.d.ts +7 -0
- package/dist/api/people/profile.d.ts +2 -2
- package/dist/api/people/shared.d.ts +1 -1
- package/dist/api/personal-tokens/create.d.ts +11 -0
- package/dist/api/personal-tokens/list.d.ts +12 -0
- package/dist/api/personal-tokens/revoke.d.ts +5 -0
- package/dist/api/personal-tokens/routes.d.ts +4 -0
- package/dist/api/plugin-reports.d.ts +62 -0
- package/dist/api/plugins.d.ts +8 -0
- package/dist/api/route.d.ts +1 -1
- package/dist/api/runtime.d.ts +24 -0
- package/dist/api/schema/conversation.d.ts +26 -0
- package/dist/api/schema/person.d.ts +3 -3
- package/dist/api/schema/personal-token.d.ts +38 -0
- package/dist/api/schema.d.ts +4 -2
- package/dist/api/schema.js +19 -7
- package/dist/api/skills.d.ts +6 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +285 -121
- package/dist/app.js +1957 -5677
- package/dist/catalog-runtime-CWZY6GTH.js +18 -0
- package/dist/chat/agent/request.d.ts +7 -0
- package/dist/chat/agent/resume.d.ts +1 -0
- package/dist/chat/agent/sandbox.d.ts +3 -0
- package/dist/chat/agent/tools.d.ts +3 -0
- package/dist/chat/agent-dispatch/context.d.ts +2 -0
- package/dist/chat/agent-dispatch/heartbeat.d.ts +11 -5
- package/dist/chat/agent-dispatch/signing.d.ts +14 -5
- package/dist/chat/agent-dispatch/store.d.ts +36 -15
- package/dist/chat/agent-dispatch/types.d.ts +23 -10
- package/dist/chat/agent-dispatch/work.d.ts +58 -0
- package/dist/chat/app/factory.d.ts +12 -3
- package/dist/chat/config.d.ts +2 -0
- package/dist/chat/conversations/history.d.ts +291 -290
- package/dist/chat/conversations/projection.d.ts +2 -2
- package/dist/chat/local/credential-sync.d.ts +5 -0
- package/dist/chat/local/oauth-relay.d.ts +4 -0
- package/dist/chat/mcp/oauth.d.ts +1 -0
- package/dist/chat/mcp/tool-manager.d.ts +2 -1
- package/dist/chat/oauth-authorization.d.ts +17 -0
- package/dist/chat/oauth-flow.d.ts +9 -0
- package/dist/chat/pi/conversation-events.d.ts +6 -2
- package/dist/chat/plugins/annotations.d.ts +8 -0
- package/dist/chat/plugins/registry.d.ts +0 -3
- package/dist/chat/plugins/types.d.ts +0 -2
- package/dist/chat/runtime/agent-continue-runner.d.ts +4 -0
- package/dist/chat/runtime/reply-executor.d.ts +6 -1
- package/dist/chat/runtime/slack-resume.d.ts +5 -1
- package/dist/chat/runtime/turn-input.d.ts +3 -0
- package/dist/chat/sandbox/egress/schemas.d.ts +46 -0
- package/dist/chat/sandbox/egress/signals.d.ts +9 -0
- package/dist/chat/sandbox/sandbox.d.ts +4 -1
- package/dist/chat/sandbox/session.d.ts +2 -11
- package/dist/chat/sandbox/workspace.d.ts +10 -2
- package/dist/chat/sentry-payload-filter.d.ts +4 -4
- package/dist/chat/services/mcp-auth-orchestration.d.ts +5 -3
- package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -0
- package/dist/chat/services/turn-session-record.d.ts +14 -1
- package/dist/chat/slack/dispatch-turn.d.ts +25 -0
- package/dist/chat/slack/message-control.d.ts +2 -0
- package/dist/chat/slack/oauth-authorization-message.d.ts +3 -0
- package/dist/chat/state/turn-session.d.ts +11 -0
- package/dist/chat/task-execution/slack-work.d.ts +2 -0
- package/dist/chat/tool-support/text-range-result.d.ts +3 -0
- package/dist/chat/tool-support/zod-tool.d.ts +2 -1
- package/dist/chat/tools/definition.d.ts +3 -5
- package/dist/chat/tools/query-conversation-events.d.ts +68 -0
- package/dist/chat/tools/sandbox/file-utils.d.ts +8 -1
- package/dist/chat/tools/sandbox/find-files.d.ts +2 -1
- package/dist/chat/tools/sandbox/grep.d.ts +2 -1
- package/dist/{chunk-OSKEC4XU.js → chunk-25GU5B5E.js} +1 -1
- package/dist/{chunk-XLFBQJUO.js → chunk-3H45VOBZ.js} +32 -7
- package/dist/{chunk-4FUEG3QY.js → chunk-3JOGUT46.js} +4 -16
- package/dist/chunk-4CODA7P5.js +43 -0
- package/dist/{chunk-O4GT7LYB.js → chunk-4DD6AOCG.js} +3 -43
- package/dist/{chunk-YU6PO42Q.js → chunk-53ZKTQO6.js} +1 -1
- package/dist/{chunk-WV4UJBAS.js → chunk-5UNB623T.js} +1282 -2536
- package/dist/{chunk-TLGM5X2M.js → chunk-6RQ5GCWH.js} +2 -2
- package/dist/{chunk-MIAKQNYX.js → chunk-6ZK6FZIV.js} +1 -1
- package/dist/{chunk-W6RDUAO3.js → chunk-BXLS3I4W.js} +1 -1
- package/dist/{chunk-RD7EJI7H.js → chunk-CI3VK7X5.js} +69 -3
- package/dist/chunk-DIB4GX3G.js +8 -0
- package/dist/{chunk-42WRQLJ6.js → chunk-F3B2YJ76.js} +0 -14
- package/dist/chunk-FA6POGLH.js +70 -0
- package/dist/{chunk-6Y5L4BOM.js → chunk-FXOYURO4.js} +5 -3
- package/dist/chunk-HDSDCEPK.js +80 -0
- package/dist/{chunk-C4MZ3GP5.js → chunk-HZF5P5UN.js} +1 -1
- package/dist/{chunk-K2W4CK7K.js → chunk-JZPQ5K4V.js} +10 -129
- package/dist/{chunk-FIGAF6KL.js → chunk-KBNDFU6J.js} +108 -38
- package/dist/{chunk-PM3PX42K.js → chunk-MGH5ADQS.js} +1 -2
- package/dist/{chunk-5CZ7RETL.js → chunk-N7TMYLF2.js} +1 -1
- package/dist/chunk-OB42YVAE.js +16 -0
- package/dist/{chunk-6QWPVTMO.js → chunk-OF5FODBL.js} +125 -23
- package/dist/{chunk-2ZTTXTSZ.js → chunk-PE44LDDQ.js} +9 -4
- package/dist/chunk-PGKWXHYJ.js +1870 -0
- package/dist/{chunk-ZGXH3REA.js → chunk-PZGPCOSD.js} +12 -2
- package/dist/{chunk-JQFJO5WH.js → chunk-RXRQJF7Y.js} +74 -17
- package/dist/{chunk-S4QDH23A.js → chunk-TC4ZEM2D.js} +113 -79
- package/dist/{chunk-ABPSDO6M.js → chunk-UEVLIYK5.js} +234 -165
- package/dist/chunk-VKZ6WVAY.js +4318 -0
- package/dist/{chunk-VNNBSKCO.js → chunk-VZCSLYCE.js} +22 -7
- package/dist/chunk-W3U3YQYI.js +71 -0
- package/dist/{chunk-SG5WAA7H.js → chunk-WKU7TY22.js} +0 -3
- package/dist/cli/chat.js +74 -42
- package/dist/cli/check.js +10 -8
- package/dist/cli/init.js +1 -0
- package/dist/cli/plugins.js +18 -16
- package/dist/cli/snapshot-warmup.js +13 -11
- package/dist/cli/upgrade.js +12 -10
- package/dist/db/schema/api-tokens.d.ts +160 -0
- package/dist/db/schema/conversation-annotations.d.ts +142 -0
- package/dist/db/schema.d.ts +305 -1
- package/dist/{db-4VLP7KBF.js → db-57FHVGGQ.js} +9 -8
- package/dist/handlers/agent-dispatch.d.ts +7 -3
- package/dist/handlers/sandbox-egress-signals.d.ts +4 -0
- package/dist/instrumentation.js +72 -4
- package/dist/nitro.js +5 -5
- package/dist/oauth-callback-server-PAQRPXZX.js +231 -0
- package/dist/oauth-relay-3ZU72UGL.js +9 -0
- package/dist/personal-tokens/store.d.ts +27 -0
- package/dist/{plugins-PZMDS7AT.js → plugins-IUJA4VBU.js} +1 -1
- package/dist/reporting-schema.d.ts +10 -4
- package/dist/reporting.d.ts +5 -5
- package/dist/{runner-IPXLWQOF.js → runner-4ISZYJEX.js} +141 -74
- package/dist/sandbox-egress-signals-CDFAP67O.js +75 -0
- package/dist/{skills-QCNZISNF.js → skills-UE2KXQMB.js} +10 -8
- package/dist/validation-PO5LHTJT.js +21 -0
- package/dist/version.js +1 -1
- package/migrations/0008_sticky_rage.sql +14 -0
- package/migrations/0009_slippery_harrier.sql +12 -0
- package/migrations/0010_native_conversation_history.sql +142 -0
- package/migrations/meta/0008_snapshot.json +1076 -0
- package/migrations/meta/0009_snapshot.json +1146 -0
- package/migrations/meta/0010_snapshot.json +1190 -0
- package/migrations/meta/_journal.json +22 -1
- package/package.json +6 -7
- package/dist/catalog-runtime-6O4M6JGA.js +0 -16
- package/dist/chat/agent-dispatch/runner.d.ts +0 -13
- package/dist/chat/capabilities/catalog.d.ts +0 -16
- package/dist/chat/oauth-authorization-message.d.ts +0 -6
- package/dist/validation-I2BW3UHD.js +0 -19
- package/dist/{chunk-KNFROR7R.js → chunk-5I6ORJUY.js} +1 -1
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SANDBOX_WORKSPACE_ROOT,
|
|
3
3
|
getStateAdapter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-53ZKTQO6.js";
|
|
5
5
|
import {
|
|
6
|
+
createPluginAnnotations,
|
|
6
7
|
isConversationChannel,
|
|
7
8
|
isConversationScopedChannel,
|
|
8
9
|
isDmChannel,
|
|
9
10
|
normalizeSlackConversationId
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CI3VK7X5.js";
|
|
11
12
|
import {
|
|
12
13
|
getDb
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KBNDFU6J.js";
|
|
14
15
|
import {
|
|
15
16
|
botConfig,
|
|
16
17
|
completeObject,
|
|
17
18
|
embedTexts,
|
|
18
19
|
standardModelId
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-PZGPCOSD.js";
|
|
20
21
|
import {
|
|
21
22
|
isActorUserId,
|
|
22
23
|
parseActorUserId
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HZF5P5UN.js";
|
|
24
25
|
import {
|
|
25
26
|
logException,
|
|
26
27
|
logInfo,
|
|
27
28
|
logWarn
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3JOGUT46.js";
|
|
29
30
|
import {
|
|
30
31
|
parseSlackChannelReferenceId,
|
|
31
32
|
parseSlackMessageTs,
|
|
32
33
|
parseSlackTeamId
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-F3B2YJ76.js";
|
|
34
35
|
|
|
35
36
|
// src/chat/plugins/agent-hooks.ts
|
|
36
37
|
import {
|
|
@@ -687,6 +688,11 @@ function getPluginTools(context) {
|
|
|
687
688
|
...dashboardConversationUrl ? { conversationLink: { url: dashboardConversationUrl } } : {},
|
|
688
689
|
...credentialSubject ? { credentialSubject } : {}
|
|
689
690
|
} : void 0;
|
|
691
|
+
const annotations = context.conversationId ? createPluginAnnotations({
|
|
692
|
+
conversationId: context.conversationId,
|
|
693
|
+
db: getDb(),
|
|
694
|
+
plugin: pluginName
|
|
695
|
+
}) : void 0;
|
|
690
696
|
let pluginContext;
|
|
691
697
|
if (context.source.platform === "slack") {
|
|
692
698
|
if (context.destination.platform !== "slack") {
|
|
@@ -698,6 +704,7 @@ function getPluginTools(context) {
|
|
|
698
704
|
...basePluginContext(plugin),
|
|
699
705
|
actor: context.actor?.platform === "slack" ? context.actor : void 0,
|
|
700
706
|
conversationId: context.conversationId,
|
|
707
|
+
...annotations ? { annotations } : {},
|
|
701
708
|
destination: context.destination,
|
|
702
709
|
slack: slackContext,
|
|
703
710
|
source: context.source,
|
|
@@ -717,6 +724,7 @@ function getPluginTools(context) {
|
|
|
717
724
|
...basePluginContext(plugin),
|
|
718
725
|
actor: context.actor?.platform === "local" ? context.actor : void 0,
|
|
719
726
|
conversationId: context.conversationId,
|
|
727
|
+
...annotations ? { annotations } : {},
|
|
720
728
|
destination: context.destination,
|
|
721
729
|
source: context.source,
|
|
722
730
|
userText: context.userText,
|
|
@@ -789,6 +797,13 @@ function getPluginRoutes(options) {
|
|
|
789
797
|
}
|
|
790
798
|
const pluginRoutes = hook({
|
|
791
799
|
...basePluginContext(plugin),
|
|
800
|
+
annotations: {
|
|
801
|
+
forConversation: (conversationId) => createPluginAnnotations({
|
|
802
|
+
conversationId,
|
|
803
|
+
db: getDb(),
|
|
804
|
+
plugin: pluginName
|
|
805
|
+
})
|
|
806
|
+
},
|
|
792
807
|
resourceEvents: {
|
|
793
808
|
async publish(event) {
|
|
794
809
|
const parsed = resourceEventSchema.parse(event);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseActorUserId
|
|
3
|
+
} from "./chunk-HZF5P5UN.js";
|
|
4
|
+
|
|
5
|
+
// src/chat/credentials/context.ts
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
var exactActorIdSchema = z.string().refine((value) => parseActorUserId(value) === value);
|
|
8
|
+
var exactNonBlankStringSchema = z.string().min(1).refine((value) => value === value.trim());
|
|
9
|
+
var slackDirectCredentialSubjectBindingSchema = z.object({
|
|
10
|
+
type: z.literal("slack-direct-conversation"),
|
|
11
|
+
teamId: z.string().min(1),
|
|
12
|
+
channelId: z.string().min(1),
|
|
13
|
+
signature: z.string().min(1)
|
|
14
|
+
}).strict();
|
|
15
|
+
var scheduledTaskCredentialSubjectBindingSchema = z.object({
|
|
16
|
+
type: z.literal("scheduled-task"),
|
|
17
|
+
plugin: z.string().min(1),
|
|
18
|
+
taskId: exactNonBlankStringSchema,
|
|
19
|
+
signature: z.string().min(1)
|
|
20
|
+
}).strict();
|
|
21
|
+
var credentialSubjectBindingSchema = z.discriminatedUnion("type", [
|
|
22
|
+
slackDirectCredentialSubjectBindingSchema,
|
|
23
|
+
scheduledTaskCredentialSubjectBindingSchema
|
|
24
|
+
]);
|
|
25
|
+
var credentialUserActorSchema = z.object({
|
|
26
|
+
type: z.literal("user"),
|
|
27
|
+
userId: exactActorIdSchema
|
|
28
|
+
}).strict();
|
|
29
|
+
var credentialSystemActorSchema = z.object({
|
|
30
|
+
platform: z.literal("system"),
|
|
31
|
+
name: exactActorIdSchema
|
|
32
|
+
}).strict();
|
|
33
|
+
var credentialSubjectSchema = z.discriminatedUnion("allowedWhen", [
|
|
34
|
+
z.object({
|
|
35
|
+
type: z.literal("user"),
|
|
36
|
+
userId: exactActorIdSchema,
|
|
37
|
+
allowedWhen: z.literal("private-direct-conversation"),
|
|
38
|
+
binding: slackDirectCredentialSubjectBindingSchema
|
|
39
|
+
}).strict(),
|
|
40
|
+
z.object({
|
|
41
|
+
type: z.literal("user"),
|
|
42
|
+
userId: exactActorIdSchema,
|
|
43
|
+
allowedWhen: z.literal("scheduled-task"),
|
|
44
|
+
taskId: exactNonBlankStringSchema,
|
|
45
|
+
binding: scheduledTaskCredentialSubjectBindingSchema
|
|
46
|
+
}).strict().refine((subject) => subject.binding.taskId === subject.taskId, {
|
|
47
|
+
message: "Scheduled task credential subject requires task binding",
|
|
48
|
+
path: ["binding"]
|
|
49
|
+
})
|
|
50
|
+
]);
|
|
51
|
+
var credentialContextSchema = z.union([
|
|
52
|
+
z.object({
|
|
53
|
+
actor: credentialUserActorSchema
|
|
54
|
+
}).strict(),
|
|
55
|
+
z.object({
|
|
56
|
+
actor: credentialSystemActorSchema,
|
|
57
|
+
subject: credentialSubjectSchema.optional()
|
|
58
|
+
}).strict()
|
|
59
|
+
]);
|
|
60
|
+
function credentialUserSubjectId(context) {
|
|
61
|
+
if ("type" in context.actor) {
|
|
62
|
+
return context.actor.userId;
|
|
63
|
+
}
|
|
64
|
+
return "subject" in context ? context.subject?.userId : void 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
credentialSubjectSchema,
|
|
69
|
+
credentialContextSchema,
|
|
70
|
+
credentialUserSubjectId
|
|
71
|
+
};
|
|
@@ -8,9 +8,6 @@ function cloneInlineManifests(registrations) {
|
|
|
8
8
|
{
|
|
9
9
|
manifest: {
|
|
10
10
|
...structuredClone(plugin.manifest),
|
|
11
|
-
capabilities: plugin.manifest.capabilities?.map(
|
|
12
|
-
(capability) => capability.includes(".") ? capability : `${plugin.manifest.name}.${capability}`
|
|
13
|
-
) ?? [],
|
|
14
11
|
configKeys: plugin.manifest.configKeys?.map(
|
|
15
12
|
(key) => key.includes(".") ? key : `${plugin.manifest.name}.${key}`
|
|
16
13
|
) ?? [],
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAgentRunner,
|
|
3
3
|
executeAgentRun
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-5UNB623T.js";
|
|
5
|
+
import "../chunk-DIB4GX3G.js";
|
|
6
|
+
import "../chunk-PGKWXHYJ.js";
|
|
7
|
+
import "../chunk-OF5FODBL.js";
|
|
8
|
+
import "../chunk-HDSDCEPK.js";
|
|
9
|
+
import "../chunk-3H45VOBZ.js";
|
|
7
10
|
import "../chunk-MU6HHZEN.js";
|
|
8
11
|
import "../chunk-PDO5BLNM.js";
|
|
9
12
|
import "../chunk-UIE3R5XU.js";
|
|
10
13
|
import {
|
|
11
14
|
loadAppPluginSet
|
|
12
15
|
} from "../chunk-Y2CM7HXH.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-VZCSLYCE.js";
|
|
17
|
+
import "../chunk-53ZKTQO6.js";
|
|
18
|
+
import "../chunk-CI3VK7X5.js";
|
|
19
|
+
import "../chunk-KBNDFU6J.js";
|
|
20
|
+
import "../chunk-RXRQJF7Y.js";
|
|
18
21
|
import "../chunk-4ZNGQH7C.js";
|
|
19
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-PZGPCOSD.js";
|
|
20
23
|
import "../chunk-VFUK3X5B.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-FXOYURO4.js";
|
|
25
|
+
import "../chunk-6RQ5GCWH.js";
|
|
26
|
+
import "../chunk-25GU5B5E.js";
|
|
27
|
+
import "../chunk-JZPQ5K4V.js";
|
|
28
|
+
import "../chunk-W3U3YQYI.js";
|
|
29
|
+
import "../chunk-HZF5P5UN.js";
|
|
30
|
+
import "../chunk-3JOGUT46.js";
|
|
31
|
+
import "../chunk-OB42YVAE.js";
|
|
32
|
+
import "../chunk-F3B2YJ76.js";
|
|
28
33
|
import "../chunk-6GWA276C.js";
|
|
29
34
|
import "../chunk-B3IT5END.js";
|
|
30
35
|
import "../chunk-3V7OFJZC.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-N7TMYLF2.js";
|
|
37
|
+
import "../chunk-MGH5ADQS.js";
|
|
33
38
|
import "../chunk-MLKGABMK.js";
|
|
34
39
|
|
|
35
40
|
// src/cli/chat.ts
|
|
@@ -151,11 +156,11 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
151
156
|
validationModule,
|
|
152
157
|
databaseModule
|
|
153
158
|
] = await Promise.all([
|
|
154
|
-
import("../plugins-
|
|
155
|
-
import("../agent-hooks-
|
|
156
|
-
import("../catalog-runtime-
|
|
157
|
-
import("../validation-
|
|
158
|
-
import("../db-
|
|
159
|
+
import("../plugins-IUJA4VBU.js"),
|
|
160
|
+
import("../agent-hooks-67NFITDH.js"),
|
|
161
|
+
import("../catalog-runtime-CWZY6GTH.js"),
|
|
162
|
+
import("../validation-PO5LHTJT.js"),
|
|
163
|
+
import("../db-57FHVGGQ.js")
|
|
159
164
|
]);
|
|
160
165
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
161
166
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -213,12 +218,35 @@ function newRunConversationId() {
|
|
|
213
218
|
}
|
|
214
219
|
return conversationId;
|
|
215
220
|
}
|
|
221
|
+
function localDevServerUrl() {
|
|
222
|
+
return `http://127.0.0.1:${process.env.PORT?.trim() || "3000"}`;
|
|
223
|
+
}
|
|
216
224
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
217
225
|
defaultStateAdapterForLocalChat();
|
|
218
226
|
await configureLocalChatPlugins(pluginSet);
|
|
219
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
227
|
+
const { runLocalAgentTurn } = await import("../runner-4ISZYJEX.js");
|
|
228
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-PAQRPXZX.js");
|
|
229
|
+
const { createLocalOAuthState } = await import("../oauth-relay-3ZU72UGL.js");
|
|
230
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CDFAP67O.js");
|
|
231
|
+
const agentRunner = createAgentRunner(executeAgentRun);
|
|
232
|
+
const oauthCallback = await startLocalOAuthCallbackServer(agentRunner);
|
|
220
233
|
const deps = {
|
|
221
|
-
agentRunner
|
|
234
|
+
agentRunner,
|
|
235
|
+
authorization: {
|
|
236
|
+
cancel: oauthCallback.cancelAuthorization,
|
|
237
|
+
createState: async () => await createLocalOAuthState(oauthCallback.port),
|
|
238
|
+
deliver: async (request) => {
|
|
239
|
+
oauthCallback.beginAuthorization(request.authorizationUrl);
|
|
240
|
+
await reportStatus(
|
|
241
|
+
io,
|
|
242
|
+
`${request.label}:
|
|
243
|
+
${request.authorizationUrl}
|
|
244
|
+
${request.completionText}`
|
|
245
|
+
);
|
|
246
|
+
},
|
|
247
|
+
wait: oauthCallback.waitForAuthorization
|
|
248
|
+
},
|
|
249
|
+
sandboxEgressSignals: createLocalSandboxEgressSignalTransport(localDevServerUrl()),
|
|
222
250
|
deliverReply: async (reply) => {
|
|
223
251
|
await deliverReply(io, reply);
|
|
224
252
|
},
|
|
@@ -229,27 +257,30 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
229
257
|
await reportToolResult(io, result);
|
|
230
258
|
}
|
|
231
259
|
};
|
|
232
|
-
return {
|
|
260
|
+
return {
|
|
261
|
+
close: oauthCallback.close,
|
|
262
|
+
conversationId: newRunConversationId(),
|
|
263
|
+
runLocalAgentTurn,
|
|
264
|
+
deps
|
|
265
|
+
};
|
|
233
266
|
}
|
|
234
267
|
async function runPrompt(options, io, pluginSet) {
|
|
235
|
-
const { conversationId, runLocalAgentTurn, deps } = await prepareLocalChatRun(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
268
|
+
const { close, conversationId, runLocalAgentTurn, deps } = await prepareLocalChatRun(io, pluginSet);
|
|
269
|
+
try {
|
|
270
|
+
const result = await runLocalAgentTurn(
|
|
271
|
+
{
|
|
272
|
+
conversationId,
|
|
273
|
+
message: options.message
|
|
274
|
+
},
|
|
275
|
+
deps
|
|
276
|
+
);
|
|
277
|
+
return result.outcome === "success" ? 0 : 1;
|
|
278
|
+
} finally {
|
|
279
|
+
await close();
|
|
280
|
+
}
|
|
247
281
|
}
|
|
248
282
|
async function runInteractive(io, pluginSet) {
|
|
249
|
-
const { conversationId, runLocalAgentTurn, deps } = await prepareLocalChatRun(
|
|
250
|
-
io,
|
|
251
|
-
pluginSet
|
|
252
|
-
);
|
|
283
|
+
const { close, conversationId, runLocalAgentTurn, deps } = await prepareLocalChatRun(io, pluginSet);
|
|
253
284
|
const rl = readline.createInterface({
|
|
254
285
|
input: io.input,
|
|
255
286
|
output: io.output,
|
|
@@ -281,6 +312,7 @@ async function runInteractive(io, pluginSet) {
|
|
|
281
312
|
}
|
|
282
313
|
} finally {
|
|
283
314
|
rl.close();
|
|
315
|
+
await close();
|
|
284
316
|
}
|
|
285
317
|
}
|
|
286
318
|
async function runChat(argv, io = DEFAULT_IO, deps = {}) {
|
package/dist/cli/check.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-6RQ5GCWH.js";
|
|
4
|
+
import "../chunk-25GU5B5E.js";
|
|
5
5
|
import {
|
|
6
6
|
parseInlinePluginManifest,
|
|
7
7
|
parsePluginManifest
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-JZPQ5K4V.js";
|
|
9
|
+
import "../chunk-W3U3YQYI.js";
|
|
10
|
+
import "../chunk-HZF5P5UN.js";
|
|
11
|
+
import "../chunk-3JOGUT46.js";
|
|
12
|
+
import "../chunk-OB42YVAE.js";
|
|
13
|
+
import "../chunk-F3B2YJ76.js";
|
|
12
14
|
import "../chunk-6GWA276C.js";
|
|
13
15
|
import "../chunk-B3IT5END.js";
|
|
14
16
|
import "../chunk-3V7OFJZC.js";
|
|
@@ -16,8 +18,8 @@ import {
|
|
|
16
18
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
|
17
19
|
JUNIOR_HEARTBEAT_ROUTE,
|
|
18
20
|
LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
+
} from "../chunk-N7TMYLF2.js";
|
|
22
|
+
import "../chunk-MGH5ADQS.js";
|
|
21
23
|
import "../chunk-MLKGABMK.js";
|
|
22
24
|
|
|
23
25
|
// src/cli/check.ts
|
package/dist/cli/init.js
CHANGED
package/dist/cli/plugins.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validatePluginEgressCredentialHooks,
|
|
3
3
|
validatePluginRegistrations
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-BXLS3I4W.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginCatalogConfigFromPluginSet,
|
|
7
7
|
pluginCliRegistrationsFromPluginSet,
|
|
8
8
|
pluginRuntimeRegistrationsFromPluginSet
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-WKU7TY22.js";
|
|
10
10
|
import {
|
|
11
11
|
loadAppPluginSet
|
|
12
12
|
} from "../chunk-Y2CM7HXH.js";
|
|
@@ -14,29 +14,31 @@ import {
|
|
|
14
14
|
createPluginLogger,
|
|
15
15
|
setPlugins,
|
|
16
16
|
validatePlugins
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-VZCSLYCE.js";
|
|
18
|
+
import "../chunk-53ZKTQO6.js";
|
|
19
|
+
import "../chunk-CI3VK7X5.js";
|
|
20
20
|
import {
|
|
21
21
|
getDb
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
} from "../chunk-KBNDFU6J.js";
|
|
23
|
+
import "../chunk-RXRQJF7Y.js";
|
|
24
24
|
import "../chunk-4ZNGQH7C.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-PZGPCOSD.js";
|
|
26
26
|
import "../chunk-VFUK3X5B.js";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-FXOYURO4.js";
|
|
28
28
|
import {
|
|
29
29
|
pluginCatalogRuntime
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-25GU5B5E.js";
|
|
31
|
+
import "../chunk-JZPQ5K4V.js";
|
|
32
|
+
import "../chunk-W3U3YQYI.js";
|
|
33
|
+
import "../chunk-HZF5P5UN.js";
|
|
34
|
+
import "../chunk-3JOGUT46.js";
|
|
35
|
+
import "../chunk-OB42YVAE.js";
|
|
36
|
+
import "../chunk-F3B2YJ76.js";
|
|
35
37
|
import "../chunk-6GWA276C.js";
|
|
36
38
|
import "../chunk-B3IT5END.js";
|
|
37
39
|
import "../chunk-3V7OFJZC.js";
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-N7TMYLF2.js";
|
|
41
|
+
import "../chunk-MGH5ADQS.js";
|
|
40
42
|
import "../chunk-MLKGABMK.js";
|
|
41
43
|
|
|
42
44
|
// src/cli/plugins.ts
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GLOBAL_RUNTIME_DEPENDENCIES,
|
|
3
3
|
resolveRuntimeDependencySnapshot
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-3H45VOBZ.js";
|
|
5
5
|
import {
|
|
6
6
|
disconnectStateAdapter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-53ZKTQO6.js";
|
|
8
8
|
import "../chunk-4ZNGQH7C.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-PZGPCOSD.js";
|
|
10
|
+
import "../chunk-FXOYURO4.js";
|
|
11
11
|
import {
|
|
12
12
|
pluginCatalogRuntime
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-25GU5B5E.js";
|
|
14
|
+
import "../chunk-JZPQ5K4V.js";
|
|
15
|
+
import "../chunk-W3U3YQYI.js";
|
|
16
|
+
import "../chunk-HZF5P5UN.js";
|
|
17
|
+
import "../chunk-3JOGUT46.js";
|
|
18
|
+
import "../chunk-OB42YVAE.js";
|
|
19
|
+
import "../chunk-F3B2YJ76.js";
|
|
18
20
|
import "../chunk-6GWA276C.js";
|
|
19
21
|
import "../chunk-B3IT5END.js";
|
|
20
22
|
import "../chunk-3V7OFJZC.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-N7TMYLF2.js";
|
|
24
|
+
import "../chunk-MGH5ADQS.js";
|
|
23
25
|
import "../chunk-MLKGABMK.js";
|
|
24
26
|
|
|
25
27
|
// src/cli/snapshot-warmup.ts
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -2,29 +2,31 @@ import {
|
|
|
2
2
|
defineJuniorPlugins,
|
|
3
3
|
pluginCatalogConfigFromEnv,
|
|
4
4
|
pluginCatalogConfigFromPluginSet
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-WKU7TY22.js";
|
|
6
6
|
import {
|
|
7
7
|
loadAppPluginSet
|
|
8
8
|
} from "../chunk-Y2CM7HXH.js";
|
|
9
9
|
import {
|
|
10
10
|
createJuniorSqlExecutor
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-RXRQJF7Y.js";
|
|
12
12
|
import {
|
|
13
13
|
getChatConfig
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-PZGPCOSD.js";
|
|
15
15
|
import "../chunk-VFUK3X5B.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-FXOYURO4.js";
|
|
17
17
|
import {
|
|
18
18
|
createPluginCatalogRuntime
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-JZPQ5K4V.js";
|
|
20
|
+
import "../chunk-W3U3YQYI.js";
|
|
21
|
+
import "../chunk-HZF5P5UN.js";
|
|
22
|
+
import "../chunk-3JOGUT46.js";
|
|
23
|
+
import "../chunk-OB42YVAE.js";
|
|
24
|
+
import "../chunk-F3B2YJ76.js";
|
|
23
25
|
import "../chunk-6GWA276C.js";
|
|
24
26
|
import "../chunk-B3IT5END.js";
|
|
25
27
|
import "../chunk-3V7OFJZC.js";
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-N7TMYLF2.js";
|
|
29
|
+
import "../chunk-MGH5ADQS.js";
|
|
28
30
|
import "../chunk-MLKGABMK.js";
|
|
29
31
|
|
|
30
32
|
// src/chat/conversations/sql/migrations.ts
|