@lssm/module.contractspec-examples 0.0.0-canary-20251217060834 → 0.0.0-canary-20251217072406
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/dist/builtins.js +75 -1
- package/dist/examples/agent-console/dist/example.js +49 -0
- package/dist/examples/ai-support-bot/dist/example.js +37 -0
- package/dist/examples/analytics-dashboard/dist/example.js +49 -0
- package/dist/examples/content-generation/dist/example.js +37 -0
- package/dist/examples/crm-pipeline/dist/example.js +44 -0
- package/dist/examples/integration-hub/dist/example.js +49 -0
- package/dist/examples/integration-stripe/dist/example.js +38 -0
- package/dist/examples/kb-update-pipeline/dist/example.js +41 -0
- package/dist/examples/knowledge-canon/dist/example.js +38 -0
- package/dist/examples/learning-journey-ambient-coach/src/example.js +34 -0
- package/dist/examples/learning-journey-crm-onboarding/dist/example.js +33 -0
- package/dist/examples/learning-journey-duo-drills/src/example.js +35 -0
- package/dist/examples/learning-journey-platform-tour/dist/example.js +37 -0
- package/dist/examples/learning-journey-quest-challenges/src/example.js +34 -0
- package/dist/examples/learning-journey-registry/dist/example.js +33 -0
- package/dist/examples/learning-journey-studio-onboarding/dist/example.js +33 -0
- package/dist/examples/learning-journey-ui-coaching/src/example.js +34 -0
- package/dist/examples/learning-journey-ui-gamified/src/example.js +34 -0
- package/dist/examples/learning-journey-ui-onboarding/src/example.js +34 -0
- package/dist/examples/learning-journey-ui-shared/src/example.js +34 -0
- package/dist/examples/learning-patterns/dist/example.js +33 -0
- package/dist/examples/lifecycle-cli/dist/example.js +36 -0
- package/dist/examples/lifecycle-dashboard/dist/example.js +34 -0
- package/dist/examples/locale-jurisdiction-gate/dist/example.js +38 -0
- package/dist/examples/marketplace/dist/example.js +49 -0
- package/dist/examples/openbanking-powens/dist/example.js +38 -0
- package/dist/examples/personalization/dist/example.js +37 -0
- package/dist/examples/policy-safe-knowledge-assistant/dist/example.js +45 -0
- package/dist/examples/saas-boilerplate/dist/example.js +44 -0
- package/dist/examples/service-business-os/dist/example.js +44 -0
- package/dist/examples/team-hub/dist/example.js +49 -0
- package/dist/examples/versioned-knowledge-base/dist/example.js +40 -0
- package/dist/examples/wealth-snapshot/dist/example.js +48 -0
- package/dist/examples/workflow-system/dist/example.js +49 -0
- package/dist/index.js +5 -1
- package/dist/registry.js +19 -1
- package/dist/validate.js +89 -1
- package/package.json +37 -37
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//#region ../../examples/wealth-snapshot/dist/example.js
|
|
2
|
+
var example_default = {
|
|
3
|
+
id: "wealth-snapshot",
|
|
4
|
+
title: "Wealth Snapshot",
|
|
5
|
+
summary: "Simple wealth overview with accounts, assets, liabilities, goals, and net-worth snapshots.",
|
|
6
|
+
tags: [
|
|
7
|
+
"finance",
|
|
8
|
+
"net-worth",
|
|
9
|
+
"goals"
|
|
10
|
+
],
|
|
11
|
+
kind: "template",
|
|
12
|
+
visibility: "public",
|
|
13
|
+
docs: {
|
|
14
|
+
rootDocId: "docs.examples.wealth-snapshot",
|
|
15
|
+
goalDocId: "docs.examples.wealth-snapshot.goal",
|
|
16
|
+
usageDocId: "docs.examples.wealth-snapshot.usage",
|
|
17
|
+
constraintsDocId: "docs.examples.wealth-snapshot.constraints"
|
|
18
|
+
},
|
|
19
|
+
entrypoints: {
|
|
20
|
+
packageName: "@lssm/example.wealth-snapshot",
|
|
21
|
+
feature: "./feature",
|
|
22
|
+
contracts: "./contracts",
|
|
23
|
+
presentations: "./presentations",
|
|
24
|
+
handlers: "./handlers",
|
|
25
|
+
docs: "./docs"
|
|
26
|
+
},
|
|
27
|
+
surfaces: {
|
|
28
|
+
templates: true,
|
|
29
|
+
sandbox: {
|
|
30
|
+
enabled: true,
|
|
31
|
+
modes: [
|
|
32
|
+
"playground",
|
|
33
|
+
"specs",
|
|
34
|
+
"builder",
|
|
35
|
+
"markdown",
|
|
36
|
+
"evolution"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
studio: {
|
|
40
|
+
enabled: true,
|
|
41
|
+
installable: true
|
|
42
|
+
},
|
|
43
|
+
mcp: { enabled: true }
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { example_default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//#region ../../examples/workflow-system/dist/example.js
|
|
2
|
+
var example_default = {
|
|
3
|
+
id: "workflow-system",
|
|
4
|
+
title: "Workflow / Approval System",
|
|
5
|
+
summary: "State-machine driven approvals with RBAC, audit trail, notifications, and jobs.",
|
|
6
|
+
tags: [
|
|
7
|
+
"workflow",
|
|
8
|
+
"approval",
|
|
9
|
+
"state-machine",
|
|
10
|
+
"rbac"
|
|
11
|
+
],
|
|
12
|
+
kind: "template",
|
|
13
|
+
visibility: "public",
|
|
14
|
+
docs: {
|
|
15
|
+
rootDocId: "docs.examples.workflow-system",
|
|
16
|
+
goalDocId: "docs.examples.workflow-system.goal",
|
|
17
|
+
usageDocId: "docs.examples.workflow-system.usage",
|
|
18
|
+
constraintsDocId: "docs.examples.workflow-system.constraints"
|
|
19
|
+
},
|
|
20
|
+
entrypoints: {
|
|
21
|
+
packageName: "@lssm/example.workflow-system",
|
|
22
|
+
feature: "./feature",
|
|
23
|
+
contracts: "./contracts",
|
|
24
|
+
presentations: "./presentations",
|
|
25
|
+
handlers: "./handlers",
|
|
26
|
+
docs: "./docs"
|
|
27
|
+
},
|
|
28
|
+
surfaces: {
|
|
29
|
+
templates: true,
|
|
30
|
+
sandbox: {
|
|
31
|
+
enabled: true,
|
|
32
|
+
modes: [
|
|
33
|
+
"playground",
|
|
34
|
+
"specs",
|
|
35
|
+
"builder",
|
|
36
|
+
"markdown",
|
|
37
|
+
"evolution"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
studio: {
|
|
41
|
+
enabled: true,
|
|
42
|
+
installable: true
|
|
43
|
+
},
|
|
44
|
+
mcp: { enabled: true }
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { example_default };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import{EXAMPLE_REGISTRY
|
|
1
|
+
import { EXAMPLE_REGISTRY } from "./builtins.js";
|
|
2
|
+
import { getExample, listExamples, searchExamples } from "./registry.js";
|
|
3
|
+
import { validateExamples } from "./validate.js";
|
|
4
|
+
|
|
5
|
+
export { EXAMPLE_REGISTRY, getExample, listExamples, searchExamples, validateExamples };
|
package/dist/registry.js
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
|
-
import{EXAMPLE_REGISTRY
|
|
1
|
+
import { EXAMPLE_REGISTRY } from "./builtins.js";
|
|
2
|
+
|
|
3
|
+
//#region src/registry.ts
|
|
4
|
+
function listExamples() {
|
|
5
|
+
return EXAMPLE_REGISTRY.slice().sort((a, b) => a.id.localeCompare(b.id));
|
|
6
|
+
}
|
|
7
|
+
function getExample(id) {
|
|
8
|
+
return EXAMPLE_REGISTRY.find((ex) => ex.id === id);
|
|
9
|
+
}
|
|
10
|
+
function searchExamples(query) {
|
|
11
|
+
const q = query.toLowerCase().trim();
|
|
12
|
+
if (!q) return [...listExamples()];
|
|
13
|
+
return listExamples().filter((ex) => {
|
|
14
|
+
return `${ex.id} ${ex.title} ${ex.summary} ${ex.tags.join(" ")}`.toLowerCase().includes(q);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { getExample, listExamples, searchExamples };
|
package/dist/validate.js
CHANGED
|
@@ -1 +1,89 @@
|
|
|
1
|
-
import{z
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/validate.ts
|
|
4
|
+
const ExampleDefinitionSchema = z.object({
|
|
5
|
+
id: z.string().min(1),
|
|
6
|
+
title: z.string().min(1),
|
|
7
|
+
summary: z.string().min(1),
|
|
8
|
+
tags: z.array(z.string()).default([]),
|
|
9
|
+
kind: z.enum([
|
|
10
|
+
"template",
|
|
11
|
+
"workflow",
|
|
12
|
+
"integration",
|
|
13
|
+
"knowledge",
|
|
14
|
+
"blueprint",
|
|
15
|
+
"ui",
|
|
16
|
+
"script",
|
|
17
|
+
"library"
|
|
18
|
+
]),
|
|
19
|
+
visibility: z.enum([
|
|
20
|
+
"public",
|
|
21
|
+
"internal",
|
|
22
|
+
"mixed"
|
|
23
|
+
]),
|
|
24
|
+
docs: z.object({
|
|
25
|
+
rootDocId: z.string().optional(),
|
|
26
|
+
goalDocId: z.string().optional(),
|
|
27
|
+
usageDocId: z.string().optional(),
|
|
28
|
+
referenceDocId: z.string().optional(),
|
|
29
|
+
constraintsDocId: z.string().optional()
|
|
30
|
+
}).optional(),
|
|
31
|
+
entrypoints: z.object({
|
|
32
|
+
packageName: z.string().min(1),
|
|
33
|
+
feature: z.string().optional(),
|
|
34
|
+
presentations: z.string().optional(),
|
|
35
|
+
contracts: z.string().optional(),
|
|
36
|
+
handlers: z.string().optional(),
|
|
37
|
+
ui: z.string().optional(),
|
|
38
|
+
docs: z.string().optional()
|
|
39
|
+
}),
|
|
40
|
+
surfaces: z.object({
|
|
41
|
+
templates: z.boolean(),
|
|
42
|
+
sandbox: z.object({
|
|
43
|
+
enabled: z.boolean(),
|
|
44
|
+
modes: z.array(z.enum([
|
|
45
|
+
"playground",
|
|
46
|
+
"specs",
|
|
47
|
+
"builder",
|
|
48
|
+
"markdown",
|
|
49
|
+
"evolution"
|
|
50
|
+
]))
|
|
51
|
+
}),
|
|
52
|
+
studio: z.object({
|
|
53
|
+
enabled: z.boolean(),
|
|
54
|
+
installable: z.boolean()
|
|
55
|
+
}),
|
|
56
|
+
mcp: z.object({ enabled: z.boolean() })
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
function validateExamples(examples) {
|
|
60
|
+
const errors = [];
|
|
61
|
+
const seen = /* @__PURE__ */ new Set();
|
|
62
|
+
for (const example of examples) {
|
|
63
|
+
if (seen.has(example.id)) {
|
|
64
|
+
errors.push({
|
|
65
|
+
exampleId: example.id,
|
|
66
|
+
message: `Duplicate example id: ${example.id}`
|
|
67
|
+
});
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
seen.add(example.id);
|
|
71
|
+
const parsed = ExampleDefinitionSchema.safeParse(example);
|
|
72
|
+
if (!parsed.success) for (const issue of parsed.error.issues) errors.push({
|
|
73
|
+
exampleId: example.id,
|
|
74
|
+
message: issue.message,
|
|
75
|
+
path: issue.path.join(".")
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (errors.length) return {
|
|
79
|
+
ok: false,
|
|
80
|
+
errors
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
ok: true,
|
|
84
|
+
examples
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
export { validateExamples };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/module.contractspec-examples",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217072406",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,45 +23,45 @@
|
|
|
23
23
|
"test": "bun run"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@lssm/example.agent-console": "0.0.0-canary-
|
|
27
|
-
"@lssm/example.ai-support-bot": "0.0.0-canary-
|
|
28
|
-
"@lssm/example.analytics-dashboard": "0.0.0-canary-
|
|
29
|
-
"@lssm/example.content-generation": "0.0.0-canary-
|
|
30
|
-
"@lssm/example.crm-pipeline": "0.0.0-canary-
|
|
31
|
-
"@lssm/example.integration-hub": "0.0.0-canary-
|
|
32
|
-
"@lssm/example.integration-stripe": "0.0.0-canary-
|
|
33
|
-
"@lssm/example.kb-update-pipeline": "0.0.0-canary-
|
|
34
|
-
"@lssm/example.knowledge-canon": "0.0.0-canary-
|
|
35
|
-
"@lssm/example.learning-patterns": "0.0.0-canary-
|
|
36
|
-
"@lssm/example.learning-journey-ambient-coach": "0.0.0-canary-
|
|
37
|
-
"@lssm/example.learning-journey-crm-onboarding": "0.0.0-canary-
|
|
38
|
-
"@lssm/example.learning-journey-duo-drills": "0.0.0-canary-
|
|
39
|
-
"@lssm/example.learning-journey-platform-tour": "0.0.0-canary-
|
|
40
|
-
"@lssm/example.learning-journey-quest-challenges": "0.0.0-canary-
|
|
41
|
-
"@lssm/example.learning-journey-registry": "0.0.0-canary-
|
|
42
|
-
"@lssm/example.learning-journey-studio-onboarding": "0.0.0-canary-
|
|
43
|
-
"@lssm/example.learning-journey-ui-coaching": "0.0.0-canary-
|
|
44
|
-
"@lssm/example.learning-journey-ui-gamified": "0.0.0-canary-
|
|
45
|
-
"@lssm/example.learning-journey-ui-onboarding": "0.0.0-canary-
|
|
46
|
-
"@lssm/example.learning-journey-ui-shared": "0.0.0-canary-
|
|
47
|
-
"@lssm/example.lifecycle-cli": "0.0.0-canary-
|
|
48
|
-
"@lssm/example.lifecycle-dashboard": "0.0.0-canary-
|
|
49
|
-
"@lssm/example.locale-jurisdiction-gate": "0.0.0-canary-
|
|
50
|
-
"@lssm/example.marketplace": "0.0.0-canary-
|
|
51
|
-
"@lssm/example.openbanking-powens": "0.0.0-canary-
|
|
52
|
-
"@lssm/example.personalization": "0.0.0-canary-
|
|
53
|
-
"@lssm/example.policy-safe-knowledge-assistant": "0.0.0-canary-
|
|
54
|
-
"@lssm/example.saas-boilerplate": "0.0.0-canary-
|
|
55
|
-
"@lssm/example.service-business-os": "0.0.0-canary-
|
|
56
|
-
"@lssm/example.versioned-knowledge-base": "0.0.0-canary-
|
|
57
|
-
"@lssm/example.team-hub": "0.0.0-canary-
|
|
58
|
-
"@lssm/example.wealth-snapshot": "0.0.0-canary-
|
|
59
|
-
"@lssm/example.workflow-system": "0.0.0-canary-
|
|
26
|
+
"@lssm/example.agent-console": "0.0.0-canary-20251217072406",
|
|
27
|
+
"@lssm/example.ai-support-bot": "0.0.0-canary-20251217072406",
|
|
28
|
+
"@lssm/example.analytics-dashboard": "0.0.0-canary-20251217072406",
|
|
29
|
+
"@lssm/example.content-generation": "0.0.0-canary-20251217072406",
|
|
30
|
+
"@lssm/example.crm-pipeline": "0.0.0-canary-20251217072406",
|
|
31
|
+
"@lssm/example.integration-hub": "0.0.0-canary-20251217072406",
|
|
32
|
+
"@lssm/example.integration-stripe": "0.0.0-canary-20251217072406",
|
|
33
|
+
"@lssm/example.kb-update-pipeline": "0.0.0-canary-20251217072406",
|
|
34
|
+
"@lssm/example.knowledge-canon": "0.0.0-canary-20251217072406",
|
|
35
|
+
"@lssm/example.learning-patterns": "0.0.0-canary-20251217072406",
|
|
36
|
+
"@lssm/example.learning-journey-ambient-coach": "0.0.0-canary-20251217072406",
|
|
37
|
+
"@lssm/example.learning-journey-crm-onboarding": "0.0.0-canary-20251217072406",
|
|
38
|
+
"@lssm/example.learning-journey-duo-drills": "0.0.0-canary-20251217072406",
|
|
39
|
+
"@lssm/example.learning-journey-platform-tour": "0.0.0-canary-20251217072406",
|
|
40
|
+
"@lssm/example.learning-journey-quest-challenges": "0.0.0-canary-20251217072406",
|
|
41
|
+
"@lssm/example.learning-journey-registry": "0.0.0-canary-20251217072406",
|
|
42
|
+
"@lssm/example.learning-journey-studio-onboarding": "0.0.0-canary-20251217072406",
|
|
43
|
+
"@lssm/example.learning-journey-ui-coaching": "0.0.0-canary-20251217072406",
|
|
44
|
+
"@lssm/example.learning-journey-ui-gamified": "0.0.0-canary-20251217072406",
|
|
45
|
+
"@lssm/example.learning-journey-ui-onboarding": "0.0.0-canary-20251217072406",
|
|
46
|
+
"@lssm/example.learning-journey-ui-shared": "0.0.0-canary-20251217072406",
|
|
47
|
+
"@lssm/example.lifecycle-cli": "0.0.0-canary-20251217072406",
|
|
48
|
+
"@lssm/example.lifecycle-dashboard": "0.0.0-canary-20251217072406",
|
|
49
|
+
"@lssm/example.locale-jurisdiction-gate": "0.0.0-canary-20251217072406",
|
|
50
|
+
"@lssm/example.marketplace": "0.0.0-canary-20251217072406",
|
|
51
|
+
"@lssm/example.openbanking-powens": "0.0.0-canary-20251217072406",
|
|
52
|
+
"@lssm/example.personalization": "0.0.0-canary-20251217072406",
|
|
53
|
+
"@lssm/example.policy-safe-knowledge-assistant": "0.0.0-canary-20251217072406",
|
|
54
|
+
"@lssm/example.saas-boilerplate": "0.0.0-canary-20251217072406",
|
|
55
|
+
"@lssm/example.service-business-os": "0.0.0-canary-20251217072406",
|
|
56
|
+
"@lssm/example.versioned-knowledge-base": "0.0.0-canary-20251217072406",
|
|
57
|
+
"@lssm/example.team-hub": "0.0.0-canary-20251217072406",
|
|
58
|
+
"@lssm/example.wealth-snapshot": "0.0.0-canary-20251217072406",
|
|
59
|
+
"@lssm/example.workflow-system": "0.0.0-canary-20251217072406",
|
|
60
60
|
"zod": "^4.1.13"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
64
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
63
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251217072406",
|
|
64
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251217072406",
|
|
65
65
|
"tsdown": "^0.17.4",
|
|
66
66
|
"typescript": "^5.9.3"
|
|
67
67
|
},
|