@conscience-technology/ovenn 0.7.4 → 0.7.6
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 +43 -4
- package/assets/components/AIMessage/AIMessage.module.css +10 -0
- package/assets/components/AIMessage/AIMessage.tsx +6 -2
- package/assets/components/AttachmentThumb/AttachmentThumb.tsx +1 -0
- package/assets/components/Breadcrumb/Breadcrumb.module.css +82 -23
- package/assets/components/Breadcrumb/Breadcrumb.tsx +44 -26
- package/assets/components/Breadcrumb/index.ts +1 -0
- package/assets/components/Button/Button.module.css +2 -4
- package/assets/components/Callout/Callout.module.css +44 -18
- package/assets/components/Callout/Callout.tsx +9 -4
- package/assets/components/Callout/index.ts +1 -1
- package/assets/components/Canvas/Canvas.module.css +13 -0
- package/assets/components/Canvas/Canvas.tsx +378 -94
- package/assets/components/Canvas/clipboard.ts +5 -1
- package/assets/components/Canvas/collision.ts +5 -1
- package/assets/components/Canvas/graph.ts +14 -5
- package/assets/components/Canvas/history.ts +11 -4
- package/assets/components/Canvas/index.ts +2 -1
- package/assets/components/Canvas/types.ts +36 -1
- package/assets/components/CanvasEdge/tokens.css +14 -1
- package/assets/components/CanvasNode/tokens.css +13 -10
- package/assets/components/ChatComposer/ChatComposer.tsx +1 -1
- package/assets/components/ChatInput/ChatInput.tsx +1 -1
- package/assets/components/ColorField/ColorField.module.css +6 -1
- package/assets/components/ColorPicker/ColorPicker.module.css +3 -0
- package/assets/components/CommandPalette/CommandPalette.module.css +114 -0
- package/assets/components/CommandPalette/CommandPalette.tsx +206 -21
- package/assets/components/CommandPalette/index.ts +1 -0
- package/assets/components/Drawer/Drawer.module.css +30 -0
- package/assets/components/Drawer/Drawer.tsx +75 -16
- package/assets/components/Drawer/index.ts +1 -0
- package/assets/components/FileIcon/FileIcon.tsx +1 -0
- package/assets/components/FileIcon/fileExtMap.ts +1 -0
- package/assets/components/Icon/Icon.tsx +3 -0
- package/assets/components/Input/Input.module.css +3 -3
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +1 -1
- package/assets/components/Onboarding/OnboardingPage.tsx +13 -11
- package/assets/components/Onboarding/actions.ts +9 -9
- package/assets/components/Select/Select.module.css +1 -1
- package/assets/components/SocialLoginButton/SocialLoginButton.module.css +198 -0
- package/assets/components/SocialLoginButton/SocialLoginButton.tsx +86 -0
- package/assets/components/SocialLoginButton/assets/amazon.svg +1 -0
- package/assets/components/SocialLoginButton/assets/apple.svg +3 -0
- package/assets/components/SocialLoginButton/assets/discord.svg +3 -0
- package/assets/components/SocialLoginButton/assets/facebook-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/facebook.png +0 -0
- package/assets/components/SocialLoginButton/assets/github.svg +3 -0
- package/assets/components/SocialLoginButton/assets/google-mark.png +0 -0
- package/assets/components/SocialLoginButton/assets/kakao.svg +3 -0
- package/assets/components/SocialLoginButton/assets/line-icon.png +0 -0
- package/assets/components/SocialLoginButton/assets/line-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/linkedin-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/linkedin.png +0 -0
- package/assets/components/SocialLoginButton/assets/microsoft.svg +6 -0
- package/assets/components/SocialLoginButton/assets/naver.png +0 -0
- package/assets/components/SocialLoginButton/assets/slack.svg +17 -0
- package/assets/components/SocialLoginButton/assets/spotify.svg +3 -0
- package/assets/components/SocialLoginButton/assets/twitch.svg +21 -0
- package/assets/components/SocialLoginButton/assets/wechat.png +0 -0
- package/assets/components/SocialLoginButton/assets/x.svg +3 -0
- package/assets/components/SocialLoginButton/index.ts +2 -0
- package/assets/components/SocialLoginButton/provider-tokens.css +30 -0
- package/assets/components/SocialLoginButton/providers.ts +23 -0
- package/assets/components/TableRowEdit/TableRowEdit.tsx +2 -2
- package/assets/components/ThemeController.tsx +2 -2
- package/assets/components/TimelineView/TimelineView.tsx +4 -2
- package/assets/components/Tooltip/Tooltip.module.css +1 -0
- package/assets/components/_data.ts +1 -1
- package/assets/components/_utils.css +1 -0
- package/assets/components/component-registry.json +30 -1
- package/assets/components/index.ts +1 -0
- package/assets/components/side-effect-css.d.ts +5 -0
- package/assets/components/themeBootScript.ts +7 -1
- package/assets/components/tokens.css +14 -6
- package/assets/prompts/ASSEMBLY.md +4 -0
- package/assets/prompts/CASCADE.md +2 -2
- package/assets/prompts/CATALOG.md +2 -1
- package/assets/prompts/PRINCIPLES.md +4 -8
- package/assets/prompts/RULES.md +19 -1
- package/assets/prompts/SLOTS.md +2 -4
- package/assets/prompts/WORKFLOW_DESIGN.md +0 -4
- package/assets/prompts/axes/icon.md +1 -1
- package/assets/prompts/axes/material.md +4 -4
- package/assets/prompts/axes/motion.md +1 -1
- package/assets/prompts/axes/shape.md +2 -2
- package/assets/prompts/axes/voice.md +1 -1
- package/assets/prompts/components/_variants.md +4 -4
- package/assets/prompts/components/accordion.md +4 -4
- package/assets/prompts/components/ai-message.md +6 -2
- package/assets/prompts/components/attachment-item.md +2 -2
- package/assets/prompts/components/breadcrumb.md +11 -5
- package/assets/prompts/components/button.md +3 -3
- package/assets/prompts/components/callout.md +8 -4
- package/assets/prompts/components/canvas-edge.md +1 -1
- package/assets/prompts/components/canvas-node.md +1 -1
- package/assets/prompts/components/canvas.md +24 -8
- package/assets/prompts/components/card.md +1 -2
- package/assets/prompts/components/chart-bar.md +1 -1
- package/assets/prompts/components/chat-input.md +1 -1
- package/assets/prompts/components/checkbox.md +5 -5
- package/assets/prompts/components/color-field.md +2 -2
- package/assets/prompts/components/command-palette.md +55 -47
- package/assets/prompts/components/context-menu.md +5 -5
- package/assets/prompts/components/date-picker.md +2 -2
- package/assets/prompts/components/drawer.md +17 -3
- package/assets/prompts/components/dropdown-menu.md +3 -3
- package/assets/prompts/components/event-list-item.md +4 -4
- package/assets/prompts/components/file-icon.md +2 -2
- package/assets/prompts/components/gallery-item.md +1 -1
- package/assets/prompts/components/hint.md +3 -3
- package/assets/prompts/components/kanban.md +2 -3
- package/assets/prompts/components/list-item.md +12 -12
- package/assets/prompts/components/menu-item.md +2 -2
- package/assets/prompts/components/message-table.md +4 -4
- package/assets/prompts/components/onboarding.md +3 -3
- package/assets/prompts/components/page-header.md +6 -7
- package/assets/prompts/components/quotation-bar.md +1 -1
- package/assets/prompts/components/select.md +1 -1
- package/assets/prompts/components/shortcut.md +3 -3
- package/assets/prompts/components/sidebar.md +5 -4
- package/assets/prompts/components/social-login-button.md +117 -0
- package/assets/prompts/components/stepper.md +1 -1
- package/assets/prompts/components/tab-strip.md +2 -2
- package/assets/prompts/components/table-row-edit.md +6 -6
- package/assets/prompts/components/table-row-select.md +1 -1
- package/assets/prompts/components/tabs.md +5 -2
- package/assets/prompts/components/textarea.md +1 -1
- package/assets/prompts/components/toast.md +3 -3
- package/assets/prompts/components/tooltip.md +3 -3
- package/assets/prompts/components/topbar.md +1 -1
- package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
- package/assets/prompts/design-examples/catalog.json +9 -9
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +37 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +113 -18
- package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +2 -2
- package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +3 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +99 -51
- package/assets/prompts/primitives/scroll.md +1 -1
- package/assets/prompts/recipes/README.md +5 -6
- package/assets/prompts/recipes/meta-line.md +2 -2
- package/assets/prompts/recipes/page-header.md +2 -2
- package/assets/prompts/recipes/section-header.md +1 -1
- package/assets/prompts/themes/_SCHEMA.md +2 -2
- package/assets/prompts/tokens/material.md +5 -2
- package/assets/prompts/tokens/radius.md +1 -1
- package/assets/prompts/use-cases/chat-chat-input.md +382 -74
- package/assets/prompts/use-cases/data-list-item.md +38 -431
- package/assets/prompts/use-cases/feedback-drawer.md +112 -33
- package/assets/prompts/use-cases/overlay-command-palette.md +2004 -0
- package/assets/prompts/use-cases/structure-canvas.md +1016 -0
- package/assets/skills/ovenn-validate/SKILL.md +1 -1
- package/assets/skills/ovenn-validate/scripts/lib/component-usage.js +7 -1
- package/assets/skills/ovenn-validate/scripts/lib/engine.mjs +105 -0
- package/assets/skills/ovenn-validate/scripts/lib/engine.test.mjs +46 -0
- package/assets/skills/ovenn-validate/scripts/lib/source-utils.mjs +5 -3
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.mjs +28 -5
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.test.mjs +15 -0
- package/assets/skills/ovenn-validate/scripts/rules/ghost-tokens.mjs +7 -0
- package/assets/skills/ovenn-validate/scripts/rules/hardcoded.mjs +61 -30
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.mjs +7 -4
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.test.mjs +3 -0
- package/assets/skills/ovenn-validate/scripts/validate.mjs +8 -136
- package/assets/skills/ovenn-wireframe/SKILL.md +1 -1
- package/bin/ovenn.js +8 -0
- package/package.json +2 -2
- package/src/commands/check.js +70 -0
- package/src/commands/info.js +32 -7
- package/src/commands/init.js +26 -30
- package/src/commands/setup-checks.js +80 -0
- package/src/commands/update.js +90 -18
- package/src/data/ctds-releases.json +1 -0
- package/src/utils/assets.js +5 -0
- package/src/utils/component-usage.js +7 -1
- package/src/utils/design-workflow.js +6 -2
- package/src/utils/doctor.js +7 -1
- package/src/utils/legacy-ctds.js +169 -0
- package/src/utils/managed-assets.js +16 -3
- package/src/utils/route.js +17 -0
- package/src/utils/rules-context.js +91 -0
- package/src/utils/update-transaction.js +16 -3
- package/assets/prompts/FEEDBACK_PROCESS.md +0 -19
- package/assets/prompts/GUIDE.md +0 -307
- package/assets/prompts/MEMORY.md +0 -202
- package/assets/prompts/TEMPLATE_PREVIEWS.md +0 -21
- package/assets/prompts/components/README.md +0 -84
package/src/commands/update.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bridgeSources } from "../utils/client-bridges.js";
|
|
1
|
+
import { bridgeSources, clientBridges } from "../utils/client-bridges.js";
|
|
2
2
|
import { checkMissingDeps, renderInstallCmd } from "../utils/deps.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -7,13 +7,20 @@ import { detectProject } from "../utils/detect.js";
|
|
|
7
7
|
import { getAssetSources } from "../utils/assets.js";
|
|
8
8
|
import { loadMeta } from "../utils/meta.js";
|
|
9
9
|
import { renderAgentsBlock } from "../utils/agents.js";
|
|
10
|
-
import { assetRoots, sourceFiles, planManagedUpdate, baselineFromMeta, nextBaseline,
|
|
11
|
-
import { applyUpdate, restoreUpdate, pendingUpdates } from "../utils/update-transaction.js";
|
|
10
|
+
import { assetRoots, sourceFiles, planManagedUpdate, planRemovals, baselineFromMeta, nextBaseline, hashAt, safePath } from "../utils/managed-assets.js";
|
|
11
|
+
import { applyUpdate, restoreUpdate, pendingUpdates, pruneEmptyDirs } from "../utils/update-transaction.js";
|
|
12
|
+
import { planLegacyMigration, stripLegacyAgentsBlock, projectSources } from "../utils/legacy-ctds.js";
|
|
12
13
|
import { askConflict } from "../utils/prompt.js";
|
|
13
14
|
import { renderDiff } from "../utils/diff.js";
|
|
14
15
|
|
|
16
|
+
// Installs before 0.7.5 render the boot script without the consumer onboarding route, so /ovenn is not forced to light mode.
|
|
17
|
+
const BOOT_CALL = /themeBootScript\(\s*\)/;
|
|
18
|
+
const BOOT_IMPORT = /from\s+["'][^"']*components\/ovenn\/themeBootScript["']/;
|
|
19
|
+
const KEPT_DIR = ".ovenn/kept";
|
|
20
|
+
const OVENN_SPECIFIER = /["'`][^"'`\s]*?components\/ovenn((?:\/[^"'`\s]*)?)["'`]/g;
|
|
21
|
+
|
|
15
22
|
export async function run(args) {
|
|
16
|
-
if (args.includes("--help")) { console.log("ovenn update [--dry|--dry-run] [--json] [--diff] [--keep-local|--abort-on-conflict|--force]\novenn update --recover=<id> | --rollback=<id>\nAll managed files use conflict checks. Every applied update has a recoverable backup."); return; }
|
|
23
|
+
if (args.includes("--help")) { console.log("ovenn update [--dry|--dry-run] [--json] [--diff] [--keep-local|--abort-on-conflict|--force]\novenn update --recover=<id> | --rollback=<id>\nAll managed files use conflict checks. Every applied update has a recoverable backup.\nProjects installed by the legacy ctds CLI are migrated to Ovenn."); return; }
|
|
17
24
|
const root = process.cwd(); const dry = args.includes("--dry") || args.includes("--dry-run"); const json = args.includes("--json");
|
|
18
25
|
const recovery = args.find((arg) => /^--(?:recover|rollback)=/.test(arg));
|
|
19
26
|
if (recovery) {
|
|
@@ -24,22 +31,48 @@ export async function run(args) {
|
|
|
24
31
|
const project = detectProject(root); if (!project.ok) throw new Error(project.reason);
|
|
25
32
|
const componentPath = project.useSrcDir ? "src/components/ovenn" : "components/ovenn";
|
|
26
33
|
const metaFile = `${componentPath}/.ovenn-meta.json`; const metaHash = hashAt(safePath(root, metaFile));
|
|
27
|
-
const meta = loadMeta(join(root, componentPath));
|
|
28
|
-
if (!meta || !meta.files || typeof meta.files !== "object") throw new Error("Valid .ovenn-meta.json not found. Run ovenn info doctor before reinstalling.");
|
|
29
34
|
const assets = getAssetSources(); const sources = sourceFiles(assetRoots(assets, project));
|
|
35
|
+
const migration = planLegacyMigration(root, project, sources, componentPath);
|
|
36
|
+
let meta = loadMeta(join(root, componentPath));
|
|
37
|
+
if (!meta || !meta.files || typeof meta.files !== "object") {
|
|
38
|
+
if (!migration.legacy) throw new Error("Valid .ovenn-meta.json not found. Run ovenn info doctor before reinstalling.");
|
|
39
|
+
meta = {version: `ctds@${migration.legacy.version}`, installedAt: migration.legacy.meta.installedAt, files: {}, assets: {}};
|
|
40
|
+
}
|
|
41
|
+
|
|
30
42
|
const catalog = sources.get("prompts/CATALOG.md").toString();
|
|
31
|
-
const
|
|
32
|
-
const
|
|
43
|
+
const rules = sources.get("prompts/RULES.md")?.toString() ?? "";
|
|
44
|
+
const block = renderAgentsBlock(catalog, {componentsPath: componentPath, rules});
|
|
45
|
+
const agentsPath = safePath(root, "AGENTS.md"); const agents = stripLegacyAgentsBlock(existsSync(agentsPath) ? readFileSync(agentsPath, "utf8") : "");
|
|
33
46
|
const start = agents.indexOf("<!-- ovenn:start -->"), end = agents.indexOf("<!-- ovenn:end -->");
|
|
34
47
|
if ((start >= 0) !== (end >= 0) || (start >= 0 && end < start)) throw new Error("AGENTS.md has unpaired Ovenn markers. Repair them before updating.");
|
|
35
|
-
sources.set("AGENTS.md", Buffer.from(start >= 0 ? agents.slice(0,start) + block + agents.slice(end + "<!-- ovenn:end -->".length) : `${agents.trimEnd()}${agents ? "\n\n" : ""}${block}\n`));
|
|
48
|
+
sources.set("AGENTS.md", Buffer.from(start >= 0 ? agents.slice(0,start) + block + agents.slice(end + "<!-- ovenn:end -->".length) : `${agents.trimEnd()}${agents.trim() ? "\n\n" : ""}${block}\n`));
|
|
36
49
|
for (const [name, content] of bridgeSources(root)) sources.set(name, content);
|
|
37
|
-
|
|
38
|
-
const
|
|
50
|
+
|
|
51
|
+
const old = {...migration.baseline, ...baselineFromMeta(meta, componentPath)};
|
|
52
|
+
const plan = planManagedUpdate(root, sources, old, {merged: new Set(["AGENTS.md", ...Object.keys(clientBridges)])});
|
|
53
|
+
const removals = planRemovals(root, sources, old);
|
|
54
|
+
const rewrites = new Map(migration.rewrites);
|
|
55
|
+
const layout = `${project.appDir}/layout.tsx`;
|
|
56
|
+
const layoutText = rewrites.get(layout) ?? (existsSync(join(root, layout)) ? readFileSync(join(root, layout), "utf8") : "");
|
|
57
|
+
if (BOOT_IMPORT.test(layoutText) && BOOT_CALL.test(layoutText)) rewrites.set(layout, layoutText.replace(BOOT_CALL, 'themeBootScript({ onboardingPath: "/ovenn" })'));
|
|
58
|
+
|
|
39
59
|
const conflicts = plan.filter((item) => item.kind === "conflict");
|
|
40
|
-
|
|
60
|
+
// A component the release dropped stays while project code still imports it; deleting it would break the build.
|
|
61
|
+
const imported = importedTargets(root, componentPath);
|
|
62
|
+
const inUse = removals.filter((item) => item.kind !== "gone" && imported.has(item.path));
|
|
63
|
+
const retired = removals.filter((item) => !inUse.includes(item));
|
|
64
|
+
const removed = [...new Set([...retired.filter((item) => item.kind === "remove").map((item) => item.path), ...migration.removals])];
|
|
65
|
+
// Edited files that the new release no longer ships, and edited CTDS files: out of the source tree, edits preserved.
|
|
66
|
+
const moved = [...new Set([...retired.filter((item) => item.kind === "orphan").map((item) => item.path), ...migration.moved])];
|
|
67
|
+
const report = {
|
|
68
|
+
version: meta.version, migratedFrom: migration.legacy ? `ctds@${migration.legacy.version}` : null,
|
|
69
|
+
add: plan.filter((item) => item.kind === "add").map((item) => item.path), update: plan.filter((item) => item.kind === "safe").map((item) => item.path),
|
|
70
|
+
remove: removed, rewrite: [...rewrites.keys()], conflicts: conflicts.map((item) => item.path), kept: [], overwritten: [],
|
|
71
|
+
movedAside: moved.map((path) => ({from: path, to: `${KEPT_DIR}/${path}`})), retiredInUse: inUse.map((item) => ({path: item.path, importedBy: imported.get(item.path)})),
|
|
72
|
+
unresolvedImports: migration.unresolved, transaction: null,
|
|
73
|
+
};
|
|
41
74
|
if (args.includes("--diff") && !json) for (const item of conflicts) console.log(renderDiff(readFileSync(safePath(root,item.path),"utf8"),item.content.toString(),{label:item.path}));
|
|
42
|
-
if (dry) { console.log(json ? JSON.stringify({...report,dry:true},null,2) : `Dry run: ${report.add.length} added, ${report.update.length} updated, ${conflicts.length} conflicts. No writes
|
|
75
|
+
if (dry) { console.log(json ? JSON.stringify({...report,dry:true},null,2) : `Dry run: ${report.add.length} added, ${report.update.length} updated, ${removed.length} removed, ${moved.length} moved aside, ${rewrites.size} project files rewritten, ${conflicts.length} conflicts. No writes.${renderNotes(report, {dry: true})}`); return; }
|
|
43
76
|
if (conflicts.length && args.includes("--abort-on-conflict")) { console.log(JSON.stringify({...report,aborted:true},null,2)); process.exitCode=2; return; }
|
|
44
77
|
let overwriteAll = args.includes("--force"), keepAll = args.includes("--keep-local") || (!process.stdin.isTTY && !overwriteAll);
|
|
45
78
|
if (args.includes("--keep-local") && overwriteAll) throw new Error("Choose --force or --keep-local, not both");
|
|
@@ -55,15 +88,54 @@ export async function run(args) {
|
|
|
55
88
|
if (choice === "A") overwriteAll = true;
|
|
56
89
|
}
|
|
57
90
|
report.kept = [...kept];
|
|
58
|
-
|
|
91
|
+
// Edited files that this run replaces (--force, y or A): named here and recoverable from the backup.
|
|
92
|
+
report.overwritten = conflicts.filter((item) => !kept.has(item.path)).map((item) => item.path);
|
|
93
|
+
const dropped = retired.map((item) => item.path);
|
|
94
|
+
const baseline = nextBaseline(plan, old, kept, dropped);
|
|
59
95
|
const version = JSON.parse(readFileSync(fileURLToPath(new URL("../../package.json",import.meta.url)),"utf8")).version;
|
|
60
96
|
const files = Object.fromEntries(Object.entries(baseline).filter(([path]) => path.startsWith(`${componentPath}/`)).map(([path,hash]) => [path.slice(componentPath.length+1),hash]));
|
|
61
|
-
const nextMeta = {...meta, version, updatedAt:new Date().toISOString(), files, assets:baseline, pendingLocalEdits:[...kept]};
|
|
62
|
-
const changes =
|
|
63
|
-
|
|
97
|
+
const nextMeta = {...meta, version, updatedAt:new Date().toISOString(), files, assets:baseline, pendingLocalEdits:[...kept], ...(migration.legacy ? {migratedFrom: report.migratedFrom} : {})};
|
|
98
|
+
const changes = [
|
|
99
|
+
...plan.filter((item) => item.kind !== "unchanged" && !kept.has(item.path)),
|
|
100
|
+
...removed.map((path) => ({path, current: hashAt(safePath(root, path)), content: null})),
|
|
101
|
+
...moved.flatMap((path) => [{path: `${KEPT_DIR}/${path}`, current: hashAt(safePath(root, `${KEPT_DIR}/${path}`)), content: readFileSync(safePath(root, path))}, {path, current: hashAt(safePath(root, path)), content: null}]),
|
|
102
|
+
...[...rewrites].map(([path, text]) => ({path, current: hashAt(safePath(root, path)), content: Buffer.from(text)})),
|
|
103
|
+
];
|
|
104
|
+
if (changes.length || dropped.length || JSON.stringify(meta.pendingLocalEdits ?? []) !== JSON.stringify([...kept])) changes.push({path:metaFile,current:metaHash,content:Buffer.from(JSON.stringify(nextMeta,null,2)+"\n")});
|
|
64
105
|
report.transaction = applyUpdate(root, changes);
|
|
106
|
+
pruneEmptyDirs(root, [...removed, ...moved]);
|
|
65
107
|
// New components can bring new runtime packages (e.g. CodeBlock → shiki). Say so, or the consumer's typecheck fails after the update.
|
|
66
108
|
const { missing } = checkMissingDeps(root);
|
|
67
109
|
report.missingDependencies = missing;
|
|
68
|
-
console.log(
|
|
110
|
+
if (json) { console.log(JSON.stringify(report,null,2)); return; }
|
|
111
|
+
const written = changes.filter((item) => item.content !== null).length;
|
|
112
|
+
console.log([
|
|
113
|
+
`${report.migratedFrom ? `Migrated ${report.migratedFrom} to Ovenn ${version}. ` : `Updated to Ovenn ${version}. `}${written - moved.length} files written, ${removed.length} removed, ${moved.length} moved aside.`,
|
|
114
|
+
report.transaction ? `Backup: .ovenn/updates/${report.transaction}\nRollback: ovenn update --rollback=${report.transaction}` : "Already up to date.",
|
|
115
|
+
].join("\n") + renderNotes(report) + (missing.length ? `\nInstall these packages (Ovenn components need them):\n ${renderInstallCmd(missing)}` : ""));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Everything that stays at an older version after this run, by name, so nobody mistakes it for updated. */
|
|
119
|
+
function renderNotes(report, {dry = false} = {}) {
|
|
120
|
+
const list = (title, paths, hint) => paths.length ? `\n${title}\n${paths.map((path) => ` ${path}`).join("\n")}${hint ? `\n ${hint}` : ""}` : "";
|
|
121
|
+
const edits = dry ? report.conflicts : report.kept;
|
|
122
|
+
return list(dry ? `${edits.length} files have local edits (kept in noninteractive runs, asked otherwise):` : `${edits.length} local edits kept (these files are still the old version):`, edits, "Review: ovenn update --dry --diff · Take the new version: ovenn update --force")
|
|
123
|
+
+ list(`${(report.overwritten ?? []).length} local edits replaced with the new version (your edits are in the backup):`, report.overwritten ?? [], report.transaction ? `Restore them: ovenn update --rollback=${report.transaction}` : "")
|
|
124
|
+
+ list(`Locally edited files that this release no longer uses, moved out of the project into ${KEPT_DIR}/:`, report.movedAside.map((item) => item.from), "Port any edits you still need to the Ovenn equivalent, then delete them.")
|
|
125
|
+
+ list("Dropped from this release but still imported by your code (kept at the old version):", report.retiredInUse.map((item) => `${item.path} (imported by ${item.importedBy})`), "Replace those imports, then run ovenn update again to remove them.")
|
|
126
|
+
+ list("Imports that still point at the CTDS folder (no Ovenn equivalent, so components/ctds stays):", report.unresolvedImports.map((item) => `${item.file}: ${item.specifier}`), "");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Installed files that the project's own code imports, mapped to the first importing file. */
|
|
130
|
+
function importedTargets(root, componentPath) {
|
|
131
|
+
const tails = new Map();
|
|
132
|
+
for (const file of projectSources(root)) {
|
|
133
|
+
// The barrel itself is updated, so a bare `components/ovenn` import never needs a dropped file.
|
|
134
|
+
for (const [, tail = ""] of readFileSync(join(root, file), "utf8").matchAll(OVENN_SPECIFIER)) if (tail && !tails.has(tail)) tails.set(tail, file);
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
has: (path) => [...tails.keys()].some((tail) => matchesTail(path, `${componentPath}${tail}`)),
|
|
138
|
+
get: (path) => [...tails].find(([tail]) => matchesTail(path, `${componentPath}${tail}`))?.[1],
|
|
139
|
+
};
|
|
69
140
|
}
|
|
141
|
+
const matchesTail = (path, target) => path === target || path.startsWith(`${target}/`) || path.startsWith(`${target}.`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"package":"@conscience-technology/ctds","versions":["0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.1.10","0.1.11","0.1.12","0.1.13","0.1.14","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.4.0","0.4.1","0.4.2","0.4.3","0.4.4","0.4.5","0.4.6","0.4.7","0.5.0","0.6.0","0.6.1","0.6.3"],"files":{".claude/skills/ctds-component/SKILL.md":["353268cadc1ac6e4","3ae900da3816350d","82d1b70aa577e3f1"],".claude/skills/ctds-page/SKILL.md":["147e291808e95837","35c76547e93eda72","4d47b967a5f2c1af","b2c2710feffcaaa7","bc08716a6a4b784c"],".claude/skills/ctds-theme/SKILL.md":["069a87bda9a45e69","15b1d284a3159f64","1f44fc13a71c9a04"],".claude/skills/ctds-validate/SKILL.md":["7fd78b6e8c63e07c","80bc25e672c6424a"],".claude/skills/ctds-validate/fixtures/clean/Clean.module.css":["d4c24dcd0d174504"],".claude/skills/ctds-validate/fixtures/clean/Clean.tsx":["c9d0f067bacecbeb"],".claude/skills/ctds-validate/scripts/lib/source-utils.mjs":["75a806a6d1d04709"],".claude/skills/ctds-validate/scripts/lib/source-utils.test.mjs":["410cd71adca3466a"],".claude/skills/ctds-validate/scripts/rules/doc-sync.mjs":["9a224bfeb42253c5","e2ede728ec1d6de4"],".claude/skills/ctds-validate/scripts/rules/doc-sync.test.mjs":["c9d727a84a113dc5","d983b2c33e015063"],".claude/skills/ctds-validate/scripts/rules/ghost-tokens.mjs":["79a57e29aa27267f","da3f267d8128c4d2"],".claude/skills/ctds-validate/scripts/rules/ghost-tokens.test.mjs":["6222b746f799bd02","e893e1e44c4b326f"],".claude/skills/ctds-validate/scripts/rules/hardcoded.mjs":["6a5499bba61d4fb9"],".claude/skills/ctds-validate/scripts/rules/hardcoded.test.mjs":["5fd9ff522bc09057"],".claude/skills/ctds-validate/scripts/rules/memory-rules.mjs":["07776818c1231a57","263473f31974942d"],".claude/skills/ctds-validate/scripts/rules/memory-rules.test.mjs":["208ef523437fda9c","6bb8e8217aad1b55"],".claude/skills/ctds-validate/scripts/validate.mjs":["2444c89b00937826","2e6641aabf3d3023"],".claude/skills/ctds-wireframe/SKILL.md":["28563df89c037ed8","2ff31a9a75119ddc","42ca5a598cd058e9","9d9c72211c9263e8","c784b9643f18ff72","c8921326c9165c51","fb6904833d32f570"],".claude/skills/ctds/SKILL.md":["111eb328f404b656","2770b74a65002621","296fd1b4e17d559f","43dbaaa7d70910a1","58fdf837d93a49e3","6bb495c07c37104e","e7b2cfc26d82ea14"],"app/ctds/page.tsx":["8daedbcc7eda0c9b","fb8d06f9546c135c"],"components/ctds/AIMessage/AIMessage.module.css":["0fd880adb493c9d8","1c3dd005f6680dc0","56eca49553207486","a547689480112487","b2b48904b62f6a35","c34f2f862ebff14b"],"components/ctds/AIMessage/AIMessage.tsx":["2349ff3689e59ef9","2b85c8b14777e565","5adbbe6a93e5c08a"],"components/ctds/AIMessage/index.ts":["4542b619fb1e459f"],"components/ctds/Accordion/Accordion.module.css":["164da58ebcd0df13","e12d30bcc3c5c15d"],"components/ctds/Accordion/Accordion.tsx":["ab998fa759e7bdd2","e6706869f855ae4f"],"components/ctds/Accordion/index.ts":["240a79bb8c43f45c","8c39f3496841b7c6"],"components/ctds/AppFrame/AppFrame.module.css":["940fa69e2079834c","d4b775e87bddfacb"],"components/ctds/AppFrame/AppFrame.tsx":["38d3b334e338f765"],"components/ctds/AppFrame/index.ts":["76cd90ba4d6a534c"],"components/ctds/AttachmentChip/AttachmentChip.module.css":["31787d288c5ca162","b2f489f031f373bc","d1f89b827ad86755"],"components/ctds/AttachmentChip/AttachmentChip.tsx":["340ca809f30f2217","41e155f9df5b6303","6f0f8d9e3bf8f10f"],"components/ctds/AttachmentChip/index.ts":["4597b0ef944f3c47","4f2d0df2d38561c0"],"components/ctds/AttachmentItem/AttachmentItem.module.css":["2bf5c4ca5e5e45c9","c1b080b972baed91"],"components/ctds/AttachmentItem/AttachmentItem.tsx":["0f78c4a5d25ddf41","cbc43b524982033b","d5633ab9a8b6132d"],"components/ctds/AttachmentItem/index.ts":["b898fc87bb7582af"],"components/ctds/AttachmentThumb/AttachmentThumb.module.css":["78147fe7d9d632d2","7de625c01c90aee3","85e41b8767e2b023","ba8364ae0d8e56fa"],"components/ctds/AttachmentThumb/AttachmentThumb.tsx":["2ca4d3a969886cdc","61910d9d84b1d922","baf3b6b3158f06d1"],"components/ctds/AttachmentThumb/index.ts":["6fd6b7839db7fb58"],"components/ctds/Avatar/Avatar.module.css":["3f4622628fcc9713","8237cf4ef0873e9c","97edef535e422410"],"components/ctds/Avatar/Avatar.tsx":["34f0b00a84622252","44522316e03e60b2","7e1ac7b6131191a8","a50714adfa140a48"],"components/ctds/Avatar/index.ts":["728f7a15dec5fc08","7be6b2169e541b53","82c24d3dcc623885"],"components/ctds/AvatarUpload/AvatarUpload.module.css":["140ddd6eec650d30","ac6ee6033b22b71e","b64f2e54e0f08422"],"components/ctds/AvatarUpload/AvatarUpload.tsx":["005b4df9dfc9122c","35f44962574b67be","59f8febe34da617b","d43c9e16cbc47267"],"components/ctds/AvatarUpload/index.ts":["3c2f81ad21a29e01","583cc4265d53f6fb"],"components/ctds/Badge/Badge.module.css":["26439e8e63a86f99","38d6cb0ed2942f7b","3d3908db09b04c1c"],"components/ctds/Badge/Badge.tsx":["01cf4e15ec3fde2c","1127a8f4add33d5d","8d42824689ad9661"],"components/ctds/Badge/index.ts":["0c45becb2ded2fab"],"components/ctds/BrandSet/BrandSetController.tsx":["a508dff2c2dd22c9"],"components/ctds/BrandSet/index.ts":["fc058d3f76ff8c5c"],"components/ctds/BrandSet/resolve.ts":["222897fe062575b4"],"components/ctds/BrandSet/types.ts":["df14d7ceb94b0b64"],"components/ctds/Breadcrumb/Breadcrumb.module.css":["6d19fd53bf1bfc0d","b586adc0b958a6c3","c8d6b897bd37ee72"],"components/ctds/Breadcrumb/Breadcrumb.tsx":["8d162b5fea2e8c3e","a3484253392fa17c"],"components/ctds/Breadcrumb/index.ts":["de2a41f06a5b2806"],"components/ctds/Bubble/Bubble.module.css":["19318ddd2704ac77","ef4551a08bb5ca50"],"components/ctds/Bubble/Bubble.tsx":["c3bdec001f90a4de"],"components/ctds/Bubble/index.ts":["e2e3b6d12b791c32"],"components/ctds/Button/Button.module.css":["2b735fe391054971","5de6ca8e88be4684","7d6a0c1d511c0061","9643ec7b58ee30c6","9a1cf3104b2a281c","c18989a1650eb880","cb275d89fe21f0fb"],"components/ctds/Button/Button.tsx":["160565ba097ee5dd","304371e84e06da43","75edf9b7464d9cce","eaa121cc5d127b18","f919b8751f4b38f3"],"components/ctds/Button/index.ts":["b9ca9f8c8f8f0da1"],"components/ctds/ButtonGroup/ButtonGroup.module.css":["5f32c683650624c5","d118c9d307e9913c"],"components/ctds/ButtonGroup/ButtonGroup.tsx":["572b4913b5c20d84"],"components/ctds/ButtonGroup/index.ts":["1bde0eaa6f8fcdae"],"components/ctds/Calendar/Calendar.module.css":["d96246e84a49fba4"],"components/ctds/Calendar/Calendar.tsx":["87ed0cf1c81f1f88"],"components/ctds/Calendar/index.ts":["66b5d04cb7350493"],"components/ctds/Callout/Callout.module.css":["ab164a0845214661"],"components/ctds/Callout/Callout.tsx":["0455c9d2a1b47243","0673fc734b22a856"],"components/ctds/Callout/index.ts":["5bdb14b1745ae12e"],"components/ctds/Card/Card.module.css":["2b1db101a6560548"],"components/ctds/Card/Card.tsx":["d538b5cccc2db225"],"components/ctds/Card/index.ts":["c42b54b7c2bbbf86"],"components/ctds/Chart/Chart.module.css":["0e10b896e7706fb8"],"components/ctds/Chart/Chart.tsx":["068db39d7fa3f77d"],"components/ctds/Chart/index.ts":["8a4d054a519cd129"],"components/ctds/ChatInput/ChatInput.module.css":["0eecced52cf95bd9","170b593ab892981c","277cab2773a98fae","3522c3a7ee125118","379604975b3ada47","4450154358f458f6","6a777c259156c6c9","81a44ef0a4936292","8da5cd23bd866683","df3743150caa91a7","e4d5f7bc83b01f26"],"components/ctds/ChatInput/ChatInput.tsx":["098099dc3de64e4b","2221e068abfd18b3","2443ff2d69b9f9f4","2550fa39afe619f1","2cdcb01e008c6ea6","6a452e39ad04d9d5","7158c20457a28122","9ec392cc97bf3af9","c6673b4af60f4f9e","f96066c5118c3e9f"],"components/ctds/ChatInput/ModelSelector.tsx":["101edcc96f2fff07","513bccbd54029704","e4eb3e999359ecf7"],"components/ctds/ChatInput/SendButton.tsx":["85a2575a4853175f","9280d29c923b4493","cc16bf3e3142af84"],"components/ctds/ChatInput/index.ts":["0ec31aaaa6bf0b5b","ecf5dad18167d12f","f0b890705d93499d","f3b02bd0157d385b"],"components/ctds/Checkbox/Checkbox.module.css":["5e689386b92d3fa3","67a078e881f04ba1","8b6e1b42b6eaf633","f957917ff9653fe4"],"components/ctds/Checkbox/Checkbox.tsx":["0df18e9d6eded39e","a89b04df4eb6c991"],"components/ctds/Checkbox/index.ts":["ebe22bf44a567241"],"components/ctds/CheckboxCard/CheckboxCard.module.css":["2b38a9252cb49b6d"],"components/ctds/CheckboxCard/CheckboxCard.tsx":["5cce32ed631561b1"],"components/ctds/CheckboxCard/index.ts":["8d0ad81b1d177444"],"components/ctds/Chip/Chip.module.css":["287fd73ce37e5dee","4cbaed8d0bc99856","c34a24a1b3062667","fd4d84420e8b8a35"],"components/ctds/Chip/Chip.tsx":["535c3fe60a224011","a7f56c0b5e72f206","cba7aceca8bf3952","deb52cae78d51b6f"],"components/ctds/Chip/index.ts":["8edfca8ea405dd9a"],"components/ctds/ChoiceCard/ChoiceCard.module.css":["91fe76d26e8c533f"],"components/ctds/ChoiceCard/ChoiceCard.tsx":["5fa51968c49f1f0c"],"components/ctds/ChoiceCard/index.ts":["9f79ba05d288f243"],"components/ctds/Code/Code.module.css":["adfda990d0d90854","df0c342903e05801"],"components/ctds/Code/Code.tsx":["0cee59b18627e782"],"components/ctds/Code/index.ts":["77fe481a185f942c"],"components/ctds/CodeBlock/CodeBlock.module.css":["025d9ab8a4f0a3b3","18abe4ebdf86f1df","22ab9cff02929dfd","cc98be42d41d08db"],"components/ctds/CodeBlock/CodeBlock.tsx":["2ac8c56b7e019ee8","4adfc6a940b34dfc","7efbe76d3d7f4f67","8911ecdfb7173cc2"],"components/ctds/CodeBlock/copy-code.ts":["84759fd68f05eb67"],"components/ctds/CodeBlock/index.ts":["41fb514ed36e82c2"],"components/ctds/ColorArea/ColorArea.module.css":["5498b65a3141d8c4"],"components/ctds/ColorArea/ColorArea.tsx":["dcb9691aa259a0b2"],"components/ctds/ColorArea/index.ts":["90863163f5a51417"],"components/ctds/ColorField/ColorField.module.css":["9f859cfa13276560"],"components/ctds/ColorField/ColorField.tsx":["40ad3211ca9dd40c"],"components/ctds/ColorField/index.ts":["42bdd273469f659d"],"components/ctds/ColorSlider/ColorSlider.module.css":["4fd5ee5922939202"],"components/ctds/ColorSlider/ColorSlider.tsx":["3ffe67535a7ea007"],"components/ctds/ColorSlider/index.ts":["b708aa83846a07f3"],"components/ctds/ColorSwatch/ColorSwatch.module.css":["53b590dc163ce452"],"components/ctds/ColorSwatch/ColorSwatch.tsx":["5d64c1ac2034155c"],"components/ctds/ColorSwatch/index.ts":["72e0cfa4c631657e"],"components/ctds/ColorSwatchPicker/ColorSwatchPicker.module.css":["e4427be9efb8f507"],"components/ctds/ColorSwatchPicker/ColorSwatchPicker.tsx":["81d3247817fd2d56"],"components/ctds/ColorSwatchPicker/index.ts":["676a62685dacd692"],"components/ctds/CommandPalette/CommandPalette.module.css":["062e70c26748b6c1","7477cb77cd85d9a4","8138a531c6efb3ef"],"components/ctds/CommandPalette/CommandPalette.tsx":["1ab1ec2fa8592755","41c802a039bb70a9","8dd85f697302bcc6"],"components/ctds/CommandPalette/index.ts":["8832c2b01e8e022c"],"components/ctds/CommandPalette/useCommandPaletteHotkey.ts":["61f7bf087ae491f2"],"components/ctds/ContextMenu/ContextMenu.module.css":["124871fe9cc257d7","60bf14450512034a"],"components/ctds/ContextMenu/ContextMenu.tsx":["6919b3fb8a54f273","8f81d4aa4465fa15","e077499d826fe966","f3bf65b80302dc01"],"components/ctds/ContextMenu/index.ts":["24d8664151e4cdcb"],"components/ctds/DatePicker/Calendar.tsx":["3477d39ea7fbdf28","3e01e9c3d74ee061","d8d8a0368f878aba","f5c503e88fdac8c7"],"components/ctds/DatePicker/DESIGN_NOTES.md":["92f8ba1b56467a46","db077741e98c337a"],"components/ctds/DatePicker/DESIGN_NOTES_TIME.md":["9b758a1442a655a3"],"components/ctds/DatePicker/DateField.tsx":["c9347164bc12b2db","e5578fd8bc37cf8e"],"components/ctds/DatePicker/DatePicker.module.css":["8f671cd60ebf4c9e","97b544ab532db80d","e0e299440d5a666d"],"components/ctds/DatePicker/DatePicker.tsx":["6fc8a6030bcf329d","97107331f339befd","a77fecd8135c3d13","e233b0b2a6e764c7"],"components/ctds/DatePicker/TimeSelector.tsx":["485b57179ed5525f","f57f44457358796b"],"components/ctds/DatePicker/index.ts":["1dc1ba257872f712","6667337e8f8f076e","b0785c97859314a0"],"components/ctds/DatePicker/presets.ts":["047ec85ef047013d","105577858f69ecf9","4cac65a5ed461b38"],"components/ctds/DatePicker/utils.ts":["bbe6dc586bc174e6","ca6dd552f484a3b5"],"components/ctds/Disclosure/Disclosure.module.css":["01ed8acb2a8a8a46","a227df3cf729fa14"],"components/ctds/Disclosure/Disclosure.tsx":["b45040c78ade7893"],"components/ctds/Disclosure/index.ts":["68c717ade93f4a58"],"components/ctds/Drawer/Drawer.module.css":["749cebc91d8f54ad","be1a6244a2481e4b","dc1ed85f3317b4bc","e6ef7b8491994df1"],"components/ctds/Drawer/Drawer.tsx":["3e6bbaead8f7c87b","b9b5130bd35c5bae","ce0a8799510e3f35","d35f2f4df1ea91bd"],"components/ctds/Drawer/index.ts":["1d5a2ff7335d2b51","22edff811f3412f5"],"components/ctds/DropdownMenu/DropdownMenu.module.css":["24c9cfcc1d71f64b"],"components/ctds/DropdownMenu/DropdownMenu.tsx":["24a80fbf8e2322fd","3eade5493e27b8b2","7d9c48b9bee71c57"],"components/ctds/DropdownMenu/index.ts":["7a511ed4f42eb4d0"],"components/ctds/EmptyState/EmptyState.module.css":["b5be960159d679ac"],"components/ctds/EmptyState/EmptyState.tsx":["c369bd5b14aa8e0d"],"components/ctds/EmptyState/index.ts":["da79a40d531f08bf"],"components/ctds/EventCard/EventCard.module.css":["d97e9a226e108ebf"],"components/ctds/EventCard/EventCard.tsx":["5311d039a144543d"],"components/ctds/EventCard/index.ts":["a48fd99f423db40d"],"components/ctds/EventChip/EventChip.module.css":["59d0c4d3eaf9a3df","7eb77a7a9736345a","b01879bee267ac6c"],"components/ctds/EventChip/EventChip.tsx":["0119e564775ef4ed","d3749b1078d993f4"],"components/ctds/EventChip/index.ts":["14c98e96deee578e","95b643b1d730fb3a"],"components/ctds/EventListItem/EventListItem.module.css":["0d0b02584cdae92e","cfa8f61a026aff53"],"components/ctds/EventListItem/EventListItem.tsx":["0d73b1379a4e675f","69450152443db072"],"components/ctds/EventListItem/index.ts":["cf1402cf6ffff92b"],"components/ctds/FileIcon/FileIcon.module.css":["01bbdd4be54b2fb8"],"components/ctds/FileIcon/FileIcon.tsx":["5940eea474669f12"],"components/ctds/FileIcon/fileExtMap.ts":["87dded378017c559"],"components/ctds/FileIcon/index.ts":["1c5e425ad718466b"],"components/ctds/FilterButton/FilterButton.module.css":["02ffa5dc4bd71218","8779feedbba9fc44"],"components/ctds/FilterButton/FilterButton.tsx":["181d0e22add3acd0","e01321a278b488b4"],"components/ctds/FilterButton/index.ts":["8ad8e5611fed9da0"],"components/ctds/GalleryItem/GalleryItem.module.css":["3450030db3de25f6","41c87579f556b3d3"],"components/ctds/GalleryItem/GalleryItem.tsx":["75b95e5ab3ceb4dc","f0365bfe5ef6d912"],"components/ctds/GalleryItem/index.ts":["6cca79b33fee8f31"],"components/ctds/GeneratedImage/GeneratedImage.module.css":["374dcf2bf49c2cac","b485177ba62adc62","f65e17f6cf4009ea"],"components/ctds/GeneratedImage/GeneratedImage.tsx":["11e5ad7f1bf4ccbc","8f76bd16b6a64dc4"],"components/ctds/GeneratedImage/index.ts":["7d8078df92383bc6"],"components/ctds/Hint/Hint.module.css":["c0b870470659653b","f91e3957912919c0"],"components/ctds/Hint/Hint.tsx":["d6df76e14e1f2d59","f650b34c13008b04","fd2ec7a630d71ad5"],"components/ctds/Hint/index.ts":["a436a335499959cf","ba43fe46086405ec"],"components/ctds/Icon/Icon.tsx":["3886097059125356","653f345d3a6dfc32","7ca890e1b0552aca","8b6eecfa27481fbc","c919f0a90e581a9a","ca65248a2d156fb5","d8c88e77462dd54c","e81ea8bf95f72c74"],"components/ctds/Icon/context.tsx":["e510ab3c0029a3c0"],"components/ctds/Icon/index.ts":["a59d5a1672975ad2"],"components/ctds/IconButton/IconButton.module.css":["3c3f861d696ade08","4aa8c39da5111e49","b90fb9a99eee3de2"],"components/ctds/IconButton/IconButton.tsx":["4128d72f130a58fe","8231f25a1b70d9ab","898ce9ad35379ada"],"components/ctds/IconButton/index.ts":["f2ed426e7ebd1f8d"],"components/ctds/IdentityButton/IdentityButton.module.css":["66cea596c8244f1e"],"components/ctds/IdentityButton/IdentityButton.tsx":["3f63f9bd29a56f4b"],"components/ctds/IdentityButton/index.ts":["9c4626ceab8d353d"],"components/ctds/Input/Input.module.css":["5284686e62211004","62d68ecf8d6dc899","871145fddbc5bfdf","b607350a5a0be115","c43f88d006f1d2bb"],"components/ctds/Input/Input.tsx":["3278e8cb1f90b2b6","6ce932bdd200c34e","e137db13d3fa0912"],"components/ctds/Input/index.ts":["cd1e3907db2290c0"],"components/ctds/Kanban/Kanban.module.css":["77a542002e335d44","936b2f632c9912d8"],"components/ctds/Kanban/Kanban.tsx":["6feb30d85926ea31"],"components/ctds/Kanban/index.ts":["abea58f72083a06e"],"components/ctds/ListItem/ListItem.module.css":["2e0fca457a54f509","4c0c33ae48e172c8","e992c21d9b91ba99"],"components/ctds/ListItem/ListItem.tsx":["281c133781b15ad3","2ab044b88e0de4f8","454e0444a61993f5","670bc9a6158ad427"],"components/ctds/ListItem/index.ts":["121e95282f608ca7","d558798eee2ac4bd"],"components/ctds/MenuItem/MenuItem.module.css":["2b79425b8b98e76c","50c3002149dff052","5e558ff42778c8b4","82efb882fdd11b96","d963d767bff6a87b"],"components/ctds/MenuItem/MenuItem.tsx":["00a78f1344d722c7","42277bb21cd843c5","b7d8807e9730fa8b","c134b366e3752c4b","c5a6f42f309410e3"],"components/ctds/MenuItem/index.ts":["144a1eedc5c329a3"],"components/ctds/MessageActions/MessageActions.module.css":["982ec20a9a2d96e6"],"components/ctds/MessageActions/MessageActions.tsx":["5f20b4e6929c09ce","b886e7c1e4d5ec32"],"components/ctds/MessageActions/index.ts":["b2f260f70da3f1ec"],"components/ctds/MessageAttachment/MessageAttachment.module.css":["c014ce7e7dadba83"],"components/ctds/MessageAttachment/MessageAttachment.tsx":["89e4c097e38335e5"],"components/ctds/MessageAttachment/index.ts":["ca487b800f700180"],"components/ctds/MessageQuote/MessageQuote.module.css":["3224e7474686a4e1","3f2fc3f5fefe19b0"],"components/ctds/MessageQuote/MessageQuote.tsx":["c5556f705d74fb78"],"components/ctds/MessageQuote/index.ts":["ec1df216702670f1"],"components/ctds/MessageSources/MessageSources.module.css":["559c0fd6871a7d60","9d68adfa5fbfad79","c0b2c370b717e4ec"],"components/ctds/MessageSources/MessageSources.tsx":["5e37b7ffc11062c3","cfec0361e3952d6e","ef111a099447fd88"],"components/ctds/MessageSources/index.ts":["a9cfa76b183b4204"],"components/ctds/MessageState/MessageState.module.css":["82c9ed16288ae089","c083e816c3ab9d87","fae9154e2eb24843"],"components/ctds/MessageState/MessageState.tsx":["0f7035e7d9be32c5","8455a3fb05f44564","860d074c166313a7"],"components/ctds/MessageState/index.ts":["36a200ef9c6cfecc"],"components/ctds/MessageTable/MessageTable.module.css":["5d15e1c0d77ba0ef","e98e190115adb75d"],"components/ctds/MessageTable/MessageTable.tsx":["9011bfeab4b692ab"],"components/ctds/MessageTable/index.ts":["a12ac98d0c19e740"],"components/ctds/MetricCard/MetricCard.module.css":["2841395e10034dac","3f863dd1a55a91a6","6a7cb52ab99a4a55"],"components/ctds/MetricCard/MetricCard.tsx":["fb2e3614e6863030"],"components/ctds/MetricCard/index.ts":["2747391436a41afe"],"components/ctds/Modal/Modal.module.css":["805302b2f555f590","eb64a11ef23038ab"],"components/ctds/Modal/Modal.tsx":["8378821595383e24","8e956e84838416ed","b09e8478cf08f2be","e919b4e6a3a28e4a"],"components/ctds/Modal/index.ts":["053a39920e61678b","b917696f67aaa4e3","d9cbf2561b9332d0"],"components/ctds/Onboarding/DocsIndex.tsx":["381152d7a5189713","696cd2e7594d71b9"],"components/ctds/Onboarding/LayoutBuilder.tsx":["88773fd7327ba824","bc44383b1afb6b06"],"components/ctds/Onboarding/Onboarding.module.css":["16724b7bfabc40da","412624fd5ec189ee","5423749641f3686d","6f95722d97b95a4a","751f071da00e3994","9a970756bc002a27","9e1f1fec4ce81f68"],"components/ctds/Onboarding/OnboardingAxisPanel.tsx":["402e54b104b4482a","4cf8bbd2fc85d58e","cc522be2a5f43d00","d7faa1173e97af6d"],"components/ctds/Onboarding/OnboardingPage.tsx":["1c01d88c4a1102ec","4a470246b954df59","b488bd690643d23e","b6d0aa0445aa5347","be81be2ebb97a7cc","c016ef1980f2bba4","ed4f8fe07dbdb44d","fb371c1191a1dd36"],"components/ctds/Onboarding/PresetsGallery.tsx":["191e1030897ddc83","bf92996c2e5a78c0"],"components/ctds/Onboarding/actions.ts":["1ed5a528a89529d4","5ea12f10292160c7","70af04fdfb14bd26","b350947db8e64024"],"components/ctds/Onboarding/index.ts":["40b309d55cbf7873"],"components/ctds/Onboarding/palette.css":["6af1833d4dd0fc37"],"components/ctds/Onboarding/wizardData.ts":["05ce69159f904343","26a1d9ad51c535ad","5fd93979578208d8","72ac135d9f75f498","d0ad113928abe383"],"components/ctds/PageHeader/PageHeader.module.css":["d23dbbfbdb448c98"],"components/ctds/PageHeader/PageHeader.tsx":["ac1877739119ffec"],"components/ctds/PageHeader/index.ts":["fb1c6b779c6d3bbe"],"components/ctds/Pagination/Pagination.module.css":["3d2a139db9626fe9","6ce0a7bc67c6b331"],"components/ctds/Pagination/Pagination.tsx":["00052337fea01926","6fd7bd6582d1858a","88382e7bf30e9d56"],"components/ctds/Pagination/index.ts":["26151e64e0b6f16e"],"components/ctds/ProgressBar/ProgressBar.module.css":["02c21ec12fb214e6","4140818e3eeb7a29"],"components/ctds/ProgressBar/ProgressBar.tsx":["6aa1367b1457520a","d697ac5c00348b70"],"components/ctds/ProgressBar/index.ts":["8e5170ad2e05d101","a1692a078d9c3524"],"components/ctds/QuotationBar/QuotationBar.module.css":["47cd6a84effc2fee","517e3f5ff9250880"],"components/ctds/QuotationBar/QuotationBar.tsx":["32fbdfdf2a8ad144","6ff21239e57d5047"],"components/ctds/QuotationBar/index.ts":["b6d73b7279528aa5"],"components/ctds/Radio/Radio.module.css":["062a665822743192","0cb8200249b1eb8c","5da1aba493b8aaef","c975ef9832ad9f0f"],"components/ctds/Radio/Radio.tsx":["18c8548303413399","2e5a12808dc137c2","97f2b7a55ee4dc02"],"components/ctds/Radio/index.ts":["d90badea2862759f"],"components/ctds/RadioCard/RadioCard.module.css":["99fc52e9ca941983","e889a74c94a9a738"],"components/ctds/RadioCard/RadioCard.tsx":["502a403ca3d56051","d94da72ac899f3c6"],"components/ctds/RadioCard/index.ts":["7d940583d85e0173"],"components/ctds/Select/Select.module.css":["634b467f28f49fd6","7efdc99238370204"],"components/ctds/Select/Select.tsx":["6dbe63341ddb06c2","d9614e2d3fb316d0","eb9c4c06696c8688"],"components/ctds/Select/index.ts":["bd5ec8476cf8b5f6"],"components/ctds/SelectableCard/SelectableCard.module.css":["b2611c11ca1d492f"],"components/ctds/SelectableCard/SelectableCard.tsx":["5e8d93947c91ff3e"],"components/ctds/SelectableCard/index.ts":["9724e4cf4742c991"],"components/ctds/Shortcut/Shortcut.module.css":["c0da13a0003182b7","e3a68f1d495ac290","f934657e6d72052a"],"components/ctds/Shortcut/Shortcut.tsx":["8f711a89803e987e","b4b318f7797e21c7"],"components/ctds/Shortcut/index.ts":["679df139433a69f3","d2379f0a414fcc86"],"components/ctds/Sidebar/Sidebar.module.css":["369fc78b686daf3d","3dd4410518dd0b7d","45caa33c7d928128","57a63e1a758f8588","71e99567adab9224","90fb9922d566b5aa","9fcf6249bee6df87","a50b9b7343c54d6a","c6fa409f2c94722c"],"components/ctds/Sidebar/Sidebar.tsx":["01a58b18e0857875","28965cc3dd7dfdc9","79745cefc9933012","84c002f1e237edf1","a05703e7bec9e685","afccff0caab6ece6","bcec01bdf0b0ac47","e0d1ae4b0d6ef1ff"],"components/ctds/Sidebar/index.ts":["eeccfce17db8d27b"],"components/ctds/SidebarSplit/SidebarSplit.module.css":["9cb21a44e99f1c00"],"components/ctds/SidebarSplit/SidebarSplit.tsx":["ddf3f3fce1a0d2fe"],"components/ctds/SidebarSplit/index.ts":["6c18fb5bcde6ef71"],"components/ctds/Slider/Slider.module.css":["052dcd96a7a4f4a8","18e8ac198410327d"],"components/ctds/Slider/Slider.tsx":["bece99a3e178f841","c61acbdfdf58dce7"],"components/ctds/Slider/index.ts":["49cae518a423a8a8","50bf138e4e1802a6"],"components/ctds/Spinner/LottiePlayer.tsx":["19772fc5ac6e3c8b","20c053c6339eccd8","3c16addf2bd86d32","40a6b443a3464ab6","aeab0ae8e84d4ce9"],"components/ctds/Spinner/Spinner.module.css":["1a1060419233a863","2b419abdc45c2939","7c13d6ea403357a4","86e2d2cfaef086b0","97afa86f1b660692"],"components/ctds/Spinner/Spinner.tsx":["1facfd8ed0670a80","6fc27dd30b22f521","8a32de773f7625fb","93f1473878318d62"],"components/ctds/Spinner/index.ts":["bb39966efcb18d06"],"components/ctds/Spinner/lottieColor.ts":["562721f52f1646e1","7b309d8aace9c598","93aa44706a38dc6e","9abfe7197bb599d4","e93c2b1b6542cb41"],"components/ctds/Spinner/lottieManifest.ts":["30eeef576e39c9b4","366509e9e8ea4b68","6fa988f53428295c","d85ac1af9a63b76b"],"components/ctds/SplitButton/SplitButton.module.css":["408f6de5a2a5d8d5","c359c52702cfbd54"],"components/ctds/SplitButton/SplitButton.tsx":["b2077953eb397d1a"],"components/ctds/SplitButton/index.ts":["5573941359a99612"],"components/ctds/Stepper/Stepper.module.css":["00f5d01b93acea04","843694e10d416383","8995e3f84c0a2f66"],"components/ctds/Stepper/Stepper.tsx":["5ef07872fdf35fd4","f3eefc6704073555"],"components/ctds/Stepper/index.ts":["d00c65a6d07bf9e9"],"components/ctds/Switch/Switch.module.css":["59fe72c69070d1c9","7144993f4999fc86","93705111e19fd7ac","ec5de5566e19a659"],"components/ctds/Switch/Switch.tsx":["7d57eeb17e575516","bcc2811c2e28ad71","f2478652059033c8"],"components/ctds/Switch/index.ts":["2e10a49300f9497c"],"components/ctds/TabStrip/TabStrip.module.css":["d62e558154876ea9","ee989e0e9994e931"],"components/ctds/TabStrip/TabStrip.tsx":["89c84e2b165fea97","c1b206ad7e25231c"],"components/ctds/TabStrip/index.ts":["c087f9bc2106d8d2"],"components/ctds/TableCell/TableCell.module.css":["9d2599c43dccd853"],"components/ctds/TableCell/TableCellAvatar.tsx":["0ae4d932b4829223","2da24d29a9768c4d","fee972fbced26af9"],"components/ctds/TableCell/TableCellBadge.tsx":["3855c736b94e842f"],"components/ctds/TableCell/TableCellIcon.tsx":["c5dcbc1580dcf45e"],"components/ctds/TableCell/TableCellImage.tsx":["67b0a796944a579f"],"components/ctds/TableCell/TableCellLink.tsx":["ce6005372827d8fe"],"components/ctds/TableCell/TableCellMeter.tsx":["546ee6eede729473"],"components/ctds/TableCell/TableCellNumber.tsx":["2f3b7f5d6becba87"],"components/ctds/TableCell/TableCellText.tsx":["9df507af2bb4a531"],"components/ctds/TableCell/index.ts":["b12de3fcd9562f28"],"components/ctds/TableHeader/TableHeader.module.css":["08aa542fc317f0b8","2b5264cad1ed7981","2e6c54d660c1a780","4ca0aaa2888e6911","5a0ef8028f942e96","762447474b76bc37","799ee59573498844"],"components/ctds/TableHeader/TableHeader.tsx":["0f6eadde2a1ddd54","5baae1b26882d36f","b4a59def36db1751","edfd9ff252826009"],"components/ctds/TableHeader/index.ts":["8c585f6aed5c8505"],"components/ctds/TableRow/TableRow.module.css":["26c9d24f7044383c","4765ae2a3a416f2a","8e1162a8f323b5bd","9865f98c3c598239","ff34f5ba9760d2fa"],"components/ctds/TableRow/TableRow.tsx":["07cfc23644dcd61b","3aecb0c9c1775e1d","794320f6286f8a75","f82f16b8cf031c1d"],"components/ctds/TableRow/index.ts":["ab70d7f4c6c3bca4"],"components/ctds/TableRowEdit/TableRowEdit.module.css":["3a24cd707e72a5b3","8c2ebae5a4b6fcea","a2b1525e66799cc0","d254ea1b684d243e","e797da17f0a63c7a"],"components/ctds/TableRowEdit/TableRowEdit.tsx":["0a0af28c4cb93486","126df71f50cfc252","2642c0ace8267699","ebcc2d854a1a6c54"],"components/ctds/TableRowEdit/index.ts":["b61b9cb560717bfd"],"components/ctds/TableRowSelect/TableRowSelect.module.css":["952a08c46a6f7a3e","d5377beb5bea38e6"],"components/ctds/TableRowSelect/TableRowSelect.tsx":["0bb1f1a96ac92059","16f5f6a5f4ab1c12"],"components/ctds/TableRowSelect/index.ts":["77423afd2c6bf530"],"components/ctds/Tabs/Tabs.module.css":["2681a64d762afcf7","99b868fe12b172c3","b1ca0eeaad6d2c58","ca7f9b5f20d06b44"],"components/ctds/Tabs/Tabs.tsx":["8b3304e5b49faead","c81bd9c33f900440"],"components/ctds/Tabs/index.ts":["cc62cef930e639a8"],"components/ctds/TemplateBoundary/TemplateBoundary.module.css":["a445f882649458fa"],"components/ctds/TemplateBoundary/TemplateBoundary.tsx":["86bcf353c731de99"],"components/ctds/TemplateBoundary/index.ts":["6f486c1753854507"],"components/ctds/TemplateBoundary/types.ts":["80be624577112c67"],"components/ctds/Textarea/Textarea.module.css":["b6413c5c2968fe1c","d5eac23fbae3a3bc","d6669963e4e878df"],"components/ctds/Textarea/Textarea.tsx":["033f0fdb3c0fdda4","b9ecf1d5e80bd5a1"],"components/ctds/Textarea/index.ts":["bf7cfe44f6989f9f"],"components/ctds/ThemeController.tsx":["00fee668474c8adf","1b2a9bc935e73d3f","2646a02e6275c972","f0798edcbcea4e87"],"components/ctds/TimePicker/TimePicker.module.css":["1bda0d29ea0392dc","ffaf0978d188c582"],"components/ctds/TimePicker/TimePicker.tsx":["0e8487ea039fa164","2239f9de4c77c6f9","93d22ff74a4b4396"],"components/ctds/TimePicker/index.ts":["ec711e53751e85ec"],"components/ctds/TimePicker/utils.ts":["ab2a7dff11b6a811"],"components/ctds/Toast/Toast.module.css":["297e97b96584697f","95fc4fc02522c809"],"components/ctds/Toast/Toast.tsx":["3f60ca57a6cf18b0","6e37d8a147e988f2","aaa4c54da1605b3a","dd9d133d8d6efee5"],"components/ctds/Toast/index.ts":["16567f6aa0c316e4","720bac643ab56fb1"],"components/ctds/Toolbar/Toolbar.module.css":["0a6c0fad0113ade0","48e33a206252d3d8","d1c4f8bbe6afd7d2"],"components/ctds/Toolbar/Toolbar.tsx":["20896f56c19c024e","63d25aaadb9ea4ca","6bdd33574e44ac0a"],"components/ctds/Toolbar/index.ts":["0b09cac64a38652c","5020a8ba04904682","9f5eb7a8680b1542"],"components/ctds/Tooltip/Tooltip.module.css":["dbcd172cac1b376a"],"components/ctds/Tooltip/Tooltip.tsx":["c95f4a5984739759"],"components/ctds/Tooltip/index.ts":["aaa273919afd6940"],"components/ctds/TopLoader/TopLoader.module.css":["02c21ec12fb214e6"],"components/ctds/TopLoader/TopLoader.tsx":["092de0bdc07039f6","61cc3b5aa2af5daa"],"components/ctds/TopLoader/index.ts":["f551b1b46f2242b7"],"components/ctds/Topbar/Topbar.module.css":["5978d0f8a39ee051","9ad5c41e962fefc5"],"components/ctds/Topbar/Topbar.tsx":["3985357c3dd80bd5","53e9d1965f74c13f"],"components/ctds/Topbar/index.ts":["013024539256f978"],"components/ctds/UserMessage/UserMessage.module.css":["2ec0aabeb5153aee","cbfff5f93a35a2e4"],"components/ctds/UserMessage/UserMessage.tsx":["33743d601a5f56b5","44254480a138c048"],"components/ctds/UserMessage/index.ts":["c43a21a48f905adc"],"components/ctds/_cn.ts":["4d06c1a5b8ee66ed"],"components/ctds/_color.ts":["b298d667dbb7cdbe","e4705241fb7d4237"],"components/ctds/_data.ts":["07150cf704aec823","0fc99efce9a714a5","1d87845f4d892311","2bea1fbed7ef818d","3a1c6e806ab5bab0","44e7ffb8b1828444","550b76f8c0c3176c","588f31ea3980202c","5a17c4362f311bf4","643a2e0ce58a21da","8929df19ababf722","8a5168fda27fc3e8","973581b6b2eb41ba","a59e498027f8215a","a8c3f93264b96a7f","af222a90d68c547c","c4d3b59dce707ae4","e2ac444e5305fd25"],"components/ctds/_utils.css":["85b3c2d676b42c20","ba89490eee2d0207","e9c3835b60cc8bbb"],"components/ctds/app-shell.css":["92cde8e81b90b53b"],"components/ctds/axisOptions.ts":["3f9ad3d33613c202","80ea881771900f00","8e13a0f545c5fac5"],"components/ctds/component-registry.json":["61b1cfcd7ccc548b"],"components/ctds/index.ts":["4a3d5ab3122a12c6","6f58648f89cae626","714a924e907ecd27","76d0ec297234dae2","776ff084d127278f","ad16c9d690139754","b26a9f08f4c082eb","f0442b1376ba0476"],"components/ctds/reset.css":["6482122917565424","a122c7698e71a265","bcb259b8fdd52331","ce4eb135da034052"],"components/ctds/themeBootScript.ts":["07454c743efdff4c","093b29cee1e94e8d","b4df5ea6036e49e8"],"components/ctds/tokens.css":["0627c04091fe3916","13a95d2b40e6483d","1d7ed34ee6afc814","1f0518a6a7224b47","4d145618b2691e83","52cae827f6a46040","53702889baeb3413","5ed69027d2fe02f8","64209c6028949365","7b478f62824a1ca3","7fbe5dbf1e3f0bfd","c2b5c082ed3c3d19","d39f117d46a47915","d50c6157c9dd6ce6"],"prompts/ASSEMBLY.md":["2891ed1e36d360f7","2b5ed8158b2c0192","2db0800bc767efd9","c5eeff1217b1fd1a","d93a44a657583d04"],"prompts/CASCADE.md":["83ea9ed6b673730f","d5b27c3e952855ef"],"prompts/CATALOG.md":["044ec9dbdc678b9a","539389a5c7762532","96ca2576856ac0a5","b1c35c1232d0b2b3"],"prompts/GUIDE.md":["6ac215a0d7e0e3c2","90e6a8c7997e6156","944ed2f2b39f0dc2","edce9c9f7dcedadf"],"prompts/MEMORY.md":["f67527fb5d37c0df"],"prompts/OVERRIDE.md":["8aadd4e290d61a47"],"prompts/PRINCIPLES.md":["27e4f9d37e3b6065","3fed19fd2eaaf440","45b32f640e6f1c1b","682790c1c8b67c94","6b04000b12e09cd3","f548847f682e3d92"],"prompts/SLOTS.md":["e762efefac124f0c"],"prompts/axes/cascade.md":["83ea9ed6b673730f"],"prompts/axes/density.md":["26a7437ad03f065b"],"prompts/axes/font.md":["69534d630b599045"],"prompts/axes/hue.md":["30ffef1aa2cdc28a","357637e02b00d7e1"],"prompts/axes/icon.md":["6cde3c780864d633","cbf2d97ec356b101","f8de5f4b0618e99c"],"prompts/axes/mode.md":["86af97199961ff1c","c371c805ebe9f53c"],"prompts/axes/motion.md":["792dc831eea1d754"],"prompts/axes/palette.md":["2cbe53e4707fdae6","3ec7c7e1ca142885","a9dcfb3a70c845ad","bcd5878982d0e981"],"prompts/axes/shape.md":["5dfed579ab1fab36"],"prompts/axes/voice.md":["6e5837006e43ccb2","ae1fe55138097af7","ec885803528edbb0"],"prompts/brand-sets/_SCHEMA.md":["07a5c658f141740b"],"prompts/components/README.md":["b84af5422a723a60"],"prompts/components/_variants.md":["1d75aa5ff6eb5201","7a21f8867a58db9c","8c61f8140bd839c3"],"prompts/components/accordion.md":["2909392b22ca915e","2fa69a14cfa6cb66"],"prompts/components/ai-message.md":["0866d8d9906eeb8c","16da34b2d6d54481","32e3405a108470d1","4378889b16ff580e","bf8ece7aa3593fc2"],"prompts/components/app-frame.md":["c43a98796dff0522","f4792ec636ad1b5e"],"prompts/components/attachment-chip.md":["2ecee07c241fa245","de0e77caf6b0dff4"],"prompts/components/attachment-item.md":["6fcbaa83cbbe0de6","a22cfbd2249e2a19"],"prompts/components/attachment-thumb.md":["bd59a63cddbb6eca","dda56508b173a8df"],"prompts/components/avatar-upload.md":["051cfb4743de6243","86c5829629e9f79c","d899460bd96c5f9a"],"prompts/components/avatar.md":["4bd067f6bc8e0ca9","670337e0ac700ec2","c96b524344c9942f"],"prompts/components/badge.md":["0c82ea499c3db1f4","3217cc6525c818dc","a9c5edffde10ca89"],"prompts/components/breadcrumb.md":["2fb81092f5102932","3060e7ee0dc45c5c"],"prompts/components/bubble.md":["18bf73a84b9b1f98","5c39fd5ac436c7c0","d67bca6c3aebf942"],"prompts/components/button-group.md":["36dbc973ef2ed862"],"prompts/components/button.md":["17003647f84a2d78","1ae11fbf4ccf3203","4c72e3f9ac295b17"],"prompts/components/calendar.md":["e6053aa36d61ac06","fdb9f85872aed81c"],"prompts/components/callout.md":["2f578500b2b49843","4146ec4f5a78601f","4ac9b82764f58e04","b64daa750ddf3d92","f0274bb0456bbcc0"],"prompts/components/card.md":["3ab17b7a9d50b8e4"],"prompts/components/chart.md":["804ce5860bab3eb7"],"prompts/components/chat-input.md":["4ce86fdc9d315b29","645cf7cd45a306d4","93ea2bb84776862f","965bf26063834ee5","b2e8f6a04b37d69b","ea396957cb367b57"],"prompts/components/checkbox-card.md":["b2f9695c143b92b6"],"prompts/components/checkbox.md":["7ab23a9bb21ffe46","8f98087948d1b94d","c287f547b4fef2bd"],"prompts/components/chip.md":["3cf12880bf1991d1","baf09fd4af6a9913","fc7aaba9c8d125fb"],"prompts/components/choice-card.md":["83b80b320c46796d"],"prompts/components/code-block.md":["33b082f5a9c83b62","3b7aa9de1806bde2","9cd2d09eb5522e82","efbffefba4118c07","f382f4a838fdc439"],"prompts/components/code.md":["33ef4e97a967f083","ad947e4c21913401"],"prompts/components/color-area.md":["27c693ebf15b5d35","bc2c659512df07ce"],"prompts/components/color-field.md":["2f9153ce63a6d7f2"],"prompts/components/color-slider.md":["64a73980cf2a8c87"],"prompts/components/color-swatch-picker.md":["6a6c9b2786228908"],"prompts/components/color-swatch.md":["62e5917796f5ce23"],"prompts/components/command-palette.md":["78d8e939ee038f96","cffc6620916174e3"],"prompts/components/context-menu.md":["6b7b45419d5456e6"],"prompts/components/date-picker.md":["41ee195fa2c78bf8","98c0c9c36ad89587"],"prompts/components/disclosure.md":["6c28bc9545e70890","9109348d4873bd65"],"prompts/components/drawer.md":["12ab16c92421098b","bef7277bc3546627","e3c5098cec7d2277"],"prompts/components/dropdown-menu.md":["5016fd418767862b","cbb99e0c583968e0"],"prompts/components/empty-state.md":["3bc54e585f820e7d"],"prompts/components/event-card.md":["e829426b9bfee9a9"],"prompts/components/event-chip.md":["c8b2b1e96976e4a2","e0d7cb3aaeb63494"],"prompts/components/event-list-item.md":["1a5ca4c980a61e62"],"prompts/components/file-icon.md":["36237a8a68a07400","dfda027b72b5da5a"],"prompts/components/filter-button.md":["24bbc6cd131282ff","9a68b328ad32ca17"],"prompts/components/form-field.md":["54a94721de4a3c36"],"prompts/components/gallery-item.md":["644b2457af9c5398","74ea2caaa1ee0c8f"],"prompts/components/generated-image.md":["4a5dcd80b1ec8066","fa12c2e38736f261"],"prompts/components/hint.md":["5e9d1c775ad39429","e4181d6414036b16"],"prompts/components/icon-button.md":["3adc0973047e0f2a","43d0bcaea92b4638","78f0be8ab3640aea"],"prompts/components/icon.md":["9d000d62ad756c00"],"prompts/components/identity-button.md":["24e018e63adb4832"],"prompts/components/input.md":["3acd84f0b8332b57","e0d60b8c29483264","e8ba836972a57366","f201ecfcb85209ff"],"prompts/components/kanban.md":["653e31d30a18d00e"],"prompts/components/list-item.md":["0549e1f8d61f6b67","10792c646a58a8d5","353d0f27de80d84f","8180686f914731ee","b0ddb25369abf9f0"],"prompts/components/menu-item.md":["0799d4bab50a56f8","4cc5c9f130530bba","886ba4b4343cc257","8d881b2b8860f7ec"],"prompts/components/message-actions.md":["c900df158181e442"],"prompts/components/message-attachment.md":["d7d94cbfbb29a357"],"prompts/components/message-quote.md":["32432a2d272ffacb","6cf7e3d1860dee68","de6b5710c66d96c2"],"prompts/components/message-sources.md":["25f478eccecd8946","407c53c7ccf74737","70cbd7085cef6914","9e2aa6882bf54e73","bb041485ae5a3dac"],"prompts/components/message-state.md":["06dc83525379e273","fd40cb35fab4a05a"],"prompts/components/message-table.md":["023a3ba5a18fea7d","29f3ee627518273f","3f93752fc04577ee"],"prompts/components/metric-card.md":["a0cf1d83107ed1d5","d0e093abecda8e53"],"prompts/components/modal.md":["1d4af65e7bf0f305","2f5307b1a8f46f10","d05258a9c10048f4"],"prompts/components/onboarding.md":["7b28cd589af5fff1","9a32f9825cc3f893","d60ef575c98e1e59"],"prompts/components/page-header.md":["a1eac65366e9fb89"],"prompts/components/pagination.md":["0412e0f8df1b0b8a","2bcd849e65088900"],"prompts/components/progress-bar.md":["13c78a1aecee4b06","84fcfe25da673951"],"prompts/components/quotation-bar.md":["601063f0c633b0a2","ed8056ce0b5171f4"],"prompts/components/radio-card.md":["2c88af55894c044a","fc7dee30afd47c3a"],"prompts/components/radio.md":["0ac3453233175bc7","442cffec5e41a24d","e1826cbaaf99dd7e"],"prompts/components/select.md":["4f9d574a117eeba7","5e249c33c2e7c0c9","901398fa3f1e808d","9812031920bf1ff6"],"prompts/components/selectable-card.md":["bc70ea25345a1961"],"prompts/components/shortcut.md":["9384ac247f000f1f","95664824b7c55587"],"prompts/components/sidebar-split.md":["962d4a6a03ad8583"],"prompts/components/sidebar.md":["2745491e1d08a5d3","2c3fb46f58d44586","4ac5146356c8ad97","7aab24c58f6798eb","8741a9763d87c264","9046e43435d02c92","acedeec17c3c4b40","b07b0affdaeb4f80","b5510fba1c61fbee"],"prompts/components/slider.md":["88f73d78c0709fb5","a7c1523e081dcf4b","df18f56222deb17a"],"prompts/components/spinner.md":["5fb3b7c510ce9cb9","6977c604b5667ea1","9a199b308418fa18","b1600300e94fc7ff"],"prompts/components/split-button.md":["237ccfe9f3e978cc"],"prompts/components/stepper.md":["3d3efdbd5b8e3bd2","4957491578d0fe10"],"prompts/components/switch.md":["0afb4b3c4a3ab1b8","9a6c586ff15af360","b523ebfe1fa1b364"],"prompts/components/tab-strip.md":["1e9b30aee1d51bc2","2d39a924eaf6c865","6079bd298847ce6e"],"prompts/components/table-cell.md":["6e08ae55a04ad89f"],"prompts/components/table-header.md":["057f75576f90982e","2200a443e2e003d2"],"prompts/components/table-row-edit.md":["63e0f41b31c9aa61","ba5777d008f30085"],"prompts/components/table-row-select.md":["719588ae4afcef30"],"prompts/components/table-row.md":["36a8b1dff544184e","452d31531fad434f"],"prompts/components/tabs.md":["05ee296a7aaf8e29","32b421df39761687","491b59234eb8a8fd","8cf108e2eeecf5fd"],"prompts/components/textarea.md":["1e82c746f2a1b6e1","2d116bb48b4ceb94","58eee323a94f8d2b"],"prompts/components/time-picker.md":["7ea1175625b017ed","d9e680f21a5127c1"],"prompts/components/toast.md":["4797388ad63e6455","c4e726339d542278","d70df31fd28c4aa7"],"prompts/components/toolbar.md":["033bb3e419491fac","326c07aced33d6db","7fb30b94bc50264c","cb5e0c5ba55628b7"],"prompts/components/tooltip.md":["e5c533abd62ac318"],"prompts/components/top-loader.md":["441aaa944ea7e707","d3b8f536d96946d4"],"prompts/components/topbar.md":["400a7d1c45311336","a1d63b8155375dda","d8b19d0d103a7d23","e88694066f58a8ad"],"prompts/components/user-message.md":["71015388dc20b389","caca0255e145751b","d88d9fb6286ae8b7"],"prompts/primitives/emerge.md":["6f9166f3187ec073"],"prompts/primitives/fade.md":["c7f24c14863243ba"],"prompts/primitives/mobile.md":["73f4242d8eea186e"],"prompts/primitives/scale.md":["58a0804bf31cc77f"],"prompts/primitives/scroll.md":["286c3ea4ee60e8a5","2f67add4b6742ea9","4a1bf69eff6b473d","8d96c1ba6a597de4"],"prompts/primitives/slide.md":["6eb83d45797e1d5f"],"prompts/recipes/README.md":["fdcc628e2b20b5f7"],"prompts/recipes/card-row.md":["addce986189248b4"],"prompts/recipes/form-footer.md":["40cd6b098387845a"],"prompts/recipes/meta-line.md":["06889350bb422035"],"prompts/recipes/page-banner.md":["b161fac3e6db0e90"],"prompts/recipes/page-header.md":["9eca3295b5b51b76","aaaeb25e028192c5"],"prompts/recipes/section-header.md":["dc9caa5392a7d67b"],"prompts/themes/_SCHEMA.md":["16138612a090a38c","46c546f3ca555940"],"prompts/themes/_TEMPLATE.md":["b795840b26ba8e6e","b8bcacef21c8d8f3"],"prompts/themes/expressive.md":["1767232ba2cada49","6c8eedc615a41991"],"prompts/themes/focus.md":["ed15bcaa0cf1b5e5"],"prompts/themes/pure.md":["a11ece8bb584696a","a3a3bcdd97442bf0"],"prompts/themes/spare.md":["bae07016b919ac87","ee678ed726bee7e1"],"prompts/tokens/breakpoint.md":["6e59f853c0627bed"],"prompts/tokens/color.md":["090ad386c2abef27","150c921d56352941","2cbee404d96a5359"],"prompts/tokens/radius.md":["a76a5cae8fc357fc"],"prompts/tokens/shadow.md":["da8f55913433d3a8"],"prompts/tokens/spacing.md":["0690d37cb04296da","553dc2c9c8e154a1"],"prompts/tokens/typography.md":["68438a16b27d1d89"],"prompts/tokens/z-index.md":["9a2f7679b834e3e5"],"public/onboarding/expressive.png":["4c6c61a65446e2c0"],"public/onboarding/pure.png":["aaf4c20c99ecc8b9"],"public/onboarding/spare.png":["5e9bd19254651f64"]}}
|
package/src/utils/assets.js
CHANGED
|
@@ -25,6 +25,11 @@ export const BUNDLED_SKILLS = [
|
|
|
25
25
|
"ovenn-validate",
|
|
26
26
|
];
|
|
27
27
|
|
|
28
|
+
// Maintainer documents: how Ovenn's own docs are written, promoted and evaluated. Consumer agents
|
|
29
|
+
// skimming prompts/ would otherwise read them as rules, so the bundle leaves them out and
|
|
30
|
+
// ovenn update removes them from existing installs.
|
|
31
|
+
export const MAINTAINER_PROMPTS = ["MEMORY.md", "GUIDE.md", "FEEDBACK_PROCESS.md", "TEMPLATE_PREVIEWS.md", "components/README.md"];
|
|
32
|
+
|
|
28
33
|
export function getAssetSources() {
|
|
29
34
|
const cliRoot = join(__dirname, "..", "..");
|
|
30
35
|
const bundledAssets = join(cliRoot, "assets");
|
|
@@ -10,8 +10,14 @@ const digest=value=>createHash('sha256').update(value).digest('hex');
|
|
|
10
10
|
export function componentExports(source){return [...new Set([...source.matchAll(/export\s*\{([^}]+)\}/g)].flatMap(match=>match[1].split(',').map(value=>value.trim()).filter(value=>value&&!value.startsWith('type ')).map(value=>value.split(/\s+as\s+/).at(-1))))];}
|
|
11
11
|
function exportFolder(registry,name,files={},base='components/') {return registry.find(entry=>entry.status!=='wip'&&(entry.folder===name||(entry.exports||componentExports(files[base+entry.folder+'/index.ts']||'')).includes(name)))?.folder;}
|
|
12
12
|
export function componentContract(text){const match=text.match(/<!-- component-contract -->\s*```json\s*([\s\S]*?)```/);return match?JSON.parse(match[1]):null;}
|
|
13
|
+
// The checks parse with TypeScript's JS compiler API. TypeScript 7's `typescript` package no longer exposes it,
|
|
14
|
+
// so a TS 7 project resolves it from @typescript/typescript6, the compatibility package Microsoft publishes for tools.
|
|
13
15
|
export function loadTypeScript(root=process.cwd()){
|
|
14
|
-
|
|
16
|
+
let native=null;
|
|
17
|
+
for(const base of [root,path.join(root,'web')])for(const name of ['typescript','@typescript/typescript6']){
|
|
18
|
+
try{const ts=createRequire(path.join(base,'package.json'))(name);if(typeof ts.createSourceFile==='function'&&typeof ts.preProcessFile==='function')return ts;native??=ts.version;}catch{}
|
|
19
|
+
}
|
|
20
|
+
if(native)throw new Error(`TypeScript ${native} has no JS compiler API, which this check needs. Install the compatibility package next to it: npm install -D @typescript/typescript6. No packages were installed automatically.`);
|
|
15
21
|
throw new Error('TypeScript parser is unavailable. Use a project with TypeScript installed; no packages were installed automatically.');
|
|
16
22
|
}
|
|
17
23
|
export function planSchema(){return {type:'object',additionalProperties:false,required:['version','scope','direction','roles'],properties:{version:{type:'string',enum:['2']},scope:{type:'string',enum:['page','partial','component']},direction:{type:'string',minLength:1},roles:{type:'array',minItems:1,items:{type:'object',additionalProperties:false,required:['id','purpose','component','components','strategy','source','originalHash','reason','requires','sourceFiles','evidence'],properties:{id:{type:'string'},purpose:{type:'string'},component:{type:'string'},components:{type:'array',items:{type:'string'}},strategy:{type:'string',enum:['reuse','compose','derived','custom','preserved']},source:{type:'string'},originalHash:{type:'string'},reason:{type:'string'},requires:{type:'array',items:{type:'string'}},sourceFiles:{type:'array',items:{type:'string'}},evidence:{type:'array',items:{type:'string'}}}}}}};}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {phaseSources} from "./rules-context.js";
|
|
1
2
|
import {planSchema} from './component-usage.js';
|
|
2
3
|
const nonempty = value => typeof value === 'string' && Boolean(value.trim());
|
|
3
4
|
const array = value => Array.isArray(value) ? value : [];
|
|
@@ -148,8 +149,11 @@ export function assessWorkflow(record, policy) {
|
|
|
148
149
|
if(collaborative(policy) && assessment.status==='reviewed' && latest.status!=='reviewed')return {status:'review_pending',missing:['specialist-status-mismatch']};
|
|
149
150
|
return assessment;
|
|
150
151
|
}
|
|
151
|
-
|
|
152
|
+
// phase (plan|build|review) returns only the sections and schemas that phase uses; omitted keeps the full contract.
|
|
153
|
+
/** @param {string} assembly @param {string} review @param {{scope?: string, role?: string, phase?: 'plan'|'build'|'review'}} [options] */
|
|
154
|
+
export function workflowContext(assembly,review,{scope='page',role='generator',phase}={}) {
|
|
152
155
|
const policy=workflowPolicy(assembly);
|
|
153
156
|
if(!policy.scopes.includes(scope)||!['generator','reviewer'].includes(role))throw new Error('Invalid workflow scope or role');
|
|
154
|
-
|
|
157
|
+
const planning=!phase||phase!=='review',reviewing=!phase||phase==='review';
|
|
158
|
+
return {scope,role,...(phase?{phase,sections:'Only this phase. Call again with phase=plan|build|review for the next one, or without phase for the full documents.'}:{}),policy,...(planning?{componentPlanSchema:planSchema()}:{}),sources:phaseSources(assembly,review,phase),...(reviewing?{reviewSchema:reviewSchema(policy),reviewContentSchema:reviewContentSchema(policy),...(policy.orchestrationVersion===2?{uxReviewContentSchema:uxReviewContentSchema(policy)}:{})}:{}),responsibility:role==='reviewer'?'생성 대화와 분리된 문맥에서 실제 캡처와 상태 증거를 검토한다. 소스를 수정하지 않는다. 관측 못한 항목은 not_observed로 기록한다. 실행기가 실제 제공한 소스·캡처 hash와 세션을 검수 내용에 연결하며 모델의 hash 복사를 관측 증거로 삼지 않는다.':'원본 절차를 실행하고 실제 도구/파일 증거를 기록한다. 독립 검수자를 실행할 수 없으면 review_pending. 자체 평가를 독립 검수로 표시하지 않는다.'};
|
|
155
159
|
}
|
package/src/utils/doctor.js
CHANGED
|
@@ -6,6 +6,8 @@ import { detectProject } from "./detect.js";
|
|
|
6
6
|
import { loadMeta } from "./meta.js";
|
|
7
7
|
import { pendingUpdates } from "./update-transaction.js";
|
|
8
8
|
import { safePath, hashAt, baselineFromMeta } from "./managed-assets.js";
|
|
9
|
+
import { detectLegacy } from "./legacy-ctds.js";
|
|
10
|
+
import { loadTypeScript } from "./component-usage.js";
|
|
9
11
|
|
|
10
12
|
export function diagnose(root) {
|
|
11
13
|
const diagnostics = [];
|
|
@@ -23,7 +25,9 @@ export function diagnose(root) {
|
|
|
23
25
|
}
|
|
24
26
|
const componentPath=project.useSrcDir ? "src/components/ovenn" : "components/ovenn";
|
|
25
27
|
const meta=loadMeta(join(root,componentPath));
|
|
26
|
-
|
|
28
|
+
const legacy=project.ok ? detectLegacy(root,project) : null;
|
|
29
|
+
if(legacy) add("legacy-ctds","error",`A CTDS ${legacy.version} install is still present (${legacy.componentPath}).`,"ovenn update --dry, then ovenn update (migrates CTDS files, imports and config to Ovenn)",`${legacy.componentPath}/.ctds-meta.json`);
|
|
30
|
+
if (!meta?.files || typeof meta.files !== "object") { if (!legacy) add("metadata-missing","error","Installation metadata is missing or invalid.","Back up local files; run ovenn init --no-open, then review conflicts with ovenn update --dry.",`${componentPath}/.ovenn-meta.json`); }
|
|
27
31
|
else {
|
|
28
32
|
if(meta.version !== cli.version) add("version-mismatch","warning",`Installed ${meta.version}, CLI ${cli.version}.`,"ovenn update --dry",`${componentPath}/.ovenn-meta.json`);
|
|
29
33
|
for(const [path,hash] of Object.entries(baselineFromMeta(meta,componentPath))) {
|
|
@@ -31,6 +35,8 @@ export function diagnose(root) {
|
|
|
31
35
|
catch(error) { add("unsafe-metadata","error",error.message,"Repair the metadata path before updating.",path); }
|
|
32
36
|
}
|
|
33
37
|
}
|
|
38
|
+
// The local usage check parses with TypeScript's JS API, which TypeScript 7's own package no longer ships.
|
|
39
|
+
if(declared.typescript){ try { loadTypeScript(root); } catch(error) { add("typescript-api","warning",error.message,"npm install -D @typescript/typescript6","package.json"); } }
|
|
34
40
|
const configPath=join(root,"ovenn.config.json");
|
|
35
41
|
if(!existsSync(configPath)) add("config-missing","warning","No ovenn.config.json. Core defaults will be used.","Complete /ovenn onboarding or add a reviewed config.","ovenn.config.json");
|
|
36
42
|
else try {
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration of projects installed by the legacy `@conscience-technology/ctds` CLI (0.1.0–0.6.3).
|
|
3
|
+
*
|
|
4
|
+
* CTDS installed components/ctds, prompts/, public/onboarding/, .claude/skills/ctds*, app/ctds and a
|
|
5
|
+
* ctds marker block in AGENTS.md, and patched layout/globals to import from components/ctds. Its metadata
|
|
6
|
+
* only hashed components, so prompts and skills would otherwise look like local edits forever.
|
|
7
|
+
* src/data/ctds-releases.json lists every file each published release installed: a file whose hash
|
|
8
|
+
* matches it is untouched upstream content that may be replaced or removed. Anything else is a local edit.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
12
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
import { safePath, hashAt } from "./managed-assets.js";
|
|
15
|
+
import { renderOvennRoute } from "./route.js";
|
|
16
|
+
|
|
17
|
+
export const LEGACY_ROOTS = ["components/ctds", "prompts", "public/onboarding", ".claude/skills", "app/ctds"];
|
|
18
|
+
export const shortDigest = (content) => createHash("sha256").update(content).digest("hex").slice(0, 16);
|
|
19
|
+
|
|
20
|
+
const LEGACY_AGENTS = /<!-- ctds:start -->[\s\S]*?<!-- ctds:end -->\n*/;
|
|
21
|
+
// Quoted module specifiers ("@/components/ctds/Button", '../components/ctds/tokens.css').
|
|
22
|
+
const SPECIFIER = /(["'`])([^"'`\s]*?components\/)ctds((?:\/[^"'`\s]*)?)\1/g;
|
|
23
|
+
const SOURCE_EXT = /\.(?:[cm]?[jt]sx?|css|scss|sass|less|mdx)$/;
|
|
24
|
+
const SKIP_DIRS = new Set(["node_modules", ".git", ".next", ".ovenn", ".claude", ".cursor", ".turbo", ".vercel", "out", "dist", "build", "coverage", "prompts", "public"]);
|
|
25
|
+
|
|
26
|
+
let releases;
|
|
27
|
+
function knownHashes(key) {
|
|
28
|
+
releases ??= JSON.parse(readFileSync(new URL("../data/ctds-releases.json", import.meta.url), "utf8")).files;
|
|
29
|
+
return releases[key];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** The CTDS install in this project, or null. */
|
|
33
|
+
export function detectLegacy(root, project) {
|
|
34
|
+
const componentPath = project.useSrcDir ? "src/components/ctds" : "components/ctds";
|
|
35
|
+
const metaPath = join(root, componentPath, ".ctds-meta.json");
|
|
36
|
+
if (!existsSync(metaPath)) return null;
|
|
37
|
+
let meta = {};
|
|
38
|
+
try { meta = JSON.parse(readFileSync(metaPath, "utf8")); } catch { /* A broken meta still marks a CTDS install; files then count as local edits. */ }
|
|
39
|
+
return { componentPath, appRoute: `${project.appDir}/ctds`, meta, version: typeof meta.version === "string" ? meta.version : "unknown" };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Removes the CTDS block that `ctds init` wrote into AGENTS.md. */
|
|
43
|
+
export const stripLegacyAgentsBlock = (text) => text.replace(LEGACY_AGENTS, "");
|
|
44
|
+
|
|
45
|
+
/** True when `path` holds exactly what a CTDS release installed there. */
|
|
46
|
+
function isPristine(root, legacy, path) {
|
|
47
|
+
const file = safePath(root, path);
|
|
48
|
+
if (!existsSync(file)) return false;
|
|
49
|
+
const content = readFileSync(file);
|
|
50
|
+
if (path.startsWith(`${legacy.componentPath}/`)) {
|
|
51
|
+
const recorded = legacy.meta.files?.[path.slice(legacy.componentPath.length + 1)];
|
|
52
|
+
if (recorded && recorded.replace(/^sha256:/, "") === createHash("sha256").update(content).digest("hex")) return true;
|
|
53
|
+
}
|
|
54
|
+
// The manifest is recorded from a root app/ layout; src/ layouts install the same files one level down.
|
|
55
|
+
const key = path.replace(/^src\/(components|app)\//, "$1/");
|
|
56
|
+
return knownHashes(key)?.includes(shortDigest(content)) ?? false;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function walkFiles(root, relative, out = []) {
|
|
60
|
+
const absolute = join(root, relative);
|
|
61
|
+
if (!existsSync(absolute)) return out;
|
|
62
|
+
for (const entry of readdirSync(absolute, { withFileTypes: true })) {
|
|
63
|
+
const path = `${relative}/${entry.name}`;
|
|
64
|
+
if (entry.isSymbolicLink()) continue;
|
|
65
|
+
if (entry.isDirectory()) walkFiles(root, path, out); else out.push(path);
|
|
66
|
+
}
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** The project's own source files: everything outside vendor folders, docs, build output and dependencies. */
|
|
71
|
+
export function projectSources(root, relative = "", out = []) {
|
|
72
|
+
for (const entry of readdirSync(join(root, relative), { withFileTypes: true })) {
|
|
73
|
+
const path = relative ? `${relative}/${entry.name}` : entry.name;
|
|
74
|
+
if (entry.isSymbolicLink()) continue;
|
|
75
|
+
if (entry.isDirectory()) {
|
|
76
|
+
if (SKIP_DIRS.has(entry.name) || /(^|\/)components\/(ctds|ovenn)$/.test(path)) continue;
|
|
77
|
+
projectSources(root, path, out);
|
|
78
|
+
} else if (SOURCE_EXT.test(entry.name)) out.push(path);
|
|
79
|
+
}
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** True when the new component tree provides `components/ovenn<tail>` (a file, a file without extension, or a folder). */
|
|
84
|
+
function resolvesInOvenn(sources, componentPath, tail) {
|
|
85
|
+
const target = `${componentPath}${tail}`;
|
|
86
|
+
for (const path of sources.keys()) {
|
|
87
|
+
if (path === target || path.startsWith(`${target}/`) || path.startsWith(`${target}.`)) return true;
|
|
88
|
+
}
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Plans the CTDS → Ovenn migration on top of the regular update.
|
|
94
|
+
* @returns {{legacy, baseline: Record<string,string>, removals: string[], moved: string[], rewrites: Map<string,string>, unresolved: {file:string, specifier:string}[]}}
|
|
95
|
+
*/
|
|
96
|
+
export function planLegacyMigration(root, project, sources, componentPath) {
|
|
97
|
+
const legacy = detectLegacy(root, project);
|
|
98
|
+
const empty = { legacy: null, baseline: {}, removals: [], moved: [], rewrites: new Map(), unresolved: [] };
|
|
99
|
+
if (!legacy) return empty;
|
|
100
|
+
const baseline = {}, removals = [], moved = [], rewrites = new Map(), unresolved = [];
|
|
101
|
+
|
|
102
|
+
// Files that Ovenn also ships at the same path (prompts, onboarding images): untouched CTDS copies are safe to overwrite.
|
|
103
|
+
for (const path of sources.keys()) {
|
|
104
|
+
if (path.startsWith("prompts/") || path.startsWith("public/onboarding/")) {
|
|
105
|
+
if (isPristine(root, legacy, path)) baseline[path] = hashAt(safePath(root, path));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Imports of the old component folder, in the project's own code.
|
|
110
|
+
const renameConfig = existsSync(join(root, "ctds.config.json")) && !existsSync(join(root, "ovenn.config.json"));
|
|
111
|
+
for (const file of projectSources(root)) {
|
|
112
|
+
const text = readFileSync(join(root, file), "utf8");
|
|
113
|
+
let next = text.replace(SPECIFIER, (match, quote, prefix, tail) => {
|
|
114
|
+
if (!resolvesInOvenn(sources, componentPath, tail)) { unresolved.push({ file, specifier: `${prefix}ctds${tail}` }); return match; }
|
|
115
|
+
return `${quote}${prefix}ovenn${tail}${quote}`;
|
|
116
|
+
});
|
|
117
|
+
if (renameConfig) next = next.replace(/ctds\.config\.json/g, "ovenn.config.json");
|
|
118
|
+
// globals.css may already carry the Ovenn import when `ovenn init` ran on a CTDS project.
|
|
119
|
+
if (/\.(?:css|scss|sass|less)$/.test(file)) next = dedupeImports(next);
|
|
120
|
+
if (next !== text) rewrites.set(file, next);
|
|
121
|
+
}
|
|
122
|
+
// Vendor code stays out of the project's lint, as on a fresh install (CTDS before 0.6.1 never wrote this file).
|
|
123
|
+
const eslint = join(root, ".eslintignore");
|
|
124
|
+
const eslintText = existsSync(eslint) ? readFileSync(eslint, "utf8") : "";
|
|
125
|
+
const lines = eslintText.split("\n").map((line) => line.replace(/^((?:src\/)?components\/)ctds(\/\*\*)$/, "$1ovenn$2"));
|
|
126
|
+
let eslintNext = lines.filter((line, index) => !line.trim() || lines.indexOf(line) === index).join("\n");
|
|
127
|
+
if (!/^components\/ovenn\/\*\*\s*$/m.test(eslintNext)) eslintNext = `${eslintNext}${eslintNext && !eslintNext.endsWith("\n") ? "\n" : ""}components/ovenn/**\n`;
|
|
128
|
+
if (eslintNext !== eslintText) rewrites.set(".eslintignore", eslintNext);
|
|
129
|
+
if (renameConfig) {
|
|
130
|
+
rewrites.set("ovenn.config.json", readFileSync(join(root, "ctds.config.json"), "utf8"));
|
|
131
|
+
removals.push("ctds.config.json");
|
|
132
|
+
const design = join(root, "DESIGN.md");
|
|
133
|
+
if (existsSync(design)) {
|
|
134
|
+
const text = readFileSync(design, "utf8"), next = text.replace(/ctds\.config\.json/g, "ovenn.config.json");
|
|
135
|
+
if (next !== text) rewrites.set("DESIGN.md", next);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// CTDS-only trees. Components stay while any import still needs them.
|
|
140
|
+
const owned = [
|
|
141
|
+
...(unresolved.length ? [] : walkFiles(root, legacy.componentPath).filter((path) => !path.endsWith("/.ctds-meta.json"))),
|
|
142
|
+
...walkFiles(root, legacy.appRoute),
|
|
143
|
+
...(existsSync(join(root, ".claude/skills")) ? readdirSync(join(root, ".claude/skills")).filter((name) => /^ctds(-|$)/.test(name)).flatMap((name) => walkFiles(root, `.claude/skills/${name}`)) : []),
|
|
144
|
+
];
|
|
145
|
+
// Edited CTDS files leave the source tree too: left in place they still compile against removed siblings
|
|
146
|
+
// and agents still load them. update moves them under .ovenn/kept/ so the edits remain available.
|
|
147
|
+
for (const path of owned) (isPristine(root, legacy, path) ? removals : moved).push(path);
|
|
148
|
+
// Old CTDS docs and images that Ovenn no longer ships.
|
|
149
|
+
for (const path of [...walkFiles(root, "prompts"), ...walkFiles(root, "public/onboarding")]) {
|
|
150
|
+
if (!sources.has(path) && isPristine(root, legacy, path)) removals.push(path);
|
|
151
|
+
}
|
|
152
|
+
const route = `${project.appDir}/ovenn/page.tsx`;
|
|
153
|
+
if (existsSync(join(root, legacy.appRoute)) && !existsSync(join(root, route))) rewrites.set(route, renderOvennRoute());
|
|
154
|
+
for (const path of [...removals, ...moved]) rewrites.delete(path);
|
|
155
|
+
const componentsLeft = walkFiles(root, legacy.componentPath).filter((path) => !path.endsWith("/.ctds-meta.json") && !removals.includes(path) && !moved.includes(path));
|
|
156
|
+
if (!componentsLeft.length) removals.push(`${legacy.componentPath}/.ctds-meta.json`);
|
|
157
|
+
return { legacy, baseline, removals, moved, rewrites, unresolved };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function dedupeImports(css) {
|
|
161
|
+
const seen = new Set();
|
|
162
|
+
return css.split("\n").filter((line) => {
|
|
163
|
+
const match = line.trim().match(/^@import\s+["']([^"']+)["']\s*;?$/);
|
|
164
|
+
if (!match) return true;
|
|
165
|
+
if (seen.has(match[1])) return false;
|
|
166
|
+
seen.add(match[1]); return true;
|
|
167
|
+
}).join("\n");
|
|
168
|
+
}
|
|
169
|
+
|
|
@@ -30,20 +30,33 @@ export function sourceFiles(roots) {
|
|
|
30
30
|
for (const [source, destination] of roots) walk(source, destination);
|
|
31
31
|
return files;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
// `merged` files are rebuilt from their current text, replacing only the Ovenn marker block and
|
|
34
|
+
// keeping everything outside it, so local notes there are never a conflict.
|
|
35
|
+
export function planManagedUpdate(root, sources, baseline = {}, {merged = new Set()} = {}) {
|
|
34
36
|
const plan = [];
|
|
35
37
|
for (const [path, content] of sources) {
|
|
36
38
|
const current = hashAt(safePath(root, path)); const upstream = digest(content);
|
|
37
|
-
const kind = current === upstream ? "unchanged" : current === null ? "add" : current === baseline[path] ? "safe" : "conflict";
|
|
39
|
+
const kind = current === upstream ? "unchanged" : current === null ? "add" : current === baseline[path] || merged.has(path) ? "safe" : "conflict";
|
|
38
40
|
plan.push({path, content, current, upstream, kind});
|
|
39
41
|
}
|
|
40
42
|
return plan;
|
|
41
43
|
}
|
|
44
|
+
/** Baseline files the new release no longer ships: "remove" when untouched, "orphan" when edited, "gone" when already deleted. */
|
|
45
|
+
export function planRemovals(root, sources, baseline = {}) {
|
|
46
|
+
const removals = [];
|
|
47
|
+
for (const [path, hash] of Object.entries(baseline)) {
|
|
48
|
+
if (sources.has(path)) continue;
|
|
49
|
+
const current = hashAt(safePath(root, path));
|
|
50
|
+
removals.push({path, current, kind: current === null ? "gone" : current === hash ? "remove" : "orphan"});
|
|
51
|
+
}
|
|
52
|
+
return removals;
|
|
53
|
+
}
|
|
42
54
|
export function baselineFromMeta(meta, componentPath) {
|
|
43
55
|
return {...(meta.assets ?? {}), ...Object.fromEntries(Object.entries(meta.files ?? {}).map(([path, hash]) => [`${componentPath}/${path}`, hash]))};
|
|
44
56
|
}
|
|
45
|
-
export function nextBaseline(plan, old, kept) {
|
|
57
|
+
export function nextBaseline(plan, old, kept, dropped = []) {
|
|
46
58
|
const result = {...old};
|
|
59
|
+
for (const path of dropped) delete result[path];
|
|
47
60
|
for (const item of plan) { if (!kept.has(item.path)) result[item.path] = item.upstream; }
|
|
48
61
|
return result;
|
|
49
62
|
}
|