@sentry/junior 0.163.0 → 0.164.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 (61) hide show
  1. package/dist/{agent-hooks-6IX5CV7G.js → agent-hooks-WTBPNRTC.js} +9 -9
  2. package/dist/api/schema/workspace.d.ts +47 -0
  3. package/dist/api/schema.d.ts +2 -0
  4. package/dist/api/schema.js +15 -3
  5. package/dist/api/workspaces/routes.d.ts +4 -0
  6. package/dist/api.js +139 -27
  7. package/dist/app.js +33 -31
  8. package/dist/{catalog-runtime-NEPZNTOM.js → catalog-runtime-CZ2SQINY.js} +5 -5
  9. package/dist/chat/workspaces/store.d.ts +29 -0
  10. package/dist/chat/workspaces/validation.d.ts +21 -0
  11. package/dist/{chunk-ZDKTZG3G.js → chunk-26JYGL2L.js} +1 -1
  12. package/dist/{chunk-EKGJVUVS.js → chunk-2K25MRZK.js} +5 -5
  13. package/dist/{chunk-KD3ROG6P.js → chunk-3L23VTY7.js} +17 -17
  14. package/dist/{chunk-GCLHNRMU.js → chunk-4GTOFUQF.js} +1 -1
  15. package/dist/{chunk-NL53P7PS.js → chunk-5FWQ73UZ.js} +1 -1
  16. package/dist/{chunk-2FBPN2Y4.js → chunk-5GLGQHO3.js} +1 -1
  17. package/dist/{chunk-XY2IVIAY.js → chunk-6BXV63YX.js} +5 -5
  18. package/dist/{chunk-FEIHINKR.js → chunk-6ENAACWN.js} +5 -5
  19. package/dist/{chunk-IX4XI42N.js → chunk-7WKWMMYQ.js} +21 -73
  20. package/dist/{chunk-TPDNZCZU.js → chunk-BXBZDV3C.js} +1 -1
  21. package/dist/{chunk-SR6WRBJW.js → chunk-CGCNFEAU.js} +4 -4
  22. package/dist/{chunk-MWVQ35U6.js → chunk-FKDY7NTC.js} +12 -12
  23. package/dist/{chunk-YAUQXZVT.js → chunk-FX4PX3SA.js} +2 -2
  24. package/dist/{chunk-RTPJRLOP.js → chunk-H36GJVJV.js} +7 -7
  25. package/dist/{chunk-MXFL7LNZ.js → chunk-HHW6ZVIZ.js} +4 -4
  26. package/dist/{chunk-3OZNFCPR.js → chunk-JW23XD4I.js} +6 -6
  27. package/dist/{chunk-JI5EPI3O.js → chunk-LPLVNMVN.js} +3 -3
  28. package/dist/{chunk-IIT23D3M.js → chunk-NAGI2XH3.js} +4 -4
  29. package/dist/{chunk-4P2XNVTO.js → chunk-NLTQRYNP.js} +2 -2
  30. package/dist/{chunk-SA6BEEAB.js → chunk-PU45BSBS.js} +108 -74
  31. package/dist/{chunk-3T7RJVDJ.js → chunk-RBV4JHCP.js} +1 -1
  32. package/dist/{chunk-THS4CKN4.js → chunk-RJHZNPDH.js} +4 -4
  33. package/dist/{chunk-RK7KPI6G.js → chunk-RULIISEI.js} +1 -1
  34. package/dist/{chunk-BLZUFHM7.js → chunk-RYYEHWIL.js} +1 -1
  35. package/dist/{chunk-TPT6EF7K.js → chunk-VHSEMJTS.js} +1 -1
  36. package/dist/{chunk-O4IK4O7C.js → chunk-VV2DN24T.js} +1 -1
  37. package/dist/{chunk-ICJ3KCA2.js → chunk-WJUKESU2.js} +1 -1
  38. package/dist/{chunk-2HBJQEBE.js → chunk-XAIRI54J.js} +1 -1
  39. package/dist/{chunk-WPGYWDJR.js → chunk-Y2B6AXZQ.js} +6 -6
  40. package/dist/{chunk-ZF6IC27P.js → chunk-YHCTPDXS.js} +274 -8
  41. package/dist/{chunk-ATWHPSMF.js → chunk-ZSNABC2E.js} +1 -1
  42. package/dist/{chunk-O5ZZL7IR.js → chunk-ZUTAGCPH.js} +9 -9
  43. package/dist/cli/chat.js +29 -29
  44. package/dist/cli/check.js +6 -6
  45. package/dist/cli/plugins.js +12 -12
  46. package/dist/cli/snapshot-create.js +9 -9
  47. package/dist/cli/upgrade.js +7 -7
  48. package/dist/{db-6VBMHVW2.js → db-32KRFS6L.js} +7 -7
  49. package/dist/instrumentation.js +4 -4
  50. package/dist/nitro.js +2 -2
  51. package/dist/{oauth-callback-server-5NCCUIM2.js → oauth-callback-server-CGZP2Z6U.js} +22 -22
  52. package/dist/{runner-6ONEB6TQ.js → runner-S5N4Q2XL.js} +31 -33
  53. package/dist/{skills-Y5R36UH4.js → skills-KYPSHSQR.js} +6 -6
  54. package/dist/spawn-EGOB3CLV.js +37 -0
  55. package/dist/{validation-HLHEQDEK.js → validation-SZBE7JNF.js} +6 -6
  56. package/dist/version.js +1 -1
  57. package/dist/{work-VIEFYTFG.js → work-GCZKHEZX.js} +17 -17
  58. package/dist/worker-6MY5Q4A2.js +24 -0
  59. package/package.json +5 -5
  60. package/dist/spawn-RFMBQ6B3.js +0 -37
  61. package/dist/worker-MRSKPKQZ.js +0 -24
@@ -1,8 +1,37 @@
1
1
  import type { JuniorDatabase } from "@/db/db";
2
2
  import type { Workspace } from "./types";
3
+ import { WorkspaceValidationError } from "./validation";
3
4
  /** List Workspace recipes by stable name. */
4
5
  export declare function listWorkspaces(db: JuniorDatabase): Promise<Workspace[]>;
6
+ /** Find Workspace names that include one provider repository. */
7
+ export declare function listWorkspaceNamesByRepository(db: JuniorDatabase, input: {
8
+ provider: string;
9
+ repo: string;
10
+ }): Promise<string[]>;
5
11
  /** Resolve one Workspace recipe by name. */
6
12
  export declare function getWorkspaceByName(db: JuniorDatabase, name: string): Promise<Workspace | undefined>;
7
13
  /** Resolve one Workspace recipe by id. */
8
14
  export declare function getWorkspace(db: JuniorDatabase, id: string): Promise<Workspace | undefined>;
15
+ /** Create one install-wide Workspace recipe. */
16
+ export declare function createWorkspace(input: {
17
+ name: string;
18
+ setupScript?: string;
19
+ repos: Array<{
20
+ provider: string;
21
+ repo: string;
22
+ isPrimary?: boolean;
23
+ }>;
24
+ }): Promise<Workspace>;
25
+ /** Replace one install-wide Workspace recipe. */
26
+ export declare function updateWorkspace(id: string, input: {
27
+ name: string;
28
+ setupScript?: string;
29
+ repos: Array<{
30
+ provider: string;
31
+ repo: string;
32
+ isPrimary?: boolean;
33
+ }>;
34
+ }): Promise<Workspace | undefined>;
35
+ /** Delete one install-wide Workspace recipe. */
36
+ export declare function deleteWorkspace(id: string): Promise<boolean>;
37
+ export { WorkspaceValidationError };
@@ -0,0 +1,21 @@
1
+ import type { WorkspaceRepo } from "./types";
2
+ /** Normalized recipe fields accepted by Workspace write paths. */
3
+ export interface WorkspaceRecipeInput {
4
+ name: string;
5
+ setupScript: string;
6
+ repos: WorkspaceRepo[];
7
+ }
8
+ /** Validation failure for one Workspace recipe write. */
9
+ export declare class WorkspaceValidationError extends Error {
10
+ constructor(message: string);
11
+ }
12
+ /** Normalize and validate one Workspace recipe write payload. */
13
+ export declare function normalizeWorkspaceRecipe(input: {
14
+ name: string;
15
+ setupScript?: string;
16
+ repos: Array<{
17
+ provider: string;
18
+ repo: string;
19
+ isPrimary?: boolean;
20
+ }>;
21
+ }): WorkspaceRecipeInput;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JUNIOR_VERSION
3
- } from "./chunk-2FBPN2Y4.js";
3
+ } from "./chunk-5GLGQHO3.js";
4
4
 
5
5
  // src/deployment.ts
6
6
  var JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  persistConversationMessages
3
- } from "./chunk-MXFL7LNZ.js";
3
+ } from "./chunk-HHW6ZVIZ.js";
4
4
  import {
5
5
  JUNIOR_THREAD_STATE_TTL_MS
6
6
  } from "./chunk-3Y47VMHV.js";
7
7
  import {
8
8
  getDb
9
- } from "./chunk-JI5EPI3O.js";
9
+ } from "./chunk-LPLVNMVN.js";
10
10
  import {
11
11
  juniorLocationConfigurations
12
- } from "./chunk-ATWHPSMF.js";
12
+ } from "./chunk-ZSNABC2E.js";
13
13
  import {
14
14
  getStateAdapter
15
- } from "./chunk-TPDNZCZU.js";
15
+ } from "./chunk-BXBZDV3C.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -20,7 +20,7 @@ import {
20
20
  isRecord,
21
21
  toOptionalNumber,
22
22
  toOptionalString
23
- } from "./chunk-TPT6EF7K.js";
23
+ } from "./chunk-VHSEMJTS.js";
24
24
 
25
25
  // src/chat/conversations/turn-lifecycle.ts
26
26
  var ConversationTurnLifecycleService = class {
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-FA6POGLH.js";
4
4
  import {
5
5
  getTurnRequestDeadline
6
- } from "./chunk-BLZUFHM7.js";
6
+ } from "./chunk-RYYEHWIL.js";
7
7
  import {
8
8
  buildSentryConversationUrl,
9
9
  deleteWebAuthorization
10
- } from "./chunk-NL53P7PS.js";
10
+ } from "./chunk-5FWQ73UZ.js";
11
11
  import {
12
12
  ensureConversationWake,
13
13
  requestConversationWork
14
- } from "./chunk-IIT23D3M.js";
14
+ } from "./chunk-NAGI2XH3.js";
15
15
  import {
16
16
  buildDeliveredTurnStatePatch,
17
17
  finalizeFailedTurnReplyWithEvent,
@@ -24,7 +24,7 @@ import {
24
24
  requireTurnFailureEventId,
25
25
  resolveTurnSessionRouting,
26
26
  scheduleSessionCompletedPluginTasks
27
- } from "./chunk-O5ZZL7IR.js";
27
+ } from "./chunk-ZUTAGCPH.js";
28
28
  import {
29
29
  ConversationTurnLifecycleService,
30
30
  coerceThreadConversationState,
@@ -33,7 +33,7 @@ import {
33
33
  getPersistedSandboxState,
34
34
  getPersistedThreadState,
35
35
  persistThreadStateById
36
- } from "./chunk-EKGJVUVS.js";
36
+ } from "./chunk-2K25MRZK.js";
37
37
  import {
38
38
  getVercelConversationWorkQueue
39
39
  } from "./chunk-WR76IVA5.js";
@@ -47,7 +47,7 @@ import {
47
47
  lookupSlackUserProfile,
48
48
  resolvePluginOAuthAccount,
49
49
  runAgentWithTimeout
50
- } from "./chunk-RTPJRLOP.js";
50
+ } from "./chunk-H36GJVJV.js";
51
51
  import {
52
52
  RetryableDeliveryError
53
53
  } from "./chunk-RF6J3DIO.js";
@@ -63,13 +63,13 @@ import {
63
63
  removeReactionFromMessage,
64
64
  resolveBaseUrl,
65
65
  truncateStatusText
66
- } from "./chunk-3OZNFCPR.js";
66
+ } from "./chunk-JW23XD4I.js";
67
67
  import {
68
68
  parseSlackThreadId,
69
69
  readSlackRawMessageContext,
70
70
  resolveSlackChannelIdFromMessage,
71
71
  resolveSlackChannelIdFromThreadId
72
- } from "./chunk-ICJ3KCA2.js";
72
+ } from "./chunk-WJUKESU2.js";
73
73
  import {
74
74
  CooperativeTurnYieldError,
75
75
  TurnSliceLimitExceededError,
@@ -96,7 +96,7 @@ import {
96
96
  recordTurnSummary,
97
97
  saveTurnCheckpoint,
98
98
  turnHasReply
99
- } from "./chunk-MXFL7LNZ.js";
99
+ } from "./chunk-HHW6ZVIZ.js";
100
100
  import {
101
101
  SlackActionError,
102
102
  getDashboardConversationLink,
@@ -105,18 +105,18 @@ import {
105
105
  getSlackClient,
106
106
  isDmChannel,
107
107
  normalizeSlackConversationId
108
- } from "./chunk-ZF6IC27P.js";
108
+ } from "./chunk-YHCTPDXS.js";
109
109
  import {
110
110
  getConversationEventStore,
111
111
  getSqlExecutor,
112
112
  requireSlackDestination,
113
113
  upsertIdentity,
114
114
  upsertLinkedIdentity
115
- } from "./chunk-JI5EPI3O.js";
115
+ } from "./chunk-LPLVNMVN.js";
116
116
  import {
117
117
  acquireActiveLock,
118
118
  getStateAdapter
119
- } from "./chunk-TPDNZCZU.js";
119
+ } from "./chunk-BXBZDV3C.js";
120
120
  import {
121
121
  botConfig,
122
122
  escapeXml,
@@ -124,18 +124,18 @@ import {
124
124
  getRuntimeMetadata,
125
125
  normalizeSlackEmojiName,
126
126
  standardModelId
127
- } from "./chunk-YAUQXZVT.js";
127
+ } from "./chunk-FX4PX3SA.js";
128
128
  import {
129
129
  discoverSkills
130
- } from "./chunk-4P2XNVTO.js";
130
+ } from "./chunk-NLTQRYNP.js";
131
131
  import {
132
132
  pluginCatalogRuntime
133
- } from "./chunk-RK7KPI6G.js";
133
+ } from "./chunk-RULIISEI.js";
134
134
  import {
135
135
  buildOAuthTokenRequest,
136
136
  hasRequiredOAuthScope,
137
137
  parseOAuthTokenResponse
138
- } from "./chunk-O4IK4O7C.js";
138
+ } from "./chunk-VV2DN24T.js";
139
139
  import {
140
140
  createSlackResumeActor,
141
141
  isUserActor,
@@ -151,7 +151,7 @@ import {
151
151
  setTags,
152
152
  toOptionalString,
153
153
  withLogContext
154
- } from "./chunk-TPT6EF7K.js";
154
+ } from "./chunk-VHSEMJTS.js";
155
155
  import {
156
156
  homeDir
157
157
  } from "./chunk-H4HBKISO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-RK7KPI6G.js";
3
+ } from "./chunk-RULIISEI.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-TPDNZCZU.js";
3
+ } from "./chunk-BXBZDV3C.js";
4
4
  import {
5
5
  getClient
6
6
  } from "./chunk-6GWA276C.js";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.163.0",
4
+ version: "0.164.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  formatProviderLabel,
6
6
  startOAuthFlow
7
- } from "./chunk-3OZNFCPR.js";
7
+ } from "./chunk-JW23XD4I.js";
8
8
  import {
9
9
  parseSandboxEgressAuthRequiredSignal
10
10
  } from "./chunk-7MA4HV4W.js";
@@ -12,16 +12,16 @@ import {
12
12
  abandonReplacedPendingAuth,
13
13
  canReusePendingAuthLink,
14
14
  recordAuthorizationRequested
15
- } from "./chunk-MXFL7LNZ.js";
15
+ } from "./chunk-HHW6ZVIZ.js";
16
16
  import {
17
17
  AGENT_INVOCATION_MAILBOX_STATUSES
18
- } from "./chunk-ATWHPSMF.js";
18
+ } from "./chunk-ZSNABC2E.js";
19
19
  import {
20
20
  TURN_REASONING_LEVELS
21
- } from "./chunk-YAUQXZVT.js";
21
+ } from "./chunk-FX4PX3SA.js";
22
22
  import {
23
23
  pluginCatalogRuntime
24
- } from "./chunk-RK7KPI6G.js";
24
+ } from "./chunk-RULIISEI.js";
25
25
  import {
26
26
  credentialContextSchema
27
27
  } from "./chunk-BDUENQD3.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ToolInputError
3
- } from "./chunk-MXFL7LNZ.js";
3
+ } from "./chunk-HHW6ZVIZ.js";
4
4
  import {
5
5
  canRouteResourceEvents,
6
6
  getPlugins
7
- } from "./chunk-ZF6IC27P.js";
7
+ } from "./chunk-YHCTPDXS.js";
8
8
  import {
9
9
  getDb
10
- } from "./chunk-JI5EPI3O.js";
10
+ } from "./chunk-LPLVNMVN.js";
11
11
  import {
12
12
  juniorAttachments,
13
13
  juniorConversations,
@@ -15,13 +15,13 @@ import {
15
15
  juniorSchedulerRuns,
16
16
  juniorSchedulerTasks,
17
17
  juniorStats
18
- } from "./chunk-ATWHPSMF.js";
18
+ } from "./chunk-ZSNABC2E.js";
19
19
  import {
20
20
  juniorDestinations
21
21
  } from "./chunk-VFUK3X5B.js";
22
22
  import {
23
23
  logInfo
24
- } from "./chunk-TPT6EF7K.js";
24
+ } from "./chunk-VHSEMJTS.js";
25
25
 
26
26
  // src/chat/event-tasks/store.ts
27
27
  import { and, asc, desc, eq, inArray, or, sql } from "drizzle-orm";
@@ -7,7 +7,7 @@ import {
7
7
  PluginCredentialFailureError,
8
8
  agentNameSchema,
9
9
  createPluginAuthOrchestration
10
- } from "./chunk-XY2IVIAY.js";
10
+ } from "./chunk-6BXV63YX.js";
11
11
  import {
12
12
  authorizationId
13
13
  } from "./chunk-DIB4GX3G.js";
@@ -32,7 +32,7 @@ import {
32
32
  searchSlackUsers,
33
33
  selectPluginGrant,
34
34
  toMcpProviderError
35
- } from "./chunk-RTPJRLOP.js";
35
+ } from "./chunk-H36GJVJV.js";
36
36
  import {
37
37
  RetryableDeliveryError,
38
38
  actorFromRun,
@@ -48,7 +48,7 @@ import {
48
48
  getSlackMessagePermalink,
49
49
  resolveBaseUrl,
50
50
  uploadFilesToConversation
51
- } from "./chunk-3OZNFCPR.js";
51
+ } from "./chunk-JW23XD4I.js";
52
52
  import {
53
53
  parseSandboxEgressAuthRequiredSignal,
54
54
  parseSandboxEgressPermissionDeniedSignal,
@@ -72,7 +72,7 @@ import {
72
72
  stopSession,
73
73
  throwSandboxOperationError,
74
74
  wrapSandboxSetupError
75
- } from "./chunk-THS4CKN4.js";
75
+ } from "./chunk-RJHZNPDH.js";
76
76
  import {
77
77
  SCHEDULED_TASK_SYSTEM_ACTOR,
78
78
  compactEventTask,
@@ -105,10 +105,10 @@ import {
105
105
  scheduledTaskAttributes,
106
106
  storeAttachments,
107
107
  writableEventTask
108
- } from "./chunk-FEIHINKR.js";
108
+ } from "./chunk-6ENAACWN.js";
109
109
  import {
110
110
  parseSlackThreadId
111
- } from "./chunk-ICJ3KCA2.js";
111
+ } from "./chunk-WJUKESU2.js";
112
112
  import {
113
113
  AGENTS_REMOVAL_NOTICE,
114
114
  AGENTS_REPLACEMENT_NOTICE,
@@ -179,7 +179,7 @@ import {
179
179
  stripRuntimeTurnContext,
180
180
  trimTrailingAssistantMessages,
181
181
  truncateText
182
- } from "./chunk-MXFL7LNZ.js";
182
+ } from "./chunk-HHW6ZVIZ.js";
183
183
  import {
184
184
  JUNIOR_THREAD_STATE_TTL_MS
185
185
  } from "./chunk-3Y47VMHV.js";
@@ -197,14 +197,17 @@ import {
197
197
  getPluginUserPromptContributions,
198
198
  getSlackClient,
199
199
  getSlackToolContext,
200
+ getWorkspace,
201
+ getWorkspaceByName,
200
202
  isConversationScopedChannel,
203
+ listWorkspaces,
201
204
  normalizeSlackConversationId,
202
205
  readActorIdentity,
203
206
  resolveChannelCapabilities,
204
207
  tryWorkspaceRepoCheckoutPath,
205
208
  withSlackRetries,
206
209
  workspaceRepoCheckoutPath
207
- } from "./chunk-ZF6IC27P.js";
210
+ } from "./chunk-YHCTPDXS.js";
208
211
  import {
209
212
  KNOWN_CONVERSATION_EVENT_TYPES,
210
213
  contextProvenance,
@@ -216,13 +219,11 @@ import {
216
219
  instructionActors,
217
220
  instructionProvenanceFor,
218
221
  sameActorIdentity
219
- } from "./chunk-JI5EPI3O.js";
222
+ } from "./chunk-LPLVNMVN.js";
220
223
  import {
221
224
  juniorArtifacts,
222
- juniorIdentities,
223
- juniorWorkspaceRepos,
224
- juniorWorkspaces
225
- } from "./chunk-ATWHPSMF.js";
225
+ juniorIdentities
226
+ } from "./chunk-ZSNABC2E.js";
226
227
  import {
227
228
  SANDBOX_DATA_ROOT,
228
229
  SANDBOX_REPOS_ROOT,
@@ -238,7 +239,7 @@ import {
238
239
  } from "./chunk-BVREIWBD.js";
239
240
  import {
240
241
  getStateAdapter
241
- } from "./chunk-TPDNZCZU.js";
242
+ } from "./chunk-BXBZDV3C.js";
242
243
  import {
243
244
  ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX,
244
245
  COMPACTION_SUMMARY_PREFIX,
@@ -271,7 +272,7 @@ import {
271
272
  resolveGatewayCredential,
272
273
  resolveGatewayModel,
273
274
  unwrapCurrentInstruction
274
- } from "./chunk-YAUQXZVT.js";
275
+ } from "./chunk-FX4PX3SA.js";
275
276
  import {
276
277
  canExposeConversationPayload,
277
278
  resolveConversationPrivacy,
@@ -281,16 +282,16 @@ import {
281
282
  toGenAiMessagesTraceAttributes,
282
283
  toGenAiPayloadMetadata,
283
284
  toGenAiPayloadTraceAttributes
284
- } from "./chunk-3T7RJVDJ.js";
285
+ } from "./chunk-RBV4JHCP.js";
285
286
  import {
286
287
  discoverSkills,
287
288
  findSkillByName,
288
289
  loadSkillsByName,
289
290
  parseSkillInvocation
290
- } from "./chunk-4P2XNVTO.js";
291
+ } from "./chunk-NLTQRYNP.js";
291
292
  import {
292
293
  pluginCatalogRuntime
293
- } from "./chunk-RK7KPI6G.js";
294
+ } from "./chunk-RULIISEI.js";
294
295
  import {
295
296
  CredentialUnavailableError,
296
297
  OAuthProviderError,
@@ -298,7 +299,7 @@ import {
298
299
  getOAuthProviderErrorAttributes,
299
300
  resolveAuthTokenPlaceholder,
300
301
  resolvePluginCommandEnv
301
- } from "./chunk-O4IK4O7C.js";
302
+ } from "./chunk-VV2DN24T.js";
302
303
  import {
303
304
  credentialUserSubjectId
304
305
  } from "./chunk-BDUENQD3.js";
@@ -326,7 +327,7 @@ import {
326
327
  summarizeMessageText,
327
328
  withLogContext,
328
329
  withSpan
329
- } from "./chunk-TPT6EF7K.js";
330
+ } from "./chunk-VHSEMJTS.js";
330
331
  import {
331
332
  startInactiveSpan,
332
333
  withActiveSpan
@@ -13669,59 +13670,6 @@ function createWriteFileTool() {
13669
13670
 
13670
13671
  // src/chat/workspaces/tools.ts
13671
13672
  import { z as z63 } from "zod";
13672
-
13673
- // src/chat/workspaces/store.ts
13674
- import { asc, eq as eq3 } from "drizzle-orm";
13675
- function workspaceFromRows(row, repos) {
13676
- return {
13677
- id: row.id,
13678
- name: row.name,
13679
- setupScript: row.setupScript,
13680
- repos: repos.map((repo) => ({
13681
- provider: repo.provider,
13682
- repo: repo.repo,
13683
- isPrimary: repo.isPrimary
13684
- }))
13685
- };
13686
- }
13687
- async function listWorkspaces(db) {
13688
- const [workspaces, repos] = await Promise.all([
13689
- db.select().from(juniorWorkspaces).orderBy(asc(juniorWorkspaces.name)),
13690
- db.select().from(juniorWorkspaceRepos).orderBy(
13691
- asc(juniorWorkspaceRepos.workspaceId),
13692
- asc(juniorWorkspaceRepos.provider),
13693
- asc(juniorWorkspaceRepos.repo)
13694
- )
13695
- ]);
13696
- return workspaces.map(
13697
- (workspace) => workspaceFromRows(
13698
- workspace,
13699
- repos.filter((repo) => repo.workspaceId === workspace.id)
13700
- )
13701
- );
13702
- }
13703
- async function getWorkspaceByName(db, name) {
13704
- const rows = await db.select().from(juniorWorkspaces).where(eq3(juniorWorkspaces.name, name)).limit(1);
13705
- const workspace = rows[0];
13706
- if (!workspace) return void 0;
13707
- const repos = await db.select().from(juniorWorkspaceRepos).where(eq3(juniorWorkspaceRepos.workspaceId, workspace.id)).orderBy(
13708
- asc(juniorWorkspaceRepos.provider),
13709
- asc(juniorWorkspaceRepos.repo)
13710
- );
13711
- return workspaceFromRows(workspace, repos);
13712
- }
13713
- async function getWorkspace(db, id) {
13714
- const rows = await db.select().from(juniorWorkspaces).where(eq3(juniorWorkspaces.id, id)).limit(1);
13715
- const workspace = rows[0];
13716
- if (!workspace) return void 0;
13717
- const repos = await db.select().from(juniorWorkspaceRepos).where(eq3(juniorWorkspaceRepos.workspaceId, workspace.id)).orderBy(
13718
- asc(juniorWorkspaceRepos.provider),
13719
- asc(juniorWorkspaceRepos.repo)
13720
- );
13721
- return workspaceFromRows(workspace, repos);
13722
- }
13723
-
13724
- // src/chat/workspaces/tools.ts
13725
13673
  var repoSchema = z63.object({
13726
13674
  provider: z63.string(),
13727
13675
  repo: z63.string(),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-YAUQXZVT.js";
3
+ } from "./chunk-FX4PX3SA.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTurnRequestDeadline
3
- } from "./chunk-BLZUFHM7.js";
3
+ } from "./chunk-RYYEHWIL.js";
4
4
  import {
5
5
  CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
6
6
  CONVERSATION_WORK_MAX_RETRIES,
@@ -21,20 +21,20 @@ import {
21
21
  releaseConversationWork,
22
22
  requestAnotherSlice,
23
23
  startConversationWork
24
- } from "./chunk-IIT23D3M.js";
24
+ } from "./chunk-NAGI2XH3.js";
25
25
  import {
26
26
  ConversationQueueMessageRejectedError
27
27
  } from "./chunk-JAL3CH4G.js";
28
28
  import {
29
29
  getChatConfig,
30
30
  isProviderRetryError
31
- } from "./chunk-YAUQXZVT.js";
31
+ } from "./chunk-FX4PX3SA.js";
32
32
  import {
33
33
  logException,
34
34
  logInfo,
35
35
  logWarn,
36
36
  withLogContext
37
- } from "./chunk-TPT6EF7K.js";
37
+ } from "./chunk-VHSEMJTS.js";
38
38
 
39
39
  // src/chat/task-execution/worker.ts
40
40
  var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createWebAuthorization,
3
3
  deleteWebAuthorization
4
- } from "./chunk-NL53P7PS.js";
4
+ } from "./chunk-5FWQ73UZ.js";
5
5
  import {
6
6
  appendAndEnqueueInboundMessage
7
- } from "./chunk-IIT23D3M.js";
7
+ } from "./chunk-NAGI2XH3.js";
8
8
  import {
9
9
  buildDeliveredTurnStatePatch,
10
10
  completeAuthPauseTurn,
@@ -12,20 +12,20 @@ import {
12
12
  getTurnUserMessage,
13
13
  processPluginTask,
14
14
  scheduleSessionCompletedPluginTasks
15
- } from "./chunk-O5ZZL7IR.js";
15
+ } from "./chunk-ZUTAGCPH.js";
16
16
  import {
17
17
  ConversationTurnLifecycleService,
18
18
  coerceThreadConversationState,
19
19
  getPersistedSandboxState,
20
20
  getPersistedThreadState,
21
21
  persistThreadStateById
22
- } from "./chunk-EKGJVUVS.js";
22
+ } from "./chunk-2K25MRZK.js";
23
23
  import {
24
24
  healthReportSchema
25
25
  } from "./chunk-UTL3MHPC.js";
26
26
  import {
27
27
  parseSlackThreadId
28
- } from "./chunk-ICJ3KCA2.js";
28
+ } from "./chunk-WJUKESU2.js";
29
29
  import {
30
30
  TurnInputCommitLostError,
31
31
  abandonTurnRecord,
@@ -49,31 +49,31 @@ import {
49
49
  saveTurnCheckpoint,
50
50
  startActiveTurn,
51
51
  upsertConversationMessage
52
- } from "./chunk-MXFL7LNZ.js";
52
+ } from "./chunk-HHW6ZVIZ.js";
53
53
  import {
54
54
  normalizeSlackConversationId
55
- } from "./chunk-ZF6IC27P.js";
55
+ } from "./chunk-YHCTPDXS.js";
56
56
  import {
57
57
  getConversationEventStore,
58
58
  getConversationStore,
59
59
  getDb
60
- } from "./chunk-JI5EPI3O.js";
60
+ } from "./chunk-LPLVNMVN.js";
61
61
  import {
62
62
  juniorApiTokens,
63
63
  juniorConversationParticipants,
64
64
  juniorConversations,
65
65
  juniorIdentities,
66
66
  juniorUsers
67
- } from "./chunk-ATWHPSMF.js";
67
+ } from "./chunk-ZSNABC2E.js";
68
68
  import {
69
69
  getSlackBotToken
70
- } from "./chunk-YAUQXZVT.js";
70
+ } from "./chunk-FX4PX3SA.js";
71
71
  import {
72
72
  juniorDestinations
73
73
  } from "./chunk-VFUK3X5B.js";
74
74
  import {
75
75
  canExposeConversationPayload
76
- } from "./chunk-3T7RJVDJ.js";
76
+ } from "./chunk-RBV4JHCP.js";
77
77
  import {
78
78
  credentialContextForActor
79
79
  } from "./chunk-BDUENQD3.js";
@@ -82,7 +82,7 @@ import {
82
82
  logWarn,
83
83
  setTags,
84
84
  withLogContext
85
- } from "./chunk-TPT6EF7K.js";
85
+ } from "./chunk-VHSEMJTS.js";
86
86
 
87
87
  // src/handlers/health.ts
88
88
  function readHealthReport() {
@@ -3,7 +3,7 @@ import {
3
3
  toCanonicalInputMessage,
4
4
  toCanonicalOutputMessage,
5
5
  toGenAiMessagesTraceAttributes
6
- } from "./chunk-3T7RJVDJ.js";
6
+ } from "./chunk-RBV4JHCP.js";
7
7
  import {
8
8
  extractGenAiUsageAttributes,
9
9
  logException,
@@ -11,7 +11,7 @@ import {
11
11
  normalizeGenAiFinishReason,
12
12
  serializeGenAiAttribute,
13
13
  withSpan
14
- } from "./chunk-TPT6EF7K.js";
14
+ } from "./chunk-VHSEMJTS.js";
15
15
 
16
16
  // src/chat/services/provider-error.ts
17
17
  var ProviderError = class extends Error {