@sentry/junior 0.162.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 (96) hide show
  1. package/README.md +2 -0
  2. package/dist/{agent-hooks-TL2SGC5W.js → agent-hooks-WTBPNRTC.js} +10 -10
  3. package/dist/api/acp/route.d.ts +13 -0
  4. package/dist/api/schema/workspace.d.ts +47 -0
  5. package/dist/api/schema.d.ts +2 -0
  6. package/dist/api/schema.js +15 -3
  7. package/dist/api/workspaces/routes.d.ts +4 -0
  8. package/dist/api.js +321 -408
  9. package/dist/app.d.ts +2 -2
  10. package/dist/app.js +482 -38
  11. package/dist/{catalog-runtime-IGSMIADJ.js → catalog-runtime-CZ2SQINY.js} +5 -5
  12. package/dist/chat/agent/sandbox.d.ts +4 -0
  13. package/dist/chat/api-turns/cancellation.d.ts +27 -0
  14. package/dist/chat/api-turns/routing.d.ts +31 -0
  15. package/dist/chat/api-turns/work.d.ts +12 -29
  16. package/dist/chat/app/conversation-work.d.ts +6 -1
  17. package/dist/chat/app/production.d.ts +2 -2
  18. package/dist/chat/conversations/history.d.ts +3 -0
  19. package/dist/chat/conversations/turn-lifecycle.d.ts +1 -1
  20. package/dist/chat/experimental.d.ts +1 -1
  21. package/dist/chat/plugins/agent-hooks.d.ts +4 -0
  22. package/dist/chat/repository-instructions.d.ts +1 -1
  23. package/dist/chat/sandbox/paths.d.ts +1 -0
  24. package/dist/chat/sandbox/prepare-workspace.d.ts +11 -0
  25. package/dist/chat/sandbox/ref.d.ts +1 -0
  26. package/dist/chat/sandbox/sandbox.d.ts +4 -0
  27. package/dist/chat/sandbox/session.d.ts +4 -0
  28. package/dist/chat/sandbox/snapshot/profile.d.ts +4 -3
  29. package/dist/chat/sandbox/snapshot/resolve.d.ts +4 -0
  30. package/dist/chat/sandbox/workspace.d.ts +4 -0
  31. package/dist/chat/tools/types.d.ts +5 -0
  32. package/dist/chat/workspaces/checkout-path.d.ts +4 -0
  33. package/dist/chat/workspaces/store.d.ts +37 -0
  34. package/dist/chat/workspaces/tools.d.ts +4 -0
  35. package/dist/chat/workspaces/types.d.ts +13 -0
  36. package/dist/chat/workspaces/validation.d.ts +21 -0
  37. package/dist/{chunk-THXMSSFZ.js → chunk-26JYGL2L.js} +1 -1
  38. package/dist/{chunk-OPNJRQDP.js → chunk-2K25MRZK.js} +9 -6
  39. package/dist/{chunk-C3KUKA27.js → chunk-3L23VTY7.js} +17 -17
  40. package/dist/{chunk-JJ3VXFDI.js → chunk-4GTOFUQF.js} +1 -1
  41. package/dist/{chunk-RDV4BQRZ.js → chunk-5FWQ73UZ.js} +1 -1
  42. package/dist/{chunk-BPZQWAZJ.js → chunk-5GLGQHO3.js} +4 -1
  43. package/dist/{chunk-K7IV6UV3.js → chunk-6BXV63YX.js} +5 -5
  44. package/dist/{chunk-4WYGQ47U.js → chunk-6ENAACWN.js} +5 -5
  45. package/dist/{chunk-EHQLTK3X.js → chunk-7WKWMMYQ.js} +323 -127
  46. package/dist/chunk-BVREIWBD.js +131 -0
  47. package/dist/{chunk-DZC3F2UI.js → chunk-BXBZDV3C.js} +1 -1
  48. package/dist/{chunk-HW4BW3PC.js → chunk-CGCNFEAU.js} +4 -4
  49. package/dist/{chunk-JRVURR3H.js → chunk-FKDY7NTC.js} +543 -164
  50. package/dist/{chunk-MNCEGXEH.js → chunk-FX4PX3SA.js} +2 -2
  51. package/dist/{chunk-OBFRMQBY.js → chunk-H36GJVJV.js} +9 -9
  52. package/dist/{chunk-V7QL4QMW.js → chunk-HHW6ZVIZ.js} +12 -7
  53. package/dist/{chunk-O6P7DZ6O.js → chunk-JW23XD4I.js} +6 -6
  54. package/dist/{chunk-DDQ43S5Q.js → chunk-LPLVNMVN.js} +4 -4
  55. package/dist/{chunk-5NEBOHRG.js → chunk-NAGI2XH3.js} +4 -4
  56. package/dist/{chunk-FEWT5KPP.js → chunk-NLTQRYNP.js} +2 -2
  57. package/dist/{chunk-SA6BEEAB.js → chunk-PU45BSBS.js} +108 -74
  58. package/dist/{chunk-7DTPFFQX.js → chunk-RBV4JHCP.js} +1 -1
  59. package/dist/{chunk-6BJFIWEV.js → chunk-RJHZNPDH.js} +46 -87
  60. package/dist/{chunk-FESUWAYU.js → chunk-RULIISEI.js} +1 -1
  61. package/dist/{chunk-MMBMDSRK.js → chunk-RYYEHWIL.js} +1 -1
  62. package/dist/{chunk-Y75ZDQB5.js → chunk-VHSEMJTS.js} +1 -1
  63. package/dist/{chunk-5IDFPCON.js → chunk-VRS6WDK5.js} +1 -1
  64. package/dist/{chunk-EBEHJPFF.js → chunk-VV2DN24T.js} +1 -1
  65. package/dist/{chunk-WHAJ3QVY.js → chunk-WJUKESU2.js} +1 -1
  66. package/dist/{chunk-H2KW7AZC.js → chunk-XAIRI54J.js} +1 -1
  67. package/dist/{chunk-AJ7J2HWY.js → chunk-Y2B6AXZQ.js} +6 -6
  68. package/dist/{chunk-QHCIZLIX.js → chunk-YHCTPDXS.js} +356 -13
  69. package/dist/{chunk-CZ6EHOU5.js → chunk-ZSNABC2E.js} +40 -2
  70. package/dist/{chunk-KQSO4DJ4.js → chunk-ZUTAGCPH.js} +9 -9
  71. package/dist/cli/chat.js +32 -32
  72. package/dist/cli/check.js +6 -6
  73. package/dist/cli/plugins.js +13 -13
  74. package/dist/cli/snapshot-create.js +10 -10
  75. package/dist/cli/upgrade.js +7 -7
  76. package/dist/db/schema/workspaces.d.ts +169 -0
  77. package/dist/db/schema.d.ts +169 -1
  78. package/dist/{db-66XZ4HHQ.js → db-32KRFS6L.js} +7 -7
  79. package/dist/{experimental-HH6OM6UH.js → experimental-XVDOSRBS.js} +1 -1
  80. package/dist/instrumentation.js +4 -4
  81. package/dist/nitro.js +2 -2
  82. package/dist/{oauth-callback-server-FMLKDUUF.js → oauth-callback-server-CGZP2Z6U.js} +24 -24
  83. package/dist/{runner-YZONUMNY.js → runner-S5N4Q2XL.js} +32 -34
  84. package/dist/{skills-3UDJJXSO.js → skills-KYPSHSQR.js} +6 -6
  85. package/dist/spawn-EGOB3CLV.js +37 -0
  86. package/dist/{validation-3HTDBONC.js → validation-SZBE7JNF.js} +6 -6
  87. package/dist/version.js +1 -1
  88. package/dist/{work-O4YTIS54.js → work-GCZKHEZX.js} +18 -18
  89. package/dist/worker-6MY5Q4A2.js +24 -0
  90. package/migrations/0029_dizzy_barracuda.sql +19 -0
  91. package/migrations/meta/0029_snapshot.json +2709 -0
  92. package/migrations/meta/_journal.json +8 -1
  93. package/package.json +7 -4
  94. package/dist/chunk-EM225ITJ.js +0 -56
  95. package/dist/spawn-TBPVA5S2.js +0 -37
  96. package/dist/worker-WHURUEYX.js +0 -24
@@ -0,0 +1,131 @@
1
+ // src/chat/sandbox/paths.ts
2
+ function normalizeWorkspaceRoot(input) {
3
+ const candidate = (input ?? "").trim();
4
+ if (!candidate) {
5
+ return "/vercel/sandbox";
6
+ }
7
+ const normalized = candidate.replace(/\/+$/, "");
8
+ return normalized.startsWith("/") ? normalized : `/${normalized}`;
9
+ }
10
+ var SANDBOX_WORKSPACE_ROOT = normalizeWorkspaceRoot(
11
+ process.env.VERCEL_SANDBOX_WORKSPACE_DIR
12
+ );
13
+ var SANDBOX_REPOS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/repos`;
14
+ var SANDBOX_SKILLS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/skills`;
15
+ var SANDBOX_DATA_ROOT = `${SANDBOX_WORKSPACE_ROOT}/data`;
16
+ function sandboxSkillDir(skillName) {
17
+ return `${SANDBOX_SKILLS_ROOT}/${skillName}`;
18
+ }
19
+ function sandboxSkillFile(skillName) {
20
+ return `${sandboxSkillDir(skillName)}/SKILL.md`;
21
+ }
22
+ function sandboxSkillPathResolution(skillName) {
23
+ const skillDir = sandboxSkillDir(skillName);
24
+ return `Resolve relative paths in this skill against ${skillDir}. For bash commands from this skill, cd to ${skillDir} first or use absolute paths.`;
25
+ }
26
+
27
+ // src/chat/sandbox/noninteractive-command.ts
28
+ var NON_INTERACTIVE_ENV = {
29
+ CI: "1",
30
+ TERM: "dumb",
31
+ NO_COLOR: "1",
32
+ PAGER: "cat",
33
+ GIT_PAGER: "cat",
34
+ GH_PROMPT_DISABLED: "1",
35
+ GH_NO_UPDATE_NOTIFIER: "1",
36
+ GH_NO_EXTENSION_UPDATE_NOTIFIER: "1",
37
+ GH_SPINNER_DISABLED: "1",
38
+ GIT_TERMINAL_PROMPT: "0",
39
+ GCM_INTERACTIVE: "never",
40
+ DEBIAN_FRONTEND: "noninteractive",
41
+ // Git credential isolation: prevent git from sending its own auth so the
42
+ // sandbox egress proxy's header transforms are the sole credential source.
43
+ GIT_ASKPASS: "/bin/true",
44
+ GIT_CONFIG_NOSYSTEM: "1",
45
+ GIT_CONFIG_COUNT: "2",
46
+ GIT_CONFIG_KEY_0: "credential.helper",
47
+ GIT_CONFIG_VALUE_0: "",
48
+ GIT_CONFIG_KEY_1: "http.emptyAuth",
49
+ GIT_CONFIG_VALUE_1: "true"
50
+ };
51
+ function shellQuote(value) {
52
+ return `'${value.replace(/'/g, "'\\''")}'`;
53
+ }
54
+ function buildEnvExports(options) {
55
+ const lines = [];
56
+ if (options.pathPrefix) {
57
+ lines.push(`export PATH="${options.pathPrefix}"`);
58
+ }
59
+ for (const [key, value] of Object.entries(NON_INTERACTIVE_ENV)) {
60
+ lines.push(`export ${key}=${shellQuote(value)}`);
61
+ }
62
+ for (const [key, value] of Object.entries(options.env ?? {})) {
63
+ lines.push(`export ${key}=${shellQuote(value)}`);
64
+ }
65
+ return lines;
66
+ }
67
+ function buildCommandScript(input) {
68
+ return [shellQuote(input.cmd), ...(input.args ?? []).map(shellQuote)].join(
69
+ " "
70
+ );
71
+ }
72
+ function buildNonInteractiveShellScript(script, options = {}) {
73
+ return [...buildEnvExports(options), "exec </dev/null", script].join(" && ");
74
+ }
75
+ function buildNonInteractiveCommand(input) {
76
+ return {
77
+ cmd: "bash",
78
+ args: [
79
+ input.login ? "-lc" : "-c",
80
+ buildNonInteractiveShellScript(buildCommandScript(input), {
81
+ env: input.env,
82
+ pathPrefix: input.pathPrefix
83
+ })
84
+ ]
85
+ };
86
+ }
87
+ async function runNonInteractiveCommand(sandbox, input) {
88
+ const command = {
89
+ ...buildNonInteractiveCommand(input),
90
+ ...input.cwd ? { cwd: input.cwd } : {},
91
+ ...input.signal ? { signal: input.signal } : {},
92
+ ...input.sudo !== void 0 ? { sudo: input.sudo } : {}
93
+ };
94
+ return await sandbox.runCommand(command);
95
+ }
96
+
97
+ // src/chat/sleep.ts
98
+ function sleep(ms, signal) {
99
+ if (!signal) {
100
+ return new Promise((resolve) => setTimeout(resolve, ms));
101
+ }
102
+ return new Promise((resolve, reject) => {
103
+ if (signal.aborted) {
104
+ reject(signal.reason);
105
+ return;
106
+ }
107
+ const timeoutId = setTimeout(() => {
108
+ signal.removeEventListener("abort", onAbort);
109
+ resolve();
110
+ }, ms);
111
+ const onAbort = () => {
112
+ clearTimeout(timeoutId);
113
+ reject(signal.reason);
114
+ };
115
+ signal.addEventListener("abort", onAbort, { once: true });
116
+ });
117
+ }
118
+
119
+ export {
120
+ SANDBOX_WORKSPACE_ROOT,
121
+ SANDBOX_REPOS_ROOT,
122
+ SANDBOX_SKILLS_ROOT,
123
+ SANDBOX_DATA_ROOT,
124
+ sandboxSkillDir,
125
+ sandboxSkillFile,
126
+ sandboxSkillPathResolution,
127
+ sleep,
128
+ buildCommandScript,
129
+ buildNonInteractiveShellScript,
130
+ runNonInteractiveCommand
131
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-MNCEGXEH.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-MMBMDSRK.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-5NEBOHRG.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-MNCEGXEH.js";
31
+ } from "./chunk-FX4PX3SA.js";
32
32
  import {
33
33
  logException,
34
34
  logInfo,
35
35
  logWarn,
36
36
  withLogContext
37
- } from "./chunk-Y75ZDQB5.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;