@kortix/ui 0.15.0 → 0.15.1

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 (173) hide show
  1. package/dist/_vendor/kortix-shared.js +233 -130
  2. package/dist/_vendor/shared/code-language.d.ts +2 -2
  3. package/dist/_vendor/shared/html.d.ts +7 -0
  4. package/dist/_vendor/shared/index.d.ts +1 -0
  5. package/dist/_vendor/shared/pixel-mark.d.ts +28 -0
  6. package/dist/_vendor/shared/runtime-versions.d.ts +2 -6
  7. package/dist/_vendor/shared/tool-output/media-path.d.ts +1 -6
  8. package/dist/_vendor/shared/tool-output/scan.d.ts +2 -0
  9. package/dist/_vendor/shared/utils/string.d.ts +6 -0
  10. package/dist/artifacts/artifact-session.js +4 -3
  11. package/dist/customize/agents/agent-page.js +5 -5
  12. package/dist/customize/agents/agent-status.js +1 -1
  13. package/dist/customize/agents/agents-page.js +3 -3
  14. package/dist/customize/connectors/use-agent-access.d.ts +3 -3
  15. package/dist/customize/sections/connectors-view.js +50 -37
  16. package/dist/customize/sections/llm-provider/chatgpt-subscription-connect.js +21 -18
  17. package/dist/customize/sections/llm-provider/device-grant.d.ts +15 -0
  18. package/dist/customize/sections/llm-provider/device-grant.js +27 -0
  19. package/dist/customize/sections/view/agent-editor.d.ts +2 -2
  20. package/dist/customize/sections/view/agent-editor.js +2 -2
  21. package/dist/customize/sections/view/review-center-connected.js +37 -6
  22. package/dist/customize/sections/view/secret-delivery.d.ts +4 -5
  23. package/dist/customize/sections/view/secret-delivery.js +5 -4
  24. package/dist/customize/triggers/schedule/trigger-runs-logic.d.ts +6 -0
  25. package/dist/customize/triggers/schedule/trigger-runs-logic.js +13 -0
  26. package/dist/customize/triggers/schedule/trigger-runs-panel.js +9 -2
  27. package/dist/files/project/api/runtime-files.d.ts +2 -2
  28. package/dist/files/project/api/runtime-files.js +2 -2
  29. package/dist/files/project/components/drive-explorer.js +1 -1
  30. package/dist/files/project/components/drive-grid-view.js +0 -1
  31. package/dist/files/project/components/drive-list-view.js +0 -1
  32. package/dist/files/project/components/file-explorer-page.js +1 -1
  33. package/dist/files/project/hooks/index.d.ts +1 -1
  34. package/dist/files/project/hooks/index.js +1 -1
  35. package/dist/files/project/hooks/use-server-health.d.ts +1 -1
  36. package/dist/files/project/hooks/use-server-health.js +1 -1
  37. package/dist/files/project/search/workspace-search-service.d.ts +1 -1
  38. package/dist/files/project/search/workspace-search-service.js +1 -1
  39. package/dist/files/runtime/hooks/index.d.ts +1 -1
  40. package/dist/files/runtime/hooks/index.js +1 -1
  41. package/dist/files/runtime/hooks/server-health-state.d.ts +2 -2
  42. package/dist/files/runtime/hooks/server-health-state.js +2 -2
  43. package/dist/files/runtime/hooks/system-dir.js +2 -2
  44. package/dist/files/runtime/hooks/use-file-content.d.ts +1 -1
  45. package/dist/files/runtime/hooks/use-file-content.js +1 -1
  46. package/dist/files/runtime/hooks/use-file-list.d.ts +1 -1
  47. package/dist/files/runtime/hooks/use-file-list.js +3 -3
  48. package/dist/files/runtime/hooks/use-server-health.d.ts +2 -2
  49. package/dist/files/runtime/hooks/use-server-health.js +3 -3
  50. package/dist/files/runtime/hooks/use-workspace-search.d.ts +1 -2
  51. package/dist/files/runtime/hooks/use-workspace-search.js +0 -1
  52. package/dist/files/runtime/index.d.ts +2 -2
  53. package/dist/files/runtime/index.js +2 -2
  54. package/dist/files/runtime/path-utils.d.ts +1 -1
  55. package/dist/files/runtime/path-utils.js +1 -1
  56. package/dist/files/runtime/sandbox-explorer-source.d.ts +1 -1
  57. package/dist/files/runtime/sandbox-explorer-source.js +1 -1
  58. package/dist/files/runtime/sandbox-file-explorer.d.ts +1 -1
  59. package/dist/files/runtime/sandbox-file-explorer.js +2 -2
  60. package/dist/files/tree/components/file-tree-item.js +0 -1
  61. package/dist/files/tree/hooks/use-file-events.d.ts +1 -1
  62. package/dist/files/tree/hooks/use-file-events.js +1 -1
  63. package/dist/i18n/en.d.ts +63 -1
  64. package/dist/i18n/en.js +79 -17
  65. package/dist/internal/files/file-read-retry.js +1 -1
  66. package/dist/internal/files/types.d.ts +2 -2
  67. package/dist/internal/files/types.js +2 -2
  68. package/dist/internal/goals/goal-meta.d.ts +33 -14
  69. package/dist/internal/goals/goal-meta.js +55 -13
  70. package/dist/internal/layout/nav-hover-card.d.ts +1 -1
  71. package/dist/internal/layout/nav-hover-card.js +1 -1
  72. package/dist/internal/layout/project-capability-nav.d.ts +1 -1
  73. package/dist/internal/layout/project-capability-nav.js +1 -1
  74. package/dist/internal/lib/browser-error-noise.d.ts +1 -1
  75. package/dist/internal/lib/browser-error-noise.js +1 -1
  76. package/dist/internal/lib/browser-noise/rules/expected-states.js +1 -1
  77. package/dist/internal/lib/browser-noise/rules/injected-scripts.js +18 -0
  78. package/dist/internal/lib/browser-noise/rules/old-browsers.d.ts +1 -0
  79. package/dist/internal/lib/browser-noise/rules/old-browsers.js +1 -1
  80. package/dist/internal/lib/browser-noise/rules/rejections.d.ts +0 -9
  81. package/dist/internal/lib/browser-noise/rules/rejections.js +0 -14
  82. package/dist/internal/lib/delivered-but-disconnected.js +3 -5
  83. package/dist/internal/lib/error-handler.js +8 -3
  84. package/dist/internal/lib/pixel-mark.d.ts +4 -17
  85. package/dist/internal/lib/pixel-mark.js +5 -148
  86. package/dist/internal/lib/sounds.d.ts +4 -4
  87. package/dist/internal/lib/sounds.js +4 -4
  88. package/dist/internal/lib/use-project-feature-flags.js +3 -1
  89. package/dist/internal/stores/composer-prefill-store.js +4 -1
  90. package/dist/internal/stores/sound-store.d.ts +4 -4
  91. package/dist/internal/stores/sound-store.js +10 -0
  92. package/dist/markdown/code/shiki-highlighter.js +14 -5
  93. package/dist/markdown/file-links.js +12 -3
  94. package/dist/markdown/markdown-frontmatter.d.ts +6 -6
  95. package/dist/markdown/markdown-frontmatter.js +3 -3
  96. package/dist/primitives/button.js +2 -1
  97. package/dist/session/agents/held-messages.d.ts +1 -5
  98. package/dist/session/agents/held-messages.js +1 -21
  99. package/dist/session/composer/ComposerAboveCard.d.ts +4 -1
  100. package/dist/session/composer/ComposerAboveCard.js +2 -2
  101. package/dist/session/composer/composer-chat-input.d.ts +1 -1
  102. package/dist/session/composer/composer-chat-input.js +2 -2
  103. package/dist/session/composer/composer.js +16 -1
  104. package/dist/session/composer/hooks/use-file-search.d.ts +15 -15
  105. package/dist/session/composer/hooks/use-file-search.js +16 -16
  106. package/dist/session/composer/menus/mention-controller.js +1 -3
  107. package/dist/session/composer/menus/space-mentions.d.ts +14 -4
  108. package/dist/session/composer/menus/space-mentions.js +17 -1
  109. package/dist/session/composer/use-instant-session-send.js +2 -2
  110. package/dist/session/header/session-goal-indicator.js +4 -4
  111. package/dist/session/panel/easy/plan-card.d.ts +2 -2
  112. package/dist/session/panel/easy/plan-card.js +2 -2
  113. package/dist/session/panel/session-desktop.js +6 -0
  114. package/dist/session/panel/use-session-panel-state.js +2 -2
  115. package/dist/session/status/sandbox-loading-boundary.js +2 -2
  116. package/dist/session/status/session-terminal-state.d.ts +47 -0
  117. package/dist/session/status/session-terminal-state.js +56 -0
  118. package/dist/session/thread/plan-surface.d.ts +1 -1
  119. package/dist/session/thread/plan-surface.js +1 -1
  120. package/dist/session/thread/session-chat.d.ts +1 -1
  121. package/dist/session/thread/session-chat.js +88 -99
  122. package/dist/session/thread/stop-sequence.d.ts +51 -0
  123. package/dist/session/thread/stop-sequence.js +55 -0
  124. package/dist/session/thread/transcript.d.ts +2 -2
  125. package/dist/session/thread/transcript.js +2 -2
  126. package/dist/session/tool/tools/apply-patch-tool.d.ts +1 -1
  127. package/dist/session/tool/tools/apply-patch-tool.js +1 -1
  128. package/dist/session/tool/tools/kortix-action-tool.js +1 -1
  129. package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +1 -1
  130. package/dist/session/tool/tools/multi-agent-tool-bodies.js +1 -1
  131. package/dist/session/tool/tools/multi-agent-tools.js +1 -1
  132. package/dist/session/tool/tools/pty-kill-tool.d.ts +1 -1
  133. package/dist/session/tool/tools/pty-kill-tool.js +1 -1
  134. package/dist/session/tool/tools/pty-read-tool.d.ts +2 -2
  135. package/dist/session/tool/tools/pty-read-tool.js +2 -2
  136. package/dist/session/tool/tools/pty-spawn-tool.d.ts +1 -1
  137. package/dist/session/tool/tools/pty-spawn-tool.js +1 -1
  138. package/dist/session/tool/tools/pty-write-tool.d.ts +1 -1
  139. package/dist/session/tool/tools/pty-write-tool.js +1 -1
  140. package/dist/session/tool/tools/todo-write-tool.d.ts +1 -1
  141. package/dist/session/tool/tools/todo-write-tool.js +1 -1
  142. package/dist/session/turn/peer-message-row.d.ts +1 -10
  143. package/dist/session/turn/peer-message-row.js +1 -18
  144. package/dist/session/turn/plan-anchor.d.ts +3 -3
  145. package/dist/session/turn/plan-anchor.js +3 -3
  146. package/dist/session/turn/plan-card.d.ts +7 -7
  147. package/dist/session/turn/plan-card.js +7 -7
  148. package/dist/styles.css +1 -1
  149. package/dist/terminal/terminal-card-gate.d.ts +6 -3
  150. package/dist/terminal/terminal-card-gate.js +21 -4
  151. package/dist/workspace/index.d.ts +1 -1
  152. package/dist/workspace/index.js +1 -1
  153. package/dist/workspace/review/review-center.d.ts +8 -2
  154. package/dist/workspace/review/review-center.js +44 -13
  155. package/dist/workspace/review/review-reducer.d.ts +7 -0
  156. package/dist/workspace/review/review-reducer.js +11 -0
  157. package/dist/workspace/sidebar/footer/project-artifacts-nav.d.ts +6 -1
  158. package/dist/workspace/sidebar/footer/project-artifacts-nav.js +47 -4
  159. package/dist/workspace/sidebar/project-nav-items.js +11 -12
  160. package/dist/workspace/spaces/principal-card.d.ts +3 -1
  161. package/dist/workspace/spaces/principal-card.js +3 -3
  162. package/dist/workspace/spaces/space-agent-ask.d.ts +14 -0
  163. package/dist/workspace/spaces/space-agent-ask.js +36 -0
  164. package/dist/workspace/spaces/space-details-dialog.js +1 -1
  165. package/dist/workspace/spaces/space-details-panel.d.ts +2 -1
  166. package/dist/workspace/spaces/space-details-panel.js +62 -8
  167. package/dist/workspace/spaces/space-mention-source.d.ts +3 -2
  168. package/dist/workspace/spaces/space-mention-source.js +12 -19
  169. package/dist/workspace/spaces/space-view.js +3 -2
  170. package/package.json +3 -3
  171. package/skills/kortix-ui/references/modules.md +1 -1
  172. package/dist/session/tool/tools/multi-agent-tool-data.d.ts +0 -63
  173. package/dist/session/tool/tools/multi-agent-tool-data.js +0 -118
package/dist/i18n/en.js CHANGED
@@ -857,7 +857,11 @@ const catalog = {
857
857
  },
858
858
  "chat_front": {
859
859
  "name": "Spaces-Router",
860
- "description": "With Spaces on, the agent you chat with in a thread is a router: it hands the work to your agents and writes back like a person, in short messages with the result, a link or the decision you need to make. Your agents share the thread through its files, so the router passes file paths, not retyped text. Show work under a message opens the work behind it. Needs My Kortix on in kortix.yaml."
860
+ "description": "With Spaces on, the agent you chat with in a thread is a router: it does quick work itself (an answer, a short text, a look at the thread files) and hands longer work to the Space's agents. It writes back like a person, in short messages. An agent saves its full result as a file in the thread, and the router links that file instead of retyping it. Show work under a message opens the work behind it. Needs My Kortix on in kortix.yaml."
861
+ },
862
+ "spaces_proactive": {
863
+ "name": "Spaces-Proactive",
864
+ "description": "With Spaces on, a space can watch itself: turn on Proactive in its details, and an agent reads what happens there (finished threads, questions left open, people who join) and writes in the chat only when it matters: a result worth sharing, a decision you need to make, or something overdue. It can also start a thread that does the work. Optional daily brief at 9:00."
861
865
  }
862
866
  },
863
867
  "channelsSwitch": {
@@ -1342,6 +1346,7 @@ const catalog = {
1342
1346
  "drive": "Drive",
1343
1347
  "repo": "Repo",
1344
1348
  "searchApps": "Search apps",
1349
+ "searchArtifacts": "Search artifacts",
1345
1350
  "appsNoMatches": "No matches",
1346
1351
  "spaces": {
1347
1352
  "channels": "Spaces",
@@ -4829,6 +4834,7 @@ const catalog = {
4829
4834
  "textb7668a581f59": "Failed to disconnect",
4830
4835
  "textb79cac926e0b": "Help",
4831
4836
  "textb7d2844482b4": "Open the full approval page",
4837
+ "text648f297b3b79": "Show in App",
4832
4838
  "textb7de71558bf4": "Selected connectors resolve this secret on the server. The sandbox receives no value.",
4833
4839
  "textb7e29198fc4e": "{value0} key removed",
4834
4840
  "textb80a37564fbb": "Query",
@@ -7825,7 +7831,8 @@ const catalog = {
7825
7831
  "missed_wake": "The last wake is overdue.",
7826
7832
  "ask_overdue": "An ask is past its due time.",
7827
7833
  "verification_stalled": "Verification started more than 24 hours ago.",
7828
- "unreadable": "This folder has no goal file."
7834
+ "unreadable": "This folder has no goal file.",
7835
+ "blocked": "This goal cannot go on by itself."
7829
7836
  },
7830
7837
  "sessionChip": "Goal",
7831
7838
  "sessionRole": {
@@ -7849,6 +7856,24 @@ const catalog = {
7849
7856
  "draft": "Getting started: the agent is writing the plan.",
7850
7857
  "working": "In progress. Next check {time}.",
7851
7858
  "workingNoWake": "In progress."
7859
+ },
7860
+ "blocked": {
7861
+ "credits": "It ran out of credits, so no wake can start.",
7862
+ "wake_cap": "It used all {max} wakes for today.",
7863
+ "session_cap": "It used all {max} sessions it may start.",
7864
+ "owner_lost": "Its agent session failed, and no session took over.",
7865
+ "storage": "Its folder in Files could not be read or written.",
7866
+ "flag_off": "Goals is turned off for this project.",
7867
+ "setup": "Kortix is still setting it up."
7868
+ },
7869
+ "blockedNext": {
7870
+ "credits": "Add credits, then resume it.",
7871
+ "wake_cap": "It goes on by itself after midnight UTC.",
7872
+ "session_cap": "Stop it, or ask a project admin to raise its session limit.",
7873
+ "owner_lost": "Start it again to give it a new session.",
7874
+ "storage": "Check the folder in Files, then resume it.",
7875
+ "flag_off": "Turn on Goals for this project, then resume it.",
7876
+ "setup": "This finishes by itself within a minute."
7852
7877
  }
7853
7878
  },
7854
7879
  "agentEditor": {
@@ -8404,7 +8429,7 @@ const catalog = {
8404
8429
  "composerKeys": "Enter to send · Shift+Enter for a new line",
8405
8430
  "closeSelection": "Discard selected passage",
8406
8431
  "preparingSelection": "Preparing selected passage…",
8407
- "selectionCaptureFailed": "Could not prepare the selected passage. Discard it to leave a whole-Artifact comment.",
8432
+ "selectionCaptureFailed": "Could not prepare the selected passage. Discard it to leave a comment on the whole artifact.",
8408
8433
  "commentSelection": "Comment",
8409
8434
  "selectionTooLong": "This passage is too long to comment on. Select {max} characters or fewer.",
8410
8435
  "selectionUnavailable": "This passage cannot be anchored. Select another passage.",
@@ -8412,8 +8437,8 @@ const catalog = {
8412
8437
  "commentSaveFailed": "Could not save the document. Try again before commenting.",
8413
8438
  "events": {
8414
8439
  "saved": "saved a version",
8415
- "published": "published the Artifact",
8416
- "renamed": "renamed the Artifact",
8440
+ "published": "published the artifact",
8441
+ "renamed": "renamed the artifact",
8417
8442
  "visibility_changed": "changed visibility",
8418
8443
  "shared_with_changed": "changed who can view",
8419
8444
  "restored": "restored a version",
@@ -8425,7 +8450,7 @@ const catalog = {
8425
8450
  "sent_to_agent": "sent feedback to an agent"
8426
8451
  },
8427
8452
  "person": "Person",
8428
- "deleteRootDescription": "Its text is removed for everyone, and the thread becomes read-only. This cannot be undone.",
8453
+ "deleteRootDescription": "Its text is removed for everyone, and the thread leaves the comments list. This cannot be undone.",
8429
8454
  "showPanel": "Show comments",
8430
8455
  "hidePanel": "Hide comments",
8431
8456
  "panelTitle": "Comments and activity",
@@ -8468,7 +8493,16 @@ const catalog = {
8468
8493
  "pagePinLabel": "Comment {number}",
8469
8494
  "showPanelCount": "Show comments, {count} open",
8470
8495
  "hidePanelCount": "Hide comments, {count} open",
8471
- "commentSelectionHint": "Comment on the selection"
8496
+ "commentSelectionHint": "Comment on the selection",
8497
+ "threadReopened": "Thread reopened",
8498
+ "noCommentsReadOnlyHint": "Comments on this artifact appear here.",
8499
+ "commentTooLong": "A comment can be up to {max} characters. Remove {over}.",
8500
+ "discardDrawingTitle": "Discard this drawing?",
8501
+ "discardDrawingHint": "Your strokes are not saved. This cannot be undone.",
8502
+ "discardDrawing": "Discard",
8503
+ "keepDrawing": "Keep drawing",
8504
+ "activityLine": "<name>{actor}</name> <action>{verb}</action>",
8505
+ "activityLabel": "{actor} {verb}"
8472
8506
  },
8473
8507
  "insertMedia": "Image or video…",
8474
8508
  "diagram": "Diagram",
@@ -8496,7 +8530,7 @@ const catalog = {
8496
8530
  "showAll": "Show all",
8497
8531
  "live": {
8498
8532
  "here": "Here now",
8499
- "hereLabel": "On this Artifact now: {names}",
8533
+ "hereLabel": "On this artifact now: {names}",
8500
8534
  "reconnecting": "Reconnecting…",
8501
8535
  "you": "You",
8502
8536
  "agents": "Agents",
@@ -8515,13 +8549,28 @@ const catalog = {
8515
8549
  "writing": "{name} is writing…"
8516
8550
  },
8517
8551
  "coedit": {
8518
- "offLarge": "Live co-editing is off: this doc is over 1 MiB. Changes save as you type.",
8519
- "offLineEndings": "Live co-editing is off: this doc mixes CRLF and LF line endings. Changes save as you type.",
8520
- "offShape": "Live co-editing is off: the editor would rewrite part of this doc's Markdown. Changes save as you type.",
8552
+ "offLarge": "Live co-editing is off: this doc is too large. Changes save as you type.",
8553
+ "offLineEndings": "Live co-editing is off: this doc mixes two kinds of line breaks. Changes save as you type.",
8554
+ "offShape": "Live co-editing is off: the editor cannot keep part of this doc exactly as written. Changes save as you type.",
8521
8555
  "stoppedLarge": "Live co-editing stopped: one change was too large to share. Changes save as you type.",
8522
8556
  "stoppedFailed": "Live co-editing stopped: the connection failed. Changes save as you type.",
8523
- "stoppedHistory": "Live co-editing stopped: this doc's edit history is too large. Changes save as you type."
8524
- }
8557
+ "stoppedHistory": "Live co-editing stopped: this doc's edit history is too large. Changes save as you type.",
8558
+ "offFailed": "Live co-editing is off: it could not connect. Changes save as you type."
8559
+ },
8560
+ "conflictTitle": "Someone else changed this doc",
8561
+ "conflictReloadTitle": "Reload the newer version?",
8562
+ "conflictReloadHint": "Your edits since the last save are discarded. This cannot be undone.",
8563
+ "docLoadError": "Could not load this doc.",
8564
+ "openError": "Could not open this artifact.",
8565
+ "viewOnly": "View only",
8566
+ "viewingOldUndated": "You are viewing an earlier version.",
8567
+ "exportWaiting": "Saving your edits, then exporting…",
8568
+ "exportBlocked": "Export stopped: your latest edits are not saved.",
8569
+ "clearFilters": "Clear filters",
8570
+ "linkCopyFailed": "Could not copy the link. Select it in the field and copy it.",
8571
+ "shareDropsPeople": "{count, plural, one {Saving removes the person you added. Only Private keeps a list of people.} other {Saving removes the # people you added. Only Private keeps a list of people.}}",
8572
+ "askAgentHistoryError": "Could not load earlier chats.",
8573
+ "embedUnavailable": "This link has no preview, so it stays a link."
8525
8574
  },
8526
8575
  "emailConnect": {
8527
8576
  "homeTitle": "Where the inbox lives",
@@ -9179,7 +9228,8 @@ const catalog = {
9179
9228
  "leaveHintPrivate": "You lose access to its threads, files and memory, your own threads included. A member must add you again.",
9180
9229
  "leavePrivateTitle": "Leave #{name}?",
9181
9230
  "addMembers": "Add members",
9182
- "privateLimits": "Private hides the space from other people. Code changes (git branches) and the agents’ own tools aren’t private."
9231
+ "privateLimits": "Private hides the space from other people. Code changes (git branches) and the agents’ own tools aren’t private.",
9232
+ "agentAdded": "{agent} added to #{name}."
9183
9233
  },
9184
9234
  "folder": {
9185
9235
  "memory": "Memory",
@@ -9304,8 +9354,15 @@ const catalog = {
9304
9354
  "routines": "Routines",
9305
9355
  "addRoutine": "Add routine",
9306
9356
  "routinesPrivate": "A private space takes no routines yet.",
9357
+ "proactive": "Proactive",
9358
+ "proactiveWatch": "Watch this space",
9359
+ "proactiveWatchHint": "An agent reads what happens here and writes only when it matters.",
9360
+ "proactiveBrief": "Daily brief",
9361
+ "proactiveBriefHint": "A short summary at 9:00 on days with news.",
9362
+ "proactiveFailed": "The setting was not saved. Try again.",
9307
9363
  "allSettings": "All settings",
9308
- "askHint": "You can also ask in chat: \"add an agent here\", \"pin the launch doc as a tab\"."
9364
+ "askHint": "You can also ask in chat: \"add an agent here\", \"pin the launch doc as a tab\".",
9365
+ "noAgentsToAdd": "Every project agent is in this space."
9309
9366
  },
9310
9367
  "profile": {
9311
9368
  "viewProfile": "Show the profile of {name}",
@@ -9338,9 +9395,14 @@ const catalog = {
9338
9395
  "mentions": {
9339
9396
  "people": "People",
9340
9397
  "agents": "Agents",
9341
- "addToSpace": "Not in {space} yet: mentioning adds it",
9398
+ "addToSpace": "Not in {space}: ask to add",
9342
9399
  "added": "{agent} added to {space}",
9343
- "addFailed": "Could not add the agent. Try again."
9400
+ "addFailed": "Could not add the agent. Try again.",
9401
+ "askAdd": "Add {agent} to {space}?",
9402
+ "askAddConfirm": "Add",
9403
+ "askNotNow": "Not now",
9404
+ "askAdmin": "{agent} isn't in {space}. Ask a Space admin to add it.",
9405
+ "dismiss": "Dismiss"
9344
9406
  }
9345
9407
  },
9346
9408
  "imageGen": {
@@ -36,7 +36,7 @@ function isPermanentFileReadFailure(error) {
36
36
  msg.includes('403') ||
37
37
  msg.includes('400') ||
38
38
  msg.includes('bad request') ||
39
- // A directory read (e.g. `.opencode`) returns 400 "Path is a directory" —
39
+ // A directory read (e.g. `.kortix`) returns 400 "Path is a directory" —
40
40
  // permanent, must not be retried on a loop.
41
41
  msg.includes('is a directory') ||
42
42
  msg.includes('eisdir') ||
@@ -1,7 +1,7 @@
1
1
  /** @internal Kortix apps only. No semver: it may change in any release. */
2
2
  /**
3
- * Types matching the OpenCode server REST API responses.
4
- * See: https://opencode.ai/docs/server/#files
3
+ * Types matching the sandbox daemon's file REST API responses (the
4
+ * OpenCode-shaped `/file` routes kortixd serves).
5
5
  */
6
6
  /** GET /file?path=<path> response item */
7
7
  export interface FileNode {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Types matching the OpenCode server REST API responses.
3
- * See: https://opencode.ai/docs/server/#files
2
+ * Types matching the sandbox daemon's file REST API responses (the
3
+ * OpenCode-shaped `/file` routes kortixd serves).
4
4
  */
5
5
  export {};
@@ -11,11 +11,16 @@ export declare function GoalStatusBadge({ status, paused }: {
11
11
  status: ProjectGoalStatus | null | undefined;
12
12
  paused?: boolean;
13
13
  }): import("react").JSX.Element | null;
14
+ /** A goal the caller holds: the server record when there is one, else (an older caller) GOAL.md and its heartbeat. */
15
+ type GoalLike = Pick<ProjectGoal, 'health'> & Partial<Pick<ProjectGoal, 'goal' | 'heartbeat' | 'record' | 'blockedReason'>>;
14
16
  /**
15
- * A person paused the goal and nothing wakes it: GOAL.md has `paused_at` AND its heartbeat
16
- * is not running. `paused_at` alone is a claim any session with the folder can write.
17
+ * A person paused the goal: the server record's `paused_at`. Only a person
18
+ * can pause, and the API enforces it, so the record is the truth. Without a
19
+ * record (an older caller): GOAL.md `paused_at` AND a heartbeat that is not running.
17
20
  */
18
- export declare function goalPaused(goal: Pick<ProjectGoal, 'goal' | 'health' | 'heartbeat'>): boolean;
21
+ export declare function goalPaused(goal: GoalLike): boolean;
22
+ /** When the goal wakes next: the server's `next_wake_at`, else the heartbeat's next fire. Null while paused or waiting. */
23
+ export declare function goalNextWake(goal: GoalLike): string | null;
19
24
  /**
20
25
  * One sentence for where a goal stands and what happens next, the same on the
21
26
  * Goals list and the goal's page: closed, paused, the question it waits on a
@@ -24,12 +29,12 @@ export declare function goalPaused(goal: Pick<ProjectGoal, 'goal' | 'health' | '
24
29
  export declare function useGoalStateText(): (goal: ProjectGoal, locale: string, now: number) => string;
25
30
  /** Orange: a person must act (a question or a problem). Grey otherwise: green is kept for done (the ring). */
26
31
  export declare function GoalHealthDot({ goal }: {
27
- goal: Pick<ProjectGoal, 'health'> & Partial<Pick<ProjectGoal, 'goal' | 'heartbeat'>>;
32
+ goal: GoalLike;
28
33
  }): import("react").JSX.Element;
29
34
  /** What a goal's icon draws: its state, or a problem a person must look at. */
30
35
  export type GoalIconState = 'draft' | 'active' | 'verifying' | 'waiting' | 'attention' | 'paused' | 'done' | 'stopped';
31
36
  /** The icon state of a goal in a list: paused and attention win over the state in GOAL.md. */
32
- export declare function goalIconState(goal: ProjectGoal): GoalIconState;
37
+ export declare function goalIconState(goal: GoalLike): GoalIconState;
33
38
  /** The icon state of a state move in the activity feed. */
34
39
  export declare function goalStatusIconState(status: ProjectGoalStatus): GoalIconState;
35
40
  /**
@@ -50,25 +55,38 @@ export declare function GoalStatusIcon({ state, progress, label, tone, className
50
55
  label?: string;
51
56
  className?: string;
52
57
  }): import("react").JSX.Element;
53
- /** One sentence per issue, for the health line and its tooltip. */
54
- export declare function useGoalIssueText(): (issue: ProjectGoalIssue, goal: Pick<ProjectGoal, "heartbeat">) => string;
55
- /** Done criteria met, as a ring and "met/total". Nothing while the goal has no criteria. */
58
+ /** One sentence per issue, for the health line and its tooltip. `blocked` says why, from the server's `blocked_reason`. */
59
+ export declare function useGoalIssueText(): (issue: ProjectGoalIssue, goal: Partial<Pick<ProjectGoal, "heartbeat" | "blockedReason" | "record">>) => string;
60
+ /** The next step a person takes for a blocked goal, one sentence. */
61
+ export declare function useGoalBlockedNextStep(): (goal: Pick<ProjectGoal, "blockedReason">) => string | null;
62
+ /**
63
+ * Done criteria the agent reports met, as a ring and "met/total". The ring
64
+ * turns green only when the verifier passed every criterion. Nothing while
65
+ * the goal has no criteria.
66
+ */
56
67
  export declare function GoalCriteriaProgress({ goal, ring }: {
57
- goal: ProjectGoalDocument | null;
68
+ goal: ProjectGoal | ProjectGoalDocument | null;
58
69
  ring?: boolean;
59
70
  }): import("react").JSX.Element | null;
71
+ /** Criteria the agent reports met (its claim, not verification) and the total. */
60
72
  export declare function goalProgress(goal: ProjectGoalDocument | null): {
61
73
  met: number;
62
74
  total: number;
63
75
  };
76
+ /** Criteria reported met by the agent, verified by the independent verifier, and the total. */
77
+ export declare function goalCriteriaStatus(goal: Pick<ProjectGoal, 'criteria'>): {
78
+ met: number;
79
+ verified: number;
80
+ total: number;
81
+ };
64
82
  /** Open asks for a person (not the agent): what the goal waits on someone for. */
65
83
  export declare function goalOpenAsks(goal: ProjectGoalDocument | null): ProjectGoalItem[];
66
84
  /** The goal waits on a person: its state is `waiting_on_user`, or it has an open ask. */
67
- export declare function goalNeedsYou(goal: ProjectGoal): boolean;
85
+ export declare function goalNeedsYou(goal: GoalLike): boolean;
68
86
  /** The goal runs into a problem no person was asked about: a health issue (no heartbeat, a failed wake, …). */
69
- export declare function goalNeedsAttention(goal: ProjectGoal): boolean;
70
- /** When the goal last woke: the heartbeat's last run, else the wake GOAL.md records. */
71
- export declare function goalLastWake(goal: Pick<ProjectGoal, 'goal' | 'heartbeat'>): string | null;
87
+ export declare function goalNeedsAttention(goal: GoalLike): boolean;
88
+ /** When the goal last woke: the server's `last_wake_at`, else the heartbeat's last run, else the wake GOAL.md records. */
89
+ export declare function goalLastWake(goal: Partial<Pick<ProjectGoal, 'goal' | 'heartbeat' | 'record'>>): string | null;
72
90
  /** Who a goal is for, by name: "You", the member's email, else "A teammate". */
73
91
  export declare function useGoalPerson(projectId: string): (userId: string | null | undefined) => string | null;
74
92
  /** The person a goal is for, as an avatar and a name ("You", their email, else "A teammate"). */
@@ -86,6 +104,7 @@ export declare function useStartGoal(projectId: string): (outcome: string) => vo
86
104
  export declare function goalAssignedTo(goal: Pick<ProjectGoal, 'goal'>, userId: string | null | undefined): boolean;
87
105
  /** "in 33 min", "2 hr ago", "Tue 09:00": the reminders time format. */
88
106
  export declare function formatGoalTime(iso: string | null | undefined, locale: string, now: number): string;
89
- export declare function goalHref(projectId: string, goal: Pick<ProjectGoal, 'scope' | 'slug'>): string | null;
107
+ /** A goal's page: `/goals/<goal_id>`. Without an id (an older caller): the legacy `/goals/<scope>/<slug>` link, which resolves when the slug is unique. */
108
+ export declare function goalHref(projectId: string, goal: Pick<ProjectGoal, 'scope' | 'slug'> & Partial<Pick<ProjectGoal, 'goalId'>>): string | null;
90
109
  /** The current time, re-read every 30 seconds: relative times and health stay current. */
91
110
  export { useNow as useGoalClock } from '../reminders/use-refetch-after-fire.js';
@@ -37,11 +37,22 @@ export function GoalStatusBadge({ status, paused }) {
37
37
  }
38
38
  const CLOSED = new Set(['done', 'stopped', 'abandoned']);
39
39
  /**
40
- * A person paused the goal and nothing wakes it: GOAL.md has `paused_at` AND its heartbeat
41
- * is not running. `paused_at` alone is a claim any session with the folder can write.
40
+ * A person paused the goal: the server record's `paused_at`. Only a person
41
+ * can pause, and the API enforces it, so the record is the truth. Without a
42
+ * record (an older caller): GOAL.md `paused_at` AND a heartbeat that is not running.
42
43
  */
43
44
  export function goalPaused(goal) {
44
- return goal.health.state !== 'closed' && !!goal.goal?.paused_at && goal.heartbeat?.state !== 'active';
45
+ if (goal.health.state === 'closed')
46
+ return false;
47
+ if (goal.record)
48
+ return !!goal.record.paused_at;
49
+ return !!goal.goal?.paused_at && goal.heartbeat?.state !== 'active';
50
+ }
51
+ /** When the goal wakes next: the server's `next_wake_at`, else the heartbeat's next fire. Null while paused or waiting. */
52
+ export function goalNextWake(goal) {
53
+ if (goal.record)
54
+ return goal.record.next_wake_at;
55
+ return goal.heartbeat?.state === 'active' ? (goal.heartbeat.next_fire_at ?? null) : null;
45
56
  }
46
57
  /**
47
58
  * One sentence for where a goal stands and what happens next, the same on the
@@ -61,6 +72,9 @@ export function useGoalStateText() {
61
72
  return t(`state.${doc.status === 'stopped' ? 'stopped' : 'abandoned'}`);
62
73
  if (goalPaused(goal) && doc.paused_at)
63
74
  return t('state.paused', { time: formatGoalTime(doc.paused_at, locale, now) });
75
+ // Blocked: the reason is the sentence; the goal page adds the next step.
76
+ if (goal.blockedReason)
77
+ return issueText('blocked', goal);
64
78
  // Waiting on a person: the question itself is the sentence. GOAL.md is hand-editable: only text counts.
65
79
  const asked = doc.status === 'waiting_on_user' && typeof doc.waiting_on === 'string' ? doc.waiting_on : null;
66
80
  const ask = goalOpenAsks(doc)[0]?.title;
@@ -75,14 +89,14 @@ export function useGoalStateText() {
75
89
  return t('state.verifying');
76
90
  if (doc.status === 'draft')
77
91
  return t('state.draft');
78
- const next = goal.heartbeat?.next_fire_at;
92
+ const next = goalNextWake(goal);
79
93
  return next ? t('state.working', { time: formatGoalTime(next, locale, now) }) : t('state.workingNoWake');
80
94
  };
81
95
  }
82
96
  /** Orange: a person must act (a question or a problem). Grey otherwise: green is kept for done (the ring). */
83
97
  export function GoalHealthDot({ goal }) {
84
98
  const open = goal.health.state !== 'closed';
85
- const paused = open && !!goal.goal?.paused_at && goal.heartbeat?.state !== 'active';
99
+ const paused = goalPaused(goal);
86
100
  const waiting = open && !paused && (goal.goal?.status === 'waiting_on_user' || goalOpenAsks(goal.goal ?? null).length > 0);
87
101
  const tone = open && !paused && (waiting || goal.health.state === 'attention') ? 'warning' : 'neutral';
88
102
  return _jsx(StatusDot, { tone: tone });
@@ -147,25 +161,48 @@ export function GoalStatusIcon({ state, progress = 0, label, tone, className, })
147
161
  const a11y = label ? { role: 'img', 'aria-label': label } : { 'aria-hidden': true };
148
162
  return (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", style: { color }, className: className ? `shrink-0 ${className}` : 'shrink-0', "data-goal-icon": state, ...a11y, children: state === 'done' ? (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "8", cy: "8", r: "7", fill: "currentColor", stroke: "none" }), _jsx("path", { d: "M5.2 8.2 L7.1 10 L10.8 6.2", stroke: "var(--background)" })] })) : (_jsxs(_Fragment, { children: [_jsx("circle", { cx: "8", cy: "8", r: R, strokeDasharray: state === 'draft' ? '2.4 2.5' : undefined }), state === 'active' && progress > 0 ? _jsx("path", { d: wedge(progress), fill: "currentColor", stroke: "none" }) : null, state === 'verifying' ? _jsx("path", { d: wedge(1), fill: "currentColor", stroke: "none", opacity: "0.55" }) : null, state === 'waiting' ? _jsx("circle", { cx: "8", cy: "8", r: "2.75", fill: "currentColor", stroke: "none" }) : null, state === 'attention' ? (_jsxs(_Fragment, { children: [_jsx("path", { d: "M8 5 L8 8.6" }), _jsx("circle", { cx: "8", cy: "11", r: "0.4", fill: "currentColor" })] })) : null, state === 'paused' ? _jsx("path", { d: "M6.6 5.6 L6.6 10.4 M9.4 5.6 L9.4 10.4" }) : null, state === 'stopped' ? _jsx("path", { d: "M5.4 10.6 L10.6 5.4" }) : null] })) }));
149
163
  }
150
- /** One sentence per issue, for the health line and its tooltip. */
164
+ /** One sentence per issue, for the health line and its tooltip. `blocked` says why, from the server's `blocked_reason`. */
151
165
  export function useGoalIssueText() {
152
166
  const t = useTranslations('goals');
153
167
  return (issue, goal) => issue === 'heartbeat_failed'
154
168
  ? t('issue.heartbeat_failed', { error: goal.heartbeat?.last_error ?? '—' })
155
- : t(`issue.${issue}`);
169
+ : issue === 'blocked'
170
+ ? goal.blockedReason
171
+ ? t(`blocked.${goal.blockedReason}`, { max: goal.blockedReason === 'session_cap' ? (goal.record?.max_sessions ?? 0) : (goal.record?.max_wakes_per_day ?? 0) })
172
+ : t('issue.blocked')
173
+ : t(`issue.${issue}`);
156
174
  }
157
- /** Done criteria met, as a ring and "met/total". Nothing while the goal has no criteria. */
175
+ /** The next step a person takes for a blocked goal, one sentence. */
176
+ export function useGoalBlockedNextStep() {
177
+ const t = useTranslations('goals');
178
+ return (goal) => (goal.blockedReason ? t(`blockedNext.${goal.blockedReason}`) : null);
179
+ }
180
+ /**
181
+ * Done criteria the agent reports met, as a ring and "met/total". The ring
182
+ * turns green only when the verifier passed every criterion. Nothing while
183
+ * the goal has no criteria.
184
+ */
158
185
  export function GoalCriteriaProgress({ goal, ring = true }) {
159
186
  const t = useTranslations('goals');
160
- const { met, total } = goalProgress(goal);
187
+ const progress = goal && 'record' in goal ? goalCriteriaStatus(goal) : { ...goalProgress(goal), verified: 0 };
188
+ const { met, total, verified } = progress;
161
189
  if (total === 0)
162
190
  return null;
163
- return (_jsxs("span", { className: "text-muted-foreground inline-flex items-center gap-1.5 text-xs tabular-nums", "aria-label": t('criteriaMet', { met, total }), children: [ring ? _jsx(ProgressRing, { value: (met / total) * 100, className: "size-3.5", progressClassName: met === total ? 'text-kortix-green' : 'text-muted-foreground' }) : null, _jsxs("span", { "aria-hidden": true, children: [met, "/", total] })] }));
191
+ return (_jsxs("span", { className: "text-muted-foreground inline-flex items-center gap-1.5 text-xs tabular-nums", "aria-label": t('criteriaMet', { met, total }), children: [ring ? _jsx(ProgressRing, { value: (met / total) * 100, className: "size-3.5", progressClassName: verified === total ? 'text-kortix-green' : 'text-muted-foreground' }) : null, _jsxs("span", { "aria-hidden": true, children: [met, "/", total] })] }));
164
192
  }
193
+ /** Criteria the agent reports met (its claim, not verification) and the total. */
165
194
  export function goalProgress(goal) {
166
195
  const criteria = goal?.success_criteria ?? [];
167
196
  return { met: criteria.filter((c) => c.met).length, total: criteria.length };
168
197
  }
198
+ /** Criteria reported met by the agent, verified by the independent verifier, and the total. */
199
+ export function goalCriteriaStatus(goal) {
200
+ return {
201
+ met: goal.criteria.filter((c) => c.reported_met).length,
202
+ verified: goal.criteria.filter((c) => c.verified).length,
203
+ total: goal.criteria.length,
204
+ };
205
+ }
169
206
  /** Open asks for a person (not the agent): what the goal waits on someone for. */
170
207
  export function goalOpenAsks(goal) {
171
208
  return (goal?.items ?? []).filter((i) => i.kind === 'ask' && i.status === 'open' && i.owner !== 'agent');
@@ -174,14 +211,16 @@ export function goalOpenAsks(goal) {
174
211
  export function goalNeedsYou(goal) {
175
212
  if (goal.health.state === 'closed' || goalPaused(goal))
176
213
  return false;
177
- return goal.goal?.status === 'waiting_on_user' || goalOpenAsks(goal.goal).length > 0;
214
+ return goal.goal?.status === 'waiting_on_user' || goalOpenAsks(goal.goal ?? null).length > 0;
178
215
  }
179
216
  /** The goal runs into a problem no person was asked about: a health issue (no heartbeat, a failed wake, …). */
180
217
  export function goalNeedsAttention(goal) {
181
218
  return goal.health.state === 'attention' && !goalNeedsYou(goal) && !goalPaused(goal);
182
219
  }
183
- /** When the goal last woke: the heartbeat's last run, else the wake GOAL.md records. */
220
+ /** When the goal last woke: the server's `last_wake_at`, else the heartbeat's last run, else the wake GOAL.md records. */
184
221
  export function goalLastWake(goal) {
222
+ if (goal.record)
223
+ return goal.record.last_wake_at;
185
224
  return goal.heartbeat?.last_fired_at ?? goal.goal?.last_wake_at ?? null;
186
225
  }
187
226
  /** Who a goal is for, by name: "You", the member's email, else "A teammate". */
@@ -222,9 +261,12 @@ export function goalAssignedTo(goal, userId) {
222
261
  export function formatGoalTime(iso, locale, now) {
223
262
  return iso ? formatFireTime(iso, locale, now) : '—';
224
263
  }
264
+ /** A goal's page: `/goals/<goal_id>`. Without an id (an older caller): the legacy `/goals/<scope>/<slug>` link, which resolves when the slug is unique. */
225
265
  export function goalHref(projectId, goal) {
226
266
  const list = uiRoutes().goals(projectId);
227
- return list ? `${list}/${goal.scope}/${encodeURIComponent(goal.slug)}` : null;
267
+ if (!list)
268
+ return null;
269
+ return goal.goalId ? `${list}/${encodeURIComponent(goal.goalId)}` : `${list}/${goal.scope}/${encodeURIComponent(goal.slug)}`;
228
270
  }
229
271
  /** The current time, re-read every 30 seconds: relative times and health stay current. */
230
272
  export { useNow as useGoalClock } from '../reminders/use-refetch-after-fire.js';
@@ -2,7 +2,7 @@
2
2
  import { PopoverContent } from '../../primitives/popover.js';
3
3
  import { type ComponentProps, type PointerEvent, type RefObject } from 'react';
4
4
  /**
5
- * The hover card of a sidebar nav row (Apps, Customize): a mouse that rests on
5
+ * The hover card of a sidebar nav row (Apps, Artifacts, Settings): a mouse that rests on
6
6
  * the row opens a list of where the row leads, so one click lands on the
7
7
  * thing instead of two. The row stays a plain link: the card is a Popover
8
8
  * anchored to it (`anchorRef` as `PopoverAnchor virtualRef`), not a menu
@@ -10,7 +10,7 @@ const HOVER_OPEN_DELAY_MS = 400;
10
10
  /** Time to cross the gap between the row and its card before it closes. Same as the More row. */
11
11
  const HOVER_CLOSE_DELAY_MS = 150;
12
12
  /**
13
- * The hover card of a sidebar nav row (Apps, Customize): a mouse that rests on
13
+ * The hover card of a sidebar nav row (Apps, Artifacts, Settings): a mouse that rests on
14
14
  * the row opens a list of where the row leads, so one click lands on the
15
15
  * thing instead of two. The row stays a plain link: the card is a Popover
16
16
  * anchored to it (`anchorRef` as `PopoverAnchor virtualRef`), not a menu
@@ -16,7 +16,7 @@ export declare function isProjectAdminPath(pathname: string | null | undefined):
16
16
  * by asking an agent in a session, so the sidebar lists only the agents you
17
17
  * pinned (none pinned: the first five) and All agents when more exist, then Review (with its "needs you" count), Models, and Settings
18
18
  * (Project admin, whose top bar holds every library and Members).
19
- * The header's + and All agents buttons sit on the Customize row itself.
19
+ * The header's + (New agent) button sits on the Customize row itself.
20
20
  */
21
21
  export declare function ProjectCapabilityNav({ projectId }: {
22
22
  projectId: string;
@@ -44,7 +44,7 @@ function RowGlyph({ children }) {
44
44
  * by asking an agent in a session, so the sidebar lists only the agents you
45
45
  * pinned (none pinned: the first five) and All agents when more exist, then Review (with its "needs you" count), Models, and Settings
46
46
  * (Project admin, whose top bar holds every library and Members).
47
- * The header's + and All agents buttons sit on the Customize row itself.
47
+ * The header's + (New agent) button sits on the Customize row itself.
48
48
  */
49
49
  export function ProjectCapabilityNav({ projectId }) {
50
50
  const pathname = useUiPathname();
@@ -10,7 +10,7 @@ export { isConnectionClosedNoise, isFailedToSendMessageNoise, isFramelessNetwork
10
10
  export { isIosWebViewInjectedStackOverflowNoise, isOldBrowserDomNullDerefNoise, isFirefoxDeadObjectUnattributableNoise, isOldBrowserSyntaxParseError, isOldWebkitRegexNoiseMessage, isUndefinedVariableThirdPartyNoise, isUnresolvableStackOverflowNoise, } from './browser-noise/rules/old-browsers.js';
11
11
  export { isEmbedPdfTilingReactUpdateDepthNoise, isEmbedPdfTilingTileDestructureNoise, } from './browser-noise/rules/pdf.js';
12
12
  export { isDocumentStateNotFoundNoise, isExpectedNextRecoveryBailoutNoise, isFirefoxReactSchedulerReentryNoise, isLikelyDomMutationNoise, isServerSuspenseBailoutNoise, isThirdPartyReactUpdateDepthNoise, } from './browser-noise/rules/react.js';
13
- export { isAnonymousAuthRefreshRace, isAutoplayNotAllowedRejectionNoise, isNonErrorObjectNotFoundRejectionNoise, isNonErrorUndefinedRejectionNoise, isOperationErrorPopErrorScopeNoise, isPlayNotSupportedRejectionNoise, isSupabaseTokenExpiredNoise, } from './browser-noise/rules/rejections.js';
13
+ export { isAutoplayNotAllowedRejectionNoise, isNonErrorObjectNotFoundRejectionNoise, isNonErrorUndefinedRejectionNoise, isOperationErrorPopErrorScopeNoise, isPlayNotSupportedRejectionNoise, isSupabaseTokenExpiredNoise, } from './browser-noise/rules/rejections.js';
14
14
  export { isSafariGenericSecurityErrorNoise, isStorageDisabledWebViewNoiseMessage, isStorageSecurityErrorNoise, } from './browser-noise/rules/storage.js';
15
15
  export { isAndroidWebViewNativeBridgePostEventNoise, isAndroidWebViewNativeBridgePostMessageNoise, isIOSWebViewWebKitBridgeNoise, } from './browser-noise/rules/webview.js';
16
16
  export declare const NOISE_RULES: readonly NoiseRule[];
@@ -35,7 +35,7 @@ export { isConnectionClosedNoise, isFailedToSendMessageNoise, isFramelessNetwork
35
35
  export { isIosWebViewInjectedStackOverflowNoise, isOldBrowserDomNullDerefNoise, isFirefoxDeadObjectUnattributableNoise, isOldBrowserSyntaxParseError, isOldWebkitRegexNoiseMessage, isUndefinedVariableThirdPartyNoise, isUnresolvableStackOverflowNoise, } from './browser-noise/rules/old-browsers.js';
36
36
  export { isEmbedPdfTilingReactUpdateDepthNoise, isEmbedPdfTilingTileDestructureNoise, } from './browser-noise/rules/pdf.js';
37
37
  export { isDocumentStateNotFoundNoise, isExpectedNextRecoveryBailoutNoise, isFirefoxReactSchedulerReentryNoise, isLikelyDomMutationNoise, isServerSuspenseBailoutNoise, isThirdPartyReactUpdateDepthNoise, } from './browser-noise/rules/react.js';
38
- export { isAnonymousAuthRefreshRace, isAutoplayNotAllowedRejectionNoise, isNonErrorObjectNotFoundRejectionNoise, isNonErrorUndefinedRejectionNoise, isOperationErrorPopErrorScopeNoise, isPlayNotSupportedRejectionNoise, isSupabaseTokenExpiredNoise, } from './browser-noise/rules/rejections.js';
38
+ export { isAutoplayNotAllowedRejectionNoise, isNonErrorObjectNotFoundRejectionNoise, isNonErrorUndefinedRejectionNoise, isOperationErrorPopErrorScopeNoise, isPlayNotSupportedRejectionNoise, isSupabaseTokenExpiredNoise, } from './browser-noise/rules/rejections.js';
39
39
  export { isSafariGenericSecurityErrorNoise, isStorageDisabledWebViewNoiseMessage, isStorageSecurityErrorNoise, } from './browser-noise/rules/storage.js';
40
40
  export { isAndroidWebViewNativeBridgePostEventNoise, isAndroidWebViewNativeBridgePostMessageNoise, isIOSWebViewWebKitBridgeNoise, } from './browser-noise/rules/webview.js';
41
41
  export const NOISE_RULES = [
@@ -16,7 +16,7 @@ import { normalizeString } from '../evidence.js';
16
16
  const RUNTIME_NOT_READY_NOISE_PATTERNS = [
17
17
  'Server URL not ready',
18
18
  'sandbox is still loading',
19
- // The daemon's not-ready 503, in every spelling (code, pi, OpenCode).
19
+ // The daemon's not-ready 503, with or without its code.
20
20
  ...RUNTIME_NOT_READY_MARKERS,
21
21
  ];
22
22
  // Expected billing-gate HTTP 402 messages. The API billing gate
@@ -1,4 +1,5 @@
1
1
  import { isBrowserBundleSource, isFirstPartyResolvedSource, normalizeString, sourcesOf, stripErrorWrappers, } from '../evidence.js';
2
+ import { isScriptAssetSource } from './old-browsers.js';
2
3
  // OneTrust cookie-consent SDK JSON-parse noise. OneTrust
3
4
  // (`https://onetrust.com`) is a third-party cookie-consent / IAB TCF banner
4
5
  // vendors inject into pages via a small bootstrap stub
@@ -227,6 +228,22 @@ export function isGoogletagUndefinedNoise(input) {
227
228
  return (GOOGLETAG_UNDEFINED_MESSAGE.test(stripErrorWrappers(normalizeString(input.message))) &&
228
229
  !sourcesOf(input).some((source) => isBrowserBundleSource(source) || isFirstPartyResolvedSource(source)));
229
230
  }
231
+ /**
232
+ * A script injected into the page twice declares the same top-level `let` or
233
+ * `const`: `Identifier 'originalQuery' has already been declared`. Better
234
+ * Stack, Kortix Frontend prod, 2026-11-06 (KRTX-4353, pattern `cc5efbb8…`):
235
+ * one frame, the page document `app:///` at 1:1, global `onerror`, 0 users.
236
+ * Kortix code cannot raise it from the document: our bundle chunks wrap their
237
+ * code in functions and report their own `_next/static` URL, and our inline
238
+ * scripts declare nothing at the top level. A frame in a loaded script (our
239
+ * bundles, any `.js` URL, an extension) or in resolved first-party source
240
+ * keeps reporting.
241
+ */
242
+ const REDECLARED_IDENTIFIER_MESSAGE = /^(?:Uncaught SyntaxError: )?Identifier '[^']+' has already been declared$/;
243
+ function isRedeclaredInjectedIdentifierNoise(input) {
244
+ return (REDECLARED_IDENTIFIER_MESSAGE.test(stripErrorWrappers(normalizeString(input.message))) &&
245
+ !sourcesOf(input).some((source) => isScriptAssetSource(source) || isFirstPartyResolvedSource(source)));
246
+ }
230
247
  /** Vercel toolbar frames have a reserved source path outside app bundles. */
231
248
  export function isVercelLiveFeedbackNoise(input) {
232
249
  const sources = sourcesOf(input);
@@ -240,5 +257,6 @@ export const INJECTED_SCRIPT_RULES = [
240
257
  { id: 'redefine-wallet-provider', appliesTo: 'both', match: isRedefineInjectedWalletNoise },
241
258
  { id: 'wallet-provider-write', appliesTo: 'both', match: isInjectedWalletProviderWriteNoise },
242
259
  { id: 'googletag-undefined', appliesTo: 'both', match: isGoogletagUndefinedNoise },
260
+ { id: 'redeclared-injected-identifier', appliesTo: 'both', match: isRedeclaredInjectedIdentifierNoise },
243
261
  { id: 'vercel-live-feedback', appliesTo: 'both', match: isVercelLiveFeedbackNoise },
244
262
  ];
@@ -189,6 +189,7 @@ export declare function isUndefinedVariableThirdPartyNoise(input: {
189
189
  filename?: unknown;
190
190
  } | undefined>;
191
191
  }): boolean;
192
+ export declare function isScriptAssetSource(filename: unknown): boolean;
192
193
  /**
193
194
  * Whether a Sentry / window.onerror event is the Firefox dead-object
194
195
  * external-scope noise class: a `TypeError: can't access dead object`
@@ -608,7 +608,7 @@ const FIREFOX_DEAD_OBJECT_NOISE_PATTERN = /^can['’]t access dead object$/i;
608
608
  // `app:///projects/…`) carries no file extension and is NOT a script frame:
609
609
  // it is Firefox's fallback source for a throw whose stack is uncapturable,
610
610
  // and it is exactly the shape this rule drops.
611
- function isScriptAssetSource(filename) {
611
+ export function isScriptAssetSource(filename) {
612
612
  const normalized = normalizeString(filename);
613
613
  if (normalized === '' || normalized === 'undefined')
614
614
  return false;
@@ -102,15 +102,6 @@ export declare function isNonErrorObjectNotFoundRejectionNoise(input: {
102
102
  filename?: unknown;
103
103
  } | undefined>;
104
104
  }): boolean;
105
- export declare function isAnonymousAuthRefreshRace(input: {
106
- message?: unknown;
107
- requestUrl?: string;
108
- mechanism?: unknown;
109
- frames?: Array<{
110
- function?: unknown;
111
- filename?: unknown;
112
- }>;
113
- }): boolean;
114
105
  /**
115
106
  * Whether a Sentry event is the frameless `HTMLMediaElement.play()`
116
107
  * `NotAllowedError` autoplay-policy rejection: the play promise denied by