@sentry/junior 0.241.0 → 0.243.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 (65) hide show
  1. package/dist/{admin-CJkjl-aN.js → admin-DHOGoI03.js} +1 -1
  2. package/dist/{agent-hooks-C5zYOaJk.js → agent-hooks-Cqo6ULp6.js} +12 -12
  3. package/dist/agent-invocations-BzRAZ_nj.js +176 -0
  4. package/dist/{agent-runner-CMZ6lFQe.js → agent-runner-BZOjoMlZ.js} +621 -69
  5. package/dist/api/schema.d.ts +53 -1
  6. package/dist/api/schema.js +4 -4
  7. package/dist/api.js +52 -22
  8. package/dist/{app-MEd7wbF0.d.ts → app-DRLh-8zs.d.ts} +5 -0
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +41 -24
  11. package/dist/{briefs-CsQbFjRi.js → briefs-C4GogKaB.js} +4 -4
  12. package/dist/{catalog-runtime-Tz0O2MZe.js → catalog-runtime-jazDa-oO.js} +1 -1
  13. package/dist/cli/chat.js +12 -12
  14. package/dist/cli/check.js +3 -3
  15. package/dist/cli/main.js +2 -2
  16. package/dist/cli/plugins.js +4 -4
  17. package/dist/cli/snapshot-create.js +3 -3
  18. package/dist/cli/upgrade.js +3 -3
  19. package/dist/{client-CRZ-i1tH.js → client-Es79bknZ.js} +2 -2
  20. package/dist/{config-CCI82OTD.js → config-gype19qQ.js} +7 -2
  21. package/dist/{conversation-DwD-vquD.js → conversation-mt3yJ09u.js} +2 -1
  22. package/dist/{conversation-privacy-D5Byl5eC.js → conversation-privacy-BIplVfmz.js} +1 -1
  23. package/dist/{credential-sync-DUpSxUum.js → credential-sync-BY97dkST.js} +14 -14
  24. package/dist/{executor-CewKi7EG.js → executor-C7bsEF-c.js} +5 -124
  25. package/dist/{history-BLTUgFYO.js → history-DlsoHsoe.js} +1 -0
  26. package/dist/{images-DY6Pxq4w.js → images-WmrEAtto.js} +3 -3
  27. package/dist/instrumentation.js +2 -2
  28. package/dist/{job-queue-C6o2aJQ6.js → job-queue-DQDesz8a.js} +1 -1
  29. package/dist/{logging-LQnLlPf8.js → logging-CdZ1LQJ7.js} +1 -1
  30. package/dist/nitro.d.ts +1 -1
  31. package/dist/nitro.js +3 -3
  32. package/dist/{oauth-authorization-Clzkm-Ts.js → oauth-authorization-Di0KlyoJ.js} +1 -1
  33. package/dist/{oauth-callback-server-DcYAJSEz.js → oauth-callback-server-Cmog7Q3T.js} +2 -2
  34. package/dist/{pending-auth-CT3ojhKe.js → pending-auth-CNAlGOyl.js} +2 -2
  35. package/dist/{profile-mWuVZ8ht.js → profile-qqt_2di0.js} +4 -4
  36. package/dist/{prompt-CMU-B4FA.js → prompt-D_cg2iqi.js} +1 -1
  37. package/dist/{registry-DPDH6s5G.js → registry-WOJKAIRI.js} +1 -1
  38. package/dist/{resolve-BAN8BSGy.js → resolve-C8VvY0lg.js} +2 -2
  39. package/dist/{runner-CqXZJfzk.js → runner-DojxjGmt.js} +10 -10
  40. package/dist/{sandbox-egress-signals-DFUUokws.js → sandbox-egress-signals-B7azPnsm.js} +1 -1
  41. package/dist/{schema-Cabm4jcj.js → schema-nQRsPWSr.js} +34 -3
  42. package/dist/{skills-BtHhSATy.js → skills-Zj-9pbSU.js} +2 -2
  43. package/dist/{spawn-BszkFJKJ.js → spawn-DDJ5z9IC.js} +5 -4
  44. package/dist/{task-queue-1LP6benz.js → task-queue-CAi-XM8x.js} +3 -3
  45. package/dist/{task-runner-kLN3HC-_.js → task-runner-CIP2asjP.js} +12 -11
  46. package/dist/{tasks-CO52vLkI.js → tasks-Qx6Fos_R.js} +49 -17
  47. package/dist/{thread-state-CaFRG5Mh.js → thread-state-BN_5S1bx.js} +7 -7
  48. package/dist/{turn-failure-response-Dmovuiq1.js → turn-failure-response-B1UW2T7a.js} +9 -9
  49. package/dist/{turn-lifecycle-DGqZgU6J.js → turn-lifecycle-BzeE4sVD.js} +1 -1
  50. package/dist/{turn-session-routing-B_v8Wbn4.js → turn-session-routing-DsvU39zW.js} +1 -1
  51. package/dist/{validation-B4L2Rmiw.js → validation-Dklx_nds.js} +1 -1
  52. package/dist/{version-DiR36OaN.js → version-BvG02ZTN.js} +1 -1
  53. package/dist/version.js +1 -1
  54. package/dist/{viewer-D6stAU7h.js → viewer-B7qDM2DM.js} +6 -8
  55. package/dist/{web-authorization-DLMBx2nL.js → web-authorization-Cqv7bP19.js} +6 -6
  56. package/dist/{web-input---xuox1t.js → web-input-CqnqSfzI.js} +227 -31
  57. package/dist/{work-G-HdoOSF.js → work-D_BBvd4I.js} +111 -225
  58. package/dist/{worker-CDUDfL9P.js → worker-BWdV_5Ys.js} +5 -5
  59. package/migrations/0050_agent_invocation_parent_mailbox.sql +4 -0
  60. package/migrations/0051_agent_invocation_parent_tool_call.sql +1 -0
  61. package/migrations/meta/0050_snapshot.json +3753 -0
  62. package/migrations/meta/0051_snapshot.json +3759 -0
  63. package/migrations/meta/_journal.json +15 -1
  64. package/package.json +4 -4
  65. package/dist/destinations-BeBiJeEM.js +0 -29
@@ -1,4 +1,4 @@
1
- import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureCodeSchema, m as usageSchema } from "./history-BLTUgFYO.js";
1
+ import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureCodeSchema, m as usageSchema } from "./history-DlsoHsoe.js";
2
2
  import { z } from "zod";
3
3
  import { codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } from "@sentry/junior-plugin-api";
4
4
  //#region src/chat/automations/card.ts
@@ -627,6 +627,7 @@ const conversationReportSubagentEventDataSchema = z.object({
627
627
  status: z.enum([
628
628
  "running",
629
629
  "completed",
630
+ "blocked",
630
631
  "error",
631
632
  "aborted"
632
633
  ])
@@ -1,4 +1,4 @@
1
- import { p as logWarn } from "./logging-LQnLlPf8.js";
1
+ import { p as logWarn } from "./logging-CdZ1LQJ7.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { Jt as resolveBaseUrl, Kt as formatProviderLabel, Xt as createUserTokenStore, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, q as getMcpProviderErrorAttributes, qt as parseOAuthStatePayload, s as deleteMcpAuthSession, x as lookupSlackUserProfile } from "./agent-runner-CMZ6lFQe.js";
2
- import { f as escapeXml } from "./client-CRZ-i1tH.js";
3
- import { d as logException, h as runBestEffort, p as logWarn } from "./logging-LQnLlPf8.js";
4
- import { a as getRuntimeMetadata, n as botConfig } from "./config-CCI82OTD.js";
1
+ import { _ as resolvePluginOAuthAccount, cn as formatProviderLabel, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, fn as createUserTokenStore, ln as parseOAuthStatePayload, lt as getMcpProviderErrorAttributes, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, un as resolveBaseUrl, x as lookupSlackUserProfile } from "./agent-runner-BZOjoMlZ.js";
2
+ import { f as escapeXml } from "./client-Es79bknZ.js";
3
+ import { d as logException, h as runBestEffort, p as logWarn } from "./logging-CdZ1LQJ7.js";
4
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-gype19qQ.js";
5
5
  import { f as parseSlackUserId } from "./actor-BTtLaeWy.js";
6
- import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-D6stAU7h.js";
6
+ import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-B7qDM2DM.js";
7
7
  import { i as homeDir } from "./package-discovery-BVvSnQBB.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DPDH6s5G.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Tz0O2MZe.js";
10
- import { t as discoverSkills } from "./skills-BtHhSATy.js";
11
- import { At as recordAuthenticationLinked, X as getTurnRecord, jt as recordAuthorizationCompleted, z as postSlackMessage } from "./tasks-CO52vLkI.js";
12
- import { zt as getSlackClient } from "./agent-hooks-C5zYOaJk.js";
13
- import { E as acquireActiveLock, w as getStateAdapter } from "./profile-mWuVZ8ht.js";
14
- import { i as getConversationPendingAuth } from "./pending-auth-CT3ojhKe.js";
15
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CaFRG5Mh.js";
16
- import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-DLMBx2nL.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-WOJKAIRI.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-jazDa-oO.js";
10
+ import { t as discoverSkills } from "./skills-Zj-9pbSU.js";
11
+ import { Mt as recordAuthorizationCompleted, X as getTurnRecord, jt as recordAuthenticationLinked, z as postSlackMessage } from "./tasks-Qx6Fos_R.js";
12
+ import { zt as getSlackClient } from "./agent-hooks-Cqo6ULp6.js";
13
+ import { E as acquireActiveLock, w as getStateAdapter } from "./profile-qqt_2di0.js";
14
+ import { i as getConversationPendingAuth } from "./pending-auth-CNAlGOyl.js";
15
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BN_5S1bx.js";
16
+ import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-Cqv7bP19.js";
17
17
  import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
18
18
  import path from "node:path";
19
19
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
- import { d as logException } from "./logging-LQnLlPf8.js";
1
+ import { d as logException } from "./logging-CdZ1LQJ7.js";
2
2
  import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
3
- import "./config-CCI82OTD.js";
4
- import { n as juniorDestinations, r as timestamptz } from "./destinations-BeBiJeEM.js";
3
+ import "./config-gype19qQ.js";
4
+ import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-BzRAZ_nj.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
- import { getTableColumns, sql } from "drizzle-orm";
6
+ import { sql } from "drizzle-orm";
7
7
  import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, uniqueIndex, uuid } from "drizzle-orm/pg-core";
8
8
  import { Pool } from "@neondatabase/serverless";
9
9
  import { drizzle } from "drizzle-orm/neon-serverless";
@@ -33,97 +33,6 @@ const juniorArtifacts = pgTable("junior_artifacts", {
33
33
  index("junior_artifacts_conversation_idx").on(table.conversationId)
34
34
  ]);
35
35
  //#endregion
36
- //#region src/db/schema/users.ts
37
- const juniorUsers = pgTable("junior_users", {
38
- id: text("id").primaryKey(),
39
- primaryEmail: text("primary_email").notNull(),
40
- primaryEmailNormalized: text("primary_email_normalized").notNull(),
41
- displayName: text("display_name"),
42
- timezone: text("timezone"),
43
- /** Junior-wide admin role. Only the `junior admin` CLI changes it. */
44
- isAdmin: boolean("is_admin").notNull().default(false),
45
- createdAt: timestamptz("created_at").notNull(),
46
- updatedAt: timestamptz("updated_at").notNull()
47
- }, (table) => [uniqueIndex("junior_users_primary_email_normalized_uidx").on(table.primaryEmailNormalized)]);
48
- //#endregion
49
- //#region src/db/schema/identities.ts
50
- const juniorIdentities = pgTable("junior_identities", {
51
- id: text("id").primaryKey(),
52
- kind: text("kind").$type().notNull(),
53
- provider: text("provider").notNull(),
54
- providerTenantId: text("provider_tenant_id").notNull().default(""),
55
- providerSubjectId: text("provider_subject_id").notNull(),
56
- displayName: text("display_name"),
57
- handle: text("handle"),
58
- email: text("email"),
59
- avatarUrl: text("avatar_url"),
60
- metadata: jsonb("metadata_json"),
61
- createdAt: timestamptz("created_at").notNull(),
62
- updatedAt: timestamptz("updated_at").notNull(),
63
- userId: text("user_id").references(() => juniorUsers.id),
64
- emailNormalized: text("email_normalized"),
65
- emailVerified: boolean("email_verified").notNull().default(false)
66
- }, (table) => [
67
- uniqueIndex("junior_identities_provider_subject_uidx").on(table.provider, table.providerTenantId, table.providerSubjectId),
68
- index("junior_identities_user_idx").on(table.userId),
69
- index("junior_identities_verified_email_idx").on(table.emailNormalized).where(sql`${table.emailVerified} = true AND ${table.emailNormalized} IS NOT NULL`),
70
- index("junior_identities_kind_provider_idx").on(table.kind, table.provider)
71
- ]);
72
- //#endregion
73
- //#region src/db/schema/conversations.ts
74
- const juniorConversations = pgTable("junior_conversations", {
75
- conversationId: text("conversation_id").primaryKey(),
76
- schemaVersion: integer("schema_version").notNull().default(1),
77
- source: text("source").$type(),
78
- /** Structured session Source locator; set-once on the conversation root. */
79
- sessionSource: jsonb("source_json").$type(),
80
- originType: text("origin_type"),
81
- originId: text("origin_id"),
82
- originRunId: text("origin_run_id"),
83
- /** Complete Location associated with this Conversation. */
84
- location: jsonb("location_json").$type(),
85
- destinationId: text("destination_id").references(() => juniorDestinations.id),
86
- destination: jsonb("destination_json").$type(),
87
- actorIdentityId: text("actor_identity_id").references(() => juniorIdentities.id),
88
- creatorIdentityId: text("creator_identity_id").references(() => juniorIdentities.id),
89
- credentialSubjectIdentityId: text("credential_subject_identity_id").references(() => juniorIdentities.id),
90
- actor: jsonb("actor_json").$type(),
91
- channelName: text("channel_name"),
92
- title: text("title"),
93
- createdAt: timestamptz("created_at").notNull(),
94
- lastActivityAt: timestamptz("last_activity_at").notNull(),
95
- updatedAt: timestamptz("updated_at").notNull(),
96
- executionUpdatedAt: timestamptz("execution_updated_at"),
97
- executionStatus: text("execution_status").$type().notNull(),
98
- runId: text("run_id"),
99
- lastCheckpointAt: timestamptz("last_checkpoint_at"),
100
- lastEnqueuedAt: timestamptz("last_enqueued_at"),
101
- parentConversationId: text("parent_conversation_id").references(() => juniorConversations.conversationId),
102
- forkedFromConversationId: text("forked_from_conversation_id").references(() => juniorConversations.conversationId, { onDelete: "set null" }),
103
- rootConversationId: text("root_conversation_id").references(() => juniorConversations.conversationId),
104
- transcriptPurgedAt: timestamptz("transcript_purged_at"),
105
- durationMs: integer("duration_ms").notNull().default(0),
106
- usage: jsonb("usage_json").$type(),
107
- executionDurationMs: integer("execution_duration_ms").notNull().default(0),
108
- executionUsage: jsonb("execution_usage_json").$type(),
109
- metricRunId: text("metric_run_id"),
110
- legacyArchivedAt: timestamptz("archived_at")
111
- }, (table) => [
112
- index("junior_conversations_last_activity_idx").on(table.lastActivityAt.desc(), table.conversationId),
113
- index("junior_conversations_active_idx").using("btree", sql`coalesce(${table.executionUpdatedAt}, ${table.updatedAt})`, table.conversationId).where(sql`${table.executionStatus} <> 'idle'`),
114
- index("junior_conversations_destination_activity_idx").on(table.destinationId, table.lastActivityAt.desc()),
115
- index("junior_conversations_actor_activity_idx").on(table.actorIdentityId, table.lastActivityAt.desc()),
116
- index("junior_conversations_origin_idx").on(table.originType, table.originId, table.lastActivityAt.desc()),
117
- index("junior_conversations_parent_idx").on(table.parentConversationId),
118
- index("junior_conversations_forked_from_idx").on(table.forkedFromConversationId),
119
- index("junior_conversations_root_idx").on(table.rootConversationId)
120
- ]);
121
- /** Select runtime conversation fields without reading the legacy archive column. */
122
- function conversationReadColumns() {
123
- const { legacyArchivedAt, ...columns } = getTableColumns(juniorConversations);
124
- return columns;
125
- }
126
- //#endregion
127
36
  //#region src/db/schema/attachments.ts
128
37
  /** Durable metadata for files owned by one conversation. */
129
38
  const juniorAttachments = pgTable("junior_attachments", {
@@ -357,34 +266,6 @@ const juniorConversationParticipants = pgTable("junior_conversation_participants
357
266
  index("junior_conversation_participants_root_idx").on(table.rootConversationId)
358
267
  ]);
359
268
  //#endregion
360
- //#region src/db/schema/agent-invocations.ts
361
- const AGENT_INVOCATION_MAILBOX_STATUSES = ["pending", "appended"];
362
- const juniorAgentBindings = pgTable("junior_agent_bindings", {
363
- parentConversationId: text("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
364
- name: text("name").notNull(),
365
- childConversationId: text("child_conversation_id").notNull().references(() => juniorConversations.conversationId)
366
- }, (table) => [primaryKey({ columns: [table.parentConversationId, table.name] }), uniqueIndex("junior_agent_bindings_child_idx").on(table.childConversationId)]);
367
- const juniorAgentInvocations = pgTable("junior_agent_invocations", {
368
- invocationId: text("invocation_id").primaryKey(),
369
- parentConversationId: text("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
370
- childConversationId: text("child_conversation_id").notNull().references(() => juniorConversations.conversationId),
371
- agentName: text("agent_name"),
372
- input: text("input").notNull(),
373
- actor: jsonb("actor_json").$type().notNull(),
374
- credentialContext: jsonb("credential_context_json").$type(),
375
- source: jsonb("source_json").$type().notNull(),
376
- destination: jsonb("destination_json").$type().notNull(),
377
- destinationVisibility: text("destination_visibility").$type(),
378
- reasoningLevel: text("reasoning_level").$type(),
379
- status: text("status").$type().notNull(),
380
- mailboxStatus: text("mailbox_status").$type().notNull(),
381
- result: text("result"),
382
- errorMessage: text("error_message"),
383
- createdAt: timestamptz("created_at").notNull(),
384
- updatedAt: timestamptz("updated_at").notNull(),
385
- terminalAt: timestamptz("terminal_at")
386
- }, (table) => [index("junior_agent_invocations_child_idx").on(table.childConversationId), index("junior_agent_invocations_mailbox_idx").on(table.mailboxStatus, table.createdAt)]);
387
- //#endregion
388
269
  //#region src/db/schema/location-configurations.ts
389
270
  /** Durable user configuration entries scoped to provider Locations. */
390
271
  const juniorLocationConfigurations = pgTable("junior_location_configurations", {
@@ -1137,4 +1018,4 @@ function createJuniorSqlExecutor(args) {
1137
1018
  });
1138
1019
  }
1139
1020
  //#endregion
1140
- export { juniorArtifacts as A, juniorCodeChanges as C, juniorConversations as D, conversationReadColumns as E, juniorIdentities as O, juniorConversationAnnotations as S, juniorAttachments as T, juniorConversationBriefs as _, juniorSchedulerRuns as a, juniorConversationEvents as b, juniorAutomationExecutions as c, juniorLocationConfigurations as d, AGENT_INVOCATION_MAILBOX_STATUSES as f, juniorConversationBindings as g, juniorConversationParticipants as h, juniorWorkspaces as i, juniorUsers as k, juniorStats as l, juniorAgentInvocations as m, juniorSnapshots as n, juniorSchedulerTasks as o, juniorAgentBindings as p, juniorWorkspaceRepos as r, juniorAutomationVersions as s, createJuniorSqlExecutor as t, juniorEventAutomations as u, CONVERSATION_METRICS as v, juniorCodeRepositories as w, juniorApiTokens as x, juniorConversationMetrics as y };
1021
+ export { juniorArtifacts as C, juniorAttachments as S, juniorConversationEvents as _, juniorSchedulerRuns as a, juniorCodeChanges as b, juniorAutomationExecutions as c, juniorLocationConfigurations as d, juniorConversationParticipants as f, juniorConversationMetrics as g, CONVERSATION_METRICS as h, juniorWorkspaces as i, juniorStats as l, juniorConversationBriefs as m, juniorSnapshots as n, juniorSchedulerTasks as o, juniorConversationBindings as p, juniorWorkspaceRepos as r, juniorAutomationVersions as s, createJuniorSqlExecutor as t, juniorEventAutomations as u, juniorApiTokens as v, juniorCodeRepositories as x, juniorConversationAnnotations as y };
@@ -387,6 +387,7 @@ const subagentEndedEventDataSchema = z.object({
387
387
  subagentInvocationId: z.string().min(1),
388
388
  outcome: z.union([
389
389
  z.literal("success"),
390
+ z.literal("blocked"),
390
391
  z.literal("error"),
391
392
  z.literal("aborted")
392
393
  ]),
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-CMZ6lFQe.js";
3
- import { f as getSqlExecutor } from "./viewer-D6stAU7h.js";
4
- import "./conversation-DwD-vquD.js";
2
+ import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-BZOjoMlZ.js";
3
+ import { f as getSqlExecutor } from "./viewer-B7qDM2DM.js";
4
+ import "./conversation-mt3yJ09u.js";
5
5
  //#region src/chat/attachments/images.ts
6
6
  var images_exports = /* @__PURE__ */ __exportAll({
7
7
  decodeInputImages: () => decodeInputImages,
@@ -1,6 +1,6 @@
1
- import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-LQnLlPf8.js";
1
+ import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-CdZ1LQJ7.js";
2
2
  import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-D5Byl5eC.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BIplVfmz.js";
4
4
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
5
5
  //#region src/chat/sentry-payload-filter.ts
6
6
  const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { i as getChatConfig } from "./config-CCI82OTD.js";
1
+ import { i as getChatConfig } from "./config-gype19qQ.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { z } from "zod";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
2
- import { t as JUNIOR_VERSION } from "./version-DiR36OaN.js";
2
+ import { t as JUNIOR_VERSION } from "./version-BvG02ZTN.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
package/dist/nitro.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { r as JuniorDashboardOptions } from "./app-MEd7wbF0.js";
1
+ import { r as JuniorDashboardOptions } from "./app-DRLh-8zs.js";
2
2
  import { n as JuniorPluginSet } from "./plugins-CjfUP5gJ.js";
3
3
  //#region src/nitro.d.ts
4
4
  export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-LQnLlPf8.js";
1
+ import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-CdZ1LQJ7.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-BVvSnQBB.js";
3
- import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-C6o2aJQ6.js";
3
+ import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-DQDesz8a.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-1LP6benz.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-CAi-XM8x.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-CVvEUSMH.js";
7
7
  import path from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -1,4 +1,4 @@
1
- import { it as extractAssistantText } from "./tasks-CO52vLkI.js";
1
+ import { it as extractAssistantText } from "./tasks-Qx6Fos_R.js";
2
2
  //#region src/chat/runtime/turn.ts
3
3
  /** Classified Slack turn failure carrying the owning Sentry capture outward. */
4
4
  var ConversationTurnBoundaryError = class extends Error {
@@ -1,5 +1,5 @@
1
- import { Xt as createUserTokenStore } from "./agent-runner-CMZ6lFQe.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DUpSxUum.js";
1
+ import { fn as createUserTokenStore } from "./agent-runner-BZOjoMlZ.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-BY97dkST.js";
3
3
  import { createServer } from "node:http";
4
4
  //#region src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,5 +1,5 @@
1
- import { v as isProviderRetryError } from "./client-CRZ-i1tH.js";
2
- import { in as estimateTextTokens, q as abandonTurnRecord } from "./tasks-CO52vLkI.js";
1
+ import { v as isProviderRetryError } from "./client-Es79bknZ.js";
2
+ import { an as estimateTextTokens, q as abandonTurnRecord } from "./tasks-Qx6Fos_R.js";
3
3
  import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
4
4
  import { z } from "zod";
5
5
  //#region src/chat/state/turn-id.ts
@@ -1,7 +1,7 @@
1
- import { S as toOptionalTrimmed } from "./client-CRZ-i1tH.js";
2
- import { v as setSpanAttributes, y as setSpanStatus } from "./logging-LQnLlPf8.js";
3
- import { i as getChatConfig } from "./config-CCI82OTD.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Tz0O2MZe.js";
1
+ import { S as toOptionalTrimmed } from "./client-Es79bknZ.js";
2
+ import { v as setSpanAttributes, y as setSpanStatus } from "./logging-CdZ1LQJ7.js";
3
+ import { i as getChatConfig } from "./config-gype19qQ.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-jazDa-oO.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
7
7
  import { createRedisState } from "@chat-adapter/state-redis";
@@ -1,4 +1,4 @@
1
- import { B as parseBriefInput, R as briefOutcomeStatusSchema, z as conversationBriefSchema } from "./conversation-DwD-vquD.js";
1
+ import { B as parseBriefInput, R as briefOutcomeStatusSchema, z as conversationBriefSchema } from "./conversation-mt3yJ09u.js";
2
2
  import { z } from "zod";
3
3
  //#region src/chat/briefs/generate.ts
4
4
  const MAX_INPUT_CHARS = 6e4;
@@ -1,4 +1,4 @@
1
- import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-LQnLlPf8.js";
1
+ import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-CdZ1LQJ7.js";
2
2
  import { o as parseActorUserId } from "./actor-BTtLaeWy.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-BVvSnQBB.js";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
- import { v as setSpanAttributes, w as withSpan } from "./logging-LQnLlPf8.js";
2
- import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-mWuVZ8ht.js";
1
+ import { v as setSpanAttributes, w as withSpan } from "./logging-CdZ1LQJ7.js";
2
+ import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-qqt_2di0.js";
3
3
  import { z } from "zod";
4
4
  import { FileSystem, Sandbox } from "@vercel/sandbox";
5
5
  //#region src/chat/sandbox/resources.ts
@@ -1,13 +1,13 @@
1
- import { C as withLogContext, b as setTags, d as logException } from "./logging-LQnLlPf8.js";
2
- import { c as getConversationEventStore, u as getConversationStore } from "./viewer-D6stAU7h.js";
3
- import { d as credentialContextForActor } from "./registry-DPDH6s5G.js";
4
- import { $ as persistWithRetry, $t as markConversationMessage, Bt as persistConversationMessages, Jt as buildConversationContext, K as saveTurnCheckpoint, bt as commitAcceptedReply, en as normalizeConversationText, jt as recordAuthorizationCompleted, rn as upsertConversationMessage, tn as recordDeliveredAssistantMessage, wt as loadProjection, zt as hydrateConversationMessages } from "./tasks-CO52vLkI.js";
5
- import { U as messageCardText } from "./conversation-DwD-vquD.js";
6
- import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-Clzkm-Ts.js";
7
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-kLN3HC-_.js";
8
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DGqZgU6J.js";
9
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CaFRG5Mh.js";
10
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-Dmovuiq1.js";
1
+ import { C as withLogContext, b as setTags, d as logException } from "./logging-CdZ1LQJ7.js";
2
+ import { c as getConversationEventStore, u as getConversationStore } from "./viewer-B7qDM2DM.js";
3
+ import { d as credentialContextForActor } from "./registry-WOJKAIRI.js";
4
+ import { $ as persistWithRetry, Bt as hydrateConversationMessages, K as saveTurnCheckpoint, Mt as recordAuthorizationCompleted, Tt as loadProjection, Vt as persistConversationMessages, Yt as buildConversationContext, bt as commitAcceptedReply, en as markConversationMessage, in as upsertConversationMessage, nn as recordDeliveredAssistantMessage, tn as normalizeConversationText } from "./tasks-Qx6Fos_R.js";
5
+ import { U as messageCardText } from "./conversation-mt3yJ09u.js";
6
+ import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-Di0KlyoJ.js";
7
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CIP2asjP.js";
8
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-BzeE4sVD.js";
9
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BN_5S1bx.js";
10
+ import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-B1UW2T7a.js";
11
11
  import { randomUUID } from "node:crypto";
12
12
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
13
13
  //#region src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { Gt as sandboxEgressSignalsResponseSchema } from "./agent-runner-CMZ6lFQe.js";
1
+ import { sn as sandboxEgressSignalsResponseSchema } from "./agent-runner-BZOjoMlZ.js";
2
2
  //#region src/chat/local/sandbox-egress-signals.ts
3
3
  const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
4
4
  const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
@@ -1,5 +1,5 @@
1
- import { t as juniorDestinationKindSchema } from "./destinations-BeBiJeEM.js";
2
- import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-DwD-vquD.js";
1
+ import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-BzRAZ_nj.js";
2
+ import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-mt3yJ09u.js";
3
3
  import "./automation-gznOMaQ2.js";
4
4
  import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-xPI_EFSC.js";
5
5
  import { z } from "zod";
@@ -8,6 +8,37 @@ import { codeChangeStateSchema } from "@sentry/junior-plugin-api";
8
8
  /** Stable error body returned by Junior-owned REST endpoints. */
9
9
  const apiErrorSchema = z.object({ error: z.string().min(1) }).strict();
10
10
  //#endregion
11
+ //#region src/api/schema/child-agent.ts
12
+ /**
13
+ * One direct child agent of a Conversation, from agent invocation records.
14
+ *
15
+ * Viewers who cannot see private content get the status and time, but not the
16
+ * name, task, or error.
17
+ */
18
+ const conversationChildAgentSchema = z.object({
19
+ conversationId: z.string().min(1),
20
+ error: z.string().min(1).optional(),
21
+ name: z.string().min(1).optional(),
22
+ redacted: z.literal(true).optional(),
23
+ status: z.enum(AGENT_INVOCATION_STATUSES),
24
+ task: z.string().optional(),
25
+ updatedAt: z.string().datetime()
26
+ }).strict().superRefine((data, context) => {
27
+ if (data.task === void 0 === (data.redacted !== true)) context.addIssue({
28
+ code: "custom",
29
+ message: "child agent task must be text or explicitly redacted"
30
+ });
31
+ if (data.redacted && (data.name || data.error)) context.addIssue({
32
+ code: "custom",
33
+ message: "redacted child agents must not expose a name or error"
34
+ });
35
+ });
36
+ /** Direct child agents of one Conversation, newest activity first. */
37
+ const conversationChildAgentsReportSchema = z.object({
38
+ agents: z.array(conversationChildAgentSchema),
39
+ conversationId: z.string().min(1)
40
+ }).strict();
41
+ //#endregion
11
42
  //#region src/api/schema/code.ts
12
43
  const codeChangeSummarySchema = z.object({
13
44
  closed: z.number().int().nonnegative(),
@@ -343,4 +374,4 @@ const statsReportSchema = z.object({
343
374
  windowStart: z.string()
344
375
  }).strict();
345
376
  //#endregion
346
- export { codeChangeSummarySchema as A, locationParamsSchema as C, dailyConversationActivitySchema as D, activitySixHours as E, codeRepositorySummarySchema as F, apiErrorSchema as I, codePersonReportSchema as M, codeRepositoryParamsSchema as N, codeActivityDaySchema as O, codeRepositoryReportSchema as P, locationDirectoryReportSchema as S, activityHours as T, actorProfileReportSchema as _, workspaceBodySchema as a, locationActivityDayReportSchema as b, workspaceRepoSchema as c, createdPersonalTokenSchema as d, personalTokenListSchema as f, actorDirectoryReportSchema as g, revokePersonalTokenResponseSchema as h, deleteWorkspaceResponseSchema as i, codeOverviewReportSchema as j, codeChangeSummaryReportSchema as k, workspaceSchema as l, personalTokenParamsSchema as m, statsReportSchema as n, workspaceListSchema as o, personalTokenMetadataSchema as p, baselineSnapshotSchema as r, workspaceParamsSchema as s, statSchema as t, createPersonalTokenBodySchema as u, personParamsSchema as v, activityDays as w, locationDetailReportSchema as x, personalSpendReportSchema as y };
377
+ export { codeChangeSummarySchema as A, locationParamsSchema as C, dailyConversationActivitySchema as D, activitySixHours as E, codeRepositorySummarySchema as F, conversationChildAgentSchema as I, conversationChildAgentsReportSchema as L, codePersonReportSchema as M, codeRepositoryParamsSchema as N, codeActivityDaySchema as O, codeRepositoryReportSchema as P, apiErrorSchema as R, locationDirectoryReportSchema as S, activityHours as T, actorProfileReportSchema as _, workspaceBodySchema as a, locationActivityDayReportSchema as b, workspaceRepoSchema as c, createdPersonalTokenSchema as d, personalTokenListSchema as f, actorDirectoryReportSchema as g, revokePersonalTokenResponseSchema as h, deleteWorkspaceResponseSchema as i, codeOverviewReportSchema as j, codeChangeSummaryReportSchema as k, workspaceSchema as l, personalTokenParamsSchema as m, statsReportSchema as n, workspaceListSchema as o, personalTokenMetadataSchema as p, baselineSnapshotSchema as r, workspaceParamsSchema as s, statSchema as t, createPersonalTokenBodySchema as u, personParamsSchema as v, activityDays as w, locationDetailReportSchema as x, personalSpendReportSchema as y };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { p as logWarn } from "./logging-LQnLlPf8.js";
2
+ import { p as logWarn } from "./logging-CdZ1LQJ7.js";
3
3
  import { s as skillRoots } from "./package-discovery-BVvSnQBB.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Tz0O2MZe.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-jazDa-oO.js";
5
5
  import path from "node:path";
6
6
  import { z } from "zod";
7
7
  import fs from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { $t as actorFromRun, en as toolInvocationDestination } from "./agent-runner-CMZ6lFQe.js";
3
- import { n as createAndEnqueueAgentInvocation } from "./work-G-HdoOSF.js";
2
+ import { gn as toolInvocationDestination, hn as actorFromRun } from "./agent-runner-BZOjoMlZ.js";
3
+ import { n as createAndEnqueueAgentInvocation } from "./work-D_BBvd4I.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. */
@@ -10,7 +10,7 @@ function bindSpawnAgent(run, options) {
10
10
  return async (input, call) => {
11
11
  call.signal?.throwIfAborted();
12
12
  const queue = typeof options.queue === "function" ? options.queue() : options.queue;
13
- return { invocationId: (await createAndEnqueueAgentInvocation({
13
+ return { childConversationId: (await createAndEnqueueAgentInvocation({
14
14
  actor,
15
15
  ...input.name ? { agentName: input.name } : void 0,
16
16
  ...run.credentialContext ? { credentialContext: run.credentialContext } : void 0,
@@ -18,11 +18,12 @@ function bindSpawnAgent(run, options) {
18
18
  idempotencyKey: `${run.turnId}:${call.toolCallId}`,
19
19
  input: input.task,
20
20
  parentConversationId: run.conversationId,
21
+ parentToolCallId: call.toolCallId,
21
22
  ...input.reasoningLevel ? { reasoningLevel: input.reasoningLevel } : void 0
22
23
  }, {
23
24
  ...options,
24
25
  queue
25
- })).invocationId };
26
+ })).childConversationId };
26
27
  };
27
28
  }
28
29
  //#endregion
@@ -1,5 +1,5 @@
1
- import { p as logWarn } from "./logging-LQnLlPf8.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-C6o2aJQ6.js";
1
+ import { p as logWarn } from "./logging-CdZ1LQJ7.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-DQDesz8a.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-kLN3HC-_.js").then((n) => n.r);
118
+ const { processPluginTask } = await import("./task-runner-CIP2asjP.js").then((n) => n.r);
119
119
  await processPluginTask(message);
120
120
  },
121
121
  topic: PLUGIN_TASK_QUEUE_TOPIC,
@@ -1,16 +1,17 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { h as runBestEffort, p as logWarn } from "./logging-LQnLlPf8.js";
2
+ import { h as runBestEffort, p as logWarn } from "./logging-CdZ1LQJ7.js";
3
3
  import { g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
4
- import { C as agentTurnTotalTokens, S as agentTurnCostUsd, d as getDb, r as readActorIdentity, u as getConversationStore } from "./viewer-D6stAU7h.js";
5
- import { D as juniorConversations, c as juniorAutomationExecutions } from "./executor-CewKi7EG.js";
6
- import { p as sameActorIdentity } from "./history-BLTUgFYO.js";
7
- import { p as credentialSubjectSchema } from "./registry-DPDH6s5G.js";
8
- import { A as formatSlackLink, Gt as fallbackShortTitle, L as openSlackDirectMessage, X as getTurnRecord, a as readScheduledAutomation, at as getPiMessageRole, ft as isToolResultError, g as getEventAutomation, gt as stripRuntimeTurnContext, k as escapeSlackMrkdwnText, lt as instructionTextForProjection, mt as normalizeToolNameFromResult, pt as isToolResultMessage, u as blockEventAutomation, z as postSlackMessage, zt as hydrateConversationMessages } from "./tasks-CO52vLkI.js";
9
- import { ct as createPluginModel, it as getDashboardTaskLink, lt as createPluginLogger, ot as createPluginState, p as coreTaskRegistrations, st as createPluginEmbedder, tt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, yt as createPluginConversationEvents } from "./agent-hooks-C5zYOaJk.js";
10
- import { w as getStateAdapter } from "./profile-mWuVZ8ht.js";
11
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CaFRG5Mh.js";
12
- import { t as resolveConversationRouting } from "./turn-session-routing-B_v8Wbn4.js";
13
- import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-1LP6benz.js";
4
+ import { C as agentTurnTotalTokens, S as agentTurnCostUsd, d as getDb, r as readActorIdentity, u as getConversationStore } from "./viewer-B7qDM2DM.js";
5
+ import { s as juniorConversations } from "./agent-invocations-BzRAZ_nj.js";
6
+ import { c as juniorAutomationExecutions } from "./executor-C7bsEF-c.js";
7
+ import { p as sameActorIdentity } from "./history-DlsoHsoe.js";
8
+ import { p as credentialSubjectSchema } from "./registry-WOJKAIRI.js";
9
+ import { A as formatSlackLink, Bt as hydrateConversationMessages, Kt as fallbackShortTitle, L as openSlackDirectMessage, X as getTurnRecord, a as readScheduledAutomation, at as getPiMessageRole, ft as isToolResultError, g as getEventAutomation, gt as stripRuntimeTurnContext, k as escapeSlackMrkdwnText, lt as instructionTextForProjection, mt as normalizeToolNameFromResult, pt as isToolResultMessage, u as blockEventAutomation, z as postSlackMessage } from "./tasks-Qx6Fos_R.js";
10
+ import { ct as createPluginModel, it as getDashboardTaskLink, lt as createPluginLogger, ot as createPluginState, p as coreTaskRegistrations, st as createPluginEmbedder, tt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, yt as createPluginConversationEvents } from "./agent-hooks-Cqo6ULp6.js";
11
+ import { w as getStateAdapter } from "./profile-qqt_2di0.js";
12
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BN_5S1bx.js";
13
+ import { t as resolveConversationRouting } from "./turn-session-routing-DsvU39zW.js";
14
+ import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-CAi-XM8x.js";
14
15
  import { z } from "zod";
15
16
  import { createHash } from "node:crypto";
16
17
  import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";