self-evolving-workflow 0.0.0-stage → 0.1.4
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/LICENSE +27 -0
- package/README.md +195 -2
- package/dist/agent-memory-prompts.d.ts +13 -0
- package/dist/agent-memory-prompts.js +55 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +6 -0
- package/dist/closeout.d.ts +105 -0
- package/dist/closeout.js +473 -0
- package/dist/code.d.ts +39 -0
- package/dist/code.js +124 -0
- package/dist/codex-memory.d.ts +24 -0
- package/dist/codex-memory.js +217 -0
- package/dist/common.d.ts +16 -0
- package/dist/common.js +52 -0
- package/dist/context-envelope.d.ts +59 -0
- package/dist/context-envelope.js +23 -0
- package/dist/host-adapters.d.ts +34 -0
- package/dist/host-adapters.js +151 -0
- package/dist/http.d.ts +3 -0
- package/dist/http.js +90 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +13 -0
- package/dist/knowledge-cli.d.ts +198 -0
- package/dist/knowledge-cli.js +761 -0
- package/dist/knowledge-reads.d.ts +72 -0
- package/dist/knowledge-reads.js +201 -0
- package/dist/memory-config.d.ts +44 -0
- package/dist/memory-config.js +204 -0
- package/dist/memory-evidence.d.ts +13 -0
- package/dist/memory-evidence.js +40 -0
- package/dist/memory-history.d.ts +46 -0
- package/dist/memory-history.js +432 -0
- package/dist/memory.d.ts +96 -0
- package/dist/memory.js +362 -0
- package/dist/retrospective.d.ts +57 -0
- package/dist/retrospective.js +240 -0
- package/dist/search.d.ts +36 -0
- package/dist/search.js +112 -0
- package/dist/skill-addition.d.ts +25 -0
- package/dist/skill-addition.js +89 -0
- package/dist/skill-design.d.ts +96 -0
- package/dist/skill-design.js +226 -0
- package/dist/skill-replay.d.ts +55 -0
- package/dist/skill-replay.js +448 -0
- package/dist/skill-route.d.ts +30 -0
- package/dist/skill-route.js +75 -0
- package/dist/transcript-evidence.d.ts +3 -0
- package/dist/transcript-evidence.js +58 -0
- package/dist/upstream/chunker.d.ts +24 -0
- package/dist/upstream/chunker.js +96 -0
- package/dist/upstream/file-protocol.d.ts +45 -0
- package/dist/upstream/file-protocol.js +117 -0
- package/dist/upstream/frontmatter.d.ts +47 -0
- package/dist/upstream/frontmatter.js +86 -0
- package/dist/upstream/graph-search.d.ts +33 -0
- package/dist/upstream/graph-search.js +67 -0
- package/dist/upstream/l1-extraction.d.ts +26 -0
- package/dist/upstream/l1-extraction.js +405 -0
- package/dist/upstream/llm.d.ts +8 -0
- package/dist/upstream/llm.js +1 -0
- package/dist/upstream/merge.d.ts +50 -0
- package/dist/upstream/merge.js +153 -0
- package/dist/upstream/prompts.d.ts +53 -0
- package/dist/upstream/prompts.js +181 -0
- package/dist/upstream/search-utils.d.ts +34 -0
- package/dist/upstream/search-utils.js +55 -0
- package/dist/upstream/slug.d.ts +26 -0
- package/dist/upstream/slug.js +103 -0
- package/dist/upstream/template.d.ts +29 -0
- package/dist/upstream/template.js +80 -0
- package/dist/upstream/tokenize.d.ts +4 -0
- package/dist/upstream/tokenize.js +29 -0
- package/dist/wiki-change.d.ts +76 -0
- package/dist/wiki-change.js +299 -0
- package/dist/wiki-entry.d.ts +26 -0
- package/dist/wiki-entry.js +93 -0
- package/dist/wiki-ingest.d.ts +12 -0
- package/dist/wiki-ingest.js +126 -0
- package/dist/wiki-migration.d.ts +16 -0
- package/dist/wiki-migration.js +268 -0
- package/dist/wiki-tokens.d.ts +1 -0
- package/dist/wiki-tokens.js +46 -0
- package/dist/wiki.d.ts +103 -0
- package/dist/wiki.js +330 -0
- package/dist/workflow-cli.d.ts +2 -0
- package/dist/workflow-cli.js +319 -0
- package/dist/workflow-install.d.ts +37 -0
- package/dist/workflow-install.js +148 -0
- package/dist/workflow-knowledge.d.ts +18 -0
- package/dist/workflow-knowledge.js +32 -0
- package/dist/workflow-mcp.d.ts +2 -0
- package/dist/workflow-mcp.js +137 -0
- package/dist/workflow-names.d.ts +4 -0
- package/dist/workflow-names.js +31 -0
- package/dist/workflow-runtime.d.ts +735 -0
- package/dist/workflow-runtime.js +747 -0
- package/dist/workflow-skills.d.ts +48 -0
- package/dist/workflow-skills.js +141 -0
- package/docs/images/impeccable-skill.png +0 -0
- package/docs/images/workflow-overview.png +0 -0
- package/docs/images/workflow-skills.png +0 -0
- package/package.json +77 -4
- package/skills/ew-impeccable/LICENSE +191 -0
- package/skills/ew-impeccable/NOTICE.md +19 -0
- package/skills/ew-impeccable/SKILL.md +91 -0
- package/skills/ew-impeccable/UPSTREAM.md +23 -0
- package/skills/ew-impeccable/reference/adapt.md +314 -0
- package/skills/ew-impeccable/reference/adapt.native.md +60 -0
- package/skills/ew-impeccable/reference/android.md +46 -0
- package/skills/ew-impeccable/reference/animate.md +91 -0
- package/skills/ew-impeccable/reference/audit.md +138 -0
- package/skills/ew-impeccable/reference/audit.native.md +141 -0
- package/skills/ew-impeccable/reference/bolder.md +35 -0
- package/skills/ew-impeccable/reference/clarify.md +96 -0
- package/skills/ew-impeccable/reference/colorize.md +88 -0
- package/skills/ew-impeccable/reference/craft-floor.md +44 -0
- package/skills/ew-impeccable/reference/craft.md +5 -0
- package/skills/ew-impeccable/reference/critique.md +808 -0
- package/skills/ew-impeccable/reference/degraded/asset-producer.md +36 -0
- package/skills/ew-impeccable/reference/degraded/documenter.md +23 -0
- package/skills/ew-impeccable/reference/degraded/finish-reviewer.md +72 -0
- package/skills/ew-impeccable/reference/degraded/manual-edit-applier.md +91 -0
- package/skills/ew-impeccable/reference/delight.md +72 -0
- package/skills/ew-impeccable/reference/distill.md +113 -0
- package/skills/ew-impeccable/reference/doctor.md +56 -0
- package/skills/ew-impeccable/reference/document.md +418 -0
- package/skills/ew-impeccable/reference/extract.md +68 -0
- package/skills/ew-impeccable/reference/harden.md +338 -0
- package/skills/ew-impeccable/reference/hooks.md +113 -0
- package/skills/ew-impeccable/reference/init.md +133 -0
- package/skills/ew-impeccable/reference/ios.md +51 -0
- package/skills/ew-impeccable/reference/layout.md +86 -0
- package/skills/ew-impeccable/reference/live-setup.md +102 -0
- package/skills/ew-impeccable/reference/live.md +326 -0
- package/skills/ew-impeccable/reference/new-work.md +209 -0
- package/skills/ew-impeccable/reference/onboard.md +236 -0
- package/skills/ew-impeccable/reference/operate.md +61 -0
- package/skills/ew-impeccable/reference/optimize.md +260 -0
- package/skills/ew-impeccable/reference/overdrive.md +127 -0
- package/skills/ew-impeccable/reference/polish.md +105 -0
- package/skills/ew-impeccable/reference/quieter.md +101 -0
- package/skills/ew-impeccable/reference/routing.md +20 -0
- package/skills/ew-impeccable/reference/shape.md +59 -0
- package/skills/ew-impeccable/reference/typeset.md +82 -0
- package/skills/ew-impeccable/reference/visualize.md +46 -0
- package/skills/ew-impeccable/scripts/build-phase.mjs +1022 -0
- package/skills/ew-impeccable/scripts/command-metadata.json +94 -0
- package/skills/ew-impeccable/scripts/comp-diff.mjs +391 -0
- package/skills/ew-impeccable/scripts/comp-spec.mjs +513 -0
- package/skills/ew-impeccable/scripts/concept-seed.mjs +814 -0
- package/skills/ew-impeccable/scripts/context-signals.mjs +325 -0
- package/skills/ew-impeccable/scripts/context.mjs +1521 -0
- package/skills/ew-impeccable/scripts/critique-storage.mjs +473 -0
- package/skills/ew-impeccable/scripts/data/font-index-failures.json +121 -0
- package/skills/ew-impeccable/scripts/data/font-index.json +1 -0
- package/skills/ew-impeccable/scripts/detect-csp.mjs +246 -0
- package/skills/ew-impeccable/scripts/detect.mjs +30 -0
- package/skills/ew-impeccable/scripts/detector/browser/injected/index.mjs +2580 -0
- package/skills/ew-impeccable/scripts/detector/cli/main.mjs +498 -0
- package/skills/ew-impeccable/scripts/detector/design-system.mjs +1311 -0
- package/skills/ew-impeccable/scripts/detector/detect-antipatterns-browser.js +9486 -0
- package/skills/ew-impeccable/scripts/detector/detect-antipatterns.mjs +51 -0
- package/skills/ew-impeccable/scripts/detector/engines/browser/detect-url.mjs +434 -0
- package/skills/ew-impeccable/scripts/detector/engines/regex/detect-text.mjs +1439 -0
- package/skills/ew-impeccable/scripts/detector/engines/static-html/css-cascade.mjs +1242 -0
- package/skills/ew-impeccable/scripts/detector/engines/static-html/detect-html.mjs +263 -0
- package/skills/ew-impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
- package/skills/ew-impeccable/scripts/detector/findings.mjs +23 -0
- package/skills/ew-impeccable/scripts/detector/node/file-system.mjs +225 -0
- package/skills/ew-impeccable/scripts/detector/profile/profiler.mjs +166 -0
- package/skills/ew-impeccable/scripts/detector/registry/antipatterns.mjs +636 -0
- package/skills/ew-impeccable/scripts/detector/rules/checks.mjs +5750 -0
- package/skills/ew-impeccable/scripts/detector/shared/color.mjs +596 -0
- package/skills/ew-impeccable/scripts/detector/shared/constants.mjs +127 -0
- package/skills/ew-impeccable/scripts/detector/shared/fonts.mjs +30 -0
- package/skills/ew-impeccable/scripts/detector/shared/inline-ignores.mjs +148 -0
- package/skills/ew-impeccable/scripts/detector/shared/page.mjs +7 -0
- package/skills/ew-impeccable/scripts/detector/vendor/MDN-DATA-LICENSE +116 -0
- package/skills/ew-impeccable/scripts/detector/vendor/THIRD_PARTY_LICENSES.md +227 -0
- package/skills/ew-impeccable/scripts/detector/vendor/static-html-parser.build-entry.txt +11 -0
- package/skills/ew-impeccable/scripts/detector/vendor/static-html-parser.bundle.mjs +9121 -0
- package/skills/ew-impeccable/scripts/doctor.mjs +330 -0
- package/skills/ew-impeccable/scripts/embed-prompt.mjs +166 -0
- package/skills/ew-impeccable/scripts/font-match.mjs +457 -0
- package/skills/ew-impeccable/scripts/generate-image.mjs +447 -0
- package/skills/ew-impeccable/scripts/hook-admin.mjs +829 -0
- package/skills/ew-impeccable/scripts/hook-before-edit.mjs +538 -0
- package/skills/ew-impeccable/scripts/hook-lib.mjs +2493 -0
- package/skills/ew-impeccable/scripts/hook.mjs +79 -0
- package/skills/ew-impeccable/scripts/lib/artifact-schema.mjs +93 -0
- package/skills/ew-impeccable/scripts/lib/composition-catalog.mjs +200 -0
- package/skills/ew-impeccable/scripts/lib/concept-catalog.mjs +395 -0
- package/skills/ew-impeccable/scripts/lib/design-parser.mjs +880 -0
- package/skills/ew-impeccable/scripts/lib/font-fingerprint.mjs +564 -0
- package/skills/ew-impeccable/scripts/lib/font-index.mjs +130 -0
- package/skills/ew-impeccable/scripts/lib/hero-checks.mjs +246 -0
- package/skills/ew-impeccable/scripts/lib/image-metrics.mjs +306 -0
- package/skills/ew-impeccable/scripts/lib/impeccable-config.mjs +640 -0
- package/skills/ew-impeccable/scripts/lib/impeccable-paths.mjs +137 -0
- package/skills/ew-impeccable/scripts/lib/is-generated.mjs +72 -0
- package/skills/ew-impeccable/scripts/lib/live-path-globs.mjs +37 -0
- package/skills/ew-impeccable/scripts/lib/open-system-browser.mjs +26 -0
- package/skills/ew-impeccable/scripts/lib/png.mjs +281 -0
- package/skills/ew-impeccable/scripts/lib/provider.mjs +5 -0
- package/skills/ew-impeccable/scripts/lib/raster.mjs +194 -0
- package/skills/ew-impeccable/scripts/lib/roll-selection.mjs +369 -0
- package/skills/ew-impeccable/scripts/lib/staleness-deep.mjs +491 -0
- package/skills/ew-impeccable/scripts/lib/staleness-notice.mjs +169 -0
- package/skills/ew-impeccable/scripts/lib/staleness.mjs +532 -0
- package/skills/ew-impeccable/scripts/lib/surface-briefs.mjs +149 -0
- package/skills/ew-impeccable/scripts/lib/target-args.mjs +42 -0
- package/skills/ew-impeccable/scripts/lib/target-slug.mjs +33 -0
- package/skills/ew-impeccable/scripts/lib/template-extensions.mjs +146 -0
- package/skills/ew-impeccable/scripts/live/accept-css.mjs +617 -0
- package/skills/ew-impeccable/scripts/live/accept-verify.mjs +60 -0
- package/skills/ew-impeccable/scripts/live/browser-script-parts.mjs +84 -0
- package/skills/ew-impeccable/scripts/live/completion.mjs +28 -0
- package/skills/ew-impeccable/scripts/live/event-validation.mjs +199 -0
- package/skills/ew-impeccable/scripts/live/frameworks/astro.mjs +47 -0
- package/skills/ew-impeccable/scripts/live/frameworks/detect-utils.mjs +73 -0
- package/skills/ew-impeccable/scripts/live/frameworks/index.mjs +143 -0
- package/skills/ew-impeccable/scripts/live/frameworks/journal.mjs +197 -0
- package/skills/ew-impeccable/scripts/live/frameworks/nextjs.mjs +49 -0
- package/skills/ew-impeccable/scripts/live/frameworks/nuxt.mjs +161 -0
- package/skills/ew-impeccable/scripts/live/frameworks/script-src.mjs +17 -0
- package/skills/ew-impeccable/scripts/live/frameworks/static-html.mjs +26 -0
- package/skills/ew-impeccable/scripts/live/frameworks/sveltekit.mjs +71 -0
- package/skills/ew-impeccable/scripts/live/frameworks/tag-strategy.mjs +247 -0
- package/skills/ew-impeccable/scripts/live/frameworks/tanstack-start.mjs +70 -0
- package/skills/ew-impeccable/scripts/live/frameworks/vite-generic.mjs +42 -0
- package/skills/ew-impeccable/scripts/live/generation-preflight.mjs +149 -0
- package/skills/ew-impeccable/scripts/live/insert-ui.mjs +458 -0
- package/skills/ew-impeccable/scripts/live/instructions.mjs +142 -0
- package/skills/ew-impeccable/scripts/live/manual-apply.mjs +939 -0
- package/skills/ew-impeccable/scripts/live/manual-edit-routes.mjs +357 -0
- package/skills/ew-impeccable/scripts/live/manual-edits-buffer.mjs +152 -0
- package/skills/ew-impeccable/scripts/live/poll-lanes.mjs +14 -0
- package/skills/ew-impeccable/scripts/live/project-ignores.mjs +139 -0
- package/skills/ew-impeccable/scripts/live/roots.mjs +508 -0
- package/skills/ew-impeccable/scripts/live/session-store.mjs +563 -0
- package/skills/ew-impeccable/scripts/live/source-lock.mjs +105 -0
- package/skills/ew-impeccable/scripts/live/source-search.mjs +105 -0
- package/skills/ew-impeccable/scripts/live/svelte-ast.mjs +969 -0
- package/skills/ew-impeccable/scripts/live/svelte-component.mjs +1366 -0
- package/skills/ew-impeccable/scripts/live/sveltekit-adapter.mjs +304 -0
- package/skills/ew-impeccable/scripts/live/tanstack-adapter.mjs +259 -0
- package/skills/ew-impeccable/scripts/live/ui-surfaces.mjs +75 -0
- package/skills/ew-impeccable/scripts/live/vocabulary.mjs +171 -0
- package/skills/ew-impeccable/scripts/live-accept.mjs +938 -0
- package/skills/ew-impeccable/scripts/live-browser-dom.js +167 -0
- package/skills/ew-impeccable/scripts/live-browser-ignores.js +242 -0
- package/skills/ew-impeccable/scripts/live-browser-session.js +144 -0
- package/skills/ew-impeccable/scripts/live-browser.js +12851 -0
- package/skills/ew-impeccable/scripts/live-commit-manual-edits.mjs +1200 -0
- package/skills/ew-impeccable/scripts/live-complete.mjs +107 -0
- package/skills/ew-impeccable/scripts/live-copy-edit-agent.mjs +800 -0
- package/skills/ew-impeccable/scripts/live-discard-manual-edits.mjs +51 -0
- package/skills/ew-impeccable/scripts/live-inject.mjs +463 -0
- package/skills/ew-impeccable/scripts/live-insert.mjs +292 -0
- package/skills/ew-impeccable/scripts/live-manual-edit-evidence.mjs +368 -0
- package/skills/ew-impeccable/scripts/live-poll.mjs +430 -0
- package/skills/ew-impeccable/scripts/live-resume.mjs +123 -0
- package/skills/ew-impeccable/scripts/live-server.mjs +1698 -0
- package/skills/ew-impeccable/scripts/live-status.mjs +71 -0
- package/skills/ew-impeccable/scripts/live-target.mjs +30 -0
- package/skills/ew-impeccable/scripts/live-wrap.mjs +927 -0
- package/skills/ew-impeccable/scripts/live.mjs +334 -0
- package/skills/ew-impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/skills/ew-impeccable/scripts/palette.mjs +628 -0
- package/skills/ew-impeccable/scripts/pin.mjs +352 -0
- package/skills/ew-impeccable/scripts/serve-question.mjs +1783 -0
- package/skills/ew-impeccable/scripts/surface-brief.mjs +74 -0
- package/skills/ew-knowledge/SKILL.md +35 -0
- package/skills/ew-knowledge/references/closeout-protocol.md +68 -0
- package/skills/ew-knowledge/references/knowledge-route.md +73 -0
- package/skills/ew-knowledge/references/wiki-maintenance.md +27 -0
- package/skills/ew-odyssey/SKILL.md +106 -0
- package/skills/ew-odyssey/references/audit-artifacts.md +7 -0
- package/skills/ew-odyssey/references/odyssey-base.md +104 -0
- package/skills/ew-odyssey/references/odyssey-debug.md +264 -0
- package/skills/ew-odyssey/references/odyssey-defensive.md +351 -0
- package/skills/ew-odyssey/references/odyssey-improve.md +230 -0
- package/skills/ew-odyssey/references/odyssey-planex.md +294 -0
- package/skills/ew-odyssey/references/odyssey-review.md +233 -0
- package/skills/ew-odyssey/references/odyssey-security.md +231 -0
- package/skills/ew-odyssey/references/odyssey-ui.md +232 -0
- package/skills/ew-odyssey/references/prepare/odyssey-debug.md +102 -0
- package/skills/ew-odyssey/references/prepare/odyssey-defensive.md +117 -0
- package/skills/ew-odyssey/references/prepare/odyssey-improve.md +95 -0
- package/skills/ew-odyssey/references/prepare/odyssey-planex.md +105 -0
- package/skills/ew-odyssey/references/prepare/odyssey-review.md +105 -0
- package/skills/ew-odyssey/references/prepare/odyssey-security.md +91 -0
- package/skills/ew-odyssey/references/prepare/odyssey-ui.md +88 -0
- package/skills/ew-odyssey/references/runtime-adapters.md +31 -0
- package/skills/ew-orchestrate/SKILL.md +89 -0
- package/skills/ew-orchestrate/references/auto-policy.md +66 -0
- package/skills/ew-orchestrate/references/boundary-grill.md +51 -0
- package/skills/ew-orchestrate/references/companion-route.md +40 -0
- package/skills/ew-orchestrate/references/ew-orchestrate.md +44 -0
- package/skills/ew-orchestrate/references/goal.md +51 -0
- package/skills/ew-orchestrate/references/orchestrator-run-loop.md +33 -0
- package/skills/ew-orchestrate/references/planning.md +54 -0
- package/skills/ew-orchestrate/steps/ew-analyze/SKILL.md +70 -0
- package/skills/ew-orchestrate/steps/ew-analyze/references/issue-gaps-analyze.md +24 -0
- package/skills/ew-orchestrate/steps/ew-analyze/references/prepare.md +8 -0
- package/skills/ew-orchestrate/steps/ew-analyze/references/workflow.md +138 -0
- package/skills/ew-orchestrate/steps/ew-auto-test/SKILL.md +80 -0
- package/skills/ew-orchestrate/steps/ew-auto-test/references/prepare.md +23 -0
- package/skills/ew-orchestrate/steps/ew-auto-test/references/workflow.md +31 -0
- package/skills/ew-orchestrate/steps/ew-blueprint/SKILL.md +122 -0
- package/skills/ew-orchestrate/steps/ew-blueprint/references/prepare.md +21 -0
- package/skills/ew-orchestrate/steps/ew-blueprint/references/workflow.md +28 -0
- package/skills/ew-orchestrate/steps/ew-brainstorm/SKILL.md +49 -0
- package/skills/ew-orchestrate/steps/ew-companion/SKILL.md +50 -0
- package/skills/ew-orchestrate/steps/ew-debug/SKILL.md +85 -0
- package/skills/ew-orchestrate/steps/ew-debug/references/prepare.md +27 -0
- package/skills/ew-orchestrate/steps/ew-debug/references/workflow.md +31 -0
- package/skills/ew-orchestrate/steps/ew-execute/SKILL.md +74 -0
- package/skills/ew-orchestrate/steps/ew-execute/references/prepare.md +27 -0
- package/skills/ew-orchestrate/steps/ew-execute/references/workflow.md +87 -0
- package/skills/ew-orchestrate/steps/ew-grill/SKILL.md +62 -0
- package/skills/ew-orchestrate/steps/ew-grill/references/prepare.md +26 -0
- package/skills/ew-orchestrate/steps/ew-grill/references/workflow.md +31 -0
- package/skills/ew-orchestrate/steps/ew-init/SKILL.md +56 -0
- package/skills/ew-orchestrate/steps/ew-init/references/prepare.md +25 -0
- package/skills/ew-orchestrate/steps/ew-init/references/workflow.md +28 -0
- package/skills/ew-orchestrate/steps/ew-plan/SKILL.md +131 -0
- package/skills/ew-orchestrate/steps/ew-plan/references/prepare.md +8 -0
- package/skills/ew-orchestrate/steps/ew-plan/references/tdd.md +53 -0
- package/skills/ew-orchestrate/steps/ew-plan/references/workflow.md +100 -0
- package/skills/ew-orchestrate/steps/ew-retrospective/SKILL.md +68 -0
- package/skills/ew-orchestrate/steps/ew-retrospective/references/prepare.md +18 -0
- package/skills/ew-orchestrate/steps/ew-retrospective/references/workflow.md +34 -0
- package/skills/ew-orchestrate/steps/ew-review/SKILL.md +45 -0
- package/skills/ew-orchestrate/steps/ew-review/references/prepare.md +17 -0
- package/skills/ew-orchestrate/steps/ew-review/references/workflow.md +116 -0
- package/skills/ew-orchestrate/steps/ew-roadmap/SKILL.md +62 -0
- package/skills/ew-orchestrate/steps/ew-roadmap/references/prepare.md +27 -0
- package/skills/ew-orchestrate/steps/ew-roadmap/references/workflow.md +28 -0
- package/skills/ew-orchestrate/steps/ew-test/SKILL.md +99 -0
- package/skills/ew-orchestrate/steps/ew-test/references/prepare.md +23 -0
- package/skills/ew-orchestrate/steps/ew-test/references/workflow.md +23 -0
- package/skills/ew-orchestrate/steps/ew-verify/SKILL.md +73 -0
- package/skills/ew-orchestrate/steps/ew-verify/references/prepare.md +21 -0
- package/skills/ew-orchestrate/steps/ew-verify/references/workflow.md +29 -0
- package/skills/ew-skill-design/SKILL.md +30 -0
- package/skills/ew-skill-design/references/package-contract.md +40 -0
- package/skills/ew-skill-design/references/validation.md +21 -0
- package/skills/team-swarm/SKILL.md +68 -0
- package/skills/team-swarm/references/mcp-coordination.md +14 -0
- package/skills/team-swarm/roles/analyst/role.md +181 -0
- package/skills/team-swarm/roles/ant/role.md +149 -0
- package/skills/team-swarm/roles/coordinator/commands/converge.md +112 -0
- package/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
- package/skills/team-swarm/roles/coordinator/commands/iterate.md +171 -0
- package/skills/team-swarm/roles/coordinator/role.md +170 -0
- package/skills/team-swarm/roles/scorer/role.md +150 -0
- package/skills/team-swarm/scripts/aco.py +646 -0
- package/skills/team-swarm/scripts/pheromone.py +144 -0
- package/skills/team-swarm/scripts/scoring.py +111 -0
- package/skills/team-swarm/scripts/test_aco.py +606 -0
- package/skills/team-swarm/specs/ant-output-schema.md +127 -0
- package/skills/team-swarm/specs/convergence-criteria.md +108 -0
- package/skills/team-swarm/specs/pheromone-schema.md +125 -0
- package/skills/team-swarm/specs/swarm-config-template.json +71 -0
- package/skills/team-swarm/specs/swarm-protocol.md +119 -0
- package/skills/workflow-evolve/SKILL.md +64 -0
- package/skills/workflow-evolve/references/agy-gate.md +27 -0
- package/skills/workflow-evolve/references/auto-loop.md +23 -0
- package/skills/workflow-evolve/references/history-review.md +15 -0
- package/skills/workflow-evolve/scripts/codex-memory-replay.mjs +86 -0
- package/skills/workflow-evolve/scripts/codex-replay.mjs +1 -0
- package/skills/workflow-evolve/scripts/evolve-loop.mjs +260 -0
- package/skills/workflow-evolve/scripts/memory-codex-mcp.mjs +124 -0
- package/workflows/index.json +33 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const hosts: {
|
|
2
|
+
readonly codex: readonly [".codex", "AGENTS.md"];
|
|
3
|
+
readonly claude: readonly [".claude", "CLAUDE.md"];
|
|
4
|
+
readonly agy: readonly [".agents", "AGENTS.md"];
|
|
5
|
+
};
|
|
6
|
+
type InstallScope = 'project' | 'user';
|
|
7
|
+
type InstallHost = keyof typeof hosts;
|
|
8
|
+
interface InstallOptions {
|
|
9
|
+
scope?: InstallScope;
|
|
10
|
+
host?: InstallHost;
|
|
11
|
+
skill?: string[];
|
|
12
|
+
yes?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface WorkflowDocument {
|
|
15
|
+
id: string;
|
|
16
|
+
path: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function workflowDocuments(): WorkflowDocument[];
|
|
19
|
+
export declare function workflowDocument(id: string): string;
|
|
20
|
+
export declare function installSkills(root: string, requested: string[]): {
|
|
21
|
+
skills: string[];
|
|
22
|
+
installed: string[];
|
|
23
|
+
};
|
|
24
|
+
export declare function installWorkflow(root: string, options: InstallOptions): Promise<{
|
|
25
|
+
status: string;
|
|
26
|
+
} | {
|
|
27
|
+
kept: string[];
|
|
28
|
+
workflows: WorkflowDocument[];
|
|
29
|
+
skills: string[];
|
|
30
|
+
installed: string[];
|
|
31
|
+
root: string;
|
|
32
|
+
instructions: string;
|
|
33
|
+
host?: "codex" | "claude" | "agy" | undefined;
|
|
34
|
+
status: string;
|
|
35
|
+
scope: InstallScope;
|
|
36
|
+
}>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { createInterface } from 'node:readline/promises';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { InputError } from './common.js';
|
|
7
|
+
import { workflowName } from './workflow-names.js';
|
|
8
|
+
const bundle = fileURLToPath(new URL('../', import.meta.url));
|
|
9
|
+
const source = join(bundle, 'skills');
|
|
10
|
+
const hosts = { codex: ['.codex', 'AGENTS.md'], claude: ['.claude', 'CLAUDE.md'], agy: ['.agents', 'AGENTS.md'] };
|
|
11
|
+
const workflowTitle = 'Self-Evolving Workflow';
|
|
12
|
+
export function workflowDocuments() {
|
|
13
|
+
const documents = JSON.parse(readFileSync(join(bundle, 'workflows', 'index.json'), 'utf8'));
|
|
14
|
+
const skills = shippedSkills();
|
|
15
|
+
return documents.filter(item => skills.includes(item.path.split('/')[1]));
|
|
16
|
+
}
|
|
17
|
+
export function workflowDocument(id) {
|
|
18
|
+
const name = id === 'odyssey' || id === 'skill-design' ? 'ew-' + id : workflowName(id);
|
|
19
|
+
const document = workflowDocuments().find(item => item.id === name);
|
|
20
|
+
if (!document)
|
|
21
|
+
throw new InputError('Unknown workflow: ' + id);
|
|
22
|
+
return readFileSync(join(bundle, document.path), 'utf8');
|
|
23
|
+
}
|
|
24
|
+
function shippedSkills() {
|
|
25
|
+
return readdirSync(source, { withFileTypes: true }).filter(item => item.isDirectory()).map(item => item.name).sort();
|
|
26
|
+
}
|
|
27
|
+
function selectSkills(shipped, requested) {
|
|
28
|
+
const selected = requested.length ? [...new Set(requested.map(workflowName))] : shipped;
|
|
29
|
+
if (selected.some(name => !shipped.includes(name)))
|
|
30
|
+
throw new InputError('Choose a shipped Skill package');
|
|
31
|
+
if (selected.includes('ew-odyssey') && !selected.includes('ew-orchestrate')) {
|
|
32
|
+
return ['ew-orchestrate', ...selected];
|
|
33
|
+
}
|
|
34
|
+
return selected;
|
|
35
|
+
}
|
|
36
|
+
export function installSkills(root, requested) {
|
|
37
|
+
const skills = selectSkills(shippedSkills(), requested);
|
|
38
|
+
const target = join(root, 'skills');
|
|
39
|
+
if (lstatSync(target, { throwIfNoEntry: false })?.isSymbolicLink())
|
|
40
|
+
throw new InputError('Use a regular skills directory');
|
|
41
|
+
mkdirSync(target, { recursive: true });
|
|
42
|
+
const pending = skills.filter(name => {
|
|
43
|
+
const path = join(target, name);
|
|
44
|
+
if (!lstatSync(path, { throwIfNoEntry: false }))
|
|
45
|
+
return true;
|
|
46
|
+
if (!existsSync(join(path, 'SKILL.md')))
|
|
47
|
+
throw new InputError('Existing directory has no SKILL.md: ' + path);
|
|
48
|
+
return false;
|
|
49
|
+
});
|
|
50
|
+
const installed = [];
|
|
51
|
+
for (const name of pending) {
|
|
52
|
+
const path = join(target, name);
|
|
53
|
+
const stage = mkdtempSync(join(target, '.evolve-install-'));
|
|
54
|
+
try {
|
|
55
|
+
cpSync(join(source, name), join(stage, name), { recursive: true, force: false, errorOnExist: true });
|
|
56
|
+
renameSync(join(stage, name), path);
|
|
57
|
+
installed.push(name);
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
if (dirname(stage) === target)
|
|
61
|
+
rmSync(stage, { recursive: true, force: true });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return { skills, installed };
|
|
65
|
+
}
|
|
66
|
+
function provisionInstructions(path) {
|
|
67
|
+
const info = lstatSync(path, { throwIfNoEntry: false });
|
|
68
|
+
if (info && !info.isFile())
|
|
69
|
+
throw new InputError('Use a regular instruction file: ' + path);
|
|
70
|
+
const current = info ? readFileSync(path, 'utf8') : '';
|
|
71
|
+
if (/^# (?:Evolve Workflow|Self-Evolving Workflow)\s*$/m.test(current))
|
|
72
|
+
return;
|
|
73
|
+
const newline = current.includes('\r\n') ? '\r\n' : '\n';
|
|
74
|
+
const guide = [
|
|
75
|
+
'# ' + workflowTitle,
|
|
76
|
+
'',
|
|
77
|
+
'Use Evolve for Session and Run control. Run `evolve context "<task keywords>" --include-memory` before inspecting project files.',
|
|
78
|
+
'Follow the project instructions for knowledge scope. Open controlling entries by ID and record Run knowledge reads.',
|
|
79
|
+
'Read the relevant package in `skills/` for a project installation and commit those packages so Evolve can bind Runs to a Git revision.',
|
|
80
|
+
'Use `evolve workflows` to list the bundled workflow documents and `evolve workflows show <id>` to read one.',
|
|
81
|
+
'Use `evolve knowledge import` to preview legacy Spec and Knowhow in the source project. Add `--apply` to import them.',
|
|
82
|
+
'',
|
|
83
|
+
].join(newline);
|
|
84
|
+
writeFileSync(path, current ? current + newline + newline + guide : guide, 'utf8');
|
|
85
|
+
}
|
|
86
|
+
function scopeAndHost(root, scope, host) {
|
|
87
|
+
if (host && scope === 'project')
|
|
88
|
+
throw new InputError('--host applies to user installations');
|
|
89
|
+
if (scope === 'project')
|
|
90
|
+
return { target: root, instructions: join(root, 'AGENTS.md') };
|
|
91
|
+
const [directory, file] = hosts[host ?? 'codex'];
|
|
92
|
+
const target = join(homedir(), directory);
|
|
93
|
+
return { target, instructions: join(target, file) };
|
|
94
|
+
}
|
|
95
|
+
export async function installWorkflow(root, options) {
|
|
96
|
+
const shipped = shippedSkills();
|
|
97
|
+
let scope = options.scope ?? (options.host ? 'user' : 'project');
|
|
98
|
+
let host = options.host;
|
|
99
|
+
let requested = options.skill ?? [];
|
|
100
|
+
if (!options.yes) {
|
|
101
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
102
|
+
throw new InputError('Use an interactive terminal or pass --yes');
|
|
103
|
+
}
|
|
104
|
+
const ui = createInterface({ input: process.stdin, output: process.stdout });
|
|
105
|
+
try {
|
|
106
|
+
process.stdout.write(workflowTitle + ' installer\n\n');
|
|
107
|
+
if (!options.scope && !host) {
|
|
108
|
+
const answer = (await ui.question('Install to [1] project or [2] user profile [1]? ')).trim();
|
|
109
|
+
if (answer && answer !== '1' && answer !== '2')
|
|
110
|
+
throw new InputError('Choose project (1) or user (2)');
|
|
111
|
+
scope = answer === '2' ? 'user' : 'project';
|
|
112
|
+
}
|
|
113
|
+
if (scope === 'user' && !host) {
|
|
114
|
+
const answer = (await ui.question('Host [1] Codex, [2] Claude or [3] Agy [1]? ')).trim();
|
|
115
|
+
if (answer && answer !== '1' && answer !== '2' && answer !== '3')
|
|
116
|
+
throw new InputError('Choose Codex (1), Claude (2) or Agy (3)');
|
|
117
|
+
host = answer === '2' ? 'claude' : answer === '3' ? 'agy' : 'codex';
|
|
118
|
+
}
|
|
119
|
+
const { target } = scopeAndHost(root, scope, host);
|
|
120
|
+
if (!requested.length) {
|
|
121
|
+
process.stdout.write(shipped.map((name, index) => ` ${index + 1}. ${name}${existsSync(join(target, 'skills', name)) ? ' (present)' : ''}`).join('\n') + '\n');
|
|
122
|
+
const answer = (await ui.question('Skill numbers, comma separated [all]? ')).trim();
|
|
123
|
+
if (answer && answer.toLowerCase() !== 'all') {
|
|
124
|
+
const positions = answer.split(',').map(value => value.trim());
|
|
125
|
+
if (positions.some(value => !/^\d+$/.test(value) || !shipped[Number(value) - 1])) {
|
|
126
|
+
throw new InputError('Choose Skill numbers from the list');
|
|
127
|
+
}
|
|
128
|
+
requested = positions.map(value => shipped[Number(value) - 1]);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const selected = selectSkills(shipped, requested);
|
|
132
|
+
const answer = (await ui.question(`Install ${selected.join(', ')} in ${target}? [y/N] `)).trim();
|
|
133
|
+
if (!/^y(?:es)?$/i.test(answer))
|
|
134
|
+
return { status: 'cancelled' };
|
|
135
|
+
}
|
|
136
|
+
finally {
|
|
137
|
+
ui.close();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const { target, instructions } = scopeAndHost(root, scope, host);
|
|
141
|
+
const skills = installSkills(target, requested);
|
|
142
|
+
provisionInstructions(instructions);
|
|
143
|
+
return {
|
|
144
|
+
status: 'installed', scope, ...(scope === 'user' ? { host: host ?? 'codex' } : {}), root: target, instructions,
|
|
145
|
+
...skills, kept: skills.skills.filter(name => !skills.installed.includes(name)),
|
|
146
|
+
workflows: workflowDocuments().filter(item => skills.skills.includes(item.path.split('/')[1])),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type WikiContext } from './wiki-entry.js';
|
|
2
|
+
import type { Wiki } from './wiki.js';
|
|
3
|
+
export type WikiLookupScope = Pick<WikiContext, 'repository' | 'task' | 'paths' | 'categories'>;
|
|
4
|
+
export interface WikiPrior {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
mode: 'constraint' | 'reference';
|
|
8
|
+
content: string;
|
|
9
|
+
scope: string[];
|
|
10
|
+
categories?: string[];
|
|
11
|
+
repositories?: string[];
|
|
12
|
+
sources: string[];
|
|
13
|
+
lookup_scope: WikiLookupScope;
|
|
14
|
+
source_search_id: string;
|
|
15
|
+
content_sha256: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function buildWikiPrior(page: NonNullable<ReturnType<Wiki['getEntry']>>, mode: WikiPrior['mode'], lookupScope: WikiLookupScope, searchId: string): WikiPrior;
|
|
18
|
+
export declare function wikiLookupScope(value?: unknown): WikiLookupScope;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { posix } from 'node:path';
|
|
2
|
+
import { contentSha256 } from './knowledge-reads.js';
|
|
3
|
+
import { InputError, requireText } from './common.js';
|
|
4
|
+
import { isRepositoryId, isWikiCategory } from './wiki-entry.js';
|
|
5
|
+
import { workflowRecord, workflowStrings } from './workflow-skills.js';
|
|
6
|
+
export function buildWikiPrior(page, mode, lookupScope, searchId) {
|
|
7
|
+
return {
|
|
8
|
+
id: page.id, title: page.title, mode, content: page.body, sources: page.sources,
|
|
9
|
+
scope: page.entry?.scope ?? [], categories: page.entry?.categories, repositories: page.entry?.repositories,
|
|
10
|
+
lookup_scope: lookupScope, source_search_id: searchId, content_sha256: contentSha256(page.body),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function wikiLookupScope(value = {}) {
|
|
14
|
+
const input = workflowRecord(value, 'Wiki lookup scope');
|
|
15
|
+
const field = Object.keys(input).find(key => !['repository', 'task', 'paths', 'categories'].includes(key));
|
|
16
|
+
if (field)
|
|
17
|
+
throw new InputError('Unknown Wiki scope field: ' + field);
|
|
18
|
+
const { repository, task, paths, categories } = input;
|
|
19
|
+
if (repository !== undefined && !isRepositoryId(repository))
|
|
20
|
+
throw new InputError('Expected a persisted repository UUID');
|
|
21
|
+
const normalizedPaths = paths === undefined ? [] : workflowStrings(paths, 'Wiki paths')
|
|
22
|
+
.map(path => posix.normalize(path.replaceAll('\\', '/')));
|
|
23
|
+
const normalizedCategories = categories === undefined ? [] : workflowStrings(categories, 'Wiki categories');
|
|
24
|
+
if (!normalizedCategories.every(isWikiCategory))
|
|
25
|
+
throw new InputError('Unknown Wiki context category');
|
|
26
|
+
return {
|
|
27
|
+
...(repository === undefined ? {} : { repository }),
|
|
28
|
+
...(task === undefined ? {} : { task: requireText(task, 'Wiki task') }),
|
|
29
|
+
...(normalizedPaths.length ? { paths: [...new Set(normalizedPaths)].sort() } : {}),
|
|
30
|
+
...(normalizedCategories.length ? { categories: [...new Set(normalizedCategories)].sort() } : {}),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { createInterface } from 'node:readline';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { InputError, requireText, searchLimit } from './common.js';
|
|
4
|
+
import { MemoryStore } from './memory.js';
|
|
5
|
+
import { Wiki } from './wiki.js';
|
|
6
|
+
import { buildWikiPrior, wikiLookupScope } from './workflow-knowledge.js';
|
|
7
|
+
import { WorkflowStore } from './workflow-runtime.js';
|
|
8
|
+
const text = { type: 'string' };
|
|
9
|
+
const textList = { type: 'array', items: text };
|
|
10
|
+
const scope = { type: 'object', properties: { repository: text, task: text, paths: textList, categories: textList }, additionalProperties: false };
|
|
11
|
+
function definition(name, description, properties, required = []) {
|
|
12
|
+
return { name, description, annotations: { readOnlyHint: true, openWorldHint: false },
|
|
13
|
+
inputSchema: { type: 'object', properties, required, additionalProperties: false } };
|
|
14
|
+
}
|
|
15
|
+
const tools = [
|
|
16
|
+
definition('read_skill', 'Open the committed Skill entry. Use from and destination for a declared Markdown link.', { from: text, destination: text }),
|
|
17
|
+
definition('read_artifact', 'Read a bound artifact. For session-priors, use scope if the Wiki lookup had task, path, category or repository filters.', { id: text, scope }, ['id']),
|
|
18
|
+
definition('wiki_context', 'Find applicable project Wiki constraints and reference IDs by keyword. The Run records this search.', { query: text, scope }, ['query']),
|
|
19
|
+
definition('wiki_reference', 'Read the exact Wiki body for an ID returned by wiki_context. The Run records its search and content hash.', { id: text }, ['id']),
|
|
20
|
+
definition('memory_search', 'Search the local Agent Memory store and record the search for this Run.', { query: text }, ['query']),
|
|
21
|
+
definition('memory_get', 'Read the exact Memory record selected from this Run’s search results.', { id: text }, ['id']),
|
|
22
|
+
];
|
|
23
|
+
export async function serveWorkflowRun(store, session, run, db) {
|
|
24
|
+
store.brief(session, run);
|
|
25
|
+
const memory = new MemoryStore(db ?? join(store.root, '.agent-memory', 'memory.db'));
|
|
26
|
+
const wiki = new Wiki(store.root);
|
|
27
|
+
try {
|
|
28
|
+
for await (const line of createInterface({ input: process.stdin, crlfDelay: Infinity })) {
|
|
29
|
+
const req = JSON.parse(line);
|
|
30
|
+
if (req.id === undefined)
|
|
31
|
+
continue;
|
|
32
|
+
let value;
|
|
33
|
+
try {
|
|
34
|
+
switch (req.method) {
|
|
35
|
+
case 'initialize':
|
|
36
|
+
value = {
|
|
37
|
+
protocolVersion: req.params.protocolVersion, capabilities: { tools: {} },
|
|
38
|
+
serverInfo: { name: 'evolve-workflow', version: '1.0.0' },
|
|
39
|
+
};
|
|
40
|
+
break;
|
|
41
|
+
case 'ping':
|
|
42
|
+
value = {};
|
|
43
|
+
break;
|
|
44
|
+
case 'tools/list':
|
|
45
|
+
value = { tools };
|
|
46
|
+
break;
|
|
47
|
+
case 'tools/call': {
|
|
48
|
+
const { name, arguments: args = {} } = req.params;
|
|
49
|
+
let result;
|
|
50
|
+
switch (name) {
|
|
51
|
+
case 'read_skill':
|
|
52
|
+
result = store.readSkill(session, run, args.from, args.destination);
|
|
53
|
+
break;
|
|
54
|
+
case 'read_artifact':
|
|
55
|
+
result = store.readArtifact(session, run, requireText(args.id, 'artifact ID'), wikiLookupScope(args.scope));
|
|
56
|
+
break;
|
|
57
|
+
case 'wiki_context': {
|
|
58
|
+
const query = requireText(args.query, 'Wiki query');
|
|
59
|
+
const lookupScope = wikiLookupScope(args.scope);
|
|
60
|
+
const references = wiki.references(query, lookupScope).results;
|
|
61
|
+
const constraints = wiki.constraints(lookupScope).slice(0, searchLimit());
|
|
62
|
+
const trace = store.recordKnowledge(session, run, (receipt, pin) => {
|
|
63
|
+
const searchId = receipt.recordSearch({
|
|
64
|
+
source: 'wiki_references', query, filters: lookupScope, returnedIds: references.map(item => item.id),
|
|
65
|
+
});
|
|
66
|
+
for (const page of constraints) {
|
|
67
|
+
const prior = buildWikiPrior(page, 'constraint', lookupScope, searchId);
|
|
68
|
+
receipt.bindConstraint({ knowledgeId: prior.id, content: prior.content, scope: prior.scope, categories: prior.categories });
|
|
69
|
+
pin(prior);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
result = { constraints, references, search_id: trace.searches.at(-1)?.search_id };
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case 'wiki_reference': {
|
|
76
|
+
const id = requireText(args.id, 'Wiki reference ID');
|
|
77
|
+
store.recordKnowledge(session, run, (receipt, pin) => {
|
|
78
|
+
const search = receipt.toJSON().searches.findLast(item => item.source === 'wiki_references' && item.returned_ids.includes(id));
|
|
79
|
+
if (!search)
|
|
80
|
+
throw new InputError('Select an ID returned by wiki_context in this Run');
|
|
81
|
+
const lookupScope = wikiLookupScope(search.filters);
|
|
82
|
+
const page = wiki.getReference(id, lookupScope, { knowledgeReads: receipt, fromSearchId: search.search_id });
|
|
83
|
+
if (!page || page.id !== id)
|
|
84
|
+
throw new InputError('Wiki reference is no longer available in the recorded scope: ' + id);
|
|
85
|
+
pin(buildWikiPrior(page, 'reference', lookupScope, search.search_id));
|
|
86
|
+
result = page;
|
|
87
|
+
});
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
case 'memory_search': {
|
|
91
|
+
const query = requireText(args.query, 'search query');
|
|
92
|
+
const found = await memory.search(query);
|
|
93
|
+
const trace = store.recordKnowledge(session, run, receipt => receipt.recordSearch({
|
|
94
|
+
source: 'memory', query, returnedIds: found.results.map(item => item.id),
|
|
95
|
+
}));
|
|
96
|
+
result = { ...found, search_id: trace.searches.at(-1)?.search_id };
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 'memory_get': {
|
|
100
|
+
const id = requireText(args.id, 'memory ID');
|
|
101
|
+
const item = memory.get(id);
|
|
102
|
+
if (!item)
|
|
103
|
+
throw new InputError('Memory is unavailable: ' + id);
|
|
104
|
+
store.recordKnowledge(session, run, receipt => {
|
|
105
|
+
const search = receipt.toJSON().searches.findLast(item => item.source === 'memory' && item.returned_ids.includes(id));
|
|
106
|
+
if (!search)
|
|
107
|
+
throw new InputError('Select an ID from this Run’s search results');
|
|
108
|
+
receipt.recordRead({ kind: 'memory', id, fromSearchId: search.search_id, content: item.content, version: item.version });
|
|
109
|
+
});
|
|
110
|
+
result = item;
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
default: throw new InputError('Unknown workflow tool: ' + name);
|
|
114
|
+
}
|
|
115
|
+
value = { content: [{ type: 'text', text: JSON.stringify(result) }] };
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
default:
|
|
119
|
+
process.stdout.write(JSON.stringify({ jsonrpc: '2.0', id: req.id, error: { code: -32601, message: 'Method not found' } }) + '\n');
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
125
|
+
if (req.method !== 'tools/call') {
|
|
126
|
+
process.stdout.write(JSON.stringify({ jsonrpc: '2.0', id: req.id, error: { code: -32000, message } }) + '\n');
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
value = { isError: true, content: [{ type: 'text', text: message }] };
|
|
130
|
+
}
|
|
131
|
+
process.stdout.write(JSON.stringify({ jsonrpc: '2.0', id: req.id, result: value }) + '\n');
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
finally {
|
|
135
|
+
memory.close();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const orchestrationSteps = [
|
|
2
|
+
'companion', 'init', 'brainstorm', 'grill', 'blueprint', 'roadmap', 'analyze', 'plan', 'execute',
|
|
3
|
+
'verify', 'test', 'auto-test', 'review', 'debug', 'retrospective',
|
|
4
|
+
];
|
|
5
|
+
export const odysseyModes = ['debug', 'improve', 'planex', 'review', 'security', 'defensive', 'ui'];
|
|
6
|
+
const historicalPairs = [
|
|
7
|
+
['maestro', 'ew-orchestrate'],
|
|
8
|
+
['maestro-odyssey', 'ew-odyssey'],
|
|
9
|
+
['maestro-skill-design', 'ew-skill-design'],
|
|
10
|
+
['maestro-impeccable', 'ew-impeccable'],
|
|
11
|
+
['maestro-knowledge', 'ew-knowledge'],
|
|
12
|
+
['workflow-closeout', 'ew-knowledge'],
|
|
13
|
+
...orchestrationSteps.map(step => [step, 'ew-' + step]),
|
|
14
|
+
...odysseyModes.map(mode => ['odyssey-' + mode, 'ew-odyssey-' + mode]),
|
|
15
|
+
];
|
|
16
|
+
const historical = new Map(historicalPairs.map(([old, current]) => [current, old]));
|
|
17
|
+
const aliases = new Map([
|
|
18
|
+
...historicalPairs,
|
|
19
|
+
['orchestrate', 'ew-orchestrate'],
|
|
20
|
+
['odyssey', 'ew-odyssey'],
|
|
21
|
+
['skill-design', 'ew-skill-design'],
|
|
22
|
+
['impeccable', 'ew-impeccable'],
|
|
23
|
+
['knowledge', 'ew-knowledge'],
|
|
24
|
+
...orchestrationSteps.map(step => ['maestro-' + step, 'ew-' + step]),
|
|
25
|
+
]);
|
|
26
|
+
export function workflowName(name) {
|
|
27
|
+
return aliases.get(name) ?? name;
|
|
28
|
+
}
|
|
29
|
+
export function historicalWorkflowName(name) {
|
|
30
|
+
return historical.get(name);
|
|
31
|
+
}
|