@sentry/junior 0.237.0 → 0.238.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.
Files changed (70) hide show
  1. package/dist/{context-0Et9iVSB.js → actor-BTtLaeWy.js} +1 -96
  2. package/dist/admin-ZGlZ8lY6.js +33 -0
  3. package/dist/{agent-hooks-otHGbhBx.js → agent-hooks-CxdSqU2u.js} +1423 -2973
  4. package/dist/{agent-runner-DMAsnPb9.js → agent-runner-ZS1LHtSR.js} +171 -139
  5. package/dist/api/schema.d.ts +4 -0
  6. package/dist/api/schema.js +3 -2
  7. package/dist/api.d.ts +1 -1
  8. package/dist/api.js +31 -24
  9. package/dist/{app-MEd7wbF0.d.ts → app-FB2hmHpZ.d.ts} +1 -1
  10. package/dist/app.d.ts +1 -1
  11. package/dist/app.js +26 -22
  12. package/dist/{briefs-DDA1ugXk.js → briefs-B6IhUAgK.js} +4 -4
  13. package/dist/{catalog-runtime-DlXuhrmk.js → catalog-runtime-BzNg07bb.js} +1 -1
  14. package/dist/{checkpoint-BlIIiHG5.js → checkpoint-DWGyJg4c.js} +19 -10
  15. package/dist/cli/chat.js +13 -13
  16. package/dist/cli/check.js +3 -3
  17. package/dist/cli/main.js +6 -2
  18. package/dist/cli/plugins.js +5 -3
  19. package/dist/cli/run.d.ts +2 -1
  20. package/dist/cli/run.js +2 -1
  21. package/dist/cli/snapshot-create.js +3 -3
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +3 -3
  24. package/dist/{client-CPMbTmJU.js → client-CKs0rj3A.js} +2 -2
  25. package/dist/{config-CxpPG6nR.js → config-DRw358bB.js} +2 -2
  26. package/dist/{conversation-9Fxa1Zbq.js → conversation-DwD-vquD.js} +3 -517
  27. package/dist/{conversation-privacy-Dbkdvozu.js → conversation-privacy-DAYxHp74.js} +1 -1
  28. package/dist/{credential-sync-D9yGg3q5.js → credential-sync-DmRbuyE4.js} +15 -14
  29. package/dist/{db-Ca9Nt5ci.d.ts → db-CWZP77Ex.d.ts} +1 -1
  30. package/dist/{executor-BNxfDS1V.js → executor-DgPk8Lsx.js} +4 -2
  31. package/dist/experimental-Qn9rKLgx.js +50 -0
  32. package/dist/history-BLTUgFYO.js +518 -0
  33. package/dist/{images-D6Y3FJDQ.js → images-puyEuXoY.js} +3 -3
  34. package/dist/instrumentation.js +2 -2
  35. package/dist/{job-queue-Dq5_zt_l.js → job-queue-BL9stv_E.js} +1 -1
  36. package/dist/{logging-rB_ngE_R.js → logging-BNi_jyHb.js} +1 -1
  37. package/dist/nitro.d.ts +1 -1
  38. package/dist/nitro.js +3 -3
  39. package/dist/{oauth-authorization-5T1S1v_1.js → oauth-authorization-Zv1oLB1J.js} +1 -1
  40. package/dist/{oauth-callback-server-Csw7RssK.js → oauth-callback-server-BHtVbKvO.js} +2 -2
  41. package/dist/pending-auth-DulDjfwL.js +433 -0
  42. package/dist/{profile-D6apIG2N.js → profile-C2TScny6.js} +5 -7
  43. package/dist/{prompt-Ctwy6hSI.js → prompt-CMU-B4FA.js} +1 -1
  44. package/dist/{registry-zfTzTHe6.js → registry-D1RsbgDb.js} +111 -3
  45. package/dist/{resolve-sJtTzuBO.js → resolve-CuY3dhxy.js} +2 -2
  46. package/dist/{runner-DkCk8cbc.js → runner-BUkReLln.js} +10 -10
  47. package/dist/{sandbox-egress-signals-tSQ8OEcw.js → sandbox-egress-signals-etjG6qQX.js} +1 -1
  48. package/dist/{schema-C5bgOpRg.js → schema-CxWAN2zq.js} +1 -1
  49. package/dist/{skills-BVpr_Gnv.js → skills-BGhThSGR.js} +2 -2
  50. package/dist/{spawn-CJhmyE4E.js → spawn-PtyOnoXt.js} +2 -2
  51. package/dist/{store-DoewL5mG.d.ts → store-BxxbxBlm.d.ts} +7 -0
  52. package/dist/{task-queue-BAiZ7_CF.js → task-queue-Bi2uNATu.js} +3 -3
  53. package/dist/{task-runner-Bh8XONXT.js → task-runner-CDoZCo8g.js} +20 -10
  54. package/dist/{thread-state-BnQln4jO.js → thread-state-B-t88gH0.js} +6 -5
  55. package/dist/{turn-failure-response-Ba7_kItn.js → turn-failure-response-di4Jx90o.js} +10 -9
  56. package/dist/{turn-lifecycle-D6CTbkb9.js → turn-lifecycle-ByhUHYjD.js} +1 -1
  57. package/dist/{turn-session-routing-DNevs9H7.js → turn-session-routing-QjNvsevm.js} +1 -1
  58. package/dist/{validation-BNPhuAvt.js → validation-D3li76Ti.js} +1 -1
  59. package/dist/{version-EQ4MWuUJ.js → version-Chc6bVG5.js} +1 -1
  60. package/dist/version.js +1 -1
  61. package/dist/viewer-DsyM9kb9.js +1636 -0
  62. package/dist/{web-authorization-DDt4FZld.js → web-authorization-Enb5lVYt.js} +6 -6
  63. package/dist/{web-input-C56ivZuH.js → web-input-efQlcCis.js} +63 -433
  64. package/dist/{work-DJ7hb9Ul.js → work-CeiA_ZxD.js} +9 -10
  65. package/dist/{worker-DiiV8Lba.js → worker-BJb2hsUB.js} +5 -5
  66. package/migrations/0048_user_admin.sql +1 -0
  67. package/migrations/meta/0048_snapshot.json +3720 -0
  68. package/migrations/meta/_journal.json +7 -0
  69. package/package.json +4 -4
  70. package/dist/pending-auth-moCA2mTc.js +0 -59
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { Rn as actorFromRun, zn as toolInvocationDestination } from "./agent-runner-DMAsnPb9.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-DJ7hb9Ul.js";
2
+ import { Fn as actorFromRun, In as toolInvocationDestination } from "./agent-runner-ZS1LHtSR.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-CeiA_ZxD.js";
4
4
  //#region src/chat/agent-invocations/spawn.ts
5
5
  var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
6
6
  /** Bind a Run's Actor and credentials to new Agent invocations. */
@@ -135,6 +135,13 @@ interface ConversationStore {
135
135
  providerTenantId: string;
136
136
  providerConversationId: string;
137
137
  }): Promise<string | undefined>;
138
+ /** Return the first provider conversation bound in one destination. */
139
+ getFirstProviderConversationId(args: {
140
+ conversationId: string;
141
+ provider: string;
142
+ providerDestinationId: string;
143
+ providerTenantId: string;
144
+ }): Promise<string | undefined>;
138
145
  /** Bind one provider conversation to its pre-existing durable conversation. */
139
146
  bindProviderConversation(args: {
140
147
  conversationId: string;
@@ -1,5 +1,5 @@
1
- import { p as logWarn } from "./logging-rB_ngE_R.js";
2
- import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-Dq5_zt_l.js";
1
+ import { p as logWarn } from "./logging-BNi_jyHb.js";
2
+ import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-BL9stv_E.js";
3
3
  import { z } from "zod";
4
4
  import { createHash } from "node:crypto";
5
5
  import { handleCallback, registerDevConsumer } from "@vercel/queue";
@@ -115,7 +115,7 @@ function pluginTaskCallback() {
115
115
  maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
116
116
  onRejected: logPluginTaskQueueMessageRejected,
117
117
  run: async (message) => {
118
- const { processPluginTask } = await import("./task-runner-Bh8XONXT.js").then((n) => n.r);
118
+ const { processPluginTask } = await import("./task-runner-CDoZCo8g.js").then((n) => n.r);
119
119
  await processPluginTask(message);
120
120
  },
121
121
  topic: PLUGIN_TASK_QUEUE_TOPIC,
@@ -1,14 +1,16 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { p as logWarn } from "./logging-rB_ngE_R.js";
3
- import { b as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-0Et9iVSB.js";
4
- import { $ as readActorIdentity, Ct as createPluginModel, Pt as createPluginConversationEvents, St as createPluginEmbedder, dn as agentTurnTotalTokens, en as getConversationStore, gt as JUNIOR_THREAD_STATE_TTL_MS, p as coreTaskRegistrations, tn as getDb, u as getPlugins, un as agentTurnCostUsd, wt as createPluginLogger, xt as createPluginState } from "./agent-hooks-otHGbhBx.js";
5
- import { D as juniorConversations, c as juniorAutomationExecutions } from "./executor-BNxfDS1V.js";
6
- import { at as sameActorIdentity } from "./conversation-9Fxa1Zbq.js";
7
- import { C as isToolResultError, D as stripRuntimeTurnContext, T as normalizeToolNameFromResult, Y as hydrateConversationMessages, b as instructionTextForProjection, g as getPiMessageRole, s as getTurnRecord, w as isToolResultMessage } from "./checkpoint-BlIIiHG5.js";
8
- import { w as getStateAdapter } from "./profile-D6apIG2N.js";
9
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BnQln4jO.js";
10
- import { t as resolveConversationRouting } from "./turn-session-routing-DNevs9H7.js";
11
- import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-BAiZ7_CF.js";
2
+ import { p as logWarn } from "./logging-BNi_jyHb.js";
3
+ import { g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
4
+ import { S as agentTurnTotalTokens, d as getDb, r as readActorIdentity, u as getConversationStore, x as agentTurnCostUsd } from "./viewer-DsyM9kb9.js";
5
+ import { D as juniorConversations, c as juniorAutomationExecutions } from "./executor-DgPk8Lsx.js";
6
+ import { p as sameActorIdentity } from "./history-BLTUgFYO.js";
7
+ import { p as credentialSubjectSchema } from "./registry-D1RsbgDb.js";
8
+ import { C as isToolResultError, D as stripRuntimeTurnContext, T as normalizeToolNameFromResult, Y as hydrateConversationMessages, b as instructionTextForProjection, g as getPiMessageRole, s as getTurnRecord, w as isToolResultMessage } from "./checkpoint-DWGyJg4c.js";
9
+ import { bt as createPluginModel, jt as createPluginConversationEvents, p as coreTaskRegistrations, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, vt as createPluginState, xt as createPluginLogger, yt as createPluginEmbedder } from "./agent-hooks-CxdSqU2u.js";
10
+ import { w as getStateAdapter } from "./profile-C2TScny6.js";
11
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-B-t88gH0.js";
12
+ import { t as resolveConversationRouting } from "./turn-session-routing-QjNvsevm.js";
13
+ import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-Bi2uNATu.js";
12
14
  import { z } from "zod";
13
15
  import { createHash } from "node:crypto";
14
16
  import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
@@ -447,6 +449,14 @@ const dispatchRecordSchema = z.object({
447
449
  });
448
450
  return;
449
451
  }
452
+ if (subject.allowedWhen === "timer-watch") {
453
+ ctx.addIssue({
454
+ code: z.ZodIssueCode.custom,
455
+ message: "Dispatch credentialSubject cannot use a timer Watch binding",
456
+ path: ["credentialSubject", "allowedWhen"]
457
+ });
458
+ return;
459
+ }
450
460
  if (subject.binding.type !== subject.allowedWhen || subject.binding.plugin !== record.plugin || subject.binding.taskId !== subject.taskId) ctx.addIssue({
451
461
  code: z.ZodIssueCode.custom,
452
462
  message: "Dispatch credentialSubject binding must match task",
@@ -1,9 +1,10 @@
1
- import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-rB_ngE_R.js";
2
- import { gt as JUNIOR_THREAD_STATE_TTL_MS, tn as getDb } from "./agent-hooks-otHGbhBx.js";
1
+ import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-BNi_jyHb.js";
2
+ import { d as getDb } from "./viewer-DsyM9kb9.js";
3
3
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
4
- import { d as juniorLocationConfigurations } from "./executor-BNxfDS1V.js";
5
- import { X as persistConversationMessages } from "./checkpoint-BlIIiHG5.js";
6
- import { w as getStateAdapter } from "./profile-D6apIG2N.js";
4
+ import { d as juniorLocationConfigurations } from "./executor-DgPk8Lsx.js";
5
+ import { X as persistConversationMessages } from "./checkpoint-DWGyJg4c.js";
6
+ import { pt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CxdSqU2u.js";
7
+ import { w as getStateAdapter } from "./profile-C2TScny6.js";
7
8
  import { z } from "zod";
8
9
  import { randomUUID } from "node:crypto";
9
10
  import { and, eq, sql } from "drizzle-orm";
@@ -1,12 +1,13 @@
1
- import { _ as getProviderErrorUserMessage, g as getProviderErrorAttributes, h as findProviderError, p as ProviderError } from "./client-CPMbTmJU.js";
2
- import { I as isRecord, t as buildTurnFailureResponse } from "./logging-rB_ngE_R.js";
3
- import { b as parseSlackMessageTs } from "./context-0Et9iVSB.js";
4
- import { Gt as listConversationAnnotations, Qt as getConversationEventStore, tn as getDb } from "./agent-hooks-otHGbhBx.js";
5
- import { G as removedCardSchema, K as resolveMessageCards, W as readMessageCardRefs } from "./conversation-9Fxa1Zbq.js";
6
- import { Y as hydrateConversationMessages, lt as markConversationMessage } from "./checkpoint-BlIIiHG5.js";
7
- import { r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-moCA2mTc.js";
8
- import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-5T1S1v_1.js";
9
- import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BnQln4jO.js";
1
+ import { _ as getProviderErrorUserMessage, g as getProviderErrorAttributes, h as findProviderError, p as ProviderError } from "./client-CKs0rj3A.js";
2
+ import { I as isRecord, t as buildTurnFailureResponse } from "./logging-BNi_jyHb.js";
3
+ import { g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
4
+ import { c as getConversationEventStore, d as getDb } from "./viewer-DsyM9kb9.js";
5
+ import { Y as hydrateConversationMessages, lt as markConversationMessage } from "./checkpoint-DWGyJg4c.js";
6
+ import { Ht as listConversationAnnotations } from "./agent-hooks-CxdSqU2u.js";
7
+ import { G as removedCardSchema, K as resolveMessageCards, W as readMessageCardRefs } from "./conversation-DwD-vquD.js";
8
+ import { r as clearPendingAuth, u as buildDeterministicTurnId } from "./pending-auth-DulDjfwL.js";
9
+ import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-Zv1oLB1J.js";
10
+ import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-B-t88gH0.js";
10
11
  //#region src/chat/conversations/pending-cards.ts
11
12
  /** Select undelivered cards and load their latest saved facts. */
12
13
  async function loadPendingMessageCards(conversationId) {
@@ -1,4 +1,4 @@
1
- import { Qt as getConversationEventStore } from "./agent-hooks-otHGbhBx.js";
1
+ import { c as getConversationEventStore } from "./viewer-DsyM9kb9.js";
2
2
  //#region src/chat/conversations/turn-lifecycle.ts
3
3
  /** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
4
4
  var ConversationTurnLifecycleService = class {
@@ -34,7 +34,7 @@ function slackSourceForDestination(args) {
34
34
  * Reads parent Conversations when this Conversation has no Destination.
35
35
  */
36
36
  async function resolveConversationRouting(args) {
37
- const conversationStore = args.conversationStore ?? (await import("./agent-hooks-otHGbhBx.js").then((n) => n.Zt)).getConversationStore();
37
+ const conversationStore = args.conversationStore ?? (await import("./viewer-DsyM9kb9.js").then((n) => n.s)).getConversationStore();
38
38
  const chain = await loadConversationChain(args.conversationId, conversationStore);
39
39
  let destination;
40
40
  let source;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DlXuhrmk.js";
2
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BzNg07bb.js";
3
3
  import { isDeepStrictEqual } from "node:util";
4
4
  //#region src/chat/plugins/validation.ts
5
5
  var validation_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.237.0";
2
+ var version = "0.238.0";
3
3
  //#endregion
4
4
  //#region src/version.ts
5
5
  /** Installed Junior package version, or `unknown` when package metadata is unavailable. */
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as JUNIOR_VERSION } from "./version-EQ4MWuUJ.js";
1
+ import { t as JUNIOR_VERSION } from "./version-Chc6bVG5.js";
2
2
  export { JUNIOR_VERSION };