@lssm/example.service-business-os 0.0.0-canary-20251217083314 → 0.0.0-canary-20251220002821
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.
- package/LICENSE +21 -0
- package/dist/client/client.contracts.d.ts +19 -18
- package/dist/client/client.contracts.d.ts.map +1 -0
- package/dist/client/client.contracts.js +2 -1
- package/dist/client/client.contracts.js.map +1 -0
- package/dist/client/client.schema.d.ts +18 -17
- package/dist/client/client.schema.d.ts.map +1 -0
- package/dist/client/client.schema.js +18 -19
- package/dist/client/client.schema.js.map +1 -0
- package/dist/docs/service-business-os.docblock.js +2 -1
- package/dist/docs/service-business-os.docblock.js.map +1 -0
- package/dist/entities/index.d.ts +157 -156
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +98 -98
- package/dist/entities/index.js.map +1 -0
- package/dist/events.d.ts +91 -90
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +32 -33
- package/dist/events.js.map +1 -0
- package/dist/example.d.ts +2 -1
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +2 -1
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +2 -1
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +2 -1
- package/dist/handlers/index.js.map +1 -0
- package/dist/invoice/invoice.contracts.d.ts +19 -18
- package/dist/invoice/invoice.contracts.d.ts.map +1 -0
- package/dist/invoice/invoice.contracts.js +2 -1
- package/dist/invoice/invoice.contracts.js.map +1 -0
- package/dist/invoice/invoice.schema.d.ts +18 -17
- package/dist/invoice/invoice.schema.d.ts.map +1 -0
- package/dist/invoice/invoice.schema.js +18 -19
- package/dist/invoice/invoice.schema.js.map +1 -0
- package/dist/job/job.contracts.d.ts +64 -63
- package/dist/job/job.contracts.d.ts.map +1 -0
- package/dist/job/job.contracts.js +10 -11
- package/dist/job/job.contracts.js.map +1 -0
- package/dist/job/job.schema.d.ts +22 -21
- package/dist/job/job.schema.d.ts.map +1 -0
- package/dist/job/job.schema.js +22 -23
- package/dist/job/job.schema.js.map +1 -0
- package/dist/libs/contracts/dist/capabilities/openbanking.js +2 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js.map +1 -0
- package/dist/libs/contracts/dist/contract-registry/schemas.js +2 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js.map +1 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/index.js +2 -6
- package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
- package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
- package/dist/libs/contracts/dist/docs/presentations.js +2 -1
- package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
- package/dist/libs/contracts/dist/docs/registry.js +2 -1
- package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +2 -1
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
- package/dist/libs/contracts/dist/events.js +2 -1
- package/dist/libs/contracts/dist/events.js.map +1 -0
- package/dist/libs/contracts/dist/index.js +2 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +65 -66
- package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +31 -32
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +18 -19
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +32 -33
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +60 -61
- package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +2 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/powens.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +1 -0
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +2 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/contracts.js +44 -45
- package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +2 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +2 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +2 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +2 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +2 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +2 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -0
- package/dist/libs/contracts/dist/llm/exporters.js +2 -1
- package/dist/libs/contracts/dist/llm/exporters.js.map +1 -0
- package/dist/libs/contracts/dist/onboarding-base.js +22 -23
- package/dist/libs/contracts/dist/onboarding-base.js.map +1 -0
- package/dist/libs/contracts/dist/ownership.js +4 -2
- package/dist/libs/contracts/dist/ownership.js.map +1 -0
- package/dist/libs/contracts/dist/presentations.v2.js +2 -1
- package/dist/libs/contracts/dist/presentations.v2.js.map +1 -0
- package/dist/libs/contracts/dist/regenerator/service.js +2 -1
- package/dist/libs/contracts/dist/regenerator/service.js.map +1 -0
- package/dist/libs/contracts/dist/schema/dist/index.js +3873 -6
- package/dist/libs/contracts/dist/schema/dist/index.js.map +1 -0
- package/dist/libs/contracts/dist/spec.js +2 -1
- package/dist/libs/contracts/dist/spec.js.map +1 -0
- package/dist/libs/schema/dist/index.js +4889 -6
- package/dist/libs/schema/dist/index.js.map +1 -0
- package/dist/payment/payment.contracts.d.ts +18 -17
- package/dist/payment/payment.contracts.d.ts.map +1 -0
- package/dist/payment/payment.contracts.js +2 -1
- package/dist/payment/payment.contracts.js.map +1 -0
- package/dist/payment/payment.schema.d.ts +17 -16
- package/dist/payment/payment.schema.d.ts.map +1 -0
- package/dist/payment/payment.schema.js +17 -18
- package/dist/payment/payment.schema.js.map +1 -0
- package/dist/presentations/index.d.ts +2 -1
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +2 -1
- package/dist/presentations/index.js.map +1 -0
- package/dist/presentations.d.ts +2 -1
- package/dist/presentations.d.ts.map +1 -0
- package/dist/presentations.js +2 -1
- package/dist/presentations.js.map +1 -0
- package/dist/quote/quote.contracts.d.ts +37 -36
- package/dist/quote/quote.contracts.d.ts.map +1 -0
- package/dist/quote/quote.contracts.js +2 -1
- package/dist/quote/quote.contracts.js.map +1 -0
- package/dist/quote/quote.schema.d.ts +26 -25
- package/dist/quote/quote.schema.d.ts.map +1 -0
- package/dist/quote/quote.schema.js +26 -27
- package/dist/quote/quote.schema.js.map +1 -0
- package/dist/service.feature.d.ts +2 -1
- package/dist/service.feature.d.ts.map +1 -0
- package/dist/service.feature.js +2 -1
- package/dist/service.feature.js.map +1 -0
- package/package.json +19 -12
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -34
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
- package/dist/libs/schema/dist/EnumType.js +0 -2
- package/dist/libs/schema/dist/FieldType.js +0 -49
- package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/libs/schema/dist/SchemaModel.js +0 -39
- package/dist/libs/schema/dist/entity/defineEntity.js +0 -236
- package/dist/libs/schema/dist/entity/index.js +0 -2
- package/dist/libs/schema/dist/entity/types.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postmark.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/integrations/providers/postmark.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/integrations/providers/postmark.ts\nconst postmarkIntegrationSpec = {\n\tmeta: {\n\t\tkey: \"email.postmark\",\n\t\tversion: 1,\n\t\tcategory: \"email\",\n\t\tdisplayName: \"Postmark\",\n\t\ttitle: \"Postmark Transactional Email\",\n\t\tdescription: \"Postmark integration for transactional email delivery.\",\n\t\tdomain: \"communications\",\n\t\towners: [\"platform.messaging\"],\n\t\ttags: [\"email\", \"transactional\"],\n\t\tstability: StabilityEnum.Stable\n\t},\n\tsupportedModes: [\"managed\", \"byok\"],\n\tcapabilities: {\n\t\tprovides: [{\n\t\t\tkey: \"email.transactional\",\n\t\t\tversion: 1\n\t\t}],\n\t\trequires: [{\n\t\t\tkey: \"platform.webhooks\",\n\t\t\toptional: true,\n\t\t\treason: \"Optional for inbound bounce handling\"\n\t\t}]\n\t},\n\tconfigSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\tproperties: {\n\t\t\t\tmessageStream: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Optional message stream identifier (e.g., transactional).\"\n\t\t\t\t},\n\t\t\t\tfromEmail: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Default From address used for outbound messages.\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\texample: {\n\t\t\tmessageStream: \"outbound\",\n\t\t\tfromEmail: \"notifications@example.com\"\n\t\t}\n\t},\n\tsecretSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\trequired: [\"serverToken\"],\n\t\t\tproperties: { serverToken: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"Server token for the Postmark account.\"\n\t\t\t} }\n\t\t},\n\t\texample: { serverToken: \"server-***\" }\n\t},\n\thealthCheck: {\n\t\tmethod: \"ping\",\n\t\ttimeoutMs: 3e3\n\t},\n\tdocsUrl: \"https://postmarkapp.com/developer\",\n\tconstraints: { rateLimit: { rpm: 500 } },\n\tbyokSetup: { setupInstructions: \"Create a Postmark server token with outbound send permissions and configure allowed from addresses.\" }\n};\nfunction registerPostmarkIntegration(registry) {\n\treturn registry.register(postmarkIntegrationSpec);\n}\n\n//#endregion\nexport { postmarkIntegrationSpec, registerPostmarkIntegration };"],"mappings":";;;AAGA,MAAM,0BAA0B;CAC/B,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,qBAAqB;EAC9B,MAAM,CAAC,SAAS,gBAAgB;EAChC,WAAW,cAAc;EACzB;CACD,gBAAgB,CAAC,WAAW,OAAO;CACnC,cAAc;EACb,UAAU,CAAC;GACV,KAAK;GACL,SAAS;GACT,CAAC;EACF,UAAU,CAAC;GACV,KAAK;GACL,UAAU;GACV,QAAQ;GACR,CAAC;EACF;CACD,cAAc;EACb,QAAQ;GACP,MAAM;GACN,YAAY;IACX,eAAe;KACd,MAAM;KACN,aAAa;KACb;IACD,WAAW;KACV,MAAM;KACN,aAAa;KACb;IACD;GACD;EACD,SAAS;GACR,eAAe;GACf,WAAW;GACX;EACD;CACD,cAAc;EACb,QAAQ;GACP,MAAM;GACN,UAAU,CAAC,cAAc;GACzB,YAAY,EAAE,aAAa;IAC1B,MAAM;IACN,aAAa;IACb,EAAE;GACH;EACD,SAAS,EAAE,aAAa,cAAc;EACtC;CACD,aAAa;EACZ,QAAQ;EACR,WAAW;EACX;CACD,SAAS;CACT,aAAa,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE;CACxC,WAAW,EAAE,mBAAmB,uGAAuG;CACvI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powens.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/integrations/providers/powens.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/integrations/providers/powens.ts\nconst powensIntegrationSpec = {\n\tmeta: {\n\t\tkey: \"openbanking.powens\",\n\t\tversion: 1,\n\t\tcategory: \"open-banking\",\n\t\tdisplayName: \"Powens Open Banking\",\n\t\ttitle: \"Powens Open Banking (Read)\",\n\t\tdescription: \"Read-only Open Banking integration powered by Powens, exposing accounts, transactions, and balances.\",\n\t\tdomain: \"finance\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"powens\",\n\t\t\t\"finance\"\n\t\t],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tsupportedModes: [\"byok\"],\n\tcapabilities: { provides: [\n\t\t{\n\t\t\tkey: \"openbanking.accounts.read\",\n\t\t\tversion: 1\n\t\t},\n\t\t{\n\t\t\tkey: \"openbanking.transactions.read\",\n\t\t\tversion: 1\n\t\t},\n\t\t{\n\t\t\tkey: \"openbanking.balances.read\",\n\t\t\tversion: 1\n\t\t}\n\t] },\n\tconfigSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\trequired: [\"environment\"],\n\t\t\tproperties: {\n\t\t\t\tenvironment: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tenum: [\"sandbox\", \"production\"],\n\t\t\t\t\tdescription: \"Powens environment to target. Sandbox uses Powens test API base URL, production uses live endpoints.\"\n\t\t\t\t},\n\t\t\t\tbaseUrl: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Optional override for the Powens API base URL. Defaults to Powens environment defaults.\"\n\t\t\t\t},\n\t\t\t\tregion: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Optional Powens region identifier when targeting a specific data residency cluster.\"\n\t\t\t\t},\n\t\t\t\tpollingIntervalMs: {\n\t\t\t\t\ttype: \"number\",\n\t\t\t\t\tdescription: \"Optional custom polling interval in milliseconds for background sync jobs (defaults to platform standard).\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\texample: {\n\t\t\tenvironment: \"sandbox\",\n\t\t\tbaseUrl: \"https://api-sandbox.powens.com/v2\",\n\t\t\tregion: \"eu-west-1\",\n\t\t\tpollingIntervalMs: 3e5\n\t\t}\n\t},\n\tsecretSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\trequired: [\"clientId\", \"clientSecret\"],\n\t\t\tproperties: {\n\t\t\t\tclientId: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Powens OAuth client identifier obtained from the Powens Console (BYOK project).\"\n\t\t\t\t},\n\t\t\t\tclientSecret: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Powens OAuth client secret used to exchange for access tokens.\"\n\t\t\t\t},\n\t\t\t\tapiKey: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Optional Powens API key (if the tenant project exposes a dedicated API token).\"\n\t\t\t\t},\n\t\t\t\twebhookSecret: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Optional webhook signing secret used to verify Powens webhook payloads.\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\texample: {\n\t\t\tclientId: \"powens-client-id\",\n\t\t\tclientSecret: \"powens-client-secret\",\n\t\t\tapiKey: \"powens-api-key\",\n\t\t\twebhookSecret: \"powens-webhook-secret\"\n\t\t}\n\t},\n\thealthCheck: {\n\t\tmethod: \"ping\",\n\t\ttimeoutMs: 8e3\n\t},\n\tdocsUrl: \"https://docs.powens.com/\",\n\tconstraints: { rateLimit: {\n\t\trph: 1e4,\n\t\trpm: 600\n\t} },\n\tbyokSetup: {\n\t\tsetupInstructions: \"Create a Powens BYOK project, generate OAuth credentials, and optionally configure webhook delivery for account/transaction updates.\",\n\t\trequiredScopes: [\n\t\t\t\"accounts:read\",\n\t\t\t\"transactions:read\",\n\t\t\t\"balances:read\"\n\t\t]\n\t}\n};\nfunction registerPowensIntegration(registry) {\n\treturn registry.register(powensIntegrationSpec);\n}\n\n//#endregion\nexport { powensIntegrationSpec, registerPowensIntegration };"],"mappings":";;;AAGA,MAAM,wBAAwB;CAC7B,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,mBAAmB;EAC5B,MAAM;GACL;GACA;GACA;GACA;EACD,WAAW,cAAc;EACzB;CACD,gBAAgB,CAAC,OAAO;CACxB,cAAc,EAAE,UAAU;EACzB;GACC,KAAK;GACL,SAAS;GACT;EACD;GACC,KAAK;GACL,SAAS;GACT;EACD;GACC,KAAK;GACL,SAAS;GACT;EACD,EAAE;CACH,cAAc;EACb,QAAQ;GACP,MAAM;GACN,UAAU,CAAC,cAAc;GACzB,YAAY;IACX,aAAa;KACZ,MAAM;KACN,MAAM,CAAC,WAAW,aAAa;KAC/B,aAAa;KACb;IACD,SAAS;KACR,MAAM;KACN,aAAa;KACb;IACD,QAAQ;KACP,MAAM;KACN,aAAa;KACb;IACD,mBAAmB;KAClB,MAAM;KACN,aAAa;KACb;IACD;GACD;EACD,SAAS;GACR,aAAa;GACb,SAAS;GACT,QAAQ;GACR,mBAAmB;GACnB;EACD;CACD,cAAc;EACb,QAAQ;GACP,MAAM;GACN,UAAU,CAAC,YAAY,eAAe;GACtC,YAAY;IACX,UAAU;KACT,MAAM;KACN,aAAa;KACb;IACD,cAAc;KACb,MAAM;KACN,aAAa;KACb;IACD,QAAQ;KACP,MAAM;KACN,aAAa;KACb;IACD,eAAe;KACd,MAAM;KACN,aAAa;KACb;IACD;GACD;EACD,SAAS;GACR,UAAU;GACV,cAAc;GACd,QAAQ;GACR,eAAe;GACf;EACD;CACD,aAAa;EACZ,QAAQ;EACR,WAAW;EACX;CACD,SAAS;CACT,aAAa,EAAE,WAAW;EACzB,KAAK;EACL,KAAK;EACL,EAAE;CACH,WAAW;EACV,mBAAmB;EACnB,gBAAgB;GACf;GACA;GACA;GACA;EACD;CACD"}
|
|
@@ -70,4 +70,5 @@ const qdrantIntegrationSpec = {
|
|
|
70
70
|
byokSetup: { setupInstructions: "Provide the HTTPS endpoint of your Qdrant cluster and generate an API key with read/write access to the collections that will be managed." }
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
//#endregion
|
|
73
|
+
//#endregion
|
|
74
|
+
//# sourceMappingURL=qdrant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qdrant.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/integrations/providers/qdrant.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/integrations/providers/qdrant.ts\nconst qdrantIntegrationSpec = {\n\tmeta: {\n\t\tkey: \"vectordb.qdrant\",\n\t\tversion: 1,\n\t\tcategory: \"vector-db\",\n\t\tdisplayName: \"Qdrant\",\n\t\ttitle: \"Qdrant Vector Database\",\n\t\tdescription: \"Qdrant integration for vector search and embeddings storage.\",\n\t\tdomain: \"ai\",\n\t\towners: [\"platform.ai\"],\n\t\ttags: [\"vector-db\", \"search\"],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tsupportedModes: [\"managed\", \"byok\"],\n\tcapabilities: {\n\t\tprovides: [{\n\t\t\tkey: \"vector-db.search\",\n\t\t\tversion: 1\n\t\t}, {\n\t\t\tkey: \"vector-db.storage\",\n\t\t\tversion: 1\n\t\t}],\n\t\trequires: [{\n\t\t\tkey: \"ai.embeddings\",\n\t\t\toptional: true,\n\t\t\treason: \"Required if vectors are generated via hosted embedding services\"\n\t\t}]\n\t},\n\tconfigSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\tproperties: {\n\t\t\t\tapiUrl: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Base URL for the Qdrant instance (e.g., https://qdrant.example.com).\"\n\t\t\t\t},\n\t\t\t\tcollectionPrefix: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Prefix applied to all collection names for this tenant.\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\texample: {\n\t\t\tapiUrl: \"https://qdrant.example.com\",\n\t\t\tcollectionPrefix: \"tenant_\"\n\t\t}\n\t},\n\tsecretSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\tproperties: { apiKey: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"API key or token when authentication is enabled.\"\n\t\t\t} }\n\t\t},\n\t\texample: { apiKey: \"qdrant-api-key\" }\n\t},\n\thealthCheck: {\n\t\tmethod: \"ping\",\n\t\ttimeoutMs: 4e3\n\t},\n\tdocsUrl: \"https://qdrant.tech/documentation/quick-start/\",\n\tconstraints: { quotas: {\n\t\tcollections: 100,\n\t\tpointsPerCollection: 1e6\n\t} },\n\tbyokSetup: { setupInstructions: \"Provide the HTTPS endpoint of your Qdrant cluster and generate an API key with read/write access to the collections that will be managed.\" }\n};\nfunction registerQdrantIntegration(registry) {\n\treturn registry.register(qdrantIntegrationSpec);\n}\n\n//#endregion\nexport { qdrantIntegrationSpec, registerQdrantIntegration };"],"mappings":";;;AAGA,MAAM,wBAAwB;CAC7B,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,cAAc;EACvB,MAAM,CAAC,aAAa,SAAS;EAC7B,WAAW,cAAc;EACzB;CACD,gBAAgB,CAAC,WAAW,OAAO;CACnC,cAAc;EACb,UAAU,CAAC;GACV,KAAK;GACL,SAAS;GACT,EAAE;GACF,KAAK;GACL,SAAS;GACT,CAAC;EACF,UAAU,CAAC;GACV,KAAK;GACL,UAAU;GACV,QAAQ;GACR,CAAC;EACF;CACD,cAAc;EACb,QAAQ;GACP,MAAM;GACN,YAAY;IACX,QAAQ;KACP,MAAM;KACN,aAAa;KACb;IACD,kBAAkB;KACjB,MAAM;KACN,aAAa;KACb;IACD;GACD;EACD,SAAS;GACR,QAAQ;GACR,kBAAkB;GAClB;EACD;CACD,cAAc;EACb,QAAQ;GACP,MAAM;GACN,YAAY,EAAE,QAAQ;IACrB,MAAM;IACN,aAAa;IACb,EAAE;GACH;EACD,SAAS,EAAE,QAAQ,kBAAkB;EACrC;CACD,aAAa;EACZ,QAAQ;EACR,WAAW;EACX;CACD,SAAS;CACT,aAAa,EAAE,QAAQ;EACtB,aAAa;EACb,qBAAqB;EACrB,EAAE;CACH,WAAW,EAAE,mBAAmB,6IAA6I;CAC7K"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripe.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/integrations/providers/stripe.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/integrations/providers/stripe.ts\nconst stripeIntegrationSpec = {\n\tmeta: {\n\t\tkey: \"payments.stripe\",\n\t\tversion: 1,\n\t\tcategory: \"payments\",\n\t\tdisplayName: \"Stripe\",\n\t\ttitle: \"Stripe Payments\",\n\t\tdescription: \"Stripe integration for payment processing, charges, and payouts.\",\n\t\tdomain: \"payments\",\n\t\towners: [\"platform.payments\"],\n\t\ttags: [\"payments\", \"psp\"],\n\t\tstability: StabilityEnum.Stable\n\t},\n\tsupportedModes: [\"managed\", \"byok\"],\n\tcapabilities: {\n\t\tprovides: [{\n\t\t\tkey: \"payments.psp\",\n\t\t\tversion: 1\n\t\t}],\n\t\trequires: [{\n\t\t\tkey: \"platform.webhooks\",\n\t\t\toptional: true,\n\t\t\treason: \"Recommended for reliable event ingestion\"\n\t\t}]\n\t},\n\tconfigSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\tproperties: {\n\t\t\t\taccountId: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Connected account ID when using Stripe Connect (BYOK).\"\n\t\t\t\t},\n\t\t\t\tregion: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Optional Stripe region or data residency hint.\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\texample: {\n\t\t\taccountId: \"acct_123\",\n\t\t\tregion: \"us-east-1\"\n\t\t}\n\t},\n\tsecretSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\trequired: [\"apiKey\", \"webhookSecret\"],\n\t\t\tproperties: {\n\t\t\t\tapiKey: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Stripe secret API key (sk_live_... or sk_test_...).\"\n\t\t\t\t},\n\t\t\t\twebhookSecret: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Signing secret for webhook verification.\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\texample: {\n\t\t\tapiKey: \"sk_live_***\",\n\t\t\twebhookSecret: \"whsec_***\"\n\t\t}\n\t},\n\thealthCheck: {\n\t\tmethod: \"ping\",\n\t\ttimeoutMs: 5e3\n\t},\n\tdocsUrl: \"https://stripe.com/docs/api\",\n\tconstraints: { rateLimit: {\n\t\trpm: 1e3,\n\t\trph: 2e4\n\t} },\n\tbyokSetup: {\n\t\tsetupInstructions: \"Create a restricted Stripe API key with write access to Charges and provide a webhook signing secret.\",\n\t\trequiredScopes: [\"charges:write\", \"customers:read\"]\n\t}\n};\nfunction registerStripeIntegration(registry) {\n\treturn registry.register(stripeIntegrationSpec);\n}\n\n//#endregion\nexport { registerStripeIntegration, stripeIntegrationSpec };"],"mappings":";;;AAGA,MAAM,wBAAwB;CAC7B,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,YAAY,MAAM;EACzB,WAAW,cAAc;EACzB;CACD,gBAAgB,CAAC,WAAW,OAAO;CACnC,cAAc;EACb,UAAU,CAAC;GACV,KAAK;GACL,SAAS;GACT,CAAC;EACF,UAAU,CAAC;GACV,KAAK;GACL,UAAU;GACV,QAAQ;GACR,CAAC;EACF;CACD,cAAc;EACb,QAAQ;GACP,MAAM;GACN,YAAY;IACX,WAAW;KACV,MAAM;KACN,aAAa;KACb;IACD,QAAQ;KACP,MAAM;KACN,aAAa;KACb;IACD;GACD;EACD,SAAS;GACR,WAAW;GACX,QAAQ;GACR;EACD;CACD,cAAc;EACb,QAAQ;GACP,MAAM;GACN,UAAU,CAAC,UAAU,gBAAgB;GACrC,YAAY;IACX,QAAQ;KACP,MAAM;KACN,aAAa;KACb;IACD,eAAe;KACd,MAAM;KACN,aAAa;KACb;IACD;GACD;EACD,SAAS;GACR,QAAQ;GACR,eAAe;GACf;EACD;CACD,aAAa;EACZ,QAAQ;EACR,WAAW;EACX;CACD,SAAS;CACT,aAAa,EAAE,WAAW;EACzB,KAAK;EACL,KAAK;EACL,EAAE;CACH,WAAW;EACV,mBAAmB;EACnB,gBAAgB,CAAC,iBAAiB,iBAAiB;EACnD;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twilio-sms.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/integrations/providers/twilio-sms.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/integrations/providers/twilio-sms.ts\nconst twilioSmsIntegrationSpec = {\n\tmeta: {\n\t\tkey: \"sms.twilio\",\n\t\tversion: 1,\n\t\tcategory: \"sms\",\n\t\tdisplayName: \"Twilio SMS\",\n\t\ttitle: \"Twilio Messaging\",\n\t\tdescription: \"Twilio SMS integration for transactional and notification messaging.\",\n\t\tdomain: \"communications\",\n\t\towners: [\"platform.messaging\"],\n\t\ttags: [\"sms\", \"messaging\"],\n\t\tstability: StabilityEnum.Stable\n\t},\n\tsupportedModes: [\"managed\", \"byok\"],\n\tcapabilities: { provides: [{\n\t\tkey: \"sms.outbound\",\n\t\tversion: 1\n\t}] },\n\tconfigSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\tproperties: { fromNumber: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"Default Twilio phone number used as sender.\"\n\t\t\t} }\n\t\t},\n\t\texample: { fromNumber: \"+15551234567\" }\n\t},\n\tsecretSchema: {\n\t\tschema: {\n\t\t\ttype: \"object\",\n\t\t\trequired: [\"accountSid\", \"authToken\"],\n\t\t\tproperties: {\n\t\t\t\taccountSid: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Twilio Account SID.\"\n\t\t\t\t},\n\t\t\t\tauthToken: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tdescription: \"Twilio Auth Token.\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\texample: {\n\t\t\taccountSid: \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n\t\t\tauthToken: \"auth-token\"\n\t\t}\n\t},\n\thealthCheck: {\n\t\tmethod: \"custom\",\n\t\ttimeoutMs: 3e3\n\t},\n\tdocsUrl: \"https://www.twilio.com/docs/sms/api\",\n\tconstraints: { rateLimit: { rpm: 200 } },\n\tbyokSetup: { setupInstructions: \"Provide a Twilio account SID, auth token, and verify the outbound sending numbers used by the integration.\" }\n};\nfunction registerTwilioSmsIntegration(registry) {\n\treturn registry.register(twilioSmsIntegrationSpec);\n}\n\n//#endregion\nexport { registerTwilioSmsIntegration, twilioSmsIntegrationSpec };"],"mappings":";;;AAGA,MAAM,2BAA2B;CAChC,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,qBAAqB;EAC9B,MAAM,CAAC,OAAO,YAAY;EAC1B,WAAW,cAAc;EACzB;CACD,gBAAgB,CAAC,WAAW,OAAO;CACnC,cAAc,EAAE,UAAU,CAAC;EAC1B,KAAK;EACL,SAAS;EACT,CAAC,EAAE;CACJ,cAAc;EACb,QAAQ;GACP,MAAM;GACN,YAAY,EAAE,YAAY;IACzB,MAAM;IACN,aAAa;IACb,EAAE;GACH;EACD,SAAS,EAAE,YAAY,gBAAgB;EACvC;CACD,cAAc;EACb,QAAQ;GACP,MAAM;GACN,UAAU,CAAC,cAAc,YAAY;GACrC,YAAY;IACX,YAAY;KACX,MAAM;KACN,aAAa;KACb;IACD,WAAW;KACV,MAAM;KACN,aAAa;KACb;IACD;GACD;EACD,SAAS;GACR,YAAY;GACZ,WAAW;GACX;EACD;CACD,aAAa;EACZ,QAAQ;EACR,WAAW;EACX;CACD,SAAS;CACT,aAAa,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE;CACxC,WAAW,EAAE,mBAAmB,8GAA8G;CAC9I"}
|
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ScalarTypeEnum } from "../schema/dist/ScalarTypeEnum.js";
|
|
3
|
-
import "../schema/dist/index.js";
|
|
1
|
+
import { E5, x8 } from "../schema/dist/index.js";
|
|
4
2
|
import { defineCommand, defineQuery } from "../spec.js";
|
|
5
3
|
|
|
6
4
|
//#region ../../libs/contracts/dist/knowledge/contracts.js
|
|
7
|
-
const KnowledgeSyncSchedule = new
|
|
5
|
+
const KnowledgeSyncSchedule = new x8({
|
|
8
6
|
name: "KnowledgeSyncSchedule",
|
|
9
7
|
fields: {
|
|
10
8
|
enabled: {
|
|
11
|
-
type:
|
|
9
|
+
type: E5.Boolean(),
|
|
12
10
|
isOptional: false
|
|
13
11
|
},
|
|
14
12
|
cron: {
|
|
15
|
-
type:
|
|
13
|
+
type: E5.String_unsecure(),
|
|
16
14
|
isOptional: true
|
|
17
15
|
},
|
|
18
16
|
intervalMs: {
|
|
19
|
-
type:
|
|
17
|
+
type: E5.Int_unsecure(),
|
|
20
18
|
isOptional: true
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
});
|
|
24
|
-
const KnowledgeSourceRecord = new
|
|
22
|
+
const KnowledgeSourceRecord = new x8({
|
|
25
23
|
name: "KnowledgeSourceRecord",
|
|
26
24
|
fields: {
|
|
27
25
|
id: {
|
|
28
|
-
type:
|
|
26
|
+
type: E5.ID(),
|
|
29
27
|
isOptional: false
|
|
30
28
|
},
|
|
31
29
|
tenantId: {
|
|
32
|
-
type:
|
|
30
|
+
type: E5.ID(),
|
|
33
31
|
isOptional: false
|
|
34
32
|
},
|
|
35
33
|
spaceKey: {
|
|
36
|
-
type:
|
|
34
|
+
type: E5.NonEmptyString(),
|
|
37
35
|
isOptional: false
|
|
38
36
|
},
|
|
39
37
|
spaceVersion: {
|
|
40
|
-
type:
|
|
38
|
+
type: E5.Int_unsecure(),
|
|
41
39
|
isOptional: false
|
|
42
40
|
},
|
|
43
41
|
label: {
|
|
44
|
-
type:
|
|
42
|
+
type: E5.String_unsecure(),
|
|
45
43
|
isOptional: false
|
|
46
44
|
},
|
|
47
45
|
sourceType: {
|
|
48
|
-
type:
|
|
46
|
+
type: E5.String_unsecure(),
|
|
49
47
|
isOptional: false
|
|
50
48
|
},
|
|
51
49
|
syncSchedule: {
|
|
@@ -53,52 +51,52 @@ const KnowledgeSourceRecord = new SchemaModel({
|
|
|
53
51
|
isOptional: true
|
|
54
52
|
},
|
|
55
53
|
lastSyncStatus: {
|
|
56
|
-
type:
|
|
54
|
+
type: E5.String_unsecure(),
|
|
57
55
|
isOptional: true
|
|
58
56
|
},
|
|
59
57
|
lastSyncAt: {
|
|
60
|
-
type:
|
|
58
|
+
type: E5.DateTime(),
|
|
61
59
|
isOptional: true
|
|
62
60
|
},
|
|
63
61
|
itemsProcessed: {
|
|
64
|
-
type:
|
|
62
|
+
type: E5.Int_unsecure(),
|
|
65
63
|
isOptional: true
|
|
66
64
|
},
|
|
67
65
|
createdAt: {
|
|
68
|
-
type:
|
|
66
|
+
type: E5.DateTime(),
|
|
69
67
|
isOptional: true
|
|
70
68
|
},
|
|
71
69
|
updatedAt: {
|
|
72
|
-
type:
|
|
70
|
+
type: E5.DateTime(),
|
|
73
71
|
isOptional: true
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
});
|
|
77
|
-
const CreateKnowledgeSourceInput = new
|
|
75
|
+
const CreateKnowledgeSourceInput = new x8({
|
|
78
76
|
name: "CreateKnowledgeSourceInput",
|
|
79
77
|
fields: {
|
|
80
78
|
tenantId: {
|
|
81
|
-
type:
|
|
79
|
+
type: E5.ID(),
|
|
82
80
|
isOptional: false
|
|
83
81
|
},
|
|
84
82
|
spaceKey: {
|
|
85
|
-
type:
|
|
83
|
+
type: E5.NonEmptyString(),
|
|
86
84
|
isOptional: false
|
|
87
85
|
},
|
|
88
86
|
spaceVersion: {
|
|
89
|
-
type:
|
|
87
|
+
type: E5.Int_unsecure(),
|
|
90
88
|
isOptional: false
|
|
91
89
|
},
|
|
92
90
|
label: {
|
|
93
|
-
type:
|
|
91
|
+
type: E5.String_unsecure(),
|
|
94
92
|
isOptional: false
|
|
95
93
|
},
|
|
96
94
|
sourceType: {
|
|
97
|
-
type:
|
|
95
|
+
type: E5.NonEmptyString(),
|
|
98
96
|
isOptional: false
|
|
99
97
|
},
|
|
100
98
|
config: {
|
|
101
|
-
type:
|
|
99
|
+
type: E5.JSONObject(),
|
|
102
100
|
isOptional: false
|
|
103
101
|
},
|
|
104
102
|
syncSchedule: {
|
|
@@ -107,19 +105,19 @@ const CreateKnowledgeSourceInput = new SchemaModel({
|
|
|
107
105
|
}
|
|
108
106
|
}
|
|
109
107
|
});
|
|
110
|
-
const UpdateKnowledgeSourceInput = new
|
|
108
|
+
const UpdateKnowledgeSourceInput = new x8({
|
|
111
109
|
name: "UpdateKnowledgeSourceInput",
|
|
112
110
|
fields: {
|
|
113
111
|
sourceId: {
|
|
114
|
-
type:
|
|
112
|
+
type: E5.ID(),
|
|
115
113
|
isOptional: false
|
|
116
114
|
},
|
|
117
115
|
label: {
|
|
118
|
-
type:
|
|
116
|
+
type: E5.String_unsecure(),
|
|
119
117
|
isOptional: true
|
|
120
118
|
},
|
|
121
119
|
config: {
|
|
122
|
-
type:
|
|
120
|
+
type: E5.JSONObject(),
|
|
123
121
|
isOptional: true
|
|
124
122
|
},
|
|
125
123
|
syncSchedule: {
|
|
@@ -128,34 +126,34 @@ const UpdateKnowledgeSourceInput = new SchemaModel({
|
|
|
128
126
|
}
|
|
129
127
|
}
|
|
130
128
|
});
|
|
131
|
-
const DeleteKnowledgeSourceInput = new
|
|
129
|
+
const DeleteKnowledgeSourceInput = new x8({
|
|
132
130
|
name: "DeleteKnowledgeSourceInput",
|
|
133
131
|
fields: { sourceId: {
|
|
134
|
-
type:
|
|
132
|
+
type: E5.ID(),
|
|
135
133
|
isOptional: false
|
|
136
134
|
} }
|
|
137
135
|
});
|
|
138
|
-
const DeleteKnowledgeSourceOutput = new
|
|
136
|
+
const DeleteKnowledgeSourceOutput = new x8({
|
|
139
137
|
name: "DeleteKnowledgeSourceOutput",
|
|
140
138
|
fields: { success: {
|
|
141
|
-
type:
|
|
139
|
+
type: E5.Boolean(),
|
|
142
140
|
isOptional: false
|
|
143
141
|
} }
|
|
144
142
|
});
|
|
145
|
-
const ListKnowledgeSourcesInput = new
|
|
143
|
+
const ListKnowledgeSourcesInput = new x8({
|
|
146
144
|
name: "ListKnowledgeSourcesInput",
|
|
147
145
|
fields: {
|
|
148
146
|
tenantId: {
|
|
149
|
-
type:
|
|
147
|
+
type: E5.ID(),
|
|
150
148
|
isOptional: false
|
|
151
149
|
},
|
|
152
150
|
spaceKey: {
|
|
153
|
-
type:
|
|
151
|
+
type: E5.NonEmptyString(),
|
|
154
152
|
isOptional: true
|
|
155
153
|
}
|
|
156
154
|
}
|
|
157
155
|
});
|
|
158
|
-
const ListKnowledgeSourcesOutput = new
|
|
156
|
+
const ListKnowledgeSourcesOutput = new x8({
|
|
159
157
|
name: "ListKnowledgeSourcesOutput",
|
|
160
158
|
fields: { sources: {
|
|
161
159
|
type: KnowledgeSourceRecord,
|
|
@@ -163,26 +161,26 @@ const ListKnowledgeSourcesOutput = new SchemaModel({
|
|
|
163
161
|
isArray: true
|
|
164
162
|
} }
|
|
165
163
|
});
|
|
166
|
-
const TriggerKnowledgeSyncInput = new
|
|
164
|
+
const TriggerKnowledgeSyncInput = new x8({
|
|
167
165
|
name: "TriggerKnowledgeSyncInput",
|
|
168
166
|
fields: { sourceId: {
|
|
169
|
-
type:
|
|
167
|
+
type: E5.ID(),
|
|
170
168
|
isOptional: false
|
|
171
169
|
} }
|
|
172
170
|
});
|
|
173
|
-
const TriggerKnowledgeSyncOutput = new
|
|
171
|
+
const TriggerKnowledgeSyncOutput = new x8({
|
|
174
172
|
name: "TriggerKnowledgeSyncOutput",
|
|
175
173
|
fields: {
|
|
176
174
|
success: {
|
|
177
|
-
type:
|
|
175
|
+
type: E5.Boolean(),
|
|
178
176
|
isOptional: false
|
|
179
177
|
},
|
|
180
178
|
itemsProcessed: {
|
|
181
|
-
type:
|
|
179
|
+
type: E5.Int_unsecure(),
|
|
182
180
|
isOptional: true
|
|
183
181
|
},
|
|
184
182
|
error: {
|
|
185
|
-
type:
|
|
183
|
+
type: E5.String_unsecure(),
|
|
186
184
|
isOptional: true
|
|
187
185
|
}
|
|
188
186
|
}
|
|
@@ -303,4 +301,5 @@ const TriggerKnowledgeSourceSync = defineCommand({
|
|
|
303
301
|
}
|
|
304
302
|
});
|
|
305
303
|
|
|
306
|
-
//#endregion
|
|
304
|
+
//#endregion
|
|
305
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../libs/contracts/dist/knowledge/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../spec.js\";\n\n//#region src/knowledge/contracts.ts\nconst KnowledgeSyncSchedule = new x8({\n\tname: \"KnowledgeSyncSchedule\",\n\tfields: {\n\t\tenabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcron: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tintervalMs: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst KnowledgeSourceRecord = new x8({\n\tname: \"KnowledgeSourceRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSourceInput = new x8({\n\tname: \"CreateKnowledgeSourceInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst UpdateKnowledgeSourceInput = new x8({\n\tname: \"UpdateKnowledgeSourceInput\",\n\tfields: {\n\t\tsourceId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteKnowledgeSourceInput = new x8({\n\tname: \"DeleteKnowledgeSourceInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst DeleteKnowledgeSourceOutput = new x8({\n\tname: \"DeleteKnowledgeSourceOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst ListKnowledgeSourcesInput = new x8({\n\tname: \"ListKnowledgeSourcesInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListKnowledgeSourcesOutput = new x8({\n\tname: \"ListKnowledgeSourcesOutput\",\n\tfields: { sources: {\n\t\ttype: KnowledgeSourceRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TriggerKnowledgeSyncInput = new x8({\n\tname: \"TriggerKnowledgeSyncInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TriggerKnowledgeSyncOutput = new x8({\n\tname: \"TriggerKnowledgeSyncOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a knowledge source binding for a tenant.\",\n\t\tgoal: \"Onboard a new knowledge ingestion source such as Notion or uploads.\",\n\t\tcontext: \"Used by Ops and App Studio to configure knowledge ingestion per tenant and space.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or configuration for a knowledge source.\",\n\t\tgoal: \"Allow rotation of credentials, sync schedules, and labels.\",\n\t\tcontext: \"Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete a knowledge source binding for a tenant.\",\n\t\tgoal: \"Remove obsolete or compromised knowledge ingestion paths.\",\n\t\tcontext: \"Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteKnowledgeSourceInput,\n\t\toutput: DeleteKnowledgeSourceOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListKnowledgeSources = defineQuery({\n\tmeta: {\n\t\tname: \"knowledge.source.list\",\n\t\tversion: 1,\n\t\tdescription: \"List knowledge sources configured for a tenant.\",\n\t\tgoal: \"Provide visibility into knowledge ingest configuration and schedules.\",\n\t\tcontext: \"Used by App Studio and Ops flows to surface knowledge sources and their health.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListKnowledgeSourcesInput,\n\t\toutput: ListKnowledgeSourcesOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TriggerKnowledgeSourceSync = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.triggerSync\",\n\t\tversion: 1,\n\t\tdescription: \"Trigger an immediate sync for a knowledge source.\",\n\t\tgoal: \"Support manual or automated sync retries for knowledge ingestion.\",\n\t\tcontext: \"Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TriggerKnowledgeSyncInput,\n\t\toutput: TriggerKnowledgeSyncOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst knowledgeContracts = {\n\tCreateKnowledgeSource,\n\tUpdateKnowledgeSource,\n\tDeleteKnowledgeSource,\n\tListKnowledgeSources,\n\tTriggerKnowledgeSourceSync\n};\nfunction registerKnowledgeContracts(registry) {\n\treturn registry.register(CreateKnowledgeSource).register(UpdateKnowledgeSource).register(DeleteKnowledgeSource).register(ListKnowledgeSources).register(TriggerKnowledgeSourceSync);\n}\n\n//#endregion\nexport { CreateKnowledgeSource, DeleteKnowledgeSource, ListKnowledgeSources, TriggerKnowledgeSourceSync, UpdateKnowledgeSource, knowledgeContracts, registerKnowledgeContracts };"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-threads.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/knowledge/spaces/email-threads.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/knowledge/spaces/email-threads.ts\nconst emailThreadsKnowledgeSpace = {\n\tmeta: {\n\t\tkey: \"knowledge.email-threads\",\n\t\tversion: 1,\n\t\tcategory: \"operational\",\n\t\tdisplayName: \"Email Threads\",\n\t\ttitle: \"Operational Email Threads\",\n\t\tdescription: \"Indexed copies of operational email threads used for support, onboarding, and workflows.\",\n\t\tdomain: \"operations\",\n\t\towners: [\"platform.operations\"],\n\t\ttags: [\"email\", \"operations\"],\n\t\tstability: StabilityEnum.Beta\n\t},\n\tretention: { ttlDays: 365 },\n\taccess: {\n\t\tpolicy: {\n\t\t\tname: \"knowledge.access.email-threads\",\n\t\t\tversion: 1\n\t\t},\n\t\ttrustLevel: \"medium\",\n\t\tautomationWritable: true\n\t},\n\tindexing: {\n\t\tembeddingModel: \"mistral-embed\",\n\t\tchunkSize: 600,\n\t\tvectorDbIntegration: \"vectordb.qdrant\"\n\t},\n\tdescription: \"Operational email threads synchronized from Gmail to support automations and contextual assistance.\"\n};\nfunction registerEmailThreadsKnowledgeSpace(registry) {\n\treturn registry.register(emailThreadsKnowledgeSpace);\n}\n\n//#endregion\nexport { emailThreadsKnowledgeSpace, registerEmailThreadsKnowledgeSpace };"],"mappings":";;;AAGA,MAAM,6BAA6B;CAClC,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,sBAAsB;EAC/B,MAAM,CAAC,SAAS,aAAa;EAC7B,WAAW,cAAc;EACzB;CACD,WAAW,EAAE,SAAS,KAAK;CAC3B,QAAQ;EACP,QAAQ;GACP,MAAM;GACN,SAAS;GACT;EACD,YAAY;EACZ,oBAAoB;EACpB;CACD,UAAU;EACT,gBAAgB;EAChB,WAAW;EACX,qBAAqB;EACrB;CACD,aAAa;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financial-docs.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/knowledge/spaces/financial-docs.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/knowledge/spaces/financial-docs.ts\nconst financialDocsKnowledgeSpace = {\n\tmeta: {\n\t\tkey: \"knowledge.financial-docs\",\n\t\tversion: 1,\n\t\tcategory: \"canonical\",\n\t\tdisplayName: \"Financial Documents\",\n\t\ttitle: \"Household Financial Documents\",\n\t\tdescription: \"Invoices, bills, and contracts powering Pocket Family Office financial automation.\",\n\t\tdomain: \"finance\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\"finance\", \"documents\"],\n\t\tstability: StabilityEnum.Beta\n\t},\n\tretention: { ttlDays: null },\n\taccess: {\n\t\tpolicy: {\n\t\t\tname: \"knowledge.access.financial-docs\",\n\t\t\tversion: 1\n\t\t},\n\t\ttrustLevel: \"high\",\n\t\tautomationWritable: true\n\t},\n\tindexing: {\n\t\tembeddingModel: \"mistral-embed\",\n\t\tchunkSize: 700,\n\t\tvectorDbIntegration: \"vectordb.qdrant\"\n\t},\n\tdescription: \"Normalized financial documents enabling bill pay automation, reminders, and summaries.\"\n};\nfunction registerFinancialDocsKnowledgeSpace(registry) {\n\treturn registry.register(financialDocsKnowledgeSpace);\n}\n\n//#endregion\nexport { financialDocsKnowledgeSpace, registerFinancialDocsKnowledgeSpace };"],"mappings":";;;AAGA,MAAM,8BAA8B;CACnC,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,mBAAmB;EAC5B,MAAM,CAAC,WAAW,YAAY;EAC9B,WAAW,cAAc;EACzB;CACD,WAAW,EAAE,SAAS,MAAM;CAC5B,QAAQ;EACP,QAAQ;GACP,MAAM;GACN,SAAS;GACT;EACD,YAAY;EACZ,oBAAoB;EACpB;CACD,UAAU;EACT,gBAAgB;EAChB,WAAW;EACX,qBAAqB;EACrB;CACD,aAAa;CACb"}
|
|
@@ -35,4 +35,5 @@ const financialOverviewKnowledgeSpace = {
|
|
|
35
35
|
description: "Derived knowledge space containing weekly/monthly cashflow rollups and account health summaries. Raw transactions are excluded to respect privacy guardrails."
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
38
|
+
//#endregion
|
|
39
|
+
//# sourceMappingURL=financial-overview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financial-overview.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/knowledge/spaces/financial-overview.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/knowledge/spaces/financial-overview.ts\nconst financialOverviewKnowledgeSpace = {\n\tmeta: {\n\t\tkey: \"knowledge.financial-overview\",\n\t\tversion: 1,\n\t\tcategory: \"operational\",\n\t\tdisplayName: \"Financial Overview Summaries\",\n\t\ttitle: \"Derived Financial Summaries\",\n\t\tdescription: \"Aggregated cashflow summaries, category breakdowns, and balance trends derived from open banking data.\",\n\t\tdomain: \"finance\",\n\t\towners: [\"platform.finance\"],\n\t\ttags: [\n\t\t\t\"open-banking\",\n\t\t\t\"summaries\",\n\t\t\t\"cashflow\"\n\t\t],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tretention: { ttlDays: 180 },\n\taccess: {\n\t\tpolicy: {\n\t\t\tname: \"knowledge.access.financial-overview\",\n\t\t\tversion: 1\n\t\t},\n\t\ttrustLevel: \"medium\",\n\t\tautomationWritable: true\n\t},\n\tindexing: {\n\t\tembeddingModel: \"mistral-embed\",\n\t\tchunkSize: 600,\n\t\tvectorDbIntegration: \"vectordb.qdrant\"\n\t},\n\tdescription: \"Derived knowledge space containing weekly/monthly cashflow rollups and account health summaries. Raw transactions are excluded to respect privacy guardrails.\"\n};\nfunction registerFinancialOverviewKnowledgeSpace(registry) {\n\treturn registry.register(financialOverviewKnowledgeSpace);\n}\n\n//#endregion\nexport { financialOverviewKnowledgeSpace, registerFinancialOverviewKnowledgeSpace };"],"mappings":";;;AAGA,MAAM,kCAAkC;CACvC,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,mBAAmB;EAC5B,MAAM;GACL;GACA;GACA;GACA;EACD,WAAW,cAAc;EACzB;CACD,WAAW,EAAE,SAAS,KAAK;CAC3B,QAAQ;EACP,QAAQ;GACP,MAAM;GACN,SAAS;GACT;EACD,YAAY;EACZ,oBAAoB;EACpB;CACD,UAAU;EACT,gBAAgB;EAChB,WAAW;EACX,qBAAqB;EACrB;CACD,aAAa;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-canon.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/knowledge/spaces/product-canon.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/knowledge/spaces/product-canon.ts\nconst productCanonKnowledgeSpace = {\n\tmeta: {\n\t\tkey: \"knowledge.product-canon\",\n\t\tversion: 1,\n\t\tcategory: \"canonical\",\n\t\tdisplayName: \"Product Canon\",\n\t\ttitle: \"Product Canon Knowledge Space\",\n\t\tdescription: \"Authoritative product knowledge covering strategy, roadmap, and delivery canon.\",\n\t\tdomain: \"product\",\n\t\towners: [\"platform.product\"],\n\t\ttags: [\"knowledge\", \"product\"],\n\t\tstability: StabilityEnum.Stable\n\t},\n\tretention: { ttlDays: null },\n\taccess: {\n\t\tpolicy: {\n\t\t\tname: \"knowledge.access.product-canon\",\n\t\t\tversion: 1\n\t\t},\n\t\ttrustLevel: \"high\",\n\t\tautomationWritable: false\n\t},\n\tindexing: {\n\t\tembeddingModel: \"text-embedding-3-large\",\n\t\tchunkSize: 800,\n\t\tvectorDbIntegration: \"vectordb.qdrant\"\n\t},\n\tdescription: \"Single source of truth for product canon, principles, and strategic narratives.\"\n};\nfunction registerProductCanonKnowledgeSpace(registry) {\n\treturn registry.register(productCanonKnowledgeSpace);\n}\n\n//#endregion\nexport { productCanonKnowledgeSpace, registerProductCanonKnowledgeSpace };"],"mappings":";;;AAGA,MAAM,6BAA6B;CAClC,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,mBAAmB;EAC5B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW,cAAc;EACzB;CACD,WAAW,EAAE,SAAS,MAAM;CAC5B,QAAQ;EACP,QAAQ;GACP,MAAM;GACN,SAAS;GACT;EACD,YAAY;EACZ,oBAAoB;EACpB;CACD,UAAU;EACT,gBAAgB;EAChB,WAAW;EACX,qBAAqB;EACrB;CACD,aAAa;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"support-faq.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/knowledge/spaces/support-faq.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/knowledge/spaces/support-faq.ts\nconst supportFaqKnowledgeSpace = {\n\tmeta: {\n\t\tkey: \"knowledge.support-faq\",\n\t\tversion: 1,\n\t\tcategory: \"operational\",\n\t\tdisplayName: \"Support FAQ\",\n\t\ttitle: \"Support & Success FAQ\",\n\t\tdescription: \"Operational knowledge base for customer support and success.\",\n\t\tdomain: \"support\",\n\t\towners: [\"platform.support\"],\n\t\ttags: [\"knowledge\", \"support\"],\n\t\tstability: StabilityEnum.Beta\n\t},\n\tretention: {\n\t\tttlDays: 365,\n\t\tarchiveAfterDays: 180\n\t},\n\taccess: {\n\t\tpolicy: {\n\t\t\tname: \"knowledge.access.support\",\n\t\t\tversion: 1\n\t\t},\n\t\ttrustLevel: \"medium\",\n\t\tautomationWritable: true\n\t},\n\tindexing: {\n\t\tembeddingModel: \"text-embedding-3-small\",\n\t\tchunkSize: 700,\n\t\tvectorDbIntegration: \"vectordb.qdrant\"\n\t},\n\tdescription: \"Operational FAQs, runbooks, and customer success playbooks augmented with automation updates.\"\n};\nfunction registerSupportFaqKnowledgeSpace(registry) {\n\treturn registry.register(supportFaqKnowledgeSpace);\n}\n\n//#endregion\nexport { registerSupportFaqKnowledgeSpace, supportFaqKnowledgeSpace };"],"mappings":";;;AAGA,MAAM,2BAA2B;CAChC,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,mBAAmB;EAC5B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW,cAAc;EACzB;CACD,WAAW;EACV,SAAS;EACT,kBAAkB;EAClB;CACD,QAAQ;EACP,QAAQ;GACP,MAAM;GACN,SAAS;GACT;EACD,YAAY;EACZ,oBAAoB;EACpB;CACD,UAAU;EACT,gBAAgB;EAChB,WAAW;EACX,qBAAqB;EACrB;CACD,aAAa;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploaded-docs.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/knowledge/spaces/uploaded-docs.js"],"sourcesContent":["import { StabilityEnum } from \"../../ownership.js\";\n\n//#region src/knowledge/spaces/uploaded-docs.ts\nconst uploadedDocsKnowledgeSpace = {\n\tmeta: {\n\t\tkey: \"knowledge.uploaded-docs\",\n\t\tversion: 1,\n\t\tcategory: \"external\",\n\t\tdisplayName: \"Uploaded Documents\",\n\t\ttitle: \"Uploaded Knowledge Assets\",\n\t\tdescription: \"Documents uploaded by households, including invoices, contracts, and reference files.\",\n\t\tdomain: \"operations\",\n\t\towners: [\"platform.operations\"],\n\t\ttags: [\"documents\", \"storage\"],\n\t\tstability: StabilityEnum.Beta\n\t},\n\tretention: { ttlDays: null },\n\taccess: {\n\t\tpolicy: {\n\t\t\tname: \"knowledge.access.uploaded-docs\",\n\t\t\tversion: 1\n\t\t},\n\t\ttrustLevel: \"medium\",\n\t\tautomationWritable: true\n\t},\n\tindexing: {\n\t\tembeddingModel: \"mistral-embed\",\n\t\tchunkSize: 900,\n\t\tvectorDbIntegration: \"vectordb.qdrant\"\n\t},\n\tdescription: \"User-provided documents normalized and embedded for retrieval augmented workflows.\"\n};\nfunction registerUploadedDocsKnowledgeSpace(registry) {\n\treturn registry.register(uploadedDocsKnowledgeSpace);\n}\n\n//#endregion\nexport { registerUploadedDocsKnowledgeSpace, uploadedDocsKnowledgeSpace };"],"mappings":";;;AAGA,MAAM,6BAA6B;CAClC,MAAM;EACL,KAAK;EACL,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,sBAAsB;EAC/B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW,cAAc;EACzB;CACD,WAAW,EAAE,SAAS,MAAM;CAC5B,QAAQ;EACP,QAAQ;GACP,MAAM;GACN,SAAS;GACT;EACD,YAAY;EACZ,oBAAoB;EACpB;CACD,UAAU;EACT,gBAAgB;EAChB,WAAW;EACX,qBAAqB;EACrB;CACD,aAAa;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exporters.js","names":[],"sources":["../../../../../../../libs/contracts/dist/llm/exporters.js"],"sourcesContent":["import { jsonSchemaForSpec } from \"../jsonschema.js\";\nimport { isEmitDeclRef } from \"../spec.js\";\n\n//#region src/llm/exporters.ts\nconst DEFAULT_SPEC_OPTIONS = {\n\tformat: \"full\",\n\tincludeSchemas: true,\n\tincludeScenarios: true,\n\tincludeExamples: true,\n\tincludePolicy: true,\n\tincludeSideEffects: true\n};\nconst DEFAULT_FEATURE_OPTIONS = {\n\t...DEFAULT_SPEC_OPTIONS,\n\tincludeRelatedSpecs: true,\n\tincludeRelatedEvents: true,\n\tincludeRelatedPresentations: true\n};\n/**\n* Export a single spec to context-focused markdown.\n* Includes: goal, context, description, acceptance scenarios.\n* Best for: Understanding what the spec does, providing context to LLMs.\n*/\nfunction specToContextMarkdown(spec) {\n\tconst m = spec.meta;\n\tconst lines = [];\n\tlines.push(`# ${m.name} (v${m.version})`);\n\tlines.push(\"\");\n\tlines.push(`> ${m.description}`);\n\tlines.push(\"\");\n\tlines.push(`**Type:** ${m.kind} | **Stability:** ${m.stability}`);\n\tlines.push(\"\");\n\tlines.push(\"## Goal\");\n\tlines.push(\"\");\n\tlines.push(m.goal);\n\tlines.push(\"\");\n\tlines.push(\"## Context\");\n\tlines.push(\"\");\n\tlines.push(m.context);\n\tlines.push(\"\");\n\tif (spec.acceptance?.scenarios?.length) {\n\t\tlines.push(\"## Acceptance Criteria\");\n\t\tlines.push(\"\");\n\t\tfor (const s of spec.acceptance.scenarios) {\n\t\t\tlines.push(`### ${s.name}`);\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"**Given:**\");\n\t\t\tfor (const g of s.given) lines.push(`- ${g}`);\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"**When:**\");\n\t\t\tfor (const w of s.when) lines.push(`- ${w}`);\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"**Then:**\");\n\t\t\tfor (const t of s.then) lines.push(`- ${t}`);\n\t\t\tlines.push(\"\");\n\t\t}\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Export a single spec to full markdown with all details.\n* Includes: all fields, I/O schemas, policy, events, examples.\n* Best for: Complete documentation, implementation reference.\n*/\nfunction specToFullMarkdown(spec, options = {}) {\n\tconst opts = {\n\t\t...DEFAULT_SPEC_OPTIONS,\n\t\t...options\n\t};\n\tconst m = spec.meta;\n\tconst lines = [];\n\tlines.push(`# ${m.name}.v${m.version}`);\n\tlines.push(\"\");\n\tlines.push(`> ${m.description}`);\n\tlines.push(\"\");\n\tlines.push(\"## Metadata\");\n\tlines.push(\"\");\n\tlines.push(\"| Field | Value |\");\n\tlines.push(\"|-------|-------|\");\n\tlines.push(`| Kind | ${m.kind} |`);\n\tlines.push(`| Stability | ${m.stability} |`);\n\tlines.push(`| Owners | ${m.owners.join(\", \")} |`);\n\tlines.push(`| Tags | ${m.tags.join(\", \")} |`);\n\tlines.push(\"\");\n\tlines.push(\"## Goal\");\n\tlines.push(\"\");\n\tlines.push(m.goal);\n\tlines.push(\"\");\n\tlines.push(\"## Context\");\n\tlines.push(\"\");\n\tlines.push(m.context);\n\tlines.push(\"\");\n\tif (opts.includeSchemas) {\n\t\tlines.push(\"## Input/Output\");\n\t\tlines.push(\"\");\n\t\tif (spec.io.input) {\n\t\t\tlines.push(\"### Input Schema\");\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"```json\");\n\t\t\ttry {\n\t\t\t\tconst schema = jsonSchemaForSpec(spec);\n\t\t\t\tlines.push(JSON.stringify(schema.input ?? {}, null, 2));\n\t\t\t} catch {\n\t\t\t\tlines.push(\"// Schema generation not available\");\n\t\t\t}\n\t\t\tlines.push(\"```\");\n\t\t\tlines.push(\"\");\n\t\t}\n\t\tlines.push(\"### Output Schema\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"```json\");\n\t\ttry {\n\t\t\tconst schema = jsonSchemaForSpec(spec);\n\t\t\tlines.push(JSON.stringify(schema.output ?? {}, null, 2));\n\t\t} catch {\n\t\t\tlines.push(\"// Schema generation not available\");\n\t\t}\n\t\tlines.push(\"```\");\n\t\tlines.push(\"\");\n\t\tif (spec.io.errors && Object.keys(spec.io.errors).length) {\n\t\t\tlines.push(\"### Error Codes\");\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"| Code | HTTP | Description | When |\");\n\t\t\tlines.push(\"|------|------|-------------|------|\");\n\t\t\tfor (const [code, err] of Object.entries(spec.io.errors)) lines.push(`| \\`${code}\\` | ${err.http ?? 400} | ${err.description} | ${err.when} |`);\n\t\t\tlines.push(\"\");\n\t\t}\n\t}\n\tif (opts.includePolicy) {\n\t\tlines.push(\"## Policy\");\n\t\tlines.push(\"\");\n\t\tlines.push(`- **Auth Required:** ${spec.policy.auth}`);\n\t\tlines.push(`- **Idempotent:** ${spec.policy.idempotent ?? m.kind === \"query\"}`);\n\t\tif (spec.policy.rateLimit) lines.push(`- **Rate Limit:** ${spec.policy.rateLimit.rpm} rpm per ${spec.policy.rateLimit.key}`);\n\t\tif (spec.policy.flags?.length) lines.push(`- **Feature Flags:** ${spec.policy.flags.join(\", \")}`);\n\t\tif (spec.policy.pii?.length) lines.push(`- **PII Fields:** ${spec.policy.pii.join(\", \")}`);\n\t\tif (spec.policy.escalate) lines.push(`- **Escalation:** ${spec.policy.escalate}`);\n\t\tlines.push(\"\");\n\t}\n\tif (opts.includeSideEffects && spec.sideEffects) {\n\t\tif (spec.sideEffects.emits?.length) {\n\t\t\tlines.push(\"## Events Emitted\");\n\t\t\tlines.push(\"\");\n\t\t\tfor (const e of spec.sideEffects.emits) if (isEmitDeclRef(e)) lines.push(`- \\`${e.ref.name}.v${e.ref.version}\\` — ${e.when}`);\n\t\t\telse lines.push(`- \\`${e.name}.v${e.version}\\` — ${e.when}`);\n\t\t\tlines.push(\"\");\n\t\t}\n\t\tif (spec.sideEffects.analytics?.length) {\n\t\t\tlines.push(\"## Analytics Events\");\n\t\t\tlines.push(\"\");\n\t\t\tfor (const a of spec.sideEffects.analytics) lines.push(`- ${a}`);\n\t\t\tlines.push(\"\");\n\t\t}\n\t}\n\tif (opts.includeScenarios && spec.acceptance?.scenarios?.length) {\n\t\tlines.push(\"## Acceptance Scenarios\");\n\t\tlines.push(\"\");\n\t\tfor (const s of spec.acceptance.scenarios) {\n\t\t\tlines.push(`### ${s.name}`);\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"**Given:**\");\n\t\t\tfor (const g of s.given) lines.push(`- ${g}`);\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"**When:**\");\n\t\t\tfor (const w of s.when) lines.push(`- ${w}`);\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"**Then:**\");\n\t\t\tfor (const t of s.then) lines.push(`- ${t}`);\n\t\t\tlines.push(\"\");\n\t\t}\n\t}\n\tif (opts.includeExamples && spec.acceptance?.examples?.length) {\n\t\tlines.push(\"## Examples\");\n\t\tlines.push(\"\");\n\t\tfor (const ex of spec.acceptance.examples) {\n\t\t\tlines.push(`### ${ex.name}`);\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"**Input:**\");\n\t\t\tlines.push(\"```json\");\n\t\t\tlines.push(JSON.stringify(ex.input, null, 2));\n\t\t\tlines.push(\"```\");\n\t\t\tlines.push(\"\");\n\t\t\tlines.push(\"**Output:**\");\n\t\t\tlines.push(\"```json\");\n\t\t\tlines.push(JSON.stringify(ex.output, null, 2));\n\t\t\tlines.push(\"```\");\n\t\t\tlines.push(\"\");\n\t\t}\n\t}\n\tif (spec.transport) {\n\t\tlines.push(\"## Transport Configuration\");\n\t\tlines.push(\"\");\n\t\tif (spec.transport.rest) lines.push(`- **REST:** ${spec.transport.rest.method ?? \"POST\"} ${spec.transport.rest.path ?? \"auto\"}`);\n\t\tif (spec.transport.gql) lines.push(`- **GraphQL:** ${spec.transport.gql.field ?? \"auto\"}`);\n\t\tif (spec.transport.mcp) lines.push(`- **MCP Tool:** ${spec.transport.mcp.toolName ?? \"auto\"}`);\n\t\tlines.push(\"\");\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Export a single spec as an actionable agent prompt.\n* Includes: instructions, full spec, expected output format.\n* Best for: Directly feeding to coding agents for implementation.\n*/\nfunction specToAgentPrompt(spec, options) {\n\tconst taskType = options?.taskType ?? \"implement\";\n\tconst m = spec.meta;\n\tconst lines = [];\n\tconst taskVerb = {\n\t\timplement: \"Implement\",\n\t\ttest: \"Write tests for\",\n\t\trefactor: \"Refactor\",\n\t\treview: \"Review\"\n\t}[taskType];\n\tlines.push(`# Task: ${taskVerb} ${m.name}.v${m.version}`);\n\tlines.push(\"\");\n\tlines.push(\"## Context\");\n\tlines.push(\"\");\n\tlines.push(`You are working on a ContractSpec-driven codebase. This spec defines a ${m.kind} operation.`);\n\tlines.push(\"\");\n\tlines.push(`**Goal:** ${m.goal}`);\n\tlines.push(\"\");\n\tlines.push(`**Background:** ${m.context}`);\n\tlines.push(\"\");\n\tlines.push(\"## Specification\");\n\tlines.push(\"\");\n\tlines.push(specToFullMarkdown(spec));\n\tlines.push(\"\");\n\tlines.push(\"## Instructions\");\n\tlines.push(\"\");\n\tif (taskType === \"implement\") {\n\t\tlines.push(\"Implement this specification following these requirements:\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"1. **Type Safety**: Use TypeScript with strict typing. No `any` types.\");\n\t\tlines.push(\"2. **Input Validation**: Validate input against the schema before processing.\");\n\t\tlines.push(\"3. **Error Handling**: Implement all error cases defined in the spec.\");\n\t\tlines.push(\"4. **Events**: Emit events as specified in sideEffects.emits.\");\n\t\tlines.push(\"5. **Policy**: Respect auth, rate limits, and feature flags.\");\n\t\tlines.push(\"6. **Idempotency**: \" + (spec.policy.idempotent ? \"This operation MUST be idempotent.\" : \"This operation may have side effects.\"));\n\t\tlines.push(\"\");\n\t\tif (spec.policy.pii?.length) {\n\t\t\tlines.push(\"**PII Handling**: The following fields contain PII and must be handled carefully:\");\n\t\t\tfor (const field of spec.policy.pii) lines.push(`- ${field}`);\n\t\t\tlines.push(\"\");\n\t\t}\n\t} else if (taskType === \"test\") {\n\t\tlines.push(\"Write comprehensive tests for this specification:\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"1. Test all acceptance scenarios defined in the spec.\");\n\t\tlines.push(\"2. Test all error cases with appropriate assertions.\");\n\t\tlines.push(\"3. Test edge cases and boundary conditions.\");\n\t\tlines.push(\"4. Verify events are emitted correctly.\");\n\t\tlines.push(\"5. Use descriptive test names following the pattern: \\\"should [behavior] when [condition]\\\"\");\n\t\tlines.push(\"\");\n\t} else if (taskType === \"refactor\") {\n\t\tlines.push(\"Refactor this implementation while preserving all behavior:\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"1. Maintain compliance with the specification.\");\n\t\tlines.push(\"2. Improve code clarity and maintainability.\");\n\t\tlines.push(\"3. Reduce complexity where possible.\");\n\t\tlines.push(\"4. Ensure all existing tests still pass.\");\n\t\tlines.push(\"\");\n\t} else if (taskType === \"review\") {\n\t\tlines.push(\"Review this implementation against the specification:\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"1. Verify input/output types match the schema.\");\n\t\tlines.push(\"2. Check all error cases are handled.\");\n\t\tlines.push(\"3. Verify events are emitted as specified.\");\n\t\tlines.push(\"4. Check policy compliance (auth, rate limits).\");\n\t\tlines.push(\"5. Report any deviations from the spec.\");\n\t\tlines.push(\"\");\n\t}\n\tif (options?.existingCode) {\n\t\tlines.push(\"## Existing Code\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"```typescript\");\n\t\tlines.push(options.existingCode);\n\t\tlines.push(\"```\");\n\t\tlines.push(\"\");\n\t}\n\tlines.push(\"## Expected Output\");\n\tlines.push(\"\");\n\tif (taskType === \"implement\" || taskType === \"refactor\") {\n\t\tlines.push(\"Provide a complete TypeScript implementation. Include:\");\n\t\tlines.push(\"- Type definitions for input/output\");\n\t\tlines.push(\"- Handler function with proper error handling\");\n\t\tlines.push(\"- JSDoc comments explaining the implementation\");\n\t} else if (taskType === \"test\") lines.push(\"Provide a complete test file using the testing framework available (prefer Vitest).\");\n\telse if (taskType === \"review\") {\n\t\tlines.push(\"Provide a structured review with:\");\n\t\tlines.push(\"- Compliance status (pass/fail for each requirement)\");\n\t\tlines.push(\"- Issues found with severity (error/warning/info)\");\n\t\tlines.push(\"- Suggestions for improvement\");\n\t}\n\tlines.push(\"\");\n\treturn lines.join(\"\\n\");\n}\n/**\n* Export a feature module to markdown.\n* Includes all related specs, events, and presentations.\n*/\nfunction featureToMarkdown(feature, deps, options = {}) {\n\tconst opts = {\n\t\t...DEFAULT_FEATURE_OPTIONS,\n\t\t...options\n\t};\n\tconst m = feature.meta;\n\tconst lines = [];\n\tlines.push(`# Feature: ${m.title ?? m.key}`);\n\tlines.push(\"\");\n\tif (m.description) {\n\t\tlines.push(`> ${m.description}`);\n\t\tlines.push(\"\");\n\t}\n\tlines.push(\"## Overview\");\n\tlines.push(\"\");\n\tlines.push(`- **Key:** \\`${m.key}\\``);\n\tlines.push(`- **Stability:** ${m.stability}`);\n\tlines.push(`- **Owners:** ${m.owners.join(\", \")}`);\n\tif (m.tags?.length) lines.push(`- **Tags:** ${m.tags.join(\", \")}`);\n\tlines.push(\"\");\n\tif (feature.operations?.length) {\n\t\tlines.push(\"## Operations\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"| Name | Version | Type |\");\n\t\tlines.push(\"|------|---------|------|\");\n\t\tfor (const op of feature.operations) {\n\t\t\tconst kind = (deps?.specs?.getSpec(op.name, op.version))?.meta.kind ?? \"unknown\";\n\t\t\tlines.push(`| ${op.name} | v${op.version} | ${kind} |`);\n\t\t}\n\t\tlines.push(\"\");\n\t\tif (opts.includeRelatedSpecs && deps?.specs) {\n\t\t\tlines.push(\"### Operation Details\");\n\t\t\tlines.push(\"\");\n\t\t\tfor (const op of feature.operations) {\n\t\t\t\tconst spec = deps.specs.getSpec(op.name, op.version);\n\t\t\t\tif (spec) {\n\t\t\t\t\tlines.push(`---`);\n\t\t\t\t\tlines.push(\"\");\n\t\t\t\t\tlines.push(specToFullMarkdown(spec, opts));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (feature.events?.length) {\n\t\tlines.push(\"## Events\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"| Name | Version |\");\n\t\tlines.push(\"|------|---------|\");\n\t\tfor (const evt of feature.events) lines.push(`| ${evt.name} | v${evt.version} |`);\n\t\tlines.push(\"\");\n\t}\n\tif (feature.presentations?.length) {\n\t\tlines.push(\"## Presentations\");\n\t\tlines.push(\"\");\n\t\tlines.push(\"| Name | Version |\");\n\t\tlines.push(\"|------|---------|\");\n\t\tfor (const pres of feature.presentations) lines.push(`| ${pres.name} | v${pres.version} |`);\n\t\tlines.push(\"\");\n\t\tif (opts.includeRelatedPresentations && deps?.presentations) {\n\t\t\tlines.push(\"### Presentation Details\");\n\t\t\tlines.push(\"\");\n\t\t\tfor (const pres of feature.presentations) {\n\t\t\t\tconst p = deps.presentations.get(pres.name, pres.version);\n\t\t\t\tif (p) {\n\t\t\t\t\tlines.push(`#### ${pres.name}.v${pres.version}`);\n\t\t\t\t\tlines.push(\"\");\n\t\t\t\t\tlines.push(`- **Kind:** ${p.content.kind ?? \"unknown\"}`);\n\t\t\t\t\tif (\"componentKey\" in p.content) lines.push(`- **Component:** ${p.content.componentKey}`);\n\t\t\t\t\tlines.push(\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (feature.capabilities) {\n\t\tif (feature.capabilities.provides?.length) {\n\t\t\tlines.push(\"## Capabilities Provided\");\n\t\t\tlines.push(\"\");\n\t\t\tfor (const cap of feature.capabilities.provides) lines.push(`- \\`${cap.key}.v${cap.version}\\``);\n\t\t\tlines.push(\"\");\n\t\t}\n\t\tif (feature.capabilities.requires?.length) {\n\t\t\tlines.push(\"## Capabilities Required\");\n\t\t\tlines.push(\"\");\n\t\t\tfor (const cap of feature.capabilities.requires) lines.push(`- \\`${cap.key}\\`${cap.version ? `.v${cap.version}` : \"\"} (${cap.optional ? \"optional\" : \"required\"})`);\n\t\t\tlines.push(\"\");\n\t\t}\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Export a presentation descriptor to markdown.\n*/\nfunction presentationToMarkdown(presentation) {\n\tconst m = presentation.meta;\n\tconst lines = [];\n\tlines.push(`# Presentation: ${m.name}.v${m.version}`);\n\tlines.push(\"\");\n\tif (m.description) {\n\t\tlines.push(`> ${m.description}`);\n\t\tlines.push(\"\");\n\t}\n\tlines.push(\"## Metadata\");\n\tlines.push(\"\");\n\tlines.push(`- **Name:** ${m.name}`);\n\tlines.push(`- **Version:** ${m.version}`);\n\tif (m.stability) lines.push(`- **Stability:** ${m.stability}`);\n\tif (m.owners?.length) lines.push(`- **Owners:** ${m.owners.join(\", \")}`);\n\tif (m.tags?.length) lines.push(`- **Tags:** ${m.tags.join(\", \")}`);\n\tlines.push(\"\");\n\tlines.push(\"## Source\");\n\tlines.push(\"\");\n\tlines.push(`- **Type:** ${presentation.source.type}`);\n\tif (presentation.source.type === \"component\") {\n\t\tlines.push(`- **Framework:** ${presentation.source.framework}`);\n\t\tlines.push(`- **Component Key:** ${presentation.source.componentKey}`);\n\t}\n\tlines.push(\"\");\n\tlines.push(\"## Supported Targets\");\n\tlines.push(\"\");\n\tfor (const target of presentation.targets) lines.push(`- ${target}`);\n\tlines.push(\"\");\n\tif (presentation.policy) {\n\t\tlines.push(\"## Policy\");\n\t\tlines.push(\"\");\n\t\tif (presentation.policy.flags?.length) lines.push(`- **Feature Flags:** ${presentation.policy.flags.join(\", \")}`);\n\t\tif (presentation.policy.pii?.length) lines.push(`- **PII Fields:** ${presentation.policy.pii.join(\", \")}`);\n\t\tlines.push(\"\");\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Export an event spec to markdown.\n*/\nfunction eventToMarkdown(event) {\n\tconst lines = [];\n\tlines.push(`# Event: ${event.name}.v${event.version}`);\n\tlines.push(\"\");\n\tlines.push(\"## Metadata\");\n\tlines.push(\"\");\n\tlines.push(`- **Name:** ${event.name}`);\n\tlines.push(`- **Version:** ${event.version}`);\n\tif (event.description) lines.push(`- **Description:** ${event.description}`);\n\tlines.push(\"\");\n\tlines.push(\"## Payload Schema\");\n\tlines.push(\"\");\n\tlines.push(\"```json\");\n\ttry {\n\t\tconst zodSchema = event.payload.getZod();\n\t\tif (\"shape\" in zodSchema && zodSchema.shape) {\n\t\t\tconst shape = zodSchema.shape;\n\t\t\tconst fields = Object.keys(shape);\n\t\t\tlines.push(JSON.stringify({ fields }, null, 2));\n\t\t} else lines.push(\"// Payload schema available at runtime\");\n\t} catch {\n\t\tlines.push(\"// Schema details available at runtime\");\n\t}\n\tlines.push(\"```\");\n\tlines.push(\"\");\n\treturn lines.join(\"\\n\");\n}\n/**\n* Export a DocBlock to markdown (already markdown, but formatted consistently).\n*/\nfunction docBlockToMarkdown(doc) {\n\tconst lines = [];\n\tlines.push(`# ${doc.title}`);\n\tlines.push(\"\");\n\tif (doc.summary) {\n\t\tlines.push(`> ${doc.summary}`);\n\t\tlines.push(\"\");\n\t}\n\tlines.push(\"## Metadata\");\n\tlines.push(\"\");\n\tlines.push(`- **ID:** ${doc.id}`);\n\tlines.push(`- **Kind:** ${doc.kind ?? \"reference\"}`);\n\tlines.push(`- **Visibility:** ${doc.visibility ?? \"public\"}`);\n\tif (doc.tags?.length) lines.push(`- **Tags:** ${doc.tags.join(\", \")}`);\n\tif (doc.owners?.length) lines.push(`- **Owners:** ${doc.owners.join(\", \")}`);\n\tif (doc.domain) lines.push(`- **Domain:** ${doc.domain}`);\n\tlines.push(\"\");\n\tlines.push(\"## Content\");\n\tlines.push(\"\");\n\tlines.push(doc.body);\n\tlines.push(\"\");\n\tif (doc.links?.length) {\n\t\tlines.push(\"## Related Links\");\n\t\tlines.push(\"\");\n\t\tfor (const link of doc.links) lines.push(`- [${link.label}](${link.href})`);\n\t\tlines.push(\"\");\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Export a spec with a specific format.\n* Convenience function that wraps the format-specific functions.\n*/\nfunction exportSpec(spec, options = {}) {\n\tconst format = options.format ?? \"full\";\n\tlet markdown;\n\tswitch (format) {\n\t\tcase \"context\":\n\t\t\tmarkdown = specToContextMarkdown(spec);\n\t\t\tbreak;\n\t\tcase \"prompt\":\n\t\t\tmarkdown = specToAgentPrompt(spec);\n\t\t\tbreak;\n\t\tcase \"full\":\n\t\tdefault:\n\t\t\tmarkdown = specToFullMarkdown(spec, options);\n\t\t\tbreak;\n\t}\n\treturn {\n\t\tspec,\n\t\tmarkdown,\n\t\tformat,\n\t\tmeta: {\n\t\t\tspecName: spec.meta.name,\n\t\t\tspecVersion: spec.meta.version,\n\t\t\texportedAt: (/* @__PURE__ */ new Date()).toISOString(),\n\t\t\twordCount: markdown.split(/\\s+/).length\n\t\t}\n\t};\n}\n/**\n* Export a feature with a specific format.\n*/\nfunction exportFeature(feature, deps, options = {}) {\n\tconst format = options.format ?? \"full\";\n\treturn {\n\t\tfeature,\n\t\tmarkdown: featureToMarkdown(feature, deps, options),\n\t\tformat,\n\t\tincludedSpecs: feature.operations?.map((o) => `${o.name}.v${o.version}`) ?? [],\n\t\tincludedEvents: feature.events?.map((e) => `${e.name}.v${e.version}`) ?? [],\n\t\tincludedPresentations: feature.presentations?.map((p) => `${p.name}.v${p.version}`) ?? []\n\t};\n}\n\n//#endregion\nexport { docBlockToMarkdown, eventToMarkdown, exportFeature, exportSpec, featureToMarkdown, presentationToMarkdown, specToAgentPrompt, specToContextMarkdown, specToFullMarkdown };"],"mappings":";;;AAIA,MAAM,uBAAuB;CAC5B,QAAQ;CACR,gBAAgB;CAChB,kBAAkB;CAClB,iBAAiB;CACjB,eAAe;CACf,oBAAoB;CACpB;AACD,MAAM,0BAA0B;CAC/B,GAAG;CACH,qBAAqB;CACrB,sBAAsB;CACtB,6BAA6B;CAC7B"}
|