@sentry/junior 0.190.0 → 0.191.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-3IG2FQW2.js → agent-hooks-HIWWBBKO.js} +11 -11
- package/dist/api.js +24 -24
- package/dist/app.js +92 -129
- package/dist/{catalog-runtime-2OT7S3ZC.js → catalog-runtime-4OKH4265.js} +4 -4
- package/dist/chat/agent/resume.d.ts +0 -1
- package/dist/chat/agent/types.d.ts +0 -1
- package/dist/chat/agent-invocations/types.d.ts +4 -4
- package/dist/chat/providers/slack/runtime.d.ts +1 -2
- package/dist/chat/providers/slack/system-turn.d.ts +9 -4
- package/dist/chat/providers/slack/turn.d.ts +0 -1
- package/dist/chat/services/turn-router.d.ts +1 -1
- package/dist/chat/slack/dispatch-turn.d.ts +0 -1
- package/dist/chat/slack/timestamp-param.d.ts +1 -1
- package/dist/chat/task-execution/assistant-message.d.ts +7 -7
- package/dist/chat/task-execution/checkpoint.d.ts +0 -1
- package/dist/chat/task-execution/conversation-turn.d.ts +2 -2
- package/dist/chat/task-execution/state.d.ts +0 -3
- package/dist/chat/task-execution/store.d.ts +0 -1
- package/dist/chat/task-execution/turn-cursor.d.ts +0 -2
- package/dist/chat/task-execution/worker.d.ts +0 -1
- package/dist/{chunk-VWNIDTFR.js → chunk-2JAWOTUT.js} +2 -2
- package/dist/{chunk-YFU4DGZY.js → chunk-3PDR63SX.js} +30 -9
- package/dist/{chunk-4BLFIYVK.js → chunk-5IMKUVMS.js} +8 -11
- package/dist/{chunk-REVH4BZU.js → chunk-6KISW5UY.js} +2 -2
- package/dist/{chunk-HI5KXE3C.js → chunk-7PYCRKQL.js} +3 -3
- package/dist/{chunk-OJFX2FP7.js → chunk-AWFSSFAX.js} +9 -11
- package/dist/{chunk-3J3BCB4J.js → chunk-BVWC5DBM.js} +1 -1
- package/dist/{chunk-DVX6U6GI.js → chunk-BVYUIVXE.js} +1 -1
- package/dist/{chunk-IRQ3RSX3.js → chunk-CCPOZMS4.js} +3 -3
- package/dist/{chunk-FVFJ57RK.js → chunk-CECRMPXJ.js} +9 -8
- package/dist/{chunk-2MKHYSYL.js → chunk-CUUE5MGF.js} +3 -3
- package/dist/{chunk-BUJU6C2J.js → chunk-DP6H3U2X.js} +1 -1
- package/dist/{chunk-4PKEJK5B.js → chunk-EQZUBYRF.js} +1 -1
- package/dist/{chunk-GWCFXTB6.js → chunk-GQN4REF5.js} +6 -6
- package/dist/{chunk-OYCOLHCR.js → chunk-HNMRX2EN.js} +5 -5
- package/dist/{chunk-7Y7XMI6P.js → chunk-K2NKG42A.js} +5 -5
- package/dist/{chunk-BGOLRC36.js → chunk-KTW62MG5.js} +13 -11
- package/dist/{chunk-Y4WL4OYD.js → chunk-L4JLLS6C.js} +1 -1
- package/dist/{chunk-62DRKZQU.js → chunk-LOYTPSAK.js} +4 -4
- package/dist/{chunk-7UJ6IJCK.js → chunk-MFZOIKET.js} +1 -1
- package/dist/{chunk-2MRF22J4.js → chunk-NK3UEKAW.js} +6 -6
- package/dist/{chunk-DJZGQ7OL.js → chunk-NY5SJGJZ.js} +22 -29
- package/dist/{chunk-ECOR3OXY.js → chunk-Q32BSFN4.js} +8 -8
- package/dist/{chunk-663DQH5W.js → chunk-QRNJO7DZ.js} +1 -1
- package/dist/{chunk-CZXZKTAI.js → chunk-RZS4F5K4.js} +3 -3
- package/dist/{chunk-OKAHLUSU.js → chunk-S7NSFCCW.js} +3 -3
- package/dist/{chunk-ZFCO2TMB.js → chunk-SEIZ2XLD.js} +1 -1
- package/dist/{chunk-W2C4TPLB.js → chunk-SGRL7NV6.js} +5 -5
- package/dist/{chunk-6H7YU6XH.js → chunk-TH6LMEOW.js} +1 -1
- package/dist/{chunk-F3K2267N.js → chunk-VGYZ3YZM.js} +77 -35
- package/dist/{chunk-T66GV7A3.js → chunk-WBNQYVCM.js} +2 -2
- package/dist/{chunk-67MMSYSE.js → chunk-WCSXTDOL.js} +1 -1
- package/dist/{chunk-YKIAUKYH.js → chunk-WNIVCR74.js} +2 -2
- package/dist/{chunk-RLYJYEIY.js → chunk-X6PQKQTY.js} +5 -7
- package/dist/{chunk-6BXUSF7J.js → chunk-YNRLCUCB.js} +1 -1
- package/dist/{chunk-MNHJ4WLE.js → chunk-ZJRGWZZ2.js} +3 -3
- package/dist/{chunk-JV7U4665.js → chunk-ZNFNGDT7.js} +1 -1
- package/dist/{chunk-OON4IQHH.js → chunk-ZRN3OS7M.js} +1 -1
- 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-2IFDMDDY.js → db-LG4ZEWA3.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-SZSS2KH6.js → oauth-callback-server-KI7ZRTOG.js} +29 -29
- package/dist/{runner-2N4QU77X.js → runner-K2EOSAZQ.js} +21 -21
- package/dist/{skills-VU2LZAKX.js → skills-JTRDFKMA.js} +5 -5
- package/dist/spawn-SRBETYCF.js +42 -0
- package/dist/task-runner-INQIQ4VF.js +36 -0
- package/dist/{validation-IJGHK7NI.js → validation-NBWURHAP.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-DI45MLRL.js → work-35TBEAUI.js} +21 -21
- package/dist/{worker-FY7KWG2M.js → worker-F762M6XM.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-3K7RV4T5.js +0 -42
- package/dist/task-runner-52DYFHW3.js +0 -36
|
@@ -39,7 +39,6 @@ interface SteeringDrainContext {
|
|
|
39
39
|
export interface SlackTurnOptions extends ReplyHooks {
|
|
40
40
|
conversationId?: string;
|
|
41
41
|
destination: Destination;
|
|
42
|
-
publishExternally?: boolean;
|
|
43
42
|
}
|
|
44
43
|
export interface SlackTurnRuntimeDependencies<TPreparedState> {
|
|
45
44
|
assistantUserName: string;
|
|
@@ -98,7 +97,6 @@ export interface SlackTurnRuntimeDependencies<TPreparedState> {
|
|
|
98
97
|
onTurnStatePersisted?: () => Promise<void>;
|
|
99
98
|
preparedState?: TPreparedState;
|
|
100
99
|
queuedMessages?: QueuedTurnMessage[];
|
|
101
|
-
publishExternally?: boolean;
|
|
102
100
|
drainSteeringMessages?: (accept: (messages: QueuedTurnMessage[]) => Promise<void>, context?: SteeringDrainContext) => Promise<QueuedTurnMessage[]>;
|
|
103
101
|
shouldYield?: () => boolean;
|
|
104
102
|
}) => Promise<void>;
|
|
@@ -111,5 +109,6 @@ export interface SlackTurnRuntime<_TPreparedState, TAssistantEvent extends Assis
|
|
|
111
109
|
/** Webhook entry for subscribed Slack Message traffic. */
|
|
112
110
|
handleSubscribedMessage: (thread: Thread, message: Message, hooks: SlackTurnOptions) => Promise<void>;
|
|
113
111
|
}
|
|
112
|
+
/** Build the Slack event runtime that routes mentions and subscribed messages. */
|
|
114
113
|
export declare function createSlackTurnRuntime<TPreparedState, TAssistantEvent extends AssistantLifecycleEvent = AssistantLifecycleEvent>(deps: SlackTurnRuntimeDependencies<TPreparedState>): SlackTurnRuntime<TPreparedState, TAssistantEvent>;
|
|
115
114
|
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { SlackAdapter } from "@chat-adapter/slack";
|
|
2
2
|
import type { StateAdapter } from "chat";
|
|
3
|
-
import type {
|
|
4
|
-
/**
|
|
5
|
-
|
|
3
|
+
import type { DeliverMessage } from "@/chat/task-execution/assistant-message";
|
|
4
|
+
/**
|
|
5
|
+
* Deliver system Turn output to Slack without a webhook Message.
|
|
6
|
+
*
|
|
7
|
+
* TODO(dcramer): Replace this Location-taking function with Delivery bound to one
|
|
8
|
+
* Location after Resource event work supplies Delivery before the Run.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createSlackSystemTurnDelivery(args: {
|
|
6
11
|
getSlackAdapter: () => SlackAdapter;
|
|
7
12
|
state?: StateAdapter;
|
|
8
|
-
}):
|
|
13
|
+
}): DeliverMessage;
|
|
@@ -49,7 +49,6 @@ export declare function createSlackTurn(deps: SlackTurnDeps): (thread: Thread, m
|
|
|
49
49
|
onTurnStatePersisted?: () => Promise<void>;
|
|
50
50
|
preparedState?: PreparedTurnState;
|
|
51
51
|
queuedMessages?: QueuedTurnMessage[];
|
|
52
|
-
publishExternally?: boolean;
|
|
53
52
|
execution?: DispatchTurnContext;
|
|
54
53
|
skipBackfill?: boolean;
|
|
55
54
|
drainSteeringMessages?: (accept: (messages: QueuedTurnMessage[]) => Promise<void>, context?: {
|
|
@@ -12,7 +12,7 @@ declare function createTurnRouteSchema(profiles: Readonly<Record<string, ModelPr
|
|
|
12
12
|
none: "none";
|
|
13
13
|
}>;
|
|
14
14
|
profile: z.ZodString;
|
|
15
|
-
confidence: z.ZodPreprocess<z.ZodNumber>;
|
|
15
|
+
confidence: z.ZodPreprocess<z.ZodNumber, unknown>;
|
|
16
16
|
reason: z.ZodString;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
export interface TurnRoute {
|
|
@@ -7,7 +7,6 @@ type ExecuteSlackTurn = (thread: ThreadImpl, message: Message, options: {
|
|
|
7
7
|
conversationId?: string;
|
|
8
8
|
destination: DispatchRecord["destination"];
|
|
9
9
|
execution: DispatchTurnContext;
|
|
10
|
-
publishExternally?: boolean;
|
|
11
10
|
onTurnDeliveryAccepted?: (messageId?: string) => void;
|
|
12
11
|
onTurnOutcome?: (result: DispatchTurnResult) => void;
|
|
13
12
|
shouldYield?: () => boolean;
|
|
@@ -15,7 +15,7 @@ type RequiredSlackTimestampParamResult = {
|
|
|
15
15
|
error: string;
|
|
16
16
|
};
|
|
17
17
|
/** Define a model-facing Slack timestamp, normalizing numeric model args to strings. */
|
|
18
|
-
export declare function slackTimestampParam(description: string): z.ZodPreprocess<z.ZodString>;
|
|
18
|
+
export declare function slackTimestampParam(description: string): z.ZodPreprocess<z.ZodString, unknown>;
|
|
19
19
|
/** Parse tool input into a branded Slack timestamp before provider calls. */
|
|
20
20
|
export declare function parseSlackTimestampParam(field: string, value: string | number | undefined): SlackTimestampParamResult;
|
|
21
21
|
/** Parse a required tool input timestamp into a branded Slack timestamp. */
|
|
@@ -2,29 +2,29 @@ import type { AssistantMessage } from "@earendil-works/pi-ai";
|
|
|
2
2
|
import type { Location } from "@/chat/conversations/location";
|
|
3
3
|
import type { ProviderConversationReference } from "@/chat/conversations/sql/bindings";
|
|
4
4
|
import type { ThreadConversationState } from "@/chat/state/conversation";
|
|
5
|
-
/** Facts returned after
|
|
6
|
-
export type
|
|
5
|
+
/** Facts returned after provider Delivery. */
|
|
6
|
+
export type DeliveryResult = {
|
|
7
7
|
providerMessageId?: string;
|
|
8
8
|
providerConversationBindings?: ProviderConversationReference[];
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Deliver one Message through the provider that owns its Location.
|
|
12
12
|
*
|
|
13
|
-
* TODO(dcramer): Delete
|
|
13
|
+
* TODO(dcramer): Delete DeliveryResult and DeliverMessage after the core Turn
|
|
14
14
|
* lifecycle stores completed assistant Messages and the mailbox worker can
|
|
15
15
|
* accept provider Delivery directly.
|
|
16
16
|
*/
|
|
17
|
-
export type
|
|
17
|
+
export type DeliverMessage = (input: {
|
|
18
18
|
conversationId: string;
|
|
19
19
|
location: Location;
|
|
20
20
|
text: string;
|
|
21
|
-
}) => Promise<
|
|
21
|
+
}) => Promise<DeliveryResult>;
|
|
22
22
|
/** Store one assistant Message and its Agent history. */
|
|
23
23
|
export declare function commitAssistantMessage(args: {
|
|
24
24
|
agentMessage?: AssistantMessage;
|
|
25
25
|
conversation: ThreadConversationState;
|
|
26
26
|
conversationId: string;
|
|
27
|
-
|
|
27
|
+
deliveryResult?: DeliveryResult;
|
|
28
28
|
sessionId: string;
|
|
29
29
|
source?: "slack" | "web";
|
|
30
30
|
text: string;
|
|
@@ -46,7 +46,6 @@ interface TurnCheckpointWrite {
|
|
|
46
46
|
destinationVisibility?: ConversationPrivacy;
|
|
47
47
|
dispatchId?: string;
|
|
48
48
|
dispatchOutcome?: AgentDispatchOutcome;
|
|
49
|
-
publishExternally?: boolean;
|
|
50
49
|
source?: Source;
|
|
51
50
|
surface?: AgentTurnSurface;
|
|
52
51
|
turnStartMessageIndex?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type DeliverMessage } from "@/chat/task-execution/assistant-message";
|
|
2
2
|
import type { AgentRunner } from "@/chat/runtime/agent-runner";
|
|
3
3
|
import type { ConversationWorkerContext, ConversationWorkerResult } from "@/chat/task-execution/worker";
|
|
4
4
|
import { type MailboxTurnWork } from "@/chat/task-execution/mailbox-turn";
|
|
5
5
|
/**
|
|
6
6
|
* Create the shared mailbox worker for web and resource-event Turns.
|
|
7
7
|
*/
|
|
8
|
-
export declare function createConversationTurnWorker(agentRunner: AgentRunner,
|
|
8
|
+
export declare function createConversationTurnWorker(agentRunner: AgentRunner, deliverMessage?: DeliverMessage): (context: ConversationWorkerContext, resolved: MailboxTurnWork) => Promise<ConversationWorkerResult>;
|
|
@@ -38,8 +38,6 @@ export declare const inboundMessageDeliverySchema: z.ZodEnum<{
|
|
|
38
38
|
defer: "defer";
|
|
39
39
|
interrupt: "interrupt";
|
|
40
40
|
}>;
|
|
41
|
-
/** Whether this turn also publishes assistant output to the conversation destination. */
|
|
42
|
-
export declare const publishExternallySchema: z.ZodBoolean;
|
|
43
41
|
export type InboundMessageDelivery = z.output<typeof inboundMessageDeliverySchema>;
|
|
44
42
|
/** Canonical durable mailbox entry owned by task execution. */
|
|
45
43
|
export declare const inboundMessageSchema: z.ZodObject<{
|
|
@@ -67,7 +65,6 @@ export declare const inboundMessageSchema: z.ZodObject<{
|
|
|
67
65
|
text: z.ZodString;
|
|
68
66
|
}, z.core.$strict>;
|
|
69
67
|
receivedAtMs: z.ZodNumber;
|
|
70
|
-
publishExternally: z.ZodBoolean;
|
|
71
68
|
source: z.ZodEnum<{
|
|
72
69
|
slack: "slack";
|
|
73
70
|
local: "local";
|
|
@@ -138,7 +138,6 @@ export declare function drainConversationMailbox(args: Parameters<typeof workSta
|
|
|
138
138
|
metadata?: Record<string, unknown> | undefined;
|
|
139
139
|
};
|
|
140
140
|
receivedAtMs: number;
|
|
141
|
-
publishExternally: boolean;
|
|
142
141
|
source: "slack" | "local" | "web" | "resource_event" | "plugin" | "api" | "scheduler" | "internal";
|
|
143
142
|
attemptCount?: number | undefined;
|
|
144
143
|
destination?: {
|
|
@@ -50,7 +50,6 @@ export interface TurnRecord {
|
|
|
50
50
|
*/
|
|
51
51
|
actors: Actor[];
|
|
52
52
|
resumeReason?: TurnPauseReason;
|
|
53
|
-
publishExternally?: boolean;
|
|
54
53
|
/** Input that started this Turn; absent only on stored legacy cursors. */
|
|
55
54
|
source?: Source;
|
|
56
55
|
resumedFromSliceId?: number;
|
|
@@ -106,7 +105,6 @@ export declare function upsertTurnRecord(args: {
|
|
|
106
105
|
trailingMessageProvenance?: ConversationMessageProvenance[];
|
|
107
106
|
actor?: Actor;
|
|
108
107
|
resumeReason?: TurnPauseReason;
|
|
109
|
-
publishExternally?: boolean;
|
|
110
108
|
errorMessage?: string;
|
|
111
109
|
resumedFromSliceId?: number;
|
|
112
110
|
traceId?: string;
|
|
@@ -9,7 +9,6 @@ export interface ConversationWorkerContext {
|
|
|
9
9
|
checkIn(): Promise<boolean>;
|
|
10
10
|
conversationId: string;
|
|
11
11
|
destination?: Destination;
|
|
12
|
-
publishExternally: boolean;
|
|
13
12
|
/** True when the current execution slice must stop at its next safe boundary. */
|
|
14
13
|
shouldYield(): boolean;
|
|
15
14
|
/** Return an AbortSignal backed by the durable Conversation stop request. */
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
toCanonicalInputMessage,
|
|
8
8
|
toCanonicalOutputMessage,
|
|
9
9
|
toGenAiMessagesTraceAttributes
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BVYUIVXE.js";
|
|
11
11
|
import {
|
|
12
12
|
extractGenAiUsageAttributes,
|
|
13
13
|
logException,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
normalizeGenAiFinishReason,
|
|
16
16
|
serializeGenAiAttribute,
|
|
17
17
|
withSpan
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L4JLLS6C.js";
|
|
19
19
|
|
|
20
20
|
// src/chat/services/provider-error.ts
|
|
21
21
|
var ProviderError = class extends Error {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-S7NSFCCW.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YNRLCUCB.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2JAWOTUT.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-L4JLLS6C.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -81,7 +81,6 @@ var agentInputSchema = z.object({
|
|
|
81
81
|
message: "agent input requires text or attachments"
|
|
82
82
|
});
|
|
83
83
|
var inboundMessageDeliverySchema = z.enum(["defer", "interrupt"]);
|
|
84
|
-
var publishExternallySchema = z.boolean();
|
|
85
84
|
var inboundMessageSchema = z.object({
|
|
86
85
|
attemptCount: z.number().finite().optional(),
|
|
87
86
|
conversationId: z.string().refine((value) => value.trim().length > 0),
|
|
@@ -92,9 +91,11 @@ var inboundMessageSchema = z.object({
|
|
|
92
91
|
injectedAtMs: z.number().finite().optional(),
|
|
93
92
|
input: agentInputSchema,
|
|
94
93
|
receivedAtMs: z.number().finite(),
|
|
95
|
-
publishExternally: publishExternallySchema,
|
|
96
94
|
source: inboundMessageSourceSchema
|
|
97
95
|
}).strict();
|
|
96
|
+
var storedInboundMessageSchema = inboundMessageSchema.extend({
|
|
97
|
+
publishExternally: z.boolean()
|
|
98
|
+
});
|
|
98
99
|
function conversationKey(conversationId) {
|
|
99
100
|
return `${CONVERSATION_PREFIX}:${conversationId}`;
|
|
100
101
|
}
|
|
@@ -148,8 +149,15 @@ function normalizeExecutionStatus(value) {
|
|
|
148
149
|
return void 0;
|
|
149
150
|
}
|
|
150
151
|
function normalizeMessage(value) {
|
|
151
|
-
const parsed =
|
|
152
|
-
|
|
152
|
+
const parsed = storedInboundMessageSchema.safeParse(value);
|
|
153
|
+
if (!parsed.success) {
|
|
154
|
+
return void 0;
|
|
155
|
+
}
|
|
156
|
+
const { publishExternally: _publishExternally, ...message } = parsed.data;
|
|
157
|
+
return message;
|
|
158
|
+
}
|
|
159
|
+
function storeMessage(message, publishExternally) {
|
|
160
|
+
return { ...message, publishExternally };
|
|
153
161
|
}
|
|
154
162
|
function isFinalAttempt(message) {
|
|
155
163
|
return (message.attemptCount ?? 0) >= CONVERSATION_WORK_MAX_DELIVERY_ATTEMPTS - 1;
|
|
@@ -612,9 +620,22 @@ async function writeConversation(state, lock, conversation) {
|
|
|
612
620
|
if (!fenced) {
|
|
613
621
|
throw new ConversationMutationFencedError(next.conversationId);
|
|
614
622
|
}
|
|
623
|
+
const hasSlackDestination = next.destination?.platform === "slack";
|
|
624
|
+
const stored = {
|
|
625
|
+
...next,
|
|
626
|
+
execution: {
|
|
627
|
+
...next.execution,
|
|
628
|
+
pendingMessages: next.execution.pendingMessages.map(
|
|
629
|
+
(message) => storeMessage(
|
|
630
|
+
message,
|
|
631
|
+
hasSlackDestination && (message.source === "slack" || message.source === "resource_event" || message.source === "plugin" || message.source === "scheduler")
|
|
632
|
+
)
|
|
633
|
+
)
|
|
634
|
+
}
|
|
635
|
+
};
|
|
615
636
|
await state.set(
|
|
616
637
|
conversationKey(next.conversationId),
|
|
617
|
-
|
|
638
|
+
stored,
|
|
618
639
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
619
640
|
);
|
|
620
641
|
await upsertIndexEntry({
|
|
@@ -3,39 +3,39 @@ import {
|
|
|
3
3
|
} from "./chunk-UTL3MHPC.js";
|
|
4
4
|
import {
|
|
5
5
|
parseSlackThreadId
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DP6H3U2X.js";
|
|
7
7
|
import {
|
|
8
8
|
appendAndEnqueueExclusiveInboundMessage,
|
|
9
9
|
appendAndEnqueueInboundMessage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3PDR63SX.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDeterministicTurnId
|
|
13
13
|
} from "./chunk-DA2KGZZI.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeSlackConversationId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NK3UEKAW.js";
|
|
17
17
|
import {
|
|
18
18
|
getConversationStore,
|
|
19
19
|
getDb
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-S7NSFCCW.js";
|
|
21
21
|
import {
|
|
22
22
|
juniorConversationParticipants,
|
|
23
23
|
juniorConversations,
|
|
24
24
|
juniorIdentities,
|
|
25
25
|
juniorUsers
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SEIZ2XLD.js";
|
|
27
27
|
import {
|
|
28
28
|
juniorDestinations
|
|
29
29
|
} from "./chunk-VFUK3X5B.js";
|
|
30
30
|
import {
|
|
31
31
|
getSlackBotToken
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-2JAWOTUT.js";
|
|
33
33
|
import {
|
|
34
34
|
canExposeConversationPayload
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-BVYUIVXE.js";
|
|
36
36
|
import {
|
|
37
37
|
logWarn
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-L4JLLS6C.js";
|
|
39
39
|
|
|
40
40
|
// src/handlers/health.ts
|
|
41
41
|
function readHealthReport() {
|
|
@@ -398,9 +398,6 @@ function buildWebInboundMessage(args) {
|
|
|
398
398
|
}
|
|
399
399
|
},
|
|
400
400
|
receivedAtMs: nowMs,
|
|
401
|
-
// TODO(dcramer): Rename this stored field to publish after deployed
|
|
402
|
-
// mailbox readers and writers use the new name.
|
|
403
|
-
publishExternally: false,
|
|
404
401
|
// TODO(dcramer): Replace this string after deployed mailbox readers and
|
|
405
402
|
// writers use a complete web Source.
|
|
406
403
|
source: "web"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EQZUBYRF.js";
|
|
4
4
|
import {
|
|
5
5
|
skillRoots
|
|
6
6
|
} from "./chunk-TXKUKMVO.js";
|
|
7
7
|
import {
|
|
8
8
|
logWarn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L4JLLS6C.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/skills.ts
|
|
12
12
|
import fs from "fs/promises";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toOptionalTrimmed
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2JAWOTUT.js";
|
|
4
4
|
import {
|
|
5
5
|
pluginCatalogRuntime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EQZUBYRF.js";
|
|
7
7
|
import {
|
|
8
8
|
setSpanAttributes,
|
|
9
9
|
setSpanStatus
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L4JLLS6C.js";
|
|
11
11
|
|
|
12
12
|
// src/chat/sandbox/paths.ts
|
|
13
13
|
function normalizeWorkspaceRoot(input) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRunError,
|
|
3
3
|
executeTurn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CCPOZMS4.js";
|
|
5
5
|
import {
|
|
6
6
|
ConversationTurnLifecycleService
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TH6LMEOW.js";
|
|
8
8
|
import {
|
|
9
9
|
getPersistedSandboxState,
|
|
10
10
|
getPersistedThreadState,
|
|
11
11
|
persistThreadStateById
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SGRL7NV6.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-HNMRX2EN.js";
|
|
22
22
|
import {
|
|
23
23
|
TurnInputCommitLostError,
|
|
24
24
|
getAssistantReplyText,
|
|
25
25
|
getConversationTurnBoundaryError,
|
|
26
26
|
isTurnInputCommitLostError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-WCSXTDOL.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-KTW62MG5.js";
|
|
35
35
|
import {
|
|
36
36
|
appendAndEnqueueInboundMessage
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3PDR63SX.js";
|
|
38
38
|
import {
|
|
39
39
|
getConversationEventStore,
|
|
40
40
|
getConversationStore,
|
|
41
41
|
getSqlExecutor
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-S7NSFCCW.js";
|
|
43
43
|
import {
|
|
44
44
|
juniorAgentBindings,
|
|
45
45
|
juniorAgentInvocations
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-SEIZ2XLD.js";
|
|
47
47
|
|
|
48
48
|
// src/chat/agent-invocations/work.ts
|
|
49
49
|
import { z } from "zod";
|
|
@@ -314,7 +314,6 @@ function buildAgentInvocationInboundMessage(invocation, nowMs = Date.now()) {
|
|
|
314
314
|
}
|
|
315
315
|
},
|
|
316
316
|
receivedAtMs: nowMs,
|
|
317
|
-
publishExternally: false,
|
|
318
317
|
source: "internal"
|
|
319
318
|
};
|
|
320
319
|
}
|
|
@@ -590,7 +589,6 @@ function createAgentInvocationWorker(agentRunner) {
|
|
|
590
589
|
actor: invocation.actor,
|
|
591
590
|
credentialContext: invocation.credentialContext,
|
|
592
591
|
destination: invocation.destination,
|
|
593
|
-
publishExternally: context.publishExternally,
|
|
594
592
|
source: invocation.source,
|
|
595
593
|
...location ? { location } : void 0,
|
|
596
594
|
surface: "internal",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConversationTurnLifecycleService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TH6LMEOW.js";
|
|
4
4
|
import {
|
|
5
5
|
runAgentWithTimeout
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GQN4REF5.js";
|
|
7
7
|
import {
|
|
8
8
|
getConversationEventStore
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S7NSFCCW.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/runtime/turn-execution.ts
|
|
12
12
|
var AgentRunError = class extends Error {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveBaseUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GQN4REF5.js";
|
|
4
4
|
import {
|
|
5
5
|
createPluginLogger,
|
|
6
6
|
getPlugins,
|
|
7
7
|
getSlackClient,
|
|
8
8
|
withSlackRetries
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NK3UEKAW.js";
|
|
10
10
|
import {
|
|
11
11
|
getDb,
|
|
12
12
|
parseDestination
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-S7NSFCCW.js";
|
|
14
14
|
import {
|
|
15
15
|
sleep
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7PYCRKQL.js";
|
|
17
17
|
import {
|
|
18
18
|
acquireActiveLock,
|
|
19
19
|
getStateAdapter
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YNRLCUCB.js";
|
|
21
21
|
import {
|
|
22
22
|
pluginCatalogRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EQZUBYRF.js";
|
|
24
24
|
import {
|
|
25
25
|
fetchWithBoundedOAuthErrorBodies
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QRNJO7DZ.js";
|
|
27
27
|
import {
|
|
28
28
|
isRecord
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-L4JLLS6C.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/capabilities/router.ts
|
|
32
32
|
var ProviderCredentialRouter = class {
|
|
@@ -1155,6 +1155,7 @@ export {
|
|
|
1155
1155
|
deleteMcpAuthSession,
|
|
1156
1156
|
deleteMcpAuthSessionsForUserProvider,
|
|
1157
1157
|
getMcpStoredOAuthCredentials,
|
|
1158
|
+
putMcpStoredOAuthCredentials,
|
|
1158
1159
|
deleteMcpStoredOAuthCredentials,
|
|
1159
1160
|
deleteMcpServerSessionId,
|
|
1160
1161
|
createMcpOAuthClientProvider,
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
isStale,
|
|
7
7
|
runNonInteractiveCommand,
|
|
8
8
|
sleep
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7PYCRKQL.js";
|
|
10
10
|
import {
|
|
11
11
|
getStateAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YNRLCUCB.js";
|
|
13
13
|
import {
|
|
14
14
|
setSpanAttributes,
|
|
15
15
|
withSpan
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-L4JLLS6C.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-NK3UEKAW.js";
|
|
12
12
|
import {
|
|
13
13
|
parseDestination
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-S7NSFCCW.js";
|
|
15
15
|
import {
|
|
16
16
|
getStateAdapter
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YNRLCUCB.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeSlackEmojiName
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2JAWOTUT.js";
|
|
21
21
|
import {
|
|
22
22
|
pluginCatalogRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EQZUBYRF.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-L4JLLS6C.js";
|
|
33
33
|
|
|
34
34
|
// src/chat/agent/types.ts
|
|
35
35
|
var RetryableDeliveryError = class extends Error {
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
formatProviderLabel,
|
|
9
9
|
startOAuthFlow
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GQN4REF5.js";
|
|
11
11
|
import {
|
|
12
12
|
abandonReplacedPendingAuth,
|
|
13
13
|
canReusePendingAuthLink
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WCSXTDOL.js";
|
|
15
15
|
import {
|
|
16
16
|
recordAuthorizationRequested
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KTW62MG5.js";
|
|
18
18
|
import {
|
|
19
19
|
AGENT_INVOCATION_MAILBOX_STATUSES
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-SEIZ2XLD.js";
|
|
21
21
|
import {
|
|
22
22
|
TURN_REASONING_LEVELS
|
|
23
23
|
} from "./chunk-D4YV5TDV.js";
|
|
24
24
|
import {
|
|
25
25
|
pluginCatalogRuntime
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EQZUBYRF.js";
|
|
27
27
|
import {
|
|
28
28
|
credentialContextSchema
|
|
29
29
|
} from "./chunk-CEMMLV5L.js";
|