@lssm/example.content-generation 0.0.0-canary-20251217083314 → 1.41.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/.turbo/turbo-build.log +16 -18
- package/dist/docs/content-generation.docblock.js +14 -27
- package/dist/docs/index.js +1 -1
- package/dist/example.js +1 -38
- package/dist/generate.js +1 -52
- package/dist/index.js +1 -5
- package/package.json +11 -14
- package/tsconfig.tsbuildinfo +1 -1
- package/.turbo/turbo-build$colon$bundle.log +0 -74
- package/CHANGELOG.md +0 -15
- package/dist/docs/content-generation.docblock.d.ts +0 -1
- package/dist/docs/index.d.ts +0 -1
- package/dist/example.d.ts +0 -33
- package/dist/generate.d.ts +0 -4
- package/dist/index.d.ts +0 -3
- package/dist/libs/content-gen/dist/generators/blog.js +0 -68
- package/dist/libs/content-gen/dist/generators/email.js +0 -100
- package/dist/libs/content-gen/dist/generators/landing-page.js +0 -76
- package/dist/libs/content-gen/dist/generators/social.js +0 -73
- package/dist/libs/content-gen/dist/seo/optimizer.js +0 -48
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/index.js +0 -29
- package/dist/libs/contracts/dist/docs/presentations.js +0 -71
- package/dist/libs/contracts/dist/docs/registry.js +0 -44
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
- package/dist/libs/logger/dist/context.node.js +0 -78
- package/dist/libs/logger/dist/elysia-plugin.js +0 -3
- package/dist/libs/logger/dist/formatters.js +0 -163
- package/dist/libs/logger/dist/index.js +0 -7
- package/dist/libs/logger/dist/logger.node.js +0 -189
- package/dist/libs/logger/dist/timer.js +0 -126
- package/dist/libs/logger/dist/tracer.node.js +0 -115
- package/dist/libs/logger/dist/types.js +0 -13
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[
|
|
4
|
-
[34mℹ[39m
|
|
5
|
-
[34mℹ[39m
|
|
6
|
-
[34mℹ[39m
|
|
7
|
-
[34mℹ[39m
|
|
8
|
-
[34mℹ[39m
|
|
9
|
-
[34mℹ[39m
|
|
10
|
-
[34mℹ[39m
|
|
11
|
-
[34mℹ[39m [2mdist/[22m[
|
|
12
|
-
[34mℹ[39m [2mdist/[22m[
|
|
13
|
-
[34mℹ[39m [2mdist/[22m[
|
|
14
|
-
[34mℹ[39m
|
|
15
|
-
[
|
|
16
|
-
|
|
17
|
-
[32m✔[39m Build complete in [32m49ms[39m
|
|
18
|
-
[0m[2m[35m$[0m [2m[1mtsc --noEmit[0m
|
|
1
|
+
$ bun build:bundle && bun build:types
|
|
2
|
+
$ tsdown
|
|
3
|
+
[34mℹ[39m tsdown [2mv0.17.4[22m powered by rolldown [2mv1.0.0-beta.53[22m
|
|
4
|
+
[34mℹ[39m config file: [4m/home/runner/work/contractspec/contractspec/packages/examples/content-generation/tsdown.config.js[24m
|
|
5
|
+
[34mℹ[39m entry: [34msrc/example.ts, src/generate.ts, src/index.ts, src/docs/content-generation.docblock.ts, src/docs/index.ts[39m
|
|
6
|
+
[34mℹ[39m target: [34mesnext[39m
|
|
7
|
+
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
8
|
+
[34mℹ[39m Build start
|
|
9
|
+
[34mℹ[39m [2mdist/[22m[1mgenerate.js[22m [2m1.34 kB[22m [2m│ gzip: 0.78 kB[22m
|
|
10
|
+
[34mℹ[39m [2mdist/[22m[1mdocs/content-generation.docblock.js[22m [2m1.15 kB[22m [2m│ gzip: 0.62 kB[22m
|
|
11
|
+
[34mℹ[39m [2mdist/[22m[1mexample.js[22m [2m0.57 kB[22m [2m│ gzip: 0.33 kB[22m
|
|
12
|
+
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m0.17 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
13
|
+
[34mℹ[39m [2mdist/[22m[1mdocs/index.js[22m [2m0.04 kB[22m [2m│ gzip: 0.06 kB[22m
|
|
14
|
+
[34mℹ[39m 5 files, total: 3.26 kB
|
|
15
|
+
[32m✔[39m Build complete in [32m30ms[39m
|
|
16
|
+
$ tsc --noEmit
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{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
|
+
- A spec-first-ish interface for content brief inputs (typed, validated).
|
|
3
|
+
- Deterministic orchestration of generators (same input → same structure).
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
tags: [
|
|
13
|
-
"content",
|
|
14
|
-
"marketing",
|
|
15
|
-
"example"
|
|
16
|
-
],
|
|
17
|
-
body: `## What this example shows\n- A spec-first-ish interface for content brief inputs (typed, validated).\n- Deterministic orchestration of generators (same input → same structure).\n\n## Outputs\n- Blog intro\n- Landing hero\n- Email subject/body\n- Social post bodies\n- SEO metadata`
|
|
18
|
-
}, {
|
|
19
|
-
id: "docs.examples.content-generation.usage",
|
|
20
|
-
title: "Content Generation — Usage",
|
|
21
|
-
summary: "How to run the example and extend the brief.",
|
|
22
|
-
kind: "usage",
|
|
23
|
-
visibility: "public",
|
|
24
|
-
route: "/docs/examples/content-generation/usage",
|
|
25
|
-
tags: ["content", "usage"],
|
|
26
|
-
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.`
|
|
27
|
-
}]);
|
|
5
|
+
## Outputs
|
|
6
|
+
- Blog intro
|
|
7
|
+
- Landing hero
|
|
8
|
+
- Email subject/body
|
|
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
|
|
11
|
+
- Call \`runContentGenerationExample()\`.
|
|
12
|
+
- Modify the \`ContentBrief\` fields to drive different outputs.
|
|
28
13
|
|
|
29
|
-
|
|
14
|
+
## Guardrails
|
|
15
|
+
- Avoid PII in briefs.
|
|
16
|
+
- Keep output logging structured; no raw \`console.log\` in library code.`}]);
|
package/dist/docs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./content-generation.docblock.js";
|
package/dist/example.js
CHANGED
|
@@ -1,38 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const example = {
|
|
3
|
-
id: "content-generation",
|
|
4
|
-
title: "Content Generation",
|
|
5
|
-
summary: "Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @lssm/lib.content-gen.",
|
|
6
|
-
tags: [
|
|
7
|
-
"content",
|
|
8
|
-
"marketing",
|
|
9
|
-
"generation",
|
|
10
|
-
"ai"
|
|
11
|
-
],
|
|
12
|
-
kind: "script",
|
|
13
|
-
visibility: "public",
|
|
14
|
-
docs: {
|
|
15
|
-
rootDocId: "docs.examples.content-generation",
|
|
16
|
-
usageDocId: "docs.examples.content-generation.usage"
|
|
17
|
-
},
|
|
18
|
-
entrypoints: {
|
|
19
|
-
packageName: "@lssm/example.content-generation",
|
|
20
|
-
docs: "./docs"
|
|
21
|
-
},
|
|
22
|
-
surfaces: {
|
|
23
|
-
templates: true,
|
|
24
|
-
sandbox: {
|
|
25
|
-
enabled: true,
|
|
26
|
-
modes: ["markdown"]
|
|
27
|
-
},
|
|
28
|
-
studio: {
|
|
29
|
-
enabled: true,
|
|
30
|
-
installable: true
|
|
31
|
-
},
|
|
32
|
-
mcp: { enabled: true }
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var example_default = example;
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
export { example_default as default };
|
|
1
|
+
var e={id:`content-generation`,title:`Content Generation`,summary:`Generate blog/landing/email/social/SEO assets from a typed ContentBrief using @lssm/lib.content-gen.`,tags:[`content`,`marketing`,`generation`,`ai`],kind:`script`,visibility:`public`,docs:{rootDocId:`docs.examples.content-generation`,usageDocId:`docs.examples.content-generation.usage`},entrypoints:{packageName:`@lssm/example.content-generation`,docs:`./docs`},surfaces:{templates:!0,sandbox:{enabled:!0,modes:[`markdown`]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}};export{e as default};
|
package/dist/generate.js
CHANGED
|
@@ -1,52 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { LandingPageGenerator } from "./libs/content-gen/dist/generators/landing-page.js";
|
|
3
|
-
import { EmailCampaignGenerator } from "./libs/content-gen/dist/generators/email.js";
|
|
4
|
-
import { SocialPostGenerator } from "./libs/content-gen/dist/generators/social.js";
|
|
5
|
-
import { SeoOptimizer } from "./libs/content-gen/dist/seo/optimizer.js";
|
|
6
|
-
import { LogLevel } from "./libs/logger/dist/types.js";
|
|
7
|
-
import { Logger } from "./libs/logger/dist/logger.node.js";
|
|
8
|
-
import "./libs/logger/dist/index.js";
|
|
9
|
-
|
|
10
|
-
//#region src/generate.ts
|
|
11
|
-
const logger = new Logger({
|
|
12
|
-
level: process.env.NODE_ENV === "production" ? LogLevel.INFO : LogLevel.DEBUG,
|
|
13
|
-
environment: process.env.NODE_ENV || "development",
|
|
14
|
-
enableColors: process.env.NODE_ENV !== "production"
|
|
15
|
-
});
|
|
16
|
-
async function runContentGenerationExample() {
|
|
17
|
-
const brief = {
|
|
18
|
-
title: "AI-Native Operations Copilot",
|
|
19
|
-
summary: "Automates support resolutions, growth playbooks, and DevOps rituals.",
|
|
20
|
-
problems: ["Support queues pile up after hours", "Growth teams lack fresh experiments"],
|
|
21
|
-
solutions: [
|
|
22
|
-
"Stateful AI agents grounded in your knowledge spaces",
|
|
23
|
-
"CI-safe approval workflows for human review",
|
|
24
|
-
"Analytics + experimentation stack built into ContractSpec"
|
|
25
|
-
],
|
|
26
|
-
metrics: ["80% auto-resolution rate", "10+ experiments shipped weekly"],
|
|
27
|
-
audience: {
|
|
28
|
-
role: "COO",
|
|
29
|
-
industry: "Fintech",
|
|
30
|
-
maturity: "scaleup"
|
|
31
|
-
},
|
|
32
|
-
callToAction: "Book a 15‑minute pilot run"
|
|
33
|
-
};
|
|
34
|
-
const blog = await new BlogGenerator().generate(brief);
|
|
35
|
-
const landing = await new LandingPageGenerator().generate(brief);
|
|
36
|
-
const email = await new EmailCampaignGenerator().generate({
|
|
37
|
-
brief,
|
|
38
|
-
variant: "announcement"
|
|
39
|
-
});
|
|
40
|
-
const social = await new SocialPostGenerator().generate(brief);
|
|
41
|
-
const seo = new SeoOptimizer().optimize(brief);
|
|
42
|
-
logger.info("Generated content assets", {
|
|
43
|
-
blogIntro: blog.intro,
|
|
44
|
-
landingHero: landing.hero,
|
|
45
|
-
emailSubject: email.subject,
|
|
46
|
-
socialPosts: social.map((post) => post.body),
|
|
47
|
-
seo
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
export { runContentGenerationExample };
|
|
1
|
+
import{BlogGenerator as e,EmailCampaignGenerator as t,LandingPageGenerator as n,SocialPostGenerator as r}from"@lssm/lib.content-gen/generators";import{SeoOptimizer as i}from"@lssm/lib.content-gen/seo";import{LogLevel as a,Logger as o}from"@lssm/lib.logger";const s=new o({level:process.env.NODE_ENV===`production`?a.INFO:a.DEBUG,environment:process.env.NODE_ENV||`development`,enableColors:process.env.NODE_ENV!==`production`});async function c(){let a={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`},o=await new e().generate(a),c=await new n().generate(a),l=await new t().generate({brief:a,variant:`announcement`}),u=await new r().generate(a),d=new i().optimize(a);s.info(`Generated content assets`,{blogIntro:o.intro,landingHero:c.hero,emailSubject:l.subject,socialPosts:u.map(e=>e.body),seo:d})}export{c as runContentGenerationExample};
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { runContentGenerationExample } from "./generate.js";
|
|
3
|
-
import "./docs/index.js";
|
|
4
|
-
|
|
5
|
-
export { example_default as example, runContentGenerationExample };
|
|
1
|
+
import e from"./example.js";import{runContentGenerationExample as t}from"./generate.js";import"./docs/index.js";export{e as example,t as runContentGenerationExample};
|
package/package.json
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/example.content-generation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "Content generation example using @lssm/lib.content-gen.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
|
-
".": "./
|
|
10
|
-
"./docs": "./
|
|
11
|
-
"./docs/content-generation.docblock": "./
|
|
12
|
-
"./example": "./
|
|
13
|
-
"./generate": "./
|
|
9
|
+
".": "./src/index.ts",
|
|
10
|
+
"./docs": "./src/docs/index.ts",
|
|
11
|
+
"./docs/content-generation.docblock": "./src/docs/content-generation.docblock.ts",
|
|
12
|
+
"./example": "./src/example.ts",
|
|
13
|
+
"./generate": "./src/generate.ts",
|
|
14
14
|
"./*": "./*"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
|
-
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
18
|
-
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
19
17
|
"build": "bun build:bundle && bun build:types",
|
|
20
18
|
"build:bundle": "tsdown",
|
|
21
19
|
"build:types": "tsc --noEmit",
|
|
@@ -27,14 +25,13 @@
|
|
|
27
25
|
"test": "bun test"
|
|
28
26
|
},
|
|
29
27
|
"dependencies": {
|
|
30
|
-
"@lssm/lib.
|
|
31
|
-
"@lssm/lib.contracts": "
|
|
32
|
-
"@lssm/lib.
|
|
33
|
-
"@lssm/lib.logger": "0.0.0-canary-20251217083314"
|
|
28
|
+
"@lssm/lib.content-gen": "workspace:*",
|
|
29
|
+
"@lssm/lib.contracts": "workspace:*",
|
|
30
|
+
"@lssm/lib.logger": "workspace:*"
|
|
34
31
|
},
|
|
35
32
|
"devDependencies": {
|
|
36
|
-
"@lssm/tool.tsdown": "
|
|
37
|
-
"@lssm/tool.typescript": "
|
|
33
|
+
"@lssm/tool.tsdown": "workspace:*",
|
|
34
|
+
"@lssm/tool.typescript": "workspace:*",
|
|
38
35
|
"tsdown": "^0.17.4",
|
|
39
36
|
"typescript": "^5.9.3"
|
|
40
37
|
},
|