@inneranimalmedia/agentsam-sdk 2.6.9 → 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.
- package/README.md +18 -0
- package/apps/cad-creator/shared/cad/package.json +1 -1
- package/apps/client-cms-editor/backend/package.json +3 -3
- package/apps/client-cms-editor/frontend/package.json +4 -4
- package/apps/client-cms-editor/package-lock.json +8 -8
- package/apps/client-cms-editor/package.json +1 -1
- package/apps/client-cms-editor/shared/cms/package.json +2 -2
- package/docs/architecture/HOOKS-MODELS-SELF-HOSTING-PLAN.md +199 -0
- package/examples/hyperspace-demo/index.html +16 -0
- package/examples/hyperspace-demo/package.json +21 -0
- package/examples/hyperspace-demo/src/main.tsx +160 -0
- package/examples/hyperspace-demo/tsconfig.json +9 -0
- package/examples/hyperspace-demo/vite.config.ts +24 -0
- package/migrations/runtime/0005_agentsam_hooks.sql +87 -0
- package/package.json +23 -7
- package/packages/agentsam-brand/package.json +1 -1
- package/packages/agentsam-brand/src/core/v2/compile.js +1 -1
- package/packages/agentsam-brand/src/core/v2/schema.js +1 -1
- package/packages/agentsam-contracts/package.json +1 -1
- package/packages/agentsam-contracts/src/errors.ts +19 -10
- package/packages/agentsam-errors/package.json +11 -3
- package/packages/agentsam-errors/protocol/agentsam.error.v2.schema.json +821 -0
- package/packages/agentsam-errors/protocol/error-catalog.json +3512 -0
- package/packages/agentsam-errors/src/envelope.js +63 -11
- package/packages/agentsam-errors/src/error.js +6 -0
- package/packages/agentsam-errors/src/fingerprint.js +9 -1
- package/packages/agentsam-errors/src/normalize.js +51 -6
- package/packages/agentsam-errors/src/recovery.js +9 -35
- package/packages/agentsam-errors/src/transport.js +6 -1
- package/packages/agentsam-errors/src/vocabulary.js +515 -126
- package/packages/agentsam-errors/test/catalog-v2.test.mjs +106 -0
- package/packages/agentsam-errors/types/index.d.ts +157 -0
- package/packages/agentsam-goap/package.json +2 -2
- package/packages/agentsam-hooks/README.md +206 -0
- package/packages/agentsam-hooks/bin/agentsam-hooks.mjs +64 -0
- package/packages/agentsam-hooks/bindings/go/command.go +55 -0
- package/packages/agentsam-hooks/bindings/go/errors_generated.go +402 -0
- package/packages/agentsam-hooks/bindings/go/go.mod +3 -0
- package/packages/agentsam-hooks/bindings/go/hooks.go +285 -0
- package/packages/agentsam-hooks/bindings/go/hooks_test.go +48 -0
- package/packages/agentsam-hooks/bindings/rust/Cargo.toml +11 -0
- package/packages/agentsam-hooks/bindings/rust/src/errors_generated.rs +396 -0
- package/packages/agentsam-hooks/bindings/rust/src/lib.rs +397 -0
- package/packages/agentsam-hooks/package.json +69 -0
- package/packages/agentsam-hooks/schema/manifest.json +54 -0
- package/packages/agentsam-hooks/scripts/clean-protocol.mjs +17 -0
- package/packages/agentsam-hooks/scripts/sync-protocol.mjs +27 -0
- package/packages/agentsam-hooks/src/adapters/agents.js +82 -0
- package/packages/agentsam-hooks/src/adapters/callback.js +4 -0
- package/packages/agentsam-hooks/src/adapters/capability.js +122 -0
- package/packages/agentsam-hooks/src/adapters/command.js +104 -0
- package/packages/agentsam-hooks/src/adapters/composite.js +31 -0
- package/packages/agentsam-hooks/src/adapters/http.js +58 -0
- package/packages/agentsam-hooks/src/adapters/lsp.js +116 -0
- package/packages/agentsam-hooks/src/adapters/mcp.js +76 -0
- package/packages/agentsam-hooks/src/adapters/provider.js +129 -0
- package/packages/agentsam-hooks/src/config.js +143 -0
- package/packages/agentsam-hooks/src/contracts.js +284 -0
- package/packages/agentsam-hooks/src/errors-generated.js +2732 -0
- package/packages/agentsam-hooks/src/index.d.ts +193 -0
- package/packages/agentsam-hooks/src/index.js +14 -0
- package/packages/agentsam-hooks/src/policy.js +34 -0
- package/packages/agentsam-hooks/src/runtime.js +312 -0
- package/packages/agentsam-hooks/src/store.js +264 -0
- package/packages/agentsam-hooks/test/adapters.test.mjs +216 -0
- package/packages/agentsam-hooks/test/runtime.test.mjs +258 -0
- package/packages/agentsam-knowledge/package.json +1 -1
- package/packages/agentsam-nav/dist/Nav.d.ts +43 -0
- package/packages/agentsam-nav/dist/NavCollapsible.d.ts +10 -0
- package/packages/agentsam-nav/dist/NavContent.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavFooter.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavGroup.d.ts +3 -0
- package/packages/agentsam-nav/dist/NavHeader.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavMenu.d.ts +22 -0
- package/packages/agentsam-nav/dist/NavProvider.d.ts +35 -0
- package/packages/agentsam-nav/dist/NavTrigger.d.ts +2 -0
- package/packages/agentsam-nav/dist/Surfaces.d.ts +41 -0
- package/packages/agentsam-nav/dist/browser.d.ts +11 -0
- package/packages/agentsam-nav/dist/browser.global.js +135 -0
- package/packages/agentsam-nav/dist/browser.js +7290 -0
- package/packages/agentsam-nav/dist/contracts.d.ts +76 -0
- package/packages/agentsam-nav/dist/index.d.ts +11 -0
- package/packages/agentsam-nav/dist/index.js +7291 -0
- package/packages/agentsam-nav/dist/legacy.css +83 -0
- package/packages/agentsam-nav/dist/shell.css +113 -0
- package/packages/agentsam-nav/dist/theme.css +113 -0
- package/packages/agentsam-nav/dist/utils.d.ts +1 -0
- package/packages/agentsam-nav/package.json +1 -1
- package/packages/agentsam-queue-control/package.json +1 -1
- package/packages/agentsam-repository/package.json +1 -1
- package/packages/agentsam-repository/src/goap.js.bak-20260922011251 +670 -0
- package/packages/agentsam-vault/package.json +1 -1
- package/packages/agentsam-workbench/package.json +3 -3
- package/packages/connectors/cloudflare/package.json +1 -1
- package/packages/heuristic-theme/package.json +1 -1
- package/packages/identity/package.json +2 -2
- package/packages/providers/completeful/package.json +1 -1
- package/packages/theme-church-site/package.json +2 -2
- package/packages/theme-companions-site/package.json +2 -2
- package/packages/theme-floors-site/package.json +2 -2
- package/packages/theme-fuelnfree-site/package.json +2 -2
- package/packages/theme-handyman-site/package.json +2 -2
- package/packages/theme-insurance-site/package.json +2 -2
- package/packages/theme-scenes/package.json +1 -1
- package/packages/theme-shinshu-site/package.json +2 -2
- package/packages/work-graph/package.json +1 -1
- package/protocol/apps/agentsam.app.v1.schema.json +1 -1
- package/protocol/apps/agentsam.host-install.v1.schema.json +1 -1
- package/protocol/assets/asset-record.v1.schema.json +1 -1
- package/protocol/brand/brandpack.v1.schema.json +1 -1
- package/protocol/capabilities/capability-manifest.schema.json +1 -1
- package/protocol/capabilities/knowledge-search-input.schema.json +1 -0
- package/protocol/credentials/issue.v1.schema.json +1 -1
- package/protocol/database/agentsam.schema-pack.v1.schema.json +1 -1
- package/protocol/database/connection.v1.schema.json +1 -1
- package/protocol/embeddings/embedding-profile.v1.schema.json +1 -1
- package/protocol/errors/README.md +36 -0
- package/protocol/errors/agentsam.error.v2.schema.json +821 -0
- package/protocol/errors/error-catalog.json +3506 -158
- package/protocol/errors/error-envelope.schema.json +195 -52
- package/protocol/errors/recovery.v1.schema.json +1 -1
- package/protocol/features/agentsam.feature.v1.schema.json +1 -1
- package/protocol/hooks/README.md +18 -0
- package/protocol/hooks/agentsam.hook.output.v1.schema.json +27 -0
- package/protocol/hooks/agentsam.hook.receipt.v1.schema.json +61 -0
- package/protocol/hooks/agentsam.hook.v1.schema.json +35 -0
- package/protocol/hooks/agentsam.hooks.config.v1.schema.json +78 -0
- package/protocol/local-engine/benchmark.v1.schema.json +1 -1
- package/protocol/local-engine/engine.v1.schema.json +1 -1
- package/protocol/models/model-inventory-v2.schema.json +1 -1
- package/protocol/models/provider-model-snapshot.v1.schema.json +22 -0
- package/protocol/rpc/v1/errors.proto +1 -0
- package/protocol/runtime/agentsam.runtime.v1.schema.json +1 -1
- package/protocol/runtime/workspace-fs.v1.schema.json +1 -1
- package/protocol/sam/activity.v1.schema.json +1 -1
- package/protocol/sam/answer.v1.schema.json +1 -1
- package/protocol/sam/calibration.v1.schema.json +1 -1
- package/protocol/sam/decision-receipt.v1.schema.json +1 -1
- package/protocol/sam/evaluation.v1.schema.json +1 -1
- package/protocol/sam/operation.schema.json +1 -1
- package/protocol/sam/outcome.v1.schema.json +1 -1
- package/protocol/sam/question.v1.schema.json +1 -1
- package/protocol/sam/result.schema.json +1 -1
- package/protocol/sam/state.v1.schema.json +1 -1
- package/protocol/scoring/scorecard.v1.schema.json +1 -1
- package/protocol/skills/agentsam.interaction.v1.schema.json +1 -1
- package/protocol/skills/agentsam.skill.v1.schema.json +1 -1
- package/protocol/theme-refinery/product-metadata.schema.json +1 -1
- package/protocol/theme-refinery/reconciliation-receipt.schema.json +1 -1
- package/protocol/ui/icon.v1.schema.json +1 -1
- package/python/README.md +20 -0
- package/python/agentsam_sdk/errors/__init__.py +4 -0
- package/python/agentsam_sdk/errors/vocabulary.py +2730 -0
- package/python/agentsam_sdk/hooks/__init__.py +32 -0
- package/python/agentsam_sdk/hooks/adapters.py +132 -0
- package/python/agentsam_sdk/hooks/contracts.py +121 -0
- package/python/agentsam_sdk/hooks/runtime.py +253 -0
- package/python/tests/test_hooks.py +115 -0
- package/src/agent/responses-runner.js +145 -1
- package/src/cli/command-catalog.js +1 -0
- package/src/cli.js +9 -0
- package/src/commands/cheat-sheet.js +1 -0
- package/src/commands/hooks.js +260 -0
- package/src/commands/models.js +1 -1
- package/src/commands/shell.js +114 -9
- package/src/errors/diagnostic.js +9 -9
- package/src/index.js +32 -0
- package/src/knowledge/service/grpc-codec.js +2 -0
- package/src/lib/slash-commands.js +1 -0
- package/src/local/runtime-store.js +46 -0
- package/src/models/catalog.js +0 -49
- package/src/models/inventory-core.js +69 -0
- package/src/plugins/index.js +8 -1
- package/src/plugins/registry.js +56 -0
- package/src/rpc/generated/errors_pb.js +49 -1
- package/src/tools/runtime.js +13 -5
|
@@ -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.
|
|
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,12 +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",
|
|
123
|
+
"./models/provider-snapshot-schema": "./protocol/models/provider-model-snapshot.v1.schema.json",
|
|
122
124
|
"./local-engine": "./src/local-engine/index.js",
|
|
123
125
|
"./local-engine/contracts": "./src/local-engine/contracts.js",
|
|
124
126
|
"./local-engine/audit": "./src/local-engine/audit.js",
|
|
125
127
|
"./local-engine/assets": "./src/local-engine/assets.js",
|
|
126
128
|
"./local-engine/benchmark": "./src/local-engine/benchmark.js",
|
|
127
|
-
"./goap": "./packages/agentsam-goap/src/index.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"
|
|
128
138
|
},
|
|
129
139
|
"bin": {
|
|
130
140
|
"agentsam": "bin/agentsam",
|
|
@@ -132,7 +142,8 @@
|
|
|
132
142
|
"agentsam-scaffold": "bin/scaffold.mjs",
|
|
133
143
|
"agentsam-auth-portal": "packages/identity/scripts/preview-auth-portal.mjs",
|
|
134
144
|
"agentsam-rapid-rust": "bin/agentsam-rapid-rust",
|
|
135
|
-
"agentsam-rust": "bin/agentsam-rapid-rust"
|
|
145
|
+
"agentsam-rust": "bin/agentsam-rapid-rust",
|
|
146
|
+
"agentsam-hooks": "packages/agentsam-hooks/bin/agentsam-hooks.mjs"
|
|
136
147
|
},
|
|
137
148
|
"files": [
|
|
138
149
|
"src",
|
|
@@ -142,6 +153,7 @@
|
|
|
142
153
|
"packages/agentsam-brand/bin",
|
|
143
154
|
"packages/agentsam-brand/src",
|
|
144
155
|
"packages/agentsam-contracts",
|
|
156
|
+
"packages/agentsam-hooks",
|
|
145
157
|
"packages/agentsam-errors",
|
|
146
158
|
"packages/agentsam-repository",
|
|
147
159
|
"packages/agentsam-knowledge",
|
|
@@ -231,9 +243,11 @@
|
|
|
231
243
|
"packages/agentsam-docs-theme",
|
|
232
244
|
"packages/agentsam-errors",
|
|
233
245
|
"packages/agentsam-goap",
|
|
246
|
+
"packages/agentsam-hooks",
|
|
234
247
|
"packages/agentsam-ide",
|
|
235
248
|
"packages/agentsam-key-manager",
|
|
236
249
|
"packages/agentsam-knowledge",
|
|
250
|
+
"packages/agentsam-loading-scene",
|
|
237
251
|
"packages/agentsam-nav",
|
|
238
252
|
"packages/agentsam-queue-control",
|
|
239
253
|
"packages/agentsam-repository",
|
|
@@ -257,7 +271,8 @@
|
|
|
257
271
|
"packages/theme-insurance-site",
|
|
258
272
|
"packages/theme-scenes",
|
|
259
273
|
"packages/theme-shinshu-site",
|
|
260
|
-
"packages/work-graph"
|
|
274
|
+
"packages/work-graph",
|
|
275
|
+
"examples/hyperspace-demo"
|
|
261
276
|
],
|
|
262
277
|
"scripts": {
|
|
263
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",
|
|
@@ -271,7 +286,7 @@
|
|
|
271
286
|
"test:terminal:mock": "node --test test/terminal/*.test.mjs",
|
|
272
287
|
"test:live:terminal": "node --test test/live/*.live.test.mjs",
|
|
273
288
|
"test:identity": "npm --prefix packages/identity test",
|
|
274
|
-
"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",
|
|
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",
|
|
275
290
|
"test:autorag": "npm --prefix packages/agentsam-knowledge test",
|
|
276
291
|
"smoke": "node test/smoke.mjs",
|
|
277
292
|
"verify:package": "node scripts/verify-package.mjs",
|
|
@@ -316,7 +331,8 @@
|
|
|
316
331
|
"release:train:check": "node scripts/release-train.mjs check",
|
|
317
332
|
"release:train:align": "node scripts/release-train.mjs align",
|
|
318
333
|
"ci:products": "node scripts/ci-products.mjs",
|
|
319
|
-
"verify:packages:public": "node scripts/verify-public-packages.mjs"
|
|
334
|
+
"verify:packages:public": "node scripts/verify-public-packages.mjs",
|
|
335
|
+
"test:hooks": "npm --prefix packages/agentsam-hooks test"
|
|
320
336
|
},
|
|
321
337
|
"engines": {
|
|
322
338
|
"node": ">=22 <25",
|
|
@@ -325,7 +341,7 @@
|
|
|
325
341
|
"dependencies": {
|
|
326
342
|
"@clack/prompts": "^1.7.0",
|
|
327
343
|
"@grpc/grpc-js": "^1.14.4",
|
|
328
|
-
"@inneranimalmedia/agentsam-errors": "2.6.
|
|
344
|
+
"@inneranimalmedia/agentsam-errors": "2.6.10",
|
|
329
345
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
330
346
|
"google-protobuf": "^3.21.4",
|
|
331
347
|
"node-pty": "^1.1.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inneranimalmedia/agentsam-brand",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.10",
|
|
4
4
|
"description": "Deterministic Brand Intelligence + portable brand-asset promotion SDK for AgentSam (inspect, derive, plan, promote, publish, verify).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@ function tokensToCss(tokens = {}) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function tokensToJson(tokens = {}) {
|
|
38
|
-
return `${JSON.stringify({ $schema: 'https://agentsam.
|
|
38
|
+
return `${JSON.stringify({ $schema: 'https://agentsam.inneranimalmedia.com/schemas/brand-tokens/v1.json', ...tokens }, null, 2)}\n`;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function buildStudioHtml(pack) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export const BRAND_PACK_SCHEMA = 'agentsam.brand-pack.v2';
|
|
9
|
-
export const BRAND_PACK_SCHEMA_URL = 'https://agentsam.
|
|
9
|
+
export const BRAND_PACK_SCHEMA_URL = 'https://agentsam.inneranimalmedia.com/schemas/brand-pack/v2.json';
|
|
10
10
|
export const BRAND_PACK_FILENAME = 'brand.pack.json';
|
|
11
11
|
|
|
12
12
|
/** Empty brand graph — never seeds product identity. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inneranimalmedia/agentsam-contracts",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.10",
|
|
4
4
|
"description": "Framework-neutral AgentSam contracts for workbench, tools, providers, events, hooks, execution, identity and repository context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
// GENERATED by scripts/generate-error-contracts.mjs. Do not edit by hand.
|
|
2
2
|
|
|
3
|
-
export const AGENTSAM_ERROR_SCHEMA_VERSION =
|
|
3
|
+
export const AGENTSAM_ERROR_SCHEMA_VERSION = 2 as const;
|
|
4
4
|
|
|
5
5
|
export type AgentSamErrorCode = "OK" | "CANCELLED" | "UNKNOWN" | "INVALID_ARGUMENT" | "DEADLINE_EXCEEDED" | "NOT_FOUND" | "ALREADY_EXISTS" | "PERMISSION_DENIED" | "RESOURCE_EXHAUSTED" | "FAILED_PRECONDITION" | "ABORTED" | "OUT_OF_RANGE" | "UNIMPLEMENTED" | "INTERNAL" | "UNAVAILABLE" | "DATA_LOSS" | "UNAUTHENTICATED";
|
|
6
|
-
export type AgentSamErrorReason = "unknown" | "input_invalid" | "input_out_of_range" | "precondition_failed" | "unsupported_operation" | "auth_missing" | "auth_invalid" | "permission_denied" | "user_permission_denied" | "provider_not_connected" | "provider_credential_missing" | "provider_credential_invalid" | "provider_credential_expired" | "provider_scope_insufficient" | "provider_budget_exhausted" | "provider_quota_exhausted" | "provider_rate_limited" | "provider_capacity_exhausted" | "provider_unavailable" | "provider_overloaded" | "provider_request_invalid" | "provider_model_not_found" | "provider_region_unsupported" | "provider_content_blocked" | "context_window_exceeded" | "service_tier_unsupported" | "continuation_invalid" | "target_not_found" | "already_exists" | "conflict" | "stale_version" | "rate_limited" | "quota_exhausted" | "capacity_exhausted" | "transport_unreachable" | "transport_refused" | "transport_timeout" | "upstream_invalid_response" | "dns_unresolved" | "tls_handshake_failed" | "tls_certificate_invalid" | "tunnel_connector_unavailable" | "cancelled" | "deadline_exceeded" | "execution_timeout" | "execution_failed" | "process_spawn_failed" | "process_crashed" | "process_output_limit" | "device_not_enrolled" | "device_credential_missing" | "device_credential_invalid" | "device_credential_expired" | "device_registration_missing" | "device_registration_stale" | "connection_revoked" | "connection_disabled" | "identity_resolution_failed" | "identity_mismatch" | "repository_scope_violation" | "repository_changed" | "index_stale" | "index_failed" | "embedding_failed" | "vector_store_failed" | "github_installation_missing" | "github_repository_not_found" | "github_rate_limited" | "github_secondary_rate_limited" | "github_scope_insufficient" | "cloudflare_workers_cpu_exhausted" | "cloudflare_service_binding_unavailable" | "cloudflare_durable_object_unavailable" | "cloudflare_d1_unavailable" | "cloudflare_r2_unavailable" | "docker_daemon_unavailable" | "docker_image_not_found" | "docker_build_failed" | "docker_container_failed" | "docker_registry_auth_failed" | "docker_pull_rate_limited" | "gcp_project_missing" | "gcp_api_disabled" | "gcp_quota_exhausted" | "gcp_vm_not_found" | "gcp_vm_unavailable" | "cad_tool_not_installed" | "cad_tool_not_executable" | "cad_tool_version_incompatible" | "cad_component_missing" | "cad_dependency_missing" | "cad_dependency_version_incompatible" | "cad_source_parse_failed" | "cad_input_format_unsupported" | "cad_import_failed" | "cad_model_recompute_failed" | "cad_constraint_unsatisfied" | "cad_geometry_invalid" | "cad_null_shape" | "cad_boolean_failed" | "cad_kernel_failed" | "cad_script_failed" | "cad_export_format_unsupported" | "cad_export_failed" | "cad_output_missing" | "cad_output_invalid" | "cad_render_engine_unavailable" | "cad_gpu_unavailable" | "cad_render_failed" | "cad_memory_exhausted" | "cad_process_crashed" | "cad_warning_escalated" | "policy_blocked" | "copyright_blocked" | "persistence_failed" | "data_corrupt" | "data_loss" | "internal" | "internal_invariant_violation" | "internal_configuration_invalid" | "internal_contract_violation" | "internal_adapter_failed" | "internal_dependency_failed";
|
|
6
|
+
export type AgentSamErrorReason = "unknown" | "input_invalid" | "input_out_of_range" | "precondition_failed" | "unsupported_operation" | "auth_missing" | "auth_invalid" | "permission_denied" | "user_permission_denied" | "provider_not_connected" | "provider_credential_missing" | "provider_credential_invalid" | "provider_credential_expired" | "provider_scope_insufficient" | "provider_budget_exhausted" | "provider_quota_exhausted" | "provider_rate_limited" | "provider_capacity_exhausted" | "provider_unavailable" | "provider_overloaded" | "provider_request_invalid" | "provider_model_not_found" | "provider_region_unsupported" | "provider_content_blocked" | "context_window_exceeded" | "service_tier_unsupported" | "continuation_invalid" | "target_not_found" | "already_exists" | "conflict" | "stale_version" | "rate_limited" | "quota_exhausted" | "capacity_exhausted" | "transport_unreachable" | "transport_refused" | "transport_timeout" | "upstream_invalid_response" | "dns_unresolved" | "tls_handshake_failed" | "tls_certificate_invalid" | "tunnel_connector_unavailable" | "cancelled" | "deadline_exceeded" | "execution_timeout" | "execution_failed" | "process_spawn_failed" | "process_crashed" | "process_output_limit" | "device_not_enrolled" | "device_credential_missing" | "device_credential_invalid" | "device_credential_expired" | "device_registration_missing" | "device_registration_stale" | "connection_revoked" | "connection_disabled" | "identity_resolution_failed" | "identity_mismatch" | "repository_scope_violation" | "repository_changed" | "index_stale" | "index_failed" | "embedding_failed" | "vector_store_failed" | "github_installation_missing" | "github_repository_not_found" | "github_rate_limited" | "github_secondary_rate_limited" | "github_scope_insufficient" | "cloudflare_workers_cpu_exhausted" | "cloudflare_service_binding_unavailable" | "cloudflare_durable_object_unavailable" | "cloudflare_d1_unavailable" | "cloudflare_r2_unavailable" | "docker_daemon_unavailable" | "docker_image_not_found" | "docker_build_failed" | "docker_container_failed" | "docker_registry_auth_failed" | "docker_pull_rate_limited" | "gcp_project_missing" | "gcp_api_disabled" | "gcp_quota_exhausted" | "gcp_vm_not_found" | "gcp_vm_unavailable" | "cad_tool_not_installed" | "cad_tool_not_executable" | "cad_tool_version_incompatible" | "cad_component_missing" | "cad_dependency_missing" | "cad_dependency_version_incompatible" | "cad_source_parse_failed" | "cad_input_format_unsupported" | "cad_import_failed" | "cad_model_recompute_failed" | "cad_constraint_unsatisfied" | "cad_geometry_invalid" | "cad_null_shape" | "cad_boolean_failed" | "cad_kernel_failed" | "cad_script_failed" | "cad_export_format_unsupported" | "cad_export_failed" | "cad_output_missing" | "cad_output_invalid" | "cad_render_engine_unavailable" | "cad_gpu_unavailable" | "cad_render_failed" | "cad_memory_exhausted" | "cad_process_crashed" | "cad_warning_escalated" | "policy_blocked" | "copyright_blocked" | "persistence_failed" | "data_corrupt" | "data_loss" | "internal" | "internal_invariant_violation" | "internal_configuration_invalid" | "internal_contract_violation" | "internal_adapter_failed" | "internal_dependency_failed" | "hook_definition_invalid" | "hook_duplicate_id" | "hook_not_found" | "hook_disabled" | "hook_event_unsupported" | "hook_configuration_invalid" | "hook_adapter_unknown" | "hook_adapter_unavailable" | "hook_handler_unavailable" | "hook_handler_timeout" | "hook_handler_failed" | "hook_output_invalid" | "hook_output_limit_exceeded" | "hook_output_field_unsupported" | "hook_http_timeout" | "hook_http_request_failed" | "hook_http_response_invalid" | "hook_http_response_limit_exceeded" | "hook_http_protocol_unsupported" | "hook_http_credentials_forbidden" | "hook_mcp_timeout" | "hook_mcp_server_unavailable" | "hook_mcp_capability_missing" | "hook_mcp_capability_duplicate" | "hook_mcp_response_invalid" | "hook_mcp_transport_failed" | "hook_lsp_timeout" | "hook_lsp_server_unavailable" | "hook_lsp_language_required" | "hook_lsp_capability_unsupported" | "hook_lsp_initialize_failed" | "hook_lsp_response_invalid" | "hook_command_required" | "hook_command_timeout" | "hook_command_spawn_failed" | "hook_command_exit_nonzero" | "hook_command_output_limit_exceeded" | "hook_command_output_invalid" | "hook_permission_denied" | "hook_capability_unavailable" | "hook_capability_duplicate" | "hook_error_handling_invalid" | "hook_error_handling_unsupported" | "hook_retry_limit_exceeded" | "hook_stop_decision_invalid" | "package_manifest_invalid" | "package_export_missing" | "package_file_missing" | "package_unwanted_file_included" | "package_dependency_missing" | "package_dependency_version_mismatch" | "lockfile_missing" | "lockfile_stale" | "lockfile_incompatible" | "workspace_not_installed" | "workspace_resolution_failed" | "workspace_boundary_invalid" | "build_dependency_missing" | "build_failed" | "build_output_missing" | "build_output_stale" | "pack_failed" | "pack_contents_invalid" | "pack_provenance_violation" | "distribution_artifact_missing" | "distribution_identity_mismatch" | "distribution_version_mismatch" | "distribution_install_failed" | "distribution_smoke_failed" | "release_train_misaligned" | "published_artifact_stale" | "published_artifact_missing" | "schema_invalid" | "schema_version_unsupported" | "schema_contract_mismatch" | "schema_pack_missing" | "schema_pack_dependency_missing" | "schema_pack_dependency_cycle" | "schema_pack_ownership_conflict" | "migration_missing" | "migration_failed" | "migration_checksum_mismatch" | "migration_order_invalid" | "migration_already_applied_conflict" | "migration_requires_manual_repair" | "database_unreachable" | "database_driver_unsupported" | "database_authority_unresolved" | "database_authorization_failed" | "database_schema_drift" | "model_discovery_failed" | "model_catalog_stale" | "model_snapshot_missing" | "model_snapshot_stale" | "model_capability_unknown" | "model_capability_unsupported" | "model_provider_mismatch" | "model_identity_conflict" | "model_probe_failed" | "model_probe_partial" | "runtime_not_installed" | "runtime_not_running" | "runtime_version_incompatible" | "runtime_capability_missing" | "runtime_protocol_mismatch" | "runtime_connection_unresolved" | "runtime_connection_revoked" | "pty_create_failed" | "pty_attach_failed" | "pty_session_not_found" | "pty_session_expired" | "pty_replay_cursor_invalid" | "transport_not_configured" | "transport_auth_failed" | "transport_attach_failed" | "sidecar_missing" | "sidecar_start_failed" | "sidecar_health_failed" | "tool_not_found" | "tool_disabled" | "tool_handler_unavailable" | "tool_execution_failed" | "tool_timeout" | "tool_output_invalid" | "tool_permission_denied" | "mcp_timeout" | "mcp_server_unavailable" | "mcp_capability_unsupported" | "mcp_response_invalid" | "mcp_transport_failed" | "lsp_timeout" | "lsp_server_unavailable" | "lsp_capability_unsupported" | "lsp_response_invalid" | "lsp_transport_failed" | "mcp_call_failed" | "lsp_request_failed";
|
|
7
7
|
export type AgentSamErrorSeverity = "transient" | "blocking_user_fixable" | "blocking_internal" | "policy_blocking";
|
|
8
8
|
export type AgentSamErrorSourceKind = "user" | "agentsam" | "provider" | "dependency" | "runtime" | "policy";
|
|
9
9
|
export type AgentSamErrorResolutionOwner = "user" | "agentsam" | "provider" | "organization_admin" | "policy" | "unknown";
|
|
10
|
-
export type AgentSamErrorDomain = "runtime" | "provider" | "auth" | "device" | "terminal" | "transport" | "repository" | "indexing" | "knowledge" | "cad" | "deployment" | "persistence" | "policy" | "tool";
|
|
11
|
-
export type
|
|
10
|
+
export type AgentSamErrorDomain = "runtime" | "provider" | "auth" | "identity" | "device" | "terminal" | "transport" | "repository" | "indexing" | "knowledge" | "cad" | "hook" | "model" | "configuration" | "schema" | "migration" | "database" | "package" | "build" | "distribution" | "deployment" | "workflow" | "persistence" | "policy" | "tool";
|
|
11
|
+
export type AgentSamErrorFailureClass = "input" | "validation" | "authentication" | "authorization" | "policy" | "discovery" | "resolution" | "availability" | "transport" | "protocol" | "timeout" | "rate_limit" | "capacity" | "resource" | "configuration" | "dependency" | "filesystem" | "persistence" | "consistency" | "conflict" | "process" | "ipc" | "data_integrity" | "cancellation" | "cancelled" | "build" | "distribution" | "migration" | "schema" | "identity" | "execution" | "internal" | "unknown";
|
|
12
|
+
export type AgentSamErrorStage = "discover" | "resolve" | "load" | "configure" | "validate" | "authorize" | "connect" | "prepare" | "install" | "build" | "start" | "execute" | "transform" | "persist" | "migrate" | "verify" | "publish" | "attach" | "detach" | "cleanup" | "shutdown";
|
|
13
|
+
export type AgentSamErrorFailureBehavior = "fail_closed" | "fail_open" | "observe_only" | "retry_bounded" | "skip" | "abort" | "no_replay";
|
|
14
|
+
export type AgentSamRemediationAction = "none" | "retry" | "retry_later" | "reauthenticate" | "connect_provider" | "configure_provider_credential" | "refresh_provider_credential" | "request_permission" | "reenroll_device" | "reconnect_service" | "install_dependency" | "upgrade_dependency" | "configure_dependency" | "change_configuration" | "change_input" | "reduce_scope" | "increase_quota" | "add_budget" | "select_model" | "change_region" | "restart_runtime" | "inspect_platform" | "contact_provider" | "contact_agentsam" | "contact_organization_admin" | "restart_service" | "repair_schema" | "run_migration" | "regenerate_artifact" | "update_lockfile" | "reinstall_workspace" | "republish_artifact";
|
|
12
15
|
export type AgentSamErrorSideEffectState = "none" | "not_started" | "confirmed_not_applied" | "confirmed_applied" | "partially_applied" | "unknown";
|
|
13
16
|
export type AgentSamErrorOutcomeStatus = "success" | "partial" | "failure";
|
|
14
17
|
|
|
@@ -28,14 +31,22 @@ export interface AgentSamErrorEnvelope {
|
|
|
28
31
|
schema_version: typeof AGENTSAM_ERROR_SCHEMA_VERSION;
|
|
29
32
|
code: AgentSamErrorCode;
|
|
30
33
|
reason: AgentSamErrorReason | (string & {});
|
|
34
|
+
domain: AgentSamErrorDomain;
|
|
35
|
+
failure_class: AgentSamErrorFailureClass;
|
|
36
|
+
stage: AgentSamErrorStage;
|
|
37
|
+
native_stage: string | null;
|
|
38
|
+
feature: string | null;
|
|
39
|
+
failure_behavior: AgentSamErrorFailureBehavior | null;
|
|
31
40
|
severity: AgentSamErrorSeverity;
|
|
32
|
-
|
|
41
|
+
retryable: boolean;
|
|
42
|
+
side_effect_state: AgentSamErrorSideEffectState;
|
|
33
43
|
resolution_owner: AgentSamErrorResolutionOwner;
|
|
34
|
-
|
|
44
|
+
source: AgentSamErrorSource;
|
|
45
|
+
adapter: string | null;
|
|
46
|
+
protocol: string | null;
|
|
47
|
+
transport: string | null;
|
|
35
48
|
tool: string | null;
|
|
36
|
-
stage: string | null;
|
|
37
49
|
message: string;
|
|
38
|
-
retryable: boolean;
|
|
39
50
|
retry_after_ms: number | null;
|
|
40
51
|
remediation: AgentSamErrorRemediation;
|
|
41
52
|
resource: AgentSamErrorResource | null;
|
|
@@ -43,7 +54,6 @@ export interface AgentSamErrorEnvelope {
|
|
|
43
54
|
environment: AgentSamEnvironmentEvidence | null;
|
|
44
55
|
http_status: number | null;
|
|
45
56
|
grpc_status: number | null;
|
|
46
|
-
transport: string | null;
|
|
47
57
|
provider: string | null;
|
|
48
58
|
provider_code: string | null;
|
|
49
59
|
request_id: string | null;
|
|
@@ -51,7 +61,6 @@ export interface AgentSamErrorEnvelope {
|
|
|
51
61
|
fingerprint: string;
|
|
52
62
|
occurrence_count: number;
|
|
53
63
|
details: unknown;
|
|
54
|
-
failure_class?: string;
|
|
55
64
|
operation?: AgentSamErrorOperation;
|
|
56
65
|
retry?: AgentSamErrorRetry;
|
|
57
66
|
fallback?: AgentSamErrorFallback;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inneranimalmedia/agentsam-errors",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.10",
|
|
4
4
|
"description": "Canonical AgentSam runtime error normalization, classification, transport, remediation and rendering.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
|
+
"types": "./types/index.d.ts",
|
|
7
8
|
"exports": {
|
|
8
|
-
".":
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./types/index.d.ts",
|
|
11
|
+
"import": "./src/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./catalog": "./protocol/error-catalog.json",
|
|
14
|
+
"./schema": "./protocol/agentsam.error.v2.schema.json"
|
|
9
15
|
},
|
|
10
16
|
"scripts": {
|
|
11
17
|
"test": "node --test test/*.test.mjs"
|
|
@@ -22,7 +28,9 @@
|
|
|
22
28
|
"directory": "packages/agentsam-errors"
|
|
23
29
|
},
|
|
24
30
|
"files": [
|
|
25
|
-
"src"
|
|
31
|
+
"src",
|
|
32
|
+
"types",
|
|
33
|
+
"protocol"
|
|
26
34
|
],
|
|
27
35
|
"license": "MIT"
|
|
28
36
|
}
|