@inneranimalmedia/agentsam-sdk 2.6.3 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTSAM.md +6 -0
- package/README.md +16 -1
- package/bin/agentsam +16 -1
- package/docs/BRAND_INTELLIGENCE.md +1 -1
- package/docs/architecture/AGENTSAM_DISTRIBUTION_OWNERSHIP.md +176 -0
- package/docs/architecture/AGENTSAM_GO_RUNTIME.md +282 -0
- package/docs/architecture/CODEBASEINDEX_GUIDED_PATH.md +202 -0
- package/docs/architecture/FS_E2E_CLOSURE_RECEIPT.md +59 -0
- package/docs/architecture/LOCAL_FS_AUTHORITY.md +38 -0
- package/docs/architecture/LOCAL_STUDIO_CLOUDFLARE_OAUTH.md +28 -0
- package/docs/architecture/PLAN_CLI_AND_LOCAL_STUDIO_DESKTOP.md +96 -0
- package/docs/architecture/SAM_ACTIVITY_RECOVERY_RECEIPT.md +39 -0
- package/docs/architecture/SAM_DECISION_WORK_RECEIPT.md +54 -0
- package/docs/architecture/SAM_KERNEL.md +181 -0
- package/docs/architecture/SAM_MACHINE_NORMALIZATION_PRECOMMIT_REPORT.md +208 -0
- package/docs/architecture/SLASH_SKILLS_PORTABLE.md +116 -0
- package/docs/architecture/fs-e2e-receipt.latest.json +42 -0
- package/docs/architecture/previews/codebaseindex-guided-path/CODEBASEINDEX_GUIDED_PATH.md +202 -0
- package/docs/architecture/previews/codebaseindex-guided-path/index.html +321 -0
- package/migrations/d1/0010_portable_tickets_memory.sql +140 -0
- package/migrations/d1/0011_agentsam_skill_v2.sql +185 -0
- package/migrations/d1/0011b_agentsam_skill_v2_cutover.sql +22 -0
- package/migrations/d1/0011c_agentsam_skill_v2_backfill.sql +76 -0
- package/migrations/d1/0011d_agentsam_skill_v2_retrieval_revisions.sql +50 -0
- package/migrations/d1/0012_agentsam_tools_required_seed.sql +67 -0
- package/migrations/d1/0013_identity_oauth_states.sql +15 -0
- package/migrations/d1/0014_auth_event_log.sql +20 -0
- package/migrations/d1/0015_identity_oauth_state_app_id.sql +3 -0
- package/migrations/d1/README_PORTABLE_CONTROL_PLANE.md +16 -0
- package/migrations/sqlite/agentsam_skill_retrieval.portable.sql +42 -0
- package/package.json +19 -4
- package/packages/agentsam-contracts/src/errors.ts +16 -0
- package/packages/agentsam-errors/src/envelope.js +53 -0
- package/packages/agentsam-errors/src/index.js +1 -0
- package/packages/agentsam-errors/src/recovery.js +301 -0
- package/packages/agentsam-knowledge/src/providers/index.js +18 -6
- package/packages/connectors/cloudflare/src/routes.js +9 -0
- package/packages/connectors/cloudflare/tests/connector.test.mjs +26 -1
- package/packages/identity/.agentsam/features/oauth-login-portal/agentsam.feature.json +1 -1
- package/packages/identity/.agentsam/features/oauth-login-portal/routes.json +11 -2
- package/packages/identity/docs/PORTABLE_IDENTITY_ARCHITECTURE.md +50 -0
- package/packages/identity/migrations/D1_SCHEMA_MAPPING.md +31 -0
- package/packages/identity/migrations/sqlite/001_identity_core.sql +99 -0
- package/packages/identity/migrations/sqlite/002_identity_oauth_client.sql +38 -0
- package/packages/identity/migrations/sqlite/003_identity_oauth_server.sql +64 -0
- package/packages/identity/package.json +2 -2
- package/packages/identity/src/adapters/cloudflare-d1/index.js +122 -22
- package/packages/identity/src/adapters/sqlite/index.js +319 -0
- package/packages/identity/src/app/verify-app.js +95 -0
- package/packages/identity/src/contracts/identity-store.js +115 -0
- package/packages/identity/src/contracts/route-ids.js +30 -0
- package/packages/identity/src/contracts/route-projection.js +218 -0
- package/packages/identity/src/contracts/routes.js +11 -0
- package/packages/identity/src/core/browser-paths.js +4 -5
- package/packages/identity/src/core/constants.js +13 -8
- package/packages/identity/src/core/session-policy.js +32 -0
- package/packages/identity/src/frontend/auth-portal/pages/login.html +10 -10
- package/packages/identity/src/frontend/auth-portal/pages/reset.html +3 -3
- package/packages/identity/src/frontend/auth-portal/pages/signup.html +3 -3
- package/packages/identity/src/frontend/auth-portal/preview/dashboard-stub.html +1 -1
- package/packages/identity/src/index.js +25 -0
- package/packages/identity/src/oauth/README.md +10 -4
- package/packages/identity/src/oauth/credentials.js +20 -13
- package/packages/identity/src/oauth/finalize-inbound.js +1 -1
- package/packages/identity/src/oauth/iam-platform.js +8 -7
- package/packages/identity/src/oauth/redirect-paths.js +27 -36
- package/packages/identity/src/server/identity-service.js +30 -13
- package/packages/identity/src/server/mount-policy.js +30 -0
- package/packages/identity/src/server/post-auth.js +79 -0
- package/packages/identity/src/server/worker-router.js +104 -72
- package/packages/identity/tests/finalize-inbound-oauth.test.mjs +6 -6
- package/packages/identity/tests/iam-provider.test.mjs +1 -1
- package/packages/identity/tests/identity-service.test.mjs +36 -5
- package/packages/identity/tests/oauth-credentials.test.mjs +3 -1
- package/packages/identity/tests/portable-identity-architecture.test.mjs +157 -0
- package/packages/identity/tests/session-routes-policy.test.mjs +21 -0
- package/packages/theme-church-site/package.json +2 -1
- package/packages/theme-church-site/src/index.js +1 -0
- package/packages/theme-companions-site/package.json +2 -1
- package/packages/theme-companions-site/src/index.js +1 -0
- package/packages/theme-floors-site/package.json +2 -1
- package/packages/theme-floors-site/src/index.js +1 -0
- package/packages/theme-fuelnfree-site/package.json +2 -1
- package/packages/theme-fuelnfree-site/src/index.js +1 -0
- package/packages/theme-handyman-site/package.json +2 -1
- package/packages/theme-handyman-site/src/index.js +1 -0
- package/packages/theme-insurance-site/package.json +2 -1
- package/packages/theme-insurance-site/src/index.js +1 -0
- package/packages/theme-shinshu-site/package.json +2 -1
- package/packages/theme-shinshu-site/src/index.js +1 -0
- package/protocol/apps/agentsam.app.v1.schema.json +51 -0
- package/protocol/brand/brandpack.v1.schema.json +43 -0
- package/protocol/credentials/issue.v1.schema.json +38 -0
- package/protocol/database/connection.v1.schema.json +41 -0
- package/protocol/embeddings/embedding-profile.v1.schema.json +20 -0
- package/protocol/errors/error-envelope.schema.json +135 -1
- package/protocol/errors/recovery.v1.schema.json +50 -0
- package/protocol/runtime/workspace-fs.v1.schema.json +71 -0
- package/protocol/sam/activity.v1.schema.json +48 -0
- package/protocol/sam/answer.v1.schema.json +35 -0
- package/protocol/sam/calibration.v1.schema.json +21 -0
- package/protocol/sam/decision-receipt.v1.schema.json +29 -0
- package/protocol/sam/evaluation.v1.schema.json +19 -0
- package/protocol/sam/operation.schema.json +66 -0
- package/protocol/sam/outcome.v1.schema.json +36 -0
- package/protocol/sam/question.v1.schema.json +26 -0
- package/protocol/sam/registry.seed.json +153 -0
- package/protocol/sam/result.schema.json +53 -0
- package/protocol/sam/state.v1.schema.json +23 -0
- package/protocol/skills/agentsam.interaction.v1.schema.json +50 -0
- package/protocol/skills/agentsam.skill.v1.schema.json +57 -0
- package/protocol/ui/icon-registry.mjs +226 -0
- package/protocol/ui/icon.v1.schema.json +51 -0
- package/skills/README.md +22 -9
- package/skills/agentsam-codebaseindex/SKILL.md +225 -0
- package/skills/catalog.json +14 -0
- package/src/cli/command-catalog.js +130 -0
- package/src/cli/dispatch.js +48 -0
- package/src/cli.js +43 -1
- package/src/commands/api-key.js +244 -0
- package/src/commands/app.js +60 -28
- package/src/commands/brand.js +17 -19
- package/src/commands/codebaseindex.js +688 -0
- package/src/commands/env.js +152 -25
- package/src/commands/go.js +366 -53
- package/src/commands/interaction-clack.js +115 -0
- package/src/commands/models.js +1 -1
- package/src/commands/providers.js +62 -14
- package/src/commands/shell.js +43 -2
- package/src/commands/skill.js +248 -0
- package/src/commands/skills.js +1 -1
- package/src/commands/start-local.js +4 -0
- package/src/commands/whoami.js +90 -18
- package/src/go/build.js +229 -39
- package/src/go/cloudflare.js +506 -105
- package/src/go/container.js +120 -0
- package/src/go/contract.js +9 -4
- package/src/go/discover.js +149 -33
- package/src/go/index.js +15 -3
- package/src/go/native-probe-runner.mjs +119 -0
- package/src/go/{registry.js → official-registry.js} +64 -7
- package/src/go/official-release.js +10 -0
- package/src/go/receipts.js +77 -10
- package/src/go/verify.js +9 -2
- package/src/index.js +27 -0
- package/src/indexing/ingest/discover-models.js +298 -0
- package/src/indexing/ingest/inventory.js +243 -0
- package/src/indexing/ingest/job-graph.js +181 -0
- package/src/indexing/ingest/materials.js +210 -0
- package/src/lib/provider-credentials.js +63 -21
- package/src/lib/slash-commands.js +1 -0
- package/src/local-fs/capability.js +121 -0
- package/src/local-fs/freshness.js +75 -0
- package/src/local-fs/index.js +385 -0
- package/src/local-fs/paths.js +100 -0
- package/src/local-pty/server.js +295 -19
- package/src/mcp/client.js +2 -2
- package/src/models/ai-access-onboarding.js +112 -0
- package/src/models/discovery.js +10 -2
- package/src/models/inventory-core.js +9 -1
- package/src/sam/activity/index.js +183 -0
- package/src/sam/client.js +252 -0
- package/src/sam/decision/calibration.js +109 -0
- package/src/sam/decision/confidence.js +126 -0
- package/src/sam/decision/evaluate.js +157 -0
- package/src/sam/decision/evaluators/deterministic.js +341 -0
- package/src/sam/decision/evaluators/heuristic.js +61 -0
- package/src/sam/decision/evaluators/select.js +50 -0
- package/src/sam/decision/evaluators/semantic.js +149 -0
- package/src/sam/decision/hierarchical.js +61 -0
- package/src/sam/decision/index.js +53 -0
- package/src/sam/decision/policy.js +86 -0
- package/src/sam/decision/questions.js +120 -0
- package/src/sam/decision/receipt.js +148 -0
- package/src/sam/decision/state.js +117 -0
- package/src/sam/decision/types.js +22 -0
- package/src/sam/decision/validate.js +200 -0
- package/src/sam/define.js +51 -0
- package/src/sam/index.js +65 -0
- package/src/sam/operations/brand-scan.js +62 -0
- package/src/sam/operations/cad-blender-inspect.js +36 -0
- package/src/sam/operations/codebaseindex-ingest.js +49 -0
- package/src/sam/operations/decision-evaluate.js +59 -0
- package/src/sam/operations/planning-astar.js +77 -0
- package/src/sam/operations/planning-goap.js +60 -0
- package/src/sam/operations/repository-inspect.js +72 -0
- package/src/sam/operations/security-scan.js +33 -0
- package/src/sam/operations/terminal-exec.js +29 -0
- package/src/sam/planning/astar.js +311 -0
- package/src/sam/planning/goap.js +177 -0
- package/src/sam/planning/index.js +21 -0
- package/src/sam/planning/state.js +84 -0
- package/src/sam/registry.js +48 -0
- package/src/sam/result.js +77 -0
- package/src/sam/seed.js +44 -0
- package/src/sam/types.js +91 -0
- package/src/skills/catalog.js +64 -0
- package/src/skills/content-resolver.js +124 -0
- package/src/skills/hosted-store.js +37 -0
- package/src/skills/index.js +29 -64
- package/src/skills/interaction.js +102 -0
- package/src/skills/local-store.js +228 -0
- package/src/skills/manifest.js +104 -0
- package/src/skills/metrics.js +31 -0
- package/src/skills/registry.js +184 -0
- package/src/skills/runtime.js +287 -0
- package/src/skills/slash.js +44 -0
- package/src/ui/cli/help.js +94 -101
- package/test/cli/api-key-env-whoami.test.mjs +129 -0
- package/test/cli/codebaseindex-plan-ux.test.mjs +37 -0
- package/test/cli/go.test.mjs +62 -5
- package/test/cli/skill-npm-and-env.test.mjs +52 -0
- package/test/cli/wireframes-go-registry.test.mjs +87 -2
- package/test/go/build-source-identity.test.mjs +31 -0
- package/test/go/cloudflare-probe.test.mjs +274 -10
- package/test/go/distribution.test.mjs +28 -0
- package/test/integration/ai-access-onboarding.test.mjs +47 -0
- package/test/integration/cli-help.test.mjs +1 -1
- package/test/integration/cms-site-tenancy-contract.test.mjs +6 -6
- package/test/integration/codebaseindex-ingest.test.mjs +166 -0
- package/test/integration/icon-registry.test.mjs +67 -0
- package/test/integration/ingest-discover-models.test.mjs +30 -0
- package/test/integration/install-script.test.mjs +12 -9
- package/test/integration/local-fs.test.mjs +113 -0
- package/test/integration/provider-env-cli.test.mjs +2 -1
- package/test/integration/sam-activity-recovery.test.mjs +147 -0
- package/test/integration/sam-decision.test.mjs +584 -0
- package/test/integration/sam-kernel.test.mjs +99 -0
- package/test/integration/sam-planning-astar.test.mjs +279 -0
- package/test/integration/skill-runtime.test.mjs +240 -0
- package/test/integration/studio-fs-pty-e2e.test.mjs +294 -0
- package/test/models.test.mjs +14 -7
- package/test/shell.test.mjs +4 -4
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Codebaseindex Guided Path — Template Lanes + Inventory-First UX
|
|
2
|
+
|
|
3
|
+
**Status:** PLAN · LOCKED intent (2026-09-25)
|
|
4
|
+
**Product:** AgentSam · pipeline `sam.codebaseindex.index.run` · operation `codebaseindex.ingest`
|
|
5
|
+
**Audience:** SDK CLI/TUI, Local Studio, future customer “bring your own vector lane” templates
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Host SSOT today — Supabase tables (Gemini @ 1536)
|
|
10
|
+
|
|
11
|
+
Owner IAM path: **Gemini Embedding 2 → 1536-d → Supabase pgvector**, written via **node-api** edge (`POST /codebase/ingest`, vector RPCs). D1 owns control/structure; Postgres owns vectors.
|
|
12
|
+
|
|
13
|
+
### Live code-intelligence projections (`agentsam` schema)
|
|
14
|
+
|
|
15
|
+
| Table | Role |
|
|
16
|
+
|-------|------|
|
|
17
|
+
| `agentsam.agentsam_codebase_chunks_gemini_embedding_2_1536` | Chunk-level retrieval vectors (primary ANN for code Q&A) |
|
|
18
|
+
| `agentsam.agentsam_codebase_files_gemini_embedding_2_1536` | File-level vectors |
|
|
19
|
+
| `agentsam.agentsam_codebase_ast_symbols_gemini_embedding_2_1536` | Symbol ANN |
|
|
20
|
+
|
|
21
|
+
### Related semantic / twin tables (same embed family, different corpora)
|
|
22
|
+
|
|
23
|
+
| Table | Role |
|
|
24
|
+
|-------|------|
|
|
25
|
+
| `agentsam.agentsam_gemini_semantic_embeddings_1536` | Unified semantic authority (memory + code symbol projections by `corpus_type` / `record_kind`) |
|
|
26
|
+
| `agentsam.agentsam_documents_gemini_embedding_2_1536` | Document ingest twin (node-api `/vectors/ingest`) |
|
|
27
|
+
|
|
28
|
+
### Retired (do not write for new runs)
|
|
29
|
+
|
|
30
|
+
| Table | Note |
|
|
31
|
+
|-------|------|
|
|
32
|
+
| `agentsam.agentsam_codebase_*_oai3large_1536` | Legacy OpenAI code lanes |
|
|
33
|
+
|
|
34
|
+
### Control plane (D1 — not Supabase, but paired)
|
|
35
|
+
|
|
36
|
+
| Table | Role |
|
|
37
|
+
|-------|------|
|
|
38
|
+
| `code_repositories` | Account-owned repo identity |
|
|
39
|
+
| `agentsam_code_index_job` / `agentsam_code_index_job_file` | Run progress (`cidxrun_*`) |
|
|
40
|
+
| `codebase_ast_nodes` / `codebase_dep_edges` | Structural units + deps |
|
|
41
|
+
| `agentsam_pgvector_lane_registry` | Purpose → live PG table + model + dims |
|
|
42
|
+
| `agentsam_fs_merkle_snapshots` | Merkle evidence receipts |
|
|
43
|
+
| `agentsam_codebase_index_health` | Staleness / weekly health |
|
|
44
|
+
|
|
45
|
+
**I/O path (owner):** Worker / SDK → **node-api** (Deno edge) → Hyperdrive / session pooler → Supabase PG.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 2. End goal — templateable vector lanes
|
|
50
|
+
|
|
51
|
+
Owner setup is already live. Customers should get the **same harness**, parameterized:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
codebaseindex.ingest (guided)
|
|
55
|
+
│
|
|
56
|
+
┌───────────────┼───────────────┐
|
|
57
|
+
▼ ▼ ▼
|
|
58
|
+
local_exact supabase_pgvector cloudflare_vectorize
|
|
59
|
+
(SQLite) (+ node-api edge) (CF binding)
|
|
60
|
+
│ │ │
|
|
61
|
+
Ollama/paid Gemini@1536 project Vectorize
|
|
62
|
+
on this machine BYO Supabase BYO index/model
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
| Lane | Who runs compute | Where vectors live | When to offer |
|
|
66
|
+
|------|------------------|--------------------|---------------|
|
|
67
|
+
| **Local** | User machine | `.agentsam/knowledge/index.sqlite` | Default; Ollama free embed OK |
|
|
68
|
+
| **Supabase + node-api** | Their edge (template of IAM node-api) | Their `agentsam.*` PG tables | They opt into hosted ANN |
|
|
69
|
+
| **CF Vectorize** | Worker/plugin binding | Their Vectorize index | They already live on CF |
|
|
70
|
+
|
|
71
|
+
**Template rule:** ship **contracts + migrations + edge stubs**, not a shared multi-tenant dump of IAM tables into customer projects. Owner IAM remains the reference implementation.
|
|
72
|
+
|
|
73
|
+
Same-model law still holds per generation: vectors written with profile `P` are only queried with profile `P` (fingerprint of provider/model/dims/params).
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 3. Guided path (inventory first — LOCK this UX)
|
|
78
|
+
|
|
79
|
+
One option at a time. Plan/dry-run is **not** “skip inventory.”
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
① Provider / connection
|
|
83
|
+
↓
|
|
84
|
+
② Scan → file map inventory (Merkle + facet view)
|
|
85
|
+
↓
|
|
86
|
+
③ Include / exclude against the map
|
|
87
|
+
▼
|
|
88
|
+
④ Embedding model + dimensions (discovered, not hardcoded)
|
|
89
|
+
↓
|
|
90
|
+
⑤ Vector lane / data source
|
|
91
|
+
· local SQLite
|
|
92
|
+
· Supabase + node-api (Hyperdrive)
|
|
93
|
+
· Cloudflare Vectorize
|
|
94
|
+
↓
|
|
95
|
+
⑥ Dry-run / plan receipt (work-graph stages)
|
|
96
|
+
↓
|
|
97
|
+
⑦ Confirm → run (progress on Gantt + CLI)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### CLI / TUI (lightweight)
|
|
101
|
+
|
|
102
|
+
| Step | Interaction |
|
|
103
|
+
|------|-------------|
|
|
104
|
+
| ① | `select` configured providers + optional `agentsam providers` deep-link; Ollama online badge from `ollama list` |
|
|
105
|
+
| ② | Run `repository.inspect` / Merkle; print compact tree + counts; `--json` for Studio |
|
|
106
|
+
| ③ | `text` include / exclude; optional local chat assist; never invent denylist |
|
|
107
|
+
| ④ | `select` from **discovered** embed models only |
|
|
108
|
+
| ⑤ | `select` lane; if Supabase → collect URL/env names + offer node-api scaffold; if Vectorize → binding/index |
|
|
109
|
+
| ⑥ | `plan` emits work-graph JSON + pretty plan card |
|
|
110
|
+
| ⑦ | `confirm` then run; stream stage events |
|
|
111
|
+
|
|
112
|
+
Terminal aesthetic: short notes, one clack prompt per step, `tip: use skill agentsam-codebaseindex`, no wall of presets.
|
|
113
|
+
|
|
114
|
+
### Studio / localhost Gantt
|
|
115
|
+
|
|
116
|
+
Work-graph is the **source of truth** for the job; Gantt/timeline are projections.
|
|
117
|
+
|
|
118
|
+
Example stages (bars):
|
|
119
|
+
|
|
120
|
+
1. `connect` — providers resolved
|
|
121
|
+
2. `inventory` — file map / merkle
|
|
122
|
+
3. `scope` — include/exclude locked
|
|
123
|
+
4. `embed_profile` — model + dims
|
|
124
|
+
5. `lane` — local | supabase | vectorize
|
|
125
|
+
6. `plan` — dry-run receipt
|
|
126
|
+
7. `index` — parse / chunk / embed
|
|
127
|
+
8. `activate` — verify + ready
|
|
128
|
+
|
|
129
|
+
Local Studio (or this preview) polls `agentsam_code_index_job` / local generation receipts and feeds `createGanttModel(graph)`.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 4. Supabase + node-api customer path (what “template” means)
|
|
134
|
+
|
|
135
|
+
When the user picks **Supabase / Hyperdrive**:
|
|
136
|
+
|
|
137
|
+
1. Scaffold edge from IAM `supabase/functions/node-api` **pattern** (ingest + account-scoped vector query RPCs).
|
|
138
|
+
2. Apply PG migrations that create **their** `agentsam.agentsam_codebase_*` (or lane-registry–driven table names).
|
|
139
|
+
3. Wire `AGENTSAM_DATABASE_URL` / Hyperdrive binding names into knowledge `lane.backend = supabase_pgvector`.
|
|
140
|
+
4. Register row in **their** `agentsam_pgvector_lane_registry` (or SDK lane config) pointing at table + model + dims.
|
|
141
|
+
5. Runs still use `codebaseindex.ingest` / `sam.codebaseindex.index.run` — only the **provider adapter** changes.
|
|
142
|
+
|
|
143
|
+
Owner machine: skip scaffold; credentials and node-api already exist → wizard jumps to inventory.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 5. CF Vectorize path (valid peer, not code-index SSOT for IAM)
|
|
148
|
+
|
|
149
|
+
IAM host law keeps **code index vectors off Vectorize**. Customer template may still choose Vectorize for **their** product:
|
|
150
|
+
|
|
151
|
+
- Plugin scope: binding + index + model + dims
|
|
152
|
+
- Knowledge `lane.backend = cloudflare_vectorize`
|
|
153
|
+
- Same guided steps ①–⑦; stage `lane` records Vectorize target in the receipt
|
|
154
|
+
|
|
155
|
+
Do not silently redirect owner IAM full-index onto Vectorize.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## 6. Local Ollama value (strategic I/O)
|
|
160
|
+
|
|
161
|
+
| Use | How |
|
|
162
|
+
|-----|-----|
|
|
163
|
+
| Free semantic search | `agentsam search --semantic` against local generation |
|
|
164
|
+
| Pre-filter before paid chat | Retrieve top-k chunks → pass only those to hosted model |
|
|
165
|
+
| Offline agent turns | Shell/agent retrieve while Ollama is up |
|
|
166
|
+
| Scope assist | Chat model (e.g. `qwen2.5-coder`) suggests include/exclude only |
|
|
167
|
+
|
|
168
|
+
Query must use **same** embed profile as write (e.g. `mxbai-embed-large:latest` @ 1024).
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## 7. Implementation slices (ordered)
|
|
173
|
+
|
|
174
|
+
| Slice | Deliverable |
|
|
175
|
+
|-------|-------------|
|
|
176
|
+
| **A** | Reframe CLI wizard to ①→⑦ (inventory before scope); `plan` prints work-graph stages |
|
|
177
|
+
| **B** | Emit `codebaseindex.job.graph.v1` JSON consumed by work-graph Gantt |
|
|
178
|
+
| **C** | Local Studio / preview page binding graph → Gantt (this doc’s companion HTML) |
|
|
179
|
+
| **D** | Lane picker adapters: local (done-ish), supabase+node-api scaffold stub, vectorize scope probe |
|
|
180
|
+
| **E** | Customer template pack: migrations + edge stub + README (no IAM secrets) |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 8. Acceptance checks
|
|
185
|
+
|
|
186
|
+
- [ ] Wizard never jumps to embed/lane before an inventory receipt exists (or user explicitly skips with `--skip-inventory`).
|
|
187
|
+
- [ ] Exclude is user-authored (blank = none).
|
|
188
|
+
- [ ] Embed options come only from credentials + live Ollama tags.
|
|
189
|
+
- [ ] Plan/dry-run produces work-graph JSON + human card.
|
|
190
|
+
- [ ] Gantt shows the same stage ids as CLI.
|
|
191
|
+
- [ ] Choosing Supabase does not mutate owner IAM tables when running as a customer template.
|
|
192
|
+
- [ ] Semantic retrieve fails closed on embedding-profile mismatch.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Related
|
|
197
|
+
|
|
198
|
+
- Host SSOT: `inneranimalmedia/docs/platform/codebase-index-ssot-2026-07.md`
|
|
199
|
+
- SAM kernel: `docs/architecture/SAM_KERNEL.md`
|
|
200
|
+
- Skill: `skills/agentsam-codebaseindex/SKILL.md`
|
|
201
|
+
- Work-graph: `packages/work-graph` (`createGanttModel`)
|
|
202
|
+
- Preview: `docs/architecture/previews/codebaseindex-guided-path/`
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Filesystem E2E closure receipt
|
|
2
|
+
|
|
3
|
+
**Status:** COMPLETE (product adapter + real PTY + identity + conflict)
|
|
4
|
+
**Commit target:** agentsam-sdk `main`
|
|
5
|
+
**Date:** 2026-09-25
|
|
6
|
+
|
|
7
|
+
## UI workflow exercised
|
|
8
|
+
|
|
9
|
+
1. `startLocalPtyServer` bound to disposable git root (same as `agentsam start-local`)
|
|
10
|
+
2. Studio bootstrap: `GET /v1/workspace/bootstrap` → capability
|
|
11
|
+
3. Monaco path: `RuntimeFilesystemAdapter.read/write` (identical contract to FilesStage save)
|
|
12
|
+
4. Real PTY WebSocket with same `workspace_id` / root / capability
|
|
13
|
+
5. `git diff -- README.md` in PTY shows Monaco marker
|
|
14
|
+
6. External disk edit → version change → stale write → `version_conflict`
|
|
15
|
+
7. Studio UI: Projects → Open filesystem… binds to authorized runtime root only
|
|
16
|
+
|
|
17
|
+
## Proof artifacts (from last green run)
|
|
18
|
+
|
|
19
|
+
| Field | Value |
|
|
20
|
+
|------|--------|
|
|
21
|
+
| disposable root | tmp `agentsam-fs-e2e-*` git repo |
|
|
22
|
+
| workspace_id | minted `ws_…` |
|
|
23
|
+
| runtime | `http://127.0.0.1:<ephemeral>` |
|
|
24
|
+
| PTY session | `pty_…` via workspace_identity |
|
|
25
|
+
| Monaco path | `README.md` |
|
|
26
|
+
| PTY path | `NOTES.md` |
|
|
27
|
+
| stale write | `code: version_conflict` |
|
|
28
|
+
| scratch fallback | **disabled** for filesystem projects |
|
|
29
|
+
|
|
30
|
+
Automated: `test/integration/studio-fs-pty-e2e.test.mjs`
|
|
31
|
+
Receipt JSON written under `$TMPDIR/agentsam-fs-e2e-receipt-*.json` on each run.
|
|
32
|
+
|
|
33
|
+
## Authorization model
|
|
34
|
+
|
|
35
|
+
See `docs/architecture/LOCAL_FS_AUTHORITY.md`.
|
|
36
|
+
|
|
37
|
+
- Loopback bind only
|
|
38
|
+
- Capability required (not API key)
|
|
39
|
+
- Arbitrary root claim rejected
|
|
40
|
+
- CORS allowlist (no `*`)
|
|
41
|
+
|
|
42
|
+
## Remaining (not blockers for FS closure)
|
|
43
|
+
|
|
44
|
+
- Native FS watcher → `workspace.file.changed` (today: focus/interval version check + conflict)
|
|
45
|
+
- Go agentsamd implementing `protocol/runtime/workspace-fs.v1.schema.json`
|
|
46
|
+
- Hosted account → enrolled instance graduation
|
|
47
|
+
- Computational Hyperspace Activity tab (separate product sprint; event-driven, not demo timer)
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [x] filesystem workspace opens (Studio dialog + runtime bind)
|
|
52
|
+
- [x] Monaco adapter reads/writes real file
|
|
53
|
+
- [x] Studio real PTY same root + identity frame
|
|
54
|
+
- [x] `git diff` sees Monaco edit
|
|
55
|
+
- [x] PTY/external edit observable; stale save conflicts
|
|
56
|
+
- [x] Scratch remains virtual; filesystem refuses virtual shell
|
|
57
|
+
- [x] no arbitrary path authority
|
|
58
|
+
- [x] filesystem contents not localStorage authority
|
|
59
|
+
- [x] integration receipt records workspace/root/runtime/session
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Local filesystem / PTY authority (closure sprint)
|
|
2
|
+
|
|
3
|
+
## What protects `/v1/fs` today
|
|
4
|
+
|
|
5
|
+
| Control | Behavior |
|
|
6
|
+
|--------|----------|
|
|
7
|
+
| **Binding** | Loopback only (`127.0.0.1`). Non-loopback host refused at start. |
|
|
8
|
+
| **Root** | Process-bound at `agentsam start-local` cwd. Clients cannot submit an arbitrary absolute root to gain authority. |
|
|
9
|
+
| **Capability** | Short-lived `awc_…` minted per runtime. Required on all `/v1/fs/*` and PTY attach (`?capability=`). Distinct from `AGENTSAM_API_KEY`. |
|
|
10
|
+
| **Bootstrap** | `GET /v1/workspace/bootstrap` — loopback + Studio origin allowlist. Rejects `?root=` that ≠ authorized cwd. |
|
|
11
|
+
| **CORS** | Not `*`. Allowlist of local Studio origins only. |
|
|
12
|
+
| **Containment** | All paths resolved via `resolveContainedPath` (traversal + symlink escape rejected). |
|
|
13
|
+
| **PTY cwd** | Must equal authorized root or a contained path; mismatch closes the socket. |
|
|
14
|
+
|
|
15
|
+
## Trust chain (local → hosted)
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
AGENTSAM_API_KEY (account/API — not used as PTY attach)
|
|
19
|
+
↓
|
|
20
|
+
local workspace capability awc_… (this sprint)
|
|
21
|
+
↓
|
|
22
|
+
PTY session + /v1/fs under one root
|
|
23
|
+
|
|
24
|
+
Later:
|
|
25
|
+
account → terminal:connect → enrolled instance → approved workspace root
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Studio identity
|
|
29
|
+
|
|
30
|
+
Filesystem project stores:
|
|
31
|
+
|
|
32
|
+
- `workspaceRoot` (= runtime authorized root)
|
|
33
|
+
- `runtimeBaseUrl`
|
|
34
|
+
- `workspaceId`
|
|
35
|
+
- `runtimeCapability`
|
|
36
|
+
|
|
37
|
+
Scratch projects never receive these; they keep the virtual shell.
|
|
38
|
+
Filesystem projects **refuse** virtual-shell fallback.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Cloudflare OAuth — AgentSam Local Studio
|
|
2
|
+
|
|
3
|
+
**Client:** AgentSam Local Studio · PKCE · secret `CLOUDFLARE_OAUTH_CLIENT_ID` on Worker
|
|
4
|
+
|
|
5
|
+
## Flows
|
|
6
|
+
|
|
7
|
+
| Flow | Start | Callback |
|
|
8
|
+
|------|-------|----------|
|
|
9
|
+
| Identity (“Sign in with Cloudflare”) | `/api/oauth/cloudflare/start?next=/agentsam` | `/api/oauth/cloudflare/callback` |
|
|
10
|
+
| MCP / account connector (`@agentsam-mcp`) | `/api/connections/cloudflare/start` | `/api/connections/cloudflare/callback` |
|
|
11
|
+
| Platform identity (`inneranimalmedia`) | `/api/oauth/inneranimalmedia/start` | `/api/oauth/inneranimalmedia/callback` |
|
|
12
|
+
| Legacy alias | `/api/oauth/iam/start` | `/api/oauth/iam/callback` |
|
|
13
|
+
|
|
14
|
+
Browser GET on connections **start** → 302 to Cloudflare.
|
|
15
|
+
`fetch` + `Accept: application/json` → `{ authorize_url }`.
|
|
16
|
+
|
|
17
|
+
## D1
|
|
18
|
+
|
|
19
|
+
- `identity_oauth_states` — identity PKCE (migration `0013_identity_oauth_states.sql`)
|
|
20
|
+
- `agentsam_cloudflare_oauth_state` — MCP connector PKCE
|
|
21
|
+
|
|
22
|
+
## IAM AS redirect (required)
|
|
23
|
+
|
|
24
|
+
Register on client `iam_agentsam_sdk_web`:
|
|
25
|
+
|
|
26
|
+
`https://agentsam.inneranimalmedia.com/api/oauth/inneranimalmedia/callback`
|
|
27
|
+
|
|
28
|
+
(Keep legacy `/api/oauth/iam/callback` during migration.)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Plan of action — CLI cutover + Local Studio desktop = apps/local-studio
|
|
2
|
+
|
|
3
|
+
**Status:** active · 2026-09-25
|
|
4
|
+
**Shipped tonight:** `58fddae` (SAM/codebaseindex WIP) · Local Studio Worker `c62a7350` on `agentsam.inneranimalmedia.com`
|
|
5
|
+
**Desktop note:** installed `.app` still needs a Tauri rebuild to pick up `launch_path: /agentsam`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## A. Finish CLI / SAM machine revisions
|
|
10
|
+
|
|
11
|
+
1. **Catalog owns dispatch** — migrate remaining `cli.js` if/else handlers into `src/cli/dispatch.js` lazy loaders; shrink `cli.js` to bootstrap + resolve + dispatch + errors.
|
|
12
|
+
2. **Delete legacy help authority** — remove `printLegacyHelp()`; help/overview only from `CLI_COMMAND_CATALOG`.
|
|
13
|
+
3. **Per-command skill law** — every machine command declares `skill` or explicit exemption; human tip on stderr; `--json` stays clean (`help.skill` in envelope when graduated).
|
|
14
|
+
4. **`--format pretty|json|jsonl`** — normalize machine output; keep `--json` alias.
|
|
15
|
+
5. **Shared material resolver** — promote `src/lib/ingest/materials.js` for brand/cad/security; archive sandbox limits + tests.
|
|
16
|
+
6. **Embedding dims are per-provider profile fingerprints** — not Ollama SSOT. Ollama is an *optional* local offer only. When CF credentials are present, Workers AI **Text Embeddings** models must appear in the ingest pool (chat allowlist must not hide them) so Vectorize lanes work from the same account model pool. Prefer adapter/probe length when available; name heuristics are hints only.
|
|
17
|
+
7. **Storage lanes object** — `metadata` vs `vectors` in knowledge config (local / supabase / vectorize presets).
|
|
18
|
+
8. **`agentsam app options`** — discover `apps/*/`, theme packages, manifests (kill hardcoded init menus).
|
|
19
|
+
9. **Graduate ops** — `brand.preview`, BrandPack export/import; keep scan read-only.
|
|
20
|
+
10. **Skills + tools registry parity** — portable `skills/catalog.json` ↔ D1 `agentsam_skill`; filesystem/AST/DAG tools in `agentsam_tools` schema+seed so new users get the same inspection surface as the IAM host. No stale skills.
|
|
21
|
+
11. **Tests from sprint §31** — catalog help, JSON tips absent, inventory-before-scope, profile mismatch, archive fixtures, CF embed discovery.
|
|
22
|
+
|
|
23
|
+
## B. Installed AgentSam Local Studio = apps/local-studio experience
|
|
24
|
+
|
|
25
|
+
### Product surfaces (locked)
|
|
26
|
+
|
|
27
|
+
| Surface | URL | Role |
|
|
28
|
+
|---------|-----|------|
|
|
29
|
+
| PUBLIC | `/` | Marketing — never desktop home |
|
|
30
|
+
| IDENTITY | `/auth/login` | Real portal (email + OAuth) |
|
|
31
|
+
| PRODUCT | `/agentsam` | Local Studio / Workbench (`apps/local-studio`) |
|
|
32
|
+
|
|
33
|
+
### Desktop chain
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
AgentSam Local Studio.app (Tauri · agentsam-desktop-shell)
|
|
37
|
+
│
|
|
38
|
+
▼ launch_url
|
|
39
|
+
https://agentsam.inneranimalmedia.com/agentsam
|
|
40
|
+
│
|
|
41
|
+
▼ session check (server-authoritative)
|
|
42
|
+
┌────┴────┐
|
|
43
|
+
valid missing
|
|
44
|
+
│ │
|
|
45
|
+
▼ ▼
|
|
46
|
+
Workbench /auth/login?next=/agentsam
|
|
47
|
+
│
|
|
48
|
+
▼ success
|
|
49
|
+
/agentsam
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Steps
|
|
53
|
+
|
|
54
|
+
1. **Rebuild desktop** (picks up manifest `/agentsam`):
|
|
55
|
+
```bash
|
|
56
|
+
cd packages/agentsam-desktop-shell
|
|
57
|
+
node scripts/build-brand.mjs local-studio
|
|
58
|
+
npm run build # or: npx tauri build after build-brand
|
|
59
|
+
```
|
|
60
|
+
Install/replace `/Applications/AgentSam Local Studio.app` from the new `.app`/DMG.
|
|
61
|
+
|
|
62
|
+
2. **Auth adapter (tiny)** — session status → begin login → deep-link `agentsamstudio://callback` → logout. No Tauri auth DB; reuse `packages/identity` + same-origin cookies for email/password.
|
|
63
|
+
|
|
64
|
+
3. **Gate `/agentsam`** — unauthenticated users always land on `/auth/login?next=/agentsam`; never fall back to `/`.
|
|
65
|
+
|
|
66
|
+
4. **Logged-in dashboard UX** — audit Workbench routes under `apps/local-studio/frontend/src/routes/(apps)/agentsam*` (Chat/Work/Browser/terminal); fix any deep-link that returns to marketing home.
|
|
67
|
+
|
|
68
|
+
5. **Native affordances** — tray, keychain (session/account state only — not raw API keys in webview), updater later, local-node enrollment when agentsamd lands.
|
|
69
|
+
|
|
70
|
+
6. **Parity QA checklist**
|
|
71
|
+
- Cold launch → `/agentsam` (or login), never homepage
|
|
72
|
+
- Email login → return `/agentsam`
|
|
73
|
+
- OAuth (Google/GitHub/CF) → deep link → `/agentsam`
|
|
74
|
+
- Logout → identity, re-open app → login again
|
|
75
|
+
- Hosted browser vs installed app show same Workbench build (Worker version)
|
|
76
|
+
|
|
77
|
+
7. **Later** — bundle Local Studio assets offline + agentsamd IPC; keep same route/auth contract.
|
|
78
|
+
|
|
79
|
+
## C. Order of attack (recommended)
|
|
80
|
+
|
|
81
|
+
| # | Work | Outcome |
|
|
82
|
+
|---|------|---------|
|
|
83
|
+
| 1 | Tauri rebuild `local-studio` + reinstall | Installed app opens `/agentsam` |
|
|
84
|
+
| 2 | Session gate + login next= | Login ↔ Workbench loop solid |
|
|
85
|
+
| 3 | CLI catalog cutover (dispatch) | No dual truth in `cli.js` |
|
|
86
|
+
| 4 | Material + format + app options | Machine CLI usable without LLM |
|
|
87
|
+
| 5 | brand.preview + BrandPack | Brand product path |
|
|
88
|
+
| 6 | agentsamd + bundled UI | Desktop = workstation, not wrapper |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Proof already live
|
|
93
|
+
|
|
94
|
+
- Git: `58fddae` on `main`
|
|
95
|
+
- Worker: `agentsam-sdk` version `c62a7350-f68d-40cb-9a45-a4fe5b3d48f5`
|
|
96
|
+
- `GET /agentsam` → 200 · `GET /auth/login` → 200
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Sprint receipt — decisions observable + recovery semantics
|
|
2
|
+
|
|
3
|
+
**Commit target:** agentsam-sdk
|
|
4
|
+
**Scope:** Connect SAM decisions to runs/outcomes/activity; add RecoveryPlan. No new choose/score/check primitives.
|
|
5
|
+
|
|
6
|
+
## Shipped
|
|
7
|
+
|
|
8
|
+
### 1. Outcome capture + run linkage
|
|
9
|
+
- Receipts carry `run_id`, `step_id`, `action_id`, `outcome_id`
|
|
10
|
+
- `attachAction(receipt, action)`
|
|
11
|
+
- `appendOutcome` dispositions: accepted / rejected / overridden / corrected_to / retry_required / verification_failed / user_intervened
|
|
12
|
+
- `label_strength`: supervised | explicit_accept | weak_passive
|
|
13
|
+
(passive /why with no correction ≠ strong calibration label)
|
|
14
|
+
|
|
15
|
+
### 2. Activity stream (`agentsam.activity.v1`)
|
|
16
|
+
- `createActivityStore(run_id)` · `activityFromDecision` · `decision.made`
|
|
17
|
+
- User-facing labels ("Selecting execution path") — primitives only in `evidence`
|
|
18
|
+
- `evaluate({ activity, run_id })` emits events for Studio/CLI subscribers
|
|
19
|
+
|
|
20
|
+
### 3. Error recovery (not more ERROR_REASON sprawl)
|
|
21
|
+
- Optional envelope fields: `failure_class`, `operation.side_effect_state`, `retry`, `fallback`, `notify`, `cause`, partial status
|
|
22
|
+
- `planRecovery(error, operationContext)` → `agentsam.recovery.v1`
|
|
23
|
+
- **Unknown side effects ⇒ reconcile, never blind retry**
|
|
24
|
+
|
|
25
|
+
### 4. Protocols
|
|
26
|
+
- `protocol/sam/activity.v1.schema.json`
|
|
27
|
+
- `protocol/errors/recovery.v1.schema.json`
|
|
28
|
+
- receipt/outcome schemas extended
|
|
29
|
+
- error-envelope optional recovery dimensions
|
|
30
|
+
|
|
31
|
+
## Intentionally deferred
|
|
32
|
+
- IAM `attach_token_hash` rename + `terminal:connect` on control plane (IAM repo)
|
|
33
|
+
- Studio Activity SideStage / Hyperspace canvas wiring (consume activity store next)
|
|
34
|
+
- CLI TUI live region
|
|
35
|
+
- Go watcher → decision.evaluate loop
|
|
36
|
+
- Full ERROR_REASON enum expansion for every FS/PTY string (use failure_class + native evidence)
|
|
37
|
+
|
|
38
|
+
## Tests
|
|
39
|
+
`test/integration/sam-activity-recovery.test.mjs` (+ prior decision/error suites green)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# SAM Decision Layer — Work Receipt
|
|
2
|
+
|
|
3
|
+
**Package:** `@inneranimalmedia/agentsam-sdk`
|
|
4
|
+
**Scope:** AgentSam-native choose / score / check (no TypeSafe/Jev)
|
|
5
|
+
**Date:** 2026-09-25
|
|
6
|
+
|
|
7
|
+
## Files changed
|
|
8
|
+
|
|
9
|
+
### Core
|
|
10
|
+
- `src/sam/decision/` — types, state, validate, confidence, questions, evaluate, policy, receipt, calibration, hierarchical
|
|
11
|
+
- `src/sam/decision/evaluators/` — deterministic, heuristic, semantic, select
|
|
12
|
+
- `src/sam/operations/decision-evaluate.js`
|
|
13
|
+
- `src/sam/seed.js`, `src/sam/index.js`, `src/sam/client.js`
|
|
14
|
+
- `package.json` — protocol subpath exports
|
|
15
|
+
|
|
16
|
+
### Protocols
|
|
17
|
+
- `protocol/sam/state.v1.schema.json`
|
|
18
|
+
- `protocol/sam/question.v1.schema.json`
|
|
19
|
+
- `protocol/sam/answer.v1.schema.json`
|
|
20
|
+
- `protocol/sam/evaluation.v1.schema.json`
|
|
21
|
+
- `protocol/sam/decision-receipt.v1.schema.json`
|
|
22
|
+
- `protocol/sam/outcome.v1.schema.json`
|
|
23
|
+
- `protocol/sam/calibration.v1.schema.json`
|
|
24
|
+
|
|
25
|
+
### Tests
|
|
26
|
+
- `test/integration/sam-decision.test.mjs` (35 cases) + A*/GOAP remain green
|
|
27
|
+
|
|
28
|
+
## Evaluators implemented
|
|
29
|
+
| Kind | Status |
|
|
30
|
+
|------|--------|
|
|
31
|
+
| deterministic | terminal_lane, retrieval_mode, change_risk, requires_approval, security_review_required, verification_scope, skill_candidate |
|
|
32
|
+
| heuristic | fact-backed score/check |
|
|
33
|
+
| semantic | optional via `createSemanticEvaluator({ complete })`; fails closed if unconfigured |
|
|
34
|
+
| calibrated-statistical | deferred (contract + metrics only) |
|
|
35
|
+
|
|
36
|
+
## Decision use cases
|
|
37
|
+
1. **terminal_lane** — local files + healthy local → `local`
|
|
38
|
+
2. **cross-cutting change fan-out** — risk / approval / sandbox / security / verification_scope in one batch
|
|
39
|
+
3. **skill_candidate** — OAuth migration → `mcp-oauth`
|
|
40
|
+
|
|
41
|
+
## Raw vs calibrated semantics
|
|
42
|
+
- Default labels: `scores`, `support`, `confidence_estimate`
|
|
43
|
+
- `probabilities` only when evaluator marks probabilistic interpretation
|
|
44
|
+
- `calibrated_probability` requires `calibration_id`
|
|
45
|
+
- Semantic answers always warn: estimates, not calibrated probabilities
|
|
46
|
+
|
|
47
|
+
## Intentionally deferred
|
|
48
|
+
- Learned classifiers / held-out training
|
|
49
|
+
- Go `/v1/sam/evaluate` host
|
|
50
|
+
- Live Merkle/filesystem decision signals
|
|
51
|
+
- IAM `attach_token_hash` rename (not present in agentsam-sdk; IAM-side)
|
|
52
|
+
|
|
53
|
+
## Auth note (architecture only)
|
|
54
|
+
`AGENTSAM_API_KEY` ≠ terminal attach token. Prefer `attach_token_hash` naming on IAM terminal sessions when that sprint lands.
|