@lssm/lib.feature-flags 0.0.0-canary-20251217083314 → 1.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/contracts/index.js +1 -910
  2. package/dist/docs/feature-flags.docblock.js +2 -21
  3. package/dist/docs/index.js +1 -1
  4. package/dist/entities/index.js +1 -325
  5. package/dist/evaluation/index.js +1 -220
  6. package/dist/events.js +1 -459
  7. package/dist/feature-flags.feature.js +1 -139
  8. package/dist/index.js +1 -8
  9. package/package.json +13 -13
  10. package/dist/contracts/dist/capabilities/openbanking.js +0 -88
  11. package/dist/contracts/dist/client/index.js +0 -5
  12. package/dist/contracts/dist/client/react/feature-render.js +0 -2
  13. package/dist/contracts/dist/client/react/form-render.js +0 -4
  14. package/dist/contracts/dist/client/react/index.js +0 -4
  15. package/dist/contracts/dist/contract-registry/index.js +0 -1
  16. package/dist/contracts/dist/contract-registry/schemas.js +0 -60
  17. package/dist/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  18. package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  19. package/dist/contracts/dist/docs/index.js +0 -29
  20. package/dist/contracts/dist/docs/presentations.js +0 -71
  21. package/dist/contracts/dist/docs/registry.js +0 -44
  22. package/dist/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  23. package/dist/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  24. package/dist/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  25. package/dist/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  26. package/dist/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  27. package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
  28. package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
  29. package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  30. package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
  31. package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  32. package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  33. package/dist/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  34. package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  35. package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
  36. package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
  37. package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  38. package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  39. package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  40. package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
  41. package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  42. package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
  43. package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
  44. package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  45. package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
  46. package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  47. package/dist/contracts/dist/events.js +0 -10
  48. package/dist/contracts/dist/experiments/evaluator.js +0 -1
  49. package/dist/contracts/dist/index.js +0 -71
  50. package/dist/contracts/dist/install.js +0 -2
  51. package/dist/contracts/dist/integrations/contracts.js +0 -377
  52. package/dist/contracts/dist/integrations/index.js +0 -18
  53. package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
  54. package/dist/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
  55. package/dist/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  56. package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
  57. package/dist/contracts/dist/integrations/openbanking/models.js +0 -242
  58. package/dist/contracts/dist/integrations/openbanking/telemetry.js +0 -13
  59. package/dist/contracts/dist/integrations/providers/elevenlabs.js +0 -52
  60. package/dist/contracts/dist/integrations/providers/gcs-storage.js +0 -75
  61. package/dist/contracts/dist/integrations/providers/gmail.js +0 -87
  62. package/dist/contracts/dist/integrations/providers/google-calendar.js +0 -66
  63. package/dist/contracts/dist/integrations/providers/index.js +0 -11
  64. package/dist/contracts/dist/integrations/providers/mistral.js +0 -68
  65. package/dist/contracts/dist/integrations/providers/postmark.js +0 -68
  66. package/dist/contracts/dist/integrations/providers/powens.js +0 -116
  67. package/dist/contracts/dist/integrations/providers/qdrant.js +0 -73
  68. package/dist/contracts/dist/integrations/providers/registry.js +0 -10
  69. package/dist/contracts/dist/integrations/providers/stripe.js +0 -83
  70. package/dist/contracts/dist/integrations/providers/twilio-sms.js +0 -61
  71. package/dist/contracts/dist/jsonschema.js +0 -1
  72. package/dist/contracts/dist/knowledge/contracts.js +0 -306
  73. package/dist/contracts/dist/knowledge/index.js +0 -7
  74. package/dist/contracts/dist/knowledge/spaces/email-threads.js +0 -34
  75. package/dist/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
  76. package/dist/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
  77. package/dist/contracts/dist/knowledge/spaces/index.js +0 -6
  78. package/dist/contracts/dist/knowledge/spaces/product-canon.js +0 -34
  79. package/dist/contracts/dist/knowledge/spaces/support-faq.js +0 -37
  80. package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
  81. package/dist/contracts/dist/llm/exporters.js +0 -19
  82. package/dist/contracts/dist/llm/index.js +0 -2
  83. package/dist/contracts/dist/llm/prompts.js +0 -1
  84. package/dist/contracts/dist/onboarding-base.js +0 -196
  85. package/dist/contracts/dist/openapi.js +0 -1
  86. package/dist/contracts/dist/ownership.js +0 -21
  87. package/dist/contracts/dist/presentations.js +0 -1
  88. package/dist/contracts/dist/presentations.v2.js +0 -11
  89. package/dist/contracts/dist/prompt.js +0 -1
  90. package/dist/contracts/dist/promptRegistry.js +0 -1
  91. package/dist/contracts/dist/regenerator/index.js +0 -1
  92. package/dist/contracts/dist/regenerator/service.js +0 -6
  93. package/dist/contracts/dist/registry.js +0 -2
  94. package/dist/contracts/dist/resources.js +0 -1
  95. package/dist/contracts/dist/schema/dist/EnumType.js +0 -2
  96. package/dist/contracts/dist/schema/dist/FieldType.js +0 -49
  97. package/dist/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  98. package/dist/contracts/dist/schema/dist/SchemaModel.js +0 -34
  99. package/dist/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  100. package/dist/contracts/dist/schema/dist/entity/index.js +0 -2
  101. package/dist/contracts/dist/schema/dist/entity/types.js +0 -1
  102. package/dist/contracts/dist/schema/dist/index.js +0 -6
  103. package/dist/contracts/dist/server/graphql-pothos.js +0 -6
  104. package/dist/contracts/dist/server/index.js +0 -8
  105. package/dist/contracts/dist/server/mcp/createMcpServer.js +0 -4
  106. package/dist/contracts/dist/server/mcp/registerPresentations.js +0 -2
  107. package/dist/contracts/dist/server/mcp/registerPrompts.js +0 -1
  108. package/dist/contracts/dist/server/mcp/registerResources.js +0 -2
  109. package/dist/contracts/dist/server/mcp/registerTools.js +0 -1
  110. package/dist/contracts/dist/server/provider-mcp.js +0 -1
  111. package/dist/contracts/dist/server/rest-elysia.js +0 -1
  112. package/dist/contracts/dist/server/rest-express.js +0 -1
  113. package/dist/contracts/dist/server/rest-generic.js +0 -1
  114. package/dist/contracts/dist/server/rest-next-app.js +0 -1
  115. package/dist/contracts/dist/server/rest-next-pages.js +0 -1
  116. package/dist/contracts/dist/spec.js +0 -34
  117. package/dist/contracts/dist/telemetry/index.js +0 -1
  118. package/dist/contracts/dist/telemetry/tracker.js +0 -1
  119. package/dist/contracts/dist/tests/index.js +0 -1
  120. package/dist/contracts/dist/tests/runner.js +0 -2
  121. package/dist/contracts/dist/workflow/index.js +0 -1
  122. package/dist/contracts/dist/workflow/runner.js +0 -1
  123. package/dist/contracts/index.d.ts +0 -1006
  124. package/dist/docs/feature-flags.docblock.d.ts +0 -1
  125. package/dist/docs/index.d.ts +0 -1
  126. package/dist/entities/index.d.ts +0 -200
  127. package/dist/evaluation/index.d.ts +0 -162
  128. package/dist/events.d.ts +0 -624
  129. package/dist/feature-flags.feature.d.ts +0 -11
  130. package/dist/index.d.ts +0 -6
  131. package/dist/schema/dist/EnumType.js +0 -2
  132. package/dist/schema/dist/FieldType.js +0 -49
  133. package/dist/schema/dist/ScalarTypeEnum.js +0 -236
  134. package/dist/schema/dist/SchemaModel.js +0 -39
  135. package/dist/schema/dist/entity/defineEntity.js +0 -236
  136. package/dist/schema/dist/entity/index.js +0 -2
  137. package/dist/schema/dist/entity/types.js +0 -1
  138. package/dist/schema/dist/index.js +0 -6
@@ -1,101 +0,0 @@
1
- import { registerDocBlocks } from "../registry.js";
2
-
3
- //#region ../contracts/dist/docs/tech/vscode-extension.docblock.js
4
- const tech_vscode_extension_DocBlocks = [{
5
- id: "docs.tech.vscode.extension",
6
- title: "ContractSpec VS Code Extension",
7
- summary: "VS Code extension for spec-first development with validation, scaffolding, and MCP integration.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/tech/vscode/extension",
11
- tags: [
12
- "vscode",
13
- "extension",
14
- "tooling",
15
- "dx"
16
- ],
17
- body: `# ContractSpec VS Code Extension
18
-
19
- The ContractSpec VS Code extension provides spec-first development tooling directly in your editor.
20
-
21
- ## Features
22
-
23
- - **Real-time Validation**: Get instant feedback on spec errors and warnings as you save files
24
- - **Build/Scaffold**: Generate handler and component skeletons from specs (no AI required)
25
- - **Spec Explorer**: List and navigate all specs in your workspace
26
- - **Dependency Analysis**: Visualize spec dependencies and detect cycles
27
- - **MCP Integration**: Search ContractSpec documentation via Model Context Protocol
28
- - **Snippets**: Code snippets for common ContractSpec patterns
29
-
30
- ## Commands
31
-
32
- | Command | Description |
33
- |---------|-------------|
34
- | \`ContractSpec: Validate Current Spec\` | Validate the currently open spec file |
35
- | \`ContractSpec: Validate All Specs\` | Validate all spec files in the workspace |
36
- | \`ContractSpec: Build/Scaffold\` | Generate handler/component from the current spec |
37
- | \`ContractSpec: List All Specs\` | Show all specs in the workspace |
38
- | \`ContractSpec: Analyze Dependencies\` | Analyze and visualize spec dependencies |
39
- | \`ContractSpec: Search Docs (MCP)\` | Search documentation via MCP |
40
-
41
- ## Configuration
42
-
43
- | Setting | Description | Default |
44
- |---------|-------------|---------|
45
- | \`contractspec.api.baseUrl\` | Base URL for ContractSpec API (enables MCP + remote telemetry) | \`""\` |
46
- | \`contractspec.telemetry.posthogHost\` | PostHog host URL for direct telemetry | \`"https://eu.posthog.com"\` |
47
- | \`contractspec.telemetry.posthogProjectKey\` | PostHog project key for direct telemetry | \`""\` |
48
- | \`contractspec.validation.onSave\` | Run validation on save | \`true\` |
49
- | \`contractspec.validation.onOpen\` | Run validation on open | \`true\` |
50
-
51
- ## Architecture
52
-
53
- The extension uses:
54
- - \`@lssm/module.contractspec-workspace\` for pure analysis + templates
55
- - \`@lssm/bundle.contractspec-workspace\` for workspace services + adapters
56
-
57
- This allows the extension to work without requiring the CLI to be installed.
58
-
59
- ## Telemetry
60
-
61
- The extension uses a hybrid telemetry approach:
62
- 1. If \`contractspec.api.baseUrl\` is configured → send to API \`/api/telemetry/ingest\`
63
- 2. Otherwise → send directly to PostHog (if project key configured)
64
-
65
- Telemetry respects VS Code's telemetry settings. No file paths, source code, or PII is collected.
66
- `
67
- }, {
68
- id: "docs.tech.vscode.snippets",
69
- title: "ContractSpec Snippets",
70
- summary: "Code snippets for common ContractSpec patterns in VS Code.",
71
- kind: "reference",
72
- visibility: "public",
73
- route: "/docs/tech/vscode/snippets",
74
- tags: [
75
- "vscode",
76
- "snippets",
77
- "dx"
78
- ],
79
- body: `# ContractSpec Snippets
80
-
81
- The VS Code extension includes snippets for common ContractSpec patterns.
82
-
83
- ## Available Snippets
84
-
85
- | Prefix | Description |
86
- |--------|-------------|
87
- | \`contractspec-command\` | Create a new command (write operation) |
88
- | \`contractspec-query\` | Create a new query (read-only operation) |
89
- | \`contractspec-event\` | Create a new event |
90
- | \`contractspec-docblock\` | Create a new DocBlock |
91
- | \`contractspec-telemetry\` | Create a new TelemetrySpec |
92
- | \`contractspec-presentation\` | Create a new Presentation |
93
-
94
- ## Usage
95
-
96
- Type the prefix in a TypeScript file and press Tab to expand the snippet. Tab through the placeholders to fill in your values.
97
- `
98
- }];
99
- registerDocBlocks(tech_vscode_extension_DocBlocks);
100
-
101
- //#endregion
@@ -1,20 +0,0 @@
1
- import { registerDocBlocks } from "../../registry.js";
2
-
3
- //#region ../contracts/dist/docs/tech/workflows/overview.docblock.js
4
- const tech_workflows_overview_DocBlocks = [{
5
- id: "docs.tech.workflows.overview",
6
- title: "WorkflowSpec Overview",
7
- summary: "WorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/tech/workflows/overview",
11
- tags: [
12
- "tech",
13
- "workflows",
14
- "overview"
15
- ],
16
- body: "# WorkflowSpec Overview\n\n## Purpose\n\nWorkflowSpec provides a declarative, versioned format for long-running flows that mix automation and human review. Specs stay inside `@lssm/lib.contracts` (`src/workflow/spec.ts`) so the same definition powers runtime execution, documentation, and future generation.\n\n## Core Types\n\n- `WorkflowMeta`: ownership metadata (`title`, `domain`, `owners`, `tags`, `stability`) plus `name` and `version`.\n- `WorkflowDefinition`:\n - `entryStepId?`: optional explicit entry point (defaults to first step).\n - `steps[]`: ordered list of `Step` descriptors.\n - `transitions[]`: directed edges between steps with optional expressions.\n - `sla?`: aggregated timing hints for the overall flow or per-step budgets.\n - `compensation?`: fallback operations executed when a workflow is rolled back or fails.\n- `Step`:\n - `type`: `human`, `automation`, or `decision`.\n - `action`: references either a `ContractSpec` (`operation`) or `FormSpec` (`form`).\n - Optional `guard`, `timeoutMs`, and retry policy (`maxAttempts`, `backoff`, `delayMs`, `maxDelayMs?`).\n - `requiredIntegrations?`: integration slot ids that must be bound before the step may execute.\n - `requiredCapabilities?`: `CapabilityRef[]` that must be enabled in the resolved app config.\n- `Transition`: `from` → `to` with optional `condition` string (simple data expressions).\n\n## Registry & Validation\n\n- `WorkflowRegistry` (`src/workflow/spec.ts`) stores specs by key `<name>.v<version>` and exposes `register`, `list`, and `get`.\n- `validateWorkflowSpec()` (`src/workflow/validation.ts`) checks:\n - Duplicate step IDs.\n - Unknown `from`/`to` transitions.\n - Empty guards/conditions.\n - Reachability from the entry step.\n - Cycles in the graph.\n - Operation/Form references against provided registries.\n- `assertWorkflowSpecValid()` wraps validation and throws `WorkflowValidationError` when errors remain.\n\n## Runtime\n\n- `WorkflowRunner` (`src/workflow/runner.ts`) executes workflows and coordinates steps.\n - `start(name, version?, initialData?)` returns a `workflowId`.\n - `executeStep(workflowId, input?)` runs the current step (automation or human).\n - `getState(workflowId)` retrieves the latest state snapshot.\n - `cancel(workflowId)` marks the workflow as cancelled.\n - `preFlightCheck(name, version?, resolvedConfig?)` evaluates integration/capability requirements before the workflow starts.\n - Throws `WorkflowPreFlightError` if required integration slots are unbound or required capabilities are disabled.\n- `StateStore` (`src/workflow/state.ts`) abstracts persistence. V1 ships with:\n - `InMemoryStateStore` (`src/workflow/adapters/memory-store.ts`) for tests/dev.\n - Placeholder factories for file/database adapters (`adapters/file-adapter.ts`, `adapters/db-adapter.ts`).\n- Guard evaluation: expression guards run through `evaluateExpression()` (`src/workflow/expression.ts`); custom policy guards can be provided via `guardEvaluator`.\n- Events: the runner emits `workflow.started`, `workflow.step_completed`, `workflow.step_failed`, and `workflow.cancelled` through the optional `eventEmitter`.\n- React bindings (`@lssm/lib.presentation-runtime-react`):\n - `useWorkflow` hook (polls state, exposes `executeStep`, `cancel`, `refresh`).\n - `WorkflowStepper` progress indicator using design-system Stepper.\n - `WorkflowStepRenderer` helper to render human/automation/decision steps with sensible fallbacks.\n\n## Authoring Checklist\n\n1. Reuse existing operations/forms; create new specs when missing.\n2. Prefer explicit `entryStepId` for clarity (especially with decision branches).\n3. Give automation steps an `operation` and human steps a `form` (warnings surface otherwise).\n4. Use short, meaningful step IDs (`submit`, `review`, `finalize`) to simplify analytics.\n5. Keep guard expressions deterministic; complex policy logic should move to PolicySpec (Phase 2).\n\n## Testing\n\n- Add unit tests for new workflows via `assertWorkflowSpecValid`.\n- Use the new Vitest suites (`validation.test.ts`, `expression.test.ts`, `runner.test.ts`) as examples.\n- CLI support will arrive in Phase 1 PR 3 (`contractspec create --type workflow`).\n\n## Tooling\n\n- `contractspec create --type workflow` scaffolds a WorkflowSpec with interactive prompts.\n- `contractspec build <spec.workflow.ts>` generates a runner scaffold (`.runner.ts`) wired to `WorkflowRunner` and the in-memory store.\n- `contractspec validate` understands `.workflow.ts` files and checks core structure (meta, steps, transitions).\n\n## Next Steps (Non-MVP)\n\n- Persistence adapters (database/file) for workflow state (Phase 2).\n- React bindings (`useWorkflow`, `WorkflowStepper`) and presentation-runtime integration (PR 3).\n- Policy engine integration (`guard.type === 'policy'` validated against PolicySpec).\n- Telemetry hooks for step execution metrics.\n\n"
17
- }];
18
- registerDocBlocks(tech_workflows_overview_DocBlocks);
19
-
20
- //#endregion
@@ -1,10 +0,0 @@
1
- import "./schema/dist/index.js";
2
-
3
- //#region ../contracts/dist/events.js
4
- /** Identity function to keep type inference when declaring events. */
5
- function defineEvent(e) {
6
- return e;
7
- }
8
-
9
- //#endregion
10
- export { defineEvent };
@@ -1 +0,0 @@
1
- import "node:crypto";
@@ -1,71 +0,0 @@
1
- import "./schema/dist/SchemaModel.js";
2
- import "./schema/dist/index.js";
3
- import { defineEvent } from "./events.js";
4
- import "./presentations.v2.js";
5
- import "./client/react/feature-render.js";
6
- import "./client/react/form-render.js";
7
- import "./client/index.js";
8
- import "./jsonschema.js";
9
- import "./server/graphql-pothos.js";
10
- import "./presentations.js";
11
- import "./server/mcp/createMcpServer.js";
12
- import "./server/rest-generic.js";
13
- import "./server/rest-elysia.js";
14
- import "./server/rest-express.js";
15
- import "./server/rest-next-app.js";
16
- import "./server/rest-next-pages.js";
17
- import "./server/index.js";
18
- import { defineCommand, defineQuery } from "./spec.js";
19
- import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes } from "./docs/presentations.js";
20
- import { DocRegistry, defaultDocRegistry, registerDocBlocks } from "./docs/registry.js";
21
- import "./registry.js";
22
- import { OwnersEnum, StabilityEnum } from "./ownership.js";
23
- import { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema } from "./contract-registry/schemas.js";
24
- import "./contract-registry/index.js";
25
- import "./install.js";
26
- import "./openapi.js";
27
- import "./prompt.js";
28
- import "./promptRegistry.js";
29
- import "./resources.js";
30
- import { CompleteOnboardingBaseInput, CompleteOnboardingBaseOutput, DeleteOnboardingDraftOutput, GetOnboardingDraftOutput, SaveOnboardingDraftInput, SaveOnboardingDraftOutput } from "./onboarding-base.js";
31
- import "./capabilities/openbanking.js";
32
- import "./telemetry/tracker.js";
33
- import "./telemetry/index.js";
34
- import "./tests/runner.js";
35
- import "./tests/index.js";
36
- import "./experiments/evaluator.js";
37
- import "./integrations/providers/stripe.js";
38
- import "./integrations/providers/postmark.js";
39
- import "./integrations/providers/qdrant.js";
40
- import "./integrations/providers/mistral.js";
41
- import "./integrations/providers/elevenlabs.js";
42
- import "./integrations/providers/gmail.js";
43
- import "./integrations/providers/google-calendar.js";
44
- import "./integrations/providers/twilio-sms.js";
45
- import "./integrations/providers/gcs-storage.js";
46
- import "./integrations/providers/powens.js";
47
- import "./integrations/providers/registry.js";
48
- import { AccountBalanceRecord, BankAccountRecord, BankTransactionRecord } from "./integrations/openbanking/models.js";
49
- import { OPENBANKING_TELEMETRY_EVENTS } from "./integrations/openbanking/telemetry.js";
50
- import "./integrations/openbanking/contracts/accounts.js";
51
- import "./integrations/openbanking/contracts/transactions.js";
52
- import "./integrations/openbanking/contracts/balances.js";
53
- import "./integrations/openbanking/contracts/index.js";
54
- import "./integrations/index.js";
55
- import "./knowledge/spaces/product-canon.js";
56
- import "./knowledge/spaces/support-faq.js";
57
- import "./knowledge/spaces/email-threads.js";
58
- import "./knowledge/spaces/uploaded-docs.js";
59
- import "./knowledge/spaces/financial-docs.js";
60
- import "./knowledge/spaces/financial-overview.js";
61
- import "./knowledge/index.js";
62
- import "./integrations/contracts.js";
63
- import "./knowledge/contracts.js";
64
- import "./regenerator/service.js";
65
- import "./regenerator/index.js";
66
- import "./workflow/runner.js";
67
- import "./workflow/index.js";
68
- import "./docs/index.js";
69
- import "./llm/exporters.js";
70
- import "./llm/prompts.js";
71
- import "./llm/index.js";
@@ -1,2 +0,0 @@
1
- import "./registry.js";
2
- import "zod";
@@ -1,377 +0,0 @@
1
- import { SchemaModel } from "../schema/dist/SchemaModel.js";
2
- import { ScalarTypeEnum } from "../schema/dist/ScalarTypeEnum.js";
3
- import "../schema/dist/index.js";
4
- import { defineCommand, defineQuery } from "../spec.js";
5
-
6
- //#region ../contracts/dist/integrations/contracts.js
7
- const IntegrationConnectionRecord = new SchemaModel({
8
- name: "IntegrationConnectionRecord",
9
- fields: {
10
- id: {
11
- type: ScalarTypeEnum.ID(),
12
- isOptional: false
13
- },
14
- tenantId: {
15
- type: ScalarTypeEnum.ID(),
16
- isOptional: false
17
- },
18
- integrationKey: {
19
- type: ScalarTypeEnum.NonEmptyString(),
20
- isOptional: false
21
- },
22
- integrationVersion: {
23
- type: ScalarTypeEnum.Int_unsecure(),
24
- isOptional: false
25
- },
26
- label: {
27
- type: ScalarTypeEnum.String_unsecure(),
28
- isOptional: false
29
- },
30
- ownershipMode: {
31
- type: ScalarTypeEnum.String_unsecure(),
32
- isOptional: false
33
- },
34
- externalAccountId: {
35
- type: ScalarTypeEnum.String_unsecure(),
36
- isOptional: true
37
- },
38
- secretProvider: {
39
- type: ScalarTypeEnum.String_unsecure(),
40
- isOptional: false
41
- },
42
- secretRef: {
43
- type: ScalarTypeEnum.String_unsecure(),
44
- isOptional: false
45
- },
46
- status: {
47
- type: ScalarTypeEnum.String_unsecure(),
48
- isOptional: false
49
- },
50
- environment: {
51
- type: ScalarTypeEnum.String_unsecure(),
52
- isOptional: true
53
- },
54
- healthStatus: {
55
- type: ScalarTypeEnum.String_unsecure(),
56
- isOptional: true
57
- },
58
- healthCheckedAt: {
59
- type: ScalarTypeEnum.DateTime(),
60
- isOptional: true
61
- },
62
- healthLatencyMs: {
63
- type: ScalarTypeEnum.Float_unsecure(),
64
- isOptional: true
65
- },
66
- healthErrorCode: {
67
- type: ScalarTypeEnum.String_unsecure(),
68
- isOptional: true
69
- },
70
- healthErrorMessage: {
71
- type: ScalarTypeEnum.String_unsecure(),
72
- isOptional: true
73
- },
74
- usageRequestCount: {
75
- type: ScalarTypeEnum.Int_unsecure(),
76
- isOptional: true
77
- },
78
- usageSuccessCount: {
79
- type: ScalarTypeEnum.Int_unsecure(),
80
- isOptional: true
81
- },
82
- usageErrorCount: {
83
- type: ScalarTypeEnum.Int_unsecure(),
84
- isOptional: true
85
- },
86
- usageLastUsedAt: {
87
- type: ScalarTypeEnum.DateTime(),
88
- isOptional: true
89
- },
90
- usageLastErrorAt: {
91
- type: ScalarTypeEnum.DateTime(),
92
- isOptional: true
93
- },
94
- usageLastErrorCode: {
95
- type: ScalarTypeEnum.String_unsecure(),
96
- isOptional: true
97
- },
98
- createdAt: {
99
- type: ScalarTypeEnum.DateTime(),
100
- isOptional: true
101
- },
102
- updatedAt: {
103
- type: ScalarTypeEnum.DateTime(),
104
- isOptional: true
105
- }
106
- }
107
- });
108
- const CreateIntegrationConnectionInput = new SchemaModel({
109
- name: "CreateIntegrationConnectionInput",
110
- fields: {
111
- tenantId: {
112
- type: ScalarTypeEnum.ID(),
113
- isOptional: false
114
- },
115
- integrationKey: {
116
- type: ScalarTypeEnum.NonEmptyString(),
117
- isOptional: false
118
- },
119
- integrationVersion: {
120
- type: ScalarTypeEnum.Int_unsecure(),
121
- isOptional: false
122
- },
123
- label: {
124
- type: ScalarTypeEnum.String_unsecure(),
125
- isOptional: false
126
- },
127
- ownershipMode: {
128
- type: ScalarTypeEnum.String_unsecure(),
129
- isOptional: false
130
- },
131
- externalAccountId: {
132
- type: ScalarTypeEnum.String_unsecure(),
133
- isOptional: true
134
- },
135
- secretProvider: {
136
- type: ScalarTypeEnum.String_unsecure(),
137
- isOptional: false
138
- },
139
- secretRef: {
140
- type: ScalarTypeEnum.String_unsecure(),
141
- isOptional: false
142
- },
143
- environment: {
144
- type: ScalarTypeEnum.String_unsecure(),
145
- isOptional: true
146
- },
147
- config: {
148
- type: ScalarTypeEnum.JSONObject(),
149
- isOptional: false
150
- }
151
- }
152
- });
153
- const UpdateIntegrationConnectionInput = new SchemaModel({
154
- name: "UpdateIntegrationConnectionInput",
155
- fields: {
156
- connectionId: {
157
- type: ScalarTypeEnum.ID(),
158
- isOptional: false
159
- },
160
- label: {
161
- type: ScalarTypeEnum.String_unsecure(),
162
- isOptional: true
163
- },
164
- status: {
165
- type: ScalarTypeEnum.String_unsecure(),
166
- isOptional: true
167
- },
168
- ownershipMode: {
169
- type: ScalarTypeEnum.String_unsecure(),
170
- isOptional: true
171
- },
172
- externalAccountId: {
173
- type: ScalarTypeEnum.String_unsecure(),
174
- isOptional: true
175
- },
176
- secretProvider: {
177
- type: ScalarTypeEnum.String_unsecure(),
178
- isOptional: true
179
- },
180
- secretRef: {
181
- type: ScalarTypeEnum.String_unsecure(),
182
- isOptional: true
183
- },
184
- config: {
185
- type: ScalarTypeEnum.JSONObject(),
186
- isOptional: true
187
- }
188
- }
189
- });
190
- const DeleteIntegrationConnectionInput = new SchemaModel({
191
- name: "DeleteIntegrationConnectionInput",
192
- fields: { connectionId: {
193
- type: ScalarTypeEnum.ID(),
194
- isOptional: false
195
- } }
196
- });
197
- const ListIntegrationConnectionsInput = new SchemaModel({
198
- name: "ListIntegrationConnectionsInput",
199
- fields: {
200
- tenantId: {
201
- type: ScalarTypeEnum.ID(),
202
- isOptional: false
203
- },
204
- category: {
205
- type: ScalarTypeEnum.String_unsecure(),
206
- isOptional: true
207
- },
208
- status: {
209
- type: ScalarTypeEnum.String_unsecure(),
210
- isOptional: true
211
- }
212
- }
213
- });
214
- const ListIntegrationConnectionsOutput = new SchemaModel({
215
- name: "ListIntegrationConnectionsOutput",
216
- fields: { connections: {
217
- type: IntegrationConnectionRecord,
218
- isOptional: false,
219
- isArray: true
220
- } }
221
- });
222
- const TestIntegrationConnectionInput = new SchemaModel({
223
- name: "TestIntegrationConnectionInput",
224
- fields: { connectionId: {
225
- type: ScalarTypeEnum.ID(),
226
- isOptional: false
227
- } }
228
- });
229
- const TestIntegrationConnectionOutput = new SchemaModel({
230
- name: "TestIntegrationConnectionOutput",
231
- fields: {
232
- success: {
233
- type: ScalarTypeEnum.Boolean(),
234
- isOptional: false
235
- },
236
- status: {
237
- type: ScalarTypeEnum.String_unsecure(),
238
- isOptional: true
239
- },
240
- latencyMs: {
241
- type: ScalarTypeEnum.Float_unsecure(),
242
- isOptional: true
243
- },
244
- error: {
245
- type: ScalarTypeEnum.String_unsecure(),
246
- isOptional: true
247
- },
248
- errorCode: {
249
- type: ScalarTypeEnum.String_unsecure(),
250
- isOptional: true
251
- }
252
- }
253
- });
254
- const DeleteIntegrationConnectionOutput = new SchemaModel({
255
- name: "DeleteIntegrationConnectionOutput",
256
- fields: { success: {
257
- type: ScalarTypeEnum.Boolean(),
258
- isOptional: false
259
- } }
260
- });
261
- const CreateIntegrationConnection = defineCommand({
262
- meta: {
263
- name: "integrations.connection.create",
264
- version: 1,
265
- description: "Create a new integration connection for a tenant.",
266
- goal: "Provision a tenant-scoped connection to an external provider.",
267
- context: "Used by Ops or the App Studio to configure external integrations such as Stripe or Qdrant.",
268
- owners: ["platform.integrations"],
269
- tags: ["integration", "connections"],
270
- stability: "experimental"
271
- },
272
- io: {
273
- input: CreateIntegrationConnectionInput,
274
- output: IntegrationConnectionRecord
275
- },
276
- policy: {
277
- auth: "admin",
278
- policies: [{
279
- name: "platform.integration.manage",
280
- version: 1
281
- }]
282
- }
283
- });
284
- const UpdateIntegrationConnection = defineCommand({
285
- meta: {
286
- name: "integrations.connection.update",
287
- version: 1,
288
- description: "Update metadata or credentials for an integration connection.",
289
- goal: "Allow secure rotation of credentials and metadata adjustments.",
290
- context: "Supports rotating API keys, toggling status, or updating labels for tenant integrations.",
291
- owners: ["platform.integrations"],
292
- tags: ["integration", "connections"],
293
- stability: "experimental"
294
- },
295
- io: {
296
- input: UpdateIntegrationConnectionInput,
297
- output: IntegrationConnectionRecord
298
- },
299
- policy: {
300
- auth: "admin",
301
- policies: [{
302
- name: "platform.integration.manage",
303
- version: 1
304
- }]
305
- }
306
- });
307
- const DeleteIntegrationConnection = defineCommand({
308
- meta: {
309
- name: "integrations.connection.delete",
310
- version: 1,
311
- description: "Delete an integration connection for a tenant.",
312
- goal: "Safely remove credentials and disable connector usage.",
313
- context: "Ensures connections are de-provisioned when no longer needed or breached.",
314
- owners: ["platform.integrations"],
315
- tags: ["integration", "connections"],
316
- stability: "experimental"
317
- },
318
- io: {
319
- input: DeleteIntegrationConnectionInput,
320
- output: DeleteIntegrationConnectionOutput
321
- },
322
- policy: {
323
- auth: "admin",
324
- policies: [{
325
- name: "platform.integration.manage",
326
- version: 1
327
- }]
328
- }
329
- });
330
- const ListIntegrationConnections = defineQuery({
331
- meta: {
332
- name: "integrations.connection.list",
333
- version: 1,
334
- description: "List integration connections for a tenant.",
335
- goal: "Provide visibility into configured integrations and their status.",
336
- context: "Used by the App Studio and Ops flows to show bindings and health.",
337
- owners: ["platform.integrations"],
338
- tags: ["integration", "connections"],
339
- stability: "experimental"
340
- },
341
- io: {
342
- input: ListIntegrationConnectionsInput,
343
- output: ListIntegrationConnectionsOutput
344
- },
345
- policy: {
346
- auth: "admin",
347
- policies: [{
348
- name: "platform.integration.read",
349
- version: 1
350
- }]
351
- }
352
- });
353
- const TestIntegrationConnection = defineCommand({
354
- meta: {
355
- name: "integrations.connection.test",
356
- version: 1,
357
- description: "Run a health check against a configured integration connection.",
358
- goal: "Validate credentials and connectivity for external providers.",
359
- context: "Triggered manually or by background monitors to confirm provider availability.",
360
- owners: ["platform.integrations"],
361
- tags: ["integration", "connections"],
362
- stability: "experimental"
363
- },
364
- io: {
365
- input: TestIntegrationConnectionInput,
366
- output: TestIntegrationConnectionOutput
367
- },
368
- policy: {
369
- auth: "admin",
370
- policies: [{
371
- name: "platform.integration.manage",
372
- version: 1
373
- }]
374
- }
375
- });
376
-
377
- //#endregion
@@ -1,18 +0,0 @@
1
- import "./providers/stripe.js";
2
- import "./providers/postmark.js";
3
- import "./providers/qdrant.js";
4
- import "./providers/mistral.js";
5
- import "./providers/elevenlabs.js";
6
- import "./providers/gmail.js";
7
- import "./providers/google-calendar.js";
8
- import "./providers/twilio-sms.js";
9
- import "./providers/gcs-storage.js";
10
- import "./providers/powens.js";
11
- import "./providers/registry.js";
12
- import { AccountBalanceRecord, BankAccountRecord, BankTransactionRecord } from "./openbanking/models.js";
13
- import { OPENBANKING_TELEMETRY_EVENTS } from "./openbanking/telemetry.js";
14
- import "./openbanking/contracts/accounts.js";
15
- import "./openbanking/contracts/transactions.js";
16
- import "./openbanking/contracts/balances.js";
17
- import "./openbanking/contracts/index.js";
18
- import "./providers/index.js";