@contractspec/bundle.library 3.10.1 → 3.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/.turbo/turbo-build.log +212 -206
  2. package/CHANGELOG.md +31 -0
  3. package/dist/components/docs/DocsIndexPage.js +2 -2
  4. package/dist/components/docs/docsManifest.js +1 -1
  5. package/dist/components/docs/guides/GuideProviderBackedKnowledgePage.d.ts +1 -0
  6. package/dist/components/docs/guides/GuideProviderBackedKnowledgePage.js +73 -0
  7. package/dist/components/docs/guides/GuidesIndexPage.js +1 -1
  8. package/dist/components/docs/guides/guides.docblocks.js +10 -1
  9. package/dist/components/docs/guides/index.d.ts +1 -0
  10. package/dist/components/docs/guides/index.js +132 -52
  11. package/dist/components/docs/index.js +414 -284
  12. package/dist/components/docs/integrations/IntegrationsGmailPage.js +3 -3
  13. package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +1 -1
  14. package/dist/components/docs/integrations/IntegrationsGoogleDrivePage.d.ts +1 -0
  15. package/dist/components/docs/integrations/IntegrationsGoogleDrivePage.js +22 -0
  16. package/dist/components/docs/integrations/IntegrationsOverviewPage.js +1 -1
  17. package/dist/components/docs/integrations/index.d.ts +1 -0
  18. package/dist/components/docs/integrations/index.js +65 -45
  19. package/dist/components/docs/knowledge/KnowledgeGovernancePage.d.ts +1 -0
  20. package/dist/components/docs/knowledge/KnowledgeGovernancePage.js +23 -0
  21. package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +1 -1
  22. package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +11 -2
  23. package/dist/components/docs/knowledge/index.d.ts +1 -0
  24. package/dist/components/docs/knowledge/index.js +49 -19
  25. package/dist/index.js +430 -300
  26. package/dist/node/components/docs/DocsIndexPage.js +2 -2
  27. package/dist/node/components/docs/docsManifest.js +1 -1
  28. package/dist/node/components/docs/guides/GuideProviderBackedKnowledgePage.js +72 -0
  29. package/dist/node/components/docs/guides/GuidesIndexPage.js +1 -1
  30. package/dist/node/components/docs/guides/guides.docblocks.js +10 -1
  31. package/dist/node/components/docs/guides/index.js +132 -52
  32. package/dist/node/components/docs/index.js +414 -284
  33. package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +3 -3
  34. package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +1 -1
  35. package/dist/node/components/docs/integrations/IntegrationsGoogleDrivePage.js +21 -0
  36. package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +1 -1
  37. package/dist/node/components/docs/integrations/index.js +65 -45
  38. package/dist/node/components/docs/knowledge/KnowledgeGovernancePage.js +22 -0
  39. package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +1 -1
  40. package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +11 -2
  41. package/dist/node/components/docs/knowledge/index.js +49 -19
  42. package/dist/node/index.js +430 -300
  43. package/package.json +59 -23
  44. package/src/components/docs/docsManifest.ts +62 -0
  45. package/src/components/docs/generated/docs-index._common.json +32 -0
  46. package/src/components/docs/generated/docs-index.manifest.json +2 -2
  47. package/src/components/docs/generated/docs-index.notifications.json +7 -7
  48. package/src/components/docs/guides/GuideProviderBackedKnowledgePage.tsx +191 -0
  49. package/src/components/docs/guides/GuidesIndexPage.tsx +7 -0
  50. package/src/components/docs/guides/guides.docblocks.ts +20 -0
  51. package/src/components/docs/guides/index.ts +1 -0
  52. package/src/components/docs/integrations/IntegrationsGmailPage.tsx +23 -2
  53. package/src/components/docs/integrations/IntegrationsGoogleCalendarPage.tsx +2 -2
  54. package/src/components/docs/integrations/IntegrationsGoogleDrivePage.tsx +88 -0
  55. package/src/components/docs/integrations/IntegrationsOverviewPage.tsx +1 -0
  56. package/src/components/docs/integrations/index.ts +1 -0
  57. package/src/components/docs/knowledge/KnowledgeGovernancePage.tsx +94 -0
  58. package/src/components/docs/knowledge/KnowledgeOverviewPage.tsx +10 -0
  59. package/src/components/docs/knowledge/KnowledgeSourcesPage.tsx +45 -0
  60. package/src/components/docs/knowledge/index.ts +1 -0
@@ -1,7 +1,7 @@
1
- var E=Object.defineProperty;var F=(q)=>q;function H(q,y){this[q]=F.bind(null,y)}var K=(q,y)=>{for(var B in y)E(q,B,{get:y[B],enumerable:!0,configurable:!0,set:H.bind(y,B)})};var M=(q,y)=>()=>(q&&(y=q(q=0)),y);import D from"@contractspec/lib.ui-link";import{ChevronRight as J}from"lucide-react";import{jsx as f,jsxs as z}from"react/jsx-runtime";function T(){return z("div",{className:"space-y-8",children:[z("div",{className:"space-y-4",children:[f("h1",{className:"font-bold text-4xl",children:"Gmail API"}),f("p",{className:"text-muted-foreground",children:"The Gmail API integration allows you to read inbound emails, manage threads, and build email-based workflows. Perfect for support tickets, email parsing, and automated responses."})]}),z("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Setup"}),f("p",{className:"text-muted-foreground",children:"Configure OAuth 2.0 credentials in Google Cloud Console:"}),f("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:f("pre",{children:`# .env
1
+ var E=Object.defineProperty;var F=(y)=>y;function H(y,z){this[y]=F.bind(null,z)}var K=(y,z)=>{for(var D in z)E(y,D,{get:z[D],enumerable:!0,configurable:!0,set:H.bind(z,D)})};var M=(y,z)=>()=>(y&&(z=y(y=0)),z);import B from"@contractspec/lib.ui-link";import{ChevronRight as J}from"lucide-react";import{jsx as f,jsxs as q}from"react/jsx-runtime";function T(){return q("div",{className:"space-y-8",children:[q("div",{className:"space-y-4",children:[f("h1",{className:"font-bold text-4xl",children:"Gmail API"}),f("p",{className:"text-muted-foreground",children:"The Gmail API integration allows you to read inbound emails, manage threads, and build email-based workflows. Perfect for support tickets, email parsing, and automated responses."})]}),q("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Setup"}),f("p",{className:"text-muted-foreground",children:"Configure OAuth 2.0 credentials in Google Cloud Console:"}),f("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:f("pre",{children:`# .env
2
2
  GOOGLE_CLIENT_ID=...
3
3
  GOOGLE_CLIENT_SECRET=...
4
- GOOGLE_REDIRECT_URI=https://your-app.com/auth/google/callback`})})]}),z("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Reading emails"}),f("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:f("pre",{children:`capabilityId: gmail-list-messages
4
+ GOOGLE_REDIRECT_URI=https://your-app.com/auth/google/callback`})})]}),q("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Reading emails"}),f("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:f("pre",{children:`capabilityId: gmail-list-messages
5
5
  provider:
6
6
  type: gmail
7
7
  operation: listMessages
@@ -22,4 +22,4 @@ outputs:
22
22
  properties:
23
23
  id: string
24
24
  threadId: string
25
- snippet: string`})})]}),z("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Use cases"}),z("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[f("li",{children:"Parse support emails and create tickets"}),f("li",{children:"Extract attachments and process them"}),f("li",{children:"Build email-to-task workflows"}),f("li",{children:"Monitor specific email threads"})]})]}),z("div",{className:"flex items-center gap-4 pt-4",children:[f(D,{href:"/docs/integrations/resend",className:"btn-ghost",children:"Previous: Resend"}),z(D,{href:"/docs/integrations/google-calendar",className:"btn-primary",children:["Next: Google Calendar ",f(J,{size:16})]})]})]})}export{T as IntegrationsGmailPage};
25
+ snippet: string`})})]}),q("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Use cases"}),q("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[f("li",{children:"Parse support emails and create tickets"}),f("li",{children:"Extract attachments and process them"}),f("li",{children:"Build email-to-task workflows"}),f("li",{children:"Monitor specific email threads"}),f("li",{children:"Sync threads into governed knowledge spaces with checkpointed deltas"})]})]}),q("div",{className:"space-y-4",children:[f("h2",{className:"font-bold text-2xl",children:"Knowledge sync and mutation gates"}),q("p",{className:"text-muted-foreground",children:["Gmail supports the shared ",f("code",{children:"provider.delta.watch"})," ","capability. Knowledge runtimes should persist provider cursor, watermark, dedupe, idempotency, replay, and tombstone state before acknowledging sync work. Outbound email sends should pass through knowledge mutation governance so dry-runs, approvals, audit evidence, and outbound-send gates are recorded."]}),q("div",{className:"flex flex-wrap gap-3",children:[f(B,{href:"/docs/guides/provider-backed-knowledge",className:"btn-ghost",children:"Provider-backed knowledge guide"}),f(B,{href:"/docs/knowledge/governance",className:"btn-ghost",children:"Mutation governance"})]})]}),q("div",{className:"flex items-center gap-4 pt-4",children:[f(B,{href:"/docs/integrations/resend",className:"btn-ghost",children:"Previous: Resend"}),q(B,{href:"/docs/integrations/google-drive",className:"btn-primary",children:["Next: Google Drive ",f(J,{size:16})]})]})]})}export{T as IntegrationsGmailPage};
@@ -25,4 +25,4 @@ outputs:
25
25
  eventId:
26
26
  type: string
27
27
  htmlLink:
28
- type: string`})})]}),z("div",{className:"flex items-center gap-4 pt-4",children:[f(D,{href:"/docs/integrations/gmail",className:"btn-ghost",children:"Previous: Gmail API"}),z(D,{href:"/docs/integrations/openai",className:"btn-primary",children:["Next: OpenAI ",f(J,{size:16})]})]})]})}export{T as IntegrationsGoogleCalendarPage};
28
+ type: string`})})]}),z("div",{className:"flex items-center gap-4 pt-4",children:[f(D,{href:"/docs/integrations/google-drive",className:"btn-ghost",children:"Previous: Google Drive"}),z(D,{href:"/docs/integrations/openai",className:"btn-primary",children:["Next: OpenAI ",f(J,{size:16})]})]})]})}export{T as IntegrationsGoogleCalendarPage};
@@ -0,0 +1,21 @@
1
+ var n=Object.defineProperty;var d=(i)=>i;function s(i,t){this[i]=d.bind(null,t)}var p=(i,t)=>{for(var r in t)n(i,r,{get:t[r],enumerable:!0,configurable:!0,set:s.bind(t,r)})};var g=(i,t)=>()=>(i&&(t=i(i=0)),t);import{CodeBlock as a}from"@contractspec/lib.design-system";import l from"@contractspec/lib.ui-link";import{ChevronRight as c}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function f(){return o("div",{className:"space-y-8",children:[o("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"Google Drive"}),e("p",{className:"text-muted-foreground",children:"Google Drive is modeled as a storage and knowledge-ingestion provider with explicit delta watch state. The contract covers file listing, file retrieval, Drive watches, channel/resource expiry, replay checkpoints, dedupe, idempotency, and tombstones."})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Provider contract"}),e(a,{language:"typescript",filename:"google-drive-provider.ts",code:`interface GoogleDriveProvider {
2
+ listFiles(query?: GoogleDriveListFilesQuery): Promise<GoogleDriveListFilesResult>;
3
+ getFile(fileId: string): Promise<GoogleDriveFile | null>;
4
+ watchChanges?(input: GoogleDriveWatchInput): Promise<GoogleDriveWatchResult>;
5
+ }`}),o("p",{className:"text-muted-foreground text-sm",children:["The provider advertises ",e("code",{children:"storage.objects"}),","," ",e("code",{children:"knowledge.ingestion.drive"}),", and"," ",e("code",{children:"provider.delta.watch"}),". Runtime implementations should persist returned deltas before acknowledging sync work."]})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Delta-aware ingestion"}),e(a,{language:"typescript",filename:"drive-sync.ts",code:`await knowledge.syncDriveFiles(
6
+ {
7
+ query: "mimeType = 'text/plain' and trashed = false",
8
+ },
9
+ {
10
+ sourceId: "src_drive_support",
11
+ evidenceRef: "audit://sync/drive/support",
12
+ },
13
+ );
14
+
15
+ await knowledge.watchDriveChanges(
16
+ {
17
+ channelId: "drive-support-watch",
18
+ webhookUrl: "https://app.example.com/webhooks/google-drive",
19
+ },
20
+ { sourceId: "src_drive_support" },
21
+ );`})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Production checklist"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[e("li",{children:"Persist `ProviderDeltaSyncState` per Drive source."}),e("li",{children:"Renew webhook channels before `webhookChannel.expiresAt`."}),e("li",{children:"Skip tombstoned files before indexing or mutating them."}),e("li",{children:"Record replay checkpoint and idempotency evidence for retries."}),e("li",{children:"Use mutation governance before changing permissions or sending outbound notifications."})]})]}),o("div",{className:"flex items-center gap-4 pt-4",children:[e(l,{href:"/docs/integrations/gmail",className:"btn-ghost",children:"Previous: Gmail API"}),o(l,{href:"/docs/knowledge/governance",className:"btn-primary",children:["Knowledge governance ",e(c,{size:16})]})]})]})}export{f as IntegrationsGoogleDrivePage};
@@ -1 +1 @@
1
- var r=Object.defineProperty;var s=(t)=>t;function l(t,i){this[t]=s.bind(null,i)}var c=(t,i)=>{for(var n in i)r(t,n,{get:i[n],enumerable:!0,configurable:!0,set:l.bind(i,n)})};var p=(t,i)=>()=>(t&&(i=t(t=0)),i);import o from"@contractspec/lib.ui-link";import{jsx as e,jsxs as a}from"react/jsx-runtime";var d=[{title:"Models and voice",items:[{title:"OpenAI",href:"/docs/integrations/openai"},{title:"Mistral",href:"/docs/integrations/mistral"},{title:"ElevenLabs",href:"/docs/integrations/elevenlabs"}]},{title:"Messaging and product operations",items:[{title:"GitHub",href:"/docs/integrations/github"},{title:"Slack",href:"/docs/integrations/slack"},{title:"Twilio",href:"/docs/integrations/twilio"},{title:"Postmark",href:"/docs/integrations/postmark"}]},{title:"Data, storage, and retrieval",items:[{title:"Qdrant",href:"/docs/integrations/qdrant"},{title:"S3 storage",href:"/docs/integrations/s3"},{title:"Gmail",href:"/docs/integrations/gmail"},{title:"Google Calendar",href:"/docs/integrations/google-calendar"}]},{title:"Payments and external workflows",items:[{title:"Stripe",href:"/docs/integrations/stripe"},{title:"Powens",href:"/docs/integrations/powens"},{title:"Circuit breakers",href:"/docs/integrations/circuit-breakers"},{title:"Health routing",href:"/docs/integrations/health-routing"}]}];function h(){return a("div",{className:"space-y-10",children:[a("div",{className:"space-y-3",children:[e("p",{className:"editorial-kicker",children:"Integrations"}),e("h1",{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"Integrations stay explicit: spec what a provider offers, then bind it per tenant and per app."}),e("p",{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"The integration model keeps provider behavior out of ad hoc glue code. Define the capability contract first, configure the provider connection explicitly, then bind the integration into app workflows and runtime surfaces with clear ownership."})]}),a("div",{className:"editorial-proof-strip",children:[a("div",{className:"editorial-stat",children:[e("span",{className:"editorial-label",children:"Binding model"}),e("span",{className:"editorial-stat-value",children:"Integration spec → tenant connection → app binding"})]}),e("p",{className:"max-w-2xl text-muted-foreground text-sm leading-7",children:"That separation is what makes reuse, tenant isolation, and provider swaps practical without rewriting every surface."})]}),e("section",{className:"editorial-panel space-y-5",children:a("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Start with the model, then pick a provider"}),a("div",{className:"grid gap-4 md:grid-cols-2",children:[a(o,{href:"/docs/integrations/spec-model",className:"docs-footer-link",children:[e("h3",{className:"font-semibold text-lg",children:"Integration spec model"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Define what the provider offers, what configuration it needs, and how the runtime should treat it."})]}),a(o,{href:"/docs/architecture/integration-binding",className:"docs-footer-link",children:[e("h3",{className:"font-semibold text-lg",children:"Integration binding"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Understand how tenant connections get mapped into concrete app surfaces and workflows."})]})]})]})}),e("div",{className:"grid gap-5 md:grid-cols-2",children:d.map((t)=>a("section",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-2xl tracking-[-0.03em]",children:t.title}),e("div",{className:"space-y-3",children:t.items.map((i)=>e(o,{href:i.href,className:"docs-chip-link",children:i.title},i.href))})]},t.title))})]})}export{h as IntegrationsOverviewPage};
1
+ var r=Object.defineProperty;var s=(t)=>t;function l(t,i){this[t]=s.bind(null,i)}var c=(t,i)=>{for(var n in i)r(t,n,{get:i[n],enumerable:!0,configurable:!0,set:l.bind(i,n)})};var g=(t,i)=>()=>(t&&(i=t(t=0)),i);import o from"@contractspec/lib.ui-link";import{jsx as e,jsxs as a}from"react/jsx-runtime";var d=[{title:"Models and voice",items:[{title:"OpenAI",href:"/docs/integrations/openai"},{title:"Mistral",href:"/docs/integrations/mistral"},{title:"ElevenLabs",href:"/docs/integrations/elevenlabs"}]},{title:"Messaging and product operations",items:[{title:"GitHub",href:"/docs/integrations/github"},{title:"Slack",href:"/docs/integrations/slack"},{title:"Twilio",href:"/docs/integrations/twilio"},{title:"Postmark",href:"/docs/integrations/postmark"}]},{title:"Data, storage, and retrieval",items:[{title:"Qdrant",href:"/docs/integrations/qdrant"},{title:"S3 storage",href:"/docs/integrations/s3"},{title:"Gmail",href:"/docs/integrations/gmail"},{title:"Google Drive",href:"/docs/integrations/google-drive"},{title:"Google Calendar",href:"/docs/integrations/google-calendar"}]},{title:"Payments and external workflows",items:[{title:"Stripe",href:"/docs/integrations/stripe"},{title:"Powens",href:"/docs/integrations/powens"},{title:"Circuit breakers",href:"/docs/integrations/circuit-breakers"},{title:"Health routing",href:"/docs/integrations/health-routing"}]}];function h(){return a("div",{className:"space-y-10",children:[a("div",{className:"space-y-3",children:[e("p",{className:"editorial-kicker",children:"Integrations"}),e("h1",{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"Integrations stay explicit: spec what a provider offers, then bind it per tenant and per app."}),e("p",{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"The integration model keeps provider behavior out of ad hoc glue code. Define the capability contract first, configure the provider connection explicitly, then bind the integration into app workflows and runtime surfaces with clear ownership."})]}),a("div",{className:"editorial-proof-strip",children:[a("div",{className:"editorial-stat",children:[e("span",{className:"editorial-label",children:"Binding model"}),e("span",{className:"editorial-stat-value",children:"Integration spec → tenant connection → app binding"})]}),e("p",{className:"max-w-2xl text-muted-foreground text-sm leading-7",children:"That separation is what makes reuse, tenant isolation, and provider swaps practical without rewriting every surface."})]}),e("section",{className:"editorial-panel space-y-5",children:a("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Start with the model, then pick a provider"}),a("div",{className:"grid gap-4 md:grid-cols-2",children:[a(o,{href:"/docs/integrations/spec-model",className:"docs-footer-link",children:[e("h3",{className:"font-semibold text-lg",children:"Integration spec model"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Define what the provider offers, what configuration it needs, and how the runtime should treat it."})]}),a(o,{href:"/docs/architecture/integration-binding",className:"docs-footer-link",children:[e("h3",{className:"font-semibold text-lg",children:"Integration binding"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Understand how tenant connections get mapped into concrete app surfaces and workflows."})]})]})]})}),e("div",{className:"grid gap-5 md:grid-cols-2",children:d.map((t)=>a("section",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-2xl tracking-[-0.03em]",children:t.title}),e("div",{className:"space-y-3",children:t.items.map((i)=>e(o,{href:i.href,className:"docs-chip-link",children:i.title},i.href))})]},t.title))})]})}export{h as IntegrationsOverviewPage};