@lobu/runtime-server 21.0.0 → 21.1.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 (182) hide show
  1. package/dist/catalogs/automations.json +0 -8
  2. package/dist/component.json +1 -1
  3. package/dist/connectors/github.ts +269 -194
  4. package/dist/connectors/google_calendar.ts +36 -132
  5. package/dist/connectors/jira.ts +13 -4
  6. package/dist/connectors/producthunt.ts +3 -1
  7. package/dist/connectors/reddit.ts +34 -4
  8. package/dist/db/migrations/20260928120000_classification_consolidation.sql +51 -0
  9. package/dist/dependencies.bun.lock +11 -11
  10. package/dist/owletto/dist/assets/_-00GgOtdu.js +1 -0
  11. package/dist/owletto/dist/assets/{_-DrcppoWh.js → _-XlUwOWCI.js} +2 -2
  12. package/dist/owletto/dist/assets/{_agentId-HNcmgH56.js → _agentId-B2DrawIk.js} +1 -1
  13. package/dist/owletto/dist/assets/_agentId-CS0AcWH2.js +1 -0
  14. package/dist/owletto/dist/assets/{_automationId-BCfrLnUS.js → _automationId-BLnqLtUv.js} +1 -1
  15. package/dist/owletto/dist/assets/{_connectorKey._connectionId-126-iG9w.js → _connectorKey._connectionId-DcUWoZ-C.js} +1 -1
  16. package/dist/owletto/dist/assets/{_connectorKey.index-CywE9A3N.js → _connectorKey.index-C_yKycN_.js} +1 -1
  17. package/dist/owletto/dist/assets/{_conversationId-CNETA_rY.js → _conversationId-CpuEvflw.js} +1 -1
  18. package/dist/owletto/dist/assets/{_deploymentId-CAVpXf8s.js → _deploymentId-BL9tnDFl.js} +1 -1
  19. package/dist/owletto/dist/assets/_name-DlxjWkKk.js +1 -0
  20. package/dist/owletto/dist/assets/{_owner-D2eh4R90.js → _owner-Cg50UU6m.js} +1 -1
  21. package/dist/owletto/dist/assets/_shape-BWZW4mj8.js +1 -0
  22. package/dist/owletto/dist/assets/_skillKey-B25fO0_O.js +1 -0
  23. package/dist/owletto/dist/assets/{_slug-DoIaJBbh.js → _slug-DbD-wv2m.js} +1 -1
  24. package/dist/owletto/dist/assets/_viewKey-BcTEvQ3N.js +1 -0
  25. package/dist/owletto/dist/assets/_viewKey-W4RjiUWL.js +1 -0
  26. package/dist/owletto/dist/assets/_viewKey-iGPCKSda.js +1 -0
  27. package/dist/owletto/dist/assets/{accept-invitation-BWRiEUsd.js → accept-invitation-BmQKbQem.js} +1 -1
  28. package/dist/owletto/dist/assets/{activity-route-view-rVdTeVXN.js → activity-route-view-BvtAoGVt.js} +1 -1
  29. package/dist/owletto/dist/assets/{agent-card-controls-JubkhcHt.js → agent-card-controls-bhTMPoVi.js} +1 -1
  30. package/dist/owletto/dist/assets/{agent-client-setup-list-Btcy4Cu1.js → agent-client-setup-list-BBbq_2B1.js} +1 -1
  31. package/dist/owletto/dist/assets/{agent-connect-pages-Chfqn8iL.js → agent-connect-pages-DkDlFVY5.js} +1 -1
  32. package/dist/owletto/dist/assets/{agent-editor-form-BrOkwfg8.js → agent-editor-form-DwHD9j1Y.js} +1 -1
  33. package/dist/owletto/dist/assets/{agent-guardrails-route-CHM7JbIl.js → agent-guardrails-route-0PsTrqMC.js} +1 -1
  34. package/dist/owletto/dist/assets/{agent-loading-shells-DsiGx1fn.js → agent-loading-shells-BQLjzMPy.js} +1 -1
  35. package/dist/owletto/dist/assets/{agent-permissions-matrix-L_gFvSu1.js → agent-permissions-matrix-B-Q5rmuB.js} +1 -1
  36. package/dist/owletto/dist/assets/{agent-skill-context-D7tOJ8Pb.js → agent-skill-context-s42Q4Wjo.js} +1 -1
  37. package/dist/owletto/dist/assets/{agent-skills-route-AylS-B9v.js → agent-skills-route-Cwq1QrhW.js} +1 -1
  38. package/dist/owletto/dist/assets/{agent-subpage-shell-B7tCQ9zd.js → agent-subpage-shell-DtzoRy6N.js} +1 -1
  39. package/dist/owletto/dist/assets/{agent-thread-DOYh7WLW.js → agent-thread-D7AGGjRV.js} +1 -1
  40. package/dist/owletto/dist/assets/agents-BqCKU4CT.js +1 -0
  41. package/dist/owletto/dist/assets/{agents-workbench-DOwn78eL.js → agents-workbench-Cl7FO7b3.js} +1 -1
  42. package/dist/owletto/dist/assets/{app._appId-fJ_RRn1Z.js → app._appId-CqYz3AOO.js} +1 -1
  43. package/dist/owletto/dist/assets/{automation-detail-content-CMprQht5.js → automation-detail-content-CKSywvzE.js} +1 -1
  44. package/dist/owletto/dist/assets/automations-BqCKU4CT.js +1 -0
  45. package/dist/owletto/dist/assets/{calendar-BbD1N97u.js → calendar-CHXehtu0.js} +1 -1
  46. package/dist/owletto/dist/assets/{callback-PELM84Lh.js → callback-DZ3YyXeV.js} +1 -1
  47. package/dist/owletto/dist/assets/{card-DpLjEqIc.js → card-4Ull9W6d.js} +1 -1
  48. package/dist/owletto/dist/assets/{claim-BLLvLOBM.js → claim-BGLCPLXq.js} +1 -1
  49. package/dist/owletto/dist/assets/{clients-Bd8WpHSV.js → clients-C7ubnFsS.js} +1 -1
  50. package/dist/owletto/dist/assets/{code-editor-DGJQDoHD.js → code-editor-BHiWR94J.js} +1 -1
  51. package/dist/owletto/dist/assets/connect-BNatqg6j.js +1 -0
  52. package/dist/owletto/dist/assets/connect._clientId-BGG2IqiQ.js +1 -0
  53. package/dist/owletto/dist/assets/{connected._clientId-BYGmFRCF.js → connected._clientId-7RU89sVW.js} +1 -1
  54. package/dist/owletto/dist/assets/{connection-B0O8OZuK.js → connection-CTaUGXl6.js} +1 -1
  55. package/dist/owletto/dist/assets/{connection-feed-detail-DZjtoEfm.js → connection-feed-detail-B1xieiEh.js} +1 -1
  56. package/dist/owletto/dist/assets/{connector-provenance-D_g9gGXU.js → connector-provenance-DRdUEmQ1.js} +1 -1
  57. package/dist/owletto/dist/assets/{connectors-BiMMm_QQ.js → connectors-NBwCLuZg.js} +1 -1
  58. package/dist/owletto/dist/assets/{consent-CIzW-960.js → consent-fmhPPlpi.js} +1 -1
  59. package/dist/owletto/dist/assets/{core.esm-Ds4Nuq9d.js → core.esm-C-eNiUAl.js} +1 -1
  60. package/dist/owletto/dist/assets/{create-BvCaqhwK.js → create-8bBbQJGY.js} +1 -1
  61. package/dist/owletto/dist/assets/create-Cl6cfNAp.js +1 -0
  62. package/dist/owletto/dist/assets/create-DrVso8O7.js +1 -0
  63. package/dist/owletto/dist/assets/create-automation-form-De8J-JD5.js +2 -0
  64. package/dist/owletto/dist/assets/{create._connectorKey--qDi1h6S.js → create._connectorKey-CHAotlsF.js} +1 -1
  65. package/dist/owletto/dist/assets/{cronstrue-h8_zIyZD.js → cronstrue-C5yTgk5z.js} +1 -1
  66. package/dist/owletto/dist/assets/deployments-C7M3fV5K.js +1 -0
  67. package/dist/owletto/dist/assets/{deployments-ICDss7yS.js → deployments-D1gbQwsy.js} +1 -1
  68. package/dist/owletto/dist/assets/{deployments-body-DulCUAMt.js → deployments-body-DycIGlnL.js} +1 -1
  69. package/dist/owletto/dist/assets/{device-kTL2l_cz.js → device-DyPnQkhO.js} +1 -1
  70. package/dist/owletto/dist/assets/{device-pin-tombstone-BmD4pv_e.js → device-pin-tombstone-CwJitllC.js} +1 -1
  71. package/dist/owletto/dist/assets/{device-rows-BqudjhFu.js → device-rows-BBhW1C7Y.js} +1 -1
  72. package/dist/owletto/dist/assets/{device._deviceId-CsLJJ6jv.js → device._deviceId-XswfXHOc.js} +1 -1
  73. package/dist/owletto/dist/assets/{entity-options-ErxYvMDH.js → entity-options-utGBmFX0.js} +1 -1
  74. package/dist/owletto/dist/assets/{entity-page-CYRAwUGO.js → entity-page-BxwuqqWk.js} +1 -1
  75. package/dist/owletto/dist/assets/{entity-type-page-BlAizGlz.js → entity-type-page-BrWqk6so.js} +1 -1
  76. package/dist/owletto/dist/assets/{event-page-DTXPxc-E.js → event-page-LIm4EDmJ.js} +1 -1
  77. package/dist/owletto/dist/assets/{events-feed-L3c-LLiJ.js → events-feed-C4L8mQV7.js} +1 -1
  78. package/dist/owletto/dist/assets/{full-page-spinner-BxcYpJXx.js → full-page-spinner-DsU-Cb3L.js} +1 -1
  79. package/dist/owletto/dist/assets/guardrails-CGFWCfbQ.js +1 -0
  80. package/dist/owletto/dist/assets/identity-uPYpPogR.js +1 -0
  81. package/dist/owletto/dist/assets/{index-13rywWam.js → index-1YrrvVJ4.js} +1 -1
  82. package/dist/owletto/dist/assets/index-BKMafTe4.js +1 -0
  83. package/dist/owletto/dist/assets/index-BsL1-C2-.js +1 -0
  84. package/dist/owletto/dist/assets/index-C58oW727.js +1 -0
  85. package/dist/owletto/dist/assets/{index--lEHrFE4.js → index-CQ4s6nzy.js} +1 -1
  86. package/dist/owletto/dist/assets/{index-DAv5S2aK.js → index-CpWKAAGX.js} +1 -1
  87. package/dist/owletto/dist/assets/{index-QcHQZI87.js → index-D2dcENg2.js} +1 -1
  88. package/dist/owletto/dist/assets/{index-CheCJomo.js → index-DCK0KhMM.js} +1 -1
  89. package/dist/owletto/dist/assets/{index-BRvT0VV9.js → index-DXqiRON3.js} +1 -1
  90. package/dist/owletto/dist/assets/index-DgEc5IvT.js +1 -0
  91. package/dist/owletto/dist/assets/{index-DdGjY1Hb.js → index-DtRfQcRH.js} +1530 -1530
  92. package/dist/owletto/dist/assets/index-DvhM9tuI.js +1 -0
  93. package/dist/owletto/dist/assets/{index-CFkj9iR_.js → index-DwtfHCHB.js} +1 -1
  94. package/dist/owletto/dist/assets/index-DyYFZjh-.js +1 -0
  95. package/dist/owletto/dist/assets/{index-B_-MLsof.js → index-nOYvNROJ.js} +1 -1
  96. package/dist/owletto/dist/assets/index-oDoJENMF.js +1 -0
  97. package/dist/owletto/dist/assets/index-rPdUEOa3.js +1 -0
  98. package/dist/owletto/dist/assets/{json-diff-BV2STDGj.js → json-diff-DYeX-xLk.js} +1 -1
  99. package/dist/owletto/dist/assets/{list-skeleton-CT5n4ND_.js → list-skeleton-s4GPSJ8J.js} +1 -1
  100. package/dist/owletto/dist/assets/{login-DKsgABYt.js → login-Di5VF2F_.js} +1 -1
  101. package/dist/owletto/dist/assets/{logout-D_CP-emw.js → logout-BuaQGSnw.js} +1 -1
  102. package/dist/owletto/dist/assets/{member-scope-gate-BTgmlfFJ.js → member-scope-gate-CJqJZk7T.js} +1 -1
  103. package/dist/owletto/dist/assets/{memory-browse-page-FHaJC3ML.js → memory-browse-page-Bibfs2sK.js} +1 -1
  104. package/dist/owletto/dist/assets/{missing-view-Bve6pJP-.js → missing-view-CD4DOaG8.js} +1 -1
  105. package/dist/owletto/dist/assets/{model-selector-BLCEahny.js → model-selector-XC5CI2Et.js} +1 -1
  106. package/dist/owletto/dist/assets/models--8mTFOLz.js +1 -0
  107. package/dist/owletto/dist/assets/{new-CirOK0Sw.js → new-BzkA1sq2.js} +1 -1
  108. package/dist/owletto/dist/assets/{new-DzapH2sV.js → new-C3f0BShb.js} +1 -1
  109. package/dist/owletto/dist/assets/{new-BAIGSdfp.js → new-DA5LF6iB.js} +1 -1
  110. package/dist/owletto/dist/assets/{oauth-workspace-access-BF7jaswv.js → oauth-workspace-access-D6epOq0R.js} +1 -1
  111. package/dist/owletto/dist/assets/{organization-D9RPsWG-.js → organization-DOtBRqDQ.js} +1 -1
  112. package/dist/owletto/dist/assets/{permissions-BlRONw-u.js → permissions-D8uJHINS.js} +1 -1
  113. package/dist/owletto/dist/assets/{proposal-review-shell-uskeFIUr.js → proposal-review-shell-C3K-JXjb.js} +1 -1
  114. package/dist/owletto/dist/assets/{recent-CmJ4Is6V.js → recent-CFcWceBl.js} +1 -1
  115. package/dist/owletto/dist/assets/{renderer-Dyf4t8kR.js → renderer-1nRJFMGx.js} +1 -1
  116. package/dist/owletto/dist/assets/{reset-password-BVIeE1Zm.js → reset-password-9RTWhBEb.js} +1 -1
  117. package/dist/owletto/dist/assets/{runs-CzBeUzlQ.js → runs-_yVh6PPB.js} +1 -1
  118. package/dist/owletto/dist/assets/{runs-panel-D7l1uLGm.js → runs-panel-B2852xus.js} +1 -1
  119. package/dist/owletto/dist/assets/{runs-table-dATyiBg2.js → runs-table--dnFQatY.js} +1 -1
  120. package/dist/owletto/dist/assets/{schema-value-normalization-DgMkyVVE.js → schema-value-normalization-BspxVEGy.js} +1 -1
  121. package/dist/owletto/dist/assets/{settings-Co1wj_m6.js → settings-9lDASETT.js} +1 -1
  122. package/dist/owletto/dist/assets/settings-DQo_ZS2P.js +1 -0
  123. package/dist/owletto/dist/assets/skills-a5xQ4RE9.js +1 -0
  124. package/dist/owletto/dist/assets/{switch-DDkPrV3p.js → switch-CxDXvPGE.js} +1 -1
  125. package/dist/owletto/dist/assets/{use-applied-views-DELwQQh7.js → use-applied-views-DvMT3wap.js} +1 -1
  126. package/dist/owletto/dist/assets/{use-mention-search-CGA3AaKm.js → use-mention-search-CeTEE3oE.js} +1 -1
  127. package/dist/owletto/dist/assets/{view-frame-DDr-Xtet.js → view-frame-HoBawpT2.js} +1 -1
  128. package/dist/owletto/dist/index.html +1 -1
  129. package/dist/providers.json +0 -1
  130. package/dist/server-main.bundle.mjs +2365 -3969
  131. package/npm-shrinkwrap.json +41 -41
  132. package/package.json +1 -1
  133. package/vendor/connector-sdk/dist/connector-types.d.ts +0 -2
  134. package/vendor/connector-sdk/package.json +1 -1
  135. package/vendor/core/dist/contracts/tools/manage-auth-profiles.d.ts +14 -0
  136. package/vendor/core/dist/contracts/tools/manage-auth-profiles.js +12 -1
  137. package/vendor/core/dist/contracts/tools/manage-automations.d.ts +0 -10
  138. package/vendor/core/dist/contracts/tools/manage-automations.js +0 -33
  139. package/vendor/core/dist/contracts/tools/manage-classifiers.d.ts +4 -34
  140. package/vendor/core/dist/contracts/tools/manage-classifiers.js +13 -44
  141. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +0 -9
  142. package/vendor/core/dist/contracts/tools/manage-entity.js +0 -6
  143. package/vendor/core/dist/contracts/tools/view-attach.d.ts +20 -0
  144. package/vendor/core/dist/contracts/tools/view-attach.js +45 -0
  145. package/vendor/core/dist/contracts/worker/protocol.d.ts +17 -0
  146. package/vendor/core/dist/contracts/worker/protocol.js +12 -1
  147. package/vendor/core/dist/index.d.ts +1 -1
  148. package/vendor/core/dist/provider-config-types.d.ts +0 -9
  149. package/vendor/core/dist/sdk-compat.d.ts +1 -1
  150. package/vendor/core/package.json +6 -1
  151. package/vendor/views/dist/api.d.ts +9 -4
  152. package/vendor/views/dist/api.js +6 -2
  153. package/vendor/views/package.json +1 -1
  154. package/dist/owletto/dist/assets/_-CwFknmeA.js +0 -1
  155. package/dist/owletto/dist/assets/_agentId-Cr57JKYx.js +0 -1
  156. package/dist/owletto/dist/assets/_name-BP7OlVxL.js +0 -1
  157. package/dist/owletto/dist/assets/_shape-BqV8tSfw.js +0 -1
  158. package/dist/owletto/dist/assets/_skillKey-2xTjhL_C.js +0 -1
  159. package/dist/owletto/dist/assets/_viewKey-8ePnWEg-.js +0 -1
  160. package/dist/owletto/dist/assets/_viewKey-D8rjUFLV.js +0 -1
  161. package/dist/owletto/dist/assets/_viewKey-DhVOkzYd.js +0 -1
  162. package/dist/owletto/dist/assets/agents-0ncYwbz6.js +0 -1
  163. package/dist/owletto/dist/assets/automations-0ncYwbz6.js +0 -1
  164. package/dist/owletto/dist/assets/connect-Cx49f4J0.js +0 -1
  165. package/dist/owletto/dist/assets/connect._clientId-BDFBqKSA.js +0 -1
  166. package/dist/owletto/dist/assets/create--fsxroj2.js +0 -1
  167. package/dist/owletto/dist/assets/create-BqL-ahEf.js +0 -1
  168. package/dist/owletto/dist/assets/create-automation-form-DN2w080o.js +0 -2
  169. package/dist/owletto/dist/assets/deployments-BROg1Te8.js +0 -1
  170. package/dist/owletto/dist/assets/guardrails-Dh4adTXY.js +0 -1
  171. package/dist/owletto/dist/assets/identity-B8lKn0je.js +0 -1
  172. package/dist/owletto/dist/assets/index-BUp24ZJr.js +0 -1
  173. package/dist/owletto/dist/assets/index-Bq-q4Y7E.js +0 -1
  174. package/dist/owletto/dist/assets/index-CgBgOElA.js +0 -1
  175. package/dist/owletto/dist/assets/index-CpiW66xK.js +0 -1
  176. package/dist/owletto/dist/assets/index-DBi2Xr3i.js +0 -1
  177. package/dist/owletto/dist/assets/index-DHOha5OJ.js +0 -1
  178. package/dist/owletto/dist/assets/index-Dkyl7l6E.js +0 -1
  179. package/dist/owletto/dist/assets/index-kq4537-S.js +0 -1
  180. package/dist/owletto/dist/assets/models-C4N7LQAW.js +0 -1
  181. package/dist/owletto/dist/assets/settings-BK1GHmzb.js +0 -1
  182. package/dist/owletto/dist/assets/skills-DF53JcYt.js +0 -1
@@ -12,7 +12,6 @@ import {
12
12
  createHttpClient,
13
13
  type EventEnvelope,
14
14
  type HttpClient,
15
- paginateByCursor,
16
15
  type FeedReadContext,
17
16
  type FeedReadResult,
18
17
  type RuntimeConnectorDefinition,
@@ -82,7 +81,7 @@ interface CalendarCheckpoint {
82
81
  */
83
82
  scope?: string;
84
83
  /**
85
- * Unfinished bootstrap: the `events.list` query as first issued (so the
84
+ * Unfinished traversal: the `events.list` query as first issued (so the
86
85
  * `timeMin`/`timeMax` window stays fixed across runs, which the page token
87
86
  * requires) plus the token for the page still to fetch. Absent once the
88
87
  * traversal has reached the last page.
@@ -475,22 +474,9 @@ export default class GoogleCalendarConnector extends ConnectorRuntime<Record<str
475
474
  return { status: 'complete' };
476
475
  };
477
476
 
478
- if (resumable && checkpoint.sync_token) {
479
- const result = await this.syncWithToken(
480
- http,
481
- calendarId,
482
- checkpoint.sync_token,
483
- durableChanges
484
- );
485
- if (result) return finish(result.events, result.nextSyncToken);
486
- // The stored token was rejected (see isSyncTokenRejection). Fall through
487
- // to one complete bootstrap under the current grant — no retry loop. It
488
- // either succeeds and overwrites the checkpoint with a token minted under
489
- // that grant, or throws and the error reaches the run record.
490
- }
491
-
492
- // Bootstrap: walk the configured window, resuming a parked page if one is
493
- // in scope, until the last page hands over a durable cursor.
477
+ const syncToken = resumable ? checkpoint.sync_token : undefined;
478
+ // Bootstrap and incremental traversal share the same page commit boundary.
479
+ // An incremental page keeps its original sync token until the final page.
494
480
  const timeMin = new Date();
495
481
  timeMin.setDate(timeMin.getDate() - lookbackDays);
496
482
  const timeMax = new Date();
@@ -502,29 +488,39 @@ export default class GoogleCalendarConnector extends ConnectorRuntime<Record<str
502
488
  // run: a page token is only valid against the window that minted it.
503
489
  const params = pending
504
490
  ? new URLSearchParams(pending.params)
505
- : durableChanges
491
+ : syncToken
506
492
  ? new URLSearchParams({
507
493
  maxResults: '250',
508
- singleEvents: 'true',
509
- showDeleted: 'true',
510
- timeMin: timeMin.toISOString(),
494
+ syncToken,
495
+ ...(durableChanges ? { singleEvents: 'true', showDeleted: 'true' } : {}),
511
496
  })
512
- : new URLSearchParams({
513
- maxResults: '250',
514
- orderBy: 'startTime',
515
- singleEvents: 'true',
516
- timeMin: timeMin.toISOString(),
517
- timeMax: timeMax.toISOString(),
518
- });
497
+ : durableChanges
498
+ ? new URLSearchParams({
499
+ maxResults: '250',
500
+ singleEvents: 'true',
501
+ showDeleted: 'true',
502
+ timeMin: timeMin.toISOString(),
503
+ })
504
+ : new URLSearchParams({
505
+ maxResults: '250',
506
+ orderBy: 'startTime',
507
+ singleEvents: 'true',
508
+ timeMin: timeMin.toISOString(),
509
+ timeMax: timeMax.toISOString(),
510
+ });
519
511
  const baseParams = params.toString();
520
512
 
521
513
  /**
522
- * Mid-traversal: the next page token, with no sync token and no
523
- * `last_sync_at`, so nothing downstream can read it as a completed window.
514
+ * Mid-traversal: preserve the old sync token and completed watermark,
515
+ * alongside the next page and the exact query that minted it.
524
516
  * A run that stops here resumes from `token`.
525
517
  */
526
518
  const parked = (token: string) =>
527
- ({ scope, pending: { params: baseParams, page_token: token } }) as Record<string, unknown>;
519
+ ({
520
+ scope,
521
+ ...(syncToken ? { sync_token: syncToken, last_sync_at: checkpoint.last_sync_at } : {}),
522
+ pending: { params: baseParams, page_token: token },
523
+ }) as Record<string, unknown>;
528
524
 
529
525
  let collected = 0;
530
526
  let pageToken = pending?.page_token;
@@ -538,11 +534,13 @@ export default class GoogleCalendarConnector extends ConnectorRuntime<Record<str
538
534
  const url = `${this.BASE_URL}/calendars/${encodeURIComponent(calendarId)}/events?${params.toString()}`;
539
535
  const response = await http.raw(url);
540
536
  if (!response.ok) {
541
- // No checkpoint is returned, so the parked token survives and this
542
- // exact page is retried on the next run.
543
- throw new Error(
544
- `Calendar events.list error (${response.status}): ${await response.text()}`
545
- );
537
+ const body = await response.text();
538
+ if (syncToken && isSyncTokenRejection(response.status, body)) {
539
+ // Discard both tokens together. Replayed items keep their origin IDs;
540
+ // a failed bootstrap remains retryable without treating it as complete.
541
+ return this.syncFeed({ ...ctx, checkpoint: { scope } });
542
+ }
543
+ throw new Error(`Calendar events.list error (${response.status}): ${body}`);
546
544
  }
547
545
 
548
546
  const data = (await response.json()) as CalendarEventListResponse;
@@ -580,7 +578,7 @@ export default class GoogleCalendarConnector extends ConnectorRuntime<Record<str
580
578
  // bound on a window of nothing but filtered-out items, where
581
579
  // `collected` never reaches the cap. The traversal continues next run.
582
580
  if (
583
- collected >= maxResults ||
581
+ (!syncToken && collected >= maxResults) ||
584
582
  items.length === 0 ||
585
583
  page + 1 >= MAX_SYNC_PAGES
586
584
  ) {
@@ -625,100 +623,6 @@ export default class GoogleCalendarConnector extends ConnectorRuntime<Record<str
625
623
  }
626
624
  }
627
625
 
628
- // -------------------------------------------------------------------------
629
- // Incremental sync
630
- // -------------------------------------------------------------------------
631
-
632
- private async syncWithToken(
633
- http: HttpClient,
634
- calendarId: string,
635
- syncToken: string,
636
- durableChanges: boolean
637
- ): Promise<{ events: EventEnvelope[]; nextSyncToken?: string } | null> {
638
- const events: EventEnvelope[] = [];
639
- let nextSyncToken: string | undefined;
640
- let unreadPage: string | undefined;
641
- const seenTokens = new Set<string>();
642
- // The stored syncToken was rejected (410 expired, or 403 because it was
643
- // minted under a superseded grant) — abort and let the caller drop it and
644
- // fall through to a full sync. Signalled out of the generator via this flag.
645
- let syncTokenRejected = false;
646
-
647
- const pages = paginateByCursor<CalendarEvent, string>(
648
- async (pageToken) => {
649
- if (pageToken) {
650
- if (seenTokens.has(pageToken)) {
651
- throw new Error('Google Calendar returned a repeated page token.');
652
- }
653
- seenTokens.add(pageToken);
654
- }
655
- // Consume every incremental change before advancing the durable token,
656
- // so the page size is fixed rather than derived from `max_results`,
657
- // which limits only the historical bootstrap.
658
- const params = durableChanges
659
- ? new URLSearchParams({
660
- maxResults: '250',
661
- syncToken,
662
- singleEvents: 'true',
663
- showDeleted: 'true',
664
- })
665
- : new URLSearchParams({
666
- maxResults: '250',
667
- syncToken,
668
- });
669
- if (pageToken) {
670
- params.set('pageToken', pageToken);
671
- }
672
-
673
- const url = `${this.BASE_URL}/calendars/${encodeURIComponent(calendarId)}/events?${params.toString()}`;
674
- const response = await http.raw(url);
675
-
676
- if (!response.ok) {
677
- const body = await response.text();
678
- if (isSyncTokenRejection(response.status, body)) {
679
- syncTokenRejected = true;
680
- return { items: [], nextCursor: undefined };
681
- }
682
- throw new Error(`Calendar events.list error (${response.status}): ${body}`);
683
- }
684
-
685
- const data = (await response.json()) as CalendarEventListResponse;
686
- // Capture the trailing nextSyncToken; generator pages until exhausted.
687
- nextSyncToken = data.nextSyncToken;
688
- unreadPage = data.nextPageToken;
689
- return { items: data.items ?? [], nextCursor: data.nextPageToken };
690
- },
691
- { maxPages: MAX_SYNC_PAGES }
692
- );
693
-
694
- for await (const items of pages) {
695
- for (const calEvent of items) {
696
- const envelope = durableChanges
697
- ? this.calendarEventToChangeEnvelope(calEvent)
698
- : this.calendarEventToEnvelope(calEvent);
699
- if (envelope) events.push(envelope);
700
- }
701
- }
702
-
703
- if (syncTokenRejected) return null;
704
- // The generator stopped at MAX_SYNC_PAGES with a page still unread. Unlike
705
- // the bootstrap there is nothing to park — an incremental cursor advances
706
- // only on the last page — so fail the run and keep the stored token, rather
707
- // than returning a silently partial batch.
708
- if (unreadPage) {
709
- throw new Error(
710
- 'Google Calendar incremental traversal exceeded its page bound before completing.'
711
- );
712
- }
713
- if (durableChanges && !nextSyncToken) {
714
- throw new Error(
715
- 'Google Calendar incremental changes traversal completed without a durable sync token.'
716
- );
717
- }
718
-
719
- return { events, nextSyncToken };
720
- }
721
-
722
626
  // -------------------------------------------------------------------------
723
627
  // Actions
724
628
  // -------------------------------------------------------------------------
@@ -554,13 +554,17 @@ export default class JiraConnector extends ConnectorRuntime<JiraCheckpoint, Jira
554
554
  // window from its first page instead of wedging the feed.
555
555
  let staleCursorRecoverable = pageToken !== undefined;
556
556
  let found = 0;
557
+ const seenTokens = new Set<string>();
557
558
  for (let page = 0; page < this.MAX_PAGES; page++) {
558
559
  const params = new URLSearchParams({
559
560
  jql,
560
561
  maxResults: String(this.PAGE_SIZE),
561
562
  fields: ISSUE_FIELDS,
562
563
  });
563
- if (pageToken) params.set('nextPageToken', pageToken);
564
+ if (pageToken) {
565
+ seenTokens.add(pageToken);
566
+ params.set('nextPageToken', pageToken);
567
+ }
564
568
  let data: JiraSearchResponse;
565
569
  try {
566
570
  data = await http.json<JiraSearchResponse>(
@@ -571,6 +575,7 @@ export default class JiraConnector extends ConnectorRuntime<JiraCheckpoint, Jira
571
575
  if (staleCursorRecoverable && error instanceof HttpStatusError && error.status === 400) {
572
576
  staleCursorRecoverable = false;
573
577
  pageToken = undefined;
578
+ seenTokens.clear();
574
579
  page--;
575
580
  continue;
576
581
  }
@@ -586,17 +591,21 @@ export default class JiraConnector extends ConnectorRuntime<JiraCheckpoint, Jira
586
591
  }
587
592
  found += events.length;
588
593
 
589
- // An empty page ends the walk even when a token is returned — guards
590
- // against a degenerate self-referential cursor.
591
- if (!data.nextPageToken || issues.length === 0) {
594
+ if (!data.nextPageToken) {
592
595
  await ctx.commit(events, { last_sync_at: window.end });
593
596
  return { status: 'complete', metadata: { items_found: found } };
594
597
  }
598
+ if (seenTokens.has(data.nextPageToken)) {
599
+ throw new Error('Jira returned a repeated page token.');
600
+ }
595
601
  pageToken = data.nextPageToken;
596
602
  await ctx.commit(events, {
597
603
  ...(checkpoint.last_sync_at ? { last_sync_at: checkpoint.last_sync_at } : {}),
598
604
  pending: { window, page_token: pageToken },
599
605
  });
606
+ if (issues.length === 0) {
607
+ return { status: 'more', metadata: { items_found: found } };
608
+ }
600
609
  }
601
610
  // The page cap stopped the walk; its committed token resumes it next run.
602
611
  return { status: 'more', metadata: { items_found: found } };
@@ -294,7 +294,9 @@ export default class ProductHuntConnector extends ConnectorRuntime {
294
294
  const edges = result.data.posts.edges;
295
295
  const pageInfo = result.data.posts.pageInfo;
296
296
  const nextCursor = edges.length > 0 && pageInfo.hasNextPage ? pageInfo.endCursor : null;
297
- if (nextCursor) cursor = nextCursor;
297
+ // Retain only pending traversal state. Once exhausted, the next sync
298
+ // must start at the newest posts instead of replaying the final page.
299
+ cursor = nextCursor;
298
300
  return { items: edges, nextCursor };
299
301
  },
300
302
  { maxPages, initialCursor: cursor, delayMs: this.RATE_LIMIT_MS }
@@ -68,6 +68,7 @@ interface RedditListingResponse {
68
68
  interface RedditCheckpoint {
69
69
  last_timestamp?: string;
70
70
  pagination_token?: string;
71
+ pagination_cutoff?: string;
71
72
  }
72
73
 
73
74
  // ---------------------------------------------------------------------------
@@ -273,8 +274,15 @@ export default class RedditConnector extends ConnectorRuntime {
273
274
  username = await this.resolveUsername(ctx, userAccessToken);
274
275
  }
275
276
 
276
- const cutoffDate = new Date();
277
+ const previous = (ctx.checkpoint ?? {}) as RedditCheckpoint;
278
+ const resumeAfter = previous.pagination_token ?? null;
279
+ let cutoffDate = new Date();
277
280
  cutoffDate.setDate(cutoffDate.getDate() - lookbackDays);
281
+ // Keep items eligible for the whole bounded sweep, even across sync runs.
282
+ if (resumeAfter && previous.pagination_cutoff) {
283
+ const savedCutoff = new Date(previous.pagination_cutoff);
284
+ if (Number.isFinite(savedCutoff.getTime())) cutoffDate = savedCutoff;
285
+ }
278
286
 
279
287
  const http = createHttpClient({
280
288
  token: accessToken,
@@ -283,6 +291,8 @@ export default class RedditConnector extends ConnectorRuntime {
283
291
  });
284
292
 
285
293
  const events: EventEnvelope[] = [];
294
+ const seenItems = new Set<string>();
295
+ const seenCursors = new Set<string>();
286
296
  let after: string | null = null;
287
297
  let reachedCutoff = false;
288
298
 
@@ -303,6 +313,12 @@ export default class RedditConnector extends ConnectorRuntime {
303
313
  listing = await http.get<RedditListingResponse>(url);
304
314
  } catch (error) {
305
315
  if (error instanceof HttpStatusError) {
316
+ // A saved fullname can disappear from a changing listing. The head
317
+ // was fetched successfully; clear the rejected anchor for next run.
318
+ if (cursor === resumeAfter && cursor && [400, 404].includes(error.status)) {
319
+ after = null;
320
+ return { items: [], nextCursor: null };
321
+ }
306
322
  if (error.status === 404) {
307
323
  throw new Error('Subreddit or resource not found. Please check the subreddit name.');
308
324
  }
@@ -314,8 +330,19 @@ export default class RedditConnector extends ConnectorRuntime {
314
330
  }
315
331
 
316
332
  const children = listing.data.children;
317
- if (children.length > 0) after = listing.data.after;
318
- return { items: children, nextCursor: children.length > 0 ? listing.data.after : null };
333
+ if (cursor) seenCursors.add(cursor);
334
+ after = children.length > 0 ? listing.data.after : null;
335
+ // Reject loops (including a provider ignoring `after` and replaying the
336
+ // head). End the sweep so the next run can start with a fresh listing.
337
+ if (after && seenCursors.has(after)) after = null;
338
+ if (cursor === null && after) {
339
+ seenCursors.add(after);
340
+ // Spend one page on fresh arrivals, then resume the unfinished sweep.
341
+ // Arrivals beyond this page are caught by the next full sweep: never
342
+ // use last_timestamp as a high-water mark on these mutable listings.
343
+ after = resumeAfter ?? after;
344
+ }
345
+ return { items: children, nextCursor: after };
319
346
  },
320
347
  { maxPages: this.MAX_PAGES, delayMs: this.RATE_LIMIT_MS }
321
348
  );
@@ -334,6 +361,8 @@ export default class RedditConnector extends ConnectorRuntime {
334
361
 
335
362
  // Filter deleted/removed items
336
363
  if (itemData.author === '[deleted]') continue;
364
+ if (seenItems.has(itemData.name)) continue;
365
+ seenItems.add(itemData.name);
337
366
 
338
367
  // Use actual Reddit API kind (t3=post, t1=comment) instead of config
339
368
  const isPost = child.kind === 't3';
@@ -359,7 +388,8 @@ export default class RedditConnector extends ConnectorRuntime {
359
388
 
360
389
  const checkpoint: RedditCheckpoint = {
361
390
  last_timestamp: new Date().toISOString(),
362
- pagination_token: after ?? undefined,
391
+ pagination_token: !reachedCutoff ? (after ?? undefined) : undefined,
392
+ pagination_cutoff: !reachedCutoff && after ? cutoffDate.toISOString() : undefined,
363
393
  };
364
394
 
365
395
  await ctx.commit(events, checkpoint as Record<string, unknown>);
@@ -0,0 +1,51 @@
1
+ -- migrate:up
2
+ -- lobu:no-quiesce (the pre-deploy engine treats a value with no label vector as unmatchable; nothing else reads these keys)
3
+
4
+ -- Classification consolidation: a classifier is a label schema and labels are
5
+ -- written only by `manage_classifiers classify`. The embedding engine that
6
+ -- matched events against per-value label vectors is gone, so the vectors
7
+ -- stored inside `classify_facet.attribute_values[value]` (`embedding`, plus the
8
+ -- `embedding_model` stamp from 20260731150000) have no reader. Strip both keys
9
+ -- from every object-shaped value entry and leave every other key alone.
10
+ --
11
+ -- Columns the retired engine and Automation extraction used
12
+ -- (min_similarity, fallback_value, extraction_config, entities.enabled_classifiers,
13
+ -- automation_versions.classifiers, event_classifications threshold/embedding
14
+ -- columns) are not dropped here: code stops reading and writing them in this
15
+ -- release and a follow-up contract migration drops them. Historical
16
+ -- `event_classifications` rows are untouched and stay readable.
17
+ --
18
+ -- OPERATIONAL COST: O(rows) over classify_facet, a config-scale table (29 rows
19
+ -- on prod at 20260731140000; one row per classifier, not per event). Regular row
20
+ -- locks on the rows that still carry a vector; well under a second. Not tested
21
+ -- on a prod-sized copy — there is no events-scaled data involved.
22
+ --
23
+ -- Rows whose `attribute_values` root is not an object (the legacy array shape
24
+ -- guarded in manage_classifiers.ts) are skipped rather than rewritten.
25
+
26
+ UPDATE public.classify_facet cf
27
+ SET attribute_values = (
28
+ SELECT jsonb_object_agg(
29
+ entry.key,
30
+ CASE
31
+ WHEN jsonb_typeof(entry.value) = 'object'
32
+ THEN entry.value - 'embedding' - 'embedding_model'
33
+ ELSE entry.value
34
+ END
35
+ )
36
+ FROM jsonb_each(cf.attribute_values) AS entry
37
+ )
38
+ WHERE jsonb_typeof(cf.attribute_values) = 'object'
39
+ AND EXISTS (
40
+ SELECT 1
41
+ FROM jsonb_each(cf.attribute_values) AS entry
42
+ WHERE jsonb_typeof(entry.value) = 'object'
43
+ AND (entry.value ? 'embedding' OR entry.value ? 'embedding_model')
44
+ );
45
+
46
+ -- migrate:down
47
+
48
+ -- Irreversible by design: the stripped label vectors were derived data with no
49
+ -- remaining reader. Restoring them would mean re-embedding every value, which
50
+ -- the code this migration ships with can no longer do. PITR is the alternative.
51
+ SELECT 1;
@@ -81,11 +81,11 @@
81
81
 
82
82
  "@asteasolutions/zod-to-openapi": ["@asteasolutions/zod-to-openapi@9.1.0", "", { "dependencies": { "openapi3-ts": "^4.6.0" }, "peerDependencies": { "zod": "^4.0.0" } }, "sha512-pLMeRgRYS7/vZIgAAkOe2P6+XGTifR1MT9pqDoxZ11EmcJJ+DPmdPqLN8ZZF4U8R9KHCCQCS9c2wtuE8wSrfkw=="],
83
83
 
84
- "@aws-sdk/client-bedrock": ["@aws-sdk/client-bedrock@3.1142.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.1", "@aws-sdk/credential-provider-node": "^3.972.84", "@aws-sdk/token-providers": "3.1142.0", "@aws-sdk/types": "^3.974.6", "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.12.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-6pUhepBJO7N9xV9tMbKl1eC/15et+Y3Nq6o9sNkF75VMpwEeTPIVrtBOfmq/JbKhpIKqhxc8l75ByEtJVaufYw=="],
84
+ "@aws-sdk/client-bedrock": ["@aws-sdk/client-bedrock@3.1143.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.1", "@aws-sdk/credential-provider-node": "^3.972.84", "@aws-sdk/token-providers": "3.1143.0", "@aws-sdk/types": "^3.974.6", "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.12.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-6i0mMaApb9ET4Zrtscd1gc87Ts3csbqbgNNgqe2IsLiqTVLZFtAku738qmFie5mabA1VDNOlA8QWSsF4bht4aw=="],
85
85
 
86
- "@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.1142.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.1", "@aws-sdk/credential-provider-node": "^3.972.84", "@aws-sdk/eventstream-handler-node": "^3.972.35", "@aws-sdk/middleware-eventstream": "^3.972.30", "@aws-sdk/middleware-websocket": "^3.972.54", "@aws-sdk/token-providers": "3.1142.0", "@aws-sdk/types": "^3.974.6", "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.12.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-b8ITozQBv7jeOAWZcxTfhzK/nXrVvvqOvfL7PePZtZm9AnOB5rEd/pIZZl0eBcRd56Nnd4zrtptvUhpN0336fA=="],
86
+ "@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.1143.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.1", "@aws-sdk/credential-provider-node": "^3.972.84", "@aws-sdk/eventstream-handler-node": "^3.972.35", "@aws-sdk/middleware-eventstream": "^3.972.30", "@aws-sdk/middleware-websocket": "^3.972.54", "@aws-sdk/token-providers": "3.1143.0", "@aws-sdk/types": "^3.974.6", "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.12.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-NqcVvmeesUZ53mv1wsRi7eohqm0KKdQxfmdaCaWTjWqw4X5gYVAPfy4REVXNs7J0w0eM4I5fctSuS5MhTI14kQ=="],
87
87
 
88
- "@aws-sdk/client-secrets-manager": ["@aws-sdk/client-secrets-manager@3.1142.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.1", "@aws-sdk/credential-provider-node": "^3.972.84", "@aws-sdk/types": "^3.974.6", "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.12.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-oYcVufrwTo594OphwaN+FGJRd0dy9N+nialpb6Pt1ykvp03+vDqbA5VYkpDDGNG/0+FBYgZp/1O064R3Vpm+UA=="],
88
+ "@aws-sdk/client-secrets-manager": ["@aws-sdk/client-secrets-manager@3.1143.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.1", "@aws-sdk/credential-provider-node": "^3.972.84", "@aws-sdk/types": "^3.974.6", "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", "@smithy/node-http-handler": "^4.12.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-xA6gSweqgSeYg8A0RQ2E5taCmhVxbuuVAXaJCiHRpuVsM/rj2apDJV3gBndlpBiPLwqlXbfZQj1MYLisrhDKZQ=="],
89
89
 
90
90
  "@aws-sdk/core": ["@aws-sdk/core@3.978.1", "", { "dependencies": { "@aws-sdk/types": "^3.974.6", "@aws-sdk/xml-builder": "^3.972.41", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.35.0", "@smithy/signature-v4": "^5.7.3", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-LbY9aGsEiznDWmUc30Nwv3aIX/+dbwTx8KfS0yOC3NPYMO+O91e6jkT1azf34FwjOndq8/Q+RcVVZz5xnerwdg=="],
91
91
 
@@ -115,7 +115,7 @@
115
115
 
116
116
  "@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.47", "", { "dependencies": { "@aws-sdk/types": "^3.974.6", "@smithy/signature-v4": "^5.7.3", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-Zk08macMvQTHzQJCLJVkOlviVoqwYMrpXv4lmLN7b7sAbiMoOK7Go0NYdR5UeF+MW8LIbRmwrNy9u/5VvX1U5g=="],
117
117
 
118
- "@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1142.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.1", "@aws-sdk/nested-clients": "^3.997.46", "@aws-sdk/types": "^3.974.6", "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-jtJUURbLkqjeRQgP6al2cEe8M7nuywW9GqUx+nse+qMXwQvMdICCzXA2eGGdtNineNIq24GZXh22EsDkh/fQbA=="],
118
+ "@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1143.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.1", "@aws-sdk/nested-clients": "^3.997.46", "@aws-sdk/types": "^3.974.6", "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-QXGmo86jl7xDzfRWDrs51TXoJi2449miPhrU+G05Hlq2vNqyNVR63yi5ekplyz62rwWVruDBGTJEUJ+NtVc6yA=="],
119
119
 
120
120
  "@aws-sdk/types": ["@aws-sdk/types@3.974.6", "", { "dependencies": { "@smithy/types": "^4.19.0", "tslib": "^2.6.2" } }, "sha512-v/clNZzZnDxGyvpHMOGpJKVXFAExJzUNAAjaWGdcx8QAcXLGwTaOkw33p5SHAi0YAioK32xB3hWwOekRVfmfKg=="],
121
121
 
@@ -245,7 +245,7 @@
245
245
 
246
246
  "@hexagon/base64": ["@hexagon/base64@1.1.28", "", {}, "sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw=="],
247
247
 
248
- "@hono/node-server": ["@hono/node-server@2.1.1", "", { "peerDependencies": { "hono": "^4" } }, "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg=="],
248
+ "@hono/node-server": ["@hono/node-server@2.1.3", "", { "peerDependencies": { "hono": "^4" } }, "sha512-TA//nWMqPhbfdfneACk6t5a9eqbS9lABEPyKn0/xZTah3H3U2XaVg85rJFl0/Fyit0I552YDHgXGVSf3GwqbUw=="],
249
249
 
250
250
  "@hono/zod-openapi": ["@hono/zod-openapi@1.6.3", "", { "dependencies": { "@asteasolutions/zod-to-openapi": "^9.1.0", "@hono/zod-validator": "^0.9.1", "openapi3-ts": "^4.5.0" }, "peerDependencies": { "hono": ">=4.10.0", "zod": "^4.0.0" } }, "sha512-VYR82Y60plu8g3pN60OUXMVKpmxh3R04Qs++3DY9vtwZ9/sA/BRY0PcRIR+Z37/3itWtM7pYwT9bKiH9JhqV6Q=="],
251
251
 
@@ -333,7 +333,7 @@
333
333
 
334
334
  "@noble/hashes": ["@noble/hashes@2.4.0", "", {}, "sha512-X5XaVWZIBCT7HHZGm5I7ZQXDwLG+bGXuSrMQAW+7Zvl87h1kmc1ZB1VSRJcpUfoUrGQp4Fkoxm5kZ+Ms+aW+eA=="],
335
335
 
336
- "@nodable/entities": ["@nodable/entities@3.0.0", "", {}, "sha512-8L9xFeTYKhm49xfIypoe2W5wV1m/3Z58kT+7kR9A8OyFxcPduI4VmxaUMQyKYrRjUoLLSXv6EKKID5Tvj9cUVw=="],
336
+ "@nodable/entities": ["@nodable/entities@3.1.0", "", {}, "sha512-LsS/DjHr+uDM647Gru/cA8+J3a3HfhttwCKLyuoyN7yXTFCxKBtSgMQBvrW9yNPa2/zDRUNuGPaH5QUFoa4arQ=="],
337
337
 
338
338
  "@opentelemetry/api": ["@opentelemetry/api@1.9.1", "", {}, "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q=="],
339
339
 
@@ -597,7 +597,7 @@
597
597
 
598
598
  "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
599
599
 
600
- "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
600
+ "@types/ws": ["@types/ws@8.18.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w=="],
601
601
 
602
602
  "@types/yauzl": ["@types/yauzl@2.10.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q=="],
603
603
 
@@ -857,7 +857,7 @@
857
857
 
858
858
  "fast-xml-builder": ["fast-xml-builder@1.3.1", "", { "dependencies": { "path-expression-matcher": "^1.6.2", "xml-naming": "^0.3.0" } }, "sha512-pIM/1n3ntFXKYrUZwW7QCK0gAW7XY+wzj1YMIV3tLDvPj/V+zTGJK5e3/4WJfwj0qWw2ElNXiTixda/R+3YSug=="],
859
859
 
860
- "fast-xml-parser": ["fast-xml-parser@5.11.1", "", { "dependencies": { "@nodable/entities": "^3.0.0", "fast-xml-builder": "^1.2.0", "is-unsafe": "^2.0.0", "path-expression-matcher": "^1.6.2", "strnum": "^2.4.2", "xml-naming": "^0.3.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-TBw6K/fxoQGGjCmZDw9w/ZwP3uDcnTM4YH/g+PFRWr8sbe5idXtxNN6vITh4+1ruCZaho6uBFurElsA7F0zzgw=="],
860
+ "fast-xml-parser": ["fast-xml-parser@5.11.2", "", { "dependencies": { "@nodable/entities": "^3.0.1", "fast-xml-builder": "^1.2.0", "is-unsafe": "^2.0.0", "path-expression-matcher": "^1.6.2", "strnum": "^2.4.2", "xml-naming": "^0.3.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-R9iDuNrQYeQut46cn2r2wHKn4HYzVDvDm5J1wW+koZewykv0yuO2HChTYeZtrULyHIDM9cj9TUXloCsueCQUog=="],
861
861
 
862
862
  "fd-slicer": ["fd-slicer@1.1.0", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
863
863
 
@@ -937,7 +937,7 @@
937
937
 
938
938
  "highlight.js": ["highlight.js@10.7.3", "", {}, "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="],
939
939
 
940
- "hono": ["hono@4.13.10", "", {}, "sha512-dQuLsa5oO+47QVMVMaaD9cIv8ctmVtK1iRvwWngkfloFJMeFeuoUFDswIqZGxmGX3hrRzREgEArjkK9OgsQEhA=="],
940
+ "hono": ["hono@4.13.11", "", {}, "sha512-/SMX/RQNJn7oNmFwH6DtwDqcrzZU2otm1FD6OJe2cWF6cfy/F8hq0XVBv7xW3FTJshRQwuBnXHDq2kNsdZnshg=="],
941
941
 
942
942
  "hono-pino": ["hono-pino@0.10.3", "", { "dependencies": { "defu": "^6.1.4" }, "peerDependencies": { "hono": ">=4.0.0", "pino": ">=7.1.0" } }, "sha512-n0RNPIFOoq25Fg8b4D5gus4sVqI0z+8I17ibl96+p43d07UnZ0EMM/It0qSgfc7UtaC+XP5FkFmRHwBp6owsNA=="],
943
943
 
@@ -995,7 +995,7 @@
995
995
 
996
996
  "isolated-vm-next": ["isolated-vm@7.0.1", "", { "dependencies": { "node-gyp-build": "^4.8.4" } }, "sha512-nBCQ1hXEaYKYJ79wwfhaF44ITOJC30Hw0wPEsFeNsdD3hdeKK7FW1SGMQYBUA+qasvkqdOazI+iBuq0lcbN/aw=="],
997
997
 
998
- "isomorphic-git": ["isomorphic-git@1.42.3", "", { "dependencies": { "async-lock": "^1.4.1", "clean-git-ref": "^2.0.1", "crc-32": "^1.2.0", "diff3": "0.0.3", "ignore": "^5.1.4", "minimisted": "^2.0.0", "pako": "^1.0.10", "pify": "^4.0.1", "readable-stream": "^4.0.0", "sha.js": "^2.4.12", "simple-get": "^4.0.1" }, "bin": { "isogit": "cli.cjs" } }, "sha512-OHr8jeIxQY9h06KK5wEcdYnuul9QokOoaBekWkfqAx8KhZRnQpseqfL1I4okC7gNMw9UZ3zfG/nuCnn631SDFw=="],
998
+ "isomorphic-git": ["isomorphic-git@1.42.4", "", { "dependencies": { "async-lock": "^1.4.1", "clean-git-ref": "^2.0.1", "crc-32": "^1.2.0", "diff3": "0.0.3", "ignore": "^5.1.4", "minimisted": "^2.0.0", "pako": "^1.0.10", "pify": "^4.0.1", "readable-stream": "^4.0.0", "sha.js": "^2.4.12", "simple-get": "^4.0.1" }, "bin": { "isogit": "cli.cjs" } }, "sha512-ls44U1EUITCziPQcDWil+xYhm4lCgiIo/pJsHz6QfSsoqh4kKNGv0idx3B+qnQrjNTTdBPSK/D/qa6RJq+tGqA=="],
999
999
 
1000
1000
  "jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="],
1001
1001
 
@@ -1363,7 +1363,7 @@
1363
1363
 
1364
1364
  "require-in-the-middle": ["require-in-the-middle@8.0.1", "", { "dependencies": { "debug": "^4.3.5", "module-details-from-path": "^1.0.3" } }, "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ=="],
1365
1365
 
1366
- "resend": ["resend@6.30.0", "", { "dependencies": { "postal-mime": "2.7.6", "standardwebhooks": "1.1.1" }, "peerDependencies": { "@react-email/render": "*" } }, "sha512-rED9rVw8N6cUvjmpYQwfZKBzd/cgWT+jURekVxtjFV2+YyK2/Tu2JOnE68sgqXlMBSYRoWgI6R0xlx3ANc/xeA=="],
1366
+ "resend": ["resend@6.31.0", "", { "dependencies": { "postal-mime": "2.7.6", "standardwebhooks": "1.1.1" }, "peerDependencies": { "@react-email/render": "*" } }, "sha512-E9Ekrm888UKKCIY61UmDkgRVd2Q9OwihimgStrWJ4olNsjFYM25F4X8QbzrLuZz6W9iS7eLMS7MLbRBNqnlI/Q=="],
1367
1367
 
1368
1368
  "retry": ["retry@0.13.1", "", {}, "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg=="],
1369
1369
 
@@ -0,0 +1 @@
1
+ import{cg as t,j as p,ch as m}from"./index-DtRfQcRH.js";import{A as e}from"./activity-route-view-BvtAoGVt.js";import"./device-automation-BIjs7DZJ.js";import"./agent-thread-storage-U6htL3ad.js";import"./pending-seed-CPbfgnLX.js";import"./clients-C7ubnFsS.js";import"./client-rows-EJSKR6z1.js";import"./connection-label-BobuYiAG.js";import"./events-feed-C4L8mQV7.js";import"./use-applied-views-DvMT3wap.js";import"./renderer-1nRJFMGx.js";import"./card-4Ull9W6d.js";import"./calendar-CHXehtu0.js";import"./agent-loading-shells-BQLjzMPy.js";import"./member-scope-gate-CJqJZk7T.js";function v(){const{owner:o,_splat:r}=t.useParams(),i=t.useSearch();return p.jsx(e,{owner:o,search:i,attentionLens:!1,entityScope:m(r||"").path})}export{v as component};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-CYRAwUGO.js","assets/index-DdGjY1Hb.js","assets/index-C8CR2-Ck.css","assets/schema-value-normalization-DgMkyVVE.js","assets/calendar-BbD1N97u.js","assets/view-frame-DDr-Xtet.js","assets/app-bridge-BH3g2mKG.js","assets/missing-view-Bve6pJP-.js","assets/use-applied-views-DELwQQh7.js"])))=>i.map(i=>d[i]);
2
- import{r as n,a$ as j,b0 as m,b1 as v,b2 as P,p as R,v as _,a4 as b,a0 as E,j as e,b3 as S,b4 as w,b5 as N}from"./index-DdGjY1Hb.js";function h(){return n.useEffect(()=>{j()},[]),null}const F=w(async()=>({default:(await N(async()=>{const{EntityPage:s}=await import("./entity-page-CYRAwUGO.js");return{EntityPage:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]))).EntityPage}));function r(){return e.jsx("div",{"data-public-loading":"true",children:e.jsx(S,{})})}function A(){const{owner:s,_splat:x}=m.useParams(),a=m.useSearch(),i=v(x||""),o=i?.viewKey,{path:f}=P(s,i?.entityPath),{data:t,isLoading:c,error:d}=R(f,{slug:s},{includeBootstrap:!0}),{session:y,isReady:l}=_(),u=b();if(n.useEffect(()=>{t?.redirect&&u({to:t.redirect.to,replace:!0})},[t?.redirect,u]),E({active:!c&&l&&!y&&(!!d||!t),owner:s}),c||!l&&!t)return e.jsx(r,{});if(t?.redirect)return e.jsx(r,{});if(d||!t||!t.entity)return e.jsxs(e.Fragment,{children:[e.jsx(h,{}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Not Found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"We couldn't resolve this path."})]})]});const g=!o&&typeof a.merged_from=="string"&&t.entity.merged_records?.some(p=>p.name===a.merged_from)?a.merged_from:void 0;return e.jsxs(e.Fragment,{children:[e.jsx(h,{}),e.jsx(n.Suspense,{fallback:e.jsx(r,{}),children:e.jsx(F,{namespace:t.workspace,path:t.path,entity:t.entity,mergedFrom:g,viewKey:o})})]})}export{A as component};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-BxwuqqWk.js","assets/index-DtRfQcRH.js","assets/index-C8CR2-Ck.css","assets/schema-value-normalization-BspxVEGy.js","assets/calendar-CHXehtu0.js","assets/view-frame-HoBawpT2.js","assets/app-bridge-BH3g2mKG.js","assets/missing-view-CD4DOaG8.js","assets/use-applied-views-DvMT3wap.js"])))=>i.map(i=>d[i]);
2
+ import{r as n,a$ as j,b0 as m,b1 as v,b2 as P,p as R,v as _,a4 as b,a0 as E,j as e,b3 as S,b4 as w,b5 as N}from"./index-DtRfQcRH.js";function h(){return n.useEffect(()=>{j()},[]),null}const F=w(async()=>({default:(await N(async()=>{const{EntityPage:s}=await import("./entity-page-BxwuqqWk.js");return{EntityPage:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]))).EntityPage}));function r(){return e.jsx("div",{"data-public-loading":"true",children:e.jsx(S,{})})}function A(){const{owner:s,_splat:x}=m.useParams(),a=m.useSearch(),i=v(x||""),o=i?.viewKey,{path:f}=P(s,i?.entityPath),{data:t,isLoading:c,error:d}=R(f,{slug:s},{includeBootstrap:!0}),{session:y,isReady:l}=_(),u=b();if(n.useEffect(()=>{t?.redirect&&u({to:t.redirect.to,replace:!0})},[t?.redirect,u]),E({active:!c&&l&&!y&&(!!d||!t),owner:s}),c||!l&&!t)return e.jsx(r,{});if(t?.redirect)return e.jsx(r,{});if(d||!t||!t.entity)return e.jsxs(e.Fragment,{children:[e.jsx(h,{}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Not Found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"We couldn't resolve this path."})]})]});const g=!o&&typeof a.merged_from=="string"&&t.entity.merged_records?.some(p=>p.name===a.merged_from)?a.merged_from:void 0;return e.jsxs(e.Fragment,{children:[e.jsx(h,{}),e.jsx(n.Suspense,{fallback:e.jsx(r,{}),children:e.jsx(F,{namespace:t.workspace,path:t.path,entity:t.entity,mergedFrom:g,viewKey:o})})]})}export{A as component};
@@ -1 +1 @@
1
- import{a4 as b,gk as w,r as u,j as n,al as D,cp as k,v as P,w as E,bz as M,bq as N,bL as R,cr as O,gl as $,gm as z,bW as B,a9 as Q}from"./index-DdGjY1Hb.js";import{L as W,A as q}from"./agent-thread-DOYh7WLW.js";import{n as L}from"./agent-thread-storage-U6htL3ad.js";import{A as F,C as H}from"./agent-loading-shells-DsiGx1fn.js";import"./app-bridge-BH3g2mKG.js";import"./pending-seed-CPbfgnLX.js";import"./use-mention-search-CGA3AaKm.js";import"./index-Vcq4gwWv.js";function U({owner:t,agent:s,threadId:e,afterMessagesContent:d,className:i,initialDraft:x,newChatRequested:m=!1,preventAutoNavigate:g}){const o=b(),r=s.agentId,{data:a=[]}=w(r,{orgSlug:t}),[l,p]=u.useState(()=>L()),[h,A]=u.useState(null);u.useEffect(()=>{!m||e||(p(L()),A(null),o({to:".",search:(f=>{const{new:C,...S}=f;return S}),replace:!0}))},[m,e,o]);const v=u.useMemo(()=>!h||a.some(f=>f.id===h.id)?a:[h,...a],[a,h]),c=e??l,T=!e||!v.some(f=>f.id===e),j=u.useCallback(()=>{if(v.some(C=>C.id===c))return;A({id:c,title:`Conversation ${v.length+1}`,createdAt:Date.now(),updatedAt:Date.now()});const f=k(t,r,c);o({...f,replace:!0})},[v,c,o,t,r]),y=u.useCallback(()=>{T&&!g&&j()},[T,j,g]);return n.jsx("div",{className:D("flex min-h-0 flex-1 flex-col",i),children:n.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:n.jsx(W,{agentId:r,workspaceSlug:t,thread:c,loadHistory:!!e,onFirstUserMessage:y,initialDraft:x,children:n.jsx(q,{afterMessagesContent:d})},`${r}:${c}`)})})}function _({owner:t,agentId:s,threadId:e,initialDraft:d,newChatRequested:i,afterMessagesContent:x,preventAutoNavigate:m}){const{isAuthenticated:g}=P(),{isMember:o,isLoading:r}=E(),a=g&&o,{data:l=[],isLoading:p}=M({enabled:a}),h=s??null,A=l.find(c=>c.agentId===h)??null;return a&&p||r?n.jsx(F,{}):A?n.jsx(U,{owner:t,agent:A,threadId:e,initialDraft:d,newChatRequested:i,afterMessagesContent:x,preventAutoNavigate:m,className:"min-h-0 flex-1 overflow-hidden"}):n.jsx(N,{icon:R,title:"Agent not found",description:"This agent may have been removed."})}function G(t){return[...t].sort((s,e)=>e.updatedAt-s.updatedAt)[0]}function J({owner:t,agentId:s,threadId:e,initialDraft:d,forceComposer:i=!1,newChatRequested:x=!1,afterMessagesContent:m,preventAutoNavigate:g}){const o=b(),{data:r=[],isLoading:a}=O($(t,s,{strict:!1})),l=u.useMemo(()=>G(r),[r]);return u.useEffect(()=>{if(e||i||a||!l)return;const p=k(t,s,l.id);o({...p,replace:!0})},[s,a,l,o,t,e,i]),!e&&!i&&(a||l)?n.jsx(H,{}):n.jsx(_,{owner:t,agentId:s,threadId:e,initialDraft:d,newChatRequested:x,afterMessagesContent:m,preventAutoNavigate:g})}function se(){const{owner:t,agentId:s}=z.useParams(),{threadId:e}=B({strict:!1}),{new:d,prompt:i}=Q({strict:!1});return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 py-4 lg:px-6 lg:py-6",children:n.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col",children:n.jsx(J,{owner:t,agentId:s,threadId:e,initialDraft:i,forceComposer:!e,newChatRequested:!!d})})})}export{se as component};
1
+ import{a4 as b,gk as w,r as u,j as n,al as D,cp as k,v as P,w as E,bz as M,bq as N,bL as R,cr as O,gl as $,gm as z,bW as B,a9 as Q}from"./index-DtRfQcRH.js";import{L as W,A as q}from"./agent-thread-D7AGGjRV.js";import{n as L}from"./agent-thread-storage-U6htL3ad.js";import{A as F,C as H}from"./agent-loading-shells-BQLjzMPy.js";import"./app-bridge-BH3g2mKG.js";import"./pending-seed-CPbfgnLX.js";import"./use-mention-search-CeTEE3oE.js";import"./index-Vcq4gwWv.js";function U({owner:t,agent:s,threadId:e,afterMessagesContent:d,className:i,initialDraft:x,newChatRequested:m=!1,preventAutoNavigate:g}){const o=b(),r=s.agentId,{data:a=[]}=w(r,{orgSlug:t}),[l,p]=u.useState(()=>L()),[h,A]=u.useState(null);u.useEffect(()=>{!m||e||(p(L()),A(null),o({to:".",search:(f=>{const{new:C,...S}=f;return S}),replace:!0}))},[m,e,o]);const v=u.useMemo(()=>!h||a.some(f=>f.id===h.id)?a:[h,...a],[a,h]),c=e??l,T=!e||!v.some(f=>f.id===e),j=u.useCallback(()=>{if(v.some(C=>C.id===c))return;A({id:c,title:`Conversation ${v.length+1}`,createdAt:Date.now(),updatedAt:Date.now()});const f=k(t,r,c);o({...f,replace:!0})},[v,c,o,t,r]),y=u.useCallback(()=>{T&&!g&&j()},[T,j,g]);return n.jsx("div",{className:D("flex min-h-0 flex-1 flex-col",i),children:n.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:n.jsx(W,{agentId:r,workspaceSlug:t,thread:c,loadHistory:!!e,onFirstUserMessage:y,initialDraft:x,children:n.jsx(q,{afterMessagesContent:d})},`${r}:${c}`)})})}function _({owner:t,agentId:s,threadId:e,initialDraft:d,newChatRequested:i,afterMessagesContent:x,preventAutoNavigate:m}){const{isAuthenticated:g}=P(),{isMember:o,isLoading:r}=E(),a=g&&o,{data:l=[],isLoading:p}=M({enabled:a}),h=s??null,A=l.find(c=>c.agentId===h)??null;return a&&p||r?n.jsx(F,{}):A?n.jsx(U,{owner:t,agent:A,threadId:e,initialDraft:d,newChatRequested:i,afterMessagesContent:x,preventAutoNavigate:m,className:"min-h-0 flex-1 overflow-hidden"}):n.jsx(N,{icon:R,title:"Agent not found",description:"This agent may have been removed."})}function G(t){return[...t].sort((s,e)=>e.updatedAt-s.updatedAt)[0]}function J({owner:t,agentId:s,threadId:e,initialDraft:d,forceComposer:i=!1,newChatRequested:x=!1,afterMessagesContent:m,preventAutoNavigate:g}){const o=b(),{data:r=[],isLoading:a}=O($(t,s,{strict:!1})),l=u.useMemo(()=>G(r),[r]);return u.useEffect(()=>{if(e||i||a||!l)return;const p=k(t,s,l.id);o({...p,replace:!0})},[s,a,l,o,t,e,i]),!e&&!i&&(a||l)?n.jsx(H,{}):n.jsx(_,{owner:t,agentId:s,threadId:e,initialDraft:d,newChatRequested:x,afterMessagesContent:m,preventAutoNavigate:g})}function se(){const{owner:t,agentId:s}=z.useParams(),{threadId:e}=B({strict:!1}),{new:d,prompt:i}=Q({strict:!1});return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 py-4 lg:px-6 lg:py-6",children:n.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col",children:n.jsx(J,{owner:t,agentId:s,threadId:e,initialDraft:i,forceComposer:!e,newChatRequested:!!d})})})}export{se as component};
@@ -0,0 +1 @@
1
+ import{gv as r,j as e}from"./index-DtRfQcRH.js";import{A as n}from"./agents-workbench-Cl7FO7b3.js";import"./agent-editor-form-DwHD9j1Y.js";import"./model-selector-XC5CI2Et.js";import"./proposal-review-shell-C3K-JXjb.js";import"./runs-_yVh6PPB.js";function c(){const{owner:o,agentId:t}=r.useParams();return e.jsx(n,{owner:o,agentId:t})}export{c as component};
@@ -1 +1 @@
1
- import{a4 as N,a3 as k,p as A,v as L,w as C,M as y,j as t,B as n,ez as b,bL as R,S as _,L as $,N as z,go as p,aY as D}from"./index-DdGjY1Hb.js";import{a as O}from"./automation-detail-content-CMprQht5.js";import"./create-automation-form-DN2w080o.js";import"./cronstrue-h8_zIyZD.js";import"./entity-options-ErxYvMDH.js";import"./connection-label-BobuYiAG.js";import"./switch-DDkPrV3p.js";import"./device-automation-BIjs7DZJ.js";import"./model-selector-BLCEahny.js";import"./skill-editor-D_W3QlRz.js";import"./code-editor-DGJQDoHD.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./use-mention-search-CGA3AaKm.js";import"./proposal-review-shell-uskeFIUr.js";import"./runs-CzBeUzlQ.js";import"./json-diff-BV2STDGj.js";import"./deployments-ICDss7yS.js";import"./agent-loading-shells-DsiGx1fn.js";import"./agent-thread-DOYh7WLW.js";import"./app-bridge-BH3g2mKG.js";import"./pending-seed-CPbfgnLX.js";import"./events-feed-L3c-LLiJ.js";import"./use-applied-views-DELwQQh7.js";import"./clients-Bd8WpHSV.js";import"./renderer-Dyf4t8kR.js";import"./card-DpLjEqIc.js";function P({owner:o,automationId:a,view:e,runId:s}){const r=N(),{orgContext:u,hasOrgContext:x}=k(),{data:g,isLoading:m}=A(`/${o}`,u),{isAuthenticated:h}=L(),{isLoading:c}=C(),v=g?.workspace?.id??"",f=h?!x||m||c:m||c,i=y(a,void 0,v).data?.automation,j=i?.automation_name??"Automation",l=()=>void r({to:"/$owner/automations",params:{owner:o}}),d=()=>void r({to:"/$owner/automations/$automationId",params:{owner:o,automationId:a},search:{view:"activity",run_id:void 0}}),w=!s&&e==="definition";return t.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:t.jsxs("div",{className:"mx-auto flex w-full min-w-0 max-w-3xl flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsxs(n,{type:"button",variant:"ghost",size:"sm",className:"h-8 gap-1.5 text-muted-foreground hover:text-foreground",onClick:l,children:[t.jsx(b,{className:"h-3.5 w-3.5"}),"Automations"]}),t.jsxs("h1",{className:"flex min-w-0 items-center gap-2 truncate font-display text-xl font-semibold",children:[t.jsx(R,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),f&&!i?t.jsx(_,{className:"h-5 w-40"}):s?"Review change":j]})]}),s?null:w?t.jsx(n,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground hover:text-foreground",onClick:d,children:"Done"}):t.jsx(n,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 gap-1.5",children:t.jsxs($,{to:"/$owner/automations/$automationId",params:{owner:o,automationId:a},search:{view:"definition",run_id:void 0},children:[t.jsx(z,{className:"h-3.5 w-3.5"}),"Edit"]})})]}),t.jsx(O,{owner:o,agentId:i?.managed_agent_id??null,automationId:a,view:e,runId:s,onDone:s?l:d})]})})}function ct(){const{owner:o,automationId:a}=p.useParams(),e=p.useSearch();return t.jsx(D,{owner:o,children:()=>t.jsx(P,{owner:o,automationId:a,view:e.view,runId:e.run_id})})}export{ct as component};
1
+ import{a4 as N,a3 as k,p as A,v as L,w as C,M as y,j as t,B as n,ez as b,bL as R,S as _,L as $,N as z,go as p,aY as D}from"./index-DtRfQcRH.js";import{a as O}from"./automation-detail-content-CKSywvzE.js";import"./create-automation-form-De8J-JD5.js";import"./cronstrue-C5yTgk5z.js";import"./entity-options-utGBmFX0.js";import"./connection-label-BobuYiAG.js";import"./switch-CxDXvPGE.js";import"./device-automation-BIjs7DZJ.js";import"./model-selector-XC5CI2Et.js";import"./skill-editor-D_W3QlRz.js";import"./code-editor-BHiWR94J.js";import"./index-CDz3-ieP.js";import"./index-Vcq4gwWv.js";import"./use-mention-search-CeTEE3oE.js";import"./proposal-review-shell-C3K-JXjb.js";import"./runs-_yVh6PPB.js";import"./json-diff-DYeX-xLk.js";import"./deployments-D1gbQwsy.js";import"./agent-loading-shells-BQLjzMPy.js";import"./agent-thread-D7AGGjRV.js";import"./app-bridge-BH3g2mKG.js";import"./pending-seed-CPbfgnLX.js";import"./events-feed-C4L8mQV7.js";import"./use-applied-views-DvMT3wap.js";import"./clients-C7ubnFsS.js";import"./renderer-1nRJFMGx.js";import"./card-4Ull9W6d.js";function P({owner:o,automationId:a,view:e,runId:s}){const r=N(),{orgContext:u,hasOrgContext:x}=k(),{data:g,isLoading:m}=A(`/${o}`,u),{isAuthenticated:h}=L(),{isLoading:c}=C(),v=g?.workspace?.id??"",f=h?!x||m||c:m||c,i=y(a,void 0,v).data?.automation,j=i?.automation_name??"Automation",l=()=>void r({to:"/$owner/automations",params:{owner:o}}),d=()=>void r({to:"/$owner/automations/$automationId",params:{owner:o,automationId:a},search:{view:"activity",run_id:void 0}}),w=!s&&e==="definition";return t.jsx("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:t.jsxs("div",{className:"mx-auto flex w-full min-w-0 max-w-3xl flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsxs(n,{type:"button",variant:"ghost",size:"sm",className:"h-8 gap-1.5 text-muted-foreground hover:text-foreground",onClick:l,children:[t.jsx(b,{className:"h-3.5 w-3.5"}),"Automations"]}),t.jsxs("h1",{className:"flex min-w-0 items-center gap-2 truncate font-display text-xl font-semibold",children:[t.jsx(R,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),f&&!i?t.jsx(_,{className:"h-5 w-40"}):s?"Review change":j]})]}),s?null:w?t.jsx(n,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground hover:text-foreground",onClick:d,children:"Done"}):t.jsx(n,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 gap-1.5",children:t.jsxs($,{to:"/$owner/automations/$automationId",params:{owner:o,automationId:a},search:{view:"definition",run_id:void 0},children:[t.jsx(z,{className:"h-3.5 w-3.5"}),"Edit"]})})]}),t.jsx(O,{owner:o,agentId:i?.managed_agent_id??null,automationId:a,view:e,runId:s,onDone:s?l:d})]})})}function ct(){const{owner:o,automationId:a}=p.useParams(),e=p.useSearch();return t.jsx(D,{owner:o,children:()=>t.jsx(P,{owner:o,automationId:a,view:e.view,runId:e.run_id})})}export{ct as component};
@@ -1 +1 @@
1
- import{hH as F,j as e,aY as P,a4 as H,bf as W,a as O,d1 as V,n as G,S as L,L as h,gi as v,gg as U,bv as Y,d8 as q,gh as z,h0 as R,aa as J}from"./index-DdGjY1Hb.js";import{R as Q,c as X,C as Z}from"./device-pin-tombstone-BmD4pv_e.js";import{a as K}from"./connector-provenance-D_g9gGXU.js";import{f as ee,C as ne,F as se,b as ae,a as oe,A as te,c as ce}from"./connection-feed-detail-DZjtoEfm.js";import{S as ie,g as re}from"./runs-table-dATyiBg2.js";import{c as de}from"./connection-label-BobuYiAG.js";import{c as le}from"./device-rows-BqudjhFu.js";import"./runs-panel-D7l1uLGm.js";import"./runs-CzBeUzlQ.js";import"./entity-options-ErxYvMDH.js";function Ne(){const{owner:r,connectorKey:a,connectionId:f}=F.useParams(),{addFeed:o,feedId:d,settings:u,auth_result:c}=F.useSearch();return e.jsx(P,{owner:r,children:l=>e.jsx(me,{organizationId:l.organizationId,ownerSlug:l.ownerSlug,isWorkspaceLoading:l.isWorkspaceLoading,connectorKey:a,connectionId:Number(f),showAddFeed:o===!0,feedId:d,openSettings:u===!0,authResult:c})})}function me({organizationId:r,ownerSlug:a,isWorkspaceLoading:f,connectorKey:o,connectionId:d,showAddFeed:u,feedId:c,openSettings:l,authResult:A}){const I=H(),{data:S=[]}=W(),{data:E=[],isLoading:M}=O(r??"",{connectorKey:o}),{data:C=[]}=V(r??""),{data:T=[]}=G(c?d:null),n=E.find(t=>t.id===d),s=C.find(t=>t.key===o),i=c?T.find(t=>t.id===c):null;if(f||M||!r)return e.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[e.jsx(L,{className:"h-7 w-56"}),e.jsx(L,{className:"h-4 w-24"})]}),e.jsx(Q,{})]});if(!n)return e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found."}),e.jsxs(h,{to:"/$owner/connectors/$connectorKey",params:{owner:a,connectorKey:o},className:"mt-2 inline-block text-sm text-primary hover:underline",children:["Back to ",s?.name??o]})]});const D=de({...n,connector_name:n.connector_name??s?.name??null}),p=!c&&!u,y=()=>void I({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:a,connectorKey:o,connectionId:String(d)},search:{},replace:!0});let m,x=D,g,N,j;c?i?(x=ee(i,s),i.store==="channel_messages"?(m=e.jsx(ne,{feed:i,hideHeader:!0}),j="chat channel"):(g=e.jsx(se,{feed:i,ownerSlug:a}),N=e.jsx(ae,{feed:i}),m=e.jsx(oe,{feed:i,connectorDef:s,ownerSlug:a}))):(m=e.jsx("p",{className:"text-sm text-muted-foreground",children:"Feed not found."}),x="Feed"):u&&(m=e.jsx(te,{onClose:y,organizationId:r,connections:[n],connectorDefinitions:C}),x="Add feed",j=ce);const _=[e.jsx(h,{to:"/$owner/connectors",params:{owner:a},className:v,children:"Connectors"},"connectors"),e.jsx(h,{to:"/$owner/connectors/$connectorKey",params:{owner:a,connectorKey:o},search:{},className:v,children:s?.name??o},"connector")];p||_.push(e.jsx(h,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:a,connectorKey:o,connectionId:String(d)},search:{},className:v,children:D},"connection"));const b=p?X(n):null,B=j??b??void 0,$=e.jsx(U,{breadcrumb:e.jsx(z,{crumbs:_}),icon:s?e.jsx(Y,{icon:s.icon,name:s.name,faviconDomain:s.favicon_domain??q(s.auth_schema)}):null,title:x,status:g??e.jsx(ie,{status:re(n.status),showDot:!0,children:n.status}),meta:N,caption:B,captionTone:b?"error":"muted"});if(!p)return e.jsx(R,{header:$,children:e.jsx("div",{className:"mt-0",children:m})});const k=s&&le(s)?S.find(t=>t.id===n.device_worker_id&&t.connectors.some(w=>w.connection_id===n.id&&w.organization_slug===a)):void 0;return k?e.jsx(J,{to:"/$owner/connectors/device/$deviceId",params:{owner:a,deviceId:k.id},search:{connection:n.id,settings:l||void 0},hash:`connection-${n.id}`,replace:!0}):e.jsxs(R,{header:$,children:[e.jsx(K,{connectorDef:s,connectorKey:o,ownerSlug:a,deviceWorkerId:n.device_worker_id,deviceLabel:n.device_label}),e.jsx(Z,{connection:n,connectorDef:s,ownerSlug:a,openSettings:l,authResult:A},n.id)]})}export{Ne as component};
1
+ import{hH as F,j as e,aY as P,a4 as H,bf as W,a as O,d1 as V,n as G,S as L,L as h,gi as v,gg as U,bv as Y,d8 as q,gh as z,h0 as R,aa as J}from"./index-DtRfQcRH.js";import{R as Q,c as X,C as Z}from"./device-pin-tombstone-CwJitllC.js";import{a as K}from"./connector-provenance-DRdUEmQ1.js";import{f as ee,C as ne,F as se,b as ae,a as oe,A as te,c as ce}from"./connection-feed-detail-B1xieiEh.js";import{S as ie,g as re}from"./runs-table--dnFQatY.js";import{c as de}from"./connection-label-BobuYiAG.js";import{c as le}from"./device-rows-BBhW1C7Y.js";import"./runs-panel-B2852xus.js";import"./runs-_yVh6PPB.js";import"./entity-options-utGBmFX0.js";function Ne(){const{owner:r,connectorKey:a,connectionId:f}=F.useParams(),{addFeed:o,feedId:d,settings:u,auth_result:c}=F.useSearch();return e.jsx(P,{owner:r,children:l=>e.jsx(me,{organizationId:l.organizationId,ownerSlug:l.ownerSlug,isWorkspaceLoading:l.isWorkspaceLoading,connectorKey:a,connectionId:Number(f),showAddFeed:o===!0,feedId:d,openSettings:u===!0,authResult:c})})}function me({organizationId:r,ownerSlug:a,isWorkspaceLoading:f,connectorKey:o,connectionId:d,showAddFeed:u,feedId:c,openSettings:l,authResult:A}){const I=H(),{data:S=[]}=W(),{data:E=[],isLoading:M}=O(r??"",{connectorKey:o}),{data:C=[]}=V(r??""),{data:T=[]}=G(c?d:null),n=E.find(t=>t.id===d),s=C.find(t=>t.key===o),i=c?T.find(t=>t.id===c):null;if(f||M||!r)return e.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[e.jsx(L,{className:"h-7 w-56"}),e.jsx(L,{className:"h-4 w-24"})]}),e.jsx(Q,{})]});if(!n)return e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found."}),e.jsxs(h,{to:"/$owner/connectors/$connectorKey",params:{owner:a,connectorKey:o},className:"mt-2 inline-block text-sm text-primary hover:underline",children:["Back to ",s?.name??o]})]});const D=de({...n,connector_name:n.connector_name??s?.name??null}),p=!c&&!u,y=()=>void I({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:a,connectorKey:o,connectionId:String(d)},search:{},replace:!0});let m,x=D,g,N,j;c?i?(x=ee(i,s),i.store==="channel_messages"?(m=e.jsx(ne,{feed:i,hideHeader:!0}),j="chat channel"):(g=e.jsx(se,{feed:i,ownerSlug:a}),N=e.jsx(ae,{feed:i}),m=e.jsx(oe,{feed:i,connectorDef:s,ownerSlug:a}))):(m=e.jsx("p",{className:"text-sm text-muted-foreground",children:"Feed not found."}),x="Feed"):u&&(m=e.jsx(te,{onClose:y,organizationId:r,connections:[n],connectorDefinitions:C}),x="Add feed",j=ce);const _=[e.jsx(h,{to:"/$owner/connectors",params:{owner:a},className:v,children:"Connectors"},"connectors"),e.jsx(h,{to:"/$owner/connectors/$connectorKey",params:{owner:a,connectorKey:o},search:{},className:v,children:s?.name??o},"connector")];p||_.push(e.jsx(h,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:a,connectorKey:o,connectionId:String(d)},search:{},className:v,children:D},"connection"));const b=p?X(n):null,B=j??b??void 0,$=e.jsx(U,{breadcrumb:e.jsx(z,{crumbs:_}),icon:s?e.jsx(Y,{icon:s.icon,name:s.name,faviconDomain:s.favicon_domain??q(s.auth_schema)}):null,title:x,status:g??e.jsx(ie,{status:re(n.status),showDot:!0,children:n.status}),meta:N,caption:B,captionTone:b?"error":"muted"});if(!p)return e.jsx(R,{header:$,children:e.jsx("div",{className:"mt-0",children:m})});const k=s&&le(s)?S.find(t=>t.id===n.device_worker_id&&t.connectors.some(w=>w.connection_id===n.id&&w.organization_slug===a)):void 0;return k?e.jsx(J,{to:"/$owner/connectors/device/$deviceId",params:{owner:a,deviceId:k.id},search:{connection:n.id,settings:l||void 0},hash:`connection-${n.id}`,replace:!0}):e.jsxs(R,{header:$,children:[e.jsx(K,{connectorDef:s,connectorKey:o,ownerSlug:a,deviceWorkerId:n.device_worker_id,deviceLabel:n.device_label}),e.jsx(Z,{connection:n,connectorDef:s,ownerSlug:a,openSettings:l,authResult:A},n.id)]})}export{Ne as component};