@sentry/junior 0.225.0 → 0.227.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/{agent-hooks-CRuRcOg9.js → agent-hooks-bEwEJhlg.js} +231 -17
  2. package/dist/{agent-runner-Cad1RtWn.js → agent-runner-BGDSjciH.js} +2899 -159
  3. package/dist/api/schema.d.ts +417 -15
  4. package/dist/api/schema.js +4 -4
  5. package/dist/api.js +57 -32
  6. package/dist/{app-BbSD6EtD.d.ts → app-CjRIKZb5.d.ts} +1 -1
  7. package/dist/app.d.ts +1 -1
  8. package/dist/app.js +971 -7685
  9. package/dist/{briefs-BtnkPWT5.js → briefs-BkM_ZW4B.js} +4 -4
  10. package/dist/{catalog-runtime-pv4grNNb.js → catalog-runtime-Cw9V2jpn.js} +1 -1
  11. package/dist/{checkpoint-6fkAdB3g.js → checkpoint-oZYD3-Ar.js} +77 -11
  12. package/dist/cli/chat.js +13 -13
  13. package/dist/cli/check.js +3 -3
  14. package/dist/cli/main.js +1 -1
  15. package/dist/cli/plugins.js +3 -3
  16. package/dist/cli/snapshot-create.js +3 -3
  17. package/dist/cli/upgrade.js +3 -3
  18. package/dist/{client-ihmkx60d.js → client-Pcxo3lGn.js} +2 -2
  19. package/dist/{config-DMg679BW.js → config-CYvEow1F.js} +2 -2
  20. package/dist/{context-Bplcgypl.js → context-0Et9iVSB.js} +1 -1
  21. package/dist/{conversation-Bygi39Xj.js → conversation-BnhOMfEB.js} +113 -25
  22. package/dist/{conversation-privacy-ZYy05Y3q.js → conversation-privacy-hQmyZbOC.js} +1 -1
  23. package/dist/{credential-sync-DCB2SwnQ.js → credential-sync-CUGbiiCM.js} +15 -135
  24. package/dist/{executor-B9R4cHte.js → executor-BXMlFrV6.js} +1 -1
  25. package/dist/history-nukv1YN8.d.ts +127 -0
  26. package/dist/images-8siTAUNW.js +82 -0
  27. package/dist/instrumentation.js +2 -2
  28. package/dist/{vercel-queue-DIkVcfK4.js → job-queue-AI0_QAgc.js} +61 -2
  29. package/dist/{logging-CcTvYQ8A.js → logging-BPBx6WF-.js} +1 -1
  30. package/dist/nitro.d.ts +1 -1
  31. package/dist/nitro.js +3 -4
  32. package/dist/{oauth-authorization-BS4vPJmu.js → oauth-authorization-Cq1GaLIP.js} +1 -1
  33. package/dist/{oauth-callback-server-DnlQsGBJ.js → oauth-callback-server-CnF03VYh.js} +2 -2
  34. package/dist/pending-auth-CHUjr_6d.js +59 -0
  35. package/dist/{profile-CV97YuiL.js → profile-upzC-wN1.js} +4 -4
  36. package/dist/{prompt-CL8zxsmm.js → prompt-CZIQcPHy.js} +1 -1
  37. package/dist/{registry-C8I4IejN.js → registry-DM5aMhjm.js} +2 -2
  38. package/dist/{resolve-DXVAzYa3.js → resolve-sF6Lg7Ay.js} +2 -2
  39. package/dist/{runner-Die1RJ_z.js → runner-Bu2wYpK8.js} +10 -10
  40. package/dist/{sandbox-egress-signals-BZepyVh1.js → sandbox-egress-signals-Dgerhizb.js} +1 -1
  41. package/dist/{schema-BE4uso4i.js → schema-BSiwcvjm.js} +2 -2
  42. package/dist/{skills-DUcDEgDI.js → skills-CAI5s___.js} +2 -2
  43. package/dist/{spawn-o15i3tJu.js → spawn-DRK9TBgY.js} +2 -2
  44. package/dist/{task-queue-D3PLY59C.js → task-queue-iuDAqfZg.js} +3 -4
  45. package/dist/{task-runner-BMl2aM2v.js → task-runner-S3QtH38c.js} +381 -12
  46. package/dist/{thread-state-CAR6gdAm.js → thread-state-C_arVuaN.js} +5 -5
  47. package/dist/{turn-failure-response-CZyoUMkD.js → turn-failure-response-DarwGYgC.js} +9 -10
  48. package/dist/{turn-lifecycle-DPDHKi2U.js → turn-lifecycle-CdiIejXH.js} +1 -1
  49. package/dist/{turn-session-routing-Jkmmxpp-.js → turn-session-routing-DyLGd_wU.js} +1 -1
  50. package/dist/{validation-BcGGxOa6.js → validation-BMig74Zp.js} +1 -1
  51. package/dist/{version-DYcuOFQb.js → version-lhQSfLjx.js} +1 -1
  52. package/dist/version.js +1 -1
  53. package/dist/web-authorization-r2lKYKJ2.js +162 -0
  54. package/dist/web-input-BU-Fu7iq.js +7784 -0
  55. package/dist/{reporting-window-DbUqng0P.js → web-message-id-xPI_EFSC.js} +11 -1
  56. package/dist/{work-Bm90pR9P.js → work-B9koS8sW.js} +7 -8
  57. package/dist/{worker-BvHr6JhE.js → worker-C_iJSRgG.js} +5 -6
  58. package/package.json +5 -4
  59. package/dist/execution-stats-CR9CYpyj.js +0 -373
  60. package/dist/history-yaSjGMD_.d.ts +0 -65
  61. package/dist/job-queue-D2SiTrnt.js +0 -63
  62. package/dist/short-title-3wYH3ipl.js +0 -71
  63. package/dist/stats-DawHjcTw.js +0 -2758
  64. package/dist/web-authorization-B09B8A8R.js +0 -38
  65. package/dist/web-input-CGE58TpK.js +0 -899
@@ -1,71 +0,0 @@
1
- import { p as logWarn } from "./logging-CcTvYQ8A.js";
2
- import { n as botConfig } from "./config-DMg679BW.js";
3
- const TITLE_PROMPTS = {
4
- conversation: [
5
- "Generate a concise 5-8 word conversation title from the first user message below.",
6
- "Capture the user's main request.",
7
- "Reply with ONLY the title, with no quotes or trailing punctuation."
8
- ],
9
- task: [
10
- "Generate a concise 5-8 word task title from the task instruction below.",
11
- "Capture the task's main purpose.",
12
- "Reply with ONLY the title, with no quotes or trailing punctuation."
13
- ]
14
- };
15
- /** Collapse whitespace and cap a candidate short title. */
16
- function normalizeShortTitle(value) {
17
- return value.replace(/\s+/g, " ").trim().slice(0, 60);
18
- }
19
- /**
20
- * Deterministic display title when no generated title is stored.
21
- * Uses the first non-empty line of the source text, capped like generated titles.
22
- */
23
- function fallbackShortTitle(sourceText, fallback = "Untitled") {
24
- return normalizeShortTitle(sourceText.split(/\r?\n/).map((line) => line.trim()).find((line) => line.length > 0) ?? "") || fallback;
25
- }
26
- /** Generate a short title with the fast model, or return undefined on failure. */
27
- async function generateShortTitle(args) {
28
- args.signal?.throwIfAborted();
29
- const sourceText = args.sourceText.trim();
30
- if (!sourceText) return void 0;
31
- try {
32
- const result = await args.completeText({
33
- signal: args.signal,
34
- modelId: botConfig.fastModelId,
35
- temperature: 0,
36
- promptName: `junior.${args.kind}_title`,
37
- messages: [{
38
- role: "user",
39
- content: [
40
- ...TITLE_PROMPTS[args.kind],
41
- "",
42
- args.kind === "conversation" ? `First user message: ${sourceText.slice(0, 500)}` : `Task instruction: ${sourceText.slice(0, 500)}`
43
- ].join("\n"),
44
- timestamp: Date.now()
45
- }],
46
- metadata: { modelId: botConfig.fastModelId }
47
- });
48
- args.signal?.throwIfAborted();
49
- return normalizeShortTitle(result.text) || void 0;
50
- } catch (error) {
51
- args.signal?.throwIfAborted();
52
- logWarn(`${args.kind}.title.generation.failed`, { "exception.message": error instanceof Error ? error.message : String(error) });
53
- return;
54
- }
55
- }
56
- /**
57
- * Prefer an explicit task title when provided; otherwise generate one from the
58
- * instruction with the fast model.
59
- */
60
- async function resolveTaskTitle(args) {
61
- const explicit = normalizeShortTitle(args.title ?? "");
62
- if (explicit) return explicit;
63
- return generateShortTitle({
64
- completeText: args.completeText,
65
- kind: "task",
66
- sourceText: args.instruction,
67
- signal: args.signal
68
- });
69
- }
70
- //#endregion
71
- export { generateShortTitle as n, resolveTaskTitle as r, fallbackShortTitle as t };