@lssm/module.contractspec-examples 0.0.0-canary-20251213172311
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/README.md +18 -0
- package/dist/builtins.js +1 -0
- package/dist/index.js +1 -0
- package/dist/registry.js +1 -0
- package/dist/validate.js +1 -0
- package/package.json +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @lssm/module.contractspec-examples
|
|
2
|
+
|
|
3
|
+
Pure, deterministic types and registries for ContractSpec Examples.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
This module defines the canonical “Example” shape (metadata + entrypoints) and exposes:
|
|
8
|
+
|
|
9
|
+
- A registry API to list/search examples
|
|
10
|
+
- Pure validators to enforce minimum required metadata across examples
|
|
11
|
+
|
|
12
|
+
## Design principles
|
|
13
|
+
|
|
14
|
+
- No I/O (no filesystem, no network)
|
|
15
|
+
- Deterministic outputs from explicit inputs
|
|
16
|
+
- Strong typing (no `any`)
|
|
17
|
+
|
|
18
|
+
|
package/dist/builtins.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@lssm/example.agent-console/example";import t from"@lssm/example.ai-support-bot/example";import n from"@lssm/example.analytics-dashboard/example";import r from"@lssm/example.content-generation/example";import i from"@lssm/example.crm-pipeline/example";import a from"@lssm/example.integration-hub/example";import o from"@lssm/example.integration-stripe/example";import s from"@lssm/example.kb-update-pipeline/example";import c from"@lssm/example.knowledge-canon/example";import l from"@lssm/example.learning-patterns/example";import u from"@lssm/example.learning-journey-ambient-coach/example";import d from"@lssm/example.learning-journey-crm-onboarding/example";import f from"@lssm/example.learning-journey-duo-drills/example";import p from"@lssm/example.learning-journey-platform-tour/example";import m from"@lssm/example.learning-journey-quest-challenges/example";import h from"@lssm/example.learning-journey-registry/example";import g from"@lssm/example.learning-journey-studio-onboarding/example";import _ from"@lssm/example.learning-journey-ui-coaching/example";import v from"@lssm/example.learning-journey-ui-gamified/example";import y from"@lssm/example.learning-journey-ui-onboarding/example";import b from"@lssm/example.learning-journey-ui-shared/example";import x from"@lssm/example.lifecycle-cli/example";import S from"@lssm/example.lifecycle-dashboard/example";import C from"@lssm/example.locale-jurisdiction-gate/example";import w from"@lssm/example.marketplace/example";import T from"@lssm/example.openbanking-powens/example";import E from"@lssm/example.personalization/example";import D from"@lssm/example.policy-safe-knowledge-assistant/example";import O from"@lssm/example.saas-boilerplate/example";import k from"@lssm/example.service-business-os/example";import A from"@lssm/example.team-hub/example";import j from"@lssm/example.versioned-knowledge-base/example";import M from"@lssm/example.wealth-snapshot/example";import N from"@lssm/example.workflow-system/example";const P=[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N];export{P as EXAMPLE_REGISTRY};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EXAMPLE_REGISTRY as e}from"./builtins.js";import{getExample as t,listExamples as n,searchExamples as r}from"./registry.js";import{validateExamples as i}from"./validate.js";export{e as EXAMPLE_REGISTRY,t as getExample,n as listExamples,r as searchExamples,i as validateExamples};
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EXAMPLE_REGISTRY as e}from"./builtins.js";function t(){return e.slice().sort((e,t)=>e.id.localeCompare(t.id))}function n(t){return e.find(e=>e.id===t)}function r(e){let n=e.toLowerCase().trim();return n?t().filter(e=>`${e.id} ${e.title} ${e.summary} ${e.tags.join(` `)}`.toLowerCase().includes(n)):[...t()]}export{n as getExample,t as listExamples,r as searchExamples};
|
package/dist/validate.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e}from"zod";const t=e.object({id:e.string().min(1),title:e.string().min(1),summary:e.string().min(1),tags:e.array(e.string()).default([]),kind:e.enum([`template`,`workflow`,`integration`,`knowledge`,`blueprint`,`ui`,`script`,`library`]),visibility:e.enum([`public`,`internal`,`mixed`]),docs:e.object({rootDocId:e.string().optional(),goalDocId:e.string().optional(),usageDocId:e.string().optional(),referenceDocId:e.string().optional(),constraintsDocId:e.string().optional()}).optional(),entrypoints:e.object({packageName:e.string().min(1),feature:e.string().optional(),presentations:e.string().optional(),contracts:e.string().optional(),handlers:e.string().optional(),ui:e.string().optional(),docs:e.string().optional()}),surfaces:e.object({templates:e.boolean(),sandbox:e.object({enabled:e.boolean(),modes:e.array(e.enum([`playground`,`specs`,`builder`,`markdown`,`evolution`]))}),studio:e.object({enabled:e.boolean(),installable:e.boolean()}),mcp:e.object({enabled:e.boolean()})})});function n(e){let n=[],r=new Set;for(let i of e){if(r.has(i.id)){n.push({exampleId:i.id,message:`Duplicate example id: ${i.id}`});continue}r.add(i.id);let e=t.safeParse(i);if(!e.success)for(let t of e.error.issues)n.push({exampleId:i.id,message:t.message,path:t.path.join(`.`)})}return n.length?{ok:!1,errors:n}:{ok:!0,examples:e}}export{n as validateExamples};
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lssm/module.contractspec-examples",
|
|
3
|
+
"version": "0.0.0-canary-20251213172311",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
14
|
+
"build": "bun build:bundle && bun build:types",
|
|
15
|
+
"build:bundle": "tsdown",
|
|
16
|
+
"build:types": "tsc --noEmit",
|
|
17
|
+
"dev": "bun build:bundle --watch",
|
|
18
|
+
"clean": "rimraf dist .turbo",
|
|
19
|
+
"lint": "bun lint:fix",
|
|
20
|
+
"lint:fix": "eslint src --fix",
|
|
21
|
+
"lint:check": "eslint src",
|
|
22
|
+
"test": "bun run"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@lssm/example.agent-console": "workspace:*",
|
|
26
|
+
"@lssm/example.ai-support-bot": "workspace:*",
|
|
27
|
+
"@lssm/example.analytics-dashboard": "workspace:*",
|
|
28
|
+
"@lssm/example.content-generation": "workspace:*",
|
|
29
|
+
"@lssm/example.crm-pipeline": "workspace:*",
|
|
30
|
+
"@lssm/example.integration-hub": "workspace:*",
|
|
31
|
+
"@lssm/example.integration-stripe": "workspace:*",
|
|
32
|
+
"@lssm/example.kb-update-pipeline": "workspace:*",
|
|
33
|
+
"@lssm/example.knowledge-canon": "workspace:*",
|
|
34
|
+
"@lssm/example.learning-patterns": "workspace:*",
|
|
35
|
+
"@lssm/example.learning-journey-ambient-coach": "workspace:*",
|
|
36
|
+
"@lssm/example.learning-journey-crm-onboarding": "workspace:*",
|
|
37
|
+
"@lssm/example.learning-journey-duo-drills": "workspace:*",
|
|
38
|
+
"@lssm/example.learning-journey-platform-tour": "workspace:*",
|
|
39
|
+
"@lssm/example.learning-journey-quest-challenges": "workspace:*",
|
|
40
|
+
"@lssm/example.learning-journey-registry": "workspace:*",
|
|
41
|
+
"@lssm/example.learning-journey-studio-onboarding": "workspace:*",
|
|
42
|
+
"@lssm/example.learning-journey-ui-coaching": "workspace:*",
|
|
43
|
+
"@lssm/example.learning-journey-ui-gamified": "workspace:*",
|
|
44
|
+
"@lssm/example.learning-journey-ui-onboarding": "workspace:*",
|
|
45
|
+
"@lssm/example.learning-journey-ui-shared": "workspace:*",
|
|
46
|
+
"@lssm/example.lifecycle-cli": "workspace:*",
|
|
47
|
+
"@lssm/example.lifecycle-dashboard": "workspace:*",
|
|
48
|
+
"@lssm/example.locale-jurisdiction-gate": "workspace:*",
|
|
49
|
+
"@lssm/example.marketplace": "workspace:*",
|
|
50
|
+
"@lssm/example.openbanking-powens": "workspace:*",
|
|
51
|
+
"@lssm/example.personalization": "workspace:*",
|
|
52
|
+
"@lssm/example.policy-safe-knowledge-assistant": "workspace:*",
|
|
53
|
+
"@lssm/example.saas-boilerplate": "workspace:*",
|
|
54
|
+
"@lssm/example.service-business-os": "workspace:*",
|
|
55
|
+
"@lssm/example.versioned-knowledge-base": "workspace:*",
|
|
56
|
+
"@lssm/example.team-hub": "workspace:*",
|
|
57
|
+
"@lssm/example.wealth-snapshot": "workspace:*",
|
|
58
|
+
"@lssm/example.workflow-system": "workspace:*",
|
|
59
|
+
"zod": "^4.1.13"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@lssm/tool.tsdown": "workspace:*",
|
|
63
|
+
"@lssm/tool.typescript": "workspace:*",
|
|
64
|
+
"tsdown": "^0.17.0",
|
|
65
|
+
"typescript": "^5.9.3"
|
|
66
|
+
},
|
|
67
|
+
"exports": {
|
|
68
|
+
".": "./src/index.ts",
|
|
69
|
+
"./*": "./*"
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public",
|
|
73
|
+
"exports": {
|
|
74
|
+
".": "./dist/index.js",
|
|
75
|
+
"./*": "./*"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|