@lssm/lib.contracts 0.0.0-canary-20251213172311 → 0.0.0-canary-20251215220103

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.
@@ -1 +1 @@
1
- import{docBlockToPresentationSpec as e,docBlockToPresentationV2 as t,docBlocksToPresentationRoutes as n,docBlocksToPresentationSpecs as r,mapDocRoutes as i}from"./presentations.js";import{DocRegistry as a,defaultDocRegistry as o,docId as s,listRegisteredDocBlocks as c,registerDocBlocks as l}from"./registry.js";import{techContractsDocs as u}from"./tech-contracts.docs.js";import{metaDocs as d}from"./meta.docs.js";import"./PUBLISHING.docblock.js";import"./accessibility_wcag_compliance_specs.docblock.js";import"./tech/PHASE_1_QUICKSTART.docblock.js";import"./tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js";import"./tech/PHASE_3_AUTO_EVOLUTION.docblock.js";import"./tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js";import"./tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js";import"./tech/lifecycle-stage-system.docblock.js";import"./tech/presentation-runtime.docblock.js";import"./tech/schema/README.docblock.js";import"./tech/templates/runtime.docblock.js";import"./tech/workflows/overview.docblock.js";import"./tech/mcp-endpoints.docblock.js";import"./tech/vscode-extension.docblock.js";import"./tech/telemetry-ingest.docblock.js";import"./tech/contracts/openapi-export.docblock.js";export{a as DocRegistry,o as defaultDocRegistry,e as docBlockToPresentationSpec,t as docBlockToPresentationV2,n as docBlocksToPresentationRoutes,r as docBlocksToPresentationSpecs,s as docId,c as listRegisteredDocBlocks,i as mapDocRoutes,d as metaDocs,l as registerDocBlocks,u as techContractsDocs};
1
+ import{docBlockToPresentationSpec as e,docBlockToPresentationV2 as t,docBlocksToPresentationRoutes as n,docBlocksToPresentationSpecs as r,mapDocRoutes as i}from"./presentations.js";import{DocRegistry as a,defaultDocRegistry as o,docId as s,listRegisteredDocBlocks as c,registerDocBlocks as l}from"./registry.js";import{techContractsDocs as u}from"./tech-contracts.docs.js";import{metaDocs as d}from"./meta.docs.js";import"./PUBLISHING.docblock.js";import"./accessibility_wcag_compliance_specs.docblock.js";import"./tech/PHASE_1_QUICKSTART.docblock.js";import"./tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js";import"./tech/PHASE_3_AUTO_EVOLUTION.docblock.js";import"./tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js";import"./tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js";import"./tech/lifecycle-stage-system.docblock.js";import"./tech/presentation-runtime.docblock.js";import"./tech/auth/better-auth-nextjs.docblock.js";import"./tech/schema/README.docblock.js";import"./tech/templates/runtime.docblock.js";import"./tech/workflows/overview.docblock.js";import"./tech/mcp-endpoints.docblock.js";import"./tech/vscode-extension.docblock.js";import"./tech/telemetry-ingest.docblock.js";import"./tech/contracts/openapi-export.docblock.js";import"./tech/studio/workspaces.docblock.js";import"./tech/studio/sandbox-unlogged.docblock.js";import"./tech/studio/workspace-ops.docblock.js";import"./tech/studio/project-routing.docblock.js";import"./tech/studio/platform-admin-panel.docblock.js";import"./tech/studio/learning-events.docblock.js";import"./tech/studio/learning-journeys.docblock.js";import"./tech/studio/project-access-teams.docblock.js";import"./tech/studio/team-invitations.docblock.js";export{a as DocRegistry,o as defaultDocRegistry,e as docBlockToPresentationSpec,t as docBlockToPresentationV2,n as docBlocksToPresentationRoutes,r as docBlocksToPresentationSpecs,s as docId,c as listRegisteredDocBlocks,i as mapDocRoutes,d as metaDocs,l as registerDocBlocks,u as techContractsDocs};
@@ -0,0 +1,58 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.auth.better-auth-nextjs`,title:`Better Auth + Next.js integration (ContractSpec)`,summary:`How ContractSpec wires Better Auth into Next.js (server config, client singleton, and proxy cookie-only redirects).`,kind:`reference`,visibility:`public`,route:`/docs/tech/auth/better-auth-nextjs`,tags:[`auth`,`better-auth`,`nextjs`,`cookies`,`proxy`,`hmr`],body:`# Better Auth + Next.js integration (ContractSpec)
2
+
3
+ This repo uses Better Auth as the primary auth layer (sessions, organizations, teams, API keys, and OAuth).
4
+
5
+ ## Server config (Better Auth)
6
+
7
+ - Source: \`packages/bundles/contractspec-studio/src/application/services/auth.ts\`
8
+ - Important: \`nextCookies()\` must be the **last** plugin in the Better Auth plugin list so \`Set-Cookie\` is applied correctly in Next.js environments.
9
+
10
+ ## Better Auth Admin plugin
11
+
12
+ ContractSpec Studio enables the Better Auth **Admin plugin** to support platform-admin user operations (list users, impersonation, etc.).
13
+
14
+ - Server: \`admin()\` plugin in \`packages/bundles/contractspec-studio/src/application/services/auth.ts\`
15
+ - Client: \`adminClient()\` in \`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.ts\`
16
+
17
+ ### PLATFORM_ADMIN ⇒ Better Auth admin role
18
+
19
+ Better Auth Admin endpoints authorize via \`user.role\`. ContractSpec enforces an org-driven rule:
20
+
21
+ - If the **active organization** has \`type = PLATFORM_ADMIN\`, the signed-in user is ensured to have \`User.role\` containing \`admin\`.
22
+ - This is applied in the session creation hook and re-checked in \`assertsPlatformAdmin()\`.
23
+
24
+ This keeps admin enablement deterministic and avoids manual role backfills.
25
+
26
+ ## Client config (React web + Expo)
27
+
28
+ To avoid duplicate background refresh/polling loops in dev (Fast Refresh/HMR), the Better Auth client is implemented as a singleton cached on \`globalThis\`.
29
+
30
+ - Web client: \`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.ts\`
31
+ - Native client: \`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.native.ts\`
32
+
33
+ Import guidance:
34
+
35
+ - If you only need the context/hook, prefer importing from \`@lssm/bundle.contractspec-studio/presentation/providers/auth\`.
36
+ - If you explicitly need the Better Auth client instance (e.g. admin impersonation, direct API calls), import from \`@lssm/bundle.contractspec-studio/presentation/providers/auth/client\`.
37
+
38
+ ## Public routes (login / signup)
39
+
40
+ Public auth pages should avoid eager \`authClient\` initialization.
41
+
42
+ Pattern used:
43
+
44
+ - In the submit handler, dynamically import \`@lssm/bundle.contractspec-studio/presentation/providers/auth/index.web\` and call \`authClient.signIn.*\` / \`authClient.signUp.*\`.
45
+
46
+ This prevents session refresh behavior from starting just because a public page rendered.
47
+
48
+ ## Next.js proxy auth (web-landing)
49
+
50
+ The Next.js proxy/middleware is used for **redirect decisions only**. It must not perform DB-backed session reads on every request.
51
+
52
+ - Source: \`packages/apps/web-landing/src/proxy.ts\`
53
+ - Approach: cookie-only checks via Better Auth cookies helpers:
54
+ - \`getSessionCookie(request)\`
55
+ - \`getCookieCache(request)\`
56
+
57
+ These checks are intentionally optimistic and should only gate routing. Full authorization must still be enforced on server-side actions/routes and GraphQL resolvers.
58
+ `}];e(t);export{t as tech_auth_better_auth_nextjs_DocBlocks};
@@ -0,0 +1 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.learning-events`,title:`Studio Learning Events`,summary:`Studio persists learning/activity events to the database; Sandbox keeps learning local-first and unlogged.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/learning-events`,tags:[`studio`,`learning`,`events`,`analytics`,`sandbox`],body:"# Studio Learning Events\n\nStudio emits lightweight **learning/activity events** to support onboarding, ambient coaching, and learning journeys.\n\n## Persistence model\n\n- **Studio**: events are persisted to the database in `StudioLearningEvent` and are organization-scoped (optionally project-scoped).\n- **Sandbox**: events remain **local-only** (unlogged); they must never be sent to backend services.\n\n## GraphQL API\n\n- `recordLearningEvent(input: { name, projectId?, payload? })`\n- `myLearningEvents(projectId?, limit?)`\n- `myOnboardingTracks(productId?, includeProgress?)`\n- `myOnboardingProgress(trackKey)`\n- `dismissOnboardingTrack(trackKey)`\n\n## Common event names (convention)\n\n- `module.navigated` — user navigated to a Studio module (payload at minimum: `{ moduleId }`).\n- `studio.template.instantiated` — created a new Studio project (starter template). Payload commonly includes `{ templateId, projectSlug }`.\n- `spec.changed` — created or updated a Studio spec. Payload may include `{ action: 'create' | 'update', specId?, specType? }`.\n- `regeneration.completed` — finished a “regen/deploy” action (currently emitted on successful Studio deploy actions).\n- `studio.evolution.applied` — completed an Evolution session (payload commonly includes `{ evolutionSessionId }`).\n\nThese events are intentionally minimal and must avoid PII/secrets in payloads.\n"}];e(t);export{t as tech_studio_learning_events_DocBlocks};
@@ -0,0 +1,57 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.learning-journeys`,title:`Studio learning journeys (onboarding + coach)`,summary:`DB-backed learning journeys tracked per organization: seeded tracks/steps, event-driven progress, XP/streaks, and a Studio coach surface.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/learning-journeys`,tags:[`studio`,`learning`,`onboarding`,`journey`,`graphql`,`database`],body:`# Studio learning journeys
2
+
3
+ Studio supports **DB-backed learning journeys** (onboarding tracks + ambient coach tips) that are advanced by **recorded learning events**.
4
+
5
+ > See also: \`/docs/tech/studio/learning-events\` for event naming + payload guardrails.
6
+
7
+ ## Scope (multi-tenancy)
8
+
9
+ - Progress is tracked **per organization** (tenant/workspace), via a \`Learner\` record keyed by \`(userId, organizationId)\`.
10
+ - Learning events are stored as \`StudioLearningEvent\` under the Studio DB schema, scoped to an organization (optionally a project).
11
+
12
+ ## Persistence model (Prisma)
13
+
14
+ Learning journey progress lives in the \`lssm_learning\` schema:
15
+
16
+ - \`Learner\` — one per \`(userId, organizationId)\`
17
+ - \`OnboardingTrack\` — seeded track definitions (trackKey, name, metadata)
18
+ - \`OnboardingStep\` — seeded step definitions (stepKey, completionCondition, xpReward, metadata)
19
+ - \`OnboardingProgress\` — learner × track progress (progress %, xpEarned, completedAt, dismissedAt)
20
+ - \`OnboardingStepCompletion\` — append-only completion records (stepKey, status, xpEarned, completedAt)
21
+
22
+ ## Track definition source (spec-first)
23
+
24
+ - Canonical track specs live in \`@lssm/example.learning-journey-registry\`.
25
+ - The Studio API seeds/updates the DB definitions via an idempotent “ensure tracks” routine.
26
+ - The DB is kept aligned with track specs (stale steps are removed) to prevent drift and unblock completion.
27
+
28
+ ## Progress advancement (event-driven)
29
+
30
+ 1) UI records an event via GraphQL \`recordLearningEvent\`
31
+ 2) Backend creates \`StudioLearningEvent\`
32
+ 3) Backend advances onboarding by matching the new event against step completion conditions
33
+ 4) Backend persists step completions and recomputes:
34
+ - \`progress\` percentage
35
+ - \`xpEarned\` (including streak/completion bonuses when configured)
36
+ - track completion state (\`completedAt\`)
37
+
38
+ ## GraphQL API (Studio)
39
+
40
+ - \`myOnboardingTracks(productId?, includeProgress?)\`
41
+ - returns all tracks + optional progress for the current learner
42
+ - \`myOnboardingProgress(trackKey)\`
43
+ - returns progress + step completion list for a single track
44
+ - \`dismissOnboardingTrack(trackKey)\`
45
+ - marks a track dismissed for the learner (prevents auto-coach)
46
+
47
+ ## UI routes/surfaces (web)
48
+
49
+ - \`/studio/learning\` — learning hub (track list + progress widget)
50
+ - \`/studio/learning/{trackKey}\` — track detail (steps + map)
51
+ - Studio shell mounts a **coach sheet** that can auto-open for incomplete, non-dismissed onboarding.
52
+
53
+ ## Security + data hygiene
54
+
55
+ - Do not put secrets/PII in \`payload\` fields of learning events.
56
+ - Prefer shallow payload filters (small, stable keys).
57
+ `}];e(t);export{t as tech_studio_learning_journeys_DocBlocks};
@@ -0,0 +1,63 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.platform-admin-panel`,title:`Studio Platform Admin Panel`,summary:`How PLATFORM_ADMIN organizations manage tenant orgs and integration connections without session switching.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/platform-admin-panel`,tags:[`studio`,`admin`,`multi-tenancy`,`integrations`,`better-auth`],body:`# Studio Platform Admin Panel
2
+
3
+ ContractSpec Studio exposes a dedicated **Platform Admin Panel** for users whose **active organization** has:
4
+
5
+ - \`Organization.type = PLATFORM_ADMIN\`
6
+
7
+ The UI route is:
8
+
9
+ - \`/studio/admin\`
10
+
11
+ ## Authorization model (no org switching)
12
+
13
+ Platform admins **remain in their own organization**. Cross-tenant actions are always explicit and scoped:
14
+
15
+ - Admin operations require an explicit \`targetOrganizationId\`.
16
+ - No session / activeOrganizationId switching is performed as part of admin operations.
17
+
18
+ ## Integrations management
19
+
20
+ The admin panel manages the full ContractSpec Integrations system:
21
+
22
+ - Lists all shipped \`IntegrationSpec\` entries (registry built via \`createDefaultIntegrationSpecRegistry()\`).
23
+ - CRUD \`IntegrationConnection\` records for a selected tenant org.
24
+
25
+ ### Secrets (reference-only + write-only)
26
+
27
+ The admin UI supports two modes:
28
+
29
+ - **Reference-only (BYOK)**: store only \`secretProvider\` + \`secretRef\`.
30
+ - **Write-only provisioning/rotation**: paste a raw secret payload; server writes to the selected backend and stores the resulting reference. The secret value is **never returned or displayed**.
31
+
32
+ Supported backends:
33
+
34
+ - Env overrides (\`env://...\`)
35
+ - Google Cloud Secret Manager (\`gcp://...\`)
36
+ - AWS Secrets Manager (\`aws://secretsmanager/...\`)
37
+ - Scaleway Secret Manager (\`scw://secret-manager/...\`)
38
+
39
+ ## Better Auth Admin plugin
40
+
41
+ The panel uses the Better Auth **Admin plugin** for user operations (list users, impersonation):
42
+
43
+ - Client calls use \`authClient.admin.*\`.
44
+ - Server-side, ContractSpec enforces that users in a PLATFORM_ADMIN active org have \`User.role\` containing \`admin\` so Better Auth Admin endpoints authorize.
45
+
46
+ ## GraphQL surface
47
+
48
+ The platform-admin GraphQL operations are guarded by the active org type and include:
49
+
50
+ - \`platformAdminOrganizations(search, limit, offset)\`
51
+ - \`platformAdminIntegrationSpecs\`
52
+ - \`platformAdminIntegrationConnections(input: { targetOrganizationId, category?, status? })\`
53
+ - \`platformAdminIntegrationConnectionCreate(input)\`
54
+ - \`platformAdminIntegrationConnectionUpdate(input)\`
55
+ - \`platformAdminIntegrationConnectionDelete(targetOrganizationId, connectionId)\`
56
+
57
+ ## Key implementation files
58
+
59
+ - Auth + role enforcement: \`packages/bundles/contractspec-studio/src/application/services/auth.ts\`
60
+ - Admin GraphQL module: \`packages/bundles/contractspec-studio/src/infrastructure/graphql/modules/platform-admin.ts\`
61
+ - Integrations admin service: \`packages/bundles/contractspec-studio/src/modules/platform-integrations/index.ts\`
62
+ - Web route: \`packages/apps/web-landing/src/app/(app-customer)/studio/admin/*\`
63
+ `}];e(t);export{t as tech_studio_platform_admin_panel_DocBlocks};
@@ -0,0 +1,36 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.project-access-teams`,title:`Studio Project Access via Teams`,summary:`Projects live under organizations; team sharing refines access with an admin/owner override.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/project-access-teams`,tags:[`studio`,`projects`,`teams`,`rbac`,`access-control`],body:`# Studio Project Access via Teams
2
+
3
+ Studio access control is **organization-first** with optional **team-based sharing**.
4
+
5
+ ## Data model
6
+
7
+ - \`Team\` and \`TeamMember\` define team membership inside an organization.
8
+ - \`StudioProject\` is owned by an organization.
9
+ - \`StudioProjectTeam\` links projects to 0..N teams.
10
+
11
+ ## Access rules
12
+
13
+ - **Admins/owners**: always have access to all projects in the organization.
14
+ - **Org-wide projects**: if a project has **no team links**, all organization members can access it.
15
+ - **Team-scoped projects**: if a project has **one or more team links**, a user must be a member of at least one linked team.
16
+
17
+ ## GraphQL surfaces
18
+
19
+ - Read:
20
+ - \`myStudioProjects\` (returns only projects you can access)
21
+ - \`studioProjectBySlug(slug)\` (enforces the same access rules)
22
+ - \`myTeams\`
23
+ - \`projectTeams(projectId)\`
24
+
25
+ - Write:
26
+ - \`createStudioProject(input.teamIds?)\` (teamIds optional)
27
+ - \`setProjectTeams(projectId, teamIds)\` (admin-only)
28
+
29
+ ## Related
30
+ +
31
+ +- Team administration + invitations: see \`/docs/tech/studio/team-invitations\`.
32
+ +
33
+ ## Notes
34
+
35
+ Payloads and events must avoid secrets/PII. For Sandbox, the model remains local-first and unlogged.
36
+ `}];e(t);export{t as tech_studio_project_access_teams_DocBlocks};
@@ -0,0 +1 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.project-routing`,title:`Studio Project Routing`,summary:`Studio uses slugged, project-first routes: /studio/{projectSlug}/* with canonical slug redirects and soft-deleted projects hidden.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/project-routing`,tags:[`studio`,`routing`,`projects`,`slug`,`redirects`],body:"# Studio Project Routing\n\nContractSpec Studio uses a **project-first URL scheme**:\n\n- `/studio/projects` — create, select, and delete projects.\n- `/studio/{projectSlug}/*` — project modules (canvas/specs/deploy/integrations/evolution/learning).\n- `/studio/learning` — learning hub that does not require selecting a project.\n\n## Studio layout shell\n\nStudio routes are wrapped in a dedicated **Studio app shell** (header + footer) that provides in-app navigation (Projects/Learning/Teams), organization switching, and account actions.\n\nProject module routes (`/studio/{projectSlug}/*`) render their own module shell (`WorkspaceProjectShellLayout`). When combined with the global Studio header, the project shell uses a **sticky header offset** to avoid overlapping sticky headers.\n\n## Slug behavior (rename-safe)\n\n- Each project has a `slug` stored in the database (`StudioProject.slug`).\n- When a project name changes, Studio **updates the slug** and stores the previous slug as an alias (`StudioProjectSlugAlias`).\n- Requests to an alias slug are **redirected to the canonical slug**.\n\nGraphQL entrypoint:\n\n- `studioProjectBySlug(slug: String!)` returns:\n - `project`\n - `canonicalSlug`\n - `wasRedirect`\n\n## Deletion behavior (soft delete)\n\nProjects are **soft-deleted**:\n\n- `deleteStudioProject(id: String!)` sets `StudioProject.deletedAt`.\n- All listings and access checks filter `deletedAt = null`.\n- Soft-deleted projects are treated as “not found” in Studio routes and GraphQL access checks.\n\n## Available modules for a selected project\n\nThe following project modules are expected under `/studio/{projectSlug}`:\n\n- `/canvas` — Visual builder canvas (stored via overlays and canvas versions).\n- `/specs` — Spec editor (stored as `StudioSpec`).\n- `/deploy` — Deployments history + triggers (stored as `StudioDeployment`).\n- `/integrations` — Integrations scoped to project (stored as `StudioIntegration`).\n- `/evolution` — Evolution sessions (stored as `EvolutionSession`).\n- `/learning` — Project learning activity.\n"}];e(t);export{t as tech_studio_project_routing_DocBlocks};
@@ -0,0 +1,20 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.sandbox.unlogged`,title:`Sandbox (unlogged) vs Studio (authenticated)`,summary:`The sandbox is a lightweight, unlogged surface that mirrors Studio navigation without auth or analytics.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/sandbox-unlogged`,tags:[`studio`,`sandbox`,`privacy`,`analytics`],body:`## Sandbox guarantees
2
+
3
+ - Route: \`/sandbox\`
4
+ - **No auth requirement**
5
+ - **No PostHog init**
6
+ - **No Vercel Analytics**
7
+ - Local-only state (in-browser runtime + localStorage where needed)
8
+
9
+ ## What Sandbox is for
10
+
11
+ - Try templates and feature modules safely
12
+ - Preview specs/builder/evolution/learning
13
+ - Produce copyable CLI commands (no side effects)
14
+
15
+ ## What Sandbox is *not* for
16
+
17
+ - Persisted projects/workspaces
18
+ - Real deployments
19
+ - Organization-scoped integrations (unless explicitly enabled later)
20
+ `}];e(t);export{t as tech_studio_sandbox_unlogged_DocBlocks};
@@ -0,0 +1,65 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.team-invitations`,title:`Studio Teams & Invitations`,summary:`Admin-only team management and email invitation flow to join an organization and optionally a team.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/team-invitations`,tags:[`studio`,`teams`,`invitations`,`access-control`,`onboarding`],body:`# Studio Teams & Invitations
2
+
3
+ Studio uses **organization membership** as the base access model. Teams are optional and used to refine access to projects.
4
+
5
+ ## Who can manage teams?
6
+
7
+ - **Admins/owners only**: create, rename, delete teams; manage project team access; issue invitations.
8
+
9
+ ## Invitation data model
10
+
11
+ - \`Invitation\` rows are stored under an organization and target an **email** address.
12
+
13
+ - An invitation can optionally target a \`teamId\`, which will grant the user membership in that team upon acceptance.
14
+
15
+ Key fields:
16
+ - \`email\`: invited address (must match the accepting user's account email)
17
+
18
+ - \`status\`: \`pending | accepted | declined | expired\`
19
+
20
+ - \`teamId?\`: optional team to join
21
+
22
+ - \`inviterId\`: user who issued the invitation
23
+
24
+ ## GraphQL surfaces
25
+
26
+ - Team CRUD (admin-only):
27
+
28
+ - \`createTeam(name)\`
29
+
30
+ - \`renameTeam(teamId, name)\`
31
+
32
+ - \`deleteTeam(teamId)\`
33
+
34
+
35
+ - Invitations (admin-only):
36
+
37
+ - \`organizationInvitations\`
38
+
39
+ - \`inviteToOrganization(email, role?, teamId?)\` → returns \`inviteUrl\` and whether an email was sent
40
+
41
+ ## Accepting an invitation
42
+
43
+ The invite link is served as:
44
+
45
+ - \`/invite/{invitationId}\`
46
+
47
+ Acceptance rules:
48
+ - The user must be authenticated.
49
+
50
+ - The authenticated user’s email must match \`Invitation.email\`.
51
+
52
+ - If not already a member, create \`Member(userId, organizationId, role)\`.
53
+
54
+ - If \`teamId\` is present, ensure \`TeamMember(teamId, userId)\`.
55
+
56
+ - Mark invitation \`status='accepted'\` and set \`acceptedAt\`.
57
+
58
+ - Set \`activeOrganizationId\` for the session so \`/studio/*\` routes work immediately.
59
+
60
+ ## Email delivery
61
+
62
+ - If \`RESEND_API_KEY\` is set, the system attempts to send an email.
63
+
64
+ - Otherwise, the UI uses the returned \`inviteUrl\` for manual copy/share.
65
+ `}];e(t);export{t as tech_studio_team_invitations_DocBlocks};
@@ -0,0 +1 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.workspace_ops`,title:`Workspace ops (repo-linked): list / validate / deps / diff`,summary:`Read-only repo operations used by Studio to inspect and validate a linked ContractSpec workspace.`,kind:`reference`,visibility:`mixed`,route:`/docs/tech/studio/workspace-ops`,tags:[`studio`,`repo`,`workspace`,`validate`,`diff`],body:"## API surface (api-contractspec)\n\nBase: `/api/workspace-ops`\n\nThese endpoints are **read-only** in v1 and never push to git:\n\n- `GET /api/workspace-ops/:integrationId/config?organizationId=`\n- `GET /api/workspace-ops/:integrationId/specs?organizationId=`\n- `POST /api/workspace-ops/:integrationId/validate` (body: organizationId, files?, pattern?)\n- `POST /api/workspace-ops/:integrationId/deps` (body: organizationId, pattern?)\n- `POST /api/workspace-ops/:integrationId/diff` (body: organizationId, specPath, baseline?, breakingOnly?)\n\n## Repo resolution\n\n- The repo root is resolved from the Studio Integration (`IntegrationProvider.GITHUB`) config:\n - `config.repoCachePath` (preferred) or `config.localPath`\n- Resolution is constrained to `CONTRACTSPEC_REPO_CACHE_DIR` (default: `/tmp/contractspec-repos`)\n\n## Intended UX\n\n- Studio Assistant can run these checks and present results as suggestions.\n- Users can copy equivalent CLI commands for local runs:\n - `contractspec validate`\n - `contractspec deps`\n - `contractspec diff --baseline <ref>`\n"}];e(t);export{t as tech_studio_workspace_ops_DocBlocks};
@@ -0,0 +1,41 @@
1
+ import{registerDocBlocks as e}from"../../registry.js";const t=[{id:`docs.tech.studio.workspaces`,title:`Studio projects, teams, environments`,summary:`Organization-first Studio: projects live under an organization; teams refine access; projects deploy to multiple environments.`,kind:`reference`,visibility:`mixed`,route:`/docs/tech/studio/workspaces`,tags:[`studio`,`projects`,`teams`,`rbac`,`environments`],body:`## Concepts
2
+
3
+ - **Organization**: the primary grouping boundary for Studio projects.
4
+ - **Project**: one application (specs, overlays, deployments, integrations, evolution, learning).
5
+ - **Team**: refines who can see/edit a project within an organization.
6
+ - **Environment**: deployment target (Development / Staging / Production).
7
+
8
+ ## Project access (teams + admin override)
9
+
10
+ Studio uses multi-team sharing to refine access:
11
+
12
+ - **Admins/owners** can access all projects.
13
+ - If a project is shared with **no teams**, it is **org-wide** (all org members).
14
+ - If a project is shared with **one or more teams**, it is visible to:
15
+ - admins/owners, and
16
+ - members of any linked team.
17
+
18
+ ## Current persistence (DB + GraphQL)
19
+
20
+ - DB (Prisma): \`StudioProject\`, \`Team\`, \`TeamMember\`, \`StudioProjectTeam\`
21
+ - GraphQL:
22
+ - \`myStudioProjects\`
23
+ - \`createStudioProject(input.teamIds?)\`
24
+ - \`myTeams\`
25
+ - \`projectTeams(projectId)\`
26
+ - \`setProjectTeams(projectId, teamIds)\`
27
+
28
+ ## UI shell behavior
29
+
30
+ Studio and Sandbox both use a shared shell:
31
+
32
+ - Project selector → Module navigation → Environment selector
33
+ - Always-on Assistant button (floating)
34
+ - Learning journey progress (Studio persists learning events; Sandbox stays local-only)
35
+
36
+ ## Routing
37
+
38
+ - \`/studio/projects\`: create/select/delete projects (organization-first).
39
+ - \`/studio/{projectSlug}/*\`: project modules (canvas/specs/deploy/integrations/evolution/learning).
40
+ - \`/studio/learning\`: learning hub without selecting a project.
41
+ `}];e(t);export{t as tech_studio_workspaces_DocBlocks};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{CapabilityRegistry as e,capabilityKey as t,defineCapability as n}from"./capabilities.js";import{DataViewRegistry as r,dataViewKey as i}from"./data-views.js";import{defineEvent as a,eventKey as o}from"./events.js";import{FeatureRegistry as s,installFeature as c,validateFeatureTargetsV2 as l}from"./features.js";import{FormRegistry as u,buildZodWithRelations as d,defineFormSpec as f,evalPredicate as p}from"./forms.js";import{schemaToMarkdown as m,schemaToMarkdownDetail as h,schemaToMarkdownList as g,schemaToMarkdownSummary as _,schemaToMarkdownTable as v}from"./schema-to-markdown.js";import{TransformEngine as y,createDefaultTransformEngine as b,registerBasicValidation as x,registerDefaultReactRenderer as S,registerReactToMarkdownRenderer as C}from"./presentations.v2.js";import{createEngineWithDefaults as w,createFeatureModule as T,registerFeature as E,renderFeaturePresentation as D}from"./client/react/feature-render.js";import{createFormRenderer as O}from"./client/react/form-render.js";import{shadcnDriver as k}from"./client/react/drivers/shadcn.js";import{rnReusablesDriver as A}from"./client/react/drivers/rn-reusables.js";import"./client/index.js";import{defaultGqlField as j,defaultMcpTool as M,defaultRestPath as N,jsonSchemaForSpec as P}from"./jsonschema.js";import{registerContractsOnBuilder as F}from"./server/graphql-pothos.js";import{PresentationRegistry as I,jsonSchemaForPresentation as L}from"./presentations.js";import{createMcpServer as R}from"./server/mcp/createMcpServer.js";import{createFetchHandler as z}from"./server/rest-generic.js";import{elysiaPlugin as B}from"./server/rest-elysia.js";import{expressRouter as V}from"./server/rest-express.js";import{makeNextAppHandler as H}from"./server/rest-next-app.js";import{makeNextPagesHandler as U}from"./server/rest-next-pages.js";import"./server/index.js";import{defineCommand as W,defineQuery as G,isEmitDeclRef as K}from"./spec.js";import{docBlockToPresentationSpec as q,docBlockToPresentationV2 as J,docBlocksToPresentationRoutes as Y,docBlocksToPresentationSpecs as X,mapDocRoutes as Z}from"./docs/presentations.js";import{DocRegistry as Q,defaultDocRegistry as $,docId as ee,listRegisteredDocBlocks as te,registerDocBlocks as ne}from"./docs/registry.js";import{SpecRegistry as re,opKey as ie}from"./registry.js";import{Owners as ae,OwnersEnum as oe,StabilityEnum as se,Tags as ce,TagsEnum as le}from"./ownership.js";import{ContractRegistryFileSchema as ue,ContractRegistryItemSchema as de,ContractRegistryItemTypeSchema as fe,ContractRegistryManifestSchema as pe}from"./contract-registry/schemas.js";import"./contract-registry/index.js";import{installOp as me,makeEmit as he,op as ge}from"./install.js";import{openApiForRegistry as _e}from"./openapi.js";import{definePrompt as ve}from"./prompt.js";import{PromptRegistry as ye}from"./promptRegistry.js";import{ResourceRegistry as be,defineResourceTemplate as xe,isResourceRef as Se,resourceRef as Ce}from"./resources.js";import{toV2FromV1 as we}from"./presentations.backcompat.js";import{CompleteOnboardingBaseInput as Te,CompleteOnboardingBaseOutput as Ee,CompleteOnboardingBaseSpec as De,DeleteOnboardingDraftBaseSpec as Oe,DeleteOnboardingDraftOutput as ke,GetOnboardingDraftBaseSpec as Ae,GetOnboardingDraftOutput as je,SaveOnboardingDraftBaseSpec as Me,SaveOnboardingDraftInput as Ne,SaveOnboardingDraftOutput as Pe}from"./onboarding-base.js";import{openBankingAccountsReadCapability as Fe,openBankingBalancesReadCapability as Ie,openBankingTransactionsReadCapability as Le,registerOpenBankingCapabilities as Re}from"./capabilities/openbanking.js";import{PolicyRegistry as ze,makePolicyKey as Be}from"./policy/spec.js";import{PolicyEngine as Ve}from"./policy/engine.js";import{OPAPolicyAdapter as He,buildOPAInput as Ue}from"./policy/opa-adapter.js";import{ThemeRegistry as We,makeThemeRef as Ge}from"./themes.js";import{MigrationRegistry as Ke}from"./migrations.js";import{TelemetryRegistry as qe,makeTelemetryKey as Je}from"./telemetry/spec.js";import{TelemetryTracker as Ye}from"./telemetry/tracker.js";import{TelemetryAnomalyMonitor as Xe}from"./telemetry/anomaly.js";import"./telemetry/index.js";import{TestRegistry as Ze,makeTestKey as Qe}from"./tests/spec.js";import{TestRunner as $e}from"./tests/runner.js";import"./tests/index.js";import{ExperimentRegistry as et,makeExperimentKey as tt}from"./experiments/spec.js";import{ExperimentEvaluator as nt}from"./experiments/evaluator.js";import{AppBlueprintRegistry as rt,makeAppBlueprintKey as it}from"./app-config/spec.js";import{composeAppConfig as at,resolveAppConfig as ot}from"./app-config/runtime.js";import{IntegrationSpecRegistry as st,makeIntegrationSpecKey as ct}from"./integrations/spec.js";import{registerStripeIntegration as lt,stripeIntegrationSpec as ut}from"./integrations/providers/stripe.js";import{postmarkIntegrationSpec as dt,registerPostmarkIntegration as ft}from"./integrations/providers/postmark.js";import{qdrantIntegrationSpec as pt,registerQdrantIntegration as mt}from"./integrations/providers/qdrant.js";import{mistralIntegrationSpec as ht,registerMistralIntegration as gt}from"./integrations/providers/mistral.js";import{elevenLabsIntegrationSpec as _t,registerElevenLabsIntegration as vt}from"./integrations/providers/elevenlabs.js";import{gmailIntegrationSpec as yt,registerGmailIntegration as bt}from"./integrations/providers/gmail.js";import{googleCalendarIntegrationSpec as xt,registerGoogleCalendarIntegration as St}from"./integrations/providers/google-calendar.js";import{registerTwilioSmsIntegration as Ct,twilioSmsIntegrationSpec as wt}from"./integrations/providers/twilio-sms.js";import{gcsStorageIntegrationSpec as Tt,registerGcsStorageIntegration as Et}from"./integrations/providers/gcs-storage.js";import{powensIntegrationSpec as Dt,registerPowensIntegration as Ot}from"./integrations/providers/powens.js";import{AccountBalanceRecord as kt,BankAccountRecord as At,BankTransactionRecord as jt}from"./integrations/openbanking/models.js";import{OPENBANKING_PII_FIELDS as Mt,OPENBANKING_TELEMETRY_EVENTS as Nt,redactOpenBankingTelemetryPayload as Pt}from"./integrations/openbanking/telemetry.js";import{OpenBankingGetAccount as Ft,OpenBankingListAccounts as It,OpenBankingSyncAccounts as Lt}from"./integrations/openbanking/contracts/accounts.js";import{OpenBankingListTransactions as Rt,OpenBankingSyncTransactions as zt}from"./integrations/openbanking/contracts/transactions.js";import{OpenBankingGetBalances as Bt,OpenBankingRefreshBalances as Vt}from"./integrations/openbanking/contracts/balances.js";import{registerOpenBankingContracts as Ht}from"./integrations/openbanking/contracts/index.js";import{assertPrimaryOpenBankingReady as Ut,ensurePrimaryOpenBankingIntegration as Wt}from"./integrations/openbanking/guards.js";import"./integrations/index.js";import{KnowledgeSpaceRegistry as Gt,makeKnowledgeSpaceKey as Kt}from"./knowledge/spec.js";import{productCanonKnowledgeSpace as qt,registerProductCanonKnowledgeSpace as Jt}from"./knowledge/spaces/product-canon.js";import{registerSupportFaqKnowledgeSpace as Yt,supportFaqKnowledgeSpace as Xt}from"./knowledge/spaces/support-faq.js";import{emailThreadsKnowledgeSpace as Zt,registerEmailThreadsKnowledgeSpace as Qt}from"./knowledge/spaces/email-threads.js";import{registerUploadedDocsKnowledgeSpace as $t,uploadedDocsKnowledgeSpace as en}from"./knowledge/spaces/uploaded-docs.js";import{financialDocsKnowledgeSpace as tn,registerFinancialDocsKnowledgeSpace as nn}from"./knowledge/spaces/financial-docs.js";import{financialOverviewKnowledgeSpace as rn,registerFinancialOverviewKnowledgeSpace as an}from"./knowledge/spaces/financial-overview.js";import"./knowledge/index.js";import{CreateIntegrationConnection as on,DeleteIntegrationConnection as sn,ListIntegrationConnections as cn,TestIntegrationConnection as ln,UpdateIntegrationConnection as un,integrationContracts as dn,registerIntegrationContracts as fn}from"./integrations/contracts.js";import{CreateKnowledgeSource as pn,DeleteKnowledgeSource as mn,ListKnowledgeSources as hn,TriggerKnowledgeSourceSync as gn,UpdateKnowledgeSource as _n,knowledgeContracts as vn,registerKnowledgeContracts as yn}from"./knowledge/contracts.js";import{behaviorToEnvelope as bn,errorToEnvelope as xn,telemetryToEnvelope as Sn}from"./regenerator/utils.js";import{RegeneratorService as Cn}from"./regenerator/service.js";import{ProposalExecutor as wn}from"./regenerator/executor.js";import{ExecutorProposalSink as Tn}from"./regenerator/sinks.js";import"./regenerator/index.js";import{WorkflowRegistry as En}from"./workflow/spec.js";import{WorkflowValidationError as Dn,assertWorkflowSpecValid as On,validateWorkflowSpec as kn}from"./workflow/validation.js";import{evaluateExpression as An}from"./workflow/expression.js";import{WorkflowPreFlightError as jn,WorkflowRunner as Mn}from"./workflow/runner.js";import{InMemoryStateStore as Nn}from"./workflow/adapters/memory-store.js";import{PrismaStateStore as Pn}from"./workflow/adapters/db-adapter.js";import{createFileStateStore as Fn}from"./workflow/adapters/file-adapter.js";import"./workflow/index.js";import{techContractsDocs as In}from"./docs/tech-contracts.docs.js";import{metaDocs as Ln}from"./docs/meta.docs.js";import"./docs/index.js";import{defineSchemaModel as Rn}from"@lssm/lib.schema";export{kt as AccountBalanceRecord,rt as AppBlueprintRegistry,At as BankAccountRecord,jt as BankTransactionRecord,e as CapabilityRegistry,Te as CompleteOnboardingBaseInput,Ee as CompleteOnboardingBaseOutput,De as CompleteOnboardingBaseSpec,ue as ContractRegistryFileSchema,de as ContractRegistryItemSchema,fe as ContractRegistryItemTypeSchema,pe as ContractRegistryManifestSchema,on as CreateIntegrationConnection,pn as CreateKnowledgeSource,r as DataViewRegistry,sn as DeleteIntegrationConnection,mn as DeleteKnowledgeSource,Oe as DeleteOnboardingDraftBaseSpec,ke as DeleteOnboardingDraftOutput,Q as DocRegistry,Tn as ExecutorProposalSink,nt as ExperimentEvaluator,et as ExperimentRegistry,s as FeatureRegistry,u as FormRegistry,Ae as GetOnboardingDraftBaseSpec,je as GetOnboardingDraftOutput,Nn as InMemoryStateStore,st as IntegrationSpecRegistry,Gt as KnowledgeSpaceRegistry,cn as ListIntegrationConnections,hn as ListKnowledgeSources,Ke as MigrationRegistry,He as OPAPolicyAdapter,Mt as OPENBANKING_PII_FIELDS,Nt as OPENBANKING_TELEMETRY_EVENTS,Ft as OpenBankingGetAccount,Bt as OpenBankingGetBalances,It as OpenBankingListAccounts,Rt as OpenBankingListTransactions,Vt as OpenBankingRefreshBalances,Lt as OpenBankingSyncAccounts,zt as OpenBankingSyncTransactions,ae as Owners,oe as OwnersEnum,Ve as PolicyEngine,ze as PolicyRegistry,I as PresentationRegistry,Pn as PrismaStateStore,ye as PromptRegistry,wn as ProposalExecutor,Cn as RegeneratorService,be as ResourceRegistry,Me as SaveOnboardingDraftBaseSpec,Ne as SaveOnboardingDraftInput,Pe as SaveOnboardingDraftOutput,re as SpecRegistry,se as StabilityEnum,ce as Tags,le as TagsEnum,Xe as TelemetryAnomalyMonitor,qe as TelemetryRegistry,Ye as TelemetryTracker,ln as TestIntegrationConnection,Ze as TestRegistry,$e as TestRunner,We as ThemeRegistry,y as TransformEngine,gn as TriggerKnowledgeSourceSync,un as UpdateIntegrationConnection,_n as UpdateKnowledgeSource,jn as WorkflowPreFlightError,En as WorkflowRegistry,Mn as WorkflowRunner,Dn as WorkflowValidationError,Ut as assertPrimaryOpenBankingReady,On as assertWorkflowSpecValid,bn as behaviorToEnvelope,Ue as buildOPAInput,d as buildZodWithRelations,t as capabilityKey,at as composeAppConfig,b as createDefaultTransformEngine,w as createEngineWithDefaults,T as createFeatureModule,z as createFetchHandler,Fn as createFileStateStore,O as createFormRenderer,R as createMcpServer,i as dataViewKey,$ as defaultDocRegistry,j as defaultGqlField,M as defaultMcpTool,N as defaultRestPath,n as defineCapability,W as defineCommand,a as defineEvent,f as defineFormSpec,ve as definePrompt,G as defineQuery,xe as defineResourceTemplate,Rn as defineSchemaModel,q as docBlockToPresentationSpec,J as docBlockToPresentationV2,Y as docBlocksToPresentationRoutes,X as docBlocksToPresentationSpecs,ee as docId,_t as elevenLabsIntegrationSpec,B as elysiaPlugin,Zt as emailThreadsKnowledgeSpace,Wt as ensurePrimaryOpenBankingIntegration,xn as errorToEnvelope,p as evalPredicate,An as evaluateExpression,o as eventKey,V as expressRouter,tn as financialDocsKnowledgeSpace,rn as financialOverviewKnowledgeSpace,Tt as gcsStorageIntegrationSpec,yt as gmailIntegrationSpec,xt as googleCalendarIntegrationSpec,c as installFeature,me as installOp,dn as integrationContracts,K as isEmitDeclRef,Se as isResourceRef,L as jsonSchemaForPresentation,P as jsonSchemaForSpec,vn as knowledgeContracts,te as listRegisteredDocBlocks,it as makeAppBlueprintKey,he as makeEmit,tt as makeExperimentKey,ct as makeIntegrationSpecKey,Kt as makeKnowledgeSpaceKey,H as makeNextAppHandler,U as makeNextPagesHandler,Be as makePolicyKey,Je as makeTelemetryKey,Qe as makeTestKey,Ge as makeThemeRef,Z as mapDocRoutes,Ln as metaDocs,ht as mistralIntegrationSpec,ge as op,ie as opKey,_e as openApiForRegistry,Fe as openBankingAccountsReadCapability,Ie as openBankingBalancesReadCapability,Le as openBankingTransactionsReadCapability,dt as postmarkIntegrationSpec,Dt as powensIntegrationSpec,qt as productCanonKnowledgeSpace,pt as qdrantIntegrationSpec,Pt as redactOpenBankingTelemetryPayload,x as registerBasicValidation,F as registerContractsOnBuilder,S as registerDefaultReactRenderer,ne as registerDocBlocks,vt as registerElevenLabsIntegration,Qt as registerEmailThreadsKnowledgeSpace,E as registerFeature,nn as registerFinancialDocsKnowledgeSpace,an as registerFinancialOverviewKnowledgeSpace,Et as registerGcsStorageIntegration,bt as registerGmailIntegration,St as registerGoogleCalendarIntegration,fn as registerIntegrationContracts,yn as registerKnowledgeContracts,gt as registerMistralIntegration,Re as registerOpenBankingCapabilities,Ht as registerOpenBankingContracts,ft as registerPostmarkIntegration,Ot as registerPowensIntegration,Jt as registerProductCanonKnowledgeSpace,mt as registerQdrantIntegration,C as registerReactToMarkdownRenderer,lt as registerStripeIntegration,Yt as registerSupportFaqKnowledgeSpace,Ct as registerTwilioSmsIntegration,$t as registerUploadedDocsKnowledgeSpace,D as renderFeaturePresentation,ot as resolveAppConfig,Ce as resourceRef,A as rnReusablesDriver,m as schemaToMarkdown,h as schemaToMarkdownDetail,g as schemaToMarkdownList,_ as schemaToMarkdownSummary,v as schemaToMarkdownTable,k as shadcnDriver,ut as stripeIntegrationSpec,Xt as supportFaqKnowledgeSpace,In as techContractsDocs,Sn as telemetryToEnvelope,we as toV2FromV1,wt as twilioSmsIntegrationSpec,en as uploadedDocsKnowledgeSpace,l as validateFeatureTargetsV2,kn as validateWorkflowSpec};
1
+ import{CapabilityRegistry as e,capabilityKey as t,defineCapability as n}from"./capabilities.js";import{DataViewRegistry as r,dataViewKey as i}from"./data-views.js";import{defineEvent as a,eventKey as o}from"./events.js";import{FeatureRegistry as s,installFeature as c,validateFeatureTargetsV2 as l}from"./features.js";import{FormRegistry as u,buildZodWithRelations as d,defineFormSpec as f,evalPredicate as p}from"./forms.js";import{schemaToMarkdown as m,schemaToMarkdownDetail as h,schemaToMarkdownList as g,schemaToMarkdownSummary as _,schemaToMarkdownTable as v}from"./schema-to-markdown.js";import{TransformEngine as y,createDefaultTransformEngine as b,registerBasicValidation as x,registerDefaultReactRenderer as S,registerReactToMarkdownRenderer as C}from"./presentations.v2.js";import{createEngineWithDefaults as w,createFeatureModule as T,registerFeature as E,renderFeaturePresentation as D}from"./client/react/feature-render.js";import{createFormRenderer as O}from"./client/react/form-render.js";import{shadcnDriver as k}from"./client/react/drivers/shadcn.js";import{rnReusablesDriver as A}from"./client/react/drivers/rn-reusables.js";import"./client/index.js";import{defaultGqlField as j,defaultMcpTool as M,defaultRestPath as N,jsonSchemaForSpec as P}from"./jsonschema.js";import{registerContractsOnBuilder as F}from"./server/graphql-pothos.js";import{PresentationRegistry as I,jsonSchemaForPresentation as L}from"./presentations.js";import{createMcpServer as R}from"./server/mcp/createMcpServer.js";import{createFetchHandler as z}from"./server/rest-generic.js";import{elysiaPlugin as B}from"./server/rest-elysia.js";import{expressRouter as V}from"./server/rest-express.js";import{makeNextAppHandler as H}from"./server/rest-next-app.js";import{makeNextPagesHandler as U}from"./server/rest-next-pages.js";import"./server/index.js";import{defineCommand as W,defineQuery as G,isEmitDeclRef as K}from"./spec.js";import{docBlockToPresentationSpec as q,docBlockToPresentationV2 as J,docBlocksToPresentationRoutes as Y,docBlocksToPresentationSpecs as X,mapDocRoutes as Z}from"./docs/presentations.js";import{DocRegistry as Q,defaultDocRegistry as $,docId as ee,listRegisteredDocBlocks as te,registerDocBlocks as ne}from"./docs/registry.js";import{SpecRegistry as re,opKey as ie}from"./registry.js";import{Owners as ae,OwnersEnum as oe,StabilityEnum as se,Tags as ce,TagsEnum as le}from"./ownership.js";import{ContractRegistryFileSchema as ue,ContractRegistryItemSchema as de,ContractRegistryItemTypeSchema as fe,ContractRegistryManifestSchema as pe}from"./contract-registry/schemas.js";import"./contract-registry/index.js";import{installOp as me,makeEmit as he,op as ge}from"./install.js";import{openApiForRegistry as _e}from"./openapi.js";import{definePrompt as ve}from"./prompt.js";import{PromptRegistry as ye}from"./promptRegistry.js";import{ResourceRegistry as be,defineResourceTemplate as xe,isResourceRef as Se,resourceRef as Ce}from"./resources.js";import{toV2FromV1 as we}from"./presentations.backcompat.js";import{CompleteOnboardingBaseInput as Te,CompleteOnboardingBaseOutput as Ee,CompleteOnboardingBaseSpec as De,DeleteOnboardingDraftBaseSpec as Oe,DeleteOnboardingDraftOutput as ke,GetOnboardingDraftBaseSpec as Ae,GetOnboardingDraftOutput as je,SaveOnboardingDraftBaseSpec as Me,SaveOnboardingDraftInput as Ne,SaveOnboardingDraftOutput as Pe}from"./onboarding-base.js";import{openBankingAccountsReadCapability as Fe,openBankingBalancesReadCapability as Ie,openBankingTransactionsReadCapability as Le,registerOpenBankingCapabilities as Re}from"./capabilities/openbanking.js";import{PolicyRegistry as ze,makePolicyKey as Be}from"./policy/spec.js";import{PolicyEngine as Ve}from"./policy/engine.js";import{OPAPolicyAdapter as He,buildOPAInput as Ue}from"./policy/opa-adapter.js";import{ThemeRegistry as We,makeThemeRef as Ge}from"./themes.js";import{MigrationRegistry as Ke}from"./migrations.js";import{TelemetryRegistry as qe,makeTelemetryKey as Je}from"./telemetry/spec.js";import{TelemetryTracker as Ye}from"./telemetry/tracker.js";import{TelemetryAnomalyMonitor as Xe}from"./telemetry/anomaly.js";import"./telemetry/index.js";import{TestRegistry as Ze,makeTestKey as Qe}from"./tests/spec.js";import{TestRunner as $e}from"./tests/runner.js";import"./tests/index.js";import{ExperimentRegistry as et,makeExperimentKey as tt}from"./experiments/spec.js";import{ExperimentEvaluator as nt}from"./experiments/evaluator.js";import{AppBlueprintRegistry as rt,makeAppBlueprintKey as it}from"./app-config/spec.js";import{composeAppConfig as at,resolveAppConfig as ot}from"./app-config/runtime.js";import{IntegrationSpecRegistry as st,makeIntegrationSpecKey as ct}from"./integrations/spec.js";import{registerStripeIntegration as lt,stripeIntegrationSpec as ut}from"./integrations/providers/stripe.js";import{postmarkIntegrationSpec as dt,registerPostmarkIntegration as ft}from"./integrations/providers/postmark.js";import{qdrantIntegrationSpec as pt,registerQdrantIntegration as mt}from"./integrations/providers/qdrant.js";import{mistralIntegrationSpec as ht,registerMistralIntegration as gt}from"./integrations/providers/mistral.js";import{elevenLabsIntegrationSpec as _t,registerElevenLabsIntegration as vt}from"./integrations/providers/elevenlabs.js";import{gmailIntegrationSpec as yt,registerGmailIntegration as bt}from"./integrations/providers/gmail.js";import{googleCalendarIntegrationSpec as xt,registerGoogleCalendarIntegration as St}from"./integrations/providers/google-calendar.js";import{registerTwilioSmsIntegration as Ct,twilioSmsIntegrationSpec as wt}from"./integrations/providers/twilio-sms.js";import{gcsStorageIntegrationSpec as Tt,registerGcsStorageIntegration as Et}from"./integrations/providers/gcs-storage.js";import{powensIntegrationSpec as Dt,registerPowensIntegration as Ot}from"./integrations/providers/powens.js";import{createDefaultIntegrationSpecRegistry as kt}from"./integrations/providers/registry.js";import{AccountBalanceRecord as At,BankAccountRecord as jt,BankTransactionRecord as Mt}from"./integrations/openbanking/models.js";import{OPENBANKING_PII_FIELDS as Nt,OPENBANKING_TELEMETRY_EVENTS as Pt,redactOpenBankingTelemetryPayload as Ft}from"./integrations/openbanking/telemetry.js";import{OpenBankingGetAccount as It,OpenBankingListAccounts as Lt,OpenBankingSyncAccounts as Rt}from"./integrations/openbanking/contracts/accounts.js";import{OpenBankingListTransactions as zt,OpenBankingSyncTransactions as Bt}from"./integrations/openbanking/contracts/transactions.js";import{OpenBankingGetBalances as Vt,OpenBankingRefreshBalances as Ht}from"./integrations/openbanking/contracts/balances.js";import{registerOpenBankingContracts as Ut}from"./integrations/openbanking/contracts/index.js";import{assertPrimaryOpenBankingReady as Wt,ensurePrimaryOpenBankingIntegration as Gt}from"./integrations/openbanking/guards.js";import"./integrations/index.js";import{KnowledgeSpaceRegistry as Kt,makeKnowledgeSpaceKey as qt}from"./knowledge/spec.js";import{productCanonKnowledgeSpace as Jt,registerProductCanonKnowledgeSpace as Yt}from"./knowledge/spaces/product-canon.js";import{registerSupportFaqKnowledgeSpace as Xt,supportFaqKnowledgeSpace as Zt}from"./knowledge/spaces/support-faq.js";import{emailThreadsKnowledgeSpace as Qt,registerEmailThreadsKnowledgeSpace as $t}from"./knowledge/spaces/email-threads.js";import{registerUploadedDocsKnowledgeSpace as en,uploadedDocsKnowledgeSpace as tn}from"./knowledge/spaces/uploaded-docs.js";import{financialDocsKnowledgeSpace as nn,registerFinancialDocsKnowledgeSpace as rn}from"./knowledge/spaces/financial-docs.js";import{financialOverviewKnowledgeSpace as an,registerFinancialOverviewKnowledgeSpace as on}from"./knowledge/spaces/financial-overview.js";import"./knowledge/index.js";import{CreateIntegrationConnection as sn,DeleteIntegrationConnection as cn,ListIntegrationConnections as ln,TestIntegrationConnection as un,UpdateIntegrationConnection as dn,integrationContracts as fn,registerIntegrationContracts as pn}from"./integrations/contracts.js";import{CreateKnowledgeSource as mn,DeleteKnowledgeSource as hn,ListKnowledgeSources as gn,TriggerKnowledgeSourceSync as _n,UpdateKnowledgeSource as vn,knowledgeContracts as yn,registerKnowledgeContracts as bn}from"./knowledge/contracts.js";import{behaviorToEnvelope as xn,errorToEnvelope as Sn,telemetryToEnvelope as Cn}from"./regenerator/utils.js";import{RegeneratorService as wn}from"./regenerator/service.js";import{ProposalExecutor as Tn}from"./regenerator/executor.js";import{ExecutorProposalSink as En}from"./regenerator/sinks.js";import"./regenerator/index.js";import{WorkflowRegistry as Dn}from"./workflow/spec.js";import{WorkflowValidationError as On,assertWorkflowSpecValid as kn,validateWorkflowSpec as An}from"./workflow/validation.js";import{evaluateExpression as jn}from"./workflow/expression.js";import{WorkflowPreFlightError as Mn,WorkflowRunner as Nn}from"./workflow/runner.js";import{InMemoryStateStore as Pn}from"./workflow/adapters/memory-store.js";import{PrismaStateStore as Fn}from"./workflow/adapters/db-adapter.js";import{createFileStateStore as In}from"./workflow/adapters/file-adapter.js";import"./workflow/index.js";import{techContractsDocs as Ln}from"./docs/tech-contracts.docs.js";import{metaDocs as Rn}from"./docs/meta.docs.js";import"./docs/index.js";import{defineSchemaModel as zn}from"@lssm/lib.schema";export{At as AccountBalanceRecord,rt as AppBlueprintRegistry,jt as BankAccountRecord,Mt as BankTransactionRecord,e as CapabilityRegistry,Te as CompleteOnboardingBaseInput,Ee as CompleteOnboardingBaseOutput,De as CompleteOnboardingBaseSpec,ue as ContractRegistryFileSchema,de as ContractRegistryItemSchema,fe as ContractRegistryItemTypeSchema,pe as ContractRegistryManifestSchema,sn as CreateIntegrationConnection,mn as CreateKnowledgeSource,r as DataViewRegistry,cn as DeleteIntegrationConnection,hn as DeleteKnowledgeSource,Oe as DeleteOnboardingDraftBaseSpec,ke as DeleteOnboardingDraftOutput,Q as DocRegistry,En as ExecutorProposalSink,nt as ExperimentEvaluator,et as ExperimentRegistry,s as FeatureRegistry,u as FormRegistry,Ae as GetOnboardingDraftBaseSpec,je as GetOnboardingDraftOutput,Pn as InMemoryStateStore,st as IntegrationSpecRegistry,Kt as KnowledgeSpaceRegistry,ln as ListIntegrationConnections,gn as ListKnowledgeSources,Ke as MigrationRegistry,He as OPAPolicyAdapter,Nt as OPENBANKING_PII_FIELDS,Pt as OPENBANKING_TELEMETRY_EVENTS,It as OpenBankingGetAccount,Vt as OpenBankingGetBalances,Lt as OpenBankingListAccounts,zt as OpenBankingListTransactions,Ht as OpenBankingRefreshBalances,Rt as OpenBankingSyncAccounts,Bt as OpenBankingSyncTransactions,ae as Owners,oe as OwnersEnum,Ve as PolicyEngine,ze as PolicyRegistry,I as PresentationRegistry,Fn as PrismaStateStore,ye as PromptRegistry,Tn as ProposalExecutor,wn as RegeneratorService,be as ResourceRegistry,Me as SaveOnboardingDraftBaseSpec,Ne as SaveOnboardingDraftInput,Pe as SaveOnboardingDraftOutput,re as SpecRegistry,se as StabilityEnum,ce as Tags,le as TagsEnum,Xe as TelemetryAnomalyMonitor,qe as TelemetryRegistry,Ye as TelemetryTracker,un as TestIntegrationConnection,Ze as TestRegistry,$e as TestRunner,We as ThemeRegistry,y as TransformEngine,_n as TriggerKnowledgeSourceSync,dn as UpdateIntegrationConnection,vn as UpdateKnowledgeSource,Mn as WorkflowPreFlightError,Dn as WorkflowRegistry,Nn as WorkflowRunner,On as WorkflowValidationError,Wt as assertPrimaryOpenBankingReady,kn as assertWorkflowSpecValid,xn as behaviorToEnvelope,Ue as buildOPAInput,d as buildZodWithRelations,t as capabilityKey,at as composeAppConfig,kt as createDefaultIntegrationSpecRegistry,b as createDefaultTransformEngine,w as createEngineWithDefaults,T as createFeatureModule,z as createFetchHandler,In as createFileStateStore,O as createFormRenderer,R as createMcpServer,i as dataViewKey,$ as defaultDocRegistry,j as defaultGqlField,M as defaultMcpTool,N as defaultRestPath,n as defineCapability,W as defineCommand,a as defineEvent,f as defineFormSpec,ve as definePrompt,G as defineQuery,xe as defineResourceTemplate,zn as defineSchemaModel,q as docBlockToPresentationSpec,J as docBlockToPresentationV2,Y as docBlocksToPresentationRoutes,X as docBlocksToPresentationSpecs,ee as docId,_t as elevenLabsIntegrationSpec,B as elysiaPlugin,Qt as emailThreadsKnowledgeSpace,Gt as ensurePrimaryOpenBankingIntegration,Sn as errorToEnvelope,p as evalPredicate,jn as evaluateExpression,o as eventKey,V as expressRouter,nn as financialDocsKnowledgeSpace,an as financialOverviewKnowledgeSpace,Tt as gcsStorageIntegrationSpec,yt as gmailIntegrationSpec,xt as googleCalendarIntegrationSpec,c as installFeature,me as installOp,fn as integrationContracts,K as isEmitDeclRef,Se as isResourceRef,L as jsonSchemaForPresentation,P as jsonSchemaForSpec,yn as knowledgeContracts,te as listRegisteredDocBlocks,it as makeAppBlueprintKey,he as makeEmit,tt as makeExperimentKey,ct as makeIntegrationSpecKey,qt as makeKnowledgeSpaceKey,H as makeNextAppHandler,U as makeNextPagesHandler,Be as makePolicyKey,Je as makeTelemetryKey,Qe as makeTestKey,Ge as makeThemeRef,Z as mapDocRoutes,Rn as metaDocs,ht as mistralIntegrationSpec,ge as op,ie as opKey,_e as openApiForRegistry,Fe as openBankingAccountsReadCapability,Ie as openBankingBalancesReadCapability,Le as openBankingTransactionsReadCapability,dt as postmarkIntegrationSpec,Dt as powensIntegrationSpec,Jt as productCanonKnowledgeSpace,pt as qdrantIntegrationSpec,Ft as redactOpenBankingTelemetryPayload,x as registerBasicValidation,F as registerContractsOnBuilder,S as registerDefaultReactRenderer,ne as registerDocBlocks,vt as registerElevenLabsIntegration,$t as registerEmailThreadsKnowledgeSpace,E as registerFeature,rn as registerFinancialDocsKnowledgeSpace,on as registerFinancialOverviewKnowledgeSpace,Et as registerGcsStorageIntegration,bt as registerGmailIntegration,St as registerGoogleCalendarIntegration,pn as registerIntegrationContracts,bn as registerKnowledgeContracts,gt as registerMistralIntegration,Re as registerOpenBankingCapabilities,Ut as registerOpenBankingContracts,ft as registerPostmarkIntegration,Ot as registerPowensIntegration,Yt as registerProductCanonKnowledgeSpace,mt as registerQdrantIntegration,C as registerReactToMarkdownRenderer,lt as registerStripeIntegration,Xt as registerSupportFaqKnowledgeSpace,Ct as registerTwilioSmsIntegration,en as registerUploadedDocsKnowledgeSpace,D as renderFeaturePresentation,ot as resolveAppConfig,Ce as resourceRef,A as rnReusablesDriver,m as schemaToMarkdown,h as schemaToMarkdownDetail,g as schemaToMarkdownList,_ as schemaToMarkdownSummary,v as schemaToMarkdownTable,k as shadcnDriver,ut as stripeIntegrationSpec,Zt as supportFaqKnowledgeSpace,Ln as techContractsDocs,Cn as telemetryToEnvelope,we as toV2FromV1,wt as twilioSmsIntegrationSpec,tn as uploadedDocsKnowledgeSpace,l as validateFeatureTargetsV2,An as validateWorkflowSpec};
@@ -1,101 +1 @@
1
- import{registerDocBlocks as e}from"../../docs/registry.js";import"../../registry.js";const t=[{id:`docs.tech.contracts.integrations`,title:`ContractSpec Integrations`,summary:`This document describes the integration architecture that powers the`,kind:`reference`,visibility:`public`,route:`/docs/tech/contracts/integrations`,tags:[`tech`,`contracts`,`integrations`],body:`# ContractSpec Integrations
2
-
3
- This document describes the integration architecture that powers the
4
- Pocket Family Office vertical and other ContractSpec-based apps. It
5
- focuses on provider-agnostic contracts, secret management, health
6
- checking, and runtime guards.
7
-
8
- ## Core Concepts
9
-
10
- - **IntegrationSpec** – declarative description of a provider that lists
11
- supported ownership modes, capability mappings, configuration schema,
12
- secret schema, health check policy, and documentation metadata.
13
- - **IntegrationConnection** – tenant/environment binding to a provider
14
- (\`meta\` + ownership mode + config + \`secretRef\`). Secrets are never
15
- embedded in specs or configs.
16
- - **AppIntegrationSlot** – blueprint-level requirement that declares
17
- which integration categories/capabilities must be satisfied at runtime
18
- (e.g. \`primaryLLM\`, \`primaryVectorDb\`).
19
- - **AppIntegrationBinding** – tenant-level slot → connection mapping.
20
- - **ResolvedIntegration** – runtime view containing slot metadata,
21
- connection details, and the resolved IntegrationSpec.
22
-
23
- ## Registered Providers
24
-
25
- The Pocket Family Office reference registers ten priority providers in
26
- \`packages/libs/contracts/src/integrations/providers\`:
27
-
28
- | Category | Provider | Key | Notes |
29
- | ------------- | ---------------- | --------------------------- | ------------------------------------------------- |
30
- | payments | Stripe | \`payments.stripe\` | Card + invoice flows, managed or BYOK credentials |
31
- | email (out) | Postmark | \`email.postmark\` | Transactional email delivery |
32
- | email (in) | Gmail API | \`email.gmail\` | Thread ingestion (OAuth BYOK or service account) |
33
- | calendar | Google Calendar | \`calendar.google\` | Event scheduling via service account |
34
- | vector-db | Qdrant | \`vectordb.qdrant\` | Embedding storage & search |
35
- | storage | Google Cloud | \`storage.gcs\` | S3-compatible object storage |
36
- | ai-llm | Mistral | \`ai-llm.mistral\` | Primary chat + embedding provider |
37
- | ai-voice | ElevenLabs | \`ai-voice.elevenlabs\` | Text-to-speech synthesis |
38
- | sms | Twilio SMS | \`sms.twilio\` | Urgent and fallback reminders |
39
- | open-banking | Powens | \`openbanking.powens\` | Read-only account, transaction, and balance sync |
40
-
41
- Each provider ships with:
42
-
43
- - Strongly typed adapter interfaces (\`payments.ts\`, \`llm.ts\`, etc.).
44
- - A concrete SDK-backed implementation under \`providers/impls\`.
45
- - Unit tests validating adapter behaviour and health checks.
46
-
47
- ## Secret Management
48
-
49
- All integrations rely on the \`SecretProvider\` abstraction defined in
50
- \`integrations/secrets\`. Two providers ship with the contracts library and
51
- are orchestrated by the \`SecretProviderManager\` composite:
52
-
53
- - **EnvSecretProvider (\`env-secret-provider.ts\`)** – high-priority,
54
- read-only overrides backed by environment variables. Supports the
55
- \`env://VARIABLE_NAME\` scheme as well as overrides for other schemes via
56
- \`?env=ALIAS\` or derived uppercase keys (e.g.
57
- \`gcp://.../stripe-secret-key\` → \`PROJECTS_DEMO_SECRETS_STRIPE_SECRET_KEY\`).
58
- - **GcpSecretManagerProvider (\`gcp-secret-manager.ts\`)** – production
59
- backend for versioned, auditable secrets stored in Google Cloud Secret
60
- Manager.
61
-
62
- The manager attempts providers in priority order (environment first,
63
- then GCP). Key points:
64
-
65
- - \`secretRef\` uses a URI scheme (examples: \`env://LOCAL_API_TOKEN\`,
66
- \`gcp://projects/demo/secrets/stripe-key/versions/latest\`).
67
- - \`IntegrationCallGuard\` fetches and parses secrets before executing a
68
- provider adapter.
69
- - Providers never accept raw secrets in constructors; they expect a map
70
- of resolved string values from the guard.
71
- - Local development can rely on \`.env\` files, while staging/production
72
- reference long-lived GCP secrets without changing the integration
73
- specs.
74
-
75
- ## Health Checks & Telemetry
76
-
77
- - Each IntegrationSpec optionally declares \`healthCheck.method\` and
78
- timeouts.
79
- - \`IntegrationCallGuard\` enforces connection status, wraps retries with
80
- exponential back-off, and emits telemetry events tagged with tenant,
81
- app, blueprint, config version, and slot id.
82
- - Validation rules (\`app-config/validation.ts\`) surface issues at
83
- publish time (slot mismatch, unsupported ownership modes, missing
84
- capabilities, etc.).
85
-
86
- ## Runtime Usage
87
-
88
- 1. Blueprint defines slots (\`primaryLLM\`, \`primaryVectorDb\`, ...).
89
- 2. Tenant binds connections referencing the integration ids above.
90
- 3. \`composeAppConfig\` merges blueprint + tenant, resolving specs,
91
- connections, and knowledge bindings.
92
- 4. Workflow runner fetches providers via \`IntegrationCallGuard\` and
93
- executes operations with full guardrails.
94
-
95
- See \`packages/verticals/pocket-family-office\` for
96
- examples of how the blueprint, tenant config, and workflows pull these
97
- pieces together.
98
-
99
-
100
-
101
- `}];e(t);export{t as tech_contracts_integrations_DocBlocks};
1
+ import{registerDocBlocks as e}from"../../docs/registry.js";import"../../registry.js";const t=[{id:`docs.tech.contracts.integrations`,title:`ContractSpec Integrations`,summary:`Provider-agnostic integration contracts: specs, connections, secrets, health checks, and runtime guards.`,kind:`reference`,visibility:`public`,route:`/docs/tech/contracts/integrations`,tags:[`tech`,`contracts`,`integrations`],body:"# ContractSpec Integrations\n\nThis document describes the integration architecture that powers ContractSpec-based apps. It focuses on provider-agnostic contracts, secret management, health checks, and runtime guards.\n\n## Core Concepts\n\n- **IntegrationSpec** – declarative description of a provider that lists supported ownership modes, capability mappings, configuration schema, secret schema, health check policy, and documentation metadata.\n- **IntegrationConnection** – tenant/environment binding to a provider (`meta` + ownership mode + config + `secretRef`). Secrets are never embedded in specs or configs.\n- **AppIntegrationSlot** – blueprint-level requirement that declares which integration categories/capabilities must be satisfied at runtime (e.g. `primaryLLM`, `primaryVectorDb`).\n- **AppIntegrationBinding** – tenant-level slot → connection mapping.\n- **ResolvedIntegration** – runtime view containing slot metadata, connection details, and the resolved IntegrationSpec.\n\n## Registered Providers\n\nThe contracts library ships ten priority providers in `packages/libs/contracts/src/integrations/providers`:\n\n| Category | Provider | Key | Notes |\n| ------------- | ---------------- | --------------------------- | ------------------------------------------------- |\n| payments | Stripe | `payments.stripe` | Card + invoice flows, managed or BYOK credentials |\n| email (out) | Postmark | `email.postmark` | Transactional email delivery |\n| email (in) | Gmail API | `email.gmail` | Thread ingestion (OAuth BYOK or service account) |\n| calendar | Google Calendar | `calendar.google` | Event scheduling via service account |\n| vector-db | Qdrant | `vectordb.qdrant` | Embedding storage & search |\n| storage | Google Cloud | `storage.gcs` | Object storage |\n| ai-llm | Mistral | `ai-llm.mistral` | Primary chat + embedding provider |\n| ai-voice | ElevenLabs | `ai-voice.elevenlabs` | Text-to-speech synthesis |\n| sms | Twilio SMS | `sms.twilio` | Urgent and fallback reminders |\n| open-banking | Powens | `openbanking.powens` | Read-only account, transaction, and balance sync |\n\nEach provider ships with:\n\n- Strongly typed adapter interfaces (`payments.ts`, `llm.ts`, etc.)\n- A concrete SDK-backed implementation under `providers/impls`\n- Unit tests validating adapter behaviour and health checks\n\n### Canonical registry builder\n\nTo list all shipped specs at runtime, use:\n\n- `createDefaultIntegrationSpecRegistry()` from `@lssm/lib.contracts/integrations/providers/registry`\n\n## Secret Management\n\nAll integrations rely on the `SecretProvider` abstraction defined in `integrations/secrets`. Providers ship with the contracts library and are orchestrated by the `SecretProviderManager` composite:\n\n- **EnvSecretProvider** (`env-secret-provider.ts`) – high-priority, read-only overrides backed by environment variables.\n - Supports the `env://VARIABLE_NAME` scheme\n - Supports overrides for other schemes via `?env=ALIAS` or derived uppercase keys\n- **GcpSecretManagerProvider** (`gcp-secret-manager.ts`) – versioned secrets stored in Google Cloud Secret Manager.\n - Example: `gcp://projects/demo/secrets/stripe-key/versions/latest`\n- **AwsSecretsManagerProvider** (`aws-secret-manager.ts`) – AWS Secrets Manager backend.\n - Example: `aws://secretsmanager/eu-west-1/my-secret?version=AWSCURRENT`\n - Region may be in the reference or provided via `AWS_REGION` / `AWS_DEFAULT_REGION`\n- **ScalewaySecretManagerProvider** (`scaleway-secret-manager.ts`) – Scaleway Secret Manager backend.\n - Example (id): `scw://secret-manager/fr-par/1234...-uuid?version=latest`\n - Example (name, create+write): `scw://secret-manager/fr-par/my-secret-name`\n - Requires `SCW_SECRET_KEY` (token) and `SCW_DEFAULT_PROJECT_ID` when creating secrets by name\n\nThe manager attempts providers in priority order (environment first, then cloud providers). Key points:\n\n- `secretRef` is a URI-like reference; raw secrets are never returned.\n- `IntegrationCallGuard` fetches and parses secrets before executing a provider adapter.\n- Local development can rely on `.env` files, while staging/production reference cloud secret stores.\n\n## Health Checks & Telemetry\n\n- Each IntegrationSpec optionally declares `healthCheck.method` and timeouts.\n- `IntegrationCallGuard` enforces connection status, wraps retries with exponential back-off, and emits telemetry events tagged with tenant/app/slot metadata.\n- Validation rules (`app-config/validation.ts`) surface issues at publish time (slot mismatch, unsupported ownership modes, missing capabilities, etc.).\n\n## Studio persistence (ContractSpec Studio)\n\nContractSpec Studio persists tenant `IntegrationConnection` records in Postgres (Prisma model `IntegrationConnection` in `@lssm/lib.database-contractspec-studio`) and exposes a platform-admin management surface (see the Studio platform admin panel).\n"}];e(t);export{t as tech_contracts_integrations_DocBlocks};
@@ -1 +1 @@
1
- import{IntegrationSpecRegistry as e,makeIntegrationSpecKey as t}from"./spec.js";import{registerStripeIntegration as n,stripeIntegrationSpec as r}from"./providers/stripe.js";import{postmarkIntegrationSpec as i,registerPostmarkIntegration as a}from"./providers/postmark.js";import{qdrantIntegrationSpec as o,registerQdrantIntegration as s}from"./providers/qdrant.js";import{mistralIntegrationSpec as c,registerMistralIntegration as l}from"./providers/mistral.js";import{elevenLabsIntegrationSpec as u,registerElevenLabsIntegration as d}from"./providers/elevenlabs.js";import{gmailIntegrationSpec as f,registerGmailIntegration as p}from"./providers/gmail.js";import{googleCalendarIntegrationSpec as m,registerGoogleCalendarIntegration as h}from"./providers/google-calendar.js";import{registerTwilioSmsIntegration as g,twilioSmsIntegrationSpec as _}from"./providers/twilio-sms.js";import{gcsStorageIntegrationSpec as v,registerGcsStorageIntegration as y}from"./providers/gcs-storage.js";import{powensIntegrationSpec as b,registerPowensIntegration as x}from"./providers/powens.js";import"./providers/index.js";import{AccountBalanceRecord as S,BankAccountRecord as C,BankTransactionRecord as w}from"./openbanking/models.js";import{OPENBANKING_PII_FIELDS as T,OPENBANKING_TELEMETRY_EVENTS as E,redactOpenBankingTelemetryPayload as D}from"./openbanking/telemetry.js";import{OpenBankingGetAccount as O,OpenBankingListAccounts as k,OpenBankingSyncAccounts as A}from"./openbanking/contracts/accounts.js";import{OpenBankingListTransactions as j,OpenBankingSyncTransactions as M}from"./openbanking/contracts/transactions.js";import{OpenBankingGetBalances as N,OpenBankingRefreshBalances as P}from"./openbanking/contracts/balances.js";import{registerOpenBankingContracts as F}from"./openbanking/contracts/index.js";import{assertPrimaryOpenBankingReady as I,ensurePrimaryOpenBankingIntegration as L}from"./openbanking/guards.js";export{S as AccountBalanceRecord,C as BankAccountRecord,w as BankTransactionRecord,e as IntegrationSpecRegistry,T as OPENBANKING_PII_FIELDS,E as OPENBANKING_TELEMETRY_EVENTS,O as OpenBankingGetAccount,N as OpenBankingGetBalances,k as OpenBankingListAccounts,j as OpenBankingListTransactions,P as OpenBankingRefreshBalances,A as OpenBankingSyncAccounts,M as OpenBankingSyncTransactions,I as assertPrimaryOpenBankingReady,u as elevenLabsIntegrationSpec,L as ensurePrimaryOpenBankingIntegration,v as gcsStorageIntegrationSpec,f as gmailIntegrationSpec,m as googleCalendarIntegrationSpec,t as makeIntegrationSpecKey,c as mistralIntegrationSpec,i as postmarkIntegrationSpec,b as powensIntegrationSpec,o as qdrantIntegrationSpec,D as redactOpenBankingTelemetryPayload,d as registerElevenLabsIntegration,y as registerGcsStorageIntegration,p as registerGmailIntegration,h as registerGoogleCalendarIntegration,l as registerMistralIntegration,F as registerOpenBankingContracts,a as registerPostmarkIntegration,x as registerPowensIntegration,s as registerQdrantIntegration,n as registerStripeIntegration,g as registerTwilioSmsIntegration,r as stripeIntegrationSpec,_ as twilioSmsIntegrationSpec};
1
+ import{IntegrationSpecRegistry as e,makeIntegrationSpecKey as t}from"./spec.js";import{registerStripeIntegration as n,stripeIntegrationSpec as r}from"./providers/stripe.js";import{postmarkIntegrationSpec as i,registerPostmarkIntegration as a}from"./providers/postmark.js";import{qdrantIntegrationSpec as o,registerQdrantIntegration as s}from"./providers/qdrant.js";import{mistralIntegrationSpec as c,registerMistralIntegration as l}from"./providers/mistral.js";import{elevenLabsIntegrationSpec as u,registerElevenLabsIntegration as d}from"./providers/elevenlabs.js";import{gmailIntegrationSpec as f,registerGmailIntegration as p}from"./providers/gmail.js";import{googleCalendarIntegrationSpec as m,registerGoogleCalendarIntegration as h}from"./providers/google-calendar.js";import{registerTwilioSmsIntegration as g,twilioSmsIntegrationSpec as _}from"./providers/twilio-sms.js";import{gcsStorageIntegrationSpec as v,registerGcsStorageIntegration as y}from"./providers/gcs-storage.js";import{powensIntegrationSpec as b,registerPowensIntegration as x}from"./providers/powens.js";import{createDefaultIntegrationSpecRegistry as S}from"./providers/registry.js";import"./providers/index.js";import{AccountBalanceRecord as C,BankAccountRecord as w,BankTransactionRecord as T}from"./openbanking/models.js";import{OPENBANKING_PII_FIELDS as E,OPENBANKING_TELEMETRY_EVENTS as D,redactOpenBankingTelemetryPayload as O}from"./openbanking/telemetry.js";import{OpenBankingGetAccount as k,OpenBankingListAccounts as A,OpenBankingSyncAccounts as j}from"./openbanking/contracts/accounts.js";import{OpenBankingListTransactions as M,OpenBankingSyncTransactions as N}from"./openbanking/contracts/transactions.js";import{OpenBankingGetBalances as P,OpenBankingRefreshBalances as F}from"./openbanking/contracts/balances.js";import{registerOpenBankingContracts as I}from"./openbanking/contracts/index.js";import{assertPrimaryOpenBankingReady as L,ensurePrimaryOpenBankingIntegration as R}from"./openbanking/guards.js";export{C as AccountBalanceRecord,w as BankAccountRecord,T as BankTransactionRecord,e as IntegrationSpecRegistry,E as OPENBANKING_PII_FIELDS,D as OPENBANKING_TELEMETRY_EVENTS,k as OpenBankingGetAccount,P as OpenBankingGetBalances,A as OpenBankingListAccounts,M as OpenBankingListTransactions,F as OpenBankingRefreshBalances,j as OpenBankingSyncAccounts,N as OpenBankingSyncTransactions,L as assertPrimaryOpenBankingReady,S as createDefaultIntegrationSpecRegistry,u as elevenLabsIntegrationSpec,R as ensurePrimaryOpenBankingIntegration,v as gcsStorageIntegrationSpec,f as gmailIntegrationSpec,m as googleCalendarIntegrationSpec,t as makeIntegrationSpecKey,c as mistralIntegrationSpec,i as postmarkIntegrationSpec,b as powensIntegrationSpec,o as qdrantIntegrationSpec,O as redactOpenBankingTelemetryPayload,d as registerElevenLabsIntegration,y as registerGcsStorageIntegration,p as registerGmailIntegration,h as registerGoogleCalendarIntegration,l as registerMistralIntegration,I as registerOpenBankingContracts,a as registerPostmarkIntegration,x as registerPowensIntegration,s as registerQdrantIntegration,n as registerStripeIntegration,g as registerTwilioSmsIntegration,r as stripeIntegrationSpec,_ as twilioSmsIntegrationSpec};
@@ -1 +1 @@
1
- import{registerStripeIntegration as e,stripeIntegrationSpec as t}from"./stripe.js";import{postmarkIntegrationSpec as n,registerPostmarkIntegration as r}from"./postmark.js";import{qdrantIntegrationSpec as i,registerQdrantIntegration as a}from"./qdrant.js";import{mistralIntegrationSpec as o,registerMistralIntegration as s}from"./mistral.js";import{elevenLabsIntegrationSpec as c,registerElevenLabsIntegration as l}from"./elevenlabs.js";import{gmailIntegrationSpec as u,registerGmailIntegration as d}from"./gmail.js";import{googleCalendarIntegrationSpec as f,registerGoogleCalendarIntegration as p}from"./google-calendar.js";import{registerTwilioSmsIntegration as m,twilioSmsIntegrationSpec as h}from"./twilio-sms.js";import{gcsStorageIntegrationSpec as g,registerGcsStorageIntegration as _}from"./gcs-storage.js";import{powensIntegrationSpec as v,registerPowensIntegration as y}from"./powens.js";export{c as elevenLabsIntegrationSpec,g as gcsStorageIntegrationSpec,u as gmailIntegrationSpec,f as googleCalendarIntegrationSpec,o as mistralIntegrationSpec,n as postmarkIntegrationSpec,v as powensIntegrationSpec,i as qdrantIntegrationSpec,l as registerElevenLabsIntegration,_ as registerGcsStorageIntegration,d as registerGmailIntegration,p as registerGoogleCalendarIntegration,s as registerMistralIntegration,r as registerPostmarkIntegration,y as registerPowensIntegration,a as registerQdrantIntegration,e as registerStripeIntegration,m as registerTwilioSmsIntegration,t as stripeIntegrationSpec,h as twilioSmsIntegrationSpec};
1
+ import{registerStripeIntegration as e,stripeIntegrationSpec as t}from"./stripe.js";import{postmarkIntegrationSpec as n,registerPostmarkIntegration as r}from"./postmark.js";import{qdrantIntegrationSpec as i,registerQdrantIntegration as a}from"./qdrant.js";import{mistralIntegrationSpec as o,registerMistralIntegration as s}from"./mistral.js";import{elevenLabsIntegrationSpec as c,registerElevenLabsIntegration as l}from"./elevenlabs.js";import{gmailIntegrationSpec as u,registerGmailIntegration as d}from"./gmail.js";import{googleCalendarIntegrationSpec as f,registerGoogleCalendarIntegration as p}from"./google-calendar.js";import{registerTwilioSmsIntegration as m,twilioSmsIntegrationSpec as h}from"./twilio-sms.js";import{gcsStorageIntegrationSpec as g,registerGcsStorageIntegration as _}from"./gcs-storage.js";import{powensIntegrationSpec as v,registerPowensIntegration as y}from"./powens.js";import{createDefaultIntegrationSpecRegistry as b}from"./registry.js";export{b as createDefaultIntegrationSpecRegistry,c as elevenLabsIntegrationSpec,g as gcsStorageIntegrationSpec,u as gmailIntegrationSpec,f as googleCalendarIntegrationSpec,o as mistralIntegrationSpec,n as postmarkIntegrationSpec,v as powensIntegrationSpec,i as qdrantIntegrationSpec,l as registerElevenLabsIntegration,_ as registerGcsStorageIntegration,d as registerGmailIntegration,p as registerGoogleCalendarIntegration,s as registerMistralIntegration,r as registerPostmarkIntegration,y as registerPowensIntegration,a as registerQdrantIntegration,e as registerStripeIntegration,m as registerTwilioSmsIntegration,t as stripeIntegrationSpec,h as twilioSmsIntegrationSpec};
@@ -0,0 +1 @@
1
+ import{IntegrationSpecRegistry as e}from"../spec.js";import{registerStripeIntegration as t}from"./stripe.js";import{registerPostmarkIntegration as n}from"./postmark.js";import{registerQdrantIntegration as r}from"./qdrant.js";import{registerMistralIntegration as i}from"./mistral.js";import{registerElevenLabsIntegration as a}from"./elevenlabs.js";import{registerGmailIntegration as o}from"./gmail.js";import{registerGoogleCalendarIntegration as s}from"./google-calendar.js";import{registerTwilioSmsIntegration as c}from"./twilio-sms.js";import{registerGcsStorageIntegration as l}from"./gcs-storage.js";import{registerPowensIntegration as u}from"./powens.js";function d(){let d=new e;return t(d),n(d),r(d),i(d),a(d),o(d),s(d),c(d),l(d),u(d),d}export{d as createDefaultIntegrationSpecRegistry};
@@ -0,0 +1 @@
1
+ import{SecretProviderError as e,normalizeSecretPayload as t,parseSecretUri as n}from"./provider.js";import{Buffer as r}from"node:buffer";import{CreateSecretCommand as i,DeleteSecretCommand as a,GetSecretValueCommand as o,PutSecretValueCommand as s,SecretsManagerClient as c}from"@aws-sdk/client-secrets-manager";var l=class{id=`aws-secrets-manager`;explicitRegion;injectedClient;clientConfig;clientsByRegion=new Map;constructor(e={}){this.explicitRegion=e.region,this.injectedClient=e.client,this.clientConfig=e.clientConfig}canHandle(e){try{let t=n(e);return t.provider===`aws`&&(t.path===`secretsmanager`||t.path.startsWith(`secretsmanager/`))}catch{return!1}}async getSecret(e,t){let n=this.parseReference(e),r=this.getClient(n.region),i=t?.version??n.stage??n.version,a={SecretId:n.secretId,...this.buildVersionSelector(i)};try{let t=await r.send(new o(a));return{data:u(t,e,this.id),version:typeof t.VersionId==`string`&&t.VersionId?t.VersionId:i,metadata:{region:n.region,secretId:n.secretId,...i?{requestedVersion:i}:{}},retrievedAt:new Date}}catch(t){throw p({error:t,provider:this.id,reference:e,operation:`getSecret`})}}async setSecret(n,r){let a=this.parseReference(n),o=this.getClient(a.region),c=t(r);try{let e=await o.send(new s({SecretId:a.secretId,SecretBinary:c})),t=typeof e.VersionId==`string`&&e.VersionId?e.VersionId:`latest`;return{reference:this.buildReference(a.region,a.secretId,{version:t}),version:t}}catch(t){if(!f(t))throw p({error:t,provider:this.id,reference:n,operation:`putSecretValue`});if(d(a.secretId))throw new e({message:`Secret not found: ${a.secretId}`,provider:this.id,reference:n,code:`NOT_FOUND`,cause:t});try{let e=await o.send(new i({Name:a.secretId,SecretBinary:c})),t=typeof e.VersionId==`string`&&e.VersionId?e.VersionId:`latest`;return{reference:this.buildReference(a.region,a.secretId,{version:t}),version:t}}catch(e){throw p({error:e,provider:this.id,reference:n,operation:`createSecret`})}}}async rotateSecret(e,t){return this.setSecret(e,t)}async deleteSecret(e){let t=this.parseReference(e),n=this.getClient(t.region);try{await n.send(new a({SecretId:t.secretId,RecoveryWindowInDays:7}))}catch(t){throw p({error:t,provider:this.id,reference:e,operation:`deleteSecret`})}}getClient(e){if(this.injectedClient)return this.injectedClient;let t=this.clientsByRegion.get(e);if(t)return t;let n=new c({...this.clientConfig??{},region:e});return this.clientsByRegion.set(e,n),n}parseReference(t){let r=n(t);if(r.provider!==`aws`)throw new e({message:`Unsupported secret provider: ${r.provider}`,provider:this.id,reference:t,code:`INVALID`});let i=r.path.split(`/`).filter(Boolean);if(i.length<3||i[0]!==`secretsmanager`)throw new e({message:`Expected secret reference format aws://secretsmanager/{region}/{secretIdOrArn}[?version=...]`,provider:this.id,reference:t,code:`INVALID`});let a=i[1],o=this.resolveRegion(a),s=i.slice(2).join(`/`);if(!s)throw new e({message:`Unable to resolve secret id from reference "${r.path}"`,provider:this.id,reference:t,code:`INVALID`});return{region:o,secretId:s,version:r.extras?.version,stage:r.extras?.stage}}resolveRegion(t){let n=t??this.explicitRegion??process.env.AWS_REGION??process.env.AWS_DEFAULT_REGION;if(!n)throw new e({message:`AWS region must be provided either in reference (aws://secretsmanager/{region}/...) or via AWS_REGION/AWS_DEFAULT_REGION.`,provider:this.id,reference:`aws://secretsmanager//`,code:`INVALID`});return n}buildVersionSelector(e){return e?e===`latest`||e===`current`?{VersionStage:`AWSCURRENT`}:e.startsWith(`AWS`)?{VersionStage:e}:{VersionId:e}:{}}buildReference(e,t,n){let r=`aws://secretsmanager/${e}/${t}`,i=n?Object.entries(n).filter(([,e])=>!!e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`):``;return i?`${r}?${i}`:r}};function u(t,n,i){if(!t||typeof t!=`object`)throw new e({message:`Invalid AWS Secrets Manager response`,provider:i,reference:n,code:`UNKNOWN`,cause:t});let a=t;if(a.SecretBinary instanceof Uint8Array)return a.SecretBinary;if(typeof a.SecretBinary==`string`)return r.from(a.SecretBinary,`base64`);if(typeof a.SecretString==`string`)return r.from(a.SecretString,`utf-8`);throw new e({message:`AWS secret value is empty`,provider:i,reference:n,code:`NOT_FOUND`,cause:t})}function d(e){return e.startsWith(`arn:aws:secretsmanager:`)}function f(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.$metadata?.httpStatusCode==`number`?t.$metadata.httpStatusCode===404:t.name===`ResourceNotFoundException`}function p(t){let{error:n,provider:r,reference:i,operation:a}=t;if(n instanceof e)return n;let o=typeof n==`object`&&!!n&&`$metadata`in n&&typeof n.$metadata==`object`&&n.$metadata?.httpStatusCode,s=o===404?`NOT_FOUND`:o===401||o===403?`FORBIDDEN`:o===400?`INVALID`:`UNKNOWN`;return new e({message:n instanceof Error?n.message:`Unknown error during ${a}`,provider:r,reference:i,code:s,cause:n})}export{l as AwsSecretsManagerProvider};
@@ -1 +1 @@
1
- import{SecretProviderError as e,normalizeSecretPayload as t,parseSecretUri as n}from"./provider.js";import{EnvSecretProvider as r}from"./env-secret-provider.js";import{GcpSecretManagerProvider as i}from"./gcp-secret-manager.js";import{SecretProviderManager as a}from"./manager.js";export{r as EnvSecretProvider,i as GcpSecretManagerProvider,e as SecretProviderError,a as SecretProviderManager,t as normalizeSecretPayload,n as parseSecretUri};
1
+ import{SecretProviderError as e,normalizeSecretPayload as t,parseSecretUri as n}from"./provider.js";import{AwsSecretsManagerProvider as r}from"./aws-secret-manager.js";import{EnvSecretProvider as i}from"./env-secret-provider.js";import{GcpSecretManagerProvider as a}from"./gcp-secret-manager.js";import{ScalewaySecretManagerProvider as o}from"./scaleway-secret-manager.js";import{SecretProviderManager as s}from"./manager.js";export{r as AwsSecretsManagerProvider,i as EnvSecretProvider,a as GcpSecretManagerProvider,o as ScalewaySecretManagerProvider,e as SecretProviderError,s as SecretProviderManager,t as normalizeSecretPayload,n as parseSecretUri};
@@ -0,0 +1 @@
1
+ import{SecretProviderError as e,normalizeSecretPayload as t,parseSecretUri as n}from"./provider.js";import{Buffer as r}from"node:buffer";const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;var a=class{id=`scaleway-secret-manager`;token;defaultRegion;defaultProjectId;baseUrl;fetchFn;constructor(e={}){this.token=e.token??process.env.SCW_SECRET_KEY??process.env.SCALEWAY_SECRET_KEY??``,this.defaultRegion=e.defaultRegion??process.env.SCW_DEFAULT_REGION??process.env.SCW_REGION,this.defaultProjectId=e.defaultProjectId??process.env.SCW_DEFAULT_PROJECT_ID??process.env.SCW_PROJECT_ID,this.baseUrl=e.baseUrl??`https://api.scaleway.com`,this.fetchFn=e.fetch??fetch}canHandle(e){try{let t=n(e);return t.provider===`scw`&&(t.path===`secret-manager`||t.path.startsWith(`secret-manager/`))}catch{return!1}}async getSecret(t,n){let a=this.parseReference(t);if(!this.token)throw new e({message:`Scaleway secret manager token is missing (set SCW_SECRET_KEY / SCALEWAY_SECRET_KEY).`,provider:this.id,reference:t,code:`FORBIDDEN`});if(!i.test(a.secretIdOrName))throw new e({message:`Scaleway getSecret requires a secretId (uuid) reference, not a secret name.`,provider:this.id,reference:t,code:`INVALID`});let s=n?.version??a.revision??`latest`,c=`${this.baseUrl}/secret-manager/v1beta1/regions/${encodeURIComponent(a.region)}/secrets/${encodeURIComponent(a.secretIdOrName)}/versions/${encodeURIComponent(s)}/access`,u=await this.fetchFn(c,{method:`GET`,headers:{"X-Auth-Token":this.token}});if(!u.ok)throw await l({response:u,provider:this.id,reference:t,operation:`getSecret`});let d=o(await u.json());return{data:r.from(d,`base64`),version:s,metadata:{region:a.region,secretId:a.secretIdOrName},retrievedAt:new Date}}async setSecret(n,a){let o=this.parseReference(n);if(!this.token)throw new e({message:`Scaleway secret manager token is missing (set SCW_SECRET_KEY / SCALEWAY_SECRET_KEY).`,provider:this.id,reference:n,code:`FORBIDDEN`});let s=t(a),c=r.from(s).toString(`base64`),l=i.test(o.secretIdOrName)?o.secretIdOrName:await this.createSecret({region:o.region,name:o.secretIdOrName,reference:n}),u=await this.createSecretVersion({region:o.region,secretId:l,dataB64:c,reference:n});return{reference:this.buildReference(o.region,l,{version:u}),version:u}}async rotateSecret(e,t){return this.setSecret(e,t)}async deleteSecret(t){let n=this.parseReference(t);if(!this.token)throw new e({message:`Scaleway secret manager token is missing (set SCW_SECRET_KEY / SCALEWAY_SECRET_KEY).`,provider:this.id,reference:t,code:`FORBIDDEN`});if(!i.test(n.secretIdOrName))throw new e({message:`Scaleway deleteSecret requires a secretId (uuid) reference, not a secret name.`,provider:this.id,reference:t,code:`INVALID`});let r=`${this.baseUrl}/secret-manager/v1beta1/regions/${encodeURIComponent(n.region)}/secrets/${encodeURIComponent(n.secretIdOrName)}`,a=await this.fetchFn(r,{method:`DELETE`,headers:{"X-Auth-Token":this.token}});if(!a.ok)throw await l({response:a,provider:this.id,reference:t,operation:`deleteSecret`})}parseReference(t){let r=n(t);if(r.provider!==`scw`)throw new e({message:`Unsupported secret provider: ${r.provider}`,provider:this.id,reference:t,code:`INVALID`});let i=r.path.split(`/`).filter(Boolean);if(i.length<2||i[0]!==`secret-manager`)throw new e({message:`Expected secret reference format scw://secret-manager/{region}/{secretIdOrName}[?version=...]`,provider:this.id,reference:t,code:`INVALID`});let a=i[1]??this.defaultRegion;if(!a)throw new e({message:`Scaleway region must be provided either in reference (scw://secret-manager/{region}/...) or via SCW_DEFAULT_REGION/SCW_REGION.`,provider:this.id,reference:t,code:`INVALID`});let o=i.slice(2).join(`/`);if(!o)throw new e({message:`Unable to resolve secret id/name from reference "${r.path}"`,provider:this.id,reference:t,code:`INVALID`});return{region:a,secretIdOrName:o,revision:r.extras?.version}}async createSecret(t){let n=this.defaultProjectId;if(!n)throw new e({message:`Scaleway project id is required to create secrets by name (set SCW_DEFAULT_PROJECT_ID/SCW_PROJECT_ID).`,provider:this.id,reference:t.reference,code:`INVALID`});let r=`${this.baseUrl}/secret-manager/v1beta1/regions/${encodeURIComponent(t.region)}/secrets`,i=await this.fetchFn(r,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Auth-Token":this.token},body:JSON.stringify({name:t.name,project_id:n})});if(!i.ok)throw await l({response:i,provider:this.id,reference:t.reference,operation:`createSecret`});return s(await i.json())}async createSecretVersion(e){let t=`${this.baseUrl}/secret-manager/v1beta1/regions/${encodeURIComponent(e.region)}/secrets/${encodeURIComponent(e.secretId)}/versions`,n=await this.fetchFn(t,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Auth-Token":this.token},body:JSON.stringify({data:e.dataB64})});if(!n.ok)throw await l({response:n,provider:this.id,reference:e.reference,operation:`createSecretVersion`});return c(await n.json())??`latest`}buildReference(e,t,n){let r=`scw://secret-manager/${e}/${t}`,i=n?Object.entries(n).filter(([,e])=>!!e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`):``;return i?`${r}?${i}`:r}};function o(e){if(!e||typeof e!=`object`)throw Error(`Invalid scaleway secret payload`);let t=e;if(typeof t.data==`string`&&t.data)return t.data;throw Error(`Scaleway secret payload is missing data`)}function s(e){if(!e||typeof e!=`object`)throw Error(`Invalid scaleway createSecret payload`);let t=e;if(typeof t.id==`string`&&t.id)return t.id;throw Error(`Scaleway createSecret response is missing id`)}function c(e){if(!e||typeof e!=`object`)return;let t=e;if(typeof t.revision==`number`)return String(t.revision);if(typeof t.revision==`string`&&t.revision)return t.revision;if(typeof t.id==`string`&&t.id)return t.id}async function l(t){let{response:n,provider:r,reference:i,operation:a}=t,o=n.status===404?`NOT_FOUND`:n.status===401||n.status===403?`FORBIDDEN`:n.status>=400&&n.status<500?`INVALID`:`UNKNOWN`,s=await u(n);return new e({message:s?`Scaleway Secret Manager ${a} failed (${n.status}): ${s}`:`Scaleway Secret Manager ${a} failed (${n.status})`,provider:r,reference:i,code:o})}async function u(e){try{let t=(await e.text()).trim();return t.length?t:void 0}catch{return}}export{a as ScalewaySecretManagerProvider};
@@ -1 +1 @@
1
- import{PrismaObjectRef as e}from"../object-ref.js";import{PrismaInterfaceRef as t}from"../interface-ref.js";import{getDMMF as n}from"./get-client.js";import{PothosSchemaError as r}from"@pothos/core";const i=new WeakMap;function a(n,r,a=`object`){i.has(r)||i.set(r,new Map);let o=i.get(r);return o.has(n)||o.set(n,a===`object`?new e(n,n):new t(n,n)),o.get(n)}function o(e,t,n){let i=s(e,t,n);if(i.kind!==`object`)throw new r(`Field ${n} of model '${e}' is not a relation (${i.kind})`);return i}function s(e,t,n){let i=c(e,t).fields.find(e=>e.name===n);if(!i)throw new r(`Field '${n}' not found in model '${e}'`);return i}function c(e,t){let i=n(t),a=Array.isArray(i.models)?i.models.find(t=>t.name===e):i.models[e];if(!a)throw new r(`Model '${e}' not found in DMMF`);return a}function l(e,t){let n=`${t.slice(0,1).toLowerCase()}${t.slice(1)}`,i=n in e?e[n]:null;if(!i)throw new r(`Unable to find delegate for model ${t}`);return i}export{l as getDelegateFromModel,s as getFieldData,c as getModel,a as getRefFromModel,o as getRelation};
1
+ import{PrismaObjectRef as e}from"../object-ref.js";import{PrismaInterfaceRef as t}from"../interface-ref.js";import{getDMMF as n}from"./get-client.js";import{PothosSchemaError as r}from"@pothos/core";const i=new WeakMap;function a(n,r,a=`object`){i.has(r)||i.set(r,new Map);let o=i.get(r);return o.has(n)||o.set(n,a===`object`?new e(n,n):new t(n,n)),o.get(n)}function o(e,t,n){let i=s(e,t,n);if(i.kind!==`object`)throw new r(`Field ${n} of model '${e}' is not a relation (${i.kind})`);return i}function s(e,t,n){let i=c(e,t).fields.find(e=>e.name===n);if(!i)throw new r(`Field '${n}' not found in model '${e}'`);return i}function c(e,t){let i=n(t),a=Array.isArray(i.models)?i.models.find(t=>t.name===e):i.models[e];if(!a)throw new r(`Model '${e}' not found in DMMF`);if(!a.uniqueIndexes)throw new r(`Model '${e}' is missing required datamodel information. This is likely because you're using Prisma v7+ without providing the generated datamodel. Please follow the setup instructions at https://pothos-graphql.dev/docs/plugins/prisma#setup to generate and configure the datamodel properly.`);return a}function l(e,t){let n=`${t.slice(0,1).toLowerCase()}${t.slice(1)}`,i=n in e?e[n]:null;if(!i)throw new r(`Unable to find delegate for model ${t}`);return i}export{l as getDelegateFromModel,s as getFieldData,c as getModel,a as getRefFromModel,o as getRelation};
@@ -1 +1 @@
1
- import{setLoaderMappings as e}from"./loader-map.js";import{require_graphql as t}from"../../../../graphql/index.js";import{createState as n,mergeSelection as r,selectionCompatible as i,selectionToQuery as a}from"./selections.js";import{wrapWithUsageCheck as o}from"./usage.js";import{PothosValidationError as s,getMappedArgumentValues as c}from"@pothos/core";var l=t();function u(e,t,n,i,a,o,s){if(a.name.value.startsWith(`__`))return;let{pothosPrismaInclude:c,pothosPrismaSelect:f,pothosIndirectInclude:m,pothosPrismaModel:h}=e.extensions??{};if(m?.path&&m.path.length>0||m?.paths&&m.paths.length===0)d(e,n,a,[],m.paths??[m.path],o,(e,r,a,o)=>{u(e,t,n,i,r,a,o)});else if(m){u(n.schema.getType(m.getType()),t,n,i,a,o,s);return}((0,l.isObjectType)(e)||(0,l.isInterfaceType)(e))&&(h&&!f&&(i.mode=`include`),(c??f)&&r(i,{select:f?{...f}:void 0,include:c?{...c}:void 0}),a.selectionSet&&(!s||!i.skipDeferredFragments)&&p(e,t,n,i,a.selectionSet,o))}function d(e,t,n,r,i,a,o,s=!1){for(let c of i)r.length>0?f(e,t,n,[...r,...c],a,o,s):f(e,t,n,c,a,o,s)}function f(e,t,n,r,i,a,o=!1,c=e){if(r.length===0){a(e,n,i,o);return}let[u,...d]=r;if(!(!n.selectionSet||!u))for(let p of n.selectionSet.selections)switch(p.kind){case l.Kind.FIELD:c.name===e.name&&!b(t,p)&&p.name.value===u.name&&((0,l.isObjectType)(e)||(0,l.isInterfaceType)(e))&&f((0,l.getNamedType)(e.getFields()[p.name.value].type),t,p,d,[...i,p.alias?.value??p.name.value],a,o);continue;case l.Kind.FRAGMENT_SPREAD:f(t.schema.getType(t.fragments[p.name.value].typeCondition.name.value),t,t.fragments[p.name.value],r,i,a,o||x(p,t),u.type?t.schema.getType(u.type):c);continue;case l.Kind.INLINE_FRAGMENT:(!p.typeCondition||!u.type||p.typeCondition.name.value===u.type)&&f(p.typeCondition?t.schema.getType(p.typeCondition.name.value):e,t,p,r,i,a,o||x(p,t),u.type?t.schema.getType(u.type):c);continue;default:throw new s(`Unsupported selection kind ${n.kind}`)}}function p(e,t,n,r,i,a,o=e){let c=e;for(let u of i.selections)switch(u.kind){case l.Kind.FIELD:if(o.name!==e.name)continue;m(e,t,n,r,u,a);continue;case l.Kind.FRAGMENT_SPREAD:if(r.skipDeferredFragments&&x(u,n))continue;c=n.schema.getType(n.fragments[u.name.value].typeCondition.name.value),p(c,t,n,r,n.fragments[u.name.value].selectionSet,a,c.extensions?.pothosPrismaModel===e.extensions.pothosPrismaModel?c:o);continue;case l.Kind.INLINE_FRAGMENT:if(r.skipDeferredFragments&&x(u,n))continue;c=u.typeCondition?n.schema.getType(u.typeCondition.name.value):e,p(c,t,n,r,u.selectionSet,a,c.extensions?.pothosPrismaModel===e.extensions.pothosPrismaModel?c:o);continue;default:throw new s(`Unsupported selection kind ${u.kind}`)}}function m(e,t,n,o,p,m){if(p.name.value.startsWith(`__`)||b(n,p))return;let h=e.getFields()[p.name.value];if(!h)throw new s(`Unknown field ${p.name.value} on ${e.name}`);let g=h.extensions?.pothosPrismaSelect,x,S={};if(typeof g==`function`){let e=c(h,p,t,n);x=g(e,t,(i,s,c)=>{let f=(0,l.getNamedType)(h.type),m=typeof i==`function`?i(e,t):i,g=Array.isArray(s)?y(s,v(f,n),c?(0,l.getNamedType)(n.schema.getType(c)):void 0):s,b=_(v(g?n.schema.getType(g.getType()):f,n),n,o.skipDeferredFragments,o);if(typeof m==`object`&&Object.keys(m).length>0&&r(b,{select:{},...m}),g?.path&&g.path.length>0||g?.paths&&g.paths.length>0)d(f,n,p,f.extensions?.pothosIndirectInclude?.path??[],g?.paths??(g?.path?[g.path]:[]),[],(e,r,i,a)=>{u(e,t,n,b,r,i,a)});else if(g){let e=n.schema.getType(g.getType());e!==f&&u(e,t,n,b,p,[])}return u(f,t,n,b,p,[]),S=b.mappings,a(b)},e=>{if(e.length===0)return p;let t=(0,l.getNamedType)(h.type),r=null;return f(t,n,p,e.map(e=>({name:e})),[],(e,t)=>{r=t}),r})}else x={select:g};g&&i(o,x,!0)&&(r(o,x),o.mappings[p.alias?.value??p.name.value]={field:p.name.value,type:e.name,mappings:S,indirectPath:m})}function h({context:t,info:n,typeName:r,select:i,include:s,path:c=[],paths:p=[],withUsageCheck:m=!1,skipDeferredFragments:h=!0}){let g=(0,l.getNamedType)(n.returnType),v=r?n.schema.getTypeMap()[r]:g,y,b=i?{select:i}:s?{include:s}:void 0;if(c.length>0||p.length>0){let{pothosIndirectInclude:e}=g.extensions??{};f(g,n,n.fieldNodes[0],e?.path??[],[],(e,i,a,o)=>{d(e,n,i,[],p.length>0?p.map(e=>e.map(e=>typeof e==`string`?{name:e}:e)):[c.map(e=>typeof e==`string`?{name:e}:e)],a,(e,i,a,o)=>{y=_(r?v:e,n,h,void 0,b),u(r?v:e,t,n,y,i,a,o)},o)})}else y=_(v,n,h,void 0,b),u(v,t,n,y,n.fieldNodes[0],[]);y||=_(v,n,h,void 0,b),e(t,n,y.mappings);let x=a(y);return m?o(x):x}function g(e,t,n,r){let i=r?t.schema.getTypeMap()[r]:t.parentType,a=_(i,t,n);if(!((0,l.isObjectType)(i)||(0,l.isInterfaceType)(i)))throw new s(`Prisma plugin can only resolve includes for object and interface types`);return m(i,e,t,a,t.fieldNodes[0],[]),a}function _(e,t,i,a,o){let s=v(e,t),c=n(s.extensions?.pothosPrismaFieldMap,s.extensions?.pothosPrismaSelect?`select`:`include`,i,a);return o&&r(c,o),c}function v(e,t){let n=e;for(;n.extensions?.pothosIndirectInclude;)n=t.schema.getType((n.extensions?.pothosIndirectInclude).getType());return n}function y(e,t,n){let r=e.length>0?t:n??t,i=[];if(!((0,l.isObjectType)(r)||(0,l.isInterfaceType)(r)))throw new s(`Expected ${r} to be an Object type`);for(let t of e){let e=r.getFields()[t];if(!e)throw new s(`Expected ${r} to have a field ${t}`);if(r=(0,l.getNamedType)(e.type),!((0,l.isObjectType)(r)||(0,l.isInterfaceType)(r)))throw new s(`Expected ${r} to be an Object or Interface type`);i.push({name:t,type:r.name})}return{getType:()=>n?.name??(i.length>0?i[i.length-1].type:t.name),path:i}}function b(e,t){return(0,l.getDirectiveValues)(l.GraphQLSkipDirective,t,e.variableValues)?.if===!0?!0:(0,l.getDirectiveValues)(l.GraphQLIncludeDirective,t,e.variableValues)?.if===!1}function x(e,t){let n=t.schema.getDirective(`defer`);if(!n)return!1;let r=(0,l.getDirectiveValues)(n,e,t.variableValues);return!!r&&r.if!==!1}export{h as queryFromInfo,g as selectionStateFromInfo};
1
+ import{setLoaderMappings as e}from"./loader-map.js";import{require_graphql as t}from"../../../../graphql/index.js";import{createState as n,mergeSelection as r,selectionCompatible as i,selectionToQuery as a}from"./selections.js";import{wrapWithUsageCheck as o}from"./usage.js";import{PothosValidationError as s,getMappedArgumentValues as c}from"@pothos/core";var l=t();function u(e,t,n,i,a,o,s){if(a.name.value.startsWith(`__`))return;let{pothosPrismaInclude:c,pothosPrismaSelect:f,pothosIndirectInclude:m,pothosPrismaModel:h}=e.extensions??{};if(m?.path&&m.path.length>0||m?.paths&&m.paths.length===0)d(e,n,a,[],m.paths??[m.path],o,(e,r,a,o)=>{u(e,t,n,i,r,a,o)});else if(m){u(n.schema.getType(m.getType()),t,n,i,a,o,s);return}((0,l.isObjectType)(e)||(0,l.isInterfaceType)(e))&&(h&&!f&&(i.mode=`include`),(c??f)&&r(i,{select:f?{...f}:void 0,include:c?{...c}:void 0}),a.selectionSet&&(!s||!i.skipDeferredFragments)&&p(e,t,n,i,a.selectionSet,o))}function d(e,t,n,r,i,a,o,s=!1){for(let c of i)r.length>0?f(e,t,n,[...r,...c],a,o,s):f(e,t,n,c,a,o,s)}function f(e,t,n,r,i,a,o=!1,c=e){if(r.length===0){a(e,n,i,o);return}let[u,...d]=r;if(!(!n.selectionSet||!u))for(let p of n.selectionSet.selections)switch(p.kind){case l.Kind.FIELD:c.name===e.name&&!x(t,p)&&p.name.value===u.name&&((0,l.isObjectType)(e)||(0,l.isInterfaceType)(e))&&f((0,l.getNamedType)(e.getFields()[p.name.value].type),t,p,d,[...i,p.alias?.value??p.name.value],a,o);continue;case l.Kind.FRAGMENT_SPREAD:f(t.schema.getType(t.fragments[p.name.value].typeCondition.name.value),t,t.fragments[p.name.value],r,i,a,o||S(p,t),u.type?t.schema.getType(u.type):c);continue;case l.Kind.INLINE_FRAGMENT:(!p.typeCondition||!u.type||p.typeCondition.name.value===u.type)&&f(p.typeCondition?t.schema.getType(p.typeCondition.name.value):e,t,p,r,i,a,o||S(p,t),u.type?t.schema.getType(u.type):c);continue;default:throw new s(`Unsupported selection kind ${n.kind}`)}}function p(e,t,n,r,i,a,o=e){let c=e;for(let u of i.selections)switch(u.kind){case l.Kind.FIELD:if(o.name!==e.name)continue;m(e,t,n,r,u,a);continue;case l.Kind.FRAGMENT_SPREAD:if(r.skipDeferredFragments&&S(u,n))continue;c=n.schema.getType(n.fragments[u.name.value].typeCondition.name.value),p(c,t,n,r,n.fragments[u.name.value].selectionSet,a,c.extensions?.pothosPrismaModel===e.extensions.pothosPrismaModel?c:o);continue;case l.Kind.INLINE_FRAGMENT:if(r.skipDeferredFragments&&S(u,n))continue;c=u.typeCondition?n.schema.getType(u.typeCondition.name.value):e,p(c,t,n,r,u.selectionSet,a,c.extensions?.pothosPrismaModel===e.extensions.pothosPrismaModel?c:o);continue;default:throw new s(`Unsupported selection kind ${u.kind}`)}}function m(e,t,n,o,p,m){if(p.name.value.startsWith(`__`)||x(n,p))return;let g=e.getFields()[p.name.value];if(!g)throw new s(`Unknown field ${p.name.value} on ${e.name}`);let _=g.extensions?.pothosPrismaSelect,S,C={};if(typeof _==`function`){let e=c(g,p,t,n);S=_(e,t,(i,s,c)=>{let f=(0,l.getNamedType)(g.type),m=typeof i==`function`?i(e,t):i,h=Array.isArray(s)?b(s,y(f,n),c?(0,l.getNamedType)(n.schema.getType(c)):void 0):s,_=v(y(h?n.schema.getType(h.getType()):f,n),n,o.skipDeferredFragments,o);if(typeof m==`object`&&Object.keys(m).length>0&&r(_,{select:{},...m}),h?.path&&h.path.length>0||h?.paths&&h.paths.length>0)d(f,n,p,f.extensions?.pothosIndirectInclude?.path??[],h?.paths??(h?.path?[h.path]:[]),[],(e,r,i,a)=>{u(e,t,n,_,r,i,a)});else if(h){let e=n.schema.getType(h.getType());e!==f&&u(e,t,n,_,p,[])}return u(f,t,n,_,p,[]),C=_.mappings,a(_)},e=>{if(e.length===0)return p;let t=(0,l.getNamedType)(g.type),r=null;return f(t,n,p,e.map(e=>({name:e})),[],(e,t)=>{r=t}),r})}else S={select:_};_&&i(o,S,!0)&&(r(o,S),o.mappings=h(o.mappings,{[p.alias?.value??p.name.value]:{field:p.name.value,type:e.name,mappings:C,indirectPath:m}}))}function h(e,t){let n={...e};for(let[e,r]of Object.entries(t))n[e]?n[e]={...n[e],mappings:h(n[e].mappings,r.mappings)}:n[e]=r;return n}function g({context:t,info:n,typeName:r,select:i,include:s,path:c=[],paths:p=[],withUsageCheck:m=!1,skipDeferredFragments:h=!0}){let g=(0,l.getNamedType)(n.returnType),_=r?n.schema.getTypeMap()[r]:g,y,b=i?{select:i}:s?{include:s}:void 0;if(c.length>0||p.length>0){let{pothosIndirectInclude:e}=g.extensions??{};f(g,n,n.fieldNodes[0],e?.path??[],[],(e,i,a,o)=>{d(e,n,i,[],p.length>0?p.map(e=>e.map(e=>typeof e==`string`?{name:e}:e)):[c.map(e=>typeof e==`string`?{name:e}:e)],a,(e,i,a,o)=>{y=v(r?_:e,n,h,void 0,b),u(r?_:e,t,n,y,i,a,o)},o)})}else y=v(_,n,h,void 0,b),u(_,t,n,y,n.fieldNodes[0],[]);y||=v(_,n,h,void 0,b),e(t,n,y.mappings);let x=a(y);return m?o(x):x}function _(e,t,n,r){let i=r?t.schema.getTypeMap()[r]:t.parentType,a=v(i,t,n);if(!((0,l.isObjectType)(i)||(0,l.isInterfaceType)(i)))throw new s(`Prisma plugin can only resolve includes for object and interface types`);return m(i,e,t,a,t.fieldNodes[0],[]),a}function v(e,t,i,a,o){let s=y(e,t),c=n(s.extensions?.pothosPrismaFieldMap,s.extensions?.pothosPrismaSelect?`select`:`include`,i,a);return o&&r(c,o),c}function y(e,t){let n=e;for(;n.extensions?.pothosIndirectInclude;)n=t.schema.getType(n.extensions.pothosIndirectInclude.getType());return n}function b(e,t,n){let r=e.length>0?t:n??t,i=[];if(!((0,l.isObjectType)(r)||(0,l.isInterfaceType)(r)))throw new s(`Expected ${r} to be an Object type`);for(let t of e){let e=r.getFields()[t];if(!e)throw new s(`Expected ${r} to have a field ${t}`);if(r=(0,l.getNamedType)(e.type),!((0,l.isObjectType)(r)||(0,l.isInterfaceType)(r)))throw new s(`Expected ${r} to be an Object or Interface type`);i.push({name:t,type:r.name})}return{getType:()=>n?.name??(i.length>0?i[i.length-1].type:t.name),path:i}}function x(e,t){return(0,l.getDirectiveValues)(l.GraphQLSkipDirective,t,e.variableValues)?.if===!0?!0:(0,l.getDirectiveValues)(l.GraphQLIncludeDirective,t,e.variableValues)?.if===!1}function S(e,t){let n=t.schema.getDirective(`defer`);if(!n)return!1;let r=(0,l.getDirectiveValues)(n,e,t.variableValues);return!!r&&r.if!==!1}export{g as queryFromInfo,_ as selectionStateFromInfo};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/lib.contracts",
3
- "version": "0.0.0-canary-20251213172311",
3
+ "version": "0.0.0-canary-20251215220103",
4
4
  "scripts": {
5
5
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
6
6
  "build": "bun build:bundle && bun build:types",
@@ -19,19 +19,20 @@
19
19
  "@lssm/tool.typescript": "workspace:*",
20
20
  "@types/express": "^5.0.3",
21
21
  "@types/turndown": "^5.0.6",
22
- "tsdown": "^0.17.0",
22
+ "tsdown": "^0.17.4",
23
23
  "typescript": "^5.9.3"
24
24
  },
25
25
  "dependencies": {
26
- "@aws-sdk/client-sqs": "^3.946.0",
27
- "@elevenlabs/elevenlabs-js": "^2.26.0",
26
+ "@aws-sdk/client-secrets-manager": "^3.950.0",
27
+ "@aws-sdk/client-sqs": "^3.948.0",
28
+ "@elevenlabs/elevenlabs-js": "^2.27.0",
28
29
  "@google-cloud/secret-manager": "^6.1.1",
29
30
  "@google-cloud/storage": "^7.18.0",
30
31
  "@lssm/lib.schema": "workspace:*",
31
32
  "@mistralai/mistralai": "^1.2.3",
32
33
  "@modelcontextprotocol/sdk": "^1.24.3",
33
34
  "@qdrant/js-client-rest": "^1.16.2",
34
- "googleapis": "^167.0.0",
35
+ "googleapis": "^168.0.0",
35
36
  "mcp-handler": "^1.0.4",
36
37
  "postmark": "^4.0.4",
37
38
  "stripe": "^19.1.0",
@@ -42,14 +43,14 @@
42
43
  "peerDependencies": {
43
44
  "@pothos/core": "^4.9.1",
44
45
  "@pothos/plugin-relay": "^4.4.3",
45
- "elysia": "^1.4.18",
46
+ "elysia": "^1.4.19",
46
47
  "express": "^5.2.1",
47
48
  "graphql-scalars": "^1.24.2",
48
- "next": "16.0.7",
49
- "@blocknote/core": "^0.44.0",
50
- "@blocknote/react": "^0.44.0",
51
- "react": "^19.2.1",
52
- "react-dom": "^19.2.1",
49
+ "next": "16.0.10",
50
+ "@blocknote/core": "^0.44.2",
51
+ "@blocknote/react": "^0.44.2",
52
+ "react": "^19.2.3",
53
+ "react-dom": "^19.2.3",
53
54
  "react-hook-form": "^7.68.0",
54
55
  "@hookform/resolvers": "^5.2.2"
55
56
  },
@@ -98,6 +99,7 @@
98
99
  "./docs/PUBLISHING.docblock": "./src/docs/PUBLISHING.docblock.ts",
99
100
  "./docs/registry": "./src/docs/registry.ts",
100
101
  "./docs/tech-contracts.docs": "./src/docs/tech-contracts.docs.ts",
102
+ "./docs/tech/auth/better-auth-nextjs.docblock": "./src/docs/tech/auth/better-auth-nextjs.docblock.ts",
101
103
  "./docs/tech/contracts/create-subscription.docblock": "./src/docs/tech/contracts/create-subscription.docblock.ts",
102
104
  "./docs/tech/contracts/graphql-typed-outputs.docblock": "./src/docs/tech/contracts/graphql-typed-outputs.docblock.ts",
103
105
  "./docs/tech/contracts/migrations.docblock": "./src/docs/tech/contracts/migrations.docblock.ts",
@@ -117,6 +119,15 @@
117
119
  "./docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock": "./src/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.ts",
118
120
  "./docs/tech/presentation-runtime.docblock": "./src/docs/tech/presentation-runtime.docblock.ts",
119
121
  "./docs/tech/schema/README.docblock": "./src/docs/tech/schema/README.docblock.ts",
122
+ "./docs/tech/studio/learning-events.docblock": "./src/docs/tech/studio/learning-events.docblock.ts",
123
+ "./docs/tech/studio/learning-journeys.docblock": "./src/docs/tech/studio/learning-journeys.docblock.ts",
124
+ "./docs/tech/studio/platform-admin-panel.docblock": "./src/docs/tech/studio/platform-admin-panel.docblock.ts",
125
+ "./docs/tech/studio/project-access-teams.docblock": "./src/docs/tech/studio/project-access-teams.docblock.ts",
126
+ "./docs/tech/studio/project-routing.docblock": "./src/docs/tech/studio/project-routing.docblock.ts",
127
+ "./docs/tech/studio/sandbox-unlogged.docblock": "./src/docs/tech/studio/sandbox-unlogged.docblock.ts",
128
+ "./docs/tech/studio/team-invitations.docblock": "./src/docs/tech/studio/team-invitations.docblock.ts",
129
+ "./docs/tech/studio/workspace-ops.docblock": "./src/docs/tech/studio/workspace-ops.docblock.ts",
130
+ "./docs/tech/studio/workspaces.docblock": "./src/docs/tech/studio/workspaces.docblock.ts",
120
131
  "./docs/tech/telemetry-ingest.docblock": "./src/docs/tech/telemetry-ingest.docblock.ts",
121
132
  "./docs/tech/templates/runtime.docblock": "./src/docs/tech/templates/runtime.docblock.ts",
122
133
  "./docs/tech/vscode-extension.docblock": "./src/docs/tech/vscode-extension.docblock.ts",
@@ -174,6 +185,7 @@
174
185
  "./integrations/providers/postmark": "./src/integrations/providers/postmark.ts",
175
186
  "./integrations/providers/powens": "./src/integrations/providers/powens.ts",
176
187
  "./integrations/providers/qdrant": "./src/integrations/providers/qdrant.ts",
188
+ "./integrations/providers/registry": "./src/integrations/providers/registry.ts",
177
189
  "./integrations/providers/sms": "./src/integrations/providers/sms.ts",
178
190
  "./integrations/providers/storage": "./src/integrations/providers/storage.ts",
179
191
  "./integrations/providers/stripe": "./src/integrations/providers/stripe.ts",
@@ -182,10 +194,12 @@
182
194
  "./integrations/providers/voice": "./src/integrations/providers/voice.ts",
183
195
  "./integrations/runtime": "./src/integrations/runtime.ts",
184
196
  "./integrations/secrets": "./src/integrations/secrets/index.ts",
197
+ "./integrations/secrets/aws-secret-manager": "./src/integrations/secrets/aws-secret-manager.ts",
185
198
  "./integrations/secrets/env-secret-provider": "./src/integrations/secrets/env-secret-provider.ts",
186
199
  "./integrations/secrets/gcp-secret-manager": "./src/integrations/secrets/gcp-secret-manager.ts",
187
200
  "./integrations/secrets/manager": "./src/integrations/secrets/manager.ts",
188
201
  "./integrations/secrets/provider": "./src/integrations/secrets/provider.ts",
202
+ "./integrations/secrets/scaleway-secret-manager": "./src/integrations/secrets/scaleway-secret-manager.ts",
189
203
  "./integrations/spec": "./src/integrations/spec.ts",
190
204
  "./jobs": "./src/jobs/index.ts",
191
205
  "./jobs/define-job": "./src/jobs/define-job.ts",
@@ -329,6 +343,7 @@
329
343
  "./docs/PUBLISHING.docblock": "./dist/docs/PUBLISHING.docblock.js",
330
344
  "./docs/registry": "./dist/docs/registry.js",
331
345
  "./docs/tech-contracts.docs": "./dist/docs/tech-contracts.docs.js",
346
+ "./docs/tech/auth/better-auth-nextjs.docblock": "./dist/docs/tech/auth/better-auth-nextjs.docblock.js",
332
347
  "./docs/tech/contracts/create-subscription.docblock": "./dist/docs/tech/contracts/create-subscription.docblock.js",
333
348
  "./docs/tech/contracts/graphql-typed-outputs.docblock": "./dist/docs/tech/contracts/graphql-typed-outputs.docblock.js",
334
349
  "./docs/tech/contracts/migrations.docblock": "./dist/docs/tech/contracts/migrations.docblock.js",
@@ -348,6 +363,15 @@
348
363
  "./docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock": "./dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js",
349
364
  "./docs/tech/presentation-runtime.docblock": "./dist/docs/tech/presentation-runtime.docblock.js",
350
365
  "./docs/tech/schema/README.docblock": "./dist/docs/tech/schema/README.docblock.js",
366
+ "./docs/tech/studio/learning-events.docblock": "./dist/docs/tech/studio/learning-events.docblock.js",
367
+ "./docs/tech/studio/learning-journeys.docblock": "./dist/docs/tech/studio/learning-journeys.docblock.js",
368
+ "./docs/tech/studio/platform-admin-panel.docblock": "./dist/docs/tech/studio/platform-admin-panel.docblock.js",
369
+ "./docs/tech/studio/project-access-teams.docblock": "./dist/docs/tech/studio/project-access-teams.docblock.js",
370
+ "./docs/tech/studio/project-routing.docblock": "./dist/docs/tech/studio/project-routing.docblock.js",
371
+ "./docs/tech/studio/sandbox-unlogged.docblock": "./dist/docs/tech/studio/sandbox-unlogged.docblock.js",
372
+ "./docs/tech/studio/team-invitations.docblock": "./dist/docs/tech/studio/team-invitations.docblock.js",
373
+ "./docs/tech/studio/workspace-ops.docblock": "./dist/docs/tech/studio/workspace-ops.docblock.js",
374
+ "./docs/tech/studio/workspaces.docblock": "./dist/docs/tech/studio/workspaces.docblock.js",
351
375
  "./docs/tech/telemetry-ingest.docblock": "./dist/docs/tech/telemetry-ingest.docblock.js",
352
376
  "./docs/tech/templates/runtime.docblock": "./dist/docs/tech/templates/runtime.docblock.js",
353
377
  "./docs/tech/vscode-extension.docblock": "./dist/docs/tech/vscode-extension.docblock.js",
@@ -405,6 +429,7 @@
405
429
  "./integrations/providers/postmark": "./dist/integrations/providers/postmark.js",
406
430
  "./integrations/providers/powens": "./dist/integrations/providers/powens.js",
407
431
  "./integrations/providers/qdrant": "./dist/integrations/providers/qdrant.js",
432
+ "./integrations/providers/registry": "./dist/integrations/providers/registry.js",
408
433
  "./integrations/providers/sms": "./dist/integrations/providers/sms.js",
409
434
  "./integrations/providers/storage": "./dist/integrations/providers/storage.js",
410
435
  "./integrations/providers/stripe": "./dist/integrations/providers/stripe.js",
@@ -413,10 +438,12 @@
413
438
  "./integrations/providers/voice": "./dist/integrations/providers/voice.js",
414
439
  "./integrations/runtime": "./dist/integrations/runtime.js",
415
440
  "./integrations/secrets": "./dist/integrations/secrets/index.js",
441
+ "./integrations/secrets/aws-secret-manager": "./dist/integrations/secrets/aws-secret-manager.js",
416
442
  "./integrations/secrets/env-secret-provider": "./dist/integrations/secrets/env-secret-provider.js",
417
443
  "./integrations/secrets/gcp-secret-manager": "./dist/integrations/secrets/gcp-secret-manager.js",
418
444
  "./integrations/secrets/manager": "./dist/integrations/secrets/manager.js",
419
445
  "./integrations/secrets/provider": "./dist/integrations/secrets/provider.js",
446
+ "./integrations/secrets/scaleway-secret-manager": "./dist/integrations/secrets/scaleway-secret-manager.js",
420
447
  "./integrations/spec": "./dist/integrations/spec.js",
421
448
  "./jobs": "./dist/jobs/index.js",
422
449
  "./jobs/define-job": "./dist/jobs/define-job.js",