@inneranimalmedia/agentsam-sdk 2.6.11 → 2.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTSAM.md +32 -0
- package/DEVELOPMENT.md +69 -74
- package/README.md +11 -0
- package/apps/cad-creator/README.md +12 -0
- package/apps/cad-creator/shared/cad/package.json +1 -1
- package/apps/cad-creator/shared/cad/src/domain/project-contract.js +2 -75
- package/apps/cad-creator/shared/cad/src/domain/project-tools.js +2 -24
- package/apps/cad-creator/shared/cad/src/types.ts +2 -2
- package/apps/client-cms-editor/backend/package.json +2 -2
- package/apps/client-cms-editor/frontend/package.json +3 -3
- package/apps/client-cms-editor/frontend/src/adapters/http-authoring.test.ts +161 -0
- package/apps/client-cms-editor/frontend/src/adapters/http.ts +320 -77
- package/apps/client-cms-editor/frontend/src/editor/CmsEditor.tsx +54 -20
- package/apps/client-cms-editor/frontend/src/editor/canvas/PreviewCanvas.tsx +31 -3
- package/apps/client-cms-editor/frontend/src/editor/composition-groups.test.ts +40 -0
- package/apps/client-cms-editor/frontend/src/editor/host-preview.test.tsx +104 -0
- package/apps/client-cms-editor/frontend/src/editor/legacy/CmsEditorPrototype.tsx +28 -28
- package/apps/client-cms-editor/frontend/src/editor/useCmsEditorController.ts +3 -3
- package/apps/client-cms-editor/frontend/src/styles/agentsam-drawer.css +5 -4
- package/apps/client-cms-editor/frontend/src/styles/studio.css +150 -149
- package/apps/client-cms-editor/package-lock.json +8 -8
- package/apps/client-cms-editor/package.json +2 -1
- package/apps/client-cms-editor/reference/harvest/plans/INNERANIMALS-CONTENT-001.md +1 -1
- package/apps/client-cms-editor/shared/cms/package.json +1 -1
- package/apps/client-cms-editor/shared/cms/src/editor-types.ts +42 -1
- package/docs/AUTORAG.md +2 -0
- package/docs/CAPABILITIES.md +28 -0
- package/docs/CMS_CONTEXTUAL_COMPOSER.md +4 -4
- package/docs/PRODUCT_LIFECYCLE.md +38 -38
- package/docs/REPO_FILE_MAP.txt +2 -2
- package/docs/THEME_REFINERY.md +6 -6
- package/docs/WINDOWS_RUNTIME_INSTALL.md +1 -1
- package/docs/adr/ADR-0002-brand-campaign-plugin-boundaries.md +603 -0
- package/docs/adr/ADR-0003-copro-clean-room-product-architecture.md +40 -0
- package/docs/adr/ADR-0003-product-portfolio-and-package-taxonomy.md +146 -0
- package/docs/adr/ADR-0004-product-composition-and-provider-neutrality.md +56 -0
- package/docs/adr/ADR-0005-offer-graduation-standard.md +66 -0
- package/docs/adr/README.md +25 -0
- package/docs/architecture/AGENTSAM-CANONICAL-DISCOVERY-FIRST-SLICE.md +70 -0
- package/docs/architecture/AGENTSAM-REGISTRY-CLI-AGENT-PARITY.md +133 -0
- package/docs/architecture/AGENTSAM_APPLICATION_CONTRACT.md +7 -1
- package/docs/architecture/CAD_OPERATOR_CAPABILITIES.md +64 -0
- package/docs/architecture/CAD_ROBOTICS_RELEASE_LEDGER_20261016.md +43 -0
- package/docs/architecture/CAD_RUN_MODES.md +34 -0
- package/docs/architecture/CLI-BOOT-REMOTE-DB-READINESS-20261015.md +65 -0
- package/docs/architecture/DUAL_ANALYTICS_PRODUCT.md +1 -1
- package/docs/architecture/EXISTING-MCP-D1-AGENT-BRIDGE.md +47 -0
- package/docs/architecture/PLAN-PORTABILITY-SAM-FIRST-SPRINT-20261015.md +36 -0
- package/docs/architecture/PLUGIN-PRODUCTIZATION-SPINE.md +101 -0
- package/docs/architecture/SAMOS_PRODUCT_MODEL.md +49 -0
- package/docs/architecture/SAM_KERNEL.md +40 -0
- package/docs/architecture/SAM_RESOURCE_CRUD_STANDARD.md +96 -0
- package/docs/architecture/SAM_SYSTEMATIC_AUTONOMOUS_MACHINERY.md +79 -0
- package/docs/architecture/USER_GLOBAL_AGENT_INSTRUCTIONS.md +55 -0
- package/docs/autorag-workflow.md +13 -0
- package/docs/brand/AGENT_SAM_ICON_GRAMMAR.md +4 -0
- package/docs/content-studio/HOST_MOUNT_CHECKLIST.md +1 -1
- package/docs/content-studio/REVISION_GATE_2026-09-27.md +3 -3
- package/docs/contracts/capability-install-planner.md +66 -38
- package/docs/contracts/environment-vocabulary.md +5 -5
- package/docs/contracts/google-cloud-oauth-setup.md +1 -1
- package/docs/engineering/SUPERBASH_LOCAL_RUNTIME.md +100 -0
- package/docs/generated/SDK_CAPABILITY_INVENTORY.md +313 -0
- package/docs/handoffs/AGENT_HANDOFF_SUPERBASH_AND_MODEL_PERFORMANCE_2026-10-14.md +134 -0
- package/docs/intake/product-capabilities.proposed.ts +232 -0
- package/docs/knowledge-supabase-node-api.md +51 -0
- package/docs/local-studio/WORKMODE_DONOR_NOTES.md +3 -3
- package/docs/plans/ASTRA-BRIEF-2026-09-18.md +1 -1
- package/docs/plans/LOCAL-STUDIO-REAL-APP-CONTRACT-ADDENDUM-2026-09-27.md +2 -2
- package/docs/plans/MACHINE-FIRST-APPS-TUI-2026-09-24.md +1 -1
- package/docs/plans/MEDIA_TRUTH_SOURCE_RECOVERY_20261008.md +31 -0
- package/docs/plans/NEXT-AGENT-HANDOFF.md +2 -2
- package/docs/plans/OFFLINE_CLI_KNOWLEDGE_AGENT_HANDOFF.md +104 -0
- package/docs/plans/OFFLINE_CLI_KNOWLEDGE_RUNBOOK.md +81 -0
- package/docs/plans/SAM_EXPERIENCE_AGENT_DISPATCH_2026-10-15.md +107 -0
- package/docs/plans/SAM_MACHINERY_TO_EXPERIENCE_2026-10-15.md +172 -0
- package/docs/plans/TOMORROW-EXTENSIVE-TODO-2026-09-26.md +68 -68
- package/docs/plans/TOMORROW-MACHINE-FIRST-BRIEFING.md +1 -1
- package/docs/plans/UI_POLISH_DESKTOP_2026-10-16.md +102 -0
- package/docs/plans/UNIVERSAL-INGEST-MACHINE-FIRST-2026-09-24.md +1 -1
- package/docs/plans/WORK-UX-REMASTER-2026-10-15.md +48 -0
- package/docs/plans/WORK-WORKSPACE-PLAN-2026-10-14.md +212 -0
- package/docs/prd/PRD-agentsam-analytics.md +174 -0
- package/docs/prd/PRD-agentsam-brand.md +181 -0
- package/docs/prd/PRD-agentsam-browser.md +177 -0
- package/docs/prd/PRD-agentsam-cad-studio.md +177 -0
- package/docs/prd/PRD-agentsam-campaign.md +1178 -0
- package/docs/prd/PRD-agentsam-commerce-studio.md +180 -0
- package/docs/prd/PRD-agentsam-content-studio.md +179 -0
- package/docs/prd/PRD-agentsam-copro.md +39 -0
- package/docs/prd/PRD-agentsam-database-studio.md +175 -0
- package/docs/prd/PRD-agentsam-developer-studio.md +175 -0
- package/docs/prd/PRD-agentsam-hosted-runtime.md +180 -0
- package/docs/prd/PRD-agentsam-knowledge.md +174 -0
- package/docs/prd/PRD-agentsam-local-studio.md +180 -0
- package/docs/prd/PRD-agentsam-merch.md +177 -0
- package/docs/prd/PRD-agentsam-platform.md +179 -0
- package/docs/prd/PRD-agentsam-site-studio.md +180 -0
- package/docs/prd/PRD-agentsam-work.md +180 -0
- package/docs/prd/README.md +39 -0
- package/docs/product/AGENTSAM-UI-QUALITY-GATE.md +148 -0
- package/docs/product/AGENTSAM_PRODUCT_EXPERIENCE_STANDARD.md +2 -0
- package/docs/product/COPRO-DONOR-AUDIT.md +9 -0
- package/docs/product/COPRO-EXECUTION-PLAN.md +81 -0
- package/docs/product/COPRO-UI-QUALITY-GATE.md +119 -0
- package/docs/product/MEDIA-PRODUCTION-FAMILY.md +47 -0
- package/docs/product/OFFER-PORTFOLIO.md +172 -0
- package/docs/product/PACKAGE-TAXONOMY.md +95 -0
- package/docs/product/PLUGIN-GALLERY-DISCOVERY-AND-INSTALL.md +97 -0
- package/docs/product/README.md +2 -0
- package/docs/product/WIDGET-GALLERY-PHASE-ONE.md +43 -0
- package/docs/reference/AGENTSAM-CLI-WORKFLOWS.md +73 -0
- package/docs/reference/AGENTSAM-ERROR-REASONS.md +267 -0
- package/docs/reference/AGENTSAM-REGISTRY.generated.md +288 -0
- package/docs/reference/INNERANIMALMEDIA_EXPERIENCE_ACCEPTANCE_2026-10-15.md +99 -0
- package/docs/releases/cad-v2-sdk-2.6.13.md +25 -0
- package/docs/roadmaps/ROAD_TO_REAL_DISTRIBUTION.md +97 -0
- package/docs/robotics-chess-handoff.md +15 -0
- package/docs/standards/DELIVERY_CLOSURE.md +33 -0
- package/docs/standards/SAM_MACHINE_BUILD_AND_GAPS.md +91 -0
- package/docs/workflows/ISSUE_TO_SAMOS.md +59 -0
- package/examples/hyperspace-demo/dist/assets/index-SZ2LfOpJ.js +242 -0
- package/examples/hyperspace-demo/dist/index.html +13 -0
- package/native/agentsam-machine/core/src/lib.rs +2 -2
- package/package.json +111 -39
- package/packages/agentsam-brand/package.json +3 -2
- package/packages/agentsam-brand/src/public.js +192 -0
- package/packages/agentsam-cms/README.md +56 -0
- package/packages/agentsam-cms/agentsam.package.json +46 -0
- package/packages/agentsam-cms/package.json +36 -0
- package/packages/agentsam-cms/src/aliases.js +74 -0
- package/packages/agentsam-cms/src/contracts.js +105 -0
- package/packages/agentsam-cms/src/index.d.ts +80 -0
- package/packages/agentsam-cms/src/index.js +3 -0
- package/packages/agentsam-cms/src/machine.js +221 -0
- package/packages/agentsam-cms/src/node-sqlite-repository.js +148 -0
- package/packages/agentsam-cms/src/node.d.ts +7 -0
- package/packages/agentsam-cms/src/node.js +1 -0
- package/packages/agentsam-cms/src/schema/cms-local-runtime.v1.sql +365 -0
- package/packages/agentsam-cms/test/standalone.test.mjs +28 -0
- package/packages/agentsam-contracts/README.md +1 -1
- package/packages/agentsam-contracts/agentsam.package.json +43 -0
- package/packages/agentsam-contracts/dist/errors.d.ts +1 -1
- package/packages/agentsam-contracts/dist/widgets.d.ts +7 -0
- package/packages/agentsam-contracts/package.json +1 -1
- package/packages/agentsam-contracts/src/errors.ts +1 -1
- package/packages/agentsam-contracts/src/widgets.ts +7 -0
- package/packages/agentsam-desktop-shell/README.md +38 -0
- package/packages/agentsam-desktop-shell/scripts/app-discovery.mjs +43 -0
- package/packages/agentsam-errors/README.md +14 -0
- package/packages/agentsam-errors/agentsam.package.json +43 -0
- package/packages/agentsam-errors/package.json +1 -1
- package/packages/agentsam-errors/protocol/error-catalog.json +12 -0
- package/packages/agentsam-errors/src/cli.js +56 -0
- package/packages/agentsam-errors/src/index.js +2 -0
- package/packages/agentsam-errors/src/vocabulary.js +2 -0
- package/packages/agentsam-errors/test/approval-contract.test.mjs +12 -0
- package/packages/agentsam-errors/types/index.d.ts +5 -1
- package/packages/agentsam-goap/agentsam.package.json +42 -0
- package/packages/agentsam-goap/package.json +2 -2
- package/packages/agentsam-hooks/agentsam.package.json +45 -0
- package/packages/agentsam-hooks/bindings/go/errors_generated.go +1 -0
- package/packages/agentsam-hooks/bindings/rust/src/errors_generated.rs +1 -0
- package/packages/agentsam-hooks/package.json +1 -1
- package/packages/agentsam-hooks/src/errors-generated.js +10 -0
- package/packages/agentsam-ide/README.md +59 -0
- package/packages/agentsam-ide/src/lsp/host.d.mts +13 -0
- package/packages/agentsam-ide/src/lsp/host.mjs +133 -0
- package/packages/agentsam-knowledge/agentsam.package.json +42 -0
- package/packages/agentsam-knowledge/package.json +1 -1
- package/packages/agentsam-knowledge/src/autorag/index.js +25 -4
- package/packages/agentsam-knowledge/src/backends/index.js +21 -1
- package/packages/agentsam-knowledge/src/backends/supabase-node-api.js +91 -0
- package/packages/agentsam-knowledge/test/autorag.test.mjs +13 -0
- package/packages/agentsam-knowledge/test/supabase-node-api.test.mjs +59 -0
- package/packages/agentsam-merch/agentsam.package.json +43 -0
- package/packages/agentsam-merch/package.json +1 -1
- package/packages/agentsam-merch/test/merch.test.mjs +1 -1
- package/packages/agentsam-nav/dist/browser.global.js +31 -71
- package/packages/agentsam-nav/dist/browser.js +760 -3157
- package/packages/agentsam-nav/dist/index.js +752 -3149
- package/packages/agentsam-nav/package.json +1 -1
- package/packages/agentsam-queue-control/agentsam.package.json +42 -0
- package/packages/agentsam-queue-control/package.json +1 -1
- package/packages/agentsam-rapid-rust/Cargo.toml +5 -0
- package/packages/agentsam-rapid-rust/agentsam.package.json +42 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/0b22ca9c5f8cddc15e6816df4a2467a28d41aa174361cdfed9019ee4e04dfbb8.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/0c5064875a5d7645013880f04d71f56c0dfa1bc87ac9fd59adc3e9a93a2745da.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/11ebd15702c169ee0666656be851cc549f70f84498dbca3c5b72d2ceaa91c851.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/1d7f2c8ad9588cd2077a1d07fce156e0bd47be686d8c9f26885bab14874c4ab5.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/1f21ba21e7b631b0d4893cbdd7a6bb7345d34e8b1a0ee9cf644cc30aeb3c8b8d.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/23f4d4b90def0782de32e7a57558cba24525f12ba3c009728ea4881259a74099.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/26b60985b6ef62e4f20e06c37e47c6996c1a2f457335fa9eb4a68d1288e18490.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/2b27d15a1b8c3637a56f631d583cc9ba584bed2b7018dd962a9340d5e1c50a1d.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/3110a5568a544c4c38de6585dcdabc21fa5f54a5772ecf4e1f4076ee0d49e933.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/357ce3db8299e01866bf4fc3d8ee1c784ef53c7455cf86bb17c52f3dad20d050.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/4516c6e03636538cacc7a6e4063d98a7ed2f0090c3a02c5ee817f1c512b1070e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/649e02dbaec2edabbd40372e0c5f72f114164fe7704e7825220b1955f6a7c74e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/81c266d4c150a4f6c5a73c9c4fef6541577fd0acd8c1f911f02781deb5f0be0f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/86b4b8de30eed9902750b3de9fb54276d229244671a8b6035345bbe705463d82.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/8a877fdc5dbc6a66c344b4ebc4d9b746d47f95153e98872210becd85ca941ddd.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/96a11200f7b42ddd1281e4f749e88dcb8455ab0e3883f943934e0a9a7935147a.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/9e2df2335cfc73ec021bdd6b2d34af798f6ed9c52e3061ce16b6ceabae4e275f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a405fe3addeaab2908ed58836997be3b679d990ec9102d06bece3569e4bd4a81.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a63915da0a45f86a5938ba9a2b2e87d469e7d07f7ea9cc531136fdc9e055557e.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/a8452c2dcaa959ced25e3597931b311999c0aa5b257ca8610fe415e8cfa598cc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/b35fc2ae65ea07fbbfdd242a3d76489947462399e7a2db91f8545ca50d97d86f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/b966932defe9c7b5ec9599c9276d333bd09ad1605adae80300d825d2161ad20c.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/ca9060e5ccb91f3a2663f57afd47a25099b6b3313c2a7436c4634993ff6e9afc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/d0eba82a259be203c68c3ebf6d5b8a376f31a3b84fad418fdb9b5e2715c59869.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/d8838513009c65079aba67314ab130920484c674c5f0b8a356c8777eb6174eb2.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/dda01925b7f0a213215b983979ce23625dd0f6cfdb49c483ec1ff73e64def56f.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/e4956d8f97608f8324607b22cc93635d8183b23021d79cb4c21668c8b8a6ce87.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/e80c1e517e7173dcbde78869d2bf67a24a11b0bb9df5a87fb12934e39497abc8.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/eeeaa9394ac979eb4ffa557e97d67ed96dbd61437e09058f7c776bdc0483f050.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/f9264d8d7d1ccfb415362a28b4a1b4fa0dfbdf828ff970d1aaecfb0ebe208978.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/cache/machine-parser.v1/f957a80b89d32af4f33f9f840b4795af1b5145fc44780ad88a6a3b1b3a7ea3bc.json +1 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2b0d196f16961f88/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_2d70e3d4fe8290fb/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_63fab76b2f18c2f0/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/findings.json +300 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_72fe856b80b0c46f/summary.json +21 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/asset-manifest.json +418 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/findings.json +308 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/frontend-manifest.json +70 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/graph.json +322 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/inventory.json +932 -0
- package/packages/agentsam-repository/.agentsam/machine/runs/run_a5834156504f3050/summary.json +21 -0
- package/packages/agentsam-repository/README.md +25 -0
- package/packages/agentsam-repository/agentsam.package.json +42 -0
- package/packages/agentsam-repository/package.json +6 -3
- package/packages/agentsam-repository/src/crawl.js +220 -0
- package/packages/agentsam-repository/src/goap.js.bak-20260922011251 +670 -0
- package/packages/agentsam-repository/src/index.js +3 -0
- package/packages/agentsam-repository/src/merkle/semantic.js +20 -0
- package/packages/agentsam-repository/src/refinery.js +96 -0
- package/packages/agentsam-repository/test/crawl-refinery.test.mjs +113 -0
- package/packages/agentsam-site-scrape/README.md +357 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/__init__.py +4 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/__main__.py +349 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/classify.py +80 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/config.py +83 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/contract.py +108 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/crawl.py +395 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/evidence.py +226 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/htmlparse.py +109 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/imageops.py +121 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/jsonrun.py +127 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/net.py +121 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/pageextract.py +202 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/r2_upload.py +140 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/ssrf.py +57 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/storage.py +57 -0
- package/packages/agentsam-site-scrape/agentsam_site_scrape/wrangler_bucket.py +98 -0
- package/packages/agentsam-site-scrape/pyproject.toml +21 -0
- package/packages/agentsam-site-scrape/runtime/client.mjs +32 -0
- package/packages/agentsam-site-scrape/runtime/core.mjs +211 -0
- package/packages/agentsam-site-scrape/runtime/index.mjs +31 -0
- package/packages/agentsam-site-scrape/runtime/knowledge.mjs +38 -0
- package/packages/agentsam-site-scrape/runtime/node-runner.mjs +231 -0
- package/packages/agentsam-site-scrape/runtime/node-storage.mjs +146 -0
- package/packages/agentsam-site-scrape/runtime/project-site.mjs +74 -0
- package/packages/agentsam-site-scrape/runtime/secure-fetch.mjs +88 -0
- package/packages/agentsam-site-scrape/runtime/test/knowledge-handoff.test.mjs +51 -0
- package/packages/agentsam-site-scrape/runtime/test/project-index-command.test.mjs +109 -0
- package/packages/agentsam-site-scrape/runtime/test/runtime.test.mjs +145 -0
- package/packages/agentsam-site-scrape/tests/__init__.py +0 -0
- package/packages/agentsam-site-scrape/tests/test_contract.py +83 -0
- package/packages/agentsam-site-scrape/tests/test_core.py +119 -0
- package/packages/agentsam-site-scrape/tests/test_evidence.py +88 -0
- package/packages/agentsam-site-scrape/tests/test_evidence_pipeline.py +112 -0
- package/packages/agentsam-site-scrape/tests/test_jsonrun.py +63 -0
- package/packages/agentsam-site-scrape/tests/test_redirects.py +68 -0
- package/packages/agentsam-site-scrape/tests/test_storage.py +34 -0
- package/packages/agentsam-site-scrape/worker/index.mjs +259 -0
- package/packages/agentsam-site-scrape/worker/project-config.mjs +57 -0
- package/packages/agentsam-site-scrape/worker/test/worker.test.mjs +191 -0
- package/packages/agentsam-vault/package.json +1 -1
- package/packages/agentsam-workbench/README.md +18 -0
- package/packages/agentsam-workbench/package.json +15 -5
- package/packages/agentsam-workbench/src/agent/MiniAgentSam.tsx +28 -4
- package/packages/agentsam-workbench/src/agent/capability-catalog.ts +96 -0
- package/packages/agentsam-workbench/src/agent/contextual-composer.css +72 -70
- package/packages/agentsam-workbench/src/agent/index.ts +2 -0
- package/packages/agentsam-workbench/src/agent/mini-agentsam.css +228 -10
- package/packages/agentsam-workbench/src/knowledge/AutoRagWorkflowDialog.tsx +166 -0
- package/packages/agentsam-workbench/src/knowledge/README.md +14 -0
- package/packages/agentsam-workbench/src/knowledge/autorag-workflow.css +6 -0
- package/packages/agentsam-workbench/src/knowledge/index.ts +2 -0
- package/packages/agentsam-workbench/src/widgets/registry.ts +266 -1
- package/packages/catalog/README.md +69 -0
- package/packages/catalog/assist/questions.json +205 -0
- package/packages/catalog/assist/rules.json +149 -0
- package/packages/catalog/doctor/toolchains.json +12 -0
- package/packages/catalog/evidence/agentsam-abs.json +76 -0
- package/packages/catalog/evidence/agentsam-analytics.json +59 -0
- package/packages/catalog/evidence/agentsam-assets-core.json +38 -0
- package/packages/catalog/evidence/agentsam-brand.json +73 -0
- package/packages/catalog/evidence/agentsam-browser-surface.json +42 -0
- package/packages/catalog/evidence/agentsam-campaign.json +48 -0
- package/packages/catalog/evidence/agentsam-cloudflare-images.json +38 -0
- package/packages/catalog/evidence/agentsam-content-studio.json +42 -0
- package/packages/catalog/evidence/agentsam-content.json +70 -0
- package/packages/catalog/evidence/agentsam-contracts.json +92 -0
- package/packages/catalog/evidence/agentsam-database-editor.json +82 -0
- package/packages/catalog/evidence/agentsam-desktop-shell.json +56 -0
- package/packages/catalog/evidence/agentsam-docs-theme.json +35 -0
- package/packages/catalog/evidence/agentsam-errors.json +42 -0
- package/packages/catalog/evidence/agentsam-goap.json +52 -0
- package/packages/catalog/evidence/agentsam-hooks.json +100 -0
- package/packages/catalog/evidence/agentsam-ide.json +64 -0
- package/packages/catalog/evidence/agentsam-identity.json +91 -0
- package/packages/catalog/evidence/agentsam-key-manager.json +46 -0
- package/packages/catalog/evidence/agentsam-knowledge.json +42 -0
- package/packages/catalog/evidence/agentsam-loading-scene.json +54 -0
- package/packages/catalog/evidence/agentsam-merch.json +68 -0
- package/packages/catalog/evidence/agentsam-nav.json +63 -0
- package/packages/catalog/evidence/agentsam-queue-control.json +60 -0
- package/packages/catalog/evidence/agentsam-rapid-rust.json +46 -0
- package/packages/catalog/evidence/agentsam-repository.json +56 -0
- package/packages/catalog/evidence/agentsam-scoring.json +39 -0
- package/packages/catalog/evidence/agentsam-sections.json +52 -0
- package/packages/catalog/evidence/agentsam-settings.json +58 -0
- package/packages/catalog/evidence/agentsam-shell-kit.json +56 -0
- package/packages/catalog/evidence/agentsam-vault.json +61 -0
- package/packages/catalog/evidence/agentsam-work-graph.json +51 -0
- package/packages/catalog/evidence/agentsam-work.json +64 -0
- package/packages/catalog/evidence/agentsam-workbench.json +96 -0
- package/packages/catalog/evidence/analytics-ui.json +43 -0
- package/packages/catalog/evidence/cms-runtime.json +49 -0
- package/packages/catalog/evidence/copro-editor.json +42 -0
- package/packages/catalog/evidence/copro-media.json +42 -0
- package/packages/catalog/evidence/copro-project.json +42 -0
- package/packages/catalog/evidence/copro-proof.json +48 -0
- package/packages/catalog/evidence/copro-provider-contracts.json +40 -0
- package/packages/catalog/evidence/copro-render.json +40 -0
- package/packages/catalog/evidence/copro-storage.json +44 -0
- package/packages/catalog/evidence/copro-templates.json +42 -0
- package/packages/catalog/evidence/copro-timeline.json +44 -0
- package/packages/catalog/evidence/copro-ui.json +52 -0
- package/packages/catalog/evidence/fnf-theme.json +34 -0
- package/packages/catalog/evidence/theme-contract.json +34 -0
- package/packages/catalog/evidence/theme-cypress.json +41 -0
- package/packages/catalog/evidence/theme-ember.json +41 -0
- package/packages/catalog/evidence/theme-forge.json +41 -0
- package/packages/catalog/evidence/theme-grove.json +41 -0
- package/packages/catalog/evidence/theme-harbor.json +41 -0
- package/packages/catalog/evidence/theme-heuristic.json +50 -0
- package/packages/catalog/evidence/theme-iasf.json +48 -0
- package/packages/catalog/evidence/theme-resolve.json +41 -0
- package/packages/catalog/evidence/theme-scenes.json +68 -0
- package/packages/catalog/evidence/theme-summit.json +41 -0
- package/packages/catalog/evidence/theme-violet.json +41 -0
- package/packages/catalog/generated/packages.json +2649 -0
- package/packages/catalog/topics/runtime.json +33 -0
- package/packages/connectors/cfoa/agentsam.package.json +46 -0
- package/packages/connectors/cfoa/package.json +1 -1
- package/packages/connectors/cfoa/src/capabilities.js +22 -2
- package/packages/connectors/cfoa/src/families/analytics-sql.js +44 -0
- package/packages/connectors/cfoa/src/families/basin.js +30 -0
- package/packages/connectors/cfoa/src/index.js +3 -0
- package/packages/connectors/cfoa/src/routes.js +11 -2
- package/packages/connectors/cfoa/test/analytics-sql.test.mjs +27 -0
- package/packages/connectors/cfoa/test/basin.test.mjs +30 -0
- package/packages/heuristic-theme/README.md +14 -0
- package/packages/heuristic-theme/agentsam.package.json +42 -0
- package/packages/heuristic-theme/contracts/README.md +15 -0
- package/packages/heuristic-theme/contracts/block.schema.json +33 -0
- package/packages/heuristic-theme/contracts/header-presets.json +20 -0
- package/packages/heuristic-theme/contracts/page.schema.json +18 -0
- package/packages/heuristic-theme/contracts/preset.schema.json +18 -0
- package/packages/heuristic-theme/contracts/section.schema.json +83 -0
- package/packages/heuristic-theme/package.json +13 -3
- package/packages/heuristic-theme/presets/fuel-free-time/assets.json +8 -0
- package/packages/heuristic-theme/presets/fuel-free-time/globals/shell.json +30 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/about.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/cart.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/collection.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/collections.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/community.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/home.json +92 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/order-confirmation.json +39 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/product.json +4 -0
- package/packages/heuristic-theme/presets/fuel-free-time/pages/shop.json +9 -0
- package/packages/heuristic-theme/presets/fuel-free-time/preset.json +23 -0
- package/packages/heuristic-theme/presets/fuel-free-time/tokens.json +23 -0
- package/packages/heuristic-theme/storefront/about.html +1103 -0
- package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/GENERATED-ASSETS.md +15 -0
- package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/earned-hours-hero.webp +0 -0
- package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/essentials.webp +0 -0
- package/packages/heuristic-theme/storefront/assets/presets/fuel-free-time/masters.webp +0 -0
- package/packages/heuristic-theme/storefront/cart.html +64 -0
- package/packages/heuristic-theme/storefront/collaborate.html +58 -0
- package/packages/heuristic-theme/storefront/collection.html +10 -0
- package/packages/heuristic-theme/storefront/collections.html +10 -0
- package/packages/heuristic-theme/storefront/community.html +921 -0
- package/packages/heuristic-theme/storefront/css/content-page.css +199 -0
- package/packages/heuristic-theme/storefront/css/global-footer.css +401 -0
- package/packages/heuristic-theme/storefront/css/heuristic-theme.css +81 -0
- package/packages/heuristic-theme/storefront/css/page-composer.css +76 -0
- package/packages/heuristic-theme/storefront/css/shop-hero.css +230 -0
- package/packages/heuristic-theme/storefront/css/store-cart.css +422 -0
- package/packages/heuristic-theme/storefront/css/store-collections.css +36 -0
- package/packages/heuristic-theme/storefront/css/store-pdp.css +459 -0
- package/packages/heuristic-theme/storefront/css/store-shell.css +474 -0
- package/packages/heuristic-theme/storefront/css/store-shop.css +117 -0
- package/packages/heuristic-theme/storefront/home.html +25 -0
- package/packages/heuristic-theme/storefront/js/cms-hydrate.js +395 -0
- package/packages/heuristic-theme/storefront/js/cms-structure.js +85 -0
- package/packages/heuristic-theme/storefront/js/fnf-attribution.js +98 -0
- package/packages/heuristic-theme/storefront/js/fnf-head.js +47 -0
- package/packages/heuristic-theme/storefront/js/fnf-newsletter.js +64 -0
- package/packages/heuristic-theme/storefront/js/global-footer.js +277 -0
- package/packages/heuristic-theme/storefront/js/heuristic-runtime.js +78 -0
- package/packages/heuristic-theme/storefront/js/order-confirmation.js +109 -0
- package/packages/heuristic-theme/storefront/js/page-composer.js +310 -0
- package/packages/heuristic-theme/storefront/js/shop-hero.js +85 -0
- package/packages/heuristic-theme/storefront/js/store-cart.js +276 -0
- package/packages/heuristic-theme/storefront/js/store-catalog.js +140 -0
- package/packages/heuristic-theme/storefront/js/store-collections.js +45 -0
- package/packages/heuristic-theme/storefront/js/store-product.js +287 -0
- package/packages/heuristic-theme/storefront/js/store-shell.js +449 -0
- package/packages/heuristic-theme/storefront/order-confirmation.html +30 -0
- package/packages/heuristic-theme/storefront/policies.html +43 -0
- package/packages/heuristic-theme/storefront/product.html +27 -0
- package/packages/heuristic-theme/storefront/shop.html +113 -0
- package/packages/heuristic-theme/storefront/terms.html +45 -0
- package/packages/heuristic-theme/test/commerce-portability.test.mjs +16 -0
- package/packages/heuristic-theme/theme.json +55 -0
- package/packages/heuristic-theme/theme.schema.json +32 -0
- package/packages/identity/agentsam.package.json +42 -0
- package/packages/identity/package.json +1 -1
- package/packages/identity/src/frontend/auth-portal/pages/login.html +1 -1
- package/packages/identity/src/frontend/auth-portal/pages/reset.html +1 -1
- package/packages/identity/src/frontend/auth-portal/pages/signup.html +1 -1
- package/packages/identity/src/oauth/iam-platform.js +4 -2
- package/packages/identity/src/recovery/password-reset.js +8 -8
- package/packages/identity/src/server/worker-router.js +63 -1
- package/packages/identity/tests/chatgpt-provider.test.mjs +3 -3
- package/packages/identity/tests/lane1-packed-consumer.test.mjs +12 -1
- package/packages/identity/tests/oauth-consent-view.test.mjs +11 -11
- package/packages/identity/tests/password-enrollment.test.mjs +82 -0
- package/packages/identity/tests/password-reset.test.mjs +43 -0
- package/packages/providers/completeful/README.md +3 -3
- package/packages/providers/completeful/package.json +1 -1
- package/packages/theme-cypress/README.md +11 -0
- package/packages/theme-cypress/agentsam.package.json +42 -0
- package/packages/{theme-church-site → theme-cypress}/package.json +14 -11
- package/packages/theme-cypress/prebuild.json +23 -0
- package/packages/theme-cypress/site/assets/generated/favicon.svg +7 -0
- package/packages/theme-cypress/site/assets/generated/media-044ba16613.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-0a1ea6f6d9.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-0c06778307.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-1539ed373a.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-2df479fd2d.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-2e8bd0d9bc.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-41d4e2643c.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-46205bfde8.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-50c5f3e279.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-5f1467778c.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-6703642b22.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-87a490bc8e.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-997c10ef39.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-a423735c21.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-c9cea5245b.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-cab3c84c60.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-ce06595d59.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-d268905e7e.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-f6711b5053.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/media-manifest.json +226 -0
- package/packages/theme-cypress/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-cypress/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-cypress/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-cypress/site/assets/generated/theme-mark.svg +7 -0
- package/packages/theme-cypress/site/beliefs.html +175 -0
- package/packages/theme-cypress/site/community.html +175 -0
- package/packages/theme-cypress/site/connect.html +319 -0
- package/packages/theme-cypress/site/donate.html +106 -0
- package/packages/theme-cypress/site/groups.html +1352 -0
- package/packages/theme-cypress/site/help.html +1 -0
- package/packages/theme-cypress/site/icons/clock.svg +4 -0
- package/packages/theme-cypress/site/icons/email.svg +4 -0
- package/packages/theme-cypress/site/icons/giving.svg +4 -0
- package/packages/theme-cypress/site/icons/home.svg +4 -0
- package/packages/theme-cypress/site/icons/location.svg +4 -0
- package/packages/theme-cypress/site/icons/media.svg +4 -0
- package/packages/theme-cypress/site/icons/ministries.svg +6 -0
- package/packages/theme-cypress/site/icons/prayer.svg +5 -0
- package/packages/theme-cypress/site/icons/visit.svg +6 -0
- package/packages/theme-cypress/site/index.html +1013 -0
- package/packages/theme-cypress/site/mensgroup.html +477 -0
- package/packages/theme-cypress/site/mission.html +512 -0
- package/packages/theme-cypress/site/unified-footer.css +172 -0
- package/packages/theme-cypress/site/unified-footer.js +175 -0
- package/packages/theme-cypress/site/unified-header.css +226 -0
- package/packages/theme-cypress/site/unified-header.js +111 -0
- package/packages/theme-cypress/site/womansgroup.html +452 -0
- package/packages/{theme-church-site → theme-cypress}/src/index.js +22 -35
- package/packages/theme-cypress/src/node.js +69 -0
- package/packages/theme-cypress/test/theme.test.mjs +47 -0
- package/packages/theme-ember/README.md +11 -0
- package/packages/theme-ember/agentsam.package.json +42 -0
- package/packages/{theme-fuelnfree-site → theme-ember}/package.json +14 -11
- package/packages/theme-ember/prebuild.json +23 -0
- package/packages/theme-ember/site/about.html +1840 -0
- package/packages/theme-ember/site/assets/generated/favicon.svg +7 -0
- package/packages/theme-ember/site/assets/generated/media-1e0b1e6ee6.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-2371dcb426.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-2db4f5ff9e.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-4ed07a756e.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-58182cf167.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-5b8b8472ae.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-71f4bd16a1.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-7c1c8120bc.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-832b176433.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-931439701c.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-c2860d40d1.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-c56974d198.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-cb83a44ff4.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-df02ccdfcf.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-fab72cd344.webp +0 -0
- package/packages/theme-ember/site/assets/generated/media-manifest.json +190 -0
- package/packages/theme-ember/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-ember/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-ember/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-ember/site/assets/generated/theme-mark.svg +7 -0
- package/packages/theme-ember/site/community.html +1664 -0
- package/packages/theme-ember/site/index.html +2044 -0
- package/packages/theme-ember/site/shop.html +2104 -0
- package/packages/{theme-fuelnfree-site → theme-ember}/src/index.js +23 -33
- package/packages/theme-ember/src/node.js +69 -0
- package/packages/theme-ember/test/theme.test.mjs +47 -0
- package/packages/theme-forge/README.md +11 -0
- package/packages/theme-forge/agentsam.package.json +42 -0
- package/packages/theme-forge/package.json +44 -0
- package/packages/theme-forge/prebuild.json +23 -0
- package/packages/theme-forge/site/apple-touch-icon.png +0 -0
- package/packages/theme-forge/site/assets/generated/favicon.svg +7 -0
- package/packages/theme-forge/site/assets/generated/media-manifest.json +17 -0
- package/packages/theme-forge/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-forge/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-forge/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-forge/site/assets/generated/theme-mark.svg +7 -0
- package/packages/theme-forge/site/assets/index-DBOqQVsA.css +1 -0
- package/packages/theme-forge/site/assets/index-pXC0o9jp.js +241 -0
- package/packages/theme-forge/site/assets/workbox-window.prod.es5-Bd17z0YL.js +2 -0
- package/packages/theme-forge/site/index.html +5 -0
- package/packages/theme-forge/site/manifest.webmanifest +1 -0
- package/packages/theme-forge/site/pwa-192x192.png +0 -0
- package/packages/theme-forge/site/pwa-512x512.png +0 -0
- package/packages/theme-forge/site/sw.js +107 -0
- package/packages/theme-forge/site/workbox-7e5eb42b.js +3395 -0
- package/packages/theme-forge/src/index.js +76 -0
- package/packages/theme-forge/src/node.js +69 -0
- package/packages/theme-forge/test/theme.test.mjs +47 -0
- package/packages/theme-grove/README.md +11 -0
- package/packages/theme-grove/agentsam.package.json +42 -0
- package/packages/{theme-floors-site → theme-grove}/package.json +14 -11
- package/packages/theme-grove/prebuild.json +23 -0
- package/packages/theme-grove/site/assets/generated/favicon.svg +7 -0
- package/packages/theme-grove/site/assets/generated/media-098b13d75a.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-0c064db1aa.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-0fbfef655e.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-14759c7460.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-19b23d2a8f.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-2012f04243.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-23b8c5e2bb.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-2bffb1a6ef.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-2e1523a5b0.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-31107c21f2.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-31373ec865.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-45e8e27542.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-4aa9846fe7.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-5476b24219.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-7a227d3e4b.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-b183eed550.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-b2c650f9ab.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-b5d7471694.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-c86498fdb4.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-ce2cfff9a1.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-cf41a5f324.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-ec6c01bf8d.webp +0 -0
- package/packages/theme-grove/site/assets/generated/media-manifest.json +267 -0
- package/packages/theme-grove/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-grove/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-grove/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-grove/site/assets/generated/theme-mark.svg +7 -0
- package/packages/theme-grove/site/index.html +1429 -0
- package/packages/theme-grove/site/pages/contact.html +664 -0
- package/packages/theme-grove/site/pages/gallery.html +216 -0
- package/packages/theme-grove/site/pages/privacy.html +180 -0
- package/packages/theme-grove/site/pages/process.html +592 -0
- package/packages/theme-grove/site/pages/services.html +567 -0
- package/packages/theme-grove/site/pages/terms.html +189 -0
- package/packages/theme-grove/site/shared/footer.css +140 -0
- package/packages/theme-grove/site/shared/footer.html +41 -0
- package/packages/{theme-floors-site → theme-grove}/src/index.js +24 -35
- package/packages/theme-grove/src/node.js +69 -0
- package/packages/theme-grove/test/theme.test.mjs +47 -0
- package/packages/theme-harbor/README.md +11 -0
- package/packages/theme-harbor/agentsam.package.json +42 -0
- package/packages/{theme-insurance-site → theme-harbor}/package.json +14 -11
- package/packages/theme-harbor/prebuild.json +23 -0
- package/packages/theme-harbor/site/assets/generated/favicon.svg +7 -0
- package/packages/theme-harbor/site/assets/generated/media-manifest.json +17 -0
- package/packages/theme-harbor/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-harbor/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-harbor/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-harbor/site/assets/generated/theme-mark.svg +7 -0
- package/packages/theme-harbor/site/assets/index-D58RKkr-.js +239 -0
- package/packages/theme-harbor/site/assets/index-Dd3YN9Mf.css +1 -0
- package/packages/theme-harbor/site/index.html +15 -0
- package/packages/theme-harbor/src/index.js +76 -0
- package/packages/theme-harbor/src/node.js +69 -0
- package/packages/theme-harbor/test/theme.test.mjs +47 -0
- package/packages/theme-resolve/README.md +11 -0
- package/packages/theme-resolve/agentsam.package.json +42 -0
- package/packages/theme-resolve/package.json +44 -0
- package/packages/theme-resolve/prebuild.json +23 -0
- package/packages/theme-resolve/site/assets/generated/favicon.svg +7 -0
- package/packages/theme-resolve/site/assets/generated/media-216610d365.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-2a9e0f623f.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-a70660bfa9.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-bc1322e813.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-ced60fcecc.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/media-manifest.json +72 -0
- package/packages/theme-resolve/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-resolve/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-resolve/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-resolve/site/assets/generated/theme-mark.svg +7 -0
- package/packages/theme-resolve/site/assets/index-BSaLpPG1.css +2 -0
- package/packages/theme-resolve/site/assets/index-D8au46Z5.js +17 -0
- package/packages/theme-resolve/site/index.html +22 -0
- package/packages/theme-resolve/src/index.js +69 -0
- package/packages/theme-resolve/src/node.js +69 -0
- package/packages/theme-resolve/test/theme.test.mjs +47 -0
- package/packages/theme-scenes/agentsam.package.json +42 -0
- package/packages/theme-scenes/package.json +1 -1
- package/packages/theme-scenes/src/registry.js +32 -49
- package/packages/theme-summit/README.md +11 -0
- package/packages/theme-summit/agentsam.package.json +42 -0
- package/packages/{theme-shinshu-site → theme-summit}/package.json +14 -11
- package/packages/theme-summit/prebuild.json +23 -0
- package/packages/theme-summit/site/adventures.html +450 -0
- package/packages/theme-summit/site/assets/generated/favicon.svg +7 -0
- package/packages/theme-summit/site/assets/generated/media-1e958ea679.webp +0 -0
- package/packages/theme-summit/site/assets/generated/media-9d4521abba.webp +0 -0
- package/packages/theme-summit/site/assets/generated/media-manifest.json +39 -0
- package/packages/theme-summit/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-summit/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-summit/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-summit/site/assets/generated/theme-mark.svg +7 -0
- package/packages/theme-summit/site/business-card.html +315 -0
- package/packages/theme-summit/site/chatbot.js +312 -0
- package/packages/theme-summit/site/gallery.html +524 -0
- package/packages/theme-summit/site/i18n.js +947 -0
- package/packages/theme-summit/site/icons.svg +87 -0
- package/packages/theme-summit/site/index.html +2415 -0
- package/packages/theme-summit/site/pages/about.html +100 -0
- package/packages/theme-summit/site/pages/contact.html +117 -0
- package/packages/theme-summit/site/pages/dashboard.html +111 -0
- package/packages/theme-summit/site/pages/index.html +129 -0
- package/packages/theme-summit/site/pages/services.html +125 -0
- package/packages/theme-summit/site/shared/footer.html +41 -0
- package/packages/theme-summit/site/shared/layout.js +315 -0
- package/packages/theme-summit/site/shared/nav.html +19 -0
- package/packages/theme-summit/site/shared/styles.css +696 -0
- package/packages/theme-summit/site/theme-styles.css +131 -0
- package/packages/theme-summit/site/themes.js +442 -0
- package/packages/{theme-shinshu-site → theme-summit}/src/index.js +23 -35
- package/packages/theme-summit/src/node.js +69 -0
- package/packages/theme-summit/test/theme.test.mjs +47 -0
- package/packages/theme-violet/README.md +11 -0
- package/packages/theme-violet/agentsam.package.json +42 -0
- package/packages/{theme-companions-site → theme-violet}/package.json +14 -11
- package/packages/theme-violet/prebuild.json +23 -0
- package/packages/theme-violet/site/assets/generated/favicon.svg +7 -0
- package/packages/theme-violet/site/assets/generated/media-07b46d6457.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-09d38ddffc.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-254b0e2ad3.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-3a1b5c0a8d.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-3a78eb7d9d.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-49076977d8.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-6342d50dbd.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-646c65381e.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-7a5fb7c91a.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-9bbd133220.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-9e73307c2a.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-af382146a0.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-b2ae348b43.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-b8f43a3887.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-c96a3e1979.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-cd07daa54a.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-e03ab6b5fe.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-eae4917d25.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-f227ec5690.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-fb57ffd474.webp +0 -0
- package/packages/theme-violet/site/assets/generated/media-manifest.json +245 -0
- package/packages/theme-violet/site/assets/generated/social-card.webp +0 -0
- package/packages/theme-violet/site/assets/generated/theme-mark-192.png +0 -0
- package/packages/theme-violet/site/assets/generated/theme-mark-512.png +0 -0
- package/packages/theme-violet/site/assets/generated/theme-mark.svg +7 -0
- package/packages/theme-violet/site/global/cpas-contact.css +405 -0
- package/packages/theme-violet/site/global/cpas-donate-v2.css +931 -0
- package/packages/theme-violet/site/global/cpas-drawer-override.css +1 -0
- package/packages/theme-violet/site/global/cpas-footer.html +38 -0
- package/packages/theme-violet/site/global/cpas-header.html +30 -0
- package/packages/theme-violet/site/global/cpas-hero-watercolor.css +275 -0
- package/packages/theme-violet/site/global/cpas-modals.js +802 -0
- package/packages/theme-violet/site/global/cpas-public-surface.css +982 -0
- package/packages/theme-violet/site/global/cpas-shell.css +3980 -0
- package/packages/theme-violet/site/global/cpas-shell.js +107 -0
- package/packages/theme-violet/site/global/cpas-shelter-hub.css +326 -0
- package/packages/theme-violet/site/index.html +141 -0
- package/packages/theme-violet/site/pages/about/campaigns.html +28 -0
- package/packages/theme-violet/site/pages/about/cta.html +25 -0
- package/packages/theme-violet/site/pages/about/hero.html +46 -0
- package/packages/theme-violet/site/pages/about/paths.html +24 -0
- package/packages/theme-violet/site/pages/about/why_we_exist.html +28 -0
- package/packages/theme-violet/site/pages/home/campaigns.html +67 -0
- package/packages/theme-violet/site/pages/home/hero.html +42 -0
- package/packages/theme-violet/site/pages/home/how-it-helps.html +32 -0
- package/packages/theme-violet/site/pages/home/impact-stats.html +31 -0
- package/packages/theme-violet/site/pages/home/mission.html +36 -0
- package/packages/theme-violet/site/pages/home/newsletter.html +29 -0
- package/packages/theme-violet/site/pages/home/transport-win.html +22 -0
- package/packages/theme-violet/site/pages/index.html +141 -0
- package/packages/theme-violet/src/index.js +76 -0
- package/packages/theme-violet/src/node.js +69 -0
- package/packages/theme-violet/test/theme.test.mjs +47 -0
- package/packages/work-graph/agentsam.package.json +42 -0
- package/packages/work-graph/package.json +1 -1
- package/protocol/apps/agentsam.app.v1.schema.json +27 -1
- package/protocol/cad/README.md +77 -0
- package/protocol/cad/cad.project.v2.schema.json +451 -0
- package/protocol/cad/v2/core/artifact-receipt.schema.json +126 -0
- package/protocol/cad/v2/core/coordinate-system.schema.json +364 -0
- package/protocol/cad/v2/core/geometry-constraint.schema.json +136 -0
- package/protocol/cad/v2/core/geometry-entity.schema.json +73 -0
- package/protocol/cad/v2/core/geometry-feature.schema.json +115 -0
- package/protocol/cad/v2/core/geometry-relationship.schema.json +67 -0
- package/protocol/cad/v2/core/project-revision.schema.json +111 -0
- package/protocol/cad/v2/core/topology-reference.schema.json +80 -0
- package/protocol/cad/v2/intent/design-decision.schema.json +126 -0
- package/protocol/cad/v2/intent/design-option.schema.json +88 -0
- package/protocol/cad/v2/interchange/ifc-mapping.schema.json +145 -0
- package/protocol/cad/v2/interchange/native-document.schema.json +130 -0
- package/protocol/cad/v2/interchange/reference-model.schema.json +141 -0
- package/protocol/cad/v2/modules/architecture.v1.schema.json +278 -0
- package/protocol/cad/v2/modules/landscape.v1.schema.json +157 -0
- package/protocol/cad/v2/modules/mechanical.v1.schema.json +325 -0
- package/protocol/cad/v2/modules/parametric.v1.schema.json +89 -0
- package/protocol/cad/v2/modules/product-design.v1.schema.json +178 -0
- package/protocol/cad/v2/modules/robotics.v1.schema.json +246 -0
- package/protocol/cad/v2/presentation/camera-path.schema.json +143 -0
- package/protocol/cad/v2/presentation/drawing.schema.json +162 -0
- package/protocol/cad/v2/presentation/production.schema.json +166 -0
- package/protocol/cad/v2/presentation/scene.schema.json +198 -0
- package/protocol/cad/v2/presentation/sheet.schema.json +254 -0
- package/protocol/cad/v2/presentation/view.schema.json +190 -0
- package/protocol/cad/v2/presentation/walkthrough.schema.json +199 -0
- package/protocol/cad/v2/schema-pack.manifest.json +189 -0
- package/protocol/cad/v2/validation/deliverable-manifest.schema.json +199 -0
- package/protocol/cad/v2/validation/result.schema.json +141 -0
- package/protocol/capabilities/evidence-manifest.schema.json +404 -0
- package/protocol/capabilities/manifest.json +101 -10
- package/protocol/capabilities/repository-crawl-input.schema.json +17 -0
- package/protocol/capabilities/repository-crawl-result.schema.json +79 -0
- package/protocol/capabilities/repository-mine-input.schema.json +27 -0
- package/protocol/capabilities/repository-mine-result.schema.json +51 -0
- package/protocol/capabilities/site-index.schema.json +15 -0
- package/protocol/capabilities/site-scrape-evidence-manifest.schema.json +114 -0
- package/protocol/capabilities/site-scrape-input.schema.json +90 -0
- package/protocol/capabilities/site-scrape-project-authority.schema.json +15 -0
- package/protocol/capabilities/site-scrape-result.schema.json +198 -0
- package/protocol/capabilities/site-scrape-worker-job.schema.json +18 -0
- package/protocol/errors/error-catalog.json +12 -0
- package/protocol/features/README.md +1 -1
- package/protocol/features/catalog.json +12 -12
- package/protocol/features/examples/provider-resend.feature.json +2 -2
- package/protocol/governance/distribution-roadmap.v1.json +335 -0
- package/protocol/governance/github-labels.v1.json +232 -0
- package/protocol/models/workers-ai-curated.mjs +14 -0
- package/protocol/plugins/agentsam.plugin-evidence-bundle.v1.schema.json +55 -0
- package/protocol/plugins/agentsam.plugin-product.v1.schema.json +227 -0
- package/protocol/plugins/agentsam.plugin-quality-evidence.v1.schema.json +47 -0
- package/protocol/plugins/agentsam.plugin-quality-receipt.v1.schema.json +160 -0
- package/protocol/presets/catalog.json +1 -1
- package/protocol/theme-refinery/prebuild-registry.json +45 -0
- package/protocol/theme-refinery/product-metadata.schema.json +63 -26
- package/protocol/theme-refinery/receipts/prebuild-remaster-20261004.json +21 -0
- package/protocol/ui/agentsam.ui-quality.v1.schema.json +31 -0
- package/python/agentsam_sdk/__init__.py +4 -0
- package/python/agentsam_sdk/client.py +202 -0
- package/python/agentsam_sdk/errors/vocabulary.py +10 -0
- package/python/tests/test_public_client.py +82 -0
- package/services/cad/blender/adapter.py +0 -0
- package/services/cad/occt/CMakeLists.txt +43 -0
- package/services/cad/occt/README.md +38 -0
- package/services/cad/occt/main.cpp +95 -0
- package/services/cad/server.py +103 -21
- package/skills/README.md +6 -0
- package/skills/agentsam-cad/SKILL.md +59 -0
- package/skills/agentsam-plan-and-goap/SKILL.md +77 -0
- package/skills/agentsam-repo-recon/SKILL.md +63 -0
- package/skills/agentsam-sam-operations/SKILL.md +71 -0
- package/skills/agentsam-sdk-orientation/SKILL.md +75 -0
- package/skills/catalog.json +85 -0
- package/src/AgentSam.js +2 -0
- package/src/agent/capability-adapter.js +207 -9
- package/src/agent/index.js +1 -0
- package/src/agent/intent.js +12 -0
- package/src/agent/project-discovery.js +47 -0
- package/src/agent/project-resources.js +157 -0
- package/src/agent/responses-runner.js +64 -12
- package/src/capabilities/cloudflare-d1-provision.js +48 -0
- package/src/capabilities/knowledge-operations.js +87 -0
- package/src/capabilities/local-sqlite-resources.js +124 -0
- package/src/capabilities/machine-inspect.js +28 -0
- package/src/capabilities/mcp-d1-bridge.js +98 -0
- package/src/capabilities/plan-operation-ids.js +6 -0
- package/src/capabilities/plan-operations.js +85 -0
- package/src/capabilities/repository-awareness.js +52 -0
- package/src/capabilities/test-run.js +10 -0
- package/src/capabilities/workspace-files.js +125 -0
- package/src/cli/command-catalog.js +16 -3
- package/src/cli.js +71 -116
- package/src/commands/app.js +43 -44
- package/src/commands/autorag-node-api.js +96 -0
- package/src/commands/autorag.js +178 -17
- package/src/commands/catalog-doctor.js +52 -0
- package/src/commands/catalog.js +151 -0
- package/src/commands/cheat-sheet.js +92 -63
- package/src/commands/cloudflare.js +64 -2
- package/src/commands/codebaseindex.js +2 -2
- package/src/commands/db.js +17 -0
- package/src/commands/goap-world.js +4 -0
- package/src/commands/interactive.js +21 -1
- package/src/commands/knowledge.js +8 -3
- package/src/commands/machine-binary.js +3 -2
- package/src/commands/machine.js +66 -15
- package/src/commands/mcp.js +98 -8
- package/src/commands/plan-ledger.js +60 -22
- package/src/commands/plan.js +3 -3
- package/src/commands/plugins.js +34 -2
- package/src/commands/product.js +21 -0
- package/src/commands/rust.js +4 -1
- package/src/commands/sam-evidence.js +87 -0
- package/src/commands/sam-media.js +78 -0
- package/src/commands/sam.js +117 -0
- package/src/commands/shell.js +97 -8
- package/src/commands/site-scrape.js +9 -0
- package/src/context/resolve.js +5 -1
- package/src/index.js +13 -0
- package/src/knowledge/d1-schema.js +65 -0
- package/src/knowledge/engine.js +55 -15
- package/src/knowledge/source.js +8 -0
- package/src/knowledge/store-discovery.js +9 -3
- package/src/knowledge/stores/sqlite.js +8 -0
- package/src/knowledge/wrangler-binding-discovery.js +43 -0
- package/src/lib/agent-instructions.js +29 -5
- package/src/lib/auth.js +46 -7
- package/src/lib/cad/delivery-profiles.d.ts +7 -0
- package/src/lib/cad/delivery-profiles.js +122 -0
- package/src/lib/cad/docker-executor.js +1 -1
- package/src/lib/cad/editable-project-contract.js +75 -0
- package/src/lib/cad/index.js +6 -0
- package/src/lib/cad/occt-native-provider.mjs +138 -0
- package/src/lib/cad/openscad.js +13 -1
- package/src/lib/cad/production-operations.d.ts +8 -0
- package/src/lib/cad/production-operations.js +74 -0
- package/src/lib/cad/project-cli.d.ts +1 -1
- package/src/lib/cad/project-contract.js +1 -1
- package/src/lib/cad/project-runtime.d.ts +1 -1
- package/src/lib/cad/project-runtime.js +48 -3
- package/src/lib/cad/project-tools.js +24 -0
- package/src/lib/cad/project-v2.d.ts +48 -0
- package/src/lib/cad/project-v2.js +288 -0
- package/src/lib/cad-docker.js +48 -4
- package/src/lib/dockerize.js +3 -3
- package/src/lib/execution-approvals.js +29 -3
- package/src/local-fs/capability.js +5 -0
- package/src/local-lsp/host.js +2 -0
- package/src/local-pty/server.js +21 -0
- package/src/mcp/client.js +2 -1
- package/src/mcp/oauth-connection.js +109 -0
- package/src/models/inventory-core.js +2 -10
- package/src/plugins/completeful.js +2 -2
- package/src/plugins/index.js +13 -0
- package/src/plugins/productization.js +348 -0
- package/src/providers/gemini-generate-content.js +18 -0
- package/src/registry/generated/inventory.json +4266 -0
- package/src/registry/index.js +96 -0
- package/src/registry/turn-one.js +45 -0
- package/src/sam/adapters/local-media-store.js +71 -0
- package/src/sam/adapters/local-script-runtime.js +122 -0
- package/src/sam/adapters/local-script-store.js +103 -0
- package/src/sam/adapters/object-media-store.js +89 -0
- package/src/sam/adapters/workspace-media.js +78 -0
- package/src/sam/artifacts/render.js +94 -0
- package/src/sam/bridge/stdio.mjs +59 -0
- package/src/sam/client.js +269 -22
- package/src/sam/index.js +30 -1
- package/src/sam/local-execution.js +8 -0
- package/src/sam/media/environment.js +96 -0
- package/src/sam/model-adapter.js +45 -0
- package/src/sam/operation-packs/generated-v2/background.js +54 -0
- package/src/sam/operation-packs/generated-v2/catalog.js +1746 -0
- package/src/sam/operation-packs/generated-v2/generated-execution-policies.json +401 -0
- package/src/sam/operation-packs/generated-v2/generated-tool-descriptors.json +1352 -0
- package/src/sam/operation-packs/generated-v2/glb.js +41 -0
- package/src/sam/operation-packs/generated-v2/inneranimalmedia-provider.js +24 -0
- package/src/sam/operation-packs/generated-v2/operation-pack.js +126 -0
- package/src/sam/operation-packs/generated-v2/raster.js +140 -0
- package/src/sam/operation-packs/generated-v2/scripts.js +63 -0
- package/src/sam/operation-packs/generated-v2/sdk-adapter.js +9 -0
- package/src/sam/operation-packs/generated-v2/test/alias-runtime.test.mjs +51 -0
- package/src/sam/operation-packs/generated-v2/test/background.test.mjs +19 -0
- package/src/sam/operation-packs/generated-v2/test/glb.test.mjs +19 -0
- package/src/sam/operation-packs/generated-v2/test/raster.test.mjs +38 -0
- package/src/sam/operation-packs/generated-v2/test/real-asset-bindings.test.mjs +74 -0
- package/src/sam/operation-packs/generated-v2/test/registration.test.mjs +65 -0
- package/src/sam/operation-packs/generated-v2/test/scripts.test.mjs +32 -0
- package/src/sam/operation-packs/generated-v2/test/superbash-client-integration.test.mjs +215 -0
- package/src/sam/operation-packs/generated-v2/tool-types.d.ts +53 -0
- package/src/sam/operations/artifact-render.js +13 -0
- package/src/sam/operations/repository-inspect.js +12 -2
- package/src/sam/operations/robotics.js +45 -0
- package/src/sam/os.js +117 -0
- package/src/sam/packs/authoring/README.md +13 -0
- package/src/sam/packs/authoring/index.js +108 -0
- package/src/sam/packs/cad/http-ports.js +55 -0
- package/src/sam/packs/cad/index.js +158 -0
- package/src/sam/packs/cad/model-tools.js +22 -0
- package/src/sam/packs/cad/modes.js +87 -0
- package/src/sam/packs/cms/aliases.js +1 -0
- package/src/sam/packs/cms/contracts.js +1 -0
- package/src/sam/packs/cms/machine.js +6 -0
- package/src/sam/packs/cms/node.js +1 -0
- package/src/sam/packs/core.js +27 -0
- package/src/sam/packs/evidence/README.md +65 -0
- package/src/sam/packs/evidence/compare.js +98 -0
- package/src/sam/packs/evidence/contract.js +56 -0
- package/src/sam/packs/evidence/derive.js +59 -0
- package/src/sam/packs/evidence/driver-blender.js +96 -0
- package/src/sam/packs/evidence/driver-playwright.js +91 -0
- package/src/sam/packs/evidence/exporter-copro.js +70 -0
- package/src/sam/packs/evidence/facts.js +37 -0
- package/src/sam/packs/evidence/host-local.js +74 -0
- package/src/sam/packs/evidence/index.js +494 -0
- package/src/sam/packs/evidence/media.js +44 -0
- package/src/sam/packs/evidence/naming.js +67 -0
- package/src/sam/packs/evidence/normalize.js +117 -0
- package/src/sam/packs/evidence/review-page.js +102 -0
- package/src/sam/packs/evidence/screenplay.js +34 -0
- package/src/sam/packs/evidence/seal.js +55 -0
- package/src/sam/packs/evidence/serve.js +74 -0
- package/src/sam/packs/evidence/store.js +93 -0
- package/src/sam/packs/evidence/viewports.js +23 -0
- package/src/sam/robotics/chess-adapter.js +14 -0
- package/src/sam/robotics/franka.js +44 -0
- package/src/sam/robotics/index.js +4 -0
- package/src/sam/robotics/receipt.js +21 -0
- package/src/sam/robotics/world.js +57 -0
- package/src/sam/seed.js +10 -40
- package/src/sam/shell-host.js +120 -0
- package/src/sam/validation.js +40 -0
- package/src/security/local-vault.js +6 -1
- package/src/ui/cli/help.js +6 -0
- package/templates/clay/clay-blueprint-template.html +481 -0
- package/templates/clay/clay-case-study-blueprint.html +269 -0
- package/templates/clay/conversion-showcase-section.html +534 -0
- package/templates/clay/enhancing-conversion-section.html +141 -0
- package/templates/clay/nuant-wireframe.html +117 -0
- package/packages/theme-church-site/README.md +0 -10
- package/packages/theme-church-site/src/harvest.json +0 -16
- package/packages/theme-church-site/test/theme.test.mjs +0 -21
- package/packages/theme-companions-site/README.md +0 -10
- package/packages/theme-companions-site/src/harvest.json +0 -14
- package/packages/theme-companions-site/src/index.js +0 -87
- package/packages/theme-companions-site/test/theme.test.mjs +0 -21
- package/packages/theme-floors-site/README.md +0 -10
- package/packages/theme-floors-site/src/harvest.json +0 -16
- package/packages/theme-floors-site/test/theme.test.mjs +0 -21
- package/packages/theme-fuelnfree-site/README.md +0 -10
- package/packages/theme-fuelnfree-site/src/harvest.json +0 -15
- package/packages/theme-fuelnfree-site/test/theme.test.mjs +0 -21
- package/packages/theme-handyman-site/README.md +0 -10
- package/packages/theme-handyman-site/package.json +0 -41
- package/packages/theme-handyman-site/src/harvest.json +0 -12
- package/packages/theme-handyman-site/src/index.js +0 -88
- package/packages/theme-handyman-site/test/theme.test.mjs +0 -21
- package/packages/theme-insurance-site/README.md +0 -10
- package/packages/theme-insurance-site/src/harvest.json +0 -12
- package/packages/theme-insurance-site/src/index.js +0 -88
- package/packages/theme-insurance-site/test/theme.test.mjs +0 -21
- package/packages/theme-shinshu-site/README.md +0 -10
- package/packages/theme-shinshu-site/src/harvest.json +0 -14
- package/packages/theme-shinshu-site/test/theme.test.mjs +0 -21
- package/protocol/theme-refinery/lineage-registry.json +0 -105
- package/protocol/theme-refinery/receipts/products-registry-batch-20260924.json +0 -318
- package/protocol/theme-refinery/receipts/theme-harvest-20260924.json +0 -472
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { createBackendRegistry } from '../../packages/agentsam-knowledge/src/backends/index.js';
|
|
2
|
+
import { fingerprint, scopeKey } from '../knowledge/config.js';
|
|
3
|
+
|
|
4
|
+
function endpointFor(opts, config, env) {
|
|
5
|
+
return opts.resource || config?.lane?.resource || env.AGENTSAM_NODE_API_URL || (env.SUPABASE_PROJECT_REF ? `https://${env.SUPABASE_PROJECT_REF}.supabase.co/functions/v1/node-api` : '');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Studio session IDs are not IAM CLI OAuth access tokens. Only a host-resolved
|
|
10
|
+
* native Studio session can authorize this server-side bridge; never load the
|
|
11
|
+
* unrelated ~/.agentsam/auth/session.json access token as a substitute.
|
|
12
|
+
*/
|
|
13
|
+
export async function sessionGatewayAuth(endpoint, opts = {}, env = process.env) {
|
|
14
|
+
if (!opts['session-auth']) return {};
|
|
15
|
+
const origin = new URL(endpoint).origin;
|
|
16
|
+
const trusted = String(opts['trusted-origin'] || '').trim();
|
|
17
|
+
if (!trusted || new URL(trusted).origin !== origin || new URL(trusted).origin !== trusted.replace(/\/$/, '')) throw new Error('node_api_session_gateway_trusted_origin_required');
|
|
18
|
+
const studioSession = String(env.AGENTSAM_STUDIO_SESSION_TOKEN || '').trim();
|
|
19
|
+
if (!studioSession) throw new Error('node_api_studio_session_required: host must inject a native Studio session, not a CLI OAuth access token');
|
|
20
|
+
return { authenticatedDiscovery: true, getAuthHeaders: ({ paid }) => ({
|
|
21
|
+
Authorization: `Bearer ${studioSession}`,
|
|
22
|
+
...(paid ? { 'x-agentsam-paid-approved': 'true' } : {}),
|
|
23
|
+
}) };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** No private bridge key belongs in .agentsam/knowledge.json or a browser bundle. */
|
|
27
|
+
export async function runNodeApiRemote({ opts = {}, config, root, openStore, env = process.env, fetchImpl } = {}) {
|
|
28
|
+
const endpoint = endpointFor(opts, config, env);
|
|
29
|
+
const backend = createBackendRegistry().get('supabase_pgvector');
|
|
30
|
+
const client = backend.connect({ endpoint, bridgeKey: env.AGENTSAM_BRIDGE_KEY, principal: opts['account-id'], fetchImpl, ...await sessionGatewayAuth(endpoint, opts, env) });
|
|
31
|
+
const [health, capabilities] = await Promise.all([client.health(), client.capabilities()]);
|
|
32
|
+
const remoteEmbedding = capabilities.embedding;
|
|
33
|
+
if (!health.ok || !remoteEmbedding?.default_model || !Number.isInteger(remoteEmbedding?.default_dimensions)) throw new Error('node_api_remote_capabilities_unavailable');
|
|
34
|
+
const configured = Boolean(config && config.lane?.backend === 'supabase_pgvector' && config.embedding?.model === remoteEmbedding.default_model && config.embedding?.dimensions === remoteEmbedding.default_dimensions);
|
|
35
|
+
const summary = {
|
|
36
|
+
endpoint: client.endpoint, backend: 'supabase_pgvector', edge_version: health.version,
|
|
37
|
+
embedding: { model: remoteEmbedding.default_model, dimensions: remoteEmbedding.default_dimensions },
|
|
38
|
+
accessible: true, configured, authorization: opts['session-auth'] ? 'host_oauth_session' : env.AGENTSAM_BRIDGE_KEY ? 'server_bridge_key' : 'authorized_host_required',
|
|
39
|
+
};
|
|
40
|
+
if (!opts.query && !opts.publish) {
|
|
41
|
+
let connected = false;
|
|
42
|
+
if (env.AGENTSAM_BRIDGE_KEY || opts['session-auth']) {
|
|
43
|
+
try { await client.status('codebase'); connected = true; } catch { connected = false; }
|
|
44
|
+
}
|
|
45
|
+
return { ...summary, connected, ready: false, indexed_generation_verified: false,
|
|
46
|
+
note: 'Endpoint and authorization checks cannot establish corpus generation readiness. A scoped query after verified ingest is required.' };
|
|
47
|
+
}
|
|
48
|
+
if (!config || config.lane?.backend !== 'supabase_pgvector') throw new Error('node_api_remote_profile_required');
|
|
49
|
+
if (config.embedding?.model !== remoteEmbedding.default_model || config.embedding?.dimensions !== remoteEmbedding.default_dimensions) throw new Error('node_api_remote_embedding_profile_mismatch');
|
|
50
|
+
if (!opts['allow-paid']) throw new Error('node_api_paid_embedding_requires_allow_paid');
|
|
51
|
+
const accountId = opts['account-id'] || env.AGENTSAM_ACCOUNT_ID;
|
|
52
|
+
const repositoryId = opts['repository-id'] || config.repository_id;
|
|
53
|
+
if (!accountId) throw new Error('node_api_account_required');
|
|
54
|
+
if (opts.query && opts.publish) throw new Error('node_api_choose_query_or_publish');
|
|
55
|
+
const corpus = opts.corpus || 'codebase';
|
|
56
|
+
if (opts.query) {
|
|
57
|
+
const filters = corpus === 'documents' ? { source_type: `repository:${repositoryId}` } : {};
|
|
58
|
+
const result = await backend.queryText(opts.query, { accountId, repositoryId, corpus, ...filters }, { nodeApiClient: client });
|
|
59
|
+
return { ...summary, ok: true, account_scoped: true, repository: repositoryId, corpus: result.corpus, result_count: result.result_count, results: result.results };
|
|
60
|
+
}
|
|
61
|
+
if (!['codebase', 'documents'].includes(corpus)) throw new Error('node_api_ingest_corpus_unsupported');
|
|
62
|
+
if (typeof openStore !== 'function') throw new Error('node_api_generation_store_required');
|
|
63
|
+
const store = await openStore(root, config, true);
|
|
64
|
+
let generation;
|
|
65
|
+
try { generation = await store?.active(scopeKey(config)); }
|
|
66
|
+
finally { await store?.close(); }
|
|
67
|
+
if (!generation) throw new Error('node_api_local_generation_missing: run agentsam index run first');
|
|
68
|
+
if (fingerprint([generation.config?.scope, generation.config?.chunking]) !== fingerprint([config.scope, config.chunking])) throw new Error('knowledge_generation_config_mismatch: index current selected sources first');
|
|
69
|
+
const items = generation.chunks.map(chunk => {
|
|
70
|
+
const metadata = { repository_id: repositoryId, ordinal: chunk.ordinal, content_hash: chunk.content_hash,
|
|
71
|
+
source_hash: generation.source_hash, git_commit: generation.git?.commit || null };
|
|
72
|
+
return corpus === 'documents'
|
|
73
|
+
? { id: chunk.id, content: chunk.content, title: chunk.path, source_type: `repository:${repositoryId}`,
|
|
74
|
+
source_path: chunk.path, chunk_index: chunk.ordinal, chunk_type: 'section', metadata }
|
|
75
|
+
: { id: chunk.id, repository_id: repositoryId, file_path: chunk.path,
|
|
76
|
+
node_type: 'code_chunk', node_name: `${chunk.path}#${chunk.ordinal}`,
|
|
77
|
+
line_start: chunk.line_start ?? null, line_end: chunk.line_end ?? null,
|
|
78
|
+
content: chunk.content, metadata };
|
|
79
|
+
});
|
|
80
|
+
if (!items.length) throw new Error('node_api_no_content_to_publish');
|
|
81
|
+
const maxInputs = opts['max-inputs'] == null ? 100 : Number(opts['max-inputs']);
|
|
82
|
+
if (!Number.isInteger(maxInputs) || maxInputs < 1) throw new Error('node_api_max_inputs_must_be_positive');
|
|
83
|
+
if (items.length > maxInputs) throw new Error(`node_api_embedding_budget_exceeded: ${items.length} selected chunks exceed ${maxInputs}; review index plan and raise --max-inputs explicitly.`);
|
|
84
|
+
const result = await backend.ingestGeneration({
|
|
85
|
+
accountId, repositoryId, generationId: generation.id, corpus, items,
|
|
86
|
+
sourceRef: repositoryId, embedding: { model: remoteEmbedding.default_model, dimensions: remoteEmbedding.default_dimensions },
|
|
87
|
+
}, { nodeApiClient: client });
|
|
88
|
+
return { ...summary, ok: result.ok, account_scoped: true, repository: repositoryId,
|
|
89
|
+
generation_id: generation.id, local_source_hash: generation.source_hash,
|
|
90
|
+
corpus, submitted_chunks: items.length, processed: result.processed, skipped: result.skipped,
|
|
91
|
+
failed: result.failed, batches: result.batches, remote_job_ids: result.job_ids,
|
|
92
|
+
batch_verified: result.ok && result.processed + result.skipped === items.length,
|
|
93
|
+
generation_verified: false,
|
|
94
|
+
note: 'Remote batches were accepted by node-api; generation activation and scoped read-after-write query are separate verification gates.',
|
|
95
|
+
};
|
|
96
|
+
}
|
package/src/commands/autorag.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
import { parseArgs } from 'node:util';
|
|
4
5
|
import { createInterface } from 'node:readline/promises';
|
|
5
|
-
import { repositoryRoot, readConfig, validateConfig, defaultConfig, scopeKey, CONFIG_PATH } from '../knowledge/config.js';
|
|
6
|
+
import { repositoryRoot, readConfig, validateConfig, defaultConfig, scopeKey, fingerprint, CONFIG_PATH } from '../knowledge/config.js';
|
|
6
7
|
import { openSqliteStore } from '../knowledge/stores/sqlite.js';
|
|
7
8
|
import { openPostgresStore } from '../knowledge/stores/postgres.js';
|
|
8
9
|
import { planIndex, runIndex, retrieve } from '../knowledge/engine.js';
|
|
10
|
+
import { inventory, readSource } from '../knowledge/source.js';
|
|
9
11
|
import { discoverKnowledgeRuntime } from '../knowledge/runtime-discovery.js';
|
|
10
12
|
import { getRepositoryId, portableRepositoryIdFromGit, tryReadProjectConfig } from '../lib/project-config.js';
|
|
11
13
|
import { discoverAutoRag, recommendAutoRag, safeAutoRagConfig, runAutoRagProbe, createProviderRegistry, createBackendRegistry } from '../../packages/agentsam-knowledge/src/index.js';
|
|
14
|
+
import { createSupabaseNodeApiClient } from '../../packages/agentsam-knowledge/src/backends/supabase-node-api.js';
|
|
15
|
+
import { runNodeApiRemote, sessionGatewayAuth } from './autorag-node-api.js';
|
|
12
16
|
|
|
13
17
|
const show = value => console.log(JSON.stringify(value, null, 2));
|
|
14
18
|
const split = value => String(value || '').split(',').map(item => item.trim()).filter(Boolean);
|
|
15
19
|
const localPath = root => path.join(root, '.agentsam', 'knowledge', 'index.sqlite');
|
|
16
20
|
const parse = argv => parseArgs({ args: argv, allowPositionals: true, options: {
|
|
17
21
|
cwd: { type: 'string' }, json: { type: 'boolean' }, yes: { type: 'boolean', short: 'y' }, help: { type: 'boolean', short: 'h' },
|
|
18
|
-
kind: { type: 'string' }, scope: { type: 'string' }, provider: { type: 'string' }, backend: { type: 'string' }, model: { type: 'string' }, dimensions: { type: 'string' }, semantic: { type: 'boolean' }, 'allow-paid': { type: 'boolean' }, query: { type: 'string' },
|
|
22
|
+
kind: { type: 'string' }, scope: { type: 'string' }, provider: { type: 'string' }, backend: { type: 'string' }, model: { type: 'string' }, dimensions: { type: 'string' }, semantic: { type: 'boolean' }, 'allow-paid': { type: 'boolean' }, query: { type: 'string' }, resource: { type: 'string' }, 'account-id': { type: 'string' }, 'repository-id': { type: 'string' }, corpus: { type: 'string' }, publish: { type: 'boolean' }, 'max-inputs': { type: 'string' }, 'session-auth': { type: 'boolean' }, 'trusted-origin': { type: 'string' },
|
|
19
23
|
} });
|
|
20
24
|
function readExisting(root) { try { return readConfig(root); } catch (error) { if (error.code === 'ENOENT') return null; throw error; } }
|
|
21
25
|
function generationConfig(root, existing) {
|
|
@@ -39,7 +43,7 @@ async function storeFor(root, config, readOnly = false) { return config.storage.
|
|
|
39
43
|
function defaults(discovery, opts, existing, runtime) {
|
|
40
44
|
const purpose = opts.kind || existing?.scope?.name || 'code';
|
|
41
45
|
const declaredVectorize = (runtime?.cloudflare?.vectorize || []).filter(row => row.binding && row.index);
|
|
42
|
-
const adoptVectorize = !opts.backend && !existing?.lane?.backend
|
|
46
|
+
const adoptVectorize = declaredVectorize.length === 1 && !opts.resource && (opts.backend === 'cloudflare_vectorize' || (!opts.backend && !existing?.lane?.backend));
|
|
43
47
|
const backend = opts.backend || existing?.lane?.backend || (adoptVectorize ? 'cloudflare_vectorize' : 'local_exact');
|
|
44
48
|
const recommendation = recommendAutoRag({ discovery, purpose, include: opts.scope ? split(opts.scope) : existing?.scope?.include, provider: opts.provider || 'none', backend, semantic: Boolean(opts.semantic) });
|
|
45
49
|
const config = safeAutoRagConfig({ existing: existing || {}, recommendation, repositoryId: existing?.repository_id || discovery.repository.identity, projectKey: existing?.project_key || discovery.repository.identity });
|
|
@@ -51,29 +55,156 @@ function defaults(discovery, opts, existing, runtime) {
|
|
|
51
55
|
config.lane.index = resource.index;
|
|
52
56
|
}
|
|
53
57
|
if (opts.provider) {
|
|
54
|
-
const
|
|
55
|
-
|
|
58
|
+
const available = discovery.capabilities.providers.find(item => item.id === opts.provider);
|
|
59
|
+
if (opts.provider !== 'none' && !available) throw new Error('autorag_provider_not_discovered');
|
|
60
|
+
const model = String(opts.model || '').trim();
|
|
61
|
+
const dimensions = Number(opts.dimensions);
|
|
62
|
+
if (opts.provider !== 'none' && (!model || !available.models?.includes(model) || !Number.isInteger(dimensions) || dimensions < 1)) {
|
|
63
|
+
throw new Error('autorag_explicit_provider_model_and_dimensions_required: select an advertised model and its real output dimension');
|
|
64
|
+
}
|
|
65
|
+
config.embedding = opts.provider === 'none' ? { provider: 'none', model: 'none', revision: '1', dimensions: 0, parameters: {} } : { provider: opts.provider, model, revision: '1', dimensions, parameters: { task: 'code retrieval' } };
|
|
56
66
|
}
|
|
57
67
|
if (opts.backend) config.lane.backend = opts.backend;
|
|
68
|
+
if (opts.resource) config.lane.resource = opts.resource;
|
|
58
69
|
return { recommendation, config };
|
|
59
70
|
}
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
/** Shared CLI and native-host workflow view: no indexing, network writes or implicit provider selection. */
|
|
72
|
+
export async function inspectAutoRagWorkflow({ root, discovery, existing, runtime }) {
|
|
73
|
+
const effective = existing || generationConfig(root, null);
|
|
74
|
+
const store = effective && runtime.local_index.exists ? await openSqliteStore(localPath(root), { readOnly: true }) : null;
|
|
75
|
+
let active = null, historical = [], verification = null;
|
|
76
|
+
try {
|
|
77
|
+
if (store && effective) {
|
|
78
|
+
active = await store.active(scopeKey(effective));
|
|
79
|
+
historical = await store.historicalSummaries();
|
|
80
|
+
const proofs = await store.observations('autorag-verified:' + scopeKey(effective));
|
|
81
|
+
verification = active ? proofs.filter(row => row.generation_id === active.id && row.verified).at(-1) || null : null;
|
|
82
|
+
}
|
|
83
|
+
} finally { await store?.close(); }
|
|
84
|
+
const selection = existing?.lane || null;
|
|
85
|
+
const compatible = active && existing && fingerprint([active.config?.scope, active.config?.chunking]) === fingerprint([existing.scope, existing.chunking]);
|
|
86
|
+
let sourceFreshness = 'unknown';
|
|
87
|
+
if (active && compatible && active.receipt?.site_crawl_snapshot == null && active.receipt?.repository_crawl_snapshot == null) {
|
|
88
|
+
// Same hash construction as planIndex: source content changes invalidate stored proofs.
|
|
89
|
+
const now = inventory(root, existing.scope).map(file => {
|
|
90
|
+
const source = readSource(root, file);
|
|
91
|
+
return source ? [file, source.hash] : null;
|
|
92
|
+
}).filter(Boolean);
|
|
93
|
+
sourceFreshness = fingerprint(now) === active.source_hash ? 'current' : 'stale';
|
|
94
|
+
}
|
|
95
|
+
const detected = (runtime.lanes || []).filter(l => l.configured).map(l => ({
|
|
96
|
+
backend: l.backend, binding: l.binding || null, index: l.index || null,
|
|
97
|
+
locally_executable: Boolean(l.locally_executable), remotely_executable: Boolean(l.remotely_executable),
|
|
98
|
+
selected: Boolean(selection && selection.backend === l.backend && (!l.binding || selection.binding === l.binding)),
|
|
99
|
+
}));
|
|
100
|
+
const recommendation = recommendAutoRag({ discovery, include: existing?.scope?.include, purpose: existing?.scope?.name || 'code' });
|
|
101
|
+
const state = active ? (!compatible ? 'scope_changed' : sourceFreshness === 'stale' ? 'source_changed' : active.profile_id ? 'local_semantic_generation' : 'structural_generation') : historical.length ? 'historical_generation_only' : 'not_indexed';
|
|
102
|
+
return {
|
|
103
|
+
schema: 'agentsam.autorag.workflow.v1',
|
|
104
|
+
project: { name: discovery.repository.name, repository_id: discovery.repository.identity, root, branch: discovery.repository.branch },
|
|
105
|
+
status: state,
|
|
106
|
+
selected: existing ? { scope: existing.scope, embedding: existing.embedding, storage: existing.storage, lane: existing.lane } : null,
|
|
107
|
+
suggested: { scope: recommendation.scope, backend: 'local_exact', semantic: false, explanation: 'Non-paid local structural index; existing remote lanes are preserved until explicitly selected and verified.' },
|
|
108
|
+
resources: detected,
|
|
109
|
+
providers: discovery.capabilities.providers.map(p => ({ id: p.id, operational: Boolean(p.operational), models: p.models || [], credentials: p.credentials || null })),
|
|
110
|
+
generation: active ? { id: active.id, files: active.files?.length || 0, chunks: active.chunks?.length || 0, embedded: Boolean(active.profile_id), current: Boolean(compatible && sourceFreshness !== 'stale'), source_freshness: sourceFreshness, created_at: active.created_at } : null,
|
|
111
|
+
historical: historical.map(g => ({ ...g, selected_scope: effective ? g.scope_key === scopeKey(effective) : false })),
|
|
112
|
+
verified: Boolean(verification && compatible && sourceFreshness === 'current'), verification: verification && compatible && sourceFreshness === 'current' ? { generation_id: verification.generation_id, kind: verification.kind, query: verification.query, checked_at: verification.created_at } : null,
|
|
113
|
+
next: active && compatible && sourceFreshness === 'current' ? 'verify' : 'setup_or_index',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async function executeAutoRagWorkflow({ root, existing, opts }) {
|
|
118
|
+
if (!opts.yes) throw new Error('autorag_explicit_confirmation_required: review `agentsam autorag inspect`, then pass --yes');
|
|
119
|
+
if (!existing) throw new Error('autorag_configuration_required: run autorag setup first');
|
|
120
|
+
if (existing.lane.backend !== 'local_exact') throw new Error('autorag_selected_remote_lane_requires_authorized_host: do not silently index SQLite instead of the selected remote backend');
|
|
121
|
+
if (opts.semantic && !opts['allow-paid']) throw new Error('autorag_semantic_paid_approval_required: use --allow-paid after reviewing the provider');
|
|
122
|
+
const store = await storeFor(root, existing);
|
|
123
|
+
try {
|
|
124
|
+
const embed = Boolean(opts.semantic);
|
|
125
|
+
const plan = await planIndex({ root, config: existing, store, embed });
|
|
126
|
+
if (!plan.chunks.length) throw new Error('autorag_no_indexable_sources: check selected paths/exclusions');
|
|
127
|
+
const embedder = embed ? adapterFor(existing) : null;
|
|
128
|
+
const result = await runIndex({ root, config: existing, store, embed, embedder,
|
|
129
|
+
maxInputs: Number(opts['max-inputs'] || 100), maxCharacters: 200000 });
|
|
130
|
+
const evidence = plan.chunks[0];
|
|
131
|
+
const query = opts.query || evidence.symbol || evidence.path;
|
|
132
|
+
const retrieved = await retrieve({ store, config: existing, text: query, semantic: embed,
|
|
133
|
+
embedder, topK: 3, tokenBudget: 1200, generationId: result.generation_id });
|
|
134
|
+
if (!retrieved.hits?.length || !retrieved.hits.some(hit => hit.path)) throw new Error('autorag_verification_no_source_grounded_hits');
|
|
135
|
+
await store.observe('autorag-verified:' + scopeKey(existing), { id: randomUUID(), generation_id: result.generation_id, verified: true, created_at: new Date().toISOString(), kind: embed ? 'semantic' : 'structural', query });
|
|
136
|
+
return { schema: 'agentsam.autorag.execution.v1', ok: true, verified: true, backend: existing.lane.backend,
|
|
137
|
+
kind: embed ? 'semantic' : 'structural', generation_id: result.generation_id, files: result.files,
|
|
138
|
+
chunks: result.chunks, published: result.published, query, hits: retrieved.hits.slice(0, 3).map(hit => ({ path: hit.path, score: hit.score, lines: hit.lines || null })) };
|
|
139
|
+
} finally { await store?.close(); }
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
async function interactiveOptions(discovery, opts, suppliedPrompt = null) {
|
|
143
|
+
const prompt = suppliedPrompt || createInterface({ input: process.stdin, output: process.stdout });
|
|
62
144
|
try {
|
|
63
145
|
const kind = opts.kind || await prompt.question('What kind of knowledge? code, documents, schema, media, memory, mixed [code]: ') || 'code';
|
|
64
146
|
const suggested = recommendAutoRag({ discovery, purpose: kind }).scope.join(',');
|
|
65
147
|
const scope = opts.scope || await prompt.question(`Sources (literal paths, comma separated) [${suggested || '.'}]: `) || suggested || '.';
|
|
66
148
|
const semantic = opts.semantic || (await prompt.question('Enable semantic embeddings for this setup? [no]: ')).toLowerCase() === 'yes';
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
149
|
+
const installed = discovery.capabilities.providers.filter(item => item.operational && item.id !== 'fixture');
|
|
150
|
+
if (semantic && !installed.length) throw new Error('autorag_semantic_provider_not_connected: configure a project provider first');
|
|
151
|
+
const provider = opts.provider || (semantic ? await prompt.question(`Connected providers (${installed.map(item => item.id).join(', ')}): `) : 'none');
|
|
152
|
+
if (semantic && !installed.some(item => item.id === provider)) throw new Error('autorag_selected_provider_not_connected');
|
|
153
|
+
let model = opts.model, dimensions = opts.dimensions;
|
|
154
|
+
if (semantic) {
|
|
155
|
+
const options = installed.find(item => item.id === provider)?.models || [];
|
|
156
|
+
if (!options.length) throw new Error('autorag_provider_has_no_discovered_models');
|
|
157
|
+
model ||= await prompt.question(`Advertised model (${options.join(', ')}): `);
|
|
158
|
+
dimensions ||= await prompt.question('Output dimensions (confirm from provider/index): ');
|
|
159
|
+
}
|
|
160
|
+
return { ...opts, kind, scope, semantic, provider, ...(model ? {model} : {}), ...(dimensions ? {dimensions} : {}) };
|
|
161
|
+
} finally { if (!suppliedPrompt) prompt.close(); }
|
|
70
162
|
}
|
|
71
163
|
export async function runAutoRag(argv) {
|
|
72
|
-
const { values: opts, positionals } = parse(argv); const command = positionals[0] || '
|
|
73
|
-
if (opts.help || !['setup', 'status', 'doctor', 'lanes', 'configure', 'probe', 'providers', 'backends', 'scope'].includes(command)) {
|
|
74
|
-
console.log('agentsam autorag setup|status|doctor|lanes|configure|probe|providers|backends|scope [--cwd PATH] [--yes] [--kind code|documents|schema|media|memory|mixed] [--scope a,b] [--provider none|fixture|gemini|openai|workers-ai|ollama] [--backend local_exact|postgres_pgvector|supabase_pgvector|cloudflare_vectorize] [--semantic]'); return;
|
|
164
|
+
const { values: opts, positionals } = parse(argv); const command = positionals[0] || (opts.json || !process.stdin.isTTY ? 'inspect' : 'guide');
|
|
165
|
+
if (opts.help || !['setup', 'status', 'doctor', 'lanes', 'configure', 'probe', 'providers', 'backends', 'scope', 'remote', 'guide', 'inspect', 'execute'].includes(command)) {
|
|
166
|
+
console.log('agentsam autorag guide|inspect|execute|setup|status|doctor|lanes|configure|probe|providers|backends|scope|remote [--cwd PATH] [--yes] [--kind code|documents|schema|media|memory|mixed] [--scope a,b] [--provider none|fixture|gemini|openai|workers-ai|ollama] [--backend local_exact|postgres_pgvector|supabase_pgvector|cloudflare_vectorize] [--semantic] [--resource ENDPOINT] [--account-id ID] [--query TEXT] [--allow-paid] [--publish] [--max-inputs N] [--session-auth --trusted-origin URL]'); return;
|
|
75
167
|
}
|
|
76
168
|
const root = repositoryRoot(opts.cwd); const discovery = await discoverAutoRag({ root }); const existing = readExisting(root); const runtime = discoverKnowledgeRuntime(root, { knowledgeConfig: existing });
|
|
169
|
+
if (command === 'inspect') return show(await inspectAutoRagWorkflow({ root, discovery, existing, runtime }));
|
|
170
|
+
if (command === 'execute') return show(await executeAutoRagWorkflow({ root, existing, opts }));
|
|
171
|
+
if (command === 'guide') {
|
|
172
|
+
const view = await inspectAutoRagWorkflow({ root, discovery, existing, runtime });
|
|
173
|
+
console.log(`\n AgentSam AutoRAG · ${view.project.name}`);
|
|
174
|
+
console.log(` Repository ${view.project.repository_id}`);
|
|
175
|
+
console.log(` Knowledge ${view.status.replaceAll('_', ' ')}`);
|
|
176
|
+
if (view.generation) console.log(` Generation ${view.generation.files} files / ${view.generation.chunks} chunks · ${view.generation.embedded ? 'embedded' : 'structural only'}`);
|
|
177
|
+
if (view.historical.length && !view.generation) console.log(` History ${view.historical.length} previous generation(s); none matches selected scope`);
|
|
178
|
+
for (const lane of view.resources) console.log(` Discovered ${lane.backend}${lane.binding ? ` (${lane.binding})` : ''} · ${lane.selected ? 'selected' : 'not selected'}`);
|
|
179
|
+
console.log('\n Suggested setup');
|
|
180
|
+
console.log(` Sources ${view.selected?.scope.include.join(', ') || view.suggested.scope.join(', ')}`);
|
|
181
|
+
console.log(` Execution ${view.selected?.lane.backend || 'local_exact'} · ${view.selected?.embedding.provider || 'none'} embeddings`);
|
|
182
|
+
const prompt = createInterface({ input: process.stdin, output: process.stdout });
|
|
183
|
+
try {
|
|
184
|
+
const choice = (await prompt.question('\n [1] Continue selected setup [2] Edit sources/provider [3] Inspect history [4] Exit: ')).trim() || '1';
|
|
185
|
+
if (choice === '3') return show(view.historical);
|
|
186
|
+
if (choice === '4') return;
|
|
187
|
+
if (!['1', '2'].includes(choice)) throw new Error('autorag_invalid_choice');
|
|
188
|
+
if (choice === '2' || !existing) {
|
|
189
|
+
const selected = await interactiveOptions(discovery, {}, prompt);
|
|
190
|
+
const { config } = defaults(discovery, selected, existing, runtime);
|
|
191
|
+
console.log(`\n Plan: ${config.scope.include.join(', ')} · ${config.lane.backend} · ${config.embedding.provider}`);
|
|
192
|
+
const approved = await prompt.question(' Save this setup? [y/N]: ');
|
|
193
|
+
if (!/^y(es)?$/i.test(approved.trim())) return;
|
|
194
|
+
writeConfig(root, config);
|
|
195
|
+
console.log(' Setup saved.');
|
|
196
|
+
if (config.lane.backend !== 'local_exact') { console.log(' Remote execution requires its authorized host. Run autorag doctor.'); return; }
|
|
197
|
+
}
|
|
198
|
+
const target = readExisting(root);
|
|
199
|
+
if (target.lane.backend !== 'local_exact') { console.log(' Selected remote lane requires its authorized host; no fallback or silent overwrite.'); return; }
|
|
200
|
+
const proceed = await prompt.question(' Index sources and verify retrieval now? [y/N]: ');
|
|
201
|
+
if (!/^y(es)?$/i.test(proceed.trim())) return;
|
|
202
|
+
const result = await executeAutoRagWorkflow({ root, existing: target, opts: { yes: true } });
|
|
203
|
+
console.log(` Verified ${result.files} files / ${result.chunks} chunks · ${result.generation_id}`);
|
|
204
|
+
for (const hit of result.hits) console.log(` → ${hit.path}`);
|
|
205
|
+
} finally { prompt.close(); }
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
77
208
|
if (command === 'providers') {
|
|
78
209
|
const providers = await createProviderRegistry().capabilities();
|
|
79
210
|
const workersAi = runtime.resources.workers_ai;
|
|
@@ -95,7 +226,8 @@ export async function runAutoRag(argv) {
|
|
|
95
226
|
try { return await store?.active(scopeKey(generationProfile)); }
|
|
96
227
|
finally { await store?.close(); }
|
|
97
228
|
})() : null;
|
|
98
|
-
|
|
229
|
+
const generation_current = generation && existing ? fingerprint([generation.config?.scope, generation.config?.chunking]) === fingerprint([existing.scope, existing.chunking]) : false;
|
|
230
|
+
return show({ discovery, config: existing || null, project_context: runtime, runtime, generation, generation_current, needs_reindex: Boolean(generation && !generation_current) });
|
|
99
231
|
}
|
|
100
232
|
if (command === 'doctor') {
|
|
101
233
|
const hasRuntimeLane = runtime.lanes.some(lane => lane.configured);
|
|
@@ -104,7 +236,23 @@ export async function runAutoRag(argv) {
|
|
|
104
236
|
{ check: 'local_sqlite', ok: runtime.local_index.exists, blocking: false, detail: runtime.local_index.exists ? runtime.local_index.path : 'Not indexed yet; run agentsam index run or agentsam autorag probe.' },
|
|
105
237
|
{ check: 'git_merkle', ok: discovery.repository.merkle, blocking: false, detail: discovery.repository.merkle ? '.agentsam/merkle.json' : 'No Merkle snapshot yet; run agentsam merkle root . --json when snapshot evidence is needed.' },
|
|
106
238
|
];
|
|
107
|
-
if (existing
|
|
239
|
+
if (existing && runtime.local_index.exists) {
|
|
240
|
+
const store = await storeFor(root, existing, true);
|
|
241
|
+
let generation;
|
|
242
|
+
try { generation = await store?.active(scopeKey(existing)); }
|
|
243
|
+
finally { await store?.close(); }
|
|
244
|
+
const current = Boolean(generation && fingerprint([generation.config?.scope, generation.config?.chunking]) === fingerprint([existing.scope, existing.chunking]));
|
|
245
|
+
checks.push({ check: 'active_generation_current', ok: current, detail: current ? generation.id : 'No matching current generation. Run index plan and index run.' });
|
|
246
|
+
}
|
|
247
|
+
if (existing?.lane?.backend === 'supabase_pgvector') {
|
|
248
|
+
try {
|
|
249
|
+
const probe = await runNodeApiRemote({ opts: { resource: existing.lane.resource }, config: existing, root, openStore: storeFor });
|
|
250
|
+
checks.push({ check: 'supabase_edge_capabilities', ok: probe.accessible && probe.configured, detail: probe });
|
|
251
|
+
checks.push({ check: 'supabase_edge_authorization', ok: probe.connected, detail: probe.connected ? 'Protected endpoint confirmed' : 'Authorized host connection unavailable.' });
|
|
252
|
+
checks.push({ check: 'supabase_edge_generation', ok: probe.indexed_generation_verified, detail: 'No verified active remote generation receipt for the current source scope.' });
|
|
253
|
+
} catch (error) { checks.push({ check: 'supabase_edge_connected', ok: false, detail: error.message }); }
|
|
254
|
+
}
|
|
255
|
+
if (existing?.embedding && existing.embedding.provider !== 'none' && existing.lane?.backend !== 'supabase_pgvector') {
|
|
108
256
|
try { adapterFor(existing).validate(existing.embedding); checks.push({ check: 'provider:' + existing.embedding.provider, ok: true }); }
|
|
109
257
|
catch (error) { checks.push({ check: 'provider:' + existing.embedding.provider, ok: false, detail: error.message }); }
|
|
110
258
|
}
|
|
@@ -120,10 +268,23 @@ export async function runAutoRag(argv) {
|
|
|
120
268
|
return show([...configured, ...runtime.lanes.filter(lane => !seen.has(laneKey(lane)))]);
|
|
121
269
|
}
|
|
122
270
|
if (command === 'setup' || command === 'configure' || command === 'scope') {
|
|
123
|
-
const selected = opts.yes ? opts : await interactiveOptions(discovery, opts);
|
|
124
|
-
|
|
271
|
+
const selected = opts.yes ? { ...opts } : await interactiveOptions(discovery, opts);
|
|
272
|
+
if ((selected.backend || existing?.lane?.backend) === 'supabase_pgvector') {
|
|
273
|
+
const endpoint = selected.resource || existing?.lane?.resource || process.env.AGENTSAM_NODE_API_URL || (process.env.SUPABASE_PROJECT_REF ? `https://${process.env.SUPABASE_PROJECT_REF}.supabase.co/functions/v1/node-api` : '');
|
|
274
|
+
const client = createSupabaseNodeApiClient({ endpoint, ...await sessionGatewayAuth(endpoint, selected, process.env) });
|
|
275
|
+
const remote = (await client.capabilities()).embedding;
|
|
276
|
+
if (!remote?.default_model || !Number.isInteger(remote.default_dimensions)) throw new Error('node_api_remote_embedding_capability_missing');
|
|
277
|
+
if (selected.provider && !['gemini', 'none'].includes(selected.provider)) throw new Error('node_api_embedding_provider_mismatch');
|
|
278
|
+
if (selected.model && selected.model !== remote.default_model) throw new Error('node_api_embedding_model_mismatch');
|
|
279
|
+
if (selected.dimensions && Number(selected.dimensions) !== remote.default_dimensions) throw new Error('node_api_embedding_dimensions_mismatch');
|
|
280
|
+
selected.resource = client.endpoint; selected.provider = 'gemini'; selected.model = remote.default_model; selected.dimensions = String(remote.default_dimensions);
|
|
281
|
+
}
|
|
282
|
+
const { recommendation, config } = defaults(discovery, selected, existing, runtime);
|
|
283
|
+
writeConfig(root, config); return show({ action: command, config: CONFIG_PATH, recommendation, config, next: config.lane.backend === 'supabase_pgvector' ? ['agentsam index plan', 'agentsam index run', 'agentsam autorag remote', 'agentsam autorag remote --publish --allow-paid --account-id <authorized-account>'] : ['agentsam autorag probe', 'agentsam index plan', 'agentsam index run', 'agentsam search "symbol or phrase"'] });
|
|
125
284
|
}
|
|
285
|
+
if (command === 'remote') return show(await runNodeApiRemote({ opts, config: existing, root, openStore: storeFor }));
|
|
126
286
|
if (!existing) throw new Error('AutoRAG is not configured. Run agentsam autorag setup first.');
|
|
287
|
+
if (existing.lane?.backend === 'supabase_pgvector') throw new Error('node_api_remote_requires_remote_command: use autorag remote after index run. Local probe does not prove a remote backend.');
|
|
127
288
|
const semantic = Boolean(opts.semantic); if (semantic && !opts['allow-paid'] && !['fixture', 'ollama'].includes(existing.embedding.provider)) throw new Error('Paid embedding probes are disabled. Use --allow-paid only after reviewing the provider/profile.');
|
|
128
289
|
const store = await storeFor(root, existing, false);
|
|
129
290
|
try { return show(await runAutoRagProbe({ root, config: existing, store, semantic, embedder: semantic ? adapterFor(existing) : null, query: opts.query || 'repository overview', engine: { planIndex, runIndex, retrieve } })); }
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
|
|
4
|
+
const source = new URL('../../packages/catalog/doctor/toolchains.json', import.meta.url);
|
|
5
|
+
|
|
6
|
+
export function doctorReport(spawn = spawnSync) {
|
|
7
|
+
const spec = JSON.parse(readFileSync(source, 'utf8'));
|
|
8
|
+
const probes = spec.tools.map(tool => {
|
|
9
|
+
const cp = spawn(tool.id, tool.version_args, { encoding: 'utf8', timeout: 8000 });
|
|
10
|
+
const output = String(cp.stdout || cp.stderr || '').trim().split('\n')[0];
|
|
11
|
+
return {
|
|
12
|
+
id: tool.id, label: tool.label, required: !!tool.required,
|
|
13
|
+
ok: !cp.error && cp.status === 0,
|
|
14
|
+
version: !cp.error && cp.status === 0 ? output : null,
|
|
15
|
+
why: tool.why, repair: tool.repair, verify: tool.verify,
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
const wasm = spawn('rustup', ['target','list','--installed'], { encoding: 'utf8', timeout: 8000 });
|
|
19
|
+
const wasmTarget = !wasm.error && wasm.status === 0 &&
|
|
20
|
+
String(wasm.stdout || '').split('\n').includes('wasm32-unknown-unknown');
|
|
21
|
+
return {
|
|
22
|
+
schema: 'agentsam.doctor-report.v1',
|
|
23
|
+
ok: probes.filter(x => x.required).every(x => x.ok),
|
|
24
|
+
rust_wasm_ready: wasmTarget && ['rustc','cargo','worker-build'].every(x => probes.find(p => p.id === x)?.ok),
|
|
25
|
+
wasm_target_installed: wasmTarget,
|
|
26
|
+
probes,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function runCatalogDoctor(args = []) {
|
|
31
|
+
if (args.includes('--help')) {
|
|
32
|
+
console.log('Usage: agentsam doctor [--json] [--teach]\nCheck core CLI and optional Rust/Wasm toolchains; no installations or deployments.');
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
const report = doctorReport();
|
|
36
|
+
if (args.includes('--json')) console.log(JSON.stringify(report, null, 2));
|
|
37
|
+
else {
|
|
38
|
+
console.log('AgentSam Toolchain Doctor');
|
|
39
|
+
for (const probe of report.probes) {
|
|
40
|
+
console.log((probe.ok ? '✓' : '–') + ' ' + probe.label + ': ' + (probe.version || 'not available'));
|
|
41
|
+
if (args.includes('--teach') || !probe.ok) {
|
|
42
|
+
console.log(' Why: ' + probe.why);
|
|
43
|
+
if (!probe.ok) console.log(' Repair: ' + probe.repair + '\n Verify: ' + probe.verify);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
console.log('Wasm compilation target: ' + (report.wasm_target_installed ? 'installed' : 'not installed'));
|
|
47
|
+
if (!report.wasm_target_installed) console.log(' Optional repair: rustup target add wasm32-unknown-unknown');
|
|
48
|
+
console.log('AgentSam CLI: ' + (report.ok ? 'ready' : 'missing required tooling'));
|
|
49
|
+
console.log('Rust/Wasm Worker build lane: ' + (report.rust_wasm_ready ? 'ready' : 'needs setup'));
|
|
50
|
+
}
|
|
51
|
+
return report.ok ? 0 : 2;
|
|
52
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { createRegistry } from '../registry/index.js';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import readline from 'node:readline/promises';
|
|
6
|
+
|
|
7
|
+
const root = fileURLToPath(new URL('../../packages/catalog/', import.meta.url));
|
|
8
|
+
const read = (name) => JSON.parse(readFileSync(path.join(root, name), 'utf8'));
|
|
9
|
+
const index = () => read('generated/packages.json');
|
|
10
|
+
const topics = () => read('topics/runtime.json').topics;
|
|
11
|
+
const questions = () => read('assist/questions.json').questions;
|
|
12
|
+
const rules = () => read('assist/rules.json').rules;
|
|
13
|
+
|
|
14
|
+
function flags(args) {
|
|
15
|
+
const values = {};
|
|
16
|
+
const positional = [];
|
|
17
|
+
for (let i = 0; i < args.length; i++) {
|
|
18
|
+
if (args[i].startsWith('--')) {
|
|
19
|
+
const [k, ...inline] = args[i].slice(2).split('=');
|
|
20
|
+
values[k] = inline.length ? inline.join('=') : (['json', 'help'].includes(k) ? true : args[++i]);
|
|
21
|
+
} else positional.push(args[i]);
|
|
22
|
+
}
|
|
23
|
+
return { values, positional };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function compactJson(value, asJson) {
|
|
27
|
+
if (asJson) console.log(JSON.stringify(value, null, 2));
|
|
28
|
+
else if (value.title) {
|
|
29
|
+
console.log(value.title + '\n' + (value.summary || value.purpose || ''));
|
|
30
|
+
for (const [key, label] of [['use_when','Use when'], ['avoid_when','Avoid when'], ['commands','Commands']]) {
|
|
31
|
+
if (value[key]?.length) console.log('\n' + label + ':\n' + value[key].map(x => ' - ' + x).join('\n'));
|
|
32
|
+
}
|
|
33
|
+
if (value.catalog_status && value.catalog_status !== 'classified')
|
|
34
|
+
console.log('\nCatalog status: ' + value.catalog_status + ' (draft, not verified product authority)');
|
|
35
|
+
} else {
|
|
36
|
+
console.log(value.recommendation?.title || 'No exact recommendation');
|
|
37
|
+
for (const why of value.recommendation?.why || []) console.log(' - ' + why);
|
|
38
|
+
for (const start of value.recommendation?.start || []) console.log(' ' + start);
|
|
39
|
+
for (const learn of value.recommendation?.learn || []) console.log(' ' + learn);
|
|
40
|
+
for (const note of value.notes || []) console.log(' Note: ' + note);
|
|
41
|
+
if (!value.recommendation) console.log('Supply more information via agentsam assist.');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function explainCatalog(argv = []) {
|
|
46
|
+
const { values, positional } = flags(argv);
|
|
47
|
+
if (values.help || !positional.length) {
|
|
48
|
+
console.log('Usage: agentsam explain <rust|workers|wasm|rapid-rust|package NAME|command NAME|capability ID> [--json]');
|
|
49
|
+
return 0;
|
|
50
|
+
}
|
|
51
|
+
const category = ['package','command','capability'].includes(positional[0]) ? positional[0] : null;
|
|
52
|
+
const term = (category ? positional.slice(1) : positional).join(' ').toLowerCase();
|
|
53
|
+
let result;
|
|
54
|
+
if (category) {
|
|
55
|
+
const row = createRegistry().describe(term,{type:category});
|
|
56
|
+
result = row && {
|
|
57
|
+
...row, title:row.name||row.id,
|
|
58
|
+
summary:row.summary||row.description||row.purpose,
|
|
59
|
+
};
|
|
60
|
+
} else result = topics()[term] || null;
|
|
61
|
+
if (!result) {
|
|
62
|
+
console.error('Unknown catalog topic or package: ' + term);
|
|
63
|
+
return 2;
|
|
64
|
+
}
|
|
65
|
+
compactJson(result, !!values.json);
|
|
66
|
+
return 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function recommendCatalog(answers) {
|
|
70
|
+
const known = new Map(questions().map(q => [q.id, new Set(q.options.map(o => o[0]))]));
|
|
71
|
+
for (const [key, value] of Object.entries(answers)) {
|
|
72
|
+
if (!known.has(key) || !known.get(key).has(value)) {
|
|
73
|
+
throw new Error('Unsupported answer ' + key + '=' + value);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const hits = rules().filter(rule => {
|
|
77
|
+
const all = Object.entries(rule.when || {}).every(([key, value]) => answers[key] === value);
|
|
78
|
+
const anyEntries = Object.entries(rule.when_any || {});
|
|
79
|
+
const any = !anyEntries.length || anyEntries.some(([key, options]) => options.includes(answers[key]));
|
|
80
|
+
return all && any && (Object.keys(rule.when || {}).length + anyEntries.length > 0);
|
|
81
|
+
}).sort((a,b) => b.priority - a.priority);
|
|
82
|
+
const preference = answers.preferred_runtime;
|
|
83
|
+
const compatible = !preference || preference === 'any' ? hits : hits.filter(rule => {
|
|
84
|
+
const language = String(rule.recommend.language || '').toLowerCase();
|
|
85
|
+
return language.includes(preference) ||
|
|
86
|
+
(preference === 'typescript' && language.includes('javascript'));
|
|
87
|
+
});
|
|
88
|
+
const notes = [];
|
|
89
|
+
if (preference && preference !== 'any' && hits.length && !compatible.length)
|
|
90
|
+
notes.push('No rule fits all declared constraints and the preferred runtime. Review the constraints instead of silently overriding the preference.');
|
|
91
|
+
if (answers.portability === 'portable' && ['process','libraries','filesystem'].includes(answers.native_access))
|
|
92
|
+
notes.push('A strict native-access requirement limits cross-host portability; isolate it behind an adapter.');
|
|
93
|
+
if (answers.browser_surface === 'yes' && answers.goal !== 'web-ui')
|
|
94
|
+
notes.push('A browser/UI surface needs its own frontend even when the core service uses another runtime.');
|
|
95
|
+
return { answers, recommendation: compatible[0]?.recommend ?? null, rule_id: compatible[0]?.id ?? null,
|
|
96
|
+
alternatives: compatible.slice(1,4).map(r => ({ id: r.id, title: r.recommend.title })), notes };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const presets = {
|
|
100
|
+
'reusable-native-logic': { goal: 'native-core', reusable_core: 'yes', execution: 'multiple' },
|
|
101
|
+
'edge-api': { goal: 'api', execution: 'edge', lifetime: 'short', native_access: 'none' },
|
|
102
|
+
'long-running-service': { goal: 'service', execution: 'server', lifetime: 'long' },
|
|
103
|
+
'desktop-app': { goal: 'desktop', execution: 'desktop' },
|
|
104
|
+
'browser-ui': { goal: 'web-ui', execution: 'browser' },
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export async function runCatalog(kind, argv = [], { interactive = process.stdin.isTTY } = {}) {
|
|
108
|
+
if (kind === 'explain') return explainCatalog(argv);
|
|
109
|
+
const { values } = flags(argv);
|
|
110
|
+
if (values.help) {
|
|
111
|
+
console.log('Usage: agentsam choose runtime --goal reusable-native-logic [--json]\n' +
|
|
112
|
+
' agentsam assist [--answers JSON] [--json]');
|
|
113
|
+
return 0;
|
|
114
|
+
}
|
|
115
|
+
let answers;
|
|
116
|
+
if (values.answers) {
|
|
117
|
+
try { answers = JSON.parse(values.answers); }
|
|
118
|
+
catch { console.error('Invalid JSON for --answers'); return 2; }
|
|
119
|
+
if (!answers || Array.isArray(answers) || typeof answers !== 'object') {
|
|
120
|
+
console.error('--answers must be a JSON object'); return 2;
|
|
121
|
+
}
|
|
122
|
+
} else if (kind === 'choose') {
|
|
123
|
+
answers = presets[values.goal];
|
|
124
|
+
if (!answers) {
|
|
125
|
+
console.error('Choose --goal: ' + Object.keys(presets).join(', '));
|
|
126
|
+
return 2;
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
if (!interactive) {
|
|
130
|
+
console.error('Non-interactive use: agentsam assist --answers \'{"goal":"api","execution":"edge"}\' --json');
|
|
131
|
+
return 2;
|
|
132
|
+
}
|
|
133
|
+
const prompt = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
134
|
+
answers = {};
|
|
135
|
+
try {
|
|
136
|
+
for (const q of questions()) {
|
|
137
|
+
console.log('\n' + q.prompt);
|
|
138
|
+
q.options.forEach(([_, title], i) => console.log(' ' + (i + 1) + '. ' + title));
|
|
139
|
+
const raw = await prompt.question('Choice: ');
|
|
140
|
+
const option = q.options[Number(raw) - 1];
|
|
141
|
+
if (!option) { console.error('Invalid choice'); return 2; }
|
|
142
|
+
answers[q.id] = option[0];
|
|
143
|
+
}
|
|
144
|
+
} finally { prompt.close(); }
|
|
145
|
+
}
|
|
146
|
+
let result;
|
|
147
|
+
try { result = recommendCatalog(answers); }
|
|
148
|
+
catch (e) { console.error(e.message); return 2; }
|
|
149
|
+
compactJson(result, !!values.json);
|
|
150
|
+
return result.recommendation ? 0 : 2;
|
|
151
|
+
}
|