@inneranimalmedia/agentsam-sdk 2.6.4 → 2.6.5
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 +11 -0
- package/README.md +15 -9
- package/apps/client-cms-editor/AGENTS.md +12 -0
- package/apps/client-cms-editor/IMPORT_PROVENANCE.json +8 -0
- package/apps/client-cms-editor/README.md +72 -0
- package/apps/client-cms-editor/agentsam.app.json +57 -0
- package/apps/client-cms-editor/backend/README.md +5 -0
- package/apps/client-cms-editor/backend/package.json +22 -0
- package/apps/client-cms-editor/backend/src/api/client.ts +200 -0
- package/apps/client-cms-editor/backend/src/demo-bootstrap.ts +145 -0
- package/apps/client-cms-editor/backend/src/index.ts +6 -0
- package/apps/client-cms-editor/backend/src/model.ts +115 -0
- package/apps/client-cms-editor/backend/src/preview/bridge.ts +79 -0
- package/apps/client-cms-editor/backend/src/preview/urls.ts +55 -0
- package/apps/client-cms-editor/backend/src/routing/cms-route.js +293 -0
- package/apps/client-cms-editor/backend/src/routing/index.js +10 -0
- package/apps/client-cms-editor/backend/src/storefront.ts +52 -0
- package/apps/client-cms-editor/backend/tsconfig.json +15 -0
- package/apps/client-cms-editor/backend/worker/index.js +34 -0
- package/apps/client-cms-editor/backend/wrangler.jsonc +11 -0
- package/apps/client-cms-editor/bin/agentsam-cms.mjs +229 -0
- package/apps/client-cms-editor/frontend/index.html +12 -0
- package/apps/client-cms-editor/frontend/package.json +33 -0
- package/apps/client-cms-editor/frontend/src/AgentSamDrawer.tsx +188 -0
- package/apps/client-cms-editor/frontend/src/CmsAgentSurface.tsx +191 -0
- package/apps/client-cms-editor/frontend/src/CmsEditor.tsx +1345 -0
- package/apps/client-cms-editor/frontend/src/env.d.ts +14 -0
- package/apps/client-cms-editor/frontend/src/index.ts +8 -0
- package/apps/client-cms-editor/frontend/src/lib/content-safety.ts +63 -0
- package/apps/client-cms-editor/frontend/src/main.tsx +17 -0
- package/apps/client-cms-editor/frontend/src/mount.tsx +51 -0
- package/apps/client-cms-editor/frontend/src/styles/agentsam-drawer.css +214 -0
- package/apps/client-cms-editor/frontend/src/styles/cmsShell.css +1739 -0
- package/apps/client-cms-editor/frontend/src/styles/studio.css +106 -0
- package/apps/client-cms-editor/frontend/src/surfaces/CmsDashboard.tsx +313 -0
- package/apps/client-cms-editor/frontend/src/surfaces/CmsGuidedChatHero.tsx +121 -0
- package/apps/client-cms-editor/frontend/src/surfaces/CmsHubPage.tsx +132 -0
- package/apps/client-cms-editor/frontend/src/surfaces/CmsSiteSwitcher.tsx +176 -0
- package/apps/client-cms-editor/frontend/src/surfaces/index.ts +5 -0
- package/apps/client-cms-editor/frontend/src/surfaces/types.ts +48 -0
- package/apps/client-cms-editor/frontend/tsconfig.json +25 -0
- package/apps/client-cms-editor/frontend/vite.config.ts +13 -0
- package/apps/client-cms-editor/package-lock.json +3832 -0
- package/apps/client-cms-editor/package.json +23 -0
- package/apps/client-cms-editor/reference/DONOR_README.md +52 -0
- package/apps/client-cms-editor/reference/DONOR_package-lock.json +1253 -0
- package/apps/client-cms-editor/reference/DONOR_tsconfig.json +15 -0
- package/apps/client-cms-editor/shared/cms/package.json +21 -0
- package/apps/client-cms-editor/shared/cms/src/agent-context.ts +35 -0
- package/apps/client-cms-editor/shared/cms/src/cloudflare-bindings.ts +51 -0
- package/apps/client-cms-editor/shared/cms/src/editor-types.ts +58 -0
- package/apps/client-cms-editor/shared/cms/src/index.ts +5 -0
- package/apps/client-cms-editor/shared/cms/src/publication.ts +24 -0
- package/apps/client-cms-editor/shared/cms/src/routes.ts +11 -0
- package/apps/client-cms-editor/shared/cms/tsconfig.json +12 -0
- package/bin/agentsam-rapid-rust +36 -0
- package/docs/AUTH_IDENTITY_CONTRACT.md +2 -0
- package/docs/MACHINE_INTELLIGENCE.md +120 -0
- package/docs/WINDOWS_RUNTIME_INSTALL.md +30 -0
- package/docs/architecture/AGENTSAM_APPLICATION_CONTRACT.md +188 -0
- package/docs/architecture/AGENTSAM_RUNTIME_PROTOCOL.md +151 -0
- package/docs/architecture/LOCAL_STUDIO_CLOUDFLARE_OAUTH.md +12 -4
- package/docs/architecture/R2_SLUG_NAMESPACE.md +20 -0
- package/docs/architecture/WORK_PRODUCT_EXTRACTION.md +97 -0
- package/docs/brand/AGENT_SAM_ICON_GRAMMAR.md +70 -0
- package/docs/content-studio/HOST_MOUNT_CHECKLIST.md +71 -0
- package/docs/content-studio/REVISION_GATE_2026-09-27.md +501 -0
- package/docs/contracts/capability-install-planner.md +67 -0
- package/docs/contracts/environment-vocabulary.md +195 -0
- package/docs/contracts/google-cloud-oauth-setup.md +199 -0
- package/docs/local-studio/WORKMODE_DONOR_NOTES.md +1 -1
- package/docs/plans/LOCAL-STUDIO-GRADUATION-2026-09-26.md +290 -0
- package/docs/plans/LOCAL-STUDIO-REAL-APP-CONTRACT-ADDENDUM-2026-09-27.md +394 -0
- package/docs/plans/MACHINE-FIRST-APPS-TUI-2026-09-24.md +227 -0
- package/docs/plans/TOMORROW-EXTENSIVE-TODO-2026-09-26.md +221 -0
- package/docs/plans/TOMORROW-MACHINE-FIRST-BRIEFING.md +145 -0
- package/docs/plans/UNIVERSAL-INGEST-MACHINE-FIRST-2026-09-24.md +215 -0
- package/docs/plugins.md +2 -2
- package/docs/product/AGENTSAM_PRODUCT_EXPERIENCE_STANDARD.md +280 -0
- package/docs/product/LOCAL_STUDIO_DESKTOP_EXPERIENCE.md +139 -0
- package/docs/product/README.md +8 -0
- package/docs/rapid-rust-wasm.md +35 -0
- package/migrations/d1/0016_cloudflare_oauth_user_oauth_tokens_ssot.sql +14 -0
- package/package.json +73 -14
- package/packages/agentsam-brand/README.md +106 -11
- package/packages/agentsam-brand/bin/agentsam-brand.mjs +9 -0
- package/packages/agentsam-brand/package.json +39 -7
- package/packages/agentsam-brand/src/adapters/cloudflare-images.js +453 -0
- package/packages/agentsam-brand/src/adapters/cloudflare-r2.js +74 -0
- package/packages/agentsam-brand/src/adapters/d1-registry.js +26 -0
- package/packages/agentsam-brand/src/adapters/filesystem.js +59 -0
- package/packages/agentsam-brand/src/adapters/memory.js +31 -0
- package/packages/agentsam-brand/src/cli/controller.js +503 -0
- package/packages/agentsam-brand/src/cli/wizard.js +526 -0
- package/packages/agentsam-brand/src/core/capabilities.js +201 -0
- package/packages/agentsam-brand/src/core/derivatives.js +211 -0
- package/packages/agentsam-brand/src/core/errors.js +12 -0
- package/packages/agentsam-brand/src/core/ingest.js +195 -0
- package/packages/agentsam-brand/src/core/inspect.js +109 -0
- package/packages/agentsam-brand/src/core/keys.js +83 -0
- package/packages/agentsam-brand/src/core/naming.js +142 -0
- package/packages/agentsam-brand/src/core/optimize.js +316 -0
- package/packages/agentsam-brand/src/core/pack.js +305 -0
- package/packages/agentsam-brand/src/core/plan.js +276 -0
- package/packages/agentsam-brand/src/core/preview.js +159 -0
- package/packages/agentsam-brand/src/core/processors/cloudflare.js +68 -0
- package/packages/agentsam-brand/src/core/processors/contract.js +203 -0
- package/packages/agentsam-brand/src/core/processors/index.js +148 -0
- package/packages/agentsam-brand/src/core/processors/native.js +82 -0
- package/packages/agentsam-brand/src/core/processors/sharp.js +113 -0
- package/packages/agentsam-brand/src/core/processors/squoosh-binary.js +195 -0
- package/packages/agentsam-brand/src/core/promote.js +288 -0
- package/packages/agentsam-brand/src/core/receipts.js +155 -0
- package/packages/agentsam-brand/src/core/v2/compile.js +280 -0
- package/packages/agentsam-brand/src/core/v2/derivatives-semantic.js +207 -0
- package/packages/agentsam-brand/src/core/v2/ingest-graph.js +387 -0
- package/packages/agentsam-brand/src/core/v2/roles.js +180 -0
- package/packages/agentsam-brand/src/core/v2/schema.js +209 -0
- package/packages/agentsam-brand/src/core/v2/templates.js +114 -0
- package/packages/agentsam-brand/src/index.js +193 -36
- package/packages/agentsam-brand/src/presets/app-icon.json +16 -0
- package/packages/agentsam-brand/src/presets/favicon.json +17 -0
- package/packages/agentsam-brand/src/presets/hero.json +12 -0
- package/packages/agentsam-brand/src/presets/index.js +40 -0
- package/packages/agentsam-brand/src/presets/logo.json +12 -0
- package/packages/agentsam-brand/src/presets/model.json +8 -0
- package/packages/agentsam-brand/src/presets/og-image.json +10 -0
- package/packages/agentsam-brand/src/presets/product-shot.json +11 -0
- package/packages/agentsam-brand/src/presets/social-image.json +10 -0
- package/packages/agentsam-brand/src/presets/web-image.json +10 -0
- package/packages/agentsam-contracts/src/artifacts.ts +41 -0
- package/packages/agentsam-knowledge/src/autorag/index.js +1 -1
- package/packages/agentsam-knowledge/src/providers/index.js +6 -4
- package/packages/agentsam-knowledge/src/providers/ollama-endpoint.js +31 -0
- package/packages/agentsam-knowledge/test/autorag.test.mjs +22 -1
- package/packages/agentsam-nav/package.json +2 -2
- package/packages/agentsam-rapid-rust/Cargo.lock +344 -0
- package/packages/agentsam-rapid-rust/Cargo.toml +18 -0
- package/packages/agentsam-rapid-rust/README.md +5 -0
- package/packages/agentsam-rapid-rust/src/main.rs +718 -0
- package/packages/agentsam-rapid-rust/templates/api/Cargo.toml.tmpl +18 -0
- package/packages/agentsam-rapid-rust/templates/api/src/lib.rs.tmpl +17 -0
- package/packages/agentsam-rapid-rust/templates/common/README.md.tmpl +22 -0
- package/packages/agentsam-rapid-rust/templates/common/package.json.tmpl +12 -0
- package/packages/agentsam-rapid-rust/templates/common/wrangler.toml.tmpl +6 -0
- package/packages/agentsam-rapid-rust/templates/crypto-auth/Cargo.toml.tmpl +21 -0
- package/packages/agentsam-rapid-rust/templates/crypto-auth/src/lib.rs.tmpl +32 -0
- package/packages/agentsam-rapid-rust/templates/data-processor/Cargo.toml.tmpl +18 -0
- package/packages/agentsam-rapid-rust/templates/data-processor/src/lib.rs.tmpl +41 -0
- package/packages/agentsam-rapid-rust/templates/shared-core/Cargo.toml.tmpl +9 -0
- package/packages/agentsam-rapid-rust/templates/shared-core/core/Cargo.toml.tmpl +7 -0
- package/packages/agentsam-rapid-rust/templates/shared-core/core/src/lib.rs.tmpl +23 -0
- package/packages/agentsam-rapid-rust/templates/shared-core/worker/Cargo.toml.tmpl +12 -0
- package/packages/agentsam-rapid-rust/templates/shared-core/worker/src/lib.rs.tmpl +16 -0
- package/packages/agentsam-rapid-rust/templates/shared-core/wrangler.toml.tmpl +6 -0
- package/packages/agentsam-repository/src/index.js +1 -0
- package/packages/agentsam-repository/src/merkle/semantic.js +3 -10
- package/packages/agentsam-repository/src/source-types.js +85 -0
- package/packages/agentsam-vault/README.md +96 -0
- package/packages/agentsam-vault/package.json +32 -0
- package/packages/agentsam-vault/src/contracts/credential.d.ts +78 -0
- package/packages/agentsam-vault/src/contracts/credential.js +132 -0
- package/packages/agentsam-vault/src/crypto/aes-gcm.d.ts +30 -0
- package/packages/agentsam-vault/src/crypto/aes-gcm.js +107 -0
- package/packages/agentsam-vault/src/crypto/oauth-envelope.js +150 -0
- package/packages/agentsam-vault/src/index.d.ts +9 -0
- package/packages/agentsam-vault/src/index.js +27 -0
- package/packages/agentsam-vault/src/providers/registry.js +90 -0
- package/packages/agentsam-vault/src/runtime/resolver.js +77 -0
- package/packages/agentsam-workbench/README.md +24 -0
- package/packages/agentsam-workbench/package.json +38 -0
- package/packages/agentsam-workbench/src/agent/AgentPanel.tsx +41 -0
- package/packages/agentsam-workbench/src/agent/ArtifactCard.tsx +9 -0
- package/packages/agentsam-workbench/src/agent/Composer.tsx +102 -0
- package/packages/agentsam-workbench/src/agent/ConnectedAgentPanel.tsx +194 -0
- package/packages/agentsam-workbench/src/agent/ContextualComposer.tsx +788 -0
- package/packages/agentsam-workbench/src/agent/GoalStatusStrip.tsx +38 -0
- package/packages/agentsam-workbench/src/agent/MiniAgentSam.tsx +86 -0
- package/packages/agentsam-workbench/src/agent/ModelSelect.tsx +19 -0
- package/packages/agentsam-workbench/src/agent/Thread.tsx +56 -0
- package/packages/agentsam-workbench/src/agent/ToolReceipt.tsx +11 -0
- package/packages/agentsam-workbench/src/agent/contextual-composer.css +611 -0
- package/packages/agentsam-workbench/src/agent/index.ts +10 -0
- package/packages/agentsam-workbench/src/agent/mini-agentsam.css +12 -0
- package/packages/agentsam-workbench/src/browser/BrowserFrame.tsx +37 -0
- package/packages/agentsam-workbench/src/browser/index.ts +1 -0
- package/packages/agentsam-workbench/src/index.ts +6 -0
- package/packages/agentsam-workbench/src/project-control.css +160 -0
- package/packages/agentsam-workbench/src/projects/ProjectsSurface.tsx +131 -0
- package/packages/agentsam-workbench/src/projects/index.ts +1 -0
- package/packages/agentsam-workbench/src/shell/Breadcrumb.tsx +35 -0
- package/packages/agentsam-workbench/src/shell/ResizableStage.tsx +99 -0
- package/packages/agentsam-workbench/src/shell/SidePanel.tsx +5 -0
- package/packages/agentsam-workbench/src/shell/index.ts +4 -0
- package/packages/agentsam-workbench/src/shell/surfaceRegistry.ts +29 -0
- package/packages/agentsam-workbench/src/terminal/TerminalSurface.tsx +5 -0
- package/packages/agentsam-workbench/src/terminal/index.ts +1 -0
- package/packages/agentsam-workbench/src/timeline/GanttBoard.tsx +258 -0
- package/packages/agentsam-workbench/src/timeline/index.ts +1 -0
- package/packages/agentsam-workbench/tsconfig.json +13 -0
- package/packages/connectors/cloudflare/OAUTH_STORAGE_AUDIT.md +53 -0
- package/packages/connectors/cloudflare/package.json +3 -1
- package/packages/connectors/cloudflare/src/api-client.js +279 -0
- package/packages/connectors/cloudflare/src/capabilities.js +585 -0
- package/packages/connectors/cloudflare/src/credential.js +318 -0
- package/packages/connectors/cloudflare/src/families/brand-protection.js +123 -0
- package/packages/connectors/cloudflare/src/families/keyless.js +114 -0
- package/packages/connectors/cloudflare/src/families/pages.js +151 -0
- package/packages/connectors/cloudflare/src/families/scanner.js +123 -0
- package/packages/connectors/cloudflare/src/families/snippets.js +207 -0
- package/packages/connectors/cloudflare/src/families/tag-gateway.js +46 -0
- package/packages/connectors/cloudflare/src/families/tags.js +124 -0
- package/packages/connectors/cloudflare/src/families/token-validation.js +95 -0
- package/packages/connectors/cloudflare/src/families/workflows.js +156 -0
- package/packages/connectors/cloudflare/src/index.js +102 -265
- package/packages/connectors/cloudflare/src/oauth-persist.js +336 -0
- package/packages/connectors/cloudflare/src/owner.js +42 -12
- package/packages/connectors/cloudflare/src/permission-options.js +1064 -0
- package/packages/connectors/cloudflare/src/routes.js +309 -144
- package/packages/connectors/cloudflare/src/scope-catalog.js +345 -0
- package/packages/connectors/cloudflare/src/vault.js +2 -2
- package/packages/connectors/cloudflare/tests/capabilities.test.mjs +276 -0
- package/packages/connectors/cloudflare/tests/connector.test.mjs +26 -30
- package/packages/connectors/cloudflare/tests/oauth-persist.test.mjs +125 -0
- package/packages/identity/.agentsam/features/oauth-login-portal/providers.json +22 -2
- package/packages/identity/.agentsam/features/oauth-login-portal/resources.json +10 -4
- package/packages/identity/.agentsam/features/oauth-login-portal/routes.json +20 -0
- package/packages/identity/README.md +1 -1
- package/packages/identity/backend/README.md +1 -1
- package/packages/identity/migrations/D1_SCHEMA_MAPPING.md +3 -2
- package/packages/identity/migrations/sqlite/004_identity_oauth_consent_catalog.sql +48 -0
- package/packages/identity/package.json +4 -3
- package/packages/identity/scripts/local-identity-bridge.mjs +184 -0
- package/packages/identity/scripts/preview-auth-portal.mjs +7 -7
- package/packages/identity/src/adapters/cloudflare-d1/index.js +31 -2
- package/packages/identity/src/adapters/sqlite/index.js +4 -1
- package/packages/identity/src/contracts/auth-config.js +28 -8
- package/packages/identity/src/contracts/external-identity.js +1 -1
- package/packages/identity/src/contracts/provider.js +1 -0
- package/packages/identity/src/frontend/auth-portal/README.md +2 -1
- package/packages/identity/src/frontend/auth-portal/pages/login.html +6 -5
- package/packages/identity/src/frontend/auth-portal/pages/reset.html +6 -5
- package/packages/identity/src/frontend/auth-portal/pages/signup.html +6 -5
- package/packages/identity/src/frontend/auth-portal/shared/company-branding.js +1 -1
- package/packages/identity/src/frontend/auth-portal/shared/desktop-identity-bridge.js +207 -0
- package/packages/identity/src/index.js +16 -0
- package/packages/identity/src/migrations/0001_identity_core.sql +19 -2
- package/packages/identity/src/migrations/0003_accounts_ssot.sql +20 -0
- package/packages/identity/src/migrations/README.md +5 -2
- package/packages/identity/src/oauth/README.md +10 -5
- package/packages/identity/src/oauth/consent-view.js +388 -0
- package/packages/identity/src/oauth/credentials.js +31 -11
- package/packages/identity/src/oauth/google-desktop-exchange.js +173 -0
- package/packages/identity/src/providers/cloudflare/oauth.js +3 -4
- package/packages/identity/src/providers/cloudflare/profile.js +49 -14
- package/packages/identity/src/providers/iam/index.js +27 -5
- package/packages/identity/src/server/identity-service.js +31 -2
- package/packages/identity/src/server/worker-router.js +111 -81
- package/packages/identity/tests/auth-config.test.mjs +3 -2
- package/packages/identity/tests/identity-init-scaffold.test.mjs +3 -0
- package/packages/identity/tests/identity-service.test.mjs +16 -0
- package/packages/identity/tests/native-session-worker.test.mjs +64 -0
- package/packages/identity/tests/oauth-consent-view.test.mjs +106 -0
- package/packages/identity/tests/oauth-credentials.test.mjs +17 -4
- package/packages/identity/tests/oauth-presets-accounts-ssot.test.mjs +58 -0
- package/packages/identity/tests/preview-auth-portal.test.mjs +3 -3
- package/packages/runtime-protocol/src/index.js +154 -0
- package/packages/theme-scenes/README.md +164 -0
- package/packages/theme-scenes/package.json +53 -0
- package/packages/theme-scenes/src/blocks/index.js +30 -0
- package/packages/theme-scenes/src/contracts/index.js +286 -0
- package/packages/theme-scenes/src/demos/index.js +65 -0
- package/packages/theme-scenes/src/index.js +75 -0
- package/packages/theme-scenes/src/presets/index.js +263 -0
- package/packages/theme-scenes/src/runtime/compile.js +119 -0
- package/packages/theme-scenes/src/scenes/index.js +146 -0
- package/packages/theme-scenes/src/shell/index.js +47 -0
- package/packages/theme-scenes/src/themes/index.js +129 -0
- package/packages/theme-scenes/src/visuals/index.js +41 -0
- package/packages/theme-scenes/test/theme-scenes.test.mjs +179 -0
- package/packages/work-graph/src/index.js +34 -1
- package/packages/work-graph/src/renderers/gantt-model.js +24 -0
- package/packages/work-graph/test/work-graph.test.mjs +27 -7
- package/protocol/README.md +15 -7
- package/protocol/apps/agentsam.app.v1.schema.json +89 -7
- package/protocol/apps/agentsam.host-install.v1.schema.json +36 -0
- package/protocol/assets/README.md +9 -0
- package/protocol/assets/asset-record.v1.schema.json +64 -0
- package/protocol/runtime/agentsam.runtime.v1.schema.json +75 -0
- package/protocol/scoring/README.md +10 -0
- package/protocol/scoring/scorecard.v1.schema.json +65 -0
- package/protocol/ui/icon-registry.mjs +1 -0
- package/registry/cms-rust-machine-20260928/installable-products.json +31 -0
- package/registry/cms-rust-machine-20260928/manifest.json +22 -0
- package/registry/cms-rust-machine-20260928/migration.sql +237 -0
- package/registry/cms-rust-machine-20260928/receipt.json +21 -0
- package/registry/cms-rust-machine-20260928/receipt.sql +27 -0
- package/scripts/build_rapid_rust_cli.py +83 -0
- package/src/attachments/index.js +6 -0
- package/src/attachments/intake.js +235 -0
- package/src/capabilities/repository-snapshot.js +19 -2
- package/src/cli/command-catalog.js +8 -0
- package/src/cli.js +182 -26
- package/src/commands/account-auth.js +94 -8
- package/src/commands/app.js +307 -3
- package/src/commands/billing.js +127 -0
- package/src/commands/brand.js +74 -60
- package/src/commands/cheat-sheet.js +154 -0
- package/src/commands/cloudflare-login.js +222 -0
- package/src/commands/cloudflare.js +453 -23
- package/src/commands/codebaseindex.js +6 -1
- package/src/commands/compute.js +4 -0
- package/src/commands/connections.js +11 -5
- package/src/commands/credentials.js +116 -0
- package/src/commands/gcloud-auth.js +427 -0
- package/src/commands/google-cloud.js +375 -0
- package/src/commands/identity-init.js +2 -2
- package/src/commands/mcp.js +226 -33
- package/src/commands/ollama.js +3 -2
- package/src/commands/plugins.js +7 -2
- package/src/commands/product.js +36 -0
- package/src/commands/runtime-status.js +28 -9
- package/src/commands/runtime.js +313 -0
- package/src/commands/rust.js +24 -0
- package/src/commands/setup.js +279 -0
- package/src/commands/shell.js +16 -3
- package/src/commands/start-local.js +2 -2
- package/src/commands/terminal.js +171 -0
- package/src/commands/update.js +140 -0
- package/src/commands/whoami.js +329 -65
- package/src/features/resolve.js +1 -0
- package/src/index.js +4 -0
- package/src/indexing/ingest/inventory.js +254 -19
- package/src/indexing/ingest/materials.js +3 -9
- package/src/indexing/ingest/style-evidence.js +181 -0
- package/src/knowledge/source.js +3 -3
- package/src/lib/account-session.js +11 -4
- package/src/lib/app-authority.js +172 -0
- package/src/lib/auth.js +94 -21
- package/src/lib/core-client.js +5 -6
- package/src/lib/credentials-audit.js +451 -0
- package/src/lib/deploy/health.js +24 -6
- package/src/lib/detect-context.js +7 -1
- package/src/lib/google-cloud-connection.js +270 -0
- package/src/lib/google-cloud-inventory.js +385 -0
- package/src/lib/google-desktop-oauth.js +372 -0
- package/src/lib/google-studio-brokered-oauth.js +158 -0
- package/src/lib/identity-scaffold.js +24 -6
- package/src/lib/init-options.js +192 -0
- package/src/lib/local-scaffold.js +48 -16
- package/src/lib/provider-command-remediation.js +308 -0
- package/src/lib/provider-credentials.js +8 -0
- package/src/lib/scaffold/index.js +8 -2
- package/src/lib/scaffold/mcp-server.js +43 -0
- package/src/lib/scaffold/templates/mcp-server/index.js +397 -0
- package/src/lib/scaffold/templates/mcp-server/presets.js +39 -0
- package/src/lib/scaffold/wizards/cms.js +93 -0
- package/src/lib/scaffold/wizards/mcp-server.js +61 -0
- package/src/lib/setup/contract.js +26 -0
- package/src/lib/setup/discover.js +116 -0
- package/src/lib/setup/execute.js +205 -0
- package/src/lib/setup/planner.js +134 -0
- package/src/lib/setup/recipes.js +235 -0
- package/src/lib/setup/runtime-persist.js +197 -0
- package/src/lib/setup/runtime.js +394 -0
- package/src/lib/slash-commands.js +2 -0
- package/src/lib/terminal/machine-identity.js +95 -0
- package/src/lib/terminal-local.js +164 -0
- package/src/lib/terminal-scopes.js +52 -0
- package/src/lib/whoami-capabilities.js +184 -0
- package/src/local-pty/server.js +34 -5
- package/src/mcp/authority.js +58 -108
- package/src/mcp/client-adapters.js +68 -144
- package/src/mcp/client.js +142 -122
- package/src/mcp/cloudflare-bundles.js +225 -0
- package/src/mcp/index.js +12 -0
- package/src/plugins/cloudflare.js +1 -1
- package/src/providers/ollama-chat.js +2 -1
- package/src/sam/types.js +27 -2
- package/src/security/inventory.js +12 -2
- package/src/security/local-vault.js +2 -0
- package/src/security/scan.js +1 -1
- package/test/account-session.test.mjs +3 -3
- package/test/app-authority-context.test.mjs +32 -0
- package/test/cli/codebaseindex-plan-ux.test.mjs +1 -1
- package/test/cli/mcp-client.test.mjs +21 -10
- package/test/cli/runtime-persist.test.mjs +56 -0
- package/test/cli/rust-command.test.mjs +21 -0
- package/test/credentials-audit.test.mjs +113 -0
- package/test/deploy-health-scan.test.mjs +29 -1
- package/test/gcloud-auth.test.mjs +111 -0
- package/test/google-cloud-connection.test.mjs +83 -0
- package/test/google-cloud-inventory.test.mjs +64 -0
- package/test/init-options.test.mjs +35 -0
- package/test/integration/app-command.test.mjs +30 -0
- package/test/integration/cad-project.test.mjs +4 -1
- package/test/integration/cms-app-scaffold.test.mjs +71 -0
- package/test/integration/cms-site-tenancy-contract.test.mjs +3 -2
- package/test/integration/codebaseindex-ingest.test.mjs +48 -0
- package/test/integration/features-resolve.test.mjs +30 -11
- package/test/integration/inspect-path-cli.test.mjs +46 -0
- package/test/integration/inventory-evidence.test.mjs +125 -0
- package/test/integration/runtime-status.integration.test.mjs +2 -1
- package/test/knowledge.test.mjs +35 -1
- package/test/loopback-oauth.test.mjs +53 -0
- package/test/ollama.test.mjs +22 -0
- package/test/security.test.mjs +23 -0
- package/test/setup-planner.test.mjs +74 -0
- package/test/setup-runtime.test.mjs +51 -0
- package/test/terminal/local-pty.mock.test.mjs +3 -1
- package/test/terminal-machine-identity.test.mjs +88 -0
- package/test/whoami-resume.test.mjs +27 -6
- package/packages/agentsam-brand/test/brand-scan.test.mjs +0 -106
- package/packages/work-graph/prototype/README.md +0 -32
- package/packages/work-graph/prototype/data/demo-workgraph.js +0 -47
- package/packages/work-graph/prototype/renderers/timeline-model.js +0 -21
- package/packages/work-graph/prototype/renderers/workgraph-runtime.js +0 -38
- package/packages/work-graph/prototype-gnantt.html +0 -655
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"allowImportingTsExtensions": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["backend/src/**/*", "frontend/src/**/*", "frontend/src/env.d.ts"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inneranimalmedia/agentsam-cms-shared",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./src/index.ts",
|
|
8
|
+
"./publication": "./src/publication.ts",
|
|
9
|
+
"./bindings": "./src/cloudflare-bindings.ts",
|
|
10
|
+
"./context": "./src/agent-context.ts"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@inneranimalmedia/agentsam-contracts": "file:../../../../packages/agentsam-contracts"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^5.9.3"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AgentContext, AgentContextProvider, AgentPrincipal } from '@inneranimalmedia/agentsam-contracts';
|
|
2
|
+
|
|
3
|
+
export type CmsAgentContextInput = {
|
|
4
|
+
principal: AgentPrincipal;
|
|
5
|
+
projectId: string;
|
|
6
|
+
route?: string;
|
|
7
|
+
pageId?: string | null;
|
|
8
|
+
sectionId?: string | null;
|
|
9
|
+
blockId?: string | null;
|
|
10
|
+
publicationRevision?: number | null;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function createCmsAgentContext(input: CmsAgentContextInput): AgentContext {
|
|
14
|
+
return {
|
|
15
|
+
surface: 'cms',
|
|
16
|
+
accountId: input.principal.accountId,
|
|
17
|
+
authUserId: input.principal.authUserId,
|
|
18
|
+
projectId: input.projectId,
|
|
19
|
+
metadata: {
|
|
20
|
+
route: input.route ?? null,
|
|
21
|
+
pageId: input.pageId ?? null,
|
|
22
|
+
sectionId: input.sectionId ?? null,
|
|
23
|
+
blockId: input.blockId ?? null,
|
|
24
|
+
publicationRevision: input.publicationRevision ?? null,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function createCmsAgentContextProvider(getInput: () => CmsAgentContextInput | Promise<CmsAgentContextInput>): AgentContextProvider {
|
|
30
|
+
return {
|
|
31
|
+
async getContext() {
|
|
32
|
+
return createCmsAgentContext(await getInput());
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type CmsCloudflareCapability =
|
|
2
|
+
| 'cms-cloud'
|
|
3
|
+
| 'iam'
|
|
4
|
+
| 'workers-ai'
|
|
5
|
+
| 'browser'
|
|
6
|
+
| 'container'
|
|
7
|
+
| 'encrypted-secrets'
|
|
8
|
+
| 'acp';
|
|
9
|
+
|
|
10
|
+
export type CmsCloudflareBindingName =
|
|
11
|
+
| 'DB'
|
|
12
|
+
| 'WEBSITE_ASSETS'
|
|
13
|
+
| 'SESSION_CACHE'
|
|
14
|
+
| 'AGENTSAM_WAI'
|
|
15
|
+
| 'MY_CONTAINER'
|
|
16
|
+
| 'MYBROWSER'
|
|
17
|
+
| 'IAM_CLIENT_ID'
|
|
18
|
+
| 'IAM_CLIENT_SECRET'
|
|
19
|
+
| 'IAM_ORIGIN'
|
|
20
|
+
| 'SECRETS_ENCRYPTION_KEY'
|
|
21
|
+
| 'ACP_CLIENT_ID'
|
|
22
|
+
| 'ACP_CLIENT_SECRET';
|
|
23
|
+
|
|
24
|
+
export type CmsCloudflareBindingContract = {
|
|
25
|
+
name: CmsCloudflareBindingName;
|
|
26
|
+
capability: CmsCloudflareCapability;
|
|
27
|
+
required: boolean;
|
|
28
|
+
secret?: boolean;
|
|
29
|
+
authority: 'metadata' | 'assets' | 'identity' | 'cache-only' | 'execution-only' | 'configuration';
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const CMS_CLOUDFLARE_BINDINGS: readonly CmsCloudflareBindingContract[] = [
|
|
34
|
+
{ name: 'DB', capability: 'cms-cloud', required: true, authority: 'metadata', description: 'D1 authority for CMS/account/publication metadata.' },
|
|
35
|
+
{ name: 'WEBSITE_ASSETS', capability: 'cms-cloud', required: true, authority: 'assets', description: 'R2 storage for CMS-managed media, theme assets, generated artifacts and publication snapshots.' },
|
|
36
|
+
{ name: 'SESSION_CACHE', capability: 'cms-cloud', required: false, authority: 'cache-only', description: 'Optional session/login acceleration cache. Never account or session authority.' },
|
|
37
|
+
{ name: 'IAM_CLIENT_ID', capability: 'iam', required: true, authority: 'configuration', description: 'Public IAM client identifier.' },
|
|
38
|
+
{ name: 'IAM_CLIENT_SECRET', capability: 'iam', required: true, secret: true, authority: 'identity', description: 'Confidential IAM client credential.' },
|
|
39
|
+
{ name: 'IAM_ORIGIN', capability: 'iam', required: true, authority: 'identity', description: 'Canonical IAM issuer/auth-service origin, not the current website origin by default.' },
|
|
40
|
+
{ name: 'AGENTSAM_WAI', capability: 'workers-ai', required: true, authority: 'execution-only', description: 'Workers AI binding when the user opts into Cloudflare AI.' },
|
|
41
|
+
{ name: 'MYBROWSER', capability: 'browser', required: true, authority: 'execution-only', description: 'Optional Browser Rendering / browser automation binding.' },
|
|
42
|
+
{ name: 'MY_CONTAINER', capability: 'container', required: true, authority: 'execution-only', description: 'Optional scoped execution runtime. It receives authenticated identity; it never establishes identity.' },
|
|
43
|
+
{ name: 'SECRETS_ENCRYPTION_KEY', capability: 'encrypted-secrets', required: true, secret: true, authority: 'configuration', description: 'Envelope-encryption key only where application-managed encrypted secrets are persisted.' },
|
|
44
|
+
{ name: 'ACP_CLIENT_ID', capability: 'acp', required: true, authority: 'configuration', description: 'ACP client identity when ACP is enabled.' },
|
|
45
|
+
{ name: 'ACP_CLIENT_SECRET', capability: 'acp', required: true, secret: true, authority: 'configuration', description: 'ACP confidential credential when ACP is enabled.' },
|
|
46
|
+
] as const;
|
|
47
|
+
|
|
48
|
+
export function cmsBindingsForCapabilities(capabilities: Iterable<CmsCloudflareCapability>) {
|
|
49
|
+
const enabled = new Set(capabilities);
|
|
50
|
+
return CMS_CLOUDFLARE_BINDINGS.filter((binding) => enabled.has(binding.capability));
|
|
51
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export type CmsEditorZone = 'HEADER' | 'BODY' | 'FOOTER' | 'TEMPLATE';
|
|
2
|
+
export type CmsEditorStatus = 'live' | 'draft' | 'new';
|
|
3
|
+
export type CmsEditorTargetKind = 'page' | 'section' | 'block';
|
|
4
|
+
|
|
5
|
+
export type CmsEditorBlock = {
|
|
6
|
+
id: string;
|
|
7
|
+
sectionId: string;
|
|
8
|
+
type: string;
|
|
9
|
+
visible: boolean;
|
|
10
|
+
data: Record<string, any>;
|
|
11
|
+
sortOrder: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type CmsEditorSection = {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
zone: CmsEditorZone;
|
|
19
|
+
visible: boolean;
|
|
20
|
+
color: string;
|
|
21
|
+
fields: Record<string, any>;
|
|
22
|
+
css?: Record<string, any>;
|
|
23
|
+
blocks: CmsEditorBlock[];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type CmsEditorPage = {
|
|
27
|
+
id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
slug: string;
|
|
30
|
+
status: CmsEditorStatus;
|
|
31
|
+
type: string;
|
|
32
|
+
parent?: string;
|
|
33
|
+
sections: CmsEditorSection[];
|
|
34
|
+
metaTitle: string;
|
|
35
|
+
metaDescription: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type CmsEditorSite = {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
initials: string;
|
|
42
|
+
domain: string;
|
|
43
|
+
edited: string;
|
|
44
|
+
color: string;
|
|
45
|
+
pages: CmsEditorPage[];
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export type CmsEditorSelection = {
|
|
49
|
+
kind: CmsEditorTargetKind;
|
|
50
|
+
pageId: string | null;
|
|
51
|
+
sectionId: string | null;
|
|
52
|
+
blockId: string | null;
|
|
53
|
+
fieldPath: string | null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const emptyCmsEditorSelection = (): CmsEditorSelection => ({
|
|
57
|
+
kind: 'page', pageId: null, sectionId: null, blockId: null, fieldPath: null,
|
|
58
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type CmsSectionPayload = {
|
|
2
|
+
id?: string;
|
|
3
|
+
type: string;
|
|
4
|
+
props: Record<string, unknown>;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type CmsPublicationSnapshot = {
|
|
8
|
+
publicationId: string;
|
|
9
|
+
route: string;
|
|
10
|
+
revision: number;
|
|
11
|
+
theme: string;
|
|
12
|
+
sections: CmsSectionPayload[];
|
|
13
|
+
publishedAt?: string;
|
|
14
|
+
metadata?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type CmsPublishedAsset = {
|
|
18
|
+
id: string;
|
|
19
|
+
key: string;
|
|
20
|
+
mimeType: string;
|
|
21
|
+
size?: number;
|
|
22
|
+
url?: string;
|
|
23
|
+
metadata?: Record<string, unknown>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const CMS_ROUTE_BOUNDARIES = Object.freeze({
|
|
2
|
+
public: '/*',
|
|
3
|
+
auth: '/auth/*',
|
|
4
|
+
dashboard: '/dashboard/*',
|
|
5
|
+
agentsam: '/agentsam',
|
|
6
|
+
cms: '/cms',
|
|
7
|
+
publicApi: '/api/public/*',
|
|
8
|
+
authApi: '/api/auth/*',
|
|
9
|
+
cmsApi: '/api/cms/*',
|
|
10
|
+
agentsamApi: '/api/agentsam/*',
|
|
11
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { spawnSync } from 'node:child_process';
|
|
7
|
+
|
|
8
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const root = path.resolve(here, '..');
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
const candidates = [
|
|
12
|
+
process.env.AGENTSAM_RAPID_RUST_BIN,
|
|
13
|
+
path.join(os.homedir(), '.agentsam', 'bin', 'agentsam-rapid-rust-native'),
|
|
14
|
+
path.join(root, 'packages', 'agentsam-rapid-rust', 'target', 'release', 'agentsam-rapid-rust'),
|
|
15
|
+
].filter(Boolean);
|
|
16
|
+
|
|
17
|
+
for (const candidate of candidates) {
|
|
18
|
+
if (fs.existsSync(candidate)) {
|
|
19
|
+
const result = spawnSync(candidate, args, { stdio: 'inherit' });
|
|
20
|
+
process.exit(result.status ?? 1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const manifest = path.join(root, 'packages', 'agentsam-rapid-rust', 'Cargo.toml');
|
|
25
|
+
if (!fs.existsSync(manifest)) {
|
|
26
|
+
console.error('AgentSam Rapid Rust source is missing from this installation.');
|
|
27
|
+
process.exit(2);
|
|
28
|
+
}
|
|
29
|
+
const cargo = spawnSync('cargo', ['--version'], { stdio: 'ignore' });
|
|
30
|
+
if (cargo.status !== 0) {
|
|
31
|
+
console.error('Rust/Cargo is required. Install Rust, then run: agentsam rust doctor');
|
|
32
|
+
process.exit(2);
|
|
33
|
+
}
|
|
34
|
+
console.error('AgentSam Rapid Rust native binary is not installed; compiling local CLI source…');
|
|
35
|
+
const result = spawnSync('cargo', ['run', '--quiet', '--manifest-path', manifest, '--', ...args], { stdio: 'inherit' });
|
|
36
|
+
process.exit(result.status ?? 1);
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The `agentsam-sdk` package owns the portable public configuration contract. Consuming applications implement storage, authorization, and host routes against this contract instead of defining competing environment names.
|
|
4
4
|
|
|
5
|
+
Full env naming / alias / storage law: [`docs/contracts/environment-vocabulary.md`](./contracts/environment-vocabulary.md).
|
|
6
|
+
|
|
5
7
|
## Canonical variables
|
|
6
8
|
|
|
7
9
|
| Variable | Meaning |
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Machine Intelligence — AgentSam ladder
|
|
2
|
+
|
|
3
|
+
**Status:** Scaffold for Batches A–D (2026-09-24 plans).
|
|
4
|
+
**Authority:** `AGENTSAM.md` · work orders in `docs/plans/UNIVERSAL-INGEST-MACHINE-FIRST-2026-09-24.md` and `docs/plans/MACHINE-FIRST-APPS-TUI-2026-09-24.md`.
|
|
5
|
+
|
|
6
|
+
**Intent:** Audit and strengthen worlds in place. Do not redesign the repo around package purity. Proof = real `apps/*` + harvested sites — not toy demos.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Product scales (MINI / APP / WORLD)
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
MINI — tiny local artifact, instant preview, seconds
|
|
14
|
+
→ agentsam mini (see docs/MINI.md)
|
|
15
|
+
→ intentionally tiny utility lane — not architectural proof
|
|
16
|
+
|
|
17
|
+
APP — complete packaged product (npm install / agentsam app add), minutes
|
|
18
|
+
→ Clack catalog: Preview · Info · Doctor · Scaffold/Add · Deploy
|
|
19
|
+
→ maturity-gated actions
|
|
20
|
+
|
|
21
|
+
WORLD — arbitrary repo/path → deterministic world-state → progressive normalize
|
|
22
|
+
→ agentsam inspect [path]
|
|
23
|
+
→ Merkle + snapshot + AST + brand + harvest + verify + next
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Maturity ladder (calculated, observable)
|
|
29
|
+
|
|
30
|
+
Imperfection is maturity state, not exclusion. Prefer calculated facts over hand labels.
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
harvested → scaffolded → wired → verified → releasable → production
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Stage | Gate examples (facts, not badges) |
|
|
37
|
+
|-------|-----------------------------------|
|
|
38
|
+
| harvested | dir exists; optional gallery/canonical paths |
|
|
39
|
+
| scaffolded | package.json / wrangler / preview root present |
|
|
40
|
+
| wired | bin + commands.preview/doctor resolve |
|
|
41
|
+
| verified | doctor + app contract / boundary checks pass |
|
|
42
|
+
| releasable | verify receipts green; no donor junk in publish set; secrets marked |
|
|
43
|
+
| production | deploy receipt / remote binding evidence |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Decision primitives (AgentSam-owned)
|
|
48
|
+
|
|
49
|
+
**Not** TypeSafe/Jev product vocabulary. Native choose / score / check live under `src/sam/decision/` (see `docs/architecture/SAM_DECISION_WORK_RECEIPT.md`).
|
|
50
|
+
|
|
51
|
+
| Primitive | Role |
|
|
52
|
+
|-----------|------|
|
|
53
|
+
| predicate / check | yes/no with support |
|
|
54
|
+
| choice | discrete option |
|
|
55
|
+
| score | ordered magnitude (raw estimate unless calibrated) |
|
|
56
|
+
| distribution | deferred / optional |
|
|
57
|
+
|
|
58
|
+
**Confidence ≠ risk.** Confidence answers “how sure are we?” Risk answers “how bad if wrong?” Abstention and hierarchical degrade are policy, not UI chrome.
|
|
59
|
+
|
|
60
|
+
Decision receipts (target shape): `{ input_hash, primitive, result, confidence, risk?, next }` — protocol under `protocol/sam/decision-receipt.v1.schema.json`.
|
|
61
|
+
|
|
62
|
+
First acceptance path: ≥1 classification (e.g. maturity gate or brand route) emits a receipt **without** a model.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## World-state
|
|
67
|
+
|
|
68
|
+
Converge existing slices into one inspectable envelope (extend `repository.snapshot` or add `world.state`):
|
|
69
|
+
|
|
70
|
+
- files / hashes / MIME (snapshot + merkle)
|
|
71
|
+
- AST / routes / APIs
|
|
72
|
+
- brand packet (when present)
|
|
73
|
+
- app manifest + provenance
|
|
74
|
+
- verify receipts
|
|
75
|
+
- maturity + next_actions
|
|
76
|
+
|
|
77
|
+
`agentsam inspect` must work for arbitrary paths **and** every `apps/*`.
|
|
78
|
+
|
|
79
|
+
Consumers: Brand Intelligence, apps catalog, local gallery, progression next-actions. LLM is one handler inside AgentSam — only on ambiguity.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Explicit non-goals
|
|
84
|
+
|
|
85
|
+
- Repo redesign for package purity
|
|
86
|
+
- New toy/demo apps as architectural proof
|
|
87
|
+
- Requiring finished status before inclusion
|
|
88
|
+
- TypeSafe/Jev dependency or product vocabulary
|
|
89
|
+
- Mini as showcase / poster framing
|
|
90
|
+
- Auto-fetch remotes / auto-delete orphans / execute imported HTML
|
|
91
|
+
- Jump every path to Level-4 LLM
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Acceptance (machine-first, without a model)
|
|
96
|
+
|
|
97
|
+
1. List every `apps/*` with calculated maturity + provenance + verify status
|
|
98
|
+
2. `agentsam inspect` a harvested site and a serious app → world-state
|
|
99
|
+
3. Answer what / where / contents / capabilities / reusable / missing / verified / next from receipts
|
|
100
|
+
4. Expose decision primitives + a confidence-policy receipt on ≥1 classification path
|
|
101
|
+
5. Keep `agentsam mini` working as the tiny lane
|
|
102
|
+
6. Docs state this ladder + MINI / APP / WORLD (this file)
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Related docs
|
|
107
|
+
|
|
108
|
+
| Doc | Role |
|
|
109
|
+
|-----|------|
|
|
110
|
+
| `docs/plans/UNIVERSAL-INGEST-MACHINE-FIRST-2026-09-24.md` | Locked work order (Batches A–D) |
|
|
111
|
+
| `docs/plans/MACHINE-FIRST-APPS-TUI-2026-09-24.md` | Apps Clack catalog + batch detail |
|
|
112
|
+
| `docs/plans/TOMORROW-MACHINE-FIRST-BRIEFING.md` | Review index for next session |
|
|
113
|
+
| `docs/MINI.md` | Mini lane |
|
|
114
|
+
| `docs/architecture/SAM_DECISION_WORK_RECEIPT.md` | Decision layer ship receipt |
|
|
115
|
+
| `docs/BRAND_INTELLIGENCE.md` | Consumer of world-state |
|
|
116
|
+
| `docs/REPOSITORY_INTELLIGENCE.md` | Snapshot / inspect substrate |
|
|
117
|
+
| `docs/THEME_REFINERY.md` | Harvest ladder + sites |
|
|
118
|
+
| `protocol/INSPECT_VIEWS_V1.md` | Inspect views |
|
|
119
|
+
| `docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS.md` | **Canonical** interactive shell contract (`ctrl-c`) |
|
|
120
|
+
| `docs/plans/AGENTSAM-INTERACTIVE-UI-REQUIREMENTS-codex-tui-20260919.md` | Observational Codex brief (`esc`) — not the implemented contract |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Windows — agentsamd install (Connor / PowerShell)
|
|
2
|
+
|
|
3
|
+
## Why `Unknown command: runtime` happens
|
|
4
|
+
|
|
5
|
+
You are on an **old published CLI** (e.g. Agent Sam **v2.6.3**). That build lists `runtime` as a help *topic* but does **not** register the `agentsam runtime` command.
|
|
6
|
+
|
|
7
|
+
Sam’s Mac works because the global `agentsam` is **`npm link`’d** to the local `agentsam-sdk` checkout (has `runtime` + Windows Scheduled Task).
|
|
8
|
+
|
|
9
|
+
## Fix (PowerShell)
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
npm install -g @inneranimalmedia/agentsam-sdk@latest
|
|
13
|
+
agentsam --version
|
|
14
|
+
# need 2.6.5+ (or whatever release includes `runtime`)
|
|
15
|
+
|
|
16
|
+
agentsam runtime install --yes
|
|
17
|
+
agentsam runtime probe
|
|
18
|
+
# expect healthy on http://127.0.0.1:18765/health
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Installs:
|
|
22
|
+
|
|
23
|
+
- `%USERPROFILE%\.agentsam\bin\agentsamd.exe`
|
|
24
|
+
- Scheduled Task `InnerAnimalMedia\agentsamd` (logon)
|
|
25
|
+
|
|
26
|
+
Requires **Go** on PATH to build the daemon (`go version`).
|
|
27
|
+
|
|
28
|
+
## Do not use hosted Studio as the “install”
|
|
29
|
+
|
|
30
|
+
The Local Studio **desktop app** must load the **bundled** `apps/local-studio` UI from inside the `.app` / `.msi` — not redirect to https://agentsam.inneranimalmedia.com/agentsam. That URL is the cloud Worker surface; the download exists so the product runs offline with agentsamd.
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# AgentSam Application Contract
|
|
2
|
+
|
|
3
|
+
**Status:** binding for portable product apps
|
|
4
|
+
**Schema:** `protocol/apps/agentsam.app.v1.schema.json`
|
|
5
|
+
**CLI:** `agentsam app validate` · `agentsam app list` · `agentsam app inspect <id>`
|
|
6
|
+
|
|
7
|
+
## Artifact taxonomy
|
|
8
|
+
|
|
9
|
+
| Type | Meaning | Canonical manifest |
|
|
10
|
+
|------|---------|-------------------|
|
|
11
|
+
| **APP** | Something a user can install/run/use as a product | `agentsam.app.json` |
|
|
12
|
+
| **PACKAGE** | Reusable code/capability | `agentsam.package.json` (or package metadata) |
|
|
13
|
+
| **SERVICE** | Runtime infrastructure/backend | `agentsam.package.json` with `type: "service"` (or `agentsam.service.json`) |
|
|
14
|
+
| **HOST** | Something that mounts/composes apps | host / install state under `.agentsam/` |
|
|
15
|
+
| **THEME** | Appearance/content kit, not an app | theme package / theme-site scaffold |
|
|
16
|
+
|
|
17
|
+
A folder under `apps/` is **not** an APP merely because of its path. The AgentSam APP contract (`agentsam.app.json`) makes it one.
|
|
18
|
+
|
|
19
|
+
Example: `apps/agentsam-go-worker` correctly uses `agentsam.package.json` (`type: "service"`) and must **not** be forced into APP semantics because it is deployable.
|
|
20
|
+
|
|
21
|
+
Theme packages and static theme-site scaffolds likewise stay outside APP semantics.
|
|
22
|
+
|
|
23
|
+
## Target tree (conceptual)
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
apps/
|
|
27
|
+
cad-creator/
|
|
28
|
+
client-cms-editor/
|
|
29
|
+
ecommerce-cms/
|
|
30
|
+
local-studio/
|
|
31
|
+
|
|
32
|
+
packages/
|
|
33
|
+
database-editor/
|
|
34
|
+
settings/
|
|
35
|
+
identity/
|
|
36
|
+
planner/
|
|
37
|
+
cms-sections/
|
|
38
|
+
themes/
|
|
39
|
+
|
|
40
|
+
services/
|
|
41
|
+
go-runtime/
|
|
42
|
+
render-runtime/
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Identity namespaces (must not collapse)
|
|
46
|
+
|
|
47
|
+
| Namespace | Example | Role |
|
|
48
|
+
|-----------|---------|------|
|
|
49
|
+
| `APP.id` | `cad-creator` | Canonical product identity — immutable kebab-case |
|
|
50
|
+
| `HOST.id` / origin | host-install projection | Where this APP instance is served; belongs to installation state, not portable APP identity |
|
|
51
|
+
| npm package | `@inneranimalmedia/agentsam-cad-creator` | Distribute/install code |
|
|
52
|
+
| CLI command | `agentsam-cad-creator` / `agentsam cad` | Launch surface |
|
|
53
|
+
| Cloudflare Worker | `agentsam-cad-creator` | Host deployment name |
|
|
54
|
+
| desktop bundle | `com.inneranimalmedia.agentsam.cadcreator` | OS identity |
|
|
55
|
+
| route | `/cad` | URL mount |
|
|
56
|
+
| service | `cad-render-service` | Infrastructure |
|
|
57
|
+
| `PRODUCT.id` | `cms` | Platform product registry |
|
|
58
|
+
| `MOUNT.id` | `cms-studio` | Host mount slot |
|
|
59
|
+
| remote identity/account issuer | optional host/provider adapter configuration | External account authority for an installation — **not** intrinsic APP identity |
|
|
60
|
+
|
|
61
|
+
Portable APP law: an installable APP must not hardcode a donor/company hostname, remote issuer, tenant, confidential OAuth client, or customer deployment as a prerequisite for its local product experience. Those facts belong to `agentsam.host-install.v1` state or an explicitly installed provider/identity adapter.
|
|
62
|
+
|
|
63
|
+
Those names **may** differ. What must not happen:
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
const APP = "agentsam-cad-creator"; // Worker name ≠ APP identity
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
// Forbidden: collapsing HOST and PLATFORM into alias env vars
|
|
71
|
+
const origin = env.AGENTSAM_STUDIO_ORIGIN || env.AGENTSAM_LOCAL_STUDIO_ORIGIN || env.IAM_OAUTH_ISSUER;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Relate namespaces explicitly:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"schema": "agentsam.host-install.v1",
|
|
79
|
+
"app_id": "local-studio",
|
|
80
|
+
"config": {
|
|
81
|
+
"hosts": [
|
|
82
|
+
{ "host_id": "studio-public", "origin": "https://studio.example.com", "role": "production" }
|
|
83
|
+
],
|
|
84
|
+
"identity": { "portable_default": "local" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"id": "client-cms-editor",
|
|
92
|
+
"product_id": "cms",
|
|
93
|
+
"name": "AgentSam CMS",
|
|
94
|
+
"package": "@inneranimalmedia/client-cms-editor"
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"schema": "agentsam.host-install.v1",
|
|
101
|
+
"app_id": "client-cms-editor",
|
|
102
|
+
"config": {},
|
|
103
|
+
"mounts": []
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Manifest authority
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
apps/<app-id>/
|
|
111
|
+
├── agentsam.app.json ← ONE canonical product definition
|
|
112
|
+
├── package.json
|
|
113
|
+
├── frontend/
|
|
114
|
+
├── backend/
|
|
115
|
+
├── bin/
|
|
116
|
+
└── .agentsam/ ← host / install / project state (not a second product def)
|
|
117
|
+
└── app.json ← references app_id; does not redefine identity
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
| File | Role |
|
|
121
|
+
|------|------|
|
|
122
|
+
| `agentsam.app.json` | Package/product definition — sole APP identity authority |
|
|
123
|
+
| `.agentsam/` | Host/user/project **installation** state for this checkout or customer |
|
|
124
|
+
|
|
125
|
+
Same APP installed into Fuel & Free Time, Companions CPAs, InnerAnimalMedia, or a customer localhost keeps the same `APP.id`. `.agentsam/` describes **this** installation.
|
|
126
|
+
|
|
127
|
+
## Physical shape
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
apps/<app-id>/
|
|
131
|
+
├── agentsam.app.json
|
|
132
|
+
├── package.json
|
|
133
|
+
├── frontend/ # portable presentation/UI
|
|
134
|
+
├── backend/ # application-owned server/runtime
|
|
135
|
+
├── bin/ # launch/install/dev CLI
|
|
136
|
+
├── scripts/
|
|
137
|
+
├── test/
|
|
138
|
+
└── README.md
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Not every directory is required for every runtime. Directory **meaning** must not change.
|
|
142
|
+
|
|
143
|
+
## Runtime identity loading
|
|
144
|
+
|
|
145
|
+
```js
|
|
146
|
+
import appManifest from "../../agentsam.app.json";
|
|
147
|
+
|
|
148
|
+
export const APP = Object.freeze(appManifest);
|
|
149
|
+
// APP.id === "cad-creator"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Forbidden:
|
|
153
|
+
|
|
154
|
+
- `const APP = "..."` (string used as product identity)
|
|
155
|
+
- Duplicated app definitions (root manifest + `.agentsam/app.json` both defining the product)
|
|
156
|
+
- Treating Worker name, npm package name, or route slug as `APP.id`
|
|
157
|
+
|
|
158
|
+
## AGENTSAM APPLICATION CONTRACT (rules)
|
|
159
|
+
|
|
160
|
+
APP represents a portable user-facing AgentSam application.
|
|
161
|
+
|
|
162
|
+
Every APP MUST:
|
|
163
|
+
|
|
164
|
+
1. Own exactly one canonical `agentsam.app.json`.
|
|
165
|
+
2. Have one immutable kebab-case `APP.id`.
|
|
166
|
+
3. Load runtime APP identity from that manifest.
|
|
167
|
+
4. Keep package, service, Worker, host, route, and desktop identities separate from `APP.id`.
|
|
168
|
+
5. Use explicit `app_id` / `product_id` / `service_id` / `package_id` relationships rather than aliases.
|
|
169
|
+
6. Follow the standard `frontend` / `backend` / `bin` layout.
|
|
170
|
+
7. Declare capabilities and entrypoints in its manifest.
|
|
171
|
+
8. Be runnable independently.
|
|
172
|
+
9. Be discoverable/composable by an AgentSam host.
|
|
173
|
+
10. Pass `agentsam app validate`.
|
|
174
|
+
|
|
175
|
+
## Resulting composition model
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
npm / install / package
|
|
179
|
+
↓
|
|
180
|
+
AgentSam APP
|
|
181
|
+
↓
|
|
182
|
+
┌────────┼─────────┐
|
|
183
|
+
▼ ▼ ▼
|
|
184
|
+
standalone Local another
|
|
185
|
+
app Studio APP / host
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Goal is **not** one identifier everywhere. Goal is **one canonical identifier per namespace**, with explicit relationships between namespaces.
|