@sentry/junior 0.183.0 → 0.185.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 (122) hide show
  1. package/dist/{agent-hooks-SNRBZYAU.js → agent-hooks-NGZQLL5O.js} +13 -11
  2. package/dist/api/acp/auth.d.ts +46 -0
  3. package/dist/api/acp/authorization-page.d.ts +11 -0
  4. package/dist/api/acp/conversations.d.ts +70 -0
  5. package/dist/api/acp/errors.d.ts +6 -0
  6. package/dist/api/acp/route.d.ts +16 -0
  7. package/dist/api/acp/schema.d.ts +115 -0
  8. package/dist/api/acp/sleep.d.ts +2 -0
  9. package/dist/api/acp/state.d.ts +22 -0
  10. package/dist/api/acp/transport.d.ts +113 -0
  11. package/dist/api/code/overview.d.ts +39 -0
  12. package/dist/api/locations/detail.d.ts +1 -1
  13. package/dist/api/people/code.d.ts +22 -0
  14. package/dist/api/schema/code.d.ts +46 -0
  15. package/dist/api/schema/conversation.d.ts +100 -20
  16. package/dist/api/schema/location.d.ts +1 -1
  17. package/dist/api/schema/person.d.ts +1 -1
  18. package/dist/api/schema.d.ts +4 -4
  19. package/dist/api/schema.js +12 -1
  20. package/dist/api.js +358 -76
  21. package/dist/app.d.ts +0 -4
  22. package/dist/app.js +2450 -493
  23. package/dist/{catalog-runtime-3I3JOIIH.js → catalog-runtime-AAEAO2RL.js} +4 -4
  24. package/dist/chat/api-turns/accepted-reply.d.ts +11 -0
  25. package/dist/chat/api-turns/cancellation.d.ts +3 -5
  26. package/dist/chat/api-turns/work.d.ts +4 -9
  27. package/dist/chat/app/conversation-work.d.ts +1 -1
  28. package/dist/chat/app/factory.d.ts +4 -0
  29. package/dist/chat/app/services.d.ts +4 -3
  30. package/dist/chat/conversations/history.d.ts +83 -9
  31. package/dist/chat/conversations/turn-lifecycle.d.ts +4 -3
  32. package/dist/chat/providers/slack/input.d.ts +32 -0
  33. package/dist/chat/{runtime → providers/slack}/processing-reaction.d.ts +6 -8
  34. package/dist/chat/{runtime/slack-resume.d.ts → providers/slack/resume.d.ts} +16 -19
  35. package/dist/chat/providers/slack/runtime.d.ts +1 -10
  36. package/dist/chat/providers/slack/turn.d.ts +11 -24
  37. package/dist/chat/resource-events/store.d.ts +1 -1
  38. package/dist/chat/resource-events/tool-support.d.ts +0 -5
  39. package/dist/chat/runtime/turn-execution.d.ts +7 -2
  40. package/dist/chat/sandbox/egress/credentials.d.ts +3 -3
  41. package/dist/chat/sandbox/egress/session.d.ts +5 -6
  42. package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
  43. package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
  44. package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
  45. package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
  46. package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
  47. package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
  48. package/dist/chat/scheduled-tasks/types.d.ts +1 -1
  49. package/dist/chat/services/provider-retry.d.ts +2 -0
  50. package/dist/chat/services/turn-failure-response.d.ts +4 -0
  51. package/dist/chat/task-execution/paused-turn.d.ts +0 -2
  52. package/dist/chat/task-execution/state.d.ts +2 -2
  53. package/dist/chat/task-execution/store.d.ts +1 -1
  54. package/dist/chat/task-execution/turn-wake.d.ts +12 -0
  55. package/dist/chat/tool-support/action-review.d.ts +1 -1
  56. package/dist/chat/tools/resource-events.d.ts +1 -1
  57. package/dist/chat/tools/search-conversation-events.d.ts +1 -1
  58. package/dist/chat/tools/types.d.ts +1 -1
  59. package/dist/chat/tools/watch-resource-events.d.ts +2 -2
  60. package/dist/{chunk-2EPYYVJC.js → chunk-4HA36IWS.js} +9 -94
  61. package/dist/{chunk-WVIA7V3M.js → chunk-4K25ODAO.js} +27 -1
  62. package/dist/{chunk-V64JCZUV.js → chunk-4S47VHJR.js} +3 -3
  63. package/dist/{chunk-QZV76CM4.js → chunk-6DOAUXLD.js} +231 -198
  64. package/dist/{chunk-M3QYTBQ6.js → chunk-6Q7YZLCL.js} +2 -1
  65. package/dist/{chunk-W46NIB5H.js → chunk-7GAP2XG4.js} +2 -3
  66. package/dist/{chunk-EENQGEIP.js → chunk-7MHNIGHP.js} +1 -1
  67. package/dist/{chunk-AX3UDIMA.js → chunk-ABAX75GG.js} +10 -384
  68. package/dist/{chunk-KTXOGLNE.js → chunk-ATUWN6Z3.js} +2 -2
  69. package/dist/{chunk-3HJ4F4L7.js → chunk-C6TS47CQ.js} +4 -4
  70. package/dist/chunk-D4YV5TDV.js +45 -0
  71. package/dist/{chunk-HUK5XIZL.js → chunk-D63IUQQE.js} +4 -4
  72. package/dist/{chunk-WOKJRLM2.js → chunk-DAPC2HTM.js} +24 -6
  73. package/dist/{chunk-2ADFGSUS.js → chunk-EIJCPJOY.js} +1 -1
  74. package/dist/{chunk-X52ESOBP.js → chunk-EJYP3NQ4.js} +4 -4
  75. package/dist/{chunk-35PM4YY5.js → chunk-EWEH2PJW.js} +6 -6
  76. package/dist/{chunk-W5JMPEBO.js → chunk-FFHXG2FX.js} +13 -11
  77. package/dist/{chunk-FJMTMGBC.js → chunk-FTVMXDNN.js} +1 -1
  78. package/dist/chunk-GFBR4S3Q.js +406 -0
  79. package/dist/{chunk-E3OBGRHN.js → chunk-GJTIZQGJ.js} +1 -1
  80. package/dist/{chunk-IO6KFXYE.js → chunk-HJPC32TQ.js} +12 -50
  81. package/dist/{chunk-RF6J3DIO.js → chunk-INQHUE72.js} +84 -1
  82. package/dist/{chunk-LMNMMESF.js → chunk-LRI5IRGY.js} +19 -44
  83. package/dist/{chunk-6UXDTPEN.js → chunk-LVK4WJKM.js} +1 -1
  84. package/dist/{chunk-AYW7J6K4.js → chunk-MWOH6CIK.js} +178 -148
  85. package/dist/{chunk-LZBPGX5A.js → chunk-OMQ2J6F6.js} +1 -1
  86. package/dist/{chunk-G2B2XZQW.js → chunk-PNYJOEVV.js} +1 -1
  87. package/dist/{chunk-37IQ6DGU.js → chunk-QCT4226Q.js} +3 -3
  88. package/dist/{chunk-R767Y7QV.js → chunk-QZKHHG3B.js} +34 -8
  89. package/dist/{chunk-VOV3SCM3.js → chunk-TVVAMOLS.js} +2 -2
  90. package/dist/{chunk-56XONJPF.js → chunk-U4CTAVWN.js} +1 -1
  91. package/dist/{chunk-4WGFWHWP.js → chunk-UUULGCKK.js} +1 -1
  92. package/dist/{chunk-AHMWPFIW.js → chunk-VH4IU3UC.js} +928 -984
  93. package/dist/chunk-W7GCLNIV.js +58 -0
  94. package/dist/{chunk-24OJZ5OU.js → chunk-WLKWN4CD.js} +22 -12
  95. package/dist/{chunk-T5MTGX2E.js → chunk-X2SS6BF7.js} +201 -210
  96. package/dist/{chunk-SQHFVIMZ.js → chunk-X7NCJQAA.js} +1 -1
  97. package/dist/{chunk-PLZT45VC.js → chunk-Y5G23T2D.js} +5 -5
  98. package/dist/{chunk-3L7CWDQQ.js → chunk-ZIF2S464.js} +1 -1
  99. package/dist/{chunk-QI5JW5AG.js → chunk-ZKKGFUWM.js} +6 -6
  100. package/dist/cli/chat.js +35 -33
  101. package/dist/cli/check.js +5 -5
  102. package/dist/cli/plugins.js +14 -12
  103. package/dist/cli/snapshot-create.js +10 -9
  104. package/dist/cli/upgrade.js +7 -6
  105. package/dist/{db-K2VMNLHQ.js → db-TRJ77FAU.js} +8 -6
  106. package/dist/instrumentation.js +3 -3
  107. package/dist/nitro.js +7 -6
  108. package/dist/{oauth-callback-server-DZZMTKSS.js → oauth-callback-server-XD5SV3MS.js} +30 -27
  109. package/dist/{runner-IIAKWDXI.js → runner-KFX7NG6D.js} +24 -19
  110. package/dist/{skills-EXIQ7BP5.js → skills-J2AH26CW.js} +5 -5
  111. package/dist/spawn-VU3CSRI6.js +41 -0
  112. package/dist/task-runner-5JG3VIIY.js +34 -0
  113. package/dist/{validation-XUGIWBJF.js → validation-O5J4VOPF.js} +5 -5
  114. package/dist/version.js +1 -1
  115. package/dist/{work-G4RLJ634.js → work-ECPQTG3U.js} +24 -19
  116. package/dist/worker-RS3DXUDO.js +24 -0
  117. package/package.json +5 -6
  118. package/dist/app-adapter.d.ts +0 -85
  119. package/dist/chat/api-turns/adapter-conversations.d.ts +0 -15
  120. package/dist/spawn-ZR6OOEAN.js +0 -37
  121. package/dist/task-runner-C52HYCVD.js +0 -32
  122. package/dist/worker-R2JEHK67.js +0 -22
@@ -0,0 +1,58 @@
1
+ import {
2
+ ConversationTurnLifecycleService
3
+ } from "./chunk-6Q7YZLCL.js";
4
+ import {
5
+ runAgentWithTimeout
6
+ } from "./chunk-INQHUE72.js";
7
+ import {
8
+ getConversationEventStore
9
+ } from "./chunk-ABAX75GG.js";
10
+
11
+ // src/chat/runtime/turn-execution.ts
12
+ var AgentRunError = class extends Error {
13
+ constructor(cause) {
14
+ super(cause instanceof Error ? cause.message : "Agent Run failed", {
15
+ cause
16
+ });
17
+ this.name = "AgentRunError";
18
+ }
19
+ };
20
+ async function executeTurn(agentRunner, run, saveResult, timeoutMs) {
21
+ let outcome;
22
+ try {
23
+ outcome = await runAgentWithTimeout(agentRunner, run, timeoutMs);
24
+ } catch (error) {
25
+ throw new AgentRunError(error);
26
+ }
27
+ if (outcome.status !== "completed") {
28
+ return outcome;
29
+ }
30
+ const saved = await saveResult(outcome.result);
31
+ const lifecycle = new ConversationTurnLifecycleService(
32
+ getConversationEventStore()
33
+ );
34
+ const common = {
35
+ conversationId: run.conversationId,
36
+ createdAtMs: saved.finishedAtMs ?? Date.now(),
37
+ turnId: run.turnId
38
+ };
39
+ if (saved.outcome === "failed") {
40
+ await lifecycle.fail({
41
+ ...common,
42
+ ...saved.eventId ? { eventId: saved.eventId } : void 0,
43
+ failureCode: saved.failureCode,
44
+ ...saved.failureReason ? { failureReason: saved.failureReason } : void 0
45
+ });
46
+ } else {
47
+ await lifecycle.complete({
48
+ ...common,
49
+ outcome: saved.outcome
50
+ });
51
+ }
52
+ return { status: "completed" };
53
+ }
54
+
55
+ export {
56
+ AgentRunError,
57
+ executeTurn
58
+ };
@@ -2,39 +2,38 @@ import {
2
2
  usageSchema
3
3
  } from "./chunk-PDO5BLNM.js";
4
4
  import {
5
- ToolInputError
6
- } from "./chunk-AHMWPFIW.js";
7
- import {
8
- agentHistoryItemSchema,
9
5
  bindProviderConversation,
10
- contextProvenance,
11
6
  createSqlConversationEventStore,
12
7
  getConversationEventStore,
13
8
  getConversationStore,
14
9
  getSqlExecutor,
15
- instructionActors,
16
- instructionProvenanceFor,
17
10
  sanitizePostgresJson,
18
11
  withConversationEventLock
19
- } from "./chunk-AX3UDIMA.js";
12
+ } from "./chunk-ABAX75GG.js";
20
13
  import {
21
14
  SANDBOX_REPOS_ROOT,
22
15
  SANDBOX_WORKSPACE_ROOT,
23
16
  sleep
24
- } from "./chunk-X52ESOBP.js";
17
+ } from "./chunk-EJYP3NQ4.js";
25
18
  import {
26
19
  MUTATION_LOCK_TTL_MS,
27
20
  fenceLock,
28
21
  getStateAdapter,
29
22
  withLock
30
- } from "./chunk-G2B2XZQW.js";
23
+ } from "./chunk-PNYJOEVV.js";
24
+ import {
25
+ agentHistoryItemSchema,
26
+ contextProvenance,
27
+ instructionActors,
28
+ instructionProvenanceFor
29
+ } from "./chunk-GFBR4S3Q.js";
31
30
  import {
32
31
  botConfig,
33
32
  completeText,
34
33
  escapeXml,
35
34
  resolveGatewayModel,
36
35
  unwrapCurrentInstruction
37
- } from "./chunk-LMNMMESF.js";
36
+ } from "./chunk-LRI5IRGY.js";
38
37
  import {
39
38
  parseSlackMessageTs,
40
39
  toStoredSlackActor
@@ -44,7 +43,7 @@ import {
44
43
  logException,
45
44
  logWarn,
46
45
  setSpanAttributes
47
- } from "./chunk-LZBPGX5A.js";
46
+ } from "./chunk-OMQ2J6F6.js";
48
47
 
49
48
  // src/chat/turn-context-tag.ts
50
49
  var TURN_CONTEXT_TAG = "runtime-turn-context";
@@ -1746,6 +1745,16 @@ import path2 from "path";
1746
1745
 
1747
1746
  // src/chat/tools/sandbox/file-utils.ts
1748
1747
  import path from "path";
1748
+
1749
+ // src/chat/tools/execution/tool-input-error.ts
1750
+ var ToolInputError = class extends Error {
1751
+ constructor(message, options) {
1752
+ super(message, options);
1753
+ this.name = "ToolInputError";
1754
+ }
1755
+ };
1756
+
1757
+ // src/chat/tools/sandbox/file-utils.ts
1749
1758
  var MAX_TEXT_CHARS = 6e4;
1750
1759
  var RIPGREP_EXCLUDED_GLOBS = [
1751
1760
  "!**/.git/**",
@@ -3133,6 +3142,7 @@ export {
3133
3142
  recordToolExecutionStarted,
3134
3143
  recordAttachmentsDelivered,
3135
3144
  recordGuardianActionReviewed,
3145
+ ToolInputError,
3136
3146
  MAX_TEXT_CHARS,
3137
3147
  RIPGREP_EXCLUDED_GLOBS,
3138
3148
  DEFAULT_SEARCH_COMMAND_TIMEOUT_MS,