@contractspec/bundle.library 3.7.7 → 3.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/bundle.library",
3
- "version": "3.7.7",
3
+ "version": "3.8.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rm -rf dist",
@@ -300,6 +300,18 @@
300
300
  "node": "./dist/node/components/docs/examples/DocsExamplesPage.js",
301
301
  "default": "./dist/components/docs/examples/DocsExamplesPage.js"
302
302
  },
303
+ "./components/docs/examples/exampleShowcaseData": {
304
+ "types": "./dist/components/docs/examples/exampleShowcaseData.d.ts",
305
+ "bun": "./dist/components/docs/examples/exampleShowcaseData.js",
306
+ "node": "./dist/node/components/docs/examples/exampleShowcaseData.js",
307
+ "default": "./dist/components/docs/examples/exampleShowcaseData.js"
308
+ },
309
+ "./components/docs/examples/ExampleShowcasePage": {
310
+ "types": "./dist/components/docs/examples/ExampleShowcasePage.d.ts",
311
+ "bun": "./dist/components/docs/examples/ExampleShowcasePage.js",
312
+ "node": "./dist/node/components/docs/examples/ExampleShowcasePage.js",
313
+ "default": "./dist/components/docs/examples/ExampleShowcasePage.js"
314
+ },
303
315
  "./components/docs/generated": {
304
316
  "types": "./dist/components/docs/generated/index.d.ts",
305
317
  "bun": "./dist/components/docs/generated/index.js",
@@ -1814,23 +1826,23 @@
1814
1826
  "dependencies": {
1815
1827
  "@apollo/client": "^4.1.6",
1816
1828
  "@modelcontextprotocol/sdk": "^1.27.1",
1817
- "@contractspec/lib.ai-providers": "3.7.6",
1818
- "@contractspec/lib.contracts-spec": "4.0.0",
1819
- "@contractspec/lib.contracts-library": "3.7.7",
1820
- "@contractspec/lib.content-gen": "3.7.7",
1821
- "@contractspec/lib.contracts-runtime-server-mcp": "3.7.7",
1822
- "@contractspec/lib.design-system": "3.8.0",
1823
- "@contractspec/lib.surface-runtime": "0.5.7",
1824
- "@contractspec/lib.provider-ranking": "0.7.6",
1825
- "@contractspec/lib.example-shared-ui": "6.0.7",
1826
- "@contractspec/lib.knowledge": "3.7.7",
1827
- "@contractspec/lib.logger": "3.7.6",
1828
- "@contractspec/lib.runtime-sandbox": "2.7.6",
1829
- "@contractspec/lib.schema": "3.7.6",
1830
- "@contractspec/lib.ui-kit-web": "3.8.0",
1831
- "@contractspec/lib.ui-link": "3.7.6",
1832
- "@contractspec/module.context-storage": "0.7.7",
1833
- "@contractspec/module.examples": "3.7.7",
1829
+ "@contractspec/lib.ai-providers": "3.7.8",
1830
+ "@contractspec/lib.contracts-spec": "4.1.2",
1831
+ "@contractspec/lib.contracts-library": "3.7.10",
1832
+ "@contractspec/lib.content-gen": "3.7.10",
1833
+ "@contractspec/lib.contracts-runtime-server-mcp": "3.7.10",
1834
+ "@contractspec/lib.design-system": "3.8.3",
1835
+ "@contractspec/lib.surface-runtime": "0.5.10",
1836
+ "@contractspec/lib.provider-ranking": "0.7.8",
1837
+ "@contractspec/lib.example-shared-ui": "6.0.10",
1838
+ "@contractspec/lib.knowledge": "3.7.10",
1839
+ "@contractspec/lib.logger": "3.7.8",
1840
+ "@contractspec/lib.runtime-sandbox": "2.7.9",
1841
+ "@contractspec/lib.schema": "3.7.8",
1842
+ "@contractspec/lib.ui-kit-web": "3.9.2",
1843
+ "@contractspec/lib.ui-link": "3.7.8",
1844
+ "@contractspec/module.context-storage": "0.7.10",
1845
+ "@contractspec/module.examples": "3.8.2",
1834
1846
  "@dnd-kit/core": "^6.1.0",
1835
1847
  "@dnd-kit/sortable": "^10.0.0",
1836
1848
  "@dnd-kit/utilities": "^3.2.2",
@@ -1846,16 +1858,16 @@
1846
1858
  "posthog-react-native": "^4.37.4",
1847
1859
  "react-hook-form": "^7.71.2",
1848
1860
  "zod": "^4.3.5",
1849
- "@contractspec/lib.contracts-integrations": "3.7.7",
1850
- "@contractspec/lib.contracts-runtime-server-rest": "3.7.7",
1851
- "@contractspec/lib.contracts-runtime-server-graphql": "3.7.7"
1861
+ "@contractspec/lib.contracts-integrations": "3.8.2",
1862
+ "@contractspec/lib.contracts-runtime-server-rest": "3.7.10",
1863
+ "@contractspec/lib.contracts-runtime-server-graphql": "3.7.10"
1852
1864
  },
1853
1865
  "devDependencies": {
1854
1866
  "@types/react": "~19.2.14",
1855
- "@contractspec/tool.typescript": "3.7.6",
1867
+ "@contractspec/tool.typescript": "3.7.8",
1856
1868
  "typescript": "^5.9.3",
1857
1869
  "@types/bun": "~1.3.11",
1858
- "@contractspec/tool.bun": "3.7.6"
1870
+ "@contractspec/tool.bun": "3.7.8"
1859
1871
  },
1860
1872
  "repository": {
1861
1873
  "type": "git",
@@ -2148,6 +2160,18 @@
2148
2160
  "node": "./dist/node/components/docs/examples/DocsExamplesPage.js",
2149
2161
  "default": "./dist/components/docs/examples/DocsExamplesPage.js"
2150
2162
  },
2163
+ "./components/docs/examples/exampleShowcaseData": {
2164
+ "types": "./dist/components/docs/examples/exampleShowcaseData.d.ts",
2165
+ "bun": "./dist/components/docs/examples/exampleShowcaseData.js",
2166
+ "node": "./dist/node/components/docs/examples/exampleShowcaseData.js",
2167
+ "default": "./dist/components/docs/examples/exampleShowcaseData.js"
2168
+ },
2169
+ "./components/docs/examples/ExampleShowcasePage": {
2170
+ "types": "./dist/components/docs/examples/ExampleShowcasePage.d.ts",
2171
+ "bun": "./dist/components/docs/examples/ExampleShowcasePage.js",
2172
+ "node": "./dist/node/components/docs/examples/ExampleShowcasePage.js",
2173
+ "default": "./dist/components/docs/examples/ExampleShowcasePage.js"
2174
+ },
2151
2175
  "./components/docs/generated": {
2152
2176
  "types": "./dist/components/docs/generated/index.d.ts",
2153
2177
  "bun": "./dist/components/docs/generated/index.js",
@@ -9,6 +9,7 @@ import {
9
9
  import { HStack, VStack } from '@contractspec/lib.ui-kit-web/ui/stack';
10
10
  import { H1, Muted } from '@contractspec/lib.ui-kit-web/ui/typography';
11
11
  import { listExamples } from '@contractspec/module.examples';
12
+ import { getExampleShowcaseData } from './exampleShowcaseData';
12
13
 
13
14
  interface ExampleItem extends Record<string, unknown> {
14
15
  id: string;
@@ -23,6 +24,12 @@ function buildReferenceRoute(key: string) {
23
24
  return `/docs/reference/${key}/${key}`;
24
25
  }
25
26
 
27
+ function buildDocsRoute(key: string) {
28
+ return getExampleShowcaseData(key)?.sandboxHref
29
+ ? `/docs/examples/${key}`
30
+ : buildReferenceRoute(key);
31
+ }
32
+
26
33
  export function DocsExamplesPage() {
27
34
  const items: ExampleItem[] = listExamples()
28
35
  .map((example) => {
@@ -31,7 +38,7 @@ export function DocsExamplesPage() {
31
38
  id: example.meta.key,
32
39
  title,
33
40
  summary: example.meta.summary ?? example.meta.description,
34
- route: buildReferenceRoute(example.meta.key),
41
+ route: buildDocsRoute(example.meta.key),
35
42
  tags: example.meta.tags,
36
43
  sandboxEnabled: example.surfaces.sandbox.enabled,
37
44
  };
@@ -65,7 +72,11 @@ export function DocsExamplesPage() {
65
72
  return (
66
73
  <HStack gap="xs" justify="end">
67
74
  {example.sandboxEnabled ? (
68
- <ButtonLink href="/sandbox" size="sm" variant="outline">
75
+ <ButtonLink
76
+ href={`/sandbox?template=${example.id}`}
77
+ size="sm"
78
+ variant="outline"
79
+ >
69
80
  Sandbox
70
81
  </ButtonLink>
71
82
  ) : null}
@@ -0,0 +1,122 @@
1
+ import { ButtonLink, CodeBlock } from '@contractspec/lib.design-system';
2
+ import Link from '@contractspec/lib.ui-link';
3
+ import { getExample } from '@contractspec/module.examples';
4
+ import { FileCode2, Play, TerminalSquare } from 'lucide-react';
5
+ import { getExampleShowcaseData } from './exampleShowcaseData';
6
+
7
+ interface ExampleShowcasePageProps {
8
+ exampleKey: 'agent-console' | 'ai-chat-assistant' | 'messaging-agent-actions';
9
+ }
10
+
11
+ export function ExampleShowcasePage({ exampleKey }: ExampleShowcasePageProps) {
12
+ const showcase = getExampleShowcaseData(exampleKey);
13
+ const example = getExample(exampleKey);
14
+
15
+ if (!showcase || !example) {
16
+ return null;
17
+ }
18
+
19
+ const title = example.meta.title ?? example.meta.key;
20
+ const summary = example.meta.summary ?? example.meta.description ?? '';
21
+ const packageName = example.entrypoints.packageName;
22
+
23
+ return (
24
+ <div className="space-y-10">
25
+ <section className="space-y-5">
26
+ <p className="editorial-kicker">Meetup-ready example</p>
27
+ <h1 className="editorial-title max-w-5xl">{title}</h1>
28
+ <p className="editorial-subtitle">{showcase.lead}</p>
29
+ <p className="editorial-copy max-w-4xl">{summary}</p>
30
+ <div className="flex flex-wrap gap-3">
31
+ <ButtonLink href={showcase.sandboxHref}>Open sandbox</ButtonLink>
32
+ <ButtonLink href={showcase.referenceHref} variant="outline">
33
+ Generated reference
34
+ </ButtonLink>
35
+ </div>
36
+ </section>
37
+
38
+ <section className="grid gap-5 lg:grid-cols-3">
39
+ <article className="editorial-panel space-y-4">
40
+ <div className="flex items-center gap-3">
41
+ <div className="rounded-full border border-border/80 bg-background/85 p-2">
42
+ <Play size={18} />
43
+ </div>
44
+ <h2 className="font-semibold text-xl">Sandbox preview</h2>
45
+ </div>
46
+ <p className="editorial-copy text-sm">
47
+ Load the same public browser surface used for the prepared live
48
+ demo.
49
+ </p>
50
+ <ButtonLink href={showcase.sandboxHref} size="sm">
51
+ Open preview
52
+ </ButtonLink>
53
+ </article>
54
+
55
+ <article className="editorial-panel space-y-4">
56
+ <div className="flex items-center gap-3">
57
+ <div className="rounded-full border border-border/80 bg-background/85 p-2">
58
+ <FileCode2 size={18} />
59
+ </div>
60
+ <h2 className="font-semibold text-xl">Reference docs</h2>
61
+ </div>
62
+ <p className="editorial-copy text-sm">
63
+ Inspect the generated contract-facing material instead of relying on
64
+ marketing summaries.
65
+ </p>
66
+ <ButtonLink href={showcase.referenceHref} size="sm" variant="outline">
67
+ Open reference
68
+ </ButtonLink>
69
+ </article>
70
+
71
+ <article className="editorial-panel space-y-4">
72
+ <div className="flex items-center gap-3">
73
+ <div className="rounded-full border border-border/80 bg-background/85 p-2">
74
+ <TerminalSquare size={18} />
75
+ </div>
76
+ <h2 className="font-semibold text-xl">Package context</h2>
77
+ </div>
78
+ <p className="editorial-copy text-sm">
79
+ Use the agent-facing package page for fast repo orientation, then
80
+ jump to the source directory.
81
+ </p>
82
+ <p className="rounded-[18px] border border-border/70 bg-background/75 px-4 py-3 font-mono text-sm">
83
+ {packageName}
84
+ </p>
85
+ <div className="flex flex-wrap gap-2">
86
+ <ButtonLink href={showcase.llmsHref} size="sm" variant="outline">
87
+ LLMS page
88
+ </ButtonLink>
89
+ <ButtonLink href={showcase.repoHref} size="sm" variant="outline">
90
+ GitHub source
91
+ </ButtonLink>
92
+ </div>
93
+ </article>
94
+ </section>
95
+
96
+ <section className="editorial-panel space-y-5">
97
+ <div className="space-y-2">
98
+ <p className="editorial-kicker">Talk commands</p>
99
+ <h2 className="editorial-panel-title">
100
+ Exact local commands for the meetup lane
101
+ </h2>
102
+ <p className="editorial-copy text-sm">
103
+ Use the package build and test first, then launch the web shell and
104
+ open the prepared sandbox route.
105
+ </p>
106
+ </div>
107
+ <CodeBlock
108
+ language="bash"
109
+ filename={`${exampleKey}-meetup-runbook`}
110
+ code={showcase.localCommands}
111
+ />
112
+ <p className="text-muted-foreground text-sm">
113
+ For the full fallback order and safe live-edit workflow, use{' '}
114
+ <Link href="https://github.com/lssm-tech/contractspec/blob/main/docs/meetup-agent-examples-runbook.md">
115
+ the meetup runbook
116
+ </Link>
117
+ .
118
+ </p>
119
+ </section>
120
+ </div>
121
+ );
122
+ }
@@ -0,0 +1,65 @@
1
+ export interface ExampleShowcaseData {
2
+ key: 'agent-console' | 'ai-chat-assistant' | 'messaging-agent-actions';
3
+ lead: string;
4
+ sandboxHref: string;
5
+ referenceHref: string;
6
+ llmsHref: string;
7
+ repoHref: string;
8
+ localCommands: string;
9
+ }
10
+
11
+ const EXAMPLE_SHOWCASES: Record<string, ExampleShowcaseData> = {
12
+ 'agent-console': {
13
+ key: 'agent-console',
14
+ lead: 'Primary meetup path for autonomous agents: typed tools, agent configs, run history, and execution logs in one regenerable surface.',
15
+ sandboxHref: '/sandbox?template=agent-console',
16
+ referenceHref: '/docs/reference/agent-console/agent-console',
17
+ llmsHref: '/llms/example.agent-console',
18
+ repoHref:
19
+ 'https://github.com/lssm-tech/contractspec/tree/main/packages/examples/agent-console',
20
+ localCommands: `bun run --cwd packages/examples/agent-console build
21
+ bun run --cwd packages/examples/agent-console test
22
+ bun run --cwd packages/apps/web-landing dev
23
+
24
+ # Open in the browser
25
+ # http://localhost:3000/sandbox?template=agent-console`,
26
+ },
27
+ 'ai-chat-assistant': {
28
+ key: 'ai-chat-assistant',
29
+ lead: 'Secondary meetup path for MCP-aware assistants: reasoning, sources, suggestions, and a minimal contract-backed search tool.',
30
+ sandboxHref: '/sandbox?template=ai-chat-assistant',
31
+ referenceHref: '/docs/reference/ai-chat-assistant/assistant.search',
32
+ llmsHref: '/llms/example.ai-chat-assistant',
33
+ repoHref:
34
+ 'https://github.com/lssm-tech/contractspec/tree/main/packages/examples/ai-chat-assistant',
35
+ localCommands: `bun run --cwd packages/examples/ai-chat-assistant build
36
+ bun run --cwd packages/examples/ai-chat-assistant test
37
+ bun run --cwd packages/apps/web-landing dev
38
+
39
+ # Open in the browser
40
+ # http://localhost:3000/sandbox?template=ai-chat-assistant`,
41
+ },
42
+ 'messaging-agent-actions': {
43
+ key: 'messaging-agent-actions',
44
+ lead: 'Live messaging lane for the meetup: inbound Slack, WhatsApp, or Telegram messages route through fixed intents, allowlisted actions, and deterministic confirmations.',
45
+ sandboxHref: '/sandbox?template=messaging-agent-actions',
46
+ referenceHref:
47
+ '/docs/reference/messaging-agent-actions/messaging.agentActions.process',
48
+ llmsHref: '/llms/example.messaging-agent-actions',
49
+ repoHref:
50
+ 'https://github.com/lssm-tech/contractspec/tree/main/packages/examples/messaging-agent-actions',
51
+ localCommands: `bun run --cwd packages/examples/messaging-agent-actions build
52
+ bun run --cwd packages/examples/messaging-agent-actions test
53
+ bun run --cwd packages/examples/messaging-agent-actions proof
54
+ bun run --cwd packages/apps/web-landing dev
55
+
56
+ # Open in the browser
57
+ # http://localhost:3000/sandbox?template=messaging-agent-actions`,
58
+ },
59
+ };
60
+
61
+ export function getExampleShowcaseData(
62
+ key: string
63
+ ): ExampleShowcaseData | undefined {
64
+ return EXAMPLE_SHOWCASES[key];
65
+ }
@@ -1 +1,2 @@
1
1
  export { DocsExamplesPage } from './DocsExamplesPage';
2
+ export { ExampleShowcasePage } from './ExampleShowcasePage';