@contractspec/module.examples 3.8.10 → 3.9.0

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 CHANGED
@@ -10,7 +10,7 @@ Website: https://contractspec.io
10
10
  - **Consumers**: apps (web-landing, docs), bundles (contractspec-studio).
11
11
  - Related ContractSpec packages include `@contractspec/example.agent-console`, `@contractspec/example.ai-chat-assistant`, `@contractspec/example.ai-support-bot`, `@contractspec/example.analytics-dashboard`, `@contractspec/example.calendar-google`, `@contractspec/example.content-generation`, ...
12
12
  - `agent-console` is the default autonomous-agent showcase surfaced through `/sandbox`.
13
- - `data-grid-showcase` is the focused ContractSpec table showcase surfaced through `/sandbox?template=data-grid-showcase`.
13
+ - `data-grid-showcase` is the canonical ContractSpec table showcase surfaced through `/sandbox?template=data-grid-showcase` and `/docs/examples/data-grid-showcase`.
14
14
 
15
15
  ## Installation
16
16
 
@@ -1,2 +1,2 @@
1
- import type { ExampleSpec } from '@contractspec/lib.contracts-spec/examples/types';
1
+ import type { ExampleSpec } from "@contractspec/lib.contracts-spec/examples/types";
2
2
  export declare const EXAMPLE_REGISTRY: readonly ExampleSpec[];
package/dist/index.d.ts CHANGED
@@ -7,4 +7,5 @@ export * from './registry';
7
7
  export * from './runtime/context';
8
8
  export * from './runtime/engine';
9
9
  export * from './runtime/installer';
10
+ export * from './runtime/previews';
10
11
  export * from './runtime/registry';
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  // @bun
2
- import{ExampleRegistry as Lo}from"@contractspec/lib.contracts-spec/examples/registry";import R from"@contractspec/example.agent-console/example";import L from"@contractspec/example.ai-chat-assistant/example";import Y from"@contractspec/example.ai-support-bot/example";import M from"@contractspec/example.analytics-dashboard/example";import J from"@contractspec/example.calendar-google/example";import G from"@contractspec/example.content-generation/example";import H from"@contractspec/example.crm-pipeline/example";import _ from"@contractspec/example.data-grid-showcase/example";import T from"@contractspec/example.email-gmail/example";import j from"@contractspec/example.harness-lab/example";import N from"@contractspec/example.in-app-docs/example";import E from"@contractspec/example.integration-hub/example";import I from"@contractspec/example.integration-posthog/example";import oo from"@contractspec/example.integration-stripe/example";import so from"@contractspec/example.integration-supabase/example";import ao from"@contractspec/example.kb-update-pipeline/example";import ro from"@contractspec/example.knowledge-canon/example";import to from"@contractspec/example.learning-journey-ambient-coach/example";import io from"@contractspec/example.learning-journey-crm-onboarding/example";import co from"@contractspec/example.learning-journey-duo-drills/example";import wo from"@contractspec/example.learning-journey-platform-tour/example";import ho from"@contractspec/example.learning-journey-quest-challenges/example";import fo from"@contractspec/example.learning-journey-registry/example";import bo from"@contractspec/example.learning-journey-studio-onboarding/example";import no from"@contractspec/example.learning-journey-ui-coaching/example";import vo from"@contractspec/example.learning-journey-ui-gamified/example";import ko from"@contractspec/example.learning-journey-ui-onboarding/example";import yo from"@contractspec/example.learning-journey-ui-shared/example";import lo from"@contractspec/example.learning-patterns/example";import po from"@contractspec/example.lifecycle-cli/example";import uo from"@contractspec/example.lifecycle-dashboard/example";import eo from"@contractspec/example.locale-jurisdiction-gate/example";import xo from"@contractspec/example.marketplace/example";import So from"@contractspec/example.meeting-recorder-providers/example";import Co from"@contractspec/example.messaging-agent-actions/example";import Do from"@contractspec/example.minimal/example";import $o from"@contractspec/example.openbanking-powens/example";import go from"@contractspec/example.opencode-cli/example";import Wo from"@contractspec/example.personalization/example";import qo from"@contractspec/example.pocket-family-office/example";import Bo from"@contractspec/example.policy-safe-knowledge-assistant/example";import Qo from"@contractspec/example.product-intent/example";import Fo from"@contractspec/example.project-management-sync/example";import Vo from"@contractspec/example.saas-boilerplate/example";import Zo from"@contractspec/example.service-business-os/example";import mo from"@contractspec/example.team-hub/example";import zo from"@contractspec/example.versioned-knowledge-base/example";import Uo from"@contractspec/example.video-api-showcase/example";import Xo from"@contractspec/example.video-docs-terminal/example";import Oo from"@contractspec/example.video-marketing-clip/example";import Ko from"@contractspec/example.visualization-showcase/example";import Ao from"@contractspec/example.voice-providers/example";import Po from"@contractspec/example.wealth-snapshot/example";import Ro from"@contractspec/example.workflow-system/example";var q=[R,L,Y,M,J,G,H,_,T,j,N,E,I,oo,so,ao,ro,to,io,co,wo,ho,fo,bo,no,vo,ko,yo,lo,po,uo,eo,xo,So,Co,Do,$o,go,Wo,qo,Bo,Qo,Fo,Vo,Zo,mo,zo,Uo,Xo,Oo,Ko,Ao,Po,Ro];import{ExampleRegistry as Na}from"@contractspec/lib.contracts-spec/examples/registry";var k=new Lo;for(let o of q)k.register(o);var Ga=k.list();function B(){return k.list()}function Ha(o){return k.get(o)}function _a(o){return k.search(o)}import{ApolloProvider as gs}from"@apollo/client/react";import{web as Ws}from"@contractspec/lib.runtime-sandbox";import{useEffect as qs,useMemo as Bs,useState as m}from"react";import{AGENT_CONSOLE_DEMO_ORGANIZATION_ID as D,createAgentConsoleDemoHandlers as Fs,getAgentConsoleDashboardData as Vs}from"@contractspec/example.agent-console";import{createAnalyticsHandlers as Zs}from"@contractspec/example.analytics-dashboard";import{createCrmHandlers as ms}from"@contractspec/example.crm-pipeline";import{createIntegrationHandlers as zs}from"@contractspec/example.integration-hub";import{createMarketplaceHandlers as Us}from"@contractspec/example.marketplace";import{createPolicySafeKnowledgeAssistantHandlers as Xs}from"@contractspec/example.policy-safe-knowledge-assistant";import{createSaasHandlers as Os}from"@contractspec/example.saas-boilerplate";import{createWorkflowHandlers as Ks}from"@contractspec/example.workflow-system";import{TemplateRuntimeContext as As,useTemplateComponents as Ps,useTemplateRuntime as z}from"@contractspec/lib.example-shared-ui";import{agentDashboardMarkdownRenderer as Yo,agentListMarkdownRenderer as Mo,agentListReactRenderer as Jo,runListMarkdownRenderer as Go,toolRegistryMarkdownRenderer as Ho}from"@contractspec/example.agent-console";import{analyticsDashboardMarkdownRenderer as _o,dashboardListMarkdownRenderer as To,queryBuilderMarkdownRenderer as jo}from"@contractspec/example.analytics-dashboard";import{crmDashboardMarkdownRenderer as No,crmPipelineMarkdownRenderer as Eo,crmPipelineReactRenderer as Io}from"@contractspec/example.crm-pipeline";import{connectionListMarkdownRenderer as os,integrationDashboardMarkdownRenderer as ss,syncConfigMarkdownRenderer as as}from"@contractspec/example.integration-hub";import{marketplaceDashboardMarkdownRenderer as rs,orderListMarkdownRenderer as ts,productCatalogMarkdownRenderer as is}from"@contractspec/example.marketplace";import{projectListMarkdownRenderer as cs,projectListReactRenderer as ws,saasBillingMarkdownRenderer as ds,saasDashboardMarkdownRenderer as hs}from"@contractspec/example.saas-boilerplate";import{visualizationShowcaseMarkdownRenderer as fs}from"@contractspec/example.visualization-showcase/ui/renderers";import{workflowDashboardMarkdownRenderer as bs,workflowDefinitionListMarkdownRenderer as ns,workflowInstanceDetailMarkdownRenderer as vs}from"@contractspec/example.workflow-system";import{createDefaultTransformEngine as ks,registerBasicValidation as ys,registerDefaultReactRenderer as ls}from"@contractspec/lib.contracts-runtime-client-react/transform-engine";function ps(){let o=ks();return ls(o),ys(o),us(o),o}function us(o){o.register(Jo),o.register(Mo),o.register(Go),o.register(Ho),o.register(Yo),o.register(ws),o.register(cs),o.register(hs),o.register(ds),o.register(Io),o.register(Eo),o.register(No),o.register(bs),o.register(ns),o.register(vs),o.register(rs),o.register(is),o.register(ts),o.register(ss),o.register(os),o.register(as),o.register(_o),o.register(To),o.register(jo),o.register(fs)}var p=null;function Q(){if(!p)p=ps();return p}function wr(){p=null}import{web as xs}from"@contractspec/lib.runtime-sandbox";var F={"saas-boilerplate":["saas-boilerplate.dashboard","saas-boilerplate.project.list","saas-boilerplate.billing.settings"],"crm-pipeline":["crm-pipeline.dashboard","crm-pipeline.deal.pipeline"],"agent-console":["agent-console.dashboard","agent-console.agent.viewList","agent-console.run.list","agent-console.tool.list"],"workflow-system":["workflow-system.dashboard","workflow-system.definition.list","workflow-system.instance.detail"],marketplace:["marketplace.dashboard","marketplace.product.catalog","marketplace.order.list"],"integration-hub":["integration-hub.dashboard","integration-hub.connection.list","integration-hub.sync.config"],"analytics-dashboard":["analytics-dashboard.dashboard","analytics-dashboard.list","analytics-dashboard.query.builder"],"visualization-showcase":["visualization-showcase.gallery"],"learning-journey-studio-onboarding":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-platform-tour":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-crm-onboarding":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-duo-drills":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-ambient-coach":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-quest-challenges":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"]},es=B().filter((o)=>o.meta.key!=="agent-console").map((o)=>{let s=[...o.meta.tags??[]],i=s.some((w)=>w.toLowerCase()==="ai")||s.some((w)=>w.toLowerCase()==="assistant")?"ai":"business";return{id:o.meta.key,name:o.meta.title??o.meta.key,description:o.meta.description??"",category:i,complexity:"beginner",icon:"\uD83D\uDCE6",features:[],tags:s,schema:{models:[],contracts:[]},components:{list:"ExampleList",detail:"ExampleDetail"},preview:{demoUrl:`/sandbox?template=${encodeURIComponent(o.meta.key)}`},package:o.entrypoints.packageName,presentations:F[o.meta.key]??[],renderTargets:["react","markdown"]}}),f=[{id:"todos-app",name:"To-dos List App",description:"CRUD flows, filtering, priorities, and ceremonies for handing off work across crews.",category:"productivity",complexity:"beginner",icon:"\u2705",features:["CRUD tasks","Filters","Categories","Search","Priorities"],tags:["tasks","ops","starter"],schema:{models:["Task","TaskCategory"],contracts:["template.todos.crud"]},components:{list:"TaskList",detail:"TaskDetailPanel",form:"TaskForm"},preview:{demoUrl:"/sandbox?template=todos-app"},docs:{quickstart:"/docs/templates/todos-app"}},{id:"messaging-app",name:"Messaging Application",description:"Conversation roster, optimistic sending, typing indicators, and delivery telemetry.",category:"communication",complexity:"intermediate",icon:"\uD83D\uDCAC",features:["Conversations","Real-time feed","Typing indicators","Read receipts"],tags:["messaging","realtime","ws"],schema:{models:["Conversation","ConversationParticipant","Message"],contracts:["template.messaging.core"]},components:{list:"ConversationList",detail:"MessageThread",form:"MessageComposer"},preview:{demoUrl:"/sandbox?template=messaging-app"},docs:{quickstart:"/docs/templates/messaging-app"}},{id:"recipe-app-i18n",name:"Recipe App (i18n)",description:"Localized browsing experience with bilingual content, categories, and favorites.",category:"content",complexity:"intermediate",icon:"\uD83C\uDF72",features:["i18n","Favorites","Categories","Search","RTL-ready"],tags:["content","i18n","localization"],schema:{models:["RecipeCategory","Recipe","RecipeIngredient","RecipeInstruction"],contracts:["template.recipes.browse"]},components:{list:"RecipeList",detail:"RecipeDetail",form:"RecipeForm"},preview:{demoUrl:"/sandbox?template=recipe-app-i18n"},docs:{quickstart:"/docs/templates/recipe-app-i18n"}},{id:"agent-console",name:"Agent Console",description:"Deterministic autonomous-agent walkthrough with seeded agents, tool registry, runs, metrics, and replayable proof.",category:"ai",complexity:"intermediate",icon:"\uD83E\uDD16",features:["Seeded autonomous agents","Tool registry","Run execution history","Metrics","Markdown and React views"],tags:["ai","agents","autonomous","meetup","sandbox"],schema:{models:["Agent","Tool","Run"],contracts:["agent-console.agent.list","agent-console.agent.create","agent-console.run.execute"]},components:{list:"AgentListView",detail:"RunListView",form:"CreateAgentModal"},preview:{demoUrl:"/sandbox?template=agent-console"},package:"@contractspec/example.agent-console",presentations:F["agent-console"]??[],renderTargets:["react","markdown"]},...es];function fr(o){if(!o)return f;return f.filter((s)=>{if(o.category&&s.category!==o.category)return!1;if(o.complexity&&s.complexity!==o.complexity)return!1;if(o.tag&&!s.tags.some((i)=>i.toLowerCase()===o.tag?.toLowerCase()))return!1;return!0})}function y(o){return f.find((s)=>s.id===o)}function br(o){return f.filter((s)=>s.usesModules?.includes(o))}function nr(){return f.filter((o)=>!!o.package)}class S{baseUrl;fetchImpl;constructor(o){this.baseUrl=o.registryUrl.replace(/\/+$/,""),this.fetchImpl=o.fetchImpl??fetch}async getManifest(){let o=await this.fetchImpl(`${this.baseUrl}/r/contractspec.json`,{method:"GET",headers:{Accept:"application/json"}});if(!o.ok)throw Error(`Registry manifest fetch failed: ${o.status} ${o.statusText}`);return await o.json()}async listByType(o){return(await this.getManifest()).items.filter((i)=>i.type===o)}async listTemplateSummaries(){return(await this.listByType("contractspec:template")).map((s)=>({id:s.key,title:s.title,description:s.description,version:s.version,tags:s.meta.tags,source:"registry"}))}async getItem(o,s){let i=await this.fetchImpl(`${this.baseUrl}/r/contractspec/${o}/${s}.json`,{method:"GET",headers:{Accept:"application/json"}});if(!i.ok)throw Error(`Registry item fetch failed: ${i.status} ${i.statusText}`);return await i.json()}}var{LocalRuntimeServices:Ss}=xs,Cs=`
2
+ var Z=import.meta.require;import{ExampleRegistry as rf}from"@contractspec/lib.contracts-spec/examples/registry";import i from"@contractspec/example.agent-console/example";import r from"@contractspec/example.ai-chat-assistant/example";import o from"@contractspec/example.ai-support-bot/example";import a from"@contractspec/example.analytics-dashboard/example";import t from"@contractspec/example.calendar-google/example";import n from"@contractspec/example.content-generation/example";import e from"@contractspec/example.crm-pipeline/example";import ff from"@contractspec/example.data-grid-showcase/example";import $f from"@contractspec/example.email-gmail/example";import Uf from"@contractspec/example.harness-lab/example";import Xf from"@contractspec/example.in-app-docs/example";import vf from"@contractspec/example.integration-hub/example";import wf from"@contractspec/example.integration-posthog/example";import qf from"@contractspec/example.integration-stripe/example";import Zf from"@contractspec/example.integration-supabase/example";import Ff from"@contractspec/example.kb-update-pipeline/example";import Qf from"@contractspec/example.knowledge-canon/example";import Wf from"@contractspec/example.learning-journey-ambient-coach/example";import Bf from"@contractspec/example.learning-journey-crm-onboarding/example";import Yf from"@contractspec/example.learning-journey-duo-drills/example";import zf from"@contractspec/example.learning-journey-platform-tour/example";import Kf from"@contractspec/example.learning-journey-quest-challenges/example";import _f from"@contractspec/example.learning-journey-registry/example";import xf from"@contractspec/example.learning-journey-studio-onboarding/example";import Vf from"@contractspec/example.learning-journey-ui-coaching/example";import kf from"@contractspec/example.learning-journey-ui-gamified/example";import Df from"@contractspec/example.learning-journey-ui-onboarding/example";import Of from"@contractspec/example.learning-journey-ui-shared/example";import Ef from"@contractspec/example.learning-patterns/example";import Mf from"@contractspec/example.lifecycle-cli/example";import hf from"@contractspec/example.lifecycle-dashboard/example";import yf from"@contractspec/example.locale-jurisdiction-gate/example";import Gf from"@contractspec/example.marketplace/example";import Jf from"@contractspec/example.meeting-recorder-providers/example";import Hf from"@contractspec/example.messaging-agent-actions/example";import bf from"@contractspec/example.minimal/example";import Cf from"@contractspec/example.openbanking-powens/example";import Rf from"@contractspec/example.opencode-cli/example";import Af from"@contractspec/example.personalization/example";import Lf from"@contractspec/example.pocket-family-office/example";import Sf from"@contractspec/example.policy-safe-knowledge-assistant/example";import cf from"@contractspec/example.product-intent/example";import Pf from"@contractspec/example.project-management-sync/example";import jf from"@contractspec/example.saas-boilerplate/example";import If from"@contractspec/example.service-business-os/example";import uf from"@contractspec/example.team-hub/example";import Nf from"@contractspec/example.versioned-knowledge-base/example";import Tf from"@contractspec/example.video-api-showcase/example";import gf from"@contractspec/example.video-docs-terminal/example";import mf from"@contractspec/example.video-marketing-clip/example";import df from"@contractspec/example.visualization-showcase/example";import pf from"@contractspec/example.voice-providers/example";import sf from"@contractspec/example.wealth-snapshot/example";import lf from"@contractspec/example.workflow-system/example";var R=[i,r,o,a,t,n,e,ff,$f,Uf,Xf,vf,wf,qf,Zf,Ff,Qf,Wf,Bf,Yf,zf,Kf,_f,xf,Vf,kf,Df,Of,Ef,Mf,hf,yf,Gf,Jf,Hf,bf,Cf,Rf,Af,Lf,Sf,cf,Pf,jf,If,uf,Nf,Tf,gf,mf,df,pf,sf,lf];import{ExampleRegistry as YX}from"@contractspec/lib.contracts-spec/examples/registry";var _=new rf;for(let f of R)_.register(f);var FX=_.list();function k(){return _.list()}function h(f){return _.get(f)}function QX(f){return _.search(f)}import{ApolloProvider as I$}from"@apollo/client/react";import{web as u$}from"@contractspec/lib.runtime-sandbox";import{useEffect as N$,useMemo as T$,useState as P}from"react";import{AGENT_CONSOLE_DEMO_ORGANIZATION_ID as J,createAgentConsoleDemoHandlers as m$,getAgentConsoleDashboardData as d$}from"@contractspec/example.agent-console";import{createAnalyticsHandlers as p$}from"@contractspec/example.analytics-dashboard";import{createCrmHandlers as s$}from"@contractspec/example.crm-pipeline";import{createIntegrationHandlers as l$}from"@contractspec/example.integration-hub";import{buildLearningPresentationData as i$,isLearningTemplate as r$}from"@contractspec/example.learning-journey-registry";import{createMarketplaceHandlers as o$}from"@contractspec/example.marketplace";import{createPolicySafeKnowledgeAssistantHandlers as a$}from"@contractspec/example.policy-safe-knowledge-assistant";import{createSaasHandlers as t$}from"@contractspec/example.saas-boilerplate";import{createWorkflowHandlers as n$}from"@contractspec/example.workflow-system";import{TemplateRuntimeContext as e$,useTemplateComponents as fU,useTemplateRuntime as j}from"@contractspec/lib.example-shared-ui";import{agentDashboardMarkdownRenderer as of,agentListMarkdownRenderer as af,agentListReactRenderer as tf,runListMarkdownRenderer as nf,toolRegistryMarkdownRenderer as ef}from"@contractspec/example.agent-console";import{analyticsDashboardMarkdownRenderer as f$,dashboardListMarkdownRenderer as $$,queryBuilderMarkdownRenderer as U$}from"@contractspec/example.analytics-dashboard";import{crmDashboardMarkdownRenderer as X$,crmPipelineMarkdownRenderer as v$,crmPipelineReactRenderer as w$}from"@contractspec/example.crm-pipeline";import{connectionListMarkdownRenderer as q$,integrationDashboardMarkdownRenderer as Z$,syncConfigMarkdownRenderer as F$}from"@contractspec/example.integration-hub";import{learningTrackDetailMarkdownRenderer as Q$,learningTrackListMarkdownRenderer as W$,learningTrackProgressWidgetMarkdownRenderer as B$}from"@contractspec/example.learning-journey-registry";import{marketplaceDashboardMarkdownRenderer as Y$,orderListMarkdownRenderer as z$,productCatalogMarkdownRenderer as K$}from"@contractspec/example.marketplace";import{projectListMarkdownRenderer as _$,projectListReactRenderer as x$,saasBillingMarkdownRenderer as V$,saasDashboardMarkdownRenderer as k$}from"@contractspec/example.saas-boilerplate";import{visualizationShowcaseMarkdownRenderer as D$}from"@contractspec/example.visualization-showcase/ui/renderers";import{workflowDashboardMarkdownRenderer as O$,workflowDefinitionListMarkdownRenderer as E$,workflowInstanceDetailMarkdownRenderer as M$}from"@contractspec/example.workflow-system";import{createDefaultTransformEngine as h$,registerBasicValidation as y$,registerDefaultReactRenderer as G$}from"@contractspec/lib.contracts-runtime-client-react/transform-engine";function J$(){let f=h$();return G$(f),y$(f),H$(f),f}function H$(f){f.register(tf),f.register(af),f.register(nf),f.register(ef),f.register(of),f.register(x$),f.register(_$),f.register(k$),f.register(V$),f.register(w$),f.register(v$),f.register(X$),f.register(O$),f.register(E$),f.register(M$),f.register(Y$),f.register(K$),f.register(z$),f.register(Z$),f.register(q$),f.register(F$),f.register(f$),f.register($$),f.register(U$),f.register(W$),f.register(Q$),f.register(B$),f.register(D$)}var D=null;function A(){if(!D)D=J$();return D}function hX(){D=null}import{web as A$}from"@contractspec/lib.runtime-sandbox";import{getLearningTemplateIds as b$}from"@contractspec/example.learning-journey-registry";var C$=["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],L={"saas-boilerplate":["saas-boilerplate.dashboard","saas-boilerplate.project.list","saas-boilerplate.billing.settings"],"crm-pipeline":["crm-pipeline.dashboard","crm-pipeline.deal.pipeline"],"agent-console":["agent-console.dashboard","agent-console.agent.viewList","agent-console.run.list","agent-console.tool.list"],"workflow-system":["workflow-system.dashboard","workflow-system.definition.list","workflow-system.instance.detail"],marketplace:["marketplace.dashboard","marketplace.product.catalog","marketplace.order.list"],"integration-hub":["integration-hub.dashboard","integration-hub.connection.list","integration-hub.sync.config"],"analytics-dashboard":["analytics-dashboard.dashboard","analytics-dashboard.list","analytics-dashboard.query.builder"],"visualization-showcase":["visualization-showcase.gallery"],...Object.fromEntries(b$().map((f)=>[f,[...C$]]))},R$=k().filter((f)=>f.meta.key!=="agent-console").map((f)=>{let $=[...f.meta.tags??[]],w=$.some((F)=>F.toLowerCase()==="ai")||$.some((F)=>F.toLowerCase()==="assistant")?"ai":"business";return{id:f.meta.key,name:f.meta.title??f.meta.key,description:f.meta.description??"",category:w,complexity:"beginner",icon:"\uD83D\uDCE6",features:[],tags:$,schema:{models:[],contracts:[]},components:{list:"ExampleList",detail:"ExampleDetail"},preview:{demoUrl:`/sandbox?template=${encodeURIComponent(f.meta.key)}`},package:f.entrypoints.packageName,presentations:L[f.meta.key]??[],renderTargets:["react","markdown"]}}),B=[{id:"todos-app",name:"To-dos List App",description:"CRUD flows, filtering, priorities, and ceremonies for handing off work across crews.",category:"productivity",complexity:"beginner",icon:"\u2705",features:["CRUD tasks","Filters","Categories","Search","Priorities"],tags:["tasks","ops","starter"],schema:{models:["Task","TaskCategory"],contracts:["template.todos.crud"]},components:{list:"TaskList",detail:"TaskDetailPanel",form:"TaskForm"},preview:{demoUrl:"/sandbox?template=todos-app"},docs:{quickstart:"/docs/templates/todos-app"}},{id:"messaging-app",name:"Messaging Application",description:"Conversation roster, optimistic sending, typing indicators, and delivery telemetry.",category:"communication",complexity:"intermediate",icon:"\uD83D\uDCAC",features:["Conversations","Real-time feed","Typing indicators","Read receipts"],tags:["messaging","realtime","ws"],schema:{models:["Conversation","ConversationParticipant","Message"],contracts:["template.messaging.core"]},components:{list:"ConversationList",detail:"MessageThread",form:"MessageComposer"},preview:{demoUrl:"/sandbox?template=messaging-app"},docs:{quickstart:"/docs/templates/messaging-app"}},{id:"recipe-app-i18n",name:"Recipe App (i18n)",description:"Localized browsing experience with bilingual content, categories, and favorites.",category:"content",complexity:"intermediate",icon:"\uD83C\uDF72",features:["i18n","Favorites","Categories","Search","RTL-ready"],tags:["content","i18n","localization"],schema:{models:["RecipeCategory","Recipe","RecipeIngredient","RecipeInstruction"],contracts:["template.recipes.browse"]},components:{list:"RecipeList",detail:"RecipeDetail",form:"RecipeForm"},preview:{demoUrl:"/sandbox?template=recipe-app-i18n"},docs:{quickstart:"/docs/templates/recipe-app-i18n"}},{id:"agent-console",name:"Agent Console",description:"Deterministic autonomous-agent walkthrough with seeded agents, tool registry, runs, metrics, and replayable proof.",category:"ai",complexity:"intermediate",icon:"\uD83E\uDD16",features:["Seeded autonomous agents","Tool registry","Run execution history","Metrics","Markdown and React views"],tags:["ai","agents","autonomous","meetup","sandbox"],schema:{models:["Agent","Tool","Run"],contracts:["agent-console.agent.list","agent-console.agent.create","agent-console.run.execute"]},components:{list:"AgentListView",detail:"RunListView",form:"CreateAgentModal"},preview:{demoUrl:"/sandbox?template=agent-console"},package:"@contractspec/example.agent-console",presentations:L["agent-console"]??[],renderTargets:["react","markdown"]},...R$];function HX(f){if(!f)return B;return B.filter(($)=>{if(f.category&&$.category!==f.category)return!1;if(f.complexity&&$.complexity!==f.complexity)return!1;if(f.tag&&!$.tags.some((w)=>w.toLowerCase()===f.tag?.toLowerCase()))return!1;return!0})}function x(f){return B.find(($)=>$.id===f)}function bX(f){return B.filter(($)=>$.usesModules?.includes(f))}function CX(){return B.filter((f)=>!!f.package)}class y{baseUrl;fetchImpl;constructor(f){this.baseUrl=f.registryUrl.replace(/\/+$/,""),this.fetchImpl=f.fetchImpl??fetch}async getManifest(){let f=await this.fetchImpl(`${this.baseUrl}/r/contractspec.json`,{method:"GET",headers:{Accept:"application/json"}});if(!f.ok)throw Error(`Registry manifest fetch failed: ${f.status} ${f.statusText}`);return await f.json()}async listByType(f){return(await this.getManifest()).items.filter((w)=>w.type===f)}async listTemplateSummaries(){return(await this.listByType("contractspec:template")).map(($)=>({id:$.key,title:$.title,description:$.description,version:$.version,tags:$.meta.tags,source:"registry"}))}async getItem(f,$){let w=await this.fetchImpl(`${this.baseUrl}/r/contractspec/${f}/${$}.json`,{method:"GET",headers:{Accept:"application/json"}});if(!w.ok)throw Error(`Registry item fetch failed: ${w.status} ${w.statusText}`);return await w.json()}}var{LocalRuntimeServices:L$}=A$,S$=`
3
3
  mutation SaveTemplateToStudio($input: SaveTemplateInput!) {
4
4
  saveTemplateToStudio(input: $input) {
5
5
  projectId
6
6
  status
7
7
  }
8
8
  }
9
- `;class C{runtime;endpoint;registryUrl;fetchImpl;constructor(o={}){this.runtime=o.runtime??new Ss,this.endpoint=o.endpoint??"/api/graphql",this.registryUrl=o.registryUrl?o.registryUrl.replace(/\/+$/,""):null,this.fetchImpl=o.fetchImpl??fetch}async init(){await this.runtime.init()}list(o){return o?f.filter((s)=>{if(o.category&&o.category!==s.category)return!1;if(o.complexity&&o.complexity!==s.complexity)return!1;if(o.tag&&!s.tags.includes(o.tag))return!1;return!0}):f}async listRemoteTemplates(){if(!this.registryUrl)return[];return await new S({registryUrl:this.registryUrl,fetchImpl:this.fetchImpl}).listTemplateSummaries()}resolveLocalTemplateId(o){return y(o)?o:null}get(o){return y(o)}async install(o,s={}){await this.runtime.seedTemplate({templateId:o,projectId:s.projectId})}async saveToStudio(o){let s=await this.runtime.db.export(),i=Ds(s),w=await this.fetchImpl(o.endpoint??this.endpoint,{method:"POST",headers:{"Content-Type":"application/json",...o.token?{Authorization:`Bearer ${o.token}`}:{}},body:JSON.stringify({query:Cs,variables:{input:{templateId:o.templateId,projectName:o.projectName,organizationId:o.organizationId,payload:i}}})});if(!w.ok)throw Error(`Failed to save template: ${w.status} ${w.statusText}`);let h=await w.json();if(h.errors?.length)throw Error(h.errors[0]?.message??"Unknown error");if(!h.data?.saveTemplateToStudio)throw Error("Invalid response from Studio API");return h.data.saveTemplateToStudio}}function Ds(o){if(typeof Buffer<"u")return Buffer.from(o).toString("base64");let s="";return o.forEach((i)=>{s+=String.fromCharCode(i)}),btoa(s)}function r(o,s,i,w,h,u){return{meta:{key:o,version:"1.0.0",title:s,description:i,stability:"experimental",goal:w,context:h,owners:["@contractspec/examples"],tags:["template","sandbox"]},source:{type:"component",framework:"react",componentKey:u},targets:["react","markdown"]}}var $s={"agent-console.dashboard":r("agent-console.dashboard","Agent Console Dashboard","Operational dashboard for the agent console example.","Review agent activity, throughput, and execution health.","Sandbox presentation used for markdown previews.","AgentConsoleDashboard"),"agent-console.agent.list":r("agent-console.agent.list","Agent List","List of seeded agents in the agent console example.","Browse configured agents and their current capabilities.","Sandbox presentation used for markdown previews.","AgentListView"),"agent-console.agent.viewList":r("agent-console.agent.viewList","Agent List","List of seeded agents in the agent console example.","Browse configured agents and their current capabilities.","Sandbox presentation used for markdown previews.","AgentListView"),"agent-console.run.list":r("agent-console.run.list","Run List","Execution history for the agent console example.","Inspect recent runs and their outcomes.","Sandbox presentation used for markdown previews.","RunListView"),"agent-console.tool.list":r("agent-console.tool.list","Tool Registry","Available tools for the agent console example.","Inspect the tool registry exposed to the seeded agents.","Sandbox presentation used for markdown previews.","ToolRegistryView"),"agent-console.tool.registry":r("agent-console.tool.registry","Tool Registry","Available tools for the agent console example.","Inspect the tool registry exposed to the seeded agents.","Sandbox presentation used for markdown previews.","ToolRegistryView"),"analytics-dashboard.dashboard":r("analytics-dashboard.dashboard","Analytics Dashboard","Dashboard view for the analytics example.","Review saved widgets and query-backed dashboards.","Sandbox presentation used for markdown previews.","AnalyticsDashboard"),"analytics-dashboard.list":r("analytics-dashboard.list","Dashboard List","List view for analytics dashboards.","Browse dashboards available in the analytics example.","Sandbox presentation used for markdown previews.","DashboardList"),"analytics-dashboard.query.builder":r("analytics-dashboard.query.builder","Query Builder","Query authoring surface for the analytics example.","Inspect reusable queries that power dashboards.","Sandbox presentation used for markdown previews.","QueryBuilder"),"crm-pipeline.dashboard":r("crm-pipeline.dashboard","CRM Dashboard","Dashboard for the CRM pipeline example.","Track pipeline health and revenue progress.","Sandbox presentation used for markdown previews.","CrmDashboard"),"crm-pipeline.deal.pipeline":r("crm-pipeline.deal.pipeline","Pipeline Kanban","Pipeline board for the CRM pipeline example.","Review deal flow across pipeline stages.","Sandbox presentation used for markdown previews.","PipelineKanbanView"),"integration-hub.connection.list":r("integration-hub.connection.list","Connection List","Connected systems in the integration hub example.","Review connected systems and connection health.","Sandbox presentation used for markdown previews.","ConnectionList"),"integration-hub.dashboard":r("integration-hub.dashboard","Integration Dashboard","Operational dashboard for the integration hub example.","Monitor integration mix, connection health, and sync issues.","Sandbox presentation used for markdown previews.","IntegrationDashboard"),"integration-hub.sync.config":r("integration-hub.sync.config","Sync Configuration","Sync configuration surface for the integration hub example.","Inspect sync configuration and field mapping defaults.","Sandbox presentation used for markdown previews.","SyncConfigEditor"),"marketplace.dashboard":r("marketplace.dashboard","Marketplace Dashboard","Dashboard for the marketplace example.","Review order flow, category mix, and revenue summaries.","Sandbox presentation used for markdown previews.","MarketplaceDashboard"),"marketplace.order.list":r("marketplace.order.list","Order List","Order list for the marketplace example.","Inspect order activity and fulfillment state.","Sandbox presentation used for markdown previews.","OrderList"),"marketplace.product.catalog":r("marketplace.product.catalog","Product Catalog","Product catalog for the marketplace example.","Browse the available products and merchandising data.","Sandbox presentation used for markdown previews.","ProductCatalog"),"saas-boilerplate.billing.settings":r("saas-boilerplate.billing.settings","Billing Settings","Subscription and usage settings for the SaaS example.","Review billing configuration and current subscription data.","Sandbox presentation used for markdown previews.","SubscriptionView"),"saas-boilerplate.dashboard":r("saas-boilerplate.dashboard","SaaS Dashboard","Dashboard for the SaaS boilerplate example.","Review account, project, and billing summaries.","Sandbox presentation used for markdown previews.","SaasDashboard"),"saas-boilerplate.project.list":r("saas-boilerplate.project.list","Project List","Project list for the SaaS boilerplate example.","Browse projects and their current lifecycle state.","Sandbox presentation used for markdown previews.","ProjectListView"),"visualization-showcase.gallery":r("visualization-showcase.gallery","Visualization Showcase","Focused showcase of ContractSpec visualization primitives.","Review the canonical visualization catalog and design-system wrappers.","Sandbox presentation used for markdown previews.","VisualizationShowcase"),"workflow-system.dashboard":r("workflow-system.dashboard","Workflow Dashboard","Dashboard for the workflow system example.","Review workflow instance health and workload metrics.","Sandbox presentation used for markdown previews.","WorkflowDashboard"),"workflow-system.definition.list":r("workflow-system.definition.list","Workflow Definition List","Workflow definitions in the workflow system example.","Browse available workflow definitions.","Sandbox presentation used for markdown previews.","WorkflowDefinitionList"),"workflow-system.instance.detail":r("workflow-system.instance.detail","Workflow Instance Detail","Workflow instance details in the workflow system example.","Inspect the state and approvals for a workflow instance.","Sandbox presentation used for markdown previews.","WorkflowInstanceDetail")};function V(o){return $s[o]}function Z(o){return o.graphql.apollo}import{jsx as l,jsxs as Ls}from"react/jsx-runtime";var{LocalRuntimeServices:Qs}=Ws;function Rs(o){console.error(`
9
+ `;class G{runtime;endpoint;registryUrl;fetchImpl;constructor(f={}){this.runtime=f.runtime??new L$,this.endpoint=f.endpoint??"/api/graphql",this.registryUrl=f.registryUrl?f.registryUrl.replace(/\/+$/,""):null,this.fetchImpl=f.fetchImpl??fetch}async init(){await this.runtime.init()}list(f){return f?B.filter(($)=>{if(f.category&&f.category!==$.category)return!1;if(f.complexity&&f.complexity!==$.complexity)return!1;if(f.tag&&!$.tags.includes(f.tag))return!1;return!0}):B}async listRemoteTemplates(){if(!this.registryUrl)return[];return await new y({registryUrl:this.registryUrl,fetchImpl:this.fetchImpl}).listTemplateSummaries()}resolveLocalTemplateId(f){return x(f)?f:null}get(f){return x(f)}async install(f,$={}){await this.runtime.seedTemplate({templateId:f,projectId:$.projectId})}async saveToStudio(f){let $=await this.runtime.db.export(),w=c$($),F=await this.fetchImpl(f.endpoint??this.endpoint,{method:"POST",headers:{"Content-Type":"application/json",...f.token?{Authorization:`Bearer ${f.token}`}:{}},body:JSON.stringify({query:S$,variables:{input:{templateId:f.templateId,projectName:f.projectName,organizationId:f.organizationId,payload:w}}})});if(!F.ok)throw Error(`Failed to save template: ${F.status} ${F.statusText}`);let W=await F.json();if(W.errors?.length)throw Error(W.errors[0]?.message??"Unknown error");if(!W.data?.saveTemplateToStudio)throw Error("Invalid response from Studio API");return W.data.saveTemplateToStudio}}function c$(f){if(typeof Buffer<"u")return Buffer.from(f).toString("base64");let $="";return f.forEach((w)=>{$+=String.fromCharCode(w)}),btoa($)}import{learningJourneyPresentations as P$}from"@contractspec/example.learning-journey-registry/presentations";function X(f,$,w,F,W,O){return{meta:{key:f,version:"1.0.0",title:$,description:w,stability:"experimental",goal:F,context:W,owners:["@contractspec/examples"],tags:["template","sandbox"]},source:{type:"component",framework:"react",componentKey:O},targets:["react","markdown"]}}var j$={"agent-console.dashboard":X("agent-console.dashboard","Agent Console Dashboard","Operational dashboard for the agent console example.","Review agent activity, throughput, and execution health.","Sandbox presentation used for markdown previews.","AgentConsoleDashboard"),"agent-console.agent.list":X("agent-console.agent.list","Agent List","List of seeded agents in the agent console example.","Browse configured agents and their current capabilities.","Sandbox presentation used for markdown previews.","AgentListView"),"agent-console.agent.viewList":X("agent-console.agent.viewList","Agent List","List of seeded agents in the agent console example.","Browse configured agents and their current capabilities.","Sandbox presentation used for markdown previews.","AgentListView"),"agent-console.run.list":X("agent-console.run.list","Run List","Execution history for the agent console example.","Inspect recent runs and their outcomes.","Sandbox presentation used for markdown previews.","RunListView"),"agent-console.tool.list":X("agent-console.tool.list","Tool Registry","Available tools for the agent console example.","Inspect the tool registry exposed to the seeded agents.","Sandbox presentation used for markdown previews.","ToolRegistryView"),"agent-console.tool.registry":X("agent-console.tool.registry","Tool Registry","Available tools for the agent console example.","Inspect the tool registry exposed to the seeded agents.","Sandbox presentation used for markdown previews.","ToolRegistryView"),"analytics-dashboard.dashboard":X("analytics-dashboard.dashboard","Analytics Dashboard","Dashboard view for the analytics example.","Review saved widgets and query-backed dashboards.","Sandbox presentation used for markdown previews.","AnalyticsDashboard"),"analytics-dashboard.list":X("analytics-dashboard.list","Dashboard List","List view for analytics dashboards.","Browse dashboards available in the analytics example.","Sandbox presentation used for markdown previews.","DashboardList"),"analytics-dashboard.query.builder":X("analytics-dashboard.query.builder","Query Builder","Query authoring surface for the analytics example.","Inspect reusable queries that power dashboards.","Sandbox presentation used for markdown previews.","QueryBuilder"),"crm-pipeline.dashboard":X("crm-pipeline.dashboard","CRM Dashboard","Dashboard for the CRM pipeline example.","Track pipeline health and revenue progress.","Sandbox presentation used for markdown previews.","CrmDashboard"),"crm-pipeline.deal.pipeline":X("crm-pipeline.deal.pipeline","Pipeline Kanban","Pipeline board for the CRM pipeline example.","Review deal flow across pipeline stages.","Sandbox presentation used for markdown previews.","PipelineKanbanView"),"integration-hub.connection.list":X("integration-hub.connection.list","Connection List","Connected systems in the integration hub example.","Review connected systems and connection health.","Sandbox presentation used for markdown previews.","ConnectionList"),"integration-hub.dashboard":X("integration-hub.dashboard","Integration Dashboard","Operational dashboard for the integration hub example.","Monitor integration mix, connection health, and sync issues.","Sandbox presentation used for markdown previews.","IntegrationDashboard"),"integration-hub.sync.config":X("integration-hub.sync.config","Sync Configuration","Sync configuration surface for the integration hub example.","Inspect sync configuration and field mapping defaults.","Sandbox presentation used for markdown previews.","SyncConfigEditor"),"marketplace.dashboard":X("marketplace.dashboard","Marketplace Dashboard","Dashboard for the marketplace example.","Review order flow, category mix, and revenue summaries.","Sandbox presentation used for markdown previews.","MarketplaceDashboard"),"marketplace.order.list":X("marketplace.order.list","Order List","Order list for the marketplace example.","Inspect order activity and fulfillment state.","Sandbox presentation used for markdown previews.","OrderList"),"marketplace.product.catalog":X("marketplace.product.catalog","Product Catalog","Product catalog for the marketplace example.","Browse the available products and merchandising data.","Sandbox presentation used for markdown previews.","ProductCatalog"),"saas-boilerplate.billing.settings":X("saas-boilerplate.billing.settings","Billing Settings","Subscription and usage settings for the SaaS example.","Review billing configuration and current subscription data.","Sandbox presentation used for markdown previews.","SubscriptionView"),"saas-boilerplate.dashboard":X("saas-boilerplate.dashboard","SaaS Dashboard","Dashboard for the SaaS boilerplate example.","Review account, project, and billing summaries.","Sandbox presentation used for markdown previews.","SaasDashboard"),"saas-boilerplate.project.list":X("saas-boilerplate.project.list","Project List","Project list for the SaaS boilerplate example.","Browse projects and their current lifecycle state.","Sandbox presentation used for markdown previews.","ProjectListView"),"visualization-showcase.gallery":X("visualization-showcase.gallery","Visualization Showcase","Focused showcase of ContractSpec visualization primitives.","Review the canonical visualization catalog and design-system wrappers.","Sandbox presentation used for markdown previews.","VisualizationShowcase"),"workflow-system.dashboard":X("workflow-system.dashboard","Workflow Dashboard","Dashboard for the workflow system example.","Review workflow instance health and workload metrics.","Sandbox presentation used for markdown previews.","WorkflowDashboard"),"workflow-system.definition.list":X("workflow-system.definition.list","Workflow Definition List","Workflow definitions in the workflow system example.","Browse available workflow definitions.","Sandbox presentation used for markdown previews.","WorkflowDefinitionList"),"workflow-system.instance.detail":X("workflow-system.instance.detail","Workflow Instance Detail","Workflow instance details in the workflow system example.","Inspect the state and approvals for a workflow instance.","Sandbox presentation used for markdown previews.","WorkflowInstanceDetail"),...Object.fromEntries(P$.map((f)=>[f.meta.key,f]))};function S(f){return j$[f]}function c(f){return f.graphql.apollo}import{jsx as V,jsxs as UU}from"react/jsx-runtime";var{LocalRuntimeServices:g$}=u$;function $U(f){console.error(`
10
10
  [TemplateRuntime] Bootstrap Failed
11
11
  ==================================
12
12
 
@@ -16,4 +16,4 @@ The runtime failed to initialize. This usually happens because:
16
16
  3. The initial seed data could not be inserted
17
17
 
18
18
  Check the console for specific database errors.
19
- `.trim(),o)}class U{crm;saas;agent;workflow;marketplace;integration;analytics;policySafeKnowledgeAssistant}function Kr({templateId:o,projectId:s="local-project",lazy:i=!1,children:w}){let[h,u]=m(null),[$,X]=m(null);qs(()=>{let x=!0;async function O(){try{if(i)return;let n=y(o);if(!n)throw Error(`Template not found: ${o}`);let d=new Qs;await d.init({});let W=new C({runtime:d});await W.install(o,{projectId:s});let K=Z(d),A=await Q(),t=new U;t.crm=ms(d.db),t.saas=Os(d.db),t.agent=Fs({projectId:s}),t.workflow=Ks(d.db),t.marketplace=Us(d.db),t.integration=zs(d.db),t.analytics=Zs(d.db),t.policySafeKnowledgeAssistant=Xs(d.db);let P=async(c)=>{if(c==="crm-pipeline.dashboard"){let[a,v]=await Promise.all([t.crm.listDeals({projectId:s,pipelineId:"pipeline-1",limit:50}),t.crm.getPipelineStages({pipelineId:"pipeline-1"})]);return{data:{deals:a.deals,stages:v,summary:{total:a.total,totalValue:a.totalValue}},metadata:{total:a.total,timestamp:new Date,source:"crm-pipeline"}}}if(c==="crm-pipeline.deal.pipeline"){let[a,v]=await Promise.all([t.crm.listDeals({projectId:s,pipelineId:"pipeline-1",limit:100}),t.crm.getPipelineStages({pipelineId:"pipeline-1"})]);return{data:{deals:a.deals,stages:v,total:a.total,totalValue:a.totalValue},metadata:{total:a.total,timestamp:new Date,source:"crm-pipeline"}}}if(c==="saas-boilerplate.dashboard"){let[a,v]=await Promise.all([t.saas.listProjects({projectId:s,limit:10}),t.saas.getSubscription({projectId:s})]);return{data:{projects:a.items,subscription:v,summary:{totalProjects:a.total}},metadata:{total:a.total,timestamp:new Date,source:"saas-boilerplate"}}}if(c==="saas-boilerplate.project.list"){let a=await t.saas.listProjects({projectId:s,limit:50});return{data:a.items,metadata:{total:a.total,timestamp:new Date,source:"saas-boilerplate"}}}if(c==="saas-boilerplate.billing.settings")return{data:await t.saas.getSubscription({projectId:s}),metadata:{timestamp:new Date,source:"saas-boilerplate"}};if(c==="agent-console.dashboard")return{data:await Vs(t.agent,{projectId:s,organizationId:D}),metadata:{timestamp:new Date,source:"agent-console"}};if(c==="agent-console.agent.viewList"||c==="agent-console.agent.list"){let a=await t.agent.listAgents({projectId:s,organizationId:D,limit:50});return{data:a.items,metadata:{total:a.total,timestamp:new Date,source:"agent-console"}}}if(c==="agent-console.run.list"){let a=await t.agent.listRuns({projectId:s,limit:50});return{data:a.items,metadata:{total:a.total,timestamp:new Date,source:"agent-console"}}}if(c==="agent-console.tool.list"||c==="agent-console.tool.registry"){let a=await t.agent.listTools({projectId:s,organizationId:D,limit:50});return{data:a.items,metadata:{total:a.total,timestamp:new Date,source:"agent-console"}}}if(c==="visualization-showcase.gallery")return{data:null,metadata:{timestamp:new Date,source:"visualization-showcase"}};return console.warn(`No data fetcher found for presentation: ${c}`),{data:null,metadata:{timestamp:new Date,source:"unknown"}}};if(x)u({template:n,runtime:d,installer:W,client:K,templateId:o,projectId:s,engine:A,handlers:t,fetchData:P,resolvePresentation:V})}catch(n){if(Rs(n),x)X(n instanceof Error?n:Error("Unknown runtime error"))}}return O(),()=>{x=!1}},[o,s,i]);let g=Ps(o),e=Bs(()=>{if(!h)return null;return{...h,components:g}},[h,g]);if($)return Ls("div",{className:"rounded border border-red-200 bg-red-50 p-4 text-red-500",children:[l("h3",{className:"font-bold",children:"Runtime Error"}),l("pre",{className:"mt-2 overflow-auto text-xs",children:$.message})]});if(!e)return l("div",{className:"animate-pulse p-12 text-center text-gray-400",children:"Initializing runtime environment..."});return l(gs,{client:e.client,children:l(As.Provider,{value:e,children:w})})}function Ar(){return z().engine}function b(){return z().handlers}function Pr(){return b().crm}function Rr(){return b().saas}function Lr(){return b().agent}function Yr(){return b().workflow}function Mr(){return b().marketplace}function Jr(){return b().integration}function Gr(){return b().analytics}export{Yr as useWorkflowHandlers,b as useTemplateHandlers,Ar as useTemplateEngine,Rr as useSaasHandlers,Mr as useMarketplaceHandlers,Jr as useIntegrationHandlers,Pr as useCrmHandlers,Gr as useAnalyticsHandlers,Lr as useAgentHandlers,_a as searchExamples,wr as resetTemplateEngine,fr as listTemplates,B as listExamples,br as getTemplatesByModule,Q as getTemplateEngine,y as getTemplate,Ha as getExample,nr as getClonableTemplates,ps as createTemplateTransformEngine,Kr as TemplateRuntimeProvider,C as TemplateInstaller,U as TemplateHandlers,f as TEMPLATE_REGISTRY,Na as ExampleRegistry,Ga as EXAMPLE_REGISTRY};
19
+ `.trim(),f)}class I{crm;saas;agent;workflow;marketplace;integration;analytics;policySafeKnowledgeAssistant}function Xv({templateId:f,projectId:$="local-project",lazy:w=!1,children:F}){let[W,O]=P(null),[H,m]=P(null);N$(()=>{let M=!0;async function d(){try{if(w)return;let z=x(f);if(!z)throw Error(`Template not found: ${f}`);let Q=new g$;await Q.init({});let C=new G({runtime:Q});await C.install(f,{projectId:$});let p=c(Q),s=await A(),v=new I;v.crm=s$(Q.db),v.saas=t$(Q.db),v.agent=m$({projectId:$}),v.workflow=n$(Q.db),v.marketplace=o$(Q.db),v.integration=l$(Q.db),v.analytics=p$(Q.db),v.policySafeKnowledgeAssistant=a$(Q.db);let l=async(q)=>{if(q==="crm-pipeline.dashboard"){let[U,K]=await Promise.all([v.crm.listDeals({projectId:$,pipelineId:"pipeline-1",limit:50}),v.crm.getPipelineStages({pipelineId:"pipeline-1"})]);return{data:{deals:U.deals,stages:K,summary:{total:U.total,totalValue:U.totalValue}},metadata:{total:U.total,timestamp:new Date,source:"crm-pipeline"}}}if(q==="crm-pipeline.deal.pipeline"){let[U,K]=await Promise.all([v.crm.listDeals({projectId:$,pipelineId:"pipeline-1",limit:100}),v.crm.getPipelineStages({pipelineId:"pipeline-1"})]);return{data:{deals:U.deals,stages:K,total:U.total,totalValue:U.totalValue},metadata:{total:U.total,timestamp:new Date,source:"crm-pipeline"}}}if(q==="saas-boilerplate.dashboard"){let[U,K]=await Promise.all([v.saas.listProjects({projectId:$,limit:10}),v.saas.getSubscription({projectId:$})]);return{data:{projects:U.items,subscription:K,summary:{totalProjects:U.total}},metadata:{total:U.total,timestamp:new Date,source:"saas-boilerplate"}}}if(q==="saas-boilerplate.project.list"){let U=await v.saas.listProjects({projectId:$,limit:50});return{data:U.items,metadata:{total:U.total,timestamp:new Date,source:"saas-boilerplate"}}}if(q==="saas-boilerplate.billing.settings")return{data:await v.saas.getSubscription({projectId:$}),metadata:{timestamp:new Date,source:"saas-boilerplate"}};if(q==="agent-console.dashboard")return{data:await d$(v.agent,{projectId:$,organizationId:J}),metadata:{timestamp:new Date,source:"agent-console"}};if(q==="agent-console.agent.viewList"||q==="agent-console.agent.list"){let U=await v.agent.listAgents({projectId:$,organizationId:J,limit:50});return{data:U.items,metadata:{total:U.total,timestamp:new Date,source:"agent-console"}}}if(q==="agent-console.run.list"){let U=await v.agent.listRuns({projectId:$,limit:50});return{data:U.items,metadata:{total:U.total,timestamp:new Date,source:"agent-console"}}}if(q==="agent-console.tool.list"||q==="agent-console.tool.registry"){let U=await v.agent.listTools({projectId:$,organizationId:J,limit:50});return{data:U.items,metadata:{total:U.total,timestamp:new Date,source:"agent-console"}}}if(q==="visualization-showcase.gallery")return{data:null,metadata:{timestamp:new Date,source:"visualization-showcase"}};if(r$(f)&&(q==="learning.journey.track_list"||q==="learning.journey.track_detail"||q==="learning.journey.progress_widget"))return{data:i$(f,q),metadata:{timestamp:new Date,source:"learning-journey",templateId:f}};return console.warn(`No data fetcher found for presentation: ${q}`),{data:null,metadata:{timestamp:new Date,source:"unknown"}}};if(M)O({template:z,runtime:Q,installer:C,client:p,templateId:f,projectId:$,engine:s,handlers:v,fetchData:l,resolvePresentation:S})}catch(z){if($U(z),M)m(z instanceof Error?z:Error("Unknown runtime error"))}}return d(),()=>{M=!1}},[f,$,w]);let b=fU(f),E=T$(()=>{if(!W)return null;return{...W,components:b}},[W,b]);if(H)return UU("div",{className:"rounded border border-red-200 bg-red-50 p-4 text-red-500",children:[V("h3",{className:"font-bold",children:"Runtime Error"}),V("pre",{className:"mt-2 overflow-auto text-xs",children:H.message})]});if(!E)return V("div",{className:"animate-pulse p-12 text-center text-gray-400",children:"Initializing runtime environment..."});return V(I$,{client:E.client,children:V(e$.Provider,{value:E,children:F})})}function vv(){return j().engine}function Y(){return j().handlers}function wv(){return Y().crm}function qv(){return Y().saas}function Zv(){return Y().agent}function Fv(){return Y().workflow}function Qv(){return Y().marketplace}function Wv(){return Y().integration}function Bv(){return Y().analytics}var u=[{key:"agent-console",exportName:"ExecutionConsoleHost",loadModule:()=>import("@contractspec/example.agent-console/ui")},{key:"ai-chat-assistant",exportName:"AiChatAssistantDashboard",loadModule:()=>import("@contractspec/example.ai-chat-assistant/ui")},{key:"analytics-dashboard",exportName:"AnalyticsDashboard",loadModule:()=>import("@contractspec/example.analytics-dashboard/ui")},{key:"crm-pipeline",exportName:"CrmDashboard",loadModule:()=>import("@contractspec/example.crm-pipeline/ui")},{key:"data-grid-showcase",exportName:"DataGridShowcase",loadModule:()=>import("@contractspec/example.data-grid-showcase/ui")},{key:"in-app-docs",exportName:"InAppDocsViewer",loadModule:()=>import("@contractspec/example.in-app-docs/ui")},{key:"integration-hub",exportName:"IntegrationDashboard",loadModule:()=>import("@contractspec/example.integration-hub/ui")},{key:"learning-journey-registry",exportName:"LearningMiniApp",loadModule:()=>import("@contractspec/example.learning-journey-registry/ui")},{key:"marketplace",exportName:"MarketplaceDashboard",loadModule:()=>import("@contractspec/example.marketplace/ui")},{key:"policy-safe-knowledge-assistant",exportName:"PolicySafeKnowledgeAssistantDashboard",loadModule:()=>import("@contractspec/example.policy-safe-knowledge-assistant/ui")},{key:"saas-boilerplate",exportName:"SaasDashboard",loadModule:()=>import("@contractspec/example.saas-boilerplate/ui")},{key:"visualization-showcase",exportName:"VisualizationShowcase",loadModule:()=>import("@contractspec/example.visualization-showcase/ui")},{key:"workflow-system",exportName:"WorkflowDashboard",loadModule:()=>import("@contractspec/example.workflow-system/ui")}];var N=k().filter((f)=>f.meta.visibility==="public"),XU=new Map(N.map((f)=>[f.meta.key,f])),T=u.flatMap((f)=>{let $=h(f.key);if(!$?.entrypoints.ui)return[];return[{...f,title:$.meta.title??$.meta.key,description:$.meta.summary??$.meta.description??""}]}),g=new Map(T.map((f)=>[f.key,f]));function Vv(){return N}function kv(f){return XU.get(f)}function Dv(){return T}function Ov(f){return g.get(f)}function Ev(f){return g.has(f)}function Mv(f){return`/docs/examples/${encodeURIComponent(f)}`}function hv(f){let $=encodeURIComponent(f);return`/docs/reference/${$}/${$}`}function yv(f){if(!h(f)?.surfaces.sandbox.enabled)return null;return`/sandbox?template=${encodeURIComponent(f)}`}export{Fv as useWorkflowHandlers,Y as useTemplateHandlers,vv as useTemplateEngine,qv as useSaasHandlers,Qv as useMarketplaceHandlers,Wv as useIntegrationHandlers,wv as useCrmHandlers,Bv as useAnalyticsHandlers,Zv as useAgentHandlers,Ev as supportsInlineExamplePreview,QX as searchExamples,hX as resetTemplateEngine,HX as listTemplates,Vv as listPublicExamples,Dv as listInlineExamplePreviews,k as listExamples,bX as getTemplatesByModule,A as getTemplateEngine,x as getTemplate,kv as getPublicExample,Ov as getInlineExamplePreview,yv as getExamplePreviewHref,h as getExample,CX as getClonableTemplates,J$ as createTemplateTransformEngine,hv as buildExampleReferenceHref,Mv as buildExampleDocsHref,Xv as TemplateRuntimeProvider,G as TemplateInstaller,I as TemplateHandlers,B as TEMPLATE_REGISTRY,YX as ExampleRegistry,FX as EXAMPLE_REGISTRY};
@@ -1,11 +1,11 @@
1
- import{ExampleRegistry as Lo}from"@contractspec/lib.contracts-spec/examples/registry";import R from"@contractspec/example.agent-console/example";import L from"@contractspec/example.ai-chat-assistant/example";import Y from"@contractspec/example.ai-support-bot/example";import M from"@contractspec/example.analytics-dashboard/example";import J from"@contractspec/example.calendar-google/example";import G from"@contractspec/example.content-generation/example";import H from"@contractspec/example.crm-pipeline/example";import _ from"@contractspec/example.data-grid-showcase/example";import T from"@contractspec/example.email-gmail/example";import j from"@contractspec/example.harness-lab/example";import N from"@contractspec/example.in-app-docs/example";import E from"@contractspec/example.integration-hub/example";import I from"@contractspec/example.integration-posthog/example";import oo from"@contractspec/example.integration-stripe/example";import so from"@contractspec/example.integration-supabase/example";import ao from"@contractspec/example.kb-update-pipeline/example";import ro from"@contractspec/example.knowledge-canon/example";import to from"@contractspec/example.learning-journey-ambient-coach/example";import io from"@contractspec/example.learning-journey-crm-onboarding/example";import co from"@contractspec/example.learning-journey-duo-drills/example";import wo from"@contractspec/example.learning-journey-platform-tour/example";import ho from"@contractspec/example.learning-journey-quest-challenges/example";import fo from"@contractspec/example.learning-journey-registry/example";import bo from"@contractspec/example.learning-journey-studio-onboarding/example";import no from"@contractspec/example.learning-journey-ui-coaching/example";import vo from"@contractspec/example.learning-journey-ui-gamified/example";import ko from"@contractspec/example.learning-journey-ui-onboarding/example";import yo from"@contractspec/example.learning-journey-ui-shared/example";import lo from"@contractspec/example.learning-patterns/example";import po from"@contractspec/example.lifecycle-cli/example";import uo from"@contractspec/example.lifecycle-dashboard/example";import eo from"@contractspec/example.locale-jurisdiction-gate/example";import xo from"@contractspec/example.marketplace/example";import So from"@contractspec/example.meeting-recorder-providers/example";import Co from"@contractspec/example.messaging-agent-actions/example";import Do from"@contractspec/example.minimal/example";import $o from"@contractspec/example.openbanking-powens/example";import go from"@contractspec/example.opencode-cli/example";import Wo from"@contractspec/example.personalization/example";import qo from"@contractspec/example.pocket-family-office/example";import Bo from"@contractspec/example.policy-safe-knowledge-assistant/example";import Qo from"@contractspec/example.product-intent/example";import Fo from"@contractspec/example.project-management-sync/example";import Vo from"@contractspec/example.saas-boilerplate/example";import Zo from"@contractspec/example.service-business-os/example";import mo from"@contractspec/example.team-hub/example";import zo from"@contractspec/example.versioned-knowledge-base/example";import Uo from"@contractspec/example.video-api-showcase/example";import Xo from"@contractspec/example.video-docs-terminal/example";import Oo from"@contractspec/example.video-marketing-clip/example";import Ko from"@contractspec/example.visualization-showcase/example";import Ao from"@contractspec/example.voice-providers/example";import Po from"@contractspec/example.wealth-snapshot/example";import Ro from"@contractspec/example.workflow-system/example";var q=[R,L,Y,M,J,G,H,_,T,j,N,E,I,oo,so,ao,ro,to,io,co,wo,ho,fo,bo,no,vo,ko,yo,lo,po,uo,eo,xo,So,Co,Do,$o,go,Wo,qo,Bo,Qo,Fo,Vo,Zo,mo,zo,Uo,Xo,Oo,Ko,Ao,Po,Ro];import{ExampleRegistry as Na}from"@contractspec/lib.contracts-spec/examples/registry";var k=new Lo;for(let o of q)k.register(o);var Ga=k.list();function B(){return k.list()}function Ha(o){return k.get(o)}function _a(o){return k.search(o)}import{ApolloProvider as gs}from"@apollo/client/react";import{web as Ws}from"@contractspec/lib.runtime-sandbox";import{useEffect as qs,useMemo as Bs,useState as m}from"react";import{AGENT_CONSOLE_DEMO_ORGANIZATION_ID as D,createAgentConsoleDemoHandlers as Fs,getAgentConsoleDashboardData as Vs}from"@contractspec/example.agent-console";import{createAnalyticsHandlers as Zs}from"@contractspec/example.analytics-dashboard";import{createCrmHandlers as ms}from"@contractspec/example.crm-pipeline";import{createIntegrationHandlers as zs}from"@contractspec/example.integration-hub";import{createMarketplaceHandlers as Us}from"@contractspec/example.marketplace";import{createPolicySafeKnowledgeAssistantHandlers as Xs}from"@contractspec/example.policy-safe-knowledge-assistant";import{createSaasHandlers as Os}from"@contractspec/example.saas-boilerplate";import{createWorkflowHandlers as Ks}from"@contractspec/example.workflow-system";import{TemplateRuntimeContext as As,useTemplateComponents as Ps,useTemplateRuntime as z}from"@contractspec/lib.example-shared-ui";import{agentDashboardMarkdownRenderer as Yo,agentListMarkdownRenderer as Mo,agentListReactRenderer as Jo,runListMarkdownRenderer as Go,toolRegistryMarkdownRenderer as Ho}from"@contractspec/example.agent-console";import{analyticsDashboardMarkdownRenderer as _o,dashboardListMarkdownRenderer as To,queryBuilderMarkdownRenderer as jo}from"@contractspec/example.analytics-dashboard";import{crmDashboardMarkdownRenderer as No,crmPipelineMarkdownRenderer as Eo,crmPipelineReactRenderer as Io}from"@contractspec/example.crm-pipeline";import{connectionListMarkdownRenderer as os,integrationDashboardMarkdownRenderer as ss,syncConfigMarkdownRenderer as as}from"@contractspec/example.integration-hub";import{marketplaceDashboardMarkdownRenderer as rs,orderListMarkdownRenderer as ts,productCatalogMarkdownRenderer as is}from"@contractspec/example.marketplace";import{projectListMarkdownRenderer as cs,projectListReactRenderer as ws,saasBillingMarkdownRenderer as ds,saasDashboardMarkdownRenderer as hs}from"@contractspec/example.saas-boilerplate";import{visualizationShowcaseMarkdownRenderer as fs}from"@contractspec/example.visualization-showcase/ui/renderers";import{workflowDashboardMarkdownRenderer as bs,workflowDefinitionListMarkdownRenderer as ns,workflowInstanceDetailMarkdownRenderer as vs}from"@contractspec/example.workflow-system";import{createDefaultTransformEngine as ks,registerBasicValidation as ys,registerDefaultReactRenderer as ls}from"@contractspec/lib.contracts-runtime-client-react/transform-engine";function ps(){let o=ks();return ls(o),ys(o),us(o),o}function us(o){o.register(Jo),o.register(Mo),o.register(Go),o.register(Ho),o.register(Yo),o.register(ws),o.register(cs),o.register(hs),o.register(ds),o.register(Io),o.register(Eo),o.register(No),o.register(bs),o.register(ns),o.register(vs),o.register(rs),o.register(is),o.register(ts),o.register(ss),o.register(os),o.register(as),o.register(_o),o.register(To),o.register(jo),o.register(fs)}var p=null;function Q(){if(!p)p=ps();return p}function wr(){p=null}import{web as xs}from"@contractspec/lib.runtime-sandbox";var F={"saas-boilerplate":["saas-boilerplate.dashboard","saas-boilerplate.project.list","saas-boilerplate.billing.settings"],"crm-pipeline":["crm-pipeline.dashboard","crm-pipeline.deal.pipeline"],"agent-console":["agent-console.dashboard","agent-console.agent.viewList","agent-console.run.list","agent-console.tool.list"],"workflow-system":["workflow-system.dashboard","workflow-system.definition.list","workflow-system.instance.detail"],marketplace:["marketplace.dashboard","marketplace.product.catalog","marketplace.order.list"],"integration-hub":["integration-hub.dashboard","integration-hub.connection.list","integration-hub.sync.config"],"analytics-dashboard":["analytics-dashboard.dashboard","analytics-dashboard.list","analytics-dashboard.query.builder"],"visualization-showcase":["visualization-showcase.gallery"],"learning-journey-studio-onboarding":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-platform-tour":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-crm-onboarding":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-duo-drills":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-ambient-coach":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],"learning-journey-quest-challenges":["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"]},es=B().filter((o)=>o.meta.key!=="agent-console").map((o)=>{let s=[...o.meta.tags??[]],i=s.some((w)=>w.toLowerCase()==="ai")||s.some((w)=>w.toLowerCase()==="assistant")?"ai":"business";return{id:o.meta.key,name:o.meta.title??o.meta.key,description:o.meta.description??"",category:i,complexity:"beginner",icon:"\uD83D\uDCE6",features:[],tags:s,schema:{models:[],contracts:[]},components:{list:"ExampleList",detail:"ExampleDetail"},preview:{demoUrl:`/sandbox?template=${encodeURIComponent(o.meta.key)}`},package:o.entrypoints.packageName,presentations:F[o.meta.key]??[],renderTargets:["react","markdown"]}}),f=[{id:"todos-app",name:"To-dos List App",description:"CRUD flows, filtering, priorities, and ceremonies for handing off work across crews.",category:"productivity",complexity:"beginner",icon:"✅",features:["CRUD tasks","Filters","Categories","Search","Priorities"],tags:["tasks","ops","starter"],schema:{models:["Task","TaskCategory"],contracts:["template.todos.crud"]},components:{list:"TaskList",detail:"TaskDetailPanel",form:"TaskForm"},preview:{demoUrl:"/sandbox?template=todos-app"},docs:{quickstart:"/docs/templates/todos-app"}},{id:"messaging-app",name:"Messaging Application",description:"Conversation roster, optimistic sending, typing indicators, and delivery telemetry.",category:"communication",complexity:"intermediate",icon:"\uD83D\uDCAC",features:["Conversations","Real-time feed","Typing indicators","Read receipts"],tags:["messaging","realtime","ws"],schema:{models:["Conversation","ConversationParticipant","Message"],contracts:["template.messaging.core"]},components:{list:"ConversationList",detail:"MessageThread",form:"MessageComposer"},preview:{demoUrl:"/sandbox?template=messaging-app"},docs:{quickstart:"/docs/templates/messaging-app"}},{id:"recipe-app-i18n",name:"Recipe App (i18n)",description:"Localized browsing experience with bilingual content, categories, and favorites.",category:"content",complexity:"intermediate",icon:"\uD83C\uDF72",features:["i18n","Favorites","Categories","Search","RTL-ready"],tags:["content","i18n","localization"],schema:{models:["RecipeCategory","Recipe","RecipeIngredient","RecipeInstruction"],contracts:["template.recipes.browse"]},components:{list:"RecipeList",detail:"RecipeDetail",form:"RecipeForm"},preview:{demoUrl:"/sandbox?template=recipe-app-i18n"},docs:{quickstart:"/docs/templates/recipe-app-i18n"}},{id:"agent-console",name:"Agent Console",description:"Deterministic autonomous-agent walkthrough with seeded agents, tool registry, runs, metrics, and replayable proof.",category:"ai",complexity:"intermediate",icon:"\uD83E\uDD16",features:["Seeded autonomous agents","Tool registry","Run execution history","Metrics","Markdown and React views"],tags:["ai","agents","autonomous","meetup","sandbox"],schema:{models:["Agent","Tool","Run"],contracts:["agent-console.agent.list","agent-console.agent.create","agent-console.run.execute"]},components:{list:"AgentListView",detail:"RunListView",form:"CreateAgentModal"},preview:{demoUrl:"/sandbox?template=agent-console"},package:"@contractspec/example.agent-console",presentations:F["agent-console"]??[],renderTargets:["react","markdown"]},...es];function fr(o){if(!o)return f;return f.filter((s)=>{if(o.category&&s.category!==o.category)return!1;if(o.complexity&&s.complexity!==o.complexity)return!1;if(o.tag&&!s.tags.some((i)=>i.toLowerCase()===o.tag?.toLowerCase()))return!1;return!0})}function y(o){return f.find((s)=>s.id===o)}function br(o){return f.filter((s)=>s.usesModules?.includes(o))}function nr(){return f.filter((o)=>!!o.package)}class S{baseUrl;fetchImpl;constructor(o){this.baseUrl=o.registryUrl.replace(/\/+$/,""),this.fetchImpl=o.fetchImpl??fetch}async getManifest(){let o=await this.fetchImpl(`${this.baseUrl}/r/contractspec.json`,{method:"GET",headers:{Accept:"application/json"}});if(!o.ok)throw Error(`Registry manifest fetch failed: ${o.status} ${o.statusText}`);return await o.json()}async listByType(o){return(await this.getManifest()).items.filter((i)=>i.type===o)}async listTemplateSummaries(){return(await this.listByType("contractspec:template")).map((s)=>({id:s.key,title:s.title,description:s.description,version:s.version,tags:s.meta.tags,source:"registry"}))}async getItem(o,s){let i=await this.fetchImpl(`${this.baseUrl}/r/contractspec/${o}/${s}.json`,{method:"GET",headers:{Accept:"application/json"}});if(!i.ok)throw Error(`Registry item fetch failed: ${i.status} ${i.statusText}`);return await i.json()}}var{LocalRuntimeServices:Ss}=xs,Cs=`
1
+ import{createRequire as i}from"node:module";var Z=i(import.meta.url);import{ExampleRegistry as of}from"@contractspec/lib.contracts-spec/examples/registry";import r from"@contractspec/example.agent-console/example";import o from"@contractspec/example.ai-chat-assistant/example";import a from"@contractspec/example.ai-support-bot/example";import t from"@contractspec/example.analytics-dashboard/example";import n from"@contractspec/example.calendar-google/example";import e from"@contractspec/example.content-generation/example";import ff from"@contractspec/example.crm-pipeline/example";import $f from"@contractspec/example.data-grid-showcase/example";import Uf from"@contractspec/example.email-gmail/example";import Xf from"@contractspec/example.harness-lab/example";import vf from"@contractspec/example.in-app-docs/example";import wf from"@contractspec/example.integration-hub/example";import qf from"@contractspec/example.integration-posthog/example";import Zf from"@contractspec/example.integration-stripe/example";import Ff from"@contractspec/example.integration-supabase/example";import Qf from"@contractspec/example.kb-update-pipeline/example";import Wf from"@contractspec/example.knowledge-canon/example";import Bf from"@contractspec/example.learning-journey-ambient-coach/example";import Yf from"@contractspec/example.learning-journey-crm-onboarding/example";import zf from"@contractspec/example.learning-journey-duo-drills/example";import Kf from"@contractspec/example.learning-journey-platform-tour/example";import _f from"@contractspec/example.learning-journey-quest-challenges/example";import xf from"@contractspec/example.learning-journey-registry/example";import Vf from"@contractspec/example.learning-journey-studio-onboarding/example";import kf from"@contractspec/example.learning-journey-ui-coaching/example";import Df from"@contractspec/example.learning-journey-ui-gamified/example";import Of from"@contractspec/example.learning-journey-ui-onboarding/example";import Ef from"@contractspec/example.learning-journey-ui-shared/example";import Mf from"@contractspec/example.learning-patterns/example";import hf from"@contractspec/example.lifecycle-cli/example";import yf from"@contractspec/example.lifecycle-dashboard/example";import Gf from"@contractspec/example.locale-jurisdiction-gate/example";import Jf from"@contractspec/example.marketplace/example";import Hf from"@contractspec/example.meeting-recorder-providers/example";import bf from"@contractspec/example.messaging-agent-actions/example";import Cf from"@contractspec/example.minimal/example";import Rf from"@contractspec/example.openbanking-powens/example";import Af from"@contractspec/example.opencode-cli/example";import Lf from"@contractspec/example.personalization/example";import Sf from"@contractspec/example.pocket-family-office/example";import cf from"@contractspec/example.policy-safe-knowledge-assistant/example";import Pf from"@contractspec/example.product-intent/example";import jf from"@contractspec/example.project-management-sync/example";import If from"@contractspec/example.saas-boilerplate/example";import uf from"@contractspec/example.service-business-os/example";import Nf from"@contractspec/example.team-hub/example";import Tf from"@contractspec/example.versioned-knowledge-base/example";import gf from"@contractspec/example.video-api-showcase/example";import mf from"@contractspec/example.video-docs-terminal/example";import df from"@contractspec/example.video-marketing-clip/example";import pf from"@contractspec/example.visualization-showcase/example";import sf from"@contractspec/example.voice-providers/example";import lf from"@contractspec/example.wealth-snapshot/example";import rf from"@contractspec/example.workflow-system/example";var R=[r,o,a,t,n,e,ff,$f,Uf,Xf,vf,wf,qf,Zf,Ff,Qf,Wf,Bf,Yf,zf,Kf,_f,xf,Vf,kf,Df,Of,Ef,Mf,hf,yf,Gf,Jf,Hf,bf,Cf,Rf,Af,Lf,Sf,cf,Pf,jf,If,uf,Nf,Tf,gf,mf,df,pf,sf,lf,rf];import{ExampleRegistry as KX}from"@contractspec/lib.contracts-spec/examples/registry";var _=new of;for(let f of R)_.register(f);var WX=_.list();function k(){return _.list()}function h(f){return _.get(f)}function BX(f){return _.search(f)}import{ApolloProvider as u$}from"@apollo/client/react";import{web as N$}from"@contractspec/lib.runtime-sandbox";import{useEffect as T$,useMemo as g$,useState as P}from"react";import{AGENT_CONSOLE_DEMO_ORGANIZATION_ID as J,createAgentConsoleDemoHandlers as d$,getAgentConsoleDashboardData as p$}from"@contractspec/example.agent-console";import{createAnalyticsHandlers as s$}from"@contractspec/example.analytics-dashboard";import{createCrmHandlers as l$}from"@contractspec/example.crm-pipeline";import{createIntegrationHandlers as i$}from"@contractspec/example.integration-hub";import{buildLearningPresentationData as r$,isLearningTemplate as o$}from"@contractspec/example.learning-journey-registry";import{createMarketplaceHandlers as a$}from"@contractspec/example.marketplace";import{createPolicySafeKnowledgeAssistantHandlers as t$}from"@contractspec/example.policy-safe-knowledge-assistant";import{createSaasHandlers as n$}from"@contractspec/example.saas-boilerplate";import{createWorkflowHandlers as e$}from"@contractspec/example.workflow-system";import{TemplateRuntimeContext as fU,useTemplateComponents as $U,useTemplateRuntime as j}from"@contractspec/lib.example-shared-ui";import{agentDashboardMarkdownRenderer as af,agentListMarkdownRenderer as tf,agentListReactRenderer as nf,runListMarkdownRenderer as ef,toolRegistryMarkdownRenderer as f$}from"@contractspec/example.agent-console";import{analyticsDashboardMarkdownRenderer as $$,dashboardListMarkdownRenderer as U$,queryBuilderMarkdownRenderer as X$}from"@contractspec/example.analytics-dashboard";import{crmDashboardMarkdownRenderer as v$,crmPipelineMarkdownRenderer as w$,crmPipelineReactRenderer as q$}from"@contractspec/example.crm-pipeline";import{connectionListMarkdownRenderer as Z$,integrationDashboardMarkdownRenderer as F$,syncConfigMarkdownRenderer as Q$}from"@contractspec/example.integration-hub";import{learningTrackDetailMarkdownRenderer as W$,learningTrackListMarkdownRenderer as B$,learningTrackProgressWidgetMarkdownRenderer as Y$}from"@contractspec/example.learning-journey-registry";import{marketplaceDashboardMarkdownRenderer as z$,orderListMarkdownRenderer as K$,productCatalogMarkdownRenderer as _$}from"@contractspec/example.marketplace";import{projectListMarkdownRenderer as x$,projectListReactRenderer as V$,saasBillingMarkdownRenderer as k$,saasDashboardMarkdownRenderer as D$}from"@contractspec/example.saas-boilerplate";import{visualizationShowcaseMarkdownRenderer as O$}from"@contractspec/example.visualization-showcase/ui/renderers";import{workflowDashboardMarkdownRenderer as E$,workflowDefinitionListMarkdownRenderer as M$,workflowInstanceDetailMarkdownRenderer as h$}from"@contractspec/example.workflow-system";import{createDefaultTransformEngine as y$,registerBasicValidation as G$,registerDefaultReactRenderer as J$}from"@contractspec/lib.contracts-runtime-client-react/transform-engine";function H$(){let f=y$();return J$(f),G$(f),b$(f),f}function b$(f){f.register(nf),f.register(tf),f.register(ef),f.register(f$),f.register(af),f.register(V$),f.register(x$),f.register(D$),f.register(k$),f.register(q$),f.register(w$),f.register(v$),f.register(E$),f.register(M$),f.register(h$),f.register(z$),f.register(_$),f.register(K$),f.register(F$),f.register(Z$),f.register(Q$),f.register($$),f.register(U$),f.register(X$),f.register(B$),f.register(W$),f.register(Y$),f.register(O$)}var D=null;function A(){if(!D)D=H$();return D}function GX(){D=null}import{web as L$}from"@contractspec/lib.runtime-sandbox";import{getLearningTemplateIds as C$}from"@contractspec/example.learning-journey-registry";var R$=["learning.journey.track_list","learning.journey.track_detail","learning.journey.progress_widget"],L={"saas-boilerplate":["saas-boilerplate.dashboard","saas-boilerplate.project.list","saas-boilerplate.billing.settings"],"crm-pipeline":["crm-pipeline.dashboard","crm-pipeline.deal.pipeline"],"agent-console":["agent-console.dashboard","agent-console.agent.viewList","agent-console.run.list","agent-console.tool.list"],"workflow-system":["workflow-system.dashboard","workflow-system.definition.list","workflow-system.instance.detail"],marketplace:["marketplace.dashboard","marketplace.product.catalog","marketplace.order.list"],"integration-hub":["integration-hub.dashboard","integration-hub.connection.list","integration-hub.sync.config"],"analytics-dashboard":["analytics-dashboard.dashboard","analytics-dashboard.list","analytics-dashboard.query.builder"],"visualization-showcase":["visualization-showcase.gallery"],...Object.fromEntries(C$().map((f)=>[f,[...R$]]))},A$=k().filter((f)=>f.meta.key!=="agent-console").map((f)=>{let $=[...f.meta.tags??[]],w=$.some((F)=>F.toLowerCase()==="ai")||$.some((F)=>F.toLowerCase()==="assistant")?"ai":"business";return{id:f.meta.key,name:f.meta.title??f.meta.key,description:f.meta.description??"",category:w,complexity:"beginner",icon:"\uD83D\uDCE6",features:[],tags:$,schema:{models:[],contracts:[]},components:{list:"ExampleList",detail:"ExampleDetail"},preview:{demoUrl:`/sandbox?template=${encodeURIComponent(f.meta.key)}`},package:f.entrypoints.packageName,presentations:L[f.meta.key]??[],renderTargets:["react","markdown"]}}),B=[{id:"todos-app",name:"To-dos List App",description:"CRUD flows, filtering, priorities, and ceremonies for handing off work across crews.",category:"productivity",complexity:"beginner",icon:"✅",features:["CRUD tasks","Filters","Categories","Search","Priorities"],tags:["tasks","ops","starter"],schema:{models:["Task","TaskCategory"],contracts:["template.todos.crud"]},components:{list:"TaskList",detail:"TaskDetailPanel",form:"TaskForm"},preview:{demoUrl:"/sandbox?template=todos-app"},docs:{quickstart:"/docs/templates/todos-app"}},{id:"messaging-app",name:"Messaging Application",description:"Conversation roster, optimistic sending, typing indicators, and delivery telemetry.",category:"communication",complexity:"intermediate",icon:"\uD83D\uDCAC",features:["Conversations","Real-time feed","Typing indicators","Read receipts"],tags:["messaging","realtime","ws"],schema:{models:["Conversation","ConversationParticipant","Message"],contracts:["template.messaging.core"]},components:{list:"ConversationList",detail:"MessageThread",form:"MessageComposer"},preview:{demoUrl:"/sandbox?template=messaging-app"},docs:{quickstart:"/docs/templates/messaging-app"}},{id:"recipe-app-i18n",name:"Recipe App (i18n)",description:"Localized browsing experience with bilingual content, categories, and favorites.",category:"content",complexity:"intermediate",icon:"\uD83C\uDF72",features:["i18n","Favorites","Categories","Search","RTL-ready"],tags:["content","i18n","localization"],schema:{models:["RecipeCategory","Recipe","RecipeIngredient","RecipeInstruction"],contracts:["template.recipes.browse"]},components:{list:"RecipeList",detail:"RecipeDetail",form:"RecipeForm"},preview:{demoUrl:"/sandbox?template=recipe-app-i18n"},docs:{quickstart:"/docs/templates/recipe-app-i18n"}},{id:"agent-console",name:"Agent Console",description:"Deterministic autonomous-agent walkthrough with seeded agents, tool registry, runs, metrics, and replayable proof.",category:"ai",complexity:"intermediate",icon:"\uD83E\uDD16",features:["Seeded autonomous agents","Tool registry","Run execution history","Metrics","Markdown and React views"],tags:["ai","agents","autonomous","meetup","sandbox"],schema:{models:["Agent","Tool","Run"],contracts:["agent-console.agent.list","agent-console.agent.create","agent-console.run.execute"]},components:{list:"AgentListView",detail:"RunListView",form:"CreateAgentModal"},preview:{demoUrl:"/sandbox?template=agent-console"},package:"@contractspec/example.agent-console",presentations:L["agent-console"]??[],renderTargets:["react","markdown"]},...A$];function CX(f){if(!f)return B;return B.filter(($)=>{if(f.category&&$.category!==f.category)return!1;if(f.complexity&&$.complexity!==f.complexity)return!1;if(f.tag&&!$.tags.some((w)=>w.toLowerCase()===f.tag?.toLowerCase()))return!1;return!0})}function x(f){return B.find(($)=>$.id===f)}function RX(f){return B.filter(($)=>$.usesModules?.includes(f))}function AX(){return B.filter((f)=>!!f.package)}class y{baseUrl;fetchImpl;constructor(f){this.baseUrl=f.registryUrl.replace(/\/+$/,""),this.fetchImpl=f.fetchImpl??fetch}async getManifest(){let f=await this.fetchImpl(`${this.baseUrl}/r/contractspec.json`,{method:"GET",headers:{Accept:"application/json"}});if(!f.ok)throw Error(`Registry manifest fetch failed: ${f.status} ${f.statusText}`);return await f.json()}async listByType(f){return(await this.getManifest()).items.filter((w)=>w.type===f)}async listTemplateSummaries(){return(await this.listByType("contractspec:template")).map(($)=>({id:$.key,title:$.title,description:$.description,version:$.version,tags:$.meta.tags,source:"registry"}))}async getItem(f,$){let w=await this.fetchImpl(`${this.baseUrl}/r/contractspec/${f}/${$}.json`,{method:"GET",headers:{Accept:"application/json"}});if(!w.ok)throw Error(`Registry item fetch failed: ${w.status} ${w.statusText}`);return await w.json()}}var{LocalRuntimeServices:S$}=L$,c$=`
2
2
  mutation SaveTemplateToStudio($input: SaveTemplateInput!) {
3
3
  saveTemplateToStudio(input: $input) {
4
4
  projectId
5
5
  status
6
6
  }
7
7
  }
8
- `;class C{runtime;endpoint;registryUrl;fetchImpl;constructor(o={}){this.runtime=o.runtime??new Ss,this.endpoint=o.endpoint??"/api/graphql",this.registryUrl=o.registryUrl?o.registryUrl.replace(/\/+$/,""):null,this.fetchImpl=o.fetchImpl??fetch}async init(){await this.runtime.init()}list(o){return o?f.filter((s)=>{if(o.category&&o.category!==s.category)return!1;if(o.complexity&&o.complexity!==s.complexity)return!1;if(o.tag&&!s.tags.includes(o.tag))return!1;return!0}):f}async listRemoteTemplates(){if(!this.registryUrl)return[];return await new S({registryUrl:this.registryUrl,fetchImpl:this.fetchImpl}).listTemplateSummaries()}resolveLocalTemplateId(o){return y(o)?o:null}get(o){return y(o)}async install(o,s={}){await this.runtime.seedTemplate({templateId:o,projectId:s.projectId})}async saveToStudio(o){let s=await this.runtime.db.export(),i=Ds(s),w=await this.fetchImpl(o.endpoint??this.endpoint,{method:"POST",headers:{"Content-Type":"application/json",...o.token?{Authorization:`Bearer ${o.token}`}:{}},body:JSON.stringify({query:Cs,variables:{input:{templateId:o.templateId,projectName:o.projectName,organizationId:o.organizationId,payload:i}}})});if(!w.ok)throw Error(`Failed to save template: ${w.status} ${w.statusText}`);let h=await w.json();if(h.errors?.length)throw Error(h.errors[0]?.message??"Unknown error");if(!h.data?.saveTemplateToStudio)throw Error("Invalid response from Studio API");return h.data.saveTemplateToStudio}}function Ds(o){if(typeof Buffer<"u")return Buffer.from(o).toString("base64");let s="";return o.forEach((i)=>{s+=String.fromCharCode(i)}),btoa(s)}function r(o,s,i,w,h,u){return{meta:{key:o,version:"1.0.0",title:s,description:i,stability:"experimental",goal:w,context:h,owners:["@contractspec/examples"],tags:["template","sandbox"]},source:{type:"component",framework:"react",componentKey:u},targets:["react","markdown"]}}var $s={"agent-console.dashboard":r("agent-console.dashboard","Agent Console Dashboard","Operational dashboard for the agent console example.","Review agent activity, throughput, and execution health.","Sandbox presentation used for markdown previews.","AgentConsoleDashboard"),"agent-console.agent.list":r("agent-console.agent.list","Agent List","List of seeded agents in the agent console example.","Browse configured agents and their current capabilities.","Sandbox presentation used for markdown previews.","AgentListView"),"agent-console.agent.viewList":r("agent-console.agent.viewList","Agent List","List of seeded agents in the agent console example.","Browse configured agents and their current capabilities.","Sandbox presentation used for markdown previews.","AgentListView"),"agent-console.run.list":r("agent-console.run.list","Run List","Execution history for the agent console example.","Inspect recent runs and their outcomes.","Sandbox presentation used for markdown previews.","RunListView"),"agent-console.tool.list":r("agent-console.tool.list","Tool Registry","Available tools for the agent console example.","Inspect the tool registry exposed to the seeded agents.","Sandbox presentation used for markdown previews.","ToolRegistryView"),"agent-console.tool.registry":r("agent-console.tool.registry","Tool Registry","Available tools for the agent console example.","Inspect the tool registry exposed to the seeded agents.","Sandbox presentation used for markdown previews.","ToolRegistryView"),"analytics-dashboard.dashboard":r("analytics-dashboard.dashboard","Analytics Dashboard","Dashboard view for the analytics example.","Review saved widgets and query-backed dashboards.","Sandbox presentation used for markdown previews.","AnalyticsDashboard"),"analytics-dashboard.list":r("analytics-dashboard.list","Dashboard List","List view for analytics dashboards.","Browse dashboards available in the analytics example.","Sandbox presentation used for markdown previews.","DashboardList"),"analytics-dashboard.query.builder":r("analytics-dashboard.query.builder","Query Builder","Query authoring surface for the analytics example.","Inspect reusable queries that power dashboards.","Sandbox presentation used for markdown previews.","QueryBuilder"),"crm-pipeline.dashboard":r("crm-pipeline.dashboard","CRM Dashboard","Dashboard for the CRM pipeline example.","Track pipeline health and revenue progress.","Sandbox presentation used for markdown previews.","CrmDashboard"),"crm-pipeline.deal.pipeline":r("crm-pipeline.deal.pipeline","Pipeline Kanban","Pipeline board for the CRM pipeline example.","Review deal flow across pipeline stages.","Sandbox presentation used for markdown previews.","PipelineKanbanView"),"integration-hub.connection.list":r("integration-hub.connection.list","Connection List","Connected systems in the integration hub example.","Review connected systems and connection health.","Sandbox presentation used for markdown previews.","ConnectionList"),"integration-hub.dashboard":r("integration-hub.dashboard","Integration Dashboard","Operational dashboard for the integration hub example.","Monitor integration mix, connection health, and sync issues.","Sandbox presentation used for markdown previews.","IntegrationDashboard"),"integration-hub.sync.config":r("integration-hub.sync.config","Sync Configuration","Sync configuration surface for the integration hub example.","Inspect sync configuration and field mapping defaults.","Sandbox presentation used for markdown previews.","SyncConfigEditor"),"marketplace.dashboard":r("marketplace.dashboard","Marketplace Dashboard","Dashboard for the marketplace example.","Review order flow, category mix, and revenue summaries.","Sandbox presentation used for markdown previews.","MarketplaceDashboard"),"marketplace.order.list":r("marketplace.order.list","Order List","Order list for the marketplace example.","Inspect order activity and fulfillment state.","Sandbox presentation used for markdown previews.","OrderList"),"marketplace.product.catalog":r("marketplace.product.catalog","Product Catalog","Product catalog for the marketplace example.","Browse the available products and merchandising data.","Sandbox presentation used for markdown previews.","ProductCatalog"),"saas-boilerplate.billing.settings":r("saas-boilerplate.billing.settings","Billing Settings","Subscription and usage settings for the SaaS example.","Review billing configuration and current subscription data.","Sandbox presentation used for markdown previews.","SubscriptionView"),"saas-boilerplate.dashboard":r("saas-boilerplate.dashboard","SaaS Dashboard","Dashboard for the SaaS boilerplate example.","Review account, project, and billing summaries.","Sandbox presentation used for markdown previews.","SaasDashboard"),"saas-boilerplate.project.list":r("saas-boilerplate.project.list","Project List","Project list for the SaaS boilerplate example.","Browse projects and their current lifecycle state.","Sandbox presentation used for markdown previews.","ProjectListView"),"visualization-showcase.gallery":r("visualization-showcase.gallery","Visualization Showcase","Focused showcase of ContractSpec visualization primitives.","Review the canonical visualization catalog and design-system wrappers.","Sandbox presentation used for markdown previews.","VisualizationShowcase"),"workflow-system.dashboard":r("workflow-system.dashboard","Workflow Dashboard","Dashboard for the workflow system example.","Review workflow instance health and workload metrics.","Sandbox presentation used for markdown previews.","WorkflowDashboard"),"workflow-system.definition.list":r("workflow-system.definition.list","Workflow Definition List","Workflow definitions in the workflow system example.","Browse available workflow definitions.","Sandbox presentation used for markdown previews.","WorkflowDefinitionList"),"workflow-system.instance.detail":r("workflow-system.instance.detail","Workflow Instance Detail","Workflow instance details in the workflow system example.","Inspect the state and approvals for a workflow instance.","Sandbox presentation used for markdown previews.","WorkflowInstanceDetail")};function V(o){return $s[o]}function Z(o){return o.graphql.apollo}import{jsx as l,jsxs as Ls}from"react/jsx-runtime";var{LocalRuntimeServices:Qs}=Ws;function Rs(o){console.error(`
8
+ `;class G{runtime;endpoint;registryUrl;fetchImpl;constructor(f={}){this.runtime=f.runtime??new S$,this.endpoint=f.endpoint??"/api/graphql",this.registryUrl=f.registryUrl?f.registryUrl.replace(/\/+$/,""):null,this.fetchImpl=f.fetchImpl??fetch}async init(){await this.runtime.init()}list(f){return f?B.filter(($)=>{if(f.category&&f.category!==$.category)return!1;if(f.complexity&&f.complexity!==$.complexity)return!1;if(f.tag&&!$.tags.includes(f.tag))return!1;return!0}):B}async listRemoteTemplates(){if(!this.registryUrl)return[];return await new y({registryUrl:this.registryUrl,fetchImpl:this.fetchImpl}).listTemplateSummaries()}resolveLocalTemplateId(f){return x(f)?f:null}get(f){return x(f)}async install(f,$={}){await this.runtime.seedTemplate({templateId:f,projectId:$.projectId})}async saveToStudio(f){let $=await this.runtime.db.export(),w=P$($),F=await this.fetchImpl(f.endpoint??this.endpoint,{method:"POST",headers:{"Content-Type":"application/json",...f.token?{Authorization:`Bearer ${f.token}`}:{}},body:JSON.stringify({query:c$,variables:{input:{templateId:f.templateId,projectName:f.projectName,organizationId:f.organizationId,payload:w}}})});if(!F.ok)throw Error(`Failed to save template: ${F.status} ${F.statusText}`);let W=await F.json();if(W.errors?.length)throw Error(W.errors[0]?.message??"Unknown error");if(!W.data?.saveTemplateToStudio)throw Error("Invalid response from Studio API");return W.data.saveTemplateToStudio}}function P$(f){if(typeof Buffer<"u")return Buffer.from(f).toString("base64");let $="";return f.forEach((w)=>{$+=String.fromCharCode(w)}),btoa($)}import{learningJourneyPresentations as j$}from"@contractspec/example.learning-journey-registry/presentations";function X(f,$,w,F,W,O){return{meta:{key:f,version:"1.0.0",title:$,description:w,stability:"experimental",goal:F,context:W,owners:["@contractspec/examples"],tags:["template","sandbox"]},source:{type:"component",framework:"react",componentKey:O},targets:["react","markdown"]}}var I$={"agent-console.dashboard":X("agent-console.dashboard","Agent Console Dashboard","Operational dashboard for the agent console example.","Review agent activity, throughput, and execution health.","Sandbox presentation used for markdown previews.","AgentConsoleDashboard"),"agent-console.agent.list":X("agent-console.agent.list","Agent List","List of seeded agents in the agent console example.","Browse configured agents and their current capabilities.","Sandbox presentation used for markdown previews.","AgentListView"),"agent-console.agent.viewList":X("agent-console.agent.viewList","Agent List","List of seeded agents in the agent console example.","Browse configured agents and their current capabilities.","Sandbox presentation used for markdown previews.","AgentListView"),"agent-console.run.list":X("agent-console.run.list","Run List","Execution history for the agent console example.","Inspect recent runs and their outcomes.","Sandbox presentation used for markdown previews.","RunListView"),"agent-console.tool.list":X("agent-console.tool.list","Tool Registry","Available tools for the agent console example.","Inspect the tool registry exposed to the seeded agents.","Sandbox presentation used for markdown previews.","ToolRegistryView"),"agent-console.tool.registry":X("agent-console.tool.registry","Tool Registry","Available tools for the agent console example.","Inspect the tool registry exposed to the seeded agents.","Sandbox presentation used for markdown previews.","ToolRegistryView"),"analytics-dashboard.dashboard":X("analytics-dashboard.dashboard","Analytics Dashboard","Dashboard view for the analytics example.","Review saved widgets and query-backed dashboards.","Sandbox presentation used for markdown previews.","AnalyticsDashboard"),"analytics-dashboard.list":X("analytics-dashboard.list","Dashboard List","List view for analytics dashboards.","Browse dashboards available in the analytics example.","Sandbox presentation used for markdown previews.","DashboardList"),"analytics-dashboard.query.builder":X("analytics-dashboard.query.builder","Query Builder","Query authoring surface for the analytics example.","Inspect reusable queries that power dashboards.","Sandbox presentation used for markdown previews.","QueryBuilder"),"crm-pipeline.dashboard":X("crm-pipeline.dashboard","CRM Dashboard","Dashboard for the CRM pipeline example.","Track pipeline health and revenue progress.","Sandbox presentation used for markdown previews.","CrmDashboard"),"crm-pipeline.deal.pipeline":X("crm-pipeline.deal.pipeline","Pipeline Kanban","Pipeline board for the CRM pipeline example.","Review deal flow across pipeline stages.","Sandbox presentation used for markdown previews.","PipelineKanbanView"),"integration-hub.connection.list":X("integration-hub.connection.list","Connection List","Connected systems in the integration hub example.","Review connected systems and connection health.","Sandbox presentation used for markdown previews.","ConnectionList"),"integration-hub.dashboard":X("integration-hub.dashboard","Integration Dashboard","Operational dashboard for the integration hub example.","Monitor integration mix, connection health, and sync issues.","Sandbox presentation used for markdown previews.","IntegrationDashboard"),"integration-hub.sync.config":X("integration-hub.sync.config","Sync Configuration","Sync configuration surface for the integration hub example.","Inspect sync configuration and field mapping defaults.","Sandbox presentation used for markdown previews.","SyncConfigEditor"),"marketplace.dashboard":X("marketplace.dashboard","Marketplace Dashboard","Dashboard for the marketplace example.","Review order flow, category mix, and revenue summaries.","Sandbox presentation used for markdown previews.","MarketplaceDashboard"),"marketplace.order.list":X("marketplace.order.list","Order List","Order list for the marketplace example.","Inspect order activity and fulfillment state.","Sandbox presentation used for markdown previews.","OrderList"),"marketplace.product.catalog":X("marketplace.product.catalog","Product Catalog","Product catalog for the marketplace example.","Browse the available products and merchandising data.","Sandbox presentation used for markdown previews.","ProductCatalog"),"saas-boilerplate.billing.settings":X("saas-boilerplate.billing.settings","Billing Settings","Subscription and usage settings for the SaaS example.","Review billing configuration and current subscription data.","Sandbox presentation used for markdown previews.","SubscriptionView"),"saas-boilerplate.dashboard":X("saas-boilerplate.dashboard","SaaS Dashboard","Dashboard for the SaaS boilerplate example.","Review account, project, and billing summaries.","Sandbox presentation used for markdown previews.","SaasDashboard"),"saas-boilerplate.project.list":X("saas-boilerplate.project.list","Project List","Project list for the SaaS boilerplate example.","Browse projects and their current lifecycle state.","Sandbox presentation used for markdown previews.","ProjectListView"),"visualization-showcase.gallery":X("visualization-showcase.gallery","Visualization Showcase","Focused showcase of ContractSpec visualization primitives.","Review the canonical visualization catalog and design-system wrappers.","Sandbox presentation used for markdown previews.","VisualizationShowcase"),"workflow-system.dashboard":X("workflow-system.dashboard","Workflow Dashboard","Dashboard for the workflow system example.","Review workflow instance health and workload metrics.","Sandbox presentation used for markdown previews.","WorkflowDashboard"),"workflow-system.definition.list":X("workflow-system.definition.list","Workflow Definition List","Workflow definitions in the workflow system example.","Browse available workflow definitions.","Sandbox presentation used for markdown previews.","WorkflowDefinitionList"),"workflow-system.instance.detail":X("workflow-system.instance.detail","Workflow Instance Detail","Workflow instance details in the workflow system example.","Inspect the state and approvals for a workflow instance.","Sandbox presentation used for markdown previews.","WorkflowInstanceDetail"),...Object.fromEntries(j$.map((f)=>[f.meta.key,f]))};function S(f){return I$[f]}function c(f){return f.graphql.apollo}import{jsx as V,jsxs as XU}from"react/jsx-runtime";var{LocalRuntimeServices:m$}=N$;function UU(f){console.error(`
9
9
  [TemplateRuntime] Bootstrap Failed
10
10
  ==================================
11
11
 
@@ -15,4 +15,4 @@ The runtime failed to initialize. This usually happens because:
15
15
  3. The initial seed data could not be inserted
16
16
 
17
17
  Check the console for specific database errors.
18
- `.trim(),o)}class U{crm;saas;agent;workflow;marketplace;integration;analytics;policySafeKnowledgeAssistant}function Kr({templateId:o,projectId:s="local-project",lazy:i=!1,children:w}){let[h,u]=m(null),[$,X]=m(null);qs(()=>{let x=!0;async function O(){try{if(i)return;let n=y(o);if(!n)throw Error(`Template not found: ${o}`);let d=new Qs;await d.init({});let W=new C({runtime:d});await W.install(o,{projectId:s});let K=Z(d),A=await Q(),t=new U;t.crm=ms(d.db),t.saas=Os(d.db),t.agent=Fs({projectId:s}),t.workflow=Ks(d.db),t.marketplace=Us(d.db),t.integration=zs(d.db),t.analytics=Zs(d.db),t.policySafeKnowledgeAssistant=Xs(d.db);let P=async(c)=>{if(c==="crm-pipeline.dashboard"){let[a,v]=await Promise.all([t.crm.listDeals({projectId:s,pipelineId:"pipeline-1",limit:50}),t.crm.getPipelineStages({pipelineId:"pipeline-1"})]);return{data:{deals:a.deals,stages:v,summary:{total:a.total,totalValue:a.totalValue}},metadata:{total:a.total,timestamp:new Date,source:"crm-pipeline"}}}if(c==="crm-pipeline.deal.pipeline"){let[a,v]=await Promise.all([t.crm.listDeals({projectId:s,pipelineId:"pipeline-1",limit:100}),t.crm.getPipelineStages({pipelineId:"pipeline-1"})]);return{data:{deals:a.deals,stages:v,total:a.total,totalValue:a.totalValue},metadata:{total:a.total,timestamp:new Date,source:"crm-pipeline"}}}if(c==="saas-boilerplate.dashboard"){let[a,v]=await Promise.all([t.saas.listProjects({projectId:s,limit:10}),t.saas.getSubscription({projectId:s})]);return{data:{projects:a.items,subscription:v,summary:{totalProjects:a.total}},metadata:{total:a.total,timestamp:new Date,source:"saas-boilerplate"}}}if(c==="saas-boilerplate.project.list"){let a=await t.saas.listProjects({projectId:s,limit:50});return{data:a.items,metadata:{total:a.total,timestamp:new Date,source:"saas-boilerplate"}}}if(c==="saas-boilerplate.billing.settings")return{data:await t.saas.getSubscription({projectId:s}),metadata:{timestamp:new Date,source:"saas-boilerplate"}};if(c==="agent-console.dashboard")return{data:await Vs(t.agent,{projectId:s,organizationId:D}),metadata:{timestamp:new Date,source:"agent-console"}};if(c==="agent-console.agent.viewList"||c==="agent-console.agent.list"){let a=await t.agent.listAgents({projectId:s,organizationId:D,limit:50});return{data:a.items,metadata:{total:a.total,timestamp:new Date,source:"agent-console"}}}if(c==="agent-console.run.list"){let a=await t.agent.listRuns({projectId:s,limit:50});return{data:a.items,metadata:{total:a.total,timestamp:new Date,source:"agent-console"}}}if(c==="agent-console.tool.list"||c==="agent-console.tool.registry"){let a=await t.agent.listTools({projectId:s,organizationId:D,limit:50});return{data:a.items,metadata:{total:a.total,timestamp:new Date,source:"agent-console"}}}if(c==="visualization-showcase.gallery")return{data:null,metadata:{timestamp:new Date,source:"visualization-showcase"}};return console.warn(`No data fetcher found for presentation: ${c}`),{data:null,metadata:{timestamp:new Date,source:"unknown"}}};if(x)u({template:n,runtime:d,installer:W,client:K,templateId:o,projectId:s,engine:A,handlers:t,fetchData:P,resolvePresentation:V})}catch(n){if(Rs(n),x)X(n instanceof Error?n:Error("Unknown runtime error"))}}return O(),()=>{x=!1}},[o,s,i]);let g=Ps(o),e=Bs(()=>{if(!h)return null;return{...h,components:g}},[h,g]);if($)return Ls("div",{className:"rounded border border-red-200 bg-red-50 p-4 text-red-500",children:[l("h3",{className:"font-bold",children:"Runtime Error"}),l("pre",{className:"mt-2 overflow-auto text-xs",children:$.message})]});if(!e)return l("div",{className:"animate-pulse p-12 text-center text-gray-400",children:"Initializing runtime environment..."});return l(gs,{client:e.client,children:l(As.Provider,{value:e,children:w})})}function Ar(){return z().engine}function b(){return z().handlers}function Pr(){return b().crm}function Rr(){return b().saas}function Lr(){return b().agent}function Yr(){return b().workflow}function Mr(){return b().marketplace}function Jr(){return b().integration}function Gr(){return b().analytics}export{Yr as useWorkflowHandlers,b as useTemplateHandlers,Ar as useTemplateEngine,Rr as useSaasHandlers,Mr as useMarketplaceHandlers,Jr as useIntegrationHandlers,Pr as useCrmHandlers,Gr as useAnalyticsHandlers,Lr as useAgentHandlers,_a as searchExamples,wr as resetTemplateEngine,fr as listTemplates,B as listExamples,br as getTemplatesByModule,Q as getTemplateEngine,y as getTemplate,Ha as getExample,nr as getClonableTemplates,ps as createTemplateTransformEngine,Kr as TemplateRuntimeProvider,C as TemplateInstaller,U as TemplateHandlers,f as TEMPLATE_REGISTRY,Na as ExampleRegistry,Ga as EXAMPLE_REGISTRY};
18
+ `.trim(),f)}class I{crm;saas;agent;workflow;marketplace;integration;analytics;policySafeKnowledgeAssistant}function wv({templateId:f,projectId:$="local-project",lazy:w=!1,children:F}){let[W,O]=P(null),[H,m]=P(null);T$(()=>{let M=!0;async function d(){try{if(w)return;let z=x(f);if(!z)throw Error(`Template not found: ${f}`);let Q=new m$;await Q.init({});let C=new G({runtime:Q});await C.install(f,{projectId:$});let p=c(Q),s=await A(),v=new I;v.crm=l$(Q.db),v.saas=n$(Q.db),v.agent=d$({projectId:$}),v.workflow=e$(Q.db),v.marketplace=a$(Q.db),v.integration=i$(Q.db),v.analytics=s$(Q.db),v.policySafeKnowledgeAssistant=t$(Q.db);let l=async(q)=>{if(q==="crm-pipeline.dashboard"){let[U,K]=await Promise.all([v.crm.listDeals({projectId:$,pipelineId:"pipeline-1",limit:50}),v.crm.getPipelineStages({pipelineId:"pipeline-1"})]);return{data:{deals:U.deals,stages:K,summary:{total:U.total,totalValue:U.totalValue}},metadata:{total:U.total,timestamp:new Date,source:"crm-pipeline"}}}if(q==="crm-pipeline.deal.pipeline"){let[U,K]=await Promise.all([v.crm.listDeals({projectId:$,pipelineId:"pipeline-1",limit:100}),v.crm.getPipelineStages({pipelineId:"pipeline-1"})]);return{data:{deals:U.deals,stages:K,total:U.total,totalValue:U.totalValue},metadata:{total:U.total,timestamp:new Date,source:"crm-pipeline"}}}if(q==="saas-boilerplate.dashboard"){let[U,K]=await Promise.all([v.saas.listProjects({projectId:$,limit:10}),v.saas.getSubscription({projectId:$})]);return{data:{projects:U.items,subscription:K,summary:{totalProjects:U.total}},metadata:{total:U.total,timestamp:new Date,source:"saas-boilerplate"}}}if(q==="saas-boilerplate.project.list"){let U=await v.saas.listProjects({projectId:$,limit:50});return{data:U.items,metadata:{total:U.total,timestamp:new Date,source:"saas-boilerplate"}}}if(q==="saas-boilerplate.billing.settings")return{data:await v.saas.getSubscription({projectId:$}),metadata:{timestamp:new Date,source:"saas-boilerplate"}};if(q==="agent-console.dashboard")return{data:await p$(v.agent,{projectId:$,organizationId:J}),metadata:{timestamp:new Date,source:"agent-console"}};if(q==="agent-console.agent.viewList"||q==="agent-console.agent.list"){let U=await v.agent.listAgents({projectId:$,organizationId:J,limit:50});return{data:U.items,metadata:{total:U.total,timestamp:new Date,source:"agent-console"}}}if(q==="agent-console.run.list"){let U=await v.agent.listRuns({projectId:$,limit:50});return{data:U.items,metadata:{total:U.total,timestamp:new Date,source:"agent-console"}}}if(q==="agent-console.tool.list"||q==="agent-console.tool.registry"){let U=await v.agent.listTools({projectId:$,organizationId:J,limit:50});return{data:U.items,metadata:{total:U.total,timestamp:new Date,source:"agent-console"}}}if(q==="visualization-showcase.gallery")return{data:null,metadata:{timestamp:new Date,source:"visualization-showcase"}};if(o$(f)&&(q==="learning.journey.track_list"||q==="learning.journey.track_detail"||q==="learning.journey.progress_widget"))return{data:r$(f,q),metadata:{timestamp:new Date,source:"learning-journey",templateId:f}};return console.warn(`No data fetcher found for presentation: ${q}`),{data:null,metadata:{timestamp:new Date,source:"unknown"}}};if(M)O({template:z,runtime:Q,installer:C,client:p,templateId:f,projectId:$,engine:s,handlers:v,fetchData:l,resolvePresentation:S})}catch(z){if(UU(z),M)m(z instanceof Error?z:Error("Unknown runtime error"))}}return d(),()=>{M=!1}},[f,$,w]);let b=$U(f),E=g$(()=>{if(!W)return null;return{...W,components:b}},[W,b]);if(H)return XU("div",{className:"rounded border border-red-200 bg-red-50 p-4 text-red-500",children:[V("h3",{className:"font-bold",children:"Runtime Error"}),V("pre",{className:"mt-2 overflow-auto text-xs",children:H.message})]});if(!E)return V("div",{className:"animate-pulse p-12 text-center text-gray-400",children:"Initializing runtime environment..."});return V(u$,{client:E.client,children:V(fU.Provider,{value:E,children:F})})}function qv(){return j().engine}function Y(){return j().handlers}function Zv(){return Y().crm}function Fv(){return Y().saas}function Qv(){return Y().agent}function Wv(){return Y().workflow}function Bv(){return Y().marketplace}function Yv(){return Y().integration}function zv(){return Y().analytics}var u=[{key:"agent-console",exportName:"ExecutionConsoleHost",loadModule:()=>import("@contractspec/example.agent-console/ui")},{key:"ai-chat-assistant",exportName:"AiChatAssistantDashboard",loadModule:()=>import("@contractspec/example.ai-chat-assistant/ui")},{key:"analytics-dashboard",exportName:"AnalyticsDashboard",loadModule:()=>import("@contractspec/example.analytics-dashboard/ui")},{key:"crm-pipeline",exportName:"CrmDashboard",loadModule:()=>import("@contractspec/example.crm-pipeline/ui")},{key:"data-grid-showcase",exportName:"DataGridShowcase",loadModule:()=>import("@contractspec/example.data-grid-showcase/ui")},{key:"in-app-docs",exportName:"InAppDocsViewer",loadModule:()=>import("@contractspec/example.in-app-docs/ui")},{key:"integration-hub",exportName:"IntegrationDashboard",loadModule:()=>import("@contractspec/example.integration-hub/ui")},{key:"learning-journey-registry",exportName:"LearningMiniApp",loadModule:()=>import("@contractspec/example.learning-journey-registry/ui")},{key:"marketplace",exportName:"MarketplaceDashboard",loadModule:()=>import("@contractspec/example.marketplace/ui")},{key:"policy-safe-knowledge-assistant",exportName:"PolicySafeKnowledgeAssistantDashboard",loadModule:()=>import("@contractspec/example.policy-safe-knowledge-assistant/ui")},{key:"saas-boilerplate",exportName:"SaasDashboard",loadModule:()=>import("@contractspec/example.saas-boilerplate/ui")},{key:"visualization-showcase",exportName:"VisualizationShowcase",loadModule:()=>import("@contractspec/example.visualization-showcase/ui")},{key:"workflow-system",exportName:"WorkflowDashboard",loadModule:()=>import("@contractspec/example.workflow-system/ui")}];var N=k().filter((f)=>f.meta.visibility==="public"),vU=new Map(N.map((f)=>[f.meta.key,f])),T=u.flatMap((f)=>{let $=h(f.key);if(!$?.entrypoints.ui)return[];return[{...f,title:$.meta.title??$.meta.key,description:$.meta.summary??$.meta.description??""}]}),g=new Map(T.map((f)=>[f.key,f]));function Dv(){return N}function Ov(f){return vU.get(f)}function Ev(){return T}function Mv(f){return g.get(f)}function hv(f){return g.has(f)}function yv(f){return`/docs/examples/${encodeURIComponent(f)}`}function Gv(f){let $=encodeURIComponent(f);return`/docs/reference/${$}/${$}`}function Jv(f){if(!h(f)?.surfaces.sandbox.enabled)return null;return`/sandbox?template=${encodeURIComponent(f)}`}export{Wv as useWorkflowHandlers,Y as useTemplateHandlers,qv as useTemplateEngine,Fv as useSaasHandlers,Bv as useMarketplaceHandlers,Yv as useIntegrationHandlers,Zv as useCrmHandlers,zv as useAnalyticsHandlers,Qv as useAgentHandlers,hv as supportsInlineExamplePreview,BX as searchExamples,GX as resetTemplateEngine,CX as listTemplates,Dv as listPublicExamples,Ev as listInlineExamplePreviews,k as listExamples,RX as getTemplatesByModule,A as getTemplateEngine,x as getTemplate,Ov as getPublicExample,Mv as getInlineExamplePreview,Jv as getExamplePreviewHref,h as getExample,AX as getClonableTemplates,H$ as createTemplateTransformEngine,Gv as buildExampleReferenceHref,yv as buildExampleDocsHref,wv as TemplateRuntimeProvider,G as TemplateInstaller,I as TemplateHandlers,B as TEMPLATE_REGISTRY,KX as ExampleRegistry,WX as EXAMPLE_REGISTRY};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { ExampleSpec } from '@contractspec/lib.contracts-spec/examples/types';
2
+ export interface InlineExamplePreviewDefinition {
3
+ key: string;
4
+ exportName: string;
5
+ loadModule: () => Promise<Record<string, unknown>>;
6
+ title: string;
7
+ description: string;
8
+ }
9
+ export declare function listPublicExamples(): readonly ExampleSpec[];
10
+ export declare function getPublicExample(exampleKey: string): ExampleSpec | undefined;
11
+ export declare function listInlineExamplePreviews(): readonly InlineExamplePreviewDefinition[];
12
+ export declare function getInlineExamplePreview(exampleKey: string): InlineExamplePreviewDefinition | undefined;
13
+ export declare function supportsInlineExamplePreview(exampleKey: string): boolean;
14
+ export declare function buildExampleDocsHref(exampleKey: string): string;
15
+ export declare function buildExampleReferenceHref(exampleKey: string): string;
16
+ export declare function getExamplePreviewHref(exampleKey: string): string | null;
@@ -0,0 +1,6 @@
1
+ export interface GeneratedInlineExamplePreviewRegistration {
2
+ key: string;
3
+ exportName: string;
4
+ loadModule: () => Promise<Record<string, unknown>>;
5
+ }
6
+ export declare const INLINE_EXAMPLE_PREVIEW_REGISTRY: readonly GeneratedInlineExamplePreviewRegistration[];
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/module.examples",
3
- "version": "3.8.10",
3
+ "version": "3.9.0",
4
4
  "description": "Example contract specifications collection",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -33,65 +33,65 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@apollo/client": "^4.1.7",
36
- "@contractspec/example.agent-console": "3.8.10",
37
- "@contractspec/example.ai-chat-assistant": "3.8.10",
38
- "@contractspec/example.ai-support-bot": "3.7.18",
39
- "@contractspec/example.analytics-dashboard": "3.9.10",
40
- "@contractspec/example.calendar-google": "3.7.18",
41
- "@contractspec/example.content-generation": "3.7.18",
42
- "@contractspec/example.crm-pipeline": "3.7.18",
43
- "@contractspec/example.data-grid-showcase": "3.8.10",
44
- "@contractspec/example.email-gmail": "3.7.18",
45
- "@contractspec/example.in-app-docs": "3.7.18",
46
- "@contractspec/example.integration-hub": "3.8.10",
47
- "@contractspec/example.integration-posthog": "3.7.18",
48
- "@contractspec/example.integration-stripe": "3.7.18",
49
- "@contractspec/example.integration-supabase": "3.7.18",
50
- "@contractspec/example.voice-providers": "3.7.18",
51
- "@contractspec/example.kb-update-pipeline": "3.7.18",
52
- "@contractspec/example.knowledge-canon": "3.7.18",
53
- "@contractspec/example.learning-journey-ambient-coach": "3.7.18",
54
- "@contractspec/example.learning-journey-crm-onboarding": "3.7.18",
55
- "@contractspec/example.learning-journey-duo-drills": "3.7.18",
56
- "@contractspec/example.learning-journey-platform-tour": "3.7.18",
57
- "@contractspec/example.learning-journey-quest-challenges": "3.7.18",
58
- "@contractspec/example.learning-journey-registry": "3.7.18",
59
- "@contractspec/example.learning-journey-studio-onboarding": "3.7.18",
60
- "@contractspec/example.learning-journey-ui-coaching": "3.7.18",
61
- "@contractspec/example.learning-journey-ui-gamified": "3.7.18",
62
- "@contractspec/example.learning-journey-ui-onboarding": "3.7.18",
63
- "@contractspec/example.learning-journey-ui-shared": "3.7.18",
64
- "@contractspec/example.learning-patterns": "3.7.18",
65
- "@contractspec/example.lifecycle-cli": "3.7.18",
66
- "@contractspec/example.lifecycle-dashboard": "3.7.18",
67
- "@contractspec/example.locale-jurisdiction-gate": "3.7.18",
68
- "@contractspec/example.marketplace": "3.8.10",
69
- "@contractspec/example.meeting-recorder-providers": "3.7.18",
70
- "@contractspec/example.messaging-agent-actions": "3.8.10",
71
- "@contractspec/example.minimal": "2.8.10",
72
- "@contractspec/example.openbanking-powens": "3.7.18",
73
- "@contractspec/example.opencode-cli": "2.8.10",
74
- "@contractspec/example.personalization": "3.7.18",
75
- "@contractspec/example.pocket-family-office": "3.7.18",
76
- "@contractspec/example.policy-safe-knowledge-assistant": "3.7.18",
77
- "@contractspec/example.product-intent": "3.7.18",
78
- "@contractspec/example.project-management-sync": "3.7.18",
79
- "@contractspec/example.saas-boilerplate": "3.8.10",
80
- "@contractspec/example.service-business-os": "3.7.18",
81
- "@contractspec/example.team-hub": "3.7.18",
82
- "@contractspec/example.versioned-knowledge-base": "3.7.18",
83
- "@contractspec/example.video-api-showcase": "3.7.18",
84
- "@contractspec/example.video-docs-terminal": "3.7.18",
85
- "@contractspec/example.video-marketing-clip": "3.7.18",
86
- "@contractspec/example.visualization-showcase": "3.9.10",
87
- "@contractspec/example.wealth-snapshot": "3.7.18",
88
- "@contractspec/example.workflow-system": "3.8.10",
89
- "@contractspec/lib.contracts-spec": "5.2.0",
90
- "@contractspec/lib.example-shared-ui": "6.0.18",
36
+ "@contractspec/example.agent-console": "3.8.12",
37
+ "@contractspec/example.ai-chat-assistant": "3.8.12",
38
+ "@contractspec/example.ai-support-bot": "3.7.20",
39
+ "@contractspec/example.analytics-dashboard": "3.9.12",
40
+ "@contractspec/example.calendar-google": "3.7.20",
41
+ "@contractspec/example.content-generation": "3.7.20",
42
+ "@contractspec/example.crm-pipeline": "3.7.20",
43
+ "@contractspec/example.data-grid-showcase": "3.8.12",
44
+ "@contractspec/example.email-gmail": "3.7.20",
45
+ "@contractspec/example.in-app-docs": "3.7.20",
46
+ "@contractspec/example.integration-hub": "3.8.12",
47
+ "@contractspec/example.integration-posthog": "3.7.20",
48
+ "@contractspec/example.integration-stripe": "3.7.20",
49
+ "@contractspec/example.integration-supabase": "3.7.20",
50
+ "@contractspec/example.voice-providers": "3.7.20",
51
+ "@contractspec/example.kb-update-pipeline": "3.7.20",
52
+ "@contractspec/example.knowledge-canon": "3.7.20",
53
+ "@contractspec/example.learning-journey-ambient-coach": "4.0.0",
54
+ "@contractspec/example.learning-journey-crm-onboarding": "4.0.0",
55
+ "@contractspec/example.learning-journey-duo-drills": "4.0.0",
56
+ "@contractspec/example.learning-journey-platform-tour": "4.0.0",
57
+ "@contractspec/example.learning-journey-quest-challenges": "4.0.0",
58
+ "@contractspec/example.learning-journey-registry": "4.0.0",
59
+ "@contractspec/example.learning-journey-studio-onboarding": "4.0.0",
60
+ "@contractspec/example.learning-journey-ui-coaching": "4.0.0",
61
+ "@contractspec/example.learning-journey-ui-gamified": "4.0.0",
62
+ "@contractspec/example.learning-journey-ui-onboarding": "4.0.0",
63
+ "@contractspec/example.learning-journey-ui-shared": "4.0.0",
64
+ "@contractspec/example.learning-patterns": "4.0.0",
65
+ "@contractspec/example.lifecycle-cli": "3.7.20",
66
+ "@contractspec/example.lifecycle-dashboard": "3.7.20",
67
+ "@contractspec/example.locale-jurisdiction-gate": "3.7.20",
68
+ "@contractspec/example.marketplace": "3.8.12",
69
+ "@contractspec/example.meeting-recorder-providers": "3.7.20",
70
+ "@contractspec/example.messaging-agent-actions": "3.8.12",
71
+ "@contractspec/example.minimal": "2.8.12",
72
+ "@contractspec/example.openbanking-powens": "3.7.20",
73
+ "@contractspec/example.opencode-cli": "2.8.12",
74
+ "@contractspec/example.personalization": "3.7.20",
75
+ "@contractspec/example.pocket-family-office": "3.7.20",
76
+ "@contractspec/example.policy-safe-knowledge-assistant": "3.7.20",
77
+ "@contractspec/example.product-intent": "3.7.20",
78
+ "@contractspec/example.project-management-sync": "3.7.20",
79
+ "@contractspec/example.saas-boilerplate": "3.8.12",
80
+ "@contractspec/example.service-business-os": "3.7.20",
81
+ "@contractspec/example.team-hub": "3.7.20",
82
+ "@contractspec/example.versioned-knowledge-base": "3.7.20",
83
+ "@contractspec/example.video-api-showcase": "3.7.20",
84
+ "@contractspec/example.video-docs-terminal": "3.7.20",
85
+ "@contractspec/example.video-marketing-clip": "3.7.20",
86
+ "@contractspec/example.visualization-showcase": "3.9.12",
87
+ "@contractspec/example.wealth-snapshot": "3.7.20",
88
+ "@contractspec/example.workflow-system": "3.8.12",
89
+ "@contractspec/lib.contracts-spec": "5.4.0",
90
+ "@contractspec/lib.example-shared-ui": "6.0.20",
91
91
  "@contractspec/lib.runtime-sandbox": "2.7.14",
92
92
  "zod": "^4.3.5",
93
- "@contractspec/lib.contracts-runtime-client-react": "3.8.6",
94
- "@contractspec/lib.presentation-runtime-core": "3.9.6"
93
+ "@contractspec/lib.contracts-runtime-client-react": "3.9.1",
94
+ "@contractspec/lib.presentation-runtime-core": "3.9.8"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@contractspec/tool.typescript": "3.7.13",