@lssm/example.locale-jurisdiction-gate 0.0.0-canary-20251217080011 → 0.0.0-canary-20251219202229
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/.turbo/turbo-build$colon$bundle.log +288 -232
- package/.turbo/turbo-build.log +289 -43
- package/CHANGELOG.md +3 -3
- package/LICENSE +21 -0
- package/dist/contracts/assistant.d.ts +62 -61
- package/dist/contracts/assistant.d.ts.map +1 -0
- package/dist/contracts/assistant.js +7 -8
- package/dist/contracts/assistant.js.map +1 -0
- package/dist/docs/locale-jurisdiction-gate.docblock.js +2 -1
- package/dist/docs/locale-jurisdiction-gate.docblock.js.map +1 -0
- package/dist/entities/models.d.ts +50 -49
- package/dist/entities/models.d.ts.map +1 -0
- package/dist/entities/models.js +33 -35
- package/dist/entities/models.js.map +1 -0
- package/dist/events.d.ts +21 -20
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +21 -21
- 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/demo.handlers.d.ts +2 -1
- package/dist/handlers/demo.handlers.d.ts.map +1 -0
- package/dist/handlers/demo.handlers.js +2 -1
- package/dist/handlers/demo.handlers.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 +3 -2
- 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 +3874 -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 +4717 -6
- package/dist/libs/schema/dist/index.js.map +1 -0
- package/dist/locale-jurisdiction-gate.feature.d.ts +2 -1
- package/dist/locale-jurisdiction-gate.feature.d.ts.map +1 -0
- package/dist/locale-jurisdiction-gate.feature.js +2 -1
- package/dist/locale-jurisdiction-gate.feature.js.map +1 -0
- package/dist/policy/guard.d.ts +2 -1
- package/dist/policy/guard.d.ts.map +1 -0
- package/dist/policy/guard.js +2 -1
- package/dist/policy/guard.js.map +1 -0
- package/dist/policy/types.d.ts +2 -1
- package/dist/policy/types.d.ts.map +1 -0
- package/package.json +8 -7
- package/tsconfig.tsbuildinfo +1 -1
- 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 -39
- 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 -56
- 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 -1
- package/dist/libs/schema/dist/entity/index.js +0 -2
- package/dist/libs/schema/dist/entity/types.js +0 -1
|
@@ -68,4 +68,5 @@ function docBlocksToPresentationRoutes(blocks, options) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
//#endregion
|
|
71
|
-
export { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes };
|
|
71
|
+
export { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes };
|
|
72
|
+
//# sourceMappingURL=presentations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentations.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/presentations.js"],"sourcesContent":["//#region src/docs/presentations.ts\nconst DEFAULT_TARGETS = [\n\t\"markdown\",\n\t\"application/json\",\n\t\"application/xml\",\n\t\"react\"\n];\nfunction normalizeRoute(route) {\n\tif (!route.length) return \"/\";\n\tconst withLeading = route.startsWith(\"/\") ? route : `/${route}`;\n\treturn withLeading === \"/\" ? \"/\" : withLeading.replace(/\\/+$/, \"\");\n}\nfunction deriveRoute(block, routePrefix) {\n\tif (block.route) return normalizeRoute(block.route);\n\tconst prefix = routePrefix ?? \"/docs\";\n\tconst slug = block.id.replace(/^docs\\.?/, \"\").replace(/\\./g, \"/\").replace(/\\/+/g, \"/\");\n\treturn normalizeRoute(slug.startsWith(\"/\") ? slug : `${prefix}/${slug}`);\n}\nfunction buildName(block, namespace) {\n\treturn namespace ? `${namespace}.${block.id}` : block.id;\n}\nfunction docBlockToPresentationV2(block, options) {\n\tconst targets = options?.defaultTargets ?? DEFAULT_TARGETS;\n\tconst version = block.version ?? options?.defaultVersion ?? 1;\n\tconst stability = block.stability ?? options?.defaultStability ?? \"stable\";\n\treturn {\n\t\tmeta: {\n\t\t\tname: buildName(block, options?.namespace),\n\t\t\tversion,\n\t\t\tdescription: block.summary ?? block.title,\n\t\t\ttags: block.tags,\n\t\t\towners: block.owners,\n\t\t\tdomain: block.domain,\n\t\t\tstability\n\t\t},\n\t\tpolicy: block.visibility && block.visibility !== \"public\" ? { flags: [block.visibility] } : void 0,\n\t\tsource: {\n\t\t\ttype: \"blocknotejs\",\n\t\t\tdocJson: block.body\n\t\t},\n\t\ttargets\n\t};\n}\nfunction docBlockToPresentationSpec(block, options) {\n\tconst version = block.version ?? options?.defaultVersion ?? 1;\n\tconst stability = block.stability ?? options?.defaultStability ?? \"stable\";\n\treturn {\n\t\tmeta: {\n\t\t\tname: buildName(block, options?.namespace),\n\t\t\tversion,\n\t\t\tstability,\n\t\t\ttags: block.tags,\n\t\t\towners: block.owners,\n\t\t\tdescription: block.summary ?? block.title\n\t\t},\n\t\tcontent: {\n\t\t\tkind: \"markdown\",\n\t\t\tcontent: block.body\n\t\t}\n\t};\n}\nfunction docBlocksToPresentationRoutes(blocks, options) {\n\treturn blocks.map((block) => ({\n\t\tblock,\n\t\troute: deriveRoute(block, options?.routePrefix),\n\t\tdescriptor: docBlockToPresentationV2(block, options)\n\t}));\n}\nfunction docBlocksToPresentationSpecs(blocks, options) {\n\treturn blocks.map((block) => docBlockToPresentationSpec(block, options));\n}\nfunction mapDocRoutes(routes) {\n\treturn routes.map(({ route, descriptor }) => [route, descriptor]);\n}\n\n//#endregion\nexport { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresentationRoutes, docBlocksToPresentationSpecs, mapDocRoutes };\n//# sourceMappingURL=presentations.js.map"],"mappings":";AACA,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;AACD,SAAS,eAAe,OAAO;AAC9B,KAAI,CAAC,MAAM,OAAQ,QAAO;CAC1B,MAAM,cAAc,MAAM,WAAW,IAAI,GAAG,QAAQ,IAAI;AACxD,QAAO,gBAAgB,MAAM,MAAM,YAAY,QAAQ,QAAQ,GAAG;;AAEnE,SAAS,YAAY,OAAO,aAAa;AACxC,KAAI,MAAM,MAAO,QAAO,eAAe,MAAM,MAAM;CACnD,MAAM,SAAS,eAAe;CAC9B,MAAM,OAAO,MAAM,GAAG,QAAQ,YAAY,GAAG,CAAC,QAAQ,OAAO,IAAI,CAAC,QAAQ,QAAQ,IAAI;AACtF,QAAO,eAAe,KAAK,WAAW,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO;;AAEzE,SAAS,UAAU,OAAO,WAAW;AACpC,QAAO,YAAY,GAAG,UAAU,GAAG,MAAM,OAAO,MAAM;;AAEvD,SAAS,yBAAyB,OAAO,SAAS;CACjD,MAAM,UAAU,SAAS,kBAAkB;CAC3C,MAAM,UAAU,MAAM,WAAW,SAAS,kBAAkB;CAC5D,MAAM,YAAY,MAAM,aAAa,SAAS,oBAAoB;AAClE,QAAO;EACN,MAAM;GACL,MAAM,UAAU,OAAO,SAAS,UAAU;GAC1C;GACA,aAAa,MAAM,WAAW,MAAM;GACpC,MAAM,MAAM;GACZ,QAAQ,MAAM;GACd,QAAQ,MAAM;GACd;GACA;EACD,QAAQ,MAAM,cAAc,MAAM,eAAe,WAAW,EAAE,OAAO,CAAC,MAAM,WAAW,EAAE,GAAG,KAAK;EACjG,QAAQ;GACP,MAAM;GACN,SAAS,MAAM;GACf;EACD;EACA;;AAEF,SAAS,2BAA2B,OAAO,SAAS;CACnD,MAAM,UAAU,MAAM,WAAW,SAAS,kBAAkB;CAC5D,MAAM,YAAY,MAAM,aAAa,SAAS,oBAAoB;AAClE,QAAO;EACN,MAAM;GACL,MAAM,UAAU,OAAO,SAAS,UAAU;GAC1C;GACA;GACA,MAAM,MAAM;GACZ,QAAQ,MAAM;GACd,aAAa,MAAM,WAAW,MAAM;GACpC;EACD,SAAS;GACR,MAAM;GACN,SAAS,MAAM;GACf;EACD;;AAEF,SAAS,8BAA8B,QAAQ,SAAS;AACvD,QAAO,OAAO,KAAK,WAAW;EAC7B;EACA,OAAO,YAAY,OAAO,SAAS,YAAY;EAC/C,YAAY,yBAAyB,OAAO,QAAQ;EACpD,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","names":[],"sources":["../../../../../../../libs/contracts/dist/docs/registry.js"],"sourcesContent":["import { docBlockToPresentationSpec, docBlocksToPresentationRoutes } from \"./presentations.js\";\n\n//#region src/docs/registry.ts\nvar DocRegistry = class {\n\troutes = /* @__PURE__ */ new Map();\n\tconstructor(blocks = [], options) {\n\t\tblocks.forEach((block) => this.register(block, options));\n\t}\n\tregister(block, options) {\n\t\tconst [route] = docBlocksToPresentationRoutes([block], options);\n\t\tif (route) this.routes.set(block.id, route);\n\t\treturn this;\n\t}\n\tlist() {\n\t\treturn [...this.routes.values()];\n\t}\n\tget(id) {\n\t\treturn this.routes.get(id);\n\t}\n\ttoRouteTuples() {\n\t\treturn this.list().map(({ route, descriptor }) => [route, descriptor]);\n\t}\n\ttoPresentationSpecs(options) {\n\t\treturn this.list().map(({ block }) => docBlockToPresentationSpec(block, options));\n\t}\n};\nconst requiredFields = [\n\t\"id\",\n\t\"title\",\n\t\"body\",\n\t\"kind\",\n\t\"visibility\",\n\t\"route\"\n];\nconst defaultDocRegistry = new DocRegistry();\nfunction registerDocBlocks(blocks) {\n\tfor (const block of blocks) {\n\t\tfor (const field of requiredFields) if (!block[field]) throw new Error(`DocBlock ${block.id ?? \"<missing id>\"} missing field ${String(field)}`);\n\t\tdefaultDocRegistry.register(block);\n\t}\n}\nfunction listRegisteredDocBlocks() {\n\treturn defaultDocRegistry.list().map((r) => r.block);\n}\nfunction docId(id) {\n\tif (!defaultDocRegistry.get(id)) throw new Error(`DocBlock not registered: ${id}`);\n\treturn id;\n}\n\n//#endregion\nexport { DocRegistry, defaultDocRegistry, docId, listRegisteredDocBlocks, registerDocBlocks };\n//# sourceMappingURL=registry.js.map"],"mappings":";;;AAGA,IAAI,cAAc,MAAM;CACvB,yBAAyB,IAAI,KAAK;CAClC,YAAY,SAAS,EAAE,EAAE,SAAS;AACjC,SAAO,SAAS,UAAU,KAAK,SAAS,OAAO,QAAQ,CAAC;;CAEzD,SAAS,OAAO,SAAS;EACxB,MAAM,CAAC,SAAS,8BAA8B,CAAC,MAAM,EAAE,QAAQ;AAC/D,MAAI,MAAO,MAAK,OAAO,IAAI,MAAM,IAAI,MAAM;AAC3C,SAAO;;CAER,OAAO;AACN,SAAO,CAAC,GAAG,KAAK,OAAO,QAAQ,CAAC;;CAEjC,IAAI,IAAI;AACP,SAAO,KAAK,OAAO,IAAI,GAAG;;CAE3B,gBAAgB;AACf,SAAO,KAAK,MAAM,CAAC,KAAK,EAAE,OAAO,iBAAiB,CAAC,OAAO,WAAW,CAAC;;CAEvE,oBAAoB,SAAS;AAC5B,SAAO,KAAK,MAAM,CAAC,KAAK,EAAE,YAAY,2BAA2B,OAAO,QAAQ,CAAC;;;AAGnF,MAAM,iBAAiB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,qBAAqB,IAAI,aAAa;AAC5C,SAAS,kBAAkB,QAAQ;AAClC,MAAK,MAAM,SAAS,QAAQ;AAC3B,OAAK,MAAM,SAAS,eAAgB,KAAI,CAAC,MAAM,OAAQ,OAAM,IAAI,MAAM,YAAY,MAAM,MAAM,eAAe,iBAAiB,OAAO,MAAM,GAAG;AAC/I,qBAAmB,SAAS,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"better-auth-nextjs.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/auth/better-auth-nextjs.docblock.ts\nconst tech_auth_better_auth_nextjs_DocBlocks = [{\n\tid: \"docs.tech.auth.better-auth-nextjs\",\n\ttitle: \"Better Auth + Next.js integration (ContractSpec)\",\n\tsummary: \"How ContractSpec wires Better Auth into Next.js (server config, client singleton, and proxy cookie-only redirects).\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/auth/better-auth-nextjs\",\n\ttags: [\n\t\t\"auth\",\n\t\t\"better-auth\",\n\t\t\"nextjs\",\n\t\t\"cookies\",\n\t\t\"proxy\",\n\t\t\"hmr\"\n\t],\n\tbody: `# Better Auth + Next.js integration (ContractSpec)\n\nThis repo uses Better Auth as the primary auth layer (sessions, organizations, teams, API keys, and OAuth).\n\n## Server config (Better Auth)\n\n- Source: \\`packages/bundles/contractspec-studio/src/application/services/auth.ts\\`\n- Important: \\`nextCookies()\\` must be the **last** plugin in the Better Auth plugin list so \\`Set-Cookie\\` is applied correctly in Next.js environments.\n\n## Better Auth Admin plugin\n\nContractSpec Studio enables the Better Auth **Admin plugin** to support platform-admin user operations (list users, impersonation, etc.).\n\n- Server: \\`admin()\\` plugin in \\`packages/bundles/contractspec-studio/src/application/services/auth.ts\\`\n- Client: \\`adminClient()\\` in \\`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.ts\\`\n\n### PLATFORM_ADMIN ⇒ Better Auth admin role\n\nBetter Auth Admin endpoints authorize via \\`user.role\\`. ContractSpec enforces an org-driven rule:\n\n- If the **active organization** has \\`type = PLATFORM_ADMIN\\`, the signed-in user is ensured to have \\`User.role\\` containing \\`admin\\`.\n- This is applied in the session creation hook and re-checked in \\`assertsPlatformAdmin()\\`.\n\nThis keeps admin enablement deterministic and avoids manual role backfills.\n\n## Client config (React web + Expo)\n\nTo avoid duplicate background refresh/polling loops in dev (Fast Refresh/HMR), the Better Auth client is implemented as a singleton cached on \\`globalThis\\`.\n\n- Web client: \\`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.ts\\`\n- Native client: \\`packages/bundles/contractspec-studio/src/presentation/providers/auth/client.native.ts\\`\n\nImport guidance:\n\n- If you only need the context/hook, prefer importing from \\`@lssm/bundle.contractspec-studio/presentation/providers/auth\\`.\n- If you explicitly need the Better Auth client instance (e.g. admin impersonation, direct API calls), import from \\`@lssm/bundle.contractspec-studio/presentation/providers/auth/client\\`.\n\n## Public routes (login / signup)\n\nPublic auth pages should avoid eager \\`authClient\\` initialization.\n\nPattern used:\n\n- In the submit handler, dynamically import \\`@lssm/bundle.contractspec-studio/presentation/providers/auth/index.web\\` and call \\`authClient.signIn.*\\` / \\`authClient.signUp.*\\`.\n\nThis prevents session refresh behavior from starting just because a public page rendered.\n\n## Next.js proxy auth (web-landing)\n\nThe Next.js proxy/middleware is used for **redirect decisions only**. It must not perform DB-backed session reads on every request.\n\n- Source: \\`packages/apps/web-landing/src/proxy.ts\\`\n- Approach: cookie-only checks via Better Auth cookies helpers:\n - \\`getSessionCookie(request)\\`\n - \\`getCookieCache(request)\\`\n\nThese checks are intentionally optimistic and should only gate routing. Full authorization must still be enforced on server-side actions/routes and GraphQL resolvers.\n`\n}];\nregisterDocBlocks(tech_auth_better_auth_nextjs_DocBlocks);\n\n//#endregion\nexport { tech_auth_better_auth_nextjs_DocBlocks };\n//# sourceMappingURL=better-auth-nextjs.docblock.js.map"],"mappings":";;;AAGA,MAAM,yCAAyC,CAAC;CAC/C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DN,CAAC;AACF,kBAAkB,uCAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-export.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/contracts/openapi-export.docblock.ts\nconst tech_contracts_openapi_export_DocBlocks = [{\n\tid: \"docs.tech.contracts.openapi-export\",\n\ttitle: \"OpenAPI export (OpenAPI 3.1) from SpecRegistry\",\n\tsummary: \"Generate a deterministic OpenAPI document from a SpecRegistry using jsonSchemaForSpec + REST transport metadata.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/contracts/openapi-export\",\n\ttags: [\n\t\t\"contracts\",\n\t\t\"openapi\",\n\t\t\"rest\"\n\t],\n\tbody: `## OpenAPI export (OpenAPI 3.1) from SpecRegistry\n\n### Purpose\n\nContractSpec specs can be exported into an **OpenAPI 3.1** document for tooling (SDK generation, docs, gateways).\n\nThe export is **spec-first**:\n\n- Uses \\`jsonSchemaForSpec(spec)\\` for input/output JSON Schema (from SchemaModel → zod → JSON Schema)\n- Uses \\`spec.transport.rest.method/path\\` when present\n- Falls back to deterministic defaults:\n - Method: \\`POST\\` for commands, \\`GET\\` for queries\n - Path: \\`defaultRestPath(name, version)\\` → \\`/<dot/name>/v<version>\\`\n\n### Library API\n\n- Function: \\`openApiForRegistry(registry, options?)\\`\n- Location: \\`@lssm/lib.contracts/openapi\\`\n\n### CLI\n\nExport OpenAPI from a registry module:\n\n\\`\\`\\`bash\ncontractspec openapi --registry ./src/registry.ts --out ./openapi.json\n\\`\\`\\`\n\nThe registry module must export one of:\n\n- \\`registry: SpecRegistry\\`\n- \\`default(): SpecRegistry | Promise<SpecRegistry>\\`\n- \\`createRegistry(): SpecRegistry | Promise<SpecRegistry>\\`\n\n### Notes / limitations (current)\n\n- Responses are generated as a basic \\`200\\` response (plus schemas when available).\n- Query (GET) inputs are currently represented as a JSON request body when an input schema exists.\n- Errors are not yet expanded into OpenAPI responses; that will be added when we standardize error envelopes.`\n}];\nregisterDocBlocks(tech_contracts_openapi_export_DocBlocks);\n\n//#endregion\nexport { tech_contracts_openapi_export_DocBlocks };\n//# sourceMappingURL=openapi-export.docblock.js.map"],"mappings":";;;AAGA,MAAM,0CAA0C,CAAC;CAChD,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCN,CAAC;AACF,kBAAkB,wCAAwC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-stage-system.docblock.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../registry.js\";\n\n//#region src/docs/tech/lifecycle-stage-system.docblock.ts\nconst tech_lifecycle_stage_system_DocBlocks = [{\n\tid: \"docs.tech.lifecycle-stage-system\",\n\ttitle: \"ContractSpec Lifecycle Stage System – Technical Design\",\n\tsummary: \"This document describes how ContractSpec implements lifecycle detection and guidance. It covers architecture, module boundaries, scoring heuristics, and integration points so libraries, modules, bundles, and Studio surfaces stay synchronized.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/lifecycle-stage-system\",\n\ttags: [\"tech\", \"lifecycle-stage-system\"],\n\tbody: \"## ContractSpec Lifecycle Stage System – Technical Design\\n\\nThis document describes how ContractSpec implements lifecycle detection and guidance. It covers architecture, module boundaries, scoring heuristics, and integration points so libraries, modules, bundles, and Studio surfaces stay synchronized.\\n\\n---\\n\\n### 1. Architecture Overview\\n\\n```\\n┌──────────────────────┐\\n│ @lssm/lib.lifecycle │ Types, enums, helpers (pure data)\\n└───────────┬──────────┘\\n │\\n┌───────────▼──────────┐ ┌───────────────────────────┐\\n│ modules/lifecycle- │ │ modules/lifecycle-advisor │\\n│ core (detection) │ │ (guidance & ceremonies) │\\n└───────────┬──────────┘ └───────────┬───────────────┘\\n │ │\\n ├────────────┬──────────────┤\\n ▼ ▼ ▼\\n Adapters: analytics, intent, questionnaires\\n │\\n┌───────────▼──────────┐\\n│ bundles/lifecycle- │ Managed service for Studio\\n│ managed │ (REST handlers, AI agent) │\\n└───────────┬──────────┘\\n │\\n ContractSpec Studio surfaces\\n (web/mobile APIs, CLI, docs)\\n```\\n\\n- **Libraries** provide shared vocabulary.\\n- **Modules** encapsulate logic, accepting adapters to avoid environment-specific code.\\n- **Bundles** compose modules, register agents/events, and expose APIs for Studio.\\n- **Apps** (web-landing, future Studio views) consume bundle APIs; they do not reimplement logic. For web-landing we now resolve `@lssm/bundle.contractspec-studio` and `@lssm/lib.database-contractspec-studio` directly from their `packages/.../src` folders via `tsconfig` path aliases so Prisma stays on the server build and Turbopack no longer pulls the prebundled `dist` artifacts into client chunks.\\n\\n---\\n\\n### 2. Core Library (`@lssm/lib.lifecycle`)\\n\\n- Stage enum (0–6) with metadata (`question`, `signals`, `traps`).\\n- Axes types (`ProductPhase`, `CompanyPhase`, `CapitalPhase`).\\n- `LifecycleSignal` (source, metric, value, timestamp).\\n- `LifecycleMetricSnapshot` (aggregated numbers).\\n- `LifecycleMilestone`, `LifecycleAction`, `LifecycleAssessment` interfaces.\\n- Utility helpers:\\n - `formatStageSummary(stage, assessment)`\\n - `rankStageCandidates(scores)`\\n\\nThe library exports **no runtime dependencies** so it can be imported from apps, modules, and bundles alike.\\n\\n---\\n\\n### 3. Lifecycle Core Module\\n\\n**Location:** `packages/modules/lifecycle-core/`\\n\\n#### Components\\n1. **StageSignalCollector**\\n - Accepts adapter interfaces:\\n - `AnalyticsAdapter` (pulls metrics from `@lssm/lib.analytics` or fixture streams).\\n - `IntentAdapter` (hooks into `@lssm/lib.observability` intent detectors or logs).\\n - `QuestionnaireAdapter` (loads JSON questionnaires and responses).\\n - Produces normalized `LifecycleSignal[]`.\\n\\n2. **StageScorer**\\n - Weighted scoring model:\\n - Base weight per stage (reflecting expected maturity).\\n - Feature weights (retention, revenue, team size, qualitative feedback).\\n - Confidence computed via variance of contributing signals.\\n - Supports pluggable scoring matrices via JSON config.\\n - Accepts sparse metric snapshots; the orchestrator sanitizes metrics to numeric-only records before persisting assessments so downstream analytics stay consistent.\\n\\n3. **LifecycleOrchestrator**\\n - Coordinates collectors + scorer.\\n - Returns `LifecycleAssessment` with:\\n - `stage`, `confidence`, `axisSnapshot`, `signalsUsed`.\\n - Recommended focus areas (high-level categories only).\\n - Emits events (internally) when stage confidence crosses thresholds (consumed later by bundle).\\n\\n4. **LifecycleMilestonePlanner**\\n - Loads `milestones-catalog.json` (no DB).\\n - Filters upcoming milestones per stage + axis.\\n - Tracks completion using provided IDs (caller persists).\\n\\n#### Data Files\\n- `configs/stage-weights.json`\\n- `configs/milestones-catalog.json`\\n- `questionnaires/stage-readiness.json`\\n\\n#### Extension Hooks\\n- All adapters exported as TypeScript interfaces.\\n- Implementations for analytics/intent can live in bundles or apps without modifying module code.\\n\\n---\\n\\n### 4. Lifecycle Advisor Module\\n\\n**Location:** `packages/modules/lifecycle-advisor/`\\n\\n#### Components\\n1. **LifecycleRecommendationEngine**\\n - Consumes `LifecycleAssessment`.\\n - Maps gaps to `LifecycleAction[]` using rule tables (`stage-playbooks.ts`).\\n - Supports override hooks for customer-specific rules.\\n\\n2. **ContractSpecLibraryRecommender**\\n - Maintains mapping from stage → recommended libraries/modules/bundles.\\n - Returns prioritized list with rationale and adoption prerequisites.\\n\\n3. **LifecycleCeremonyDesigner**\\n - Provides textual/structural data for ceremonies (title, copy, animation cues, soundtrack references).\\n - Ensures low-tech friendly instructions (clear copy, undo guidance).\\n\\n4. **AI Hooks**\\n - Defines prompt templates and tool manifests for lifecycle advisor agents (consumed by bundles).\\n - Keeps actual LLM integration outside module.\\n\\n---\\n\\n### 5. Managed Bundle (`lifecycle-managed`)\\n\\n**Responsibilities**\\n- Wire modules together.\\n- Provide HTTP/GraphQL handlers (exact transport optional).\\n- Register LifecycleAdvisorAgent via `@lssm/lib.ai-agent`.\\n- LifecycleAdvisorAgent meta: domain `operations`, owners `team-lifecycle`, stability `experimental`, tags `guide/lifecycle/ops` so ops tooling can route incidents quickly.\\n- Emit lifecycle events through `@lssm/lib.bus` + `@lssm/lib.analytics`.\\n- Integrate with `contractspec-studio` packages:\\n - Use Studio contracts for authentication/tenant context (without accessing tenant DBs).\\n - Store assessments in Studio-managed storage abstractions (in-memory or file-based for now).\\n\\n**APIs**\\n- `POST /lifecycle/assessments`: Accepts metrics + optional questionnaire answers. Returns `LifecycleAssessment`.\\n- `GET /lifecycle/playbooks/:stage`: Returns stage playbook + ceremonies.\\n- `POST /lifecycle/advise`: Invokes LifecycleAdvisorAgent with context.\\n\\n**Events**\\n- `LifecycleAssessmentCreated`\\n- `LifecycleStageChanged`\\n- `LifecycleGuidanceConsumed`\\n\\n---\\n\\n### 6. Library Enhancements\\n\\n| Library | Enhancement |\\n| --- | --- |\\n| `@lssm/lib.analytics` | Lifecycle metric collectors, helper to emit stage events, adapter implementation used by `StageSignalCollector`. |\\n| `@lssm/lib.evolution` | Accepts `LifecycleContext` when ranking spec anomalies/suggestions. |\\n| `@lssm/lib.growth` | Stage-specific experiment templates + guardrails referencing lifecycle enums. |\\n| `@lssm/lib.observability` | Lifecycle KPI pipeline definitions (drift detection, regression alerts). |\\n\\nEach enhancement must import stage types from `@lssm/lib.lifecycle`.\\n\\n---\\n\\n### 7. Feature Flags & Progressive Delivery\\n\\n- Add new flags in progressive-delivery library:\\n - `LIFECYCLE_DETECTION_ALPHA`\\n - `LIFECYCLE_ADVISOR_ALPHA`\\n - `LIFECYCLE_MANAGED_SERVICE`\\n- Bundles/modules should check flags before enabling workflows.\\n- Flags referenced in docs + Studio UI to avoid accidental exposure.\\n\\n---\\n\\n### 8. Analytics & Telemetry\\n\\n- Events defined in analytics library; consumed by bundle/app:\\n - `lifecycle_assessment_run`\\n - `lifecycle_stage_changed`\\n - `lifecycle_guidance_consumed`\\n- Observability pipeline includes:\\n - Composite lifecycle health metric (weighted sum of KPIs).\\n - Drift detection comparing stage predictions over time.\\n - Alert manager recipes for regression (e.g., PMF drop).\\n\\n---\\n\\n### 9. Testing Strategy\\n\\n1. **Unit**\\n - StageScorer weight matrix.\\n - RecommendationEngine mapping.\\n - Library recommender stage coverage.\\n\\n2. **Contract**\\n - Adapters: ensure mock adapters satisfy interfaces.\\n - Bundles: ensure HTTP handlers respect request/response contracts even without persistence.\\n\\n3. **Integration**\\n - CLI example runs detection + guidance end-to-end on fixture data.\\n - Dashboard example renders assessments, verifying JSON structures remain stable.\\n\\n---\\n\\n### 10. Implementation Checklist\\n\\n- [ ] Documentation (product, tech, ops, user).\\n- [ ] Library creation (`@lssm/lib.lifecycle`).\\n- [ ] Modules (`lifecycle-core`, `lifecycle-advisor`).\\n- [ ] Bundle (`lifecycle-managed`) + Studio wiring.\\n- [ ] Library enhancements (analytics/evolution/growth/observability).\\n- [ ] Examples (CLI + dashboard).\\n- [ ] Feature flags + telemetry.\\n- [ ] Automated tests + fixtures.\\n\\nKeep this document in sync as modules evolve. When adding new stages or axes, update `@lssm/lib.lifecycle` first, then cascade to adapters, then refresh docs + Studio copy.*** End Patch*** End Patch\\n\\n\\n\"\n}];\nregisterDocBlocks(tech_lifecycle_stage_system_DocBlocks);\n\n//#endregion\nexport { tech_lifecycle_stage_system_DocBlocks };\n//# sourceMappingURL=lifecycle-stage-system.docblock.js.map"],"mappings":";;;AAGA,MAAM,wCAAwC,CAAC;CAC9C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,QAAQ,yBAAyB;CACxC,MAAM;CACN,CAAC;AACF,kBAAkB,sCAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-integration.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/llm/llm-integration.docblock.ts\nconst tech_llm_integration_DocBlocks = [\n\t{\n\t\tid: \"docs.tech.llm.overview\",\n\t\ttitle: \"LLM Integration Overview\",\n\t\tsummary: \"Export specs to LLM-friendly formats, generate implementation guides, and verify implementations.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/overview\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"ai\",\n\t\t\t\"export\",\n\t\t\t\"guide\",\n\t\t\t\"verify\"\n\t\t],\n\t\tbody: `# LLM Integration\n\nContractSpec provides first-class LLM integration to bridge specifications and AI coding agents.\n\n## Core Features\n\n### 1. Multi-Format Export\n\nExport specs to markdown in formats optimized for LLM consumption:\n\n- **Context format**: Summary for understanding (goal, context, acceptance criteria)\n- **Full format**: Complete spec with all details (I/O schemas, policy, events)\n- **Prompt format**: Actionable prompt with implementation instructions\n\n### 2. Implementation Guidance\n\nGenerate agent-specific implementation plans:\n\n- **Claude Code**: Extended thinking mode with structured prompts\n- **Cursor CLI**: Background/composer mode with .mdc rules generation\n- **Generic MCP**: Standard format for any MCP-compatible agent\n\n### 3. Tiered Verification\n\nVerify implementations against specs:\n\n- **Tier 1 (Structure)**: Types, exports, imports validation\n- **Tier 2 (Behavior)**: Scenario coverage, error handling, events\n- **Tier 3 (AI Review)**: Semantic compliance analysis via LLM\n\n## Access Points\n\n| Surface | Commands/Tools |\n|---------|---------------|\n| CLI | \\`contractspec llm export\\`, \\`guide\\`, \\`verify\\`, \\`copy\\` |\n| MCP | \\`llm.export\\`, \\`llm.guide\\`, \\`llm.verify\\` tools |\n| VSCode | Export to LLM, Generate Guide, Verify, Copy commands |\n\n## Quick Start\n\n### CLI Usage\n\n\\`\\`\\`bash\n# Export spec as markdown\ncontractspec llm export path/to/my.spec.ts --format full\n\n# Generate implementation guide\ncontractspec llm guide path/to/my.spec.ts --agent claude-code\n\n# Verify implementation\ncontractspec llm verify path/to/my.spec.ts path/to/impl.ts --tier 2\n\n# Copy spec to clipboard\ncontractspec llm copy path/to/my.spec.ts --format context\n\\`\\`\\`\n\n### MCP Usage\n\n\\`\\`\\`\n# Export spec\nllm.export { specPath: \"path/to/my.spec.ts\", format: \"full\" }\n\n# Generate guide\nllm.guide { specPath: \"path/to/my.spec.ts\", agent: \"cursor-cli\" }\n\n# Verify implementation\nllm.verify { specPath: \"path/to/my.spec.ts\", implementationPath: \"path/to/impl.ts\", tier: \"2\" }\n\\`\\`\\`\n\n### Programmatic Usage\n\n\\`\\`\\`typescript\nimport { specToFullMarkdown, specToAgentPrompt } from '@lssm/lib.contracts/llm';\nimport { createAgentGuideService, createVerifyService } from '@lssm/bundle.contractspec-workspace';\n\n// Export\nconst markdown = specToFullMarkdown(mySpec);\n\n// Generate guide\nconst guideService = createAgentGuideService({ defaultAgent: 'claude-code' });\nconst guide = guideService.generateGuide(mySpec);\n\n// Verify\nconst verifyService = createVerifyService();\nconst result = await verifyService.verify(mySpec, implementationCode, {\n tiers: ['structure', 'behavior']\n});\n\\`\\`\\`\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.export-formats\",\n\t\ttitle: \"LLM Export Formats\",\n\t\tsummary: \"Detailed explanation of the three export formats for LLM consumption.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/export-formats\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"export\",\n\t\t\t\"markdown\"\n\t\t],\n\t\tbody: `# LLM Export Formats\n\nContractSpec provides three export formats optimized for different LLM use cases.\n\n## Context Format\n\nBest for: Understanding what a spec does, providing background to LLMs.\n\nIncludes:\n- Spec name, version, type\n- Goal and context\n- Description\n- Acceptance scenarios\n\nExample:\n\n\\`\\`\\`markdown\n# users.createUser (v1)\n\n> Create a new user account with email verification.\n\n**Type:** command | **Stability:** stable\n\n## Goal\nCreate a new user in the system and trigger email verification.\n\n## Context\nPart of the user onboarding flow. Called after signup form submission.\n\n## Acceptance Criteria\n### Happy path\n**Given:** Valid email and password\n**When:** User submits registration\n**Then:** Account is created, verification email is sent\n\\`\\`\\`\n\n## Full Format\n\nBest for: Complete documentation, implementation reference.\n\nIncludes everything:\n- All metadata\n- JSON schemas for I/O\n- Error definitions\n- Policy (auth, rate limits, PII)\n- Events emitted\n- Examples\n- Transport configuration\n\n## Prompt Format\n\nBest for: Feeding directly to coding agents.\n\nIncludes:\n- Task header with clear instructions\n- Full spec context\n- Implementation requirements\n- Task-specific guidance (implement/test/refactor/review)\n- Expected output format\n\nThe prompt format adapts based on task type:\n- **implement**: Full implementation with tests\n- **test**: Test generation for existing code\n- **refactor**: Refactoring while maintaining behavior\n- **review**: Code review against spec\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.agent-adapters\",\n\t\ttitle: \"Agent Adapters\",\n\t\tsummary: \"Adapters for different AI coding agents (Claude, Cursor, MCP).\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/agent-adapters\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"agents\",\n\t\t\t\"claude\",\n\t\t\t\"cursor\",\n\t\t\t\"mcp\"\n\t\t],\n\t\tbody: `# Agent Adapters\n\nContractSpec provides specialized adapters for different AI coding agents.\n\n## Claude Code Adapter\n\nOptimized for Anthropic Claude's extended thinking and code generation.\n\nFeatures:\n- Structured markdown with clear sections\n- Checklists for steps and verification\n- Icons for file operations (📝 create, ✏️ modify)\n- System prompt for ContractSpec context\n\nUsage:\n\\`\\`\\`typescript\nconst guideService = createAgentGuideService({ defaultAgent: 'claude-code' });\nconst result = guideService.generateGuide(spec, { agent: 'claude-code' });\n// result.prompt.systemPrompt - Claude system context\n// result.prompt.taskPrompt - Task-specific instructions\n\\`\\`\\`\n\n## Cursor CLI Adapter\n\nOptimized for Cursor's background/composer mode.\n\nFeatures:\n- Compact format for context efficiency\n- .mdc cursor rules generation\n- Integration with Cursor's file system\n- Concise step lists\n\nGenerate Cursor Rules:\n\\`\\`\\`typescript\nconst cursorRules = guideService.generateAgentConfig(spec, 'cursor-cli');\n// Save to .cursor/rules/my-spec.mdc\n\\`\\`\\`\n\n## Generic MCP Adapter\n\nWorks with any MCP-compatible agent (Cline, Aider, etc.).\n\nFeatures:\n- Standard markdown format\n- Table-based metadata\n- JSON resource format support\n- Prompt message format\n\nThe generic adapter is the default and works across all agents.\n\n## Choosing an Adapter\n\n| Agent | Best For | Key Features |\n|-------|----------|--------------|\n| Claude Code | Complex implementations | Extended thinking, detailed steps |\n| Cursor CLI | IDE-integrated work | Cursor rules, compact format |\n| Generic MCP | Any MCP agent | Universal compatibility |\n`\n\t},\n\t{\n\t\tid: \"docs.tech.llm.verification\",\n\t\ttitle: \"Implementation Verification\",\n\t\tsummary: \"Tiered verification of implementations against specifications.\",\n\t\tkind: \"reference\",\n\t\tvisibility: \"public\",\n\t\troute: \"/docs/tech/llm/verification\",\n\t\ttags: [\n\t\t\t\"llm\",\n\t\t\t\"verify\",\n\t\t\t\"validation\",\n\t\t\t\"testing\"\n\t\t],\n\t\tbody: `# Implementation Verification\n\nContractSpec provides tiered verification to check if implementations comply with specs.\n\n## Verification Tiers\n\n### Tier 1: Structure (Fast)\n\nChecks TypeScript structure against spec requirements:\n\n| Check | What it validates |\n|-------|------------------|\n| Handler export | Function is properly exported |\n| Contracts import | Imports from @lssm/lib.contracts |\n| Schema import | Imports from @lssm/lib.schema |\n| No \\`any\\` type | TypeScript strict compliance |\n| Error handling | Error codes are referenced |\n| Event emission | Event patterns exist |\n| Input validation | Validation patterns used |\n| Async patterns | Async/await for commands |\n\n### Tier 2: Behavior (Comprehensive)\n\nChecks implementation coverage of spec behaviors:\n\n| Check | What it validates |\n|-------|------------------|\n| Scenario coverage | Acceptance scenarios implemented |\n| Example coverage | Example I/O values referenced |\n| Error cases | All error conditions handled |\n| Event conditions | Events emitted correctly |\n| Idempotency | Idempotent patterns (if required) |\n\n### Tier 3: AI Review (Deep)\n\nUses LLM for semantic analysis:\n\n- Does the implementation fulfill the spec's intent?\n- Are edge cases properly handled?\n- Is the code quality acceptable?\n- Are there any subtle violations?\n\nRequires AI API key configuration.\n\n## Running Verification\n\n\\`\\`\\`typescript\nconst verifyService = createVerifyService({\n aiApiKey: process.env.ANTHROPIC_API_KEY, // Optional, for Tier 3\n aiProvider: 'anthropic',\n});\n\nconst result = await verifyService.verify(spec, implementationCode, {\n tiers: ['structure', 'behavior'],\n failFast: false,\n includeSuggestions: true,\n});\n\nconsole.log(result.passed); // true/false\nconsole.log(result.score); // 0-100\nconsole.log(result.summary); // Human-readable summary\n\\`\\`\\`\n\n## Verification Report\n\nThe report includes:\n\n- **passed**: Overall compliance\n- **score**: 0-100 score\n- **issues**: Array of problems found\n- **suggestions**: Recommended fixes\n- **coverage**: Metrics on scenario/error/field coverage\n\nEach issue has:\n- **severity**: error, warning, or info\n- **category**: type, export, import, scenario, error_handling, semantic\n- **message**: Description of the issue\n- **suggestion**: How to fix it\n`\n\t}\n];\nregisterDocBlocks(tech_llm_integration_DocBlocks);\n\n//#endregion\nexport { tech_llm_integration_DocBlocks };\n//# sourceMappingURL=llm-integration.docblock.js.map"],"mappings":";;;AAGA,MAAM,iCAAiC;CACtC;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DN;CACD;EACC,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GACL;GACA;GACA;GACA;GACA;EACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EN;CACD;AACD,kBAAkB,+BAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-endpoints.docblock.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../registry.js\";\n\n//#region src/docs/tech/mcp-endpoints.docblock.ts\nconst tech_mcp_endpoints_DocBlocks = [{\n\tid: \"docs.tech.mcp.endpoints\",\n\ttitle: \"ContractSpec MCP endpoints\",\n\tsummary: \"Dedicated MCP servers for docs, CLI usage, and internal development.\",\n\tkind: \"reference\",\n\tvisibility: \"mixed\",\n\troute: \"/docs/tech/mcp/endpoints\",\n\ttags: [\n\t\t\"mcp\",\n\t\t\"docs\",\n\t\t\"cli\",\n\t\t\"internal\"\n\t],\n\tbody: `# ContractSpec MCP endpoints\n\nThree dedicated MCP servers keep AI agents efficient and scoped:\n\n- **Docs MCP**: \\`/api/mcp/docs\\` — exposes DocBlocks as resources + presentations. Tool: \\`docs.search\\`.\n- **CLI MCP**: \\`/api/mcp/cli\\` — surfaces CLI quickstart/reference/README and suggests commands. Tool: \\`cli.suggestCommand\\`.\n- **Internal MCP**: \\`/api/mcp/internal\\` — internal routing hints, playbook, and example registry access. Tool: \\`internal.describe\\`.\n\n### Usage notes\n- Transports are HTTP POST (streamable HTTP); SSE is disabled.\n- Resources are namespaced (\\`docs://*\\`, \\`cli://*\\`, \\`internal://*\\`) and are read-only.\n- Internal MCP also exposes the examples registry via \\`examples://*\\` resources:\n - \\`examples://list?q=<query>\\`\n - \\`examples://example/<id>\\`\n- Prompts mirror each surface (navigator, usage, bootstrap) for quick agent onboarding.\n- GraphQL remains at \\`/graphql\\`; health at \\`/health\\`.\n`\n}];\nregisterDocBlocks(tech_mcp_endpoints_DocBlocks);\n\n//#endregion\nexport { tech_mcp_endpoints_DocBlocks };\n//# sourceMappingURL=mcp-endpoints.docblock.js.map"],"mappings":";;;AAGA,MAAM,+BAA+B,CAAC;CACrC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;CAiBN,CAAC;AACF,kBAAkB,6BAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation-runtime.docblock.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/docs/tech/presentation-runtime.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../registry.js\";\n\n//#region src/docs/tech/presentation-runtime.docblock.ts\nconst tech_presentation_runtime_DocBlocks = [{\n\tid: \"docs.tech.presentation-runtime\",\n\ttitle: \"Presentation Runtime\",\n\tsummary: \"Cross-platform runtime for list pages and presentation flows.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/presentation-runtime\",\n\ttags: [\"tech\", \"presentation-runtime\"],\n\tbody: \"## Presentation Runtime\\n\\nCross-platform runtime for list pages and presentation flows.\\n\\n### Packages\\n\\n- `@lssm/lib.presentation-runtime-core`: shared types and config helpers\\n- `@lssm/lib.presentation-runtime-react`: React hooks (web/native-compatible API)\\n- `@lssm/lib.presentation-runtime-react-native`: Native entrypoint (re-exports React API for now)\\n\\n### Next.js config helper\\n\\n```ts\\n// next.config.mjs\\nimport { withPresentationNextAliases } from '@lssm/lib.presentation-runtime-core/next';\\n\\nconst nextConfig = {\\n webpack: (config) => withPresentationNextAliases(config),\\n};\\n\\nexport default nextConfig;\\n```\\n\\n### Metro config helper\\n\\n```js\\n// metro.config.js (CJS)\\nconst { getDefaultConfig } = require('expo/metro-config');\\nconst {\\n withPresentationMetroAliases,\\n} = require('@lssm/lib.presentation-runtime-core/src/metro.cjs');\\n\\nconst projectRoot = __dirname;\\nconst config = getDefaultConfig(projectRoot);\\n\\nmodule.exports = withPresentationMetroAliases(config);\\n```\\n\\n### React hooks\\n\\n- `useListCoordinator`: URL + RHF + derived variables (no fetching)\\n- `usePresentationController`: Same plus `fetcher` integration\\n- `DataViewRenderer` (design-system): render `DataViewSpec` projections (`list`, `table`, `detail`, `grid`) using shared UI atoms\\n\\nBoth accept a `useUrlState` adapter. On web, use `useListUrlState` (design-system) or a Next adapter.\\n\\n### KYC molecules (bundle)\\n\\n- `ComplianceBadge` in `@lssm/bundle.strit/presentation/components/kyc` renders a status badge for KYC/compliance snapshots. It accepts a `state` (missing_core | incomplete | complete | expiring | unknown) and optional localized `labels`. Prefer consuming apps to pass translated labels (e.g., via `useT('appPlatformAdmin')`).\\n\\n### Markdown routes and llms.txt\\n\\n- Each web app exposes `/llms` (and `/llms.txt`, `/llms.md`) via rewrites. See [llmstxt.org](https://llmstxt.org/).\\n- Catch‑all markdown handler lives at `app/[...slug].md/route.ts`. It resolves a page descriptor from `app/.presentations.manifest.json` and renders via the `presentations.v2` engine (target: `markdown`).\\n- Per‑page companion convention: add `app/<route>/ai.ts` exporting a `PresentationDescriptorV2`.\\n- Build‑time tool: `tools/generate-presentations-manifest.mjs <app-root>` populates the manifest.\\n- CI check: `pnpm llms:check` verifies coverage (% of pages with descriptors) and fails if below threshold.\\n\"\n}];\nregisterDocBlocks(tech_presentation_runtime_DocBlocks);\n\n//#endregion\nexport { tech_presentation_runtime_DocBlocks };\n//# sourceMappingURL=presentation-runtime.docblock.js.map"],"mappings":";;;AAGA,MAAM,sCAAsC,CAAC;CAC5C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,QAAQ,uBAAuB;CACtC,MAAM;CACN,CAAC;AACF,kBAAkB,oCAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"README.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/schema/README.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/schema/README.docblock.ts\nconst tech_schema_README_DocBlocks = [{\n\tid: \"docs.tech.schema.README\",\n\ttitle: \"Multi‑File Prisma Schema Conventions (per database)\",\n\tsummary: \"We adopt Prisma multi‑file schema (GA ≥ v6.7) to organize each database’s models by domain and to import core LSSM module schemas locally.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/schema/README\",\n\ttags: [\n\t\t\"tech\",\n\t\t\"schema\",\n\t\t\"README\"\n\t],\n\tbody: \"# Multi‑File Prisma Schema Conventions (per database)\\n\\nWe adopt Prisma multi‑file schema (GA ≥ v6.7) to organize each database’s models by domain and to import core LSSM module schemas locally.\\n\\nCanonical layout per DB:\\n\\n```\\nprisma/\\n schema/\\n main.prisma # datasource + generators only\\n imported/\\n lssm_sigil/*.prisma # imported models/enums only (no datasource/generator)\\n lssm_content/*.prisma # idem\\n <domain>/*.prisma # vertical‑specific models split by bounded context\\n```\\n\\nNotes:\\n\\n- Imported files contain only `model` and `enum` blocks (strip `datasource`/`generator`).\\n- Preserve `@@schema(\\\"…\\\")` annotations to keep tables in their Postgres schemas; we now explicitly list schemas in `main.prisma` to avoid P1012: `schemas = [\\\"public\\\",\\\"lssm_sigil\\\",\\\"lssm_content\\\",\\\"lssm_featureflags\\\",\\\"lssm_ops\\\",\\\"lssm_planning\\\",\\\"lssm_quill\\\",\\\"lssm_geoterro\\\"]`.\\n- Use `@lssm/app.cli-database` CLI: `database import|check|generate|migrate:*|seed` to manage a single DB; `@lssm/app.cli-databases` orchestrates multiple DBs.\\n\\n## Typed merger config\\n\\n- Define imported module list once per DB with a typed config:\\n\\n```ts\\n// prisma-merger.config.ts\\nimport { defineMergedPrismaConfig } from '@lssm/app.cli-database';\\n\\nexport default defineMergedPrismaConfig({\\n modules: [\\n '@lssm/app.cli-database-sigil',\\n '@lssm/app.cli-database-content',\\n // ...\\n ],\\n});\\n```\\n\\n- Then run `database import --target .` (no need to pass `--modules`).\\n\\n## Prisma Config (prisma.config.ts)\\n\\nWe use Prisma Config per official docs to point Prisma to the multi-file schema folder and migrations:\\n\\n```ts\\n// prisma.config.ts\\nimport path from 'node:path';\\nimport { defineConfig } from 'prisma/config';\\n\\nexport default defineConfig({\\n schema: path.join('prisma', 'schema'),\\n migrations: { path: path.join('prisma', 'migrations') },\\n});\\n```\\n\\nReference: Prisma blog – Organize Your Prisma Schema into Multiple Files: https://www.prisma.io/blog/organize-your-prisma-schema-with-multi-file-support\\n\\n---\\n\\n# LSSM Auth (Sigil) – Models & Integration\\n\\nThis document tracks the identity models and integration points used by the LSSM Sigil module.\\n\\n## Models (Prisma `lssm_sigil`)\\n\\n- `User` – core identity with email, optional phone, role, passkeys, apiKeys\\n- `Session` – session tokens and metadata; includes `activeOrganizationId`\\n- `Account` – external providers (password, OAuth)\\n- `Organization` – tenant boundary; includes `type` additional field\\n- `Member`, `Invitation`, `Team`, `TeamMember` – org/teams\\n- `Role`, `Permission`, `PolicyBinding` – RBAC\\n- `ApiKey`, `Passkey` – programmable access and WebAuthn\\n- `SsoProvider` – OIDC/SAML provider configuration (org- or user-scoped)\\n- `OAuthApplication`, `OAuthAccessToken`, `OAuthConsent` – first/third-party OAuth\\n\\nThese mirror STRIT additions so Better Auth advanced plugins (admin, organization, apiKey, passkey, genericOAuth) work uniformly across apps.\\n\\n## Better Auth (server)\\n\\nEnabled methods:\\n\\n- Email & password\\n- Phone OTP (Telnyx)\\n- Passkey (WebAuthn)\\n- API keys\\n- Organizations & Teams\\n- Generic OAuth (FranceConnect+ via OIDC with JWE/JWS using JOSE)\\n\\nServer config lives at `packages/lssm/modules/sigil/src/application/services/auth.ts`.\\n\\n## Clients (Expo / React)\\n\\nClient config lives at `packages/lssm/modules/sigil/src/presentation/providers/auth/expo.ts` with plugins for admin, passkey, apiKey, organization, phone, genericOAuth.\\n\\n## Environment Variables\\n\\nTelnyx (phone OTP):\\n\\n- `TELNYX_API_KEY`\\n- `TELNYX_MESSAGING_PROFILE_ID`\\n- `TELNYX_FROM_NUMBER`\\n\\nFranceConnect+ (prefer LSSM*… but STRIT*… fallbacks are supported):\\n\\n- `LSSM_FRANCECONNECTPLUS_DISCOVERY_URL`\\n- `LSSM_FRANCECONNECTPLUS_CLIENT_ID`\\n- `LSSM_FRANCECONNECTPLUS_CLIENT_SECRET`\\n- `LSSM_FRANCECONNECTPLUS_ENC_PRIVATE_KEY_PEM` (PKCS8; RSA-OAEP-256)\\n\\nGeneric:\\n\\n- `API_URL_IDENTITIES` – base URL for Better Auth server\\n- `BETTER_AUTH_SECRET` – server secret\\n\\nKeep this in sync with code changes to avoid drift.\\n\\n## HCircle domain splits and auth removal\\n\\n- Auth/identity models are not defined locally anymore. They come from `@lssm/app.cli-database-sigil` under the `lssm_sigil` schema.\\n- `packages/hcircle/libs/database-coliving/prisma/schema/domain/` is split by domain; newsletter/waiting list lives in `newsletter.prisma` and uses `@@map(\\\"waiting_list\\\")`.\\n- To avoid collisions with module names, the local event models were renamed to `SocialEvent`, `SocialEventAttendee`, and `SocialEventRecurrence` with `@@map` pointing to existing table names.\\n\\n---\\n\\n## Vertical profiles (current)\\n\\n### STRIT\\n\\n- prisma-merger modules:\\n - `@lssm/app.cli-database-sigil`, `@lssm/app.cli-database-content`, `@lssm/app.cli-database-ops`, `@lssm/app.cli-database-planning`, `@lssm/app.cli-database-quill`, `@lssm/app.cli-database-geoterro`\\n- main.prisma schemas:\\n - `schemas = [\\\"public\\\",\\\"lssm_sigil\\\",\\\"lssm_content\\\",\\\"lssm_ops\\\",\\\"lssm_planning\\\",\\\"lssm_quill\\\",\\\"lssm_geoterro\\\"]`\\n- domain splits (`packages/strit/libs/database/prisma/schema/domain/`):\\n - `bookings.prisma` (Booking, StritDocument + links to Content `File` and Sigil `Organization`)\\n - `commerce.prisma` (Wholesale models; `sellerId` linked to Sigil `Organization`)\\n - `files.prisma` (PublicFile, PublicFileAccessLog; `ownerId`→Organization, `uploadedBy`→User)\\n - `geo.prisma` (PublicCountry, PublicAddress, City; links to Spots/Series)\\n - `spots.prisma`, `urbanism.prisma`, `analytics.prisma`, `onboarding.prisma`, `referrals.prisma`, `subscriptions.prisma`, `content.prisma`\\n- auth models are imported from Sigil (no local auth tables).\\n- Back-relations for `Organization` (e.g., `files`, seller relations) are declared in the Sigil module to avoid scattering.\\n\\n### ARTISANOS\\n\\n- prisma-merger modules:\\n - `@lssm/app.cli-database-sigil`, `@lssm/app.cli-database-content`, `@lssm/app.cli-database-featureflags`, `@lssm/app.cli-database-ops`, `@lssm/app.cli-database-planning`, `@lssm/app.cli-database-quill`, `@lssm/app.cli-database-geoterro`\\n- main.prisma schemas:\\n - `schemas = [\\\"public\\\",\\\"lssm_sigil\\\",\\\"lssm_content\\\",\\\"lssm_featureflags\\\",\\\"lssm_ops\\\",\\\"lssm_planning\\\",\\\"lssm_quill\\\",\\\"lssm_geoterro\\\"]`\\n- domain splits (`packages/artisanos/libs/database-artisan/prisma/schema/domain/`):\\n - `sales.prisma` (Client, Quote, QuoteTemplate, Invoice, FollowUps)\\n - `subsidies.prisma` (SubsidyProgram, AidApplication, SupportingDocument)\\n - `projects.prisma` (Project, ProjectPlanningSettings)\\n - `crm.prisma` (OrganizationProfessionalProfile, OrganizationCertification)\\n - `professions.prisma`, `products.prisma`, `templates.prisma`, `analytics.prisma`, `onboarding.prisma`, `referrals.prisma`, `subscriptions.prisma`, `files.prisma`\\n- auth/organization/team models are provided by Sigil; local legacy copies were removed.\\n- Where names collide with Content, local models are prefixed (e.g., `PublicFile`) and use `@@map` to keep existing table names where applicable.\\n\\n## Schema Dictionary: `@lssm/lib.schema`\\n\\n### Purpose\\n\\nDescribe operation I/O once and generate:\\n\\n- zod (runtime validation)\\n- GraphQL (Pothos types/refs)\\n- JSON Schema (via `zod-to-json-schema` or native descriptors)\\n\\n### Primitives\\n\\n- **FieldType<T>**: describes a scalar or composite field and carries:\\n - `zod` schema for validation\\n - optional JSON Schema descriptor\\n - optional GraphQL scalar reference/name\\n- **SchemaModel**: named object model composed of fields. Exposes helpers:\\n - `getZod(): z.ZodObject<ZodShapeFromFields<Fields>> | z.ZodArray<z.ZodObject<...>>`\\n - Preserves each field's schema, optionality, and array-ness\\n - Top-level lists are supported via `config.isArray: true`\\n - `getJsonSchema(): JSONSchema7` (export for docs, MCP, forms)\\n - `getPothosInput()` (GraphQL input object name)\\n\\n### Conventions\\n\\n- Name models with PascalCase; suffix with `Input`/`Result` when ambiguous.\\n- Use explicit enums for multi-value constants; reuse the same enum across input/output.\\n- Define domain enums via `defineEnum('Name', [...])` in the relevant domain package (e.g., `packages/strit/libs/contracts-strit/src/enums/`), not in `ScalarTypeEnum`.\\n- Reference those enums in `SchemaModel` fields directly (they expose `getZod`, `getPothos`, `getJsonSchema`).\\n\\n#### Example (STRIT)\\n\\n```ts\\n// packages/strit/libs/contracts-strit/src/enums/recurrence.ts\\nimport { defineEnum } from '@lssm/lib.schema';\\nexport const SpotEnum = {\\n Weekday: () =>\\n defineEnum('Weekday', ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] as const),\\n RecurrenceFrequency: () =>\\n defineEnum('RecurrenceFrequency', [\\n 'DAILY',\\n 'WEEKLY',\\n 'MONTHLY',\\n 'YEARLY',\\n ] as const),\\n} as const;\\n```\\n\\n```ts\\n// usage in contracts\\nfrequency: { type: SpotEnum.RecurrenceFrequency(), isOptional: false },\\nbyWeekday: { type: SpotEnum.Weekday(), isOptional: true, isArray: true },\\n```\\n\\n- Use `Date` type for temporal values and ensure ISO strings in JSON transports where needed.\\n\\n### Mapping rules (summary)\\n\\n- Strings → GraphQL `String`\\n- Numbers → `Int` if safe 32-bit integer else `Float`\\n- Booleans → `Boolean`\\n- Dates → custom `Date` scalar\\n- Arrays<T> → list of mapped T (set `isArray: true` on the field)\\n- Top-level arrays → set `isArray: true` on the model config\\n- Objects → input/output object types with stable field order\\n- Unions → supported for output; input unions map to JSON (structural input is not supported by GraphQL)\\n\\n### JSON Schema export\\n\\nPrefer `getZod()` + `zod-to-json-schema` for consistency. For advanced cases, provide a custom `getJsonSchema()` on the model.\\n\\n### Example\\n\\n```ts\\nimport { ScalarTypeEnum, SchemaModel } from '@lssm/lib.schema';\\n\\n// Nested model\\nconst Weekday = new SchemaModel({\\n name: 'Weekday',\\n fields: {\\n value: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\\n },\\n});\\n\\n// Parent model with array field and nested object\\nconst Rule = new SchemaModel({\\n name: 'Rule',\\n fields: {\\n timezone: { type: ScalarTypeEnum.TimeZone(), isOptional: false },\\n byWeekday: { type: Weekday, isOptional: true, isArray: true },\\n },\\n});\\n\\nconst CreateThingInput = new SchemaModel({\\n name: 'CreateThingInput',\\n fields: {\\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\\n rule: { type: Rule, isOptional: false },\\n },\\n});\\n\\n// zod\\nconst z = CreateThingInput.getZod();\\n```\\n\"\n}];\nregisterDocBlocks(tech_schema_README_DocBlocks);\n\n//#endregion\nexport { tech_schema_README_DocBlocks };\n//# sourceMappingURL=README.docblock.js.map"],"mappings":";;;AAGA,MAAM,+BAA+B,CAAC;CACrC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;CACN,CAAC;AACF,kBAAkB,6BAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-events.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/learning-events.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/learning-events.docblock.ts\nconst tech_studio_learning_events_DocBlocks = [{\n\tid: \"docs.tech.studio.learning-events\",\n\ttitle: \"Studio Learning Events\",\n\tsummary: \"Studio persists learning/activity events to the database; Sandbox keeps learning local-first and unlogged.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/studio/learning-events\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"learning\",\n\t\t\"events\",\n\t\t\"analytics\",\n\t\t\"sandbox\"\n\t],\n\tbody: `# Studio Learning Events\n\nStudio emits lightweight **learning/activity events** to support onboarding, ambient coaching, and learning journeys.\n\n## Persistence model\n\n- **Studio**: events are persisted to the database in \\`StudioLearningEvent\\` and are organization-scoped (optionally project-scoped).\n- **Sandbox**: events remain **local-only** (unlogged); they must never be sent to backend services.\n\n## GraphQL API\n\n- \\`recordLearningEvent(input: { name, projectId?, payload? })\\`\n- \\`myLearningEvents(projectId?, limit?)\\`\n- \\`myOnboardingTracks(productId?, includeProgress?)\\`\n- \\`myOnboardingProgress(trackKey)\\`\n- \\`dismissOnboardingTrack(trackKey)\\`\n\n## Common event names (convention)\n\n- \\`module.navigated\\` — user navigated to a Studio module (payload at minimum: \\`{ moduleId }\\`).\n- \\`studio.template.instantiated\\` — created a new Studio project (starter template). Payload commonly includes \\`{ templateId, projectSlug }\\`.\n- \\`spec.changed\\` — created or updated a Studio spec. Payload may include \\`{ action: 'create' | 'update', specId?, specType? }\\`.\n- \\`regeneration.completed\\` — finished a “regen/deploy” action (currently emitted on successful Studio deploy actions).\n- \\`studio.evolution.applied\\` — completed an Evolution session (payload commonly includes \\`{ evolutionSessionId }\\`).\n\nThese events are intentionally minimal and must avoid PII/secrets in payloads.\n`\n}];\nregisterDocBlocks(tech_studio_learning_events_DocBlocks);\n\n//#endregion\nexport { tech_studio_learning_events_DocBlocks };\n//# sourceMappingURL=learning-events.docblock.js.map"],"mappings":";;;AAGA,MAAM,wCAAwC,CAAC;CAC9C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BN,CAAC;AACF,kBAAkB,sCAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-journeys.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/learning-journeys.docblock.ts\nconst tech_studio_learning_journeys_DocBlocks = [{\n\tid: \"docs.tech.studio.learning-journeys\",\n\ttitle: \"Studio learning journeys (onboarding + coach)\",\n\tsummary: \"DB-backed learning journeys tracked per organization: seeded tracks/steps, event-driven progress, XP/streaks, and a Studio coach surface.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/studio/learning-journeys\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"learning\",\n\t\t\"onboarding\",\n\t\t\"journey\",\n\t\t\"graphql\",\n\t\t\"database\"\n\t],\n\tbody: `# Studio learning journeys\n\nStudio supports **DB-backed learning journeys** (onboarding tracks + ambient coach tips) that are advanced by **recorded learning events**.\n\n> See also: \\`/docs/tech/studio/learning-events\\` for event naming + payload guardrails.\n\n## Scope (multi-tenancy)\n\n- Progress is tracked **per organization** (tenant/workspace), via a \\`Learner\\` record keyed by \\`(userId, organizationId)\\`.\n- Learning events are stored as \\`StudioLearningEvent\\` under the Studio DB schema, scoped to an organization (optionally a project).\n\n## Persistence model (Prisma)\n\nLearning journey progress lives in the \\`lssm_learning\\` schema:\n\n- \\`Learner\\` — one per \\`(userId, organizationId)\\`\n- \\`OnboardingTrack\\` — seeded track definitions (trackKey, name, metadata)\n- \\`OnboardingStep\\` — seeded step definitions (stepKey, completionCondition, xpReward, metadata)\n- \\`OnboardingProgress\\` — learner × track progress (progress %, xpEarned, completedAt, dismissedAt)\n- \\`OnboardingStepCompletion\\` — append-only completion records (stepKey, status, xpEarned, completedAt)\n\n## Track definition source (spec-first)\n\n- Canonical track specs live in \\`@lssm/example.learning-journey-registry\\`.\n- The Studio API seeds/updates the DB definitions via an idempotent “ensure tracks” routine.\n- The DB is kept aligned with track specs (stale steps are removed) to prevent drift and unblock completion.\n\n## Progress advancement (event-driven)\n\n1) UI records an event via GraphQL \\`recordLearningEvent\\`\n2) Backend creates \\`StudioLearningEvent\\`\n3) Backend advances onboarding by matching the new event against step completion conditions\n4) Backend persists step completions and recomputes:\n - \\`progress\\` percentage\n - \\`xpEarned\\` (including streak/completion bonuses when configured)\n - track completion state (\\`completedAt\\`)\n\n## GraphQL API (Studio)\n\n- \\`myOnboardingTracks(productId?, includeProgress?)\\`\n - returns all tracks + optional progress for the current learner\n- \\`myOnboardingProgress(trackKey)\\`\n - returns progress + step completion list for a single track\n- \\`dismissOnboardingTrack(trackKey)\\`\n - marks a track dismissed for the learner (prevents auto-coach)\n\n## UI routes/surfaces (web)\n\n- \\`/studio/learning\\` — learning hub (track list + progress widget)\n- \\`/studio/learning/{trackKey}\\` — track detail (steps + map)\n- Studio shell mounts a **coach sheet** that can auto-open for incomplete, non-dismissed onboarding.\n\n## Security + data hygiene\n\n- Do not put secrets/PII in \\`payload\\` fields of learning events.\n- Prefer shallow payload filters (small, stable keys).\n`\n}];\nregisterDocBlocks(tech_studio_learning_journeys_DocBlocks);\n\n//#endregion\nexport { tech_studio_learning_journeys_DocBlocks };\n//# sourceMappingURL=learning-journeys.docblock.js.map"],"mappings":";;;AAGA,MAAM,0CAA0C,CAAC;CAChD,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDN,CAAC;AACF,kBAAkB,wCAAwC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-admin-panel.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/platform-admin-panel.docblock.ts\nconst tech_studio_platform_admin_panel_DocBlocks = [{\n\tid: \"docs.tech.studio.platform-admin-panel\",\n\ttitle: \"Studio Platform Admin Panel\",\n\tsummary: \"How PLATFORM_ADMIN organizations manage tenant orgs and integration connections without session switching.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/studio/platform-admin-panel\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"admin\",\n\t\t\"multi-tenancy\",\n\t\t\"integrations\",\n\t\t\"better-auth\"\n\t],\n\tbody: `# Studio Platform Admin Panel\n\nContractSpec Studio exposes a dedicated **Platform Admin Panel** for users whose **active organization** has:\n\n- \\`Organization.type = PLATFORM_ADMIN\\`\n\nThe UI route is:\n\n- \\`/studio/admin\\`\n\n## Authorization model (no org switching)\n\nPlatform admins **remain in their own organization**. Cross-tenant actions are always explicit and scoped:\n\n- Admin operations require an explicit \\`targetOrganizationId\\`.\n- No session / activeOrganizationId switching is performed as part of admin operations.\n\n## Integrations management\n\nThe admin panel manages the full ContractSpec Integrations system:\n\n- Lists all shipped \\`IntegrationSpec\\` entries (registry built via \\`createDefaultIntegrationSpecRegistry()\\`).\n- CRUD \\`IntegrationConnection\\` records for a selected tenant org.\n\n### Secrets (reference-only + write-only)\n\nThe admin UI supports two modes:\n\n- **Reference-only (BYOK)**: store only \\`secretProvider\\` + \\`secretRef\\`.\n- **Write-only provisioning/rotation**: paste a raw secret payload; server writes to the selected backend and stores the resulting reference. The secret value is **never returned or displayed**.\n\nSupported backends:\n\n- Env overrides (\\`env://...\\`)\n- Google Cloud Secret Manager (\\`gcp://...\\`)\n- AWS Secrets Manager (\\`aws://secretsmanager/...\\`)\n- Scaleway Secret Manager (\\`scw://secret-manager/...\\`)\n\n## Better Auth Admin plugin\n\nThe panel uses the Better Auth **Admin plugin** for user operations (list users, impersonation):\n\n- Client calls use \\`authClient.admin.*\\`.\n- Server-side, ContractSpec enforces that users in a PLATFORM_ADMIN active org have \\`User.role\\` containing \\`admin\\` so Better Auth Admin endpoints authorize.\n\n## GraphQL surface\n\nThe platform-admin GraphQL operations are guarded by the active org type and include:\n\n- \\`platformAdminOrganizations(search, limit, offset)\\`\n- \\`platformAdminIntegrationSpecs\\`\n- \\`platformAdminIntegrationConnections(input: { targetOrganizationId, category?, status? })\\`\n- \\`platformAdminIntegrationConnectionCreate(input)\\`\n- \\`platformAdminIntegrationConnectionUpdate(input)\\`\n- \\`platformAdminIntegrationConnectionDelete(targetOrganizationId, connectionId)\\`\n\n## Key implementation files\n\n- Auth + role enforcement: \\`packages/bundles/contractspec-studio/src/application/services/auth.ts\\`\n- Admin GraphQL module: \\`packages/bundles/contractspec-studio/src/infrastructure/graphql/modules/platform-admin.ts\\`\n- Integrations admin service: \\`packages/bundles/contractspec-studio/src/modules/platform-integrations/index.ts\\`\n- Web route: \\`packages/apps/web-landing/src/app/(app-customer)/studio/admin/*\\`\n`\n}];\nregisterDocBlocks(tech_studio_platform_admin_panel_DocBlocks);\n\n//#endregion\nexport { tech_studio_platform_admin_panel_DocBlocks };\n//# sourceMappingURL=platform-admin-panel.docblock.js.map"],"mappings":";;;AAGA,MAAM,6CAA6C,CAAC;CACnD,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DN,CAAC;AACF,kBAAkB,2CAA2C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-access-teams.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/project-access-teams.docblock.ts\nconst tech_studio_project_access_teams_DocBlocks = [{\n\tid: \"docs.tech.studio.project-access-teams\",\n\ttitle: \"Studio Project Access via Teams\",\n\tsummary: \"Projects live under organizations; team sharing refines access with an admin/owner override.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/studio/project-access-teams\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"projects\",\n\t\t\"teams\",\n\t\t\"rbac\",\n\t\t\"access-control\"\n\t],\n\tbody: `# Studio Project Access via Teams\n\nStudio access control is **organization-first** with optional **team-based sharing**.\n\n## Data model\n\n- \\`Team\\` and \\`TeamMember\\` define team membership inside an organization.\n- \\`StudioProject\\` is owned by an organization.\n- \\`StudioProjectTeam\\` links projects to 0..N teams.\n\n## Access rules\n\n- **Admins/owners**: always have access to all projects in the organization.\n- **Org-wide projects**: if a project has **no team links**, all organization members can access it.\n- **Team-scoped projects**: if a project has **one or more team links**, a user must be a member of at least one linked team.\n\n## GraphQL surfaces\n\n- Read:\\n - \\`myStudioProjects\\` (returns only projects you can access)\\n - \\`studioProjectBySlug(slug)\\` (enforces the same access rules)\\n - \\`myTeams\\`\\n - \\`projectTeams(projectId)\\`\\n\\n- Write:\\n - \\`createStudioProject(input.teamIds?)\\` (teamIds optional)\\n - \\`setProjectTeams(projectId, teamIds)\\` (admin-only)\\n\n## Related\\n+\\n+- Team administration + invitations: see \\`/docs/tech/studio/team-invitations\\`.\\n+\n## Notes\n\nPayloads and events must avoid secrets/PII. For Sandbox, the model remains local-first and unlogged.\n`\n}];\nregisterDocBlocks(tech_studio_project_access_teams_DocBlocks);\n\n//#endregion\nexport { tech_studio_project_access_teams_DocBlocks };\n//# sourceMappingURL=project-access-teams.docblock.js.map"],"mappings":";;;AAGA,MAAM,6CAA6C,CAAC;CACnD,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;CAwBN,CAAC;AACF,kBAAkB,2CAA2C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-routing.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/project-routing.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/project-routing.docblock.ts\nconst tech_studio_project_routing_DocBlocks = [{\n\tid: \"docs.tech.studio.project-routing\",\n\ttitle: \"Studio Project Routing\",\n\tsummary: \"Studio uses slugged, project-first routes: /studio/{projectSlug}/* with canonical slug redirects and soft-deleted projects hidden.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/studio/project-routing\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"routing\",\n\t\t\"projects\",\n\t\t\"slug\",\n\t\t\"redirects\"\n\t],\n\tbody: `# Studio Project Routing\n\nContractSpec Studio uses a **project-first URL scheme**:\n\n- \\`/studio/projects\\` — create, select, and delete projects.\n- \\`/studio/{projectSlug}/*\\` — project modules (canvas/specs/deploy/integrations/evolution/learning).\n- \\`/studio/learning\\` — learning hub that does not require selecting a project.\n\n## Studio layout shell\n\nStudio routes are wrapped in a dedicated **Studio app shell** (header + footer) that provides in-app navigation (Projects/Learning/Teams), organization switching, and account actions.\n\nProject module routes (\\`/studio/{projectSlug}/*\\`) render their own module shell (\\`WorkspaceProjectShellLayout\\`). When combined with the global Studio header, the project shell uses a **sticky header offset** to avoid overlapping sticky headers.\n\n## Slug behavior (rename-safe)\n\n- Each project has a \\`slug\\` stored in the database (\\`StudioProject.slug\\`).\n- When a project name changes, Studio **updates the slug** and stores the previous slug as an alias (\\`StudioProjectSlugAlias\\`).\n- Requests to an alias slug are **redirected to the canonical slug**.\n\nGraphQL entrypoint:\n\n- \\`studioProjectBySlug(slug: String!)\\` returns:\n - \\`project\\`\n - \\`canonicalSlug\\`\n - \\`wasRedirect\\`\n\n## Deletion behavior (soft delete)\n\nProjects are **soft-deleted**:\n\n- \\`deleteStudioProject(id: String!)\\` sets \\`StudioProject.deletedAt\\`.\n- All listings and access checks filter \\`deletedAt = null\\`.\n- Soft-deleted projects are treated as “not found” in Studio routes and GraphQL access checks.\n\n## Available modules for a selected project\n\nThe following project modules are expected under \\`/studio/{projectSlug}\\`:\n\n- \\`/canvas\\` — Visual builder canvas (stored via overlays and canvas versions).\n- \\`/specs\\` — Spec editor (stored as \\`StudioSpec\\`).\n- \\`/deploy\\` — Deployments history + triggers (stored as \\`StudioDeployment\\`).\n- \\`/integrations\\` — Integrations scoped to project (stored as \\`StudioIntegration\\`).\n- \\`/evolution\\` — Evolution sessions (stored as \\`EvolutionSession\\`).\n- \\`/learning\\` — Project learning activity.\n`\n}];\nregisterDocBlocks(tech_studio_project_routing_DocBlocks);\n\n//#endregion\nexport { tech_studio_project_routing_DocBlocks };\n//# sourceMappingURL=project-routing.docblock.js.map"],"mappings":";;;AAGA,MAAM,wCAAwC,CAAC;CAC9C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CN,CAAC;AACF,kBAAkB,sCAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-unlogged.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/sandbox-unlogged.docblock.ts\nconst tech_studio_sandbox_unlogged_DocBlocks = [{\n\tid: \"docs.tech.studio.sandbox.unlogged\",\n\ttitle: \"Sandbox (unlogged) vs Studio (authenticated)\",\n\tsummary: \"The sandbox is a lightweight, unlogged surface that mirrors Studio navigation without auth or analytics.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/studio/sandbox-unlogged\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"sandbox\",\n\t\t\"privacy\",\n\t\t\"analytics\"\n\t],\n\tbody: `## Sandbox guarantees\n\n- Route: \\`/sandbox\\`\n- **No auth requirement**\n- **No PostHog init**\n- **No Vercel Analytics**\n- Local-only state (in-browser runtime + localStorage where needed)\n\n## What Sandbox is for\n\n- Try templates and feature modules safely\n- Preview specs/builder/evolution/learning\n- Produce copyable CLI commands (no side effects)\n\n## What Sandbox is *not* for\n\n- Persisted projects/workspaces\n- Real deployments\n- Organization-scoped integrations (unless explicitly enabled later)\n`\n}];\nregisterDocBlocks(tech_studio_sandbox_unlogged_DocBlocks);\n\n//#endregion\nexport { tech_studio_sandbox_unlogged_DocBlocks };\n//# sourceMappingURL=sandbox-unlogged.docblock.js.map"],"mappings":";;;AAGA,MAAM,yCAAyC,CAAC;CAC/C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;CAoBN,CAAC;AACF,kBAAkB,uCAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-invitations.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/team-invitations.docblock.ts\nconst tech_studio_team_invitations_DocBlocks = [{\n\tid: \"docs.tech.studio.team-invitations\",\n\ttitle: \"Studio Teams & Invitations\",\n\tsummary: \"Admin-only team management and email invitation flow to join an organization and optionally a team.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/studio/team-invitations\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"teams\",\n\t\t\"invitations\",\n\t\t\"access-control\",\n\t\t\"onboarding\"\n\t],\n\tbody: `# Studio Teams & Invitations\n\nStudio uses **organization membership** as the base access model. Teams are optional and used to refine access to projects.\n\n## Who can manage teams?\n\n- **Admins/owners only**: create, rename, delete teams; manage project team access; issue invitations.\n\n## Invitation data model\n\n- \\`Invitation\\` rows are stored under an organization and target an **email** address.\\n\n- An invitation can optionally target a \\`teamId\\`, which will grant the user membership in that team upon acceptance.\n\nKey fields:\n- \\`email\\`: invited address (must match the accepting user's account email)\\n\n- \\`status\\`: \\`pending | accepted | declined | expired\\`\\n\n- \\`teamId?\\`: optional team to join\\n\n- \\`inviterId\\`: user who issued the invitation\n\n## GraphQL surfaces\n\n- Team CRUD (admin-only):\\n\n - \\`createTeam(name)\\`\\n\n - \\`renameTeam(teamId, name)\\`\\n\n - \\`deleteTeam(teamId)\\`\\n\n\n- Invitations (admin-only):\\n\n - \\`organizationInvitations\\`\\n\n - \\`inviteToOrganization(email, role?, teamId?)\\` → returns \\`inviteUrl\\` and whether an email was sent\n\n## Accepting an invitation\n\nThe invite link is served as:\\n\n- \\`/invite/{invitationId}\\`\n\nAcceptance rules:\n- The user must be authenticated.\\n\n- The authenticated user’s email must match \\`Invitation.email\\`.\\n\n- If not already a member, create \\`Member(userId, organizationId, role)\\`.\\n\n- If \\`teamId\\` is present, ensure \\`TeamMember(teamId, userId)\\`.\\n\n- Mark invitation \\`status='accepted'\\` and set \\`acceptedAt\\`.\\n\n- Set \\`activeOrganizationId\\` for the session so \\`/studio/*\\` routes work immediately.\n\n## Email delivery\n\n- If \\`RESEND_API_KEY\\` is set, the system attempts to send an email.\\n\n- Otherwise, the UI uses the returned \\`inviteUrl\\` for manual copy/share.\n`\n}];\nregisterDocBlocks(tech_studio_team_invitations_DocBlocks);\n\n//#endregion\nexport { tech_studio_team_invitations_DocBlocks };\n//# sourceMappingURL=team-invitations.docblock.js.map"],"mappings":";;;AAGA,MAAM,yCAAyC,CAAC;CAC/C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDN,CAAC;AACF,kBAAkB,uCAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-ops.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/workspace-ops.docblock.ts\nconst tech_studio_workspace_ops_DocBlocks = [{\n\tid: \"docs.tech.studio.workspace_ops\",\n\ttitle: \"Workspace ops (repo-linked): list / validate / deps / diff\",\n\tsummary: \"Read-only repo operations used by Studio to inspect and validate a linked ContractSpec workspace.\",\n\tkind: \"reference\",\n\tvisibility: \"mixed\",\n\troute: \"/docs/tech/studio/workspace-ops\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"repo\",\n\t\t\"workspace\",\n\t\t\"validate\",\n\t\t\"diff\"\n\t],\n\tbody: `## API surface (api-contractspec)\n\nBase: \\`/api/workspace-ops\\`\n\nThese endpoints are **read-only** in v1 and never push to git:\n\n- \\`GET /api/workspace-ops/:integrationId/config?organizationId=\\`\n- \\`GET /api/workspace-ops/:integrationId/specs?organizationId=\\`\n- \\`POST /api/workspace-ops/:integrationId/validate\\` (body: organizationId, files?, pattern?)\n- \\`POST /api/workspace-ops/:integrationId/deps\\` (body: organizationId, pattern?)\n- \\`POST /api/workspace-ops/:integrationId/diff\\` (body: organizationId, specPath, baseline?, breakingOnly?)\n\n## Repo resolution\n\n- The repo root is resolved from the Studio Integration (\\`IntegrationProvider.GITHUB\\`) config:\n - \\`config.repoCachePath\\` (preferred) or \\`config.localPath\\`\n- Resolution is constrained to \\`CONTRACTSPEC_REPO_CACHE_DIR\\` (default: \\`/tmp/contractspec-repos\\`)\n\n## Intended UX\n\n- Studio Assistant can run these checks and present results as suggestions.\n- Users can copy equivalent CLI commands for local runs:\n - \\`contractspec validate\\`\n - \\`contractspec deps\\`\n - \\`contractspec diff --baseline <ref>\\`\n`\n}];\nregisterDocBlocks(tech_studio_workspace_ops_DocBlocks);\n\n//#endregion\nexport { tech_studio_workspace_ops_DocBlocks };\n//# sourceMappingURL=workspace-ops.docblock.js.map"],"mappings":";;;AAGA,MAAM,sCAAsC,CAAC;CAC5C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BN,CAAC;AACF,kBAAkB,oCAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/studio/workspaces.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/studio/workspaces.docblock.ts\nconst tech_studio_workspaces_DocBlocks = [{\n\tid: \"docs.tech.studio.workspaces\",\n\ttitle: \"Studio projects, teams, environments\",\n\tsummary: \"Organization-first Studio: projects live under an organization; teams refine access; projects deploy to multiple environments.\",\n\tkind: \"reference\",\n\tvisibility: \"mixed\",\n\troute: \"/docs/tech/studio/workspaces\",\n\ttags: [\n\t\t\"studio\",\n\t\t\"projects\",\n\t\t\"teams\",\n\t\t\"rbac\",\n\t\t\"environments\"\n\t],\n\tbody: `## Concepts\n\n- **Organization**: the primary grouping boundary for Studio projects.\n- **Project**: one application (specs, overlays, deployments, integrations, evolution, learning).\n- **Team**: refines who can see/edit a project within an organization.\n- **Environment**: deployment target (Development / Staging / Production).\n\n## Project access (teams + admin override)\n\nStudio uses multi-team sharing to refine access:\n\n- **Admins/owners** can access all projects.\n- If a project is shared with **no teams**, it is **org-wide** (all org members).\n- If a project is shared with **one or more teams**, it is visible to:\n - admins/owners, and\n - members of any linked team.\n\n## Current persistence (DB + GraphQL)\n\n- DB (Prisma): \\`StudioProject\\`, \\`Team\\`, \\`TeamMember\\`, \\`StudioProjectTeam\\`\n- GraphQL:\n - \\`myStudioProjects\\`\n - \\`createStudioProject(input.teamIds?)\\`\n - \\`myTeams\\`\n - \\`projectTeams(projectId)\\`\n - \\`setProjectTeams(projectId, teamIds)\\`\n\n## UI shell behavior\n\nStudio and Sandbox both use a shared shell:\n\n- Project selector → Module navigation → Environment selector\n- Always-on Assistant button (floating)\n- Learning journey progress (Studio persists learning events; Sandbox stays local-only)\n\n## Routing\n\n- \\`/studio/projects\\`: create/select/delete projects (organization-first).\n- \\`/studio/{projectSlug}/*\\`: project modules (canvas/specs/deploy/integrations/evolution/learning).\n- \\`/studio/learning\\`: learning hub without selecting a project.\n`\n}];\nregisterDocBlocks(tech_studio_workspaces_DocBlocks);\n\n//#endregion\nexport { tech_studio_workspaces_DocBlocks };\n//# sourceMappingURL=workspaces.docblock.js.map"],"mappings":";;;AAGA,MAAM,mCAAmC,CAAC;CACzC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCN,CAAC;AACF,kBAAkB,iCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-ingest.docblock.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../registry.js\";\n\n//#region src/docs/tech/telemetry-ingest.docblock.ts\nconst tech_telemetry_ingest_DocBlocks = [{\n\tid: \"docs.tech.telemetry.ingest\",\n\ttitle: \"Telemetry Ingest Endpoint\",\n\tsummary: \"Server-side telemetry ingestion for ContractSpec clients (VS Code extension, CLI, etc.).\",\n\tkind: \"reference\",\n\tvisibility: \"internal\",\n\troute: \"/docs/tech/telemetry/ingest\",\n\ttags: [\n\t\t\"telemetry\",\n\t\t\"api\",\n\t\t\"posthog\",\n\t\t\"analytics\"\n\t],\n\tbody: `# Telemetry Ingest Endpoint\n\nThe ContractSpec API provides a telemetry ingest endpoint for clients to send product analytics events.\n\n## Endpoint\n\n\\`\\`\\`\nPOST /api/telemetry/ingest\n\\`\\`\\`\n\n## Request\n\n\\`\\`\\`json\n{\n \"event\": \"contractspec.vscode.command_run\",\n \"distinct_id\": \"client-uuid\",\n \"properties\": {\n \"command\": \"validate\"\n },\n \"timestamp\": \"2024-01-15T10:30:00.000Z\"\n}\n\\`\\`\\`\n\n### Headers\n\n| Header | Description |\n|--------|-------------|\n| \\`x-contractspec-client-id\\` | Optional client identifier (used as fallback for distinct_id) |\n| \\`Content-Type\\` | Must be \\`application/json\\` |\n\n### Body\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| \\`event\\` | string | Yes | Event name (e.g., \\`contractspec.vscode.activated\\`) |\n| \\`distinct_id\\` | string | Yes | Anonymous client identifier |\n| \\`properties\\` | object | No | Event properties |\n| \\`timestamp\\` | string | No | ISO 8601 timestamp |\n\n## Response\n\n\\`\\`\\`json\n{\n \"success\": true\n}\n\\`\\`\\`\n\n## Configuration\n\nThe endpoint requires \\`POSTHOG_PROJECT_KEY\\` environment variable to be set. If not configured, events are accepted but not forwarded.\n\n| Environment Variable | Description | Default |\n|---------------------|-------------|---------|\n| \\`POSTHOG_HOST\\` | PostHog host URL | \\`https://eu.posthog.com\\` |\n| \\`POSTHOG_PROJECT_KEY\\` | PostHog project API key | (required) |\n\n## Privacy\n\n- No PII is collected or stored\n- \\`distinct_id\\` is an anonymous client-generated UUID\n- File paths and source code are never included in events\n- Respects VS Code telemetry settings on the client side\n\n## Events\n\n### Extension Events\n\n| Event | Description | Properties |\n|-------|-------------|------------|\n| \\`contractspec.vscode.activated\\` | Extension activated | \\`version\\` |\n| \\`contractspec.vscode.command_run\\` | Command executed | \\`command\\` |\n| \\`contractspec.vscode.mcp_call\\` | MCP call made | \\`endpoint\\`, \\`tool\\` |\n\n### API Events\n\n| Event | Description | Properties |\n|-------|-------------|------------|\n| \\`contractspec.api.mcp_request\\` | MCP request processed | \\`endpoint\\`, \\`method\\`, \\`success\\`, \\`duration_ms\\` |\n`\n}, {\n\tid: \"docs.tech.telemetry.hybrid\",\n\ttitle: \"Hybrid Telemetry Model\",\n\tsummary: \"How ContractSpec clients choose between direct PostHog and API-routed telemetry.\",\n\tkind: \"usage\",\n\tvisibility: \"internal\",\n\troute: \"/docs/tech/telemetry/hybrid\",\n\ttags: [\n\t\t\"telemetry\",\n\t\t\"architecture\",\n\t\t\"posthog\"\n\t],\n\tbody: `# Hybrid Telemetry Model\n\nContractSpec uses a hybrid telemetry model where clients can send events either directly to PostHog or via the API server.\n\n## Decision Flow\n\n\\`\\`\\`\nIs contractspec.api.baseUrl configured?\n├── Yes → Send via /api/telemetry/ingest\n└── No → Is posthogProjectKey configured?\n ├── Yes → Send directly to PostHog\n └── No → Telemetry disabled\n\\`\\`\\`\n\n## Benefits\n\n### Direct PostHog\n- No server dependency\n- Works offline (with batching)\n- Lower latency\n\n### Via API\n- Centralized key management (no client-side keys)\n- Server-side enrichment and validation\n- Rate limiting and abuse prevention\n- Easier migration to other providers\n\n## Recommendation\n\n- **Development**: Use direct PostHog with a dev project key\n- **Production**: Route via API for better governance\n\n## Future: OpenTelemetry\n\nThe current PostHog implementation is behind a simple interface that can be swapped for OpenTelemetry:\n\n\\`\\`\\`typescript\ninterface TelemetryClient {\n send(event: TelemetryEvent): Promise<void>;\n}\n\\`\\`\\`\n\nThis allows future migration without changing client code.\n`\n}];\nregisterDocBlocks(tech_telemetry_ingest_DocBlocks);\n\n//#endregion\nexport { tech_telemetry_ingest_DocBlocks };\n//# sourceMappingURL=telemetry-ingest.docblock.js.map"],"mappings":";;;AAGA,MAAM,kCAAkC,CAAC;CACxC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EN,EAAE;CACF,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CN,CAAC;AACF,kBAAkB,gCAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/templates/runtime.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/templates/runtime.docblock.ts\nconst tech_templates_runtime_DocBlocks = [{\n\tid: \"docs.tech.templates.runtime\",\n\ttitle: \"ContractSpec Template Runtime (Phase 9)\",\n\tsummary: \"Phase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/templates/runtime\",\n\ttags: [\n\t\t\"tech\",\n\t\t\"templates\",\n\t\t\"runtime\"\n\t],\n\tbody: \"## ContractSpec Template Runtime (Phase 9)\\n\\nPhase 9 introduces a full local-first runtime for templates so anyone can preview apps directly in the browser without provisioning any infrastructure.\\n\\n### Building Blocks\\n\\n- **Local database** – `@lssm/lib.runtime-local` wraps `sql.js` (SQLite WASM) and `IndexedDB` so we can seed demo data, run migrations, and persist state between sessions. Tests point the runtime to `node_modules/sql.js/dist` so CI doesn’t need a browser.\\n- **Local GraphQL** – `LocalGraphQLClient` wires Apollo Client + SchemaLink to resolvers for tasks, messaging, and i18n recipes. All `/templates`, `/studio`, and `/sandbox` previews use those resolvers so we never call remote APIs during demos.\\n- **Template registry + installer** – `.../templates/registry.ts` stores the catalog (todos, messaging, recipes). `TemplateInstaller` can seed the runtime (`install`) or export a base64 snapshot via the new `saveTemplateToStudio` mutation.\\n- **TemplateShell** – Shared UI wrapper that creates a `TemplateRuntimeProvider`, shows `LocalDataIndicator`, and (optionally) surfaces the new `SaveToStudioButton`.\\n\\n### Runtime Flows\\n\\n1. `/templates` now opens a modal that renders `TemplateShell` for each template. Users can explore without leaving the marketing site.\\n2. `/studio` switches to a tabbed mini-app (Projects, Canvas, Specs, Deploy) to showcase Studio surfaces with mock data. Visitors see a **preview** shell, while authenticated users (Better Auth via Sigil) unlock full persistence, versioning, and deployment controls.\\n3. `/sandbox` lets visitors pick a template and mode (Playground, Spec Editor, Visual Builder). The console at the bottom streams runtime events for transparency.\\n\\n### GraphQL Mutations\\n\\n- `saveTemplateToStudio(input: SaveTemplateInput!): SaveTemplateResult!` writes a placeholder project + spec so that templates installed from the sandbox appear in Studio. The mutation is intentionally simple right now: it records which template was imported, stores metadata, and returns `{ projectId, status: 'QUEUED' }` for the UI.\\n- `saveCanvasDraft(input: SaveCanvasDraftInput!): CanvasVersion!` snapshots the current Visual Builder nodes to a draft version tied to a canvas overlay. Inputs include `canvasId`, arbitrary `nodes` JSON, and an optional `label`. The resolver enforces org/org access before calling `CanvasVersionManager`.\\n- `deployCanvasVersion(input: DeployCanvasVersionInput!): CanvasVersion!` promotes a previously saved draft (`versionId`) to the deployed state. The returned object includes `status`, `nodes`, `createdAt`, and `createdBy` for UI timelines.\\n- `undoCanvasVersion(input: UndoCanvasInput!): CanvasVersion` rewinds the visual builder to the prior snapshot (returns `null` when history is empty) so Studio’s toolbar can surface “Undo” without shelling out to local storage.\\n\\n### Studio GraphQL endpoint\\n\\n- The landing app exposes the Studio schema at `/api/studio/graphql` via Yoga so React Query hooks (`useStudioProjects`, `useCreateStudioProject`, `useDeployStudioProject`, etc.) can talk to the bundle without spinning up a separate server.\\n\\n### Spec Editor typing\\n\\n- Studio’s spec editor now preloads Monaco with ambient declarations for `@lssm/lib.contracts` and `zod`, so snippets receive autocomplete and inline errors even before the spec ships to the backend. The helper lives in `presentation/components/studio/organisms/monaco-spec-types.ts` and registers the extra libs once per browser session via `monaco.languages.typescript.typescriptDefaults.addExtraLib`.\\n- Compiler options are aligned with our frontend toolchain (ES2020 + React JSX) which means drafts written in the editor behave like the compiled artifacts that flow through Studio pipelines.\\n\\n### Spec templates\\n\\n- Selecting a spec type now injects a ready-to-edit scaffold (capability, workflow, policy, dataview, component) so authors start from a canonical layout instead of a blank file. Templates live alongside `SpecEditor.tsx`, and we only overwrite the content when the previous value is empty or when the author explicitly switches types via the dropdown.\\n\\n### Spec preview\\n\\n- The validation side panel now embeds a `SpecPreview` widget that shows validation errors alongside transport artifacts (GraphQL schema, REST endpoints, component summaries) once a preview run completes. Tabs let authors toggle between “Validation” and “Artifacts,” mirroring the UX described in the Studio plan.\\n\\n### Testing\\n\\n- `src/templates/__tests__/runtime.test.ts` covers todos CRUD, messaging delivery, and recipe locale switching through the local GraphQL API.\\n- Studio infrastructure tests live in `src/__tests__/e2e/project-lifecycle.test.ts` and continue to exercise project creation + deploy flows.\\n\\n### Next Steps\\n\\nFuture templates can register their React components via `registerTemplateComponents(templateId, components)` so TemplateShell can render them automatically. When new templates are added, remember to:\\n\\n1. Update the registry entry (schema + tags).\\n2. Register components inside `presentation/components/templates`.\\n3. Document the template under `docs/templates/`.\\n\\n\\n\\n\\n\\n\"\n}];\nregisterDocBlocks(tech_templates_runtime_DocBlocks);\n\n//#endregion\nexport { tech_templates_runtime_DocBlocks };\n//# sourceMappingURL=runtime.docblock.js.map"],"mappings":";;;AAGA,MAAM,mCAAmC,CAAC;CACzC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;CACN,CAAC;AACF,kBAAkB,iCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vscode-extension.docblock.js","names":[],"sources":["../../../../../../../../libs/contracts/dist/docs/tech/vscode-extension.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../registry.js\";\n\n//#region src/docs/tech/vscode-extension.docblock.ts\nconst tech_vscode_extension_DocBlocks = [{\n\tid: \"docs.tech.vscode.extension\",\n\ttitle: \"ContractSpec VS Code Extension\",\n\tsummary: \"VS Code extension for spec-first development with validation, scaffolding, and MCP integration.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/vscode/extension\",\n\ttags: [\n\t\t\"vscode\",\n\t\t\"extension\",\n\t\t\"tooling\",\n\t\t\"dx\"\n\t],\n\tbody: `# ContractSpec VS Code Extension\n\nThe ContractSpec VS Code extension provides spec-first development tooling directly in your editor.\n\n## Features\n\n- **Real-time Validation**: Get instant feedback on spec errors and warnings as you save files\n- **Build/Scaffold**: Generate handler and component skeletons from specs (no AI required)\n- **Spec Explorer**: List and navigate all specs in your workspace\n- **Dependency Analysis**: Visualize spec dependencies and detect cycles\n- **MCP Integration**: Search ContractSpec documentation via Model Context Protocol\n- **Snippets**: Code snippets for common ContractSpec patterns\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| \\`ContractSpec: Validate Current Spec\\` | Validate the currently open spec file |\n| \\`ContractSpec: Validate All Specs\\` | Validate all spec files in the workspace |\n| \\`ContractSpec: Build/Scaffold\\` | Generate handler/component from the current spec |\n| \\`ContractSpec: List All Specs\\` | Show all specs in the workspace |\n| \\`ContractSpec: Analyze Dependencies\\` | Analyze and visualize spec dependencies |\n| \\`ContractSpec: Search Docs (MCP)\\` | Search documentation via MCP |\n\n## Configuration\n\n| Setting | Description | Default |\n|---------|-------------|---------|\n| \\`contractspec.api.baseUrl\\` | Base URL for ContractSpec API (enables MCP + remote telemetry) | \\`\"\"\\` |\n| \\`contractspec.telemetry.posthogHost\\` | PostHog host URL for direct telemetry | \\`\"https://eu.posthog.com\"\\` |\n| \\`contractspec.telemetry.posthogProjectKey\\` | PostHog project key for direct telemetry | \\`\"\"\\` |\n| \\`contractspec.validation.onSave\\` | Run validation on save | \\`true\\` |\n| \\`contractspec.validation.onOpen\\` | Run validation on open | \\`true\\` |\n\n## Architecture\n\nThe extension uses:\n- \\`@lssm/module.contractspec-workspace\\` for pure analysis + templates\n- \\`@lssm/bundle.contractspec-workspace\\` for workspace services + adapters\n\nThis allows the extension to work without requiring the CLI to be installed.\n\n## Telemetry\n\nThe extension uses a hybrid telemetry approach:\n1. If \\`contractspec.api.baseUrl\\` is configured → send to API \\`/api/telemetry/ingest\\`\n2. Otherwise → send directly to PostHog (if project key configured)\n\nTelemetry respects VS Code's telemetry settings. No file paths, source code, or PII is collected.\n`\n}, {\n\tid: \"docs.tech.vscode.snippets\",\n\ttitle: \"ContractSpec Snippets\",\n\tsummary: \"Code snippets for common ContractSpec patterns in VS Code.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/vscode/snippets\",\n\ttags: [\n\t\t\"vscode\",\n\t\t\"snippets\",\n\t\t\"dx\"\n\t],\n\tbody: `# ContractSpec Snippets\n\nThe VS Code extension includes snippets for common ContractSpec patterns.\n\n## Available Snippets\n\n| Prefix | Description |\n|--------|-------------|\n| \\`contractspec-command\\` | Create a new command (write operation) |\n| \\`contractspec-query\\` | Create a new query (read-only operation) |\n| \\`contractspec-event\\` | Create a new event |\n| \\`contractspec-docblock\\` | Create a new DocBlock |\n| \\`contractspec-telemetry\\` | Create a new TelemetrySpec |\n| \\`contractspec-presentation\\` | Create a new Presentation |\n\n## Usage\n\nType the prefix in a TypeScript file and press Tab to expand the snippet. Tab through the placeholders to fill in your values.\n`\n}];\nregisterDocBlocks(tech_vscode_extension_DocBlocks);\n\n//#endregion\nexport { tech_vscode_extension_DocBlocks };\n//# sourceMappingURL=vscode-extension.docblock.js.map"],"mappings":";;;AAGA,MAAM,kCAAkC,CAAC;CACxC,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDN,EAAE;CACF,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;;;;;;;;;;;;;;;;;;;CAmBN,CAAC;AACF,kBAAkB,gCAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview.docblock.js","names":[],"sources":["../../../../../../../../../libs/contracts/dist/docs/tech/workflows/overview.docblock.js"],"sourcesContent":["import { registerDocBlocks } from \"../../registry.js\";\n\n//#region src/docs/tech/workflows/overview.docblock.ts\nconst tech_workflows_overview_DocBlocks = [{\n\tid: \"docs.tech.workflows.overview\",\n\ttitle: \"WorkflowSpec Overview\",\n\tsummary: \"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.\",\n\tkind: \"reference\",\n\tvisibility: \"public\",\n\troute: \"/docs/tech/workflows/overview\",\n\ttags: [\n\t\t\"tech\",\n\t\t\"workflows\",\n\t\t\"overview\"\n\t],\n\tbody: \"# 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\"\n}];\nregisterDocBlocks(tech_workflows_overview_DocBlocks);\n\n//#endregion\nexport { tech_workflows_overview_DocBlocks };\n//# sourceMappingURL=overview.docblock.js.map"],"mappings":";;;AAGA,MAAM,oCAAoC,CAAC;CAC1C,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EACL;EACA;EACA;EACA;CACD,MAAM;CACN,CAAC;AACF,kBAAkB,kCAAkC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { registerDocBlocks } from "./registry.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../libs/contracts/dist/docs/tech-contracts.docs.js
|
|
4
|
+
const techContractsDocs = [{
|
|
5
|
+
id: "docs.tech.contracts.presentations-v2",
|
|
6
|
+
title: "Presentations V2 — Unified Descriptor & Transform Engine",
|
|
7
|
+
summary: "How PresentationDescriptorV2 and TransformEngine keep docs/renderers consistent.",
|
|
8
|
+
visibility: "public",
|
|
9
|
+
route: "/docs/tech/contracts/presentations-v2",
|
|
10
|
+
kind: "reference",
|
|
11
|
+
tags: [
|
|
12
|
+
"presentations",
|
|
13
|
+
"docs",
|
|
14
|
+
"mcp"
|
|
15
|
+
],
|
|
16
|
+
body: `## Presentations V2 — Unified Descriptor & Transform Engine
|
|
17
|
+
|
|
18
|
+
### Purpose
|
|
19
|
+
|
|
20
|
+
Unify presentations into one descriptor (\`PresentationDescriptorV2\`) that declares a single source (React component key or BlockNote doc) and a list of output targets (react, markdown, application/json, application/xml). A pluggable \`TransformEngine\` renders any target and applies PII redaction.
|
|
21
|
+
|
|
22
|
+
### Types
|
|
23
|
+
|
|
24
|
+
\`\`\`ts
|
|
25
|
+
type PresentationTarget =
|
|
26
|
+
| 'react'
|
|
27
|
+
| 'markdown'
|
|
28
|
+
| 'application/json'
|
|
29
|
+
| 'application/xml';
|
|
30
|
+
|
|
31
|
+
type PresentationSource =
|
|
32
|
+
| {
|
|
33
|
+
type: 'component';
|
|
34
|
+
framework: 'react';
|
|
35
|
+
componentKey: string;
|
|
36
|
+
props?: AnySchemaModel;
|
|
37
|
+
}
|
|
38
|
+
| { type: 'blocknotejs'; docJson: unknown; blockConfig?: unknown };
|
|
39
|
+
|
|
40
|
+
interface PresentationDescriptorV2 {
|
|
41
|
+
meta: PresentationV2Meta; // includes partial OwnerShipMeta + description
|
|
42
|
+
policy?: { flags?: string[]; pii?: string[] };
|
|
43
|
+
source: PresentationSource;
|
|
44
|
+
targets: PresentationTarget[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Shared ownership schema (source of truth in @lssm/lib.contracts/src/ownership.ts)
|
|
48
|
+
interface OwnerShipMeta {
|
|
49
|
+
title: string;
|
|
50
|
+
description: string;
|
|
51
|
+
domain: string;
|
|
52
|
+
owners: Owner[];
|
|
53
|
+
tags: Tag[];
|
|
54
|
+
stability: Stability;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
58
|
+
type Owner = string; // curated list available in code (e.g., '@sigil-team', 'team-strit')
|
|
59
|
+
type Tag = string; // curated list available in code (e.g., 'auth', 'spots')
|
|
60
|
+
|
|
61
|
+
// For V2 presentations, meta is a Partial<OwnerShipMeta> plus description, name, version
|
|
62
|
+
interface PresentationV2Meta extends Partial<OwnerShipMeta> {
|
|
63
|
+
name: string;
|
|
64
|
+
version: number;
|
|
65
|
+
description?: string;
|
|
66
|
+
}
|
|
67
|
+
\`\`\`
|
|
68
|
+
|
|
69
|
+
### Engine
|
|
70
|
+
|
|
71
|
+
Use \`createDefaultTransformEngine()\` and register custom renderers as needed (e.g., high-fidelity BlockNote → Markdown). The default engine supports markdown/json/xml; a React renderer returns a serializable descriptor the host app renders via a \`componentMap\` or a BlockNote renderer. The canonical source type string is \`blocknotejs\` (not \`blocknote\`).
|
|
72
|
+
|
|
73
|
+
PII paths (JSON-like) are redacted from rendered outputs.
|
|
74
|
+
|
|
75
|
+
### MCP Integration
|
|
76
|
+
|
|
77
|
+
\`createMcpServer\` accepts \`presentationsV2\`. Each descriptor is exposed under \`presentation://<name>/v<version>\` and negotiated variants (\`.md/.json/.xml\`) are rendered by the engine.
|
|
78
|
+
|
|
79
|
+
### Migration
|
|
80
|
+
|
|
81
|
+
- V1 \`PresentationSpec\` remains supported; a back-compat helper converts V1 → V2 when convenient.
|
|
82
|
+
- Prefer V2 for new work.
|
|
83
|
+
|
|
84
|
+
### Examples (Sigil)
|
|
85
|
+
|
|
86
|
+
- \`sigil.auth.webauth_tabs_v2\`: component source (\`componentKey: 'sigil.webauth.tabs'\`), targets \`react/json/xml\`.
|
|
87
|
+
- \`sigil.signup.guide_v2\`: BlockNote doc source, targets \`react/markdown/json/xml\`.
|
|
88
|
+
|
|
89
|
+
### React Rendering
|
|
90
|
+
|
|
91
|
+
Host apps use a \`componentMap\` (e.g., \`'sigil.webauth.tabs' → WebAuthTabs\`) and a BlockNote renderer to turn the React render descriptor into elements.`
|
|
92
|
+
}];
|
|
93
|
+
registerDocBlocks(techContractsDocs);
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
export { techContractsDocs };
|
|
97
|
+
//# sourceMappingURL=tech-contracts.docs.js.map
|