@sentry/junior 0.267.0 → 0.268.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/{actor-DZSokpwj.js → actor-CP9K2Idu.js} +2 -1
- package/dist/{adapter-BybMEezj.js → adapter-04AcD2SO.js} +4 -6
- package/dist/{admin-DOs1_EiW.js → admin-DIU1QyG3.js} +1 -1
- package/dist/{agent-invocations-CxKldAeB.js → agent-invocations-C1RNOCs8.js} +2 -0
- package/dist/{agent-runner-DgNATN4D.js → agent-runner-CAYfFmU7.js} +4409 -3020
- package/dist/api/schema.d.ts +2 -5629
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +1 -1
- package/dist/api.js +154 -32
- package/dist/{app-DAB3fzyp.d.ts → app-z6Uuyq3j.d.ts} +3 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +332 -98
- package/dist/{briefs-CWKjka7v.js → briefs-DQbV2jNr.js} +2 -2
- package/dist/{catalog-runtime-cMlAI5LY.js → catalog-runtime-BD9GSpc6.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- 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-BjgbMawj.js → client-C1yDYjoS.js} +2 -2
- package/dist/{config-CdB6yJj5.js → config-DrTeF80T.js} +2 -2
- package/dist/{connections-RE_65jzK.js → connections-D46f8vvi.js} +10 -11
- package/dist/{conversation-privacy-BzgJC5k0.js → conversation-privacy-CxlOCiUo.js} +1 -1
- package/dist/{credential-sync-DhEGEpgq.js → credential-sync-sm9fegLY.js} +29 -34
- package/dist/{credentialed-CIGwoLU2.js → credentialed-lukuD-cc.js} +39 -13
- package/dist/db-BU4LQD8s.d.ts +6 -0
- package/dist/{executor-VYrx_K4w.js → executor-4vhvsMZJ.js} +78 -4
- package/dist/instrumentation.js +2 -2
- package/dist/{assistant-reply-CT7VcXQe.js → interruption-marker-CkncDT8d.js} +8 -2
- package/dist/{job-queue-C0BZSa7r.js → job-queue-In9QKz-I.js} +2 -2
- package/dist/{list-1XQP-o6K.js → list-BkgnXEEB.js} +298 -807
- package/dist/{logging-DuZ1A4ab.js → logging-DLSpkSSr.js} +1 -1
- package/dist/{message-NKSbbnA6.js → message-BObyg59s.js} +4 -4
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-qAHLPtml.js → oauth-callback-server-B-WbSdoH.js} +2 -2
- package/dist/{registry-FQutO926.js → registry-BgecKva0.js} +2 -2
- package/dist/{web-message-id-CJSUiksE.js → reporting-window-DVCD_10C.js} +1 -10
- package/dist/{resolve-Bk4yeuHy.js → resolve-Cpa4Bu1O.js} +3 -3
- package/dist/{result-B9e9ATOU.js → result-D3TSmZZ8.js} +8 -8
- package/dist/{runner-C3S2ObH-.js → runner-DS5OKhEp.js} +10 -10
- package/dist/{sandbox-egress-signals-DqpGzzMB.js → sandbox-egress-signals-CnDjY5rx.js} +1 -1
- package/dist/{schema-X7Fj4fv1.js → schema-0050HFnB.js} +80 -4
- package/dist/schema-ZngqcOWM.d.ts +5813 -0
- package/dist/{service-account-Do30HUNv.js → service-account-CKV2WTY7.js} +3 -3
- package/dist/{service-account-BQasl-qq.js → service-account-DGjnDw9y.js} +3 -3
- package/dist/{session-stop-DkOjt46_.js → session-stop-Dam1EI7B.js} +494 -18
- package/dist/{skills-CQHrwfOa.js → skills-CfAnfImD.js} +2 -2
- package/dist/{spawn-BHuqN14f.js → spawn-cmq9p4Ly.js} +2 -2
- package/dist/{store-6EetVP-m.js → store-C5PN02QO.js} +4 -4
- package/dist/{store-B8CABbmR.d.ts → store-xMuuXRE0.d.ts} +13 -7
- package/dist/{store-DvNZIsCr.js → store-zPEoJPBB.js} +3 -3
- package/dist/{task-queue-B0DLgd2P.js → task-queue-_mf28dSu.js} +3 -3
- package/dist/{task-runner-B-PD_JOj.js → task-runner-DMI2prDO.js} +11 -12
- package/dist/{tasks-0ilmuCux.js → tasks-SB9z-VTU.js} +124 -21
- package/dist/{thread-state-DRmdJ2QN.js → thread-state-BbbPh0Sn.js} +8 -18
- package/dist/{turn-failure-response-G11cs2gE.js → turn-failure-response-BKKmnMB5.js} +10 -15
- package/dist/{turn-lifecycle-OzLIwvi1.js → turn-lifecycle-oP0kVeGz.js} +1 -1
- package/dist/{validation-CxEmt1id.js → validation--JsAGLwc.js} +1 -1
- package/dist/{version-Bapedn4A.js → version-jHwJp4hC.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DrN3oC2X.js → viewer-CpXTGlep.js} +323 -235
- package/dist/{user-input-request-BDFBdF8r.js → web-message-id-DlHNANtd.js} +17 -1
- package/dist/{work-DUQoNcqP.js → work-3N-GHY9m.js} +10 -10
- package/dist/{worker-D1l4Ugk0.js → worker-CCdbcItd.js} +6 -6
- package/migrations/0065_user_customization.sql +1 -0
- package/migrations/0066_review_items.sql +53 -0
- package/migrations/0067_review_item_dedupe_tenant.sql +2 -0
- package/migrations/0068_review_item_slack_cards.sql +10 -0
- package/migrations/meta/0065_snapshot.json +3511 -0
- package/migrations/meta/0066_snapshot.json +4099 -0
- package/migrations/meta/0067_snapshot.json +3921 -0
- package/migrations/meta/0068_snapshot.json +4176 -0
- package/migrations/meta/_journal.json +29 -1
- package/package.json +5 -5
- package/dist/db-Bg-zC3r5.d.ts +0 -5
- package/dist/images-CecjXAAz.js +0 -64
- package/dist/turn-session-routing-Dyut9l7Y.js +0 -76
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
// src/api/schema/user-customization.ts
|
|
3
|
+
/** Longest customization text one user can save. */
|
|
4
|
+
const USER_CUSTOMIZATION_MAX_CHARS = 1e3;
|
|
5
|
+
/** Saved customization text. An empty string means none. */
|
|
6
|
+
const userCustomizationTextSchema = z.string().trim().max(USER_CUSTOMIZATION_MAX_CHARS);
|
|
7
|
+
/** Request and response body for the viewer's customization. */
|
|
8
|
+
const userCustomizationSchema = z.object({ customization: userCustomizationTextSchema }).strict();
|
|
2
9
|
// src/chat/tools/runtime/user-input-request.ts
|
|
3
10
|
const USER_INPUT_LIMITS = {
|
|
4
11
|
maxButtonOptions: 5,
|
|
@@ -113,4 +120,13 @@ function formatUserInputAnswer(request, answer) {
|
|
|
113
120
|
if (normalized.other) lines.push(answerLine(`Other: ${normalized.other}`));
|
|
114
121
|
return lines.join("\n");
|
|
115
122
|
}
|
|
116
|
-
|
|
123
|
+
// src/chat/conversations/web-message-id.ts
|
|
124
|
+
/**
|
|
125
|
+
* Build the retry-stable Message id shared by web ingress and browser sends.
|
|
126
|
+
* Keep the existing hash and prefix so retries still address stored Messages.
|
|
127
|
+
*/
|
|
128
|
+
async function webMessageId(args) {
|
|
129
|
+
const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(`${args.conversationId}\u0000${args.idempotencyKey}`));
|
|
130
|
+
return `api-msg:${Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("").slice(0, 24)}`;
|
|
131
|
+
}
|
|
132
|
+
export { isEmptyUserInputAnswer as a, USER_CUSTOMIZATION_MAX_CHARS as c, formatUserInputAnswer as i, userCustomizationSchema as l, USER_INPUT_LIMITS as n, normalizeUserInputAnswer as o, buttonUserInputField as r, userInputRequestSchema as s, webMessageId as t, userCustomizationTextSchema as u };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import {
|
|
2
|
+
import { Fn as isTurnExecutionLimitExceededError, Gt as saveTurnCheckpoint, It as AuthorizationFlowDisabledError, Jt as failTurnRecord, Kt as abandonTurnRecord, Mt as PluginCredentialFailureError, Yt as getTurnRecord, et as openConversationProjection, zn as getTerminalAssistantMessages } from "./tasks-SB9z-VTU.js";
|
|
3
|
+
import { n as botConfig } from "./config-DrTeF80T.js";
|
|
4
|
+
import { d as getConversationEventStore, p as getConversationStore } from "./viewer-CpXTGlep.js";
|
|
5
5
|
import { m as sameActorIdentity, u as agentInstructionProvenance } from "./history-C84mlAwO.js";
|
|
6
|
-
import {
|
|
7
|
-
import { E as markAgentInvocationSteered, H as TurnInputCommitLostError, K as isTurnInputCommitLostError, L as agentTypeInstructions, O as reportReplacedAgentInvocation, R as agentTypeStartsWithParentHistory, S as markAgentInvocationMailboxAppended, T as markAgentInvocationRunning, W as getConversationTurnBoundaryError, _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, m as getAgentInvocationTurnId, n as completeAgentInvocation, r as createAgentInvocation, s as getActiveAgentInvocationForConversation, w as markAgentInvocationPaused, y as isTerminalAgentInvocation } from "./store-
|
|
8
|
-
import {
|
|
9
|
-
import { C as maybePostAutomatedTurnLimitNotice,
|
|
10
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
11
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
12
|
-
import {
|
|
6
|
+
import { Dt as recordSubagentEnded, Ft as buildSteeringPiMessage, Ht as readBlockedReport, It as withoutSavedSteeringMessages, Ot as recordSubagentStarted, Tt as stopChildAgentsOf } from "./agent-runner-CAYfFmU7.js";
|
|
7
|
+
import { E as markAgentInvocationSteered, H as TurnInputCommitLostError, K as isTurnInputCommitLostError, L as agentTypeInstructions, O as reportReplacedAgentInvocation, R as agentTypeStartsWithParentHistory, S as markAgentInvocationMailboxAppended, T as markAgentInvocationRunning, W as getConversationTurnBoundaryError, _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, m as getAgentInvocationTurnId, n as completeAgentInvocation, r as createAgentInvocation, s as getActiveAgentInvocationForConversation, w as markAgentInvocationPaused, y as isTerminalAgentInvocation } from "./store-C5PN02QO.js";
|
|
8
|
+
import { r as getAssistantReplyText } from "./interruption-marker-CkncDT8d.js";
|
|
9
|
+
import { C as maybePostAutomatedTurnLimitNotice, D as recordFinishedTurnForAutomatedLimit, O as resetAutomatedTurnLimit } from "./session-stop-Dam1EI7B.js";
|
|
10
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-zPEoJPBB.js";
|
|
11
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-oP0kVeGz.js";
|
|
12
|
+
import { a as persistThreadStateById, n as getPersistedSandboxState, r as getPersistedThreadState } from "./thread-state-BbbPh0Sn.js";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
// src/chat/runtime/turn-execution.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { y as isProviderRetryError } from "./client-
|
|
4
|
-
import { i as getChatConfig } from "./config-
|
|
5
|
-
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
6
|
-
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-
|
|
7
|
-
import { C as requestAnotherSlice, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-
|
|
2
|
+
import { _n as isInvalidConversationRecordError, gn as isFinalAttempt, mn as hasConversationStop } from "./tasks-SB9z-VTU.js";
|
|
3
|
+
import { y as isProviderRetryError } from "./client-C1yDYjoS.js";
|
|
4
|
+
import { i as getChatConfig } from "./config-DrTeF80T.js";
|
|
5
|
+
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-DLSpkSSr.js";
|
|
6
|
+
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-In9QKz-I.js";
|
|
7
|
+
import { C as requestAnotherSlice, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-zPEoJPBB.js";
|
|
8
8
|
// src/chat/task-execution/attempt-selection.ts
|
|
9
9
|
function selectContiguousTurnBatch(messages) {
|
|
10
10
|
const first = messages[0];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "junior_users" ADD COLUMN "customization" text;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
CREATE TABLE "junior_review_item_assignees" (
|
|
2
|
+
"item_id" text NOT NULL,
|
|
3
|
+
"user_id" text NOT NULL,
|
|
4
|
+
CONSTRAINT "junior_review_item_assignees_item_id_user_id_pk" PRIMARY KEY("item_id","user_id")
|
|
5
|
+
);
|
|
6
|
+
--> statement-breakpoint
|
|
7
|
+
CREATE TABLE "junior_review_item_conversations" (
|
|
8
|
+
"item_id" text NOT NULL,
|
|
9
|
+
"conversation_id" text NOT NULL,
|
|
10
|
+
CONSTRAINT "junior_review_item_conversations_item_id_conversation_id_pk" PRIMARY KEY("item_id","conversation_id")
|
|
11
|
+
);
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
CREATE TABLE "junior_review_items" (
|
|
14
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
15
|
+
"kind" text NOT NULL,
|
|
16
|
+
"status" text NOT NULL,
|
|
17
|
+
"visibility" text NOT NULL,
|
|
18
|
+
"title" text NOT NULL,
|
|
19
|
+
"body" text NOT NULL,
|
|
20
|
+
"request" jsonb,
|
|
21
|
+
"answer" jsonb,
|
|
22
|
+
"assigned_to_everyone" boolean DEFAULT false NOT NULL,
|
|
23
|
+
"dedupe_key" text NOT NULL,
|
|
24
|
+
"subject_id" text,
|
|
25
|
+
"subject_title" text,
|
|
26
|
+
"subject_url" text,
|
|
27
|
+
"added_by_conversation_id" text NOT NULL,
|
|
28
|
+
"provider" text,
|
|
29
|
+
"provider_tenant_id" text,
|
|
30
|
+
"automation_id" text,
|
|
31
|
+
"closed_at" timestamp with time zone,
|
|
32
|
+
"closed_by_user_id" text,
|
|
33
|
+
"close_reason" text,
|
|
34
|
+
"created_at" timestamp with time zone NOT NULL,
|
|
35
|
+
"updated_at" timestamp with time zone NOT NULL,
|
|
36
|
+
CONSTRAINT "junior_review_items_kind_check" CHECK (("junior_review_items"."kind" = 'notice' and "junior_review_items"."request" is null and "junior_review_items"."answer" is null) or ("junior_review_items"."kind" = 'action' and "junior_review_items"."request" is not null)),
|
|
37
|
+
CONSTRAINT "junior_review_items_status_check" CHECK (("junior_review_items"."status" = 'open' and "junior_review_items"."closed_at" is null) or ("junior_review_items"."status" in ('done', 'dismissed') and "junior_review_items"."closed_at" is not null)),
|
|
38
|
+
CONSTRAINT "junior_review_items_tenant_check" CHECK (("junior_review_items"."provider" is null) = ("junior_review_items"."provider_tenant_id" is null)),
|
|
39
|
+
CONSTRAINT "junior_review_items_visibility_check" CHECK ("junior_review_items"."visibility" = 'public' or not "junior_review_items"."assigned_to_everyone")
|
|
40
|
+
);
|
|
41
|
+
--> statement-breakpoint
|
|
42
|
+
ALTER TABLE "junior_review_item_assignees" ADD CONSTRAINT "junior_review_item_assignees_item_id_junior_review_items_id_fk" FOREIGN KEY ("item_id") REFERENCES "public"."junior_review_items"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
43
|
+
ALTER TABLE "junior_review_item_assignees" ADD CONSTRAINT "junior_review_item_assignees_user_id_junior_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."junior_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
44
|
+
ALTER TABLE "junior_review_item_conversations" ADD CONSTRAINT "junior_review_item_conversations_item_id_junior_review_items_id_fk" FOREIGN KEY ("item_id") REFERENCES "public"."junior_review_items"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
45
|
+
ALTER TABLE "junior_review_item_conversations" ADD CONSTRAINT "junior_review_item_conversations_conversation_id_junior_conversations_conversation_id_fk" FOREIGN KEY ("conversation_id") REFERENCES "public"."junior_conversations"("conversation_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
46
|
+
ALTER TABLE "junior_review_items" ADD CONSTRAINT "junior_review_items_automation_id_junior_automations_id_fk" FOREIGN KEY ("automation_id") REFERENCES "public"."junior_automations"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
|
|
47
|
+
ALTER TABLE "junior_review_items" ADD CONSTRAINT "junior_review_items_closed_by_user_id_junior_users_id_fk" FOREIGN KEY ("closed_by_user_id") REFERENCES "public"."junior_users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
48
|
+
CREATE INDEX "junior_review_item_assignees_user_idx" ON "junior_review_item_assignees" USING btree ("user_id");--> statement-breakpoint
|
|
49
|
+
CREATE INDEX "junior_review_item_conversations_conversation_idx" ON "junior_review_item_conversations" USING btree ("conversation_id");--> statement-breakpoint
|
|
50
|
+
CREATE UNIQUE INDEX "junior_review_items_open_dedupe_uidx" ON "junior_review_items" USING btree ("dedupe_key") WHERE "junior_review_items"."status" = 'open';--> statement-breakpoint
|
|
51
|
+
CREATE INDEX "junior_review_items_status_idx" ON "junior_review_items" USING btree ("status","updated_at","id");--> statement-breakpoint
|
|
52
|
+
CREATE INDEX "junior_review_items_subject_idx" ON "junior_review_items" USING btree ("subject_id","status");--> statement-breakpoint
|
|
53
|
+
CREATE INDEX "junior_review_items_automation_idx" ON "junior_review_items" USING btree ("automation_id","status");
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
DROP INDEX "junior_review_items_open_dedupe_uidx";--> statement-breakpoint
|
|
2
|
+
CREATE UNIQUE INDEX "junior_review_items_open_dedupe_uidx" ON "junior_review_items" USING btree (coalesce("provider", ''),coalesce("provider_tenant_id", ''),"dedupe_key") WHERE "junior_review_items"."status" = 'open';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
CREATE TABLE "junior_review_item_slack_cards" (
|
|
2
|
+
"item_id" text NOT NULL,
|
|
3
|
+
"conversation_id" text NOT NULL,
|
|
4
|
+
"team_id" text NOT NULL,
|
|
5
|
+
"channel_id" text NOT NULL,
|
|
6
|
+
"message_ts" text NOT NULL,
|
|
7
|
+
CONSTRAINT "junior_review_item_slack_cards_item_id_conversation_id_pk" PRIMARY KEY("item_id","conversation_id")
|
|
8
|
+
);
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
ALTER TABLE "junior_review_item_slack_cards" ADD CONSTRAINT "junior_review_item_slack_cards_item_id_junior_review_items_id_fk" FOREIGN KEY ("item_id") REFERENCES "public"."junior_review_items"("id") ON DELETE cascade ON UPDATE no action;
|