@inneranimalmedia/agentsam-sdk 2.6.1 → 2.6.3
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 +45 -1
- package/README.md +80 -0
- package/apps/README.md +34 -0
- package/apps/cad-creator/README.md +728 -0
- package/apps/cad-creator/shared/cad/package.json +19 -0
- package/apps/cad-creator/shared/cad/src/domain/operations.ts +7 -0
- package/apps/cad-creator/shared/cad/src/domain/project-contract.d.ts +3 -0
- package/apps/cad-creator/shared/cad/src/domain/project-contract.js +75 -0
- package/apps/cad-creator/shared/cad/src/domain/project-tools.d.ts +1 -0
- package/apps/cad-creator/shared/cad/src/domain/project-tools.js +24 -0
- package/apps/cad-creator/shared/cad/src/domain/validation.ts +191 -0
- package/apps/cad-creator/shared/cad/src/index.ts +4 -0
- package/apps/cad-creator/shared/cad/src/robotics/types.ts +232 -0
- package/apps/cad-creator/shared/cad/src/types.ts +507 -0
- package/apps/cad-creator/shared/cad/tsconfig.json +14 -0
- package/docs/AUTH_IDENTITY_CONTRACT.md +25 -27
- package/docs/AUTORAG.md +58 -0
- package/docs/BRAND_INTELLIGENCE.md +30 -0
- package/docs/CLI_SHELL.md +4 -2
- package/docs/CMS_CONTEXTUAL_COMPOSER.md +38 -0
- package/docs/MERKLE.md +4 -0
- package/docs/PROJECT_CONFIG.md +3 -0
- package/docs/REPOSITORY_KNOWLEDGE.md +2 -0
- package/docs/SDK_WORKER.md +4 -3
- package/docs/THEME_REFINERY.md +120 -0
- package/docs/architecture/PROVIDER-TOOLS-AND-COMPACTION.md +60 -0
- package/docs/architecture/STORAGE.md +87 -0
- package/docs/cad-project-tools.md +69 -0
- package/docs/cms-scaffolding-pattern-reference.md +73 -0
- package/docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS-codex-tui-20260919.md +113 -0
- package/docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS.md +85 -0
- package/docs/plans/AGENTSAM-MCP-CLIENT-2026-09-19.md +181 -0
- package/docs/plans/ASBD-PORTABLE-WORKGRAPH-UI-DEFERRED.md +34 -0
- package/docs/plans/ASTRA-BRIEF-2026-09-18.md +258 -0
- package/docs/plans/MULTI-AGENT-SPRINTS-2026-09-19.md +373 -0
- package/docs/plans/NEXT-AGENT-HANDOFF.md +167 -0
- package/docs/plans/RECONCILIATION-2026-09-19.md +178 -0
- package/docs/plugins.md +43 -0
- package/docs/tools/README.md +57 -0
- package/docs/tools/agent-and-orchestration.md +49 -0
- package/docs/tools/browser-and-research.md +46 -0
- package/docs/tools/cloudflare-platform.md +32 -0
- package/docs/tools/cms.md +25 -0
- package/docs/tools/communications.md +41 -0
- package/docs/tools/database-and-storage.md +62 -0
- package/docs/tools/design-and-media.md +64 -0
- package/docs/tools/filesystem-and-code.md +55 -0
- package/docs/tools/github.md +56 -0
- package/docs/tools/integrations-and-misc.md +16 -0
- package/docs/tools/memory.md +21 -0
- package/docs/tools/terminal-and-execution.md +29 -0
- package/docs/tools/tickets-and-platform.md +30 -0
- package/migrations/d1/0001_agentsam_plugin_runtime.sql +177 -0
- package/migrations/d1/0002_agentsam_ticket_ownership.sql +8 -0
- package/migrations/d1/0002_dynamic_model_policies.sql +23 -0
- package/migrations/d1/0003_expand_tool_handler_families.sql +18 -0
- package/migrations/d1/0004_project_aware_retrieval_lanes.sql +24 -0
- package/migrations/d1/0005_portable_knowledge_identity.sql +104 -0
- package/migrations/d1/0006_repair_ops_trail_account_scope.sql +14 -0
- package/migrations/d1/0007_repair_ops_trail_agent_run_account.sql +13 -0
- package/migrations/d1/0008_backfill_knowledge_run_legacy_tenant.sql +14 -0
- package/migrations/d1/0009_normalize_cloudflare_plugin_installations.sql +137 -0
- package/migrations/runtime/0001_cli_runtime.sql +67 -0
- package/migrations/runtime/0002_project_sessions.sql +15 -0
- package/migrations/runtime/0003_provider_continuations.sql +8 -0
- package/package.json +92 -12
- package/packages/agentsam-brand/README.md +21 -0
- package/packages/agentsam-brand/package.json +22 -0
- package/packages/agentsam-brand/src/contract.js +59 -0
- package/packages/agentsam-brand/src/extract.js +126 -0
- package/packages/agentsam-brand/src/goap-actions.js +73 -0
- package/packages/agentsam-brand/src/index.js +48 -0
- package/packages/agentsam-brand/src/plan.js +115 -0
- package/packages/agentsam-brand/src/resolve.js +139 -0
- package/packages/agentsam-brand/src/scan.js +250 -0
- package/packages/agentsam-brand/test/brand-scan.test.mjs +106 -0
- package/packages/agentsam-contracts/README.md +23 -0
- package/packages/agentsam-contracts/package.json +32 -0
- package/packages/agentsam-contracts/src/adapter.ts +25 -0
- package/packages/agentsam-contracts/src/agent.ts +35 -0
- package/packages/agentsam-contracts/src/artifacts.ts +33 -0
- package/packages/agentsam-contracts/src/authority.ts +29 -0
- package/packages/agentsam-contracts/src/context.ts +16 -0
- package/packages/agentsam-contracts/src/errors.ts +46 -0
- package/packages/agentsam-contracts/src/events.ts +47 -0
- package/packages/agentsam-contracts/src/execution.ts +50 -0
- package/packages/agentsam-contracts/src/hooks.ts +40 -0
- package/packages/agentsam-contracts/src/identity.ts +16 -0
- package/packages/agentsam-contracts/src/index.ts +14 -0
- package/packages/agentsam-contracts/src/models.ts +9 -0
- package/packages/agentsam-contracts/src/providers.ts +33 -0
- package/packages/agentsam-contracts/src/repository.ts +64 -0
- package/packages/agentsam-contracts/src/tools.ts +98 -0
- package/packages/agentsam-contracts/test/contracts.test.mjs +16 -0
- package/packages/agentsam-contracts/test/errors-catalog.test.mjs +25 -0
- package/packages/agentsam-contracts/test/repository.test.mjs +18 -0
- package/packages/agentsam-contracts/tsconfig.json +12 -0
- package/packages/agentsam-errors/package.json +17 -0
- package/packages/agentsam-errors/src/adapters/anthropic.js +15 -0
- package/packages/agentsam-errors/src/adapters/cad.js +109 -0
- package/packages/agentsam-errors/src/adapters/cloudflare.js +21 -0
- package/packages/agentsam-errors/src/adapters/cursor.js +4 -0
- package/packages/agentsam-errors/src/adapters/device.js +38 -0
- package/packages/agentsam-errors/src/adapters/docker.js +28 -0
- package/packages/agentsam-errors/src/adapters/gcp.js +14 -0
- package/packages/agentsam-errors/src/adapters/github.js +22 -0
- package/packages/agentsam-errors/src/adapters/google.js +17 -0
- package/packages/agentsam-errors/src/adapters/index.js +55 -0
- package/packages/agentsam-errors/src/adapters/internal.js +40 -0
- package/packages/agentsam-errors/src/adapters/oauth.js +24 -0
- package/packages/agentsam-errors/src/adapters/openai.js +17 -0
- package/packages/agentsam-errors/src/adapters/process.js +35 -0
- package/packages/agentsam-errors/src/adapters/provider.js +114 -0
- package/packages/agentsam-errors/src/envelope.js +186 -0
- package/packages/agentsam-errors/src/error.js +24 -0
- package/packages/agentsam-errors/src/fingerprint.js +35 -0
- package/packages/agentsam-errors/src/index.js +10 -0
- package/packages/agentsam-errors/src/normalize.js +30 -0
- package/packages/agentsam-errors/src/redaction.js +52 -0
- package/packages/agentsam-errors/src/render.js +16 -0
- package/packages/agentsam-errors/src/retry.js +10 -0
- package/packages/agentsam-errors/src/transport.js +52 -0
- package/packages/agentsam-errors/src/vocabulary.js +320 -0
- package/packages/agentsam-errors/test/envelope.test.mjs +70 -0
- package/packages/agentsam-errors/test/providers.test.mjs +99 -0
- package/packages/agentsam-errors/test/redaction.test.mjs +21 -0
- package/packages/agentsam-errors/test/runtime-cad-device.test.mjs +76 -0
- package/packages/agentsam-errors/test/transport.test.mjs +46 -0
- package/packages/agentsam-knowledge/package.json +15 -0
- package/packages/agentsam-knowledge/src/autorag/index.js +64 -0
- package/packages/agentsam-knowledge/src/backends/index.js +26 -0
- package/packages/agentsam-knowledge/src/index.js +3 -0
- package/packages/agentsam-knowledge/src/providers/index.js +95 -0
- package/packages/agentsam-knowledge/test/autorag.test.mjs +42 -0
- package/packages/agentsam-nav/README.md +40 -0
- package/packages/agentsam-nav/dist/Nav.d.ts +43 -0
- package/packages/agentsam-nav/dist/NavCollapsible.d.ts +10 -0
- package/packages/agentsam-nav/dist/NavContent.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavFooter.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavGroup.d.ts +3 -0
- package/packages/agentsam-nav/dist/NavHeader.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavMenu.d.ts +22 -0
- package/packages/agentsam-nav/dist/NavProvider.d.ts +35 -0
- package/packages/agentsam-nav/dist/NavTrigger.d.ts +2 -0
- package/packages/agentsam-nav/dist/Surfaces.d.ts +41 -0
- package/packages/agentsam-nav/dist/browser.d.ts +11 -0
- package/packages/agentsam-nav/dist/browser.global.js +132 -0
- package/packages/agentsam-nav/dist/browser.js +613 -0
- package/packages/agentsam-nav/dist/contracts.d.ts +76 -0
- package/packages/agentsam-nav/dist/index.d.ts +11 -0
- package/packages/agentsam-nav/dist/index.js +614 -0
- package/packages/agentsam-nav/dist/legacy.css +83 -0
- package/packages/agentsam-nav/dist/shell.css +113 -0
- package/packages/agentsam-nav/dist/theme.css +113 -0
- package/packages/agentsam-nav/dist/utils.d.ts +1 -0
- package/packages/agentsam-nav/package.json +43 -0
- package/packages/agentsam-queue-control/README.md +107 -0
- package/packages/agentsam-queue-control/package.json +31 -0
- package/packages/agentsam-queue-control/schemas/job-envelope.schema.json +56 -0
- package/packages/agentsam-queue-control/src/adapters/cloudflare.js +152 -0
- package/packages/agentsam-queue-control/src/adapters/memory.js +38 -0
- package/packages/agentsam-queue-control/src/contracts.js +130 -0
- package/packages/agentsam-queue-control/src/control-plane.js +141 -0
- package/packages/agentsam-queue-control/src/dispatch.js +43 -0
- package/packages/agentsam-queue-control/src/index.js +7 -0
- package/packages/agentsam-queue-control/src/policy.js +88 -0
- package/packages/agentsam-queue-control/src/topology.js +66 -0
- package/packages/agentsam-queue-control/test/queue-control.test.mjs +100 -0
- package/packages/agentsam-repository/src/goap.js +718 -0
- package/packages/agentsam-repository/src/goap.js.bak-20260922011251 +670 -0
- package/packages/agentsam-repository/src/index.js +5 -0
- package/packages/agentsam-repository/src/merkle/cloudflare-persistence.js +2 -2
- package/packages/agentsam-repository/src/tickets.js +184 -0
- package/packages/agentsam-repository/src/work-tracking.js +199 -0
- package/packages/agentsam-repository/src/workspace-state.js +176 -0
- package/packages/agentsam-repository/test/goap-tickets-workspace-state.test.mjs +152 -0
- package/packages/connectors/cloudflare/src/index.js +297 -15
- package/packages/connectors/cloudflare/src/owner.js +43 -40
- package/packages/connectors/cloudflare/src/routes.js +167 -26
- package/packages/connectors/cloudflare/tests/connector.test.mjs +112 -2
- package/packages/heuristic-theme/README.md +11 -0
- package/packages/heuristic-theme/package.json +25 -0
- package/packages/heuristic-theme/src/index.js +2 -0
- package/packages/heuristic-theme/src/registry.js +36 -0
- package/packages/heuristic-theme/src/theme.js +41 -0
- package/packages/heuristic-theme/test/theme.test.mjs +26 -0
- package/packages/identity/.agentsam/features/oauth-login-portal/agentsam.feature.json +64 -0
- package/packages/identity/.agentsam/features/oauth-login-portal/providers.json +96 -0
- package/packages/identity/.agentsam/features/oauth-login-portal/resources.json +47 -0
- package/packages/identity/.agentsam/features/oauth-login-portal/routes.json +74 -0
- package/packages/identity/.agentsam/features/oauth-login-portal/ui.json +35 -0
- package/packages/identity/package.json +4 -3
- package/packages/identity/src/adapters/cloudflare-d1/ids.js +4 -0
- package/packages/identity/src/adapters/cloudflare-d1/index.js +39 -1
- package/packages/identity/src/contracts/auth-config.js +23 -40
- package/packages/identity/src/contracts/provider.js +3 -2
- package/packages/identity/src/frontend/auth-portal/pages/login.html +7 -0
- package/packages/identity/src/index.js +2 -0
- package/packages/identity/src/oauth/credentials.js +13 -0
- package/packages/identity/src/oauth/iam-platform.js +5 -5
- package/packages/identity/src/providers/cloudflare/index.js +19 -0
- package/packages/identity/src/providers/cloudflare/mapper.js +21 -0
- package/packages/identity/src/providers/cloudflare/oauth.js +48 -0
- package/packages/identity/src/providers/cloudflare/profile.js +28 -0
- package/packages/identity/src/providers/index.js +18 -2
- package/packages/identity/src/server/identity-service.js +13 -3
- package/packages/identity/src/server/worker-router.js +63 -8
- package/packages/identity/tests/auth-config.test.mjs +14 -23
- package/packages/identity/tests/identity-service.test.mjs +15 -0
- package/packages/providers/completeful/README.md +38 -0
- package/packages/providers/completeful/package.json +29 -0
- package/packages/providers/completeful/src/client.js +162 -0
- package/packages/providers/completeful/src/events.js +49 -0
- package/packages/providers/completeful/src/index.js +22 -0
- package/packages/providers/completeful/src/tools.js +579 -0
- package/packages/providers/completeful/src/webhooks.js +55 -0
- package/packages/providers/completeful/test/provider.test.mjs +196 -0
- package/packages/theme-church-site/README.md +10 -0
- package/packages/theme-church-site/package.json +30 -0
- package/packages/theme-church-site/src/harvest.json +14 -0
- package/packages/theme-church-site/src/index.js +84 -0
- package/packages/theme-church-site/test/theme.test.mjs +19 -0
- package/packages/theme-companions-site/README.md +10 -0
- package/packages/theme-companions-site/package.json +30 -0
- package/packages/theme-companions-site/src/harvest.json +12 -0
- package/packages/theme-companions-site/src/index.js +82 -0
- package/packages/theme-companions-site/test/theme.test.mjs +19 -0
- package/packages/theme-floors-site/README.md +10 -0
- package/packages/theme-floors-site/package.json +30 -0
- package/packages/theme-floors-site/src/harvest.json +14 -0
- package/packages/theme-floors-site/src/index.js +82 -0
- package/packages/theme-floors-site/test/theme.test.mjs +19 -0
- package/packages/theme-fuelnfree-site/README.md +10 -0
- package/packages/theme-fuelnfree-site/package.json +30 -0
- package/packages/theme-fuelnfree-site/src/harvest.json +13 -0
- package/packages/theme-fuelnfree-site/src/index.js +81 -0
- package/packages/theme-fuelnfree-site/test/theme.test.mjs +19 -0
- package/packages/theme-handyman-site/README.md +10 -0
- package/packages/theme-handyman-site/package.json +30 -0
- package/packages/theme-handyman-site/src/harvest.json +10 -0
- package/packages/theme-handyman-site/src/index.js +83 -0
- package/packages/theme-handyman-site/test/theme.test.mjs +19 -0
- package/packages/theme-insurance-site/README.md +10 -0
- package/packages/theme-insurance-site/package.json +30 -0
- package/packages/theme-insurance-site/src/harvest.json +10 -0
- package/packages/theme-insurance-site/src/index.js +83 -0
- package/packages/theme-insurance-site/test/theme.test.mjs +19 -0
- package/packages/theme-shinshu-site/README.md +10 -0
- package/packages/theme-shinshu-site/package.json +30 -0
- package/packages/theme-shinshu-site/src/harvest.json +12 -0
- package/packages/theme-shinshu-site/src/index.js +83 -0
- package/packages/theme-shinshu-site/test/theme.test.mjs +19 -0
- package/packages/work-graph/README.md +49 -0
- package/packages/work-graph/package.json +19 -0
- package/packages/work-graph/prototype/README.md +32 -0
- package/packages/work-graph/prototype/data/demo-workgraph.js +47 -0
- package/packages/work-graph/prototype/renderers/timeline-model.js +21 -0
- package/packages/work-graph/prototype/renderers/workgraph-runtime.js +38 -0
- package/packages/work-graph/prototype-gnantt.html +655 -0
- package/packages/work-graph/src/adapters/business/projects.js +23 -0
- package/packages/work-graph/src/adapters/engineering/git.js +22 -0
- package/packages/work-graph/src/adapters/engineering/mcp.js +22 -0
- package/packages/work-graph/src/index.js +76 -0
- package/packages/work-graph/src/renderers/gantt-model.js +11 -0
- package/packages/work-graph/src/renderers/timeline.js +16 -0
- package/packages/work-graph/test/work-graph.test.mjs +37 -0
- package/protocol/README.md +12 -0
- package/protocol/capabilities/cloudflare-cpu-audit-input.schema.json +30 -6
- package/protocol/capabilities/cloudflare-cpu-profile-input.schema.json +18 -4
- package/protocol/capabilities/cloudflare-wrangler-native-input.schema.json +59 -10
- package/protocol/capabilities/knowledge-search-input.schema.json +35 -0
- package/protocol/capabilities/manifest.json +163 -1
- package/protocol/capabilities/repository-audit-input.schema.json +39 -6
- package/protocol/capabilities/repository-snapshot-input.schema.json +15 -3
- package/protocol/capabilities/terminal-exec-input.schema.json +55 -0
- package/protocol/commerce/catalog.v1.json +50 -0
- package/protocol/errors/error-catalog.json +164 -0
- package/protocol/errors/error-envelope.schema.json +544 -0
- package/protocol/features/README.md +57 -0
- package/protocol/features/agentsam.feature.v1.schema.json +290 -0
- package/protocol/features/catalog.json +65 -0
- package/protocol/features/examples/provider-resend.feature.json +17 -0
- package/protocol/go/agentsam-go-runtime.v1.json +17 -0
- package/protocol/knowledge/LIFECYCLE.md +140 -0
- package/protocol/knowledge/README.md +4 -0
- package/protocol/presets/catalog.json +128 -19
- package/protocol/rpc/v1/errors.proto +24 -0
- package/protocol/theme-refinery/d1-reconciliation.md +48 -0
- package/protocol/theme-refinery/product-metadata.schema.json +27 -0
- package/protocol/theme-refinery/receipts/products-registry-batch-20260924.json +318 -0
- package/protocol/theme-refinery/receipts/theme-harvest-20260924.json +472 -0
- package/protocol/theme-refinery/reconciliation-receipt.schema.json +83 -0
- package/services/cad/server.py +249 -2
- package/src/agent/capability-adapter.js +15 -5
- package/src/agent/index.js +2 -1
- package/src/agent/model-turn.js +51 -0
- package/src/agent/responses-runner.js +304 -38
- package/src/capabilities/index.js +1 -0
- package/src/capabilities/terminal-exec.js +78 -0
- package/src/cli.js +129 -31
- package/src/cloudflare/index.js +6 -0
- package/src/cloudflare/runtime-status.js +393 -0
- package/src/cloudflare/wrangler.js +17 -1
- package/src/commands/account-auth.js +1 -1
- package/src/commands/app.js +106 -0
- package/src/commands/autorag.js +77 -0
- package/src/commands/brand.js +293 -0
- package/src/commands/cad.js +1 -0
- package/src/commands/connections.js +126 -29
- package/src/commands/context-economics.js +8 -0
- package/src/commands/db.js +7 -0
- package/src/commands/deploy.js +2 -2
- package/src/commands/env.js +5 -4
- package/src/commands/eval.js +209 -14
- package/src/commands/go.js +365 -0
- package/src/commands/goap.js +176 -0
- package/src/commands/identity-init.js +27 -3
- package/src/commands/identity-protocol.js +195 -0
- package/src/commands/knowledge.js +64 -5
- package/src/commands/mcp.js +341 -0
- package/src/commands/merkle-persist.js +3 -1
- package/src/commands/merkle.js +18 -3
- package/src/commands/models.js +109 -23
- package/src/commands/plugins.js +175 -0
- package/src/commands/preferences.js +28 -8
- package/src/commands/product.js +53 -10
- package/src/commands/providers.js +389 -0
- package/src/commands/resume.js +9 -5
- package/src/commands/runtime-status.js +154 -0
- package/src/commands/shell.js +469 -54
- package/src/commands/status.js +82 -7
- package/src/commands/tunnel.js +228 -195
- package/src/commands/whoami.js +115 -22
- package/src/context/budget.js +6 -0
- package/src/context/index.js +2 -1
- package/src/context/project-card.js +75 -0
- package/src/errors/contract.js +34 -211
- package/src/errors/diagnostic.js +95 -50
- package/src/errors/index.js +6 -13
- package/src/eval/index.js +6 -0
- package/src/eval/live.js +439 -0
- package/src/features/resolve.js +242 -0
- package/src/go/build.js +108 -0
- package/src/go/cloudflare.js +207 -0
- package/src/go/contract.js +139 -0
- package/src/go/discover.js +96 -0
- package/src/go/index.js +13 -0
- package/src/go/receipts.js +77 -0
- package/src/go/registry.js +223 -0
- package/src/go/verify.js +31 -0
- package/src/index.js +100 -1
- package/src/knowledge/config.js +13 -5
- package/src/knowledge/engine.js +23 -8
- package/src/knowledge/index.js +1 -0
- package/src/knowledge/lane-registry.js +46 -0
- package/src/knowledge/providers/gemini.js +48 -8
- package/src/knowledge/service/client.js +13 -1
- package/src/knowledge/service/grpc-codec.js +156 -53
- package/src/knowledge/service/job-engine.js +133 -11
- package/src/knowledge/service/job-worker.js +34 -5
- package/src/knowledge/service/server.js +10 -1
- package/src/knowledge/store-discovery.js +77 -0
- package/src/lib/account-session.js +100 -25
- package/src/lib/agent-instructions.js +3 -0
- package/src/lib/auth.js +318 -51
- package/src/lib/cad/blender.js +42 -3
- package/src/lib/cad/d1-project-store.js +43 -0
- package/src/lib/cad/discovery.js +616 -0
- package/src/lib/cad/docker-executor.js +352 -0
- package/src/lib/cad/freecad.js +253 -0
- package/src/lib/cad/index.js +40 -0
- package/src/lib/cad/openscad.js +198 -0
- package/src/lib/cad/project-cli.d.ts +2 -0
- package/src/lib/cad/project-cli.js +21 -0
- package/src/lib/cad/project-contract.d.ts +3 -0
- package/src/lib/cad/project-contract.js +1 -0
- package/src/lib/cad/project-recipe.js +30 -0
- package/src/lib/cad/project-runtime.d.ts +2 -0
- package/src/lib/cad/project-runtime.js +53 -0
- package/src/lib/cad/project-store.js +25 -0
- package/src/lib/cad/project-workflows.js +31 -0
- package/src/lib/cad-docker.js +21 -2
- package/src/lib/cli-preferences.js +17 -2
- package/src/lib/core-client.js +97 -33
- package/src/lib/deploy/local-studio.js +6 -5
- package/src/lib/detect-context.js +14 -16
- package/src/lib/dockerize.js +3 -0
- package/src/lib/execution-approvals.js +1 -0
- package/src/lib/identity-scaffold.js +4 -1
- package/src/lib/knowledge-docker.js +9 -1
- package/src/lib/local-sessions.js +124 -34
- package/src/lib/local-status.js +35 -14
- package/src/lib/project-config.js +9 -0
- package/src/lib/provider-credentials.js +233 -55
- package/src/lib/scaffold/resolve-cloudflare-account.js +37 -0
- package/src/lib/scaffold/wizards/cms.js +2 -8
- package/src/lib/scaffold/wizards/worker-api.js +2 -8
- package/src/lib/slash-commands.js +10 -2
- package/src/local/migrations.js +109 -1
- package/src/local/runtime-store.js +31 -5
- package/src/local/sqlite.js +36 -1
- package/src/mcp/authority.js +348 -0
- package/src/mcp/client-adapters.js +431 -0
- package/src/mcp/client.js +172 -0
- package/src/mcp/index.js +47 -0
- package/src/mcp/telemetry.js +103 -0
- package/src/models/catalog.js +329 -51
- package/src/models/discovery.js +59 -4
- package/src/models/index.js +2 -0
- package/src/models/inventory-core.js +182 -0
- package/src/models/policy.js +20 -0
- package/src/plugins/cloudflare.js +103 -0
- package/src/plugins/completeful.js +69 -0
- package/src/plugins/contracts.js +86 -0
- package/src/plugins/index.js +11 -0
- package/src/plugins/registry.js +207 -0
- package/src/plugins/resource-scope.js +45 -0
- package/src/plugins/runtime.js +118 -0
- package/src/plugins/vectorize.js +31 -0
- package/src/progression/engine.js +171 -0
- package/src/progression/index.js +1 -0
- package/src/providers/cloudflare-chat.js +1 -1
- package/src/providers/gemini-generate-content.js +2 -1
- package/src/providers/openai-responses.js +45 -16
- package/src/providers/tool-schema.js +85 -0
- package/src/repository/index.js +29 -0
- package/src/rpc/generated/errors_pb.js +961 -1
- package/src/security/local-vault.js +415 -0
- package/src/security/process.js +20 -4
- package/src/status/actions.js +192 -0
- package/src/tools/hydrate.js +5 -1
- package/src/tools/index.js +7 -0
- package/src/tools/redact.js +64 -0
- package/src/tools/registry.js +83 -0
- package/src/tools/runtime.js +257 -0
- package/src/tools/search.js +21 -8
- package/src/ui/ansi.js +117 -3
- package/src/ui/cli/activity.js +76 -7
- package/src/ui/cli/footer.js +110 -9
- package/src/ui/cli/help.js +14 -5
- package/src/ui/wireframes.js +166 -0
- package/test/account-session.test.mjs +76 -11
- package/test/apps-scaffold-contract.test.mjs +58 -0
- package/test/capabilities.test.mjs +1 -1
- package/test/cli/eval-live.test.mjs +219 -0
- package/test/cli/go.test.mjs +71 -0
- package/test/cli/local-vault-and-provider-setup.test.mjs +268 -0
- package/test/cli/mcp-client.test.mjs +245 -0
- package/test/cli/runtime-ui.test.mjs +69 -2
- package/test/cli/status-actions.test.mjs +88 -0
- package/test/cli/wireframes-go-registry.test.mjs +54 -0
- package/test/cloudflare-connector.test.mjs +3 -6
- package/test/cloudflare-runtime.test.mjs +8 -1
- package/test/context.test.mjs +15 -0
- package/test/error-diagnostics.test.mjs +9 -0
- package/test/fixtures/cad/courtyard-house.json +208 -0
- package/test/go/cloudflare-probe.test.mjs +53 -0
- package/test/integration/app-command.test.mjs +55 -0
- package/test/integration/cad-discovery.test.mjs +158 -0
- package/test/integration/cad-docker-executor.test.mjs +249 -0
- package/test/integration/cad-execution.test.mjs +184 -0
- package/test/integration/cad-project-app.test.mjs +31 -0
- package/test/integration/cad-project-d1.test.mjs +25 -0
- package/test/integration/cad-project-native.test.mjs +24 -0
- package/test/integration/cad-project-workflow.test.mjs +9 -0
- package/test/integration/cad-project.test.mjs +82 -0
- package/test/integration/cli-help.test.mjs +4 -0
- package/test/integration/cms-site-tenancy-contract.test.mjs +256 -0
- package/test/integration/core-client.integration.test.mjs +55 -0
- package/test/integration/error-runtime-rpc.test.mjs +71 -0
- package/test/integration/features-resolve.test.mjs +128 -0
- package/test/integration/install-script.test.mjs +107 -0
- package/test/integration/inventory-core.test.mjs +53 -0
- package/test/integration/plugins-cloudflare.integration.test.mjs +28 -0
- package/test/integration/provider-env-cli.test.mjs +1 -1
- package/test/integration/runtime-migrations.test.mjs +6 -1
- package/test/integration/runtime-status.integration.test.mjs +211 -0
- package/test/integration/scaffold-cloudflare.test.mjs +46 -0
- package/test/integration/storage-architecture.test.mjs +154 -0
- package/test/integration/store-discovery.test.mjs +44 -0
- package/test/integration/terminal-exec.integration.test.mjs +86 -0
- package/test/integration/tool-runtime.test.mjs +124 -0
- package/test/integration/tool-schema.test.mjs +59 -0
- package/test/knowledge-service.test.mjs +4 -0
- package/test/local-sessions.test.mjs +11 -2
- package/test/local-studio-deploy.test.mjs +1 -1
- package/test/model-catalog.test.mjs +28 -1
- package/test/models.test.mjs +159 -5
- package/test/openai-responses.test.mjs +60 -0
- package/test/provider-credentials.test.mjs +15 -5
- package/test/responses-runner.test.mjs +321 -6
- package/test/sdk-worker-contract.test.mjs +5 -1
- package/test/shell.test.mjs +149 -4
- package/test/smoke.mjs +4 -3
- package/test/tools-search.test.mjs +33 -0
- package/test/unit/website-assets-bindings.test.mjs +60 -0
- package/test/whoami-resume.test.mjs +87 -7
- package/examples/gorilla-shell/README.md +0 -15
- package/src/lib/gorilla-template.js +0 -54
- package/src/lib/prompt-byok.js +0 -57
- package/src/lib/save-sdk-token.js +0 -19
- package/templates/gorilla-shell/App.tsx +0 -639
- package/templates/gorilla-shell/README.md +0 -34
- package/templates/gorilla-shell/index.html +0 -15
- package/templates/gorilla-shell/main.jsx +0 -9
- package/templates/gorilla-shell/package.json +0 -19
- package/templates/gorilla-shell/vite.config.js +0 -21
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
# Multi-agent sprint plan — remaining AgentSam work
|
|
2
|
+
|
|
3
|
+
**Purpose:** Finish the open post-PR51 backlog end-to-end across bounded
|
|
4
|
+
AgentSam / Cursor Cloud Agent sessions, and produce a comparable grade for
|
|
5
|
+
Cursor Cloud Agent API value on real AgentSam work (not toy prompts).
|
|
6
|
+
|
|
7
|
+
**Status authority:** [`RECONCILIATION-2026-09-19.md`](./RECONCILIATION-2026-09-19.md)
|
|
8
|
+
**Canonical contract:** `AGENTSAM.md` (via `AGENTS.md` shim)
|
|
9
|
+
**Repo:** `SamPrimeaux/agentsam-sdk` · start every session from current `origin/main`
|
|
10
|
+
|
|
11
|
+
**Baseline after push (2026-09-19):**
|
|
12
|
+
```text
|
|
13
|
+
origin/main: 67f4a75541855d16c5baecf29007cab05512b532
|
|
14
|
+
f6dafed feat(instructions): AGENTSAM + AGENTS/CLAUDE shims
|
|
15
|
+
67f4a75 docs: post-PR51 reconciliation status authority
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Global hard rules (every session)**
|
|
19
|
+
|
|
20
|
+
1. Read `./AGENTSAM.md` first. Do not redesign storage / invent Durable Object defaults.
|
|
21
|
+
2. `git fetch --all --prune` · `git worktree list` · `git status -sb` before edits.
|
|
22
|
+
3. No `npm publish`, Worker deploy, worktree delete, force-push, or branch rewrite without Sam approval.
|
|
23
|
+
4. Prefer `git worktree add` / feature branch + PR over direct `main` commits for implementation sessions.
|
|
24
|
+
5. Inspect named parallel branches before rebuilding equivalent work.
|
|
25
|
+
6. Evidence required: commands run, test output, SHAs. No “should work.”
|
|
26
|
+
7. Stop at the session’s Done definition — do not expand into the next session’s scope.
|
|
27
|
+
|
|
28
|
+
**Recommended models (Cursor Cloud Agent)**
|
|
29
|
+
|
|
30
|
+
| Session type | Model | Effort |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| Default AgentSam implementation | Gemini 3.8 Flash | High |
|
|
33
|
+
| Long tool-chain / multi-branch recon | Muse Spark 1.3 1M | Medium → High if stuck |
|
|
34
|
+
| Already-approved mechanical apply | GPT-5.6 Terra | Fast |
|
|
35
|
+
| Architecture stuck / merge conflict hell | GPT-5.6 Sol | default |
|
|
36
|
+
|
|
37
|
+
**A/B grade track (optional, after S1–S2 have a golden brief):** run the *same*
|
|
38
|
+
S1 brief on Gemini 3.8 Flash High vs Muse Spark 1.3 1M Medium and score both
|
|
39
|
+
with the rubric in §Grade.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Cloud Agent API evaluation design
|
|
44
|
+
|
|
45
|
+
Each session below is a **Cloud Agent job unit**: fixed prompt, fixed repo,
|
|
46
|
+
fixed Done checklist, fixed grade dimensions. Run them as separate API
|
|
47
|
+
invocations (or sequential AgentSam CLI sessions) so you can score:
|
|
48
|
+
|
|
49
|
+
| Dimension | What to score (1–5) |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| D1 Inspect-before-invent | Opens existing files/branches before writing parallel systems |
|
|
52
|
+
| D2 Architecture fidelity | Honors AGENTSAM.md, storage law, session boundaries |
|
|
53
|
+
| D3 Tool-chain survival | Completes 15–40+ tool steps without abandoning |
|
|
54
|
+
| D4 Finish | Hits Done definition; opens PR or leaves reviewable branch |
|
|
55
|
+
| D5 Verify | Runs named tests / live CLI checks; pastes evidence |
|
|
56
|
+
| D6 No rebuild | Does not recreate studio-auth / CMS / connections / help-all |
|
|
57
|
+
| D7 Prose junk | Low fluff; high signal in final report |
|
|
58
|
+
| D8 Cost / latency | Tokens + wall time for the same brief (A/B only) |
|
|
59
|
+
|
|
60
|
+
**Scorecard file (create once, append per job):**
|
|
61
|
+
`docs/plans/CLOUD-AGENT-SCORECARD-2026-09.md` (session id, model, SHA in/out,
|
|
62
|
+
D1–D8, notes, PR URL).
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Dependency graph
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
S0 bootstrap (track UI draft + scorecard stub)
|
|
70
|
+
│
|
|
71
|
+
├─► S1 interactive presence (UI req §§1–5)
|
|
72
|
+
│ └─► S2 status chrome + /model catalog surface
|
|
73
|
+
│
|
|
74
|
+
├─► S3 studio-auth branch decision (parallel with S1)
|
|
75
|
+
├─► S4 connections-binding branch decision (parallel with S1)
|
|
76
|
+
├─► S5 CMS pattern docs + scaffold design (parallel)
|
|
77
|
+
│ └─► S6 scaffold-from-real-app implement
|
|
78
|
+
│
|
|
79
|
+
└─► S7 terminal_remote enrollment (platform; may touch IAM)
|
|
80
|
+
⚠ not blocked by S1–S6; do NOT treat as OAuth
|
|
81
|
+
|
|
82
|
+
S8 optional Muse vs Gemini A/B on frozen S1 brief
|
|
83
|
+
S9 backlog only if capacity (errors / command manifest) — out of critical path
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Critical path to “remaining sprints done”:** S0 → S1 → S2 → (S3∨S4 as needed) → S5 → S6, with S7 on a platform track.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## S0 — Bootstrap · ~15–30 min · Terra Fast or Flash Medium
|
|
91
|
+
|
|
92
|
+
**Goal:** Make the interactive UI brief git-tracked and give Cloud Agents a
|
|
93
|
+
scorecard stub + updated recon tip SHA.
|
|
94
|
+
|
|
95
|
+
**Branch:** `chore/sprint-bootstrap-20260919`
|
|
96
|
+
|
|
97
|
+
**Prompt (paste into Cloud Agent):**
|
|
98
|
+
```text
|
|
99
|
+
Repo: agentsam-sdk. Start from origin/main. Read AGENTSAM.md.
|
|
100
|
+
|
|
101
|
+
1. git fetch --all --prune; git worktree list; do not delete worktrees.
|
|
102
|
+
2. Add and commit the currently untracked file
|
|
103
|
+
docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS.md if present locally;
|
|
104
|
+
if missing, stop and report.
|
|
105
|
+
3. Create docs/plans/CLOUD-AGENT-SCORECARD-2026-09.md with a table template
|
|
106
|
+
(session, model, effort, sha_in, sha_out, D1–D8, pr_url, notes).
|
|
107
|
+
4. Patch docs/plans/RECONCILIATION-2026-09-19.md baseline SHA to current
|
|
108
|
+
origin/main and note UI draft is now tracked.
|
|
109
|
+
5. Open a PR. No npm publish. No deploy. No other features.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Done when:** PR merges (or is merge-ready); UI requirements tracked; scorecard exists.
|
|
113
|
+
|
|
114
|
+
**Grade focus:** D4 Finish, D5 Verify (file presence), D6 No rebuild.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## S1 — Interactive shell presence · ~1–2 h · Gemini 3.8 Flash High
|
|
119
|
+
|
|
120
|
+
**Goal:** Implement UI requirements §§1,3,5 then §2, then scope §4 — presence,
|
|
121
|
+
not architecture.
|
|
122
|
+
|
|
123
|
+
**Depends on:** S0 (or attach the untracked UI file in the job context).
|
|
124
|
+
**Branch:** `feat/cli-interactive-presence`
|
|
125
|
+
**Inspect first:** `src/ui/cli/activity.js`, `footer.js`, `src/commands/shell.js`,
|
|
126
|
+
existing diff helpers under `src/ui/` / `src/lib/`.
|
|
127
|
+
|
|
128
|
+
**Prompt:**
|
|
129
|
+
```text
|
|
130
|
+
Repo: agentsam-sdk. origin/main. Read AGENTSAM.md and
|
|
131
|
+
docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS.md completely.
|
|
132
|
+
|
|
133
|
+
Implement in order: §1 interrupt hint, §3 footer project+action, §5 paste-collapse,
|
|
134
|
+
then §2 shimmer (with truecolor/256 fallback), then §4 only after searching for an
|
|
135
|
+
existing diff formatter (reuse; do not reinvent).
|
|
136
|
+
|
|
137
|
+
Rules: extend existing helpers; no storage changes; no DO; no publish/deploy;
|
|
138
|
+
run git worktree list first; open a PR with screenshots or CLI transcript evidence.
|
|
139
|
+
|
|
140
|
+
Verify: node --check on edited files; focused tests if present; manual
|
|
141
|
+
`node src/cli.js` interactive smoke notes in the PR.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Done when:** All five sections addressed (§4 may be “reuse X + wire call sites”
|
|
145
|
+
if a renderer already exists); PR + evidence.
|
|
146
|
+
|
|
147
|
+
**Grade focus:** D1–D7 (primary Cloud Agent value test for TUI work).
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## S2 — Status chrome + provider-agnostic `/model` · ~2–3 h · Flash High / Muse Medium
|
|
152
|
+
|
|
153
|
+
**Goal:** Product surface that combines Codex run chrome + Cursor model menu:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
project · git · contract AGENTSAM.md ✓ · runtime local SQLite ·
|
|
157
|
+
provider · model · effort · context · usage
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`/model` opens scrollable provider-agnostic catalog (reuse existing models
|
|
161
|
+
command / account-visible catalog — do not invent a second registry).
|
|
162
|
+
|
|
163
|
+
**Depends on:** S1 footer foundation.
|
|
164
|
+
**Branch:** `feat/cli-status-model-catalog`
|
|
165
|
+
**Inspect first:** `src/commands/models.js`, shell slash commands, footer from S1,
|
|
166
|
+
`feat/studio-auth-and-ai-wiring` (1 commit) before touching studio auth UI.
|
|
167
|
+
|
|
168
|
+
**Prompt:**
|
|
169
|
+
```text
|
|
170
|
+
Build the persistent AgentSam session status strip and /model catalog UX
|
|
171
|
+
described in docs/plans/MULTI-AGENT-SPRINTS-2026-09-19.md S2.
|
|
172
|
+
Reuse account-visible models and existing provider credential surfaces.
|
|
173
|
+
Do not rebuild OAuth. Do not change storage authority.
|
|
174
|
+
Before any local-studio auth UI: git log / diff
|
|
175
|
+
origin/feat/studio-auth-and-ai-wiring...main and report whether to cherry-pick.
|
|
176
|
+
PR with before/after footer transcript.
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Done when:** Footer/status shows contract + runtime + model/effort/context/usage;
|
|
180
|
+
`/model` lists real catalog entries; tests or transcript evidence; PR.
|
|
181
|
+
|
|
182
|
+
**Grade focus:** D1, D2, D6 (highest risk of reinventing models/auth).
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## S3 — Studio auth branch triage · ~45–90 min · Flash High
|
|
187
|
+
|
|
188
|
+
**Goal:** Decide keep/merge/abandon for `feat/studio-auth-and-ai-wiring`
|
|
189
|
+
(1 commit ahead / 7 behind) — no blind rewrite.
|
|
190
|
+
|
|
191
|
+
**Branch:** `integrate/studio-auth-ai-wiring` or PR from rebased tip.
|
|
192
|
+
|
|
193
|
+
**Prompt:**
|
|
194
|
+
```text
|
|
195
|
+
Inspect origin/feat/studio-auth-and-ai-wiring vs origin/main.
|
|
196
|
+
Summarize the single unique commit. Rebase or cherry-pick onto a fresh branch
|
|
197
|
+
from main if still valuable. Fix conflicts. Run relevant local-studio / auth tests.
|
|
198
|
+
Open PR or document “abandon because already on main” with evidence.
|
|
199
|
+
Do not expand into full identity redesign.
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Done when:** Merged PR **or** written abandon receipt with SHA evidence.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## S4 — Connections / binding evidence triage · ~1–2 h · Flash High / Muse Medium
|
|
207
|
+
|
|
208
|
+
**Goal:** Land or extract useful bits from
|
|
209
|
+
`origin/fix/connections-binding-evidence` (11 ahead) without breaking
|
|
210
|
+
terminal bindings; feed evidence into later terminal work.
|
|
211
|
+
|
|
212
|
+
**Prompt:**
|
|
213
|
+
```text
|
|
214
|
+
Diff origin/fix/connections-binding-evidence...origin/main.
|
|
215
|
+
Classify commits: merge as-is / cherry-pick subset / abandon.
|
|
216
|
+
If mergeable, rebase onto main, fix tests, open PR.
|
|
217
|
+
Explicitly state how this relates (or does not) to terminal_remote
|
|
218
|
+
platform_identity_missing — do NOT claim it fixes enrollment.
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Done when:** PR or abandon receipt; note for S7 updated.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## S5 — CMS pattern docs + scaffold design · ~1–2 h · Flash High
|
|
226
|
+
|
|
227
|
+
**Goal:** Merge `docs/cms-scaffolding-pattern-reference` (4 commits) and write
|
|
228
|
+
a short design for scaffold-from-real-app (`apps/client-cms-editor`,
|
|
229
|
+
`apps/cad-creator`) — design only, no generator rewrite yet.
|
|
230
|
+
|
|
231
|
+
**Prompt:**
|
|
232
|
+
```text
|
|
233
|
+
1. Rebase/merge origin/docs/cms-scaffolding-pattern-reference onto main → PR.
|
|
234
|
+
2. Add docs/plans/SCAFFOLD-FROM-REAL-APP-DESIGN.md answering:
|
|
235
|
+
template vs fixed platform files; D1/R2/Worker per project vs shared;
|
|
236
|
+
subtree vs copy-parameterize; how IMPORT_PROVENANCE.json is used.
|
|
237
|
+
3. Do not implement scaffold generators in this session.
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Done when:** Docs PR + design merged or merge-ready.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## S6 — Scaffold-from-real-app implement · ~2–4 h · Muse Medium/High or Flash High
|
|
245
|
+
|
|
246
|
+
**Depends on:** S5 design approval (Sam ack in PR or chat).
|
|
247
|
+
**Branch:** `feat/scaffold-from-real-apps`
|
|
248
|
+
|
|
249
|
+
**Prompt:**
|
|
250
|
+
```text
|
|
251
|
+
Implement agentsam scaffold cms (and cad-creator if design says so) per
|
|
252
|
+
docs/plans/SCAFFOLD-FROM-REAL-APP-DESIGN.md.
|
|
253
|
+
Stand up parameterized instances of apps/client-cms-editor / apps/cad-creator —
|
|
254
|
+
do not regenerate the thin toy templates as the primary path.
|
|
255
|
+
Keep thin templates only if design marks them deprecated/compat.
|
|
256
|
+
Tests: scaffold dry-run or integration assertions; node --check; PR.
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Done when:** Scaffold produces real-app-shaped tree; tests green; PR.
|
|
260
|
+
|
|
261
|
+
**Grade focus:** D1, D6 (reinvention risk extreme).
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## S7 — terminal_remote enrollment (platform track) · separate job · Sol or Flash High
|
|
266
|
+
|
|
267
|
+
**Repo note:** Likely spans `agentsam-sdk` **and** IAM / terminal host config.
|
|
268
|
+
Treat as Cloud Agent job against the repo(s) Sam designates; SDK-only agents
|
|
269
|
+
must stop at diagnosis + SDK-side receipts if host access is missing.
|
|
270
|
+
|
|
271
|
+
**Prompt:**
|
|
272
|
+
```text
|
|
273
|
+
terminal_remote fails with platform_identity_missing under platform_bridge.
|
|
274
|
+
Prior live evidence:
|
|
275
|
+
connection_key_set: false
|
|
276
|
+
platform_bridge_key_set: true
|
|
277
|
+
machine_key_set: true
|
|
278
|
+
account_id / connection_id / instance_id: null
|
|
279
|
+
|
|
280
|
+
This is NOT the CLI OAuth bug. Do not reopen PR #450 / auth-closure as the fix.
|
|
281
|
+
|
|
282
|
+
Mission: reconfirm fingerprint on remote exec host; implement enrollment/
|
|
283
|
+
pairing/provisioning so connection identity is non-null; prove
|
|
284
|
+
agentsam_terminal_remote (or equivalent) succeeds with evidence.
|
|
285
|
+
If this session lacks host credentials, produce an exact ops runbook +
|
|
286
|
+
SDK instrumentation PR only — do not invent OAuth token reshaping.
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Done when:** Live exec succeeds **or** blocked with precise missing secret/host
|
|
290
|
+
access listed for Sam.
|
|
291
|
+
|
|
292
|
+
**Grade focus:** D2 (correct diagnosis), D6 (no OAuth rebuild), D5 (live proof).
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## S8 — Model A/B (optional) · same brief as S1 frozen
|
|
297
|
+
|
|
298
|
+
Run identical S1 prompt on:
|
|
299
|
+
|
|
300
|
+
1. Gemini 3.8 Flash High
|
|
301
|
+
2. Muse Spark 1.3 1M Medium (escalate High only if stalled)
|
|
302
|
+
|
|
303
|
+
Fill scorecard D1–D8 + cost. Prefer the winner for S6/S7.
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## S9 — Explicit non-goals / later backlog
|
|
308
|
+
|
|
309
|
+
Do **not** assign as Cloud Agent “finish remaining sprints” work:
|
|
310
|
+
|
|
311
|
+
- Storage / DO architecture redesign
|
|
312
|
+
- Errors-v1 divergent branches (56/40 ahead, 200+ behind) without a dedicated
|
|
313
|
+
errors mission
|
|
314
|
+
- Full command-manifest unification / lineage object / vocabulary CI
|
|
315
|
+
- `npm publish` / production Worker deploy
|
|
316
|
+
- Deleting worktrees
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Suggested Cloud Agent schedule (calendar)
|
|
321
|
+
|
|
322
|
+
| Day | Sessions | Parallelism |
|
|
323
|
+
| --- | --- | --- |
|
|
324
|
+
| Day 1 | S0 → S1 | S3 and S4 can start after S0 in parallel |
|
|
325
|
+
| Day 2 | S2 · finish S3/S4 | S5 in parallel |
|
|
326
|
+
| Day 3 | S6 after Sam approves S5 | S7 platform track anytime |
|
|
327
|
+
| Day 4 | S8 A/B if desired · merge lag · smoke | — |
|
|
328
|
+
|
|
329
|
+
**Human gates (Sam only):**
|
|
330
|
+
|
|
331
|
+
1. Approve S5 design before S6.
|
|
332
|
+
2. Approve any publish/deploy.
|
|
333
|
+
3. Provide remote host / IAM access for S7 if agents are blocked.
|
|
334
|
+
4. Pick A/B winner after S8.
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Session handoff packet (attach to every Cloud Agent job)
|
|
339
|
+
|
|
340
|
+
```text
|
|
341
|
+
AGENTSAM.md
|
|
342
|
+
docs/plans/RECONCILIATION-2026-09-19.md
|
|
343
|
+
docs/plans/MULTI-AGENT-SPRINTS-2026-09-19.md (this file — your session id only)
|
|
344
|
+
docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS.md (S0–S2)
|
|
345
|
+
docs/plans/CLOUD-AGENT-SCORECARD-2026-09.md (append your row)
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
**Return format required from every agent:**
|
|
349
|
+
|
|
350
|
+
```text
|
|
351
|
+
## Session <id>
|
|
352
|
+
Model / effort:
|
|
353
|
+
SHA in / SHA out:
|
|
354
|
+
Branch / PR:
|
|
355
|
+
Done checklist: [ ] ...
|
|
356
|
+
Grade self-score D1–D7:
|
|
357
|
+
Evidence (commands + outcomes):
|
|
358
|
+
Stopped because (if incomplete):
|
|
359
|
+
Next session should start at:
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Definition of “remaining sprints done”
|
|
365
|
+
|
|
366
|
+
All of the following are true:
|
|
367
|
+
|
|
368
|
+
- [ ] S0–S2 merged (interactive presence + status/`/model` chrome)
|
|
369
|
+
- [ ] S3–S4 decided (merged or abandon receipts)
|
|
370
|
+
- [ ] S5–S6 merged (CMS docs + real-app scaffold path)
|
|
371
|
+
- [ ] S7 live green **or** blocked only on Sam-held host secrets (runbook filed)
|
|
372
|
+
- [ ] Scorecard has ≥3 scored Cloud Agent jobs (enough to grade API value)
|
|
373
|
+
- [ ] Still no surprise npm publish / Worker deploy / storage redesign
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Next-agent handoff — stack on inventory PR
|
|
2
|
+
|
|
3
|
+
**Read first:** `AGENTSAM.md` · this file · open PR branch below
|
|
4
|
+
**Do not** start from stale Astra notes. Do not redesign storage. Do not invent DOs.
|
|
5
|
+
|
|
6
|
+
## Where we are (2026-09-19)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
Branch (pushed): feat/per-user-model-inventory-dist @ dc24e62
|
|
10
|
+
Open PR: https://github.com/SamPrimeaux/agentsam-sdk/pull/new/feat/per-user-model-inventory-dist
|
|
11
|
+
(gh auth was 401 last push — create/merge PR if not open yet)
|
|
12
|
+
main tip before this work: 5affb1f (recon + AGENTS shims + sprint plan)
|
|
13
|
+
verify:release: PASS on this branch
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Commits on the branch (do not redo):
|
|
17
|
+
|
|
18
|
+
1. Cursor in `API_PROVIDERS` + live discovery
|
|
19
|
+
2. Shared `src/models/inventory-core.js`
|
|
20
|
+
3. Studio inventory picker + fail-closed `{provider, model_id}` chat
|
|
21
|
+
4. `/usage` panel + activity chrome
|
|
22
|
+
5. `agentsam app` + CMS/Studio manifests/bins
|
|
23
|
+
6. `scripts/install.sh` npm-bootstrap installer
|
|
24
|
+
|
|
25
|
+
Untracked (leave unless Sam says incorporate):
|
|
26
|
+
`docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS.md`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Critical correction — “platform” is not a stub
|
|
31
|
+
|
|
32
|
+
Local Studio **already ships with real production bindings and secrets**.
|
|
33
|
+
`credential_plane: platform` means **desk/org Worker secrets + bindings**, not
|
|
34
|
+
“we haven’t set anything up.”
|
|
35
|
+
|
|
36
|
+
### Documented production surface (`agentsam-sdk` Worker)
|
|
37
|
+
|
|
38
|
+
**Bindings (honor these):**
|
|
39
|
+
|
|
40
|
+
| Binding | Type | Value |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `AGENTSAM_WAI` | Workers AI | catalog |
|
|
43
|
+
| `DB` | D1 | `inneranimalmedia-business` |
|
|
44
|
+
| `EXECOS` | Service | `execos` |
|
|
45
|
+
| `HYPERDRIVE` | Hyperdrive | supabase hyperdrive |
|
|
46
|
+
| `PTY_SERVICE` | VPC Service | `iam-vpc` |
|
|
47
|
+
| `WEBSITE_ASSETS` | R2 | `agentsam-os-blueprint-content` |
|
|
48
|
+
| `ASSETS` | Assets | `.output/public` |
|
|
49
|
+
|
|
50
|
+
**Runtime secrets/vars already present (do not print values):**
|
|
51
|
+
|
|
52
|
+
- `OPENAI_API_KEY`, `GEMINI_API_KEY`, `CURSOR_API_KEY`
|
|
53
|
+
- `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_OAUTH_*`, break-glass admin token
|
|
54
|
+
- `AGENTSAM_BRIDGE_KEY`
|
|
55
|
+
- `IAM_CLIENT_ID` / `IAM_CLIENT_SECRET` / `IAM_OAUTH_ISSUER`
|
|
56
|
+
|
|
57
|
+
So Studio inventory/chat **can and should** discover models from these
|
|
58
|
+
platform credentials today. That is intentional desk authority.
|
|
59
|
+
|
|
60
|
+
### What is still missing (your job)
|
|
61
|
+
|
|
62
|
+
**Layer vault BYOK on top of platform — prefer vault when the logged-in user has it.**
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
authenticated session
|
|
66
|
+
│
|
|
67
|
+
▼
|
|
68
|
+
user_id / account_id
|
|
69
|
+
│
|
|
70
|
+
├─► D1 user_secrets unwrap (DB + VAULT_MASTER_KEY) → source: user_vault
|
|
71
|
+
│ preferred per provider when present
|
|
72
|
+
│
|
|
73
|
+
└─► else platform Worker secret / AGENTSAM_WAI → source: platform
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Hard rules (unchanged):
|
|
77
|
+
|
|
78
|
+
- Never read `~/.agentsam` from Studio.
|
|
79
|
+
- Never return secrets to the browser.
|
|
80
|
+
- Never silently swap providers (no XAI→OpenAI).
|
|
81
|
+
- Selection stays `{ provider, model_id }`.
|
|
82
|
+
- Sam’s machine `env.d` ≠ Connor’s Studio options.
|
|
83
|
+
|
|
84
|
+
Worker already has vault routes + `GET /api/llm/inventory` provenance.
|
|
85
|
+
TanStack `/api/llm/inventory` + `/api/chat` currently use **platform** via
|
|
86
|
+
`apps/local-studio/shared/agentsam/src/studio-inventory.ts`.
|
|
87
|
+
|
|
88
|
+
**Next implementation slice:** bind IAM/browser session → `user_id`, unwrap
|
|
89
|
+
that user’s `user_secrets` server-side, merge vault-over-platform into
|
|
90
|
+
`buildStudioInventory` / chat credential resolve. Reuse
|
|
91
|
+
`apps/local-studio/backend/worker/index.js` vault decrypt path — do not invent
|
|
92
|
+
a second vault.
|
|
93
|
+
|
|
94
|
+
Inspect before rebuild:
|
|
95
|
+
|
|
96
|
+
- `feat/studio-auth-and-ai-wiring` (worktree) — **auth portal / session gate only**;
|
|
97
|
+
**reject** any XAI→OpenAI chat fallback hunk.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Exact next batches (pick one, finish it, PR)
|
|
102
|
+
|
|
103
|
+
### A — Session→vault inventory (highest leverage) · Flash High
|
|
104
|
+
|
|
105
|
+
1. Checkout `feat/per-user-model-inventory-dist` (or merge it to main first if Sam approves).
|
|
106
|
+
2. Wire Studio auth session so inventory/chat get a real `user_id` (not `studio-local`).
|
|
107
|
+
3. Server-side: vault unwrap for that user → merge over platform credentials.
|
|
108
|
+
4. Prove: user A inventory ≠ user B; secrets never in JSON; mismatch still 409.
|
|
109
|
+
5. Route Cloudflare curated models through `env.AGENTSAM_WAI` when provider is
|
|
110
|
+
`cloudflare` / Workers AI lane (binding already exists).
|
|
111
|
+
|
|
112
|
+
### B — Auth portal live · Flash High
|
|
113
|
+
|
|
114
|
+
1. Inspect `feat/studio-auth-and-ai-wiring` vs main.
|
|
115
|
+
2. Cherry-pick **portal + Worker identity routes only** (no AI fallback).
|
|
116
|
+
3. Prove `/auth/login` `/auth/signup` `/auth/reset` on Studio host.
|
|
117
|
+
4. That unblocks A’s session→user_id.
|
|
118
|
+
|
|
119
|
+
### C — Host `/install` · Terra Fast / Flash Medium
|
|
120
|
+
|
|
121
|
+
SDK already has `scripts/install.sh`. IAM/host must serve:
|
|
122
|
+
|
|
123
|
+
`GET https://agentsam.inneranimalmedia.com/install` → that script body.
|
|
124
|
+
|
|
125
|
+
App selectors: `/install/cad` `/install/cms` `/install/studio` (same engine, different `--app`).
|
|
126
|
+
|
|
127
|
+
### D — Interactive UI polish · Flash High
|
|
128
|
+
|
|
129
|
+
Use untracked `docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS.md` against
|
|
130
|
+
activity/footer/shell (partially done by `/usage` commit). Finish interrupt
|
|
131
|
+
hint / paste-collapse / shimmer if still open — extend, don’t rebuild.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Do not touch / already done
|
|
136
|
+
|
|
137
|
+
| Item | Status |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Project SQLite storage / no default DOs | Done (PR #51) |
|
|
140
|
+
| `agentsam help all` | Works on main |
|
|
141
|
+
| Cursor machine discovery | Done on this branch |
|
|
142
|
+
| Static Studio Grok-only menu | Replaced on this branch |
|
|
143
|
+
| `agentsam app` manifests | Done on this branch |
|
|
144
|
+
| npm publish / surprise deploy | Forbidden without Sam |
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Operating rules for this handoff
|
|
149
|
+
|
|
150
|
+
1. `git fetch --all --prune` · `git worktree list` before create/delete.
|
|
151
|
+
2. One focused PR; keep stacking on `feat/per-user-model-inventory-dist` unless merged.
|
|
152
|
+
3. Run `npm run verify:release` before claiming done.
|
|
153
|
+
4. End with: SHA, tests, remaining blockers with evidence, next slice letter (A/B/C/D).
|
|
154
|
+
5. If blocked on IAM session cookies / vault master key / deploy, stop with exact missing access — don’t invent OAuth reshapes.
|
|
155
|
+
|
|
156
|
+
## Return format
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
## Session
|
|
160
|
+
Slice: A|B|C|D
|
|
161
|
+
SHA in / out:
|
|
162
|
+
PR:
|
|
163
|
+
Done:
|
|
164
|
+
Evidence:
|
|
165
|
+
Blocked (if any):
|
|
166
|
+
Next slice:
|
|
167
|
+
```
|