@opengeni/api-router 2.8.1-canary.0 → 2.10.0-canary.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 (49) hide show
  1. package/dist/access-grant-rls.d.ts +3 -0
  2. package/dist/app.js +1 -1
  3. package/dist/auth/organization-user-setup.d.ts +23 -0
  4. package/dist/{chunk-HHKQMVY7.js → chunk-XXH7DW34.js} +5012 -3010
  5. package/dist/chunk-XXH7DW34.js.map +1 -0
  6. package/dist/codemode.d.ts +6 -0
  7. package/dist/http/request-source.d.ts +14 -0
  8. package/dist/index.js +6 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/integrations/oauth-client.d.ts +2 -11
  11. package/dist/integrations/slack-interactions.d.ts +1 -1
  12. package/dist/mcp/scheduled-task-view.d.ts +3 -3
  13. package/dist/mcp/server.d.ts +158 -1
  14. package/dist/mcp/session-view.d.ts +56 -2
  15. package/dist/mcp/session-wait.d.ts +1 -1
  16. package/dist/mcp-oauth.d.ts +19 -0
  17. package/dist/routes/codex.d.ts +19 -1
  18. package/dist/routes/workspace-artifacts.d.ts +2 -1
  19. package/dist/work-discovery-observability.d.ts +1 -1
  20. package/dist/workspace-artifact-content.d.ts +28 -0
  21. package/dist/workspace-artifact-provenance.d.ts +7 -0
  22. package/dist/workspace-tool-gateway-observability.d.ts +17 -0
  23. package/dist/workspace-tool-gateway.d.ts +118 -0
  24. package/package.json +19 -18
  25. package/src/access-grant-rls.ts +40 -0
  26. package/src/app.ts +241 -44
  27. package/src/auth/organization-user-setup.ts +92 -2
  28. package/src/codemode.ts +33 -4
  29. package/src/http/auth.ts +11 -0
  30. package/src/http/request-source.ts +37 -0
  31. package/src/index.ts +5 -1
  32. package/src/integrations/oauth-client.ts +168 -203
  33. package/src/mcp/server.ts +493 -131
  34. package/src/mcp/session-view.ts +20 -1
  35. package/src/mcp/session-wait.ts +3 -0
  36. package/src/mcp-oauth.ts +539 -0
  37. package/src/routes/codex.ts +106 -41
  38. package/src/routes/documents.ts +67 -19
  39. package/src/routes/files.ts +54 -6
  40. package/src/routes/organization-memberships.ts +9 -13
  41. package/src/routes/sessions.ts +65 -13
  42. package/src/routes/workspace-artifacts.ts +176 -67
  43. package/src/sandbox/channel-a.ts +17 -4
  44. package/src/work-discovery-observability.ts +3 -3
  45. package/src/workspace-artifact-content.ts +163 -0
  46. package/src/workspace-artifact-provenance.ts +104 -0
  47. package/src/workspace-tool-gateway-observability.ts +100 -0
  48. package/src/workspace-tool-gateway.ts +691 -0
  49. package/dist/chunk-HHKQMVY7.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import type { AccessGrant } from "@opengeni/contracts";
2
+ import { type ApiRouteDeps } from "@opengeni/core";
3
+ export declare function withAccessGrantSessionRlsContext<T>(deps: ApiRouteDeps, grant: AccessGrant, fn: () => Promise<T>): Promise<T>;
package/dist/app.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  withDefaultEnabledCapabilityMcpTools,
25
25
  workflowIdForSession,
26
26
  workspaceActorContextExempt
27
- } from "./chunk-HHKQMVY7.js";
27
+ } from "./chunk-XXH7DW34.js";
28
28
  export {
29
29
  API_MAX_REQUEST_BODY_BYTES,
30
30
  allowedCorsOrigin,
@@ -1,5 +1,6 @@
1
1
  import type { Settings } from "@opengeni/config";
2
2
  import type { ManagedEmailTransport } from "@opengeni/core";
3
+ export type OrganizationUserSetupEmailTokenTransport = "fragment" | "query";
3
4
  /**
4
5
  * Prove that the stable invited-user setup bearer can be constructed before an
5
6
  * invitation commits. Provider availability is intentionally outside this
@@ -7,11 +8,14 @@ import type { ManagedEmailTransport } from "@opengeni/core";
7
8
  * transport outcome after the invitation exists.
8
9
  */
9
10
  export declare function assertOrganizationUserSetupDeliveryConfigured(settings: Settings, transport: ManagedEmailTransport): void;
11
+ /** Enforce the query-bearing edge proof for env and embedded settings alike. */
12
+ export declare function assertOrganizationUserSetupQueryTransportConfigured(settings: Pick<Settings, "organizationUserSetupEmailTokenTransport" | "organizationUserSetupQueryEdgeSanitizationConfirmed">): void;
10
13
  /** Reject an invalid embedded-provider contract before any durable boundary. */
11
14
  export declare function assertManagedEmailTransportMetadata(transport: ManagedEmailTransport): void;
12
15
  export declare function deriveOrganizationUserSetupToken(settings: Settings, input: {
13
16
  invitationId: string;
14
17
  deliveryId: string;
18
+ transport?: OrganizationUserSetupEmailTokenTransport;
15
19
  }): Promise<{
16
20
  token: string;
17
21
  digest: string;
@@ -45,6 +49,25 @@ export declare function organizationUserSetupPayloadDigest(input: {
45
49
  html: string;
46
50
  providerIdempotencyScope: string;
47
51
  }): Promise<string>;
52
+ export declare function resolveOrganizationUserSetupDeliveryEmail(settings: Settings, input: {
53
+ invitationId: string;
54
+ deliveryId: string;
55
+ senderEmail: string;
56
+ recipientEmail: string;
57
+ recipientName: string | null;
58
+ organizationName: string;
59
+ organizationRole: "owner" | "admin" | "member";
60
+ sharedWorkspaceAccess: OrganizationUserSetupEmailSnapshot["sharedWorkspaceAccess"];
61
+ providerIdempotencyScope: string;
62
+ frozenTransport: OrganizationUserSetupEmailTokenTransport | null;
63
+ frozenPayloadDigest: string | null;
64
+ }): Promise<{
65
+ transport: OrganizationUserSetupEmailTokenTransport;
66
+ token: string;
67
+ tokenDigest: string;
68
+ payloadDigest: string;
69
+ message: ReturnType<typeof renderOrganizationUserSetupEmail>;
70
+ }>;
48
71
  export declare function organizationUserSetupRequestFingerprint(settings: Settings, input: {
49
72
  tokenDigest: string;
50
73
  name: string;