goatchain-cli-darwin-x64 0.0.73-beta.9 → 0.1.1
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/bin/goatchain +0 -0
- package/bin/node_modules/skills/bin/cli.mjs +14 -0
- package/bin/node_modules/skills/dist/_chunks/libs/@clack/core.mjs +767 -0
- package/bin/node_modules/skills/dist/_chunks/libs/@clack/prompts.mjs +334 -0
- package/bin/node_modules/skills/dist/_chunks/libs/@kwsites/file-exists.mjs +562 -0
- package/bin/node_modules/skills/dist/_chunks/libs/@kwsites/promise-deferred.mjs +37 -0
- package/bin/node_modules/skills/dist/_chunks/libs/@vercel/detect-agent.mjs +138 -0
- package/bin/node_modules/skills/dist/_chunks/libs/simple-git.mjs +3584 -0
- package/bin/node_modules/skills/dist/_chunks/libs/xdg-basedir.mjs +14 -0
- package/bin/node_modules/skills/dist/_chunks/rolldown-runtime.mjs +24 -0
- package/bin/node_modules/skills/dist/cli.d.mts +1 -0
- package/bin/node_modules/skills/dist/cli.mjs +6199 -0
- package/bin/node_modules/skills/package.json +143 -0
- package/bin/node_modules/yaml/LICENSE +13 -0
- package/bin/node_modules/yaml/README.md +172 -0
- package/bin/node_modules/yaml/bin.mjs +11 -0
- package/bin/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/bin/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/bin/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/bin/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/bin/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/bin/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/bin/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/bin/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/bin/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/bin/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/bin/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +225 -0
- package/bin/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/bin/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/bin/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/bin/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/bin/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/bin/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/bin/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/bin/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/bin/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/bin/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/bin/node_modules/yaml/browser/dist/errors.js +57 -0
- package/bin/node_modules/yaml/browser/dist/index.js +17 -0
- package/bin/node_modules/yaml/browser/dist/log.js +11 -0
- package/bin/node_modules/yaml/browser/dist/nodes/Alias.js +116 -0
- package/bin/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/bin/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/bin/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/bin/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/bin/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/bin/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/bin/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/bin/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/bin/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/bin/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/bin/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/bin/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/bin/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/bin/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/bin/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/bin/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/bin/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/bin/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/bin/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/bin/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/bin/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/bin/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/bin/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/bin/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/bin/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/bin/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/bin/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/bin/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/bin/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/bin/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/bin/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/bin/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/bin/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/bin/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/bin/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/bin/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/bin/node_modules/yaml/browser/dist/util.js +11 -0
- package/bin/node_modules/yaml/browser/dist/visit.js +233 -0
- package/bin/node_modules/yaml/browser/index.js +5 -0
- package/bin/node_modules/yaml/browser/package.json +3 -0
- package/bin/node_modules/yaml/dist/cli.d.ts +8 -0
- package/bin/node_modules/yaml/dist/cli.mjs +201 -0
- package/bin/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/bin/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/bin/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/bin/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/bin/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/bin/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/bin/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/bin/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/bin/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/bin/node_modules/yaml/dist/compose/composer.js +224 -0
- package/bin/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/bin/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/bin/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/bin/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/bin/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/bin/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/bin/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/bin/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/bin/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/bin/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/bin/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/bin/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
- package/bin/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/bin/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/bin/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/bin/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/bin/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/bin/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/bin/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/bin/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/bin/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/bin/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/bin/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/bin/node_modules/yaml/dist/doc/Document.js +337 -0
- package/bin/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/bin/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/bin/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/bin/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/bin/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/bin/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/bin/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/bin/node_modules/yaml/dist/doc/directives.js +178 -0
- package/bin/node_modules/yaml/dist/errors.d.ts +21 -0
- package/bin/node_modules/yaml/dist/errors.js +62 -0
- package/bin/node_modules/yaml/dist/index.d.ts +25 -0
- package/bin/node_modules/yaml/dist/index.js +50 -0
- package/bin/node_modules/yaml/dist/log.d.ts +3 -0
- package/bin/node_modules/yaml/dist/log.js +19 -0
- package/bin/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/bin/node_modules/yaml/dist/nodes/Alias.js +118 -0
- package/bin/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/bin/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/bin/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/bin/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/bin/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/bin/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/bin/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/bin/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/bin/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/bin/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/bin/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/bin/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/bin/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/bin/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/bin/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/bin/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/bin/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/bin/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/bin/node_modules/yaml/dist/options.d.ts +350 -0
- package/bin/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/bin/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/bin/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/bin/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/bin/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/bin/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/bin/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/bin/node_modules/yaml/dist/parse/cst.js +112 -0
- package/bin/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/bin/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/bin/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/bin/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/bin/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/bin/node_modules/yaml/dist/parse/parser.js +980 -0
- package/bin/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/bin/node_modules/yaml/dist/public-api.js +107 -0
- package/bin/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/bin/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/bin/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/bin/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/bin/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/bin/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/bin/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/bin/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/bin/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/bin/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/bin/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/bin/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/bin/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/bin/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/bin/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/bin/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/bin/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/bin/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/bin/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/bin/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/bin/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/bin/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/bin/node_modules/yaml/dist/schema/tags.js +99 -0
- package/bin/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/bin/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/bin/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/bin/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/bin/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/bin/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/bin/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/bin/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/bin/node_modules/yaml/dist/test-events.js +134 -0
- package/bin/node_modules/yaml/dist/util.d.ts +16 -0
- package/bin/node_modules/yaml/dist/util.js +28 -0
- package/bin/node_modules/yaml/dist/visit.d.ts +102 -0
- package/bin/node_modules/yaml/dist/visit.js +236 -0
- package/bin/node_modules/yaml/package.json +97 -0
- package/bin/node_modules/yaml/util.js +2 -0
- package/bin/runtime/sandbox/dim-sandbox-runner +0 -0
- package/bin/runtime/sandbox/manifest.json +15 -0
- package/bin/skills-assets/artifact-static-site/SKILL.md +58 -0
- package/bin/skills-assets/artifact-static-site/agents/openai.yaml +6 -0
- package/bin/skills-assets/chrome-control/SKILL.md +96 -0
- package/bin/skills-assets/computer-use/SKILL.md +34 -0
- package/bin/skills-assets/deep-investigate/SKILL.md +101 -0
- package/bin/skills-assets/deep-investigate/references/prompts.md +75 -0
- package/bin/skills-assets/deep-investigate/references/templates.md +73 -0
- package/bin/skills-assets/deep-investigate/references/thinking-tools.md +36 -0
- package/bin/skills-assets/dim-modality/SKILL.md +88 -0
- package/bin/skills-assets/dim-modality/agents/openai.yaml +4 -0
- package/bin/skills-assets/dim-modality/references/cli-recipes.md +137 -0
- package/bin/skills-assets/dim-modality/references/model-notes.md +56 -0
- package/bin/skills-assets/dim-workflow/SKILL.md +125 -0
- package/bin/skills-assets/dim-workflow/agents/openai.yaml +6 -0
- package/bin/skills-assets/docs-sprint/SKILL.md +73 -0
- package/bin/skills-assets/docs-sprint/agents/openai.yaml +4 -0
- package/bin/skills-assets/docs-sprint/references/contract-discipline.md +30 -0
- package/bin/skills-assets/docs-sprint/references/delivery-plan.md +162 -0
- package/bin/skills-assets/docs-sprint/references/documentation-system.md +109 -0
- package/bin/skills-assets/docs-sprint/references/ui-layout.md +73 -0
- package/bin/skills-assets/docs-sprint/references/worktree-guide.md +45 -0
- package/bin/skills-assets/officecli/SKILL.md +423 -0
- package/bin/skills-assets/pdf/README.md +222 -0
- package/bin/skills-assets/pdf/SKILL.md +191 -0
- package/bin/skills-assets/pdf/design/design.md +381 -0
- package/bin/skills-assets/pdf/scripts/cover.py +1579 -0
- package/bin/skills-assets/pdf/scripts/fill_inspect.py +200 -0
- package/bin/skills-assets/pdf/scripts/fill_write.py +242 -0
- package/bin/skills-assets/pdf/scripts/make.sh +491 -0
- package/bin/skills-assets/pdf/scripts/merge.py +112 -0
- package/bin/skills-assets/pdf/scripts/palette.py +521 -0
- package/bin/skills-assets/pdf/scripts/reformat_parse.py +374 -0
- package/bin/skills-assets/pdf/scripts/render_body.py +1052 -0
- package/bin/skills-assets/pdf/scripts/render_cover.js +111 -0
- package/bin/skills-assets/plugin-creator/SKILL.md +148 -0
- package/bin/skills-assets/plugin-creator/references/installing-and-updating.md +66 -0
- package/bin/skills-assets/plugin-creator/references/plugin-json-spec.md +148 -0
- package/bin/skills-assets/plugin-creator/scripts/create_basic_plugin.py +189 -0
- package/bin/skills-assets/plugin-creator/scripts/validate_plugin.py +269 -0
- package/bin/skills-assets/skill-creator/SKILL.md +368 -0
- package/bin/skills-assets/skill-creator/agents/openai.yaml +5 -0
- package/bin/skills-assets/skill-creator/assets/skill-creator-small.svg +3 -0
- package/bin/skills-assets/skill-creator/assets/skill-creator.png +0 -0
- package/bin/skills-assets/skill-creator/license.txt +202 -0
- package/bin/skills-assets/skill-creator/references/openai_yaml.md +49 -0
- package/bin/skills-assets/skill-creator/scripts/generate_openai_yaml.py +226 -0
- package/bin/skills-assets/skill-creator/scripts/init_skill.py +397 -0
- package/bin/skills-assets/skill-creator/scripts/quick_validate.py +101 -0
- package/bin/skills-assets/skill-installer/LICENSE.txt +202 -0
- package/bin/skills-assets/skill-installer/SKILL.md +58 -0
- package/bin/skills-assets/skill-installer/agents/openai.yaml +5 -0
- package/bin/skills-assets/skill-installer/assets/skill-installer-small.svg +3 -0
- package/bin/skills-assets/skill-installer/assets/skill-installer.png +0 -0
- package/bin/skills-assets/skill-installer/scripts/github_utils.py +21 -0
- package/bin/skills-assets/skill-installer/scripts/install-skill-from-github.py +308 -0
- package/bin/skills-assets/skill-installer/scripts/list-skills.py +107 -0
- package/package.json +1 -1
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
palette.py — Infer design tokens from document metadata.
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
python3 palette.py --title "AI Trends 2025" --type report --out tokens.json
|
|
7
|
+
python3 palette.py --title "John Doe Resume" --type resume --out tokens.json
|
|
8
|
+
python3 palette.py --meta meta.json --out tokens.json
|
|
9
|
+
|
|
10
|
+
Outputs tokens.json consumed by all downstream scripts.
|
|
11
|
+
Cover fonts are loaded via Google Fonts @import in the cover HTML (no local caching).
|
|
12
|
+
Body fonts always use ReportLab system fonts (Times-Bold / Helvetica).
|
|
13
|
+
Exit codes: 0 success, 1 bad args, 3 write error
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
import argparse
|
|
17
|
+
import json
|
|
18
|
+
import sys
|
|
19
|
+
|
|
20
|
+
# ── Palette library ────────────────────────────────────────────────────────────
|
|
21
|
+
# Each entry: cover colors + cover_pattern + mood
|
|
22
|
+
PALETTES = {
|
|
23
|
+
"report": {
|
|
24
|
+
# Charcoal blue-grey cover; muted steel blue accent — authoritative, not flashy
|
|
25
|
+
"cover_bg": "#1B2A38",
|
|
26
|
+
"accent": "#3B6D8A",
|
|
27
|
+
"accent_lt": "#E6EFF5",
|
|
28
|
+
"text_light": "#EDE9E2",
|
|
29
|
+
"page_bg": "#FAFAF8",
|
|
30
|
+
"dark": "#1A1E24",
|
|
31
|
+
"body_text": "#2C2C30",
|
|
32
|
+
"muted": "#7A7A84",
|
|
33
|
+
"cover_pattern": "fullbleed",
|
|
34
|
+
"mood": "authoritative",
|
|
35
|
+
},
|
|
36
|
+
"proposal": {
|
|
37
|
+
# Dark charcoal cover; slate grey-blue accent — confident, understated
|
|
38
|
+
"cover_bg": "#22272E",
|
|
39
|
+
"accent": "#4E6070",
|
|
40
|
+
"accent_lt": "#EAECEE",
|
|
41
|
+
"text_light": "#EDE9E2",
|
|
42
|
+
"page_bg": "#FAFAF7",
|
|
43
|
+
"dark": "#18191E",
|
|
44
|
+
"body_text": "#28282E",
|
|
45
|
+
"muted": "#7A7870",
|
|
46
|
+
"cover_pattern": "split",
|
|
47
|
+
"mood": "confident",
|
|
48
|
+
},
|
|
49
|
+
"resume": {
|
|
50
|
+
# White; deep navy accent — clean and unambiguous
|
|
51
|
+
"cover_bg": "#FFFFFF",
|
|
52
|
+
"accent": "#1C3557",
|
|
53
|
+
"accent_lt": "#E8EEF5",
|
|
54
|
+
"text_light": "#FFFFFF",
|
|
55
|
+
"page_bg": "#FFFFFF",
|
|
56
|
+
"dark": "#111111",
|
|
57
|
+
"body_text": "#222222",
|
|
58
|
+
"muted": "#888888",
|
|
59
|
+
"cover_pattern": "typographic",
|
|
60
|
+
"mood": "clean",
|
|
61
|
+
},
|
|
62
|
+
"portfolio": {
|
|
63
|
+
# Near-black charcoal; cool slate grey accent — subdued professional
|
|
64
|
+
"cover_bg": "#191C20",
|
|
65
|
+
"accent": "#6A7A88",
|
|
66
|
+
"accent_lt": "#EAECEE",
|
|
67
|
+
"text_light": "#EDE9E4",
|
|
68
|
+
"page_bg": "#F8F8F8",
|
|
69
|
+
"dark": "#18191E",
|
|
70
|
+
"body_text": "#28282E",
|
|
71
|
+
"muted": "#8A8A96",
|
|
72
|
+
"cover_pattern": "atmospheric",
|
|
73
|
+
"mood": "expressive",
|
|
74
|
+
},
|
|
75
|
+
"academic": {
|
|
76
|
+
# Warm white; classic navy accent — scholarly standard
|
|
77
|
+
"cover_bg": "#F5F4F0",
|
|
78
|
+
"accent": "#2A436A",
|
|
79
|
+
"accent_lt": "#E6EBF4",
|
|
80
|
+
"text_light": "#FFFFFF",
|
|
81
|
+
"page_bg": "#F5F4F0",
|
|
82
|
+
"dark": "#1A1A28",
|
|
83
|
+
"body_text": "#1E1E2A",
|
|
84
|
+
"muted": "#686877",
|
|
85
|
+
"cover_pattern": "typographic",
|
|
86
|
+
"mood": "scholarly",
|
|
87
|
+
},
|
|
88
|
+
"general": {
|
|
89
|
+
# Dark slate; muted steel accent — neutral, no-nonsense
|
|
90
|
+
"cover_bg": "#1F2329",
|
|
91
|
+
"accent": "#4A6070",
|
|
92
|
+
"accent_lt": "#E6EAEC",
|
|
93
|
+
"text_light": "#EEEBE5",
|
|
94
|
+
"page_bg": "#F8F6F2",
|
|
95
|
+
"dark": "#1A1A1A",
|
|
96
|
+
"body_text": "#2C2C2C",
|
|
97
|
+
"muted": "#888888",
|
|
98
|
+
"cover_pattern": "fullbleed",
|
|
99
|
+
"mood": "neutral",
|
|
100
|
+
},
|
|
101
|
+
# ── Extended types — each uses a distinct new cover pattern ─────────────────
|
|
102
|
+
"minimal": {
|
|
103
|
+
# Warm off-white; dark neutral grey — truly restrained, no color signal
|
|
104
|
+
"cover_bg": "#F7F6F4",
|
|
105
|
+
"accent": "#4A4A4A",
|
|
106
|
+
"accent_lt": "#EBEBEA",
|
|
107
|
+
"text_light": "#F7F6F4",
|
|
108
|
+
"page_bg": "#F7F6F4",
|
|
109
|
+
"dark": "#111111",
|
|
110
|
+
"body_text": "#222222",
|
|
111
|
+
"muted": "#999999",
|
|
112
|
+
"cover_pattern": "minimal",
|
|
113
|
+
"mood": "restrained",
|
|
114
|
+
},
|
|
115
|
+
"stripe": {
|
|
116
|
+
# Near-black; charcoal slate accent — structured, no-nonsense
|
|
117
|
+
"cover_bg": "#1E222A",
|
|
118
|
+
"accent": "#4A5568",
|
|
119
|
+
"accent_lt": "#EAECEE",
|
|
120
|
+
"text_light": "#FFFFFF",
|
|
121
|
+
"page_bg": "#F8F8F7",
|
|
122
|
+
"dark": "#0E1117",
|
|
123
|
+
"body_text": "#262630",
|
|
124
|
+
"muted": "#888898",
|
|
125
|
+
"cover_pattern": "stripe",
|
|
126
|
+
"mood": "bold",
|
|
127
|
+
},
|
|
128
|
+
"diagonal": {
|
|
129
|
+
# Deep navy; muted slate-blue accent — dignified, controlled
|
|
130
|
+
"cover_bg": "#1A2535",
|
|
131
|
+
"accent": "#3D5A72",
|
|
132
|
+
"accent_lt": "#E4EBF0",
|
|
133
|
+
"text_light": "#EEF0F5",
|
|
134
|
+
"page_bg": "#F8FAFC",
|
|
135
|
+
"dark": "#0F1A2A",
|
|
136
|
+
"body_text": "#1E2C3A",
|
|
137
|
+
"muted": "#7A8A96",
|
|
138
|
+
"cover_pattern": "diagonal",
|
|
139
|
+
"mood": "dynamic",
|
|
140
|
+
},
|
|
141
|
+
"frame": {
|
|
142
|
+
# Warm parchment; dark muted brown — classical, formal
|
|
143
|
+
"cover_bg": "#F5F2EC",
|
|
144
|
+
"accent": "#5C4A38",
|
|
145
|
+
"accent_lt": "#EAE5DE",
|
|
146
|
+
"text_light": "#F5F2EC",
|
|
147
|
+
"page_bg": "#F5F2EC",
|
|
148
|
+
"dark": "#2A1E14",
|
|
149
|
+
"body_text": "#2C2018",
|
|
150
|
+
"muted": "#9A8A78",
|
|
151
|
+
"cover_pattern": "frame",
|
|
152
|
+
"mood": "classical",
|
|
153
|
+
},
|
|
154
|
+
"editorial": {
|
|
155
|
+
# White; deep burgundy accent — editorial weight without the shout
|
|
156
|
+
"cover_bg": "#FFFFFF",
|
|
157
|
+
"accent": "#7A2B36",
|
|
158
|
+
"accent_lt": "#EEE4E5",
|
|
159
|
+
"text_light": "#FFFFFF",
|
|
160
|
+
"page_bg": "#FFFFFF",
|
|
161
|
+
"dark": "#0A0A0A",
|
|
162
|
+
"body_text": "#1A1A1A",
|
|
163
|
+
"muted": "#777777",
|
|
164
|
+
"cover_pattern": "editorial",
|
|
165
|
+
"mood": "editorial",
|
|
166
|
+
},
|
|
167
|
+
# ── New patterns (v2) ────────────────────────────────────────────────────────
|
|
168
|
+
"magazine": {
|
|
169
|
+
# Warm linen; deep navy accent — formal publication standard
|
|
170
|
+
"cover_bg": "#F0EEE9",
|
|
171
|
+
"accent": "#1C3557",
|
|
172
|
+
"accent_lt": "#E4EBF3",
|
|
173
|
+
"text_light": "#FFFFFF",
|
|
174
|
+
"page_bg": "#F0EEE9",
|
|
175
|
+
"dark": "#0D1A2B",
|
|
176
|
+
"body_text": "#2A2A2A",
|
|
177
|
+
"muted": "#888888",
|
|
178
|
+
"cover_pattern": "magazine",
|
|
179
|
+
"mood": "magazine",
|
|
180
|
+
},
|
|
181
|
+
"darkroom": {
|
|
182
|
+
# Deep navy; muted steel-blue accent — premium, controlled
|
|
183
|
+
"cover_bg": "#151C27",
|
|
184
|
+
"accent": "#3D5A7A",
|
|
185
|
+
"accent_lt": "#E2EBF2",
|
|
186
|
+
"text_light": "#EDE9E2",
|
|
187
|
+
"page_bg": "#F7F7F5",
|
|
188
|
+
"dark": "#0A1018",
|
|
189
|
+
"body_text": "#2C2C2C",
|
|
190
|
+
"muted": "#8A9AB0",
|
|
191
|
+
"cover_pattern": "darkroom",
|
|
192
|
+
"mood": "darkroom",
|
|
193
|
+
},
|
|
194
|
+
"terminal": {
|
|
195
|
+
# Near-black; forest green accent — technical, serious (not neon)
|
|
196
|
+
"cover_bg": "#0D1117",
|
|
197
|
+
"accent": "#3D7A5C",
|
|
198
|
+
"accent_lt": "#E2EEE8",
|
|
199
|
+
"text_light": "#E6EDF3",
|
|
200
|
+
"page_bg": "#F8F8F6",
|
|
201
|
+
"dark": "#010409",
|
|
202
|
+
"body_text": "#2C2C2C",
|
|
203
|
+
"muted": "#5A7A6A",
|
|
204
|
+
"cover_pattern": "terminal",
|
|
205
|
+
"mood": "terminal",
|
|
206
|
+
},
|
|
207
|
+
"poster": {
|
|
208
|
+
# White; near-black accent sidebar — stark, unambiguous
|
|
209
|
+
"cover_bg": "#FFFFFF",
|
|
210
|
+
"accent": "#0A0A0A",
|
|
211
|
+
"accent_lt": "#EBEBEA",
|
|
212
|
+
"text_light": "#FFFFFF",
|
|
213
|
+
"page_bg": "#FFFFFF",
|
|
214
|
+
"dark": "#0A0A0A",
|
|
215
|
+
"body_text": "#1A1A1A",
|
|
216
|
+
"muted": "#888888",
|
|
217
|
+
"cover_pattern": "poster",
|
|
218
|
+
"mood": "poster",
|
|
219
|
+
},
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
# ── Font pairs — CSS names for cover HTML, ReportLab names for body ─────────────
|
|
223
|
+
# cover uses Google Fonts via @import (no local disk caching needed)
|
|
224
|
+
# body always uses system fonts via ReportLab
|
|
225
|
+
FONT_PAIRS = {
|
|
226
|
+
"authoritative": {
|
|
227
|
+
"display_css": "Playfair Display",
|
|
228
|
+
"body_css": "IBM Plex Sans",
|
|
229
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400&display=swap",
|
|
230
|
+
"display_rl": "Times-Bold",
|
|
231
|
+
"body_rl": "Helvetica",
|
|
232
|
+
"body_b_rl": "Helvetica-Bold",
|
|
233
|
+
},
|
|
234
|
+
"confident": {
|
|
235
|
+
"display_css": "Syne",
|
|
236
|
+
"body_css": "Nunito Sans",
|
|
237
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=Syne:wght@600;800&family=Nunito+Sans:wght@400;600;700&display=swap",
|
|
238
|
+
"display_rl": "Times-Bold",
|
|
239
|
+
"body_rl": "Helvetica",
|
|
240
|
+
"body_b_rl": "Helvetica-Bold",
|
|
241
|
+
},
|
|
242
|
+
"clean": {
|
|
243
|
+
"display_css": "DM Serif Display",
|
|
244
|
+
"body_css": "DM Sans",
|
|
245
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@300;400;500&display=swap",
|
|
246
|
+
"display_rl": "Times-Bold",
|
|
247
|
+
"body_rl": "Helvetica",
|
|
248
|
+
"body_b_rl": "Helvetica-Bold",
|
|
249
|
+
},
|
|
250
|
+
"expressive": {
|
|
251
|
+
"display_css": "Fraunces",
|
|
252
|
+
"body_css": "Inter",
|
|
253
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,700;0,900;1,900&family=Inter:wght@300;400;500&display=swap",
|
|
254
|
+
"display_rl": "Times-Bold",
|
|
255
|
+
"body_rl": "Helvetica",
|
|
256
|
+
"body_b_rl": "Helvetica-Bold",
|
|
257
|
+
},
|
|
258
|
+
"scholarly": {
|
|
259
|
+
"display_css": "EB Garamond",
|
|
260
|
+
"body_css": "Source Sans 3",
|
|
261
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@400;600&display=swap",
|
|
262
|
+
"display_rl": "Times-Bold",
|
|
263
|
+
"body_rl": "Helvetica",
|
|
264
|
+
"body_b_rl": "Helvetica-Bold",
|
|
265
|
+
},
|
|
266
|
+
"neutral": {
|
|
267
|
+
"display_css": "Outfit",
|
|
268
|
+
"body_css": "Outfit",
|
|
269
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700;900&display=swap",
|
|
270
|
+
"display_rl": "Times-Bold",
|
|
271
|
+
"body_rl": "Helvetica",
|
|
272
|
+
"body_b_rl": "Helvetica-Bold",
|
|
273
|
+
},
|
|
274
|
+
"restrained": {
|
|
275
|
+
"display_css": "Cormorant Garamond",
|
|
276
|
+
"body_css": "Jost",
|
|
277
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,600;1,300&family=Jost:wght@300;400;500&display=swap",
|
|
278
|
+
"display_rl": "Times-Bold",
|
|
279
|
+
"body_rl": "Helvetica",
|
|
280
|
+
"body_b_rl": "Helvetica-Bold",
|
|
281
|
+
},
|
|
282
|
+
"bold": {
|
|
283
|
+
"display_css": "Barlow Condensed",
|
|
284
|
+
"body_css": "Barlow",
|
|
285
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=Barlow:wght@400;500;600&display=swap",
|
|
286
|
+
"display_rl": "Times-Bold",
|
|
287
|
+
"body_rl": "Helvetica",
|
|
288
|
+
"body_b_rl": "Helvetica-Bold",
|
|
289
|
+
},
|
|
290
|
+
"dynamic": {
|
|
291
|
+
"display_css": "Montserrat",
|
|
292
|
+
"body_css": "Montserrat",
|
|
293
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,700;0,900;1,400&display=swap",
|
|
294
|
+
"display_rl": "Times-Bold",
|
|
295
|
+
"body_rl": "Helvetica",
|
|
296
|
+
"body_b_rl": "Helvetica-Bold",
|
|
297
|
+
},
|
|
298
|
+
"classical": {
|
|
299
|
+
"display_css": "Cormorant",
|
|
300
|
+
"body_css": "Crimson Pro",
|
|
301
|
+
"gfonts_import": "https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,400;0,700;1,400&family=Crimson+Pro:wght@400;600&display=swap",
|
|
302
|
+
"display_rl": "Times-Bold",
|
|
303
|
+
"body_rl": "Helvetica",
|
|
304
|
+
"body_b_rl": "Helvetica-Bold",
|
|
305
|
+
},
|
|
306
|
+
"editorial": {
|
|
307
|
+
"display_css": "Bebas Neue",
|
|
308
|
+
"body_css": "Libre Franklin",
|
|
309
|
+
"gfonts_import": (
|
|
310
|
+
"https://fonts.googleapis.com/css2?family=Bebas+Neue"
|
|
311
|
+
"&family=Libre+Franklin:ital,wght@0,400;0,700;1,400&display=swap"
|
|
312
|
+
),
|
|
313
|
+
"display_rl": "Times-Bold",
|
|
314
|
+
"body_rl": "Helvetica",
|
|
315
|
+
"body_b_rl": "Helvetica-Bold",
|
|
316
|
+
},
|
|
317
|
+
# ── New moods (v2) ───────────────────────────────────────────────────────────
|
|
318
|
+
"magazine": {
|
|
319
|
+
"display_css": "Playfair Display",
|
|
320
|
+
"body_css": "EB Garamond",
|
|
321
|
+
"gfonts_import": (
|
|
322
|
+
"https://fonts.googleapis.com/css2?family=Playfair+Display"
|
|
323
|
+
":ital,wght@0,700;0,900;1,700"
|
|
324
|
+
"&family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap"
|
|
325
|
+
),
|
|
326
|
+
"display_rl": "Times-Bold",
|
|
327
|
+
"body_rl": "Helvetica",
|
|
328
|
+
"body_b_rl": "Helvetica-Bold",
|
|
329
|
+
},
|
|
330
|
+
"darkroom": {
|
|
331
|
+
"display_css": "Playfair Display",
|
|
332
|
+
"body_css": "EB Garamond",
|
|
333
|
+
"gfonts_import": (
|
|
334
|
+
"https://fonts.googleapis.com/css2?family=Playfair+Display"
|
|
335
|
+
":ital,wght@0,700;0,900;1,700"
|
|
336
|
+
"&family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap"
|
|
337
|
+
),
|
|
338
|
+
"display_rl": "Times-Bold",
|
|
339
|
+
"body_rl": "Helvetica",
|
|
340
|
+
"body_b_rl": "Helvetica-Bold",
|
|
341
|
+
},
|
|
342
|
+
"terminal": {
|
|
343
|
+
"display_css": "Space Mono",
|
|
344
|
+
"body_css": "Space Mono",
|
|
345
|
+
"gfonts_import": (
|
|
346
|
+
"https://fonts.googleapis.com/css2?family=Space+Mono"
|
|
347
|
+
":ital,wght@0,400;0,700;1,400&display=swap"
|
|
348
|
+
),
|
|
349
|
+
"display_rl": "Courier-Bold",
|
|
350
|
+
"body_rl": "Courier",
|
|
351
|
+
"body_b_rl": "Courier-Bold",
|
|
352
|
+
},
|
|
353
|
+
"poster": {
|
|
354
|
+
"display_css": "Barlow Condensed",
|
|
355
|
+
"body_css": "Courier Prime",
|
|
356
|
+
"gfonts_import": (
|
|
357
|
+
"https://fonts.googleapis.com/css2?family=Barlow+Condensed"
|
|
358
|
+
":wght@700;900"
|
|
359
|
+
"&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap"
|
|
360
|
+
),
|
|
361
|
+
"display_rl": "Times-Bold",
|
|
362
|
+
"body_rl": "Courier",
|
|
363
|
+
"body_b_rl": "Courier-Bold",
|
|
364
|
+
},
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
SYSTEM_FALLBACK = {
|
|
368
|
+
"display_css": "Georgia",
|
|
369
|
+
"body_css": "Arial",
|
|
370
|
+
"gfonts_import": "",
|
|
371
|
+
"display_rl": "Times-Bold",
|
|
372
|
+
"body_rl": "Helvetica",
|
|
373
|
+
"body_b_rl": "Helvetica-Bold",
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
# ── Colour helpers ──────────────────────────────────────────────────────────────
|
|
378
|
+
def _hex_to_rgb(h: str) -> tuple:
|
|
379
|
+
h = h.lstrip("#")
|
|
380
|
+
return int(h[0:2], 16), int(h[2:4], 16), int(h[4:6], 16)
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
def _lighten(hex_color: str, factor: float = 0.09) -> str:
|
|
384
|
+
"""Blend hex_color toward white (factor = accent weight, 0=white, 1=full color)."""
|
|
385
|
+
r, g, b = _hex_to_rgb(hex_color)
|
|
386
|
+
return "#{:02X}{:02X}{:02X}".format(
|
|
387
|
+
round(r * factor + 255 * (1 - factor)),
|
|
388
|
+
round(g * factor + 255 * (1 - factor)),
|
|
389
|
+
round(b * factor + 255 * (1 - factor)),
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
# ── Token assembly ─────────────────────────────────────────────────────────────
|
|
394
|
+
def build_tokens(
|
|
395
|
+
title: str,
|
|
396
|
+
doc_type: str,
|
|
397
|
+
author: str = "",
|
|
398
|
+
date: str = "",
|
|
399
|
+
accent_override: str = "",
|
|
400
|
+
cover_bg_override: str = "",
|
|
401
|
+
) -> dict:
|
|
402
|
+
palette = PALETTES.get(doc_type, PALETTES["general"]).copy()
|
|
403
|
+
mood = palette["mood"]
|
|
404
|
+
font_pair = FONT_PAIRS.get(mood, SYSTEM_FALLBACK)
|
|
405
|
+
|
|
406
|
+
# Apply caller-supplied overrides before token assembly
|
|
407
|
+
if accent_override:
|
|
408
|
+
palette["accent"] = accent_override
|
|
409
|
+
palette["accent_lt"] = _lighten(accent_override, 0.09)
|
|
410
|
+
if cover_bg_override:
|
|
411
|
+
palette["cover_bg"] = cover_bg_override
|
|
412
|
+
|
|
413
|
+
tokens = {
|
|
414
|
+
# Identity
|
|
415
|
+
"title": title,
|
|
416
|
+
"author": author,
|
|
417
|
+
"date": date,
|
|
418
|
+
"doc_type": doc_type,
|
|
419
|
+
|
|
420
|
+
# Palette
|
|
421
|
+
"cover_bg": palette["cover_bg"],
|
|
422
|
+
"accent": palette["accent"],
|
|
423
|
+
"accent_lt": palette["accent_lt"],
|
|
424
|
+
"text_light": palette["text_light"],
|
|
425
|
+
"page_bg": palette["page_bg"],
|
|
426
|
+
"dark": palette["dark"],
|
|
427
|
+
"body_text": palette["body_text"],
|
|
428
|
+
"muted": palette["muted"],
|
|
429
|
+
"cover_pattern": palette["cover_pattern"],
|
|
430
|
+
"mood": mood,
|
|
431
|
+
|
|
432
|
+
# Typography — CSS names for cover HTML (loaded via Google Fonts @import)
|
|
433
|
+
"font_display": font_pair["display_css"],
|
|
434
|
+
"font_body": font_pair["body_css"],
|
|
435
|
+
"gfonts_import": font_pair["gfonts_import"],
|
|
436
|
+
|
|
437
|
+
# Typography — ReportLab system font names for body pages
|
|
438
|
+
"font_display_rl": font_pair["display_rl"],
|
|
439
|
+
"font_body_rl": font_pair["body_rl"],
|
|
440
|
+
"font_body_b_rl": font_pair["body_b_rl"],
|
|
441
|
+
|
|
442
|
+
# Legacy keys (kept so render_body.py's register_fonts is a no-op)
|
|
443
|
+
"font_heading": font_pair["display_rl"],
|
|
444
|
+
"font_body_b": font_pair["body_b_rl"],
|
|
445
|
+
"font_paths": {},
|
|
446
|
+
|
|
447
|
+
# Type scale (pt)
|
|
448
|
+
"size_display": 54,
|
|
449
|
+
"size_h1": 22,
|
|
450
|
+
"size_h2": 15,
|
|
451
|
+
"size_h3": 11.5,
|
|
452
|
+
"size_body": 10.5,
|
|
453
|
+
"size_caption": 8.5,
|
|
454
|
+
"size_meta": 8,
|
|
455
|
+
|
|
456
|
+
# Layout (pt, 1cm ≈ 28.35pt)
|
|
457
|
+
"margin_left": 79, # 2.8cm
|
|
458
|
+
"margin_right": 79,
|
|
459
|
+
"margin_top": 79,
|
|
460
|
+
"margin_bottom": 71, # 2.5cm
|
|
461
|
+
"section_gap": 26,
|
|
462
|
+
"para_gap": 8,
|
|
463
|
+
"line_gap": 17,
|
|
464
|
+
}
|
|
465
|
+
return tokens
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
# ── CLI ───────────────────────────────────────────────────────────────────────
|
|
469
|
+
def main():
|
|
470
|
+
parser = argparse.ArgumentParser(description="Generate design tokens from document metadata")
|
|
471
|
+
parser.add_argument("--title", default="Untitled Document")
|
|
472
|
+
parser.add_argument("--type", default="general",
|
|
473
|
+
choices=list(PALETTES.keys()),
|
|
474
|
+
help="Document type: " + ", ".join(PALETTES.keys()))
|
|
475
|
+
parser.add_argument("--author", default="")
|
|
476
|
+
parser.add_argument("--date", default="")
|
|
477
|
+
parser.add_argument("--meta", help="JSON file with title/type/author/date keys")
|
|
478
|
+
parser.add_argument("--accent", default="",
|
|
479
|
+
help="Override accent colour (hex, e.g. #2D6A8F). "
|
|
480
|
+
"accent_lt is auto-derived by lightening toward white.")
|
|
481
|
+
parser.add_argument("--cover-bg", default="",
|
|
482
|
+
help="Override cover background colour (hex).")
|
|
483
|
+
parser.add_argument("--out", default="tokens.json")
|
|
484
|
+
args = parser.parse_args()
|
|
485
|
+
|
|
486
|
+
if args.meta:
|
|
487
|
+
try:
|
|
488
|
+
with open(args.meta) as f:
|
|
489
|
+
meta = json.load(f)
|
|
490
|
+
args.title = meta.get("title", args.title)
|
|
491
|
+
args.type = meta.get("type", args.type)
|
|
492
|
+
args.author = meta.get("author", args.author)
|
|
493
|
+
args.date = meta.get("date", args.date)
|
|
494
|
+
except Exception as e:
|
|
495
|
+
print(json.dumps({"status": "error", "error": str(e)}), file=sys.stderr)
|
|
496
|
+
sys.exit(1)
|
|
497
|
+
|
|
498
|
+
tokens = build_tokens(
|
|
499
|
+
args.title, args.type, args.author, args.date,
|
|
500
|
+
accent_override=args.accent,
|
|
501
|
+
cover_bg_override=getattr(args, "cover_bg", ""),
|
|
502
|
+
)
|
|
503
|
+
|
|
504
|
+
try:
|
|
505
|
+
with open(args.out, "w") as f:
|
|
506
|
+
json.dump(tokens, f, indent=2)
|
|
507
|
+
except Exception as e:
|
|
508
|
+
print(json.dumps({"status": "error", "error": str(e)}), file=sys.stderr)
|
|
509
|
+
sys.exit(3)
|
|
510
|
+
|
|
511
|
+
print(json.dumps({
|
|
512
|
+
"status": "ok",
|
|
513
|
+
"out": args.out,
|
|
514
|
+
"mood": tokens["mood"],
|
|
515
|
+
"pattern": tokens["cover_pattern"],
|
|
516
|
+
"fonts": f'{tokens["font_display"]} / {tokens["font_body"]}',
|
|
517
|
+
}))
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
if __name__ == "__main__":
|
|
521
|
+
main()
|