@contractspec/example.content-generation 3.7.19 → 3.7.21
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/.turbo/turbo-build.log +35 -34
- package/CHANGELOG.md +26 -0
- package/dist/browser/content-generation.feature.js +1 -1
- package/dist/browser/example.js +1 -1
- package/dist/browser/index.js +2 -2
- package/dist/content-generation.feature.js +1 -1
- package/dist/example.d.ts +3 -2
- package/dist/example.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/node/content-generation.feature.js +1 -1
- package/dist/node/example.js +1 -1
- package/dist/node/index.js +2 -2
- package/package.json +5 -5
- package/src/content-generation.feature.ts +1 -1
- package/src/example.ts +15 -19
- package/src/index.ts +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
./
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
./
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
./
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
./
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
./
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
|
|
2
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build prebuild[0m
|
|
3
|
+
[0m[2m[35m$[0m [2m[1mbun run build:bundle && bun run build:types[0m
|
|
4
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build transpile[0m
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=6 noBundle=false
|
|
6
|
+
[32mBundled 6 modules in 10ms[0m
|
|
7
|
+
|
|
8
|
+
[34m./content-generation.feature.js[0m 480 bytes [2m(entry point)[0m
|
|
9
|
+
[34m./index.js[0m 3.56 KB [2m(entry point)[0m
|
|
10
|
+
[34mdocs/index.js[0m 1.18 KB [2m(entry point)[0m
|
|
11
|
+
[34mdocs/content-generation.docblock.js[0m 1.18 KB [2m(entry point)[0m
|
|
12
|
+
[34m./example.js[0m 0.66 KB [2m(entry point)[0m
|
|
13
|
+
[34m./generate.js[0m 1.28 KB [2m(entry point)[0m
|
|
14
|
+
|
|
15
|
+
[contractspec-bun-build] transpile target=node root=src entries=6 noBundle=false
|
|
16
|
+
[32mBundled 6 modules in 11ms[0m
|
|
17
|
+
|
|
18
|
+
[34m./content-generation.feature.js[0m 472 bytes [2m(entry point)[0m
|
|
19
|
+
[34m./index.js[0m 3.54 KB [2m(entry point)[0m
|
|
20
|
+
[34mdocs/index.js[0m 1.17 KB [2m(entry point)[0m
|
|
21
|
+
[34mdocs/content-generation.docblock.js[0m 1.17 KB [2m(entry point)[0m
|
|
22
|
+
[34m./example.js[0m 0.65 KB [2m(entry point)[0m
|
|
23
|
+
[34m./generate.js[0m 1.27 KB [2m(entry point)[0m
|
|
24
|
+
|
|
25
|
+
[contractspec-bun-build] transpile target=browser root=src entries=6 noBundle=false
|
|
26
|
+
[32mBundled 6 modules in 10ms[0m
|
|
27
|
+
|
|
28
|
+
[34m./content-generation.feature.js[0m 472 bytes [2m(entry point)[0m
|
|
29
|
+
[34m./index.js[0m 3.54 KB [2m(entry point)[0m
|
|
30
|
+
[34mdocs/index.js[0m 1.17 KB [2m(entry point)[0m
|
|
31
|
+
[34mdocs/content-generation.docblock.js[0m 1.17 KB [2m(entry point)[0m
|
|
32
|
+
[34m./example.js[0m 0.65 KB [2m(entry point)[0m
|
|
33
|
+
[34m./generate.js[0m 1.27 KB [2m(entry point)[0m
|
|
34
|
+
|
|
35
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build types[0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @contractspec/example.content-generation
|
|
2
2
|
|
|
3
|
+
## 3.7.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore: auto-bump internal dependents
|
|
8
|
+
- Updated dependencies because of chore: auto-bump internal dependents
|
|
9
|
+
- Updated dependencies because of Add FormSpec layout hints, semantic field rendering, and portable text/textarea input-group addons.
|
|
10
|
+
- Updated dependencies because of Add ThemeSpec light/dark modes and a design-system Tailwind bridge for CSS variables, presets, CSS text, and OKLCH color pass-through.
|
|
11
|
+
- Updated dependencies because of Add a canonical typed result system for ContractSpec success and failure propagation across operations, workflows, jobs, server adapters, MCP, GraphQL, and React clients.
|
|
12
|
+
- @contractspec/lib.content-gen@3.7.21
|
|
13
|
+
- @contractspec/lib.logger@3.7.14
|
|
14
|
+
- @contractspec/lib.contracts-spec@5.5.0
|
|
15
|
+
|
|
16
|
+
## 3.7.20
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- chore: auto-bump internal dependents
|
|
21
|
+
- Updated dependencies because of Add a family-aware ContractSpec Adoption Engine, expand contract authoring targets across CLI and VS Code tooling, and refresh release-facing schema and policy artifacts for downstream workspaces.
|
|
22
|
+
- Updated dependencies because of chore: auto-bump internal dependents
|
|
23
|
+
- Updated dependencies because of Improve app-config, theme, and feature authoring with explicit validation APIs, first-class theme discovery and scaffolding, and key-based app-config generation across contracts, workspace tooling, and the CLI.
|
|
24
|
+
- Updated dependencies because of Refresh root, package, website, and LLM-facing docs so Connect, Builder, release capsules, and the current contracts-spec export surface stay aligned.
|
|
25
|
+
- Updated dependencies because of Persist canonical knowledge payload text during indexing and align the retrieval/query docs with the corrected behavior.
|
|
26
|
+
- @contractspec/lib.contracts-spec@5.4.0
|
|
27
|
+
- @contractspec/lib.content-gen@3.7.20
|
|
28
|
+
|
|
3
29
|
## 3.7.19
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
|
package/dist/browser/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as
|
|
1
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),j=c;export{j as default,c as ExamplesContentGenerationExample};
|
package/dist/browser/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{defineFeature as
|
|
1
|
+
import{defineFeature as H}from"@contractspec/lib.contracts-spec/features";var _=H({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as I}from"@contractspec/lib.contracts-spec/docs";var J=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
|
|
2
2
|
- A spec-first-ish interface for content brief inputs (typed, validated).
|
|
3
3
|
- Deterministic orchestration of generators (same input → same structure).
|
|
4
4
|
|
|
@@ -7,4 +7,4 @@ import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{
|
|
|
7
7
|
- Landing hero
|
|
8
8
|
- Email subject/body
|
|
9
9
|
- Social post bodies
|
|
10
|
-
- SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation — Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],body:"## Usage\n- Call `runContentGenerationExample()`.\n- Modify the `ContentBrief` fields to drive different outputs.\n\n## Guardrails\n- Avoid PII in briefs.\n- Keep output logging structured; no raw `console.log` in library code."}];
|
|
10
|
+
- SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation — Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],body:"## Usage\n- Call `runContentGenerationExample()`.\n- Modify the `ContentBrief` fields to drive different outputs.\n\n## Guardrails\n- Avoid PII in briefs.\n- Keep output logging structured; no raw `console.log` in library code."}];I(J);import{defineExample as K}from"@contractspec/lib.contracts-spec/examples";var M=K({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),N=M;import{BlogGenerator as Q,EmailCampaignGenerator as R,LandingPageGenerator as T,SocialPostGenerator as U}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as V}from"@contractspec/lib.content-gen/seo";import{Logger as W,LogLevel as X}from"@contractspec/lib.logger";var Y=new W({level:X.INFO,environment:"production",enableColors:!1});async function m(){let h={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15‑minute pilot run"},j=await new Q().generate(h),q=await new T().generate(h),w=await new R().generate({brief:h,variant:"announcement"}),x=await new U().generate(h),y=new V().optimize(h);Y.info("Generated content assets",{blogIntro:j.intro,landingHero:q.hero,emailSubject:w.subject,socialPosts:x.map((A)=>A.body),seo:y})}export{m as runContentGenerationExample,N as example,M as ExamplesContentGenerationExample,_ as ContentGenerationFeature};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
|
|
2
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
|
package/dist/example.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const ExamplesContentGenerationExample: import("@contractspec/lib.contracts-spec").ExampleSpec;
|
|
2
|
+
export default ExamplesContentGenerationExample;
|
|
3
|
+
export { ExamplesContentGenerationExample };
|
package/dist/example.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineExample as
|
|
2
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),j=c;export{j as default,c as ExamplesContentGenerationExample};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineFeature as
|
|
2
|
+
import{defineFeature as H}from"@contractspec/lib.contracts-spec/features";var _=H({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as I}from"@contractspec/lib.contracts-spec/docs";var J=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
|
|
3
3
|
- A spec-first-ish interface for content brief inputs (typed, validated).
|
|
4
4
|
- Deterministic orchestration of generators (same input \u2192 same structure).
|
|
5
5
|
|
|
@@ -8,4 +8,4 @@ import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{
|
|
|
8
8
|
- Landing hero
|
|
9
9
|
- Email subject/body
|
|
10
10
|
- Social post bodies
|
|
11
|
-
- SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation \u2014 Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],body:"## Usage\n- Call `runContentGenerationExample()`.\n- Modify the `ContentBrief` fields to drive different outputs.\n\n## Guardrails\n- Avoid PII in briefs.\n- Keep output logging structured; no raw `console.log` in library code."}];
|
|
11
|
+
- SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation \u2014 Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],body:"## Usage\n- Call `runContentGenerationExample()`.\n- Modify the `ContentBrief` fields to drive different outputs.\n\n## Guardrails\n- Avoid PII in briefs.\n- Keep output logging structured; no raw `console.log` in library code."}];I(J);import{defineExample as K}from"@contractspec/lib.contracts-spec/examples";var M=K({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),N=M;import{BlogGenerator as Q,EmailCampaignGenerator as R,LandingPageGenerator as T,SocialPostGenerator as U}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as V}from"@contractspec/lib.content-gen/seo";import{Logger as W,LogLevel as X}from"@contractspec/lib.logger";var Y=new W({level:X.INFO,environment:"production",enableColors:!1});async function m(){let h={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15\u2011minute pilot run"},j=await new Q().generate(h),q=await new T().generate(h),w=await new R().generate({brief:h,variant:"announcement"}),x=await new U().generate(h),y=new V().optimize(h);Y.info("Generated content assets",{blogIntro:j.intro,landingHero:q.hero,emailSubject:w.subject,socialPosts:x.map((A)=>A.body),seo:y})}export{m as runContentGenerationExample,N as example,M as ExamplesContentGenerationExample,_ as ContentGenerationFeature};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineFeature as g}from"@contractspec/lib.contracts-spec";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
|
|
1
|
+
import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var j=g({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});export{j as ContentGenerationFeature};
|
package/dist/node/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as
|
|
1
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),j=c;export{j as default,c as ExamplesContentGenerationExample};
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{defineFeature as
|
|
1
|
+
import{defineFeature as H}from"@contractspec/lib.contracts-spec/features";var _=H({meta:{key:"content-generation",version:"1.0.0",title:"Content Generation",description:"AI content generation for blog posts, landing pages, emails, and social media",domain:"content",owners:["@examples"],tags:["content","ai","generation"],stability:"experimental"},docs:["docs.examples.content-generation","docs.examples.content-generation.usage"]});import{registerDocBlocks as I}from"@contractspec/lib.contracts-spec/docs";var J=[{id:"docs.examples.content-generation",title:"Content Generation (example)",summary:"Generate a consistent set of marketing assets from a typed ContentBrief (blog, landing hero, email, social, SEO).",kind:"reference",visibility:"public",route:"/docs/examples/content-generation",tags:["content","marketing","example"],body:`## What this example shows
|
|
2
2
|
- A spec-first-ish interface for content brief inputs (typed, validated).
|
|
3
3
|
- Deterministic orchestration of generators (same input → same structure).
|
|
4
4
|
|
|
@@ -7,4 +7,4 @@ import{defineFeature as y}from"@contractspec/lib.contracts-spec";var Y=y({meta:{
|
|
|
7
7
|
- Landing hero
|
|
8
8
|
- Email subject/body
|
|
9
9
|
- Social post bodies
|
|
10
|
-
- SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation — Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],body:"## Usage\n- Call `runContentGenerationExample()`.\n- Modify the `ContentBrief` fields to drive different outputs.\n\n## Guardrails\n- Avoid PII in briefs.\n- Keep output logging structured; no raw `console.log` in library code."}];
|
|
10
|
+
- SEO metadata`},{id:"docs.examples.content-generation.usage",title:"Content Generation — Usage",summary:"How to run the example and extend the brief.",kind:"usage",visibility:"public",route:"/docs/examples/content-generation/usage",tags:["content","usage"],body:"## Usage\n- Call `runContentGenerationExample()`.\n- Modify the `ContentBrief` fields to drive different outputs.\n\n## Guardrails\n- Avoid PII in briefs.\n- Keep output logging structured; no raw `console.log` in library code."}];I(J);import{defineExample as K}from"@contractspec/lib.contracts-spec/examples";var M=K({meta:{key:"examples.content-generation",version:"1.0.0",title:"Content Generation",description:"Content generation example using @contractspec/lib.content-gen.",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","content-generation"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.content-generation"}}),N=M;import{BlogGenerator as Q,EmailCampaignGenerator as R,LandingPageGenerator as T,SocialPostGenerator as U}from"@contractspec/lib.content-gen/generators";import{SeoOptimizer as V}from"@contractspec/lib.content-gen/seo";import{Logger as W,LogLevel as X}from"@contractspec/lib.logger";var Y=new W({level:X.INFO,environment:"production",enableColors:!1});async function m(){let h={title:"AI-Native Operations Copilot",summary:"Automates support resolutions, growth playbooks, and DevOps rituals.",problems:["Support queues pile up after hours","Growth teams lack fresh experiments"],solutions:["Stateful AI agents grounded in your knowledge spaces","CI-safe approval workflows for human review","Analytics + experimentation stack built into ContractSpec"],metrics:["80% auto-resolution rate","10+ experiments shipped weekly"],audience:{role:"COO",industry:"Fintech",maturity:"scaleup"},callToAction:"Book a 15‑minute pilot run"},j=await new Q().generate(h),q=await new T().generate(h),w=await new R().generate({brief:h,variant:"announcement"}),x=await new U().generate(h),y=new V().optimize(h);Y.info("Generated content assets",{blogIntro:j.intro,landingHero:q.hero,emailSubject:w.subject,socialPosts:x.map((A)=>A.body),seo:y})}export{m as runContentGenerationExample,N as example,M as ExamplesContentGenerationExample,_ as ContentGenerationFeature};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.content-generation",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.21",
|
|
4
4
|
"description": "Content generation example using @contractspec/lib.content-gen.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"typecheck": "tsc --noEmit"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@contractspec/lib.contracts-spec": "5.
|
|
68
|
-
"@contractspec/lib.content-gen": "3.7.
|
|
69
|
-
"@contractspec/lib.logger": "3.7.
|
|
67
|
+
"@contractspec/lib.contracts-spec": "5.5.0",
|
|
68
|
+
"@contractspec/lib.content-gen": "3.7.21",
|
|
69
|
+
"@contractspec/lib.logger": "3.7.14"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@contractspec/tool.typescript": "3.7.13",
|
|
73
73
|
"typescript": "^5.9.3",
|
|
74
|
-
"@contractspec/tool.bun": "3.7.
|
|
74
|
+
"@contractspec/tool.bun": "3.7.15"
|
|
75
75
|
},
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public",
|
package/src/example.ts
CHANGED
|
@@ -1,32 +1,28 @@
|
|
|
1
|
-
import { defineExample } from '@contractspec/lib.contracts-spec';
|
|
1
|
+
import { defineExample } from '@contractspec/lib.contracts-spec/examples';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const ExamplesContentGenerationExample = defineExample({
|
|
4
4
|
meta: {
|
|
5
|
-
key: 'content-generation',
|
|
5
|
+
key: 'examples.content-generation',
|
|
6
6
|
version: '1.0.0',
|
|
7
7
|
title: 'Content Generation',
|
|
8
8
|
description:
|
|
9
|
-
'
|
|
10
|
-
kind: '
|
|
11
|
-
visibility: '
|
|
9
|
+
'Content generation example using @contractspec/lib.content-gen.',
|
|
10
|
+
kind: 'template',
|
|
11
|
+
visibility: 'experimental',
|
|
12
12
|
stability: 'experimental',
|
|
13
|
-
owners: ['@
|
|
14
|
-
tags: ['
|
|
13
|
+
owners: ['@contractspec-core'],
|
|
14
|
+
tags: ['package', 'examples', 'content-generation'],
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
surfaces: {
|
|
17
|
+
templates: true,
|
|
18
|
+
sandbox: { enabled: true, modes: ['playground', 'specs'] },
|
|
19
|
+
studio: { enabled: false, installable: false },
|
|
20
|
+
mcp: { enabled: false },
|
|
19
21
|
},
|
|
20
22
|
entrypoints: {
|
|
21
23
|
packageName: '@contractspec/example.content-generation',
|
|
22
|
-
docs: './docs',
|
|
23
|
-
},
|
|
24
|
-
surfaces: {
|
|
25
|
-
templates: true,
|
|
26
|
-
sandbox: { enabled: true, modes: ['markdown'] },
|
|
27
|
-
studio: { enabled: true, installable: true },
|
|
28
|
-
mcp: { enabled: true },
|
|
29
24
|
},
|
|
30
25
|
});
|
|
31
26
|
|
|
32
|
-
export default
|
|
27
|
+
export default ExamplesContentGenerationExample;
|
|
28
|
+
export { ExamplesContentGenerationExample };
|