@opengeni/api-router 2.0.1 → 2.0.2-canary.38789554071001

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 (110) hide show
  1. package/dist/app.js +1 -1
  2. package/dist/browser-action-fences.d.ts +13 -0
  3. package/dist/browser-lost-runtime-end.d.ts +24 -0
  4. package/dist/{chunk-ZDTWXRFX.js → chunk-QLJPLU7J.js} +13405 -5201
  5. package/dist/{chunk-ZDTWXRFX.js.map → chunk-QLJPLU7J.js.map} +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/integrations/atlassian.d.ts +1 -1
  8. package/dist/integrations/github-lens-connect.d.ts +2 -1
  9. package/dist/integrations/slack-interactions.d.ts +1 -1
  10. package/dist/interaction-agent-access.d.ts +9 -0
  11. package/dist/interaction-agent-version.d.ts +21 -0
  12. package/dist/interaction-route-stages.d.ts +25 -0
  13. package/dist/interaction-secrets.d.ts +4 -0
  14. package/dist/mcp/company-profile-agent-admin.d.ts +12 -0
  15. package/dist/mcp/scheduled-task-input.d.ts +35 -4
  16. package/dist/mcp/scheduled-task-view.d.ts +4 -4
  17. package/dist/mcp/server.d.ts +1 -1
  18. package/dist/mcp/site-agent-clamp-tools.d.ts +38 -0
  19. package/dist/mcp/site-data-tools.d.ts +7 -1
  20. package/dist/mcp/site-publication-tools.d.ts +19 -0
  21. package/dist/mcp/site-sql-tools.d.ts +27 -0
  22. package/dist/routes/client-errors.d.ts +1 -0
  23. package/dist/routes/desktop-distribution.d.ts +32 -0
  24. package/dist/routes/sessions.d.ts +8 -0
  25. package/dist/routes/site-publishing.d.ts +5 -0
  26. package/dist/routes/site-runtime.d.ts +31 -0
  27. package/dist/routes/site-sql.d.ts +16 -0
  28. package/dist/site-agent-guard.d.ts +53 -0
  29. package/dist/site-data/operations.d.ts +15 -15
  30. package/dist/site-data/service.d.ts +23 -3
  31. package/dist/site-frame-guard.d.ts +32 -0
  32. package/dist/site-publishing/agent-data-tools.d.ts +84 -0
  33. package/dist/site-publishing/agent-model.d.ts +58 -0
  34. package/dist/site-publishing/content-scanner.d.ts +31 -0
  35. package/dist/site-publishing/edge-sync.d.ts +48 -0
  36. package/dist/site-publishing/gateway-signature.d.ts +56 -0
  37. package/dist/site-publishing/limits.d.ts +63 -0
  38. package/dist/site-publishing/platform-usage.d.ts +113 -0
  39. package/dist/site-publishing/platform.d.ts +21 -0
  40. package/dist/site-publishing/readiness.d.ts +62 -0
  41. package/dist/site-publishing/runtime.d.ts +179 -0
  42. package/dist/site-publishing/service.d.ts +264 -0
  43. package/dist/site-publishing/session-events.d.ts +22 -0
  44. package/dist/site-publishing/session-views.d.ts +36 -0
  45. package/dist/site-publishing/viewer.d.ts +40 -0
  46. package/dist/site-session-origin.d.ts +21 -7
  47. package/dist/site-sql/format.d.ts +47 -0
  48. package/dist/site-sql/gateway.d.ts +50 -0
  49. package/dist/site-sql/service.d.ts +213 -0
  50. package/package.json +22 -22
  51. package/src/app.ts +46 -5
  52. package/src/browser-action-fences.ts +45 -0
  53. package/src/browser-lost-runtime-end.ts +71 -0
  54. package/src/codemode.ts +42 -10
  55. package/src/http/auth.ts +13 -3
  56. package/src/interaction-agent-access.ts +32 -0
  57. package/src/interaction-agent-version.ts +85 -0
  58. package/src/interaction-route-stages.ts +83 -0
  59. package/src/interaction-secrets.ts +6 -1
  60. package/src/mcp/action-catalog.gen.ts +204 -0
  61. package/src/mcp/action-descriptions.ts +2 -2
  62. package/src/mcp/action-schema-imports.gen.ts +13 -1
  63. package/src/mcp/company-profile-agent-admin.ts +13 -0
  64. package/src/mcp/editable-artifacts.ts +17 -5
  65. package/src/mcp/knowledge-entries.ts +52 -24
  66. package/src/mcp/secret-tools.ts +21 -5
  67. package/src/mcp/server.ts +117 -10
  68. package/src/mcp/session-admin-access-tools.ts +5 -0
  69. package/src/mcp/site-agent-clamp-tools.ts +140 -0
  70. package/src/mcp/site-data-tools.ts +54 -9
  71. package/src/mcp/site-publication-tools.ts +201 -0
  72. package/src/mcp/site-sql-tools.ts +427 -0
  73. package/src/routes/automations.ts +30 -8
  74. package/src/routes/browser-sessions.ts +303 -26
  75. package/src/routes/computer-sessions.ts +18 -1
  76. package/src/routes/desktop-distribution.ts +217 -0
  77. package/src/routes/machines.ts +9 -2
  78. package/src/routes/pr-review.ts +3 -0
  79. package/src/routes/scheduled-tasks.ts +6 -4
  80. package/src/routes/session-admin-access.ts +13 -0
  81. package/src/routes/sessions.ts +196 -3
  82. package/src/routes/site-publishing.ts +584 -0
  83. package/src/routes/site-runtime.ts +1867 -0
  84. package/src/routes/site-sql.ts +263 -0
  85. package/src/routes/vaults.ts +7 -1
  86. package/src/routes/workspace-artifacts.ts +56 -31
  87. package/src/sandbox/channel-a.ts +47 -5
  88. package/src/site-agent-guard.ts +261 -0
  89. package/src/site-data/operations.ts +18 -14
  90. package/src/site-data/service.ts +77 -3
  91. package/src/site-frame-guard.ts +107 -0
  92. package/src/site-publishing/agent-data-tools.ts +250 -0
  93. package/src/site-publishing/agent-model.ts +127 -0
  94. package/src/site-publishing/content-scanner.ts +93 -0
  95. package/src/site-publishing/edge-sync.ts +148 -0
  96. package/src/site-publishing/gateway-signature.ts +198 -0
  97. package/src/site-publishing/limits.ts +315 -0
  98. package/src/site-publishing/platform-usage.ts +479 -0
  99. package/src/site-publishing/platform.ts +98 -0
  100. package/src/site-publishing/readiness.ts +330 -0
  101. package/src/site-publishing/runtime.ts +830 -0
  102. package/src/site-publishing/service.ts +1282 -0
  103. package/src/site-publishing/session-events.ts +262 -0
  104. package/src/site-publishing/session-views.ts +262 -0
  105. package/src/site-publishing/viewer.ts +75 -0
  106. package/src/site-session-origin.ts +63 -6
  107. package/src/site-sql/format.ts +134 -0
  108. package/src/site-sql/gateway.ts +168 -0
  109. package/src/site-sql/service.ts +1636 -0
  110. package/src/workspace-deletion.ts +5 -0
package/dist/app.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  withDefaultEnabledCapabilityMcpTools,
29
29
  workflowIdForSession,
30
30
  workspaceActorContextExempt
31
- } from "./chunk-ZDTWXRFX.js";
31
+ } from "./chunk-QLJPLU7J.js";
32
32
  import "./chunk-OGQDXVXY.js";
33
33
  export {
34
34
  API_MAX_REQUEST_BODY_BYTES,
@@ -0,0 +1,13 @@
1
+ import type { BrowserActionRequest, BrowserTargetState } from "@opengeni/contracts";
2
+ export type BrowserActionFences = {
3
+ expectedTargetGeneration: string;
4
+ expectedDocumentGeneration: string | null;
5
+ expectedFrameId: string | null;
6
+ };
7
+ /**
8
+ * Complete a browser action's causal fences. Supplied fences are kept exactly;
9
+ * any omitted one is the target's current value, read from the live controller
10
+ * only when needed. This keeps the "act on the current document" request to
11
+ * one API round trip instead of a separate target-state request before it.
12
+ */
13
+ export declare function resolveBrowserActionFences(request: Pick<BrowserActionRequest, "expectedTargetGeneration" | "expectedDocumentGeneration" | "expectedFrameId">, readTargetState: () => Promise<Pick<BrowserTargetState, "targetGeneration" | "documentGeneration" | "frameId">>): Promise<BrowserActionFences>;
@@ -0,0 +1,24 @@
1
+ import { type BrowserControlClient } from "@opengeni/runtime/sandbox";
2
+ type BrowserEndClient = Pick<BrowserControlClient, "endSession">;
3
+ /** A person ending a browser. When the browser's controller lost the running
4
+ * browser (it restarted, or the runtime vanished) it preserves the working
5
+ * runtime and refuses a plain end; the person's explicit end then discards
6
+ * it. Cleanup after a failed or expired resume never takes this path, so a
7
+ * possibly accepted launch stays preserved there. Controllers older than the
8
+ * discard flag reject it as an unknown field and keep their original refusal. */
9
+ export declare function endBrowserDiscardingLostRuntime(client: BrowserEndClient, reference: {
10
+ browserSessionId: string;
11
+ controllerGeneration: string;
12
+ }): Promise<void>;
13
+ /** Return an expired resume to its checkpoint. A plain end of the expired
14
+ * generation succeeds when its launch provably never happened (or is already
15
+ * gone). When the controller instead preserves an interrupted launch (one that
16
+ * never recorded completion, so it can't be adopted), it is asked to move that
17
+ * launch's directory aside intact; nothing is discarded, and a launch that did
18
+ * complete, or whose profile may still be in use, keeps refusing. Controllers
19
+ * older than the set-aside flag reject it and keep their original refusal. */
20
+ export declare function endExpiredResumeSettingAsideInterruptedLaunch(client: BrowserEndClient, reference: {
21
+ browserSessionId: string;
22
+ controllerGeneration: string;
23
+ }): Promise<void>;
24
+ export {};