From 65aa5b462d1987341890fde1340d0b378ad0a7d4 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Tue, 28 Jul 2026 18:46:50 +1000 Subject: [PATCH] chore: cleanup --- .agents/skills/archie-wf-go-gate/SKILL.md | 2 +- .beads/interactions.jsonl | 1 + .beads/issues.jsonl | 2 + .github/workflows/docs.yml | 68 + .golangci.yml | 37 +- .references/skills-implementation.md | 376 +++- .scratch/explore-agentexec-protocol.md | 219 --- .scratch/explore-chunkB-agentexec.md | 329 ---- .scratch/explore-chunkB-nats-reply.md | 322 ---- .scratch/explore-chunkB-workflow.md | 188 -- .scratch/explore-chunkC-missions.md | 345 ---- .scratch/explore-chunkC-patterns.md | 230 --- .scratch/explore-chunkC-skills.md | 342 ---- .scratch/explore-daemon-task-loop.md | 350 ---- .scratch/explore-nats-integration.md | 189 -- .scratch/plan-nats-design.md | 707 ------- ARCHITECTURE.md | 253 ++- CLAUDE.md | 146 +- cmd/archied/main_test.go | 4 +- docs-2/.vitepress/config.mts | 25 + docs-2/README.md | 263 +++ docs-2/architecture/index.md | 16 + docs-2/index.md | 25 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../autocomplete-plugin-algolia-insights | 1 + .../node_modules/@algolia/autocomplete-shared | 1 + .../node_modules/@algolia/autocomplete-shared | 1 + .../node_modules/search-insights | 1 + .../node_modules/@algolia/autocomplete-shared | 1 + .../node_modules/@algolia/client-search | 1 + .../node_modules/algoliasearch | 1 + .../node_modules/@algolia/client-search | 1 + .../node_modules/algoliasearch | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../node_modules/@algolia/client-common | 1 + .../node_modules/@algolia/client-common | 1 + .../node_modules/@algolia/client-common | 1 + .../node_modules/@babel/types | 1 + .../node_modules/@babel/helper-string-parser | 1 + .../@babel/helper-validator-identifier | 1 + .../node_modules/@docsearch/react | 1 + .../node_modules/preact | 1 + .../node_modules/@algolia/autocomplete-core | 1 + .../@algolia/autocomplete-preset-algolia | 1 + .../node_modules/@docsearch/css | 1 + .../node_modules/algoliasearch | 1 + .../node_modules/search-insights | 1 + .../node_modules/@iconify/types | 1 + .../node_modules/@shikijs/engine-javascript | 1 + .../node_modules/@shikijs/engine-oniguruma | 1 + .../node_modules/@shikijs/types | 1 + .../node_modules/@shikijs/vscode-textmate | 1 + .../node_modules/@types/hast | 1 + .../node_modules/hast-util-to-html | 1 + .../node_modules/@shikijs/types | 1 + .../node_modules/@shikijs/vscode-textmate | 1 + .../node_modules/oniguruma-to-es | 1 + .../node_modules/@shikijs/types | 1 + .../node_modules/@shikijs/vscode-textmate | 1 + .../node_modules/@shikijs/types | 1 + .../node_modules/@shikijs/types | 1 + .../node_modules/@shikijs/core | 1 + .../node_modules/@shikijs/types | 1 + .../node_modules/@shikijs/vscode-textmate | 1 + .../node_modules/@types/hast | 1 + .../node_modules/@types/unist | 1 + .../node_modules/@types/linkify-it | 1 + .../node_modules/@types/mdurl | 1 + .../node_modules/@types/unist | 1 + .../node_modules/vite | 1 + .../node_modules/vue | 1 + .../node_modules/@babel/parser | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/entities | 1 + .../node_modules/estree-walker | 1 + .../node_modules/source-map-js | 1 + .../node_modules/@vue/compiler-core | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/@babel/parser | 1 + .../node_modules/@vue/compiler-core | 1 + .../node_modules/@vue/compiler-dom | 1 + .../node_modules/@vue/compiler-ssr | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/estree-walker | 1 + .../node_modules/magic-string | 1 + .../node_modules/postcss | 1 + .../node_modules/source-map-js | 1 + .../node_modules/@vue/compiler-dom | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/@vue/devtools-kit | 1 + .../node_modules/@vue/devtools-shared | 1 + .../node_modules/birpc | 1 + .../node_modules/hookable | 1 + .../node_modules/mitt | 1 + .../node_modules/perfect-debounce | 1 + .../node_modules/speakingurl | 1 + .../node_modules/superjson | 1 + .../node_modules/rfdc | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/@vue/reactivity | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/@vue/reactivity | 1 + .../node_modules/@vue/runtime-core | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/csstype | 1 + .../node_modules/@vue/compiler-ssr | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/vue | 1 + .../node_modules/@types/web-bluetooth | 1 + .../node_modules/@vueuse/metadata | 1 + .../node_modules/@vueuse/shared | 1 + .../@vueuse+core@12.8.2/node_modules/vue | 1 + .../node_modules/@vueuse/core | 1 + .../node_modules/@vueuse/shared | 1 + .../node_modules/focus-trap | 1 + .../node_modules/vue | 1 + .../@vueuse+shared@12.8.2/node_modules/vue | 1 + .../node_modules/@algolia/abtesting | 1 + .../node_modules/@algolia/client-abtesting | 1 + .../node_modules/@algolia/client-analytics | 1 + .../node_modules/@algolia/client-common | 1 + .../node_modules/@algolia/client-insights | 1 + .../@algolia/client-personalization | 1 + .../@algolia/client-query-suggestions | 1 + .../node_modules/@algolia/client-search | 1 + .../node_modules/@algolia/ingestion | 1 + .../node_modules/@algolia/monitoring | 1 + .../node_modules/@algolia/recommend | 1 + .../@algolia/requester-browser-xhr | 1 + .../node_modules/@algolia/requester-fetch | 1 + .../node_modules/@algolia/requester-node-http | 1 + .../copy-anything@4.0.5/node_modules/is-what | 1 + .../.pnpm/devlop@1.1.0/node_modules/dequal | 1 + .../node_modules/@esbuild/linux-x64 | 1 + .../focus-trap@7.8.0/node_modules/tabbable | 1 + .../node_modules/@types/hast | 1 + .../node_modules/@types/unist | 1 + .../node_modules/ccount | 1 + .../node_modules/comma-separated-tokens | 1 + .../node_modules/hast-util-whitespace | 1 + .../node_modules/html-void-elements | 1 + .../node_modules/mdast-util-to-hast | 1 + .../node_modules/property-information | 1 + .../node_modules/space-separated-tokens | 1 + .../node_modules/stringify-entities | 1 + .../node_modules/zwitch | 1 + .../node_modules/@types/hast | 1 + .../node_modules/@jridgewell/sourcemap-codec | 1 + .../node_modules/@types/hast | 1 + .../node_modules/@types/mdast | 1 + .../node_modules/@ungap/structured-clone | 1 + .../node_modules/devlop | 1 + .../node_modules/micromark-util-sanitize-uri | 1 + .../node_modules/trim-lines | 1 + .../node_modules/unist-util-position | 1 + .../node_modules/unist-util-visit | 1 + .../node_modules/vfile | 1 + .../node_modules/micromark-util-symbol | 1 + .../node_modules/micromark-util-types | 1 + .../node_modules/micromark-util-character | 1 + .../node_modules/micromark-util-encode | 1 + .../node_modules/micromark-util-symbol | 1 + .../node_modules/emoji-regex-xs | 1 + .../oniguruma-to-es@3.1.1/node_modules/regex | 1 + .../node_modules/regex-recursion | 1 + .../.pnpm/postcss@8.5.16/node_modules/nanoid | 1 + .../postcss@8.5.16/node_modules/picocolors | 1 + .../postcss@8.5.16/node_modules/source-map-js | 1 + .../node_modules/regex-utilities | 1 + .../regex@6.1.0/node_modules/regex-utilities | 1 + .../node_modules/@rollup/rollup-linux-x64-gnu | 1 + .../rollup@4.62.2/node_modules/@types/estree | 1 + .../shiki@2.5.0/node_modules/@shikijs/core | 1 + .../node_modules/@shikijs/engine-javascript | 1 + .../node_modules/@shikijs/engine-oniguruma | 1 + .../shiki@2.5.0/node_modules/@shikijs/langs | 1 + .../shiki@2.5.0/node_modules/@shikijs/themes | 1 + .../shiki@2.5.0/node_modules/@shikijs/types | 1 + .../node_modules/@shikijs/vscode-textmate | 1 + .../shiki@2.5.0/node_modules/@types/hast | 1 + .../node_modules/character-entities-html4 | 1 + .../node_modules/character-entities-legacy | 1 + .../node_modules/copy-anything | 1 + .../node_modules/@types/unist | 1 + .../node_modules/@types/unist | 1 + .../node_modules/@types/unist | 1 + .../node_modules/@types/unist | 1 + .../node_modules/unist-util-is | 1 + .../node_modules/@types/unist | 1 + .../node_modules/unist-util-is | 1 + .../node_modules/unist-util-visit-parents | 1 + .../node_modules/@types/unist | 1 + .../unist-util-stringify-position | 1 + .../vfile@6.0.3/node_modules/@types/unist | 1 + .../vfile@6.0.3/node_modules/vfile-message | 1 + .../.pnpm/vite@5.4.21/node_modules/esbuild | 1 + .../.pnpm/vite@5.4.21/node_modules/postcss | 1 + .../.pnpm/vite@5.4.21/node_modules/rollup | 1 + .../node_modules/@docsearch/css | 1 + .../node_modules/@docsearch/js | 1 + .../node_modules/@iconify-json/simple-icons | 1 + .../node_modules/@shikijs/core | 1 + .../node_modules/@shikijs/transformers | 1 + .../node_modules/@shikijs/types | 1 + .../node_modules/@types/markdown-it | 1 + .../node_modules/@vitejs/plugin-vue | 1 + .../node_modules/@vue/devtools-api | 1 + .../node_modules/@vue/shared | 1 + .../node_modules/@vueuse/core | 1 + .../node_modules/@vueuse/integrations | 1 + .../node_modules/focus-trap | 1 + .../node_modules/mark.js | 1 + .../node_modules/minisearch | 1 + .../node_modules/postcss | 1 + .../node_modules/shiki | 1 + .../node_modules/vite | 1 + .../node_modules/vue | 1 + .../vue@3.5.39/node_modules/@vue/compiler-dom | 1 + .../vue@3.5.39/node_modules/@vue/compiler-sfc | 1 + .../vue@3.5.39/node_modules/@vue/runtime-dom | 1 + .../node_modules/@vue/server-renderer | 1 + .../.pnpm/vue@3.5.39/node_modules/@vue/shared | 1 + docs-2/package.json | 14 + docs-2/pnpm-lock.yaml | 1620 +++++++++++++++++ docs-2/pnpm-workspace.yaml | 2 + docs-2/public/favicon.svg | 4 + docs/{ => archive}/DESIGN.md | 8 - .../archie-core-architecture.md} | 6 +- .../archie-core-skills-prd-v2.md | 29 +- docs/{ => archive}/archie-core-skills-prd.md | 26 +- .../archie-core-v2-architecture.html | 0 docs/{ => archive}/decisions.md | 10 +- .../prds/multi-agent-collaboration.md | 8 +- .../prds/typescript-plugin-engine.md | 0 .../{ => archive}/prds/yaegi-plugin-system.md | 182 +- docs/prds/01-project-management.md | 57 + docs/prds/architecture/agent-system.md | 354 ++++ docs/prds/architecture/configuration.md | 292 +++ .../dependencies-and-contracts.md | 71 + .../architecture/generated-documentation.md | 473 +++++ docs/prds/architecture/identity.md | 293 +++ .../architecture/messaging-and-work-intake.md | 286 +++ docs/prds/architecture/migration-decisions.md | 240 +++ docs/prds/architecture/organisation.md | 93 + docs/prds/architecture/package-review.md | 70 + .../architecture/plugins-and-extensions.md | 42 + docs/prds/architecture/policy.md | 52 + .../architecture/safe-change-and-recovery.md | 101 + docs/prds/hermes-gap-analysis.md | 180 -- docs/prds/hermes-migration-dry-run.md | 101 - extras/gitea-agent-view/README.md | 88 + extras/gitea-agent-view/agent-monitor.js | 133 ++ extras/gitea-agent-view/body_inner_post.tmpl | 36 + extras/gitea-agent-view/extra_tabs.tmpl | 18 + go.mod | 7 +- go.sum | 21 +- internal/config/config.go | 8 - internal/config/config_test.go | 4 +- internal/config/feature_config_test.go | 2 +- internal/events/events.go | 10 +- internal/gateway/gateway_test.go | 16 +- internal/gateway/tasks_test.go | 26 +- internal/indexing/codesearch.go | 23 +- internal/indexing/codesearch_test.go | 1 - ...amcharles93-archie-core-internal-secret.go | 5 +- internal/skillscript/yaegi_test.go | 4 +- internal/store/store.go | 11 +- internal/webui/webui_test.go | 41 +- internal/workflow/steps_test.go | 3 +- tools/docsgen/main.go | 169 ++ tools/docsgen/main_test.go | 33 + tools/go.mod | 30 + tools/go.sum | 109 ++ 311 files changed, 6115 insertions(+), 3973 deletions(-) create mode 100644 .github/workflows/docs.yml delete mode 100644 .scratch/explore-agentexec-protocol.md delete mode 100644 .scratch/explore-chunkB-agentexec.md delete mode 100644 .scratch/explore-chunkB-nats-reply.md delete mode 100644 .scratch/explore-chunkB-workflow.md delete mode 100644 .scratch/explore-chunkC-missions.md delete mode 100644 .scratch/explore-chunkC-patterns.md delete mode 100644 .scratch/explore-chunkC-skills.md delete mode 100644 .scratch/explore-daemon-task-loop.md delete mode 100644 .scratch/explore-nats-integration.md delete mode 100644 .scratch/plan-nats-design.md create mode 100644 docs-2/.vitepress/config.mts create mode 100644 docs-2/README.md create mode 100644 docs-2/architecture/index.md create mode 100644 docs-2/index.md create mode 120000 docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-plugin-algolia-insights create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-shared create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/@algolia/autocomplete-shared create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/search-insights create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/client-search create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/algoliasearch create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/client-search create mode 120000 docs-2/node_modules/.pnpm/@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/algoliasearch create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+requester-fetch@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@algolia+requester-node-http@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/@babel+parser@7.29.7/node_modules/@babel/types create mode 120000 docs-2/node_modules/.pnpm/@babel+types@7.29.7/node_modules/@babel/helper-string-parser create mode 120000 docs-2/node_modules/.pnpm/@babel+types@7.29.7/node_modules/@babel/helper-validator-identifier create mode 120000 docs-2/node_modules/.pnpm/@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/react create mode 120000 docs-2/node_modules/.pnpm/@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/preact create mode 120000 docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-core create mode 120000 docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-preset-algolia create mode 120000 docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/css create mode 120000 docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/algoliasearch create mode 120000 docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/search-insights create mode 120000 docs-2/node_modules/.pnpm/@iconify-json+simple-icons@1.2.88/node_modules/@iconify/types create mode 120000 docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/engine-javascript create mode 120000 docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/engine-oniguruma create mode 120000 docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/types create mode 120000 docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/vscode-textmate create mode 120000 docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@types/hast create mode 120000 docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/hast-util-to-html create mode 120000 docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/types create mode 120000 docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/vscode-textmate create mode 120000 docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/oniguruma-to-es create mode 120000 docs-2/node_modules/.pnpm/@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/types create mode 120000 docs-2/node_modules/.pnpm/@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/vscode-textmate create mode 120000 docs-2/node_modules/.pnpm/@shikijs+langs@2.5.0/node_modules/@shikijs/types create mode 120000 docs-2/node_modules/.pnpm/@shikijs+themes@2.5.0/node_modules/@shikijs/types create mode 120000 docs-2/node_modules/.pnpm/@shikijs+transformers@2.5.0/node_modules/@shikijs/core create mode 120000 docs-2/node_modules/.pnpm/@shikijs+transformers@2.5.0/node_modules/@shikijs/types create mode 120000 docs-2/node_modules/.pnpm/@shikijs+types@2.5.0/node_modules/@shikijs/vscode-textmate create mode 120000 docs-2/node_modules/.pnpm/@shikijs+types@2.5.0/node_modules/@types/hast create mode 120000 docs-2/node_modules/.pnpm/@types+hast@3.0.4/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/@types+markdown-it@14.1.2/node_modules/@types/linkify-it create mode 120000 docs-2/node_modules/.pnpm/@types+markdown-it@14.1.2/node_modules/@types/mdurl create mode 120000 docs-2/node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/vite create mode 120000 docs-2/node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/vue create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/@babel/parser create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/entities create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/estree-walker create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/source-map-js create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-dom@3.5.39/node_modules/@vue/compiler-core create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-dom@3.5.39/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@babel/parser create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-core create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-dom create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-ssr create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/estree-walker create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/magic-string create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/postcss create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/source-map-js create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-ssr@3.5.39/node_modules/@vue/compiler-dom create mode 120000 docs-2/node_modules/.pnpm/@vue+compiler-ssr@3.5.39/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-api@7.7.10/node_modules/@vue/devtools-kit create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/@vue/devtools-shared create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/birpc create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/hookable create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/mitt create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/perfect-debounce create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/speakingurl create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/superjson create mode 120000 docs-2/node_modules/.pnpm/@vue+devtools-shared@7.7.10/node_modules/rfdc create mode 120000 docs-2/node_modules/.pnpm/@vue+reactivity@3.5.39/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/@vue+runtime-core@3.5.39/node_modules/@vue/reactivity create mode 120000 docs-2/node_modules/.pnpm/@vue+runtime-core@3.5.39/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/reactivity create mode 120000 docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/runtime-core create mode 120000 docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/csstype create mode 120000 docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/compiler-ssr create mode 120000 docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/vue create mode 120000 docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@types/web-bluetooth create mode 120000 docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/metadata create mode 120000 docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/shared create mode 120000 docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/vue create mode 120000 docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/core create mode 120000 docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/shared create mode 120000 docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/focus-trap create mode 120000 docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/vue create mode 120000 docs-2/node_modules/.pnpm/@vueuse+shared@12.8.2/node_modules/vue create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/abtesting create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-abtesting create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-analytics create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-common create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-insights create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-personalization create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-query-suggestions create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-search create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/ingestion create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/monitoring create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/recommend create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-browser-xhr create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-fetch create mode 120000 docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-node-http create mode 120000 docs-2/node_modules/.pnpm/copy-anything@4.0.5/node_modules/is-what create mode 120000 docs-2/node_modules/.pnpm/devlop@1.1.0/node_modules/dequal create mode 120000 docs-2/node_modules/.pnpm/esbuild@0.21.5/node_modules/@esbuild/linux-x64 create mode 120000 docs-2/node_modules/.pnpm/focus-trap@7.8.0/node_modules/tabbable create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/@types/hast create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/ccount create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/comma-separated-tokens create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-whitespace create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/html-void-elements create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/mdast-util-to-hast create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/property-information create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/space-separated-tokens create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/stringify-entities create mode 120000 docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/zwitch create mode 120000 docs-2/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/@types/hast create mode 120000 docs-2/node_modules/.pnpm/magic-string@0.30.21/node_modules/@jridgewell/sourcemap-codec create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@types/hast create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@types/mdast create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@ungap/structured-clone create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/devlop create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/micromark-util-sanitize-uri create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/trim-lines create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/unist-util-position create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/unist-util-visit create mode 120000 docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/vfile create mode 120000 docs-2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-symbol create mode 120000 docs-2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-types create mode 120000 docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-character create mode 120000 docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-encode create mode 120000 docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-symbol create mode 120000 docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/emoji-regex-xs create mode 120000 docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/regex create mode 120000 docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/regex-recursion create mode 120000 docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/nanoid create mode 120000 docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/picocolors create mode 120000 docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/source-map-js create mode 120000 docs-2/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-utilities create mode 120000 docs-2/node_modules/.pnpm/regex@6.1.0/node_modules/regex-utilities create mode 120000 docs-2/node_modules/.pnpm/rollup@4.62.2/node_modules/@rollup/rollup-linux-x64-gnu create mode 120000 docs-2/node_modules/.pnpm/rollup@4.62.2/node_modules/@types/estree create mode 120000 docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/core create mode 120000 docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/engine-javascript create mode 120000 docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/engine-oniguruma create mode 120000 docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/langs create mode 120000 docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/themes create mode 120000 docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/types create mode 120000 docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/vscode-textmate create mode 120000 docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@types/hast create mode 120000 docs-2/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/character-entities-html4 create mode 120000 docs-2/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/character-entities-legacy create mode 120000 docs-2/node_modules/.pnpm/superjson@2.2.6/node_modules/copy-anything create mode 120000 docs-2/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-is create mode 120000 docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-is create mode 120000 docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit-parents create mode 120000 docs-2/node_modules/.pnpm/vfile-message@4.0.3/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/vfile-message@4.0.3/node_modules/unist-util-stringify-position create mode 120000 docs-2/node_modules/.pnpm/vfile@6.0.3/node_modules/@types/unist create mode 120000 docs-2/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile-message create mode 120000 docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/esbuild create mode 120000 docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/postcss create mode 120000 docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/rollup create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@docsearch/css create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@docsearch/js create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@iconify-json/simple-icons create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/core create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/transformers create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/types create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@types/markdown-it create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vitejs/plugin-vue create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vue/devtools-api create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vue/shared create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vueuse/core create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vueuse/integrations create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/focus-trap create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/mark.js create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/minisearch create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/postcss create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/shiki create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/vite create mode 120000 docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/vue create mode 120000 docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/compiler-dom create mode 120000 docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/compiler-sfc create mode 120000 docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/runtime-dom create mode 120000 docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/server-renderer create mode 120000 docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/shared create mode 100644 docs-2/package.json create mode 100644 docs-2/pnpm-lock.yaml create mode 100644 docs-2/pnpm-workspace.yaml create mode 100644 docs-2/public/favicon.svg rename docs/{ => archive}/DESIGN.md (82%) rename docs/{prds/archie-core-v2-architecture.md => archive/archie-core-architecture.md} (99%) rename docs/{ => archive}/archie-core-skills-prd-v2.md (93%) rename docs/{ => archive}/archie-core-skills-prd.md (91%) rename docs/{ => archive}/archie-core-v2-architecture.html (100%) rename docs/{ => archive}/decisions.md (96%) rename docs/{ => archive}/prds/multi-agent-collaboration.md (98%) rename docs/{ => archive}/prds/typescript-plugin-engine.md (100%) rename docs/{ => archive}/prds/yaegi-plugin-system.md (52%) create mode 100644 docs/prds/01-project-management.md create mode 100644 docs/prds/architecture/agent-system.md create mode 100644 docs/prds/architecture/configuration.md create mode 100644 docs/prds/architecture/dependencies-and-contracts.md create mode 100644 docs/prds/architecture/generated-documentation.md create mode 100644 docs/prds/architecture/identity.md create mode 100644 docs/prds/architecture/messaging-and-work-intake.md create mode 100644 docs/prds/architecture/migration-decisions.md create mode 100644 docs/prds/architecture/organisation.md create mode 100644 docs/prds/architecture/package-review.md create mode 100644 docs/prds/architecture/plugins-and-extensions.md create mode 100644 docs/prds/architecture/policy.md create mode 100644 docs/prds/architecture/safe-change-and-recovery.md delete mode 100644 docs/prds/hermes-gap-analysis.md delete mode 100644 docs/prds/hermes-migration-dry-run.md create mode 100644 extras/gitea-agent-view/README.md create mode 100644 extras/gitea-agent-view/agent-monitor.js create mode 100644 extras/gitea-agent-view/body_inner_post.tmpl create mode 100644 extras/gitea-agent-view/extra_tabs.tmpl create mode 100644 tools/docsgen/main.go create mode 100644 tools/docsgen/main_test.go create mode 100644 tools/go.mod create mode 100644 tools/go.sum diff --git a/.agents/skills/archie-wf-go-gate/SKILL.md b/.agents/skills/archie-wf-go-gate/SKILL.md index 8897b279b..b4ce7228f 100644 --- a/.agents/skills/archie-wf-go-gate/SKILL.md +++ b/.agents/skills/archie-wf-go-gate/SKILL.md @@ -18,7 +18,7 @@ arcie-core enforces this gate after every builder agent stage. The specific comm come from the repository's `[[repos.gate]]` config, not this skill. This skill documents what a correct gate looks like and how to diagnose failures. -## Standard gate (Tau and similar Go projects) +## Standard gate Run in this exact order. archie-core does NOT run these -- the `ai-sdk/agentloop` gate does. This list is what you should configure in `config.toml`: diff --git a/.beads/interactions.jsonl b/.beads/interactions.jsonl index 177b87103..57a0193ca 100644 --- a/.beads/interactions.jsonl +++ b/.beads/interactions.jsonl @@ -156,3 +156,4 @@ {"id":"int-0515875f328056cbb0888785d35497c9","kind":"field_change","created_at":"2026-07-27T12:11:14.316202683Z","actor":"Sam Catlow","issue_id":"archie-core-5dn","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Investigated local Hermes CLI and current Archie implementation; added the requested parity TODO checklist."}} {"id":"int-e2b07b5c81dd19cabd9e2a18ff94f7f7","kind":"field_change","created_at":"2026-07-27T12:20:51.572157777Z","actor":"Sam Catlow","issue_id":"archie-core-sc5","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Implemented gateway.BuildSystemPrompt rendering internal/gateway/templates/archie.md.tpl: instruction precedence, core rules, communication rules, and blocks, with PersonaRegistry kept as the style layer on top. Tool inventory is derived from the same core.ToolSet passed to the model (cmd/archied/toolSummaries) so prompt and reality cannot drift; empty toolset renders an explicit 'no tools are available'. Tool metadata is markup-escaped and whitespace-flattened against forged tags and forged list entries. task check clean: vet, full go test ./... , golangci-lint 0 issues on changed packages, gofumpt clean. Commit 7fde716. NOT yet deployed - not pushed."}} {"id":"int-c52b1ab5add5f30c8a63b5f03e5faff7","kind":"field_change","created_at":"2026-07-27T13:47:42.515040687Z","actor":"Sam Catlow","issue_id":"archie-core-4we","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Ported tau internal/indexing/codesearch.go @ 4893818d0c76 into archie-core internal/indexing. Mutations: global config path helpers replaced by explicit indexing.Config + DefaultConfig(workDir) (two archied instances share carina and must not share an index); child-process helper is archied's own 'workspace-codesearch' subcommand in cmd/archied/codesearch.go, dispatched from main() before flag parsing so it touches no config/store/NATS; deferred db.Close explicitly discarded for errcheck. Added dep github.com/google/codesearch v1.3.0-rc.1 (uuid and modernc sqlite already present). Verified E2E against the real repo: 2.2MB indexed in 0.05s, correct hits, [] for no match, corrupt index -> clean error exit 1 rather than process death. task check clean; golangci-lint 0 issues on both packages. Commit c924281. NOT pushed. Follow-up: nothing calls indexing.NewManager yet -- it is ported and proven but not wired into the agent's grep path."}} +{"id":"int-eccef7ef7597bda3a8162e06651e8ea2","kind":"field_change","created_at":"2026-07-28T08:35:54.89529236Z","actor":"Sam Catlow","issue_id":"archie-core-6pp","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Removed all unauthorized source-project references and accompanying rationale; validation and independent review complete."}} diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 976a03707..34d07cbef 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -53,6 +53,8 @@ {"_type":"issue","id":"archie-core-abg.18","title":"[EPIC] Memory: pluggable provider architecture with file-backed persistence","description":"Pluggable memory system to match Hermes parity:\\n\\n1. **MemoryProvider interface**: Abstract interface with methods for initialize(), get_tool_schemas(), prefetch(), sync_turn(), and optional lifecycle hooks (on_session_end, on_session_switch, on_pre_compress, on_memory_write).\\n\\n2. **Built-in file-backed memory**: MEMORY.md and USER.md stored per-session/profile. LLM-callable memory tool with add/replace/remove actions. Frozen snapshot at session start (preserves prefix cache), immediate disk write on updates. Section-sign delimited entries with substring matching.\\n\\n3. **MemoryManager**: Orchestrates built-in + at most one external provider. Background serialized write executor. Prefetch with timeout (8s). Streaming context scrubber that strips injected memory spans from model output.\\n\\nRef: docs/prds/hermes-gap-analysis.md section 4","acceptance_criteria":"An external memory provider (e.g. Honcho, Mem0) can be plugged in via config. The built-in memory tool persists across sessions. Conversation context is recalled on session resume.","status":"open","priority":0,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-07-25T14:02:22Z","created_by":"Sam Catlow","updated_at":"2026-07-25T14:02:22Z","dependencies":[{"issue_id":"archie-core-abg.18","depends_on_id":"archie-core-abg","type":"parent-child","created_at":"2026-07-26T00:02:22Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-abg.16","title":"[EPIC] Gateway: rich message model, adapter lifecycle, session management","description":"Foundational gateway infrastructure to match Hermes parity. Three interdependent pieces:\\n\\n1. **Message model**: Replace the 3-field Message struct with a rich MessageEvent (MessageType enum: text/photo/video/audio/voice/document/sticker/command, media_urls, reply_to context, metadata dict, source). This is the wire type every adapter produces.\\n\\n2. **Adapter lifecycle**: Replace the 3-method Gateway interface with a BasePlatformAdapter interface: connect()/disconnect()/send() as required methods, plus optional overrides for typing indicators, edit/delete, image/voice/video/document send, interactive UX (clarify buttons, approval dialogs). Capability flags (supports_code_blocks, splits_long_messages, supports_async_delivery).\\n\\n3. **Session management**: SessionSource struct (platform, chat_id, chat_type, user_id, thread_id, guild_id, profile), AsyncSessionStore for persistent session storage, SessionContext for system prompt injection.\\n\\nAll three blocks together enable adding new platforms as plugins without touching core gateway code.\\n\\nRef: docs/prds/hermes-gap-analysis.md sections 1-2","acceptance_criteria":"New adapters can be added by implementing a Go interface with connect/disconnect/send + optional media methods. Messages carry full metadata through the pipeline. Sessions persist across gateway restarts.","status":"open","priority":0,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-07-25T14:02:21Z","created_by":"Sam Catlow","updated_at":"2026-07-25T14:02:21Z","dependencies":[{"issue_id":"archie-core-abg.16","depends_on_id":"archie-core-abg","type":"parent-child","created_at":"2026-07-26T00:02:21Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-jfg","title":"Spawned archie-agent containers not on daemon's docker network — can't reach NATS","description":"Root cause of 'agent still failing on the server': archied's container.Pool.Acquire creates archie-agent containers via the Docker SDK with no NetworkMode set, so Docker attaches them to the default bridge network. archied and nats run on the compose-created 'archie-core_default' network instead, so the spawned container's hostname resolution for 'nats' (from NATS_URL=nats://nats:4222) fails and archie-agent can't connect. Confirmed on carina host logs: archied logs show repeating 'taskrun request failed err=\"nats: no responders available for request\"' for every task, containers created and destroyed within ~1.5s (consistent with archie-agent's NATS client failing fast). Fixed by detecting the daemon's own container's network in NewPool (selfNetwork, via ContainerInspect on os.Hostname()) and setting HostConfig.NetworkMode on spawned containers to match.","status":"closed","priority":0,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-07-24T03:10:26Z","created_by":"Sam Catlow","updated_at":"2026-07-25T13:04:34Z","closed_at":"2026-07-25T13:04:34Z","close_reason":"Fix already implemented and verified: selfNetwork() in internal/container/pool.go detects the daemon's own container network via ContainerInspect(os.Hostname()) and Acquire() sets HostConfig.NetworkMode to match, so spawned archie-agent containers join the same compose network as nats. Build and internal/container tests pass.","dependency_count":0,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"archie-core-6pp","title":"Remove source-project references from Archie","description":"Remove every tau reference outside the explicitly preserved Beads data and docs-2/README.md. Delete copied product-specific documentation and accompanied rationale rather than mechanically renaming it. Retain reusable documentation-generation and VitePress scaffolding only after removing source-specific coupling. Update code, tests, archives, and architecture documents so archie-core contains no unauthorized tau references.","acceptance_criteria":"rg 'tau' -ow excluding .beads/** and docs-2/README.md returns zero; retained tools and documentation scaffolding contain no source-project imports, paths, product claims, or rationale; relevant validation passes.","notes":"Complete. Exact case-insensitive whole-word scan excluding .git/**, .beads/**, and docs-2/README.md returns 0. Source-specific provenance and rationale removed, neutral fixtures preserve behavior, docs workflow/site build from docs-2, retained README excluded from publication, and Archie-owned docsgen generates current agent contracts without process-global cwd mutation. tools tests/vet pass; affected package tests pass; VitePress production build passes. Fresh adversarial review reports zero surviving findings. Full task check passes fmt/go-fix/vet/build and all packages except unrelated pre-existing internal/skillscript TestRunWrapsExternalCommand (Run returned newline).","status":"in_progress","priority":1,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-28T08:00:32Z","created_by":"Sam Catlow","updated_at":"2026-07-28T08:35:54Z","started_at":"2026-07-28T08:00:37Z","dependency_count":0,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"archie-core-5d7","title":"Define target project organisation and restructuring rules","description":"Run a package-by-package architecture grilling session, establish the target DDD and semi-microservice organisation, record strict restructuring requirements and package destinations, and produce docs/prds/01-project-management.md as the durable handoff.","acceptance_criteria":"The PRD records agreed project-wide organisation rules, bounded-context and service/plugin boundaries, dependency constraints, migration principles, and the destination of each reviewed package. Decisions are confirmed one at a time with the user before the document is finalized.","notes":"Corrected documentation-generation wording: removed repeated source-project provenance from the target architecture. The copied generator/site are now described only as an implementation baseline with concrete adaptation gaps; the architecture is expressed entirely in Archie terms. Updated generated-documentation.md and its migration-decisions.md reference.","status":"in_progress","priority":1,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-28T00:00:36Z","created_by":"Sam Catlow","updated_at":"2026-07-28T07:27:47Z","started_at":"2026-07-28T00:00:42Z","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-qa4.4","title":"Phase 4: structural refactor (~28 issues)","description":"funlen, gocognit, cyclop, nestif, maintidx, interfacebloat. This IS the internal/config restructure already discussed (finalize at cognitive complexity 106, feature_config loadDirInto at 74) plus daemon process/checkWaiting. MUST BE LAST: refactoring moves line numbers and invalidates every other phase in flight. Fold into the config file-per-responsibility split rather than doing the same work twice.","status":"open","priority":1,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-27T15:23:01Z","created_by":"Sam Catlow","updated_at":"2026-07-27T15:23:01Z","dependencies":[{"issue_id":"archie-core-qa4.4","depends_on_id":"archie-core-qa4","type":"parent-child","created_at":"2026-07-28T01:23:00Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-qa4.3","title":"Phase 3: correctness findings needing judgement (~62 issues)","description":"nilerr (11: 6 in internal/agentexec inprocess.go/worker.go, 2 gateway), bodyclose (1), contextcheck (7), containedctx (2), fatcontext. SINGLE SESSION, sequential, no subagents: each nilerr site needs a read of whether the swallow is deliberate degradation or a real bug, and a context-free worker will silently convert deliberate behaviour into a change. Do nilerr FIRST -- highest bug probability in the whole set. BLOCKED on a policy decision for noctx (41 sites, mostly webui/worktree/store): fixing it means threading context through public APIs, which is an API change, not a lint fix.","status":"open","priority":1,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-27T15:23:00Z","created_by":"Sam Catlow","updated_at":"2026-07-27T15:23:00Z","dependencies":[{"issue_id":"archie-core-qa4.3","depends_on_id":"archie-core-qa4","type":"parent-child","created_at":"2026-07-28T01:23:00Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-qa4.1","title":"Phase 1: autofix pass (~35 issues)","description":"golangci-lint run --fix plus the formatters. Covers errorlint, fatcontext, gocritic, sloglint, usestdlibvars, usetesting, gci, gofumpt, goimports. Zero judgement. MUST run first: it touches formatting across every file and would conflict with anything in flight. Single command, single commit, verify with task check.","status":"open","priority":1,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-27T15:22:59Z","created_by":"Sam Catlow","updated_at":"2026-07-27T15:22:59Z","dependencies":[{"issue_id":"archie-core-qa4.1","depends_on_id":"archie-core-qa4","type":"parent-child","created_at":"2026-07-28T01:22:58Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..5e5771b43 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,68 @@ +name: Deploy docs + +on: + push: + branches: [main] + paths: + - "docs-2/**" + - "tools/**" + - ".github/workflows/docs.yml" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # full history - VitePress lastUpdated needs it + + - uses: pnpm/action-setup@v6 + with: + version: 10 + + - uses: actions/setup-node@v4 + with: + node-version: latest + cache: pnpm + cache-dependency-path: docs-2/pnpm-lock.yaml + + - uses: actions/cache@v4 + with: + path: docs-2/.vitepress/cache + key: ${{ runner.os }}-vitepress-${{ hashFiles('docs-2/**', 'docs-2/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-vitepress- + + - name: Install dependencies + working-directory: docs-2 + run: pnpm install --frozen-lockfile + + - name: Build docs site + working-directory: docs-2 + run: pnpm build + + - uses: actions/configure-pages@v5 + + - uses: actions/upload-pages-artifact@v3 + with: + path: docs-2/.vitepress/dist + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/.golangci.yml b/.golangci.yml index 34241f562..6ad8bd897 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,16 +17,9 @@ run: go: "1.26" linters: - # The standard set (errcheck, govet, ineffassign, staticcheck, unused) - # plus the curated additions below. Deliberately not `all`: the - # formatting-opinion linters (wsl_v5, nlreturn, varnamelen) and the - # absolutist ones (exhaustruct, err113, wrapcheck) produce more noise - # than signal here. default: standard enable: - # -- Structure and complexity ------------------------------------ - # Their absence is why a 180-line, cognitive-complexity-106 - # finalize() in a 745-line file reported clean. + # Structure and complexity - cyclop - dupl - funlen @@ -35,12 +28,11 @@ linters: - maintidx - nestif - # -- Architecture ------------------------------------------------- - - depguard + # Architecture - importas - interfacebloat - # -- Correctness -------------------------------------------------- + # Correctness - bodyclose - containedctx - contextcheck @@ -58,12 +50,12 @@ linters: - rowserrcheck - sqlclosecheck - # -- Idiom and hygiene -------------------------------------------- - - gocritic # also the host for ruleguard dynamic AST rules + # Idiom and hygiene + - gocritic - godox - misspell - predeclared - - sloglint # this daemon logs with log/slog throughout + - sloglint - unconvert - usestdlibvars - usetesting @@ -86,11 +78,10 @@ linters: min-complexity: 5 godox: - # TODO is deliberately absent: tracked work lives in beads, and - # flagging every TODO trains people to delete the marker rather - # than the debt. FIXME/HACK/BUG should not survive review. + # tracked work lives in beads - use it: `bd create [title] [flags]` keywords: - FIXME + - TODO - HACK - BUG @@ -101,18 +92,6 @@ linters: no-mixed-args: true key-naming-case: snake - depguard: - rules: - # Code ported from tau must stay a straight diff against its - # upstream original, so it may not reach into archie-core's own - # configuration layer. It takes config as constructor params. - ported-stays-portable: - files: - - "**/internal/indexing/**" - deny: - - pkg: github.com/samcharles93/archie-core/internal/config - desc: ported from tau and must remain refreshable by diff; take configuration as constructor parameters - exclusions: generated: lax warn-unused: true diff --git a/.references/skills-implementation.md b/.references/skills-implementation.md index 07dff24ab..0b852542b 100644 --- a/.references/skills-implementation.md +++ b/.references/skills-implementation.md @@ -1,23 +1,38 @@ -We would need to implement the agentskills spec, I'm not sure if it needs to be implemented in the Frontend app or the backend, let me know. here's the client implementation details: +We would need to implement the agentskills spec, I'm not sure if it needs to be +implemented in the Frontend app or the backend, let me know. here's the client +implementation details: > ## Documentation Index -> Fetch the complete documentation index at: https://agentskills.io/llms.txt -> Use this file to discover all available pages before exploring further. +> +> Fetch the complete documentation index at: https://agentskills.io/llms.txt Use +> this file to discover all available pages before exploring further. # How to add skills support to your agent > A guide for adding Agent Skills support to an AI agent or development tool. -This guide walks through how to add Agent Skills support to an AI agent or development tool. It covers the full lifecycle: discovering skills, telling the model about them, loading their content into context, and keeping that content effective over time. +This guide walks through how to add Agent Skills support to an AI agent or +development tool. It covers the full lifecycle: discovering skills, telling the +model about them, loading their content into context, and keeping that content +effective over time. -The core integration is the same regardless of your agent's architecture. The implementation details vary based on two factors: +The core integration is the same regardless of your agent's architecture. The +implementation details vary based on two factors: -* **Where do skills live?** A locally-running agent can scan the user's filesystem for skill directories. A cloud-hosted or sandboxed agent will need an alternative discovery mechanism — an API, a remote registry, or bundled assets. -* **How does the model access skill content?** If the model has file-reading capabilities, it can read `SKILL.md` files directly. Otherwise, you'll provide a dedicated tool or inject skill content into the prompt programmatically. +- **Where do skills live?** A locally-running agent can scan the user's + filesystem for skill directories. A cloud-hosted or sandboxed agent will need + an alternative discovery mechanism — an API, a remote registry, or bundled + assets. +- **How does the model access skill content?** If the model has file-reading + capabilities, it can read `SKILL.md` files directly. Otherwise, you'll provide + a dedicated tool or inject skill content into the prompt programmatically. -The guide notes where these differences matter. You don't need to support every scenario — follow the path that fits your agent. +The guide notes where these differences matter. You don't need to support every +scenario — follow the path that fits your agent. -**Prerequisites**: Familiarity with the [Agent Skills specification](/specification), which defines the `SKILL.md` file format, frontmatter fields, and directory conventions. +**Prerequisites**: Familiarity with the +[Agent Skills specification](/specification), which defines the `SKILL.md` file +format, frontmatter fields, and directory conventions. ## The core principle: progressive disclosure @@ -29,9 +44,15 @@ Every skills-compatible agent follows the same three-tier loading strategy: | 2. Instructions | Full `SKILL.md` body | When the skill is activated | \<5000 tokens (recommended) | | 3. Resources | Scripts, references, assets | When the instructions reference them | Varies | -The model sees the catalog from the start, so it knows what skills are available. When it decides a skill is relevant, it loads the full instructions. If those instructions reference supporting files, the model loads them individually as needed. +The model sees the catalog from the start, so it knows what skills are +available. When it decides a skill is relevant, it loads the full instructions. +If those instructions reference supporting files, the model loads them +individually as needed. -This keeps the base context small while giving the model access to specialized knowledge on demand. An agent with 20 installed skills doesn't pay the token cost of 20 full instruction sets upfront — only the ones actually used in a given conversation. +This keeps the base context small while giving the model access to specialized +knowledge on demand. An agent with 20 installed skills doesn't pay the token +cost of 20 full instruction sets upfront — only the ones actually used in a +given conversation. ## Step 1: Discover skills @@ -39,14 +60,20 @@ At session startup, find all available skills and load their metadata. ### Where to scan -Which directories you scan depends on your agent's environment. Most locally-running agents scan at least two scopes: +Which directories you scan depends on your agent's environment. Most +locally-running agents scan at least two scopes: -* **Project-level** (relative to the working directory): Skills specific to a project or repository. -* **User-level** (relative to the home directory): Skills available across all projects for a given user. +- **Project-level** (relative to the working directory): Skills specific to a + project or repository. +- **User-level** (relative to the home directory): Skills available across all + projects for a given user. -Other scopes are possible too — for example, organization-wide skills deployed by an admin, or skills bundled with the agent itself. The right set of scopes depends on your agent's deployment model. +Other scopes are possible too — for example, organization-wide skills deployed +by an admin, or skills bundled with the agent itself. The right set of scopes +depends on your agent's deployment model. -Within each scope, consider scanning both a **client-specific directory** and the **`.agents/skills/` convention**: +Within each scope, consider scanning both a **client-specific directory** and +the **`.agents/skills/` convention**: | Scope | Path | Purpose | | ------- | ---------------------------------- | ----------------------------- | @@ -55,7 +82,11 @@ Within each scope, consider scanning both a **client-specific directory** and th | User | `~/./skills/` | Your client's native location | | User | `~/.agents/skills/` | Cross-client interoperability | -The `.agents/skills/` paths have emerged as a widely-adopted convention for cross-client skill sharing. While the Agent Skills specification does not mandate where skill directories live (it only defines what goes inside them), scanning `.agents/skills/` means skills installed by other compliant clients are automatically visible to yours, and vice versa. +The `.agents/skills/` paths have emerged as a widely-adopted convention for +cross-client skill sharing. While the Agent Skills specification does not +mandate where skill directories live (it only defines what goes inside them), +scanning `.agents/skills/` means skills installed by other compliant clients are +automatically visible to yours, and vice versa. Some implementations also scan `.claude/skills/` (both project-level and user-level) for pragmatic compatibility, since many existing skills are installed there. Other additional locations include ancestor directories up to the git root (useful for monorepos), [XDG](https://specifications.freedesktop.org/basedir-spec/latest/) config directories, and user-configured paths. @@ -63,7 +94,8 @@ The `.agents/skills/` paths have emerged as a widely-adopted convention for cros ### What to scan for -Within each skills directory, look for **subdirectories containing a file named exactly `SKILL.md`**: +Within each skills directory, look for **subdirectories containing a file named +exactly `SKILL.md`**: ``` ~/.agents/skills/ @@ -78,31 +110,51 @@ Within each skills directory, look for **subdirectories containing a file named Practical scanning rules: -* Skip directories that won't contain skills, such as `.git/` and `node_modules/` -* Optionally respect `.gitignore` to avoid scanning build artifacts -* Set reasonable bounds (e.g., max depth of 4-6 levels, max 2000 directories) to prevent runaway scanning in large directory trees +- Skip directories that won't contain skills, such as `.git/` and + `node_modules/` +- Optionally respect `.gitignore` to avoid scanning build artifacts +- Set reasonable bounds (e.g., max depth of 4-6 levels, max 2000 directories) to + prevent runaway scanning in large directory trees ### Handling name collisions When two skills share the same `name`, apply a deterministic precedence rule. -The universal convention across existing implementations: **project-level skills override user-level skills.** +The universal convention across existing implementations: **project-level skills +override user-level skills.** -Within the same scope (e.g., two skills named `code-review` found under both `/.agents/skills/` and `/./skills/`), either first-found or last-found is acceptable — pick one and be consistent. Log a warning when a collision occurs so the user knows a skill was shadowed. +Within the same scope (e.g., two skills named `code-review` found under both +`/.agents/skills/` and `/./skills/`), either +first-found or last-found is acceptable — pick one and be consistent. Log a +warning when a collision occurs so the user knows a skill was shadowed. ### Trust considerations -Project-level skills come from the repository being worked on, which may be untrusted (e.g., a freshly cloned open-source project). Consider gating project-level skill loading on a trust check — only load them if the user has marked the project folder as trusted. This prevents untrusted repositories from silently injecting instructions into the agent's context. +Project-level skills come from the repository being worked on, which may be +untrusted (e.g., a freshly cloned open-source project). Consider gating +project-level skill loading on a trust check — only load them if the user has +marked the project folder as trusted. This prevents untrusted repositories from +silently injecting instructions into the agent's context. ### Cloud-hosted and sandboxed agents -If your agent runs in a container or on a remote server, it won't have access to the user's local filesystem. Discovery needs to work differently depending on the skill scope: +If your agent runs in a container or on a remote server, it won't have access to +the user's local filesystem. Discovery needs to work differently depending on +the skill scope: -* **Project-level skills** are often the easiest case. If the agent operates on a cloned repository (even inside a sandbox), project-level skills travel with the code and can be scanned from the repo's directory tree. -* **User-level and organization-level skills** don't exist in the sandbox. You'll need to provision them from an external source — for example, cloning a configuration repository, accepting skill URLs or packages through your agent's settings, or letting users upload skill directories through a web UI. -* **Built-in skills** can be packaged as static assets within the agent's deployment artifact, making them available in every session without external fetching. +- **Project-level skills** are often the easiest case. If the agent operates on + a cloned repository (even inside a sandbox), project-level skills travel with + the code and can be scanned from the repo's directory tree. +- **User-level and organization-level skills** don't exist in the sandbox. + You'll need to provision them from an external source — for example, cloning a + configuration repository, accepting skill URLs or packages through your + agent's settings, or letting users upload skill directories through a web UI. +- **Built-in skills** can be packaged as static assets within the agent's + deployment artifact, making them available in every session without external + fetching. -Once skills are available to the agent, the rest of the lifecycle — parsing, disclosure, activation — works the same. +Once skills are available to the agent, the rest of the lifecycle — parsing, +disclosure, activation — works the same. ## Step 2: Parse `SKILL.md` files @@ -110,35 +162,45 @@ For each discovered `SKILL.md`, extract the metadata and body content. ### Frontmatter extraction -A `SKILL.md` file has two parts: YAML frontmatter between `---` delimiters, and a markdown body after the closing delimiter. To parse: +A `SKILL.md` file has two parts: YAML frontmatter between `---` delimiters, and +a markdown body after the closing delimiter. To parse: -1. Find the opening `---` at the start of the file and the closing `---` after it. -2. Parse the YAML block between them. Extract `name` and `description` (required), plus any optional fields. +1. Find the opening `---` at the start of the file and the closing `---` after + it. +2. Parse the YAML block between them. Extract `name` and `description` + (required), plus any optional fields. 3. Everything after the closing `---`, trimmed, is the skill's body content. -See the [specification](/specification) for the full set of frontmatter fields and their constraints. +See the [specification](/specification) for the full set of frontmatter fields +and their constraints. ### Handling malformed YAML -Skill files authored for other clients may contain technically invalid YAML that their parsers happen to accept. The most common issue is unquoted values containing colons: +Skill files authored for other clients may contain technically invalid YAML that +their parsers happen to accept. The most common issue is unquoted values +containing colons: ```yaml theme={null} # Technically invalid YAML — the colon breaks parsing description: Use this skill when: the user asks about PDFs ``` -Consider a fallback that wraps such values in quotes or converts them to YAML block scalars before retrying. This improves cross-client compatibility at minimal cost. +Consider a fallback that wraps such values in quotes or converts them to YAML +block scalars before retrying. This improves cross-client compatibility at +minimal cost. ### Lenient validation Warn on issues but still load the skill when possible: -* Name doesn't match the parent directory name → warn, load anyway -* Name exceeds 64 characters → warn, load anyway -* Description is missing or empty → skip the skill (a description is essential for disclosure), log the error -* YAML is completely unparseable → skip the skill, log the error +- Name doesn't match the parent directory name → warn, load anyway +- Name exceeds 64 characters → warn, load anyway +- Description is missing or empty → skip the skill (a description is essential + for disclosure), log the error +- YAML is completely unparseable → skip the skill, log the error -Record diagnostics so they can be surfaced to the user (in a debug command, log file, or UI), but don't block skill loading on cosmetic issues. +Record diagnostics so they can be surfaced to the user (in a debug command, log +file, or UI), but don't block skill loading on cosmetic issues. The [specification](/specification) defines strict constraints on the `name` field (matching the parent directory, character set, max length). The lenient approach above deliberately relaxes these to improve compatibility with skills authored for other clients. @@ -154,19 +216,28 @@ At minimum, each skill record needs three fields: | `description` | From frontmatter | | `location` | Absolute path to the `SKILL.md` file | -Store these in an in-memory map keyed by `name` for fast lookup during activation. +Store these in an in-memory map keyed by `name` for fast lookup during +activation. -You can also store the **body** (the markdown content after the frontmatter) at discovery time, or read it from `location` at activation time. Storing it makes activation faster; reading it at activation time uses less memory in aggregate and picks up changes to skill files between activations. +You can also store the **body** (the markdown content after the frontmatter) at +discovery time, or read it from `location` at activation time. Storing it makes +activation faster; reading it at activation time uses less memory in aggregate +and picks up changes to skill files between activations. -The skill's **base directory** (the parent directory of `location`) is needed later to resolve relative paths and enumerate bundled resources — derive it from `location` when needed. +The skill's **base directory** (the parent directory of `location`) is needed +later to resolve relative paths and enumerate bundled resources — derive it from +`location` when needed. ## Step 3: Disclose available skills to the model -Tell the model what skills exist without loading their full content. This is [tier 1 of progressive disclosure](#the-core-principle-progressive-disclosure). +Tell the model what skills exist without loading their full content. This is +[tier 1 of progressive disclosure](#the-core-principle-progressive-disclosure). ### Building the skill catalog -For each discovered skill, include `name`, `description`, and optionally `location` (the path to the `SKILL.md` file) in whatever structured format suits your stack — XML, JSON, or a bulleted list all work: +For each discovered skill, include `name`, `description`, and optionally +`location` (the path to the `SKILL.md` file) in whatever structured format suits +your stack — XML, JSON, or a bulleted list all work: ```xml theme={null} @@ -183,23 +254,37 @@ For each discovered skill, include `name`, `description`, and optionally `locati ``` -The `location` field serves two purposes: it enables file-read activation (see [Step 4](#step-4-activate-skills)), and it gives the model a base path for resolving relative references in the skill body (like `scripts/evaluate.py`). If your dedicated activation tool provides the skill directory path in its result (see [Structured wrapping](#structured-wrapping) in Step 4), you can omit `location` from the catalog. Otherwise, include it. +The `location` field serves two purposes: it enables file-read activation (see +[Step 4](#step-4-activate-skills)), and it gives the model a base path for +resolving relative references in the skill body (like `scripts/evaluate.py`). If +your dedicated activation tool provides the skill directory path in its result +(see [Structured wrapping](#structured-wrapping) in Step 4), you can omit +`location` from the catalog. Otherwise, include it. -Each skill adds roughly 50-100 tokens to the catalog. Even with dozens of skills installed, the catalog remains compact. +Each skill adds roughly 50-100 tokens to the catalog. Even with dozens of skills +installed, the catalog remains compact. ### Where to place the catalog Two approaches are common: -**System prompt section**: Add the catalog as a labeled section in the system prompt, preceded by brief instructions on how to use skills. This is the simplest approach and works with any model that has access to a file-reading tool. +**System prompt section**: Add the catalog as a labeled section in the system +prompt, preceded by brief instructions on how to use skills. This is the +simplest approach and works with any model that has access to a file-reading +tool. -**Tool description**: Embed the catalog in the description of a dedicated skill-activation tool (see [Step 4](#step-4-activate-skills)). This keeps the system prompt clean and naturally couples discovery with activation. +**Tool description**: Embed the catalog in the description of a dedicated +skill-activation tool (see [Step 4](#step-4-activate-skills)). This keeps the +system prompt clean and naturally couples discovery with activation. -Both work. System prompt placement is simpler and more broadly compatible; tool description embedding is cleaner when you have a dedicated activation tool. +Both work. System prompt placement is simpler and more broadly compatible; tool +description embedding is cleaner when you have a dedicated activation tool. ### Behavioral instructions -Include a short instruction block alongside the catalog telling the model how and when to use skills. The wording depends on which activation mechanism you support (see [Step 4](#step-4-activate-skills)): +Include a short instruction block alongside the catalog telling the model how +and when to use skills. The wording depends on which activation mechanism you +support (see [Step 4](#step-4-activate-skills)): **If the model activates skills by reading files:** @@ -219,41 +304,62 @@ When a task matches a skill's description, call the activate_skill tool with the skill's name to load its full instructions. ``` -Keep these instructions concise. The goal is to tell the model that skills exist and how to load them — the skill content itself provides the detailed instructions once loaded. +Keep these instructions concise. The goal is to tell the model that skills exist +and how to load them — the skill content itself provides the detailed +instructions once loaded. ### Filtering Some skills should be excluded from the catalog. Common reasons: -* The user has disabled the skill in settings -* A permission system denies access to the skill -* The skill has opted out of model-driven activation (e.g., via a `disable-model-invocation` flag) +- The user has disabled the skill in settings +- A permission system denies access to the skill +- The skill has opted out of model-driven activation (e.g., via a + `disable-model-invocation` flag) -**Hide filtered skills entirely** from the catalog rather than listing them and blocking at activation time. This prevents the model from wasting turns attempting to load skills it can't use. +**Hide filtered skills entirely** from the catalog rather than listing them and +blocking at activation time. This prevents the model from wasting turns +attempting to load skills it can't use. ### When no skills are available -If no skills are discovered, omit the catalog and behavioral instructions entirely. Don't show an empty `` block or register a skill tool with no valid options — this would confuse the model. +If no skills are discovered, omit the catalog and behavioral instructions +entirely. Don't show an empty `` block or register a skill +tool with no valid options — this would confuse the model. ## Step 4: Activate skills -When the model or user selects a skill, deliver the full instructions into the conversation context. This is [tier 2 of progressive disclosure](#the-core-principle-progressive-disclosure). +When the model or user selects a skill, deliver the full instructions into the +conversation context. This is +[tier 2 of progressive disclosure](#the-core-principle-progressive-disclosure). ### Model-driven activation -Most implementations rely on the model's own judgment as the activation mechanism, rather than implementing harness-side trigger matching or keyword detection. The model reads the catalog (from [Step 3](#step-3-disclose-available-skills-to-the-model)), decides a skill is relevant to the current task, and loads it. +Most implementations rely on the model's own judgment as the activation +mechanism, rather than implementing harness-side trigger matching or keyword +detection. The model reads the catalog (from +[Step 3](#step-3-disclose-available-skills-to-the-model)), decides a skill is +relevant to the current task, and loads it. Two implementation patterns: -**File-read activation**: The model calls its standard file-read tool with the `SKILL.md` path from the catalog. No special infrastructure needed — the agent's existing file-reading capability is sufficient. The model receives the file content as a tool result. This is the simplest approach when the model has file access. +**File-read activation**: The model calls its standard file-read tool with the +`SKILL.md` path from the catalog. No special infrastructure needed — the agent's +existing file-reading capability is sufficient. The model receives the file +content as a tool result. This is the simplest approach when the model has file +access. -**Dedicated tool activation**: Register a tool (e.g., `activate_skill`) that takes a skill name and returns the content. This is required when the model can't read files directly, and optional (but useful) even when it can. Advantages over raw file reads: +**Dedicated tool activation**: Register a tool (e.g., `activate_skill`) that +takes a skill name and returns the content. This is required when the model +can't read files directly, and optional (but useful) even when it can. +Advantages over raw file reads: -* Control what content is returned — e.g., strip YAML frontmatter or preserve it (see [What the model receives](#what-the-model-receives) below) -* Wrap content in structured tags for identification during context management -* List bundled resources (e.g., `references/*`) alongside the instructions -* Enforce permissions or prompt for user consent -* Track activation for analytics +- Control what content is returned — e.g., strip YAML frontmatter or preserve it + (see [What the model receives](#what-the-model-receives) below) +- Wrap content in structured tags for identification during context management +- List bundled resources (e.g., `references/*`) alongside the instructions +- Enforce permissions or prompt for user consent +- Track activation for analytics If you use a dedicated activation tool, constrain the `name` parameter to the set of valid skill names (e.g., as an enum in the tool schema). This prevents the model from hallucinating nonexistent skill names. If no skills are available, don't register the tool at all. @@ -261,23 +367,40 @@ Two implementation patterns: ### User-explicit activation -Users should also be able to activate skills directly, without waiting for the model to decide. The most common pattern is a **slash command or mention syntax** (`/skill-name` or `$skill-name`) that the harness intercepts. The specific syntax is up to you — the key idea is that the harness handles the lookup and injection, so the model receives skill content without needing to take an activation action itself. +Users should also be able to activate skills directly, without waiting for the +model to decide. The most common pattern is a **slash command or mention +syntax** (`/skill-name` or `$skill-name`) that the harness intercepts. The +specific syntax is up to you — the key idea is that the harness handles the +lookup and injection, so the model receives skill content without needing to +take an activation action itself. -An autocomplete widget (listing available skills as the user types) can also make this discoverable. +An autocomplete widget (listing available skills as the user types) can also +make this discoverable. ### What the model receives -When a skill is activated, the model receives the skill's instructions. Two options for what exactly that content looks like: +When a skill is activated, the model receives the skill's instructions. Two +options for what exactly that content looks like: -**Full file**: The model sees the entire `SKILL.md` including YAML frontmatter. This is the natural outcome with file-read activation, where the model reads the raw file. It's also a valid choice for dedicated tools. The frontmatter may contain fields useful at activation time — for example, [`compatibility`](/specification#compatibility-field) notes environment requirements that could inform how the model executes the skill's instructions. +**Full file**: The model sees the entire `SKILL.md` including YAML frontmatter. +This is the natural outcome with file-read activation, where the model reads the +raw file. It's also a valid choice for dedicated tools. The frontmatter may +contain fields useful at activation time — for example, +[`compatibility`](/specification#compatibility-field) notes environment +requirements that could inform how the model executes the skill's instructions. -**Body only (frontmatter stripped)**: The harness parses and removes the YAML frontmatter, returning only the markdown instructions. Among existing implementations with dedicated activation tools, most take this approach — stripping the frontmatter after extracting `name` and `description` during discovery. +**Body only (frontmatter stripped)**: The harness parses and removes the YAML +frontmatter, returning only the markdown instructions. Among existing +implementations with dedicated activation tools, most take this approach — +stripping the frontmatter after extracting `name` and `description` during +discovery. Both approaches work in practice. ### Structured wrapping -If you use a dedicated activation tool, consider wrapping skill content in identifying tags. For example: +If you use a dedicated activation tool, consider wrapping skill content in +identifying tags. For example: ```xml theme={null} @@ -301,67 +424,122 @@ Relative paths in this skill are relative to the skill directory. This has practical benefits: -* The model can clearly distinguish skill instructions from other conversation content -* The harness can identify skill content during context compaction ([Step 5](#step-5-manage-skill-context-over-time)) -* Bundled resources are surfaced to the model without being eagerly loaded +- The model can clearly distinguish skill instructions from other conversation + content +- The harness can identify skill content during context compaction + ([Step 5](#step-5-manage-skill-context-over-time)) +- Bundled resources are surfaced to the model without being eagerly loaded ### Listing bundled resources -When a dedicated activation tool returns skill content, it can also enumerate supporting files (scripts, references, assets) in the skill directory — but it should **not eagerly read them**. The model loads specific files on demand using its file-read tools when the skill's instructions reference them. +When a dedicated activation tool returns skill content, it can also enumerate +supporting files (scripts, references, assets) in the skill directory — but it +should **not eagerly read them**. The model loads specific files on demand using +its file-read tools when the skill's instructions reference them. -For large skill directories, consider capping the listing and noting that it may be incomplete. +For large skill directories, consider capping the listing and noting that it may +be incomplete. ### Permission allowlisting -If your agent has a permission system that gates file access, **allowlist skill directories** so the model can read bundled resources without triggering user confirmation prompts. Without this, every reference to a bundled script or reference file results in a permission dialog, breaking the flow for skills that include resources beyond the `SKILL.md` itself. +If your agent has a permission system that gates file access, **allowlist skill +directories** so the model can read bundled resources without triggering user +confirmation prompts. Without this, every reference to a bundled script or +reference file results in a permission dialog, breaking the flow for skills that +include resources beyond the `SKILL.md` itself. ## Step 5: Manage skill context over time -Once skill instructions are in the conversation context, keep them effective for the duration of the session. +Once skill instructions are in the conversation context, keep them effective for +the duration of the session. ### Protect skill content from context compaction -If your agent truncates or summarizes older messages when the context window fills up, **exempt skill content from pruning**. Skill instructions are durable behavioral guidance — losing them mid-conversation silently degrades the agent's performance without any visible error. The model continues operating but without the specialized instructions the skill provided. +If your agent truncates or summarizes older messages when the context window +fills up, **exempt skill content from pruning**. Skill instructions are durable +behavioral guidance — losing them mid-conversation silently degrades the agent's +performance without any visible error. The model continues operating but without +the specialized instructions the skill provided. Common approaches: -* Flag skill tool outputs as protected so the pruning algorithm skips them -* Use the [structured tags](#structured-wrapping) from Step 4 to identify skill content and preserve it during compaction +- Flag skill tool outputs as protected so the pruning algorithm skips them +- Use the [structured tags](#structured-wrapping) from Step 4 to identify skill + content and preserve it during compaction ### Deduplicate activations -Consider tracking which skills have been activated in the current session. If the model (or user) attempts to load a skill that's already in context, you can skip the re-injection to avoid the same instructions appearing multiple times in the conversation. +Consider tracking which skills have been activated in the current session. If +the model (or user) attempts to load a skill that's already in context, you can +skip the re-injection to avoid the same instructions appearing multiple times in +the conversation. ### Subagent delegation (optional) -This is an advanced pattern only supported by some clients. Instead of injecting skill instructions into the main conversation, the skill is run in a **separate subagent session**. The subagent receives the skill instructions, performs the task, and returns a summary of its work to the main conversation. +This is an advanced pattern only supported by some clients. Instead of injecting +skill instructions into the main conversation, the skill is run in a **separate +subagent session**. The subagent receives the skill instructions, performs the +task, and returns a summary of its work to the main conversation. -This pattern is useful when a skill's workflow is complex enough to benefit from a dedicated, focused session. +This pattern is useful when a skill's workflow is complex enough to benefit from +a dedicated, focused session. --- -Based on the specification provided and Archie's architecture (a mobile/web Flutter app with a backend profile), the **Agent Skills implementation needs to be split, with the core engine living in the Backend**. +Based on the specification provided and Archie's architecture (a mobile/web +Flutter app with a backend profile), the **Agent Skills implementation needs to +be split, with the core engine living in the Backend**. Here is how the responsibilities break down for Archie: ### 1. The Backend (The Agent Engine) -The backend is where the actual LLM lives (or is orchestrated) and where the "cloud-hosted or sandboxed agent" rules apply. -* **Storage & Discovery:** It stores the user's custom skills (which we create in the app) either in a database or a secure cloud bucket. When the user starts a chat session, the backend gathers the metadata (`name`, `description`) for all skills the user has enabled. -* **Disclosure (Tier 1):** The backend injects the `catalog` of available skills into the LLM's system prompt or tool descriptions. -* **Activation (Tier 2 & 3):** The backend provides an `activate_skill` tool to the LLM. When the LLM calls it, the backend fetches the `SKILL.md` content from the user's profile and returns it to the LLM, tracking the context so it isn't lost during conversation compaction. -* **Execution:** If a skill has a `scripts/` folder, the backend needs a secure sandbox to execute those scripts if the agent attempts to run them. + +The backend is where the actual LLM lives (or is orchestrated) and where the +"cloud-hosted or sandboxed agent" rules apply. + +- **Storage & Discovery:** It stores the user's custom skills (which we create + in the app) either in a database or a secure cloud bucket. When the user + starts a chat session, the backend gathers the metadata (`name`, + `description`) for all skills the user has enabled. +- **Disclosure (Tier 1):** The backend injects the `catalog` of available skills + into the LLM's system prompt or tool descriptions. +- **Activation (Tier 2 & 3):** The backend provides an `activate_skill` tool to + the LLM. When the LLM calls it, the backend fetches the `SKILL.md` content + from the user's profile and returns it to the LLM, tracking the context so it + isn't lost during conversation compaction. +- **Execution:** If a skill has a `scripts/` folder, the backend needs a secure + sandbox to execute those scripts if the agent attempts to run them. ### 2. The Frontend App (What we are building now) -Since Archie is a client app and doesn't run the LLM locally on the device (and lacks access to arbitrary system folders like `~/.agents/skills/`), its job is purely **Management and Presentation**: -* **Skill Creation (The Library Tab):** The UI we just planned. It lets users construct the `SKILL.md` and associated `scripts/` or assets via the visual file tree. The app then bundles this into a JSON payload and sends it to the backend to be saved to their profile. -* **Skill Toggling:** The toggles in the Library screen enable or disable which skills the backend should inject into the session catalog for that user. -* **Visibility:** Optionally showing a visual indicator in the Chat screen when the backend reports that the agent has activated a specific skill. + +Since Archie is a client app and doesn't run the LLM locally on the device (and +lacks access to arbitrary system folders like `~/.agents/skills/`), its job is +purely **Management and Presentation**: + +- **Skill Creation (The Library Tab):** The UI we just planned. It lets users + construct the `SKILL.md` and associated `scripts/` or assets via the visual + file tree. The app then bundles this into a JSON payload and sends it to the + backend to be saved to their profile. +- **Skill Toggling:** The toggles in the Library screen enable or disable which + skills the backend should inject into the session catalog for that user. +- **Visibility:** Optionally showing a visual indicator in the Chat screen when + the backend reports that the agent has activated a specific skill. ### How this impacts our UI plan -The plan we just made is **perfect** for this architecture. By creating a `NewSkillEntry` widget that builds a visual file tree, we are simply constructing the package that the backend will eventually consume. + +The plan we just made is **perfect** for this architecture. By creating a +`NewSkillEntry` widget that builds a visual file tree, we are simply +constructing the package that the backend will eventually consume. To answer the two questions from my previous plan based on this context: -1. **For Knowledge Entry:** We should use a simple multi-line Material `TextField` (or basic Markdown editor) for now, as it just saves raw text knowledge to the backend database. -2. **For Skill Entry:** We don't need real device file uploads. We just need to give users text editors to define `SKILL.md` and any script strings directly in the app. The app constructs a structured JSON representing the folder and sends it to the backend. -Should we proceed with building out the `NewSkillEntry` file tree UI and `NewKnowledgeEntry` modules in the `LibraryScreen` as planned? +1. **For Knowledge Entry:** We should use a simple multi-line Material + `TextField` (or basic Markdown editor) for now, as it just saves raw text + knowledge to the backend database. +2. **For Skill Entry:** We don't need real device file uploads. We just need to + give users text editors to define `SKILL.md` and any script strings directly + in the app. The app constructs a structured JSON representing the folder and + sends it to the backend. + +Should we proceed with building out the `NewSkillEntry` file tree UI and +`NewKnowledgeEntry` modules in the `LibraryScreen` as planned? diff --git a/.scratch/explore-agentexec-protocol.md b/.scratch/explore-agentexec-protocol.md deleted file mode 100644 index e8a3e7322..000000000 --- a/.scratch/explore-agentexec-protocol.md +++ /dev/null @@ -1,219 +0,0 @@ -# agentexec-protocol - -我现在掌握了所有需要的信息。以下是完整的报告。 - ---- - -## 报告:Archie 核心中的代理执行协议和 Runner 架构 - -### 1. Runner 接口 - -定义位置:`/work/apps/archie-core/internal/agentexec/inprocess.go`,第 20-22 行 - -```go -type Runner interface { - Run(ctx context.Context, workspace string, req Request) (Result, error) -} -``` - -**一个单一方法接口:** `Run` 接受一个上下文、一个工作目录路径(字符串)和一个 `Request`,返回一个 `Result` 和一个错误。工作目录路径与请求分开传递,供容器运行器将主机路径映射到内部文件系统。 - -该接口有两个具体实现: - -- **`InProcessRunner`** (`/work/apps/archie-core/internal/agentexec/inprocess.go`,第 29-33 行) -- 拥有一个 `*runtime.Runtime`、一个 `*slog.Logger` 和一个 `loopFunc` 字段(默认为 `agentloop.Run`)。它在与 `archied` 相同的进程空间中运行代理循环。 - -- **`SubprocessRunner`** (`/work/apps/archie-core/internal/agentexec/subprocess.go`,第 17-27 行) -- 拥有 `Command`、`Args`、`Environ`、`AdditionalEnv`、`Diagnostics io.Writer` 和 `Providers`。它将完整的 `Invocation` 序列化到 stdin,启动一个 `archie-agent` 二进制文件,并从 stdout 解码 `Response`。 - -### 2. 线路协议 - -所有消息类型都定义在 `/work/apps/archie-core/internal/agentexec/protocol.go` 中。 - -**Invocation** (第 139-144 行) -- 被 `archie-agent` 接受的完整请求: -```go -type Invocation struct { - Version int `json:"version"` - Workspace string `json:"workspace"` - Request Request `json:"request"` - Providers map[string]Provider `json:"providers"` -} -``` - -**Request** (第 59-74 行) -- 代理阶段的有效载荷: -```go -type Request struct { - Version int `json:"version"` - TaskID int64 `json:"task_id"` - Attempt int `json:"attempt"` - Stage string `json:"stage"` - Model string `json:"model"` - Mission string `json:"mission"` - ExtraRules string `json:"extra_rules,omitempty"` - ReadOnly bool `json:"read_only,omitempty"` - Budget Budget `json:"budget"` - Gate Gate `json:"gate"` - Preflight []Command `json:"preflight,omitempty"` - Protection Protection `json:"protection"` - Notes string `json:"notes,omitempty"` - CaptureTools []CaptureTool `json:"capture_tools,omitempty"` -} -``` - -**Result** (第 97-111 行) -- 输出: -```go -type Result struct { - Version int `json:"version"` - TaskID int64 `json:"task_id"` - Attempt int `json:"attempt"` - Stage string `json:"stage"` - Status string `json:"status"` - StopReason string `json:"stop_reason,omitempty"` - Changes []string `json:"changes,omitempty"` - Iterations int `json:"iterations,omitempty"` - TokensUsed int `json:"tokens_used,omitempty"` - Summary string `json:"summary,omitempty"` - Detail string `json:"detail,omitempty"` - AppendedNotes []string `json:"appended_notes,omitempty"` - Captures map[string][]json.RawMessage `json:"captures,omitempty"` -} -``` - -**Response** (第 168-172 行) -- 从 `archie-agent` 返回的顶层信封: -```go -type Response struct { - Version int `json:"version"` - Result Result `json:"result"` - Error string `json:"error,omitempty"` -} -``` - -**辅助类型:** -- `Command` (第 18-22 行):`Name`、`Argv`、`ExpectFailure` -- `Gate` (第 25-28 行):`Commands`、`MaxConsecutiveFailures` -- `Budget` (第 31-35 行):`MaxSteps`、`MaxTokens`、`WallClock` -- `Protection` (第 38-41 行):`Suffixes`、`Globs` -- `CaptureTool` (第 45-53 行):`Name`、`Description`、`Parameters`、`RequiredFields`、`NonEmptyStrings`、`BooleanFields`、`MaxCalls` -- `Provider` (第 115-119 行):`Class`、`APIKeyEnv`、`BaseURL` - -协议通过 JSON 在 stdin/stdout 上使用。`ServeOne` (`worker.go`,第 16-43 行) 解码一个 `Invocation`,验证它,构建一个 `InProcessRunner`,运行它,然后将单个 `Response` 写入 stdout。`ServeOne` 不会循环——它处理一个调用然后返回。 - -### 3. cmd/archied 如何连接 Runner - -在 `/work/apps/archie-core/cmd/archied/main.go` 中,第 109-125 行: - -```go -providers := executionProviders(cfg) -llm := agentexec.NewRuntime(providers) -var agentRunner agentexec.Runner -if llm != nil { - switch cfg.Agent.Mode { - case "subprocess": - agentRunner = &agentexec.SubprocessRunner{ - Command: cfg.Agent.Command, - Environ: os.Environ(), - AdditionalEnv: cfg.Agent.Env, - Diagnostics: os.Stderr, - Providers: providers, - } - case "inprocess": - agentRunner = agentexec.NewInProcessRunner(llm, log) - } -} -``` - -运行器模式由 `cfg.Agent.Mode` 控制,它来自配置 TOML。有两个 case: - -- **`"subprocess"`**:创建一个 `SubprocessRunner`,将完整的环境、一个可执行文件命令(来自 `cfg.Agent.Command`,通常是 `archie-agent` 二进制文件的路径)以及提供者映射传递给它。 -- **`"inprocess"`**:通过 `NewInProcessRunner(llm, log)` 创建一个 `InProcessRunner`,其中 `llm` 是 `runtime.NewRuntime(providers)` 的结果。 - -然后,`agentRunner` 被放入 `Daemon` 结构体 (`/work/apps/archie-core/internal/daemon/daemon.go`,第 33 行) 作为 `Agent agentexec.Runner`。守护进程的 `process` 方法 (第 356-377 行) 将其传递到 `TaskContext`: - -```go -workflow.Run(ctx, wf, &workflow.TaskContext{ - Task: task, - Repo: repo, - ... - Agent: d.Agent, - ... -}) -``` - -如果 `cfg.Agent.Mode` 既不是 `"subprocess"` 也不是 `"inprocess"`,或者如果 `llm` 是 nil(没有提供者),则 `agentRunner` 保持为 nil。当 `Agent` 为 nil 时,`AgentStage.Stage()` 方法 (`agent.go`,第 49-50 行) 返回一个合适的错误。 - -### 4. TaskContext 和 Agent 字段 - -定义位置:`/work/apps/archie-core/internal/workflow/workflow.go`,第 26-57 行。 - -```go -type TaskContext struct { - Task *store.Task - Repo config.Repo - Cfg config.Config - Forge forge.Forge - Store *store.Store - Trees *worktree.Manager - Agent agentexec.Runner // <-- 第 33 行 - Bus *events.Bus - Log *slog.Logger - CustomStages func(dir string) ([]Stage, error) - Dir string - Branch string - BuildSummary string - ReproProof string - decision *decision - Outcome Outcome -} -``` - -`Agent` 字段是 `agentexec.Runner`。工作流通过 `AgentStage.Stage()` (`agent.go`,第 47-148 行) 调用它。核心调用顺序是: - -1. `AgentStage.Stage()` 从上下文字段 (`agent.go`,第 94-109 行) 构建一个 `agentexec.Request`。 -2. 调用 `tc.Agent.Run(ctx, tc.Dir, req)` (第 110 行)。 -3. 然后处理结果:验证 (`ValidateFor`,第 114 行)、追加笔记 (第 117-124 行)、累积代币/迭代次数 (第 129-130 行)、检查非 `"passed"` 状态 (第 136-141 行),以及分派给 `OnResult` 回调 (第 143-145 行)。 - -只有 `InProcessRunner` 使用 `runtime.Runtime` 直接调用 `agentloop.Run`。`SubprocessRunner` 构建一个 `Invocation`,通过提供者名称映射将完整的请求序列化,并通过 `exec.CommandContext` 启动一个子进程。 - -### 5. 使 `archie-agent` 成为长期运行的消息总线进程所需的变化 - -以下是关键的变化领域: - -**A. 入口点 (`cmd/archie-agent/main.go`)** - -- 目前它调用 `agentexec.ServeOne`,后者解码一个 JSON 调用,执行,并将一个 JSON 响应写入 stdout。这严格是一次性的。 -- 要变为长期运行,`main()` 需要初始化一个消息总线客户端(例如,NATS、RabbitMQ、AMQP 甚至是简单的 gRPC 流),订阅一个主题/队列,并在每个传入的 `Invocation` 上循环调用 `ServeOne`(或者更确切地说,其核心逻辑)。 -- 信号处理需要优雅地等待进行中的工作完成,而不是在 `SIGTERM` 时直接退出。 - -**B. worker.go 中的 `ServeOne` 函数** - -- 目前它在全局范围内构建一个 `InProcessRunner`(将 `NewRuntime(invocation.Providers)` 传递给 `NewInProcessRunner`)。 -- 如果进程是长期运行的,则 `runtime.Runtime` 应该在启动时构造一次(可能来自配置或环境变量),而不是每个调用都动态构建。提供者配置会在进程的生命周期内保持不变,因此没有理由每次从 JSON 重新创建运行时。 -- `protocol.go` 中的 `Invocation` 类型包含 `Providers`——如果一个长期运行的 worker 已经在启动时知道其提供者,这可能就不需要了。工作区路径也有问题:对于长期运行的进程,工作区可能由消息路由到(或使用单独的 RPC 调用来准备),而不是嵌入在调用请求中。 - -**C. 线路协议适配** - -- 当前协议是 request/reply(1 个 JSON 值用于输入,1 个用于输出)。对于总线,`Response` 会被发布到单独的回复主题/队列,而不是写入 stdout。 -- 运行器接口本身 (`Runner.Run(ctx, workspace, req)`) 是同步的,这很适合总线——每个消息都可以通过 `Run` 处理,结果被发布出去。 -- 调用/响应帧中的 `Version`、`TaskID`、`Attempt`、`Stage` 字段提供了足够的路由/关联上下文——`Response` 中的 `TaskID` 和 `Stage` 使得在回复主题上正确路由变得简单。 - -**D. 环境架构** - -- 目前,`SubprocessRunner` 通过继承的环境变量传递 API 密钥,并使用 `WorkerEnvironment` 进行过滤(`subprocess.go`,第 155-162 行)。一个长期运行的进程已经在进行中,但需要能够更新/重新加载提供者凭证而不重新启动(例如,密钥轮换)。这可能需要一个控制通道或一个动态重新加载配置的方法。 - -**E. 配置和工作目录** - -- 目前,`Invocation` 承载 `Workspace`,并且每个路径都是请求的一部分。一个基于总线的 worker 可能希望要么: - - 在工作区已经准备就绪时接收带外消息(例如,一个单独的“准备”RPC),或者 - - 除了运行代理之外,还执行一些较小的设置步骤(克隆 repo)。 -- 守护进程当前通过 `worktree.Manager` (`steps.go`,第 22-30 行) 处理工作目录准备。如果 `archie-agent` 处理其自己的工作目录设置,这会创建一个职责划分问题。 - -**F. `SubprocessRunner` 对 `agentexec` 包的依赖** - -- `SubprocessRunner` 是 `archied` 端的替代品——它从 `archied` 启动 `archie-agent`。如果 `archie-agent` 是一个长期运行的进程,`archied` 不会直接启动它;连接成为出站消息总线连接。`SubprocessRunner` 可能会变得过时或需要重构为一个“远程”运行器,该运行器通过总线发送消息而不是生成子进程。 - -**G. 错误处理和死信队列** - -- 目前,`cmd.Run()` 中的进程退出代码表示协议失败。对于长期运行的进程,反序列化故障或无效调用应发布到死信队列主题。 - -总而言之,`Runner` 接口 (`Run(ctx, workspace, req)`) 本身不需要改变。然而,它的调用方式会改变: -- `cmd/archie-agent/main.go` 将从一次性 stdin/stdout 变为总线主题订阅循环。 -- `cmd/archied/main.go` 将使用一个基于总线的远程运行器,而不是 `SubprocessRunner`。 -- 提供者查找和运行时生命周期管理将从每次调用(`worker.go` 中的 `ServeOne`)移动到进程启动时。 \ No newline at end of file diff --git a/.scratch/explore-chunkB-agentexec.md b/.scratch/explore-chunkB-agentexec.md deleted file mode 100644 index 86f4051d1..000000000 --- a/.scratch/explore-chunkB-agentexec.md +++ /dev/null @@ -1,329 +0,0 @@ -# agentexec - -Now I have all the information needed. Here is the comprehensive report. - ---- - -## 1. All Fields of Invocation, Request, Result, Response - -All types are defined in `/work/apps/archie-core/internal/agentexec/protocol.go`. - -**Invocation** (lines 139-144): -```go -Version int `json:"version"` -Workspace string `json:"workspace"` -Request Request `json:"request"` -Providers map[string]Provider `json:"providers"` -``` - -**Request** (lines 59-74): -```go -Version int `json:"version"` -TaskID int64 `json:"task_id"` -Attempt int `json:"attempt"` -Stage string `json:"stage"` -Model string `json:"model"` -Mission string `json:"mission"` -ExtraRules string `json:"extra_rules,omitempty"` -ReadOnly bool `json:"read_only,omitempty"` -Budget Budget `json:"budget"` -Gate Gate `json:"gate"` -Preflight []Command `json:"preflight,omitempty"` -Protection Protection `json:"protection"` -Notes string `json:"notes,omitempty"` -CaptureTools []CaptureTool `json:"capture_tools,omitempty"` -``` - -**Result** (lines 97-111): -```go -Version int `json:"version"` -TaskID int64 `json:"task_id"` -Attempt int `json:"attempt"` -Stage string `json:"stage"` -Status string `json:"status"` -StopReason string `json:"stop_reason,omitempty"` -Changes []string `json:"changes,omitempty"` -Iterations int `json:"iterations,omitempty"` -TokensUsed int `json:"tokens_used,omitempty"` -Summary string `json:"summary,omitempty"` -Detail string `json:"detail,omitempty"` -AppendedNotes []string `json:"appended_notes,omitempty"` -Captures map[string][]json.RawMessage `json:"captures,omitempty"` -``` - -**Response** (lines 168-172): -```go -Version int `json:"version"` -Result Result `json:"result"` -Error string `json:"error,omitempty"` -``` - -Supporting types referenced above: - -- **Budget** (lines 31-35): `MaxSteps int`, `MaxTokens int`, `WallClock time.Duration` -- **Gate** (lines 25-28): `Commands []Command`, `MaxConsecutiveFailures int` -- **Command** (lines 18-22): `Name string`, `Argv []string`, `ExpectFailure bool` -- **Protection** (lines 38-41): `Suffixes []string`, `Globs []string` -- **CaptureTool** (lines 45-53): `Name string`, `Description string`, `Parameters json.RawMessage`, `RequiredFields []string`, `NonEmptyStrings []string`, `BooleanFields []string`, `MaxCalls int` -- **Provider** (lines 115-119): `Class string`, `APIKeyEnv string`, `BaseURL string` - ---- - -## 2. ServeOne Step by Step - -Defined in `/work/apps/archie-core/internal/agentexec/worker.go`. - -**`ServeOne` (lines 16-20)** is the public entry point. It delegates to `serveOne` with a factory closure that, given an `Invocation`, returns a runner: - -```go -func ServeOne(ctx context.Context, in io.Reader, out io.Writer, log *slog.Logger) error { - return serveOne(ctx, in, out, func(invocation Invocation) Runner { - return NewInProcessRunner(NewRuntime(invocation.Providers), log) - }) -} -``` - -**`serveOne` (lines 22-43)** does: - -1. **Decode invocation** (line 24): Calls `decodeOne(in, &invocation)` which reads up to `maxProtocolBytes+1` bytes (8 MB + 1) from `in`. Rejects if the value exceeds 8 MB. JSON-decodes into the value (here, `Invocation`). Also checks there is exactly one JSON value (rejects trailing JSON values, line 58-61). - -2. **Validate invocation** (line 27): Calls `invocation.Validate()` which checks: - - `Version == ProtocolVersion` (must be 1) - - `Workspace` is non-empty - - `Providers` map is non-empty, and every entry's `Class` is non-empty and `BaseURL` is parseable without userinfo/query/fragment - - The inner `Request.Validate()`: `Version` must be 1, `TaskID` > 0, `Attempt` > 0, `Stage` non-empty, `Model` non-empty - -3. **Create runner** (line 30): Calls `newRunner(invocation)` -- in ServeOne's case, `NewInProcessRunner(NewRuntime(invocation.Providers), log)`. - -4. **Run agent** (line 34): `runner.Run(ctx, invocation.Workspace, invocation.Request)` returns `result, runErr`. - -5. **Build response** (lines 35-38): Constructs `Response{Version: ProtocolVersion, Result: result}`. If `runErr != nil`, sets `response.Error = runErr.Error()`. - -6. **Encode response to stdout** (lines 39-41): `json.NewEncoder(out).Encode(response)`. Returns error if encoding fails. - -7. **Return nil** on success. - -Key design detail: The `serveOne` generic function separates the wire protocol (stdin/stdout JSON framing) from the runner creation strategy. The factory `func(Invocation) Runner` allows different strategies (in-process vs. subprocess vs. future NATS). Currently `ServeOne` hardcodes the in-process factory, but a future NATS-based archie-agent could call `serveOne` with a different factory or skip it entirely. - ---- - -## 3. SubprocessRunner.Run Step by Step - -Defined in `/work/apps/archie-core/internal/agentexec/subprocess.go`. - -The `SubprocessRunner` struct (lines 17-27): -```go -type SubprocessRunner struct { - Command string - Args []string - Environ []string // daemon's os.Environ() - AdditionalEnv []string // operator-approved env var names - Diagnostics io.Writer // typically os.Stderr - Providers map[string]Provider -} -``` - -**`Run` (lines 29-94)**: - -1. **Extract provider name from model** (lines 30-32): Splits `req.Model` at the first "/". E.g. `"anthropic/claude-sonnet-4"` yields providerName=`"anthropic"`. If no "/" or empty, returns error. - -2. **Look up provider** (lines 34-37): Indexes `r.Providers[providerName]`. Missing returns error. - -3. **Build and validate invocation** (lines 38-42): Creates `Invocation{Version, Workspace, Request, Providers}` with just that one provider entry. Validates. - -4. **Check command** (lines 43-45): `strings.TrimSpace(r.Command)` must be non-empty. - -5. **Marshal invocation** (lines 46-50): `json.Marshal(invocation)` + appends newline. - -6. **Create OS command** (line 52): `exec.CommandContext(ctx, r.Command, r.Args...)`. - -7. **Configure process cancellation** (line 53): `configureProcessCancellation(cmd)` -- on Unix this sets `Setpgid: true` and a `Cancel` function that does `syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)` (see `/work/apps/archie-core/internal/agentexec/subprocess_process_unix.go` lines 15-27). This ensures the worker process AND all its grandchildren die on context cancellation. - -8. **Set stdin** (line 54): `cmd.Stdin = bytes.NewReader(payload)`. - -9. **Set environment** (line 55): `WorkerEnvironment(r.Environ, r.AdditionalEnv, providers)` which (lines 155-162): - - Starts with `DefaultEnvironmentNames()`: `PATH, HOME, TMPDIR, TMP, TEMP, LANG, LC_ALL, SSL_CERT_FILE, SSL_CERT_DIR` - - Appends `r.AdditionalEnv` - - Appends each provider's `APIKeyEnv` - - Calls `SelectEnvironment` which copies only those named variables from `r.Environ`, preserving order. - -10. **Capture stdout and stderr** (lines 56-62): - - Stdout: `cappedBuffer{limit: maxProtocolBytes}` (8 MB). If `r.Diagnostics != nil`, stderr goes to `io.MultiWriter(r.Diagnostics, stderr)` (tee to both the diagnostics writer and the capped buffer). Otherwise just the capped buffer (64 KB limit via `maxDiagnosticBytes`). - -11. **Run the process** (lines 63-71): `cmd.Run()`. On error: - - If `context.Cause(ctx)` is set (cancellation), returns the cause wrapped with any stderr diagnostic. - - Otherwise returns the exec error with stderr output. - -12. **Check stdout truncation** (lines 72-74): If `stdout.truncated` is true, return error. - -13. **Decode response** (lines 75-78): `decodeOne(bytes.NewReader(stdout.Bytes()), &response)` -- same framing as the reader side. - -14. **Validate response version** (lines 79-81): Must match `ProtocolVersion` (1). - -15. **Validate result against request** (lines 82-91): - - If `response.Result.Version != 0`, calls `response.Result.ValidateFor(req)` -- checks Version==1, TaskID/Attempt/Stage identity match, Status non-empty. - - If `response.Error != ""`, returns result with `errors.New(response.Error)`. - - Validates one more time at line 90 for the non-error case. - -16. **Return** (line 93): `response.Result, nil`. - ---- - -## 4. NewRuntime and InProcessRunner - -**`NewRuntime`** in `/work/apps/archie-core/internal/agentexec/runtime.go` (lines 7-23): -- Takes `providers map[string]Provider` (agentexec.Provider type). -- Returns `*runtime.Runtime` (from `github.com/samcharles93/ai-sdk/runtime`). -- If providers is empty, returns `nil`. -- Calls `runtime.RegisterBuiltinClasses()` (global, side-effecting). -- For each entry: creates `runtime.ProviderConfig{ID: name, Class: provider.Class, BaseURL: provider.BaseURL}`. -- If `provider.APIKeyEnv == ""`, sets `Auth = AuthConfig{Type: AuthTypeNone}`, otherwise `Auth = AuthConfig{APIKeyEnv: provider.APIKeyEnv}`. -- Calls `runtime.NewRuntime(runtime.Config{Providers: catalog})` and returns it. - -**`InProcessRunner`** in `/work/apps/archie-core/internal/agentexec/inprocess.go` (lines 29-33): -```go -type InProcessRunner struct { - runtime *runtime.Runtime - log *slog.Logger - run loopFunc // func(context.Context, agentloop.Config) (agentloop.Result, error) -} -``` - -**`NewInProcessRunner`** (lines 35-37): Stores runtime, log, and sets `run = agentloop.Run` (the exported function from the `agentloop` package). - -**`InProcessRunner.Run`** (lines 39-86): -1. Validates `req` via `req.Validate()`. -2. Checks `r.runtime != nil` and `r.run != nil`. -3. Creates `memoryNotes` struct (lines 219-228 of inprocess.go) -- implements a simple `Load`/`Append` interface. Initialized with `req.Notes`, collects `appended` entries. -4. Creates `captures` map: `map[string][]json.RawMessage`. -5. Calls `r.run(ctx, agentloop.Config{...})` with all fields mapped from `req`: - - `Runtime: r.runtime` - - `ModelRef: req.Model` - - `WorkDir: workspace` - - `Mission: req.Mission`, `ExtraRules: req.ExtraRules` - - `Notes: notes` (the memoryNotes) - - `Gate: toAgentGate(req.Gate)` (converts agentexec.Gate -> agentloop.GateConfig) - - `Preflight: toAgentCommands(req.Preflight)` - - `Budget: agentloop.Budget(req.Budget)` (direct cast) - - `ReadOnly: req.ReadOnly` - - `ProtectPaths: protectionMatcher(...)` (closure that checks suffixes/globs) - - `Extra: mergeToolSets(captureToolSet(req.CaptureTools, captures), scriptToolSet(workspace))` - - `Logger: r.logger(req)` (structured with task/attempt/stage/model) -6. Builds `Result` from the returned `agentloop.Result` fields. -7. Checks `context.Cause(ctx)` for cancellation -- if cancelled, returns result with cancellation cause as error. -8. Returns `result, err`. - ---- - -## 5. Provider Types - -There are **two separate `Provider` structs** with identical fields but different packages and tags: - -**`agentexec.Provider`** (`/work/apps/archie-core/internal/agentexec/protocol.go`, lines 115-119): -```go -type Provider struct { - Class string `json:"class"` - APIKeyEnv string `json:"api_key_env,omitempty"` - BaseURL string `json:"base_url,omitempty"` -} -``` -Used for: JSON serialization to the subprocess worker, and as the type consumed by `NewRuntime` and `SubprocessRunner.Providers`. - -**`config.Provider`** (`/work/apps/archie-core/internal/config/config.go`, lines 125-129): -```go -type Provider struct { - Class string `toml:"class"` - APIKeyEnv string `toml:"api_key_env"` - BaseURL string `toml:"base_url"` -} -``` -Used for: TOML deserialization from the config file. - -**Bridge** (`/work/apps/archie-core/cmd/archied/main.go`, lines 182-188): -```go -func executionProviders(cfg config.Config) map[string]agentexec.Provider { - providers := make(map[string]agentexec.Provider, len(cfg.Providers)) - for name, p := range cfg.Providers { - providers[name] = agentexec.Provider{Class: p.Class, APIKeyEnv: p.APIKeyEnv, BaseURL: p.BaseURL} - } - return providers -} -``` -The daemon composition root converts config.Provider to agentexec.Provider by field-wise copy and then passes them to both `NewRuntime` and `SubprocessRunner`. - ---- - -## 6. How drainNATS Interacts with SubprocessRunner - -**Current state: drainNATS only affects task distribution, not agent execution.** - -The flow: - -1. **Daemon.Cycle** (daemon.go lines 94-103): If `d.Nats != nil`, calls `d.drainNATS(ctx)`, else `d.drainSQLite(ctx)`. - -2. **drainNATS** (lines 126-151): Calls `d.Nats.Fetch(ctx)` to get a JetStream message. If found, calls `processNATSTask`. Falls back to `drainSQLite` logic (SQLite `ClaimNext` then `d.process`) if no NATS message. - -3. **processNATSTask** (lines 219-253): Decodes `TaskMessage`, enqueues to SQLite, claims the task, then calls `d.process(ctx, task)` -- the **same** `process` function used by the SQLite path. - -4. **d.process** (lines 472-493): Routes the task to the correct workflow, then calls: - ```go - workflow.Run(ctx, wf, &workflow.TaskContext{ - ... - Agent: d.Agent, // line 488 -- the agentexec.Runner interface - ... - }) - ``` - -5. **workflow.Run** (workflow.go line 145): Iterates stages. For LLM-driven stages, calls `AgentStage.Stage()` (agent.go line 110): - ```go - res, err := tc.Agent.Run(ctx, tc.Dir, req) - ``` - This `Agent` field is the `agentexec.Runner` interface. It was wired in `cmd/archied/main.go` (lines 124-138): - - If `cfg.Agent.Mode == "subprocess"`: creates `&agentexec.SubprocessRunner{...}` with `Command`, `Environ`, `AdditionalEnv`, `Diagnostics`, `Providers`. - - If `cfg.Agent.Mode == "inprocess"`: creates `agentexec.NewInProcessRunner(llm, log)`. - -6. **SubprocessRunner.Run** spawns a fresh `archie-agent` binary per stage, sends JSON on stdin, reads JSON from stdout. - -7. **The daemon's NATS `processNATSTask` does NOT interact with SubprocessRunner directly** -- it only fetches the task message from NATS, enqueues it to SQLite, and claims it. The actual agent execution happens through `d.Agent.Run` which remains either in-process or subprocess regardless of the NATS path. - ---- - -## Design Implications for NATSRunner and NATS-based archie-agent - -**Runner interface** (`/work/apps/archie-core/internal/agentexec/inprocess.go`, line 20-22): -```go -type Runner interface { - Run(ctx context.Context, workspace string, req Request) (Result, error) -} -``` - -A new `NATSRunner` would need to implement this same interface. It would: - -1. Accept a NATS connection, a subject prefix, and the provider map (or the whole Invocation fields). -2. In `Run(ctx, workspace, req)`: - - Build an `Invocation` (same as `SubprocessRunner.Run` does on lines 38-42). - - Publish it to a NATS subject (e.g. `archie.stage.request.`). - - Include a reply subject in the message headers or as part of the payload. - - Wait for the response on the reply subject (with the context's deadline). - - Decode the `Response`, validate, return `Result`. -3. No need for stdin/stdout marshalling or process management. - -**New archie-agent** (`cmd/archie-agent/main.go`): Instead of `ServeOne(ctx, os.Stdin, os.Stdout, log)`, it would: -1. Connect to NATS. -2. Subscribe to a subject like `archie.stage.request.>`. -3. For each message: decode `Invocation` from the message body, call `serveOne`-style logic (validate, build runner, run, build response), publish `Response` back to the reply subject, ack. -4. Could be a long-running daemon with a pool of subscribers. - -**Key integration point**: The daemon composition root (`cmd/archied/main.go` lines 124-138) would gain a third branch: -```go -case "nats": - agentRunner = &agentexec.NATSRunner{ - Conn: natsClient.Conn(), // or a new NATS connection - Subject: "archie.stage.request", - Providers: providers, - } -``` - -And in `config.go` the `Agent.Mode` validation (lines 298-305) would accept `"nats"` in addition to `"inprocess"` and `"subprocess"`. - -**The `serveOne` generic function** in `worker.go` (lines 22-43) is already well-factored: it separates wire protocol from runner creation. A NATS-based archie-agent could reuse `serveOne` by providing a factory that creates an in-process runner, or it could have its own message handler that calls the same `Validate` -> `Runner.Run` -> `Response` logic. \ No newline at end of file diff --git a/.scratch/explore-chunkB-nats-reply.md b/.scratch/explore-chunkB-nats-reply.md deleted file mode 100644 index fbbda9265..000000000 --- a/.scratch/explore-chunkB-nats-reply.md +++ /dev/null @@ -1,322 +0,0 @@ -# nats-reply - -Now I have a complete understanding. Here is the comprehensive report. - ---- - -## NATS Agent Communication Reply Pattern -- Design Report - -### Sources Read - -- `/work/apps/archie-core/internal/nats/client.go` -- existing JetStream Client, PublishTask, Fetch, Connect -- `/work/apps/archie-core/internal/nats/subjects.go` -- existing subject constants -- `/work/apps/archie-core/internal/daemon/daemon.go` -- current NATS integration in the daemon -- `/work/apps/archie-core/internal/config/config.go` -- NATSConfig struct -- `/work/apps/archie-core/go.mod` -- nats.go v1.52.0, nats-server/v2 v2.14.3 -- `/work/apps/archie-core/internal/agentexec/inprocess.go` -- Runner interface definition (line 20) -- `/work/apps/archie-core/internal/agentexec/subprocess.go` -- SubprocessRunner.Run (blocks on exec.Command) -- `/work/apps/archie-core/internal/agentexec/protocol.go` -- Request, Result, Invocation, Response types -- `/work/apps/archie-core/internal/workflow/agent.go` -- how AgentStage calls `tc.Agent.Run(ctx, tc.Dir, req)` (line 110) -- `/home/sam/go/pkg/mod/github.com/nats-io/nats.go@v1.52.0/jetstream/publish.go` -- PublishMsg internals -- `/home/sam/go/pkg/mod/github.com/nats-io/nats.go@v1.52.0/jetstream/message.go` -- jetstream.Msg interface (Reply(), Headers(), etc.) -- `/home/sam/go/pkg/mod/github.com/nats-io/nats.go@v1.52.0/context.go` -- RequestMsgWithContext, requestWithContext -- `/home/sam/go/pkg/mod/github.com/nats-io/nats.go@v1.52.0/nats.go` -- Msg struct, NewInbox, createNewRequestAndSend -- `/work/apps/archie-core/.scratch/plan-nats-design.md` -- the original Phase 1 NATS task distribution design document - ---- - -### Key Finding: `PublishMsg` Eats the Reply Field - -The most critical technical finding is in `jetstream/publish.go` (line 229-232) and `context.go` (line 40-84). When you call: - -```go -js.PublishMsg(ctx, &nats.Msg{Subject: subj, Reply: "my.reply", Data: data}) -``` - -The `PublishMsg` implementation calls `js.conn.RequestMsgWithContext(ctx, m)`, which internally calls `createNewRequestAndSend(subj, hdr, data)` (new style) or `oldRequestWithContext` (old style). Both paths create a **fresh inbox** for the JetStream PubAck response and call `nc.publish(subj, respInbox, ...)` -- the reply subject you set on the `nats.Msg` is **completely ignored**. The wire-level `Reply` on the published NATS message is the PubAck inbox, not your custom reply subject. - -There is a second issue: even if the Reply did pass through, it would need to point at an inbox the JetStream server could reach. And `PublishMsgAsync` explicitly rejects messages with `Reply` set (`ErrAsyncPublishReplySubjectSet`, line 336-337 of publish.go). - -**This means: the reply-to address must be carried outside the `nats.Msg.Reply` field -- in custom headers or the message body.** - ---- - -### 1. Subject Naming Pattern - -**Requests** (published by the daemon to JetStream): -``` -archie.agent.. -``` -Examples: `archie.agent.42.planner`, `archie.agent.42.builder`, `archie.agent.17.analyst` - -**Responses** (published by the agent worker back to the daemon): -Use core NATS reply inboxes, generated by `nc.NewInbox()`: -``` -_INBOX. -``` -These are ephemeral, one-shot subjects. No JetStream stream is involved on the response path. - -**Why not a deterministic subject for responses?** The daemon needs to wait for exactly one response from a specific agent execution. An inbox subscription is the NATS-idiomatic way: it creates a unique subject per request, the daemon subscribes to it before publishing, and no other subscriber can accidentally consume the response. - -**New subject constants to add to `internal/nats/subjects.go`:** -```go -const SubjectAgentRequest = "archie.agent." // prefix, full subject is built with task_id and stage - -func SubjectForAgentRequest(taskID int64, stage string) string { - return fmt.Sprintf("archie.agent.%d.%s", taskID, stage) -} -``` - ---- - -### 2. JetStream or Core NATS? - -**Hybrid: JetStream for requests, core NATS for responses.** - -| Aspect | Requests | Responses | -|--------|----------|-----------| -| Transport | JetStream (`js.PublishMsg`) | Core NATS (`nc.Publish`) | -| Persistence | Yes (survives daemon crash) | No (ephemeral) | -| Dedup | Yes (Nats-Msg-Id header) | Not needed | -| Delivery guarantee | At-least-once (consumer retries) | Best-effort (daemon subscribed) | - -**Rationale:** -- The **request** (agentexec.Request) is a large, important payload. If the daemon crashes after publishing but before the response arrives, JetStream retains the message. A restarted daemon (or a different daemon on the same stream) can pick it up. -- The **response** is an ephemeral, one-shot delivery. If the daemon disconnects while waiting (crash, network blip), the response is lost -- but that is acceptable because the agent will eventually time out waiting for a result confirmation and the daemon can re-issue the request. -- Using JetStream for responses would require a second pull consumer and polling -- incompatible with the blocking `Runner.Run` contract. -- The existing `nc.Conn` is already available via `js.Conn()`, so no extra connection is needed. - ---- - -### 3. Correlating Requests with Responses - -Use **reply inbox** correlation -- the standard NATS request-reply pattern: - -1. Daemon calls `nc.NewInbox()` to get a unique reply subject -2. Daemon subscribes to that inbox via `nc.SubscribeSync(inbox)` with `AutoUnsubscribe(1)` -3. Daemon sets the inbox address in a **custom header** `X-Archie-Reply` on the JetStream message -4. Daemon publishes the agent request via `js.PublishMsg` -5. Daemon blocks on `sub.NextMsg(timeout)` waiting for the response -6. Agent worker receives the JetStream message, reads the `X-Archie-Reply` header -7. Agent worker processes the request (may take minutes) -8. Agent worker publishes the result to the reply inbox via `nc.Publish(replySubject, jsonResult)` -9. Daemon receives the response and returns `agentexec.Result` - -**No separate correlation ID is needed.** The reply inbox IS the correlation mechanism. The `agentexec.Response` already carries `TaskID`, `Attempt`, and `Stage` for validation (`ValidateFor` in `agentexec/protocol.go:176-190`), so we get double-checking on the identity of the response without any new identifiers. - ---- - -### 4. Changes to `internal/nats` - -#### 4a. New message types - -Add to `client.go` (or a new `agent.go`): -```go -// AgentRequestMessage is the NATS payload for an agent stage execution request. -type AgentRequestMessage struct { - TaskID int64 `json:"task_id"` - Attempt int `json:"attempt"` - Stage string `json:"stage"` - Workspace string `json:"workspace"` - Request agentexec.Request `json:"request"` - Providers map[string]agentexec.Provider `json:"providers,omitempty"` -} - -// AgentResponseEnvelope is the response payload published to the reply inbox. -type AgentResponseEnvelope struct { - Version int `json:"version"` - Result agentexec.Result `json:"result"` - Error string `json:"error,omitempty"` -} -``` - -#### 4b. New methods on `Client` - -```go -// ReplyHeader is the custom header carrying the daemon's reply inbox. -const ReplyHeader = "X-Archie-Reply" - -// NewReplyInbox creates a unique inbox and returns a sync subscription. -func (c *Client) NewReplyInbox() (*nats.Subscription, error) { - sub, err := c.conn.SubscribeSync(c.conn.NewInbox()) - if err != nil { - return nil, err - } - sub.AutoUnsubscribe(1) // exactly one response expected - return sub, nil -} - -// PublishAgentRequest publishes an agent execution request to JetStream -// with the reply inbox set in the X-Archie-Reply header. -func (c *Client) PublishAgentRequest(ctx context.Context, req agentexec.Request, providers map[string]agentexec.Provider, workspace string, replyInbox string) error { - msg := AgentRequestMessage{ - TaskID: req.TaskID, - Attempt: req.Attempt, - Stage: req.Stage, - Workspace: workspace, - Request: req, - Providers: providers, - } - data, err := json.Marshal(msg) - if err != nil { - return err - } - - subject := SubjectForAgentRequest(req.TaskID, req.Stage) - headers := nats.Header{} - headers.Set(ReplyHeader, replyInbox) - msgID := fmt.Sprintf("%s%d/%d/%s", msgPrefix, req.TaskID, req.Attempt, req.Stage) - headers.Set("Nats-Msg-Id", msgID) - - _, err = c.js.PublishMsg(ctx, &nats.Msg{ - Subject: subject, - Data: data, - Header: headers, - }) - return err -} -``` - -#### 4c. New stream or extend existing - -The existing `ARCHIE_TASKS` stream has subjects `["archie.task.>"]`. Agent requests use `archie.agent..`, which does **not** match `archie.task.>`. - -**Recommendation: Extend the existing stream's subjects** by adding `"archie.agent.>"` to `StreamConfig.Subjects`. This is simpler than creating a second stream and avoids managing two stream lifecycles: - -```go -stream, err := js.CreateOrUpdateStream(ctx, jetstream.StreamConfig{ - Name: streamName, - Subjects: []string{"archie.task.>", "archie.agent.>"}, - Storage: jetstream.FileStorage, - Retention: jetstream.WorkQueuePolicy, - Duplicates: dedupWindow, -}) -``` - -The same WorkQueuePolicy works: when an agent receives and acks the request, it is removed from the stream. If the daemon crashes, the message stays until the agent acks or `MaxDeliver` is reached. - -**Alternative: Create a dedicated `ARCHIE_AGENT` stream.** This would allow different retention/deduplication settings (e.g., a `LimitsPolicy` with a `MaxAge` of 1 hour vs the current WorkQueue). But this adds complexity. Start with the extension approach. - -#### 4d. NATSRunner: bridge between Runner interface and NATS - -Create `/work/apps/archie-core/internal/agentexec/nats.go`: - -```go -type NATSRunner struct { - Nats *nats.Client - Providers map[string]agentexec.Provider - Log *slog.Logger -} - -func (r *NATSRunner) Run(ctx context.Context, workspace string, req agentexec.Request) (agentexec.Result, error) { - if err := req.Validate(); err != nil { - return agentexec.Result{}, err - } - - // 1. Create reply inbox - replySub, err := r.Nats.NewReplyInbox() - if err != nil { - return agentexec.Result{}, fmt.Errorf("nats reply inbox: %w", err) - } - defer replySub.Unsubscribe() - - // 2. Compute timeout from budget - timeout := defaultAgentTimeout - if req.Budget.WallClock > 0 { - timeout = req.Budget.WallClock - } - - // 3. Publish request with reply header - if err := r.Nats.PublishAgentRequest(ctx, req, r.Providers, workspace, replySub.Subject); err != nil { - return agentexec.Result{}, fmt.Errorf("publish agent request: %w", err) - } - - // 4. Wait for reply (blocking, matching SubprocessRunner.Run behavior) - reply, err := replySub.NextMsg(timeout) - if err != nil { - return agentexec.Result{}, fmt.Errorf("agent reply timeout: %w", err) - } - - // 5. Decode response - var envelope AgentResponseEnvelope - if err := json.Unmarshal(reply.Data, &envelope); err != nil { - return agentexec.Result{}, fmt.Errorf("decode agent response: %w", err) - } - if envelope.Error != "" { - return envelope.Result, errors.New(envelope.Error) - } - if err := envelope.Result.ValidateFor(req); err != nil { - return agentexec.Result{}, err - } - return envelope.Result, nil -} -``` - ---- - -### 5. Simplest Possible Reply Pattern - -**Respondent's note: the paragraphs below are the core answer.** - -The simplest pattern that works with the existing JetStream setup: - -1. **Daemon side** (NATSRunner, blocking like SubprocessRunner): - - `sub, _ := nc.SubscribeSync(nc.NewInbox())` -- creates a unique reply subject as a sync subscription - - `sub.AutoUnsubscribe(1)` -- exactly one reply expected - - Publish to JetStream: `js.PublishMsg(ctx, &nats.Msg{Subject: "archie.agent..", Header: {"X-Archie-Reply": [inbox]}, Data: payload})` - - Block: `msg, err := sub.NextMsg(budget.WallClock)` -- returns `agentexec.Result` on success, error on timeout - - Unsubscribe the inbox - -2. **Agent side** (archie-agent worker, or any consumer): - - Receive via JetStream pull consumer - - `replyTo := msg.Headers().Get("X-Archie-Reply")` - - Process the request (the existing agentloop) - - Result: `nc.Publish(replyTo, jsonBytes)` -- a core NATS publish, no JetStream involved - -3. **No additional JetStream consumers, streams, or streams needed.** The existing `nc.Conn` (exposed as `js.Conn()`) handles both directions. - -**NATS API calls involved:** - -| Operation | API Call | Package | -|-----------|----------|---------| -| Create reply inbox | `nc.NewInbox()` / `nc.SubscribeSync(inbox)` | `nats.go` core | -| Publish request | `js.PublishMsg(ctx, &nats.Msg{...})` | `jetstream` | -| Wait for reply | `sub.NextMsg(timeout)` | `nats.go` core | -| Send reply (agent) | `nc.Publish(reply, data)` | `nats.go` core | - -**Total new lines of code in `internal/nats`:** approximately 100-120 lines (two message structs, two new helper functions, one new subject function, and the header constant). - -**Total new lines for `NATSRunner`:** approximately 50-60 lines. - ---- - -### Configuration and Wiring - -The daemon already supports `agent.mode` with values `"inprocess"` and `"subprocess"`. Add `"nats"` as a third mode. - -In `cmd/archied/main.go`, when `cfg.Agent.Mode == "nats"`: -```go -runner := &agentexec.NATSRunner{ - Nats: natsClient, - Providers: agentexec.ProviderConfig(cfg.Providers), - Log: log.With("runner", "nats"), -} -``` - -No changes are needed to the `workflow` package or the daemon's `process` method -- they already consume `tc.Agent.Run(ctx, tc.Dir, req)` via the `agentexec.Runner` interface. - ---- - -### Critical Technical Decision: Reply Subject in Headers - -The `X-Archie-Reply` header approach was chosen over alternatives: - -- **Reply in `nats.Msg.Reply` field**: Does not work -- `PublishMsg` internally uses the Reply field for the JetStream PubAck response and overwrites whatever you set. -- **Reply in message body**: Would require the agent to parse the JSON body before knowing where to respond -- a chicken-and-egg problem if the body is corrupted or the format changes. -- **Correlation ID in headers + deterministic response subject**: Would require provisioning a consumer on the response subject and polling -- breaks the blocking `Runner.Run` contract. - -The reply inbox approach gives us: -- No polling (daemon blocks on sync subscription) -- Automatic correlation (each request gets a unique inbox) -- No consumer lifecycle management for responses -- Matching the existing `SubprocessRunner` blocking contract exactly \ No newline at end of file diff --git a/.scratch/explore-chunkB-workflow.md b/.scratch/explore-chunkB-workflow.md deleted file mode 100644 index 52d06ebde..000000000 --- a/.scratch/explore-chunkB-workflow.md +++ /dev/null @@ -1,188 +0,0 @@ -# workflow - -Here is the full analysis across all five files. - ---- - -## 1. Fields AgentStage reads from TaskContext to build the Request - -The `AgentStage.Stage()` method (lines 47-148 of `internal/workflow/agent.go`) constructs a `agentexec.Request` and reads the following from `TaskContext`: - -| Request field (line) | TaskContext source | Notes | -|---|---|---| -| `Version` (94) | Constant `agentexec.ProtocolVersion` | Not from TaskContext | -| `TaskID` (96) | `tc.Task.ID` | | -| `Attempt` (97) | `tc.Task.Attempt` | | -| `Stage` (98) | `a.Name` (the AgentStage field) | Not from TaskContext | -| `Model` (99) | `tc.Cfg.Models[a.Role]` | Falls back to `tc.Cfg.Models["builder"]` at line 54 if the role key is empty; returns an error at line 57 if still empty | -| `Mission` (100) | `a.Mission(tc)` | The Mission func receives the full `*TaskContext` — implement's plan/build missions read `tc.Task.Title`, `tc.Task.Body`, `tc.Task.Plan`, `tc.Task.IssueNumber`, `tc.Repo.FullName()` | -| `ExtraRules` (101) | `a.ExtraRules` | Static field on AgentStage, not read from TaskContext per se | -| `ReadOnly` (102) | `a.ReadOnly` | Static field | -| `Budget` (103) | `tc.Cfg.Budgets.MaxSteps`, `.MaxTokens`, `.WallClock.Std()` | Overridden by `a.MaxSteps` if > 0 (line 65-67) | -| `Gate` (104) | `a.Gate(tc)` | The Gate function receives TaskContext; implement's build stage calls `GateFromRepo(tc.Repo, tc.Cfg.Budgets)` (agent.go line 152-161) | -| `Preflight` (105) | `tc.Repo.ResolvedPreflight()` | Split into `agentexec.Command` structs (lines 86-92) | -| `Protection` (106) | `tc.Repo.Protect` + `a.ProtectGlobs(tc)` | Combined; set to zero Protection if `a.ReadOnly` is true (line 82-84) | -| `Notes` (107) | `tc.Task.Notes` | | -| `CaptureTools` (108) | `a.CaptureTools(tc)` | The CaptureTools function receives TaskContext | - -At line 110, `tc.Agent.Run(ctx, tc.Dir, req)` is called, which also reads `tc.Dir` (the worktree directory path) and `tc.Agent` (the Runner interface). - -The Mission function for the **plan** stage (implement.go lines 48-64) reads `tc.Task.Plan`, `tc.Task.IssueNumber`, `tc.Task.Title`, `tc.Task.Body`, `tc.Repo.FullName()`. - -The Mission function for the **build** stage (implement.go lines 83-93) reads `tc.Task.IssueNumber`, `tc.Task.Title`, `tc.Task.Body`, `tc.Task.Plan`, `tc.Repo.FullName()`. - ---- - -## 2. What happens after AgentStage.Run returns — Result processing - -The full post-Run sequence is in `agent.go` lines 110-146: - -1. **Line 111-113: Early-return on hard transport error.** If `err != nil && res.Version == 0`, the error is wrapped and returned immediately — the result is unusable (version 0 signals no valid response). - -2. **Line 114-116: Validate.** `res.ValidateFor(req)` checks that the result is consistent with the request (e.g., tool call parameters match what was requested). Returns validation error. - -3. **Lines 117-124: Persist appended notes.** Any entries in `res.AppendedNotes` are appended to `tc.Task.Notes` (prefixed with "- ") and saved via `tc.Store.Update(ctx, tc.Task)`. If the store write fails, the error is returned. - -4. **Lines 125-127: Return on agent-level error.** If `err != nil` (and we've already passed the version-zero check), wraps and returns it as `"agent run: ..."`. This catches cases where the agent loop ran but produced an error. - -5. **Lines 129-130: Accumulate usage.** `tc.Task.TokensUsed += res.TokensUsed; tc.Task.Iterations += res.Iterations`. - -6. **Lines 131-134: Emit event.** `tc.Emit("agent_finish", a.Name, res.Summary, ...)` with status, stop_reason, tokens, iterations, model. - -7. **Lines 136-142: Check status.** If `res.Status != agentexec.StatusPassed`, it returns an error of the form `"agent {status} ({stop_reason}): {detail or summary clipped to 2000 chars}"`. This handles "blocked", "idle", "parked", etc. — any non-passing status causes the stage to fail. - -8. **Lines 143-145: OnResult callback.** If the stage's `OnResult` func is non-nil, it is called with `(tc, res)`. The implement workflow's plan stage OnResult (lines 65-72 of implement.go) sets `tc.Task.Plan = res.Summary` and posts it as a forge comment. The build stage OnResult (lines 94-97 of implement.go) sets `tc.BuildSummary = res.Summary`. - -9. **Line 146: Return nil** if no OnResult or OnResult succeeded. - ---- - -## 3. Full list of stage names in the implement workflow; which call AgentStage - -From `implement.go` lines 38-109, the stages in order: - -| Order | Stage name | Calls AgentStage? | Implementation | -|---|---|---|---| -| 1 | `"prepare"` | No | `StagePrepareWorktree()` — clones repo, checks out branch (steps.go:21-31) | -| 2 | `"repo-stages"` | No | `StageRepoStages()` — runs Yaegi custom stages from `.archie/stages/*.go` (steps.go:84-104) | -| 3 | `"baseline"` | No | `StageBaselineGate()` — verifies the gate commands pass at base commit before any agent work (implement.go:16-30) | -| 4 | `"plan"` | **Yes** | `AgentStage{...}` — read-only planner, max 15 steps, posts the plan as a comment on the issue (implement.go:43-73) | -| 5 | `"build"` | **Yes** | `AgentStage{...}` — builder with gate, no ReadOnly, mission includes the plan, OnResult captures `tc.BuildSummary` (implement.go:75-98) | -| 6 | `"commit-push"` | No | `StageCommitPush(...)` — commits all worktree changes and pushes the branch (steps.go:51-58) | -| 7 | `"custom-gate"` | No | `StageYaegiGate()` — evaluates `.archie/gate.go` for project-specific rules (steps.go:111-151) | -| 8 | `"diff-cap"` | No | `StageDiffCap()` — parks if the diff exceeds configured line cap (steps.go:63-76) | -| 9 | `"open-pr"` | No | `StageOpenPR(...)` — opens the pull request with BuildSummary as body (steps.go:170-174) | - -Two stages call AgentStage: **"plan"** (read-only, no gate, posts plan comment) and **"build"** (read-write, has gate, captures summary). - ---- - -## 4. Every TaskContext.Forge call in steps.go and implement.go - -All invocations of `tc.Forge.*` or `tc.TaskContext.Forge.*`: - -**In `implement.go`:** - -- **Line 68** — `tc.Forge.Comment(context.Background(), tc.Task.Owner, tc.Task.Repo, tc.Task.IssueNumber, body)` — Post the plan as an issue comment (inside the plan stage's `OnResult`). Uses `context.Background()` rather than the stage's context. - -**In `steps.go`:** - -- **Line 160** — `tc.Forge.CreatePR(ctx, t.Owner, t.Repo, title, tc.Branch, tc.Repo.BaseBranch(), body)` — Create the pull request (inside `OpenPR()` helper, called by `StageOpenPR`). - -**In `workflow.go` (not steps.go or implement.go, but part of the workflow engine that uses `tc.Forge`):** - -- **Line 195** — `tc.Forge.SetStateLabel(...)` — Set the state label on the issue when a workflow finishes with an outcome (inside `finish()`). -- **Line 221** — `tc.Forge.SetStateLabel(...)` — Set the "parked" label on the issue (inside `park()`). -- **Line 225** — `tc.Forge.Comment(ctx, t.Owner, t.Repo, t.IssueNumber, body)` — Post the park reason as an issue comment (inside `park()`). - -Total distinct forge operations during workflow execution: **Comment** (plan posting, park notification), **CreatePR** (opening PRs), **SetStateLabel** (three call sites: finish outcome, park, and park again for the label). - -Note: Forge is also used in `daemon.go` outside the workflow engine — `AcceptInvitations`, `VerifyPush`, `React`, `IssuesWithLabel`, `AssignedIssues`, `PRState`, `RepliesAfter`, `CloseIssue`, `SetStateLabel` (for queue/working labels). But in the workflow stages themselves, only the three operations above. - ---- - -## 5. If agent execution moves to NATS: what stays in archied vs. moves to archie-agent - -The central boundary is `tc.Agent.Run(ctx, tc.Dir, req)` at `agent.go:110`. This is the single point where workflow execution crosses from deterministic orchestration into LLM-driven agent execution. - -### Stays in archied (all non-agent orchestration) - -- **Workflow engine** (`workflow.go`): the `Run()` loop that iterates stages, persists task state after each stage, handles outcomes/parking/finish. -- **All deterministic stages** (steps.go, implement.go): - - `StagePrepareWorktree` — git clone and branch checkout via `tc.Trees` - - `StageRepoStages` — Yaegi custom stage discovery and execution - - `StageBaselineGate` — runs shell gate commands at base commit - - `StageCommitPush` — git commit and push via `tc.Trees` - - `StageYaegiGate` — Yaegi gate evaluation - - `StageDiffCap` — diff line counting - - `StageOpenPR` — forge PR creation -- **AgentStage Result processing** (`agent.go` lines 110-146) — validation, note appending, token/iteration accumulation, event emission, OnResult callbacks (plan posting to forge, BuildSummary capture). -- **TaskContext construction** (`daemon.go:481-492`) — the daemon builds TaskContext from store, config, trees, forge, etc. -- **All forge interactions** (`tc.Forge.*`) — commenting on issues, setting labels, creating PRs. -- **Store operations** (`tc.Store.*`) — task persistence, transitions, claims. -- **Task queueing and polling** (`daemon.go`): `poll`, `pollNATS`, `pollSQLite`, `checkWaiting`, `reconcilePRs`, `drainSQLite`, `drainNATS`. - -### Moves to archie-agent (the LLM execution layer) - -- **The actual `tc.Agent.Run(ctx, tc.Dir, req)` call** — the entire agent loop: LLM chat completion, tool execution (read/write files in the worktree, run shell commands, execute gates), budget tracking, stop reason detection. -- **The worktree directory (`tc.Dir`)** and all file I/O within it. The agent's file read/write/edit tools operate on `tc.Dir`. If archie-agent is a separate process, it needs access to the same worktree (either via shared filesystem, or by serializing file operations back to archied, or by archied exposing a filesystem server). -- **Preflight command execution** (lines 86-92 of agent.go) — `tc.Repo.ResolvedPreflight()` commands are baked into the `Request.Preflight` field and executed by the Runner; they would run in archie-agent. -- **Gate execution** (the gate commands in `Request.Gate`) — run by the Runner during the agent loop. - -### What the NATS bridge layer must carry - -The NATS message would need to convey: - -**From archied to archie-agent (the Request):** -- TaskID, Attempt, Stage name, Model reference -- Mission string (already a string — the produced mission text) -- ExtraRules, ReadOnly flag -- Budget (MaxSteps, MaxTokens, WallClock) -- Gate (command list, max failures) -- Preflight (command list) -- Protection (suffixes + globs) -- Notes -- CaptureTools definitions -- **Worktree access** — either the path (if shared filesystem) or the repo coordinates + branch + commit SHA for the agent to clone locally - -**From archie-agent to archied (the Result):** -- Version, Status, StopReason -- Summary, Detail -- TokensUsed, Iterations -- AppendedNotes (string list) -- Full tool call records (for CaptureTools) -- File modifications list (if archied needs to track what changed) - -### Architectural observation about worktree access - -The critical coupling is `tc.Dir` being passed directly to `tc.Agent.Run` (line 110). Currently the agent loop reads and writes files inside that directory. If archie-agent runs as a separate process: -- **Option A (shared filesystem)**: Both archied and archie-agent mount the same worktree directory. ARCHied passes the path, archie-agent writes directly. Simple but requires shared storage. -- **Option B (archied as filesystem proxy)**: Archie-agent sends file read/write/stat requests back to archied over NATS (or a separate channel). Looser coupling but higher latency and complexity. -- **Option C (archied streams the Request, agent clones independently)**: Archie-agent receives the repo/branch/commit via NATS and clones its own worktree copy. This avoids file-routing latency but requires git credentials in the agent process. - -### Summary diagram - -``` -archied (stays) NATS bridge archie-agent (moves) -─────────────────────── ────────── ────────────────────── -Poll → Enqueue → Claim -Build TaskContext - ↓ -workflow.Run() - prepare (git clone) - repo-stages - baseline (gate verify) - plan (AgentStage) ───── Request ────→ ──────→ agent loop (LLM + file I/O) - ←──── Result ──── ←── gate/preflight execution - OnResult: post plan comment - build (AgentStage) ───── Request ────→ ──────→ agent loop (LLM + file I/O) - ←──── Result ──── ←── gate/preflight execution - OnResult: capture BuildSummary - commit-push (git) - custom-gate (yaegi) - diff-cap - open-pr (forge CreatePR) - finish/outcome -``` - -The workflow engine, stage orchestration, all forge/store interactions, and AgentStage result processing stay in archied. Only the `tc.Agent.Run()` call — the LLM agent loop with its file and command execution — moves to archie-agent. \ No newline at end of file diff --git a/.scratch/explore-chunkC-missions.md b/.scratch/explore-chunkC-missions.md deleted file mode 100644 index ebb4b1932..000000000 --- a/.scratch/explore-chunkC-missions.md +++ /dev/null @@ -1,345 +0,0 @@ -# missions - -Here is the complete report. - ---- - -## 1. The `AgentStage` Struct (from `/work/apps/archie-core/internal/workflow/agent.go`) - -**Lines 16-44.** The struct has 10 fields: - -| Field | Type | Line | Purpose | -|---|---|---|---| -| `Name` | `string` | 17 | Stage name (e.g. `"plan"`, `"build"`) | -| `Role` | `string` | 20 | Model role key, looked up in `cfg.Models[Role]` — falls back to `cfg.Models["builder"]` | -| `ReadOnly` | `bool` | 21 | When true, disables write protection entirely | -| `Mission` | `func(*TaskContext) string` | 23 | Produces the task statement string sent to the agent | -| `Gate` | `func(*TaskContext) agentexec.Gate` | 26 | Returns the quality gate; nil = ungated | -| `ExtraRules` | `string` | 28 | Literal string appended to the agent's system prompt | -| `MaxSteps` | `int` | 31 | Overrides budget when > 0 | -| `ProtectGlobs` | `func(*TaskContext) []string` | 37 | Globs blocked from writes, combined with repo-configured suffix protection | -| `CaptureTools` | `func(*TaskContext) []agentexec.CaptureTool` | 40 | Structured-output tools whose calls return as data | -| `OnResult` | `func(*TaskContext, agentexec.Result) error` | 43 | Consumes a passed result | - ---- - -## 2. How `AgentStage.Stage()` Calls `Mission` and Builds the `Request` (from `/work/apps/archie-core/internal/workflow/agent.go`) - -**Lines 47-148.** The `Stage()` method is the adapter that converts an `AgentStage` into the engine's `Stage` type. - -### The Request Construction (lines 94-109) - -```go -req := agentexec.Request{ - Version: agentexec.ProtocolVersion, // 1 - TaskID: tc.Task.ID, - Attempt: tc.Task.Attempt, - Stage: a.Name, - Model: modelRef, - Mission: a.Mission(tc), // <-- Mission called HERE - ExtraRules: a.ExtraRules, // <-- ExtraRules passed directly - ReadOnly: a.ReadOnly, - Budget: budget, - Gate: gate, - Preflight: preflight, - Protection: protection, - Notes: tc.Task.Notes, - CaptureTools: captureTools, -} -``` - -Key observations: - -- **`a.Mission(tc)` is called at line 100** to produce the `Mission` string. It receives the full `*TaskContext`, giving it access to `tc.Task.Title`, `tc.Task.Body`, `tc.Task.Plan`, `tc.Repo.FullName()`, `tc.Task.IssueNumber`, and any other field on `TaskContext`. -- **`a.ExtraRules` is used directly as a static string** (line 101). It is never processed, templated, or constructed — it is literally the `string` field set at AgentStage construction time. -- The result string from `a.Mission(tc)` is placed verbatim into `req.Mission`. It is not combined with ExtraRules there. The agent runtime receives both as separate fields and presumably concatenates or places them into the system prompt. - -### The agent run (line 110) - -```go -res, err := tc.Agent.Run(ctx, tc.Dir, req) -``` - -The `Request` is passed to the agent runner. The response is validated (lines 114-116), persisted notes are saved (lines 117-124), and if the result status is not `"passed"`, it returns an error (lines 136-142). Otherwise `a.OnResult` is called if set (lines 143-145). - ---- - -## 3. Every `AgentStage` in Implement, TDD, and Feasibility - -### 3a. Implement (`/work/apps/archie-core/internal/workflow/implement.go`) - -**Stage: `"plan"` (lines 43-73)** - -| Field | Value | -|---|---| -| `Name` | `"plan"` | -| `Role` | `"planner"` | -| `ReadOnly` | `true` | -| `MaxSteps` | `15` | -| `Mission` | Lines 48-64. Produces a `fmt.Sprintf` string: | -| | `"Produce a concrete implementation plan for this GitHub issue on the repository %s.\n"+prd+"\n\n# %s\n\n%s\n\n\nExplore the codebase with your read-only tools, then call finish with status \"passed\" and the plan as the summary: files to touch, the approach, acceptance criteria, and what tests should prove it. Keep the plan tightly scoped to the issue — call finish with status \"blocked\" if the issue is too vague or too large for one PR."` | -| | If `tc.Task.Plan != ""` (from a feasibility PRD), it prefixes: `"\n\n" + tc.Task.Plan + "\n\n"` | -| `Gate` | `nil` (no gate — read-only) | -| `ExtraRules` | `""` (empty) | -| `ProtectGlobs` | `nil` | -| `CaptureTools` | `nil` | -| `OnResult` | Line 65-72: Sets `tc.Task.Plan = res.Summary`, posts a comment to the issue | -| *Full mission example when no PRD exists:* `"Produce a concrete implementation plan for this GitHub issue on the repository owner/repo.\n\n\n# Issue Title\n\nIssue body text\n\n\nExplore the codebase..."` | - -**Stage: `"build"` (lines 75-98)** - -| Field | Value | -|---|---| -| `Name` | `"build"` | -| `Role` | `"builder"` | -| `ReadOnly` | `false` | -| `MaxSteps` | `0` (uses default budget) | -| `Mission` | Lines 83-93. Template: | -| | `"Implement this GitHub issue on the repository %s, following the plan below.\n\n\n# %s\n\n%s\n\n\n\n%s\n\n\nMake the smallest change that satisfies the issue and the plan's acceptance criteria. Do not run git — the orchestrator commits and pushes for you. When done, call finish with status \"passed\" and a summary written for the human who will review the pull request: what changed, why, and how it was verified."` | -| `Gate` | Line 78-79: `GateFromRepo(tc.Repo, tc.Cfg.Budgets)` — full quality gate | -| `ExtraRules` | Lines 81-82: `"Files matching the repository's protected suffixes (e.g. generated code) are write-blocked — edit their sources instead; the gate regenerates them."` | -| `ProtectGlobs` | `nil` | -| `CaptureTools` | `nil` | -| `OnResult` | Line 94-97: Sets `tc.BuildSummary = res.Summary` | - -### 3b. TDD (`/work/apps/archie-core/internal/workflow/tdd.go`) - -**Stage: `"analyse"` (lines 26-46)** - -| Field | Value | -|---|---| -| `Name` | `"analyse"` | -| `Role` | `"planner"` | -| `ReadOnly` | `true` | -| `MaxSteps` | `15` | -| `Mission` | Lines 31-41. Template: | -| | `"Analyse this bug report for the repository %s and determine the problem surface.\n\n\n# %s\n\n%s\n\n\nExplore the code read-only and call finish with status \"passed\" and a summary containing: the root cause (file and function), the exact conditions that trigger it, the expected vs actual behaviour, and which test cases would prove the bug. Call finish with status \"blocked\" if you cannot locate a plausible cause."` | -| `Gate` | `nil` | -| `ExtraRules` | `""` | -| `ProtectGlobs` | `nil` | -| `CaptureTools` | `nil` | -| `OnResult` | Lines 42-45: Sets `tc.Task.Plan = res.Summary` | - -**Stage: `"repro-tests"` (lines 48-69)** - -| Field | Value | -|---|---| -| `Name` | `"repro-tests"` | -| `Role` | `"builder"` | -| `ReadOnly` | `false` | -| `MaxSteps` | `0` | -| `Mission` | Lines 57-68. Template: | -| | `"Write tests that REPRODUCE this bug in the repository %s. Do NOT fix the bug yet.\n\n\n# %s\n\n%s\n\n\n\n%s\n\n\nAdd tests that pass once the bug is fixed but FAIL today because of it. The gate is inverted for this stage: it requires the full gate to pass EXCEPT %s which is required to FAIL. Do not touch non-test files. Call finish with status \"passed\" once the failing repro is in place, summarising which tests capture the bug."` | -| | Note: `%s` at the end is `testCommand(tc.Repo)` — the last gate command (e.g. `go test ./...`). | -| `Gate` | Lines 54-56: `tddReproGate(tc.Repo, tc.Cfg.Budgets)` — inverted gate where the last command expects failure | -| `ExtraRules` | `""` | -| `ProtectGlobs` | `nil` | -| `CaptureTools` | `nil` | -| `OnResult` | `nil` | - -**Stage: `"fix"` (lines 92-123)** - -| Field | Value | -|---|---| -| `Name` | `"fix"` | -| `Role` | `"builder"` | -| `ReadOnly` | `false` | -| `MaxSteps` | `0` | -| `Mission` | Lines 109-118. Template: | -| | `"Fix the bug in the repository %s. Failing repro tests are already committed; make them pass.\n\n\n# %s\n\n%s\n\n\n\n%s\n\n\nThe full quality gate (including 'go test ./...') must pass. Make the smallest fix that makes the repro tests pass without changing them. Call finish with status \"passed\" and a summary for the PR reviewer: root cause, the fix, and verification."` | -| `Gate` | Lines 95-97: `GateFromRepo(tc.Repo, tc.Cfg.Budgets)` — normal gate | -| `ExtraRules` | Lines 107-108: `"The repro tests written in the previous stage are the bug's specification. Test files are write-protected in this stage — make them pass by fixing the code they exercise."` | -| `ProtectGlobs` | Lines 100-105: `tc.Repo.ResolvedTestGlob()` — protects test files | -| `CaptureTools` | `nil` | -| `OnResult` | Lines 119-122: Sets `tc.BuildSummary = res.Summary` | - -### 3c. Feasibility (`/work/apps/archie-core/internal/workflow/feasibility.go`) - -**Stage: `"assess"` (lines 28-73)** - -| Field | Value | -|---|---| -| `Name` | `"assess"` | -| `Role` | `"planner"` | -| `ReadOnly` | `true` | -| `MaxSteps` | `15` | -| `Mission` | Lines 34-44. Template: | -| | `"Assess whether this feature request fits the project %s.\n\n\n# %s\n\n%s\n\n\nRead the repository's AGENT.md, ROADMAP.md, and README (whichever exist) plus enough code to judge scope and architectural fit. Then call the decide tool EXACTLY ONCE with fit=true or fit=false and your reasons, and afterwards call finish with status \"passed\" summarising the assessment."` | -| `Gate` | `nil` | -| `ExtraRules` | `""` | -| `ProtectGlobs` | `nil` | -| `CaptureTools` | Lines 33, 123-136: `decideCaptureTools` — provides a `decide` structured-output tool with boolean `fit` and string `reasons` | -| `OnResult` | Lines 45-72: Decodes the `decide` capture, sets `tc.decision`. If not a fit, closes the issue with `Outcome{Status: store.StatusClosedWontDo}` | - -**Stage: `"prd"` (lines 75-95)** - -| Field | Value | -|---|---| -| `Name` | `"prd"` | -| `Role` | `"planner"` | -| `ReadOnly` | `true` | -| `MaxSteps` | `20` | -| `Mission` | Lines 80-90. Template: | -| | `"Write a PRD for this accepted feature request on %s.\n\n\n# %s\n\n%s\n\n\n\n%s\n\n\nExplore the affected code surface, then call finish with status \"passed\" and the PRD as the summary: problem, proposed solution, files/components affected, acceptance criteria, explicit non-goals, and estimated diff size. It will be read by a human deciding whether to green-light implementation."` | -| | The last `%s` is `tc.decision.Reasons` | -| `Gate` | `nil` | -| `ExtraRules` | `""` | -| `ProtectGlobs` | `nil` | -| `CaptureTools` | `nil` | -| `OnResult` | Lines 91-94: Sets `tc.Task.Plan = res.Summary` | - ---- - -## 4. The `Workflow` Struct, `Stage` Struct, `Registry` Type, and `Route()` - -### `Stage` (from `/work/apps/archie-core/internal/workflow/workflow.go`, lines 86-89) - -```go -type Stage struct { - Name string - Run func(ctx context.Context, tc *TaskContext) error -} -``` - -### `Workflow` (lines 92-95) - -```go -type Workflow struct { - Name string - Stages []Stage -} -``` - -### `Registry` (line 98) - -```go -type Registry map[string]Workflow -``` - -### `Route()` (lines 103-141) - -`Route(t *store.Task, reg Registry) Workflow`: - -1. If `t.Workflow` is pre-assigned (non-empty) and exists in the registry, return it immediately (line 104-108). -2. Otherwise, iterate over `t.Labels` (comma-separated): - - `"bug"` -> workflow `"tdd"` - - `"feature"` -> workflow `"feasibility"` - - `"bootstrap"` -> workflow `"bootstrap"` -3. No label match -> fall back to `"implement"`, then `"default"`. -4. If nothing found, returns a no-op "fail" workflow (lines 135-141). - ---- - -## 5. What Would Need to Change to Replace Hardcoded Mission Strings with SKILL.md Content - -This is a read-only analysis of the changes required. Here is the full scope: - -### 5a. Where the strings live today - -Every Mission is an inline `func(*TaskContext) string` closure that calls `fmt.Sprintf` with a hardcoded format string. The seven unique templates are: - -| Workflow | Stage | File | Lines | -|---|---|---|---| -| implement | plan | `implement.go` | 48-64 | -| implement | build | `implement.go` | 83-93 | -| tdd | analyse | `tdd.go` | 31-41 | -| tdd | repro-tests | `tdd.go` | 57-68 | -| tdd | fix | `tdd.go` | 109-118 | -| feasibility | assess | `feasibility.go` | 34-44 | -| feasibility | prd | `feasibility.go` | 80-90 | - -### 5b. The `ExtraRules` field is also hardcoded - -| Workflow | Stage | String | File:Line | -|---|---|---|---| -| implement | build | `"Files matching the repository's protected suffixes..."` | `implement.go:81-82` | -| tdd | fix | `"The repro tests written in the previous stage are the bug's specification..."` | `tdd.go:107-108` | - -### 5c. All the pieces that must change - -**Layer 1: `AgentStage` struct definition** (`agent.go`, lines 16-44) - -- The `Mission` field is currently `func(*TaskContext) string`. To source missions from a file, you have three options: - - **A)** Keep the same signature but have the function read a file at runtime (not great — makes the function impure and harder to test). - - **B)** Add a new field like `MissionSource string` (path to SKILL.md) and modify `Stage()` to load content from that path when `Mission` is nil. This cleanly separates inline missions from file-sourced ones. - - **C)** Replace `Mission` entirely with a `func(*TaskContext) string` that loads and templates from SKILL.md. But you still need per-stage sections within the file. - -**Layer 2: `Stage()` method** (`agent.go`, lines 94-109) - -- Currently line 100: `Mission: a.Mission(tc)` — the mission is called synchronously. -- If files are loaded at construction time or stage-run time, this call site needs to either: - - Use a pre-loaded template string (loaded during `Implement()`, `TDD()`, `Feasibility()` construction), or - - Load the file at runtime inside the closure (less efficient but avoids an init-time dependency on the filesystem). - -**Layer 3: `ExtraRules` sourcing** - -- Currently a plain `string` field. If it should also come from SKILL.md, you need the same treatment: either load it at construction time or add a load-on-use path. - -**Layer 4: How the template variables get injected** - -The current missions use Go `fmt.Sprintf` with arguments like: -- `tc.Repo.FullName()` (passed as `%s`) -- `tc.Task.IssueNumber` (passed as `%d`) -- `tc.Task.Title` (passed as `%s`) -- `tc.Task.Body` (passed as `%s`) -- `tc.Task.Plan` (passed as `%s` — for implement build and tdd fix) -- `tc.decision.Reasons` (passed as `%s` — for feasibility prd) -- `testCommand(tc.Repo)` (passed as `%s` — for tdd repro-tests) - -If you move to a SKILL.md file, you need a template language. Options: -- **Go `text/template`** — already in the stdlib, no dependency. You would pass `*TaskContext` as the data context. Templates like `{{.Repo.FullName}}`, `{{.Task.Title}}` replace the `%s` slots. -- **Keep `fmt.Sprintf`** with numbered placeholders — but then the SKILL.md author must know argument ordering, which is fragile. - -**Layer 5: The SKILL.md file format** - -You need a way to express multiple missions in one file. Options: -- **One SKILL.md per workflow** (e.g., `SKILL_implement.md`, `SKILL_tdd.md`, `SKILL_feasibility.md`) with YAML front-matter for per-stage sections. -- **One section per stage** delimited by headings (`## plan`, `## build`, etc.) and a convention for ExtraRules. -- **YAML front matter** with a `stages` map: each key is a stage name with `mission` and `extra_rules` fields. - -Example YAML-front-matter approach: -```yaml ---- -stages: - plan: - mission: | - Produce a concrete implementation plan for this GitHub issue on the repository {{.Repo.FullName}}. - ... - extra_rules: "" - build: - mission: | - Implement this GitHub issue on the repository {{.Repo.FullName}}... - extra_rules: "Files matching the protected suffixes..." ---- -``` - -**Layer 6: Where SKILL.md lives** - -You need a lookup strategy. Likely candidates: -- Repository root (e.g., `.archie/SKILL.md`) — repo-specific missions -- Config-defined path (`cfg.SkillFile` or similar) -- Embedded in the binary as a fallback - -**Layer 7: Loading and caching** - -- When does the file get read? Per `Run()` call (every stage loads it), once at workflow construction in `Implement()`/`TDD()`/`Feasibility()`, or on daemon startup? -- If per-workflow construction, add a `loadSkillMissions(dir string)` helper called at the top of each workflow factory. -- Caching: the file is small, so a simple `sync.Once` per path or an `fsnotify` watch is overkill unless performance is critical. - -**Layer 8: Fallback behavior** - -- If no SKILL.md exists (which is the default for all repos today), the workflow must fall back to the current hardcoded missions. The simplest approach: keep the existing `Mission` closures as the zero-config default, and only apply SKILL.md content when the file is present. - -### 5d. Concrete minimal change list - -1. **`internal/workflow/agent.go`**: Optionally add a `MissionLoader func(*TaskContext) (string, error)` field or modify `Stage()` to detect and load from a path. Keep backward compat with inline `Mission`. - -2. **`internal/workflow/workflow.go`**: Add a `SkillPath string` (or similar) to `TaskContext` so stage missions can locate the skill file from the worktree directory `tc.Dir`. - -3. **Each workflow factory** (`implement.go`, `tdd.go`, `feasibility.go`): At the top of `Implement()`/`TDD()`/`Feasibility()`, attempt to load `tc.Repo.Dir + "/.archie/SKILL.md"` (or wherever configured). Parse per-stage templates. If the file doesn't exist, keep the existing inline closures as-is. - -4. **Template parsing**: Introduce a package-level helper, e.g. `renderMission(tmpl string, tc *TaskContext) string`, that uses `text/template` against `*TaskContext`. - -5. **`ExtraRules`**: Same treatment — source from the SKILL.md per-stage front matter when present. - -6. **Test the fallback**: Every existing test must continue passing without a SKILL.md file present, proving backward compatibility. \ No newline at end of file diff --git a/.scratch/explore-chunkC-patterns.md b/.scratch/explore-chunkC-patterns.md deleted file mode 100644 index c3c695059..000000000 --- a/.scratch/explore-chunkC-patterns.md +++ /dev/null @@ -1,230 +0,0 @@ -# patterns - -Here is the comprehensive report. - ---- - -## 1. Existing Skill-Loading and Frontmatter-Parsing Code - -**No existing frontmatter-parsing or SKILL.md-loading code exists in the Go codebase.** My searches confirm: - -- `grep -rn 'SKILL\.md' --include='*.go'` -- zero results. -- `grep -rn 'frontmatter\|front.matter\|front_matter' --include='*.go'` -- zero results. -- `grep -rn 'yaml\.' --include='*.go'` -- zero results. No YAML parsing of any kind exists yet. -- `grep -rn 'metadata\.archie\|archie-wf' --include='*.go'` -- zero results. -- `grep -rn 'ReadFile.*\.md\|os\.ReadFile.*skill' --include='*.go'` -- zero results. - -**What *does* reference "skill" in Go code are two packages, neither of which loads or parses SKILL.md:** - -- **`internal/skillscript/yaegi.go`** -- An interpreter helper that runs a Go script at a given filesystem path via Yaegi. It has no discovery logic, no directory scanning, no idea what a SKILL.md is. Its `Run(path string)` function just interprets a single `.go` file. -- **`internal/agentexec/inprocess.go`** -- Uses `internal/skillscript` to register a `run_go_script` tool that agents can call. It discovers nothing -- it takes a script path from the LLM's tool call arguments and delegates to `skillscript.Run()`. - -**The SKILL.md files that exist on disk** (5 total) are written by hand in the skills directory: - -| File | path | -|---|---| -| go-quality-gate | `.archie/skills/go-quality-gate/SKILL.md` | -| ecosystem-node | `.archie/skills/ecosystem-node/SKILL.md` | -| ecosystem-python | `.archie/skills/ecosystem-python/SKILL.md` | -| security-audit | `.archie/skills/security-audit/SKILL.md` | -| tdd-bugfix | `.archie/skills/tdd-bugfix/SKILL.md` | - -All five have identical frontmatter structure: -```yaml ---- -name: -description: > - -version: 1.0.0 -metadata: - archie: - tools: [] - engine: any ---- -``` - -This frontmatter is currently **dead content** -- no Go code reads or parses it. - ---- - -## 2. The Existing Directory-Discovery Pattern (wfeval.Discover) - -File: `/work/apps/archie-core/internal/workflow/wfeval/yaegi.go` - -This is the pattern to follow for any new skill-discovery code. Here is exactly how it works: - -### The constant -```go -const stagesDir = ".archie/stages" -``` - -### The function signature -```go -func Discover(dir string) ([]workflow.Stage, error) -``` - -### How it scans -1. `os.ReadDir(filepath.Join(dir, stagesDir))` -- reads the directory -2. If `os.IsNotExist(err)`, returns `(nil, nil)` -- **missing directory is not an error** -3. Any other read error is returned as a wrapped error -4. Iterates entries, filtering for `!e.IsDir() && filepath.Ext(e.Name()) == ".go"` -5. `sort.Strings(names)` -- **alphabetical order** is deterministic ordering -6. Calls `loadStage()` for each file, wrapping errors with the relative path -7. Returns the slice (or an empty slice if no `.go` files found) - -### How it loads a single stage -1. `os.ReadFile(path)` -- reads the entire Go source -2. Creates a Yaegi interpreter with `stdlib.Symbols` + `wfextract.Symbols` (the generated symbol table for `internal/workflow`) -3. `i.Eval(string(src))` -- interprets the Go source -4. `i.Eval("stages.Stage")` -- looks up the exported `Stage` function -5. Type-asserts it as `func() workflow.Stage` -6. Calls the factory function to get the `workflow.Stage` value - -### Error handling philosophy -- Missing directory: silent no-op (nil, nil) -- File-system errors: wrapped with the relative path context -- Panics in interpreted code: recovered via `defer`/`recover()`, returned as error -- Wrong function signature: clear error message -- A single bad file blocks the entire Discover call (fail-fast) - -### How it's wired in -In `internal/workflow/workflow.go`, the `TaskContext` struct has: -```go -CustomStages func(dir string) ([]Stage, error) -``` -This is injected by the composition root (`cmd/archied/`) to avoid a direct import cycle between `workflow` and its own generated Yaegi symbol table. - ---- - -## 3. Recommended YAML Dependency and Parsing Approach - -### Current state -- `go.mod` at `/work/apps/archie-core/go.mod` has **no YAML library**. -- The only markup parser is `github.com/BurntSushi/toml v1.6.0` for TOML config files. -- `gopkg.in/yaml.v3` is the standard Go YAML library and is **not** present. - -### Recommendation -**Add `gopkg.in/yaml.v3`** -- this is the de facto standard Go YAML library, maintained by the Go team, supports the full YAML 1.2 spec, and is what every major Go project uses. - -### Parsing approach for SKILL.md frontmatter -The SKILL.md files use standard YAML frontmatter between `---` delimiters. The parsing pattern would be: - -```go -import "gopkg.in/yaml.v3" - -type SkillFrontmatter struct { - Name string `yaml:"name"` - Description string `yaml:"description"` - Version string `yaml:"version"` - Metadata struct { - Archie *struct { - Tools []string `yaml:"tools"` - Engine string `yaml:"engine"` - // future: plugins, budget_usd, etc. - } `yaml:"archie"` - } `yaml:"metadata"` -} - -// ParseFrontmatter extracts YAML frontmatter from a SKILL.md byte slice. -// Returns the frontmatter struct and the body content after the closing ---. -func ParseFrontmatter(src []byte) (*SkillFrontmatter, string, error) { - // 1. Split on "---\n" — first block is YAML, rest is body - // 2. yaml.Unmarshal() the YAML block into SkillFrontmatter - // 3. Return parsed metadata + body string -} -``` - -The TOML parsing pattern already in the codebase (file `/work/apps/archie-core/internal/config/config.go`) uses struct tags and straightforward `toml.DecodeFile()` -- the YAML equivalent would use `yaml.Unmarshal()` instead. - ---- - -## 4. What the agentskills.io Specification Says - -Source: https://agentskills.io/specification (fetched successfully) - -### Naming convention -- The spec defines the `name` field: 1-64 chars, lowercase alphanumeric + hyphens, must match the parent directory name. -- There is **no "archie-wf-" prefix** in the public agentskills.io spec. That prefix appears to be archie-core's own convention (possibly for workflow-specific skills), not a spec requirement. - -### Metadata block -- The `metadata` field is an **optional** key-value mapping (string to string). -- The spec does **not** define any `metadata.archie` sub-block. That block (`metadata.archie.tools`, `metadata.archie.engine`) is archie-core's own extension. - -### Full frontmatter fields defined by the spec - -| Field | Required | Description | -|---|---|---| -| `name` | Yes | 1-64 chars, lowercase+hyphens, matches dir name | -| `description` | Yes | 1-1024 chars, what + when to use | -| `license` | No | License name or reference | -| `compatibility` | No | Environment requirements (500 char max) | -| `metadata` | No | Arbitrary string-to-string map | -| `allowed-tools` | No | Space-separated pre-approved tools (experimental) | - -### SKILL.md structure -``` ---- - ---- - -``` - -### Directory structure -``` -skill-name/ - SKILL.md (required) - scripts/ (optional) - references/ (optional) - assets/ (optional) -``` - -### Progressive disclosure tiers -1. **Catalog** (~100 tokens/skill): `name` and `description` loaded at startup -2. **Instructions** (<5000 tokens): Full SKILL.md body when skill is activated -3. **Resources**: Scripts/references/assets loaded on demand - -### Scanning locations -- Project: `/./skills/` and `/.agents/skills/` -- User: `~/./skills/` and `~/.agents/skills/` -- `.claude/skills/` is mentioned as a pragmatic compatibility convention - ---- - -## 5. The Full .archie/ Directory Tree - -``` -.archie/ - skills/ - ecosystem-node/ - SKILL.md - ecosystem-python/ - SKILL.md - go-quality-gate/ - SKILL.md - security-audit/ - SKILL.md - tdd-bugfix/ - SKILL.md -``` - -**What does NOT exist yet:** -- No `.archie/stages/` directory (stage scripts are in the spec but none exist yet) -- No `.archie/config` or `.archie/config.toml` (configuration is in a top-level `config.toml`, not `.archie/`) -- No `scripts/` subdirectories inside any skill (all 5 skills have only `SKILL.md`) -- No `references/` or `assets/` subdirectories inside any skill - ---- - -### Summary of Key File Paths - -| File | Purpose | -|---|---| -| `/work/apps/archie-core/internal/workflow/wfeval/yaegi.go` | **The discovery pattern to follow** -- scans `.archie/stages/*.go`, sorts, loads via Yaegi | -| `/work/apps/archie-core/internal/workflow/wfeval/yaegi_test.go` | Tests showing the discovery pattern | -| `/work/apps/archie-core/internal/workflow/workflow.go` | Workflow engine, Stage struct, CustomStages injection pattern | -| `/work/apps/archie-core/internal/skillscript/yaegi.go` | Yaegi runner for skill Go scripts (no discovery, no SKILL.md parsing) | -| `/work/apps/archie-core/internal/agentexec/inprocess.go` | Registers `run_go_script` tool using skillscript.Run() (line 181-207) | -| `/work/apps/archie-core/internal/config/config.go` | Existing TOML config parsing pattern (reference for adding YAML) | -| `/work/apps/archie-core/go.mod` | Dependencies -- no YAML lib yet, BurntSushi/toml v1.6.0 present | -| `/work/apps/archie-core/.references/skills-implementation.md` | Research notes on implementing agentskills.io support in archie | -| `/work/apps/archie-core/.archie/skills/*/SKILL.md` | 5 hand-written skill files with YAML frontmatter (currently dead content) | \ No newline at end of file diff --git a/.scratch/explore-chunkC-skills.md b/.scratch/explore-chunkC-skills.md deleted file mode 100644 index b18e8ba3e..000000000 --- a/.scratch/explore-chunkC-skills.md +++ /dev/null @@ -1,342 +0,0 @@ -# skills - -Here is the complete analysis. - ---- - -## Complete Report: SKILL.md Files in archie-core - -### 1. Tally of files - -There are exactly **5 SKILL.md files** in the repository, all under `/work/apps/archie-core/.archie/skills/`. There are no others anywhere in the repo. - ---- - -### 2. Supporting directories - -There are **no `plugins/` or `scripts/` subdirectories** inside any skill directory. The `scripts/` feature described in the agentskills.io spec and the Yaoi interpreter (`internal/skillscript/yaegi.go`) exist in the Go code but have no content in the actual skill directories. The `run_go_script` tool in `internal/agentexec/inprocess.go` (lines 181-207) references scripts at `.archie/skills//scripts/*.go`, but no such files exist. - ---- - -### 3. Per-file analysis - ---- - -#### 3.1 tdd-bugfix/SKILL.md - -**File:** `/work/apps/archie-core/.archie/skills/tdd-bugfix/SKILL.md` - -**Complete YAML frontmatter:** - -```yaml -name: tdd-bugfix -description: > - Fix bugs using test-driven development. Write a failing repro test first, prove - it captures the bug, then fix the code without touching the tests. archie-core - routes issues labelled "bug" through this workflow automatically. -version: 1.0.0 -metadata: - archie: - tools: [go, golangci-lint] - engine: any -``` - -Key-value pairs extracted: -- `name`: "tdd-bugfix" -- `description`: Multiline string (about TDD bugfix) -- `version`: "1.0.0" -- `metadata.archie.tools`: [go, golangci-lint] -- `metadata.archie.engine`: "any" - -**Body content structure:** - -The body has 6 sections: -1. `## When this runs` (1 paragraph: describes that archie-core routes "bug" labelled issues through this workflow; mentions the 5 stages) -2. `## Stage 1: Analyse (read-only planner)` (prose: what the planner produces, no-code constraint) -3. `## Stage 2: Repro Tests (write failing tests only)` (prose with bullet constraints: don't touch non-test files, gate inverted, make failure explicit) -4. `## Stage 3: Capture Proof (deterministic)` (prose: archie-core runs the test command directly) -5. `## Stage 4: Fix (code only)` (prose with bullet constraints: test files write-protected, full gate runs, smallest fix) -6. `## Stage 5: Deliver` (numbered list: commits, push, PR, comment with proof) -7. `## Common pitfalls` with 3 sub-pitfalls (each with prose and checklist) - -**Mapping to hardcoded Go code:** - -This skill documents the exact workflow that is hardcoded in `internal/workflow/tdd.go` lines 18-149. The 5 stages correspond directly: -- "analyse" -> `AgentStage{Name: "analyse", ...}` (line 27) -- "repro-tests" -> `AgentStage{Name: "repro-tests", ...}` (line 48) -- "capture-proof" -> `Stage{Name: "capture-proof", Run: ...}` (line 73) -- "fix" -> `AgentStage{Name: "fix", ...}` (line 92) -- "deliver" -> Stage `open-pr` (line 133) plus the two commit stages (lines 88, 125) - -Every constraint in the SKILL.md body (inverted gate, test file write-protection, smallest fix, two-commit history) is reflected as code in `tdd.go` and `agent.go`. - ---- - -#### 3.2 go-quality-gate/SKILL.md - -**File:** `/work/apps/archie-core/.archie/skills/go-quality-gate/SKILL.md` - -**Complete YAML frontmatter:** - -```yaml -name: go-quality-gate -description: > - Run the full Go quality pipeline: gofumpt, go fix, golangci-lint, go test -race, - and task deadcode. Use before any commit in a Go project. Triggered automatically - by archie-core's implement and tdd workflows via the per-repo gate config. -version: 1.0.0 -metadata: - archie: - tools: [go, golangci-lint, gofumpt, task] - engine: any -``` - -Key-value pairs extracted: -- `name`: "go-quality-gate" -- `description`: Multiline string (about Go quality pipeline) -- `version`: "1.0.0" -- `metadata.archie.tools`: [go, golangci-lint, gofumpt, task] -- `metadata.archie.engine`: "any" - -**Body content structure:** - -5 sections with mixed content: -1. `## When this runs` (prose: gate is enforced after every builder stage; commands come from repo config) -2. `## Standard gate (Tau and similar Go projects)` (TOML examples showing gate commands, plus convention about last command being test runner) -3. `## Diagnosing gate failures` with 4 subsections (each with prose and common fixes): - - `### gofumpt / go fix` - - `### golangci-lint` (bullet list of common linters and fixes) - - `### go test -race` (numbered diagnostic steps) - - `### task deadcode` (bash example for scoping) -4. `## When the TDD workflow runs` (prose about inverted gate during repro-tests) - -**Mapping to hardcoded Go code:** - -- The gate mechanism is implemented in `internal/workflow/agent.go` lines 152-161 (`GateFromRepo()`) and `internal/workflow/tdd.go` lines 155-174 (`tddReproGate()`). -- The `tools` list maps conceptually to `config.Repo.Gate` in `internal/config/config.go` lines 37-43 (a `[][]string` of commands). -- The skill documents conventions, not code that loads the SKILL.md. - ---- - -#### 3.3 security-audit/SKILL.md - -**File:** `/work/apps/archie-core/.archie/skills/security-audit/SKILL.md` - -**Complete YAML frontmatter:** - -```yaml -name: security-audit -description: > - Scan code for security vulnerabilities: hardcoded secrets, injection vectors, - unsafe deserialization, missing auth checks, and path traversal. Use on PRs - touching auth, API endpoints, or data handling code. -version: 1.0.0 -metadata: - archie: - tools: [golangci-lint, trivy, gitleaks] - engine: any -``` - -Key-value pairs extracted: -- `name`: "security-audit" -- `description`: Multiline string (about security scanning triggers) -- `version`: "1.0.0" -- `metadata.archie.tools`: [golangci-lint, trivy, gitleaks] -- `metadata.archie.engine`: "any" - -**Body content structure:** - -4 top-level sections: -1. `## When to use` (bullet list of trigger conditions: PR touches auth, new API endpoints, db queries, dependency updates) -2. `## What to check` with 5 numbered subsections: - - `### 1. Hardcoded secrets` (bullet list of scan targets + `gitleaks` example) - - `### 2. Injection vectors` (SQL, Command, Path sub-bullets with specific Go tools) - - `### 3. Unsafe deserialization` (bullet list of Go-specific patterns) - - `### 4. Missing auth checks` (bullet list of endpoint/token issues) - - `### 5. Dependency CVEs` (`trivy` command example + report format) -3. `## Reporting` (numbered list of 5 report fields: Severity, Location, Description, Fix, Prevention) -4. Closing line: "If nothing is found, report clean. Never fabricate findings." - -**Mapping to hardcoded Go code:** - -- **No hardcoded workflow exists** for security-audit in the Go codebase. This skill is purely informational/documentation. -- It is not registered as a workflow in `cmd/archied/main.go` lines 163-169. -- There is no label routing for security tasks in `internal/workflow/workflow.go` lines 100-141. -- It exists as a skill that could be invoked manually or through future orchestration. - ---- - -#### 3.4 ecosystem-node/SKILL.md - -**File:** `/work/apps/archie-core/.archie/skills/ecosystem-node/SKILL.md` - -**Complete YAML frontmatter:** - -```yaml -name: ecosystem-node -description: > - Node.js/TypeScript project conventions for archie-core: npm/pnpm, eslint, - prettier, tsc, vitest. Use when working on Node repositories with archie-core. -version: 1.0.0 -metadata: - archie: - tools: [node, npm, pnpm, vitest, eslint, prettier] - engine: any -``` - -Key-value pairs extracted: -- `name`: "ecosystem-node" -- `description`: Multiline string (about Node/TS project conventions) -- `version`: "1.0.0" -- `metadata.archie.tools`: [node, npm, pnpm, vitest, eslint, prettier] -- `metadata.archie.engine`: "any" - -**Body content structure:** - -7 sections: -1. `## Preflight` (prose + mention of `node --version`) -2. `## Recommended gate configuration` (TOML example blocks for pnpm and npm) -3. `## Test glob` (prose: default `*.test.ts`, override config examples) -4. `## Package management` (prose + bash: lockfile detection, install command) -5. `## Common tools` (markdown table: Tool, Purpose, Config file — 5 rows) -6. `## Common gate failures` with 3 subsections: - - `### eslint` (bullet list) - - `### tsc / typecheck` (bullet list) - - `### vitest / jest` (bullet list) - -**Mapping to hardcoded Go code:** - -The content maps directly to `internal/config/ecosystem.go` lines 22-25: -```go -"node": { - Preflight: [][]string{{"node", "--version"}}, - TestGlob: "*.test.ts", -}, -``` -The preflight check and default test glob are hardcoded. Lockfile detection logic is referenced in prose but not implemented in the Go code shown. - ---- - -#### 3.5 ecosystem-python/SKILL.md - -**File:** `/work/apps/archie-core/.archie/skills/ecosystem-python/SKILL.md` - -**Complete YAML frontmatter:** - -```yaml -name: ecosystem-python -description: > - Python project conventions for archie-core: venv, pytest, ruff, mypy, pip-audit. - Use when working on Python repositories with archie-core. -version: 1.0.0 -metadata: - archie: - tools: [python, pytest, ruff, mypy, pip-audit] - engine: any -``` - -Key-value pairs extracted: -- `name`: "ecosystem-python" -- `description`: Multiline string (about Python project conventions) -- `version`: "1.0.0" -- `metadata.archie.tools`: [python, pytest, ruff, mypy, pip-audit] -- `metadata.archie.engine`: "any" - -**Body content structure:** - -7 sections: -1. `## Preflight` (prose + `python --version`) -2. `## Recommended gate configuration` (TOML example) -3. `## Test glob` (prose: default `test_*.py`, override example) -4. `## Package management` (bullet list of assumptions) -5. `## Virtual environment` (bash examples for venv setup) -6. `## Common gate failures` with 3 subsections: - - `### ruff` (bullet list) - - `### mypy` (bullet list) - - `### pytest` (bullet list) - -**Mapping to hardcoded Go code:** - -Maps directly to `internal/config/ecosystem.go` lines 18-21: -```go -"python": { - Preflight: [][]string{{"python", "--version"}}, - TestGlob: "test_*.py", -}, -``` - ---- - -### 4. The agentskills.io Specification - -The specification at `https://agentskills.io/specification` defines these fields: - -| Field | Required | Notes | -|---|---|---| -| `name` | Yes | 1-64 chars, lowercase + hyphens, matches directory name | -| `description` | Yes | 1-1024 chars, describes what and when | -| `license` | No | Short license name or reference | -| `compatibility` | No | Environment requirements (product, packages, network) | -| `metadata` | No | Arbitrary key-value map for additional properties | -| `allowed-tools` | No | Space-separated string of pre-approved tools (experimental) | - -The spec also defines optional subdirectories: `scripts/`, `references/`, `assets/`. - -**Contrast with current archie-core format:** - -- `version: 1.0.0` exists in all 5 skills but is **not an agentskills.io field** -- it is custom archie-core metadata inside `metadata.archie`. The spec would expect `metadata.version` or simply omitting version from the spec-level fields. -- `metadata.archie.tools` is a custom archie extension. The spec has `allowed-tools` (string format, experimental) which serves a similar purpose but with different semantics (pre-approval for tool use vs. listing required tools). -- `metadata.archie.engine: any` is custom archie metadata with no spec equivalent. -- None of the current skills use `license`, `compatibility`, or `allowed-tools` from the spec. - ---- - -### 5. Analysis: Which fields would be useful as machine-readable skill configuration - -Based on how the Go code currently consumes configuration and how the workflow engine works (`internal/workflow/workflow.go`, `internal/workflow/agent.go`, `internal/config/config.go`), the following would benefit from machine parsing: - -**A. `tools` / `allowed-tools` (pre-approval list)** -- Currently hardcoded per skill in `metadata.archie.tools` but not parsed by any Go code. -- Would enable the agent runtime to pre-authorize external tool calls (golangci-lint, trivy, gitleaks, etc.) without prompting, matching the agentskills.io experimental `allowed-tools` concept. -- The TDD workflow's gate mechanism already runs these tools via `config.Repo.Gate` -- a parsed tools list could validate the gate commands against the skill's declared toolset. - -**B. `ecosystem` (language/runtime constraint)** -- Currently configured per-repo in TOML as `config.Repo.Ecosystem` (via `internal/config/ecosystem.go`), not per-skill. -- The ecosystem-node and ecosystem-python skills document conventions that overlap with the Go hardcodes. A machine-readable ecosystem field on a skill would let the skill declare its language affinity. -- No skill currently has this as a top-level field. - -**C. `engine` constraint (e.g., any, archied v1, ...)** -- Currently `metadata.archie.engine: any` in every skill, not parsed. -- Could gate skill activation to specific engine versions (`archie-core >= 0.5`, `claude-code >= 1.0`). - -**D. `budget` (max steps, max tokens, wall clock)** -- Currently hardcoded per workflow in Go: `internal/workflow/agent.go` lines 60-67 reads from `config.Budgets` with per-AgentStage overrides (e.g., MaxSteps=15 for planner, 20 for feasiability PRD stage). -- A machine-readable budget field could let the skill declare its expected resource needs, overriding global defaults when appropriate. - -**E. `plugins` (extension scripts)** -- Not present in any current skill. The `internal/skillscript/yaegi.go` infrastructure supports running `.go` scripts from a skill's `scripts/` directory, but no skill has one. -- Could declare scripts that the agent runtime should load and expose as tools. - -**F. Stage/workflow structure** -- The body text of tdd-bugfix describes a 5-stage workflow with named stages, but this is natural language only. -- The Go workflows are hardcoded in `internal/workflow/tdd.go`, `implement.go`, `feasibility.go`, and `steps.go`. -- A machine-readable stages list in the frontmatter or a companion YAML file would allow the workflow engine to load workflows from skills without recompilation. Currently, new workflows require Go code changes in `cmd/archied/main.go` lines 163-169. - -**G. Gate configuration** -- The quality gate is documented in `go-quality-gate/SKILL.md` as TOML examples but configured per-repo in the daemon's TOML config. A skill-declared gate skeleton would let the skill say "I need these commands to verify correctness." - ---- - -### 6. Summary of the gap - -The current system has **no Go code that reads SKILL.md files programmatically**. The files exist purely as human-readable documentation. All workflow logic is hardcoded in Go: - -- `internal/workflow/implement.go` -- plan + build stages -- `internal/workflow/tdd.go` -- analyse + repro-tests + capture-proof + fix + deliver -- `internal/workflow/feasibility.go` -- assess + prd + deliver -- `internal/workflow/steps.go` -- shared steps (prepare, commit, push, gate, diff cap, PR) -- `internal/workflow/agent.go` -- AgentStage adapter that turns workflow config into `agentexec.Request` - -The only code that touches skill directories is `/work/apps/archie-core/internal/skillscript/yaegi.go` (interprets `scripts/*.go` files) and the `scriptToolSet` in `/work/apps/archie-core/internal/agentexec/inprocess.go` lines 181-207 (exposes the `run_go_script` tool to agents). Both of these are unused since no skill has any `scripts/` content. - -To make skills machine-parseable, the frontmatter would need to adopt the agentskills.io standard fields plus archie-specific extensions (tools list as per spec's `allowed-tools` or a custom `metadata.archie` block, plus possibly a declarative stage/workflow scheme in the frontmatter or a companion YAML file). \ No newline at end of file diff --git a/.scratch/explore-daemon-task-loop.md b/.scratch/explore-daemon-task-loop.md deleted file mode 100644 index 4deb72921..000000000 --- a/.scratch/explore-daemon-task-loop.md +++ /dev/null @@ -1,350 +0,0 @@ -# daemon-task-loop - -Here is the full report. - ---- - -## 1. Full Lifecycle: GitHub Issue to Completed Task - -The lifecycle spans four subsystems: **forge** (GitHub polling), **store** (SQLite persistence), **daemon** (orchestration loop), and **workflow** (pipeline engine). Here is the exact call chain. - -### Phase 1 -- Discovery (polling) - -**Entry:** `Daemon.Run()` at `daemon.go:72` -- Creates a `time.NewTicker` from `d.Cfg.PollInterval` (default 60s, line 259 of config.go). -- Calls `d.Cycle(ctx)` on every tick. - -**`Daemon.Cycle()`** at `daemon.go:88` does three discovery activities, then drains the queue: - -1. **`d.poll(ctx)`** -- line 89. Iterates over `d.Cfg.Repos`, calling `d.pollIssues(ctx, repo)` (line 140). -2. **`d.reconcilePRs(ctx)`** -- line 90. Finds tasks at `StatusPROpen` and checks GitHub for merged/closed status. -3. **`d.checkWaiting(ctx)`** -- line 91. Finds tasks at `StatusWaitingHuman` and LLM-judges human replies. - -**`Daemon.pollIssues()`** at `daemon.go:140` routes by `d.Cfg.Dispatch.Trigger`: -- `"assignee"`: calls `d.Forge.AssignedIssues(ctx, owner, repo, botUser)`. -- `"label"`: calls `d.Forge.IssuesWithLabel(ctx, owner, repo, label)`. -- `"either"`: calls `pollEither()` (line 163), which unions both lists deduped by issue number. - -### Phase 2 -- Enqueue - -**`Daemon.poll()`** at `daemon.go:111-133`: for each discovered `forge.Issue`, calls: -- `d.Store.EnqueueIssue(ctx, owner, repo, number, title, body, labels)` -- this is an `INSERT ... ON CONFLICT DO NOTHING` at `store.go:115-118`. Returns `true` if a new row was inserted (idempotency via the `UNIQUE(owner, repo, issue_number)` constraint at line 99). -- On insert: posts an emoji reaction via `d.Forge.React()` (default "eyes", config line 319), sets the "queued" state label, and emits a `KindTaskQueued` event. -- On duplicate (inserted==false): calls `d.maybeRetryParked()` (line 134) which checks whether a human removed the `archie:parked` label and if so calls `d.Store.Requeue()`. - -### Phase 3 -- Claim (queue drain) - -Back in `Daemon.Cycle()` at lines 92-106, an inner `for` loop: -1. Calls `d.Store.ClaimNext(ctx)` (line 96). -2. If nil, returns (queue empty). -3. Otherwise calls `d.process(ctx, task)` (line 104), then loops again. - -**`Store.ClaimNext()`** at `store.go:129-141`: one atomic SQL statement: -```sql -UPDATE tasks SET status='running', attempt=attempt+1, updated_at=datetime('now') -WHERE id = (SELECT id FROM tasks WHERE status='queued' ORDER BY id LIMIT 1) -RETURNING id, owner, repo, issue_number, title, body, labels, status, - workflow, stage, branch, plan, notes, pr_number, tokens_used, - iterations, attempt, park_reason -``` -Because SQLite locks the database file for the duration of the UPDATE, no two claimed tasks can overlap -- the daemon is effectively single-consumer. The `RETURNING` clause returns the full row. - -### Phase 4 -- Process - -**`Daemon.process()`** at `daemon.go:356`: -1. Looks up the `config.Repo` for the task via `d.repoFor(task)` (line 358). Fails/tasks that belong to a now-unconfigured repo go to `StatusParked`. -2. Routes to a workflow: `wf := workflow.Route(task, d.Workflows)` (line 362). -3. Sets the "working" state label on the issue. -4. Calls `workflow.Run(ctx, wf, taskContext)` (line 365). - -### Phase 5 -- Workflow Execution - -**`workflow.Route()`** at `workflow.go:103-141` decides the workflow: -1. If `t.Workflow` is non-empty (set by a prior `Requeue`), use that exact workflow from the registry. -2. Otherwise inspect labels: `"bug"` -> `"tdd"`, `"feature"` -> `"feasibility"`, `"bootstrap"` -> `"bootstrap"`. -3. Falls back to `"implement"`, then `"default"`, then a hardcoded failing error workflow. - -**`workflow.Run()`** at `workflow.go:145-185` executes stages sequentially: -1. Sets `t.Workflow = wf.Name`, persists via `tc.Store.Update()`. -2. For each stage: sets `t.Stage`, persists, emits `KindStageStart`, runs `stage.Run(ctx, tc)`, emits `KindStageFinish` with timing data. -3. On stage error: if `ctx.Err()` is set (daemon shutting down), returns cleanly; otherwise calls `park()` at line 216, which transitions to `StatusParked`, posts a comment, and emits `KindParked`. -4. If `tc.Outcome.Status` is non-empty after a stage, calls `finish()` at line 187, which transitions to that terminal status. - -### Phase 6 -- Terminal States - -A workflow terminates through `finish()` (`workflow.go:187`) or `park()` (`workflow.go:216`): - -| Outcome | Status | What happens | -|---|---|---| -| `park()` | `parked` | Worktree kept, park-reason comment posted, label set. Human can remove `archie:parked` to trigger `maybeRetryParked()`. | -| `finish()` with `StatusPROpen` | `pr_open` | PR is open on GitHub. Subsequent `Cycle()` passes call `reconcilePRs()` which checks merged/closed. | -| `finish()` with `StatusWaitingHuman` | `waiting_human` | Daemon watches for human replies via `checkWaiting()`, LLM-judges approve/reject/unclear. | -| `finish()` with `StatusMerged` | `merged` | Final -- PR merged, labels cleared. | -| `finish()` with `StatusClosedWontDo` | `closed_wont_do` | Issue closed on GitHub. | -| `finish()` with `StatusRejected` | `rejected` | PR closed without merge. | - -### Crash Recovery - -`Daemon.Startup()` at line 52 calls `d.Store.RecoverStale(ctx)` (`store.go:234`) which runs: -```sql -UPDATE tasks SET status='queued' WHERE status='running' -``` -This re-queues any task that was `running` when the previous daemon crashed. There is no distributed locking -- the single SQLite file is the authority. - ---- - -## 2. Event Struct and Bus - -### `events.Event` at `events.go:31-42` - -```go -type Event struct { - ID int64 `json:"id,omitempty"` // set by the store sink - At time.Time `json:"at"` - Kind string `json:"kind"` - TaskID int64 `json:"task_id,omitempty"` - Repo string `json:"repo,omitempty"` - Issue int `json:"issue,omitempty"` - Workflow string `json:"workflow,omitempty"` - Stage string `json:"stage,omitempty"` - Detail string `json:"detail,omitempty"` - Data map[string]any `json:"data,omitempty"` -} -``` - -**Kind constants** at `events.go:16-26`: -- `KindTaskQueued`, `KindStageStart`, `KindStageFinish` (data: `duration_ms`, `error`), `KindAgentFinish` (data: `status`, `stop_reason`, `tokens`, `iterations`, `model`), `KindParked` (data: `reason`), `KindOutcome` (data: `status`, `detail`), `KindPRMerged`, `KindPRRejected`, `KindLog` (data: `level`, `msg`). - -Events are intentionally the single wire type -- every consumer is just another subscriber. - -### `events.Bus` at `events.go:59-128` - -A simple in-process fan-out bus: - -- **`Subscribe(buffer int) *Sub`** (line 68): creates a buffered channel (default 64), appends to `b.subs`. Returns a `*Sub` whose `.C` field is the read-only receive channel. -- **`Publish(e Event)`** (line 86): stamps `At` if zero, then iterates all subscribers and does a non-blocking send (`select` with `default`). If a subscriber's buffer is full, the event is dropped and `s.dropped.Add(1)` is incremented. **This is the critical design property: backpressure from a slow consumer never blocks the publisher.** -- **`unsubscribe(sub *Sub)`** (line 104): removes the sub from the slice, closes its channel. -- **`Close()`** (line 117): sets `closed` flag, closes all subscriber channels, nils the slice. -- **Bounded per-subscriber buffers** with drop-on-overflow, as documented at line 6: "a stalled dashboard connection can never apply backpressure to the task engine." - -### Publish Side - -The daemon has a convenience method `emit()` at `daemon.go:44-49`: -```go -func (d *Daemon) emit(e events.Event) { - if d.Bus != nil { d.Bus.Publish(e) } -} -``` -Called explicitly at every lifecycle transition -- see `daemon.go:128` (queued), `daemon.go:207` (retried), `daemon.go:237` (PR merged), `daemon.go:248` (PR rejected), `daemon.go:294` (human approved), `daemon.go:303` (human rejected). - -The workflow engine also publishes via `TaskContext.Emit()` at `workflow.go:61-75`, which stamps the task identity and delegates to `tc.Bus.Publish()`. - -### Subscribe Side (Consumers) - -The bus is consumed by at least two subscriber patterns visible in the codebase: - -1. **SQLite event log** (`internal/store/events.go`): some goroutine must subscribe and call `s.InsertEvent()` to persist each event. (The subscription setup is in the composition root `cmd/archied`. I did not read that file, but `InsertEvent` at `events.go:32` clearly exists for this purpose.) - -2. **SSE fan-out** for the dashboard: the bus is designed so each HTTP SSE connection gets its own `Sub` with a small buffer, and the drop-on-overload behavior lets the dashboard fall behind without slowing the daemon. - ---- - -## 3. ClaimNext -- SQL, Locking, Concurrency - -### The SQL - -At `store.go:129-141`: -```sql -UPDATE tasks SET status='running', attempt=attempt+1, updated_at=datetime('now') -WHERE id = (SELECT id FROM tasks WHERE status='queued' ORDER BY id LIMIT 1) -RETURNING id, owner, repo, issue_number, title, body, labels, status, - workflow, stage, branch, plan, notes, pr_number, tokens_used, - iterations, attempt, park_reason -``` - -Three operations in one statement: -- **Subquery**: selects the oldest queued task (`ORDER BY id LIMIT 1`). -- **UPDATE**: atomically marks it `running`, increments `attempt`. -- **RETURNING**: returns the full row, scanned by `scanTask()` (line 143). - -### Concurrency Model - -- **Single-process, single-threaded consumers.** SQLite's locking means only one writer at a time. The daemon has a single `Store` backed by a `*sql.DB` with `_pragma=journal_mode(WAL)&_pragma=busy_timeout(5000)` (line 61). In WAL mode, readers do not block writers, but `UPDATE` still acquires a write lock -- so two concurrent `ClaimNext` calls would serialize on the database lock. - -- **No distributed claims.** There is no advisory lock, no `SELECT ... FOR UPDATE`, no external coordination. The claim is just the SQL mutation + the WAL busy_timeout (5s). If two daemon processes somehow connected to the same SQLite file, one would get an error or timeout on concurrent UPDATE -- not a correctness issue, but not a supported deployment. - -- **Crash recovery, not fencing.** Instead of distributed locking, `Startup()` calls `RecoverStale()` on boot (`store.go:235`): `UPDATE tasks SET status='queued' WHERE status='running'`. This re-queues any task that was in-flight when the previous process died. - -- **Single-consumer queue semantics.** `Daemon.Cycle()` at line 92 loops: claim, process, claim, process. There is no parallelism within one daemon instance -- `process()` is synchronous. The `for` returns when the queue is empty (ClaimNext returns nil). - ---- - -## 4. forge.Issue to store.Task Mapping - -### `forge.Issue` at `forge.go:10-15` - -```go -type Issue struct { - Number int - Title string - Body string - Labels []string -} -``` - -A pure value type -- no methods, no identity. It represents one GitHub issue at poll time. - -### `store.Task` at `store.go:30-52` - -```go -type Task struct { - ID int64 // autoincrement PK - Owner string // GitHub owner - Repo string // GitHub repo - IssueNumber int // matches Issue.Number - Title string // matches Issue.Title - Body string // matches Issue.Body - Labels string // comma-separated from Issue.Labels - Status string // lifecycle: queued, running, waiting_human, ... - Workflow string // routed workflow name - Stage string // current stage name - Branch string // worktree branch - Plan string // PRD / implementation plan - Notes string // appended agent notes - PRNumber int // opened PR number - TokensUsed int - Iterations int - Attempt int - ParkReason string - WatchCommentID int64 // human-reply anchor -} -``` - -### Mapping at Enqueue Time - -In `Daemon.poll()` at `daemon.go:112-113`: -```go -inserted, err := d.Store.EnqueueIssue(ctx, - repo.Owner, repo.Name, is.Number, is.Title, is.Body, strings.Join(is.Labels, ",")) -``` - -The forge-side `[]string` labels are joined into a comma-separated string. The FORGE-side structure is flat (Number, Title, Body, Labels) -- it is the STORE that adds status tracking, routing, and operational fields. The `UNIQUE(owner, repo, issue_number)` constraint at `store.go:99` is the idempotency key: re-polling the same issue does not create a duplicate task. - -### Mapping at Enqueue SQL - -`store.go:115-118`: -```sql -INSERT INTO tasks (owner, repo, issue_number, title, body, labels) -VALUES (?, ?, ?, ?, ?, ?) -ON CONFLICT(owner, repo, issue_number) DO NOTHING -``` - -Only 6 of 18 Task fields are set at creation. The remaining fields (status defaults to `'queued'`, workflow/stage/branch etc. default to `''` or `0`) are filled in during the processing lifecycle. - ---- - -## 5. What Changes If ClaimNext Is Replaced with NATS JetStream? - -### Current Architecture -``` -[Ticker] -> Cycle() -> poll() -> [SQLite EnqueueIssue] - -> [SQLite ClaimNext] -> process(task) -> [workflow.Run] -``` -The daemon is a single in-memory loop pulling from SQLite. It is **push-based** from SQLite's perspective (the daemon polls the DB), but effectively **single-consumer** -- no parallelism. - -### Target Architecture with NATS JetStream -``` -[GitHub Webhook] -> [NATS JetStream] -> [Daemon consumes from stream] -``` -or -``` -[Ticker] -> poll() -> [NATS JetStream Publish] - -> [Daemon Subscribe] -> process(task) -``` - -### What Stays the Same - -1. **`foreach`-over-repos polling** (`Daemon.poll()`, `daemon.go:108`). The GitHub API polling logic (`IssuesWithLabel`, `AssignedIssues`) is independent of the task queue -- you still poll GitHub the same way, you just publish the discovered issue to a NATS subject instead of INSERTing into SQLite. - -2. **`workflow.Run()` and the entire workflow engine** (`workflow.go:145-185`, `steps.go`, `agent.go`, `feasibility.go`, `implement.go`, `tdd.go`). The workflow pipeline is agnostic to how tasks arrive -- it receives a `*store.Task` and a `TaskContext`. A NATS consumer would still build the same `TaskContext` and call `workflow.Run()`. - -3. **`workflow.Route()`** (`workflow.go:103`). Label-to-workflow routing remains identical -- it operates on `t.Labels` and `t.Workflow`. - -4. **`forge` interface and `GitHubClient`** (`forge.go`, `github.go`). The forge is only called to interact with GitHub (comment, label, PR, react) -- not as the task queue. No forge change needed. - -5. **`events.Bus` and all `emit()` / `Emit()` calls.** The in-process observability bus is orthogonal to task distribution. NATS JetStream would be the task queue, not the event bus; the two are conceptually separate. - -6. **Crash recovery via `RecoverStale()`** would be replaced by NATS's exactly-once delivery (with consumer sequence tracking) or at-least-once with deduplication. But the principle is the same: the daemon should be restartable without losing work. - -7. **`store.Update()` and `store.Transition()`** for persisting task progress. Even with NATS as the queue, you still want an audit trail of task state. SQLite is fine for that -- it just becomes the state store rather than the queue. - -### What Changes - -**A. `Daemon.Run()` and `Cyc1e()` (`daemon.go:72-106`)** - -Currently `Run()` has a ticker that calls `Cycle()` which does both poll-and-drain. With NATS: -- The poll ticker would still exist but would `Publish()` discovered issues to a NATS subject rather than `EnqueueIssue`. -- The drain loop would be replaced by a NATS subscription callback. The daemon would register a Pull Consumer or a Push Consumer on the stream, and `process()` would be called from the message handler, not from a `ClaimNext()` call. - -Something like: -```go -func (d *Daemon) Run(ctx context.Context) error { - sub, _ := d.JS.PullSubscribe("archie.tasks", ...) - for { - msgs, _ := sub.Fetch(1, ...) - for _, msg := range msgs { - task := deserialize(msg.Data) - d.process(ctx, task) - msg.Ack() - } - } -} -``` - -**B. `Store.ClaimNext()` is removed (`store.go:129`).** - -The atomic SQL `UPDATE ... WHERE id = (SELECT ...)` is the heart of the single-consumer model. With NATS, the message broker provides the claim -- by delivering the message to exactly one consumer in the consumer group (JetStream's built-in `MaxDeliver` / `Ack` / `DeliveryGroup`). The entire function is replaced by `sub.Fetch()` or `sub.Consume()`. - -**C. `Store.EnqueueIssue()` (`store.go:114`) becomes optional.** - -You may or may not persist tasks in SQLite at enqueue time. Options: -- Keep SQLite as the system of record: the NATS subscriber writes a row on receive, then passes `*store.Task` to `process()`. This preserves the dashboard's ability to query task history without replaying the stream. -- Drop SQLite entirely at the queue level: the NATS message body carries the equivalent of `forge.Issue` + routing metadata, and the first workflow stage does the persistence. - -**D. `Daemon.Startup()` crash recovery changes (`daemon.go:52`).** - -`RecoverStale()` (`store.go:234`) re-queues tasks left `running`. With NATS: -- If a consumer crashes mid-process, the message is either `NACK`ed or redelivered after the `AckWait` timeout. No explicit recovery step needed. -- But: if NATS delivers a message and the daemon starts processing (updates task to `running` in SQLite), then crashes, the NATS message might already be `Ack`ed. You still need the crash-recovery query as a safety net, or you redesign to only `Ack` after the workflow completes. -- Best practice: `Ack` *after* `workflow.Run()` returns, and keep `RecoverStale` for the SQLite side. - -**E. Concurrency model changes fundamentally.** - -Currently one daemon processes tasks sequentially (one `ClaimNext` -> `process()` -> next `ClaimNext`). With NATS: -- You can horizontally scale: multiple daemon instances subscribe to the same JetStream consumer group, and NATS round-robins delivery. -- Within one daemon, you can parallelize: call `process()` in a goroutine per message, bounded by a semaphore. Each message has an independent worktree, so parallel workflows on different repos are safe. (Current SQLite model could also parallelize, but the synchronous `Cycle()` design prevents it.) - -**F. Idempotency moves from SQL UNIQUE constraint to JetStream dedup.** - -Currently `EnqueueIssue` uses `ON CONFLICT DO NOTHING` at `store.go:118`. With NATS, you would use JetStream message deduplication (`Nats-Msg-Id` header set to `owner/repo/issue_number`) to prevent re-processing the same issue enqueue. - -**G. Task ordering.** - -Currently FIFO via `ORDER BY id LIMIT 1`. NATS JetStream supports ordered delivery within a stream, but with multiple repos and priorities this may differ. You would need a stream per repo or use a subject hierarchy like `archie.tasks..` to preserve ordering semantics. - -### Summary Table - -| Component | Current (SQLite) | NATS JetStream | -|---|---|---| -| Task queue | `tasks` table, `status='queued'` | JetStream stream | -| Claim | `UPDATE ... WHERE id = (SELECT ...) RETURNING` | `sub.Fetch()` / consumer group | -| Concurrency | Single-process, sequential | Multi-process, parallel via consumer groups | -| Idempotency | `ON CONFLICT DO NOTHING` + `UNIQUE` constraint | `Nats-Msg-Id` dedup | -| Crash recovery | `RecoverStale()` at startup | NAck/redelivery + eventual `RecoverStale` guard | -| Ordering | `ORDER BY id` (FIFO) | Stream ordering per subject | -| Daemon.Run() | `time.Ticker` -> `Cycle()` -> {poll, claim-loop} | `time.Ticker` -> poll() -> publish; sub callback -> process() | -| `Store.ClaimNext()` | **Must remove** | No equivalent needed | -| `Store.EnqueueIssue()` | **Optional** | Still useful as system-of-record | -| Workflow engine | Unchanged | Unchanged | -| Forge interface | Unchanged | Unchanged | -| events.Bus | Unchanged | Unchanged | \ No newline at end of file diff --git a/.scratch/explore-nats-integration.md b/.scratch/explore-nats-integration.md deleted file mode 100644 index f93c9a52d..000000000 --- a/.scratch/explore-nats-integration.md +++ /dev/null @@ -1,189 +0,0 @@ -# nats-integration - -Here is the full analysis. - ---- - -## Report: archie-core Codebase Exploration for NATS Integration - -### 1. Current Go Version and Key Dependencies - -**Go version:** `go 1.26.2` (from `/work/apps/archie-core/go.mod`, line 3) - -**Direct dependencies** (from `/work/apps/archie-core/go.mod`): -- `github.com/BurntSushi/toml v1.6.0` -- TOML config parsing -- `github.com/google/go-github/v78 v78.0.0` -- GitHub API client -- `modernc.org/sqlite v1.54.0` -- pure-Go SQLite (no CGo) -- `github.com/samcharles93/ai-sdk v0.1.17` -- local LLM SDK (replaced to `/work/projects/ai-sdk`) -- `github.com/traefik/yaegi v0.16.1` -- Go interpreter for custom skill/workflow stages - -**Indirect dependencies:** `go-humanize`, `go-querystring`, `uuid`, `go-isatty`, `go-strftime`, `browser`, `bigfft`, `golang.org/x/sys`, `modernc.org/libc/mathutil/memory` - -**Key observation:** The dependency tree is very lean. There are zero messaging, queue, or streaming libraries. No `go.sum` entries match "nats" -- zero NATS transitive dependencies exist. - ---- - -### 2. Full Config Struct (all fields, all structs) - -File: `/work/apps/archie-core/internal/config/config.go` - -``` -Config (205-231) -├── WorkDir string `toml:"work_dir"` -├── DBPath string `toml:"db_path"` -├── PollInterval Duration `toml:"poll_interval"` (custom Duration type, TOML strings like "60s") -├── Label string `toml:"label"` -├── BotUser string `toml:"bot_user"` -├── BotEmail string `toml:"bot_email"` -├── DiffCapLines int `toml:"diff_cap_lines"` -├── Forge Forge `toml:"forge"` -│ ├── Type string `toml:"type"` (default: "github") -│ ├── Host string `toml:"host"` (default: "https://github.com") -│ └── TokenEnv string `toml:"token_env"` (default: "ARCHIE_GITHUB_TOKEN") -├── Dispatch Dispatch `toml:"dispatch"` -│ ├── Trigger string `toml:"trigger"` ("assignee", "label", "either"; default: "assignee") -│ ├── AckReaction string `toml:"ack_reaction"` ("eyes"; "off" disables) -│ └── Labels map[string]string `toml:"labels"` (keys: queued/working/waiting/pr/parked) -├── Models map[string]string `toml:"models"` (role -> model ref, e.g. "triage", "planner", "builder") -├── Providers map[string]Provider `toml:"providers"` -│ ├── Class string `toml:"class"` ("openai", "ollama", etc.) -│ ├── APIKeyEnv string `toml:"api_key_env"` -│ └── BaseURL string `toml:"base_url"` -├── Agent Agent `toml:"agent"` -│ ├── Mode string `toml:"mode"` ("inprocess" or "subprocess") -│ ├── Command string `toml:"command"` (executable path for subprocess mode) -│ └── Env []string `toml:"env"` (extra env vars forwarded to worker) -├── Budgets Budgets `toml:"budgets"` -│ ├── MaxSteps int `toml:"max_steps"` -│ ├── MaxTokens int `toml:"max_tokens"` -│ ├── WallClock Duration `toml:"wall_clock"` -│ └── GateMaxFailures int `toml:"gate_max_failures"` -├── Web Web `toml:"web"` -│ └── Listen string `toml:"listen"` (default: "127.0.0.1:8484"; "off" disables) -├── Notify Notify `toml:"notify"` -│ └── Webhook string `toml:"webhook"` (n8n webhook URL) -└── Repos []Repo `toml:"repos"` - ├── Owner string `toml:"owner"` - ├── Name string `toml:"name"` - ├── Base string `toml:"base"` (branch PRs target; default "main") - ├── Gate [][]string `toml:"gate"` (quality-gate commands) - ├── Protect []string `toml:"protect"` (path suffixes agents cannot write) - ├── Ecosystem string `toml:"ecosystem"` ("go", "python", "node", "rust", "custom") - ├── Preflight [][]string `toml:"preflight"` (override ecosystem default) - └── TestGlob string `toml:"test_glob"` (override ecosystem default) -``` - -The `Config` struct is loaded by `config.Load(path)` which decodes TOML, then applies defaults. The `Load()` function validates: agent mode, provider URLs, dispatch trigger values, dispatch labels, bot_user requirement, repos requirement, forge type (currently only "github"), and test glob patterns. - ---- - -### 3. How the Project is Built/Run Today - -**No Makefile, Taskfile, justfile, Dockerfile, docker-compose, or CI config files exist anywhere in the project.** - -The project is built and run directly with the Go toolchain: - -- **Build:** `go build ./cmd/archied` to build the daemon binary, `go build ./cmd/archie-agent` for the subprocess worker. -- **Run:** `archied -config ~/.config/archie/config.toml` (the `run()` func in `cmd/archied/main.go`). -- **Entry points:** - - `/work/apps/archie-core/cmd/archied/main.go` -- the daemon (orchestrator) - - `/work/apps/archie-core/cmd/archie-agent/main.go` -- standalone worker (used in subprocess mode) -- **Composition root** is `cmd/archied/main.go`. It wires: config loading, forge client creation, SQLite store, event bus, web UI server, LLM runtime, agent runner, worktree manager, workflow registry. -- **Daemon lifecycle:** `Startup()` (recovery, invitation accept, push verify) -> `Run()` (poll loop with ticker) -> each `Cycle()` does: poll issues, reconcile PRs, check waiting tasks, drain queued tasks sequentially. -- **Testing:** standard `go test ./...` -- no bespoke task runner. - ---- - -### 4. Existing NATS or Messaging Patterns - -**NATS: None whatsoever.** Zero references in Go source, zero in go.sum, zero in any config. - -**Existing messaging system -- in-process event bus** (`/work/apps/archie-core/internal/events/events.go`): - -This is a lightweight in-process pub/sub bus designed for observability. Key design: -- Single `Event` type carries all observability data (timestamps, kind strings, task IDs, freeform `Data map[string]any`) -- Mutex-based fan-out with bounded per-subscriber channels -- **Drops on overflow** -- a stalled dashboard client cannot backpressure the task engine -- Subscribers register via `bus.Subscribe(buffer int)` which returns a `*Sub` with a read-only `C <-chan Event` -- Event kinds: `task_queued`, `stage_start`, `stage_finish`, `agent_finish`, `parked`, `outcome`, `pr_merged`, `pr_rejected`, `log` - -**How it is used** (from `cmd/archied/main.go` lines 86-107): -1. A `bus := events.NewBus()` is created in `main()` -2. A store-sink subscriber consumes all events, writes them to SQLite, then broadcasts to the web UI -3. The `webui.Server.Broadcast()` fans events to SSE clients -4. The `daemon.Daemon` has a `Bus *events.Bus` field used in `emit()` calls throughout task lifecycle - -**Current architecture is single-process:** The daemon polls GitHub issues, processes them sequentially in-process (or via subprocess `archie-agent`), and all state lives in SQLite. There is no multi-worker, no job queue, no cross-process communication beyond the subprocess protocol in `internal/agentexec/`. - ---- - -### 5. Recommended `[nats]` Config Block - -Following the existing TOML conventions (see `/work/apps/archie-core/config.example.toml` and the `config.go` struct patterns), a `[nats]` block should: - -- Match the two-level key style (e.g., `[forge]`, `[dispatch]`, `[web]`) -- Use lowercase with underscores for field names -- Support a `"off"` / empty-string sentinel for optional features -- Be a new struct on the `Config` type, not nested under any existing section - -Based on the existing patterns, the convention-compliant config block would look like: - -```toml -# NATS JetStream configuration for distributed task queue. -# Remove or comment out these sections to run in single-process mode. -[nats] -url = "nats://localhost:4222" # NATS server URL -# token = "$NATS_TOKEN" # or user/password for auth (use env var) -# user = "archie" -# password_env = "NATS_PASSWORD" - -[nats.tls] # optional TLS section as a sub-table -# cert = "/path/to/cert.pem" -# key = "/path/to/key.pem" -# ca = "/path/to/ca.pem" - -[nats.jetstream] # JetStream-specific options -# stream = "archie-tasks" # stream name (default: auto-created) -# bucket = "archie-state" # KV bucket for task state (optional) -# replicas = 3 # stream replication factor -# max_deliver = 10 # max delivery attempts for a message -# ack_wait = "5m" # ack wait timeout -``` - -In Go, this would map to a struct like: - -```go -type NATS struct { - URL string `toml:"url"` - Token string `toml:"token"` - User string `toml:"user"` - PasswordEnv string `toml:"password_env"` - TLS *NATSTLS `toml:"tls,omitempty"` - JetStream *JetStream `toml:"jetstream,omitempty"` -} - -type NATSTLS struct { - Cert string `toml:"cert"` - Key string `toml:"key"` - CA string `toml:"ca"` -} - -type JetStream struct { - Stream string `toml:"stream"` - Bucket string `toml:"bucket"` - Replicas int `toml:"replicas"` - MaxDeliver int `toml:"max_deliver"` - AckWait Duration `toml:"ack_wait"` -} -``` - -And on `Config`: -```go -NATS *NATS `toml:"nats,omitempty"` // nil = no NATS, single-process mode -``` - -Key style considerations: -- Existing config uses `password_env` pattern (see `token_env`, `api_key_env`) for secrets that come from environment variables -- The `Duration` type is already available for timer fields like `ack_wait` -- Using a pointer (`*NATS`) keeps the "nil means not configured" semantics, consistent with the daemon's fallback to single-process operation -- The `[nats.tls]` sub-table pattern mirrors how `[dispatch.labels]` is a sub-table under `[dispatch]` \ No newline at end of file diff --git a/.scratch/plan-nats-design.md b/.scratch/plan-nats-design.md deleted file mode 100644 index ccdb1c8c4..000000000 --- a/.scratch/plan-nats-design.md +++ /dev/null @@ -1,707 +0,0 @@ -# nats-design - -I now have a thorough understanding of the entire codebase. Let me compile my implementation plan. - ---- - -## Implementation Plan: Phase 1 -- NATS Task Distribution for archie-core - -### Overview - -This phase adds optional NATS JetStream-based task distribution to `archied`. When the `[nats]` config block is present, newly discovered issues are published to NATS subjects rather than enqueued directly into SQLite. A pull consumer in the same daemon process receives those messages, stores them in SQLite (idempotent dedup via `ON CONFLICT DO NOTHING`), claims them, and runs the workflow. When NATS is absent, the existing SQLite-only flow (ClaimNext) continues unchanged. - ---- - -### Step 1: Add NATS Go Dependency - -**File(s):** `/work/apps/archie-core/go.mod`, `/work/apps/archie-core/go.sum` - -**Changes:** -- Add `github.com/nats-io/nats.go v1.42.0` (or latest stable) to `require` block -- The JetStream API is now embedded in `nats.go` (no separate `nats.go/jetstream` module since v1.33+), so only one dependency line is needed -- Run `go mod tidy` to resolve transitive deps - -**Connection to existing code:** This is the only new external dependency. The current module has only `BurntSushi/toml`, `google/go-github`, `modernc.org/sqlite`, `ai-sdk`, and `traefik/yaegi`. - -**Test/verification:** `go build ./...` succeeds. `go mod tidy` is clean. - ---- - -### Step 2: Add `[nats]` Config Section - -**File(s):** `/work/apps/archie-core/internal/config/config.go`, `/work/apps/archie-core/internal/config/config_test.go`, `/work/apps/archie-core/config.example.toml` - -**New type in `config.go`:** -```go -// NATSConfig configures NATS JetStream for task distribution. When URL is -// empty the existing SQLite ClaimNext flow is used. -type NATSConfig struct { - // URL is the NATS server address, e.g. "nats://localhost:4222". - // Empty means NATS is not configured. - URL string `toml:"url"` - // TokenEnv optionally names an env var holding a NATS auth token/password. - // When empty, no authentication is attempted. - TokenEnv string `toml:"token_env"` -} -``` - -**New field in `Config` struct:** -```go -type Config struct { - // ... all existing fields ... - NATS NATSConfig `toml:"nats"` -} -``` - -**Validation in `Load()`:** No new validation errors needed. `cfg.NATS.URL == ""` is the disabled state. If `TokenEnv` is set but `URL` is empty, log a warning at startup (not a config error -- the token field is simply unused). - -**Default behavior:** When the TOML has no `[nats]` block, `cfg.NATS.URL` remains `""` and NATS is not used. This is the nil-means-disabled semantics. - -**Test in `config_test.go`:** Add `TestNATSDefaults` -- verify that (a) a config without `[nats]` has empty URL, (b) a config with `[nats]` but empty URL loads fine, (c) a config with a NATS URL parses correctly. Add to existing `TestExampleConfigLoads` so the example config stays valid. - -**Config example in `config.example.toml`:** -```toml -[nats] -# url = "nats://localhost:4222" -``` - ---- - -### Step 3: Create `internal/nats` Package - -**File(s) to create:** `/work/apps/archie-core/internal/nats/client.go`, `/work/apps/archie-core/internal/nats/client_test.go`, `/work/apps/archie-core/internal/nats/subjects.go` - -#### 3a. Subject Constants (`subjects.go`) - -```go -package nats - -import "strings" - -// Task subject constants. The subject encodes the workflow type so that -// future horizontal scaling can route tasks to workflow-specific consumers. -const ( - SubjectTaskBug = "archie.task.bug" - SubjectTaskFeature = "archie.task.feature" - SubjectTaskDefault = "archie.task.default" - SubjectTaskBootstrap = "archie.task.bootstrap" -) - -// SubjectForLabels picks the NATS subject based on issue labels, following -// the same label-to-workflow mapping as workflow.Route. -// - "bug" -> archie.task.bug -// - "feature" -> archie.task.feature -// - "bootstrap" -> archie.task.bootstrap -// - default -> archie.task.default -func SubjectForLabels(labels []string) string { - for _, l := range labels { - switch strings.TrimSpace(l) { - case "bug": - return SubjectTaskBug - case "feature": - return SubjectTaskFeature - case "bootstrap": - return SubjectTaskBootstrap - } - } - return SubjectTaskDefault -} -``` - -**Tests:** Verify subject routing: `SubjectForLabels([]string{"bug"})` returns `SubjectTaskBug`; `SubjectForLabels([]string{"feature"})` returns `SubjectTaskFeature`; `SubjectForLabels([]string{"enhancement"})` returns `SubjectTaskDefault`; `SubjectForLabels([]string{"bug", "feature"})` returns `SubjectTaskBug` (first match wins, matching workflow.Route behavior). - -#### 3b. Client (`client.go`) - -```go -package nats - -import ( - "context" - "encoding/json" - "fmt" - "log/slog" - "time" - - "github.com/nats-io/nats.go" - "github.com/nats-io/nats.go/jetstream" -) - -const ( - streamName = "ARCHIE_TASKS" - consumerName = "archie-daemon" - msgPrefix = "archie:" // for Msg-Id dedup - dedupWindow = 2 * time.Minute - pollTimeout = 2 * time.Second // Fetch wait time before returning nil - maxFetchCount = 1 -) - -// TaskMessage is the NATS payload for a discovered issue. -type TaskMessage struct { - Owner string `json:"owner"` - Repo string `json:"repo"` - Number int `json:"number"` - Title string `json:"title"` - Body string `json:"body"` - Labels string `json:"labels"` // comma-separated, as seen at enqueue time -} - -// Client manages the NATS connection and JetStream resources. -type Client struct { - conn *nats.Conn - js jetstream.JetStream - stream jetstream.Stream - consumer jetstream.Consumer - log *slog.Logger -} - -// Connect dials url, sets up the JetStream stream and pull consumer. -// The stream is created with WorkQueue retention (message removed after ack), -// file storage, and the subject pattern archie.task.>. -func Connect(ctx context.Context, url string, log *slog.Logger) (*Client, error) { - nc, err := nats.Connect(url) - if err != nil { - return nil, fmt.Errorf("nats connect: %w", err) - } - js, err := jetstream.New(nc) - if err != nil { - nc.Close() - return nil, fmt.Errorf("nats jetstream: %w", err) - } - - // Create or update stream - stream, err := js.CreateOrUpdateStream(ctx, jetstream.StreamConfig{ - Name: streamName, - Subjects: []string{"archie.task.>"}, - Storage: jetstream.FileStorage, - Retention: jetstream.WorkQueuePolicy, - MaxMsgsPerSubject: 1, // at most one message per subject per task - Duplicates: dedupWindow, - }) - if err != nil { - nc.Close() - return nil, fmt.Errorf("nats stream: %w", err) - } - - // Create or update pull consumer - consumer, err := stream.CreateOrUpdateConsumer(ctx, jetstream.ConsumerConfig{ - Name: consumerName, - Durable: consumerName, - FilterSubject: "archie.task.>", - AckPolicy: jetstream.AckExplicitPolicy, - MaxDeliver: 3, // retry 3 times before parking - AckWait: 5 * time.Minute, // ack within 5 mins of Fetch - InactiveThreshold: 24 * time.Hour, - }) - if err != nil { - nc.Close() - return nil, fmt.Errorf("nats consumer: %w", err) - } - - return &Client{conn: nc, js: js, stream: stream, consumer: consumer, log: log}, nil -} - -// Close drains and closes the NATS connection. -func (c *Client) Close() { c.conn.Close() } - -// PublishTask publishes a discovered issue to the appropriate NATS subject. -// The Msg-Id header enables JetStream dedup within the dedup window. -// Returns nil on success. -func (c *Client) PublishTask(ctx context.Context, owner, repo string, number int, title, body, labels string) error { - msg := TaskMessage{ - Owner: owner, - Repo: repo, - Number: number, - Title: title, - Body: body, - Labels: labels, - } - data, err := json.Marshal(msg) - if err != nil { - return err - } - - subject := SubjectForLabels(splitLabels(labels)) - headers := nats.Header{} - msgID := fmt.Sprintf("%s%s/%s/%d", msgPrefix, owner, repo, number) - headers.Set("Nats-Msg-Id", msgID) - - publish, err := c.js.PublishMsg(ctx, &nats.Msg{ - Subject: subject, - Data: data, - Header: headers, - }) - if err != nil { - return fmt.Errorf("nats publish: %w", err) - } - if publish == nil || publish.Sequence == 0 { - // Duplicate suppressed by Msg-Id dedup window - return nil - } - return nil -} - -// Fetch retrieves one task message from the pull consumer. Returns the -// message, or nil if the context is cancelled or the fetch times out. -// The caller MUST Ack or Nak the message after processing. -func (c *Client) Fetch(ctx context.Context) (jetstream.Msg, error) { - msgs, err := c.consumer.Fetch(maxFetchCount, jetstream.FetchMaxWait(pollTimeout)) - if err != nil { - return nil, fmt.Errorf("nats fetch: %w", err) - } - for msg := range msgs.Messages() { - if msg == nil { - continue - } - if err := msgs.Error(); err != nil { - return nil, fmt.Errorf("nats fetch error: %w", err) - } - return msg, nil - } - return nil, nil // no message available -} - -// DecodeTask decodes a TaskMessage from a NATS message. -func DecodeTask(msg jetstream.Msg) (TaskMessage, error) { - var tm TaskMessage - if err := json.Unmarshal(msg.Data(), &tm); err != nil { - return tm, fmt.Errorf("nats decode: %w", err) - } - return tm, nil -} - -func splitLabels(labels string) []string { - if labels == "" { - return nil - } - return strings.Split(labels, ",") -} -``` - -**Key design decisions in this struct:** -- `DedupWindow: 2 minutes` -- matching the typical poll interval. A restarted daemon within 2 minutes won't get dupes. -- `MaxDeliver: 3` -- retries before a message is placed on the NA pile (NATS moves it to a dead-letter state internally). -- `AckWait: 5 minutes` -- generous for long-running workflows. -- `WorkQueuePolicy` -- message removed from stream after ack. -- `FilterSubject: "archie.task.>"` -- consumer receives all task subjects. - -**Tests for `client_test.go`:** - -The test needs an embedded NATS server. Use `nats-server` binary or the `github.com/nats-io/nats-server/v2/server` package in test mode. - -```go -func TestConnectAndPublish(t *testing.T) { - // Start embedded NATS server on random port - srv := startEmbeddedNATSServer(t) - defer srv.Shutdown() - - url := fmt.Sprintf("nats://localhost:%d", srv.Port()) - client, err := Connect(context.Background(), url, slog.New(slog.DiscardHandler)) - if err != nil { - t.Fatal(err) - } - defer client.Close() - - // Publish a task - if err := client.PublishTask(ctx, "sam", "todo", 1, "fix bug", "body", "bug"); err != nil { - t.Fatal(err) - } - - // Fetch it back - msg, err := client.Fetch(ctx) - if err != nil { - t.Fatal(err) - } - if msg == nil { - t.Fatal("expected a message") - } - - tm, err := DecodeTask(msg) - if err != nil { - t.Fatal(err) - } - if tm.Owner != "sam" || tm.Number != 1 { - t.Fatalf("unexpected task: %+v", tm) - } - msg.Ack() -} - -func TestDedup(t *testing.T) { - // Publish same task twice; second publish should be deduped - // Verify by checking PublishTask returns no error both times - // and only one message is consumable -} -``` - ---- - -### Step 4: Add `ClaimByIssue` to Store - -**File(s):** `/work/apps/archie-core/internal/store/store.go`, `/work/apps/archie-core/internal/store/store_test.go` - -**Changes to `store.go`:** - -Add a new method that atomically claims a task by its issue identity rather than the oldest-queued: - -```go -// ClaimByIssue atomically claims a queued task by owner/repo/issue_number. -// Returns nil if the task is not in queued state (already claimed, parked, -// or completed). This is used by the NATS consumer path where the task -// was just inserted via EnqueueIssue and needs to be claimed immediately. -func (s *Store) ClaimByIssue(ctx context.Context, owner, repo string, number int) (*Task, error) { - row := s.db.QueryRowContext(ctx, ` - UPDATE tasks SET status='running', attempt=attempt+1, updated_at=datetime('now') - WHERE owner=? AND repo=? AND issue_number=? AND status='queued' - RETURNING id, owner, repo, issue_number, title, body, labels, status, - workflow, stage, branch, plan, notes, pr_number, tokens_used, - iterations, attempt, park_reason`, owner, repo, number) - t, err := scanTask(row) - if errors.Is(err, sql.ErrNoRows) { - return nil, nil - } - return t, err -} -``` - -**Why a new method instead of reusing ClaimNext?** Because ClaimNext claims the *oldest* `queued` row. When multiple tasks are in the queue (e.g., after a daemon restart), claiming the one we just inserted is not guaranteed. ClaimByIssue targets the exact row. - -**Test in `store_test.go`:** - -Add `TestClaimByIssue`: -```go -func TestClaimByIssue(t *testing.T) { - s := openTest(t) - ctx := context.Background() - - // Enqueue two tasks - s.EnqueueIssue(ctx, "sam", "todo", 1, "t1", "", "bug") - s.EnqueueIssue(ctx, "sam", "todo", 2, "t2", "", "feature") - - // Claim task 2 by issue (not the oldest) - task, err := s.ClaimByIssue(ctx, "sam", "todo", 2) - if err != nil || task == nil { - t.Fatalf("ClaimByIssue = (%v, %v)", task, err) - } - if task.IssueNumber != 2 || task.Status != StatusRunning { - t.Fatalf("unexpected task: %+v", task) - } - - // Claiming the same issue again should return nil - task2, err := s.ClaimByIssue(ctx, "sam", "todo", 2) - if err != nil || task2 != nil { - t.Fatalf("second claim must return nil, got (%v, %v)", task2, err) - } - - // ClaimNext should now pick up task 1 (still queued) - task3, _ := s.ClaimNext(ctx) - if task3 == nil || task3.IssueNumber != 1 { - t.Fatalf("expected task 1, got %+v", task3) - } -} -``` - ---- - -### Step 5: Modify Daemon to Support NATS - -**File(s):** `/work/apps/archie-core/internal/daemon/daemon.go`, `/work/apps/archie-core/internal/daemon/daemon_test.go` - -#### 5a. Add NATS Field to Daemon - -```go -import ( - // ... existing imports ... - "github.com/samcharles93/archie-core/internal/nats" -) - -type Daemon struct { - // ... all existing fields ... - Nats *nats.Client // nil means NATS not configured; use SQLite path -} -``` - -#### 5b. Modify `poll()` for NATS Publish Path - -The `poll()` method needs a branch for NATS. When `d.Nats != nil`, publish to NATS instead of calling `Store.EnqueueIssue`. The ack reaction, state label setting, and event emission remain the same -- they reflect discovery, not storage. - -Refactored `poll()`: -```go -func (d *Daemon) poll(ctx context.Context) { - for _, repo := range d.Cfg.Repos { - issues := d.pollIssues(ctx, repo) - for _, is := range issues { - inserted := d.tryPublish(ctx, repo, is) - if !inserted { - d.maybeRetryParked(ctx, repo, is) - continue - } - d.Log.Info("issue queued", "repo", repo.FullName(), "issue", is.Number, "title", is.Title) - if ack := d.Cfg.Dispatch.AckReaction; ack != "" { - if err := d.Forge.React(ctx, repo.Owner, repo.Name, is.Number, ack); err != nil { - d.Log.Warn("ack reaction failed", "issue", is.Number, "err", err) - } - } - d.Forge.SetStateLabel(ctx, repo.Owner, repo.Name, is.Number, d.Cfg.Dispatch.StateLabel("queued"), d.Cfg.Dispatch.LabelValues()) - d.emit(events.Event{ - Kind: events.KindTaskQueued, Repo: repo.FullName(), - Issue: is.Number, Detail: is.Title, - }) - } - } -} - -// tryPublish returns true if this issue was accepted (either enqueued in SQLite -// or published to NATS) for the first time. False means it was already tracked. -func (d *Daemon) tryPublish(ctx context.Context, repo config.Repo, is forge.Issue) bool { - labels := strings.Join(is.Labels, ",") - - if d.Nats != nil { - // When NATS is configured, we must check if the issue is already known - // before publishing -- we still need maybeRetryParked to work. The - // NATS Msg-Id dedup prevents duplicate messages but we want to detect - // the "already tracked" case here to allow retry-parked detection. - existing, err := d.Store.TaskByIssue(ctx, repo.Owner, repo.Name, is.Number) - if err != nil { - d.Log.Error("check existing failed", "repo", repo.FullName(), "issue", is.Number, "err", err) - return false - } - if existing != nil { - return false // already tracked - } - - if err := d.Nats.PublishTask(ctx, repo.Owner, repo.Name, is.Number, is.Title, is.Body, labels); err != nil { - d.Log.Error("nats publish failed", "repo", repo.FullName(), "issue", is.Number, "err", err) - return false - } - return true - } - - // SQLite path (unchanged logic, extracted for clarity) - inserted, err := d.Store.EnqueueIssue(ctx, - repo.Owner, repo.Name, is.Number, is.Title, is.Body, labels) - if err != nil { - d.Log.Error("enqueue failed", "repo", repo.FullName(), "issue", is.Number, "err", err) - return false - } - return inserted -} -``` - -Note: For the NATS path, we call `Store.TaskByIssue` first. This is a read-only check that only reads, never writes. The actual storage happens in the NATS consumer. This preserves the `maybeRetryParked` behavior. - -#### 5c. Modify `Cycle()` for NATS Consumer - -```go -func (d *Daemon) Cycle(ctx context.Context) { - d.poll(ctx) - d.reconcilePRs(ctx) - d.checkWaiting(ctx) - if d.Nats != nil { - d.drainNATS(ctx) - } else { - d.drainSQLite(ctx) - } -} - -// drainSQLite processes queued tasks from SQLite (existing behavior). -func (d *Daemon) drainSQLite(ctx context.Context) { - for { - task, err := d.Store.ClaimNext(ctx) - if err != nil { - d.Log.Error("claim failed", "err", err) - return - } - if task == nil { - return - } - d.process(ctx, task) - } -} - -// drainNATS processes tasks from NATS, falling back to SQLite for -// requeued tasks (waiting_human, retry-parked). -func (d *Daemon) drainNATS(ctx context.Context) { - for { - // Try NATS first - msg, err := d.Nats.Fetch(ctx) - if err != nil { - d.Log.Error("nats fetch failed", "err", err) - return - } - if msg != nil { - d.processNATSTask(ctx, msg) - // After processing, try again immediately - continue - } - - // Fall back to SQLite for requeued tasks that came via direct - // calls to Store.Requeue (waiting_human approval, retry-parked). - task, err := d.Store.ClaimNext(ctx) - if err != nil { - d.Log.Error("sqlite claim failed", "err", err) - return - } - if task == nil { - return - } - d.process(ctx, task) - } -} -``` - -**Important:** The dual-drain approach means newly discovered tasks come through NATS and requeued tasks (waiting_human approval, retry-parked) come through SQLite ClaimNext. This is clean and avoids needing to publish NATS messages for every requeue. - -#### 5d. Add `processNATSTask` - -```go -func (d *Daemon) processNATSTask(ctx context.Context, msg jetstream.Msg) { - // Decode - tm, err := nats.DecodeTask(msg) - if err != nil { - d.Log.Error("nats decode failed", "err", err) - msg.Ack() // bad message, don't retry - return - } - - // Store in SQLite (idempotent — ON CONFLICT DO NOTHING) - inserted, err := d.Store.EnqueueIssue(ctx, tm.Owner, tm.Repo, tm.Number, tm.Title, tm.Body, tm.Labels) - if err != nil { - d.Log.Error("nats enqueue failed", "err", err) - msg.Nak() - return - } - - // Claim the task by identity - task, err := d.Store.ClaimByIssue(ctx, tm.Owner, tm.Repo, tm.Number) - if err != nil { - d.Log.Error("nats claim failed", "err", err) - msg.Nak() - return - } - if task == nil { - // Task already claimed by another consumer (multi-daemon scenario) - // or in a terminal state. Ack and move on. - msg.Ack() - return - } - - // Process (this sets labels, runs workflow, records outcome) - d.process(ctx, task) - - // Ack after processing completes. - // If the daemon crashes before ack, the NATS message is redelivered. - // EnqueueIssue's idempotency + ClaimByIssue's nil-on-not-queued guard - // prevents double-processing. - msg.Ack() -} -``` - ---- - -### Step 6: Wire NATS in `cmd/archied/main.go` - -**File(s):** `/work/apps/archie-core/cmd/archied/main.go` - -**Changes:** - -Add import for the nats package: -```go -"github.com/samcharles93/archie-core/internal/nats" -``` - -Between store opening and daemon construction, add: -```go -// NATS client (optional) -var natsClient *nats.Client -if cfg.NATS.URL != "" { - natsClient, err = nats.Connect(ctx, cfg.NATS.URL, log) - if err != nil { - log.Error("nats connect failed", "err", err) - return 1 - } - defer natsClient.Close() - log.Info("nats connected", "url", cfg.NATS.URL) -} -``` - -Add to Daemon construction: -```go -d := &daemon.Daemon{ - // ... all existing fields ... - Nats: natsClient, -} -``` - -The `--once` flag path should still work: `d.Cycle(ctx)` handles both NATS and SQLite paths. When NATS is configured and `--once` is used, the Cycle does poll + drainNATS once. Since Fetch has a 2-second timeout, `drainNATS` will return after the timeout if no message is available, which is fine for the one-shot case. - ---- - -### Step 7: Integration Verification - -**Approach:** Manual end-to-end test with a local NATS server. - -1. Start `nats-server` locally (or via Docker: `docker run -p 4222:4222 nats`) -2. Create a `config.toml` with: - ```toml - bot_user = "test-bot" - [nats] - url = "nats://localhost:4222" - # ... other required fields - ``` -3. Run `archied --once` -4. Verify: - - `nats pub` / `nats sub` shows the task subject messages - - NATS JetStream stream `ARCHIE_TASKS` exists (`nats stream list`) - - The task appears in SQLite after the consumer processes it - - Workflow completes normally - -**Automated integration test (future, not Phase 1):** A test that starts an embedded NATS server, creates a daemon with NATS configured, simulates an issue poll, and verifies the full cycle. Phase 1 keeps tests at the unit level. - ---- - -### Summary of All Changes - -| Step | File | Change | -|------|------|--------| -| 1 | `go.mod`, `go.sum` | Add `github.com/nats-io/nats.go` | -| 2 | `internal/config/config.go` | Add `NATSConfig` struct, `NATS` field to `Config` | -| 2 | `internal/config/config_test.go` | Test NATS config loading | -| 2 | `config.example.toml` | Add commented-out `[nats]` block | -| 3a | `internal/nats/subjects.go` | Subject constants + `SubjectForLabels` | -| 3b | `internal/nats/client.go` | `Client` struct, `Connect`, `Close`, `PublishTask`, `Fetch`, `DecodeTask` | -| 3b | `internal/nats/client_test.go` | Unit tests with embedded NATS server | -| 4 | `internal/store/store.go` | Add `ClaimByIssue` method | -| 4 | `internal/store/store_test.go` | Test `ClaimByIssue` | -| 5 | `internal/daemon/daemon.go` | Add `Nats` field, refactor `poll()`, add `drainNATS`/`drainSQLite`/`processNATSTask`, modify `Cycle()` | -| 5 | `internal/daemon/daemon_test.go` | No changes needed for Phase 1 (existing tests unchanged) | -| 6 | `cmd/archied/main.go` | Wire `nats.Connect`, pass client to Daemon | - -### Design Decisions and Rationale - -1. **Dual inner loop (NATS then SQLite) for Phase 1.** Rather than modifying `Requeue` to also publish NATS messages, the NATS drain falls back to ClaimNext for requeued tasks. Simple, works, and the fallback disappears in a later phase when requeue itself publishes NATS messages. - -2. **Msg-Id dedup instead of SQL UNIQUE for NATS path.** The existing `EnqueueIssue` with `ON CONFLICT DO NOTHING` is the idempotency mechanism in the consumer. The NATS Msg-Id dedup is a first-line defense to avoid storing duplicate messages at all. Together they form a robust dedup chain. - -3. **Workflow subject routing duplicates `Route()` logic.** The `SubjectForLabels` function mirrors `workflow.Route`'s label-to-workflow mapping. This is intentional -- the subject encodes the workflow type so future multi-daemon setups can filter by subject. The duplication is minimal (one small function) and is kept in the `nats` package to avoid a dependency on the `workflow` package. - -4. **`ClaimByIssue` is a targeted query, not a general claim.** It only claims a task by the exact owner/repo/number triple and only when it's in `queued` status. This is safe for the NATS consumer where we just inserted the task. It also works as a lock: two consumers racing on the same message will see one succeed and one get nil. - -5. **Three retries, 5-minute ack wait.** NATS JetStream redelivers unacked messages. With `MaxDeliver: 3`, a failing task is retried twice after the first attempt. After 3 failures, the message goes to the NA pile (JetStream's internal dead state for work queues). This is a safety net, not a permanent error -- eventually the operator checks the NATS dead-letter state or we add a dedicated handler. - -6. **Ack after `process()` completes, even on error.** If the workflow parks the task, that's a successful outcome from the task distribution perspective -- the message is acked and removed from the stream. Only daemon crashes leave the message unacked. - -### Potential Challenges - -1. **Embedded NATS server for tests.** Go tests that need a real NATS server typically use `github.com/nats-io/nats-server/v2/server` embedded mode. This adds a test-only dependency. Alternative: use a `nats-server` binary in CI. For Phase 1, the test file should use an embedded server and note it in the build tag if the binary isn't available. - -2. **`drainNATS` blocks on Fetch.** `Fetch` has a 2-second poll timeout before returning nil. When the queue is empty, the NATS drain exits (returns nil) and the Cycle ends, which is correct. The ticker in `Run()` creates a new Cycle on the next tick, so empty-queue idle detection is fine. - -3. **`SubjectForLabels` vs `Route()` divergence risk.** If someone adds a new label-to-workflow mapping in `Route()`, they need to update `SubjectForLabels` too. Mitigation: keep both functions small, add a comment referencing the other, and add a cross-package test that verifies they stay in sync on the known label set. - ---- - -### Critical Files for Implementation -- `/work/apps/archie-core/internal/daemon/daemon.go` — Core changes: poll branching, Cycle splitting, NATS consumer logic, new helper methods -- `/work/apps/archie-core/internal/config/config.go` — Add NATSConfig struct and NATS field to Config -- `/work/apps/archie-core/internal/nats/client.go` — New package: NATS connection management, publish, consume, JetStream setup -- `/work/apps/archie-core/internal/store/store.go` — Add ClaimByIssue for targeted task claiming -- `/work/apps/archie-core/cmd/archied/main.go` — Wire NATS client startup and inject into Daemon \ No newline at end of file diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 7af8e9d7e..5e62cd841 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -1,25 +1,27 @@ # archie-core Architecture -**archied** is a resident daemon that polls GitHub for issues labelled `archie`, works each one in an isolated worktree through a routed workflow, and opens pull requests for human review. +**archied** is a resident daemon that polls GitHub for issues labelled `archie`, +works each one in an isolated worktree through a routed workflow, and opens pull +requests for human review. ## Package Map -| Package | Role | -|---|---| -| `cmd/archied/` | Binary entry: config→forge→store→runtime→workflows→daemon | -| `cmd/archie-agent/` | One-invocation autonomous stage worker (JSON stdin/stdout) | -| `internal/config/` | TOML config, per-repo gates, budgets, providers, ecosystems | -| `internal/daemon/` | Resident loop: poll, enqueue, claim, route, process, reconcile | -| `internal/workflow/` | Engine: stage lists, routing, shared steps, workflow definitions | +| Package | Role | +| --------------------- | ------------------------------------------------------------------------- | +| `cmd/archied/` | Binary entry: config→forge→store→runtime→workflows→daemon | +| `cmd/archie-agent/` | One-invocation autonomous stage worker (JSON stdin/stdout) | +| `internal/config/` | TOML config, per-repo gates, budgets, providers, ecosystems | +| `internal/daemon/` | Resident loop: poll, enqueue, claim, route, process, reconcile | +| `internal/workflow/` | Engine: stage lists, routing, shared steps, workflow definitions | | `internal/agentexec/` | Versioned agent-stage protocol, worker, and in-process/subprocess runners | -| `internal/forge/` | GitHub interface: issues, labels, PRs, comments, reactions | -| `internal/worktree/` | Git operations: clone, branch, commit, push, diff, cleanup | -| `internal/store/` | SQLite: task rows, status transitions, crash recovery | -| `internal/events/` | In-process event bus: publish/subscribe for observability | -| `internal/webui/` | SSE dashboard: live event stream, task status | -| `ai-sdk/runtime` | External: provider-agnostic LLM runtime | -| `ai-sdk/agentloop` | External: gated agent loop with budgets and tool jails | -| `ai-sdk/core` | External: tool definitions, generate options | +| `internal/forge/` | GitHub interface: issues, labels, PRs, comments, reactions | +| `internal/worktree/` | Git operations: clone, branch, commit, push, diff, cleanup | +| `internal/store/` | SQLite: task rows, status transitions, crash recovery | +| `internal/events/` | In-process event bus: publish/subscribe for observability | +| `internal/webui/` | SSE dashboard: live event stream, task status | +| `ai-sdk/runtime` | External: provider-agnostic LLM runtime | +| `ai-sdk/agentloop` | External: gated agent loop with budgets and tool jails | +| `ai-sdk/core` | External: tool definitions, generate options | ## Task Lifecycle @@ -31,9 +33,11 @@ queued → running(workflow:stage) → pr_open → merged | rejected parked ``` -**Crash recovery:** tasks left in `running` are re-queued on startup. Parks are never silent -- every park posts a comment with the reason and gate output. +**Crash recovery:** tasks left in `running` are re-queued on startup. Parks are +never silent -- every park posts a comment with the reason and gate output. -**PR reconciliation:** the daemon polls open PRs, checks GitHub state (`merged`/`closed`), transitions the task, and cleans up worktrees. +**PR reconciliation:** the daemon polls open PRs, checks GitHub state +(`merged`/`closed`), transitions the task, and cleans up worktrees. ## Workflow Engine @@ -41,13 +45,16 @@ queued → running(workflow:stage) → pr_open → merged | rejected - `Workflow` = named list of `Stage`s - `Stage` = `Name` + `Run(ctx, *TaskContext) error` -- `TaskContext` = mutable bag: Task, Repo, Config, Forge, Store, Agent runner, worktree dir/branch, scratch fields -- `Outcome` = terminal decision (status + detail) -- ends the workflow immediately +- `TaskContext` = mutable bag: Task, Repo, Config, Forge, Store, Agent runner, + worktree dir/branch, scratch fields +- `Outcome` = terminal decision (status + detail) -- ends the workflow + immediately - `Registry` = `map[string]Workflow` ### Routing (`Route`) Label-driven, no LLM involved. Pre-assigned workflow wins; then labels decide: + - `bug` → `tdd` - `feature` → `feasibility` - `bootstrap` → `bootstrap` (diagnostics, no LLM spend) @@ -56,12 +63,14 @@ Label-driven, no LLM involved. Pre-assigned workflow wins; then labels decide: ### Execution (`Run`) Stages execute sequentially. After each stage: + - Task is persisted to SQLite - Error → park the task (comment on issue, keep worktree) - Outcome set → finish (transition task, update labels) - Neither → continue to next stage -A workflow that ends without an outcome parks -- definition bugs must not vanish silently. +A workflow that ends without an outcome parks -- definition bugs must not vanish +silently. ## Workflows @@ -71,7 +80,8 @@ A workflow that ends without an outcome parks -- definition bugs must not vani prepare → apply(marker file) → commit-push → diff-cap → open-pr ``` -Proves the plumbing: clone, push, PR. Label any test issue `bootstrap` to verify end-to-end. +Proves the plumbing: clone, push, PR. Label any test issue `bootstrap` to verify +end-to-end. ### Implement (default) @@ -79,9 +89,12 @@ Proves the plumbing: clone, push, PR. Label any test issue `bootstrap` to verify prepare → baseline-gate → plan(planner, read-only) → build(builder, gated) → commit-push → diff-cap → open-pr ``` -- **baseline-gate:** runs the repo's gate at the base commit before anything is touched -- **plan:** read-only agent explores codebase, produces implementation plan, posts it as a comment -- **build:** full toolset agent implements against the plan behind the repo's quality gate +- **baseline-gate:** runs the repo's gate at the base commit before anything is + touched +- **plan:** read-only agent explores codebase, produces implementation plan, + posts it as a comment +- **build:** full toolset agent implements against the plan behind the repo's + quality gate - **diff-cap:** parks oversized changes (>400 lines default) - **open-pr:** builder's summary becomes the PR body @@ -91,10 +104,13 @@ prepare → baseline-gate → plan(planner, read-only) → build(builder, gated) prepare → baseline-gate → analyse(planner) → repro-tests(builder, inverted gate) → capture-proof → commit-repro → fix(builder, normal gate, test files protected) → commit-push → diff-cap → open-pr + repro-evidence ``` -- **repro-tests:** the quality gate is **inverted** -- the test command must FAIL. Proven failure is required. -- **capture-proof:** runs the test command deterministically, captures the failing output +- **repro-tests:** the quality gate is **inverted** -- the test command must + FAIL. Proven failure is required. +- **capture-proof:** runs the test command deterministically, captures the + failing output - **commit-repro:** commits the failing tests as the first commit -- **fix:** test files are **environmentally write-protected** (not prompt-ruled). The agent fixes code, not tests. +- **fix:** test files are **environmentally write-protected** (not + prompt-ruled). The agent fixes code, not tests. - **open-pr + evidence:** posts both the PR and the captured failure proof ### Feasibility (feature label) @@ -103,121 +119,163 @@ prepare → baseline-gate → analyse(planner) → repro-tests(builder, inverted prepare → assess(planner, with decide tool) → [close_if_bad_fit | prd(planner)] → deliver → waiting_human ``` -- **assess:** reads AGENT.md, ROADMAP.md, README. Calls a `decide` tool (structured output, not parsed prose). Bad fit → close with reasons. -- **prd:** read-only agent writes a PRD: problem, solution, files affected, acceptance criteria, non-goals, diff estimate -- **deliver:** posts PRD as issue comment + webhook notification (n8n → email). Sets state to `waiting_human`. -- The daemon watches for human replies, judges them with a triage LLM (APPROVE/REJECT/UNCLEAR), requeues or closes. +- **assess:** reads AGENT.md, ROADMAP.md, README. Calls a `decide` tool + (structured output, not parsed prose). Bad fit → close with reasons. +- **prd:** read-only agent writes a PRD: problem, solution, files affected, + acceptance criteria, non-goals, diff estimate +- **deliver:** posts PRD as issue comment + webhook notification (n8n → email). + Sets state to `waiting_human`. +- The daemon watches for human replies, judges them with a triage LLM + (APPROVE/REJECT/UNCLEAR), requeues or closes. ## Forge Interface A thin abstraction over GitHub (Gitea planned): -| Method | Purpose | -|---|---| -| `AcceptInvitations` | Auto-accept repo invites | -| `AssignedIssues` | Poll assigned issues (excluding PRs) | -| `IssuesWithLabel` | Poll labelled issues | -| `Comment` | Post issue/PR comment, return ID | -| `RepliesAfter` | Find human replies after a comment ID | -| `CreatePR` | Open pull request | -| `PRState` | Check merged/open/closed | -| `CloseIssue` | Close with final comment | -| `React` | Emoji reaction (pickup acknowledgement) | -| `SetStateLabel` | Replace old state label with new one | -| `VerifyPush` | Confirm push permission at startup | +| Method | Purpose | +| ------------------- | --------------------------------------- | +| `AcceptInvitations` | Auto-accept repo invites | +| `AssignedIssues` | Poll assigned issues (excluding PRs) | +| `IssuesWithLabel` | Poll labelled issues | +| `Comment` | Post issue/PR comment, return ID | +| `RepliesAfter` | Find human replies after a comment ID | +| `CreatePR` | Open pull request | +| `PRState` | Check merged/open/closed | +| `CloseIssue` | Close with final comment | +| `React` | Emoji reaction (pickup acknowledgement) | +| `SetStateLabel` | Replace old state label with new one | +| `VerifyPush` | Confirm push permission at startup | -State labels (`archie:queued`, `archie:working`, etc.) are created on demand, removed when transitioning. +State labels (`archie:queued`, `archie:working`, etc.) are created on demand, +removed when transitioning. ## Worktree Manager -Every task gets a fresh clone -- no persistent state between runs. The model never runs git. +Every task gets a fresh clone -- no persistent state between runs. The model +never runs git. ``` ~/.local/share/archie/work/-/issue-/ ``` -Token auth via a generated `GIT_ASKPASS` helper script -- the token never appears in `.git/config` or process argv. +Token auth via a generated `GIT_ASKPASS` helper script -- the token never +appears in `.git/config` or process argv. ## Config Daemon-level TOML (`~/.config/archie/config.toml`): -- `[forge]` -- type (github), host, token secret reference -- `[dispatch]` -- trigger (assignee/label/either), labels, ack reaction -- `[[repos]]` -- owner, name, base branch, gate commands, protected paths, ecosystem -- `[models]` -- planner, builder, triage (provider/model refs) -- `[providers]` -- LLM provider configs -- `[agent]` -- execution mode (`inprocess` or `subprocess`), worker command, environment allowlist -- `[budgets]` -- max steps, max tokens, wall clock, gate max failures -- `[web]` -- dashboard listen address -- `[notify]` -- webhook URL for notifications +- `[forge]` -- type (github), host, token secret reference +- `[dispatch]` -- trigger (assignee/label/either), labels, ack reaction +- `[[repos]]` -- owner, name, base branch, gate commands, protected paths, + ecosystem +- `[models]` -- planner, builder, triage (provider/model refs) +- `[providers]` -- LLM provider configs +- `[agent]` -- execution mode (`inprocess` or `subprocess`), worker command, + environment allowlist +- `[budgets]` -- max steps, max tokens, wall clock, gate max failures +- `[web]` -- dashboard listen address +- `[notify]` -- webhook URL for notifications -Secrets (forge token, provider API keys, channel tokens) are not embedded in config files. `internal/secret` defines a pluggable `Engine` interface (`Name`, `Version`, `Resolve(key) (string, error)`) resolved through a `Registry`; the built-in `env` engine reads an environment variable by name. Custom engines (sops, Bitwarden Secrets Manager, Vault/OpenBao) are Yaegi-interpreted `.go` plugins loaded from a directory, following the same convention as `internal/plugin`'s daemon plugins. Config fields reference a secret as `{engine, key}` (`secret.SecretRef`), e.g. `token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN" }`. As of this writing only `Forge.Token` has been migrated to `SecretRef`; `Provider.APIKeyEnv`, `NATSConfig.TokenEnv`, and `TelegramConfig.TokenEnv` are still plain env-var-name strings pending a follow-up (they're forwarded by name to `ai-sdk/runtime` and subprocess workers rather than resolved centrally, which needs its own design pass before migrating). +Secrets (forge token, provider API keys, channel tokens) are not embedded in +config files. `internal/secret` defines a pluggable `Engine` interface (`Name`, +`Version`, `Resolve(key) (string, error)`) resolved through a `Registry`; the +built-in `env` engine reads an environment variable by name. Custom engines +(sops, Bitwarden Secrets Manager, Vault/OpenBao) are Yaegi-interpreted `.go` +plugins loaded from a directory, following the same convention as +`internal/plugin`'s daemon plugins. Config fields reference a secret as +`{engine, key}` (`secret.SecretRef`), e.g. +`token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN" }`. As of this writing +only `Forge.Token` has been migrated to `SecretRef`; `Provider.APIKeyEnv`, +`NATSConfig.TokenEnv`, and `TelegramConfig.TokenEnv` are still plain +env-var-name strings pending a follow-up (they're forwarded by name to +`ai-sdk/runtime` and subprocess workers rather than resolved centrally, which +needs its own design pass before migrating). -Subprocess mode is a migration transport boundary, not a security sandbox: the worker still runs under the daemon UID and can access daemon-readable host resources. The "daemon never runs untrusted code" boundary requires the later container runner with a separate user, a restricted filesystem and process namespace, and explicit mounts. +Subprocess mode is a migration transport boundary, not a security sandbox: the +worker still runs under the daemon UID and can access daemon-readable host +resources. The "daemon never runs untrusted code" boundary requires the later +container runner with a separate user, a restricted filesystem and process +namespace, and explicit mounts. -Per-repo gates are command lists: `[[repos.gate]] = ["go", "vet", "./..."]`. The last command is the test runner (by convention -- TDD inverts it). +Per-repo gates are command lists: `[[repos.gate]] = ["go", "vet", "./..."]`. The +last command is the test runner (by convention -- TDD inverts it). ## Observability Every lifecycle event flows through an internal event bus: + - SQLite event log (every event stamped with a row ID) - Live dashboard via SSE (server-sent events) -- Bounded subscriber buffers -- slow consumers drop events, never block the daemon +- Bounded subscriber buffers -- slow consumers drop events, never block the + daemon ## Plugin engine rule (strict) -“Engine” is reserved for a typed, lifecycle-managed capability family. It is -not a synonym for a generic plugin hook. Every new plugin engine must satisfy -all of these invariants: +“Engine” is reserved for a typed, lifecycle-managed capability family. It is not +a synonym for a generic plugin hook. Every new plugin engine must satisfy all of +these invariants: 1. **Typed domain contract.** The engine interface exposes real - capability-specific operations in addition to identity metadata. Examples - are resolving a secret, delivering a message, or running an agent. A plugin - that only exposes `Name` and `Version` is metadata, not an engine. + capability-specific operations in addition to identity metadata. Examples are + resolving a secret, delivering a message, or running an agent. A plugin that + only exposes `Name` and `Version` is metadata, not an engine. 2. **Owning family manager.** The capability package owns a `Registry` or - `Manager` that controls provider registration and discovery, - initialization, or access. Providers do not register arbitrary callbacks - directly on the daemon. -3. **Lifecycle and health.** When an implementation owns resources or - background work, its typed family contract must expose start, health, and - stop semantics. The owning manager invokes them and defines failure - isolation and shutdown ordering. Stateless providers may make these - operations explicit no-ops. + `Manager` that controls provider registration and discovery, initialization, + or access. Providers do not register arbitrary callbacks directly on the + daemon. +3. **Lifecycle and health.** When an implementation owns resources or background + work, its typed family contract must expose start, health, and stop + semantics. The owning manager invokes them and defines failure isolation and + shutdown ordering. Stateless providers may make these operations explicit + no-ops. 4. **Narrow host access.** Plugins receive the typed family registrar and only the host services their declared capability requires. They never receive `*daemon.Daemon`, a service locator, or an untyped hook map. -5. **Metadata-only generic plugin contract.** `plugin.Plugin` remains limited - to `Name()` and `Version()`. Domain hooks belong on typed engine interfaces; +5. **Metadata-only generic plugin contract.** `plugin.Plugin` remains limited to + `Name()` and `Version()`. Domain hooks belong on typed engine interfaces; adding capability methods to the generic interface is forbidden. 6. **Trust boundary stays explicit.** Explicitly trusted, operator-installed - plugins—including third-party secret-engine plugins the operator chooses - to trust—may run in-process and have daemon privileges. Repository-supplied - code runs in the task container. Integrations that are not trusted as - daemon code run out of process through MCP or a versioned protocol and, when - a confidentiality or integrity boundary is required, inside a real - container sandbox. A subprocess boundary alone is not a security sandbox, - and calling Yaegi-loaded code a plugin does not isolate it. + plugins—including third-party secret-engine plugins the operator chooses to + trust—may run in-process and have daemon privileges. Repository-supplied code + runs in the task container. Integrations that are not trusted as daemon code + run out of process through MCP or a versioned protocol and, when a + confidentiality or integrity boundary is required, inside a real container + sandbox. A subprocess boundary alone is not a security sandbox, and calling + Yaegi-loaded code a plugin does not isolate it. -`internal/plugin/architecture_test.go` enforces the mechanically testable -parts of this rule: the generic plugin method set, the shared agent-instruction -source, and the requirement that engine interfaces have domain behavior plus -an owning registry or manager. +`internal/plugin/architecture_test.go` enforces the mechanically testable parts +of this rule: the generic plugin method set, the shared agent-instruction +source, and the requirement that engine interfaces have domain behavior plus an +owning registry or manager. ## Key Design Decisions -1. **Environmental constraints over prompt rules.** The gate, test-file protection, and diff cap are code enforcement -- not "please don't do that" in the system prompt. -2. **The model never runs git.** Worktree operations are deterministic steps, not agent tools. -3. **Tokens as cost, not features.** Token usage is tracked per task and emitted in observability events but never budgeted beyond the agent loop's own limits. -4. **Label-driven routing.** Workflow selection is a switch statement, not an LLM call. A triage LLM is used only for the human reply judgment in waiting_human. -5. **Shared code with tau at the module level.** `ai-sdk/agentloop` and `ai-sdk/toolkit` are extracted from tau's coordinator and promoted to shared libraries. -6. **No daemon-internal cron.** Polling is a ticker loop, not cron. The feasibility PRD notification uses an external webhook (n8n). -7. **Fresh worktree per task.** No persistent state between runs. Crash recovery just re-queues. -8. **Agent execution is a data boundary.** Autonomous stages receive a versioned request and return a fenced result; SQLite, forge operations, git, workflow sequencing, and outcome handling stay daemon-owned. +1. **Environmental constraints over prompt rules.** The gate, test-file + protection, and diff cap are code enforcement -- not "please don't do that" + in the system prompt. +2. **The model never runs git.** Worktree operations are deterministic steps, + not agent tools. +3. **Tokens as cost, not features.** Token usage is tracked per task and emitted + in observability events but never budgeted beyond the agent loop's own + limits. +4. **Label-driven routing.** Workflow selection is a switch statement, not an + LLM call. A triage LLM is used only for the human reply judgment in + waiting_human. +5. **Shared code.** `ai-sdk/agentloop` and `ai-sdk/toolkit` provide the common + agent loop and tool set. +6. **No daemon-internal cron.** Polling is a ticker loop, not cron. The + feasibility PRD notification uses an external webhook (n8n). +7. **Fresh worktree per task.** No persistent state between runs. Crash recovery + just re-queues. +8. **Agent execution is a data boundary.** Autonomous stages receive a versioned + request and return a fenced result; SQLite, forge operations, git, workflow + sequencing, and outcome handling stay daemon-owned. ## What's Implemented vs Planned **Implemented:** + - Daemon poll loop, enqueue, claim, process - Bootstrap, implement, TDD, feasibility workflows - GitHub forge (issues, PRs, labels, comments, reactions) @@ -230,7 +288,8 @@ an owning registry or manager. - Human reply judgment (triage LLM for waiting_human) **Planned:** + - Gitea forge implementation - More ecosystems - Notification integrations beyond n8n webhook -- Skills (SKILL.md support -- see `.archie/skills/`) +- Skills (SKILL.md support -- see `.archie/skills/`) diff --git a/CLAUDE.md b/CLAUDE.md index 0b771d0da..511f228e2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,14 +1,23 @@ # CLAUDE.md -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +This file provides guidance to Claude Code (claude.ai/code) when working with +code in this repository. ## What this is -**archied** is a resident daemon that polls a forge (GitHub, Gitea planned) for issues assigned/labelled to it, works each one in an isolated git worktree through a routed workflow (bootstrap / implement / TDD / feasibility), and opens pull requests for human review. See `ARCHITECTURE.md` for the full package map, workflow engine design, task lifecycle, and key design decisions — read it before making non-trivial changes, since several invariants (env-enforced gates, model never runs git, agent execution as a data boundary) aren't obvious from the code alone. +**archied** is a resident daemon that polls a forge (GitHub, Gitea planned) for +issues assigned/labelled to it, works each one in an isolated git worktree +through a routed workflow (bootstrap / implement / TDD / feasibility), and opens +pull requests for human review. See `ARCHITECTURE.md` for the full package map, +workflow engine design, task lifecycle, and key design decisions — read it +before making non-trivial changes, since several invariants (env-enforced gates, +model never runs git, agent execution as a data boundary) aren't obvious from +the code alone. ## Build & Test -Commands are defined in `Taskfile.yml` (uses [Task](https://taskfile.dev)); run `task --list` to see everything. +Commands are defined in `Taskfile.yml` (uses [Task](https://taskfile.dev)); run +`task --list` to see everything. ```bash task build # build archied and archie-agent binaries into bin/ @@ -21,52 +30,121 @@ task check # fmt + go fix + vet + build + test — matches the per-repo [[r Run a single test: `go test ./internal/workflow/... -run TestName -v`. -Docker/NATS stack (multi-process split — see below): `task docker-build`, `task docker-up`, `task docker-down`, `task docker-logs`. +Docker/NATS stack (multi-process split — see below): `task docker-build`, +`task docker-up`, `task docker-down`, `task docker-logs`. ## Architecture -Full details live in `ARCHITECTURE.md` — do not duplicate it here; skim it whenever touching the daemon, workflow engine, or forge/worktree/store boundaries. Summary of what's evolved since that doc was last fully accurate: +Full details live in `ARCHITECTURE.md` — do not duplicate it here; skim it +whenever touching the daemon, workflow engine, or forge/worktree/store +boundaries. Summary of what's evolved since that doc was last fully accurate: -- The daemon has grown an RPC split (`internal/forgerpc`, `internal/storerpc`, `internal/worktreerpc`, `internal/natsrpc`, `internal/nats`) alongside the in-process model described in ARCHITECTURE.md — check `internal/nats/` and `docker-compose.yml` for the current split between `archied` and sandboxed workers. -- `internal/gate/` — quality gate execution (the "environmental constraints over prompt rules" mechanism). -- `internal/skill/`, `internal/skillscript/`, `internal/yaegiutil/` — SKILL.md support (listed as "Planned" in ARCHITECTURE.md; now has real implementation — check these packages for current state before assuming it's unbuilt). -- `internal/channels/` — inbound chat/notification channels (e.g. Telegram — see `internal/channels/telegram/`, `internal/channels/email/`); channel-agnostic interface in `internal/channels/channel.go`. -- `internal/memory/`, `internal/nell/`, `internal/gateway/`, `internal/container/`, `internal/plugin/`, `internal/tools/`, `internal/taskrun/` — not documented in ARCHITECTURE.md; read the package before modifying, its doc comment and tests are the source of truth. +- The daemon has grown an RPC split (`internal/forgerpc`, `internal/storerpc`, + `internal/worktreerpc`, `internal/natsrpc`, `internal/nats`) alongside the + in-process model described in ARCHITECTURE.md — check `internal/nats/` and + `docker-compose.yml` for the current split between `archied` and sandboxed + workers. +- `internal/gate/` — quality gate execution (the "environmental constraints over + prompt rules" mechanism). +- `internal/skill/`, `internal/skillscript/`, `internal/yaegiutil/` — SKILL.md + support (listed as "Planned" in ARCHITECTURE.md; now has real implementation — + check these packages for current state before assuming it's unbuilt). +- `internal/channels/` — inbound chat/notification channels (e.g. Telegram — see + `internal/channels/telegram/`, `internal/channels/email/`); channel-agnostic + interface in `internal/channels/channel.go`. +- `internal/memory/`, `internal/nell/`, `internal/gateway/`, + `internal/container/`, `internal/plugin/`, `internal/tools/`, + `internal/taskrun/` — not documented in ARCHITECTURE.md; read the package + before modifying, its doc comment and tests are the source of truth. -**Task lifecycle** (from ARCHITECTURE.md, still current): `queued → running(workflow:stage) → pr_open → merged|rejected`, with `waiting_human` and `parked` side states. Crash recovery re-queues anything left `running`; parks always post a comment with the reason — never fail silently. +**Task lifecycle** (from ARCHITECTURE.md, still current): +`queued → running(workflow:stage) → pr_open → merged|rejected`, with +`waiting_human` and `parked` side states. Crash recovery re-queues anything left +`running`; parks always post a comment with the reason — never fail silently. -**Config** is daemon-level TOML (see `config.example.toml`), not per-repo files in this repo. Two live instances run on a separate host (`carina`), each with a distinct `bot_user` — see the `two-archied-instances-run-on-host-carina-ssh` beads memory (`bd memories carina`) if working on multi-identity/dispatch behavior. +**Config** is daemon-level TOML (see `config.example.toml`), not per-repo files +in this repo. Two live instances run on a separate host (`carina`), each with a +distinct `bot_user` — see the `two-archied-instances-run-on-host-carina-ssh` +beads memory (`bd memories carina`) if working on multi-identity/dispatch +behavior. ## Conventions - Go 1.26.3, module `github.com/samcharles93/archie-core`. -- `ai-sdk/runtime`, `ai-sdk/agentloop`, `ai-sdk/core` are external — shared with the `tau` project at the module level, not vendored copies. Changes there affect both repos. -- Non-interactive shell commands only: some environments alias `cp`/`mv`/`rm` to `-i`. Use `cp -f`, `mv -f`, `rm -f`/`rm -rf`, `scp -o BatchMode=yes`, `ssh -o BatchMode=yes`, `apt-get -y`. -- Environmental enforcement over prompt rules: gates, test-file protection, and diff caps are code-level checks the agent cannot talk its way around — follow this pattern for any new safety constraint rather than adding it to a system prompt. -- **Plugin engine rule (strict):** “engine” means a typed, lifecycle-managed capability family with an owning registry or manager; it never means another method on the generic plugin interface. Keep `plugin.Plugin` metadata-only, give plugins narrow typed registrars instead of daemon access, and apply the lifecycle and trust-boundary requirements in [ARCHITECTURE.md#plugin-engine-rule-strict](ARCHITECTURE.md#plugin-engine-rule-strict). Its mechanically testable structure is enforced by `internal/plugin/architecture_test.go`; reviewers enforce its lifecycle, access, and trust semantics. -- The model/agent never runs git directly — worktree operations (`internal/worktree/`) are deterministic daemon-owned steps, not agent tools. +- `ai-sdk/runtime`, `ai-sdk/agentloop`, `ai-sdk/core` are external other + projects, not vendored copies. Changes affect other repos. +- Non-interactive shell commands only: some environments alias `cp`/`mv`/`rm` to + `-i`. Use `cp -f`, `mv -f`, `rm -f`/`rm -rf`, `scp -o BatchMode=yes`, + `ssh -o BatchMode=yes`, `apt-get -y`. +- Environmental enforcement over prompt rules: gates, test-file protection, and + diff caps are code-level checks the agent cannot talk its way around — follow + this pattern for any new safety constraint rather than adding it to a system + prompt. +- **Plugin engine rule (strict):** “engine” means a typed, lifecycle-managed + capability family with an owning registry or manager; it never means another + method on the generic plugin interface. Keep `plugin.Plugin` metadata-only, + give plugins narrow typed registrars instead of daemon access, and apply the + lifecycle and trust-boundary requirements in + [ARCHITECTURE.md#plugin-engine-rule-strict](ARCHITECTURE.md#plugin-engine-rule-strict). + Its mechanically testable structure is enforced by + `internal/plugin/architecture_test.go`; reviewers enforce its lifecycle, + access, and trust semantics. +- The model/agent never runs git directly — worktree operations + (`internal/worktree/`) are deterministic daemon-owned steps, not agent tools. ## Development Protocol (mandatory) -This is not optional style guidance — every code change in this repo follows this sequence. It mirrors what the `implement-and-verify` workflow (`.claude/workflows/implement-and-verify.js`) automates for `archie-core-abg` beads, and it's the same discipline archied enforces on *itself* via the TDD workflow in `ARCHITECTURE.md`. +This is not optional style guidance — every code change in this repo follows +this sequence. It mirrors what the `implement-and-verify` workflow +(`.claude/workflows/implement-and-verify.js`) automates for `archie-core-abg` +beads, and it's the same discipline archied enforces on _itself_ via the TDD +workflow in `ARCHITECTURE.md`. -**`task check` is the definitive quality gate.** `task check` = `fmt` + `go fix ./...` + `vet` + `build` + `test`, and it is the one command that must pass, clean, before any change is considered done — it's the literal analogue of the `[[repos.gate]]` archied runs against every PR it opens. Don't hand-pick a subset of `go test`/`go vet`/`go build` and call it good; run `task check` (or the scoped equivalent, e.g. `go test ./internal/foo/... -count=1` + `golangci-lint run ./internal/foo/...` for a single package) and confirm it's clean. +**`task check` is the definitive quality gate.** `task check` = `fmt` + +`go fix ./...` + `vet` + `build` + `test`, and it is the one command that must +pass, clean, before any change is considered done — it's the literal analogue of +the `[[repos.gate]]` archied runs against every PR it opens. Don't hand-pick a +subset of `go test`/`go vet`/`go build` and call it good; run `task check` (or +the scoped equivalent, e.g. `go test ./internal/foo/... -count=1` + +`golangci-lint run ./internal/foo/...` for a single package) and confirm it's +clean. **Red-then-green, definitively:** -1. **Red** — write the failing test(s) first, against the *intended* behavior, before any implementation code exists. Run them and confirm they fail for the right reason (not a compile error). -2. **Green** — write the minimum implementation to make those tests pass. No implementation code is written before its test exists and fails. -3. Confirm via `task check` (or scoped `go test .../... -count=1`) that the suite is green, `golangci-lint run` reports zero findings, and `gofumpt -w .` reports no unformatted files. -4. No hardcoded values in tests (use parameterized test tables), no hardcoded identity/config values in implementation code, and every error path gets a test. -**Adversarial verification is mandatory, and it runs as a separate pass from a fresh reviewer — never self-certified by the implementer.** After red-then-green is green: -- Spawn a review with no memory of how the code was written (a fresh subagent, or `/code-review`/`/security-review` as appropriate) and instruct it to assume every line is wrong until proven correct. -- The checklist: all tests pass, lint is zero-findings, formatting is clean, then a manual read of every non-test file in the changed package for — dead code paths, unchecked error returns, hardcoded values that should be parameters/constants, interface satisfaction, nil-pointer risk, goroutine leaks, and races on shared mutable state. -- Findings are reported (use `ReportFindings` when running as a review agent), not silently fixed by the same pass that wrote the code — a finding that survives blocks closing the work, it doesn't get waved through. -- Only close out (beads: `bd close`) once the adversarial pass reports zero surviving findings. +1. **Red** — write the failing test(s) first, against the _intended_ behavior, + before any implementation code exists. Run them and confirm they fail for the + right reason (not a compile error). +2. **Green** — write the minimum implementation to make those tests pass. No + implementation code is written before its test exists and fails. +3. Confirm via `task check` (or scoped `go test .../... -count=1`) that the + suite is green, `golangci-lint run` reports zero findings, and `gofumpt -w .` + reports no unformatted files. +4. No hardcoded values in tests (use parameterized test tables), no hardcoded + identity/config values in implementation code, and every error path gets a + test. + +**Adversarial verification is mandatory, and it runs as a separate pass from a +fresh reviewer — never self-certified by the implementer.** After red-then-green +is green: + +- Spawn a review with no memory of how the code was written (a fresh subagent, + or `/code-review`/`/security-review` as appropriate) and instruct it to assume + every line is wrong until proven correct. +- The checklist: all tests pass, lint is zero-findings, formatting is clean, + then a manual read of every non-test file in the changed package for — dead + code paths, unchecked error returns, hardcoded values that should be + parameters/constants, interface satisfaction, nil-pointer risk, goroutine + leaks, and races on shared mutable state. +- Findings are reported (use `ReportFindings` when running as a review agent), + not silently fixed by the same pass that wrote the code — a finding that + survives blocks closing the work, it doesn't get waved through. +- Only close out (beads: `bd close`) once the adversarial pass reports zero + surviving findings. ## Beads Issue Tracker -This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full workflow context and commands. +This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full +workflow context and commands. ```bash bd ready # Find available work @@ -75,6 +153,10 @@ bd update --claim # Claim work bd close # Complete work ``` -- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists. -- Use `bd remember` / `bd memories ` for persistent knowledge — do NOT use MEMORY.md files. -- Issues live in a local Dolt DB; sync uses `refs/dolt/data` on the git remote; `.beads/issues.jsonl` is a passive export, not the source of truth. See [SYNC_CONCEPTS.md](https://github.com/gastownhall/beads/blob/main/docs/SYNC_CONCEPTS.md). +- Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown + TODO lists. +- Use `bd remember` / `bd memories ` for persistent knowledge — do NOT + use MEMORY.md files. +- Issues live in a local Dolt DB; sync uses `refs/dolt/data` on the git remote; + `.beads/issues.jsonl` is a passive export, not the source of truth. See + [SYNC_CONCEPTS.md](https://github.com/gastownhall/beads/blob/main/docs/SYNC_CONCEPTS.md). diff --git a/cmd/archied/main_test.go b/cmd/archied/main_test.go index d749332e2..8eb798c04 100644 --- a/cmd/archied/main_test.go +++ b/cmd/archied/main_test.go @@ -215,7 +215,7 @@ func TestChatTaskProfilesUsesIdentityRepositories(t *testing.T) { Identities: []config.IdentityConfig{ {Name: "builder", Repos: []config.Repo{{Owner: "sam", Name: "archie-core"}}}, {Name: "reviewer", Repos: []config.Repo{ - {Owner: "sam", Name: "tau"}, + {Owner: "sam", Name: "example-service"}, {Owner: "sam", Name: "ai-sdk"}, }}, }, @@ -229,7 +229,7 @@ func TestChatTaskProfilesUsesIdentityRepositories(t *testing.T) { t.Fatalf("profiles = %d, want 2", len(profiles)) } if profiles[1].Identity != "reviewer" || profiles[1].DefaultOwner != "sam" || - profiles[1].DefaultRepo != "tau" || + profiles[1].DefaultRepo != "example-service" || len(profiles[1].Repos) != 2 || profiles[1].Repos[1] != "sam/ai-sdk" { t.Errorf("reviewer profile = %+v", profiles[1]) } diff --git a/docs-2/.vitepress/config.mts b/docs-2/.vitepress/config.mts new file mode 100644 index 000000000..324e18a6c --- /dev/null +++ b/docs-2/.vitepress/config.mts @@ -0,0 +1,25 @@ +import { defineConfig } from "vitepress"; + +export default defineConfig({ + title: "Archie", + description: "Documentation for the Archie personal agent platform.", + lastUpdated: true, + cleanUrls: true, + srcDir: ".", + srcExclude: ["README.md"], + outDir: ".vitepress/dist", + + head: [["link", { rel: "icon", href: "/favicon.svg" }]], + + themeConfig: { + logo: "/favicon.svg", + nav: [{ text: "Architecture", link: "/architecture/" }], + search: { + provider: "local", + }, + footer: { + message: "Built with VitePress.", + copyright: "Archie", + }, + }, +}); diff --git a/docs-2/README.md b/docs-2/README.md new file mode 100644 index 000000000..701ca6030 --- /dev/null +++ b/docs-2/README.md @@ -0,0 +1,263 @@ +# Tau CLI Reference + +Tau is a provider-agnostic coding agent with an interactive terminal UI. It provides an extensible, personalised +environment for working with AI models, featuring an interactive TUI, an optional Web UI, session history, token +tracking, and plugin integration. + +## Usage + +```bash +tau [global flags] [command] +``` + +Running `tau` with no arguments starts an interactive chat session and also starts a local Web UI on `127.0.0.1`. You do +not need a `--model` flag; if no model is configured the session starts unselected and you pick one with `/model`. + +## Global Flags + +| Flag | Description | +| ----------------------------- | ------------------------------------------------------------------------- | +| `--provider ` | Provider name to use (e.g. `deepseek`, `openrouter`). Env: `TAU_PROVIDER` | +| `--model ` | Model ID to use. Also accepts `provider:model-id` or `provider/model-id` | +| `--max-tokens ` | Maximum completion tokens per response | +| `--temperature ` | Sampling temperature (0–2) | +| `--resume`, `-r ` | Resume a saved session by ID, or `latest` | +| `--execute`, `-x ` | Execute mode: process prompt, print response, exit (reads stdin when piped) | +| `--prompt`, `-p ` | [deprecated] Use `-x`/`--execute` instead. One-shot / execute mode | +| `--jsonl`, `--stream-json` | Output framed JSONL events on stdout instead of plain text (execute mode) | +| `--child` | Run as a headless agent child process (internal use; hidden) | +| `--web` | Start the Web UI and open it in the default browser | +| `--port ` | HTTP port for the Web UI. Default `0` = OS-assigned ephemeral port | +| `--no-web` | Do not start the Web UI. TUI only | +| `--insecure` | Skip TLS certificate verification. Env: `TAU_INSECURE` | +| `--verbose` | Show debug messages on stderr. Env: `TAU_VERBOSE` | + +## Enabling Providers + +Tau discovers providers automatically. To enable a provider: + +1. **`tau setup` (recommended for first run):** Interactive walkthrough for selecting a provider and authenticating. + Managed API keys are stored in `~/.config/tau/auth.yaml` — env vars override them when both are present. + +2. **`tau provider` CLI:** + ```bash + tau provider list # show all providers and auth state + tau provider login deepseek # enter and store a managed API key + tau provider login openai-codex # OAuth device-code flow + tau provider login # interactive selector (TTY only) + tau provider logout openai # disable and clear credentials + ``` + For non-OAuth providers, `tau provider login` stores a managed API key in `auth.yaml`. + +3. **Environment variable:** Export the provider's API key env var (e.g. `DEEPSEEK_API_KEY=sk-...`). Tau + detects it at startup. + +4. **TUI slash commands:** `/provider [name]` to toggle a provider, `/provider login ` for OAuth flow. + +5. **config.yaml:** Add a provider block (see Configuration below). + +Run `/model` in the TUI to pick from all enabled providers' models. + +## Web UI + +When tau starts interactively, it binds a local HTTP/WebSocket server on `127.0.0.1`. The URL is shown in the TUI status +bar. + +```bash +./tau # TUI + Web UI, URL in status bar +./tau --web # TUI + Web UI, also opens the browser +./tau --no-web # TUI only +./tau --port 9343 # Fixed port +``` + +The browser connects to `/ws` and receives the same event stream as the TUI. Commands sent from the browser are +forwarded to the coordinator identically to TUI commands. Multiple browser tabs may connect to the same session. + +## Slash Commands (TUI) + +| Command | Description | +| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `/model [id]` | Switch model; opens picker when called without an ID | +| `/provider [name]` | Toggle a provider on/off; lists all providers when called without an argument | +| `/provider login ` | OAuth device-code sign-in for `github-copilot` or `openai-codex`; opens the browser and copies the code when possible | +| `/provider logout ` | Disable a provider / remove its saved key | +| `/refresh` | Re-discover models from all enabled providers | +| `/effort [level]` | Set reasoning effort (`off`, `low`, `medium`, `high`, `max`) | +| `/reasoning [on\|off]` | Toggle display of model reasoning content | +| `/system ` | Set the session system prompt | +| `/session [list\|info\|export\|delete\|]` | Manage saved sessions | +| `/resume [id]` | Resume a saved session | +| `/new` | Start a fresh conversation (aliases: `/clear`, `/reset`) | +| `/reload` | Reload extensions/plugins | +| `/help` | Show all available commands | +| `/exit` | Quit tau | + +## Subcommands + +### `tau setup` + +Interactive setup wizard for first-run configuration. Walks through provider selection, authentication (API key or OAuth), and model selection. + +```bash +tau setup +``` + +Called automatically on first run if no providers are configured. + +### `tau provider` + +Manage provider authentication from the CLI. + +```bash +tau provider list # table of providers with status, source, and auth type +tau provider login [name] # authenticate an OAuth or API-key provider +tau provider login # interactive selector when stdin is a TTY +tau provider logout # disable provider and clear managed credentials +``` + +Provider credentials are managed via the keychain or stored in `~/.config/tau/auth.yaml`. See [`docs/providers.md`](providers.md) for the full provider architecture. + +### `tau models` + +List available models from the configured provider. + +```bash +tau models [--json] +``` + +Uses the live models.dev catalog (network). For the model list used in the interactive TUI, see the embedded snapshot +(`internal/providers/snapshot/`). + +### `tau refresh` + +Force a refresh of the models.dev network catalog and list models. + +```bash +tau refresh +``` + +Downloads the latest catalog for the configured provider. This affects the `tau models` output and the snapshot +generator, but interactive sessions use the embedded offline snapshot (`internal/providers/snapshot/models.json`). + +### `tau sessions` + +List saved chat sessions. + +```bash +tau sessions +``` + +Shows a table of sessions with ID, model, message count, tokens, cost, and date. Use `/session` inside the TUI for +richer session management. + +### `tau token` + +Print the resolved API key / bearer token for the selected provider. + +```bash +tau token +``` + +Useful for debugging auth configuration. + +### `tau update` + +Update the current tau binary from GitHub release assets, or check for available updates. + +```bash +tau update [--check] [--version v0.16.2] [--repo owner/repo] [--force] +``` + +The updater downloads the platform archive and `checksums.txt`, verifies the archive checksum, extracts the tau binary, +and applies it in place. + +By default, update checks only happen when you run `tau update` manually. Set +`updates.mode: warn` in [configuration](configuration.md#updates) to keep manual +checks with update notifications, or `updates.mode: disabled` to disable all update +checks including `tau update`. Dev builds (version `dev`) are always excluded +from update checks — only release builds are eligible. + +## Configuration + +Tau loads `~/.config/tau/config.yaml` (global) and `.tau.yaml` (project-local). Example configs are in +[`config-example.yaml`](config-example.yaml) and [`config-deepseek-example.yaml`](config-deepseek-example.yaml). + +### Minimal configuration + +```yaml +# ~/.config/tau/config.yaml +default_provider: deepseek +default_model: deepseek-chat + +providers: + - name: deepseek + base_url: https://api.deepseek.com/v1 + auth: + type: api_key + api_key_env: DEEPSEEK_API_KEY +``` + +Model metadata (context window, pricing, reasoning) is loaded from the embedded snapshot - you do not need to repeat it +in config. See [`docs/ai-sdk.md`](ai-sdk.md) for full integration details. + +### `ProviderConfig` fields + +| Field | Description | +| ------------------ | ---------------------------------------------------------------------------------------- | +| `name` | Provider identifier (matches tau's catalog ID) | +| `base_url` | API endpoint. Must include `/v1` when the provider uses it | +| `type` | ai-sdk class override (`anthropic` for Anthropic native API; omit for OpenAI-compatible) | +| `auth.type` | `api_key`, `none`, or `oauth_pkce` | +| `auth.api_key_env` | Environment variable name for the API key | +| `auth.api_key` | Literal API key (not recommended; prefer `api_key_env`) | +| `headers` | Optional static request headers; do not put bearer tokens here | +| `models` | Optional list of model overrides (see below) | + +### Model overrides + +Tau's embedded snapshot provides model metadata. Override individual fields only when you need to customise them: + +```yaml +providers: + - name: openai + auth: + type: api_key + api_key_env: OPENAI_API_KEY + models: + - id: gpt-5.4 + context_window: 200000 + default_max_tokens: 16384 +``` + +## Documentation Index + +### Architecture & Design + +- [Architecture Overview](architecture.md) - system design, communication patterns, layer map +- [Event Bus Architecture](eventbus.md) - type-based event routing, publishers, subscribers + +### Core Systems + +- [Agent Coordinator](agent.md) - turn loop, command handlers, tool execution, prompts +- [Chat Types](chat-types.md) - complete command/event reference, core types +- [Tools](tools.md) - registry, built-in tools, mutation queue, UIBridge +- [Commands](commands.md) - slash command registry, custom commands + +### UI Systems + +- [Terminal UI (TUI)](tui.md) - inline rendering, widget tree, slash commands, completions, notifications +- [Web UI](webui.md) - Vue 3 SPA, state management, components, protocol, build +- [Server & Bridge](server.md) - HTTP/WebSocket server, event fan-out, wire format +- [taui Framework](taui.md) - standalone TUI rendering engine, widgets, color system + +### Infrastructure + +- [Configuration](configuration.md) - YAML config format, env vars, CLI flags +- [Providers](providers.md) - provider catalogue, auth state, model discovery, dynamic switching +- [AI SDK Integration](ai-sdk.md) - embedded snapshot, dynamic streamer, URL rules, reasoning +- [Sessions](sessions.md) - SQLite persistence, session lifecycle, JSONL export +- [Skills](skills.md) - SKILL.md discovery, frontmatter parsing, prompt rendering + +### Extensibility + +- [Plugin SDK](plugins.md) - gRPC extension system, tools, slash commands, lifecycle events diff --git a/docs-2/architecture/index.md b/docs-2/architecture/index.md new file mode 100644 index 000000000..a83c98d0b --- /dev/null +++ b/docs-2/architecture/index.md @@ -0,0 +1,16 @@ +# Architecture + +Archie is a personal agent platform built around six domain boundaries: + +- Identity tracks users and other actors responsible for actions. +- Agent owns persistent assistants, specialisation, and continuity. +- Messaging owns conversations, messages, branches, and channel correlation. +- Workflow owns reusable, versioned behaviour definitions and their executions. +- Work Intake admits optional durable work without constraining ordinary agent + conversation or direct capability use. +- Plugin owns generic extension discovery and lifecycle; each capability family + owns its typed plugin contract. + +The detailed architecture and migration decisions are maintained under +`docs/prds/architecture/` in the repository while this generated site is being +assembled. diff --git a/docs-2/index.md b/docs-2/index.md new file mode 100644 index 000000000..4a28de7d9 --- /dev/null +++ b/docs-2/index.md @@ -0,0 +1,25 @@ +--- +layout: home + +hero: + name: Archie + text: Personal agent platform + tagline: Durable agents, conversations, workflows, tools, and integrations. + image: + src: /favicon.svg + alt: Archie + actions: + - theme: brand + text: Architecture + link: /architecture/ + +features: + - title: Personal agents + details: Persistent assistants with their own identity, specialisation, and private memory. + - title: Conversations + details: Durable, branchable conversations across messaging channels. + - title: Workflows + details: Reusable, versioned behaviour definitions for structured and automated work. + - title: Extensible capabilities + details: Typed plugins, tools, channels, and infrastructure integrations. +--- diff --git a/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+abtesting@1.21.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-plugin-algolia-insights b/docs-2/node_modules/.pnpm/@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-plugin-algolia-insights new file mode 120000 index 000000000..f0351cd74 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-plugin-algolia-insights @@ -0,0 +1 @@ +../../../@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/@algolia/autocomplete-plugin-algolia-insights \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-shared b/docs-2/node_modules/.pnpm/@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-shared new file mode 120000 index 000000000..5ab4a668e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-shared @@ -0,0 +1 @@ +../../../@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/@algolia/autocomplete-shared b/docs-2/node_modules/.pnpm/@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/@algolia/autocomplete-shared new file mode 120000 index 000000000..5ab4a668e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/@algolia/autocomplete-shared @@ -0,0 +1 @@ +../../../@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/search-insights b/docs-2/node_modules/.pnpm/@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/search-insights new file mode 120000 index 000000000..686aa081d --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-plugin-algolia-insights@1.17.7_@algolia+client-search@5.55.1_algo_0b7c744a1ea982691c999438340aa842/node_modules/search-insights @@ -0,0 +1 @@ +../../search-insights@2.17.3/node_modules/search-insights \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared b/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared new file mode 120000 index 000000000..5ab4a668e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared @@ -0,0 +1 @@ +../../../@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/client-search b/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/client-search new file mode 120000 index 000000000..53b51c375 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/client-search @@ -0,0 +1 @@ +../../../@algolia+client-search@5.55.1/node_modules/@algolia/client-search \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/algoliasearch b/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/algoliasearch new file mode 120000 index 000000000..cbb4e4224 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/algoliasearch @@ -0,0 +1 @@ +../../algoliasearch@5.55.1/node_modules/algoliasearch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/client-search b/docs-2/node_modules/.pnpm/@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/client-search new file mode 120000 index 000000000..53b51c375 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/client-search @@ -0,0 +1 @@ +../../../@algolia+client-search@5.55.1/node_modules/@algolia/client-search \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/algoliasearch b/docs-2/node_modules/.pnpm/@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/algoliasearch new file mode 120000 index 000000000..cbb4e4224 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+autocomplete-shared@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/algoliasearch @@ -0,0 +1 @@ +../../algoliasearch@5.55.1/node_modules/algoliasearch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-abtesting@5.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-analytics@5.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-insights@5.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-personalization@5.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+client-search@5.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+ingestion@1.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+monitoring@1.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+recommend@5.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+requester-fetch@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+requester-fetch@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+requester-fetch@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@algolia+requester-node-http@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/@algolia+requester-node-http@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@algolia+requester-node-http@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@babel+parser@7.29.7/node_modules/@babel/types b/docs-2/node_modules/.pnpm/@babel+parser@7.29.7/node_modules/@babel/types new file mode 120000 index 000000000..f16031395 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@babel+parser@7.29.7/node_modules/@babel/types @@ -0,0 +1 @@ +../../../@babel+types@7.29.7/node_modules/@babel/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@babel+types@7.29.7/node_modules/@babel/helper-string-parser b/docs-2/node_modules/.pnpm/@babel+types@7.29.7/node_modules/@babel/helper-string-parser new file mode 120000 index 000000000..fe452aef4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@babel+types@7.29.7/node_modules/@babel/helper-string-parser @@ -0,0 +1 @@ +../../../@babel+helper-string-parser@7.29.7/node_modules/@babel/helper-string-parser \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@babel+types@7.29.7/node_modules/@babel/helper-validator-identifier b/docs-2/node_modules/.pnpm/@babel+types@7.29.7/node_modules/@babel/helper-validator-identifier new file mode 120000 index 000000000..874af4c37 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@babel+types@7.29.7/node_modules/@babel/helper-validator-identifier @@ -0,0 +1 @@ +../../../@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/react b/docs-2/node_modules/.pnpm/@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/react new file mode 120000 index 000000000..3565c116e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/react @@ -0,0 +1 @@ +../../../@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/react \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/preact b/docs-2/node_modules/.pnpm/@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/preact new file mode 120000 index 000000000..c4227f23f --- /dev/null +++ b/docs-2/node_modules/.pnpm/@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/preact @@ -0,0 +1 @@ +../../preact@10.29.3/node_modules/preact \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-core b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-core new file mode 120000 index 000000000..bb0721b01 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-core @@ -0,0 +1 @@ +../../../@algolia+autocomplete-core@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-preset-algolia b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-preset-algolia new file mode 120000 index 000000000..3840d6224 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@algolia/autocomplete-preset-algolia @@ -0,0 +1 @@ +../../../@algolia+autocomplete-preset-algolia@1.17.7_@algolia+client-search@5.55.1_algoliasearch@5.55.1/node_modules/@algolia/autocomplete-preset-algolia \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/css b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/css new file mode 120000 index 000000000..36d880ac4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/css @@ -0,0 +1 @@ +../../../@docsearch+css@3.8.2/node_modules/@docsearch/css \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/algoliasearch b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/algoliasearch new file mode 120000 index 000000000..cbb4e4224 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/algoliasearch @@ -0,0 +1 @@ +../../algoliasearch@5.55.1/node_modules/algoliasearch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/search-insights b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/search-insights new file mode 120000 index 000000000..686aa081d --- /dev/null +++ b/docs-2/node_modules/.pnpm/@docsearch+react@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/search-insights @@ -0,0 +1 @@ +../../search-insights@2.17.3/node_modules/search-insights \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@iconify-json+simple-icons@1.2.88/node_modules/@iconify/types b/docs-2/node_modules/.pnpm/@iconify-json+simple-icons@1.2.88/node_modules/@iconify/types new file mode 120000 index 000000000..933da83fc --- /dev/null +++ b/docs-2/node_modules/.pnpm/@iconify-json+simple-icons@1.2.88/node_modules/@iconify/types @@ -0,0 +1 @@ +../../../@iconify+types@2.0.0/node_modules/@iconify/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/engine-javascript b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/engine-javascript new file mode 120000 index 000000000..bd8b0c105 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/engine-javascript @@ -0,0 +1 @@ +../../../@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/engine-javascript \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/engine-oniguruma b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/engine-oniguruma new file mode 120000 index 000000000..ac975b5b7 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/engine-oniguruma @@ -0,0 +1 @@ +../../../@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/engine-oniguruma \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/types b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/types new file mode 120000 index 000000000..3af4f7967 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/types @@ -0,0 +1 @@ +../../../@shikijs+types@2.5.0/node_modules/@shikijs/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/vscode-textmate b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/vscode-textmate new file mode 120000 index 000000000..9a14c2e72 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@shikijs/vscode-textmate @@ -0,0 +1 @@ +../../../@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@types/hast b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@types/hast new file mode 120000 index 000000000..3bfde18b4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/@types/hast @@ -0,0 +1 @@ +../../../@types+hast@3.0.4/node_modules/@types/hast \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/hast-util-to-html b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/hast-util-to-html new file mode 120000 index 000000000..27ea22bae --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+core@2.5.0/node_modules/hast-util-to-html @@ -0,0 +1 @@ +../../hast-util-to-html@9.0.5/node_modules/hast-util-to-html \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/types b/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/types new file mode 120000 index 000000000..3af4f7967 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/types @@ -0,0 +1 @@ +../../../@shikijs+types@2.5.0/node_modules/@shikijs/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/vscode-textmate b/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/vscode-textmate new file mode 120000 index 000000000..9a14c2e72 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/vscode-textmate @@ -0,0 +1 @@ +../../../@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/oniguruma-to-es b/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/oniguruma-to-es new file mode 120000 index 000000000..637d59ea3 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+engine-javascript@2.5.0/node_modules/oniguruma-to-es @@ -0,0 +1 @@ +../../oniguruma-to-es@3.1.1/node_modules/oniguruma-to-es \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/types b/docs-2/node_modules/.pnpm/@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/types new file mode 120000 index 000000000..3af4f7967 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/types @@ -0,0 +1 @@ +../../../@shikijs+types@2.5.0/node_modules/@shikijs/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/vscode-textmate b/docs-2/node_modules/.pnpm/@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/vscode-textmate new file mode 120000 index 000000000..9a14c2e72 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/vscode-textmate @@ -0,0 +1 @@ +../../../@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+langs@2.5.0/node_modules/@shikijs/types b/docs-2/node_modules/.pnpm/@shikijs+langs@2.5.0/node_modules/@shikijs/types new file mode 120000 index 000000000..3af4f7967 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+langs@2.5.0/node_modules/@shikijs/types @@ -0,0 +1 @@ +../../../@shikijs+types@2.5.0/node_modules/@shikijs/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+themes@2.5.0/node_modules/@shikijs/types b/docs-2/node_modules/.pnpm/@shikijs+themes@2.5.0/node_modules/@shikijs/types new file mode 120000 index 000000000..3af4f7967 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+themes@2.5.0/node_modules/@shikijs/types @@ -0,0 +1 @@ +../../../@shikijs+types@2.5.0/node_modules/@shikijs/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+transformers@2.5.0/node_modules/@shikijs/core b/docs-2/node_modules/.pnpm/@shikijs+transformers@2.5.0/node_modules/@shikijs/core new file mode 120000 index 000000000..296b4848d --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+transformers@2.5.0/node_modules/@shikijs/core @@ -0,0 +1 @@ +../../../@shikijs+core@2.5.0/node_modules/@shikijs/core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+transformers@2.5.0/node_modules/@shikijs/types b/docs-2/node_modules/.pnpm/@shikijs+transformers@2.5.0/node_modules/@shikijs/types new file mode 120000 index 000000000..3af4f7967 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+transformers@2.5.0/node_modules/@shikijs/types @@ -0,0 +1 @@ +../../../@shikijs+types@2.5.0/node_modules/@shikijs/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+types@2.5.0/node_modules/@shikijs/vscode-textmate b/docs-2/node_modules/.pnpm/@shikijs+types@2.5.0/node_modules/@shikijs/vscode-textmate new file mode 120000 index 000000000..9a14c2e72 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+types@2.5.0/node_modules/@shikijs/vscode-textmate @@ -0,0 +1 @@ +../../../@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@shikijs+types@2.5.0/node_modules/@types/hast b/docs-2/node_modules/.pnpm/@shikijs+types@2.5.0/node_modules/@types/hast new file mode 120000 index 000000000..3bfde18b4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@shikijs+types@2.5.0/node_modules/@types/hast @@ -0,0 +1 @@ +../../../@types+hast@3.0.4/node_modules/@types/hast \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@types+hast@3.0.4/node_modules/@types/unist b/docs-2/node_modules/.pnpm/@types+hast@3.0.4/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@types+hast@3.0.4/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@types+markdown-it@14.1.2/node_modules/@types/linkify-it b/docs-2/node_modules/.pnpm/@types+markdown-it@14.1.2/node_modules/@types/linkify-it new file mode 120000 index 000000000..d0f17b8b9 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@types+markdown-it@14.1.2/node_modules/@types/linkify-it @@ -0,0 +1 @@ +../../../@types+linkify-it@5.0.0/node_modules/@types/linkify-it \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@types+markdown-it@14.1.2/node_modules/@types/mdurl b/docs-2/node_modules/.pnpm/@types+markdown-it@14.1.2/node_modules/@types/mdurl new file mode 120000 index 000000000..2de18310a --- /dev/null +++ b/docs-2/node_modules/.pnpm/@types+markdown-it@14.1.2/node_modules/@types/mdurl @@ -0,0 +1 @@ +../../../@types+mdurl@2.0.0/node_modules/@types/mdurl \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/unist b/docs-2/node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@types+mdast@4.0.4/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/vite b/docs-2/node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/vite new file mode 120000 index 000000000..6ec49d0af --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/vite @@ -0,0 +1 @@ +../../vite@5.4.21/node_modules/vite \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/vue b/docs-2/node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/vue new file mode 120000 index 000000000..238ce5a02 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/vue @@ -0,0 +1 @@ +../../vue@3.5.39/node_modules/vue \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/@babel/parser b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/@babel/parser new file mode 120000 index 000000000..393b548ca --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/@babel/parser @@ -0,0 +1 @@ +../../../@babel+parser@7.29.7/node_modules/@babel/parser \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/entities b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/entities new file mode 120000 index 000000000..9f1babb52 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/entities @@ -0,0 +1 @@ +../../entities@7.0.1/node_modules/entities \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/estree-walker b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/estree-walker new file mode 120000 index 000000000..5bb3bd65b --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/estree-walker @@ -0,0 +1 @@ +../../estree-walker@2.0.2/node_modules/estree-walker \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/source-map-js b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/source-map-js new file mode 120000 index 000000000..6b56330cd --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-core@3.5.39/node_modules/source-map-js @@ -0,0 +1 @@ +../../source-map-js@1.2.1/node_modules/source-map-js \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-dom@3.5.39/node_modules/@vue/compiler-core b/docs-2/node_modules/.pnpm/@vue+compiler-dom@3.5.39/node_modules/@vue/compiler-core new file mode 120000 index 000000000..9c050ea8b --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-dom@3.5.39/node_modules/@vue/compiler-core @@ -0,0 +1 @@ +../../../@vue+compiler-core@3.5.39/node_modules/@vue/compiler-core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-dom@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/@vue+compiler-dom@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-dom@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@babel/parser b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@babel/parser new file mode 120000 index 000000000..393b548ca --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@babel/parser @@ -0,0 +1 @@ +../../../@babel+parser@7.29.7/node_modules/@babel/parser \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-core b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-core new file mode 120000 index 000000000..9c050ea8b --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-core @@ -0,0 +1 @@ +../../../@vue+compiler-core@3.5.39/node_modules/@vue/compiler-core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-dom b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-dom new file mode 120000 index 000000000..da35c56ba --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-dom @@ -0,0 +1 @@ +../../../@vue+compiler-dom@3.5.39/node_modules/@vue/compiler-dom \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-ssr b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-ssr new file mode 120000 index 000000000..2793a0a54 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-ssr @@ -0,0 +1 @@ +../../../@vue+compiler-ssr@3.5.39/node_modules/@vue/compiler-ssr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/estree-walker b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/estree-walker new file mode 120000 index 000000000..5bb3bd65b --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/estree-walker @@ -0,0 +1 @@ +../../estree-walker@2.0.2/node_modules/estree-walker \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/magic-string b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/magic-string new file mode 120000 index 000000000..d8398aa5d --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/magic-string @@ -0,0 +1 @@ +../../magic-string@0.30.21/node_modules/magic-string \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/postcss b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/postcss new file mode 120000 index 000000000..672ee8d2e --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/postcss @@ -0,0 +1 @@ +../../postcss@8.5.16/node_modules/postcss \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/source-map-js b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/source-map-js new file mode 120000 index 000000000..6b56330cd --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-sfc@3.5.39/node_modules/source-map-js @@ -0,0 +1 @@ +../../source-map-js@1.2.1/node_modules/source-map-js \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-ssr@3.5.39/node_modules/@vue/compiler-dom b/docs-2/node_modules/.pnpm/@vue+compiler-ssr@3.5.39/node_modules/@vue/compiler-dom new file mode 120000 index 000000000..da35c56ba --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-ssr@3.5.39/node_modules/@vue/compiler-dom @@ -0,0 +1 @@ +../../../@vue+compiler-dom@3.5.39/node_modules/@vue/compiler-dom \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+compiler-ssr@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/@vue+compiler-ssr@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+compiler-ssr@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-api@7.7.10/node_modules/@vue/devtools-kit b/docs-2/node_modules/.pnpm/@vue+devtools-api@7.7.10/node_modules/@vue/devtools-kit new file mode 120000 index 000000000..06330bcaf --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-api@7.7.10/node_modules/@vue/devtools-kit @@ -0,0 +1 @@ +../../../@vue+devtools-kit@7.7.10/node_modules/@vue/devtools-kit \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/@vue/devtools-shared b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/@vue/devtools-shared new file mode 120000 index 000000000..3932dac4f --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/@vue/devtools-shared @@ -0,0 +1 @@ +../../../@vue+devtools-shared@7.7.10/node_modules/@vue/devtools-shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/birpc b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/birpc new file mode 120000 index 000000000..2cc539a98 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/birpc @@ -0,0 +1 @@ +../../birpc@2.9.0/node_modules/birpc \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/hookable b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/hookable new file mode 120000 index 000000000..364b62a4a --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/hookable @@ -0,0 +1 @@ +../../hookable@5.5.3/node_modules/hookable \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/mitt b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/mitt new file mode 120000 index 000000000..21d47d3a3 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/mitt @@ -0,0 +1 @@ +../../mitt@3.0.1/node_modules/mitt \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/perfect-debounce b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/perfect-debounce new file mode 120000 index 000000000..201c2d2e3 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/perfect-debounce @@ -0,0 +1 @@ +../../perfect-debounce@1.0.0/node_modules/perfect-debounce \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/speakingurl b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/speakingurl new file mode 120000 index 000000000..f8ef81134 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/speakingurl @@ -0,0 +1 @@ +../../speakingurl@14.0.1/node_modules/speakingurl \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/superjson b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/superjson new file mode 120000 index 000000000..9ac60d034 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-kit@7.7.10/node_modules/superjson @@ -0,0 +1 @@ +../../superjson@2.2.6/node_modules/superjson \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+devtools-shared@7.7.10/node_modules/rfdc b/docs-2/node_modules/.pnpm/@vue+devtools-shared@7.7.10/node_modules/rfdc new file mode 120000 index 000000000..1ff8f81c8 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+devtools-shared@7.7.10/node_modules/rfdc @@ -0,0 +1 @@ +../../rfdc@1.4.1/node_modules/rfdc \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+reactivity@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/@vue+reactivity@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+reactivity@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+runtime-core@3.5.39/node_modules/@vue/reactivity b/docs-2/node_modules/.pnpm/@vue+runtime-core@3.5.39/node_modules/@vue/reactivity new file mode 120000 index 000000000..0e538b01c --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+runtime-core@3.5.39/node_modules/@vue/reactivity @@ -0,0 +1 @@ +../../../@vue+reactivity@3.5.39/node_modules/@vue/reactivity \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+runtime-core@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/@vue+runtime-core@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+runtime-core@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/reactivity b/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/reactivity new file mode 120000 index 000000000..0e538b01c --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/reactivity @@ -0,0 +1 @@ +../../../@vue+reactivity@3.5.39/node_modules/@vue/reactivity \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/runtime-core b/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/runtime-core new file mode 120000 index 000000000..aad99b42b --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/runtime-core @@ -0,0 +1 @@ +../../../@vue+runtime-core@3.5.39/node_modules/@vue/runtime-core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/csstype b/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/csstype new file mode 120000 index 000000000..f87963d3c --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+runtime-dom@3.5.39/node_modules/csstype @@ -0,0 +1 @@ +../../csstype@3.2.3/node_modules/csstype \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/compiler-ssr b/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/compiler-ssr new file mode 120000 index 000000000..2793a0a54 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/compiler-ssr @@ -0,0 +1 @@ +../../../@vue+compiler-ssr@3.5.39/node_modules/@vue/compiler-ssr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/vue b/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/vue new file mode 120000 index 000000000..238ce5a02 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/vue @@ -0,0 +1 @@ +../../vue@3.5.39/node_modules/vue \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@types/web-bluetooth b/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@types/web-bluetooth new file mode 120000 index 000000000..de6d802ab --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@types/web-bluetooth @@ -0,0 +1 @@ +../../../@types+web-bluetooth@0.0.21/node_modules/@types/web-bluetooth \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/metadata b/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/metadata new file mode 120000 index 000000000..0fca0e321 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/metadata @@ -0,0 +1 @@ +../../../@vueuse+metadata@12.8.2/node_modules/@vueuse/metadata \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/shared b/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/shared new file mode 120000 index 000000000..174d6b8a3 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/@vueuse/shared @@ -0,0 +1 @@ +../../../@vueuse+shared@12.8.2/node_modules/@vueuse/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/vue b/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/vue new file mode 120000 index 000000000..238ce5a02 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+core@12.8.2/node_modules/vue @@ -0,0 +1 @@ +../../vue@3.5.39/node_modules/vue \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/core b/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/core new file mode 120000 index 000000000..3ca528b29 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/core @@ -0,0 +1 @@ +../../../@vueuse+core@12.8.2/node_modules/@vueuse/core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/shared b/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/shared new file mode 120000 index 000000000..174d6b8a3 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/shared @@ -0,0 +1 @@ +../../../@vueuse+shared@12.8.2/node_modules/@vueuse/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/focus-trap b/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/focus-trap new file mode 120000 index 000000000..dd4f672d7 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/focus-trap @@ -0,0 +1 @@ +../../focus-trap@7.8.0/node_modules/focus-trap \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/vue b/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/vue new file mode 120000 index 000000000..238ce5a02 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/vue @@ -0,0 +1 @@ +../../vue@3.5.39/node_modules/vue \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/@vueuse+shared@12.8.2/node_modules/vue b/docs-2/node_modules/.pnpm/@vueuse+shared@12.8.2/node_modules/vue new file mode 120000 index 000000000..238ce5a02 --- /dev/null +++ b/docs-2/node_modules/.pnpm/@vueuse+shared@12.8.2/node_modules/vue @@ -0,0 +1 @@ +../../vue@3.5.39/node_modules/vue \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/abtesting b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/abtesting new file mode 120000 index 000000000..98d7dda7e --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/abtesting @@ -0,0 +1 @@ +../../../@algolia+abtesting@1.21.1/node_modules/@algolia/abtesting \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-abtesting b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-abtesting new file mode 120000 index 000000000..7094ca684 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-abtesting @@ -0,0 +1 @@ +../../../@algolia+client-abtesting@5.55.1/node_modules/@algolia/client-abtesting \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-analytics b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-analytics new file mode 120000 index 000000000..6c0575a69 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-analytics @@ -0,0 +1 @@ +../../../@algolia+client-analytics@5.55.1/node_modules/@algolia/client-analytics \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-common b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-common new file mode 120000 index 000000000..96300677e --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-common @@ -0,0 +1 @@ +../../../@algolia+client-common@5.55.1/node_modules/@algolia/client-common \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-insights b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-insights new file mode 120000 index 000000000..a4b5fff3c --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-insights @@ -0,0 +1 @@ +../../../@algolia+client-insights@5.55.1/node_modules/@algolia/client-insights \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-personalization b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-personalization new file mode 120000 index 000000000..60a50cc7d --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-personalization @@ -0,0 +1 @@ +../../../@algolia+client-personalization@5.55.1/node_modules/@algolia/client-personalization \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-query-suggestions b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-query-suggestions new file mode 120000 index 000000000..0b00844b0 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-query-suggestions @@ -0,0 +1 @@ +../../../@algolia+client-query-suggestions@5.55.1/node_modules/@algolia/client-query-suggestions \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-search b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-search new file mode 120000 index 000000000..53b51c375 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/client-search @@ -0,0 +1 @@ +../../../@algolia+client-search@5.55.1/node_modules/@algolia/client-search \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/ingestion b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/ingestion new file mode 120000 index 000000000..4818147b5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/ingestion @@ -0,0 +1 @@ +../../../@algolia+ingestion@1.55.1/node_modules/@algolia/ingestion \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/monitoring b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/monitoring new file mode 120000 index 000000000..7efd47a72 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/monitoring @@ -0,0 +1 @@ +../../../@algolia+monitoring@1.55.1/node_modules/@algolia/monitoring \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/recommend b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/recommend new file mode 120000 index 000000000..7ec473206 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/recommend @@ -0,0 +1 @@ +../../../@algolia+recommend@5.55.1/node_modules/@algolia/recommend \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-browser-xhr b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-browser-xhr new file mode 120000 index 000000000..e06af42d5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-browser-xhr @@ -0,0 +1 @@ +../../../@algolia+requester-browser-xhr@5.55.1/node_modules/@algolia/requester-browser-xhr \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-fetch b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-fetch new file mode 120000 index 000000000..3f8311879 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-fetch @@ -0,0 +1 @@ +../../../@algolia+requester-fetch@5.55.1/node_modules/@algolia/requester-fetch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-node-http b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-node-http new file mode 120000 index 000000000..55f85dce2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/algoliasearch@5.55.1/node_modules/@algolia/requester-node-http @@ -0,0 +1 @@ +../../../@algolia+requester-node-http@5.55.1/node_modules/@algolia/requester-node-http \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/copy-anything@4.0.5/node_modules/is-what b/docs-2/node_modules/.pnpm/copy-anything@4.0.5/node_modules/is-what new file mode 120000 index 000000000..e02730ac3 --- /dev/null +++ b/docs-2/node_modules/.pnpm/copy-anything@4.0.5/node_modules/is-what @@ -0,0 +1 @@ +../../is-what@5.5.0/node_modules/is-what \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/devlop@1.1.0/node_modules/dequal b/docs-2/node_modules/.pnpm/devlop@1.1.0/node_modules/dequal new file mode 120000 index 000000000..cb5b4b20d --- /dev/null +++ b/docs-2/node_modules/.pnpm/devlop@1.1.0/node_modules/dequal @@ -0,0 +1 @@ +../../dequal@2.0.3/node_modules/dequal \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/esbuild@0.21.5/node_modules/@esbuild/linux-x64 b/docs-2/node_modules/.pnpm/esbuild@0.21.5/node_modules/@esbuild/linux-x64 new file mode 120000 index 000000000..c6c795d12 --- /dev/null +++ b/docs-2/node_modules/.pnpm/esbuild@0.21.5/node_modules/@esbuild/linux-x64 @@ -0,0 +1 @@ +../../../@esbuild+linux-x64@0.21.5/node_modules/@esbuild/linux-x64 \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/focus-trap@7.8.0/node_modules/tabbable b/docs-2/node_modules/.pnpm/focus-trap@7.8.0/node_modules/tabbable new file mode 120000 index 000000000..2468461ef --- /dev/null +++ b/docs-2/node_modules/.pnpm/focus-trap@7.8.0/node_modules/tabbable @@ -0,0 +1 @@ +../../tabbable@6.5.0/node_modules/tabbable \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/@types/hast b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/@types/hast new file mode 120000 index 000000000..3bfde18b4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/@types/hast @@ -0,0 +1 @@ +../../../@types+hast@3.0.4/node_modules/@types/hast \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/@types/unist b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/ccount b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/ccount new file mode 120000 index 000000000..5e1ea23ec --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/ccount @@ -0,0 +1 @@ +../../ccount@2.0.1/node_modules/ccount \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/comma-separated-tokens b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/comma-separated-tokens new file mode 120000 index 000000000..6d7b046dd --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/comma-separated-tokens @@ -0,0 +1 @@ +../../comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-whitespace b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-whitespace new file mode 120000 index 000000000..786e9c185 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-whitespace @@ -0,0 +1 @@ +../../hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/html-void-elements b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/html-void-elements new file mode 120000 index 000000000..83d3e086b --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/html-void-elements @@ -0,0 +1 @@ +../../html-void-elements@3.0.0/node_modules/html-void-elements \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/mdast-util-to-hast b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/mdast-util-to-hast new file mode 120000 index 000000000..2d5487c30 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/mdast-util-to-hast @@ -0,0 +1 @@ +../../mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/property-information b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/property-information new file mode 120000 index 000000000..32b30d0e9 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/property-information @@ -0,0 +1 @@ +../../property-information@7.2.0/node_modules/property-information \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/space-separated-tokens b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/space-separated-tokens new file mode 120000 index 000000000..7a65427a8 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/space-separated-tokens @@ -0,0 +1 @@ +../../space-separated-tokens@2.0.2/node_modules/space-separated-tokens \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/stringify-entities b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/stringify-entities new file mode 120000 index 000000000..822c15a56 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/stringify-entities @@ -0,0 +1 @@ +../../stringify-entities@4.0.4/node_modules/stringify-entities \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/zwitch b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/zwitch new file mode 120000 index 000000000..9df36d396 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/zwitch @@ -0,0 +1 @@ +../../zwitch@2.0.4/node_modules/zwitch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/@types/hast b/docs-2/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/@types/hast new file mode 120000 index 000000000..3bfde18b4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/@types/hast @@ -0,0 +1 @@ +../../../@types+hast@3.0.4/node_modules/@types/hast \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/magic-string@0.30.21/node_modules/@jridgewell/sourcemap-codec b/docs-2/node_modules/.pnpm/magic-string@0.30.21/node_modules/@jridgewell/sourcemap-codec new file mode 120000 index 000000000..ab4324ccf --- /dev/null +++ b/docs-2/node_modules/.pnpm/magic-string@0.30.21/node_modules/@jridgewell/sourcemap-codec @@ -0,0 +1 @@ +../../../@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@types/hast b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@types/hast new file mode 120000 index 000000000..3bfde18b4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@types/hast @@ -0,0 +1 @@ +../../../@types+hast@3.0.4/node_modules/@types/hast \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@types/mdast b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@types/mdast new file mode 120000 index 000000000..b31f0e420 --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@types/mdast @@ -0,0 +1 @@ +../../../@types+mdast@4.0.4/node_modules/@types/mdast \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@ungap/structured-clone b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@ungap/structured-clone new file mode 120000 index 000000000..762c48ae5 --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/@ungap/structured-clone @@ -0,0 +1 @@ +../../../@ungap+structured-clone@1.3.2/node_modules/@ungap/structured-clone \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/devlop b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/devlop new file mode 120000 index 000000000..2d4121c6c --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/devlop @@ -0,0 +1 @@ +../../devlop@1.1.0/node_modules/devlop \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/micromark-util-sanitize-uri b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/micromark-util-sanitize-uri new file mode 120000 index 000000000..2c698ad71 --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/micromark-util-sanitize-uri @@ -0,0 +1 @@ +../../micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/trim-lines b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/trim-lines new file mode 120000 index 000000000..209b4190d --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/trim-lines @@ -0,0 +1 @@ +../../trim-lines@3.0.1/node_modules/trim-lines \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/unist-util-position b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/unist-util-position new file mode 120000 index 000000000..8d5cd443c --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/unist-util-position @@ -0,0 +1 @@ +../../unist-util-position@5.0.0/node_modules/unist-util-position \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/unist-util-visit b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/unist-util-visit new file mode 120000 index 000000000..39ce4f157 --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/unist-util-visit @@ -0,0 +1 @@ +../../unist-util-visit@5.1.0/node_modules/unist-util-visit \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/vfile b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/vfile new file mode 120000 index 000000000..71f60015b --- /dev/null +++ b/docs-2/node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/vfile @@ -0,0 +1 @@ +../../vfile@6.0.3/node_modules/vfile \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-symbol b/docs-2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-symbol new file mode 120000 index 000000000..c157c5f2f --- /dev/null +++ b/docs-2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-symbol @@ -0,0 +1 @@ +../../micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-types b/docs-2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-types new file mode 120000 index 000000000..97bf64a4d --- /dev/null +++ b/docs-2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-types @@ -0,0 +1 @@ +../../micromark-util-types@2.0.2/node_modules/micromark-util-types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-character b/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-character new file mode 120000 index 000000000..f228b3ef6 --- /dev/null +++ b/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-character @@ -0,0 +1 @@ +../../micromark-util-character@2.1.1/node_modules/micromark-util-character \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-encode b/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-encode new file mode 120000 index 000000000..e37030bda --- /dev/null +++ b/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-encode @@ -0,0 +1 @@ +../../micromark-util-encode@2.0.1/node_modules/micromark-util-encode \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-symbol b/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-symbol new file mode 120000 index 000000000..c157c5f2f --- /dev/null +++ b/docs-2/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-symbol @@ -0,0 +1 @@ +../../micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/emoji-regex-xs b/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/emoji-regex-xs new file mode 120000 index 000000000..0aa28172b --- /dev/null +++ b/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/emoji-regex-xs @@ -0,0 +1 @@ +../../emoji-regex-xs@1.0.0/node_modules/emoji-regex-xs \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/regex b/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/regex new file mode 120000 index 000000000..506965e9e --- /dev/null +++ b/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/regex @@ -0,0 +1 @@ +../../regex@6.1.0/node_modules/regex \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/regex-recursion b/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/regex-recursion new file mode 120000 index 000000000..22e5061c6 --- /dev/null +++ b/docs-2/node_modules/.pnpm/oniguruma-to-es@3.1.1/node_modules/regex-recursion @@ -0,0 +1 @@ +../../regex-recursion@6.0.2/node_modules/regex-recursion \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/nanoid b/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/nanoid new file mode 120000 index 000000000..bff145f9f --- /dev/null +++ b/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/nanoid @@ -0,0 +1 @@ +../../nanoid@3.3.15/node_modules/nanoid \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/picocolors b/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/picocolors new file mode 120000 index 000000000..e301a8d8a --- /dev/null +++ b/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/picocolors @@ -0,0 +1 @@ +../../picocolors@1.1.1/node_modules/picocolors \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/source-map-js b/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/source-map-js new file mode 120000 index 000000000..6b56330cd --- /dev/null +++ b/docs-2/node_modules/.pnpm/postcss@8.5.16/node_modules/source-map-js @@ -0,0 +1 @@ +../../source-map-js@1.2.1/node_modules/source-map-js \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-utilities b/docs-2/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-utilities new file mode 120000 index 000000000..5d61f116a --- /dev/null +++ b/docs-2/node_modules/.pnpm/regex-recursion@6.0.2/node_modules/regex-utilities @@ -0,0 +1 @@ +../../regex-utilities@2.3.0/node_modules/regex-utilities \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/regex@6.1.0/node_modules/regex-utilities b/docs-2/node_modules/.pnpm/regex@6.1.0/node_modules/regex-utilities new file mode 120000 index 000000000..5d61f116a --- /dev/null +++ b/docs-2/node_modules/.pnpm/regex@6.1.0/node_modules/regex-utilities @@ -0,0 +1 @@ +../../regex-utilities@2.3.0/node_modules/regex-utilities \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/rollup@4.62.2/node_modules/@rollup/rollup-linux-x64-gnu b/docs-2/node_modules/.pnpm/rollup@4.62.2/node_modules/@rollup/rollup-linux-x64-gnu new file mode 120000 index 000000000..ac44cfe04 --- /dev/null +++ b/docs-2/node_modules/.pnpm/rollup@4.62.2/node_modules/@rollup/rollup-linux-x64-gnu @@ -0,0 +1 @@ +../../../@rollup+rollup-linux-x64-gnu@4.62.2/node_modules/@rollup/rollup-linux-x64-gnu \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/rollup@4.62.2/node_modules/@types/estree b/docs-2/node_modules/.pnpm/rollup@4.62.2/node_modules/@types/estree new file mode 120000 index 000000000..fda8efea6 --- /dev/null +++ b/docs-2/node_modules/.pnpm/rollup@4.62.2/node_modules/@types/estree @@ -0,0 +1 @@ +../../../@types+estree@1.0.9/node_modules/@types/estree \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/core b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/core new file mode 120000 index 000000000..296b4848d --- /dev/null +++ b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/core @@ -0,0 +1 @@ +../../../@shikijs+core@2.5.0/node_modules/@shikijs/core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/engine-javascript b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/engine-javascript new file mode 120000 index 000000000..bd8b0c105 --- /dev/null +++ b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/engine-javascript @@ -0,0 +1 @@ +../../../@shikijs+engine-javascript@2.5.0/node_modules/@shikijs/engine-javascript \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/engine-oniguruma b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/engine-oniguruma new file mode 120000 index 000000000..ac975b5b7 --- /dev/null +++ b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/engine-oniguruma @@ -0,0 +1 @@ +../../../@shikijs+engine-oniguruma@2.5.0/node_modules/@shikijs/engine-oniguruma \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/langs b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/langs new file mode 120000 index 000000000..e3a6ca8f6 --- /dev/null +++ b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/langs @@ -0,0 +1 @@ +../../../@shikijs+langs@2.5.0/node_modules/@shikijs/langs \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/themes b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/themes new file mode 120000 index 000000000..4f6a27039 --- /dev/null +++ b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/themes @@ -0,0 +1 @@ +../../../@shikijs+themes@2.5.0/node_modules/@shikijs/themes \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/types b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/types new file mode 120000 index 000000000..3af4f7967 --- /dev/null +++ b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/types @@ -0,0 +1 @@ +../../../@shikijs+types@2.5.0/node_modules/@shikijs/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/vscode-textmate b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/vscode-textmate new file mode 120000 index 000000000..9a14c2e72 --- /dev/null +++ b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@shikijs/vscode-textmate @@ -0,0 +1 @@ +../../../@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@types/hast b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@types/hast new file mode 120000 index 000000000..3bfde18b4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/shiki@2.5.0/node_modules/@types/hast @@ -0,0 +1 @@ +../../../@types+hast@3.0.4/node_modules/@types/hast \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/character-entities-html4 b/docs-2/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/character-entities-html4 new file mode 120000 index 000000000..c9a8aacd3 --- /dev/null +++ b/docs-2/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/character-entities-html4 @@ -0,0 +1 @@ +../../character-entities-html4@2.1.0/node_modules/character-entities-html4 \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/character-entities-legacy b/docs-2/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/character-entities-legacy new file mode 120000 index 000000000..011758bed --- /dev/null +++ b/docs-2/node_modules/.pnpm/stringify-entities@4.0.4/node_modules/character-entities-legacy @@ -0,0 +1 @@ +../../character-entities-legacy@3.0.0/node_modules/character-entities-legacy \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/superjson@2.2.6/node_modules/copy-anything b/docs-2/node_modules/.pnpm/superjson@2.2.6/node_modules/copy-anything new file mode 120000 index 000000000..d0f231f5c --- /dev/null +++ b/docs-2/node_modules/.pnpm/superjson@2.2.6/node_modules/copy-anything @@ -0,0 +1 @@ +../../copy-anything@4.0.5/node_modules/copy-anything \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/@types/unist b/docs-2/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/@types/unist b/docs-2/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/@types/unist b/docs-2/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/@types/unist b/docs-2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-is b/docs-2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-is new file mode 120000 index 000000000..d671de365 --- /dev/null +++ b/docs-2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-is @@ -0,0 +1 @@ +../../unist-util-is@6.0.1/node_modules/unist-util-is \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/@types/unist b/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-is b/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-is new file mode 120000 index 000000000..d671de365 --- /dev/null +++ b/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-is @@ -0,0 +1 @@ +../../unist-util-is@6.0.1/node_modules/unist-util-is \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit-parents b/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit-parents new file mode 120000 index 000000000..9fffcea3e --- /dev/null +++ b/docs-2/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit-parents @@ -0,0 +1 @@ +../../unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vfile-message@4.0.3/node_modules/@types/unist b/docs-2/node_modules/.pnpm/vfile-message@4.0.3/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vfile-message@4.0.3/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vfile-message@4.0.3/node_modules/unist-util-stringify-position b/docs-2/node_modules/.pnpm/vfile-message@4.0.3/node_modules/unist-util-stringify-position new file mode 120000 index 000000000..95b76f4a1 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vfile-message@4.0.3/node_modules/unist-util-stringify-position @@ -0,0 +1 @@ +../../unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vfile@6.0.3/node_modules/@types/unist b/docs-2/node_modules/.pnpm/vfile@6.0.3/node_modules/@types/unist new file mode 120000 index 000000000..4a7889cc2 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vfile@6.0.3/node_modules/@types/unist @@ -0,0 +1 @@ +../../../@types+unist@3.0.3/node_modules/@types/unist \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile-message b/docs-2/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile-message new file mode 120000 index 000000000..ea3417f2a --- /dev/null +++ b/docs-2/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile-message @@ -0,0 +1 @@ +../../vfile-message@4.0.3/node_modules/vfile-message \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/esbuild b/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/esbuild new file mode 120000 index 000000000..bac3f176e --- /dev/null +++ b/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/esbuild @@ -0,0 +1 @@ +../../esbuild@0.21.5/node_modules/esbuild \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/postcss b/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/postcss new file mode 120000 index 000000000..672ee8d2e --- /dev/null +++ b/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/postcss @@ -0,0 +1 @@ +../../postcss@8.5.16/node_modules/postcss \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/rollup b/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/rollup new file mode 120000 index 000000000..2807d427e --- /dev/null +++ b/docs-2/node_modules/.pnpm/vite@5.4.21/node_modules/rollup @@ -0,0 +1 @@ +../../rollup@4.62.2/node_modules/rollup \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@docsearch/css b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@docsearch/css new file mode 120000 index 000000000..36d880ac4 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@docsearch/css @@ -0,0 +1 @@ +../../../@docsearch+css@3.8.2/node_modules/@docsearch/css \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@docsearch/js b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@docsearch/js new file mode 120000 index 000000000..0c02ced60 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@docsearch/js @@ -0,0 +1 @@ +../../../@docsearch+js@3.8.2_@algolia+client-search@5.55.1_search-insights@2.17.3/node_modules/@docsearch/js \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@iconify-json/simple-icons b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@iconify-json/simple-icons new file mode 120000 index 000000000..ee0deb868 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@iconify-json/simple-icons @@ -0,0 +1 @@ +../../../@iconify-json+simple-icons@1.2.88/node_modules/@iconify-json/simple-icons \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/core b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/core new file mode 120000 index 000000000..296b4848d --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/core @@ -0,0 +1 @@ +../../../@shikijs+core@2.5.0/node_modules/@shikijs/core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/transformers b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/transformers new file mode 120000 index 000000000..cd9c3ed9b --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/transformers @@ -0,0 +1 @@ +../../../@shikijs+transformers@2.5.0/node_modules/@shikijs/transformers \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/types b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/types new file mode 120000 index 000000000..3af4f7967 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@shikijs/types @@ -0,0 +1 @@ +../../../@shikijs+types@2.5.0/node_modules/@shikijs/types \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@types/markdown-it b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@types/markdown-it new file mode 120000 index 000000000..9e5f4bd7e --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@types/markdown-it @@ -0,0 +1 @@ +../../../@types+markdown-it@14.1.2/node_modules/@types/markdown-it \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vitejs/plugin-vue b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vitejs/plugin-vue new file mode 120000 index 000000000..00ca1bd8b --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vitejs/plugin-vue @@ -0,0 +1 @@ +../../../@vitejs+plugin-vue@5.2.4_vite@5.4.21_vue@3.5.39/node_modules/@vitejs/plugin-vue \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vue/devtools-api b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vue/devtools-api new file mode 120000 index 000000000..6a0fee816 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vue/devtools-api @@ -0,0 +1 @@ +../../../@vue+devtools-api@7.7.10/node_modules/@vue/devtools-api \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vueuse/core b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vueuse/core new file mode 120000 index 000000000..3ca528b29 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vueuse/core @@ -0,0 +1 @@ +../../../@vueuse+core@12.8.2/node_modules/@vueuse/core \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vueuse/integrations b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vueuse/integrations new file mode 120000 index 000000000..58bb39b95 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/@vueuse/integrations @@ -0,0 +1 @@ +../../../@vueuse+integrations@12.8.2_focus-trap@7.8.0/node_modules/@vueuse/integrations \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/focus-trap b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/focus-trap new file mode 120000 index 000000000..dd4f672d7 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/focus-trap @@ -0,0 +1 @@ +../../focus-trap@7.8.0/node_modules/focus-trap \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/mark.js b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/mark.js new file mode 120000 index 000000000..c54be069a --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/mark.js @@ -0,0 +1 @@ +../../mark.js@8.11.1/node_modules/mark.js \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/minisearch b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/minisearch new file mode 120000 index 000000000..9c294eb7b --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/minisearch @@ -0,0 +1 @@ +../../minisearch@7.2.0/node_modules/minisearch \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/postcss b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/postcss new file mode 120000 index 000000000..672ee8d2e --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/postcss @@ -0,0 +1 @@ +../../postcss@8.5.16/node_modules/postcss \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/shiki b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/shiki new file mode 120000 index 000000000..9f59831cc --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/shiki @@ -0,0 +1 @@ +../../shiki@2.5.0/node_modules/shiki \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/vite b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/vite new file mode 120000 index 000000000..6ec49d0af --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/vite @@ -0,0 +1 @@ +../../vite@5.4.21/node_modules/vite \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/vue b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/vue new file mode 120000 index 000000000..238ce5a02 --- /dev/null +++ b/docs-2/node_modules/.pnpm/vitepress@1.6.4_@algolia+client-search@5.55.1_postcss@8.5.16_search-insights@2.17.3/node_modules/vue @@ -0,0 +1 @@ +../../vue@3.5.39/node_modules/vue \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/compiler-dom b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/compiler-dom new file mode 120000 index 000000000..da35c56ba --- /dev/null +++ b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/compiler-dom @@ -0,0 +1 @@ +../../../@vue+compiler-dom@3.5.39/node_modules/@vue/compiler-dom \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/compiler-sfc b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/compiler-sfc new file mode 120000 index 000000000..96b99022f --- /dev/null +++ b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/compiler-sfc @@ -0,0 +1 @@ +../../../@vue+compiler-sfc@3.5.39/node_modules/@vue/compiler-sfc \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/runtime-dom b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/runtime-dom new file mode 120000 index 000000000..ebf4f136c --- /dev/null +++ b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/runtime-dom @@ -0,0 +1 @@ +../../../@vue+runtime-dom@3.5.39/node_modules/@vue/runtime-dom \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/server-renderer b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/server-renderer new file mode 120000 index 000000000..fddc4cf5d --- /dev/null +++ b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/server-renderer @@ -0,0 +1 @@ +../../../@vue+server-renderer@3.5.39_vue@3.5.39/node_modules/@vue/server-renderer \ No newline at end of file diff --git a/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/shared b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/shared new file mode 120000 index 000000000..5d9fd7edb --- /dev/null +++ b/docs-2/node_modules/.pnpm/vue@3.5.39/node_modules/@vue/shared @@ -0,0 +1 @@ +../../../@vue+shared@3.5.39/node_modules/@vue/shared \ No newline at end of file diff --git a/docs-2/package.json b/docs-2/package.json new file mode 100644 index 000000000..5b0833de9 --- /dev/null +++ b/docs-2/package.json @@ -0,0 +1,14 @@ +{ + "name": "archie-docs", + "type": "module", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vitepress dev . --port 5174", + "build": "vitepress build .", + "preview": "vitepress preview ." + }, + "devDependencies": { + "vitepress": "^1.6.4" + } +} diff --git a/docs-2/pnpm-lock.yaml b/docs-2/pnpm-lock.yaml new file mode 100644 index 000000000..7426344ae --- /dev/null +++ b/docs-2/pnpm-lock.yaml @@ -0,0 +1,1620 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + vitepress: + specifier: ^1.6.4 + version: 1.6.4(@algolia/client-search@5.55.1)(postcss@8.5.16)(search-insights@2.17.3) + +packages: + + '@algolia/abtesting@1.21.1': + resolution: {integrity: sha512-Wia5/mNTfiU0PIUN25UMfAGGdASkkwuCS9nBAdmhqrNPY/ff7U/6MgBVdwFDPsa3sA1msutPtO50gvOzx6MOXA==} + engines: {node: '>= 14.0.0'} + + '@algolia/autocomplete-core@1.17.7': + resolution: {integrity: sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q==} + + '@algolia/autocomplete-plugin-algolia-insights@1.17.7': + resolution: {integrity: sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A==} + peerDependencies: + search-insights: '>= 1 < 3' + + '@algolia/autocomplete-preset-algolia@1.17.7': + resolution: {integrity: sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + + '@algolia/autocomplete-shared@1.17.7': + resolution: {integrity: sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + + '@algolia/client-abtesting@5.55.1': + resolution: {integrity: sha512-miW8RzAtBgNiEJ9fGEhsOPgWUpekAe64YcVufqXrlykj0Jjmo5nj0a5f/HAzRVX5ZuU1GAVd7BkzFDx7q50P3A==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-analytics@5.55.1': + resolution: {integrity: sha512-eR3J3kB9JX6DdCvDRi3I4KPfwO6fR9HWYRXhVke2TXIoOQafMKCRAneg33JRmIrb+DnnJ/eWApJLF1O1CLPERg==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-common@5.55.1': + resolution: {integrity: sha512-P5ak7EurwYqgAiDyb95mgA3WRR/Zu8CPMv36lWTISvL2AmlPyqQPy2nX/KEJRTcwaeTWwrk6wJV4/M93GfjOWw==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-insights@5.55.1': + resolution: {integrity: sha512-OVtj9uA//+pjvKQI5INnzbyLrf3ClNv3XRbWswwJ2kHIStQNHtBfHo+LofNB/WhM9xjuXlW5ANn2aMj65UGx7w==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-personalization@5.55.1': + resolution: {integrity: sha512-oKlVFlp+qbIEe4p7E54zSiP2gEV/vDu972Ykv8VDMFwEvreS7m0YKA3a8hGGHwc7yiBUGGiR3LlwzMLfnJmy6Q==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-query-suggestions@5.55.1': + resolution: {integrity: sha512-BOVrld6vdtsFmotVDMTVQfYXwrVplJ+DUvy60JFi+tkWV698q2J9NNPKEO3dr5qxtSLKQP4vHF8n+3U5PDWhOQ==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-search@5.55.1': + resolution: {integrity: sha512-GAqHl9zERhC3bbBfubwUu07G3UXO06gORvOcsiTBZB3et0s3auNUbHlYdYNp4VKa3sUZqH5AcD3OKzU/KDGXjQ==} + engines: {node: '>= 14.0.0'} + + '@algolia/ingestion@1.55.1': + resolution: {integrity: sha512-BXZw+C+gsWL7pZvbnhJUnCXASiDLGcQxVV7h55Pyh2DmSzwdZIVccE5xc9RVD2trtrhIqk5smuODTxtaZqd0IA==} + engines: {node: '>= 14.0.0'} + + '@algolia/monitoring@1.55.1': + resolution: {integrity: sha512-9g/ceZrZTqA62FA3588Xj0onRPjDNfu0pVQqefK0rrHp9H6Wblph/YmzGjZ2g8uqbTh0ZGIvAGCzErU8f7MHpA==} + engines: {node: '>= 14.0.0'} + + '@algolia/recommend@5.55.1': + resolution: {integrity: sha512-cZTIrGyAP+W4A6jDVwvWM/JOaoJKQkD/2a5eLUEeNdKAD45jN7BCpsMDONyhZlosLa4UwL8uiINQzj4iFy9nqg==} + engines: {node: '>= 14.0.0'} + + '@algolia/requester-browser-xhr@5.55.1': + resolution: {integrity: sha512-N6I3leW0UO8Y9Zv90yo2UHgYGuxZO0mjbvzNxDIJDjO0qECEF7Z9XMvSNeUWXQh/iNDA9lr8MfEy3rmZGIcclw==} + engines: {node: '>= 14.0.0'} + + '@algolia/requester-fetch@5.55.1': + resolution: {integrity: sha512-ukU5zeeFs44rQkzv+TRdYard+d+3lmPGs8lPZhHtWE8rfz+LlBSF6s9kP3VQ7LeOYL8Dz0u6tZfnyTrqrumbHQ==} + engines: {node: '>= 14.0.0'} + + '@algolia/requester-node-http@5.55.1': + resolution: {integrity: sha512-lCwXyijwPm3vbYHpBXPRomMcD6mgiptmps27gnMCf4HK+u/AOeFPBnIFh4V3l4A5SnP9VRiKBZqwGBpUH0vaTg==} + engines: {node: '>= 14.0.0'} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} + engines: {node: '>=6.9.0'} + + '@docsearch/css@3.8.2': + resolution: {integrity: sha512-y05ayQFyUmCXze79+56v/4HpycYF3uFqB78pLPrSV5ZKAlDuIAAJNhaRi8tTdRNXh05yxX/TyNnzD6LwSM89vQ==} + + '@docsearch/js@3.8.2': + resolution: {integrity: sha512-Q5wY66qHn0SwA7Taa0aDbHiJvaFJLOJyHmooQ7y8hlwwQLQ/5WwCcoX0g7ii04Qi2DJlHsd0XXzJ8Ypw9+9YmQ==} + + '@docsearch/react@3.8.2': + resolution: {integrity: sha512-xCRrJQlTt8N9GU0DG4ptwHRkfnSnD/YpdeaXe02iKfqs97TkZJv60yE+1eq/tjPcVnTW8dP5qLP7itifFVV5eg==} + peerDependencies: + '@types/react': '>= 16.8.0 < 19.0.0' + react: '>= 16.8.0 < 19.0.0' + react-dom: '>= 16.8.0 < 19.0.0' + search-insights: '>= 1 < 3' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + react-dom: + optional: true + search-insights: + optional: true + + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@iconify-json/simple-icons@1.2.88': + resolution: {integrity: sha512-+cvi1qCuvReL29ehi6t62L4fb7GDXe+UlGHFcsJcV7I2l9wtqn9XE2IBKcDr3CI5iGUGS5ISnXv699pSGpyx1Q==} + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@rollup/rollup-android-arm-eabi@4.62.2': + resolution: {integrity: sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.62.2': + resolution: {integrity: sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.62.2': + resolution: {integrity: sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.62.2': + resolution: {integrity: sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.62.2': + resolution: {integrity: sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.62.2': + resolution: {integrity: sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + resolution: {integrity: sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + resolution: {integrity: sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-arm64-gnu@4.62.2': + resolution: {integrity: sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm64-musl@4.62.2': + resolution: {integrity: sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-loong64-gnu@4.62.2': + resolution: {integrity: sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==} + cpu: [loong64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-loong64-musl@4.62.2': + resolution: {integrity: sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==} + cpu: [loong64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + resolution: {integrity: sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-ppc64-musl@4.62.2': + resolution: {integrity: sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==} + cpu: [ppc64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + resolution: {integrity: sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-musl@4.62.2': + resolution: {integrity: sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + resolution: {integrity: sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.62.2': + resolution: {integrity: sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-musl@4.62.2': + resolution: {integrity: sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rollup/rollup-openbsd-x64@4.62.2': + resolution: {integrity: sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.62.2': + resolution: {integrity: sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + resolution: {integrity: sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + resolution: {integrity: sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.62.2': + resolution: {integrity: sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.62.2': + resolution: {integrity: sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==} + cpu: [x64] + os: [win32] + + '@shikijs/core@2.5.0': + resolution: {integrity: sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg==} + + '@shikijs/engine-javascript@2.5.0': + resolution: {integrity: sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w==} + + '@shikijs/engine-oniguruma@2.5.0': + resolution: {integrity: sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw==} + + '@shikijs/langs@2.5.0': + resolution: {integrity: sha512-Qfrrt5OsNH5R+5tJ/3uYBBZv3SuGmnRPejV9IlIbFH3HTGLDlkqgHymAlzklVmKBjAaVmkPkyikAV/sQ1wSL+w==} + + '@shikijs/themes@2.5.0': + resolution: {integrity: sha512-wGrk+R8tJnO0VMzmUExHR+QdSaPUl/NKs+a4cQQRWyoc3YFbUzuLEi/KWK1hj+8BfHRKm2jNhhJck1dfstJpiw==} + + '@shikijs/transformers@2.5.0': + resolution: {integrity: sha512-SI494W5X60CaUwgi8u4q4m4s3YAFSxln3tzNjOSYqq54wlVgz0/NbbXEb3mdLbqMBztcmS7bVTaEd2w0qMmfeg==} + + '@shikijs/types@2.5.0': + resolution: {integrity: sha512-ygl5yhxki9ZLNuNpPitBWvcy9fsSKKaRuO4BAlMyagszQidxcpLAr0qiW/q43DtSIDxO6hEbtYLiFZNXO/hdGw==} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + + '@types/linkify-it@5.0.0': + resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} + + '@types/markdown-it@14.1.2': + resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} + + '@types/mdast@4.0.4': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + + '@types/mdurl@2.0.0': + resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} + + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + + '@types/web-bluetooth@0.0.21': + resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} + + '@ungap/structured-clone@1.3.2': + resolution: {integrity: sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==} + + '@vitejs/plugin-vue@5.2.4': + resolution: {integrity: sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^5.0.0 || ^6.0.0 + vue: ^3.2.25 + + '@vue/compiler-core@3.5.39': + resolution: {integrity: sha512-16KBTEXAJCpDr0mwlw+AZyhu8iyC7R3S2vBwsI7QnWJU6X3WKc9VKeNEZpiMdZ569qWhz9574L3vV55qRL0Vtw==} + + '@vue/compiler-dom@3.5.39': + resolution: {integrity: sha512-oQPigALqYbNxTNPvNgSOe+czwVExfbVF02lz8jP0S3AXJiu3jxYDygNUiqSep4ezzW8XgnubqH63My2A7JR/vg==} + + '@vue/compiler-sfc@3.5.39': + resolution: {integrity: sha512-d0ki86iOyN8LoZPBmk5SJWNwHP19CnDDCfuo//+2WJa2g5Ke0Jay983PIBIcSSzldC68I8DrD5GrHV3OSDfodg==} + + '@vue/compiler-ssr@3.5.39': + resolution: {integrity: sha512-Ce7/wvwMHai74bdszfXExdazFigYnlF9zgCmEQUcM1j0fOymlouZ7XilTYNo8oUjhlnjYOZbGrcYKuqjz89Ucw==} + + '@vue/devtools-api@7.7.10': + resolution: {integrity: sha512-KxtEpUOOpFz/qOGRrAwA36QF7DqIA+FXgCYit9mk9wjbaZt0sXOFz81ElOZtKA4HbWHUdwNjZHBFsFFyp5BZiA==} + + '@vue/devtools-kit@7.7.10': + resolution: {integrity: sha512-3WNi2Kq4tbpVbmhml7RiphmAt0279oh3fKNeWMQIrltfX8Q91b4i5PL8DtyNKdwmcsGrV4fg+erwWOmD05CLIw==} + + '@vue/devtools-shared@7.7.10': + resolution: {integrity: sha512-wOPslzB8vTvpxwdaOcR2qAbwmuSP0L+rhpoC6Cf56V3Jip+HWb7PQQXOUPgBNQARpXsbQX/+mvi8kKucmBGRwQ==} + + '@vue/reactivity@3.5.39': + resolution: {integrity: sha512-TpsuBJ9gGlZa5d23XcM2y8EXanz9dZeVDQBXRwzy46ItgvM+rWpzs+UVM0wcRLxGvcav0HE5jz2gNL53xlRAog==} + + '@vue/runtime-core@3.5.39': + resolution: {integrity: sha512-9GLtNyRvPAUMbX+7ono0RC2j0guo2LXVi8LvcmAooImACUKm0oFf0jjwbX8/H0AE/t1nxhAkn8RSl9PMCzzxZw==} + + '@vue/runtime-dom@3.5.39': + resolution: {integrity: sha512-7Y6aAGboKcXAZ3ECuUy7RrS5yy2r47dhTp2SKaJmYxjopImaVFaNa5Ne66NwGovsrxVAl5S5rwc7m22UG7Lmww==} + + '@vue/server-renderer@3.5.39': + resolution: {integrity: sha512-yZSakiAGw85rZfG7UM8akMnIF+FmeiNk47uvHf2nVBBSe+dIKUhZuZq9+XgJhbV3nS5Z4ALH23/MpXofW+mbcw==} + peerDependencies: + vue: 3.5.39 + + '@vue/shared@3.5.39': + resolution: {integrity: sha512-l1rrBtBfTnmxvtsvdQDXltUUy8S1Y+ZaqdfUzmAnJkTd8Z8rv5v/ytW+TKiqEOWyHPoqtPlNFSs0lhRmYVSHVA==} + + '@vueuse/core@12.8.2': + resolution: {integrity: sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ==} + + '@vueuse/integrations@12.8.2': + resolution: {integrity: sha512-fbGYivgK5uBTRt7p5F3zy6VrETlV9RtZjBqd1/HxGdjdckBgBM4ugP8LHpjolqTj14TXTxSK1ZfgPbHYyGuH7g==} + peerDependencies: + async-validator: ^4 + axios: ^1 + change-case: ^5 + drauu: ^0.4 + focus-trap: ^7 + fuse.js: ^7 + idb-keyval: ^6 + jwt-decode: ^4 + nprogress: ^0.2 + qrcode: ^1.5 + sortablejs: ^1 + universal-cookie: ^7 + peerDependenciesMeta: + async-validator: + optional: true + axios: + optional: true + change-case: + optional: true + drauu: + optional: true + focus-trap: + optional: true + fuse.js: + optional: true + idb-keyval: + optional: true + jwt-decode: + optional: true + nprogress: + optional: true + qrcode: + optional: true + sortablejs: + optional: true + universal-cookie: + optional: true + + '@vueuse/metadata@12.8.2': + resolution: {integrity: sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A==} + + '@vueuse/shared@12.8.2': + resolution: {integrity: sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w==} + + algoliasearch@5.55.1: + resolution: {integrity: sha512-FyaFnnsbVPtevQwqSj/SdxE3jAsSsY0BEH8IVLf9rXxEBdAhAmT6VKCVSMWoaPIHVN1Eufh/1w8q6k8URpIkWw==} + engines: {node: '>= 14.0.0'} + + birpc@2.9.0: + resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==} + + ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + + character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + + character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + + comma-separated-tokens@2.0.3: + resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + + copy-anything@4.0.5: + resolution: {integrity: sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA==} + engines: {node: '>=18'} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + + emoji-regex-xs@1.0.0: + resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} + + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} + engines: {node: '>=0.12'} + + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + focus-trap@7.8.0: + resolution: {integrity: sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + hast-util-to-html@9.0.5: + resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} + + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + + hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + + is-what@5.5.0: + resolution: {integrity: sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw==} + engines: {node: '>=18'} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + mark.js@8.11.1: + resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} + + mdast-util-to-hast@13.2.1: + resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} + + micromark-util-character@2.1.1: + resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} + + micromark-util-encode@2.0.1: + resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} + + micromark-util-sanitize-uri@2.0.1: + resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} + + micromark-util-symbol@2.0.1: + resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} + + micromark-util-types@2.0.2: + resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} + + minisearch@7.2.0: + resolution: {integrity: sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg==} + + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + + nanoid@3.3.15: + resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + oniguruma-to-es@3.1.1: + resolution: {integrity: sha512-bUH8SDvPkH3ho3dvwJwfonjlQ4R80vjyvrU8YpxuROddv55vAEJrTuCuCVUhhsHbtlD9tGGbaNApGQckXhS8iQ==} + + perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + postcss@8.5.16: + resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==} + engines: {node: ^10 || ^12 || >=14} + + preact@10.29.3: + resolution: {integrity: sha512-D9NL1GAnJZhc3RndVs4gDdxEeU9TcHgywMrhhOsnpdlvFjdbx0gAsLUnH6JEhlJH5giL7Tx5biWPUSEXE/HPzw==} + + property-information@7.2.0: + resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} + + regex-recursion@6.0.2: + resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} + + regex-utilities@2.3.0: + resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} + + regex@6.1.0: + resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==} + + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + + rollup@4.62.2: + resolution: {integrity: sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + search-insights@2.17.3: + resolution: {integrity: sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==} + + shiki@2.5.0: + resolution: {integrity: sha512-mI//trrsaiCIPsja5CNfsyNOqgAZUb6VpJA+340toL42UpzQlXpwRV9nch69X6gaUxrr9kaOOa6e3y3uAkGFxQ==} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + space-separated-tokens@2.0.2: + resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + + speakingurl@14.0.1: + resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} + engines: {node: '>=0.10.0'} + + stringify-entities@4.0.4: + resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} + + superjson@2.2.6: + resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==} + engines: {node: '>=16'} + + tabbable@6.5.0: + resolution: {integrity: sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA==} + + trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + + unist-util-is@6.0.1: + resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} + + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + + unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + + unist-util-visit-parents@6.0.2: + resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==} + + unist-util-visit@5.1.0: + resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} + + vfile-message@4.0.3: + resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} + + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + + vite@5.4.21: + resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vitepress@1.6.4: + resolution: {integrity: sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg==} + hasBin: true + peerDependencies: + markdown-it-mathjax3: ^4 + postcss: ^8 + peerDependenciesMeta: + markdown-it-mathjax3: + optional: true + postcss: + optional: true + + vue@3.5.39: + resolution: {integrity: sha512-xmZCYabFGcirU8r0fTuvl/LICc1OU620rnqepaJDL/a141ZigkG7AyaxQLdqJ02ZRYzWe6YPaDHeQx7MfknQfA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + +snapshots: + + '@algolia/abtesting@1.21.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/autocomplete-core@1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1)(search-insights@2.17.3)': + dependencies: + '@algolia/autocomplete-plugin-algolia-insights': 1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1)(search-insights@2.17.3) + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1) + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + - search-insights + + '@algolia/autocomplete-plugin-algolia-insights@1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1)(search-insights@2.17.3)': + dependencies: + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1) + search-insights: 2.17.3 + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + + '@algolia/autocomplete-preset-algolia@1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1)': + dependencies: + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1) + '@algolia/client-search': 5.55.1 + algoliasearch: 5.55.1 + + '@algolia/autocomplete-shared@1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1)': + dependencies: + '@algolia/client-search': 5.55.1 + algoliasearch: 5.55.1 + + '@algolia/client-abtesting@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/client-analytics@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/client-common@5.55.1': {} + + '@algolia/client-insights@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/client-personalization@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/client-query-suggestions@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/client-search@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/ingestion@1.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/monitoring@1.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/recommend@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + '@algolia/requester-browser-xhr@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + + '@algolia/requester-fetch@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + + '@algolia/requester-node-http@5.55.1': + dependencies: + '@algolia/client-common': 5.55.1 + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/parser@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/types@7.29.7': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@docsearch/css@3.8.2': {} + + '@docsearch/js@3.8.2(@algolia/client-search@5.55.1)(search-insights@2.17.3)': + dependencies: + '@docsearch/react': 3.8.2(@algolia/client-search@5.55.1)(search-insights@2.17.3) + preact: 10.29.3 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' + - react + - react-dom + - search-insights + + '@docsearch/react@3.8.2(@algolia/client-search@5.55.1)(search-insights@2.17.3)': + dependencies: + '@algolia/autocomplete-core': 1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1)(search-insights@2.17.3) + '@algolia/autocomplete-preset-algolia': 1.17.7(@algolia/client-search@5.55.1)(algoliasearch@5.55.1) + '@docsearch/css': 3.8.2 + algoliasearch: 5.55.1 + optionalDependencies: + search-insights: 2.17.3 + transitivePeerDependencies: + - '@algolia/client-search' + + '@esbuild/aix-ppc64@0.21.5': + optional: true + + '@esbuild/android-arm64@0.21.5': + optional: true + + '@esbuild/android-arm@0.21.5': + optional: true + + '@esbuild/android-x64@0.21.5': + optional: true + + '@esbuild/darwin-arm64@0.21.5': + optional: true + + '@esbuild/darwin-x64@0.21.5': + optional: true + + '@esbuild/freebsd-arm64@0.21.5': + optional: true + + '@esbuild/freebsd-x64@0.21.5': + optional: true + + '@esbuild/linux-arm64@0.21.5': + optional: true + + '@esbuild/linux-arm@0.21.5': + optional: true + + '@esbuild/linux-ia32@0.21.5': + optional: true + + '@esbuild/linux-loong64@0.21.5': + optional: true + + '@esbuild/linux-mips64el@0.21.5': + optional: true + + '@esbuild/linux-ppc64@0.21.5': + optional: true + + '@esbuild/linux-riscv64@0.21.5': + optional: true + + '@esbuild/linux-s390x@0.21.5': + optional: true + + '@esbuild/linux-x64@0.21.5': + optional: true + + '@esbuild/netbsd-x64@0.21.5': + optional: true + + '@esbuild/openbsd-x64@0.21.5': + optional: true + + '@esbuild/sunos-x64@0.21.5': + optional: true + + '@esbuild/win32-arm64@0.21.5': + optional: true + + '@esbuild/win32-ia32@0.21.5': + optional: true + + '@esbuild/win32-x64@0.21.5': + optional: true + + '@iconify-json/simple-icons@1.2.88': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify/types@2.0.0': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@rollup/rollup-android-arm-eabi@4.62.2': + optional: true + + '@rollup/rollup-android-arm64@4.62.2': + optional: true + + '@rollup/rollup-darwin-arm64@4.62.2': + optional: true + + '@rollup/rollup-darwin-x64@4.62.2': + optional: true + + '@rollup/rollup-freebsd-arm64@4.62.2': + optional: true + + '@rollup/rollup-freebsd-x64@4.62.2': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-x64-musl@4.62.2': + optional: true + + '@rollup/rollup-openbsd-x64@4.62.2': + optional: true + + '@rollup/rollup-openharmony-arm64@4.62.2': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.62.2': + optional: true + + '@shikijs/core@2.5.0': + dependencies: + '@shikijs/engine-javascript': 2.5.0 + '@shikijs/engine-oniguruma': 2.5.0 + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + + '@shikijs/engine-javascript@2.5.0': + dependencies: + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 3.1.1 + + '@shikijs/engine-oniguruma@2.5.0': + dependencies: + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@2.5.0': + dependencies: + '@shikijs/types': 2.5.0 + + '@shikijs/themes@2.5.0': + dependencies: + '@shikijs/types': 2.5.0 + + '@shikijs/transformers@2.5.0': + dependencies: + '@shikijs/core': 2.5.0 + '@shikijs/types': 2.5.0 + + '@shikijs/types@2.5.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@10.0.2': {} + + '@types/estree@1.0.9': {} + + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/linkify-it@5.0.0': {} + + '@types/markdown-it@14.1.2': + dependencies: + '@types/linkify-it': 5.0.0 + '@types/mdurl': 2.0.0 + + '@types/mdast@4.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/mdurl@2.0.0': {} + + '@types/unist@3.0.3': {} + + '@types/web-bluetooth@0.0.21': {} + + '@ungap/structured-clone@1.3.2': {} + + '@vitejs/plugin-vue@5.2.4(vite@5.4.21)(vue@3.5.39)': + dependencies: + vite: 5.4.21 + vue: 3.5.39 + + '@vue/compiler-core@3.5.39': + dependencies: + '@babel/parser': 7.29.7 + '@vue/shared': 3.5.39 + entities: 7.0.1 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.39': + dependencies: + '@vue/compiler-core': 3.5.39 + '@vue/shared': 3.5.39 + + '@vue/compiler-sfc@3.5.39': + dependencies: + '@babel/parser': 7.29.7 + '@vue/compiler-core': 3.5.39 + '@vue/compiler-dom': 3.5.39 + '@vue/compiler-ssr': 3.5.39 + '@vue/shared': 3.5.39 + estree-walker: 2.0.2 + magic-string: 0.30.21 + postcss: 8.5.16 + source-map-js: 1.2.1 + + '@vue/compiler-ssr@3.5.39': + dependencies: + '@vue/compiler-dom': 3.5.39 + '@vue/shared': 3.5.39 + + '@vue/devtools-api@7.7.10': + dependencies: + '@vue/devtools-kit': 7.7.10 + + '@vue/devtools-kit@7.7.10': + dependencies: + '@vue/devtools-shared': 7.7.10 + birpc: 2.9.0 + hookable: 5.5.3 + mitt: 3.0.1 + perfect-debounce: 1.0.0 + speakingurl: 14.0.1 + superjson: 2.2.6 + + '@vue/devtools-shared@7.7.10': + dependencies: + rfdc: 1.4.1 + + '@vue/reactivity@3.5.39': + dependencies: + '@vue/shared': 3.5.39 + + '@vue/runtime-core@3.5.39': + dependencies: + '@vue/reactivity': 3.5.39 + '@vue/shared': 3.5.39 + + '@vue/runtime-dom@3.5.39': + dependencies: + '@vue/reactivity': 3.5.39 + '@vue/runtime-core': 3.5.39 + '@vue/shared': 3.5.39 + csstype: 3.2.3 + + '@vue/server-renderer@3.5.39(vue@3.5.39)': + dependencies: + '@vue/compiler-ssr': 3.5.39 + '@vue/shared': 3.5.39 + vue: 3.5.39 + + '@vue/shared@3.5.39': {} + + '@vueuse/core@12.8.2': + dependencies: + '@types/web-bluetooth': 0.0.21 + '@vueuse/metadata': 12.8.2 + '@vueuse/shared': 12.8.2 + vue: 3.5.39 + transitivePeerDependencies: + - typescript + + '@vueuse/integrations@12.8.2(focus-trap@7.8.0)': + dependencies: + '@vueuse/core': 12.8.2 + '@vueuse/shared': 12.8.2 + vue: 3.5.39 + optionalDependencies: + focus-trap: 7.8.0 + transitivePeerDependencies: + - typescript + + '@vueuse/metadata@12.8.2': {} + + '@vueuse/shared@12.8.2': + dependencies: + vue: 3.5.39 + transitivePeerDependencies: + - typescript + + algoliasearch@5.55.1: + dependencies: + '@algolia/abtesting': 1.21.1 + '@algolia/client-abtesting': 5.55.1 + '@algolia/client-analytics': 5.55.1 + '@algolia/client-common': 5.55.1 + '@algolia/client-insights': 5.55.1 + '@algolia/client-personalization': 5.55.1 + '@algolia/client-query-suggestions': 5.55.1 + '@algolia/client-search': 5.55.1 + '@algolia/ingestion': 1.55.1 + '@algolia/monitoring': 1.55.1 + '@algolia/recommend': 5.55.1 + '@algolia/requester-browser-xhr': 5.55.1 + '@algolia/requester-fetch': 5.55.1 + '@algolia/requester-node-http': 5.55.1 + + birpc@2.9.0: {} + + ccount@2.0.1: {} + + character-entities-html4@2.1.0: {} + + character-entities-legacy@3.0.0: {} + + comma-separated-tokens@2.0.3: {} + + copy-anything@4.0.5: + dependencies: + is-what: 5.5.0 + + csstype@3.2.3: {} + + dequal@2.0.3: {} + + devlop@1.1.0: + dependencies: + dequal: 2.0.3 + + emoji-regex-xs@1.0.0: {} + + entities@7.0.1: {} + + esbuild@0.21.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + + estree-walker@2.0.2: {} + + focus-trap@7.8.0: + dependencies: + tabbable: 6.5.0 + + fsevents@2.3.3: + optional: true + + hast-util-to-html@9.0.5: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.1 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.4 + + hookable@5.5.3: {} + + html-void-elements@3.0.0: {} + + is-what@5.5.0: {} + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + mark.js@8.11.1: {} + + mdast-util-to-hast@13.2.1: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.3.2 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.1 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + + micromark-util-character@2.1.1: + dependencies: + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-encode@2.0.1: {} + + micromark-util-sanitize-uri@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-encode: 2.0.1 + micromark-util-symbol: 2.0.1 + + micromark-util-symbol@2.0.1: {} + + micromark-util-types@2.0.2: {} + + minisearch@7.2.0: {} + + mitt@3.0.1: {} + + nanoid@3.3.15: {} + + oniguruma-to-es@3.1.1: + dependencies: + emoji-regex-xs: 1.0.0 + regex: 6.1.0 + regex-recursion: 6.0.2 + + perfect-debounce@1.0.0: {} + + picocolors@1.1.1: {} + + postcss@8.5.16: + dependencies: + nanoid: 3.3.15 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + preact@10.29.3: {} + + property-information@7.2.0: {} + + regex-recursion@6.0.2: + dependencies: + regex-utilities: 2.3.0 + + regex-utilities@2.3.0: {} + + regex@6.1.0: + dependencies: + regex-utilities: 2.3.0 + + rfdc@1.4.1: {} + + rollup@4.62.2: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.62.2 + '@rollup/rollup-android-arm64': 4.62.2 + '@rollup/rollup-darwin-arm64': 4.62.2 + '@rollup/rollup-darwin-x64': 4.62.2 + '@rollup/rollup-freebsd-arm64': 4.62.2 + '@rollup/rollup-freebsd-x64': 4.62.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.62.2 + '@rollup/rollup-linux-arm-musleabihf': 4.62.2 + '@rollup/rollup-linux-arm64-gnu': 4.62.2 + '@rollup/rollup-linux-arm64-musl': 4.62.2 + '@rollup/rollup-linux-loong64-gnu': 4.62.2 + '@rollup/rollup-linux-loong64-musl': 4.62.2 + '@rollup/rollup-linux-ppc64-gnu': 4.62.2 + '@rollup/rollup-linux-ppc64-musl': 4.62.2 + '@rollup/rollup-linux-riscv64-gnu': 4.62.2 + '@rollup/rollup-linux-riscv64-musl': 4.62.2 + '@rollup/rollup-linux-s390x-gnu': 4.62.2 + '@rollup/rollup-linux-x64-gnu': 4.62.2 + '@rollup/rollup-linux-x64-musl': 4.62.2 + '@rollup/rollup-openbsd-x64': 4.62.2 + '@rollup/rollup-openharmony-arm64': 4.62.2 + '@rollup/rollup-win32-arm64-msvc': 4.62.2 + '@rollup/rollup-win32-ia32-msvc': 4.62.2 + '@rollup/rollup-win32-x64-gnu': 4.62.2 + '@rollup/rollup-win32-x64-msvc': 4.62.2 + fsevents: 2.3.3 + + search-insights@2.17.3: {} + + shiki@2.5.0: + dependencies: + '@shikijs/core': 2.5.0 + '@shikijs/engine-javascript': 2.5.0 + '@shikijs/engine-oniguruma': 2.5.0 + '@shikijs/langs': 2.5.0 + '@shikijs/themes': 2.5.0 + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + source-map-js@1.2.1: {} + + space-separated-tokens@2.0.2: {} + + speakingurl@14.0.1: {} + + stringify-entities@4.0.4: + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + + superjson@2.2.6: + dependencies: + copy-anything: 4.0.5 + + tabbable@6.5.0: {} + + trim-lines@3.0.1: {} + + unist-util-is@6.0.1: + dependencies: + '@types/unist': 3.0.3 + + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-stringify-position@4.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-visit-parents@6.0.2: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + + unist-util-visit@5.1.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 + + vfile-message@4.0.3: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position: 4.0.0 + + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile-message: 4.0.3 + + vite@5.4.21: + dependencies: + esbuild: 0.21.5 + postcss: 8.5.16 + rollup: 4.62.2 + optionalDependencies: + fsevents: 2.3.3 + + vitepress@1.6.4(@algolia/client-search@5.55.1)(postcss@8.5.16)(search-insights@2.17.3): + dependencies: + '@docsearch/css': 3.8.2 + '@docsearch/js': 3.8.2(@algolia/client-search@5.55.1)(search-insights@2.17.3) + '@iconify-json/simple-icons': 1.2.88 + '@shikijs/core': 2.5.0 + '@shikijs/transformers': 2.5.0 + '@shikijs/types': 2.5.0 + '@types/markdown-it': 14.1.2 + '@vitejs/plugin-vue': 5.2.4(vite@5.4.21)(vue@3.5.39) + '@vue/devtools-api': 7.7.10 + '@vue/shared': 3.5.39 + '@vueuse/core': 12.8.2 + '@vueuse/integrations': 12.8.2(focus-trap@7.8.0) + focus-trap: 7.8.0 + mark.js: 8.11.1 + minisearch: 7.2.0 + shiki: 2.5.0 + vite: 5.4.21 + vue: 3.5.39 + optionalDependencies: + postcss: 8.5.16 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/node' + - '@types/react' + - async-validator + - axios + - change-case + - drauu + - fuse.js + - idb-keyval + - jwt-decode + - less + - lightningcss + - nprogress + - qrcode + - react + - react-dom + - sass + - sass-embedded + - search-insights + - sortablejs + - stylus + - sugarss + - terser + - typescript + - universal-cookie + + vue@3.5.39: + dependencies: + '@vue/compiler-dom': 3.5.39 + '@vue/compiler-sfc': 3.5.39 + '@vue/runtime-dom': 3.5.39 + '@vue/server-renderer': 3.5.39(vue@3.5.39) + '@vue/shared': 3.5.39 + + zwitch@2.0.4: {} diff --git a/docs-2/pnpm-workspace.yaml b/docs-2/pnpm-workspace.yaml new file mode 100644 index 000000000..5ed0b5af0 --- /dev/null +++ b/docs-2/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +allowBuilds: + esbuild: true diff --git a/docs-2/public/favicon.svg b/docs-2/public/favicon.svg new file mode 100644 index 000000000..f1360ddcd --- /dev/null +++ b/docs-2/public/favicon.svg @@ -0,0 +1,4 @@ + + + τ + diff --git a/docs/DESIGN.md b/docs/archive/DESIGN.md similarity index 82% rename from docs/DESIGN.md rename to docs/archive/DESIGN.md index 74ba8dc4e..4df8f7c45 100644 --- a/docs/DESIGN.md +++ b/docs/archive/DESIGN.md @@ -34,14 +34,6 @@ SQLite (`internal/store`), WAL, one row per issue with a transitions audit table `running` tasks re-queue on startup with attempt++. Parks are never silent -- every park comments on the issue with the reason and gate output. -## Rejected alternative: building on tau's peer-agent runtime - -tau has a working headless child (`internal/app/child.go RunChild()`, stdio-JSONL, shared SQLite): the -wrong substrate here. Its model is ephemeral child processes under an explicit "no resident process" -principle, and it drags tau's store/coordinator/session machinery into a batch worker. archied instead -shares code with tau at the module level: `ai-sdk/toolkit` (the promoted tool set) and `ai-sdk/agentloop` -(gate/budgets/loop-breaker, patterns harvested from tau's coordinator). - ## Security posture - Fine-grained PAT on the bot account only (Contents RW, PRs RW, Issues RW, Metadata R), via diff --git a/docs/prds/archie-core-v2-architecture.md b/docs/archive/archie-core-architecture.md similarity index 99% rename from docs/prds/archie-core-v2-architecture.md rename to docs/archive/archie-core-architecture.md index e7807ac2a..39160330b 100644 --- a/docs/prds/archie-core-v2-architecture.md +++ b/docs/archive/archie-core-architecture.md @@ -139,7 +139,7 @@ retry logic -- NATS handles it. { "id": 42, "owner": "sam", - "repo": "tau", + "repo": "example-service", "issue_number": 170, "title": "Add /copy command for messages and session transcripts", "body": "...", @@ -212,8 +212,8 @@ path = "archie-data" # volume name or mount path ```toml [[repos]] owner = "sam" -name = "tau" -persistent_storage = { type = "bind", path = "./archie-core-data/projects/tau" } +name = "example-service" +persistent_storage = { type = "bind", path = "./archie-core-data/projects/example-service" } ``` When configured, each task for this repo mounts the same bind path. Memory persists across sessions. The agent writes to diff --git a/docs/archie-core-skills-prd-v2.md b/docs/archive/archie-core-skills-prd-v2.md similarity index 93% rename from docs/archie-core-skills-prd-v2.md rename to docs/archive/archie-core-skills-prd-v2.md index 31526ed69..3eb30ca4a 100644 --- a/docs/archie-core-skills-prd-v2.md +++ b/docs/archive/archie-core-skills-prd-v2.md @@ -115,7 +115,7 @@ branch: ## 2. Skills (playbooks) -Skills are Markdown documents that tell archie-core **how** to perform specific tasks. They follow the [agentskills.io](https://agentskills.io/specification) format, making them portable across LLM coding agents (Claude Code, Codex, Tau, Pi, archie-core). +Skills are Markdown documents that tell archie-core **how** to perform specific tasks. They follow the [agentskills.io](https://agentskills.io/specification) format, making them portable across compatible LLM coding agents. ### 2.1 Format @@ -136,7 +136,7 @@ go-testing/ --- name: go-quality-gate description: > - Run the full Go quality pipeline for Tau projects: + Run the full Go quality pipeline: gofumpt, go fix, golangci-lint, go test -race, and task deadcode. Use before any commit in a Go project. version: 1.0.0 @@ -184,7 +184,7 @@ Skills carry archie-specific metadata under `metadata.archie`: |---|---| | `gates` | Which gates from `archie.yaml` this skill covers | | `tools` | Sandbox tools this skill needs | -| `engine` | Preferred execution engine (`claude`, `tau`, `codex`, `pi`, `raw`, `any`) | +| `engine` | Preferred execution engine | | `model` | Preferred model for this skill | | `budget_usd` | Max spend ceiling | | `timeout` | Max seconds | @@ -261,9 +261,6 @@ engines: - type: claude # Claude Code CLI -- full agent loop model: sonnet budget_usd: 5.00 - - type: tau # Tau -- Sam's native Go agent - model: gpt-4o - budget_usd: 2.00 - type: codex # OpenAI Codex CLI model: gpt-5.1-codex-max - type: raw # Direct LLM -- no agent loop, single prompt @@ -291,23 +288,7 @@ metadata: ## 5. Skills in practice -### 5.1 Project-specific skill - -```yaml -# .archie/skills/tau-quality-gate/SKILL.md ---- -name: tau-quality-gate -description: > - Full Tau quality pipeline: gofumpt, go fix, golangci-lint, - go test -race, task deadcode. Use for all Tau repo changes. -metadata: - archie: - gates: [test, lint, format, deadcode] - tools: [go, golangci-lint, gofumpt, task] ---- -``` - -### 5.2 Shared skill library +### 5.1 Shared skill library ```yaml # archie.yaml @@ -348,7 +329,7 @@ metadata: | **What it does** | Analyse → implement → gate → PR | Analyse → implement → gate → PR | Analyse → implement → gate → PR | Run arbitrary shell commands | Analyse → implement → gate → PR | | **Skills** | SKILL.md (agentskills.io) | SKILL.md (native) | SKILL.md (agentskills.io) | Composite actions | SKILL.md (native) | | **Gates** | Named checkpoints in archie.yaml | Ad-hoc (CLAUDE.md + lint) | Ad-hoc | Steps in jobs | Skills with gates | -| **Engine pluggable** | Yes (claude, tau, codex, pi, raw) | No (fixed to Claude) | No (fixed to Codex) | No (fixed to GitHub) | Yes (provider config) | +| **Engine pluggable** | Yes | No (fixed to Claude) | No (fixed to Codex) | No (fixed to GitHub) | Yes (provider config) | | **Worktree isolation** | Yes | Yes (`--worktree`) | No | No (ephemeral runner) | No | | **Blueprint/cron** | Export to Hermes | No | No | Schedule trigger | Native | | **Where it runs** | Docker sandbox | Host | Host or sandbox | GitHub runner | Host, Docker, Modal, SSH | diff --git a/docs/archie-core-skills-prd.md b/docs/archive/archie-core-skills-prd.md similarity index 91% rename from docs/archie-core-skills-prd.md rename to docs/archive/archie-core-skills-prd.md index 41b96e007..09a99b12f 100644 --- a/docs/archie-core-skills-prd.md +++ b/docs/archive/archie-core-skills-prd.md @@ -8,7 +8,7 @@ ## Overview -This PRD defines a workflow and skills system for archie-core. Workflow files declare gates, tool availability, execution engines, and skill references. Skills are reusable playbook documents the agent loads on demand. Together they enable any project to define how agents work within their sandbox, and any execution engine (Claude, Codex, Tau, Pi, raw LLM) to be the runtime. +This PRD defines a workflow and skills system for archie-core. Workflow files declare gates, tool availability, execution engines, and skill references. Skills are reusable playbook documents the agent loads on demand. Together they enable any project to define how agents work within their sandbox and select an available execution engine. --- @@ -51,8 +51,6 @@ skills: engines: - type: claude # Claude Code CLI model: sonnet - - type: tau # Tau (native agent) - model: gpt-4o - type: codex # OpenAI Codex - type: pi # Pi agent harness - type: raw # Direct LLM without agent wrapper @@ -149,7 +147,7 @@ commands: | YAML over TOML/JSON | Already dominant in CI (GitHub Actions, GitLab CI, Taskfile). Human-readable with comments. | | Single file over multi-file | Task discovery (like `Taskfile.yml`), devcontainer conventions. Avoids directory sprawl. | | Gates as named checkpoints | GitHub Actions job model. Gates can be composed into quality pipelines, selected individually, or skipped with `--skip`. | -| Engines as ordered preference list | Supports "try Claude first, fall back to Tau, fall back to raw LLM." Each engine declares its own tool surface. | +| Engines as ordered preference list | Supports deterministic fallback between available engines. Each engine declares its own tool surface. | | Skills as paths + references | Matches devcontainer features (paths resolve to directories) and skills.sh (namespaced references). | | Commands section for direct invocation | Arnie can `archie run test` without an agent turn. Thin wrapper over the sandbox. | | Quality pipeline groups gates | Pre-commit vs pre-push vs pre-merge distinction. Some gates are required, some advisory. | @@ -183,7 +181,7 @@ metadata: archie: gates: [test] # gates this skill requires tools: [go, golangci-lint] # sandbox tools it needs - engine: any # engine preference (any, claude, tau, raw) + engine: any # engine preference compatibility: Requires Go 1.22+ --- ``` @@ -205,7 +203,7 @@ metadata: archie: gates: [test, lint] # must-pass gates before skill runs tools: [go, docker] # sandbox tools required - engine: tau # preferred engine + engine: any # preferred engine model: gpt-4o # preferred model budget_usd: 2.00 # max spend ceiling timeout: 600 # max seconds @@ -247,7 +245,6 @@ Engine interface: |---|---|---| | `claude` | Claude Code CLI | Full agent loop, tool use, worktrees, subagents | | `codex` | OpenAI Codex CLI | Agentic coding with sandbox | -| `tau` | Tau (Sam's agent) | Native Go agent with TUI, event bus | | `pi` | Pi agent harness | Minimalist coding agent, stdio protocol | | `raw` | Direct LLM call | Single-turn prompt, no agent loop. For simple scripts. | @@ -258,14 +255,12 @@ engines: - type: claude model: sonnet budget_usd: 5.00 - - type: tau - model: gpt-4o - budget_usd: 2.00 - type: raw model: gpt-4o-mini ``` -arcie-core tries engines in order. If Claude is available and authenticated, it's used. If not, falls to Tau. If Tau isn't built, falls to raw LLM. Each engine declares its budget ceiling. +arcie-core tries engines in order and selects the first available, +authenticated engine. Each engine declares its budget ceiling. --- @@ -338,7 +333,7 @@ metadata: blueprint: schedule: "every 6h" deliver: telegram - name: "Tau CI monitor" + name: "CI monitor" ``` The export produces a `SKILL.md` with `metadata.hermes.blueprint` that Hermes can schedule. The blueprint's prompt is the archie workflow's quality pipeline. @@ -395,7 +390,6 @@ The export produces a `SKILL.md` with `metadata.hermes.blueprint` that Hermes ca ## 7. Open Questions 1. **Skill registry hosting:** Self-hosted on git.catlow.cloud, or use agentskills.io? -2. **Tau integration depth:** Tau as an engine via CLI, or Tau consuming archie.yaml natively? -3. **Hermes integration:** Should archie-core be a Hermes tool, a Hermes skill, or standalone? -4. **Budget enforcement:** Per-skill budget vs. per-workflow budget vs. monthly cap? -5. **Sandbox image building:** Pre-built images vs. Dockerfile in each skill? +2. **Hermes integration:** Should archie-core be a Hermes tool, a Hermes skill, or standalone? +3. **Budget enforcement:** Per-skill budget vs. per-workflow budget vs. monthly cap? +4. **Sandbox image building:** Pre-built images vs. Dockerfile in each skill? diff --git a/docs/archie-core-v2-architecture.html b/docs/archive/archie-core-v2-architecture.html similarity index 100% rename from docs/archie-core-v2-architecture.html rename to docs/archive/archie-core-v2-architecture.html diff --git a/docs/decisions.md b/docs/archive/decisions.md similarity index 96% rename from docs/decisions.md rename to docs/archive/decisions.md index f237ce2e0..b746ab0fe 100644 --- a/docs/decisions.md +++ b/docs/archive/decisions.md @@ -56,8 +56,8 @@ actual per-workflow/per-repo metrics. **Reasoning**: An agent killed mid-task at 1M tokens wastes every token it already consumed. There is no compaction or checkpointing yet, so a killed agent is a total loss. Hermes regularly uses 160+ steps and -hundreds of thousands of tokens per request. Large repos (tau at 70K+ -lines) need proportionally more. +hundreds of thousands of tokens per request. Large repositories need +proportionally more. **Context**: The planner burned 357K tokens just to discover a fix already existed. The builder hit 1M at step 25 of 90. Neither task was @@ -138,9 +138,9 @@ promiscuous for repos shared between humans and agents. model. Qwythos-9B (local llama.cpp) is the fallback for offline/cheap tasks. -**Reasoning**: Qwythos couldn't complete the plan stage for tau -- 0 -iterations, timed_out. DeepSeek completed it in 21 iterations. Large -repos need a larger model. +**Reasoning**: Qwythos couldn't complete a representative large-repository +plan stage before timing out. DeepSeek completed it in 21 iterations. Large +repositories need a larger model. **Provider setup**: `class = "deepseek"`, API key via `DEEPSEEK_API_KEY` env var from Bitwarden Secrets Manager (bws). diff --git a/docs/prds/multi-agent-collaboration.md b/docs/archive/prds/multi-agent-collaboration.md similarity index 98% rename from docs/prds/multi-agent-collaboration.md rename to docs/archive/prds/multi-agent-collaboration.md index a8688674b..10e200761 100644 --- a/docs/prds/multi-agent-collaboration.md +++ b/docs/archive/prds/multi-agent-collaboration.md @@ -9,9 +9,9 @@ ## 0. Framing Today, "running multiple agents" means running multiple independent `archied` -processes on the same host (`carina`): `archie` (bot_user=archie, repos -sam/archie-core + sam/tau, deepseek models) and `winter` (bot_user=winter, -repo sam/tau only, local llama.cpp models). Confirmed by diffing +processes on the same host (`carina`): `archie` (bot_user=archie, multiple +repositories, deepseek models) and `winter` (bot_user=winter, a restricted +repository set, local llama.cpp models). Confirmed by diffing `~/.config/archie/config.toml` and `~/.config/archie/winter.toml` on carina: they differ in `bot_user`, `[[repos]]` list, and `[models]`/`[providers]` -- not just identity. `Config.BotUser` is a single global field, so one process @@ -59,7 +59,7 @@ implementation slice -- see section 6): `/data/memory.jsonl` sketch in the v2 PRD, which is task/project scoped, not conversation scoped). 7. **Slash-command capabilities** in chat channels (e.g. `/status`, `/spawn`, - `/approve`), analogous to what tau/Telegram-style bots expose today. + `/approve`) for direct channel interaction. 8. **Multi-user support**, as a capability the architecture should not foreclose -- "if I want to extend my agent to multiple people, I should be able to." Not required to ship in the first slice (see section 5), but diff --git a/docs/prds/typescript-plugin-engine.md b/docs/archive/prds/typescript-plugin-engine.md similarity index 100% rename from docs/prds/typescript-plugin-engine.md rename to docs/archive/prds/typescript-plugin-engine.md diff --git a/docs/prds/yaegi-plugin-system.md b/docs/archive/prds/yaegi-plugin-system.md similarity index 52% rename from docs/prds/yaegi-plugin-system.md rename to docs/archive/prds/yaegi-plugin-system.md index da9c4a191..37899591a 100644 --- a/docs/prds/yaegi-plugin-system.md +++ b/docs/archive/prds/yaegi-plugin-system.md @@ -1,4 +1,4 @@ -# archie-core Yaegi Plugin System -- PRD +# archie-core Yaegi Plugin System -- PRD **Author:** Archie (Hermes agent) **Date:** 2026-07-21 @@ -8,7 +8,11 @@ ## Summary -Embed the [Yaegi](https://github.com/traefik/yaegi) Go interpreter to let archie-core load and execute `.go` files at runtime. This enables three things that shell commands can't do: **custom gates with deep worktree inspection**, **custom workflow stages defined per-repo**, and **skill scripts written in Go instead of shell**. +Embed the [Yaegi](https://github.com/traefik/yaegi) Go interpreter to let +archie-core load and execute `.go` files at runtime. This enables three things +that shell commands can't do: **custom gates with deep worktree inspection**, +**custom workflow stages defined per-repo**, and **skill scripts written in Go +instead of shell**. --- @@ -16,33 +20,41 @@ Embed the [Yaegi](https://github.com/traefik/yaegi) Go interpreter to let archie ### The problem with shell-only gates -`[[repos.gate]]` is command lists. That's fine for standard tooling (`go vet`, `golangci-lint`), but it can't express project-specific rules: +`[[repos.gate]]` is command lists. That's fine for standard tooling (`go vet`, +`golangci-lint`), but it can't express project-specific rules: - "No new `panic()` calls in the diff" - "No new dependencies in `go.mod` without justification" - "All public functions in `pkg/api/` must be documented" - "No `time.Sleep` in production code paths" -These are rules that need to read the diff, parse Go ASTs, or walk the worktree -- things shell scripts can do but shouldn't have to. +These are rules that need to read the diff, parse Go ASTs, or walk the worktree +-- things shell scripts can do but shouldn't have to. ### Why not shell scripts? -Shell scripts for gates are fine until they're not. They can't import the archie-core types, can't use the Go parser, and are a second language to maintain alongside the daemon. Yaegi runs Go -- the same language as the daemon, the same language as the repos archie-core works on. +Shell scripts for gates are fine until they're not. They can't import the +archie-core types, can't use the Go parser, and are a second language to +maintain alongside the daemon. Yaegi runs Go -- the same language as the daemon, +the same language as the repos archie-core works on. ### Why not Go's native `plugin` package? Go's `plugin` package (`.so` files) requires: + - Exact same Go version and deps as the host binary - Linux/macOS only - No unload - Painful distribution -Yaegi interprets `.go` source files directly -- no compilation step, portable everywhere, loads from filesystem paths. +Yaegi interprets `.go` source files directly -- no compilation step, portable +everywhere, loads from filesystem paths. ### Production precedent - **Traefik:** 200+ community plugins via Yaegi, loaded from plugins.traefik.io -- **Vikunja:** Adopted Yaegi for plugin system (see PR #2178), loads plugins from `plugins/` directory +- **Vikunja:** Adopted Yaegi for plugin system (see PR #2178), loads plugins + from `plugins/` directory --- @@ -50,15 +62,17 @@ Yaegi interprets `.go` source files directly -- no compilation step, portable ### Three extension surfaces -| Surface | Location | When loaded | What it does | -|---|---|---|---| -| **Custom gate functions** | `.archie/gate.go` | During the gate stage (after shell commands) | Returns `[]Finding` -- each finding has severity, message, file, line | -| **Custom workflow stages** | `.archie/stages/.go` | When the workflow references the stage name | Returns a `workflow.Stage` implementation | -| **Skill scripts** | `.archie/skills//scripts/*.go` | When the parent skill is activated | Called by the skill's instructions | +| Surface | Location | When loaded | What it does | +| -------------------------- | ------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------- | +| **Custom gate functions** | `.archie/gate.go` | During the gate stage (after shell commands) | Returns `[]Finding` -- each finding has severity, message, file, line | +| **Custom workflow stages** | `.archie/stages/.go` | When the workflow references the stage name | Returns a `workflow.Stage` implementation | +| **Skill scripts** | `.archie/skills//scripts/*.go` | When the parent skill is activated | Called by the skill's instructions | ### Gate functions (`.archie/gate.go`) -The most important extension surface. After the shell-based gate passes, archie-core loads and evaluates `.archie/gate.go` in the worktree directory. The script exposes a `Check` function: +The most important extension surface. After the shell-based gate passes, +archie-core loads and evaluates `.archie/gate.go` in the worktree directory. The +script exposes a `Check` function: ```go // .archie/gate.go -- per-repo gate rules interpreted at runtime @@ -134,15 +148,18 @@ func Check(ctx GateContext) []Finding { ``` The daemon: + 1. Reads `.archie/gate.go` from the worktree -2. Creates a Yaegi interpreter with `GateContext` and `Finding` types pre-loaded via `Use()` +2. Creates a Yaegi interpreter with `GateContext` and `Finding` types pre-loaded + via `Use()` 3. Evaluates the file 4. Calls `Check(ctx)` via `Eval("gate.Check")` + `Interface()` 5. Logs findings and blocks the gate if any have `Level: "error"` ### Custom workflow stages (`.archie/stages/`) -A repo can define custom pipeline stages that archie-core discovers and makes routable: +A repo can define custom pipeline stages that archie-core discovers and makes +routable: ```go // .archie/stages/run-migrations.go @@ -163,7 +180,8 @@ func Stage() workflow.Stage { } ``` -Registered stages appear alongside built-in stages. A workflow in `config.toml` can reference them by name: +Registered stages appear alongside built-in stages. A workflow in `config.toml` +can reference them by name: ```toml [[workflows.stages]] @@ -182,16 +200,19 @@ package main import ( "fmt" "os/exec" + "context" ) func main() { - cmd := exec.Command("gitleaks", "detect", "--no-git", "--verbose") + ctx := context.Background() + cmd := exec.CommandContext(ctx, "gitleaks", "detect", "--no-git", "--verbose") out, _ := cmd.CombinedOutput() fmt.Println(string(out)) } ``` -Skills reference these scripts naturally in their instructions: "Run `scripts/gitleaks.go` to scan for secrets." +Skills reference these scripts naturally in their instructions: "Run +`scripts/gitleaks.go` to scan for secrets." --- @@ -199,26 +220,36 @@ Skills reference these scripts naturally in their instructions: "Run `scripts/gi Via `i.Use()`, the daemon pre-loads symbols that interpreted code can import: -| Package | What's exposed | -|---|---| -| `archie-core/internal/workflow` | `Stage`, `TaskContext`, `Outcome` | -| `archie-core/internal/gate` | `GateContext`, `Finding`, `Block` | -| `stdlib` | Full Go standard library (stdlib.Symbols) | +| Package | What's exposed | +| ------------------------------- | ----------------------------------------- | +| `archie-core/internal/workflow` | `Stage`, `TaskContext`, `Outcome` | +| `archie-core/internal/gate` | `GateContext`, `Finding`, `Block` | +| `stdlib` | Full Go standard library (stdlib.Symbols) | -Generated with `yaegi extract` -- same approach Traefik and Vikunja use. A `//go:generate yaegi extract ...` line in the source triggers symbol table generation during `go generate`. +Generated with `yaegi extract` -- same approach Traefik and Vikunja use. A +`//go:generate yaegi extract ...` line in the source triggers symbol table +generation during `go generate`. --- ## Limitations From Yaegi's own docs: -- **No assembly files** (`.s` not supported) -- **No CGo** (can't call C code -- the daemon is pure Go, so this doesn't matter) -- **No compiler/linker directives** (no `//go:embed`, etc. -- fine for gate scripts) -- **Interfaces from pre-compiled code can't be added dynamically** -- the daemon must pre-compile wrapper types for any interface interpreted code needs to implement -- **Slower than compiled code** -- gate scripts run once per commit, not in hot paths; negligible impact -The Vikunja PR documents a specific Yaegi quirk: **typed factory functions required.** You can't do `v.Interface().(MyInterface)` on a value returned from interpreted code. Each interface needs its own factory: +- **No assembly files** (`.s` not supported) +- **No CGo** (can't call C code -- the daemon is pure Go, so this doesn't + matter) +- **No compiler/linker directives** (no `//go:embed`, etc. -- fine for gate + scripts) +- **Interfaces from pre-compiled code can't be added dynamically** -- the daemon + must pre-compile wrapper types for any interface interpreted code needs to + implement +- **Slower than compiled code** -- gate scripts run once per commit, not in hot + paths; negligible impact + +The Vikunja PR documents a specific Yaegi quirk: **typed factory functions +required.** You can't do `v.Interface().(MyInterface)` on a value returned from +interpreted code. Each interface needs its own factory: ```go func NewGate() Gate { return &MyGate{} } @@ -229,39 +260,78 @@ func NewReportable() Reportable { return &MyGate{} } ## Implementation phases -### Phase 1: Gate functions -- implemented +### Phase 1: Gate functions -- implemented + - `yaegi` added as a dependency -- Symbol table for `GateContext`, `Finding` generated via `yaegi extract` into `internal/gate/gateextract` (a separate package from `internal/gate` itself, avoiding the self-import cycle extracting a package's own symbols creates) -- `internal/gate/gateeval.Evaluate`: loads `.archie/gate.go` from the worktree, interprets it, calls `Check()`; panics are recovered -- Wired in as `workflow.StageYaegiGate`, run after the final commit in both the `implement` and `tdd` workflows +- Symbol table for `GateContext`, `Finding` generated via `yaegi extract` into + `internal/gate/gateextract` (a separate package from `internal/gate` itself, + avoiding the self-import cycle extracting a package's own symbols creates) +- `internal/gate/gateeval.Evaluate`: loads `.archie/gate.go` from the worktree, + interprets it, calls `Check()`; panics are recovered +- Wired in as `workflow.StageYaegiGate`, run after the final commit in both the + `implement` and `tdd` workflows - Error findings park the task; warn findings are logged only -### Phase 2: Custom stages -- implemented -- Symbol table for `workflow.Stage`/`TaskContext`/`Outcome` generated into `internal/workflow/wfextract` -- `internal/workflow/wfeval.Discover` scans `.archie/stages/*.go` in filename order and calls each file's exported `Stage()` function -- `TaskContext.CustomStages` is an injected `func(dir string) ([]Stage, error)` -- the composition root (`cmd/archied`) wires it to `wfeval.Discover`, keeping `internal/workflow` decoupled from its own generated symbol table -- `workflow.StageRepoStages` runs discovered stages in order right after the worktree is prepared, in both `implement` and `tdd` -- Simplification vs. the original sketch: stages are auto-discovered and always run (like `.archie/gate.go`) rather than referenced by name from `config.toml` -- the workflow engine has no data-driven stage graph today, so wiring arbitrary named stages into arbitrary positions would need a larger config-driven rework. Auto-run-in-order covers the PRD's actual use case (a repo-defined pre-flight/setup hook) without it. +### Phase 2: Custom stages -- implemented -### Phase 3: Skill scripts -- implemented -- `internal/skillscript.Run` interprets a `.go` file via `i.EvalPath`, which (like `go run`) evaluates and calls its `main()`; stdout/stderr are captured via `interp.Options` -- Uses `stdlib.Symbols` + `stdlib/unrestricted.Symbols` (not just `stdlib`) -- `os/exec` lives in the unrestricted set, and the PRD's own example script shells out via `os/exec` -- No archie-core-specific symbol table needed here -- skill scripts only touch the Go standard library -- Exposed to the agent loop as a new `run_go_script` tool (`internal/agentexec/inprocess.go`), available in every agent stage; path is validated to stay inside the workspace -- This is how "the skill's instructions reference a script" cashes out concretely: the agent calls `run_go_script` with the path instead of needing a Go toolchain in the sandbox +- Symbol table for `workflow.Stage`/`TaskContext`/`Outcome` generated into + `internal/workflow/wfextract` +- `internal/workflow/wfeval.Discover` scans `.archie/stages/*.go` in filename + order and calls each file's exported `Stage()` function +- `TaskContext.CustomStages` is an injected `func(dir string) ([]Stage, error)` + -- the composition root (`cmd/archied`) wires it to `wfeval.Discover`, keeping + `internal/workflow` decoupled from its own generated symbol table +- `workflow.StageRepoStages` runs discovered stages in order right after the + worktree is prepared, in both `implement` and `tdd` +- Simplification vs. the original sketch: stages are auto-discovered and always + run (like `.archie/gate.go`) rather than referenced by name from `config.toml` + -- the workflow engine has no data-driven stage graph today, so wiring + arbitrary named stages into arbitrary positions would need a larger + config-driven rework. Auto-run-in-order covers the PRD's actual use case (a + repo-defined pre-flight/setup hook) without it. -### Phase 4: Hot reload -- not needed, by construction -- All three loaders (`gate.Evaluate`, `wfeval.Discover`, `skillscript.Run`) read their `.go` source from disk on every call -- no in-memory cache exists anywhere in the implementation -- Every task additionally gets a fresh `git clone` (`worktree.Manager.Prepare` removes and re-clones the worktree directory per task) -- Consequently every stage already re-reads `.archie/gate.go`, `.archie/stages/*.go`, and skill scripts fresh, every run -- there is no stale state a file watcher would ever need to invalidate -- A file-watching daemon-runtime reload mechanism would add machinery with nothing to do given this architecture; revisit only if the daemon starts reusing long-lived worktrees across tasks +### Phase 3: Skill scripts -- implemented + +- `internal/skillscript.Run` interprets a `.go` file via `i.EvalPath`, which + (like `go run`) evaluates and calls its `main()`; stdout/stderr are captured + via `interp.Options` +- Uses `stdlib.Symbols` + `stdlib/unrestricted.Symbols` (not just `stdlib`) -- + `os/exec` lives in the unrestricted set, and the PRD's own example script + shells out via `os/exec` +- No archie-core-specific symbol table needed here -- skill scripts only touch + the Go standard library +- Exposed to the agent loop as a new `run_go_script` tool + (`internal/agentexec/inprocess.go`), available in every agent stage; path is + validated to stay inside the workspace +- This is how "the skill's instructions reference a script" cashes out + concretely: the agent calls `run_go_script` with the path instead of needing a + Go toolchain in the sandbox + +### Phase 4: Hot reload -- not needed, by construction + +- All three loaders (`gate.Evaluate`, `wfeval.Discover`, `skillscript.Run`) read + their `.go` source from disk on every call -- no in-memory cache exists + anywhere in the implementation +- Every task additionally gets a fresh `git clone` (`worktree.Manager.Prepare` + removes and re-clones the worktree directory per task) +- Consequently every stage already re-reads `.archie/gate.go`, + `.archie/stages/*.go`, and skill scripts fresh, every run -- there is no stale + state a file watcher would ever need to invalidate +- A file-watching daemon-runtime reload mechanism would add machinery with + nothing to do given this architecture; revisit only if the daemon starts + reusing long-lived worktrees across tasks --- ## Open questions -1. **Symbol table generation:** Run `yaegi extract` as a `go generate` step, or generate on daemon startup? -2. **Error handling:** If the interpreted gate panics or times out, park the task? Or fall back to shell-only gate? -3. **Budget:** Interpreted gate scripts run in the gate stage -- should they have their own timeout/step budget? -4. **Template system:** Should archie-core ship with common gate templates (e.g. `go: no panic, no Sleep, no hardcoded paths`)? -5. **Remote gates:** Could `.archie/gate.go` be pulled from a shared remote registry, like skills? +1. **Symbol table generation:** Run `yaegi extract` as a `go generate` step, or + generate on daemon startup? +2. **Error handling:** If the interpreted gate panics or times out, park the + task? Or fall back to shell-only gate? +3. **Budget:** Interpreted gate scripts run in the gate stage -- should they + have their own timeout/step budget? +4. **Template system:** Should archie-core ship with common gate templates (e.g. + `go: no panic, no Sleep, no hardcoded paths`)? +5. **Remote gates:** Could `.archie/gate.go` be pulled from a shared remote + registry, like skills? diff --git a/docs/prds/01-project-management.md b/docs/prds/01-project-management.md new file mode 100644 index 000000000..44d41c38f --- /dev/null +++ b/docs/prds/01-project-management.md @@ -0,0 +1,57 @@ +# Architecture Decision Index + +**Status:** Approved foundation; domain and package reviews are ongoing +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Purpose + +This file is the navigation point for Archie's target architecture. It is +deliberately short. Architectural decisions are separated by domain or +requirement so an implementation task can load only the rules governing its +scope. + +Implementers MUST read the decision document for the domain or requirement they +are changing. They MUST NOT infer permission to change neighbouring domains from +a broader restructuring objective. + +## Global invariants + +- Organise code around cohesive application responsibilities, not generic + technical mechanisms. +- Domains own their behaviour, vocabulary, state, commands, events, policy + implementations, runtime settings, and required service contracts. +- Domains do not depend on infrastructure or manipulate another domain. +- `internal/app` owns composition; `cmd/*` remains thin. +- Cross-domain work uses an explicitly owned command, event, or approved shared + contract. +- Process boundaries are deployment choices and do not determine source-code + ownership. +- Existing package names and boundaries have no presumption of survival. + +The words **MUST**, **MUST NOT**, **SHOULD**, and **MAY** are normative. + +## Decision documents + +| Scope | Authoritative document | +| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| Repository layout, domains, composition, deployments, and optional material | [architecture/organisation.md](architecture/organisation.md) | +| Dependency direction, domain contracts, infrastructure, commands, events, and wire contracts | [architecture/dependencies-and-contracts.md](architecture/dependencies-and-contracts.md) | +| External configuration, runtime settings, and dissolution of `internal/config` | [architecture/configuration.md](architecture/configuration.md) | +| Persistent actor identity, ownership, lifecycle, and attribution | [architecture/identity.md](architecture/identity.md) | +| Agent definitions, workflows, workflow executions, tools, and worker boundaries | [architecture/agent-system.md](architecture/agent-system.md) | +| Personal-assistant interactions, messaging channels, and optional promotion into durable work | [architecture/messaging-and-work-intake.md](architecture/messaging-and-work-intake.md) | +| Shared policy evaluation and domain-owned policy semantics | [architecture/policy.md](architecture/policy.md) | +| Safe source/configuration changes, health supervision, and recovery | [architecture/safe-change-and-recovery.md](architecture/safe-change-and-recovery.md) | +| Plugin framework, plugin implementations, and extension isolation | [architecture/plugins-and-extensions.md](architecture/plugins-and-extensions.md) | +| Generated references, deprecations, and changelog generation | [architecture/generated-documentation.md](architecture/generated-documentation.md) | +| Remaining package destinations, data migrations, runtime cutover, and completion criteria | [architecture/migration-decisions.md](architecture/migration-decisions.md) | +| Domain/feature research, design interview, and required handoff | [architecture/package-review.md](architecture/package-review.md) | + +## Deferred decisions + +The remaining package-placement, data-migration, shared-mechanics, process- +boundary, and cutover decisions are maintained in +[architecture/migration-decisions.md](architecture/migration-decisions.md). + +Each decision is made in its focused document after code-grounded review. diff --git a/docs/prds/architecture/agent-system.md b/docs/prds/architecture/agent-system.md new file mode 100644 index 000000000..2b699e5dd --- /dev/null +++ b/docs/prds/architecture/agent-system.md @@ -0,0 +1,354 @@ +# Agent System + +**Status:** Current-state investigation in progress +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Domain framing + +The domain is the Agent System. + +`Task` is not a core Agent System concept. Forge tasks, forge issues, Jira +issues, email, Telegram messages, webhooks, and future external inputs are +channel-specific messages. Channels translate those messages into requests to +the Agent System; external issue or task models MUST NOT shape execution state. + +The current `store.Task` is a persisted workflow execution. Treating that row as +a task-domain aggregate would incorrectly turn Archie into an agentic issue +board. + +## Canonical agent interaction model + +An **Agent** is a persistent assistant selected for an interaction. It is not a +model invocation and is not a WorkflowExecution. + +Each Agent has its own: + +- immutable acting `IdentityID` for ownership and audit; +- durable memory and learned information about the user; +- perspective, specialisation, instructions, and communication behaviour; +- conversation history and channel bindings; +- available tools, capabilities, and policy; +- continuity across model or provider changes. + +The underlying model is a replaceable runtime dependency. Changing a model, +provider, or model version MUST NOT create a new Agent, discard its memory, or +change ownership of its history. + +A user MAY create multiple Agents. Each Agent develops its own memory and view +of the user from the interactions and responsibilities assigned to it. Memories +MUST NOT be silently pooled merely because Agents belong to the same user or +application. + +Agent and Identity are separate aggregates. Every Agent references exactly one +acting IdentityID, and no two Agents share an agent identity. User, system, and +service-account identities may exist without an Agent. + +An action initiated through an Agent records the Agent's acting IdentityID and, +when applicable, the initiating user's IdentityID. A future fully automated +WorkflowExecution MAY use an explicitly selected service-account identity for a +concrete unattended use case; this is not the default execution identity. + +## Workflow execution identity + +A Workflow is owned by an IdentityID. By default, every WorkflowExecution acts +as the Workflow owner's identity. + +Future delegated execution MAY add an explicit `RunAsIdentityID` assignment to a +Workflow. This allows a Workflow owner to select another user or service-account +identity for execution without changing Workflow ownership. Until that +capability is deliberately introduced, owner identity and execution identity are +the same. + +WorkflowExecution audit records MUST preserve the Workflow owner, effective +execution identity, initiating user when one exists, and any explicit delegation +that selected a different run-as identity. + +## Memory scopes + +The Agent System requires four distinct durable memory scopes: + +- **global shared memory**: information intentionally available across the + Archie application; +- **agent-wide memory**: general expertise, operating knowledge, and perspective + owned by one Agent and safe for that Agent to use across users; +- **user-wide memory**: information associated with one user and available to + authorized Agents serving that user; +- **Agent-user relationship memory**: private history and learned context from + one particular Agent's relationship with one particular user. + +Agent-wide memory is private to its owning Agent by default. Another Agent MUST +NOT read, inherit, search, or mutate it implicitly. + +Agent-user relationship memory is addressed by both AgentID and User IdentityID. +Neither another Agent serving the same user nor another user speaking to the +same Agent may access it implicitly. + +Archie is a multi-user system even when initially deployed for one person. +Multiple users, including family members, may interact with the same configured +Agents. Per-user memory is therefore an isolation and personalization boundary, +not merely an attribution tag on the primary user's records. + +An Agent MUST resolve the initiating user before assembling memory context. +Memory belonging to one user MUST NOT become visible to another user merely +because both users interact with the same Agent. + +Shared memory does not erase provenance. Every memory record retains its scope, +author or acting identity, originating user when applicable, source, and +revision history. The exact rules for selecting a write scope, granting access +to global and user-wide memory, and authorizing explicit cross-scope sharing +require a focused memory design decision. + +An Agent interaction may answer conversationally, use a tool or capability, read +or send messages, retain information, or propose durable workflow-backed work. +None of these operations inherently requires a WorkflowExecution. + +## Agent and Workflow domain boundary + +Agent and Workflow are separate domains: + +```text +internal/domain/agent +internal/domain/workflow +``` + +The Agent domain owns persistent assistants, their specialisation, instructions, +model-independent continuity, capability context, and associations with identity +and memory. + +The Workflow domain owns reusable, user- or Agent-defined behaviour and every +durable execution of that behaviour. An Agent may invoke or define a Workflow, +but the Workflow is not part of the Agent aggregate and does not require a +conversational Agent interaction to execute. + +## Canonical workflow model + +The Workflow feature uses these canonical terms: + +- **Workflow**: a reusable, versioned definition of how an agent behaves and + performs a kind of work. +- **WorkflowExecution**: one durable execution of a specific Workflow version. +- **WorkflowStep**: one defined operation in a Workflow. +- **StepExecution**: the recorded execution and outcome of one WorkflowStep. +- **Attempt**: a retry of the same WorkflowExecution, not a new execution. + +A Workflow MAY structure any repeatable agent behaviour, including personal +assistance and scheduled routines. For example, a morning email review may +combine a schedule event, message retrieval tool, LLM classification and +summarisation, and delivery of the resulting rundown. Workflow is therefore not +restricted to forge work, source changes, or requests submitted by a user at +execution time. + +Workflows are extensible through Workflow-owned plugins. The Workflow domain +defines the typed plugin registration, definition, validation, versioning, and +execution contracts. Users and Agents may define reusable Workflows through +those contracts. + +The generic plugin contract remains metadata-only. It MUST NOT own Workflow +semantics or replace the Workflow registry with generic hooks. + +`Workflow` and `WorkflowExecution` are the names used in architecture, generated +reference, configuration, commands, events, and external contracts. The +implementation MAY use package qualification to remain concise: + +```go +workflow.Definition +workflow.Execution +workflow.Step +workflow.StepExecution +``` + +The unqualified name `Execution` MUST NOT be used in cross-domain contracts or +documentation because it is ambiguous among workflow, tool, command, policy, and +service execution. + +## Current workflow-execution feature + +The current feature takes a channel request through agent execution and a +durable outcome. + +Current execution state includes source-message references, owning identity, +repository, selected workflow and stage, agent output, branch and pull-request +references, token and iteration counts, retry information, human-wait +information, and failure details. + +The current `store.Task` lifecycle uses: + +```text +queued -> running +running -> waiting_human | pr_open | merged | parked | closed_wont_do +waiting_human -> queued | closed_wont_do +parked -> queued | dead +pr_open -> merged | rejected +running after crash -> queued +``` + +Workflows select and sequence deterministic and agent-run stages. Implement, +TDD, feasibility, and bootstrap are current Workflow definitions. +WorkflowExecutions may run in-process or be handed wholesale to `archie-agent`. + +## Current workflow-feature placement + +The behaviour is divided across technical packages: + +- `internal/store` defines the current `Task` execution record and status + strings and persists mutable state and transition history. +- `internal/daemon` discovers, claims, schedules, retries, recovers, processes, + waits for human input, and reconciles pull requests. +- `internal/workflow` routes work, executes stages, mutates tasks, applies + outcomes, parks failures, and performs forge/worktree operations. +- `internal/agentexec` defines and runs individual autonomous-stage protocols. +- `internal/taskrun` hands a complete WorkflowExecution to a container worker. +- `internal/gate` and repository configuration define execution constraints. +- `internal/gateway` duplicates task status strings and applies task-control + rules. +- forge, worktree, NATS, SQLite, containers, and agent runtimes are concrete + dependencies mixed into orchestration. + +## Current `task` meanings and required replacements + +The existing code uses `task` for unrelated concepts. Migration MUST resolve +each meaning deliberately; a global text replacement is prohibited. + +| Current meaning | Representative locations | Target concept | Requirements | +| -------------------------------------------------- | --------------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Forge issue or external task | `internal/forge`, daemon polling | Channel message | Preserve the channel's native reference and payload. Translate it into an Agent System request without importing forge or issue semantics into Workflow. | +| Jira issue or other external work item | Messaging infrastructure adapter | Channel message or external artifact | The external system retains its own vocabulary inside its integration. Its record may lead to an accepted work request but is not a Workflow or WorkflowExecution. | +| Persisted `store.Task` row/document | `internal/store`, `internal/nell` | WorkflowExecution | Own identity, Workflow ID and version, lifecycle, source-message reference, outputs, attempts, and outcome. Persistence implements the Agent System repository contract. | +| Task status and transition history | `store.Status*`, `transitions`, Nell documents | WorkflowExecution lifecycle and domain events | Enforce legal transitions atomically. Domain events and state changes cannot diverge. Remove duplicated status strings from consumers. | +| Claimed or queued task | `ClaimNext`, `ClaimByIssue`, `RecoverStale` | Scheduled WorkflowExecution | Claim by WorkflowExecution ID and expected version/state. Crash recovery and leases must not silently create a new execution. | +| `workflow.TaskContext` | `internal/workflow` | WorkflowExecution context | Replace the mutable service bag with execution state plus narrow step-required contracts. Complete application configuration and unrelated services are forbidden. | +| `taskrun.Request` and `taskrun.Response` | `internal/taskrun`, `cmd/archie-agent` | WorkflowExecution handoff | This is the versioned worker contract for executing a WorkflowExecution. It carries domain-owned execution data, not store rows or global configuration DTOs. | +| Per-stage `agentexec.Request.TaskID` | `internal/agentexec` | WorkflowExecutionID correlation | An agent invocation is a bounded WorkflowStep execution. Correlate request/result with WorkflowExecutionID, StepExecutionID, attempt, and protocol version. | +| NATS `TaskMessage` and `archie.task.*` | `internal/nats` | Channel request or WorkflowExecution transport | Discovery messages and execution dispatch are different contracts and subjects. Domain meaning stays outside NATS infrastructure. Identity and source-message idempotency must be explicit. | +| `taskDispatcher` work item | `internal/daemon` | WorkflowExecution scheduling | Scheduling operates on execution references and declared concurrency policy. Repository serialization is policy, not identity derived from an incomplete task struct. | +| `container.TaskPayload` and `task.json` | `internal/container`, `cmd/archie-agent` | WorkflowExecution brief | Rename the boot artifact and schema. It identifies the mounted execution and required workspace only; it is not an alternative execution definition. Malformed input must fail safely rather than silently joining an unrelated shared queue. | +| `storage.TaskRef` | `internal/storage` | WorkflowExecution workspace lease | Storage receives the minimal execution/workspace reference and policy required to provision and release resources. It does not receive the WorkflowExecution aggregate. | +| Gateway `TaskCreator` | `internal/gateway` | Accepted work request handoff | A channel may carry a request for durable workflow-backed work, but it does not request or create a WorkflowExecution directly. Work intake admits and routes the request; the Agent System consumes the accepted work request and is the sole owner of selecting a Workflow version and creating the WorkflowExecution. Ordinary agent interactions do not require this handoff. | +| Gateway `TaskController` and `ChatTaskStatus` | `internal/gateway/tasks.go` | WorkflowExecution commands and query view | Approve, cancel, and status use Agent System contracts. Channel code does not duplicate lifecycle constants or decide transitions. | +| Gateway `TaskProfile` | `internal/gateway/tasks.go`, `cmd/archied` | Channel/identity execution defaults | This is configuration selecting allowed source targets and default Workflow inputs, not task state. Split it into settings owned by the relevant channel and Agent System features. | +| `config.TaskConfig` and `TaskForge` | `internal/config` | Worker execution settings and channel/service references | Dissolve with `internal/config`. Each field moves to its owning runtime settings or versioned WorkflowExecution handoff contract. Secrets and external configuration forms do not enter the domain. | +| `events.Event.TaskID`, task event timelines | `internal/events`, stores, web UI | WorkflowExecutionID and WorkflowExecution events | Authoritative events are Agent System events. Observability and timelines project those events rather than inventing parallel generic task events. | +| Web UI task lists and counts | `internal/webui`, store query APIs | WorkflowExecution read model | Dashboard status, history, and counts are projections of WorkflowExecution state and events. The UI does not depend on persistence records. | +| Task-scoped forge/store/worktree RPC | `forgerpc`, `storerpc`, `worktreerpc`, `registerTaskRPCServers` | Execution-scoped capability ports | Worker calls use narrow domain-required service contracts, carry WorkflowExecutionID and IdentityID, and resolve the owning capability binding. Root-client fallback is forbidden. | +| Per-task worktree, branch, volume, and cleanup | daemon, worktree, storage, container | WorkflowExecution workspace | Every WorkflowExecution receives isolated workspace state. Workspace lifecycle is explicit, identity-aware, recoverable, and controlled outside the model. | +| Task retry, dead, waiting-human, PR reconciliation | daemon, workflow, gateway | WorkflowExecution lifecycle policies | Retry, waiting, cancellation, reconciliation, and terminal outcomes are Agent System behaviour. Channels and infrastructure report facts or submit commands; they do not mutate state. | +| Task-run readiness and retry timeouts | daemon taskrun request loop | Worker-dispatch settings and policy | These settings govern WorkflowExecution handoff availability. They are not Workflow data and must be owned by the worker-dispatch capability. | + +### Terms that do not migrate + +- The `task` command in `Taskfile.yml` is the external Task build tool and keeps + its name. +- A forge may call its own records issues or tasks inside its channel adapter. +- General prose may use “task” informally only when it clearly refers to an + external system. Agent System contracts and generated reference MUST use the + canonical Workflow vocabulary. + +## Current WorkflowExecution data inventory + +This inventory is the migration ledger for data currently spread across +`store.Task`, database-only columns, `workflow.TaskContext`, worker messages, +and surrounding configuration. Implementation SHOULD NOT require another +repository-wide search to determine what existing execution data must be +preserved or deliberately removed. + +| Current data | Current representation | Required target | +| ---------------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| Execution identity | `Task.ID`, `task_id`, NATS subjects, logs | Immutable WorkflowExecutionID used consistently by state, events, workers, projections, and capability calls | +| Owning actor | `Task.Identity` string | Canonical IdentityID | +| Source type | `Task.Source` (`forge` or `chat`) | Typed channel and SourceMessageReference; no closed source enum in WorkflowExecution | +| Source address | `Owner`, `Repo`, `IssueNumber`; synthetic chat issue number | Channel-owned source reference with native message/thread/object identifiers; synthetic identifiers removed | +| Requested work | `Title`, `Body`, `Labels` | Immutable execution input captured from the source request; channel-specific metadata retained in the source envelope | +| Workflow selection | `Workflow` string | Immutable WorkflowID plus selected WorkflowVersion | +| Lifecycle | `Status` string | Enforced WorkflowExecution state | +| Current position | mutable `Stage` string | Derived current WorkflowStep reference plus durable StepExecution history | +| Attempts | `Attempt`, `RetryCount` | Execution attempt history and retry-policy evidence; distinguish worker delivery retry from workflow retry | +| Failure | `ParkReason`, transition detail, response errors | Typed failure classification, evidence, retryability, and resulting lifecycle event | +| Human wait | `WatchCommentID`, `waiting_human` | Channel-neutral wait condition and correlation reference; forge comment IDs stay in the forge channel | +| Workspace | `Dir`, `Branch`, worktree path, `task.json` | Execution workspace reference and independently managed workspace lifecycle | +| Change outcome | `BuildSummary`, `BuildNoChanges`, changed files | Step outputs and final WorkflowExecution outcome | +| Reproduction evidence | `ReproProof` | Typed TDD step evidence retained with the StepExecution and final outcome | +| Planning output | `Plan` | Typed step output referenced by later steps rather than a special aggregate field | +| Notes | `Notes`, appended agent notes | Ordered execution annotations with actor, source step, and timestamp | +| Pull request | `PRNumber`, forge host/repository assumptions | Forge-channel delivery reference and reconciliation state | +| Agent usage | `TokensUsed`, `Iterations` | StepExecution usage measurements aggregated into execution projections | +| Decision capture | private feasibility `decision`, capture-tool output | Typed WorkflowStep output defined by that Workflow version | +| Terminal outcome | mutable `Outcome{Status, Detail}` | Explicit WorkflowExecution outcome command/event validated by the state machine | +| Skill context | `SkillBody`, `SkillPlugins` | Resolved Workflow version dependencies or execution inputs, with provenance | +| Agent prompt context | `SystemPrompt`, `ExtraRules`, mission strings | Versioned WorkflowStep definition plus resolved execution context; mutable global prompt callbacks removed | +| Gates and protection | `Gate`, `Preflight`, `Protection`, repository config | Agent System policy definitions resolved for the WorkflowExecution and enforced outside the agent | +| Budgets | steps, tokens, wall clock, gate failures | Execution and StepExecution policy values with measured usage and evidence | +| Tool access | capture tools, registry, guardrails, skill plugins | Resolved step capability set and policy; global registry pointers do not enter execution state | +| Persistence timestamps | SQL `created_at`, `updated_at`; Nell metadata | Domain timestamps and version used for optimistic concurrency and audit | +| Transition history | SQL `transitions`, Nell updates, generic events | Authoritative WorkflowExecution domain events stored atomically with state | + +## Current runtime responsibilities to unify + +The following behaviours currently act on the same WorkflowExecution but are +implemented in different packages: + +- accept a request from a channel and enforce idempotency; +- select and version a Workflow; +- create, queue, claim, schedule, and execute a WorkflowExecution; +- serialize same-repository execution where policy requires it; +- resolve identity-specific capabilities; +- prepare, retain, recover, and clean up the workspace; +- run deterministic and agent-backed WorkflowSteps; +- enforce gates, budgets, protected paths, tool constraints, and result review; +- persist state and StepExecution outputs; +- publish authoritative lifecycle events; +- wait for channel input and resume; +- classify failure, retry, park, mark exhausted, cancel, or recover after crash; +- deliver and reconcile forge changes; +- project status, history, counts, and audit for channels and the web UI; +- hand execution to a worker without moving domain ownership to the worker. + +## Current workflow-feature hazards + +- There is no enforced WorkflowExecution state machine. `Store.Transition` + ignores the supplied `from` state when updating the row. +- State update and transition-history insertion are separate operations, so + state and audit can diverge. +- Callers frequently discard persistence and transition errors. +- Gateway task control duplicates lifecycle status constants by hand. +- `workflow.TaskContext` is a mutable service bag containing complete + configuration plus forge, store, worktree, agent, event bus, logging, memory, + guardrails, skills, and scratch state. +- Lifecycle changes occur in both daemon and workflow code. +- In-process and container execution place workflow orchestration on different + sides of the process boundary. +- Forge-backed and chat-created work share one record through source flags and + synthetic issue numbers. +- Repository labels currently select workflows and mirror task state, coupling + domain transitions to forge presentation. +- Failure generally becomes `parked`, but failure classification and + retryability are not represented explicitly. +- Generic observability events are emitted alongside state changes rather than + being the authoritative domain events. + +## Existing invariants to preserve + +- The model never performs git operations directly. +- Deterministic policy and gates cannot be waived by the agent. +- TDD captures a failing reproduction before implementation and protects the + test during the fix. +- Every run ends in an explicit outcome; definition errors and stage errors do + not disappear silently. +- Crash recovery requeues interrupted work. +- Agent execution crosses a versioned data boundary. +- Forge, persistence, workspace, transport, container, and model runtimes remain + replaceable infrastructure. +- Work from the same repository is serialized by default. + +## Required migration + +- Rename the current persisted `store.Task` concept to WorkflowExecution. +- Replace task lifecycle terminology in core commands, events, persistence, + worker contracts, logs, and generated reference. +- Preserve external source terminology only inside its channel adapter. +- Replace synthetic issue numbers with explicit source-message references. +- Associate every WorkflowExecution with an immutable Workflow identifier and + version. +- Record StepExecutions explicitly rather than treating one mutable `stage` + field as complete execution history. +- Keep Attempt as retry state within the same WorkflowExecution. diff --git a/docs/prds/architecture/configuration.md b/docs/prds/architecture/configuration.md new file mode 100644 index 000000000..b8e969dc2 --- /dev/null +++ b/docs/prds/architecture/configuration.md @@ -0,0 +1,292 @@ +# Configuration + +**Status:** Approved; existing-type assignment is ongoing +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Ownership + +Configuration has two separate responsibilities: + +1. `internal/infrastructure/configuration` loads files, environment variables, + secret references, overlays, and compatibility representations. +2. Each domain and plugin owns the typed runtime settings required for its + behaviour. + +`internal/app` translates external input into those settings, validates +cross-capability combinations, and supplies each component only its own +settings. + +The following are prohibited: + +- passing complete application configuration into a domain; +- making a domain depend on TOML, YAML, environment-variable names, secret + references, or a configuration library; +- defining a central runtime configuration type imported across the system; +- placing plugin options in an unrelated global configuration model. + +## Private input document + +`internal/infrastructure/configuration` MAY use a complete decoded document +while discovering files, decoding sections, and applying overlays. It is an +input-boundary DTO only. + +The document: + +- remains private to the configuration infrastructure; +- is composed from separately defined feature sections; +- is immediately translated by application composition; +- is never returned as the application's runtime model; +- is never passed through runtime components. + +External DTOs and domain runtime settings are separate types. + +Plugins supply external configuration definitions through a narrow extension +contract. The core loader MUST NOT gain a field or recognized filename for every +plugin. + +Invalid configuration input MUST NOT replace active valid settings or terminate +unaffected capabilities. Configuration changes use the candidate validation, +promotion, audit, and recovery requirements in +[safe-change-and-recovery.md](safe-change-and-recovery.md). + +## Dissolution of `internal/config` + +`internal/config` has no target location. It MUST be dissolved and MUST NOT +survive as a shared package, configuration domain, or renamed global model. + +Its loading behaviour moves to `internal/infrastructure/configuration`. Existing +types and methods are reassigned by behaviour. Repository execution policy, +dispatch policy, retry policy, ecosystem defaults, tool policy, memory settings, +indexing settings, provider settings, and channel settings move to their +respective owners. + +## Repository settings + +The existing `config.Repo` MUST NOT move intact into a repository domain or +shared settings package. A managed repository is an application association: + +- work intake owns which repository references an identity monitors; +- task execution owns gates, preflight, test protection, ecosystem behaviour, + and change limits; +- task lifecycle owns retry behaviour; +- scheduling owns concurrency policy; +- workspace management owns base branch and persistent-storage requirements. + +Application composition correlates these settings by repository reference. No +domain receives a universal repository profile. + +## Documentation + +Generated configuration reference describes external sections and their owning +capabilities. It MUST NOT establish a global Go configuration structure as the +public contract. + +## Value classification rule + +Every value that controls behaviour MUST have an explicit owner and MUST be +classified as exactly one of: + +1. **Invariant** — changing it changes the meaning of the program, a wire + protocol, or a domain concept. It may be a Go constant. +2. **Runtime setting** — an operator, identity, domain, plugin, or deployment + may legitimately choose a different value. It is typed configuration owned by + the affected capability. +3. **Policy value** — it expresses what is allowed, limited, routed, retried, + protected, or gated. Its typed definition belongs to the owning domain and it + is evaluated through the policy system. +4. **Derived value** — it is computed from other settings and is not + independently mutable. +5. **Runtime state** — it changes as the application operates, such as the + active model for a conversation. It is changed by a domain command and is not + configuration merely because it can be changed. + +An unclassified behavioural literal is a defect. + +`const` MUST NOT be used merely because a value currently has one default. +Constants are reserved for actual invariants: enum discriminants, protocol +versions, fixed compatibility tokens, and values whose alteration would change +the program's semantics rather than configure an installation. + +In Go, a constant is a compile-time value and does not represent mutable runtime +storage. It generally has no address that can be observed or changed. +Architecturally, a constant therefore asserts that the value cannot change for +the lifetime of the application. Any value that may legitimately change while +the application is running, between application instances, or between +deployments is not a constant. + +A runtime setting may have a default, but the default is not its only access +path. The owner exposes a typed settings structure, validation, and a +`DefaultSettings` constructor or equivalent. Private constants used to implement +defaults do not turn those defaults into invariants and MUST NOT be consumed +directly by runtime code. + +Each runtime setting and policy value MUST declare: + +- its owner; +- type, units, validation constraints, and safe bounds; +- default and derivation, if any; +- whether it is startup-only, live-reloadable, or restart-required; +- whether it may differ by installation, identity, repository, workflow, + channel, or plugin instance; +- whether it is secret, sensitive, or safe to report; +- its current source, effective value, version, and last-known-good version; +- the command and identity required to change it. + +## Current configuration migration ledger + +This ledger records the current meanings hidden inside `internal/config`. It is +the source inventory for dissolving that package; rows are split where the +existing structure combines different owners. + +| Current values | Current location | Target owner and requirement | +| ----------------------------------------------------------------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `WorkDir`, `DBPath` | root `Config` | Workspace/storage infrastructure settings. Defaults derive from the platform data directory. | +| `SkillsDir`, `PluginDir` | root `Config` | Skill and plugin infrastructure settings, independently typed. | +| `PollInterval` | root `Config` | Work-intake scheduling setting; not a daemon-wide constant. | +| `Label`, `BotUser`, `BotEmail` | root `Config` | Identity and dispatch associations. `BotEmail` may be derived from the selected forge account but remains overrideable. | +| `MaxRetries` | root `Config`, `Repo` | Retry policy owned by the operation being retried. The duplicate global/repository representation must disappear. | +| `DiffCapLines` | root `Config` | Agent-change policy value. | +| `MaxSteps`, `MaxTokens`, `WallClock`, `GateMaxFailures` | `Budgets` | Workflow-execution policy, with units and zero/unlimited semantics made explicit. | +| `Class`, `APIKeyEnv`, `BaseURL` | `Provider` | Provider instance settings. Secret lookup becomes a `SecretRef`, not an environment variable name leaking into the provider domain. | +| `Mode`, `Command`, `Env` | `Agent` | Agent-execution infrastructure settings. Arbitrary environment injection is explicitly trust-sensitive. | +| `Type`, `Host`, `Token`/legacy `TokenEnv` | `Forge` | Forge adapter settings. Legacy input is accepted only at the loader boundary. | +| `Trigger`, `AckReaction`, label names | `Dispatch` | Work-intake and forge presentation policy. Label vocabulary is configurable per forge/identity association. | +| `Provider`, `ProviderConfig`, `SessionTTL` | `MemoryConfig` | Memory capability settings. Provider-specific data remains owned and validated by that provider. | +| `Name`, `Transport`, `Command`, `Args`, `WorkDir`, `URL` | `MCPServer` | One typed MCP server instance specification. Transport-specific variants must reject fields belonging to other variants. | +| `MaxResultChars`, `ParallelExecution` | `ToolPolicy` | Tool-execution policy values, not generic daemon configuration. | +| `URL`, `TokenEnv` | `NATSConfig` | NATS transport settings with a secret reference replacing the environment-name field. | +| `Enabled`, `Image`, `MaxConcurrency`, `MaxUptime`, `VolumeTTL`, `PullPolicy`, `Network` | `ContainerConfig` | Container-execution infrastructure settings and resource policy. | +| model mappings, email, webhook, Telegram | `ChatConfig` | Separate channel instance settings plus channel-routing associations; there is no chat-wide settings owner. | +| `AllowedUserIDs`, `TokenEnv`, update commands | Telegram config | Telegram adapter settings and access policy. Secret and policy fields are distinct. | +| listen/relay addresses | email config | Email adapter instance settings. | +| webhook target | `Notify` | Notification adapter instance settings. | +| web listen address | `Web` | Web transport settings. | +| index directory and database path | `Indexing` | Index infrastructure settings, derived from storage settings unless explicitly overridden. | +| forge, dispatch, models, providers, agent, containers, memory, tools, indexing and repositories | `IdentityConfig` | Existing composite duplicates unrelated settings. Replace it with associations from an `IdentityID` to independently owned configured instances. | +| owner, name, base, gate, protection, ecosystem, preflight, storage, retry and concurrency | `Repo` | Split across work intake, workspace, workflow execution, policy, gate, and scheduling as described in Repository settings. | +| `TaskConfig`, `TaskForge` | worker snapshot | Replace with the minimum immutable, versioned WorkflowExecution input assembled by the application. It is not a second configuration model. | +| `Extra` and arbitrary maps | root/provider config | Allowed only at an extension boundary whose owning plugin/provider supplies schema and validation. Core configuration never consumes an untyped catch-all. | + +## Behavioural literals and incorrectly fixed values + +The following current values affect useful behaviour but are not represented as +owned typed settings or policy. They MUST be classified and migrated before the +old configuration package is removed. The listed target is the architectural +decision; exact setting names are implementation details. + +| Capability | Values fixed in current code | Required classification | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Chat agent | maximum steps `8` in `cmd/archied` | Workflow/chat execution policy. | +| Context compression | enabled, threshold `0.5`, context size `128000`, protect first `3` and last `20`, compression marker, token estimate of four characters per token | Model/context runtime settings. The marker is presentation; the estimate is provider/model strategy, not a universal truth. | +| Tool guardrails | escalation thresholds `3`, `5`, `10`, `2` | Tool-use policy with named meanings and bounded defaults. | +| Tool output | turn budget `200000` characters and preview `500` characters | Tool-execution resource and presentation settings. | +| Pairing/access | code TTL `1h`, maximum pending `3`, rate window `10m`, failures `5`, lockout `1h`, maximum lockout `24h` | Access policy. Code length/alphabet and salt length require an explicit security-constraint decision; they are not automatically valid constants. | +| NATS daemon consumer | stream `ARCHIE_TASKS`, consumer `archie-daemon`, deduplication `2m`, poll `2s`, deliveries `3`, acknowledgement wait `5m`, inactive threshold `24h`, subjects | NATS topology settings plus delivery policy. Subject grammar or protocol headers may be invariants only if declared as versioned wire contracts. | +| NATS worker consumer | stream `ARCHIE_TASKS`, consumer `archie-agent`, deduplication `2m`, poll `5s`, acknowledgement wait `30m`, deliveries `3`, inactive threshold `24h`, queue group and retry delay `1s` | Worker transport settings and delivery/retry policy. Shared stream defaults must have one owner rather than two copies. | +| Worker readiness | readiness timeout `20s`, retry delay `250ms` | Worker lifecycle and retry policy. | +| Execution/RPC | agent execution `30m`, task-run RPC `60s`, worktree RPC `15m` | Per-operation timeout policy. | +| Indexing | build timeout `10m`, metadata timeout `5s` | Index operation policy. | +| Plugin/tool cleanup | plugin rollback `10s`, tool-provider cleanup `10s`, MCP-provider cleanup `10s` | Lifecycle shutdown/rollback policy owned by each engine, with a shared policy vocabulary where appropriate. | +| Memory | sync buffer `100`, prefetch `8s`, shutdown `10s`, single external-provider limit | Memory resource/lifecycle settings. The provider-count restriction is a product rule only if deliberately retained. | +| Built-in memory store | file limit `100KiB`, section-name length/character rules, query/match truncation limits, built-in provider/tool names | Split into memory resource policy, input policy, presentation settings, and genuine registered identifiers. | +| Memory safety scanner | compiled prompt-injection and sensitive-data patterns with fixed warn/block consequences | Versioned memory-domain policy definitions. Patterns and consequences must be inspectable and replaceable without editing scanner code. | +| MCP stdio | initial backoff `500ms`, maximum backoff `30s`, unlimited default retries, send and shutdown `5s` | MCP transport retry, request, and lifecycle policy. Unlimited retries must be explicit rather than a zero-value accident. | +| MCP SSE/HTTP | reconnect `1s` to `30s`, POST/request timeout `30s` | MCP transport settings and retry policy. | +| Message framing | MCP frame `4MiB`, worker protocol frame `8MiB`, diagnostic `64KiB`, media/base64 `64MiB` | Resource/security policy unless a published wire protocol mandates the limit. Limits must be configurable only within safe bounds. | +| Webhooks and web UI | webhook bind `0.0.0.0:8644`, webhook shutdown `5s`, web read-header `5s`, web shutdown `2s` | Transport instance and lifecycle settings. | +| Telegram | typing refresh `4s`, draft interval `700ms`, update-action TTL `10m` | Telegram adapter presentation and lifecycle settings. | +| Telegram limits | message length `4000` and callback/update prefixes | Record the upstream platform constraint and version it as an adapter compatibility limit; prefixes may remain wire constants when changing them would invalidate outstanding callbacks. | +| Containers | stop and pull timeouts `10s` and `30s` | Container lifecycle policy. | +| HTTP clients | feasibility notification timeout `10s`; other paths use `http.DefaultClient` | Adapter request policy. Every outbound client requires an explicit timeout profile. | +| Workflow routing | labels `bug`, `feature`, `bootstrap`; workflows `tdd`, `feasibility`, `bootstrap`; fallback `implement` | Agent-system routing policy. Workflow identifiers are references, not compiled routing decisions. | +| Filesystem/deployment | `.agents/skills`, `.archie/stages`, `.archie/gate.go`, `/data/worktree`, `/data/repo`, cache names/paths and prepared sentinel | Split into deployment settings, repository conventions, and genuine internal protocol markers. Paths an installation may relocate are settings. | +| Packaged release data | `/usr/share/archie/CHANGELOG.archied.md` and `/usr/share/archie/CHANGELOG.archie.md` | Packaging/deployment settings or paths derived from an installation prefix. | +| Forge presentation | default label colour `bfd4f2` and state-label colours | Forge adapter presentation settings. | +| Fallback system prompt | compiled fallback prompt | Agent-system default content, versioned and replaceable through its owning settings; safety constraints remain policy/code. | +| Default paths and identities | config path, data paths, listen addresses, model roles and workflow names | Typed defaults belonging to their respective owners, never global constants consumed throughout the application. | + +This inventory is intentionally broader than exported Go `const` declarations. A +literal hidden in a constructor, timeout, switch, retry loop, path join, prompt, +label map, or client setup restricts behaviour just as effectively as an +incorrectly used constant. + +## Constants that may remain + +A value may remain constant only when its owner documents why runtime variation +would be invalid. Typical valid cases are: + +- domain enum values and state names; +- a versioned wire-protocol version or framing token; +- reserved internal headers and callback prefixes that peers must interpret + identically; +- compile-time mathematical relationships; +- sentinel errors and internal type identifiers. + +Names such as a stream, consumer, label, workflow, file, directory, network, +model role, timeout, retry count, capacity, size limit, colour, prompt, command, +or executable are not invariants merely because the current application has only +one of them. + +Architecture tests SHOULD reject exported behavioural constants outside approved +invariant packages and SHOULD detect direct consumption of private default +constants outside their owning `DefaultSettings` construction. + +## Current mutation and reload ledger + +The application currently changes behavioural values through unrelated paths: + +| Current change seam | Current behaviour | Required target | +| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Telegram `/restart` in `cmd/archied` | Re-reads the global document and directly replaces Telegram token and allowed-user IDs; failure retains old values. | Submit a Telegram-settings candidate through the universal change protocol. Validate the complete candidate, promote atomically, audit the acting identity, and retain last-known-good. | +| Active model selection | `chatModelManager.SetActiveModel` changes a model reference. | A conversation/session command changing runtime state. Validate against configured model instances and audit it; do not rewrite configuration. | +| Active provider selection | `chatModelManager.SetActiveProvider` changes provider selection. | A conversation/session command changing runtime state, with the same distinction from provider-instance configuration. | +| Persona selection | `PersonaRegistry.SetActive` mutates an in-memory per-session choice. | Agent-system session state. Persistence and audit requirements are owned by that domain, not the configuration loader. | +| Memory provider `SaveConfig` | Accepts an untyped map, delegates validation/persistence to an optional provider interface, then providers reload backing files. | A typed provider-owned configuration command using candidate validation, versioning, atomic promotion, health observation, audit, and rollback. | +| File and environment overlays | Applied while loading `internal/config`; defaults are filled by mutation in `finalize`. | Configuration-infrastructure input processing that produces separately typed candidates. Defaults and derivations remain visible in provenance. | + +Any further mutation seam discovered during migration MUST be added here before +it is changed. Direct field assignment on a live settings object is prohibited. + +## Universal change protocol + +Changing configuration is an application command performed by an identity. It +MUST: + +1. resolve the target owner and current version; +2. parse into that owner's typed settings; +3. validate syntax, semantic constraints, policy, references, and safe bounds; +4. stage a candidate without altering the active value; +5. run owner-defined readiness and health checks; +6. atomically promote the candidate and record actor, source, reason, diff, + prior version, and new version; +7. observe the affected capability for a bounded period; +8. retain the new version on success, or automatically restore last-known-good + on failure; +9. report the rejected or rolled-back candidate without terminating unaffected + capabilities. + +Startup loading uses the same candidate rules. A bad user value therefore does +not partially mutate the application or make a previously healthy capability +unavailable. + +Settings that cannot safely reload in-process are marked restart-required. The +change may still be validated and versioned immediately, but promotion occurs +through a controlled restart with the same health and rollback semantics. + +## Completion criteria + +The configuration rearchitecture is complete only when: + +- `internal/config` no longer exists; +- every behavioural value has one classification and owner; +- every current field and hard-coded value in the ledgers has a recorded + disposition; +- domains and plugins receive only their typed settings; +- all changes use semantic commands and the universal change protocol; +- active, candidate, rejected, rolled-back, and last-known-good versions are + queryable with secret-safe provenance; +- generated documentation lists every external key, default, constraint, + mutability class, owner, and deprecation; +- architecture tests prevent a new central runtime configuration model, direct + live-setting mutation, and incorrectly fixed behavioural values. diff --git a/docs/prds/architecture/dependencies-and-contracts.md b/docs/prds/architecture/dependencies-and-contracts.md new file mode 100644 index 000000000..505d2727b --- /dev/null +++ b/docs/prds/architecture/dependencies-and-contracts.md @@ -0,0 +1,71 @@ +# Dependencies and Contracts + +**Status:** Approved foundation +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Dependency direction + +```text +domain and shared application contracts <- infrastructure implementations + ^ + | + application composition +``` + +The following rules are strict: + +1. Domains MUST NOT import `internal/infrastructure`. +2. A domain defines the smallest interfaces required to perform its work. +3. Infrastructure implements those interfaces and translates external + representations at the boundary. +4. Only application composition chooses concrete implementations. +5. A domain MUST NOT manipulate another domain's state or call its internal + services. +6. Cross-domain work uses an explicitly designed command, event, or approved + shared contract. +7. Implementation difficulty is not permission to violate a boundary. + +Broker messages, database rows, SDK response types, and configuration DTOs MUST +NOT leak into domain models. + +## Commands and events + +- An event records something that happened and is owned by its publishing + domain. +- A command requests an action and is owned by the domain expected to handle it. +- Consumers do not redefine an event's meaning. +- Senders obey the receiving domain's command contract. +- There is no generic package containing unrelated application messages. + +## Event bus + +`internal/eventbus` is an approved shared application contract. It defines only +the messaging behaviour Archie requires, including publication, subscription, +delivery outcomes, and required lifecycle semantics. + +It MUST remain broker-neutral. NATS subjects, JetStream configuration, consumer +groups, acknowledgements, reconnection, and serialization belong under +`internal/infrastructure/eventbus/nats` unless Archie explicitly requires a +semantic guarantee in the shared contract. + +Message schemas stay with their owning domains. The event bus transports +messages; it does not own their meaning. + +## Wire contracts and generation + +Canonical worker and service wire contracts and their authoritative generation +inputs are owned by the domain or capability that defines their meaning. They +MUST NOT be centralized in `internal/infrastructure/spec` or another generic +schema package. + +Infrastructure owns: + +- generic contract-generation machinery; +- transport-specific adapters and generated implementations; +- RPC, REST, NATS, and other external encoding and delivery concerns. + +For example, agent-worker requests and results belong to task execution. +Subprocess, NATS, or HTTP representations are infrastructure implementations of +that contract. The same rule applies independently to forge, persistence, +workspace, and other service contracts. diff --git a/docs/prds/architecture/generated-documentation.md b/docs/prds/architecture/generated-documentation.md new file mode 100644 index 000000000..3afab20e2 --- /dev/null +++ b/docs/prds/architecture/generated-documentation.md @@ -0,0 +1,473 @@ +# Generated Documentation and Documentation Site + +**Status:** Initial generator and site scaffold in progress +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Purpose + +Archie's documentation-generation approach is: + +- Go code and registries remain the source of truth for published contracts; +- a repository-local Go generator produces schemas and reference pages; +- VitePress renders handwritten and generated Markdown; +- GitHub Actions builds and publishes the static site. + +Hugo is not part of the target architecture. + +The documentation system is rooted at: + +```text +.github/workflows/docs.yml +tools/ + go.mod + go.sum + docsgen/ + main.go +docs-2/ + .vitepress/ + public/ + package.json + pnpm-lock.yaml + pnpm-workspace.yaml + *.md +``` + +### VitePress site + +The `docs-2` site provides: + +- VitePress 1.6.x with pnpm; +- Markdown content at the site root; +- repository-owned navigation and sidebar configuration; +- local full-text search; +- clean URLs and last-updated metadata; +- build output under `.vitepress/dist`; +- GitHub Pages-compatible static output; + +### GitHub Pages workflow + +The workflow provides: + +- full-history checkout for VitePress `lastUpdated`; +- pinned pnpm major version; +- Node setup and pnpm caching; +- VitePress cache reuse; +- frozen-lockfile installation; +- static build, artifact upload, and Pages deployment; +- serialized deployments without cancelling an in-progress publish. + +## Single source of truth + +Every published capability has one authoritative machine-readable definition +owned by its domain or application boundary. Generated documentation derives +from those definitions. + +Generated reference includes: + +- domain commands and events; +- Messages and typed message content; +- Agent and Workflow contracts; +- WorkflowSteps and Workflow plugin capability contracts; +- policies and their typed inputs and outcomes; +- tools and capabilities; +- CLI commands, arguments, flags, defaults, and help; +- runtime settings, types, defaults, validation, and secret metadata; +- public worker and transport contracts; +- indexes of registered functionality; +- deprecation information. + +Handwritten documents contain: + +- architecture decisions and rationale; +- tutorials and operational guides; +- examples and walkthroughs; +- migration guidance; +- conceptual explanations. + +Handwritten documents link to generated reference rather than copying +authoritative tables. + +## Target generation architecture + +`tools/docsgen` is Archie's documentation generator. It produces protocol +specifications and Markdown reference pages. + +The generator is divided internally into reusable stages: + +```text +load registries and types + -> normalize documentation model + -> validate ownership and identifiers + -> render target artifacts + -> compare or write output +``` + +The normalized documentation model prevents each output renderer from +independently interpreting Go types. It contains stable documentation IDs, +owners, names, descriptions, source references, versions, deprecations, fields, +defaults, validation, secret classifications, and relationships. + +Initial generator targets: + +```text +docsgen asyncapi +docsgen pages +docsgen all +docsgen check +``` + +- `asyncapi` writes protocol schemas and envelopes. +- `pages` writes generated Markdown reference and its manifest. +- `all` generates every committed artifact. +- `check` generates into a temporary directory and fails on drift. + +The command may use subcommands or an equivalent explicit `--target` flag. It +MUST retain one normalization and validation path. + +## Target output + +During adaptation, `docs-2` remains the staging site. Generated outputs live in +a visibly owned subtree: + +```text +docs-2/ + asyncapi/ + header.yaml + archie.yaml + reference/ + generated/ + _index.md + cli/ + configuration/ + messaging/ + agents/ + workflows/ + policies/ + plugins/ + tools/ + manifest.json + .vitepress/ + config.mts + generated-sidebar.mts +``` + +All files under `reference/generated/` carry a generated marker and MUST NOT be +edited manually. + +`manifest.json` is the deterministic machine-readable index used for: + +- generated sidebar and navigation entries; +- duplicate-ID and duplicate-route validation; +- coverage checks; +- source-to-page drift diagnostics; +- future external consumers. + +The final move from `docs-2/` to `docs/` occurs only after Archie content +contains intentional Archie pages and the current architecture documents have an +intentional destination. The staging name MUST NOT leak into public URLs. + +## Generation steps + +### Step 1: maintain the Archie tools module + +Keep `tools/go.mod` isolated from the runtime module: + +```go +module github.com/samcharles93/archie-core/tools + +require github.com/samcharles93/archie-core v0.0.0-00010101000000-000000000000 + +replace github.com/samcharles93/archie-core => ../ +``` + +Keep generator-only dependencies such as `invopop/jsonschema` and YAML in the +nested tools module. They MUST NOT enter the root module. + +`docsgen` imports Archie-owned contracts and writes Archie reference artifacts. + +### Step 2: establish authoritative registries + +The generator consumes domain-owned registries rather than scanning arbitrary +packages for anything exported. + +Each published definition supplies: + +- stable documentation ID; +- owning domain or boundary; +- name and description; +- version when versioned; +- the Go type or declarative definition; +- lifecycle and deprecation metadata; +- source reference. + +Registries remain executable application definitions used by production code. A +documentation-only duplicate registry is prohibited. + +Where the migration has not yet created a final domain registry, the generator +may use a narrow compatibility adapter over the current registry. That adapter +has explicit deletion criteria. + +### Step 3: generate AsyncAPI + +Use Archie's messaging and worker wire registries as the authoritative inputs. + +The static header continues to own: + +- AsyncAPI version; +- service and protocol description; +- servers; +- channels; +- operations; +- message envelope placement. + +The generator owns: + +- component schemas; +- discriminated concrete message lists; +- generated envelopes; +- rewritten schema references; +- stable ordering. + +The generated protocol artifact becomes: + +```text +docs-2/asyncapi/archie.yaml +``` + +The final owner of each wire registry is the domain or capability defining its +meaning. `docsgen` renders the contract; it does not own the message semantics. + +### Step 4: add Markdown page generation + +Add renderers for the missing reference categories one vertical slice at a time. + +Recommended implementation order: + +1. CLI commands and flags; +2. runtime configuration/settings; +3. Messaging commands, events, and message types; +4. Agent definitions and public commands; +5. Workflow definitions, WorkflowSteps, lifecycle, and plugin contracts; +6. policy definitions and typed outcomes; +7. tools and capability contracts; +8. worker and external wire contracts. + +Each category renderer produces: + +- a section index; +- one stable page per published definition where useful; +- field/type/default/validation tables; +- source links; +- version and deprecation information; +- cross-links to related commands, events, policies, and contracts. + +The first vertical slice proves the normalized model and templates. Later +categories reuse them rather than introducing category-specific ad hoc +generation. + +### Step 5: generate VitePress navigation + +Generate navigation data from `manifest.json`, not by manually duplicating every +generated page in `.vitepress/config.mts`. + +Handwritten top-level navigation remains explicit. Generated reference sections +are imported from `.vitepress/generated-sidebar.mts`. + +The generated navigation file is deterministic and committed with the reference +pages. + +### Step 6: implement deterministic drift checking + +`docsgen check`: + +1. generates all artifacts into a temporary directory; +2. normalizes line endings and file modes; +3. compares the complete expected tree with committed outputs; +4. reports missing, changed, and obsolete files; +5. identifies the authoritative definition associated with each mismatch; +6. exits non-zero without modifying the working tree. + +Generation MUST exclude: + +- wall-clock timestamps; +- absolute filesystem paths; +- map iteration order; +- environment-specific values; +- secrets and resolved credentials. + +Two consecutive `docsgen all` runs MUST be byte-identical. + +### Step 7: adapt the VitePress site + +Maintain Archie-specific configuration and content: + +- site title and description; +- repository, edit, and source links; +- navigation and sidebars; +- favicon, CNAME, and deployment base path; +- landing page and guides; +- protocol links; +- footer; +- embedded documentation expectations. + +Retain: + +- local search; +- clean URLs; +- last-updated metadata; +- repository-owned VitePress configuration; +- pnpm frozen-lockfile builds. + +VitePress validates Markdown and internal links during its production build. +Dead-link failures MUST remain enabled; blanket `ignoreDeadLinks` is prohibited. + +### Step 8: adapt developer commands + +`Taskfile.yml` will expose: + +```text +task docs:generate # go -C tools run ./docsgen all +task docs:check # go -C tools run ./docsgen check, then build VitePress +task docs:serve # generate, install if needed, then start VitePress dev +task docs:build # generate/check and create the production static site +``` + +Commands use explicit paths: + +```sh +go -C tools run ./docsgen all --repo-root .. +go -C tools run ./docsgen check --repo-root .. +pnpm --dir docs-2 install --frozen-lockfile +pnpm --dir docs-2 dev +pnpm --dir docs-2 build +``` + +The final command syntax must match the implemented CLI, but these task names +and responsibilities are fixed. + +`task check` runs `docs:check`. Generated drift, invalid Markdown, dead links, +or a failed VitePress build block completion. + +### Step 9: adapt CI and Pages deployment + +The workflow watches: + +```text +.github/workflows/docs.yml +docs-2/** +tools/go.mod +tools/go.sum +tools/docsgen/** +authoritative domain registry and type paths +``` + +The build job: + +1. checks out full history; +2. installs the repository's Go version; +3. runs `docsgen check`; +4. installs the pinned pnpm version; +5. installs the configured Node version; +6. restores pnpm and VitePress caches; +7. installs dependencies with the frozen lockfile; +8. builds VitePress; +9. uploads `docs-2/.vitepress/dist`. + +The deploy job uses the required Pages permissions, environment, concurrency, +and artifact deployment flow. + +CI MUST check generated output; it MUST NOT regenerate and silently publish +uncommitted differences. + +### Step 10: remove non-source artifacts and cut over + +Before treating the site as Archie documentation: + +- keep `node_modules/` out of source control; +- keep `.vitepress/dist/` out of source control; +- ensure both paths are ignored; +- remove Markdown, examples, specs, generated schemas, and assets that do + not describe Archie; +- adapt retained content and prove it against Archie code; +- update `docs.go` and its tests to embed only intentional runtime + documentation; +- decide which current `docs/prds` remain published architecture pages and which + remain repository-only planning documents; +- rename `docs-2` to its final location; +- update workflow, Taskfile, links, and embed paths atomically. + +Documents MUST describe Archie before they are published. + +## Hook and CI policy + +Generated documentation is committed. + +The pre-commit hook: + +1. detects authoritative definition or generator changes; +2. runs `task docs:generate`; +3. runs `task docs:check`; +4. refuses the commit when generated changes are unstaged or validation fails. + +CI: + +1. runs `task docs:check` without modifying committed output; +2. builds the static site; +3. publishes only from the approved branch or release; +4. never treats generated reference as handwritten source. + +A commit MUST NOT be created while generated documentation is stale. + +## Validation requirements + +Generator tests cover: + +- stable ordering; +- schema reference rewriting; +- `$defs` flattening; +- duplicate IDs and routes; +- registry coverage; +- comments and descriptions; +- secret redaction; +- obsolete-file removal; +- byte-identical repeated generation; +- check-mode diagnostics. + +Site validation covers: + +- frozen dependency installation; +- VitePress production build; +- dead internal links; +- generated navigation imports; +- expected output routes; +- absence of unrelated product names and URLs; +- absence of committed build artifacts. + +The root module remains free of generator-only dependencies. + +## Completion criteria + +The documentation migration is complete when: + +- `tools` belongs to Archie and builds against the working tree; +- `docsgen` consumes Archie-owned registries and types; +- AsyncAPI output describes Archie; +- required reference categories are generated as committed Markdown; +- generated navigation and manifest match generated pages; +- two consecutive generations are byte-identical; +- `docsgen check` detects changed, missing, and obsolete artifacts; +- VitePress contains only intentional Archie content; +- build artifacts and installed dependencies are absent from source control; +- `task docs:serve` supports local authoring; +- `task docs:build` produces the deployable site; +- `task check` blocks stale or broken documentation; +- GitHub Pages publishes the verified VitePress artifact. + +## Implementation references + +- [VitePress getting started](https://vitepress.dev/guide/getting-started) +- [VitePress site configuration](https://vitepress.dev/reference/site-config) +- [VitePress local search](https://vitepress.dev/reference/default-theme-search) +- [VitePress deployment](https://vitepress.dev/guide/deploy) +- [VitePress CLI](https://vitepress.dev/reference/cli) diff --git a/docs/prds/architecture/identity.md b/docs/prds/architecture/identity.md new file mode 100644 index 000000000..3da1c9789 --- /dev/null +++ b/docs/prds/architecture/identity.md @@ -0,0 +1,293 @@ +# Identity + +**Status:** Approved foundation; lifecycle details are deferred +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Purpose + +Identity answers which persistent actor owns or performed an action. It supplies +stable cross-domain attribution and lifecycle semantics. + +Identity kinds include: + +- the Archie system identity, such as `System` or `archied`; +- agent or bot identities; +- service-account identities; +- future user identities. + +A user is another kind of identity rather than a separate foundation concept. + +## Ownership + +`internal/domain/identity` owns: + +- immutable canonical `IdentityID` values; +- identity kind; +- lifecycle state; +- ownership and attribution semantics; +- identity-related commands and events. + +Domains may record an identity reference on their own state and events when +ownership or attribution is required. They MUST NOT receive a complete +per-identity application configuration bundle. + +Persona and communication style are separate from identity. + +Every Agent has its own immutable acting `IdentityID`. Agent actions use that +identity for ownership and attribution in the same way an organisation records +which user accessed a resource, changed a permission, or performed another +auditable action. + +Agent and Identity remain separate aggregates. Identity supplies the stable +actor reference; Agent owns assistant behaviour, memory, specialisation, +conversations, and capability context. + +Agent identities MUST NOT be shared between Agents. Automated WorkflowExecutions +MAY eventually act through a dedicated service-account identity when a specific +unattended automation requires it. Such use is an explicit execution decision +and audit principal, not the default for Agents or a substitute for recording +the initiating user when one exists. + +A Workflow is owned by an IdentityID and executes as its owner by default. +Future delegated execution MAY explicitly assign a different `RunAsIdentityID`, +including a user or service-account identity. Ownership, effective execution +identity, initiating identity, and delegation provenance remain distinct audit +facts. + +## Canonical identity + +Every identity has an immutable `IdentityID`. It is the only value used for +cross-domain ownership, attribution, routing, persistence, commands, and events. + +Identity kind is explicit: + +- system; +- bot; +- service account; +- user. + +Display names are mutable and MUST NOT be used as identifiers. Forge usernames, +channel bot names, Git authors, provider account names, and other external +identifiers are bindings associated with an identity rather than identity +itself. + +`System` is represented by a real identity and `IdentityID`. The empty string +MUST NOT retain special meaning as a legacy system identity. + +Configuration refers to identities by `IdentityID` and supplies external +bindings and capability settings separately. Renaming an identity or changing an +external account MUST NOT change ownership or historical attribution. + +## Persistence + +Identity records are durable domain state. The Identity domain's repository is +the source of truth; infrastructure implements its persistence contract. + +Configuration MAY bootstrap a missing identity through an explicit, audited +creation operation and MAY propose runtime capability bindings for an existing +`IdentityID`. Configuration is not the identity registry. + +Omitting an identity from configuration stops assembling the omitted runtime +capabilities. It MUST NOT delete the identity record, erase history, or make +historical references unresolvable. + +Disabling or retiring an identity requires an explicit Identity-domain command. +Retired identities remain resolvable for historical attribution. A failed +external binding affects capability availability without destroying or silently +replacing the identity. + +## Lifecycle + +Identity lifecycle is deliberately small: + +- `active`: may participate in runtime composition; +- `suspended`: deliberately prevented from initiating new work while ownership + and history remain; +- `retired`: terminal, unable to initiate work, and permanently retained for + attribution. + +Allowed transitions are: + +```text +create -> active +active -> suspended +suspended -> active +active -> retired +suspended -> retired +``` + +`retired` has no outgoing transition. + +Capability health is separate from identity lifecycle. Forge, model, channel, +workspace, and other bindings report health independently. An active identity +may be partially degraded without becoming suspended or retired. Runtime +supervision isolates and restores affected bindings through the safe-change and +recovery protocol. + +## System identity + +Archie has exactly one built-in system identity. It is created during initial +store bootstrap, is strictly always active, and cannot be suspended or retired. +Its `IdentityID` and kind are immutable. + +Startup, migration, supervision, remediation, and rollback actions performed by +the application use the system identity. The system identity MUST NOT be +delegated to individual identities. Every user, bot, service account, or other +actor mutation records the identity that actually performed it. + +System capabilities may independently become unhealthy or unavailable without +changing the system identity. + +## Target placement and contracts + +The Identity domain lives at `internal/domain/identity`. + +It owns: + +- `IdentityID`, identity kind, display name, lifecycle, version, and audit + timestamps; +- create, rename, suspend, reactivate, and retire commands; +- corresponding lifecycle events; +- the repository contract required for durable identity records; +- lookup of current and historical identities. + +External account bindings and capability settings remain with the domains that +use them and reference `IdentityID`. + +## Migration constraints + +Migration from the current string model MUST: + +- bootstrap the permanent system identity; +- assign stable IDs to configured identities without losing their names; +- replace empty-string legacy ownership with the system identity; +- migrate tasks and sessions to canonical identity references; +- include identity where task uniqueness and transport deduplication require + independent ownership; +- route container RPC through the task owner's capability bindings; +- retain historical resolution after rename, suspension, or retirement; +- remove identity-string equality from authentication or access semantics. + +This completes the foundation required to restructure the current Identity +behaviour. Exact storage schemas and Go method signatures belong to +implementation design, not this architecture review. + +## Lifecycle + +Identity lifecycle is deliberately small: + +- `active`: may participate in runtime composition; +- `suspended`: deliberately prevented from initiating new work while ownership + and history remain; +- `retired`: terminal, unable to initiate work, and permanently retained for + attribution. + +Allowed transitions are: + +```text +create -> active +active -> suspended +suspended -> active +active -> retired +suspended -> retired +``` + +`retired` has no outgoing transition. + +Capability health is separate from identity lifecycle. Forge, model, channel, +workspace, and other bindings report health independently. An active identity +may be partially degraded without becoming suspended or retired. Runtime +supervision isolates and restores affected bindings through the safe-change and +recovery protocol. + +## Explicit non-responsibilities + +Identity is not authentication and is not access control. + +The current architecture does not require authentication or authorization. Those +capabilities MAY be introduced later if deployment or product needs justify +them. They MUST remain separate from the identity model. + +An identity reference therefore proves attribution within Archie's trusted +system model; it does not by itself prove credentials or permission. + +## Per-identity configuration + +Values selected for an identity remain external configuration values. At +composition time they are split into the runtime settings owned by the affected +domains and correlated by identity reference. + +The existing `IdentityConfig` aggregate MUST be dissolved. Forge accounts, +repositories, models, providers, workspace behaviour, polling, budgets, +notifications, and transport namespaces retain their respective owners. + +## Audit + +Configuration changes and other state changes are actions attributed to an +identity. System-initiated changes use the system identity. Their audit records +MUST preserve the acting identity, the target, and the resulting change. + +The command ownership and persistence mechanism for configuration changes is a +separate configuration-management decision. + +## Current implementation + +Identity is not currently implemented as a domain. It is a collection of string +fields and process-local associations: + +- `config.IdentityConfig.Name` is the daemon routing key. +- `config.IdentityConfig.BotUser` is the external forge and Git author name. +- `daemon.IdentityRunner` bundles the configured name with a forge client, + worktree manager, repository list, configuration subset, logger, and polling + goroutine. +- `store.Task.Identity` persists the configured name on tasks. +- NATS task messages copy the same configured name. +- gateway routing accepts an identity name and uses it to select a repository + profile. +- gateway sessions persist `BotUser`, not the configured identity name. + +There is no identity registry, identity record, identity lifecycle state, +identity persistence, or identity command/event model. Removing an identity from +configuration makes existing task ownership unresolvable. + +An empty identity string selects the legacy single-identity path. This gives the +empty string behavioural meaning rather than representing a real system +identity. + +## Current enforcement and isolation + +The current implementation uses identity equality as an authorization check for +chat task approval and cancellation. This conflicts with the approved rule that +identity is attribution rather than authentication or access control and must be +reassigned to an appropriate task-ownership or future access policy. + +Focused tests verify that: + +- a task resolves the forge client and repository list associated with its + configured identity name; +- cross-identity repository profiles do not leak; +- chat task creation propagates the selected identity; +- task and NellDB persistence retain the identity string; +- chat task control rejects a different identity string. + +## Current hazards + +- SQLite task uniqueness is `(owner, repo, issue_number)` and excludes identity. + Two identities discovering the same forge issue cannot own distinct task + records. +- NATS deduplication uses `owner/repo/issue` and excludes identity, so discovery + by a second identity can be discarded as a duplicate. +- Container-mode forge and worktree RPC servers are wired to the root clients, + not the task owner's clients. The source documents this as an unresolved + identity leak. +- The shared task queue claims the oldest task without identity partitioning and + relies on later string lookup to recover the correct runner. +- Sessions use forge bot usernames where tasks use configured identity names, so + there is no canonical cross-domain identity reference. +- Identity lifecycle is process lifetime only; there is no disabled, degraded, + retired, or unavailable state and no audit history. + +The focused identity tests pass. Broader daemon and NATS suites could not open +embedded listener ports in the current sandbox; their failures occurred before +identity behaviour executed. diff --git a/docs/prds/architecture/messaging-and-work-intake.md b/docs/prds/architecture/messaging-and-work-intake.md new file mode 100644 index 000000000..07ad09c69 --- /dev/null +++ b/docs/prds/architecture/messaging-and-work-intake.md @@ -0,0 +1,286 @@ +# Messaging and Work Intake + +**Status:** Current state researched; foundation decisions in progress +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Purpose + +Archie is a personal assistant and general agentic system. Its interactions +include conversation, questions, notes, reminders, goals, message handling, +troubleshooting, infrastructure operations, server management, source changes, +and open-ended future capabilities. + +A message to an agent is therefore not inherently a work request, and invoking +an agent is not inherently a WorkflowExecution. + +Messaging and work intake are separate from the Agent System's durable workflow +execution model: + +- messaging preserves interactions with people and external systems; +- an agent turn interprets and responds to an interaction using its available + capabilities; +- work intake handles the optional promotion of an interaction into durable, + workflow-backed work; +- the Agent System owns Workflow definitions and creates WorkflowExecutions. + +Forge issues, Jira issues, Telegram messages, emails, webhooks, and future +channels remain peer external message or artifact sources. None becomes an +execution model merely because it can lead to work. + +## Confirmed boundary + +Work intake MUST NOT create a WorkflowExecution directly. + +Inbound interactions normally route to the Agent selected by the channel +binding. The selected Agent retains its own memory, user knowledge, conversation +continuity, specialisation, and capability context. This continuity is +independent of the underlying model or provider. + +Each selected Agent acts through its own immutable IdentityID. Interaction and +resulting action records preserve both that acting identity and the initiating +user identity when one exists. + +Agent memory is private by default. Interaction context MAY additionally use +user-wide memory and intentionally global shared memory, but another Agent's +agent-wide memory is not part of the selected Agent's context. + +Multiple users may interact with the same Agent. The channel binding and inbound +message MUST resolve both AgentID and initiating User IdentityID before +conversation or memory context is loaded. Sharing an Agent MUST NOT implicitly +share one user's private memory with another user. + +An interaction may assemble memory from four scopes: global shared, the selected +Agent's agent-wide memory, the initiating user's authorized user-wide memory, +and the private Agent-user relationship memory addressed by both IDs. + +## Conversation identity + +Every conversation is identified by the complete tuple: + +```text +AgentID ++ UserIdentityID ++ ChannelBindingID ++ ExternalConversationID ++ ThreadID +``` + +`ThreadID` has an explicit empty value for channels without threads. No element +of this key may be replaced by a display name, configured bot username, channel +type, or other mutable label. + +Agent and user memory continue across conversations according to their memory +scope. Immediate conversation history and delivery correlation remain isolated +to the identified channel conversation or thread. Moving between Telegram, +email, or another channel does not create a new Agent or user, but it does +create a distinct conversation unless an explicit linking operation relates +them. + +Conversation and message events support projections for channel-entry metrics, +use cases, volumes, outcomes, latency, capability usage, and other product or +operational analysis. Metrics are derived read models; they MUST NOT become +mutable counters embedded in the conversation aggregate or change message +routing semantics. + +## Canonical messages + +Every inbound, assistant, tool-call, and tool-result message has an immutable +application-generated MessageID. Platform identifiers are external correlation, +not substitutes for the canonical ID. + +Messages are addressable because an interaction is more than text. A message may +contain assistant content, reasoning data subject to its retention policy, one +or more tool calls, a tool result with authoritative execution metadata, +attachments, reply relationships, edits, or other typed content. Stable +MessageIDs also allow sessions to branch from an exact prior point. + +The canonical session and message implementation must supply: + +- application-generated stable message IDs; +- user, assistant, and tool roles; +- assistant tool calls and correlated tool-result messages; +- authoritative tool-result status, timing, error, truncation, and size + metadata; +- session lifecycle and active-request state; +- session-to-agent-instance and parent-session lineage; +- durable SQLite round trips and timestamp validation. + +These semantics must use the confirmed Agent, user, channel-binding, and +conversation ownership model. + +The canonical message store MUST preserve messages as immutable records and +represent later edits, deletions, and branches through related records or +events. + +Archie requires exact branch-point correlation using stable MessageIDs. + +## Conversation branches + +A branch is a continuation of a previous conversation at an exact message. A +child conversation records: + +```text +ParentConversationID +ForkMessageID +``` + +Messages remain an append-only linear sequence within each conversation. The +child's effective initial context is the parent's history through +`ForkMessageID`; messages after that point in the parent are not inherited. + +After the fork, parent and child are isolated: + +- child messages, tool calls, tool results, capability actions, and errors do + not appear in the parent conversation; +- later parent messages do not silently enter the child; +- returning to the parent resumes its unchanged history; +- the child may itself be branched using the same rules; +- branch lineage remains queryable for navigation, audit, and metrics. + +This supports building substantial context about a subject and then performing +one or more contextual subtasks without polluting the original conversation. For +example, a user may branch from a project discussion, create Jira issues in the +child using inherited context, and then return to the project discussion without +adding the Jira tool transcript to the parent. + +Branching does not copy mutable message rows. History is resolved through the +immutable parent conversation and fork MessageID, followed by the child's own +message sequence. + +Branch isolation applies to conversation history, not to Agent learning or +memory. A memory action performed in a branch has exactly the same semantics as +the same action performed in any other conversation. It writes to its selected +global, agent-wide, user-wide, or Agent-user relationship scope. + +Memory provenance MAY retain the source ConversationID and MessageIDs for +explanation and audit. Retrieval and effect are determined by memory scope and +access rules, not by the conversation from which the memory originated. +Returning to a parent does not insert the child's tool transcript into the +parent history, but scoped memories learned in the child remain available to +future retrieval wherever that scope is visible. + +Changing sessions or branching therefore controls immediate conversational +context without preventing the Agent from learning durable knowledge. + +## Target ownership + +The Messaging domain lives at `internal/domain/messaging`. It owns: + +- canonical Messages and typed message content; +- Conversations, branches, and lineage; +- channel bindings and external source correlation; +- replies, acknowledgements, and outbound delivery attempts; +- message and conversation lifecycle events; +- domain-defined repository and delivery service contracts; +- projections required for conversation navigation and metrics. + +Work intake is a separate cohesive domain at `internal/domain/workintake`. It +owns admission, validation, deterministic routing, and accepted work requests +for the optional transition into durable workflow-backed execution. + +Telegram, email, webhook, forge, Jira, and future messaging systems are +infrastructure adapters implementing Messaging contracts. They are users of the +domain; they do not own Messages, Conversations, work admission, or +WorkflowExecution semantics. + +The Agent decides whether an ordinary interaction is answered directly, uses a +capability, changes or retrieves Agent-owned information, or proposes durable +workflow-backed work. + +Explicitly configured automation MAY enter work intake without a conversational +Agent turn when the external trigger and admission rule already unambiguously +request durable work. This avoids spending an LLM turn to rediscover a +deterministic routing decision. + +When an interaction requires durable workflow-backed execution: + +1. a channel adapter produces a channel-neutral inbound message; +2. the acting agent handles or interprets the interaction; +3. work intake validates, admits, and routes a proposed work request; +4. work intake emits an accepted work request with its source correlation, + acting identity, requested outcome, inputs, and routing evidence; +5. the Agent System consumes that request, selects a specific Workflow version, + and creates the WorkflowExecution. + +The accepted work request is a cross-domain handoff, not an alternate execution +aggregate. The Agent System is the sole authority that creates a valid +WorkflowExecution. + +An interaction MAY instead be completed directly by an agent turn, delegated to +a tool or capability, recorded as a note or reminder, answered conversationally, +or retained for later context. Those paths MUST NOT require a Workflow or +WorkflowExecution. + +A Workflow MAY add reusable, versioned structure to any of those behaviours. +Scheduled personal-assistant routines, message triage, reminders, infrastructure +operations, and other capability sequences are valid Workflow definitions. The +distinction is whether durable structured execution is useful, not whether the +subject originated from a forge. + +## Canonical execution language + +- **Workflow**: reusable, versioned behaviour definition. +- **WorkflowExecution**: durable execution of a specific Workflow version. +- **WorkflowStep**: a defined operation in a Workflow. +- **StepExecution**: the recorded execution and outcome of a WorkflowStep. +- **Attempt**: a retry within the same WorkflowExecution. + +External issues, messages, requests, goals, and notes are not synonyms for these +concepts. + +## Current implementation + +Current intake is fragmented: + +- Telegram, email, and webhook adapters translate payloads into + `gateway.Message`, while an unused richer `MessageEvent` contract exists + alongside it. +- `gateway.Router` combines local channel commands, conversational LLM routing, + and direct task lifecycle operations. +- Telegram is the only channel with production LLM and durable conversation + wiring. Email and webhook free text currently have no LLM responder. +- Forge polling bypasses the gateway and directly enqueues store rows or NATS + task messages. +- Chat `/spawn` directly creates a `store.Task` and invents a synthetic forge + issue number to satisfy the existing persistence key. +- Forge replies and chat approval commands implement separate waiting-human + paths. +- Message delivery, acknowledgement, retry, deduplication, and source + correlation are platform-specific side effects rather than one durable model. +- `store.Task` collapses an external source reference and durable execution + state. + +## Current hazards + +- Treating every agent interaction as a work request would remove Archie's + personal-assistant role and force conversation and immediate capability use + through an inappropriate workflow lifecycle. +- Treating every accepted work request as a WorkflowExecution would let intake + or channel code select versions and construct invalid execution state outside + the Agent System. +- Source identity is incomplete: sessions use configured bot usernames, tasks + use identity strings, and external message IDs are generally absent. +- SQLite and NATS deduplication are based on forge coordinates rather than a + channel-neutral source-message reference. +- Replies and acknowledgements have no durable delivery-attempt lifecycle, so + partial success and retry behaviour differ by adapter. +- Production code has two competing channel-neutral message contracts. +- The existing Archie session implementation lacks the required tool-call + semantics and exact branch lineage and MUST be brought to the canonical + contract. + +## Decisions still required + +- the cohesive owner and final location of messaging behaviour; +- the cohesive owner and final location of work-intake admission and routing; +- the canonical inbound message, conversation, and source-correlation model; +- the boundary between an agent turn, direct capability use, and a proposed + durable work request; +- the exact relationship between an Agent, its acting IdentityID, its user, and + its channel bindings; +- outbound response, acknowledgement, delivery-attempt, retry, deduplication, + and failure semantics; +- the smallest accepted-work-request contract consumed by the Agent System; +- migration of forge polling, replies, chat commands, email, webhook, Telegram, + and Jira integrations. diff --git a/docs/prds/architecture/migration-decisions.md b/docs/prds/architecture/migration-decisions.md new file mode 100644 index 000000000..e70b7080f --- /dev/null +++ b/docs/prds/architecture/migration-decisions.md @@ -0,0 +1,240 @@ +# Architecture Migration Decisions + +**Status:** Active migration inventory +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Purpose + +This document records what remains to be decided before Archie's current +implementation can be migrated into the approved domain-oriented structure. + +The product and core domain model are not being redesigned. Existing Archie +behaviour and the existing session implementation are the migration +baseline. Remaining decisions MUST be grounded in current packages, consumers, +tests, persistence, and runtime wiring. + +## Confirmed domain packages + +```text +internal/domain/ + identity/ + agent/ + workflow/ + messaging/ + workintake/ + plugin/ +``` + +- `identity` owns persistent actors, lifecycle, ownership, attribution, and + audit identity. +- `agent` owns persistent assistants, specialisation, instructions, + model-independent continuity, capability context, and associations with + identity and memory. +- `workflow` is a separate domain. It owns reusable, versioned Workflow + definitions, WorkflowSteps, WorkflowExecutions, StepExecutions, Attempts, + outcomes, and typed Workflow plugin contracts. +- `messaging` owns canonical Messages, Conversations, branches, channel and + source correlation, replies, acknowledgements, delivery attempts, events, and + projections. +- `workintake` owns admission, validation, deterministic routing, and accepted + work requests for the optional transition into durable workflow-backed + execution. +- `plugin` owns generic plugin identity, discovery, compatibility, and lifecycle + mechanics. It remains metadata-only; capability semantics and typed + registration belong to the owning domain. + +Memory's final package placement remains undecided pending focused review of the +existing implementation. + +The following are approved shared or composition packages, not domains: + +```text +internal/eventbus/ +internal/policy/ +internal/infrastructure/ +internal/app/archied/ +internal/app/agentworker/ +``` + +## Remaining migration decisions + +### 1. Complete package destination map + +Every current package MUST receive one explicit disposition: + +- move into a confirmed domain; +- move under infrastructure as an implementation of a domain-owned contract; +- move into application composition; +- merge with an identified duplicate; +- remain as an approved shared application contract; +- move to a plugin, extra, deployment, example, or generated artifact; +- be deleted after its replacement is proven. + +The largest unreviewed areas include memory, tools and capabilities, workspace +and worktree behaviour, gates, storage, events, web UI, containers, RPC +packages, release management, and scheduling. + +The destination matrix MUST name the behaviour owner, target path, dependencies +to remove, state and contracts to preserve, migration prerequisites, and +deletion criteria. + +### 2. Session and Messaging migration + +The existing session implementation is the migration baseline. The migration must +decide: + +- which session and message components are retained or adapted; +- how Agent, user, channel, Conversation, and branch ownership are added; +- how Archie's parallel gateway session implementation is replaced; +- how canonical Messages become immutable persisted records; +- how existing NellDB sessions and messages are migrated; +- how outbound delivery, retry, acknowledgement, deduplication, and failure + semantics are represented; +- how current Telegram, email, webhook, forge, and Jira integrations migrate to + Messaging infrastructure adapters. + +The following are already decided and MUST NOT be reopened without contradictory +implementation evidence: + +- the composite Conversation identity; +- immutable MessageIDs; +- typed tool-call and tool-result messages; +- exact branch lineage through ParentConversationID and ForkMessageID; +- parent and child transcript isolation; +- normal scoped-memory behaviour regardless of the originating Conversation; +- Messaging and Work Intake ownership. + +### 3. Identity data migration + +The migration must define: + +- the durable identity schema and repository implementation; +- bootstrap of the permanent system identity; +- stable IdentityIDs for existing configured Agents; +- migration from configured identity names, empty-string ownership, and bot + usernames; +- preservation of historical attribution; +- identity-aware uniqueness and transport deduplication; +- correction of container and RPC capability resolution so execution uses the + owning identity's bindings; +- removal of identity-string equality from access-control behaviour. + +Exact schema and method signatures are implementation decisions. The approved +Identity lifecycle and attribution semantics are fixed migration constraints. + +### 4. Workflow migration + +The current implementation must be transformed deliberately: + +```text +store.Task -> WorkflowExecution +mutable Stage -> StepExecution history +RetryCount / Attempt -> Attempt records +workflow.Registry -> versioned Workflow definitions +current stages -> WorkflowStep definitions or Workflow plugins +``` + +The migration must decide: + +- Workflow definition and version persistence; +- the smallest accepted-work-request contract consumed from Work Intake; +- the enforced WorkflowExecution state machine; +- atomic state and domain-event persistence; +- migration of existing task rows and transition history; +- disposition of current skill, Yaegi, and stage-plugin implementations; +- the versioned worker-handoff contract; +- scheduler, claim, retry, crash-recovery, and waiting-human cutover. + +Workflow remains a separate domain from Agent. A user or Agent may define or +invoke a Workflow, but Workflow semantics and plugins remain Workflow-owned. + +### 5. Memory placement and storage + +The four required scopes are fixed: + +- global shared; +- Agent-wide; +- user-wide; +- Agent-user relationship. + +A focused review of `internal/memory`, its providers, consumers, persistence, +and tests must decide: + +- `internal/domain/memory` versus ownership within the Agent domain; +- the authoritative memory record and revision model; +- provider and infrastructure boundaries; +- retrieval and access enforcement; +- migration of existing memory data; +- provenance representation. + +Conversation branches do not create another memory scope. A memory action has +the same scoped effect regardless of which Conversation originated it. + +### 6. Runtime and process boundaries + +The migration must decide which current execution paths survive: + +- in-process execution; +- `archie-agent` subprocess execution; +- NATS worker execution; +- container isolation; +- forge, store, and worktree RPC services. + +The source architecture remains a modular monolith. A retained process boundary +requires a concrete security-isolation, failure-containment, scaling, or +operational justification. Possible future extraction is insufficient. + +### 7. Shared mechanics + +The following cross-domain mechanics require exact contracts before dependent +packages migrate: + +- event-bus delivery and failure semantics; +- policy evaluation API, composition, and precedence; +- configuration candidate preparation, health validation, atomic promotion, + observation, and rollback; +- service-specific health, bounded remediation, isolation, and escalation; +- changelog association and grouping. + +These shared mechanisms do not acquire ownership of domain meaning. Domains +continue to own their commands, events, policies, settings, and consequences. + +The copied Go `specgen` and VitePress documentation pipeline, output placement, +developer commands, drift checking, hook sequence, and CI sequence are defined +in `generated-documentation.md`. Adapting the copied files, implementing +Archie's normalized documentation model and page renderers, and cutting `docs-2` +over to its final location remain migration work rather than open product +architecture. + +### 8. Cutover sequence + +The final migration plan must order: + +- compatibility adapters; +- schema migrations and data backfills; +- any required dual-read or transitional paths; +- domain-by-domain package replacement; +- production wiring changes; +- legacy package removal; +- architecture tests preventing dependency regression; +- focused, integration, race, and full quality gates. + +Each legacy package requires objective removal criteria. No compatibility path +may become an indefinite second implementation. + +## Completion criteria + +Migration design is complete when: + +- every current package has one approved owner and destination; +- every mutable record has one authoritative owner and migration path; +- all external and cross-process contracts have versioned owners; +- existing behaviour and data have explicit parity requirements; +- process boundaries have evidence-backed justification; +- the cutover order preserves a working application; +- legacy deletion criteria and deterministic architecture tests are defined; +- no unresolved decision requires an implementer to invent domain semantics. + +Exact Go APIs, SQL statements, and mechanical refactoring steps MAY be finalized +during implementation when they do not change these semantics. diff --git a/docs/prds/architecture/organisation.md b/docs/prds/architecture/organisation.md new file mode 100644 index 000000000..555f39056 --- /dev/null +++ b/docs/prds/architecture/organisation.md @@ -0,0 +1,93 @@ +# Repository Organisation + +**Status:** Approved +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Target structure + +Archie MUST be organised around cohesive application responsibilities: + +```tree +cmd/ + archied/ + archie-agent/ + +internal/ + domain/ + / + eventbus/ + policy/ + infrastructure/ + configuration/ + eventbus/ + nats/ + forge/ + persistence/ + / + app/ + archied/ + agentworker/ + +plugins/ + / +deployments/ + / +docs/ + guides/ +examples/ + / +extras/ + / +``` + +Domain names are chosen from application behaviour during package review. +Existing names MUST NOT be retained merely to reduce migration work. + +## Domain areas + +A domain owns one cohesive job performed by Archie. It contains that job's +language, state, rules, operations, commands, events, policy implementations, +runtime settings, and required service contracts. + +Code that changes together SHOULD live together. Empty or ceremonial `entities`, +`repositories`, or `services` layers are prohibited. + +## Application composition + +`internal/app`: + +- constructs domains and infrastructure implementations; +- translates external configuration into domain and plugin settings; +- connects commands, events, and shared contracts; +- starts services in dependency order; +- owns health aggregation and shutdown ordering. + +`cmd/*` parses only process-level input and invokes the relevant application +composition package. It MUST NOT contain substantive wiring or act as a service +locator. + +## Process boundaries + +Archie begins as a modular monolith even when capabilities run in separate +processes. A domain becomes a separately deployed service only for a concrete +need such as security isolation, independent scaling, failure containment, or +independent operation. + +Possible future extraction does not justify premature network protocols or +duplicated service scaffolding. + +## Optional and operational material + +- `extras/` contains a maintained optional extension with real + behaviour. Core Archie MUST NOT import it, and removing `extras/` MUST NOT + prevent the core application from building or running. +- `deployments/` contains a supported assembly, including deployment + definitions and concise operational instructions. +- `docs/guides/` contains handwritten explanation and links to generated + reference material. +- `examples/` contains copyable samples with explicit purpose, prerequisites, + and support expectations. + +Supported assemblies SHOULD demonstrate that capabilities can be selected +independently. diff --git a/docs/prds/architecture/package-review.md b/docs/prds/architecture/package-review.md new file mode 100644 index 000000000..dd384779a --- /dev/null +++ b/docs/prds/architecture/package-review.md @@ -0,0 +1,70 @@ +# Domain and Feature Review Procedure + +**Status:** Active +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Purpose + +Architecture work proceeds one domain or feature at a time. Before any design +question, the selected area is researched across its complete live +implementation, consumers, tests, state, configuration, and runtime wiring. + +Existing packages are evidence, not the unit that drives the interview. +Placement follows behaviour and ownership, not the existing directory name. + +No restructuring implementation begins until the relevant package decisions +are agreed and recorded in the focused domain or requirement document. + +## Required research + +Before design questions, the current-state report MUST identify: + +- entry points and runtime composition; +- state, persistence, and lifecycle; +- public and internal contracts; +- commands, events, and policy enforcement; +- configuration and defaults; +- all consumers and cross-domain interactions; +- process and infrastructure boundaries; +- tests, failure behaviour, and known invariants; +- duplicated or conflicting implementations; +- documentation that disagrees with live code. + +Discoverable facts MUST be investigated rather than presented to the user as +design questions. + +## Required decisions + +Each package review records: + +| Decision | Required result | +|---|---| +| Owned behaviour | The cohesive job the code performs | +| Domain ownership | The owner of the behaviour and vocabulary | +| Final location | Its target path | +| Public contracts | The smallest interfaces, commands, and events exposed | +| Required services | Domain-defined interfaces implemented by infrastructure | +| State ownership | The owner of each mutable record and transition | +| Dependencies | Allowed imports and dependencies to remove | +| Duplication | Code to consolidate, delete, or keep separate | +| Plugin status | Core domain, shared contract, infrastructure, plugin, or extra | +| Process boundary | In-process, or the concrete reason for isolation | +| Configuration | Settings owned by the domain or plugin | +| Policy | Definitions, evaluators, consequences, and shared mechanics used | +| Documentation | Authoritative definitions and generated reference | +| Migration constraints | Behaviour and data that must remain correct | + +## Interview method + +For every selected domain or feature: + +1. Declare the single area under review. +2. Complete the current-state research. +3. Explain actual behaviour in plain technical language. +4. Separate facts from design decisions and concerns. +5. Resolve obvious consequences directly and ask only questions whose answer + materially changes behaviour or structure. +6. Record each confirmed decision in its focused document. +7. Complete that area's handoff before selecting another. +8. Keep unrelated domains outside the implementation scope. diff --git a/docs/prds/architecture/plugins-and-extensions.md b/docs/prds/architecture/plugins-and-extensions.md new file mode 100644 index 000000000..19bb7f2df --- /dev/null +++ b/docs/prds/architecture/plugins-and-extensions.md @@ -0,0 +1,42 @@ +# Plugins and Extensions + +**Status:** Approved foundation +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Plugin framework + +The core plugin domain lives under `internal/domain/plugin`. It owns: + +- plugin identity and metadata; +- discovery and registration contracts; +- lifecycle rules; +- capability registration; +- validation and compatibility rules. + +The generic plugin contract remains metadata-only. Functionality is exposed +through narrow typed capability contracts with an owning registry or manager. + +Workflow plugins belong to the Workflow capability family. The Workflow domain +at `internal/domain/workflow` owns their typed registration, validation, +versioning, definition, and execution contracts. The generic plugin domain may +provide plugin identity, discovery, compatibility, and lifecycle mechanics, but +it MUST NOT define Workflow semantics or expose untyped Workflow hooks. + +## Plugin implementations + +First-party plugins are self-contained vertical modules under +`plugins/`. + +A plugin: + +- owns its implementation, settings, templates, assets, and tests; +- receives only explicitly supplied contracts and services; +- MUST NOT receive daemon internals, a service locator, or unrestricted + application access; +- MUST NOT import arbitrary infrastructure or application composition code; +- MAY use approved domain and shared application contracts; +- MUST remain removable without changes to unrelated domains. + +Plugins may be internally cohesive like small services. They do not become +network services without a concrete security or operational reason. diff --git a/docs/prds/architecture/policy.md b/docs/prds/architecture/policy.md new file mode 100644 index 000000000..acd839c0a --- /dev/null +++ b/docs/prds/architecture/policy.md @@ -0,0 +1,52 @@ +# Policy System + +**Status:** Approved foundation; exact API is deferred +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Purpose + +Retry limits, authorization, gates, commands, protected paths, tool +availability, and similar rules define or constrain what Archie may do. They +need consistent consumption, composition, evidence, and audit without erasing +their different domain meanings. + +## Ownership + +`internal/policy` is an explicitly approved shared application contract. It is +not infrastructure and it is not a generic domain that owns every rule. + +The shared policy system owns: + +- policy identity, version, scope, and applicability; +- typed evaluation invocation; +- deterministic composition and precedence; +- common evaluation states such as satisfied, violated, indeterminate, and not + applicable; +- reasons and evidence; +- evaluation audit records; +- registration, discovery, and lifecycle. + +Each consuming domain owns: + +- its policy vocabulary and typed inputs; +- its concrete policy definitions; +- its evaluators; +- the meaning and consequence of an evaluation. + +Access therefore owns principals, resources, actions, and authorization +consequences. Task lifecycle owns retry eligibility and exhaustion. Task +execution owns gate requirements. Workspace mutation owns protected-path +effects. Tool execution owns tool and command constraints. + +These policies use consistent evaluation mechanics without pretending their +decisions are semantically interchangeable. + +## Infrastructure + +Infrastructure MAY load, persist, distribute, and audit external policy +representations. It MUST NOT define what Archie allows or assign the meaning of +a domain policy result. + +The exact Go API, composition operators, precedence rules, and representation +format require a focused policy design pass. diff --git a/docs/prds/architecture/safe-change-and-recovery.md b/docs/prds/architecture/safe-change-and-recovery.md new file mode 100644 index 000000000..29f524ea2 --- /dev/null +++ b/docs/prds/architecture/safe-change-and-recovery.md @@ -0,0 +1,101 @@ +# Safe Change and Recovery + +**Status:** Requirements approved; mechanics are under design +**Date:** 2026-07-28 +**Beads issue:** `archie-core-5d7` + +## Purpose + +Archie is built and improved by agents as well as humans. The architecture MUST +make a change easy to locate, understand, test, audit, extend, and reverse +without requiring its author to understand unrelated parts of the application. + +Separation of concerns is therefore an operational safety boundary, not only a +code-organisation preference. + +## Required outcomes + +- An agent can improve a focused feature without receiving authority over + unrelated domains. +- Every event, function, action, setting, and policy has an identifiable owner + and provenance. +- Source and runtime changes pass deterministic checks outside the actor making + the change. +- A rejected or unhealthy candidate cannot replace the last known working + version. +- Invalid user configuration does not terminate an otherwise healthy + application. +- Configuration and service failures are observable, attributed, and eligible + for bounded remediation or rollback. +- The application continues serving unaffected capabilities when one + capability is misconfigured or unhealthy. +- Recovery failure is reported and contained rather than hidden in an + unbounded retry loop. + +## Source changes + +Agent-authored source changes occur through the task-execution boundary in an +isolated workspace. The agent does not directly mutate the running +installation. + +Promotion is controlled by deterministic repository-owned policy, including +tests, generated-reference drift checks, protected paths, change scope, and +other required gates. The actor proposing a change cannot waive these checks. + +Repository and domain separation SHOULD allow a task to load and modify only +the governing requirements and code for its declared scope. + +## Runtime changes + +Configuration and other runtime changes are proposed as candidates rather than +mutating the active state in place. + +The affected domain owns: + +- the command describing the semantic change; +- validation of its typed settings; +- health signals that demonstrate correct operation; +- domain-specific remediation and rollback consequences. + +Shared policy supplies consistent evaluation, evidence, and audit mechanics. +Identity supplies actor attribution. Infrastructure supplies external +configuration storage, service control, and other operational adapters. + +## Runtime change protocol + +Last-known-good preservation and candidate promotion are the universal runtime +change protocol. + +1. An identity proposes an immutable candidate version. +2. Infrastructure parses it without changing active state. +3. Each affected domain validates its typed settings. +4. Shared policy evaluates cross-cutting constraints. +5. Each affected capability prepares the candidate without destroying its + active instance. +6. Capability-specific health checks prove the candidate works. +7. Runtime supervision atomically promotes the candidate. +8. A bounded observation period watches for delayed failure. +9. Failure restores the last-known-good version and records the reason, + evidence, actor, and involved versions. +10. Repeated remediation failure stops retrying, isolates the capability, and + reports the fault. + +The affected domain owns the semantic change command, typed validation, health +signals, and remediation consequences. Shared runtime supervision owns the +promotion transaction. Infrastructure performs storage and service-control +operations. + +The protocol's exact Go contracts, storage model, atomicity boundary, and +observation rules require a focused runtime-supervision design pass. + +## Failure isolation + +Invalid input MUST leave the active valid configuration unchanged and produce a +diagnostic record. + +A capability that cannot start or reload SHOULD fail independently where its +absence does not violate a declared application invariant. Unaffected +capabilities continue operating. + +Remediation MUST be bounded, observable, and policy-driven. Recovery MUST NOT +silently oscillate between versions or retry forever. diff --git a/docs/prds/hermes-gap-analysis.md b/docs/prds/hermes-gap-analysis.md deleted file mode 100644 index ed83f00c4..000000000 --- a/docs/prds/hermes-gap-analysis.md +++ /dev/null @@ -1,180 +0,0 @@ -# Hermes Feature Gap Analysis - -**Date:** 2026-07-26 -**Source:** Parallel investigation of `/work/clones/hermes-agent` by 7 subagents -**Comparison target:** archie-core at commit faf1e38 - ---- - -## Scale Comparison - -| Metric | Hermes Agent | archie-core | -|---|---|---| -| Primary language | Python 3.10+ | Go 1.26 | -| Source files | ~200+ .py files | ~70 .go files | -| Lines of code | ~500K+ | ~20K | -| Gateway code | ~40 files | 3 files (gateway.go, tasks.go + tests) | -| Platform adapters | 30+ (built-in + plugin) | 1 (Telegram) | -| Built-in tools | 80+ | ~5 (capture, script) | -| Slash commands | 42 | 5 (/status, /help, /provider, /model, /spawn) | -| Plugin system | Full hooks + MCP + middleware | Minimal Yaegi loader | -| Memory | Pluggable providers (Honcho, Mem0) | Ephemeral in-memory notes | -| CLI commands | 60+ | 4 flags | -| Cron/scheduler | 8 modules, 60K lines | None | -| Web dashboard | FastAPI backend | Read-only SSE dashboard | -| API server | OpenAI-compatible REST | None | -| Health/readiness | 6 check types | None | -| Delivery | Router + ledger + dead targets | None | - ---- - -## Gap Inventory by Subsystem - -### 1. Gateway & Messaging (CRITICAL) - -Hermes gateway (`gateway/run.py`, GatewayRunner) manages full lifecycle: adapter connect/disconnect with reconnect backoff, per-session agent cache (LRU, 128 max, 1h TTL), message dispatch pipeline (authorization → session → profile → agent), streaming delivery, slash-command routing, and graceful shutdown with drain. - -| Feature | archie-core status | Priority | -|---|---|---| -| Adapter lifecycle (connect/disconnect/reconnect) | None -- 3-method Gateway interface | **P0** | -| MessageEvent data model (types, media, reply context) | None -- 3-field Message struct | **P0** | -| SendResult with retry/error classification | None -- fire-and-forget | **P1** | -| Session management (SessionSource + AsyncSessionStore) | None | **P0** | -| Platform config (Platform enum, PlatformConfig) | None | **P0** | -| Streaming delivery (token streaming with edit/draft) | None | **P1** | -| Interactive UX (clarify buttons, approval dialogs, pickers) | None | **P2** | -| EphemeralReply with auto-delete TTL | None | **P2** | -| MessageDeduplicator (TTL-based) | None | **P1** | -| TextBatchAggregator | None | **P2** | -| Code-fence-aware truncation | Line-based only | **P2** | - -### 2. Platform Adapters (CRITICAL) - -Hermes has 30+ platform adapters: Telegram, Discord, Slack, Matrix, WhatsApp, Signal, WeChat, BlueBubbles, QQ, Yuanbao, Webhook, MS Graph, API Server, SMS, Email, IRC, Home Assistant, and plugin-based ones. - -| Feature | archie-core status | Priority | -|---|---|---| -| BasePlatformAdapter ABC (20+ methods, capability flags) | None -- 3-method Gateway interface | **P0** | -| Platform adapter registry + plugin discovery | None | **P0** | -| Media handling (image/video/audio/document send) | None | **P1** | -| Typing indicators | None | **P2** | -| Message edit/delete | None | **P2** | - -### 3. Agent Loop & Tools (CRITICAL) - -Hermes has: central tool registry with 80+ tools, progressive tool disclosure (tool_search/tool_describe/tool_call bridges), MCP client (stdio/HTTP/SSE), tool result persistence with spill-to-disk, per-turn budget enforcement, guardrails (loop detection, idempotent/mutating classification), parallel tool dispatch with gating rules. - -| Feature | archie-core status | Priority | -|---|---|---| -| Central tool registry with dynamic discovery | None | **P0** | -| MCP client (stdio/HTTP/SSE transports) | None | **P0** | -| Progressive tool disclosure | None | **P1** | -| Tool result persistence / budget enforcement | None | **P1** | -| Guardrails (loop detection, classification) | None | **P1** | -| Subagent delegation (parallel batch, result summarization) | None | **P2** | -| Browser automation tools | None | **P2** | -| Web search/extraction tools | None | **P2** | -| File operations tools | None | **P2** | -| Image/vision/audio/video tools | None | **P2** | -| Context compression pipeline | None | **P2** | - -### 4. Memory & State (HIGH) - -Hermes has: pluggable MemoryProvider ABC, built-in file-backed memory (MEMORY.md/USER.md), background sync pipeline, session lifecycle hooks, SQLite+FTS5 state store, session splitting on compression. - -| Feature | archie-core status | Priority | -|---|---|---| -| MemoryProvider ABC + plugin registration | None | **P0** | -| Built-in file-backed memory (add/replace/remove) | Ephemeral memoryNotes only | **P0** | -| Background sync pipeline (async writes) | None | **P1** | -| Session lifecycle hooks (on_session_end, on_session_switch) | None | **P1** | -| SQLite+FTS5 conversation history | None | **P1** | -| Session splitting on compression | None | **P2** | - -### 5. Security & Auth (HIGH) - -Hermes has: PairingStore (cryptographic code generation, salted hashing, OWASP-compliant), GatewayAuthorizationMixin (layered auth: allowlists → role auth → relay delegation → pairing → deny), SlashAccessPolicy (admin/non-admin command gating), secrets CLI (1Password integration, credential lifecycle), rate limiting. - -| Feature | archie-core status | Priority | -|---|---|---| -| Pairing/device auth system | None | **P1** | -| Multi-platform authorization mixin | None | **P1** | -| Slash command access control | None | **P2** | -| Rate limiting (per-user, brute-force lockout) | None | **P1** | -| Secrets lifecycle management | None | **P2** | -| API server key-auth guard | None | **P2** | - -### 6. CLI & Config (HIGH) - -Hermes has: 60+ CLI commands, TUI interface, command registry with plugin contributions, YAML config with corruption resilience, .env file support, self-update/uninstall, setup wizards. - -| Feature | archie-core status | Priority | -|---|---|---| -| Interactive CLI with command registry | None -- 4 flags | **P1** | -| Config subcommands (get/set/unset/edit/wizard) | None | **P1** | -| .env file support | None | **P2** | -| Self-update mechanism | None | **P2** | -| Setup wizard | None | **P2** | - -### 7. Profiles (HIGH) - -Hermes has full multi-profile isolation: `hermes profile create/clone/delete/list/use`, per-profile directories (config, memory, sessions, skills, cron, gateway), profile routing for gateway messages, container-boot profile reconciliation. - -| Feature | archie-core status | Priority | -|---|---|---| -| Multi-profile isolation | None | **P1** | -| Profile routing for gateway | None | **P1** | -| Container-boot profile reconciliation | None | **P2** | - -### 8. Scheduling & Automation (MEDIUM) - -Hermes has: cron scheduler (job store, ticker, execution engine, blueprints with typed slots, lifecycle guard), cron delivery routing, cross-process file locking. - -| Feature | archie-core status | Priority | -|---|---|---| -| Cron/scheduling system | None | **P2** | -| Blueprints with typed slots | None | **P2** | -| Lifecycle guard (blocks dangerous commands) | None | **P2** | - -### 9. Observability & Operations (MEDIUM) - -Hermes has: health checks (state_db, config, disk, model, gateway, background_queues), detailed health endpoint, loop liveness watchdog, systemd notify, drain control with instantiation epoch, scale-to-zero idle detection, delivery ledger with crash recovery. - -| Feature | archie-core status | Priority | -|---|---|---| -| Readiness probes (multi-check) | None | **P1** | -| Loop liveness watchdog | None | **P2** | -| Drain control | None | **P2** | -| Scale-to-zero | None | **P3** | -| Delivery ledger with crash recovery | None | **P2** | - -### 10. Web Dashboard & API (MEDIUM) - -Hermes has: FastAPI web server (Vite/React frontend), OpenAI-compatible API server (/v1/chat/completions, /v1/responses, session CRUD, runs with SSE streaming), OAuth registration. - -| Feature | archie-core status | Priority | -|---|---|---| -| Web dashboard (config, sessions, onboarding) | Read-only SSE dashboard | **P2** | -| OpenAI-compatible API server | None | **P2** | -| Session CRUD + fork | None | **P2** | -| Run management with SSE streaming | None | **P2** | - -### 11. Integration Extras (LOW) - -| Feature | archie-core status | Priority | -|---|---|---| -| Subscription/billing/entitlement | None | **P3** | -| OAuth2 flows (Spotify, DingTalk, etc.) | None | **P3** | -| Desktop app (Electron) | None | **P3** | - ---- - -## Total: ~60 feature gaps across 11 subsystems - -**P0 (must-have for baseline parity):** 7 items -- adapter lifecycle, message model, session management, platform config, tool registry, MCP client, memory provider ABC - -**P1 (near-term):** 13 items -- send result, streaming, dedup, media handling, guardrails, progressive disclosure, tool persistence, session hooks, history store, pairing/auth, CLI, config subcommands, profiles, readiness - -**P2 (medium-term):** 22 items -- interactive UX, subagents, browser/search/file tools, compression, session splitting, slash access, secrets CLI, cron, dashboard, API server, delivery, drain, scale-to-zero - -**P3 (future):** 3 items -- billing, OAuth, desktop app diff --git a/docs/prds/hermes-migration-dry-run.md b/docs/prds/hermes-migration-dry-run.md deleted file mode 100644 index 656dcea05..000000000 --- a/docs/prds/hermes-migration-dry-run.md +++ /dev/null @@ -1,101 +0,0 @@ -# Hermes → archie-core Migration: Dry-Run Report - -**Bead:** archie-core-abg.39 -**Source:** `.hermes-carina/` (live copy of the Hermes deployment on host `carina`, gitignored) -**Status:** dry-run inventory + mapping proposal only. No data has been copied or imported. - -This is the first acceptance-criteria deliverable for abg.39 ("produce a dry-run -report"). It inventories what exists in the live Hermes state, proposes where each -category lands in archie-core, and flags what must never be copied. It does **not** -implement an importer — see "Blocked on" below for why that's a separate, later step. - -## Environments discovered - -Hermes runs four environments under `.hermes-carina/`, matching the original gap -analysis's summary: - -| Environment | Location | Bot identity purpose | -|---|---|---| -| `main` (root) | `.hermes-carina/` top level | Primary assistant, all-channel | -| `agile-lead` | `.hermes-carina/profiles/agile-lead/` | Project/PM-focused persona | -| `dev` | `.hermes-carina/profiles/dev/` | Development-focused persona | -| `local-agent` | `.hermes-carina/profiles/local-agent/` | Local-only, no external channels (`.no-bundled-skills` marker present) | - -Each environment directory has the same internal shape: `SOUL.md`, `config.yaml` -(+ timestamped backups), `.env`, `auth.json`, `channel_directory.json`, -`gateway_state.json`, `cron/`, `memories/`, `sessions/`, `skills/`, `platforms/`, -`workspace/`, `home/`. - -## State inventory (counts only, no content copied here) - -| Environment | Skills | Session keys | Cron jobs | -|---|---|---|---| -| main | 34 dirs under `skills/` | 419 (`sessions/sessions.json`, excl. `_README`) | 2 (`cron/jobs.json`) | -| agile-lead | 20 | 2 session files under `sessions/` | present, not yet counted | -| dev | 25 | 2 session files under `sessions/` | present, not yet counted | -| local-agent | 17 | 0 | present, not yet counted | - -Session keys follow the pattern `agent::::` -(e.g. `agent:main:telegram:dm:`, `agent:main:email:dm:
`) — this -naming convention is the natural key for archie-core's own -`gateway.SessionStore` (`internal/gateway/session_store.go`), which already has -`Save`/`Get`/`GetByChannel`/`List` methods shaped for exactly this. - -## Proposed mapping to archie-core - -| Hermes concept | archie-core target | Notes | -|---|---|---| -| Environment (`main`, `agile-lead`, `dev`, `local-agent`) | `config.IdentityConfig` (archie-core-abg.37) | Closest existing primitive: isolated forge/models/repos. archie-core has **no profile-scoped gateway/tool/memory/workspace composition yet** — see "Blocked on" below. | -| `SOUL.md` | New: a per-identity system-prompt block, analogous to `memory.Manager.SystemPromptBlock()` (`internal/memory/manager.go`) but for persona rather than memory | No existing field carries this today. | -| `.env`, `auth.json`, `config.yaml` secrets, `mcp-tokens/` | **Excluded — never imported.** Reconfigured manually per-identity via `internal/secret` (archie-core-xec) `SecretRef`s. | See "Excluded from migration" below. | -| `memories/` | `internal/memory.Manager` (built-in file-backed provider already exists: `internal/memory/builtin`) | Format differs (Hermes memory provider schema vs. archie-core's MEMORY.md/USER.md) — needs a translator, not a raw copy. | -| `skills/*/` (SKILL.md + supporting files) | `internal/skill.Catalog`/`Discover` (`internal/skill/skill.go`) | archie-core's skill format (SKILL.md frontmatter) is closely related to Hermes's; likely the most direct 1:1 copy of the four state categories, but needs a compatibility pass (Hermes skills assume 80+ built-in tools archie-core doesn't have yet — see `docs/prds/hermes-gap-analysis.md` §"Built-in tools"). | -| `sessions/sessions.json`, per-profile `sessions/` | `gateway.SessionStore` (NellDB-backed) | Needs a JSON→NellDB doc translator; message content history format also differs. | -| `cron/jobs.json` | Not yet — archie-core has **no cron subsystem** (confirmed: `internal/daemon` has a ticker poll loop, not a general scheduler). Tracked separately under the gap analysis's cron/scheduler gap (P1, archie-core-abg.24's territory). | Import blocked until a cron primitive exists. | -| `channel_directory.json`, `platforms/` | Partially: `config.ChatConfig`/`TelegramConfig`/`EmailConfig` (`internal/config/config.go`) for the channels archie-core already supports (Telegram, email, webhook). Everything else (Discord, Slack, Matrix, etc.) has no archie-core equivalent yet. | | -| `plugins/` (e.g. `hermes-achievements`) | `internal/plugin` (Yaegi) or a new typed engine, per the "Plugin engine rule (strict)" invariant now in `ARCHITECTURE.md` | Each plugin needs individual evaluation — not a bulk copy. | - -## Excluded from migration (never read into an import, never committed) - -- `.env` (all environments) — API keys, provider credentials. -- `auth.json` (root and per-profile) — OAuth/session tokens. -- `mcp-tokens/` — MCP server credentials. -- `config.yaml` fields matching `key`/`token`/`secret`/`password`/`credential` (the file mixes structural config with provider credentials in the same document; a real importer must field-filter, not copy the file wholesale). -- `.hermes_history` (shell history — may contain pasted secrets). -- `cache/`, `audio_cache/`, `disk-cleanup/` — transient, not identity state. - -This list itself was produced without reading any of the excluded files' contents — -only directory listings and structural (non-secret) YAML top-level keys were -inspected to write this report. - -## Blocked on - -Building the actual importer now would produce inert data: archie-core's chat -runtime is still the one-shot `runtime.Chat(MaxSteps: 1)` responder with no tools, -memory, or skills wired into a conversation turn (archie-core-abg.36, not yet -implemented — see that bead). Importing SOUL/memory/skills before there's a -runtime that consumes them per-turn means the imported state sits unused. The -recommended order (matches both the original gap-analysis audit and the -capability-host plan already in beads memory `plugin-engine-rule`): - -1. archie-core-abg.37 (multi-identity composition) — in progress, daemon-side - routing complete; unblocks "which identity" for imported state to attach to. -2. archie-core-abg.36 (gateway agent loop with tools/memory/skills) — not started; - the consumer that would make imported SOUL/memory/skills meaningful. -3. **Then** abg.39's actual import tooling: a `internal/hermesimport` (or similar) - package with an explicit allowlist of source fields (never a directory copy), - a dry-run mode that reports what *would* be written without writing it, and a - rollback-safe cutover checklist for host `carina` (see the - `two-archied-instances-run-on-host-carina-ssh` beads memory for the live - deployment topology this must not disrupt). - -## Next steps for this bead - -- [ ] Design the SOUL→system-prompt-block field (needs a decision: new `Daemon` - field, or folded into the existing `memory.Manager.SystemPromptBlock()` - path?). -- [ ] Design the memories/ and sessions/ translators once abg.36 defines what a - chat turn actually consumes. -- [ ] Write the field-allowlist import tool (no raw file/directory copies). -- [ ] Shadow-run plan: run archie-core alongside Hermes on `carina` without - stopping Hermes, compare outputs, before any cutover. diff --git a/extras/gitea-agent-view/README.md b/extras/gitea-agent-view/README.md new file mode 100644 index 000000000..842fdbb36 --- /dev/null +++ b/extras/gitea-agent-view/README.md @@ -0,0 +1,88 @@ +# Gitea agent-run view + +Untracked reference copies — deploy by hand onto the gitea container. + +Renders inside Gitea's own Actions page (real `base/head` / `repo/header` +/ `base/footer`, real `.Repository`/`.CurWorkflow` context) via the +`body_inner_post.tmpl` hook — no full-file template override needed. +Confirmed 2026-07-22 that this hook receives the same per-page context +as `templates/repo/actions/list.tmpl`. + +## Files → destinations + +| file | destination on gitea container | role | +| --- | --- | --- | +| `extra_tabs.tmpl` | `$GITEA_CUSTOM/templates/custom/extra_tabs.tmpl` | adds the "Agent Run" repo tab | +| `body_inner_post.tmpl` | `$GITEA_CUSTOM/templates/custom/body_inner_post.tmpl` | loads the CDN CSS/JS + agent-monitor.js, gated on the sentinel | +| `agent-monitor.js` | `$GITEA_CUSTOM/public/assets/agent-monitor.js` | swaps the runs-list segment's content for the terminal, opens the SSE connection | + +`$GITEA_CUSTOM` is usually `/data/gitea` in the container — confirm via +Site Administration > Configuration, or `gitea help`. + +Restart Gitea after copying either file (custom/templates is only read +at startup unless `RUN_MODE = dev`). + +## How it fits together + +`extra_tabs.tmpl` links to the real `/actions` route with a sentinel +`?workflow=__agent_monitor__`. Gitea's Actions handler happily sets +`.CurWorkflow` to that string (it doesn't validate it matches a real +workflow file) and renders the stock page as normal — sidebar, run-count +bar, "0 workflow runs" panel, all real Gitea markup. `body_inner_post.tmpl` +then fires on that same page, sees the sentinel, and loads +`agent-monitor.js`, which: + +1. finds the real `.ui.attached.segment` inside `.flex-container-main` + — the element list.tmpl already sizes correctly to hold the runs + list — and swaps its content for the terminal, rather than hiding or + duplicating anything +2. hides the run-count/filter bar directly above that segment (nothing + to filter once the terminal's showing) +3. styles the segment as a floating rounded card (border radius, shadow) +4. mounts the xterm.js terminal inside it and opens the SSE connection + +The sidebar is deliberately left alone — it's real, always-current Gitea +markup (actual workflow files, actual routes). An earlier version tried +hiding it and hardcoding a lookalike sidebar instead; that goes stale the +moment a workflow is added/renamed, so it was dropped in favor of this. +Nesting the terminal inside other stock wrapper classes (e.g. +`.ui.top.attached.header`, meant for the slim counter bar) also produced +a tiny clipped box in testing — reason `.ui.attached.segment` specifically +is the target now. + +**Why the terminal logic is a separate `.js` file, not inline in the +template:** Gitea's CSP requires a per-request nonce for inline +` + + +{{end}} diff --git a/extras/gitea-agent-view/extra_tabs.tmpl b/extras/gitea-agent-view/extra_tabs.tmpl new file mode 100644 index 000000000..1a999f5ee --- /dev/null +++ b/extras/gitea-agent-view/extra_tabs.tmpl @@ -0,0 +1,18 @@ +{{/* + Copy to: $GITEA_CUSTOM/templates/custom/extra_tabs.tmpl + (on the gitea container: /data/gitea/templates/custom/extra_tabs.tmpl, + or wherever GITEA_CUSTOM points — check Site Administration > Configuration) + + Adds an "Agent Run" tab to the repo header, matching the markup Gitea + uses for its own tabs (see templates/repo/header.tmpl upstream). + Restart Gitea after copying (custom/templates is only read at startup + unless RUN_MODE = dev). + + Links into the real Actions list route with a sentinel ?workflow= value + that list.tmpl (see list.tmpl in this same directory) intercepts to + render agent_monitor.tmpl instead of the normal runs list — real + head/header/footer, no separate static page or route needed. +*/}} + + {{svg "octicon-play" 16 "tw-mr-2"}}Agent Run + \ No newline at end of file diff --git a/go.mod b/go.mod index dca94bca1..380f91186 100644 --- a/go.mod +++ b/go.mod @@ -29,14 +29,10 @@ require ( github.com/go-git/go-billy/v6 v6.0.0-alpha.1 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/google/codesearch v1.3.0-rc.1 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/go-tpm v0.9.8 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/hashicorp/go-version v1.9.0 // indirect - github.com/ilyakaznacheev/cleanenv v1.5.0 // indirect - github.com/joho/godotenv v1.5.1 // indirect github.com/kevinburke/ssh_config v1.6.0 // indirect github.com/klauspost/compress v1.18.6 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect @@ -66,13 +62,14 @@ require ( modernc.org/libc v1.74.1 // indirect modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.11.0 // indirect - olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3 // indirect ) require ( code.gitea.io/sdk/gitea v0.25.1 github.com/go-git/go-git/v6 v6.0.0-alpha.4 github.com/go-telegram/bot v1.22.0 + github.com/google/codesearch v1.3.0-rc.1 + github.com/google/uuid v1.6.0 github.com/moby/moby/api v1.55.0 github.com/moby/moby/client v0.5.0 github.com/nats-io/nats-server/v2 v2.14.3 diff --git a/go.sum b/go.sum index b59e5bf34..2f7cfb106 100644 --- a/go.sum +++ b/go.sum @@ -2,15 +2,18 @@ code.gitea.io/sdk/gitea v0.25.1 h1:yywxWwoV+SdjHtbC6unBiXojWdZOtoHuGhEazEXeWuE= code.gitea.io/sdk/gitea v0.25.1/go.mod h1:uDFWYBU8dgZsgOHwe6C/6olxvf8FHguNB3wW1i83fgg= github.com/42wim/httpsig v1.2.4 h1:mI5bH0nm4xn7K18fo1K3okNDRq8CCJ0KbBYWyA6r8lU= github.com/42wim/httpsig v1.2.4/go.mod h1:yKsYfSyTBEohkPik224QPFylmzEBtda/kjyIAJjh3ps= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/ProtonMail/go-crypto v1.4.1 h1:9RfcZHqEQUvP8RzecWEUafnZVtEvrBVL9BiF67IQOfM= github.com/ProtonMail/go-crypto v1.4.1/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antithesishq/antithesis-sdk-go v0.7.0-default-no-op h1:Z/MZK75wC/NSrkgqeNIa7jexam9uWzhLmFTSCPI/kn0= github.com/antithesishq/antithesis-sdk-go v0.7.0-default-no-op/go.mod h1:FQyySiasQQM8735Ddel3MRojmy4dA1IqCeyJ5jmPMbI= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -38,12 +41,16 @@ github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= +github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI= github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM= github.com/go-git/gcfg/v2 v2.0.2 h1:MY5SIIfTGGEMhdA7d7JePuVVxtKL7Hp+ApGDJAJ7dpo= github.com/go-git/gcfg/v2 v2.0.2/go.mod h1:/lv2NsxvhepuMrldsFilrgct6pxzpGdSRC13ydTLSLs= github.com/go-git/go-billy/v6 v6.0.0-alpha.1 h1:xVjAR4oUvrKy7/Xuw/lLlV3gkxR3KO2H8W+MamuVVsQ= github.com/go-git/go-billy/v6 v6.0.0-alpha.1/go.mod h1:eaCUpHbedW7//EwcYmUDfJe2N6sJC9O12AT0OTqJR1E= +github.com/go-git/go-git-fixtures/v6 v6.0.0-alpha.1 h1:gmqi2jvsreu0s8JMLylYDFq4sbjHwwlhktMw0DUg3mA= +github.com/go-git/go-git-fixtures/v6 v6.0.0-alpha.1/go.mod h1:ECf1MqJlBdYpKggBrOXjo/0EnvRZx6D++I86UYjPgAQ= github.com/go-git/go-git/v6 v6.0.0-alpha.4 h1:aDTc2UGanmaE7FkGLSlBEB9nohMnQ+RKXcfq/D+esDQ= github.com/go-git/go-git/v6 v6.0.0-alpha.4/go.mod h1:4ODa/G7hPWrh4Y+7lmt59Ij3zW38IEfvRoAZxLYYBhc= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -51,8 +58,6 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-telegram/bot v1.18.0 h1:yQzv437DY42SYTPBY48RinAvwbmf1ox5QICskIYWCD8= -github.com/go-telegram/bot v1.18.0/go.mod h1:i2TRs7fXWIeaceF3z7KzsMt/he0TwkVC680mvdTFYeM= github.com/go-telegram/bot v1.22.0 h1:zK29OoTYMmR5emJrCtGa2SjaGleeZiUB/C1i7kc2lXE= github.com/go-telegram/bot v1.22.0/go.mod h1:i2TRs7fXWIeaceF3z7KzsMt/he0TwkVC680mvdTFYeM= github.com/google/codesearch v1.3.0-rc.1 h1:vSFGuF5wS3sjimuLzqPG+PGjWQ9VvEtPFbxdZD7YuuQ= @@ -78,10 +83,6 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/mdns v1.0.7 h1:yWoQVMW5JOiDxQnIUcm3IDt0kCjf3TuXHDbdEKPsbAY= github.com/hashicorp/mdns v1.0.7/go.mod h1:yjuhYhZyPDqXXL48xC7cdpGwGUMwu7OViDmsuT5COvg= -github.com/ilyakaznacheev/cleanenv v1.5.0 h1:0VNZXggJE2OYdXE87bfSSwGxeiGt9moSR2lOrsHHvr4= -github.com/ilyakaznacheev/cleanenv v1.5.0/go.mod h1:a5aDzaJrLCQZsazHol1w8InnDcOX0OColm64SlIi6gk= -github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= -github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/kevinburke/ssh_config v1.6.0 h1:J1FBfmuVosPHf5GRdltRLhPJtJpTlMdKTBjRgTaQBFY= github.com/kevinburke/ssh_config v1.6.0/go.mod h1:q2RIzfka+BXARoNexmF9gkxEX7DmvbW9P4hIVx2Kg4M= github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao= @@ -147,8 +148,6 @@ github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0t github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/samcharles93/NellDB v0.2.5 h1:VEasjyB4opTFAfWnV3s9TEHkfA41ee+7gYD8LqKnvns= github.com/samcharles93/NellDB v0.2.5/go.mod h1:vyfd6/T2Cp5U0acoh2LrebJteZqoFObedDZTxP0j4W0= -github.com/samcharles93/ai-sdk v0.1.17 h1:yH48jrYVyFv+VO1qYkbReVpVxP063XMs0T/Jb90bkEY= -github.com/samcharles93/ai-sdk v0.1.17/go.mod h1:a4JYsUrwGsmm2eiXgrpcKExtYe7uHQ5zsHDbbkcPB6o= github.com/samcharles93/ai-sdk v0.1.18 h1:Jvz2OSnzJ68XCAiTHdLKKvgoNI/rKrNw9LJ7jbZs55c= github.com/samcharles93/ai-sdk v0.1.18/go.mod h1:a4JYsUrwGsmm2eiXgrpcKExtYe7uHQ5zsHDbbkcPB6o= github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= @@ -203,6 +202,8 @@ golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc= golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= +golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -249,7 +250,5 @@ modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3 h1:slmdOY3vp8a7KQbHkL+FLbvbkgMqmXojpFUO/jENuqQ= -olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3/go.mod h1:oVgVk4OWVDi43qWBEyGhXgYxt7+ED4iYNpTngSLX2Iw= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= diff --git a/internal/config/config.go b/internal/config/config.go index 558edd189..ff156e69f 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -188,14 +188,6 @@ type Forge struct { Type string `toml:"type" yaml:"type"` Host string `toml:"host" yaml:"host"` Token secret.SecretRef `toml:"token" yaml:"token"` - // TokenEnv is the pre-secrets-engine way of naming the token's env var - // directly under [forge] (e.g. `token_env = "ARCHIE_GITEA_TOKEN"`). - // Deprecated: set token = {engine = "env", key = "..."} instead. Kept - // so existing deployed configs don't silently fall back to demanding - // ARCHIE_GITHUB_TOKEN (see finalize) — TOML decoding does not error on - // unknown fields, so a stale token_env would otherwise be dropped - // without any warning. - TokenEnv string `toml:"token_env" yaml:"token_env"` } // Dispatch configures how archied discovers work and reflects task state diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 9dd2f451e..de8251cd3 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -718,7 +718,7 @@ forge = { type = "gitea", host = "https://git.example.test", token = { engine = [[identities.repos]] owner = "sam" -name = "tau" +name = "example-service" base = "main" ecosystem = "go" `)) @@ -749,7 +749,7 @@ ecosystem = "go" if cfg.Identities[1].Forge.Token != (secret.SecretRef{Engine: "env", Key: "WINTER_TOKEN"}) { t.Errorf("Identities[1].Forge.Token = %#v", cfg.Identities[1].Forge.Token) } - if len(cfg.Identities[1].Repos) != 1 || cfg.Identities[1].Repos[0].Name != "tau" { + if len(cfg.Identities[1].Repos) != 1 || cfg.Identities[1].Repos[0].Name != "example-service" { t.Errorf("Identities[1].Repos = %+v", cfg.Identities[1].Repos) } } diff --git a/internal/config/feature_config_test.go b/internal/config/feature_config_test.go index 229907107..89f7af378 100644 --- a/internal/config/feature_config_test.go +++ b/internal/config/feature_config_test.go @@ -294,7 +294,7 @@ identities: key: WINTER_TOKEN repos: - owner: sam - name: tau + name: example-service ecosystem: go `) diff --git a/internal/events/events.go b/internal/events/events.go index 3d1e3c4b1..9435c9499 100644 --- a/internal/events/events.go +++ b/internal/events/events.go @@ -1,9 +1,7 @@ -// Package events is archied's in-process observability stream, adapted -// from tau's eventbus but slimmed for a small daemon: one event type, -// mutex fan-out instead of a router goroutine, and -- unlike tau's -// blocking delivery -- bounded per-subscriber buffers that DROP on -// overflow, so a stalled dashboard connection can never apply -// backpressure to the task engine. +// Package events is archied's in-process observability stream. It uses one +// event type, mutex fan-out, and bounded per-subscriber buffers that DROP on +// overflow, so a stalled dashboard connection can never apply backpressure to +// the task engine. package events import ( diff --git a/internal/gateway/gateway_test.go b/internal/gateway/gateway_test.go index 63fc80de8..c664fb239 100644 --- a/internal/gateway/gateway_test.go +++ b/internal/gateway/gateway_test.go @@ -376,7 +376,7 @@ func TestRouteSpawnParsesRepoAndWorkflow(t *testing.T) { r := NewRouter(nil, nil, "test-gw") r.Tasks = tc r.Identity = "archie" - reply, err := r.Route(context.Background(), Message{Text: "/spawn repo=sam/tau workflow=tdd Fix the flaky test"}) + reply, err := r.Route(context.Background(), Message{Text: "/spawn repo=sam/example-service workflow=tdd Fix the flaky test"}) if err != nil { t.Fatalf("Route: %v", err) } @@ -387,8 +387,8 @@ func TestRouteSpawnParsesRepoAndWorkflow(t *testing.T) { t.Fatalf("requests = %d, want 1", len(tc.requests)) } got := tc.requests[0] - if got.Repo != "sam/tau" || got.Workflow != "tdd" || got.Title != "Fix the flaky test" || got.Identity != "archie" { - t.Errorf("request = %+v, want {Repo:sam/tau Workflow:tdd Title:\"Fix the flaky test\" Identity:archie}", got) + if got.Repo != "sam/example-service" || got.Workflow != "tdd" || got.Title != "Fix the flaky test" || got.Identity != "archie" { + t.Errorf("request = %+v, want {Repo:sam/example-service Workflow:tdd Title:\"Fix the flaky test\" Identity:archie}", got) } } @@ -399,7 +399,7 @@ func TestRouteSpawnParsesIdentity(t *testing.T) { r.Identity = "default" reply, err := r.Route(context.Background(), Message{ - Text: "/spawn identity=reviewer repo=sam/tau workflow=tdd Fix the flaky test", + Text: "/spawn identity=reviewer repo=sam/example-service workflow=tdd Fix the flaky test", }) if err != nil { t.Fatalf("Route: %v", err) @@ -408,7 +408,7 @@ func TestRouteSpawnParsesIdentity(t *testing.T) { t.Errorf("reply = %q, want task creation confirmation", reply) } got := tc.requests[0] - if got.Identity != "reviewer" || got.Repo != "sam/tau" || got.Workflow != "tdd" || got.Title != "Fix the flaky test" { + if got.Identity != "reviewer" || got.Repo != "sam/example-service" || got.Workflow != "tdd" || got.Title != "Fix the flaky test" { t.Errorf("request = %+v, want selected identity, repo, workflow, and full title", got) } } @@ -436,12 +436,12 @@ func TestRouteSpawnTitleLooksLikeKeyValueIsPreserved(t *testing.T) { tc := &fakeTaskCreator{} r := NewRouter(nil, nil, "test-gw") r.Tasks = tc - if _, err := r.Route(context.Background(), Message{Text: "/spawn repo=sam/tau Fix x=y in config"}); err != nil { + if _, err := r.Route(context.Background(), Message{Text: "/spawn repo=sam/example-service Fix x=y in config"}); err != nil { t.Fatalf("Route: %v", err) } got := tc.requests[0] - if got.Repo != "sam/tau" || got.Title != "Fix x=y in config" { - t.Errorf("request = %+v, want Repo:sam/tau Title:\"Fix x=y in config\"", got) + if got.Repo != "sam/example-service" || got.Title != "Fix x=y in config" { + t.Errorf("request = %+v, want Repo:sam/example-service Title:\"Fix x=y in config\"", got) } } diff --git a/internal/gateway/tasks_test.go b/internal/gateway/tasks_test.go index 42e748926..5c4055b36 100644 --- a/internal/gateway/tasks_test.go +++ b/internal/gateway/tasks_test.go @@ -29,7 +29,7 @@ func (f *fakeChatTaskWriter) EnqueueChatTask(ctx context.Context, owner, repo, t func TestStoreTaskCreatorCreatesTask(t *testing.T) { sw := &fakeChatTaskWriter{} - tc := NewStoreTaskCreator(sw, "sam", "tau", []string{"sam/tau"}) + tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"}) id, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "Fix the login bug"}) if err != nil { t.Fatalf("CreateTask: %v", err) @@ -37,8 +37,8 @@ func TestStoreTaskCreatorCreatesTask(t *testing.T) { if id == 0 { t.Error("task id should be non-zero") } - if sw.owner != "sam" || sw.repo != "tau" { - t.Errorf("owner/repo = %s/%s, want sam/tau", sw.owner, sw.repo) + if sw.owner != "sam" || sw.repo != "example-service" { + t.Errorf("owner/repo = %s/%s, want sam/example-service", sw.owner, sw.repo) } if sw.title != "Fix the login bug" { t.Errorf("title = %q", sw.title) @@ -55,7 +55,7 @@ func TestStoreTaskCreatorRejectsEmptyRepo(t *testing.T) { func TestStoreTaskCreatorSyntheticNumbersDiffer(t *testing.T) { sw := &fakeChatTaskWriter{} - tc := NewStoreTaskCreator(sw, "sam", "tau", []string{"sam/tau"}) + tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"}) if _, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "first"}); err != nil { t.Fatal(err) } @@ -77,7 +77,7 @@ func TestStoreTaskCreatorReturnsRealID(t *testing.T) { // ID (whatever EnqueueChatTask returns), never the synthetic issue // number used for uniqueness. sw := &fakeChatTaskWriter{nextID: 999} - tc := NewStoreTaskCreator(sw, "sam", "tau", []string{"sam/tau"}) + tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"}) id, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "task"}) if err != nil { t.Fatal(err) @@ -92,7 +92,7 @@ func TestStoreTaskCreatorReturnsRealID(t *testing.T) { func TestStoreTaskCreatorExplicitRepoAllowed(t *testing.T) { sw := &fakeChatTaskWriter{} - tc := NewStoreTaskCreator(sw, "sam", "tau", []string{"sam/tau", "sam/archie-core"}) + tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service", "sam/archie-core"}) _, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Repo: "sam/archie-core"}) if err != nil { t.Fatalf("CreateTask: %v", err) @@ -104,7 +104,7 @@ func TestStoreTaskCreatorExplicitRepoAllowed(t *testing.T) { func TestStoreTaskCreatorExplicitRepoNotAllowedRejected(t *testing.T) { sw := &fakeChatTaskWriter{} - tc := NewStoreTaskCreator(sw, "sam", "tau", []string{"sam/tau"}) + tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"}) _, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Repo: "someone-else/private-repo"}) if err == nil || !strings.Contains(err.Error(), "not configured for this identity") { t.Errorf("err = %v, want repo-not-allowed error", err) @@ -115,7 +115,7 @@ func TestStoreTaskCreatorExplicitRepoNotAllowedRejected(t *testing.T) { } func TestStoreTaskCreatorMalformedRepoRejected(t *testing.T) { - tc := NewStoreTaskCreator(&fakeChatTaskWriter{}, "sam", "tau", []string{"no-slash"}) + tc := NewStoreTaskCreator(&fakeChatTaskWriter{}, "sam", "example-service", []string{"no-slash"}) _, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Repo: "no-slash"}) if err == nil || !strings.Contains(err.Error(), "owner/name") { t.Errorf("err = %v, want owner/name format error", err) @@ -124,7 +124,7 @@ func TestStoreTaskCreatorMalformedRepoRejected(t *testing.T) { func TestStoreTaskCreatorPropagatesWorkflowAndIdentity(t *testing.T) { sw := &fakeChatTaskWriter{} - tc := NewStoreTaskCreator(sw, "sam", "tau", []string{"sam/tau"}) + tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"}) _, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Workflow: "tdd", Identity: "archie"}) if err != nil { t.Fatal(err) @@ -136,7 +136,7 @@ func TestStoreTaskCreatorPropagatesWorkflowAndIdentity(t *testing.T) { func TestStoreTaskCreatorPropagatesStoreError(t *testing.T) { sw := &fakeChatTaskWriter{err: fmt.Errorf("store unavailable")} - tc := NewStoreTaskCreator(sw, "sam", "tau", []string{"sam/tau"}) + tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"}) _, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x"}) if err == nil || !strings.Contains(err.Error(), "store unavailable") { t.Errorf("err = %v, want store error propagated", err) @@ -147,15 +147,15 @@ func TestStoreTaskCreatorSelectsIdentityProfile(t *testing.T) { sw := &fakeChatTaskWriter{} tc := NewStoreTaskCreatorForProfiles(sw, []TaskProfile{ {Identity: "builder", DefaultOwner: "sam", DefaultRepo: "archie-core", Repos: []string{"sam/archie-core"}}, - {Identity: "reviewer", DefaultOwner: "sam", DefaultRepo: "tau", Repos: []string{"sam/tau"}}, + {Identity: "reviewer", DefaultOwner: "sam", DefaultRepo: "example-service", Repos: []string{"sam/example-service"}}, }) _, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "review this", Identity: "reviewer"}) if err != nil { t.Fatalf("CreateTask: %v", err) } - if sw.owner != "sam" || sw.repo != "tau" || sw.identity != "reviewer" { - t.Errorf("created task = %s/%s identity=%s, want sam/tau identity=reviewer", sw.owner, sw.repo, sw.identity) + if sw.owner != "sam" || sw.repo != "example-service" || sw.identity != "reviewer" { + t.Errorf("created task = %s/%s identity=%s, want sam/example-service identity=reviewer", sw.owner, sw.repo, sw.identity) } } diff --git a/internal/indexing/codesearch.go b/internal/indexing/codesearch.go index 24be299a9..12b6fe56d 100644 --- a/internal/indexing/codesearch.go +++ b/internal/indexing/codesearch.go @@ -1,16 +1,4 @@ // Package indexing provides language-neutral workspace text indexing. -// -// Ported from tau: internal/indexing/codesearch.go @ 4893818d0c76 (2026-07-13). -// Mutations from the original: -// - tau resolved its index paths from process-global config helpers -// (config.WorkspaceIndexDir/WorkspaceIndexDBPath). archied passes config -// explicitly, so paths arrive via [Config] instead. -// - the helper subcommand is archied's rather than tau's -// (cmd/archied/codesearch.go). -// - deferred db.Close calls are explicitly discarded; archie-core runs -// errcheck, tau does not. -// -// Refresh from upstream by diffing against that path and commit. package indexing import ( @@ -51,7 +39,7 @@ type CandidateProvider interface { } // Manager owns the workspace index lifecycle. The codesearch implementation -// runs in a child Tau process so upstream fatal exits and mmap lifetime cannot +// runs in a child process so upstream fatal exits and mmap lifetime cannot // terminate or leak inside the interactive agent process. type Manager struct { root string @@ -80,11 +68,10 @@ type processRunner struct{} // Config locates the index storage for a Manager. // -// tau derived these from process-global helpers. archied resolves them in -// its own config layer ([indexing] in config.toml, defaulted off work_dir by -// config.finalize) and passes them down. Defaulting deliberately does NOT -// live here: this package stays free of archie-core's config so it remains -// a straight diff against its tau original. +// Archied resolves these in its config layer ([indexing] in config.toml, +// defaulted off work_dir by config.finalize) and passes them down. Defaulting +// deliberately does NOT live here so this package stays free of archie-core's +// config. type Config struct { // IndexDir holds the mmap-friendly codesearch sidecar files. IndexDir string diff --git a/internal/indexing/codesearch_test.go b/internal/indexing/codesearch_test.go index 56cec3d28..1c9bfb560 100644 --- a/internal/indexing/codesearch_test.go +++ b/internal/indexing/codesearch_test.go @@ -1,4 +1,3 @@ -// Ported from tau: internal/indexing/codesearch_test.go @ 4893818d0c76 (2026-07-13). package indexing import ( diff --git a/internal/secret/secretextract/github_com-samcharles93-archie-core-internal-secret.go b/internal/secret/secretextract/github_com-samcharles93-archie-core-internal-secret.go index ebcb7c10e..9defcf9ac 100644 --- a/internal/secret/secretextract/github_com-samcharles93-archie-core-internal-secret.go +++ b/internal/secret/secretextract/github_com-samcharles93-archie-core-internal-secret.go @@ -3,8 +3,9 @@ package secretextract import ( - "github.com/samcharles93/archie-core/internal/secret" "reflect" + + "github.com/samcharles93/archie-core/internal/secret" ) func init() { @@ -28,7 +29,7 @@ func init() { // it holds the underlying concrete value for the interpreter's type system even // though Name()/Resolve()/Version() delegate to the function fields. Do not remove. type _github_com_samcharles93_archie_core_internal_secret_Engine struct { - IValue interface{} + IValue any WName func() string WResolve func(key string) (string, error) WVersion func() string diff --git a/internal/skillscript/yaegi_test.go b/internal/skillscript/yaegi_test.go index 399fa5678..fc56c45d6 100644 --- a/internal/skillscript/yaegi_test.go +++ b/internal/skillscript/yaegi_test.go @@ -40,10 +40,12 @@ func TestRunWrapsExternalCommand(t *testing.T) { import ( "fmt" "os/exec" + "context" ) func main() { - out, _ := exec.Command("echo", "wrapped").CombinedOutput() + ctx := context.Background() + out, _ := exec.CommandContext(ctx, "sh", "-c", "echo", "wrapped").CombinedOutput() fmt.Print(string(out)) } `) diff --git a/internal/store/store.go b/internal/store/store.go index cabad760e..690f02098 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -90,27 +90,28 @@ func Open(path string) (*Store, error) { if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { return nil, err } + ctx := context.Background() // FIXME update context to use it correctly. db, err := sql.Open("sqlite", path+"?_pragma=journal_mode(WAL)&_pragma=busy_timeout(5000)") if err != nil { return nil, err } - if _, err := db.Exec(schema + eventsSchema); err != nil { + if _, err := db.ExecContext(ctx, schema+eventsSchema); err != nil { return nil, errors.Join(fmt.Errorf("store: init schema: %w", err), db.Close()) } // Additive migrations; "duplicate column" means already applied. - if _, err := db.Exec(`ALTER TABLE tasks ADD COLUMN watch_comment_id INTEGER NOT NULL DEFAULT 0`); err != nil && + if _, err := db.ExecContext(ctx, `ALTER TABLE tasks ADD COLUMN watch_comment_id INTEGER NOT NULL DEFAULT 0`); err != nil && !strings.Contains(err.Error(), "duplicate column") { return nil, errors.Join(fmt.Errorf("store: migrate: %w", err), db.Close()) } - if _, err := db.Exec(`ALTER TABLE tasks ADD COLUMN retry_count INTEGER NOT NULL DEFAULT 0`); err != nil && + if _, err := db.ExecContext(ctx, `ALTER TABLE tasks ADD COLUMN retry_count INTEGER NOT NULL DEFAULT 0`); err != nil && !strings.Contains(err.Error(), "duplicate column") { return nil, errors.Join(fmt.Errorf("store: migrate: %w", err), db.Close()) } - if _, err := db.Exec(`ALTER TABLE tasks ADD COLUMN source TEXT NOT NULL DEFAULT 'forge'`); err != nil && + if _, err := db.ExecContext(ctx, `ALTER TABLE tasks ADD COLUMN source TEXT NOT NULL DEFAULT 'forge'`); err != nil && !strings.Contains(err.Error(), "duplicate column") { return nil, errors.Join(fmt.Errorf("store: migrate: %w", err), db.Close()) } - if _, err := db.Exec(`ALTER TABLE tasks ADD COLUMN identity TEXT NOT NULL DEFAULT ''`); err != nil && + if _, err := db.ExecContext(ctx, `ALTER TABLE tasks ADD COLUMN identity TEXT NOT NULL DEFAULT ''`); err != nil && !strings.Contains(err.Error(), "duplicate column") { return nil, errors.Join(fmt.Errorf("store: migrate: %w", err), db.Close()) } diff --git a/internal/webui/webui_test.go b/internal/webui/webui_test.go index fa22f7c95..0703f41a8 100644 --- a/internal/webui/webui_test.go +++ b/internal/webui/webui_test.go @@ -67,7 +67,7 @@ func TestHandleSummary(t *testing.T) { t.Fatal(err) } - req := httptest.NewRequest(http.MethodGet, "/api/summary", nil) + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/api/summary", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) @@ -91,6 +91,7 @@ func TestHandleSummary(t *testing.T) { // (wants 500, gets 200 with nil workflows). func TestHandleSummaryWorkflowStatsError(t *testing.T) { base := newTestServer(t) + ctx := t.Context() srv := &Server{ Store: &stubStore{ TaskStore: base.Store, @@ -99,7 +100,7 @@ func TestHandleSummaryWorkflowStatsError(t *testing.T) { Log: base.Log, } - req := httptest.NewRequest(http.MethodGet, "/api/summary", nil) + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/api/summary", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) @@ -112,6 +113,7 @@ func TestHandleSummaryWorkflowStatsError(t *testing.T) { // silently discard an error from StageStats. func TestHandleSummaryStageStatsError(t *testing.T) { base := newTestServer(t) + ctx := t.Context() srv := &Server{ Store: &stubStore{ TaskStore: base.Store, @@ -120,7 +122,7 @@ func TestHandleSummaryStageStatsError(t *testing.T) { Log: base.Log, } - req := httptest.NewRequest(http.MethodGet, "/api/summary", nil) + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/api/summary", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) @@ -133,6 +135,7 @@ func TestHandleSummaryStageStatsError(t *testing.T) { // silently discard an error from TokensByDay. func TestHandleSummaryTokensByDayError(t *testing.T) { base := newTestServer(t) + ctx := t.Context() srv := &Server{ Store: &stubStore{ TaskStore: base.Store, @@ -141,7 +144,7 @@ func TestHandleSummaryTokensByDayError(t *testing.T) { Log: base.Log, } - req := httptest.NewRequest(http.MethodGet, "/api/summary", nil) + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/api/summary", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) @@ -157,7 +160,7 @@ func TestHandleTasks(t *testing.T) { t.Fatal(err) } - req := httptest.NewRequest(http.MethodGet, "/api/tasks", nil) + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/api/tasks", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) @@ -187,7 +190,7 @@ func TestHandleTask(t *testing.T) { t.Fatal(err) } - req := httptest.NewRequest(http.MethodGet, "/api/tasks/"+strconv.FormatInt(task.ID, 10), nil) + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/api/tasks/"+strconv.FormatInt(task.ID, 10), nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) @@ -205,7 +208,8 @@ func TestHandleTask(t *testing.T) { func TestHandleTaskBadID(t *testing.T) { srv := newTestServer(t) - req := httptest.NewRequest(http.MethodGet, "/api/tasks/not-a-number", nil) + ctx := t.Context() + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/api/tasks/not-a-number", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) if w.Code != http.StatusBadRequest { @@ -215,7 +219,8 @@ func TestHandleTaskBadID(t *testing.T) { func TestHandleIndex(t *testing.T) { srv := newTestServer(t) - req := httptest.NewRequest(http.MethodGet, "/", nil) + ctx := t.Context() + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) if w.Code != http.StatusOK { @@ -228,7 +233,8 @@ func TestHandleIndex(t *testing.T) { func TestIndexContainsViewportMeta(t *testing.T) { srv := newTestServer(t) - req := httptest.NewRequest(http.MethodGet, "/", nil) + ctx := t.Context() + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) if w.Code != http.StatusOK { @@ -242,7 +248,8 @@ func TestIndexContainsViewportMeta(t *testing.T) { func TestIndexHasResponsiveFeatures(t *testing.T) { srv := newTestServer(t) - req := httptest.NewRequest(http.MethodGet, "/", nil) + ctx := t.Context() + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) if w.Code != http.StatusOK { @@ -278,7 +285,13 @@ func TestHandleSSEBacklogAndLive(t *testing.T) { ts := httptest.NewServer(srv.Handler()) t.Cleanup(ts.Close) - resp, err := http.Get(ts.URL + "/events") + // The request carries t.Context() so the SSE stream is torn down when + // the test ends rather than leaking the connection and its goroutine. + req, err := http.NewRequestWithContext(ctx, http.MethodGet, ts.URL+"/events", nil) + if err != nil { + t.Fatal(err) + } + resp, err := http.DefaultClient.Do(req) if err != nil { t.Fatal(err) } @@ -305,7 +318,8 @@ func TestHandleSSEBacklogAndLive(t *testing.T) { func TestIndexEscapesSingleQuotesInOnclick(t *testing.T) { srv := newTestServer(t) - req := httptest.NewRequest(http.MethodGet, "/", nil) + ctx := t.Context() + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) @@ -331,7 +345,8 @@ func TestIndexEscapesSingleQuotesInOnclick(t *testing.T) { func TestIndexEscDoesNotEscapeSingleQuotes(t *testing.T) { srv := newTestServer(t) - req := httptest.NewRequest(http.MethodGet, "/", nil) + ctx := t.Context() + req := httptest.NewRequestWithContext(ctx, http.MethodGet, "/", nil) w := httptest.NewRecorder() srv.Handler().ServeHTTP(w, req) diff --git a/internal/workflow/steps_test.go b/internal/workflow/steps_test.go index 439eadf74..6ad0b5cb5 100644 --- a/internal/workflow/steps_test.go +++ b/internal/workflow/steps_test.go @@ -17,7 +17,8 @@ import ( // runGit runs git in dir, failing the test on error. func runGit(t *testing.T, dir string, args ...string) { t.Helper() - cmd := exec.Command("git", args...) + ctx := t.Context() + cmd := exec.CommandContext(ctx, "git", args...) cmd.Dir = dir cmd.Env = append(os.Environ(), "GIT_TERMINAL_PROMPT=0") if out, err := cmd.CombinedOutput(); err != nil { diff --git a/tools/docsgen/main.go b/tools/docsgen/main.go new file mode 100644 index 000000000..6d3bc2df6 --- /dev/null +++ b/tools/docsgen/main.go @@ -0,0 +1,169 @@ +// Command docsgen generates reference schemas from Archie-owned Go contracts. +package main + +import ( + "encoding/json" + "flag" + "fmt" + "log" + "os" + "path/filepath" + "reflect" + "sort" + "strings" + + "github.com/invopop/jsonschema" + "github.com/samcharles93/archie-core/internal/agentexec" + "github.com/samcharles93/archie-core/internal/gateway" + "gopkg.in/yaml.v3" +) + +func main() { + repoRoot := flag.String("repo-root", "..", "path to the Archie repository root") + out := flag.String( + "out", + "docs-2/reference/generated/agent-contracts.yaml", + "output path relative to the repository root", + ) + flag.Parse() + + if err := run(*repoRoot, *out); err != nil { + log.Fatalf("docsgen: %v", err) + } +} + +func run(repoRoot, outPath string) error { + absRoot, err := filepath.Abs(repoRoot) + if err != nil { + return fmt.Errorf("resolve repository root: %w", err) + } + + reflector := &jsonschema.Reflector{ + ExpandedStruct: true, + DoNotReference: false, + } + if err := loadGoComments(reflector, absRoot); err != nil { + return fmt.Errorf("load Go comments: %w", err) + } + + schemas := map[string]any{} + types := map[string]reflect.Type{ + "AgentExecutionRequest": reflect.TypeFor[agentexec.Request](), + "AgentExecutionResult": reflect.TypeFor[agentexec.Result](), + "MessageEvent": reflect.TypeFor[gateway.MessageEvent](), + } + names := make([]string, 0, len(types)) + for name := range types { + names = append(names, name) + } + sort.Strings(names) + for _, name := range names { + if err := collectSchema(reflector, schemas, name, types[name]); err != nil { + return fmt.Errorf("reflect %s: %w", name, err) + } + } + rewriteDefRefs(schemas) + + body, err := yaml.Marshal(map[string]any{"schemas": schemas}) + if err != nil { + return fmt.Errorf("marshal schemas: %w", err) + } + + destination := outPath + if !filepath.IsAbs(destination) { + destination = filepath.Join(absRoot, destination) + } + if err := os.MkdirAll(filepath.Dir(destination), 0o755); err != nil { + return fmt.Errorf("create output directory: %w", err) + } + header := []byte("# Code generated by tools/docsgen. DO NOT EDIT.\n") + if err := os.WriteFile(destination, append(header, body...), 0o644); err != nil { + return fmt.Errorf("write %s: %w", destination, err) + } + + fmt.Printf("docsgen: wrote %d schemas to %s\n", len(schemas), destination) + return nil +} + +func loadGoComments(reflector *jsonschema.Reflector, repoRoot string) error { + const modulePath = "github.com/samcharles93/archie-core" + if err := reflector.AddGoComments("", filepath.Join(repoRoot, "internal")); err != nil { + return err + } + + rootPrefix := filepath.ToSlash(repoRoot) + "/" + comments := make(map[string]string, len(reflector.CommentMap)) + for name, comment := range reflector.CommentMap { + relativeName := strings.TrimPrefix(filepath.ToSlash(name), rootPrefix) + comments[modulePath+"/"+relativeName] = comment + } + reflector.CommentMap = comments + return nil +} + +func collectSchema( + reflector *jsonschema.Reflector, + schemas map[string]any, + name string, + t reflect.Type, +) error { + if _, exists := schemas[name]; exists { + return nil + } + raw, err := json.Marshal(reflector.ReflectFromType(t)) + if err != nil { + return err + } + var tree map[string]any + if err := json.Unmarshal(raw, &tree); err != nil { + return err + } + defs, _ := tree["$defs"].(map[string]any) + delete(tree, "$defs") + delete(tree, "$schema") + delete(tree, "$id") + schemas[name] = tree + for defName, defSchema := range defs { + if _, exists := schemas[defName]; !exists { + schemas[defName] = defSchema + } + } + return nil +} + +func rewriteDefRefs(schemas map[string]any) { + for name, schema := range schemas { + schemas[name] = rewriteNode(schema) + } +} + +func rewriteNode(value any) any { + switch node := value.(type) { + case map[string]any: + for key, child := range node { + if key == "$ref" { + if ref, ok := child.(string); ok { + node[key] = rewriteRef(ref) + continue + } + } + node[key] = rewriteNode(child) + } + return node + case []any: + for index, child := range node { + node[index] = rewriteNode(child) + } + return node + default: + return value + } +} + +func rewriteRef(ref string) string { + const prefix = "#/$defs/" + if len(ref) > len(prefix) && ref[:len(prefix)] == prefix { + return "#/schemas/" + ref[len(prefix):] + } + return ref +} diff --git a/tools/docsgen/main_test.go b/tools/docsgen/main_test.go new file mode 100644 index 000000000..7dc9c012e --- /dev/null +++ b/tools/docsgen/main_test.go @@ -0,0 +1,33 @@ +package main + +import ( + "os" + "path/filepath" + "testing" +) + +func TestRunHonoursAbsoluteOutputPath(t *testing.T) { + repoRoot := filepath.Clean("../..") + outputDir := t.TempDir() + originalDir, err := os.Getwd() + if err != nil { + t.Fatalf("get working directory: %v", err) + } + + for _, name := range []string{"first.yaml", "second.yaml"} { + output := filepath.Join(outputDir, name) + if err := run(repoRoot, output); err != nil { + t.Fatalf("run(%q) error = %v", name, err) + } + if _, err := os.Stat(output); err != nil { + t.Fatalf("generated output %q: %v", name, err) + } + } + currentDir, err := os.Getwd() + if err != nil { + t.Fatalf("get restored working directory: %v", err) + } + if currentDir != originalDir { + t.Fatalf("working directory = %q, want %q", currentDir, originalDir) + } +} diff --git a/tools/go.mod b/tools/go.mod new file mode 100644 index 000000000..efdf00115 --- /dev/null +++ b/tools/go.mod @@ -0,0 +1,30 @@ +module github.com/samcharles93/archie-core/tools + +go 1.26.4 + +require ( + github.com/invopop/jsonschema v0.14.0 + github.com/samcharles93/archie-core v0.0.0-00010101000000-000000000000 + gopkg.in/yaml.v3 v3.0.1 +) + +require ( + github.com/BurntSushi/toml v1.6.0 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/buger/jsonparser v1.1.2 // indirect + github.com/gorilla/websocket v1.5.3 // indirect + github.com/klauspost/compress v1.18.6 // indirect + github.com/nats-io/nats.go v1.52.0 // indirect + github.com/nats-io/nkeys v0.4.16 // indirect + github.com/nats-io/nuid v1.0.1 // indirect + github.com/pb33f/ordered-map/v2 v2.3.1 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect + github.com/samcharles93/NellDB v0.2.5 // indirect + github.com/samcharles93/ai-sdk v0.1.18 // indirect + github.com/traefik/yaegi v0.16.1 // indirect + go.yaml.in/yaml/v4 v4.0.0-rc.2 // indirect + golang.org/x/crypto v0.53.0 // indirect + golang.org/x/sys v0.46.0 // indirect +) + +replace github.com/samcharles93/archie-core => ../ diff --git a/tools/go.sum b/tools/go.sum new file mode 100644 index 000000000..391ff5403 --- /dev/null +++ b/tools/go.sum @@ -0,0 +1,109 @@ +github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= +github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/antithesishq/antithesis-sdk-go v0.7.0-default-no-op h1:Z/MZK75wC/NSrkgqeNIa7jexam9uWzhLmFTSCPI/kn0= +github.com/antithesishq/antithesis-sdk-go v0.7.0-default-no-op/go.mod h1:FQyySiasQQM8735Ddel3MRojmy4dA1IqCeyJ5jmPMbI= +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= +github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/google/go-tpm v0.9.8 h1:slArAR9Ft+1ybZu0lBwpSmpwhRXaa85hWtMinMyRAWo= +github.com/google/go-tpm v0.9.8/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/mdns v1.0.7 h1:yWoQVMW5JOiDxQnIUcm3IDt0kCjf3TuXHDbdEKPsbAY= +github.com/hashicorp/mdns v1.0.7/go.mod h1:yjuhYhZyPDqXXL48xC7cdpGwGUMwu7OViDmsuT5COvg= +github.com/invopop/jsonschema v0.14.0 h1:MHQqLhvpNUZfw+hM3AZDYK7jxO8FZoQeQM77g8iyZjg= +github.com/invopop/jsonschema v0.14.0/go.mod h1:ygm6C2EaVNMBDPpaPlnOA2pFAxBnxGjFlMZABxm9n2I= +github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao= +github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= +github.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI= +github.com/miekg/dns v1.1.72/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs= +github.com/minio/highwayhash v1.0.4 h1:asJizugGgchQod2ja9NJlGOWq4s7KsAWr5XUc9Clgl4= +github.com/minio/highwayhash v1.0.4/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/nats-io/jwt/v2 v2.8.2 h1:XXRgB60MSTnqsRwejQurVDs/hcv2dkt+86GjI+I/bMc= +github.com/nats-io/jwt/v2 v2.8.2/go.mod h1:Ag/56sq9OblL4JgdYufDd16Egb17Kr/8WwwuO/forVc= +github.com/nats-io/nats-server/v2 v2.14.3 h1:+xjydPt7rkit67G+04TN0mcO2n+8nveZE7tK/PPV53A= +github.com/nats-io/nats-server/v2 v2.14.3/go.mod h1:5IlCtBzfwyzQzPMjmoJ9W2/LKmnJRtNyuOs/OT+NHDY= +github.com/nats-io/nats.go v1.52.0 h1:n3avV4VBsCgsdwh71TppsTwtv+QdPs7ntSKM8qJLGsc= +github.com/nats-io/nats.go v1.52.0/go.mod h1:26HypzazeOkyO3/mqd1zZd53STJN0EjCYF9Uy2ZOBno= +github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg= +github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/pb33f/ordered-map/v2 v2.3.1 h1:5319HDO0aw4DA4gzi+zv4FXU9UlSs3xGZ40wcP1nBjY= +github.com/pb33f/ordered-map/v2 v2.3.1/go.mod h1:qxFQgd0PkVUtOMCkTapqotNgzRhMPL7VvaHKbd1HnmQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/otlptranslator v1.0.0 h1:s0LJW/iN9dkIH+EnhiD3BlkkP5QVIUVEoIwkU+A6qos= +github.com/prometheus/otlptranslator v1.0.0/go.mod h1:vRYWnXvI6aWGpsdY/mOT/cbeVRBlPWtBNDb7kGR3uKM= +github.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc= +github.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo= +github.com/samcharles93/NellDB v0.2.5 h1:VEasjyB4opTFAfWnV3s9TEHkfA41ee+7gYD8LqKnvns= +github.com/samcharles93/NellDB v0.2.5/go.mod h1:vyfd6/T2Cp5U0acoh2LrebJteZqoFObedDZTxP0j4W0= +github.com/samcharles93/ai-sdk v0.1.18 h1:Jvz2OSnzJ68XCAiTHdLKKvgoNI/rKrNw9LJ7jbZs55c= +github.com/samcharles93/ai-sdk v0.1.18/go.mod h1:a4JYsUrwGsmm2eiXgrpcKExtYe7uHQ5zsHDbbkcPB6o= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/traefik/yaegi v0.16.1 h1:f1De3DVJqIDKmnasUF6MwmWv1dSEEat0wcpXhD2On3E= +github.com/traefik/yaegi v0.16.1/go.mod h1:4eVhbPb3LnD2VigQjhYbEJ69vDRFdT2HQNrXx8eEwUY= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= +go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= +go.opentelemetry.io/otel/exporters/prometheus v0.66.0 h1:vkrK8PAznv2NKt2r+kdu252ccGzkEqLc2aSXbQIALYQ= +go.opentelemetry.io/otel/exporters/prometheus v0.66.0/go.mod h1:V/UB6D3vMF/UBOL5igAsAYnk1nG/bzYYTzvsB16cy7o= +go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= +go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= +go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= +go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= +go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= +go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= +go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= +go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= +go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= +go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= +go.yaml.in/yaml/v4 v4.0.0-rc.2 h1:/FrI8D64VSr4HtGIlUtlFMGsm7H7pWTbj6vOLVZcA6s= +go.yaml.in/yaml/v4 v4.0.0-rc.2/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= +golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= +golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= +golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= +golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= +golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= +golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= +golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= +golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=