@litfamily/litcodex 1.0.30 → 1.0.31
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-Ko-KR.md +11 -11
- package/README.md +11 -11
- package/dist/install/generated-skill-payload-hashes.d.ts +188 -82
- package/dist/install/generated-skill-payload-hashes.js +188 -82
- package/dist/install/skill-catalog.d.ts +1 -1
- package/dist/install/skill-catalog.js +12 -1
- package/dist/install/skill-resource-hashes.d.ts +1 -1
- package/dist/install/skill-resource-hashes.js +1 -1
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
- package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
- package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
- package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/directive.md +10 -4
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-adhd.md +191 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-handoff.md +2 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-hijack.md +219 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-recap.md +2 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-schematic.md +199 -0
- package/marketplace/plugins/litcodex/components/lit-loop/directives/litwork.md +2 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/adhd-suggest.d.ts +10 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/adhd-suggest.js +67 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-html.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-html.js +128 -8
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-looks.d.ts +19 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-looks.js +58 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-status.d.ts +27 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/card-status.js +94 -7
- package/marketplace/plugins/litcodex/components/lit-loop/dist/cli.js +13 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.d.ts +2 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +8 -9
- package/marketplace/plugins/litcodex/components/lit-loop/dist/control-chars.d.ts +5 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/control-chars.js +23 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +8 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +118 -11
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hud.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hud.js +29 -13
- package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-events.d.ts +13 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-events.js +85 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-state.d.ts +55 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/lane-state.js +227 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/live-step.d.ts +5 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/live-step.js +17 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/markers.js +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/modes.js +25 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-gate.d.ts +79 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-gate.js +310 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.js +5 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/plan-persistence.js +10 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/redaction.js +18 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.d.ts +15 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/reentry.js +46 -9
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.d.ts +10 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-cli.js +88 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.d.ts +20 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-go.js +84 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-look.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-look.js +41 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-redact.d.ts +3 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-redact.js +40 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-rollout.d.ts +48 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind-rollout.js +292 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.d.ts +162 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/rewind.js +773 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +44 -2
- package/marketplace/plugins/litcodex/components/lit-loop/dist/run-panel.js +1 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/schematic-route.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/schematic-route.js +35 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/screen-card.d.ts +3 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/screen-card.js +15 -5
- package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-mention-scope.js +6 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/stack-hook.d.ts +8 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/stack-hook.js +57 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/statusline.js +8 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/threads.d.ts +50 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/threads.js +178 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.d.ts +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/trigger.js +29 -5
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.d.ts +10 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.js +11 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.d.ts +132 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-stack.js +488 -0
- package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
- package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/dist/codex-hook.js +65 -0
- package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
- package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
- package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
- package/marketplace/plugins/litcodex/hooks/hooks.json +24 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +6 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/components.css +414 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/fonts.json +22 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/kit/ui.js +228 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/brand-and-imagery.md +1 -1
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/complete-contract.md +1 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/craft-floor.md +2 -2
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/default-editorial-pixel.json +15 -8
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/design-choice.md +19 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/house-styles.md +235 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/motion-guide.md +2 -2
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/probe-and-review.md +6 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/production-interview.md +2 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/slop-register.md +4 -4
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/lock-probe.mjs +196 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/page-probe.mjs +22 -4
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/probe.mjs +59 -13
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/rule-data.mjs +38 -4
- package/marketplace/plugins/litcodex/skills/lit-adhd/SKILL.md +181 -0
- package/marketplace/plugins/litcodex/skills/lit-adhd/agents/openai.yaml +6 -0
- package/marketplace/plugins/litcodex/skills/lit-adhd/references/card-examples.md +147 -0
- package/marketplace/plugins/litcodex/skills/lit-adhd/references/status-taxonomy.md +37 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +18 -7
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/style-guide.md +20 -11
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-swimlane.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree.md +3 -3
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/verifier-guide.md +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +1 -2
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
- package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +12 -3
- package/marketplace/plugins/litcodex/skills/lit-docx/references/direction-step.md +6 -3
- package/marketplace/plugins/litcodex/skills/lit-hijack/SKILL.md +449 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/agents/openai.yaml +6 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/capture-and-provenance.md +100 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/clean-room-build.md +111 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/distil-and-licence.md +102 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/gap-and-port-design.md +125 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/references/parity-and-report.md +108 -0
- package/marketplace/plugins/litcodex/skills/lit-hijack/scripts/hijack.mjs +1050 -0
- package/marketplace/plugins/litcodex/skills/lit-loop/SKILL.md +13 -4
- package/marketplace/plugins/litcodex/skills/lit-plan/SKILL.md +6 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/NOTICE +1 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +35 -8
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/jetbrains-mono/SOURCE.md +21 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/anti-slop-checklist.md +5 -2
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/authoring-guide.md +3 -4
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/density-and-fill.md +20 -6
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/direction-step.md +26 -8
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/14-engineering-review-computational-brutalism-ko.md +173 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/15-launch-pitch-neo-brutalism-ko.md +154 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/16-design-lecture-bauhaus-ko.md +139 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/17-community-programme-riso-ko.md +158 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/examples/18-public-data-briefing-newsroom-ko.md +179 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/layout-families.md +42 -27
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/title-treatments.md +31 -27
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/bauhaus.md +136 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/chalk.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/computational-brutalism.md +145 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/neo-brutalism.md +155 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/newsroom.md +141 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/riso.md +133 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/signal.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/tonalities/studio.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/compile-deck.js +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/craft_extras.py +136 -94
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/embed_fonts.py +13 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-pack.js +386 -579
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/office-run.mjs +2 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/qa_deck.py +7 -13
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/render_pages.py +124 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +100 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
- package/marketplace/plugins/litcodex/skills/lit-recap/SKILL.md +2 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/SKILL.md +198 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/agents/openai.yaml +6 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/cutaway-outputs.md +70 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/isometric-craft.md +101 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/journal-figures.md +72 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/kit-api.md +134 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/pfd-and-layout.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/pid-drafting.md +103 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/pid-symbols.md +163 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/references/verification.md +100 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/doctor.mjs +57 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/fonts.mjs +28 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/png.mjs +132 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/route.mjs +218 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/motion.mjs +129 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/qa.mjs +92 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/render.mjs +233 -0
- package/marketplace/plugins/litcodex/skills/lit-schematic/scripts/scaffold.mjs +60 -0
- package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +34 -8
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +18 -14
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +12 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/assets.mjs +388 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/blender/runner.py +221 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/blender.mjs +132 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/board.mjs +142 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/constants.mjs +6 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-assets.mjs +7 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-capture.mjs +8 -7
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-init.js +14 -2
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover-treatment.mjs +38 -3
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/cover.mjs +19 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/driver.mjs +8 -8
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/gallery.mjs +147 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/house.mjs +45 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/image.mjs +89 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/look.mjs +58 -25
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/runtime.mjs +59 -14
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/safe-read.mjs +32 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/scaffold.mjs +208 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/score.mjs +668 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/sound.mjs +174 -31
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-gate.mjs +45 -3
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-kit.js +99 -1
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.js +8 -1
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.mjs +180 -11
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-render.mjs +42 -12
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-worker.mjs +7 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage.mjs +96 -10
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/styles.mjs +233 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/treatment.mjs +291 -14
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/hero-3d/expected.json +33 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/recipes/hero-3d/index.html +139 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/cover.md +44 -7
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/depth.md +156 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/design-choice.md +22 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/quality-gate.md +29 -7
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/runtime.md +1 -1
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/sound.md +87 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/stage.md +19 -7
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/studio.md +246 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/style-bibles.md +2 -2
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/treatment.md +41 -21
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/render.mjs +51 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/paper.json +185 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/swiss-signal.json +188 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/terminalcore.json +182 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/styles/tidal.json +187 -0
- package/marketplace/plugins/litcodex/skills/litresearch/SKILL.md +7 -0
- package/marketplace/plugins/litcodex/skills/litwork/SKILL.md +2 -1
- package/marketplace/plugins/litcodex/skills/readme-studio/SKILL.md +10 -0
- package/marketplace/plugins/litcodex/skills/review-work/SKILL.md +7 -1
- package/marketplace/plugins/litcodex/skills/start-work/SKILL.md +10 -0
- package/node_modules/@litcodex/lit-loop/directive.md +10 -4
- package/node_modules/@litcodex/lit-loop/directives/lit-adhd.md +191 -0
- package/node_modules/@litcodex/lit-loop/directives/lit-handoff.md +2 -0
- package/node_modules/@litcodex/lit-loop/directives/lit-hijack.md +219 -0
- package/node_modules/@litcodex/lit-loop/directives/lit-recap.md +2 -0
- package/node_modules/@litcodex/lit-loop/directives/lit-schematic.md +199 -0
- package/node_modules/@litcodex/lit-loop/directives/litwork.md +2 -1
- package/node_modules/@litcodex/lit-loop/dist/adhd-suggest.d.ts +10 -0
- package/node_modules/@litcodex/lit-loop/dist/adhd-suggest.js +67 -0
- package/node_modules/@litcodex/lit-loop/dist/card-html.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/card-html.js +128 -8
- package/node_modules/@litcodex/lit-loop/dist/card-looks.d.ts +19 -0
- package/node_modules/@litcodex/lit-loop/dist/card-looks.js +58 -0
- package/node_modules/@litcodex/lit-loop/dist/card-status.d.ts +27 -0
- package/node_modules/@litcodex/lit-loop/dist/card-status.js +94 -7
- package/node_modules/@litcodex/lit-loop/dist/cli.js +13 -3
- package/node_modules/@litcodex/lit-loop/dist/codex-hook.d.ts +2 -0
- package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +8 -9
- package/node_modules/@litcodex/lit-loop/dist/control-chars.d.ts +5 -0
- package/node_modules/@litcodex/lit-loop/dist/control-chars.js +23 -0
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +8 -0
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +118 -11
- package/node_modules/@litcodex/lit-loop/dist/hud.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/hud.js +29 -13
- package/node_modules/@litcodex/lit-loop/dist/lane-events.d.ts +13 -0
- package/node_modules/@litcodex/lit-loop/dist/lane-events.js +85 -0
- package/node_modules/@litcodex/lit-loop/dist/lane-state.d.ts +55 -0
- package/node_modules/@litcodex/lit-loop/dist/lane-state.js +227 -0
- package/node_modules/@litcodex/lit-loop/dist/live-step.d.ts +5 -1
- package/node_modules/@litcodex/lit-loop/dist/live-step.js +17 -1
- package/node_modules/@litcodex/lit-loop/dist/markers.d.ts +6 -0
- package/node_modules/@litcodex/lit-loop/dist/markers.js +6 -0
- package/node_modules/@litcodex/lit-loop/dist/modes.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/modes.js +25 -1
- package/node_modules/@litcodex/lit-loop/dist/motion-gate.d.ts +79 -0
- package/node_modules/@litcodex/lit-loop/dist/motion-gate.js +310 -0
- package/node_modules/@litcodex/lit-loop/dist/motion-route.js +5 -1
- package/node_modules/@litcodex/lit-loop/dist/plan-persistence.js +10 -0
- package/node_modules/@litcodex/lit-loop/dist/redaction.js +18 -0
- package/node_modules/@litcodex/lit-loop/dist/reentry.d.ts +15 -0
- package/node_modules/@litcodex/lit-loop/dist/reentry.js +46 -9
- package/node_modules/@litcodex/lit-loop/dist/rewind-cli.d.ts +10 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-cli.js +88 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-go.d.ts +20 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-go.js +84 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-look.d.ts +6 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-look.js +41 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-redact.d.ts +3 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-redact.js +40 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-rollout.d.ts +48 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind-rollout.js +292 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind.d.ts +162 -0
- package/node_modules/@litcodex/lit-loop/dist/rewind.js +773 -0
- package/node_modules/@litcodex/lit-loop/dist/route-heads.js +44 -2
- package/node_modules/@litcodex/lit-loop/dist/run-panel.js +1 -0
- package/node_modules/@litcodex/lit-loop/dist/schematic-route.d.ts +6 -0
- package/node_modules/@litcodex/lit-loop/dist/schematic-route.js +35 -0
- package/node_modules/@litcodex/lit-loop/dist/screen-card.d.ts +3 -0
- package/node_modules/@litcodex/lit-loop/dist/screen-card.js +15 -5
- package/node_modules/@litcodex/lit-loop/dist/skill-mention-scope.js +6 -0
- package/node_modules/@litcodex/lit-loop/dist/stack-hook.d.ts +8 -0
- package/node_modules/@litcodex/lit-loop/dist/stack-hook.js +57 -0
- package/node_modules/@litcodex/lit-loop/dist/statusline.js +8 -3
- package/node_modules/@litcodex/lit-loop/dist/threads.d.ts +50 -0
- package/node_modules/@litcodex/lit-loop/dist/threads.js +178 -0
- package/node_modules/@litcodex/lit-loop/dist/trigger.d.ts +1 -1
- package/node_modules/@litcodex/lit-loop/dist/trigger.js +29 -5
- package/node_modules/@litcodex/lit-loop/dist/workflow-map.d.ts +10 -0
- package/node_modules/@litcodex/lit-loop/dist/workflow-map.js +11 -1
- package/node_modules/@litcodex/lit-loop/dist/workflow-stack.d.ts +132 -0
- package/node_modules/@litcodex/lit-loop/dist/workflow-stack.js +488 -0
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/node_modules/@litcodex/lit-loop/skills/lit-adhd/SKILL.md +181 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-hijack/SKILL.md +449 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-loop/SKILL.md +13 -4
- package/node_modules/@litcodex/lit-loop/skills/lit-plan/SKILL.md +6 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-recap/SKILL.md +2 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-schematic/SKILL.md +198 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +34 -8
- package/node_modules/@litcodex/lit-loop/skills/litresearch/SKILL.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/litwork/SKILL.md +2 -1
- package/node_modules/@litcodex/lit-loop/skills/review-work/SKILL.md +7 -1
- package/node_modules/@litcodex/lit-loop/skills/start-work/SKILL.md +10 -0
- package/package.json +2 -2
- package/readme-assets/badge-version.svg +1 -1
- package/readme-assets/skills/lit-adhd.webp +0 -0
- package/readme-assets/skills/lit-hijack.webp +0 -0
- package/readme-assets/skills/lit-schematic.webp +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/control-chars.ts — record text is data. Strings that came from a repository, a rollout or a state file
|
|
2
|
+
// are stripped of C0/C1 controls (ESC, CSI, OSC and BEL among them) and of zero-width and bidi format
|
|
3
|
+
// characters before the brief, the text HUD or the card text prints them. A leaf module, so the card, the
|
|
4
|
+
// HUD and the collector can all use it.
|
|
5
|
+
const CONTROL = /[\u0000-\u001f\u007f-\u009f---]/gu;
|
|
6
|
+
export function clean(text) {
|
|
7
|
+
return text.replace(CONTROL, "");
|
|
8
|
+
}
|
|
9
|
+
/** Every string inside a plain value, cleaned; numbers, booleans and null pass through. */
|
|
10
|
+
export function cleanDeep(value) {
|
|
11
|
+
if (typeof value === "string")
|
|
12
|
+
return clean(value);
|
|
13
|
+
if (Array.isArray(value))
|
|
14
|
+
return value.map((item) => cleanDeep(item));
|
|
15
|
+
if (value !== null && typeof value === "object") {
|
|
16
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, cleanDeep(item)]));
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
/** A multi-line text with each line cleaned; the line breaks stay. */
|
|
21
|
+
export function cleanLines(text) {
|
|
22
|
+
return text.split("\n").map(clean).join("\n");
|
|
23
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type MotionEvaluator } from "./motion-gate.js";
|
|
1
2
|
/** Hard cap on stdin to bound memory / ReDoS exposure inside the 5 s Codex hook budget. 8 MB. */
|
|
2
3
|
export declare const MAX_STDIN_BYTES = 8000000;
|
|
3
4
|
/** Machine-readable error envelope emitted to stderr on a NON-zero exit. */
|
|
@@ -19,6 +20,8 @@ export declare function runUserPromptSubmitHookCli(stdin: NodeJS.ReadableStream,
|
|
|
19
20
|
export interface AutoHandoffHookOptions {
|
|
20
21
|
readonly env?: NodeJS.ProcessEnv;
|
|
21
22
|
readonly now?: number;
|
|
23
|
+
/** Replaces the installed film skill's done-check in the Stop gate; tests only. */
|
|
24
|
+
readonly evaluateMotion?: MotionEvaluator;
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
27
|
* Asks the model to open the LIT card for this LIT turn, so the live card sits next to the newest turn
|
|
@@ -46,3 +49,8 @@ export interface LiveStepHookOptions {
|
|
|
46
49
|
export declare function runPreToolUseLiveHookCli(stdin: NodeJS.ReadableStream, _stdout: NodeJS.WritableStream, _stderr: NodeJS.WritableStream, options?: LiveStepHookOptions): Promise<number>;
|
|
47
50
|
/** Catch-all PostToolUse: clear the live step this call set. Prints nothing; exits 0 on every input. */
|
|
48
51
|
export declare function runPostToolUseLiveHookCli(stdin: NodeJS.ReadableStream, _stdout: NodeJS.WritableStream, _stderr: NodeJS.WritableStream, options?: LiveStepHookOptions): Promise<number>;
|
|
52
|
+
/**
|
|
53
|
+
* SubagentStart and SubagentStop: a child agent began or ended, so its lane row appears or leaves. Prints
|
|
54
|
+
* nothing and exits 0 on every input, including one whose payload shape is not the one probed.
|
|
55
|
+
*/
|
|
56
|
+
export declare function runSubagentHookCli(kind: "start" | "stop", stdin: NodeJS.ReadableStream, options?: LiveStepHookOptions): Promise<number>;
|
|
@@ -8,14 +8,20 @@
|
|
|
8
8
|
// and NEVER throws.
|
|
9
9
|
import { isAbsolute } from "node:path";
|
|
10
10
|
import { Writable } from "node:stream";
|
|
11
|
+
import { adhdSuggestion } from "./adhd-suggest.js";
|
|
11
12
|
import { claimReloadContext, evaluateAutoHandoffStop, recordCompaction, takeReloadContext } from "./auto-handoff.js";
|
|
12
13
|
import { applyAutoHandoffRoute, clearManagedCompactionWhenOff, parseAutoHandoffRoute, } from "./auto-handoff-settings.js";
|
|
13
14
|
import { applyPreToolUseCreateGoalGuard, isLitUserPromptSubmitInput, runUserPromptSubmitHook } from "./codex-hook.js";
|
|
14
|
-
import {
|
|
15
|
+
import { laneScope, subagentEvent, toolLaneEvents } from "./lane-events.js";
|
|
16
|
+
import { recordLaneEvent } from "./lane-state.js";
|
|
17
|
+
import { detectWaitReason, endLiveStep, recordLiveStepEnd, recordLiveStepStart, recordTurnStart, writeThreadPointer, } from "./live-step.js";
|
|
18
|
+
import { armMotionTurn, disarmMotionTurn, evaluateMotionStop, recordMotionTool, } from "./motion-gate.js";
|
|
15
19
|
import { evaluatePlanPersistence, formatStopBlockOutput, rearmLitPlanIfSatisfied, recordLitPlanActivation, } from "./plan-persistence.js";
|
|
16
|
-
import { clearActiveRoute, isBareLit, readActiveRoute, readResumeWork, recordActiveRoute } from "./reentry.js";
|
|
20
|
+
import { clearActiveRoute, isBareLit, isLitContinue, readActiveRoute, readResumeWork, recordActiveRoute, } from "./reentry.js";
|
|
21
|
+
import { isBoundaryAnswer, isGoPrompt, takeGo } from "./rewind-go.js";
|
|
17
22
|
import { workflowCard } from "./screen-card.js";
|
|
18
23
|
import { screenColor } from "./screen-status.js";
|
|
24
|
+
import { applyPromptToStack, frameToResume } from "./stack-hook.js";
|
|
19
25
|
import { recordWorkflowTurn, workflowStopLine, workflowTurn } from "./workflow-map.js";
|
|
20
26
|
/** Hard cap on stdin to bound memory / ReDoS exposure inside the 5 s Codex hook budget. 8 MB. */
|
|
21
27
|
export const MAX_STDIN_BYTES = 8_000_000;
|
|
@@ -102,13 +108,61 @@ export async function runUserPromptSubmitHookCli(stdin, stdout, stderr, repoRoot
|
|
|
102
108
|
return 0;
|
|
103
109
|
}
|
|
104
110
|
clearManagedCompactionWhenOff(hookCwd(parsed, repoRoot), auto.env ?? process.env);
|
|
111
|
+
// `lit approve` / `lit deny` answer a start-work boundary; the lifecycle hook owns them, so this one stays out.
|
|
112
|
+
if (isLitUserPromptSubmitInput(parsed) && isBoundaryAnswer(parsed.prompt))
|
|
113
|
+
return 0;
|
|
114
|
+
// `go` after a lit-adhd brief runs the one step the brief named, as if the user had typed that step.
|
|
115
|
+
let goNote = null;
|
|
116
|
+
if (isLitUserPromptSubmitInput(parsed) && isGoPrompt(parsed.prompt)) {
|
|
117
|
+
const scope = hookSessionScope(parsed, repoRoot);
|
|
118
|
+
const go = scope === null ? null : takeGo(scope.cwd, scope.sessionId, auto.now ?? Date.now());
|
|
119
|
+
if (go?.kind === "hint") {
|
|
120
|
+
stdout.write(withReloadContext("", go.text) ?? "");
|
|
121
|
+
return 0;
|
|
122
|
+
}
|
|
123
|
+
if (go?.kind === "run") {
|
|
124
|
+
parsed = { ...parsed, prompt: go.prompt };
|
|
125
|
+
goNote = go.note;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
105
128
|
const pointer = hookSessionScope(parsed, repoRoot);
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
129
|
+
const savedRoute = pointer === null ? null : readActiveRoute(pointer.cwd, pointer.sessionId);
|
|
130
|
+
// An active lit-plan owns the persistence gate, so `lit continue` stays inside it rather than leaving it armed.
|
|
131
|
+
const litContinue = pointer !== null &&
|
|
132
|
+
savedRoute !== "lit-plan" &&
|
|
133
|
+
isLitUserPromptSubmitInput(parsed) &&
|
|
134
|
+
isLitContinue(parsed.prompt);
|
|
135
|
+
// `lit continue` over a side discipline returns to the paused spine, at the stage and count it left.
|
|
136
|
+
const spine = litContinue ? frameToResume(pointer.cwd, pointer.sessionId) : null;
|
|
137
|
+
const decision = runUserPromptSubmitHook(parsed, () => {
|
|
138
|
+
const saved = savedRoute;
|
|
139
|
+
return {
|
|
140
|
+
active: spine !== null && saved !== null ? spine.skill : saved,
|
|
141
|
+
resume: pointer === null ? null : readResumeWork(pointer.cwd, pointer.sessionId),
|
|
142
|
+
frame: spine === null
|
|
143
|
+
? null
|
|
144
|
+
: {
|
|
145
|
+
skill: spine.skill ?? "work",
|
|
146
|
+
stage: spine.stage,
|
|
147
|
+
...(spine.n === undefined ? {} : { n: spine.n }),
|
|
148
|
+
...(spine.total === undefined ? {} : { total: spine.total }),
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
// A film prompt arms the completion gate for this session; any other prompt disarms it.
|
|
153
|
+
if (pointer !== null && isLitUserPromptSubmitInput(parsed)) {
|
|
154
|
+
if (decision.kind === "inject" && decision.film === true)
|
|
155
|
+
armMotionTurn(pointer.cwd, pointer.sessionId, auto.now);
|
|
156
|
+
else
|
|
157
|
+
disarmMotionTurn(pointer.cwd, pointer.sessionId);
|
|
158
|
+
}
|
|
159
|
+
// A read-only brief never takes the saved route: the work under it keeps its contract and its place.
|
|
160
|
+
if (pointer !== null && decision.kind === "inject" && decision.mode !== "lit-adhd") {
|
|
161
|
+
recordActiveRoute(pointer.cwd, pointer.sessionId, spine?.skill ?? decision.mode);
|
|
162
|
+
}
|
|
163
|
+
if (pointer !== null && isLitUserPromptSubmitInput(parsed) && (litContinue || decision.kind === "inject")) {
|
|
164
|
+
applyPromptToStack(pointer.cwd, pointer.sessionId, parsed.prompt, { continued: litContinue, mode: decision.kind === "inject" ? decision.mode : null }, auto.now === undefined ? undefined : new Date(auto.now));
|
|
165
|
+
}
|
|
112
166
|
// Only a LIT thread gets a pointer: this prompt ignites LIT, or an earlier one already did.
|
|
113
167
|
if (pointer !== null && (decision.kind === "inject" || workflowTurn(pointer.cwd, pointer.sessionId) !== null)) {
|
|
114
168
|
writeThreadPointer(auto.env ?? process.env, pointer.sessionId, pointer.cwd, auto.now);
|
|
@@ -129,7 +183,8 @@ export async function runUserPromptSubmitHookCli(stdin, stdout, stderr, repoRoot
|
|
|
129
183
|
const own = decision.kind === "inject"
|
|
130
184
|
? withCardOffer(withWorkflowMap(decision.stdout, parsed, decision.mode, env), pointer, auto, decision.entry === "continue")
|
|
131
185
|
: "";
|
|
132
|
-
const
|
|
186
|
+
const noted = goNote === null || own === "" ? own : (withReloadContext(own, goNote) ?? own);
|
|
187
|
+
const output = withAutoHandoffReload(noted, parsed, repoRoot, auto);
|
|
133
188
|
if (output !== "")
|
|
134
189
|
stdout.write(output);
|
|
135
190
|
return 0;
|
|
@@ -328,7 +383,18 @@ export async function runStopPlanPersistenceHookCli(stdin, stdout, stderr, repoR
|
|
|
328
383
|
// A subagent's Stop carries the parent's session id; the parent's turn is still running.
|
|
329
384
|
if (isSubagent(parsed))
|
|
330
385
|
return 0;
|
|
331
|
-
|
|
386
|
+
const motion = await evaluateMotionStop({
|
|
387
|
+
cwd: scope.cwd,
|
|
388
|
+
sessionId: scope.sessionId,
|
|
389
|
+
...(auto.now === undefined ? {} : { now: auto.now }),
|
|
390
|
+
...(auto.evaluateMotion === undefined ? {} : { evaluate: auto.evaluateMotion }),
|
|
391
|
+
});
|
|
392
|
+
if (motion.action === "block") {
|
|
393
|
+
stdout.write(formatStopBlockOutput(motion.reason));
|
|
394
|
+
return 0;
|
|
395
|
+
}
|
|
396
|
+
const lastMsg = typeof record["last_assistant_message"] === "string" ? record["last_assistant_message"] : null;
|
|
397
|
+
endLiveStep(scope.cwd, scope.sessionId, auto.now, true, detectWaitReason(lastMsg));
|
|
332
398
|
const env = auto.env ?? process.env;
|
|
333
399
|
const line = typeof record["turn_id"] === "string"
|
|
334
400
|
? workflowStopLine(scope.cwd, scope.sessionId, record["turn_id"], {
|
|
@@ -371,6 +437,16 @@ export async function runSessionStartHookCli(stdin, stdout, stderr, repoRoot = p
|
|
|
371
437
|
return event.exit;
|
|
372
438
|
clearManagedCompactionWhenOff(hookCwd(event.parsed, repoRoot), auto.env ?? process.env);
|
|
373
439
|
const record = event.parsed;
|
|
440
|
+
if (typeof record === "object" &&
|
|
441
|
+
record !== null &&
|
|
442
|
+
(record["source"] === "startup" || record["source"] === "resume")) {
|
|
443
|
+
const opened = hookSessionScope(record, repoRoot);
|
|
444
|
+
const offer = opened === null ? null : adhdSuggestion(opened.cwd, opened.sessionId);
|
|
445
|
+
if (offer !== null) {
|
|
446
|
+
stdout.write(`${JSON.stringify({ hookSpecificOutput: { hookEventName: "SessionStart", additionalContext: offer } })}\n`);
|
|
447
|
+
}
|
|
448
|
+
return 0;
|
|
449
|
+
}
|
|
374
450
|
if (typeof record !== "object" || record === null || record["source"] !== "compact")
|
|
375
451
|
return 0;
|
|
376
452
|
const scope = hookSessionScope(record, repoRoot);
|
|
@@ -461,8 +537,39 @@ export async function runPostToolUseLiveHookCli(stdin, _stdout, _stderr, options
|
|
|
461
537
|
if (event.exit !== null)
|
|
462
538
|
return 0;
|
|
463
539
|
const scope = toolEventScope(event.parsed);
|
|
540
|
+
const now = options.now ?? Date.now();
|
|
464
541
|
if (scope !== null && !OWN_CARD_TOOL.test(scope.tool))
|
|
465
|
-
recordLiveStepEnd(scope.cwd, scope.sessionId, scope,
|
|
542
|
+
recordLiveStepEnd(scope.cwd, scope.sessionId, scope, now);
|
|
543
|
+
recordLanes(event.parsed, toolLaneEvents, now);
|
|
544
|
+
// A shell call that ran the film renderer is noted for the completion gate (motion-gate.ts).
|
|
545
|
+
recordMotionTool(event.parsed, now);
|
|
546
|
+
return 0;
|
|
547
|
+
}
|
|
548
|
+
/** Fold a hook payload's lane events into the session's lane records; only a LIT thread has lanes to draw. */
|
|
549
|
+
function recordLanes(parsed, read, now) {
|
|
550
|
+
try {
|
|
551
|
+
const scope = laneScope(parsed);
|
|
552
|
+
if (scope === null || workflowTurn(scope.cwd, scope.sessionId) === null)
|
|
553
|
+
return;
|
|
554
|
+
for (const laneEvent of read(parsed))
|
|
555
|
+
recordLaneEvent(scope.cwd, scope.sessionId, laneEvent, now);
|
|
556
|
+
}
|
|
557
|
+
catch {
|
|
558
|
+
// Lanes only decorate the card; a hook never fails because of them.
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* SubagentStart and SubagentStop: a child agent began or ended, so its lane row appears or leaves. Prints
|
|
563
|
+
* nothing and exits 0 on every input, including one whose payload shape is not the one probed.
|
|
564
|
+
*/
|
|
565
|
+
export async function runSubagentHookCli(kind, stdin, options = {}) {
|
|
566
|
+
const event = await readHookEvent(stdin, nullSink());
|
|
567
|
+
if (event.exit !== null)
|
|
568
|
+
return 0;
|
|
569
|
+
recordLanes(event.parsed, (parsed) => {
|
|
570
|
+
const laneEvent = subagentEvent(parsed, kind);
|
|
571
|
+
return laneEvent === null ? [] : [laneEvent];
|
|
572
|
+
}, options.now ?? Date.now());
|
|
466
573
|
return 0;
|
|
467
574
|
}
|
|
468
575
|
/** Swallows the parse errors the shared reader reports; the live-step hooks stay silent. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CardStatus } from "./card-status.js";
|
|
2
|
+
export { clean } from "./control-chars.js";
|
|
2
3
|
export interface HudSession {
|
|
3
4
|
readonly id: string;
|
|
4
5
|
readonly cwd: string;
|
|
@@ -31,7 +32,6 @@ export declare function listSessions(env: NodeJS.ProcessEnv): HudSession[];
|
|
|
31
32
|
export declare function pickSession(env: NodeJS.ProcessEnv, wanted?: string | null): HudSession | null;
|
|
32
33
|
/** Everything one frame needs, read once. Never throws and never writes. */
|
|
33
34
|
export declare function readHud(env: NodeJS.ProcessEnv, wanted: string | null, now: number): HudView;
|
|
34
|
-
export declare function clean(text: string): string;
|
|
35
35
|
/** The card with every record-derived string stripped of control characters. */
|
|
36
36
|
export declare function cleanStatus(status: CardStatus): CardStatus;
|
|
37
37
|
/** Terminal cells a plain string takes: CJK and emoji take two, combining marks none. */
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
import { lstatSync, readdirSync } from "node:fs";
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import { cardStatusText, readCardStatus } from "./card-status.js";
|
|
14
|
+
import { clean, cleanDeep } from "./control-chars.js";
|
|
14
15
|
import { codexHomeFrom, liveStepPath, plainDirsOrMissing, readLiveStep, readSmallJson, readThreadPointer, threadPointerPath, } from "./live-step.js";
|
|
15
16
|
import { LIT_LOOP_DIR, LIT_LOOP_GOALS, normalizeSessionId } from "./state-paths.js";
|
|
16
17
|
import { workflowTurn } from "./workflow-map.js";
|
|
18
|
+
export { clean } from "./control-chars.js";
|
|
17
19
|
const POINTER_DIR = "litcodex/lit-loop/threads";
|
|
18
20
|
const MAX_LIVE_STEP_BYTES = 4_096;
|
|
19
21
|
/** The cap the workflow map itself reads its state files under. */
|
|
@@ -183,19 +185,9 @@ export function readHud(env, wanted, now) {
|
|
|
183
185
|
return { wanted, session: null, status: null, unreadable: ["LIT records"] };
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
|
-
/** C0/C1 controls (ESC, CSI, BEL among them) plus zero-width and bidi format characters. */
|
|
187
|
-
const CONTROL = /[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u202a-\u202e\u2066-\u2069]/gu;
|
|
188
|
-
export function clean(text) {
|
|
189
|
-
return text.replace(CONTROL, "");
|
|
190
|
-
}
|
|
191
188
|
/** The card with every record-derived string stripped of control characters. */
|
|
192
189
|
export function cleanStatus(status) {
|
|
193
|
-
return
|
|
194
|
-
...status,
|
|
195
|
-
mode: status.mode === null ? null : clean(status.mode),
|
|
196
|
-
step: status.step === null ? null : { ...status.step, tool: clean(status.step.tool) },
|
|
197
|
-
map: status.map === null ? null : { ...status.map, next: status.map.next === null ? null : clean(status.map.next) },
|
|
198
|
-
};
|
|
190
|
+
return cleanDeep(status);
|
|
199
191
|
}
|
|
200
192
|
const MARK = /^\p{M}$/u;
|
|
201
193
|
const WIDE_EMOJI = /^\p{Emoji_Presentation}$/u;
|
|
@@ -257,6 +249,22 @@ function age(lastSeen, now) {
|
|
|
257
249
|
const BOLD = "\u001b[1m";
|
|
258
250
|
const DIM = "\u001b[2m";
|
|
259
251
|
const RESET = "\u001b[0m";
|
|
252
|
+
const AMBER_FG = "\u001b[38;2;255;175;60m";
|
|
253
|
+
const GREEN_FG = "\u001b[38;2;107;219;143m";
|
|
254
|
+
/** 256-colour codes, one per cell: red, orange, yellow, green, cyan, blue, violet, pink. */
|
|
255
|
+
const RAINBOW = [203, 209, 221, 114, 80, 75, 141, 205];
|
|
256
|
+
/** One line tinted cell by cell through the rainbow; still, never animated. */
|
|
257
|
+
function rainbowLine(line) {
|
|
258
|
+
let index = 0;
|
|
259
|
+
let out = BOLD;
|
|
260
|
+
for (const cell of cells(line)) {
|
|
261
|
+
if (cell.text === " ")
|
|
262
|
+
out += cell.text;
|
|
263
|
+
else
|
|
264
|
+
out += `\u001b[38;5;${RAINBOW[index++ % RAINBOW.length]}m${cell.text}`;
|
|
265
|
+
}
|
|
266
|
+
return `${out}${RESET}`;
|
|
267
|
+
}
|
|
260
268
|
/** One frame as text: a header, the card, and at most one "cannot read" line. Pure. */
|
|
261
269
|
export function renderHud(view, options) {
|
|
262
270
|
const width = Math.max(10, Math.floor(options.width));
|
|
@@ -280,17 +288,25 @@ export function renderHud(view, options) {
|
|
|
280
288
|
else {
|
|
281
289
|
const { id, folder, lastSeen } = view.session;
|
|
282
290
|
lines.push({ text: `${id.slice(0, SHORT_ID)} · ${clean(folder)} · ${age(lastSeen, options.now)}`, style: DIM });
|
|
291
|
+
const look = view.status?.look ?? null;
|
|
292
|
+
const tint = look === "turn" ? AMBER_FG : look === "done" ? GREEN_FG : "";
|
|
283
293
|
cardStatusText(cleanStatus(view.status))
|
|
284
294
|
.split("\n")
|
|
285
295
|
.forEach((text, index) => {
|
|
286
|
-
lines.push({
|
|
296
|
+
lines.push({
|
|
297
|
+
text,
|
|
298
|
+
style: index === 0 ? `${BOLD}${tint}` : tint || "",
|
|
299
|
+
rainbow: index === 0 && look === "rewind",
|
|
300
|
+
});
|
|
287
301
|
});
|
|
288
302
|
}
|
|
289
303
|
if (view.unreadable.length > 0)
|
|
290
304
|
lines.push({ text: `cannot read ${view.unreadable.join(", ")}`, style: DIM });
|
|
291
305
|
return lines
|
|
292
|
-
.map(({ text, style }) => {
|
|
306
|
+
.map(({ text, style, rainbow }) => {
|
|
293
307
|
const line = fit(clean(text), width);
|
|
308
|
+
if (options.color && rainbow === true)
|
|
309
|
+
return rainbowLine(line);
|
|
294
310
|
return options.color && style !== "" ? `${style}${line}${RESET}` : line;
|
|
295
311
|
})
|
|
296
312
|
.join("\n");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type LaneCounts, type LaneEvent } from "./lane-state.js";
|
|
2
|
+
export interface LaneScope {
|
|
3
|
+
readonly sessionId: string;
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
}
|
|
6
|
+
/** The session and workspace a payload names; null unless both are present and the workspace is absolute. */
|
|
7
|
+
export declare function laneScope(parsed: unknown): LaneScope | null;
|
|
8
|
+
/** The lane event a `SubagentStart` or `SubagentStop` payload carries, or null. */
|
|
9
|
+
export declare function subagentEvent(parsed: unknown, kind: "start" | "stop"): LaneEvent | null;
|
|
10
|
+
/** Done and total of an `update_plan` list (`plan: [{ step, status }]`); null for an empty or odd one. */
|
|
11
|
+
export declare function planCounts(toolInput: unknown): LaneCounts | null;
|
|
12
|
+
/** The lane events one `PostToolUse` payload carries: a spawn's name, an `update_plan` count, a child's step. */
|
|
13
|
+
export declare function toolLaneEvents(parsed: unknown): LaneEvent[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// src/lane-events.ts — reads Codex hook payloads into lane events, failing open.
|
|
2
|
+
//
|
|
3
|
+
// Shapes seen on codex-cli 0.164.0 (probed against a fake Responses provider, 2026-10-26):
|
|
4
|
+
// SubagentStart { session_id (the parent's), turn_id, cwd, agent_id, agent_type }
|
|
5
|
+
// SubagentStop the same plus agent_transcript_path, stop_hook_active, last_assistant_message
|
|
6
|
+
// PostToolUse from a child: the usual fields plus agent_id and agent_type
|
|
7
|
+
// spawn_agent PostToolUse of the parent: tool_response is the JSON text {"agent_id","nickname"}
|
|
8
|
+
// A payload that does not look like this yields no event: no row is drawn and nothing is printed.
|
|
9
|
+
// Only ids, a plain display name, the agent type and plan counts leave a payload; a prompt, a command,
|
|
10
|
+
// a tool input or a model message never does.
|
|
11
|
+
import { isAbsolute } from "node:path";
|
|
12
|
+
import { laneKind, laneName } from "./lane-state.js";
|
|
13
|
+
function isRecord(value) {
|
|
14
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
15
|
+
}
|
|
16
|
+
function text(value, max = 128) {
|
|
17
|
+
return typeof value === "string" && value !== "" && value.length <= max ? value : null;
|
|
18
|
+
}
|
|
19
|
+
/** The session and workspace a payload names; null unless both are present and the workspace is absolute. */
|
|
20
|
+
export function laneScope(parsed) {
|
|
21
|
+
if (!isRecord(parsed))
|
|
22
|
+
return null;
|
|
23
|
+
const sessionId = text(parsed["session_id"]);
|
|
24
|
+
const cwd = text(parsed["cwd"], 4096);
|
|
25
|
+
return sessionId === null || cwd === null || !isAbsolute(cwd) ? null : { sessionId, cwd };
|
|
26
|
+
}
|
|
27
|
+
/** The lane event a `SubagentStart` or `SubagentStop` payload carries, or null. */
|
|
28
|
+
export function subagentEvent(parsed, kind) {
|
|
29
|
+
if (!isRecord(parsed))
|
|
30
|
+
return null;
|
|
31
|
+
const agentId = text(parsed["agent_id"]);
|
|
32
|
+
if (agentId === null)
|
|
33
|
+
return null;
|
|
34
|
+
return kind === "stop"
|
|
35
|
+
? { type: "stopped", agentId }
|
|
36
|
+
: { type: "started", agentId, kind: laneKind(parsed["agent_type"]) };
|
|
37
|
+
}
|
|
38
|
+
function parseJson(value) {
|
|
39
|
+
if (typeof value !== "string" || value.length > 4096)
|
|
40
|
+
return value;
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(value);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** Done and total of an `update_plan` list (`plan: [{ step, status }]`); null for an empty or odd one. */
|
|
49
|
+
export function planCounts(toolInput) {
|
|
50
|
+
const plan = isRecord(toolInput) ? toolInput["plan"] : null;
|
|
51
|
+
if (!Array.isArray(plan) || plan.length === 0 || plan.length > 200)
|
|
52
|
+
return null;
|
|
53
|
+
let done = 0;
|
|
54
|
+
for (const item of plan) {
|
|
55
|
+
const status = isRecord(item) ? item["status"] : null;
|
|
56
|
+
if (status !== "pending" && status !== "in_progress" && status !== "completed")
|
|
57
|
+
return null;
|
|
58
|
+
if (status === "completed")
|
|
59
|
+
done += 1;
|
|
60
|
+
}
|
|
61
|
+
return { done, total: plan.length };
|
|
62
|
+
}
|
|
63
|
+
/** The lane events one `PostToolUse` payload carries: a spawn's name, an `update_plan` count, a child's step. */
|
|
64
|
+
export function toolLaneEvents(parsed) {
|
|
65
|
+
if (!isRecord(parsed))
|
|
66
|
+
return [];
|
|
67
|
+
const tool = text(parsed["tool_name"], 128);
|
|
68
|
+
const agentId = text(parsed["agent_id"]);
|
|
69
|
+
const events = [];
|
|
70
|
+
if (tool === "spawn_agent") {
|
|
71
|
+
const reply = parseJson(parsed["tool_response"]);
|
|
72
|
+
const spawned = isRecord(reply) ? text(reply["agent_id"]) : null;
|
|
73
|
+
if (spawned !== null)
|
|
74
|
+
events.push({ type: "spawned", agentId: spawned, name: laneName(isRecord(reply) ? reply["nickname"] : null) });
|
|
75
|
+
return events;
|
|
76
|
+
}
|
|
77
|
+
if (tool === "update_plan") {
|
|
78
|
+
const counts = planCounts(parsed["tool_input"]);
|
|
79
|
+
if (counts !== null)
|
|
80
|
+
events.push({ type: "plan", agentId, counts });
|
|
81
|
+
}
|
|
82
|
+
if (agentId !== null && tool !== null)
|
|
83
|
+
events.push({ type: "tool", agentId });
|
|
84
|
+
return events;
|
|
85
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const LANE_DIR = ".litcodex/lane-state";
|
|
2
|
+
export declare const MAX_LANES = 12;
|
|
3
|
+
/** A lane nobody touched for this long lost its stop event (a killed child); it is no longer shown. */
|
|
4
|
+
export declare const LANE_STALE_MS: number;
|
|
5
|
+
/** A lane quiet for this long reads `idle` instead of `running`. */
|
|
6
|
+
export declare const LANE_IDLE_MS: number;
|
|
7
|
+
export interface LaneCounts {
|
|
8
|
+
readonly done: number;
|
|
9
|
+
readonly total: number;
|
|
10
|
+
}
|
|
11
|
+
export interface LaneRecord {
|
|
12
|
+
readonly agentId: string;
|
|
13
|
+
readonly name: string | null;
|
|
14
|
+
readonly kind: string | null;
|
|
15
|
+
readonly started: boolean;
|
|
16
|
+
readonly startedAt: number | null;
|
|
17
|
+
readonly at: number;
|
|
18
|
+
readonly steps: number;
|
|
19
|
+
readonly plan: LaneCounts | null;
|
|
20
|
+
}
|
|
21
|
+
export type LaneEvent = {
|
|
22
|
+
readonly type: "spawned";
|
|
23
|
+
readonly agentId: string;
|
|
24
|
+
readonly name: string | null;
|
|
25
|
+
} | {
|
|
26
|
+
readonly type: "started";
|
|
27
|
+
readonly agentId: string;
|
|
28
|
+
readonly kind: string | null;
|
|
29
|
+
} | {
|
|
30
|
+
readonly type: "stopped";
|
|
31
|
+
readonly agentId: string;
|
|
32
|
+
} | {
|
|
33
|
+
readonly type: "tool";
|
|
34
|
+
readonly agentId: string;
|
|
35
|
+
} | {
|
|
36
|
+
readonly type: "plan";
|
|
37
|
+
readonly agentId: string | null;
|
|
38
|
+
readonly counts: LaneCounts;
|
|
39
|
+
};
|
|
40
|
+
/** A display name that is plain letters, digits, spaces and `._-`, at most 24 characters; else null. */
|
|
41
|
+
export declare function laneName(value: unknown): string | null;
|
|
42
|
+
/** An agent type such as `default` or `explorer`; anything else is not shown. */
|
|
43
|
+
export declare function laneKind(value: unknown): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Apply one event to a lane record and return the next one, or null when the lane is gone. Pure.
|
|
46
|
+
* `started` and `spawned` open a record; `tool` and `plan` only update a record whose child already
|
|
47
|
+
* started, so a stray event never draws a lane that has no end.
|
|
48
|
+
*/
|
|
49
|
+
export declare function applyLaneEvent(lane: LaneRecord | null, event: LaneEvent, now: number): LaneRecord | null;
|
|
50
|
+
/** Read, apply one event and write back. Never throws. */
|
|
51
|
+
export declare function recordLaneEvent(cwd: string, sessionId: string, event: LaneEvent, now?: number): void;
|
|
52
|
+
/** The lanes to draw: started, not stale, oldest first; a spawn that never started is not one. */
|
|
53
|
+
export declare function readLanes(cwd: string, sessionId: string, now?: number): LaneRecord[];
|
|
54
|
+
/** The main thread's last `update_plan` counts, or null when it kept none. */
|
|
55
|
+
export declare function readMainPlan(cwd: string, sessionId: string): LaneCounts | null;
|