@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.
- package/README.md +18 -0
- package/apps/README.md +25 -0
- package/apps/cad-creator/shared/cad/package.json +1 -1
- package/apps/client-cms-editor/backend/package.json +5 -7
- package/apps/client-cms-editor/frontend/package.json +5 -7
- package/apps/client-cms-editor/frontend/tsconfig.json +27 -8
- 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 +3 -5
- package/docs/LOCAL_ENGINE_COMPUTE_AUDIT_PLAN.md +299 -0
- 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 +37 -10
- 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 +71 -20
- package/packages/agentsam-contracts/scripts/build.mjs +18 -0
- package/packages/agentsam-contracts/src/errors.ts +19 -10
- package/packages/agentsam-contracts/test/contracts.test.mjs +4 -1
- package/packages/agentsam-contracts/test/repository.test.mjs +4 -1
- package/packages/agentsam-contracts/tsconfig.build.json +10 -0
- package/packages/agentsam-errors/package.json +13 -4
- 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 +3 -2
- package/packages/agentsam-nav/package.json +1 -1
- package/packages/agentsam-queue-control/package.json +1 -1
- package/packages/agentsam-rapid-rust/src/main.rs +1 -0
- package/packages/agentsam-repository/package.json +3 -2
- package/packages/agentsam-vault/package.json +8 -5
- package/packages/agentsam-workbench/package.json +45 -18
- package/packages/connectors/cloudflare/package.json +1 -1
- package/packages/heuristic-theme/package.json +1 -1
- package/packages/identity/package.json +3 -2
- package/packages/identity/tests/lane1-packed-consumer.test.mjs +9 -1
- package/packages/providers/completeful/package.json +1 -1
- package/packages/theme-church-site/README.md +2 -2
- package/packages/theme-church-site/package.json +2 -3
- package/packages/theme-church-site/src/index.js +1 -1
- package/packages/theme-church-site/test/theme.test.mjs +1 -1
- package/packages/theme-companions-site/README.md +2 -2
- package/packages/theme-companions-site/package.json +2 -3
- package/packages/theme-companions-site/src/index.js +1 -1
- package/packages/theme-companions-site/test/theme.test.mjs +1 -1
- package/packages/theme-floors-site/README.md +2 -2
- package/packages/theme-floors-site/package.json +2 -3
- package/packages/theme-floors-site/src/index.js +1 -1
- package/packages/theme-floors-site/test/theme.test.mjs +1 -1
- package/packages/theme-fuelnfree-site/README.md +2 -2
- package/packages/theme-fuelnfree-site/package.json +2 -3
- package/packages/theme-fuelnfree-site/src/index.js +1 -1
- package/packages/theme-fuelnfree-site/test/theme.test.mjs +1 -1
- package/packages/theme-handyman-site/README.md +2 -2
- package/packages/theme-handyman-site/package.json +2 -3
- package/packages/theme-handyman-site/src/index.js +1 -1
- package/packages/theme-handyman-site/test/theme.test.mjs +1 -1
- package/packages/theme-insurance-site/README.md +2 -2
- package/packages/theme-insurance-site/package.json +2 -3
- package/packages/theme-insurance-site/src/index.js +1 -1
- package/packages/theme-insurance-site/test/theme.test.mjs +1 -1
- package/packages/theme-scenes/package.json +1 -1
- package/packages/theme-shinshu-site/README.md +2 -2
- package/packages/theme-shinshu-site/package.json +2 -3
- package/packages/theme-shinshu-site/src/index.js +1 -1
- package/packages/theme-shinshu-site/test/theme.test.mjs +1 -1
- package/packages/work-graph/package.json +3 -2
- 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 +14 -0
- package/protocol/local-engine/engine.v1.schema.json +17 -0
- 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 +2 -0
- package/src/cli.js +19 -0
- package/src/commands/app.js +10 -0
- package/src/commands/cheat-sheet.js +1 -0
- package/src/commands/engine.js +10 -0
- package/src/commands/hooks.js +260 -0
- package/src/commands/machine.js +71 -38
- package/src/commands/models.js +1 -1
- package/src/commands/package.js +10 -3
- package/src/commands/runtime.js +25 -10
- package/src/commands/setup.js +30 -6
- package/src/commands/shell.js +114 -9
- package/src/commands/terminal.js +20 -8
- package/src/errors/contract.js +4 -4
- package/src/errors/diagnostic.js +10 -10
- package/src/errors/index.js +1 -1
- package/src/index.js +52 -0
- package/src/indexing/ingest/materials.js +237 -30
- package/src/knowledge/service/grpc-codec.js +2 -0
- package/src/lib/setup/runtime.js +4 -2
- package/src/lib/slash-commands.js +1 -0
- package/src/local/runtime-store.js +46 -0
- package/src/local-engine/assets.js +37 -0
- package/src/local-engine/audit.js +133 -0
- package/src/local-engine/benchmark.js +26 -0
- package/src/local-engine/contracts.js +101 -0
- package/src/local-engine/engines.js +142 -0
- package/src/local-engine/index.js +18 -0
- package/src/local-engine/runtime.js +39 -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
|
@@ -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,31 +1,79 @@
|
|
|
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
|
-
"main": "./
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"./
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"./
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./agent": {
|
|
13
|
+
"types": "./dist/agent.d.ts",
|
|
14
|
+
"import": "./dist/agent.js"
|
|
15
|
+
},
|
|
16
|
+
"./events": {
|
|
17
|
+
"types": "./dist/events.d.ts",
|
|
18
|
+
"import": "./dist/events.js"
|
|
19
|
+
},
|
|
20
|
+
"./tools": {
|
|
21
|
+
"types": "./dist/tools.d.ts",
|
|
22
|
+
"import": "./dist/tools.js"
|
|
23
|
+
},
|
|
24
|
+
"./authority": {
|
|
25
|
+
"types": "./dist/authority.d.ts",
|
|
26
|
+
"import": "./dist/authority.js"
|
|
27
|
+
},
|
|
28
|
+
"./execution": {
|
|
29
|
+
"types": "./dist/execution.d.ts",
|
|
30
|
+
"import": "./dist/execution.js"
|
|
31
|
+
},
|
|
32
|
+
"./providers": {
|
|
33
|
+
"types": "./dist/providers.d.ts",
|
|
34
|
+
"import": "./dist/providers.js"
|
|
35
|
+
},
|
|
36
|
+
"./hooks": {
|
|
37
|
+
"types": "./dist/hooks.d.ts",
|
|
38
|
+
"import": "./dist/hooks.js"
|
|
39
|
+
},
|
|
40
|
+
"./artifacts": {
|
|
41
|
+
"types": "./dist/artifacts.d.ts",
|
|
42
|
+
"import": "./dist/artifacts.js"
|
|
43
|
+
},
|
|
44
|
+
"./context": {
|
|
45
|
+
"types": "./dist/context.d.ts",
|
|
46
|
+
"import": "./dist/context.js"
|
|
47
|
+
},
|
|
48
|
+
"./adapter": {
|
|
49
|
+
"types": "./dist/adapter.d.ts",
|
|
50
|
+
"import": "./dist/adapter.js"
|
|
51
|
+
},
|
|
52
|
+
"./models": {
|
|
53
|
+
"types": "./dist/models.d.ts",
|
|
54
|
+
"import": "./dist/models.js"
|
|
55
|
+
},
|
|
56
|
+
"./identity": {
|
|
57
|
+
"types": "./dist/identity.d.ts",
|
|
58
|
+
"import": "./dist/identity.js"
|
|
59
|
+
},
|
|
60
|
+
"./repository": {
|
|
61
|
+
"types": "./dist/repository.d.ts",
|
|
62
|
+
"import": "./dist/repository.js"
|
|
63
|
+
},
|
|
64
|
+
"./errors": {
|
|
65
|
+
"types": "./dist/errors.d.ts",
|
|
66
|
+
"import": "./dist/errors.js"
|
|
67
|
+
}
|
|
23
68
|
},
|
|
24
69
|
"scripts": {
|
|
25
70
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
26
|
-
"test": "node --test test/*.test.mjs"
|
|
71
|
+
"test": "node --test test/*.test.mjs",
|
|
72
|
+
"build": "node scripts/build.mjs",
|
|
73
|
+
"prepack": "npm run build"
|
|
27
74
|
},
|
|
28
75
|
"devDependencies": {
|
|
76
|
+
"esbuild": "^0.28.1",
|
|
29
77
|
"typescript": "^5.9.3"
|
|
30
78
|
},
|
|
31
79
|
"publishConfig": {
|
|
@@ -37,6 +85,9 @@
|
|
|
37
85
|
"directory": "packages/agentsam-contracts"
|
|
38
86
|
},
|
|
39
87
|
"files": [
|
|
40
|
-
"
|
|
41
|
-
|
|
88
|
+
"dist",
|
|
89
|
+
"README.md"
|
|
90
|
+
],
|
|
91
|
+
"license": "MIT",
|
|
92
|
+
"types": "./dist/index.d.ts"
|
|
42
93
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { rmSync } from 'node:fs';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { build } from 'esbuild';
|
|
5
|
+
|
|
6
|
+
const cwd = fileURLToPath(new URL('../', import.meta.url));
|
|
7
|
+
const modules = ['index','agent','events','tools','authority','execution','providers','hooks','artifacts','context','adapter','models','identity','repository','errors'];
|
|
8
|
+
rmSync(`${cwd}/dist`, { recursive: true, force: true });
|
|
9
|
+
await build({
|
|
10
|
+
absWorkingDir: cwd,
|
|
11
|
+
entryPoints: Object.fromEntries(modules.map((name) => [name, `src/${name}.ts`])),
|
|
12
|
+
outdir: 'dist',
|
|
13
|
+
bundle: true,
|
|
14
|
+
format: 'esm',
|
|
15
|
+
platform: 'neutral',
|
|
16
|
+
target: 'es2022',
|
|
17
|
+
});
|
|
18
|
+
execFileSync('tsc', ['-p', 'tsconfig.build.json'], { cwd, stdio: 'inherit' });
|
|
@@ -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;
|
|
@@ -11,6 +11,9 @@ test('contracts package stays framework neutral', async () => {
|
|
|
11
11
|
test('execution-plane contracts are exported as first-class package surfaces', async () => {
|
|
12
12
|
const pkg = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
|
|
13
13
|
for (const key of ['./tools', './authority', './execution', './providers', './events', './hooks']) {
|
|
14
|
-
|
|
14
|
+
const entry = pkg.exports[key];
|
|
15
|
+
assert.equal(typeof entry, 'object', `missing typed contract export: ${key}`);
|
|
16
|
+
assert.match(entry.types, /^\.\/dist\/.+\.d\.ts$/);
|
|
17
|
+
assert.match(entry.import, /^\.\/dist\/.+\.js$/);
|
|
15
18
|
}
|
|
16
19
|
});
|
|
@@ -6,7 +6,10 @@ test('repository graph vocabulary is owned and exported by the contracts package
|
|
|
6
6
|
const pkg = JSON.parse(await fs.readFile(new URL('../package.json', import.meta.url), 'utf8'));
|
|
7
7
|
const source = await fs.readFile(new URL('../src/repository.ts', import.meta.url), 'utf8');
|
|
8
8
|
|
|
9
|
-
assert.
|
|
9
|
+
assert.deepEqual(pkg.exports['./repository'], {
|
|
10
|
+
types: './dist/repository.d.ts',
|
|
11
|
+
import: './dist/repository.js',
|
|
12
|
+
});
|
|
10
13
|
for (const value of [
|
|
11
14
|
'informational', 'compatible', 'strict', 'critical',
|
|
12
15
|
'warn', 'block_certification', 'block_deploy', 'degrade',
|
|
@@ -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,6 +28,9 @@
|
|
|
22
28
|
"directory": "packages/agentsam-errors"
|
|
23
29
|
},
|
|
24
30
|
"files": [
|
|
25
|
-
"src"
|
|
26
|
-
|
|
31
|
+
"src",
|
|
32
|
+
"types",
|
|
33
|
+
"protocol"
|
|
34
|
+
],
|
|
35
|
+
"license": "MIT"
|
|
27
36
|
}
|