@contractspec/bundle.library 3.7.7 → 3.8.4

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.
Files changed (51) hide show
  1. package/.turbo/turbo-build.log +150 -146
  2. package/CHANGELOG.md +130 -0
  3. package/dist/components/docs/examples/DocsExamplesPage.js +55 -2
  4. package/dist/components/docs/examples/ExampleShowcasePage.d.ts +5 -0
  5. package/dist/components/docs/examples/ExampleShowcasePage.js +258 -0
  6. package/dist/components/docs/examples/exampleShowcaseData.d.ts +10 -0
  7. package/dist/components/docs/examples/exampleShowcaseData.js +53 -0
  8. package/dist/components/docs/examples/index.d.ts +1 -0
  9. package/dist/components/docs/examples/index.js +261 -2
  10. package/dist/components/docs/generated/docs-index.generated.d.ts +6 -6
  11. package/dist/components/docs/index.js +4372 -4114
  12. package/dist/components/docs/libraries/LibrariesAiAgentPage.js +22 -22
  13. package/dist/components/docs/libraries/LibrariesSupportBotPage.js +1 -2
  14. package/dist/components/docs/libraries/index.js +23 -24
  15. package/dist/components/templates/engine/index.d.ts +1 -1
  16. package/dist/components/templates/engine/index.js +1 -1
  17. package/dist/index.js +5132 -4874
  18. package/dist/node/components/docs/examples/DocsExamplesPage.js +55 -2
  19. package/dist/node/components/docs/examples/ExampleShowcasePage.js +257 -0
  20. package/dist/node/components/docs/examples/exampleShowcaseData.js +52 -0
  21. package/dist/node/components/docs/examples/index.js +261 -2
  22. package/dist/node/components/docs/index.js +4372 -4114
  23. package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +22 -22
  24. package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +1 -2
  25. package/dist/node/components/docs/libraries/index.js +23 -24
  26. package/dist/node/components/templates/engine/index.js +1 -1
  27. package/dist/node/index.js +5132 -4874
  28. package/package.json +48 -23
  29. package/src/components/docs/examples/DocsExamplesPage.tsx +13 -2
  30. package/src/components/docs/examples/ExampleShowcasePage.tsx +122 -0
  31. package/src/components/docs/examples/exampleShowcaseData.ts +65 -0
  32. package/src/components/docs/examples/index.ts +1 -0
  33. package/src/components/docs/generated/docs-index._common.json +1 -1
  34. package/src/components/docs/generated/docs-index.ai-chat-assistant.json +8 -0
  35. package/src/components/docs/generated/docs-index.artisan-knowledge-product.json +18 -0
  36. package/src/components/docs/generated/docs-index.artisan-payments-stripe.json +34 -0
  37. package/src/components/docs/generated/docs-index.data-grid-showcase.json +18 -0
  38. package/src/components/docs/generated/docs-index.generated.ts +6 -6
  39. package/src/components/docs/generated/docs-index.harness-lab.json +10 -0
  40. package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +8 -0
  41. package/src/components/docs/generated/docs-index.manifest.json +50 -5
  42. package/src/components/docs/generated/docs-index.messaging-agent-actions.json +18 -0
  43. package/src/components/docs/generated/docs-index.mobile-demo-tasks.json +34 -0
  44. package/src/components/docs/generated/docs-index.opencode-cli.json +2 -2
  45. package/src/components/docs/generated/docs-index.platform-control-plane.json +250 -0
  46. package/src/components/docs/generated/docs-index.platform-harness.json +178 -0
  47. package/src/components/docs/generated/docs-index.platform-integrations.json +22 -14
  48. package/src/components/docs/generated/docs-index.visualization-showcase.json +18 -0
  49. package/src/components/docs/libraries/LibrariesAiAgentPage.tsx +20 -17
  50. package/src/components/docs/libraries/LibrariesSupportBotPage.tsx +1 -2
  51. package/src/components/templates/engine/index.ts +2 -2
@@ -1,4 +1,54 @@
1
1
  // @bun
2
+ // src/components/docs/examples/exampleShowcaseData.ts
3
+ var EXAMPLE_SHOWCASES = {
4
+ "agent-console": {
5
+ key: "agent-console",
6
+ lead: "Primary meetup path for autonomous agents: typed tools, agent configs, run history, and execution logs in one regenerable surface.",
7
+ sandboxHref: "/sandbox?template=agent-console",
8
+ referenceHref: "/docs/reference/agent-console/agent-console",
9
+ llmsHref: "/llms/example.agent-console",
10
+ repoHref: "https://github.com/lssm-tech/contractspec/tree/main/packages/examples/agent-console",
11
+ localCommands: `bun run --cwd packages/examples/agent-console build
12
+ bun run --cwd packages/examples/agent-console test
13
+ bun run --cwd packages/apps/web-landing dev
14
+
15
+ # Open in the browser
16
+ # http://localhost:3000/sandbox?template=agent-console`
17
+ },
18
+ "ai-chat-assistant": {
19
+ key: "ai-chat-assistant",
20
+ lead: "Secondary meetup path for MCP-aware assistants: reasoning, sources, suggestions, and a minimal contract-backed search tool.",
21
+ sandboxHref: "/sandbox?template=ai-chat-assistant",
22
+ referenceHref: "/docs/reference/ai-chat-assistant/assistant.search",
23
+ llmsHref: "/llms/example.ai-chat-assistant",
24
+ repoHref: "https://github.com/lssm-tech/contractspec/tree/main/packages/examples/ai-chat-assistant",
25
+ localCommands: `bun run --cwd packages/examples/ai-chat-assistant build
26
+ bun run --cwd packages/examples/ai-chat-assistant test
27
+ bun run --cwd packages/apps/web-landing dev
28
+
29
+ # Open in the browser
30
+ # http://localhost:3000/sandbox?template=ai-chat-assistant`
31
+ },
32
+ "messaging-agent-actions": {
33
+ key: "messaging-agent-actions",
34
+ lead: "Live messaging lane for the meetup: inbound Slack, WhatsApp, or Telegram messages route through fixed intents, allowlisted actions, and deterministic confirmations.",
35
+ sandboxHref: "/sandbox?template=messaging-agent-actions",
36
+ referenceHref: "/docs/reference/messaging-agent-actions/messaging.agentActions.process",
37
+ llmsHref: "/llms/example.messaging-agent-actions",
38
+ repoHref: "https://github.com/lssm-tech/contractspec/tree/main/packages/examples/messaging-agent-actions",
39
+ localCommands: `bun run --cwd packages/examples/messaging-agent-actions build
40
+ bun run --cwd packages/examples/messaging-agent-actions test
41
+ bun run --cwd packages/examples/messaging-agent-actions proof
42
+ bun run --cwd packages/apps/web-landing dev
43
+
44
+ # Open in the browser
45
+ # http://localhost:3000/sandbox?template=messaging-agent-actions`
46
+ }
47
+ };
48
+ function getExampleShowcaseData(key) {
49
+ return EXAMPLE_SHOWCASES[key];
50
+ }
51
+
2
52
  // src/components/docs/examples/DocsExamplesPage.tsx
3
53
  import { ExampleCatalogDataView } from "@contractspec/lib.contracts-spec/docs";
4
54
  import {
@@ -14,6 +64,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
14
64
  function buildReferenceRoute(key) {
15
65
  return `/docs/reference/${key}/${key}`;
16
66
  }
67
+ function buildDocsRoute(key) {
68
+ return getExampleShowcaseData(key)?.sandboxHref ? `/docs/examples/${key}` : buildReferenceRoute(key);
69
+ }
17
70
  function DocsExamplesPage() {
18
71
  const items = listExamples().map((example) => {
19
72
  const title = example.meta.title ?? example.meta.key;
@@ -21,7 +74,7 @@ function DocsExamplesPage() {
21
74
  id: example.meta.key,
22
75
  title,
23
76
  summary: example.meta.summary ?? example.meta.description,
24
- route: buildReferenceRoute(example.meta.key),
77
+ route: buildDocsRoute(example.meta.key),
25
78
  tags: example.meta.tags,
26
79
  sandboxEnabled: example.surfaces.sandbox.enabled
27
80
  };
@@ -59,7 +112,7 @@ function DocsExamplesPage() {
59
112
  justify: "end",
60
113
  children: [
61
114
  example.sandboxEnabled ? /* @__PURE__ */ jsx(ButtonLink, {
62
- href: "/sandbox",
115
+ href: `/sandbox?template=${example.id}`,
63
116
  size: "sm",
64
117
  variant: "outline",
65
118
  children: "Sandbox"
@@ -80,6 +133,212 @@ function DocsExamplesPage() {
80
133
  ]
81
134
  });
82
135
  }
136
+
137
+ // src/components/docs/examples/ExampleShowcasePage.tsx
138
+ import { ButtonLink as ButtonLink2, CodeBlock } from "@contractspec/lib.design-system";
139
+ import Link from "@contractspec/lib.ui-link";
140
+ import { getExample } from "@contractspec/module.examples";
141
+ import { FileCode2, Play, TerminalSquare } from "lucide-react";
142
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
143
+ function ExampleShowcasePage({ exampleKey }) {
144
+ const showcase = getExampleShowcaseData(exampleKey);
145
+ const example = getExample(exampleKey);
146
+ if (!showcase || !example) {
147
+ return null;
148
+ }
149
+ const title = example.meta.title ?? example.meta.key;
150
+ const summary = example.meta.summary ?? example.meta.description ?? "";
151
+ const packageName = example.entrypoints.packageName;
152
+ return /* @__PURE__ */ jsxs2("div", {
153
+ className: "space-y-10",
154
+ children: [
155
+ /* @__PURE__ */ jsxs2("section", {
156
+ className: "space-y-5",
157
+ children: [
158
+ /* @__PURE__ */ jsx2("p", {
159
+ className: "editorial-kicker",
160
+ children: "Meetup-ready example"
161
+ }),
162
+ /* @__PURE__ */ jsx2("h1", {
163
+ className: "editorial-title max-w-5xl",
164
+ children: title
165
+ }),
166
+ /* @__PURE__ */ jsx2("p", {
167
+ className: "editorial-subtitle",
168
+ children: showcase.lead
169
+ }),
170
+ /* @__PURE__ */ jsx2("p", {
171
+ className: "editorial-copy max-w-4xl",
172
+ children: summary
173
+ }),
174
+ /* @__PURE__ */ jsxs2("div", {
175
+ className: "flex flex-wrap gap-3",
176
+ children: [
177
+ /* @__PURE__ */ jsx2(ButtonLink2, {
178
+ href: showcase.sandboxHref,
179
+ children: "Open sandbox"
180
+ }),
181
+ /* @__PURE__ */ jsx2(ButtonLink2, {
182
+ href: showcase.referenceHref,
183
+ variant: "outline",
184
+ children: "Generated reference"
185
+ })
186
+ ]
187
+ })
188
+ ]
189
+ }),
190
+ /* @__PURE__ */ jsxs2("section", {
191
+ className: "grid gap-5 lg:grid-cols-3",
192
+ children: [
193
+ /* @__PURE__ */ jsxs2("article", {
194
+ className: "editorial-panel space-y-4",
195
+ children: [
196
+ /* @__PURE__ */ jsxs2("div", {
197
+ className: "flex items-center gap-3",
198
+ children: [
199
+ /* @__PURE__ */ jsx2("div", {
200
+ className: "rounded-full border border-border/80 bg-background/85 p-2",
201
+ children: /* @__PURE__ */ jsx2(Play, {
202
+ size: 18
203
+ })
204
+ }),
205
+ /* @__PURE__ */ jsx2("h2", {
206
+ className: "font-semibold text-xl",
207
+ children: "Sandbox preview"
208
+ })
209
+ ]
210
+ }),
211
+ /* @__PURE__ */ jsx2("p", {
212
+ className: "editorial-copy text-sm",
213
+ children: "Load the same public browser surface used for the prepared live demo."
214
+ }),
215
+ /* @__PURE__ */ jsx2(ButtonLink2, {
216
+ href: showcase.sandboxHref,
217
+ size: "sm",
218
+ children: "Open preview"
219
+ })
220
+ ]
221
+ }),
222
+ /* @__PURE__ */ jsxs2("article", {
223
+ className: "editorial-panel space-y-4",
224
+ children: [
225
+ /* @__PURE__ */ jsxs2("div", {
226
+ className: "flex items-center gap-3",
227
+ children: [
228
+ /* @__PURE__ */ jsx2("div", {
229
+ className: "rounded-full border border-border/80 bg-background/85 p-2",
230
+ children: /* @__PURE__ */ jsx2(FileCode2, {
231
+ size: 18
232
+ })
233
+ }),
234
+ /* @__PURE__ */ jsx2("h2", {
235
+ className: "font-semibold text-xl",
236
+ children: "Reference docs"
237
+ })
238
+ ]
239
+ }),
240
+ /* @__PURE__ */ jsx2("p", {
241
+ className: "editorial-copy text-sm",
242
+ children: "Inspect the generated contract-facing material instead of relying on marketing summaries."
243
+ }),
244
+ /* @__PURE__ */ jsx2(ButtonLink2, {
245
+ href: showcase.referenceHref,
246
+ size: "sm",
247
+ variant: "outline",
248
+ children: "Open reference"
249
+ })
250
+ ]
251
+ }),
252
+ /* @__PURE__ */ jsxs2("article", {
253
+ className: "editorial-panel space-y-4",
254
+ children: [
255
+ /* @__PURE__ */ jsxs2("div", {
256
+ className: "flex items-center gap-3",
257
+ children: [
258
+ /* @__PURE__ */ jsx2("div", {
259
+ className: "rounded-full border border-border/80 bg-background/85 p-2",
260
+ children: /* @__PURE__ */ jsx2(TerminalSquare, {
261
+ size: 18
262
+ })
263
+ }),
264
+ /* @__PURE__ */ jsx2("h2", {
265
+ className: "font-semibold text-xl",
266
+ children: "Package context"
267
+ })
268
+ ]
269
+ }),
270
+ /* @__PURE__ */ jsx2("p", {
271
+ className: "editorial-copy text-sm",
272
+ children: "Use the agent-facing package page for fast repo orientation, then jump to the source directory."
273
+ }),
274
+ /* @__PURE__ */ jsx2("p", {
275
+ className: "rounded-[18px] border border-border/70 bg-background/75 px-4 py-3 font-mono text-sm",
276
+ children: packageName
277
+ }),
278
+ /* @__PURE__ */ jsxs2("div", {
279
+ className: "flex flex-wrap gap-2",
280
+ children: [
281
+ /* @__PURE__ */ jsx2(ButtonLink2, {
282
+ href: showcase.llmsHref,
283
+ size: "sm",
284
+ variant: "outline",
285
+ children: "LLMS page"
286
+ }),
287
+ /* @__PURE__ */ jsx2(ButtonLink2, {
288
+ href: showcase.repoHref,
289
+ size: "sm",
290
+ variant: "outline",
291
+ children: "GitHub source"
292
+ })
293
+ ]
294
+ })
295
+ ]
296
+ })
297
+ ]
298
+ }),
299
+ /* @__PURE__ */ jsxs2("section", {
300
+ className: "editorial-panel space-y-5",
301
+ children: [
302
+ /* @__PURE__ */ jsxs2("div", {
303
+ className: "space-y-2",
304
+ children: [
305
+ /* @__PURE__ */ jsx2("p", {
306
+ className: "editorial-kicker",
307
+ children: "Talk commands"
308
+ }),
309
+ /* @__PURE__ */ jsx2("h2", {
310
+ className: "editorial-panel-title",
311
+ children: "Exact local commands for the meetup lane"
312
+ }),
313
+ /* @__PURE__ */ jsx2("p", {
314
+ className: "editorial-copy text-sm",
315
+ children: "Use the package build and test first, then launch the web shell and open the prepared sandbox route."
316
+ })
317
+ ]
318
+ }),
319
+ /* @__PURE__ */ jsx2(CodeBlock, {
320
+ language: "bash",
321
+ filename: `${exampleKey}-meetup-runbook`,
322
+ code: showcase.localCommands
323
+ }),
324
+ /* @__PURE__ */ jsxs2("p", {
325
+ className: "text-muted-foreground text-sm",
326
+ children: [
327
+ "For the full fallback order and safe live-edit workflow, use",
328
+ " ",
329
+ /* @__PURE__ */ jsx2(Link, {
330
+ href: "https://github.com/lssm-tech/contractspec/blob/main/docs/meetup-agent-examples-runbook.md",
331
+ children: "the meetup runbook"
332
+ }),
333
+ "."
334
+ ]
335
+ })
336
+ ]
337
+ })
338
+ ]
339
+ });
340
+ }
83
341
  export {
342
+ ExampleShowcasePage,
84
343
  DocsExamplesPage
85
344
  };
@@ -1,5 +1,5 @@
1
1
  export type DocsIndexSource = 'generated' | 'docblock';
2
- export interface DocsIndexEntry {
2
+ export type DocsIndexEntry = {
3
3
  id: string;
4
4
  title: string;
5
5
  summary?: string;
@@ -11,17 +11,17 @@ export interface DocsIndexEntry {
11
11
  visibility?: string;
12
12
  version?: string;
13
13
  owners?: string[];
14
- }
15
- export interface DocsIndexChunk {
14
+ };
15
+ export type DocsIndexChunk = {
16
16
  key: string;
17
17
  file: string;
18
18
  total: number;
19
- }
20
- export interface DocsIndexManifest {
19
+ };
20
+ export type DocsIndexManifest = {
21
21
  generatedAt: string;
22
22
  total: number;
23
23
  version: string | null;
24
24
  contentRoot: string | null;
25
25
  chunks: DocsIndexChunk[];
26
- }
26
+ };
27
27
  export declare const DOCS_INDEX_MANIFEST = "docs-index.manifest.json";