@inneranimalmedia/agentsam-sdk 2.6.8 → 2.6.10

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.
Files changed (203) hide show
  1. package/README.md +18 -0
  2. package/apps/README.md +25 -0
  3. package/apps/cad-creator/shared/cad/package.json +1 -1
  4. package/apps/client-cms-editor/backend/package.json +5 -7
  5. package/apps/client-cms-editor/frontend/package.json +5 -7
  6. package/apps/client-cms-editor/frontend/tsconfig.json +27 -8
  7. package/apps/client-cms-editor/package-lock.json +8 -8
  8. package/apps/client-cms-editor/package.json +1 -1
  9. package/apps/client-cms-editor/shared/cms/package.json +3 -5
  10. package/docs/LOCAL_ENGINE_COMPUTE_AUDIT_PLAN.md +299 -0
  11. package/docs/architecture/HOOKS-MODELS-SELF-HOSTING-PLAN.md +199 -0
  12. package/examples/hyperspace-demo/index.html +16 -0
  13. package/examples/hyperspace-demo/package.json +21 -0
  14. package/examples/hyperspace-demo/src/main.tsx +160 -0
  15. package/examples/hyperspace-demo/tsconfig.json +9 -0
  16. package/examples/hyperspace-demo/vite.config.ts +24 -0
  17. package/migrations/runtime/0005_agentsam_hooks.sql +87 -0
  18. package/package.json +37 -10
  19. package/packages/agentsam-brand/package.json +1 -1
  20. package/packages/agentsam-brand/src/core/v2/compile.js +1 -1
  21. package/packages/agentsam-brand/src/core/v2/schema.js +1 -1
  22. package/packages/agentsam-contracts/package.json +71 -20
  23. package/packages/agentsam-contracts/scripts/build.mjs +18 -0
  24. package/packages/agentsam-contracts/src/errors.ts +19 -10
  25. package/packages/agentsam-contracts/test/contracts.test.mjs +4 -1
  26. package/packages/agentsam-contracts/test/repository.test.mjs +4 -1
  27. package/packages/agentsam-contracts/tsconfig.build.json +10 -0
  28. package/packages/agentsam-errors/package.json +13 -4
  29. package/packages/agentsam-errors/protocol/agentsam.error.v2.schema.json +821 -0
  30. package/packages/agentsam-errors/protocol/error-catalog.json +3512 -0
  31. package/packages/agentsam-errors/src/envelope.js +63 -11
  32. package/packages/agentsam-errors/src/error.js +6 -0
  33. package/packages/agentsam-errors/src/fingerprint.js +9 -1
  34. package/packages/agentsam-errors/src/normalize.js +51 -6
  35. package/packages/agentsam-errors/src/recovery.js +9 -35
  36. package/packages/agentsam-errors/src/transport.js +6 -1
  37. package/packages/agentsam-errors/src/vocabulary.js +515 -126
  38. package/packages/agentsam-errors/test/catalog-v2.test.mjs +106 -0
  39. package/packages/agentsam-errors/types/index.d.ts +157 -0
  40. package/packages/agentsam-goap/package.json +2 -2
  41. package/packages/agentsam-hooks/README.md +206 -0
  42. package/packages/agentsam-hooks/bin/agentsam-hooks.mjs +64 -0
  43. package/packages/agentsam-hooks/bindings/go/command.go +55 -0
  44. package/packages/agentsam-hooks/bindings/go/errors_generated.go +402 -0
  45. package/packages/agentsam-hooks/bindings/go/go.mod +3 -0
  46. package/packages/agentsam-hooks/bindings/go/hooks.go +285 -0
  47. package/packages/agentsam-hooks/bindings/go/hooks_test.go +48 -0
  48. package/packages/agentsam-hooks/bindings/rust/Cargo.toml +11 -0
  49. package/packages/agentsam-hooks/bindings/rust/src/errors_generated.rs +396 -0
  50. package/packages/agentsam-hooks/bindings/rust/src/lib.rs +397 -0
  51. package/packages/agentsam-hooks/package.json +69 -0
  52. package/packages/agentsam-hooks/schema/manifest.json +54 -0
  53. package/packages/agentsam-hooks/scripts/clean-protocol.mjs +17 -0
  54. package/packages/agentsam-hooks/scripts/sync-protocol.mjs +27 -0
  55. package/packages/agentsam-hooks/src/adapters/agents.js +82 -0
  56. package/packages/agentsam-hooks/src/adapters/callback.js +4 -0
  57. package/packages/agentsam-hooks/src/adapters/capability.js +122 -0
  58. package/packages/agentsam-hooks/src/adapters/command.js +104 -0
  59. package/packages/agentsam-hooks/src/adapters/composite.js +31 -0
  60. package/packages/agentsam-hooks/src/adapters/http.js +58 -0
  61. package/packages/agentsam-hooks/src/adapters/lsp.js +116 -0
  62. package/packages/agentsam-hooks/src/adapters/mcp.js +76 -0
  63. package/packages/agentsam-hooks/src/adapters/provider.js +129 -0
  64. package/packages/agentsam-hooks/src/config.js +143 -0
  65. package/packages/agentsam-hooks/src/contracts.js +284 -0
  66. package/packages/agentsam-hooks/src/errors-generated.js +2732 -0
  67. package/packages/agentsam-hooks/src/index.d.ts +193 -0
  68. package/packages/agentsam-hooks/src/index.js +14 -0
  69. package/packages/agentsam-hooks/src/policy.js +34 -0
  70. package/packages/agentsam-hooks/src/runtime.js +312 -0
  71. package/packages/agentsam-hooks/src/store.js +264 -0
  72. package/packages/agentsam-hooks/test/adapters.test.mjs +216 -0
  73. package/packages/agentsam-hooks/test/runtime.test.mjs +258 -0
  74. package/packages/agentsam-knowledge/package.json +3 -2
  75. package/packages/agentsam-nav/package.json +1 -1
  76. package/packages/agentsam-queue-control/package.json +1 -1
  77. package/packages/agentsam-rapid-rust/src/main.rs +1 -0
  78. package/packages/agentsam-repository/package.json +3 -2
  79. package/packages/agentsam-vault/package.json +8 -5
  80. package/packages/agentsam-workbench/package.json +45 -18
  81. package/packages/connectors/cloudflare/package.json +1 -1
  82. package/packages/heuristic-theme/package.json +1 -1
  83. package/packages/identity/package.json +3 -2
  84. package/packages/identity/tests/lane1-packed-consumer.test.mjs +9 -1
  85. package/packages/providers/completeful/package.json +1 -1
  86. package/packages/theme-church-site/README.md +2 -2
  87. package/packages/theme-church-site/package.json +2 -3
  88. package/packages/theme-church-site/src/index.js +1 -1
  89. package/packages/theme-church-site/test/theme.test.mjs +1 -1
  90. package/packages/theme-companions-site/README.md +2 -2
  91. package/packages/theme-companions-site/package.json +2 -3
  92. package/packages/theme-companions-site/src/index.js +1 -1
  93. package/packages/theme-companions-site/test/theme.test.mjs +1 -1
  94. package/packages/theme-floors-site/README.md +2 -2
  95. package/packages/theme-floors-site/package.json +2 -3
  96. package/packages/theme-floors-site/src/index.js +1 -1
  97. package/packages/theme-floors-site/test/theme.test.mjs +1 -1
  98. package/packages/theme-fuelnfree-site/README.md +2 -2
  99. package/packages/theme-fuelnfree-site/package.json +2 -3
  100. package/packages/theme-fuelnfree-site/src/index.js +1 -1
  101. package/packages/theme-fuelnfree-site/test/theme.test.mjs +1 -1
  102. package/packages/theme-handyman-site/README.md +2 -2
  103. package/packages/theme-handyman-site/package.json +2 -3
  104. package/packages/theme-handyman-site/src/index.js +1 -1
  105. package/packages/theme-handyman-site/test/theme.test.mjs +1 -1
  106. package/packages/theme-insurance-site/README.md +2 -2
  107. package/packages/theme-insurance-site/package.json +2 -3
  108. package/packages/theme-insurance-site/src/index.js +1 -1
  109. package/packages/theme-insurance-site/test/theme.test.mjs +1 -1
  110. package/packages/theme-scenes/package.json +1 -1
  111. package/packages/theme-shinshu-site/README.md +2 -2
  112. package/packages/theme-shinshu-site/package.json +2 -3
  113. package/packages/theme-shinshu-site/src/index.js +1 -1
  114. package/packages/theme-shinshu-site/test/theme.test.mjs +1 -1
  115. package/packages/work-graph/package.json +3 -2
  116. package/protocol/apps/agentsam.app.v1.schema.json +1 -1
  117. package/protocol/apps/agentsam.host-install.v1.schema.json +1 -1
  118. package/protocol/assets/asset-record.v1.schema.json +1 -1
  119. package/protocol/brand/brandpack.v1.schema.json +1 -1
  120. package/protocol/capabilities/capability-manifest.schema.json +1 -1
  121. package/protocol/capabilities/knowledge-search-input.schema.json +1 -0
  122. package/protocol/credentials/issue.v1.schema.json +1 -1
  123. package/protocol/database/agentsam.schema-pack.v1.schema.json +1 -1
  124. package/protocol/database/connection.v1.schema.json +1 -1
  125. package/protocol/embeddings/embedding-profile.v1.schema.json +1 -1
  126. package/protocol/errors/README.md +36 -0
  127. package/protocol/errors/agentsam.error.v2.schema.json +821 -0
  128. package/protocol/errors/error-catalog.json +3506 -158
  129. package/protocol/errors/error-envelope.schema.json +195 -52
  130. package/protocol/errors/recovery.v1.schema.json +1 -1
  131. package/protocol/features/agentsam.feature.v1.schema.json +1 -1
  132. package/protocol/hooks/README.md +18 -0
  133. package/protocol/hooks/agentsam.hook.output.v1.schema.json +27 -0
  134. package/protocol/hooks/agentsam.hook.receipt.v1.schema.json +61 -0
  135. package/protocol/hooks/agentsam.hook.v1.schema.json +35 -0
  136. package/protocol/hooks/agentsam.hooks.config.v1.schema.json +78 -0
  137. package/protocol/local-engine/benchmark.v1.schema.json +14 -0
  138. package/protocol/local-engine/engine.v1.schema.json +17 -0
  139. package/protocol/models/model-inventory-v2.schema.json +1 -1
  140. package/protocol/models/provider-model-snapshot.v1.schema.json +22 -0
  141. package/protocol/rpc/v1/errors.proto +1 -0
  142. package/protocol/runtime/agentsam.runtime.v1.schema.json +1 -1
  143. package/protocol/runtime/workspace-fs.v1.schema.json +1 -1
  144. package/protocol/sam/activity.v1.schema.json +1 -1
  145. package/protocol/sam/answer.v1.schema.json +1 -1
  146. package/protocol/sam/calibration.v1.schema.json +1 -1
  147. package/protocol/sam/decision-receipt.v1.schema.json +1 -1
  148. package/protocol/sam/evaluation.v1.schema.json +1 -1
  149. package/protocol/sam/operation.schema.json +1 -1
  150. package/protocol/sam/outcome.v1.schema.json +1 -1
  151. package/protocol/sam/question.v1.schema.json +1 -1
  152. package/protocol/sam/result.schema.json +1 -1
  153. package/protocol/sam/state.v1.schema.json +1 -1
  154. package/protocol/scoring/scorecard.v1.schema.json +1 -1
  155. package/protocol/skills/agentsam.interaction.v1.schema.json +1 -1
  156. package/protocol/skills/agentsam.skill.v1.schema.json +1 -1
  157. package/protocol/theme-refinery/product-metadata.schema.json +1 -1
  158. package/protocol/theme-refinery/reconciliation-receipt.schema.json +1 -1
  159. package/protocol/ui/icon.v1.schema.json +1 -1
  160. package/python/README.md +20 -0
  161. package/python/agentsam_sdk/errors/__init__.py +4 -0
  162. package/python/agentsam_sdk/errors/vocabulary.py +2730 -0
  163. package/python/agentsam_sdk/hooks/__init__.py +32 -0
  164. package/python/agentsam_sdk/hooks/adapters.py +132 -0
  165. package/python/agentsam_sdk/hooks/contracts.py +121 -0
  166. package/python/agentsam_sdk/hooks/runtime.py +253 -0
  167. package/python/tests/test_hooks.py +115 -0
  168. package/src/agent/responses-runner.js +145 -1
  169. package/src/cli/command-catalog.js +2 -0
  170. package/src/cli.js +19 -0
  171. package/src/commands/app.js +10 -0
  172. package/src/commands/cheat-sheet.js +1 -0
  173. package/src/commands/engine.js +10 -0
  174. package/src/commands/hooks.js +260 -0
  175. package/src/commands/machine.js +71 -38
  176. package/src/commands/models.js +1 -1
  177. package/src/commands/package.js +10 -3
  178. package/src/commands/runtime.js +25 -10
  179. package/src/commands/setup.js +30 -6
  180. package/src/commands/shell.js +114 -9
  181. package/src/commands/terminal.js +20 -8
  182. package/src/errors/contract.js +4 -4
  183. package/src/errors/diagnostic.js +10 -10
  184. package/src/errors/index.js +1 -1
  185. package/src/index.js +52 -0
  186. package/src/indexing/ingest/materials.js +237 -30
  187. package/src/knowledge/service/grpc-codec.js +2 -0
  188. package/src/lib/setup/runtime.js +4 -2
  189. package/src/lib/slash-commands.js +1 -0
  190. package/src/local/runtime-store.js +46 -0
  191. package/src/local-engine/assets.js +37 -0
  192. package/src/local-engine/audit.js +133 -0
  193. package/src/local-engine/benchmark.js +26 -0
  194. package/src/local-engine/contracts.js +101 -0
  195. package/src/local-engine/engines.js +142 -0
  196. package/src/local-engine/index.js +18 -0
  197. package/src/local-engine/runtime.js +39 -0
  198. package/src/models/catalog.js +0 -49
  199. package/src/models/inventory-core.js +69 -0
  200. package/src/plugins/index.js +8 -1
  201. package/src/plugins/registry.js +56 -0
  202. package/src/rpc/generated/errors_pb.js +49 -1
  203. package/src/tools/runtime.js +13 -5
@@ -0,0 +1,199 @@
1
+ # Hooks, model inventory, and self-hosting plan
2
+
3
+ Status: active implementation plan (2026-10-02)
4
+
5
+ ## Decisions
6
+
7
+ ### Hooks are one runtime concept
8
+
9
+ AgentSam has one lifecycle event catalog, one output merge algorithm, and one
10
+ receipt format. It has multiple **authoring sources**, not multiple kinds of
11
+ hook:
12
+
13
+ | Source | Authored in | Dashboard/CLI behavior | Durable definition row |
14
+ |---|---|---|---|
15
+ | `code` | SDK registration | visible, read-only | no |
16
+ | `config` | `agentsam.hooks.json` or `.agentsam/hooks.json` | visible, file-owned | no |
17
+ | `stored` | CLI/API/dashboard | visible and mutable | `agentsam_hook` |
18
+ | `system` | AgentSam runtime | visible, read-only | only when a host intentionally materializes it |
19
+
20
+ React hooks (`useAgentHooks`, `useHookList`) are UI implementation details and
21
+ must never be called lifecycle hooks in product copy.
22
+
23
+ Dispatch order is priority, then hook key. Source does not create a second
24
+ semantics path. A source badge answers where to edit a definition. Execution
25
+ receipts from all sources go to the same `agentsam_hook_execution` projection.
26
+
27
+ ### Portable ownership is owner + optional scope
28
+
29
+ The portable hook schema deliberately has no `tenant_id`, `workspace_id`,
30
+ `user_id`, `person_uuid`, or installation-specific foreign keys.
31
+
32
+ - `owner_id` is an opaque host/account/local owner key.
33
+ - `scope_type` is `global`, `account`, `repository`, `project`, or `session`.
34
+ - `scope_ref` contains the corresponding opaque id/path when needed.
35
+ - `agent_run_id`, `session_id`, and `conversation_id` are the common execution
36
+ correlations.
37
+ - Rare correlations (plan, todo, workflow run, command run, route) belong in
38
+ `correlation_json`, not a permanently sparse column set.
39
+ - `workflow_id` is a soft reference on the definition. The hook pack remains
40
+ installable without a workflow table family.
41
+ - Handler credentials are references resolved by the host. They are never
42
+ values in `handler_config_json`.
43
+
44
+ The canonical fresh-install SQL is
45
+ `migrations/runtime/0005_agentsam_hooks.sql`. The standalone hooks package
46
+ ships a generated byte-identical copy plus `schema/manifest.json`.
47
+
48
+ Existing hosted tables with required `user_id` or tenant/workspace columns are
49
+ **not** silently rebuilt. The hosted owner must inspect references and run an
50
+ explicit copy/verify/swap migration. Portable initialization is idempotent and
51
+ will not guess that `user_id` equals an account owner.
52
+
53
+ ### The existing model surfaces keep their jobs
54
+
55
+ No new per-model-per-user table is introduced.
56
+
57
+ | Existing surface | Authority |
58
+ |---|---|
59
+ | `src/models/catalog.js` / hosted `agentsam_model_catalog` | curated provider-qualified reference capabilities; never credential availability |
60
+ | `agentsam_model_pricing` | global/versioned reference pricing |
61
+ | `agentsam_plugins` with `plugin_kind='ai'` | one installation per account/environment/provider/credential reference; health and last good credential-scoped model snapshot |
62
+ | `user_secrets` / machine vault | provider secret material; never model metadata |
63
+ | `agentsam_api_credentials` | authentication to AgentSam itself; never provider keys |
64
+ | `agentsam_model_eval_observations` | eval evidence; not a portable customer model catalog |
65
+
66
+ A successful provider probe writes a compact
67
+ `agentsam.provider-model-snapshot.v1` object into the AI plugin row's
68
+ `metadata_json.model_snapshot`. It contains sorted model ids, count, hash, and
69
+ fetch time. `recordAiPluginModelDiscovery` writes it through the existing
70
+ plugin registry and health-check log. A failed probe updates health evidence
71
+ but preserves the last good snapshot. Secret values and hashes of secret values
72
+ are never included.
73
+
74
+ The provider API remains the availability authority at use time. A snapshot is
75
+ stale-while-revalidate evidence for UI convenience, not an authorization gate.
76
+ Reference catalog enrichment is never an availability claim. Unknown models
77
+ continue to work with unknown/reference capabilities where the adapter can use
78
+ them.
79
+
80
+ Provider/model identity is the pair `(provider, provider_model_id)`. The SDK's
81
+ `model_key` already encodes that pair (`openai:gpt-…`, `cursor:…`). Hosted SQL
82
+ must use `UNIQUE(provider, model_key)` (or a provider-qualified `model_key`),
83
+ not global `UNIQUE(model_key)`. Provider ids should match SDK canonical ids:
84
+ `openai`, `anthropic`, `gemini`, `xai`, `cursor`, `cloudflare`, and `ollama`.
85
+ Display names are not ids.
86
+
87
+ ## Product and CLI experience
88
+
89
+ `agentsam hooks` and `/hooks` are the factual control surface:
90
+
91
+ - `status` — source counts, project config, and stored registry health.
92
+ - `list` — merged dispatch order with source, handler, state, and priority.
93
+ - `executions` — recent value-free receipts and redacted failures.
94
+ - `validate` — portable config validation.
95
+ - `init` — idempotently creates `.agentsam/hooks.json`.
96
+ - `enable` / `disable` — toggles stored definitions only.
97
+
98
+ The dashboard should consume the same status/list/execution projection. It must
99
+ not maintain a second event list or merge algorithm. Code rows are read-only;
100
+ config rows link to their source file; stored rows expose full editing. A future
101
+ priority/disable override for code hooks must be an explicit overlay keyed by
102
+ `(owner_id, source_kind, hook_key)`, not a copied code definition.
103
+
104
+ The model picker follows a similar provenance rule:
105
+
106
+ 1. show models discovered for the selected plugin/credential installation;
107
+ 2. enrich from the global catalog when a provider-qualified match exists;
108
+ 3. label every limit/capability as provider, reference, or unknown;
109
+ 4. keep pinned/default visibility in the AI plugin's `config_json`;
110
+ 5. never write discovered ids into the global catalog.
111
+
112
+ ## Dogfooding matrix
113
+
114
+ | Runtime point | Hook event | Current owner |
115
+ |---|---|---|
116
+ | interactive shell open/close | `session_start`, `session_end` | CLI shell |
117
+ | submitted/transformed input | `user_prompt_submitted`, `user_prompt_transformed` | provider-neutral runner |
118
+ | paid inference boundaries | `pre_model_use`, `post_model_use` | provider adapter |
119
+ | capability side effects | `pre_tool_use`, `post_tool_use`, `post_tool_use_failure` | capability adapter |
120
+ | provider/tool failures | `error_occurred` | provider/capability adapters |
121
+ | autonomous continuation | `agent_stop` | runner with bounded continuation count |
122
+ | delegated work | `subagent_start`, `subagent_stop` | delegated-agent adapter |
123
+
124
+ The interactive CLI loads code, project config, and active stored hooks into the
125
+ same runtime. `session_start.modified_config` may override the session's model,
126
+ reasoning, service tier, and compaction preference; arbitrary process or path
127
+ configuration is not applied. Session context is injected through normal
128
+ context items. Every invocation uses the same receipt observer and local
129
+ execution table.
130
+
131
+ `session_end` remains best effort. Handlers must be idempotent, and durable
132
+ cleanup must eventually be backed by an idle-session sweeper rather than an
133
+ assumption that a process always exits normally.
134
+
135
+ ## Delivery sequence
136
+
137
+ ### Phase 1 — portable core (implemented in this change)
138
+
139
+ - Canonical portable hook tables and schema-pack manifest.
140
+ - Generic injected-SQL hook store for SQLite/D1-shaped adapters.
141
+ - Stored/config/code source merging.
142
+ - CLI `/hooks` discovery and value-free execution history.
143
+ - Actual shell/runner dogfooding, including session and transformed-prompt
144
+ events.
145
+ - Compact AI plugin model snapshot contract and existing-plugin persistence API with last-good preservation.
146
+
147
+ ### Phase 2 — hosted compatibility migration
148
+
149
+ 1. Inventory every FK/view/query referencing hosted `agentsam_hook` and
150
+ `agentsam_hook_execution`.
151
+ 2. Create `_v2` tables from the portable columns plus host-required indexes.
152
+ 3. Map `owner_id` from the hosted account authority; do not infer it from a
153
+ tenant/workspace label.
154
+ 4. Move legacy handler fields into `handler_config_json` and legacy correlation
155
+ fields into `correlation_json`.
156
+ 5. Validate row counts, active definitions, orphan references, JSON validity,
157
+ and sampled execution history.
158
+ 6. Swap in one transaction where supported; retain a rollback table until
159
+ production verification completes.
160
+ 7. Add the dashboard API only after ownership checks are enforced by the host.
161
+
162
+ ### Phase 3 — shared dashboard projection
163
+
164
+ - Expose merged definitions and receipts through an injected HookRegistry API.
165
+ - Add source badges, event filters, dry-run input, and last-failure state.
166
+ - Add stored-hook create/edit with handler-specific forms.
167
+ - Add explicit code-hook overrides without copying handler definitions.
168
+ - Reuse the protocol conformance fixtures in UI/API integration tests.
169
+
170
+ ### Phase 4 — model snapshot persistence
171
+
172
+ - Apply `createAiPluginProbePatch` in the hosted provider probe transaction.
173
+ - Compare `models_hash`; avoid writes when the snapshot is unchanged.
174
+ - Refresh stale snapshots in the background and through `agentsam models
175
+ --refresh` without blocking startup.
176
+ - Keep last good ids on auth/network failures and expose health separately.
177
+ - Add retention only to probe history, not the last good plugin snapshot.
178
+
179
+ ### Phase 5 — lifecycle reliability
180
+
181
+ - Add stale-session sweep and idempotent cleanup jobs.
182
+ - Add execution retention/compaction policy.
183
+ - Add local↔remote receipt sync by immutable execution id where explicitly
184
+ enabled; never sync secrets or full prompt/tool values.
185
+ - Run JSON conformance fixtures in JavaScript, Python, Go, and Rust CI.
186
+
187
+ ## Acceptance checks
188
+
189
+ - Fresh SQLite and D1-shaped installs produce the same hook tables.
190
+ - No portable hook query requires tenant/workspace/user tables.
191
+ - A prompt value or tool result value cannot be found in a hook receipt row.
192
+ - Config and stored hooks execute in one deterministic priority order.
193
+ - The CLI lists every active source that can affect a turn.
194
+ - A provider probe with 1,000 model ids produces one AI plugin metadata update,
195
+ not 1,000 catalog rows.
196
+ - Failed model refreshes preserve the last successful model id list.
197
+ - A catalog miss never blocks a provider-verified model solely because the
198
+ reference package is older.
199
+ - Provider and AgentSam credentials remain separate authorities.
@@ -0,0 +1,16 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
+ <title>AgentSam — Computational Hyperspace</title>
7
+ <style>
8
+ html, body, #root { margin: 0; height: 100%; background: #000; }
9
+ * { box-sizing: border-box; }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <div id="root"></div>
14
+ <script type="module" src="/src/main.tsx"></script>
15
+ </body>
16
+ </html>
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "hyperspace-demo",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build"
9
+ },
10
+ "dependencies": {
11
+ "@inneranimalmedia/agentsam-loading-scene": "*",
12
+ "react": "^19.2.0",
13
+ "react-dom": "^19.2.0"
14
+ },
15
+ "devDependencies": {
16
+ "@types/react": "^19.2.0",
17
+ "@types/react-dom": "^19.2.0",
18
+ "@vitejs/plugin-react": "^5.2.0",
19
+ "vite": "^8.2.0"
20
+ }
21
+ }
@@ -0,0 +1,160 @@
1
+ import { StrictMode, useEffect, useMemo, useState } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import {
4
+ LoadingSceneController,
5
+ computationalHyperspace,
6
+ adaptAgentSamEvent,
7
+ } from "@inneranimalmedia/agentsam-loading-scene";
8
+ import {
9
+ LoadingScene,
10
+ LoadingSceneStatus,
11
+ LoadingSceneDevtools,
12
+ } from "@inneranimalmedia/agentsam-loading-scene/react";
13
+
14
+ const preset = computationalHyperspace;
15
+
16
+ /**
17
+ * Simulated "create a site" run: realistic runtime events flow through
18
+ * the adapter → controller, exactly as a real CMS app would wire it.
19
+ * The renderer never sees any of these names.
20
+ */
21
+ function simulateSiteCreation(controller: LoadingSceneController, onDone: () => void) {
22
+ const timeline: Array<[number, () => void]> = [];
23
+ const at = (ms: number, fn: () => void) => timeline.push([ms, fn]);
24
+ const ev = (raw: Parameters<typeof adaptAgentSamEvent>[0]) =>
25
+ controller.handle(adaptAgentSamEvent(raw));
26
+
27
+ at(0, () => ev({ type: "agent.session.started", operationId: "session", label: "Starting up" }));
28
+ at(900, () => controller.complete("session"));
29
+
30
+ at(1000, () => ev({ type: "context.workspace.loading", operationId: "ctx", label: "Gathering context" }));
31
+ // 19 rapid file reads — coalesced, no flicker
32
+ for (let i = 0; i < 19; i++) {
33
+ at(1200 + i * 60, () => ev({ type: "file.read", label: "Understanding your project" }));
34
+ }
35
+ at(2600, () => controller.complete("ctx"));
36
+
37
+ at(2700, () => ev({ type: "model.planning", operationId: "plan", label: "Planning your site" }));
38
+ at(5200, () => controller.complete("plan"));
39
+
40
+ // parallel tools + asset generation blending
41
+ at(5300, () => ev({ type: "tool.invoke", operationId: "t1", label: "Laying out pages" }));
42
+ at(5450, () => ev({ type: "tool.invoke", operationId: "t2", label: "Writing copy" }));
43
+ at(5600, () => ev({ type: "tool.image.generate", operationId: "hero", label: "Generating hero artwork" }));
44
+ at(9400, () => controller.complete("t1"));
45
+ at(10200, () => controller.complete("t2"));
46
+ at(12500, () => ev({ type: "content.asset.generated", operationId: "hero", label: "Hero artwork ready" }));
47
+
48
+ at(12800, () => ev({ type: "catalog.indexing", operationId: "idx", label: "Organizing your content" }));
49
+ at(15200, () => controller.complete("idx"));
50
+
51
+ at(15400, () => ev({ type: "site.build", operationId: "build", label: "Building your site", progress: 0 }));
52
+ at(16500, () => ev({ type: "site.build", operationId: "build", progress: 0.35 }));
53
+ at(17800, () => ev({ type: "site.build", operationId: "build", progress: 0.8 }));
54
+ at(18900, () => controller.complete("build"));
55
+
56
+ at(19000, () => ev({ type: "output.verify", operationId: "verify", label: "Checking everything" }));
57
+ at(21500, () => controller.complete("verify"));
58
+
59
+ at(21700, () => ev({ type: "site.deploy", operationId: "deploy", label: "Publishing" }));
60
+ at(24800, () => {
61
+ controller.complete("deploy");
62
+ onDone();
63
+ });
64
+
65
+ const ids = timeline.map(([ms, fn]) => window.setTimeout(fn, ms));
66
+ return () => ids.forEach((id) => window.clearTimeout(id));
67
+ }
68
+
69
+ function EditorSurface() {
70
+ return (
71
+ <div
72
+ style={{
73
+ height: "100%",
74
+ display: "grid",
75
+ gridTemplateRows: "56px 1fr",
76
+ color: "#d5d7e0",
77
+ fontFamily: "system-ui, sans-serif",
78
+ }}
79
+ >
80
+ <header
81
+ style={{
82
+ borderBottom: "1px solid rgba(255,255,255,0.08)",
83
+ display: "flex",
84
+ alignItems: "center",
85
+ padding: "0 20px",
86
+ gap: 16,
87
+ fontSize: 13,
88
+ letterSpacing: "0.06em",
89
+ }}
90
+ >
91
+ <strong style={{ color: "#8b7db7" }}>AgentSam</strong>
92
+ <span style={{ opacity: 0.5 }}>Fuel N Free Time — Home</span>
93
+ <span style={{ marginLeft: "auto", opacity: 0.4, fontSize: 12 }}>Draft saved</span>
94
+ </header>
95
+ <main style={{ padding: 32, display: "grid", gap: 20, alignContent: "start" }}>
96
+ <div style={{ height: 220, borderRadius: 10, background: "linear-gradient(135deg, rgba(139,125,183,0.18), rgba(104,117,173,0.1))", border: "1px solid rgba(255,255,255,0.07)", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 14, opacity: 0.8 }}>
97
+ Hero section — generated artwork placed here
98
+ </div>
99
+ <div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(180px, 1fr))", gap: 16 }}>
100
+ {["Collection grid", "Countdown banner", "Newsletter"].map((s) => (
101
+ <div key={s} style={{ height: 110, borderRadius: 8, border: "1px solid rgba(255,255,255,0.07)", background: "rgba(255,255,255,0.02)", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 13, opacity: 0.65 }}>
102
+ {s}
103
+ </div>
104
+ ))}
105
+ </div>
106
+ </main>
107
+ </div>
108
+ );
109
+ }
110
+
111
+ function App() {
112
+ const controller = useMemo(() => new LoadingSceneController(preset), []);
113
+ const [run, setRun] = useState(0);
114
+ const debug = new URLSearchParams(window.location.search).get("debugRuntimeVisuals") === "1";
115
+
116
+ useEffect(() => {
117
+ if (debug) return; // devtools drive the controller instead
118
+ return simulateSiteCreation(controller, () => undefined);
119
+ }, [controller, run, debug]);
120
+
121
+ return (
122
+ <div style={{ position: "fixed", inset: 0 }}>
123
+ <LoadingScene controller={controller} preset={preset} style={{ width: "100%", height: "100%" }}>
124
+ <EditorSurface />
125
+ </LoadingScene>
126
+ <div style={{ position: "fixed", left: 24, bottom: 24, pointerEvents: "none" }}>
127
+ <LoadingSceneStatus controller={controller} preset={preset} />
128
+ </div>
129
+ {!debug && (
130
+ <button
131
+ onClick={() => {
132
+ controller.reset();
133
+ setRun((r) => r + 1);
134
+ }}
135
+ style={{
136
+ position: "fixed",
137
+ top: 16,
138
+ right: 16,
139
+ background: "rgba(255,255,255,0.05)",
140
+ border: "1px solid rgba(255,255,255,0.12)",
141
+ borderRadius: 6,
142
+ color: "#9ea1b0",
143
+ padding: "6px 12px",
144
+ fontSize: 12,
145
+ cursor: "pointer",
146
+ }}
147
+ >
148
+ Replay
149
+ </button>
150
+ )}
151
+ <LoadingSceneDevtools controller={controller} enabled={debug} />
152
+ </div>
153
+ );
154
+ }
155
+
156
+ createRoot(document.getElementById("root")!).render(
157
+ <StrictMode>
158
+ <App />
159
+ </StrictMode>,
160
+ );
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "noEmit": true,
5
+ "jsx": "react-jsx",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"]
7
+ },
8
+ "include": ["src"]
9
+ }
@@ -0,0 +1,24 @@
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+ import path from "node:path";
4
+
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ server: {
8
+ host: "0.0.0.0",
9
+ port: 5181,
10
+ allowedHosts: true,
11
+ },
12
+ resolve: {
13
+ alias: {
14
+ "@inneranimalmedia/agentsam-loading-scene/react": path.resolve(
15
+ __dirname,
16
+ "../../packages/agentsam-loading-scene/src/react/index.ts",
17
+ ),
18
+ "@inneranimalmedia/agentsam-loading-scene": path.resolve(
19
+ __dirname,
20
+ "../../packages/agentsam-loading-scene/src/index.ts",
21
+ ),
22
+ },
23
+ },
24
+ });
@@ -0,0 +1,87 @@
1
+ -- Portable AgentSam hook registry and execution evidence.
2
+ --
3
+ -- This is the standalone/local baseline. Shared hosts may map owner_id to their
4
+ -- account authority, but tenant_id/workspace_id are intentionally not part of
5
+ -- the portable contract. Repository/project/session applicability belongs in
6
+ -- scope_type + scope_ref; less common correlations stay in JSON.
7
+ --
8
+ -- Handler secrets are references resolved by the host. Never store API keys,
9
+ -- bearer tokens, or decrypted credentials in handler_config_json or receipts.
10
+
11
+ PRAGMA foreign_keys = ON;
12
+
13
+ CREATE TABLE IF NOT EXISTS agentsam_hook (
14
+ id TEXT PRIMARY KEY DEFAULT ('hook_' || lower(hex(randomblob(8)))),
15
+ owner_id TEXT NOT NULL DEFAULT 'local',
16
+ hook_key TEXT NOT NULL CHECK(length(trim(hook_key)) > 0 AND hook_key = trim(hook_key)),
17
+ event_type TEXT NOT NULL CHECK(length(trim(event_type)) > 0 AND event_type = trim(event_type)),
18
+ source_kind TEXT NOT NULL DEFAULT 'stored'
19
+ CHECK(source_kind IN ('stored','config','code','system')),
20
+ scope_type TEXT NOT NULL DEFAULT 'project'
21
+ CHECK(scope_type IN ('global','account','repository','project','session')),
22
+ scope_ref TEXT,
23
+ handler_type TEXT NOT NULL DEFAULT 'log_only'
24
+ CHECK(length(trim(handler_type)) > 0 AND handler_type = trim(handler_type)),
25
+ handler_config_json TEXT NOT NULL DEFAULT '{}'
26
+ CHECK(json_valid(handler_config_json)),
27
+ match_json TEXT NOT NULL DEFAULT '{}'
28
+ CHECK(json_valid(match_json)),
29
+ failure_mode TEXT NOT NULL DEFAULT 'open'
30
+ CHECK(failure_mode IN ('open','closed','error')),
31
+ priority INTEGER NOT NULL DEFAULT 100,
32
+ timeout_ms INTEGER NOT NULL DEFAULT 30000
33
+ CHECK(timeout_ms BETWEEN 1 AND 600000),
34
+ is_active INTEGER NOT NULL DEFAULT 1 CHECK(is_active IN (0,1)),
35
+ workflow_id TEXT,
36
+ description TEXT,
37
+ metadata_json TEXT NOT NULL DEFAULT '{}'
38
+ CHECK(json_valid(metadata_json)),
39
+ revision INTEGER NOT NULL DEFAULT 1 CHECK(revision >= 1),
40
+ created_at_unix INTEGER NOT NULL DEFAULT (unixepoch()),
41
+ updated_at_unix INTEGER NOT NULL DEFAULT (unixepoch())
42
+ );
43
+
44
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_agentsam_hook_identity
45
+ ON agentsam_hook(owner_id, scope_type, IFNULL(scope_ref, ''), hook_key);
46
+ CREATE INDEX IF NOT EXISTS idx_agentsam_hook_dispatch
47
+ ON agentsam_hook(owner_id, event_type, is_active, priority, hook_key);
48
+ CREATE INDEX IF NOT EXISTS idx_agentsam_hook_scope
49
+ ON agentsam_hook(owner_id, scope_type, scope_ref, is_active);
50
+
51
+ CREATE TABLE IF NOT EXISTS agentsam_hook_execution (
52
+ id TEXT PRIMARY KEY DEFAULT ('hexec_' || lower(hex(randomblob(8)))),
53
+ owner_id TEXT NOT NULL DEFAULT 'local',
54
+ hook_id TEXT,
55
+ hook_key TEXT NOT NULL,
56
+ source_kind TEXT NOT NULL DEFAULT 'stored'
57
+ CHECK(source_kind IN ('stored','config','code','system')),
58
+ event_type TEXT NOT NULL,
59
+ invocation_id TEXT,
60
+ agent_run_id TEXT,
61
+ session_id TEXT,
62
+ conversation_id TEXT,
63
+ status TEXT NOT NULL
64
+ CHECK(status IN ('completed','failed','timeout','skipped','blocked')),
65
+ duration_ms INTEGER NOT NULL DEFAULT 0 CHECK(duration_ms >= 0),
66
+ input_keys_json TEXT NOT NULL DEFAULT '[]' CHECK(json_valid(input_keys_json)),
67
+ output_keys_json TEXT NOT NULL DEFAULT '[]' CHECK(json_valid(output_keys_json)),
68
+ decision TEXT,
69
+ reason TEXT,
70
+ error_code TEXT,
71
+ error_message TEXT,
72
+ receipt_json TEXT NOT NULL DEFAULT '{}' CHECK(json_valid(receipt_json)),
73
+ correlation_json TEXT NOT NULL DEFAULT '{}' CHECK(json_valid(correlation_json)),
74
+ ran_at_unix INTEGER NOT NULL DEFAULT (unixepoch())
75
+ );
76
+
77
+ CREATE INDEX IF NOT EXISTS idx_agentsam_hook_execution_hook
78
+ ON agentsam_hook_execution(owner_id, hook_key, ran_at_unix DESC);
79
+ CREATE INDEX IF NOT EXISTS idx_agentsam_hook_execution_run
80
+ ON agentsam_hook_execution(agent_run_id, ran_at_unix DESC)
81
+ WHERE agent_run_id IS NOT NULL;
82
+ CREATE INDEX IF NOT EXISTS idx_agentsam_hook_execution_session
83
+ ON agentsam_hook_execution(session_id, ran_at_unix DESC)
84
+ WHERE session_id IS NOT NULL;
85
+ CREATE INDEX IF NOT EXISTS idx_agentsam_hook_execution_failure
86
+ ON agentsam_hook_execution(owner_id, status, ran_at_unix DESC)
87
+ WHERE status IN ('failed','timeout','blocked');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inneranimalmedia/agentsam-sdk",
3
- "version": "2.6.8",
3
+ "version": "2.6.10",
4
4
  "description": "Portable AgentSam SDK and CLI kits for local scaffolding, repository intelligence, incremental indexing, identity adapters, and verified dependency maintenance.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -90,6 +90,7 @@
90
90
  "./work-graph/adapters/business/projects": "./packages/work-graph/src/adapters/business/projects.js",
91
91
  "./errors": "./src/errors/index.js",
92
92
  "./errors/schema": "./protocol/errors/error-envelope.schema.json",
93
+ "./errors/schema-v2": "./protocol/errors/agentsam.error.v2.schema.json",
93
94
  "./errors/catalog": "./protocol/errors/error-catalog.json",
94
95
  "./cloudflare": "./src/cloudflare/index.js",
95
96
  "./eval": "./src/eval/index.js",
@@ -119,7 +120,21 @@
119
120
  "./theme/harbor": "./packages/theme-insurance-site/src/index.js",
120
121
  "./theme/summit": "./packages/theme-shinshu-site/src/index.js",
121
122
  "./models/inventory": "./src/models/inventory-core.js",
122
- "./goap": "./packages/agentsam-goap/src/index.js"
123
+ "./models/provider-snapshot-schema": "./protocol/models/provider-model-snapshot.v1.schema.json",
124
+ "./local-engine": "./src/local-engine/index.js",
125
+ "./local-engine/contracts": "./src/local-engine/contracts.js",
126
+ "./local-engine/audit": "./src/local-engine/audit.js",
127
+ "./local-engine/assets": "./src/local-engine/assets.js",
128
+ "./local-engine/benchmark": "./src/local-engine/benchmark.js",
129
+ "./goap": "./packages/agentsam-goap/src/index.js",
130
+ "./hooks": "./packages/agentsam-hooks/src/index.js",
131
+ "./hooks/store": "./packages/agentsam-hooks/src/store.js",
132
+ "./hooks/protocol/input": "./protocol/hooks/agentsam.hook.v1.schema.json",
133
+ "./hooks/protocol/output": "./protocol/hooks/agentsam.hook.output.v1.schema.json",
134
+ "./hooks/protocol/config": "./protocol/hooks/agentsam.hooks.config.v1.schema.json",
135
+ "./hooks/protocol/receipt": "./protocol/hooks/agentsam.hook.receipt.v1.schema.json",
136
+ "./hooks/schema/manifest": "./packages/agentsam-hooks/schema/manifest.json",
137
+ "./hooks/schema/sqlite": "./migrations/runtime/0005_agentsam_hooks.sql"
123
138
  },
124
139
  "bin": {
125
140
  "agentsam": "bin/agentsam",
@@ -127,7 +142,8 @@
127
142
  "agentsam-scaffold": "bin/scaffold.mjs",
128
143
  "agentsam-auth-portal": "packages/identity/scripts/preview-auth-portal.mjs",
129
144
  "agentsam-rapid-rust": "bin/agentsam-rapid-rust",
130
- "agentsam-rust": "bin/agentsam-rapid-rust"
145
+ "agentsam-rust": "bin/agentsam-rapid-rust",
146
+ "agentsam-hooks": "packages/agentsam-hooks/bin/agentsam-hooks.mjs"
131
147
  },
132
148
  "files": [
133
149
  "src",
@@ -137,6 +153,7 @@
137
153
  "packages/agentsam-brand/bin",
138
154
  "packages/agentsam-brand/src",
139
155
  "packages/agentsam-contracts",
156
+ "packages/agentsam-hooks",
140
157
  "packages/agentsam-errors",
141
158
  "packages/agentsam-repository",
142
159
  "packages/agentsam-knowledge",
@@ -226,9 +243,11 @@
226
243
  "packages/agentsam-docs-theme",
227
244
  "packages/agentsam-errors",
228
245
  "packages/agentsam-goap",
246
+ "packages/agentsam-hooks",
229
247
  "packages/agentsam-ide",
230
248
  "packages/agentsam-key-manager",
231
249
  "packages/agentsam-knowledge",
250
+ "packages/agentsam-loading-scene",
232
251
  "packages/agentsam-nav",
233
252
  "packages/agentsam-queue-control",
234
253
  "packages/agentsam-repository",
@@ -238,6 +257,7 @@
238
257
  "packages/agentsam-vault",
239
258
  "packages/agentsam-work",
240
259
  "packages/agentsam-workbench",
260
+ "packages/cms-runtime",
241
261
  "packages/connectors/cloudflare",
242
262
  "packages/heuristic-theme",
243
263
  "packages/identity",
@@ -251,7 +271,8 @@
251
271
  "packages/theme-insurance-site",
252
272
  "packages/theme-scenes",
253
273
  "packages/theme-shinshu-site",
254
- "packages/work-graph"
274
+ "packages/work-graph",
275
+ "examples/hyperspace-demo"
255
276
  ],
256
277
  "scripts": {
257
278
  "test": "npm run test:standard && npm --prefix packages/identity test && npm --prefix packages/agentsam-brand test && npm run test:connectors && npm run test:providers",
@@ -265,7 +286,7 @@
265
286
  "test:terminal:mock": "node --test test/terminal/*.test.mjs",
266
287
  "test:live:terminal": "node --test test/live/*.live.test.mjs",
267
288
  "test:identity": "npm --prefix packages/identity test",
268
- "test:workspaces": "npm --prefix packages/agentsam-contracts test && npm --prefix packages/agentsam-contracts run typecheck && npm --prefix packages/agentsam-errors test && npm --prefix packages/agentsam-repository test && npm --prefix packages/agentsam-workbench test && npm --prefix packages/agentsam-workbench run typecheck && npm --prefix packages/agentsam-nav run typecheck && npm --prefix packages/agentsam-shell-kit run typecheck && npm --prefix packages/work-graph test && npm --prefix packages/agentsam-queue-control test && npm --prefix packages/agentsam-goap test",
289
+ "test:workspaces": "npm --prefix packages/agentsam-contracts test && npm --prefix packages/agentsam-contracts run typecheck && npm --prefix packages/agentsam-errors test && npm --prefix packages/agentsam-vault test && npm --prefix packages/agentsam-repository test && npm --prefix packages/agentsam-workbench test && npm --prefix packages/agentsam-workbench run typecheck && npm --prefix packages/agentsam-nav run typecheck && npm --prefix packages/agentsam-shell-kit run typecheck && npm --prefix packages/work-graph test && npm --prefix packages/agentsam-queue-control test && npm --prefix packages/cms-runtime test && npm --prefix packages/agentsam-goap test && npm --prefix packages/agentsam-hooks test",
269
290
  "test:autorag": "npm --prefix packages/agentsam-knowledge test",
270
291
  "smoke": "node test/smoke.mjs",
271
292
  "verify:package": "node scripts/verify-package.mjs",
@@ -273,9 +294,9 @@
273
294
  "verify:bootstrap": "node scripts/verify-bootstrap.mjs",
274
295
  "verify:knowledge-package": "node scripts/verify-knowledge-package.mjs && npm run test:autorag",
275
296
  "test:python": "node scripts/verify-python.mjs",
276
- "verify:release": "npm run verify && npm run verify:knowledge-package && npm run test:python && npm run security:release",
297
+ "verify:release": "npm run verify && npm run verify:packages:public && npm run verify:knowledge-package && npm run test:python && npm run security:release",
277
298
  "pack:check": "node scripts/verify-pack.mjs",
278
- "verify": "npm run errors:check && npm run proto:check && npm test && npm run test:workspaces && npm run cad:registry:check && npm run app:validate && npm run verify:boundaries && npm run verify:package && npm run verify:bootstrap && npm run pack:check",
299
+ "verify": "npm run release:train:check && npm run errors:check && npm run proto:check && npm test && npm run test:workspaces && npm run cad:registry:check && npm run app:validate && npm run verify:boundaries && npm run verify:package && npm run verify:bootstrap && npm run pack:check",
279
300
  "publish:identity-alpha": "bash scripts/publish-identity-alpha.sh",
280
301
  "publish:identity-alpha:dry-run": "bash scripts/publish-identity-alpha.sh --dry-run",
281
302
  "publish:identity-alpha:publish-only": "bash scripts/publish-identity-alpha.sh --publish-only",
@@ -296,7 +317,8 @@
296
317
  "errors:check": "node scripts/verify-error-contracts.mjs",
297
318
  "cad:registry:check": "node scripts/cad-registry.mjs --check",
298
319
  "app:validate": "node bin/agentsam app validate --all",
299
- "guard:apps": "npm run app:validate",
320
+ "app:packaging": "node scripts/verify-app-packaging.mjs --pack",
321
+ "guard:apps": "npm run app:validate && npm run app:packaging",
300
322
  "test:providers": "node --test packages/providers/completeful/test/*.test.mjs",
301
323
  "test:themes": "npm --prefix packages/heuristic-theme test && npm --prefix packages/theme-church-site test && npm --prefix packages/theme-companions-site test && npm --prefix packages/theme-floors-site test && npm --prefix packages/theme-fuelnfree-site test && npm --prefix packages/theme-handyman-site test && npm --prefix packages/theme-insurance-site test && npm --prefix packages/theme-shinshu-site test && npm --prefix packages/theme-scenes test",
302
324
  "test:theme-scenes": "npm --prefix packages/theme-scenes test",
@@ -305,7 +327,12 @@
305
327
  "prove:product": "node scripts/prove-agentsam-product.mjs",
306
328
  "security:release": "node scripts/verify-release-security.mjs",
307
329
  "verify:database-honesty": "node --test test/integration/database-hosted-honesty.test.mjs",
308
- "ensure:cms-dist": "node scripts/ensure-cms-dist.mjs"
330
+ "ensure:cms-dist": "node scripts/ensure-cms-dist.mjs",
331
+ "release:train:check": "node scripts/release-train.mjs check",
332
+ "release:train:align": "node scripts/release-train.mjs align",
333
+ "ci:products": "node scripts/ci-products.mjs",
334
+ "verify:packages:public": "node scripts/verify-public-packages.mjs",
335
+ "test:hooks": "npm --prefix packages/agentsam-hooks test"
309
336
  },
310
337
  "engines": {
311
338
  "node": ">=22 <25",
@@ -314,7 +341,7 @@
314
341
  "dependencies": {
315
342
  "@clack/prompts": "^1.7.0",
316
343
  "@grpc/grpc-js": "^1.14.4",
317
- "@inneranimalmedia/agentsam-errors": "2.6.8",
344
+ "@inneranimalmedia/agentsam-errors": "2.6.10",
318
345
  "@modelcontextprotocol/sdk": "^1.30.0",
319
346
  "google-protobuf": "^3.21.4",
320
347
  "node-pty": "^1.1.0",