@inneranimalmedia/agentsam-sdk 2.6.10 → 2.6.11
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 +3 -0
- package/TRADEMARKS.md +22 -0
- package/apps/README.md +3 -0
- package/apps/cad-creator/LICENSE +21 -0
- package/apps/cad-creator/README.md +4 -1
- package/apps/cad-creator/shared/cad/package.json +1 -1
- package/apps/client-cms-editor/LICENSE +21 -0
- package/apps/client-cms-editor/README.md +3 -0
- package/apps/client-cms-editor/backend/package.json +2 -2
- package/apps/client-cms-editor/frontend/package.json +3 -3
- package/apps/client-cms-editor/package-lock.json +43 -43
- package/apps/client-cms-editor/package.json +3 -3
- package/apps/client-cms-editor/reference/harvest/HARVEST_RECEIPT.json +1 -1
- package/apps/client-cms-editor/reference/harvest/README.md +1 -1
- package/apps/client-cms-editor/reference/harvest/plans/ARCHIVE-INTAKE.md +1 -1
- package/apps/client-cms-editor/reference/harvest/plans/HARVEST-INDEX.md +1 -1
- package/apps/client-cms-editor/reference/harvest/plans/TOOLING-LAB.md +1 -1
- package/apps/client-cms-editor/shared/cms/package.json +1 -1
- package/docs/MINI.md +4 -2
- package/docs/REPO_FILE_MAP.txt +0 -1
- package/docs/SOURCE_ARCHITECTURE.md +1 -1
- package/docs/architecture/DUAL_ANALYTICS_PRODUCT.md +140 -0
- package/docs/content-studio/REVISION_GATE_2026-09-27.md +1 -1
- package/docs/engineering/go-portability/01-product-project-deployment-authority.md +69 -0
- package/docs/engineering/provider-internal-renames/01-lane-initialization.md +20 -0
- package/docs/engineering/provider-internal-renames/01a-runtime-environment-contract.md +115 -0
- package/docs/engineering/provider-internal-renames/02-cfoa.md +57 -0
- package/docs/engineering/provider-internal-renames/03-gclioa.md +32 -0
- package/docs/engineering/provider-internal-renames/04-goaude.md +50 -0
- package/docs/engineering/provider-internal-renames/05-gdrv.md +33 -0
- package/docs/engineering/provider-internal-renames/06-verification.md +103 -0
- package/docs/engineering/provider-internal-renames/README.md +77 -0
- package/docs/engineering/provider-internal-renames/runtime-environment-contract.json +220 -0
- package/docs/engineering/test-diagnostics/go-cli-test-hang-20261003.md +49 -0
- package/docs/engineering/test-diagnostics/go-skip-deploy-docker-fix.md +90 -0
- package/docs/knowledge-service-verification.md +3 -3
- package/docs/plans/AGENTSAM-SUSPEND-QUEUE-KNOWLEDGE-RDP-2026-10-03.md +870 -0
- package/docs/plans/LOCAL-STUDIO-GRADUATION-2026-09-26.md +9 -9
- package/docs/plans/MACHINE-FIRST-APPS-TUI-2026-09-24.md +11 -11
- package/docs/plans/RECONCILIATION-2026-09-19.md +6 -6
- package/docs/plans/SAM_WORK_PROTOCOL.md +667 -0
- package/docs/plans/TOMORROW-EXTENSIVE-TODO-2026-09-26.md +2 -2
- package/docs/plans/UNIVERSAL-INGEST-MACHINE-FIRST-2026-09-24.md +3 -3
- package/examples/hyperspace-demo/src/main.tsx +227 -110
- package/migrations/d1/0020_agentsam_receipt_catalog.sql +35 -0
- package/migrations/runtime/0006_agent_run_suspend_activity.sql +53 -0
- package/migrations/runtime/0007_queue_control.sql +40 -0
- package/migrations/runtime/0008_agent_run_dependencies.sql +24 -0
- package/migrations/runtime/0008_analytics_legacy_bootstrap.sql +43 -0
- package/migrations/runtime/0009_analytics_authority.sql +108 -0
- package/package.json +26 -11
- package/packages/agentsam-brand/README.md +3 -0
- package/packages/agentsam-brand/package.json +2 -2
- package/packages/agentsam-contracts/dist/adapter.d.ts +22 -0
- package/packages/agentsam-contracts/dist/adapter.js +0 -0
- package/packages/agentsam-contracts/dist/agent.d.ts +66 -0
- package/packages/agentsam-contracts/dist/agent.js +15 -0
- package/packages/agentsam-contracts/dist/artifacts.d.ts +70 -0
- package/packages/agentsam-contracts/dist/artifacts.js +0 -0
- package/packages/agentsam-contracts/dist/authority.d.ts +21 -0
- package/packages/agentsam-contracts/dist/authority.js +0 -0
- package/packages/agentsam-contracts/dist/context.d.ts +14 -0
- package/packages/agentsam-contracts/dist/context.js +0 -0
- package/packages/agentsam-contracts/dist/errors.d.ts +121 -0
- package/packages/agentsam-contracts/dist/errors.js +5 -0
- package/packages/agentsam-contracts/dist/events.d.ts +53 -0
- package/packages/agentsam-contracts/dist/events.js +0 -0
- package/packages/agentsam-contracts/dist/execution.d.ts +38 -0
- package/packages/agentsam-contracts/dist/execution.js +0 -0
- package/packages/agentsam-contracts/dist/hooks.d.ts +31 -0
- package/packages/agentsam-contracts/dist/hooks.js +0 -0
- package/packages/agentsam-contracts/dist/identity.d.ts +15 -0
- package/packages/agentsam-contracts/dist/identity.js +0 -0
- package/packages/agentsam-contracts/dist/index.d.ts +16 -0
- package/packages/agentsam-contracts/dist/index.js +164 -0
- package/packages/agentsam-contracts/dist/models.d.ts +9 -0
- package/packages/agentsam-contracts/dist/models.js +0 -0
- package/packages/agentsam-contracts/dist/providers.d.ts +27 -0
- package/packages/agentsam-contracts/dist/providers.js +0 -0
- package/packages/agentsam-contracts/dist/repository.d.ts +56 -0
- package/packages/agentsam-contracts/dist/repository.js +15 -0
- package/packages/agentsam-contracts/dist/run.d.ts +113 -0
- package/packages/agentsam-contracts/dist/run.js +132 -0
- package/packages/agentsam-contracts/dist/tools.d.ts +82 -0
- package/packages/agentsam-contracts/dist/tools.js +0 -0
- package/packages/agentsam-contracts/dist/widgets.d.ts +38 -0
- package/packages/agentsam-contracts/dist/widgets.js +0 -0
- package/packages/agentsam-contracts/package.json +9 -1
- package/packages/agentsam-contracts/scripts/build.mjs +1 -1
- package/packages/agentsam-contracts/src/agent.ts +78 -3
- package/packages/agentsam-contracts/src/index.ts +2 -0
- package/packages/agentsam-contracts/src/run.ts +320 -0
- package/packages/agentsam-contracts/src/widgets.ts +58 -0
- package/packages/agentsam-contracts/test/contracts.test.mjs +1 -1
- package/packages/agentsam-contracts/test/run-contract.test.mjs +94 -0
- package/packages/agentsam-errors/package.json +1 -1
- package/packages/agentsam-goap/README.md +3 -0
- package/packages/agentsam-goap/package.json +2 -2
- package/packages/agentsam-hooks/package.json +2 -2
- package/packages/agentsam-hooks/src/adapters/agents.js +48 -22
- package/packages/agentsam-hooks/src/index.d.ts +16 -0
- package/packages/agentsam-knowledge/package.json +1 -1
- package/packages/agentsam-knowledge/src/backends/index.js +1 -1
- package/packages/agentsam-merch/README.md +62 -0
- package/packages/agentsam-merch/bin/agentsam-merch.mjs +16 -0
- package/packages/agentsam-merch/package.json +65 -0
- package/packages/agentsam-merch/profiles/completeful/dtg-back-large.json +42 -0
- package/packages/agentsam-merch/profiles/completeful/laser-engraving.json +39 -0
- package/packages/agentsam-merch/profiles/generic/embroidery-digitization.json +22 -0
- package/packages/agentsam-merch/schemas/collection-candidate.schema.json +66 -0
- package/packages/agentsam-merch/schemas/manufacturing-profile.schema.json +221 -0
- package/packages/agentsam-merch/src/adapters-completeful.js +50 -0
- package/packages/agentsam-merch/src/cli.js +93 -0
- package/packages/agentsam-merch/src/collection-lab.js +60 -0
- package/packages/agentsam-merch/src/compatibility.js +501 -0
- package/packages/agentsam-merch/src/derivatives.js +112 -0
- package/packages/agentsam-merch/src/index.d.ts +316 -0
- package/packages/agentsam-merch/src/index.js +46 -0
- package/packages/agentsam-merch/src/node/index.d.ts +58 -0
- package/packages/agentsam-merch/src/node/index.js +6 -0
- package/packages/agentsam-merch/src/node/raster.js +142 -0
- package/packages/agentsam-merch/src/node/vector.js +239 -0
- package/packages/agentsam-merch/src/product-concepts.js +118 -0
- package/packages/agentsam-merch/src/profile-registry.js +104 -0
- package/packages/agentsam-merch/src/profile.js +158 -0
- package/packages/agentsam-merch/src/transforms.js +215 -0
- package/packages/agentsam-merch/test/merch.test.mjs +332 -0
- package/packages/agentsam-merch/test/node-transforms.test.mjs +149 -0
- package/packages/agentsam-nav/dist/browser.global.js +71 -34
- package/packages/agentsam-nav/dist/browser.js +3179 -781
- package/packages/agentsam-nav/dist/index.js +3171 -773
- package/packages/agentsam-nav/package.json +1 -1
- package/packages/agentsam-queue-control/README.md +4 -1
- package/packages/agentsam-queue-control/package.json +4 -3
- package/packages/agentsam-queue-control/schemas/job-envelope.schema.json +111 -11
- package/packages/agentsam-queue-control/src/adapters/cloudflare.js +34 -6
- package/packages/agentsam-queue-control/src/adapters/memory.js +11 -2
- package/packages/agentsam-queue-control/src/adapters/sqlite.js +259 -0
- package/packages/agentsam-queue-control/src/contracts.js +207 -3
- package/packages/agentsam-queue-control/src/control-plane.js +62 -2
- package/packages/agentsam-queue-control/src/index.js +1 -0
- package/packages/agentsam-queue-control/test/queue-control.test.mjs +310 -0
- package/packages/agentsam-queue-control/test/sqlite-adapter.test.mjs +91 -0
- package/packages/agentsam-rapid-rust/README.md +3 -0
- package/packages/agentsam-repository/README.md +3 -0
- package/packages/agentsam-repository/package.json +1 -1
- package/packages/agentsam-vault/package.json +1 -1
- package/packages/agentsam-workbench/README.md +43 -0
- package/packages/agentsam-workbench/package.json +13 -3
- package/packages/agentsam-workbench/src/agent/AgentConversationSurface.tsx +108 -0
- package/packages/agentsam-workbench/src/agent/AgentPanel.tsx +25 -8
- package/packages/agentsam-workbench/src/agent/AgentRuntimeField.tsx +152 -0
- package/packages/agentsam-workbench/src/agent/Composer.tsx +10 -1
- package/packages/agentsam-workbench/src/agent/RunMode.ts +26 -0
- package/packages/agentsam-workbench/src/agent/Thread.tsx +18 -3
- package/packages/agentsam-workbench/src/agent/index.ts +3 -0
- package/packages/agentsam-workbench/src/index.ts +4 -0
- package/packages/agentsam-workbench/src/manufacturing/PreflightIndicator.tsx +203 -0
- package/packages/agentsam-workbench/src/manufacturing/index.ts +2 -0
- package/packages/agentsam-workbench/src/manufacturing/loading.ts +147 -0
- package/packages/agentsam-workbench/src/widgets/BuiltinWidget.tsx +22 -0
- package/packages/agentsam-workbench/src/widgets/CountdownWidget.tsx +68 -0
- package/packages/agentsam-workbench/src/widgets/WidgetFrame.tsx +56 -0
- package/packages/agentsam-workbench/src/widgets/countdown.ts +25 -0
- package/packages/agentsam-workbench/src/widgets/index.ts +6 -0
- package/packages/agentsam-workbench/src/widgets/registry.ts +13 -0
- package/packages/agentsam-workbench/src/widgets/useCountdown.ts +128 -0
- package/packages/agentsam-workbench/src/widgets/widgets.css +102 -0
- package/packages/connectors/{cloudflare → cfoa}/package.json +3 -3
- package/packages/heuristic-theme/package.json +1 -1
- package/packages/identity/README.md +3 -0
- package/packages/identity/backend/README.md +3 -0
- package/packages/identity/package.json +1 -1
- package/packages/identity/src/frontend/auth-portal/README.md +3 -0
- package/packages/identity/src/index.js +1 -1
- package/packages/identity/src/oauth/README.md +4 -1
- package/packages/identity/src/oauth/credentials.js +1 -1
- package/packages/identity/src/server/worker-router.js +1 -1
- package/packages/identity/tests/google-desktop-identity-login.test.mjs +1 -1
- package/packages/identity/tests/lane1-packed-consumer.test.mjs +1 -1
- package/packages/identity/tests/oauth-presets-accounts-ssot.test.mjs +1 -1
- package/packages/providers/completeful/package.json +1 -1
- package/packages/theme-church-site/package.json +1 -1
- package/packages/theme-companions-site/package.json +1 -1
- package/packages/theme-floors-site/package.json +1 -1
- package/packages/theme-fuelnfree-site/package.json +1 -1
- package/packages/theme-handyman-site/package.json +1 -1
- package/packages/theme-insurance-site/package.json +1 -1
- package/packages/theme-scenes/package.json +1 -1
- package/packages/theme-shinshu-site/package.json +1 -1
- package/packages/work-graph/package.json +1 -1
- package/protocol/models/README.md +3 -0
- package/protocol/receipts/agentsam.receipt.v1.json +95 -0
- package/protocol/theme-refinery/receipts/products-registry-batch-20260924.json +6 -6
- package/protocol/theme-refinery/receipts/theme-harvest-20260924.json +6 -6
- package/skills/README.md +3 -0
- package/src/acp/agent-executor.js +106 -0
- package/src/acp/client.js +316 -0
- package/src/acp/dependencies.js +426 -0
- package/src/acp/http.js +207 -0
- package/src/acp/index.js +22 -0
- package/src/acp/runs.js +125 -0
- package/src/acp/runtime-selection.js +180 -0
- package/src/cli/command-catalog.js +3 -0
- package/src/cli.js +24 -0
- package/src/commands/cloudflare-login.js +1 -1
- package/src/commands/cloudflare.js +2 -2
- package/src/commands/connections.js +1 -1
- package/src/commands/go.js +76 -6
- package/src/commands/merch.js +5 -0
- package/src/commands/mini.js +1 -1
- package/src/commands/receipts.js +140 -0
- package/src/commands/run.js +253 -0
- package/src/go/container.js +1 -1
- package/src/go/contract.js +61 -18
- package/src/go/discover.js +0 -4
- package/src/go/index.js +13 -1
- package/src/go/probe.js +109 -0
- package/src/go/{cloudflare.js → providers/cloudflare.js} +36 -136
- package/src/go/verify.js +1 -1
- package/src/indexing/ingest/inventory.js +1 -1
- package/src/lib/deploy/local-studio.js +2 -2
- package/src/lib/mini/scaffold.js +1 -1
- package/src/lib/whoami-capabilities.js +1 -1
- package/src/local/runtime-store.js +8 -0
- package/src/mcp/cloudflare-bundles.js +1 -1
- package/src/plugins/index.js +1 -0
- package/src/plugins/registry.js +59 -6
- package/src/receipts/contract.js +68 -0
- package/src/receipts/index.js +20 -0
- package/src/receipts/prune.js +64 -0
- package/src/receipts/sinks.js +285 -0
- package/templates/mini/gadget/app.js +15 -40
- package/templates/mini/gadget/index.html +7 -7
- package/templates/mini/shared/style.css +1 -1
- package/packages/agentsam-repository/src/goap.js.bak-20260922011251 +0 -670
- /package/packages/connectors/{cloudflare → cfoa}/OAUTH_STORAGE_AUDIT.md +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/api-client.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/capabilities.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/credential.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/brand-protection.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/keyless.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/pages.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/scanner.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/snippets.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/tag-gateway.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/tags.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/token-validation.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/vectorize.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/families/workflows.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/index.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/oauth-persist.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/owner.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/permission-options.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/routes.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/scope-catalog.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/src/vault.js +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/tests/capabilities.test.mjs +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/tests/connector.test.mjs +0 -0
- /package/packages/connectors/{cloudflare → cfoa}/tests/oauth-persist.test.mjs +0 -0
- /package/packages/identity/src/oauth/{google-desktop-exchange.js → goaude.js} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
-- AgentSam analytics authority v1.
|
|
2
|
+
--
|
|
3
|
+
-- Replace the old, empty aggregate-shaped agentsam_analytics table with the
|
|
4
|
+
-- canonical HOT analytical fact ledger.
|
|
5
|
+
--
|
|
6
|
+
-- Safety: the guard aborts if the legacy table contains any rows.
|
|
7
|
+
-- Operational tables remain authoritative for live transactional state.
|
|
8
|
+
-- agentsam_analytics owns normalized analytical facts.
|
|
9
|
+
-- Basin/Iceberg receives compact projections from those facts.
|
|
10
|
+
|
|
11
|
+
PRAGMA foreign_keys = ON;
|
|
12
|
+
|
|
13
|
+
CREATE TABLE IF NOT EXISTS agentsam_analytics_migration_guard_0009 (
|
|
14
|
+
row_count INTEGER NOT NULL CHECK (row_count = 0)
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
DELETE FROM agentsam_analytics_migration_guard_0009;
|
|
18
|
+
|
|
19
|
+
INSERT INTO agentsam_analytics_migration_guard_0009 (row_count)
|
|
20
|
+
SELECT COUNT(*) FROM agentsam_analytics;
|
|
21
|
+
|
|
22
|
+
DROP TABLE agentsam_analytics_migration_guard_0009;
|
|
23
|
+
|
|
24
|
+
ALTER TABLE agentsam_analytics
|
|
25
|
+
RENAME TO agentsam_analytics_aggregate_legacy_20261003;
|
|
26
|
+
|
|
27
|
+
CREATE TABLE agentsam_analytics (
|
|
28
|
+
id TEXT PRIMARY KEY NOT NULL,
|
|
29
|
+
schema_name TEXT NOT NULL DEFAULT 'agentsam.metric-event.v1',
|
|
30
|
+
|
|
31
|
+
account_id TEXT,
|
|
32
|
+
tenant_id TEXT,
|
|
33
|
+
workspace_id TEXT,
|
|
34
|
+
repository_id TEXT,
|
|
35
|
+
git_sha TEXT,
|
|
36
|
+
run_id TEXT,
|
|
37
|
+
receipt_id TEXT,
|
|
38
|
+
|
|
39
|
+
event_kind TEXT NOT NULL,
|
|
40
|
+
domain TEXT NOT NULL,
|
|
41
|
+
operation TEXT NOT NULL,
|
|
42
|
+
outcome TEXT,
|
|
43
|
+
|
|
44
|
+
source_client TEXT,
|
|
45
|
+
source_table TEXT,
|
|
46
|
+
source_id TEXT,
|
|
47
|
+
provider TEXT,
|
|
48
|
+
model_key TEXT,
|
|
49
|
+
tool_key TEXT,
|
|
50
|
+
|
|
51
|
+
duration_ms INTEGER CHECK (duration_ms IS NULL OR duration_ms >= 0),
|
|
52
|
+
queue_wait_ms INTEGER CHECK (queue_wait_ms IS NULL OR queue_wait_ms >= 0),
|
|
53
|
+
external_wait_ms INTEGER CHECK (external_wait_ms IS NULL OR external_wait_ms >= 0),
|
|
54
|
+
active_model_ms INTEGER CHECK (active_model_ms IS NULL OR active_model_ms >= 0),
|
|
55
|
+
|
|
56
|
+
input_tokens INTEGER CHECK (input_tokens IS NULL OR input_tokens >= 0),
|
|
57
|
+
cached_input_tokens INTEGER CHECK (cached_input_tokens IS NULL OR cached_input_tokens >= 0),
|
|
58
|
+
output_tokens INTEGER CHECK (output_tokens IS NULL OR output_tokens >= 0),
|
|
59
|
+
reasoning_tokens INTEGER CHECK (reasoning_tokens IS NULL OR reasoning_tokens >= 0),
|
|
60
|
+
cost_usd REAL CHECK (cost_usd IS NULL OR cost_usd >= 0),
|
|
61
|
+
cost_basis TEXT,
|
|
62
|
+
|
|
63
|
+
attempt_count INTEGER CHECK (attempt_count IS NULL OR attempt_count >= 0),
|
|
64
|
+
retry_count INTEGER CHECK (retry_count IS NULL OR retry_count >= 0),
|
|
65
|
+
plan_points REAL,
|
|
66
|
+
|
|
67
|
+
score_family TEXT,
|
|
68
|
+
score_value REAL,
|
|
69
|
+
weights_version TEXT,
|
|
70
|
+
|
|
71
|
+
error_code TEXT,
|
|
72
|
+
failure_origin TEXT,
|
|
73
|
+
artifact_ref TEXT,
|
|
74
|
+
|
|
75
|
+
dimensions_json TEXT NOT NULL DEFAULT '{}',
|
|
76
|
+
metrics_json TEXT NOT NULL DEFAULT '{}',
|
|
77
|
+
|
|
78
|
+
dedup_key TEXT,
|
|
79
|
+
created_at_unix INTEGER NOT NULL DEFAULT (unixepoch()),
|
|
80
|
+
|
|
81
|
+
CHECK (score_value IS NULL OR score_family IS NOT NULL),
|
|
82
|
+
CHECK (score_family IS NULL OR weights_version IS NOT NULL)
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
CREATE UNIQUE INDEX idx_agentsam_analytics_dedup
|
|
86
|
+
ON agentsam_analytics(dedup_key)
|
|
87
|
+
WHERE dedup_key IS NOT NULL;
|
|
88
|
+
|
|
89
|
+
CREATE INDEX idx_agentsam_analytics_created
|
|
90
|
+
ON agentsam_analytics(created_at_unix DESC);
|
|
91
|
+
|
|
92
|
+
CREATE INDEX idx_agentsam_analytics_run
|
|
93
|
+
ON agentsam_analytics(run_id, created_at_unix DESC);
|
|
94
|
+
|
|
95
|
+
CREATE INDEX idx_agentsam_analytics_repo
|
|
96
|
+
ON agentsam_analytics(repository_id, git_sha, created_at_unix DESC);
|
|
97
|
+
|
|
98
|
+
CREATE INDEX idx_agentsam_analytics_domain_operation
|
|
99
|
+
ON agentsam_analytics(domain, operation, created_at_unix DESC);
|
|
100
|
+
|
|
101
|
+
CREATE INDEX idx_agentsam_analytics_outcome
|
|
102
|
+
ON agentsam_analytics(outcome, created_at_unix DESC);
|
|
103
|
+
|
|
104
|
+
CREATE INDEX idx_agentsam_analytics_receipt
|
|
105
|
+
ON agentsam_analytics(receipt_id);
|
|
106
|
+
|
|
107
|
+
CREATE INDEX idx_agentsam_analytics_score
|
|
108
|
+
ON agentsam_analytics(score_family, weights_version, created_at_unix DESC);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inneranimalmedia/agentsam-sdk",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.11",
|
|
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",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"./identity/oauth/finalize-inbound": "./packages/identity/src/oauth/finalize-inbound.js",
|
|
61
61
|
"./identity/oauth/redirect-paths": "./packages/identity/src/oauth/redirect-paths.js",
|
|
62
62
|
"./identity/oauth/credentials": "./packages/identity/src/oauth/credentials.js",
|
|
63
|
-
"./identity/oauth/google-desktop-exchange": "./packages/identity/src/oauth/
|
|
63
|
+
"./identity/oauth/google-desktop-exchange": "./packages/identity/src/oauth/goaude.js",
|
|
64
64
|
"./identity/oauth/iam-platform": "./packages/identity/src/oauth/iam-platform.js",
|
|
65
65
|
"./identity/recovery/password-reset": "./packages/identity/src/recovery/password-reset.js",
|
|
66
66
|
"./identity/server/worker-router": "./packages/identity/src/server/worker-router.js",
|
|
@@ -134,7 +134,14 @@
|
|
|
134
134
|
"./hooks/protocol/config": "./protocol/hooks/agentsam.hooks.config.v1.schema.json",
|
|
135
135
|
"./hooks/protocol/receipt": "./protocol/hooks/agentsam.hook.receipt.v1.schema.json",
|
|
136
136
|
"./hooks/schema/manifest": "./packages/agentsam-hooks/schema/manifest.json",
|
|
137
|
-
"./hooks/schema/sqlite": "./migrations/runtime/0005_agentsam_hooks.sql"
|
|
137
|
+
"./hooks/schema/sqlite": "./migrations/runtime/0005_agentsam_hooks.sql",
|
|
138
|
+
"./acp": "./src/acp/index.js",
|
|
139
|
+
"./acp/http": "./src/acp/http.js",
|
|
140
|
+
"./acp/runtime-selection": "./src/acp/runtime-selection.js",
|
|
141
|
+
"./receipts": "./src/receipts/index.js",
|
|
142
|
+
"./receipts/schema": "./protocol/receipts/agentsam.receipt.v1.json",
|
|
143
|
+
"./merch": "./packages/agentsam-merch/src/index.js",
|
|
144
|
+
"./merch/node": "./packages/agentsam-merch/src/node/index.js"
|
|
138
145
|
},
|
|
139
146
|
"bin": {
|
|
140
147
|
"agentsam": "bin/agentsam",
|
|
@@ -163,7 +170,7 @@
|
|
|
163
170
|
"packages/work-graph",
|
|
164
171
|
"packages/agentsam-queue-control",
|
|
165
172
|
"packages/agentsam-goap",
|
|
166
|
-
"packages/connectors/
|
|
173
|
+
"packages/connectors/cfoa",
|
|
167
174
|
"packages/providers/completeful",
|
|
168
175
|
"templates",
|
|
169
176
|
"docs",
|
|
@@ -229,9 +236,13 @@
|
|
|
229
236
|
"packages/agentsam-workbench/package.json",
|
|
230
237
|
"packages/agentsam-workbench/README.md",
|
|
231
238
|
"packages/agentsam-workbench/src",
|
|
232
|
-
"packages/agentsam-workbench/tsconfig.json"
|
|
239
|
+
"packages/agentsam-workbench/tsconfig.json",
|
|
240
|
+
"packages/agentsam-merch",
|
|
241
|
+
"TRADEMARKS.md"
|
|
233
242
|
],
|
|
234
243
|
"workspaces": [
|
|
244
|
+
"packages/agentsam-analytics",
|
|
245
|
+
"packages/analytics-ui",
|
|
235
246
|
"packages/agentsam-assets-core",
|
|
236
247
|
"packages/agentsam-brand",
|
|
237
248
|
"packages/agentsam-cloudflare-images",
|
|
@@ -248,6 +259,7 @@
|
|
|
248
259
|
"packages/agentsam-key-manager",
|
|
249
260
|
"packages/agentsam-knowledge",
|
|
250
261
|
"packages/agentsam-loading-scene",
|
|
262
|
+
"packages/agentsam-merch",
|
|
251
263
|
"packages/agentsam-nav",
|
|
252
264
|
"packages/agentsam-queue-control",
|
|
253
265
|
"packages/agentsam-repository",
|
|
@@ -258,7 +270,7 @@
|
|
|
258
270
|
"packages/agentsam-work",
|
|
259
271
|
"packages/agentsam-workbench",
|
|
260
272
|
"packages/cms-runtime",
|
|
261
|
-
"packages/connectors/
|
|
273
|
+
"packages/connectors/cfoa",
|
|
262
274
|
"packages/heuristic-theme",
|
|
263
275
|
"packages/identity",
|
|
264
276
|
"packages/providers/completeful",
|
|
@@ -277,6 +289,9 @@
|
|
|
277
289
|
"scripts": {
|
|
278
290
|
"test": "npm run test:standard && npm --prefix packages/identity test && npm --prefix packages/agentsam-brand test && npm run test:connectors && npm run test:providers",
|
|
279
291
|
"test:brand": "npm --prefix packages/agentsam-brand test",
|
|
292
|
+
"brand:scan": "python3 scripts/brand-compliance/brand_compliance.py scan",
|
|
293
|
+
"brand:check": "python3 scripts/brand-compliance/brand_compliance.py check",
|
|
294
|
+
"brand:apply": "python3 scripts/brand-compliance/brand_compliance.py apply",
|
|
280
295
|
"test:content": "npm run build -w @inneranimalmedia/agentsam-assets-core && npm run test -w @inneranimalmedia/agentsam-assets-core && npm run build -w @inneranimalmedia/agentsam-scoring && npm run test -w @inneranimalmedia/agentsam-scoring && npm run build -w @inneranimalmedia/agentsam-cloudflare-images && npm run test -w @inneranimalmedia/agentsam-cloudflare-images && npm run build -w @inneranimalmedia/agentsam-content && npm run test -w @inneranimalmedia/agentsam-content && npm run build -w @inneranimalmedia/agentsam-content-studio && npm run test -w @inneranimalmedia/agentsam-content-studio",
|
|
281
296
|
"build:content": "npm run build -w @inneranimalmedia/agentsam-assets-core && npm run build -w @inneranimalmedia/agentsam-scoring && npm run build -w @inneranimalmedia/agentsam-cloudflare-images && npm run build -w @inneranimalmedia/agentsam-content && npm run build -w @inneranimalmedia/agentsam-content-studio",
|
|
282
297
|
"test:standard": "node test/smoke.mjs && npm run test:unit && npm run test:cli && npm run test:integration:mock && npm run test:terminal:mock",
|
|
@@ -286,7 +301,7 @@
|
|
|
286
301
|
"test:terminal:mock": "node --test test/terminal/*.test.mjs",
|
|
287
302
|
"test:live:terminal": "node --test test/live/*.live.test.mjs",
|
|
288
303
|
"test:identity": "npm --prefix packages/identity 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",
|
|
304
|
+
"test:workspaces": "npm --prefix packages/agentsam-contracts run build && 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 run build && 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",
|
|
290
305
|
"test:autorag": "npm --prefix packages/agentsam-knowledge test",
|
|
291
306
|
"smoke": "node test/smoke.mjs",
|
|
292
307
|
"verify:package": "node scripts/verify-package.mjs",
|
|
@@ -296,7 +311,7 @@
|
|
|
296
311
|
"test:python": "node scripts/verify-python.mjs",
|
|
297
312
|
"verify:release": "npm run verify && npm run verify:packages:public && npm run verify:knowledge-package && npm run test:python && npm run security:release",
|
|
298
313
|
"pack:check": "node scripts/verify-pack.mjs",
|
|
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",
|
|
314
|
+
"verify": "npm run brand:check && 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",
|
|
300
315
|
"publish:identity-alpha": "bash scripts/publish-identity-alpha.sh",
|
|
301
316
|
"publish:identity-alpha:dry-run": "bash scripts/publish-identity-alpha.sh --dry-run",
|
|
302
317
|
"publish:identity-alpha:publish-only": "bash scripts/publish-identity-alpha.sh --publish-only",
|
|
@@ -309,7 +324,7 @@
|
|
|
309
324
|
"security:check": "node src/security/cli.mjs scan",
|
|
310
325
|
"security:repair": "node src/security/cli.mjs repair",
|
|
311
326
|
"ui:preview": "node scripts/ui-preview.mjs",
|
|
312
|
-
"test:connectors": "node --test packages/connectors/
|
|
327
|
+
"test:connectors": "node --test packages/connectors/cfoa/tests/**/*.test.mjs",
|
|
313
328
|
"verify:npm10-lock": "node apps/local-studio/scripts/verify-npm10-lock.mjs",
|
|
314
329
|
"proto:generate": "node scripts/generate-proto.mjs",
|
|
315
330
|
"proto:check": "node scripts/verify-proto.mjs",
|
|
@@ -341,7 +356,7 @@
|
|
|
341
356
|
"dependencies": {
|
|
342
357
|
"@clack/prompts": "^1.7.0",
|
|
343
358
|
"@grpc/grpc-js": "^1.14.4",
|
|
344
|
-
"@inneranimalmedia/agentsam-errors": "2.6.
|
|
359
|
+
"@inneranimalmedia/agentsam-errors": "2.6.11",
|
|
345
360
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
346
361
|
"google-protobuf": "^3.21.4",
|
|
347
362
|
"node-pty": "^1.1.0",
|
|
@@ -392,7 +407,7 @@
|
|
|
392
407
|
"@electric-sql/pglite-pgvector": "0.0.9",
|
|
393
408
|
"esbuild": "0.28.1",
|
|
394
409
|
"grpc-tools": "^1.13.1",
|
|
395
|
-
"wrangler": "4.
|
|
410
|
+
"wrangler": "4.147.0"
|
|
396
411
|
},
|
|
397
412
|
"overrides": {
|
|
398
413
|
"@types/react": "19.2.18",
|
|
@@ -114,3 +114,6 @@ npm --prefix packages/theme-scenes test
|
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
See `packages/theme-scenes/README.md`. Studio shell (Moon Glass → Brand Studio) sits above both packages in a later tranche.
|
|
117
|
+
|
|
118
|
+
<!-- agentsam:trademark-notice -->
|
|
119
|
+
> Independent project. Not affiliated with, endorsed by, or sponsored by Cloudflare, Inc. or by any other company whose products are named here. Cloudflare is a registered trademark of Cloudflare, Inc. Other names are trademarks of their respective owners. See [TRADEMARKS](https://github.com/SamPrimeaux/agentsam-sdk/blob/main/TRADEMARKS.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inneranimalmedia/agentsam-brand",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.11",
|
|
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",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"main": "./src/index.js",
|
|
14
14
|
"bin": {
|
|
15
|
-
"agentsam-brand": "
|
|
15
|
+
"agentsam-brand": "bin/agentsam-brand.mjs"
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
18
|
".": "./src/index.js",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AgentEvent } from './events';
|
|
2
|
+
import type { AgentInput, AgentRun } from './agent';
|
|
3
|
+
import type { AgentCapability } from './tools';
|
|
4
|
+
import type { ModelOption } from './models';
|
|
5
|
+
export interface AgentWorkbenchAdapter {
|
|
6
|
+
send(input: AgentInput): AgentRun | Promise<AgentRun>;
|
|
7
|
+
cancel(runId: string): void | Promise<void>;
|
|
8
|
+
getModels(): ModelOption[] | Promise<ModelOption[]>;
|
|
9
|
+
getCapabilities(): AgentCapability[] | Promise<AgentCapability[]>;
|
|
10
|
+
subscribe(conversationId: string, onEvent: (event: AgentEvent) => void): () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface BrowserWorkbenchAdapter {
|
|
13
|
+
navigate(url: string): void | Promise<void>;
|
|
14
|
+
back?(): void | Promise<void>;
|
|
15
|
+
forward?(): void | Promise<void>;
|
|
16
|
+
reload?(): void | Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export interface TerminalWorkbenchAdapter {
|
|
19
|
+
write(command: string): void | Promise<void>;
|
|
20
|
+
interrupt?(): void | Promise<void>;
|
|
21
|
+
resize?(cols: number, rows: number): void | Promise<void>;
|
|
22
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { AgentAttachment } from './artifacts';
|
|
2
|
+
import type { AgentContext } from './context';
|
|
3
|
+
export type AgentRole = 'user' | 'assistant' | 'system' | 'tool';
|
|
4
|
+
export interface AgentMessage {
|
|
5
|
+
id: string;
|
|
6
|
+
role: AgentRole;
|
|
7
|
+
content: string;
|
|
8
|
+
createdAt: number;
|
|
9
|
+
name?: string;
|
|
10
|
+
modelId?: string;
|
|
11
|
+
metadata?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export interface AgentInput {
|
|
14
|
+
conversationId: string;
|
|
15
|
+
text: string;
|
|
16
|
+
attachments?: AgentAttachment[];
|
|
17
|
+
context?: AgentContext;
|
|
18
|
+
modelId?: string;
|
|
19
|
+
capabilityIds?: string[];
|
|
20
|
+
}
|
|
21
|
+
export type AgentRunMode = 'ask' | 'plan' | 'agent' | 'debug' | 'multitask';
|
|
22
|
+
export type AgentRunSelectedBy = 'manual' | 'automatic' | 'fallback';
|
|
23
|
+
export type AgentRunStatus = 'queued' | 'running' | 'paused' | 'waiting_external' | 'waiting_child' | 'awaiting_input' | 'awaiting_approval' | 'sleeping' | 'retry_scheduled' | 'partial' | 'completed' | 'cancelled' | 'failed' | 'timed_out';
|
|
24
|
+
export type AgentRunTerminalStatus = 'completed' | 'cancelled' | 'failed' | 'timed_out';
|
|
25
|
+
export type AgentRunWaitingStatus = 'waiting_external' | 'waiting_child' | 'awaiting_input' | 'awaiting_approval' | 'sleeping' | 'retry_scheduled';
|
|
26
|
+
export interface AgentRun {
|
|
27
|
+
id: string;
|
|
28
|
+
conversationId?: string;
|
|
29
|
+
status: AgentRunStatus;
|
|
30
|
+
startedAt?: number;
|
|
31
|
+
completedAt?: number;
|
|
32
|
+
accountId?: string;
|
|
33
|
+
kind?: string;
|
|
34
|
+
externalAgentId?: string;
|
|
35
|
+
externalRunId?: string;
|
|
36
|
+
parentRunId?: string;
|
|
37
|
+
sourceClient?: string;
|
|
38
|
+
surface?: string;
|
|
39
|
+
mode?: AgentRunMode;
|
|
40
|
+
modelId?: string;
|
|
41
|
+
modelKey?: string;
|
|
42
|
+
reasoningEffort?: string;
|
|
43
|
+
requestedServiceTier?: string;
|
|
44
|
+
actualServiceTier?: string;
|
|
45
|
+
selectedBy?: AgentRunSelectedBy;
|
|
46
|
+
cancelRequested?: boolean;
|
|
47
|
+
errorCode?: string;
|
|
48
|
+
errorMessage?: string;
|
|
49
|
+
error?: string;
|
|
50
|
+
modelCallCount?: number;
|
|
51
|
+
toolCallCount?: number;
|
|
52
|
+
inputTokens?: number;
|
|
53
|
+
cachedInputTokens?: number;
|
|
54
|
+
outputTokens?: number;
|
|
55
|
+
reasoningTokens?: number;
|
|
56
|
+
costUsd?: number;
|
|
57
|
+
createdAt?: number;
|
|
58
|
+
updatedAt?: number;
|
|
59
|
+
latencyMs?: number;
|
|
60
|
+
planId?: string;
|
|
61
|
+
todoId?: string;
|
|
62
|
+
metadata?: Record<string, unknown>;
|
|
63
|
+
}
|
|
64
|
+
export declare function isAgentRunTerminalStatus(status: AgentRunStatus): status is AgentRunTerminalStatus;
|
|
65
|
+
export declare function isAgentRunWaitingStatus(status: AgentRunStatus): status is AgentRunWaitingStatus;
|
|
66
|
+
export declare function isAgentRunModelActiveStatus(status: AgentRunStatus): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/agent.ts
|
|
2
|
+
function isAgentRunTerminalStatus(status) {
|
|
3
|
+
return status === "completed" || status === "cancelled" || status === "failed" || status === "timed_out";
|
|
4
|
+
}
|
|
5
|
+
function isAgentRunWaitingStatus(status) {
|
|
6
|
+
return status === "waiting_external" || status === "waiting_child" || status === "awaiting_input" || status === "awaiting_approval" || status === "sleeping" || status === "retry_scheduled";
|
|
7
|
+
}
|
|
8
|
+
function isAgentRunModelActiveStatus(status) {
|
|
9
|
+
return status === "queued" || status === "running";
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
isAgentRunModelActiveStatus,
|
|
13
|
+
isAgentRunTerminalStatus,
|
|
14
|
+
isAgentRunWaitingStatus
|
|
15
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export type AgentArtifactKind = 'code' | 'file' | 'preview' | 'browser' | 'terminal' | 'deploy' | 'render' | 'model' | 'receipt' | string;
|
|
2
|
+
export interface AgentAttachment {
|
|
3
|
+
id: string;
|
|
4
|
+
/** @deprecated prefer kind — kept for backward compatibility */
|
|
5
|
+
name: string;
|
|
6
|
+
mimeType?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
/** @deprecated text-file shortcut — do not use for images */
|
|
9
|
+
text?: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
metadata?: Record<string, unknown>;
|
|
12
|
+
/** Structured multimodal fields (v1+) */
|
|
13
|
+
kind?: 'image' | 'document' | 'text' | 'archive' | 'audio' | 'video' | 'model' | 'binary';
|
|
14
|
+
source?: {
|
|
15
|
+
type: 'local_path';
|
|
16
|
+
path: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: 'blob';
|
|
19
|
+
blobId: string;
|
|
20
|
+
} | {
|
|
21
|
+
type: 'url';
|
|
22
|
+
url: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: 'r2';
|
|
25
|
+
bucket: string;
|
|
26
|
+
key: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: 'artifact';
|
|
29
|
+
artifactId: string;
|
|
30
|
+
};
|
|
31
|
+
sha256?: string;
|
|
32
|
+
image?: {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
alpha?: boolean;
|
|
36
|
+
orientation?: number;
|
|
37
|
+
};
|
|
38
|
+
preview?: {
|
|
39
|
+
url?: string;
|
|
40
|
+
localPath?: string;
|
|
41
|
+
};
|
|
42
|
+
inference?: {
|
|
43
|
+
mimeType: string;
|
|
44
|
+
source: {
|
|
45
|
+
type: 'local_path';
|
|
46
|
+
path: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: 'blob';
|
|
49
|
+
blobId: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'url';
|
|
52
|
+
url: string;
|
|
53
|
+
};
|
|
54
|
+
width?: number;
|
|
55
|
+
height?: number;
|
|
56
|
+
bytes?: number;
|
|
57
|
+
};
|
|
58
|
+
lifetime?: 'ephemeral' | 'conversation' | 'project' | 'artifact' | 'brand';
|
|
59
|
+
}
|
|
60
|
+
export interface AgentArtifact {
|
|
61
|
+
id: string;
|
|
62
|
+
kind: AgentArtifactKind;
|
|
63
|
+
title?: string;
|
|
64
|
+
mimeType?: string;
|
|
65
|
+
content?: string;
|
|
66
|
+
url?: string;
|
|
67
|
+
createdAt?: number;
|
|
68
|
+
updatedAt?: number;
|
|
69
|
+
metadata?: Record<string, unknown>;
|
|
70
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type AgentAuthorityType = 'none' | 'host' | 'binding' | 'secret' | 'oauth' | 'connection';
|
|
2
|
+
export interface AgentAuthorityRequirement {
|
|
3
|
+
type: AgentAuthorityType;
|
|
4
|
+
ref?: string;
|
|
5
|
+
provider?: string;
|
|
6
|
+
scopes?: string[];
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Opaque, non-secret reference to authority resolved by the host runtime.
|
|
12
|
+
* Raw credentials/tokens must not be serialized into portable AgentSam contracts.
|
|
13
|
+
*/
|
|
14
|
+
export interface AgentResolvedAuthorityReference {
|
|
15
|
+
type: Exclude<AgentAuthorityType, 'none'>;
|
|
16
|
+
ref: string;
|
|
17
|
+
provider?: string;
|
|
18
|
+
accountRef?: string;
|
|
19
|
+
scopes?: string[];
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type AgentSurface = 'chat' | 'work' | 'cad' | 'cms' | string;
|
|
2
|
+
export interface AgentContext {
|
|
3
|
+
surface: AgentSurface;
|
|
4
|
+
accountId?: string;
|
|
5
|
+
authUserId?: string;
|
|
6
|
+
repository?: string;
|
|
7
|
+
files?: string[];
|
|
8
|
+
selection?: unknown;
|
|
9
|
+
projectId?: string;
|
|
10
|
+
metadata?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export interface AgentContextProvider {
|
|
13
|
+
getContext(): AgentContext | Promise<AgentContext>;
|
|
14
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export declare const AGENTSAM_ERROR_SCHEMA_VERSION: 2;
|
|
2
|
+
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";
|
|
3
|
+
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";
|
|
4
|
+
export type AgentSamErrorSeverity = "transient" | "blocking_user_fixable" | "blocking_internal" | "policy_blocking";
|
|
5
|
+
export type AgentSamErrorSourceKind = "user" | "agentsam" | "provider" | "dependency" | "runtime" | "policy";
|
|
6
|
+
export type AgentSamErrorResolutionOwner = "user" | "agentsam" | "provider" | "organization_admin" | "policy" | "unknown";
|
|
7
|
+
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";
|
|
8
|
+
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";
|
|
9
|
+
export type AgentSamErrorStage = "discover" | "resolve" | "load" | "configure" | "validate" | "authorize" | "connect" | "prepare" | "install" | "build" | "start" | "execute" | "transform" | "persist" | "migrate" | "verify" | "publish" | "attach" | "detach" | "cleanup" | "shutdown";
|
|
10
|
+
export type AgentSamErrorFailureBehavior = "fail_closed" | "fail_open" | "observe_only" | "retry_bounded" | "skip" | "abort" | "no_replay";
|
|
11
|
+
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
|
+
export type AgentSamErrorSideEffectState = "none" | "not_started" | "confirmed_not_applied" | "confirmed_applied" | "partially_applied" | "unknown";
|
|
13
|
+
export type AgentSamErrorOutcomeStatus = "success" | "partial" | "failure";
|
|
14
|
+
export interface AgentSamErrorSource {
|
|
15
|
+
kind: AgentSamErrorSourceKind;
|
|
16
|
+
name: string;
|
|
17
|
+
service: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentSamErrorRemediation {
|
|
20
|
+
action: AgentSamRemediationAction;
|
|
21
|
+
message: string | null;
|
|
22
|
+
automatic: boolean;
|
|
23
|
+
command: string | null;
|
|
24
|
+
url: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface AgentSamErrorResource {
|
|
27
|
+
type: string;
|
|
28
|
+
id: string | null;
|
|
29
|
+
name: string | null;
|
|
30
|
+
}
|
|
31
|
+
export interface AgentSamNativeErrorEvidence {
|
|
32
|
+
code: string | null;
|
|
33
|
+
exception_type: string | null;
|
|
34
|
+
exit_code: number | null;
|
|
35
|
+
signal: string | null;
|
|
36
|
+
stderr: string | null;
|
|
37
|
+
stdout: string | null;
|
|
38
|
+
stack: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface AgentSamEnvironmentEvidence {
|
|
41
|
+
detected_version: string | null;
|
|
42
|
+
required_version: string | null;
|
|
43
|
+
component: string | null;
|
|
44
|
+
runtime: string | null;
|
|
45
|
+
platform: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface AgentSamErrorOperation {
|
|
48
|
+
kind?: string | null;
|
|
49
|
+
action?: string | null;
|
|
50
|
+
resource_type?: string | null;
|
|
51
|
+
resource_id?: string | null;
|
|
52
|
+
read_only?: boolean;
|
|
53
|
+
idempotent?: boolean;
|
|
54
|
+
side_effect_state?: AgentSamErrorSideEffectState;
|
|
55
|
+
}
|
|
56
|
+
export interface AgentSamErrorRetry {
|
|
57
|
+
allowed?: boolean;
|
|
58
|
+
strategy?: string;
|
|
59
|
+
retry_after_ms?: number | null;
|
|
60
|
+
max_attempts?: number | null;
|
|
61
|
+
requires_idempotency_key?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface AgentSamErrorFallback {
|
|
64
|
+
allowed?: boolean;
|
|
65
|
+
strategy?: string | null;
|
|
66
|
+
preserve_semantics?: boolean;
|
|
67
|
+
target?: string | null;
|
|
68
|
+
}
|
|
69
|
+
export interface AgentSamErrorNotification {
|
|
70
|
+
user?: string;
|
|
71
|
+
operator?: string;
|
|
72
|
+
agent?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface AgentSamErrorPartialResult {
|
|
75
|
+
completed?: number;
|
|
76
|
+
failed?: number;
|
|
77
|
+
failures?: unknown[];
|
|
78
|
+
}
|
|
79
|
+
export interface AgentSamErrorEnvelope {
|
|
80
|
+
ok: false;
|
|
81
|
+
schema_version: typeof AGENTSAM_ERROR_SCHEMA_VERSION;
|
|
82
|
+
code: AgentSamErrorCode;
|
|
83
|
+
reason: AgentSamErrorReason | (string & {});
|
|
84
|
+
domain: AgentSamErrorDomain;
|
|
85
|
+
failure_class: AgentSamErrorFailureClass;
|
|
86
|
+
stage: AgentSamErrorStage;
|
|
87
|
+
native_stage: string | null;
|
|
88
|
+
feature: string | null;
|
|
89
|
+
failure_behavior: AgentSamErrorFailureBehavior | null;
|
|
90
|
+
severity: AgentSamErrorSeverity;
|
|
91
|
+
retryable: boolean;
|
|
92
|
+
side_effect_state: AgentSamErrorSideEffectState;
|
|
93
|
+
resolution_owner: AgentSamErrorResolutionOwner;
|
|
94
|
+
source: AgentSamErrorSource;
|
|
95
|
+
adapter: string | null;
|
|
96
|
+
protocol: string | null;
|
|
97
|
+
transport: string | null;
|
|
98
|
+
tool: string | null;
|
|
99
|
+
message: string;
|
|
100
|
+
retry_after_ms: number | null;
|
|
101
|
+
remediation: AgentSamErrorRemediation;
|
|
102
|
+
resource: AgentSamErrorResource | null;
|
|
103
|
+
native: AgentSamNativeErrorEvidence | null;
|
|
104
|
+
environment: AgentSamEnvironmentEvidence | null;
|
|
105
|
+
http_status: number | null;
|
|
106
|
+
grpc_status: number | null;
|
|
107
|
+
provider: string | null;
|
|
108
|
+
provider_code: string | null;
|
|
109
|
+
request_id: string | null;
|
|
110
|
+
trace_id: string | null;
|
|
111
|
+
fingerprint: string;
|
|
112
|
+
occurrence_count: number;
|
|
113
|
+
details: unknown;
|
|
114
|
+
operation?: AgentSamErrorOperation;
|
|
115
|
+
retry?: AgentSamErrorRetry;
|
|
116
|
+
fallback?: AgentSamErrorFallback;
|
|
117
|
+
notify?: AgentSamErrorNotification;
|
|
118
|
+
cause?: unknown;
|
|
119
|
+
status?: AgentSamErrorOutcomeStatus;
|
|
120
|
+
partial?: AgentSamErrorPartialResult;
|
|
121
|
+
}
|