@inneranimalmedia/agentsam-sdk 2.4.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTSAM.md +55 -0
- package/README.md +17 -12
- package/bin/agentsam +2 -0
- package/docs/AGENTSAM_ASTRA_OPENAI_INTEGRATION.md +1363 -0
- package/docs/AGENTSAM_WORKBENCH.md +30 -0
- package/docs/AUTH_IDENTITY_CONTRACT.md +52 -0
- package/docs/CAPABILITIES.md +5 -3
- package/docs/CLI_SHELL.md +167 -80
- package/docs/CMS_STUDIO.md +101 -0
- package/docs/CONTEXT.md +170 -0
- package/docs/LOCAL_OLLAMA.md +58 -0
- package/docs/MERKLE.md +19 -19
- package/docs/PORTABLE_CONTEXT.md +4 -3
- package/docs/PROJECT_CONFIG.md +72 -0
- package/docs/RELEASES.md +35 -2
- package/docs/REPOSITORY_INTELLIGENCE.md +1 -1
- package/docs/REPOSITORY_KNOWLEDGE.md +114 -0
- package/docs/SDK_WORKER.md +86 -0
- package/docs/SECURITY.md +59 -22
- package/docs/client-cms-editor.md +15 -0
- package/docs/local-studio/WORKMODE_DONOR_NOTES.md +485 -0
- package/package.json +35 -10
- package/packages/connectors/cloudflare/package.json +10 -0
- package/packages/connectors/cloudflare/src/index.js +127 -0
- package/packages/connectors/cloudflare/src/owner.js +76 -0
- package/packages/connectors/cloudflare/src/routes.js +223 -0
- package/packages/connectors/cloudflare/src/vault.js +80 -0
- package/packages/connectors/cloudflare/tests/connector.test.mjs +44 -0
- package/packages/identity/package.json +10 -1
- package/packages/identity/src/contracts/auth-config.js +109 -0
- package/packages/identity/src/index.js +1 -0
- package/packages/identity/src/oauth/README.md +2 -2
- package/packages/identity/src/oauth/credentials.js +11 -4
- package/packages/identity/src/oauth/iam-platform.js +3 -3
- package/packages/identity/src/providers/iam/index.js +7 -7
- package/packages/identity/src/providers/iam/oauth.js +6 -4
- package/packages/identity/src/providers/iam/profile.js +5 -5
- package/packages/identity/tests/auth-config.test.mjs +61 -0
- package/packages/identity/tests/oauth-credentials.test.mjs +13 -2
- package/protocol/FILEMETA_V1.md +95 -0
- package/protocol/INSPECT_VIEWS_V1.md +40 -0
- package/protocol/MERKLE_PERSISTENCE_V1.md +50 -0
- package/protocol/MERKLE_V1.md +3 -1
- package/protocol/README.md +1 -0
- package/protocol/capabilities/cloudflare-cpu-audit-input.schema.json +19 -0
- package/protocol/capabilities/cloudflare-cpu-profile-input.schema.json +13 -0
- package/protocol/capabilities/cloudflare-wrangler-native-input.schema.json +19 -0
- package/protocol/capabilities/manifest.json +79 -3
- package/protocol/capabilities/repository-snapshot.schema.json +1 -0
- package/protocol/context/context-budget.schema.json +36 -0
- package/protocol/context/context-item.schema.json +19 -0
- package/protocol/context/resolved-context-pack.schema.json +47 -0
- package/protocol/context/result-policy.schema.json +17 -0
- package/protocol/knowledge/context-pack.schema.json +33 -0
- package/protocol/knowledge/retrieval-query.schema.json +68 -13
- package/protocol/models/README.md +373 -0
- package/protocol/models/model-inventory-v2.schema.json +212 -0
- package/python/README.md +15 -7
- package/python/agentsam_sdk/cli.py +0 -21
- package/python/agentsam_sdk/tui/README.md +17 -12
- package/python/agentsam_sdk/tui/bootstrap.py +2 -2
- package/python/agentsam_sdk/tui/demo.py +25 -10
- package/python/agentsam_sdk/tui/onboarding.py +208 -0
- package/python/tests/test_tui_cli.py +7 -6
- package/skills/README.md +21 -0
- package/skills/agentsam-app-fundamentals/SKILL.md +165 -0
- package/skills/agentsam-app-fundamentals/references/graphs-contracts-ast-merkle.md +89 -0
- package/skills/agentsam-app-fundamentals/references/trust-credentials-and-destinations.md +99 -0
- package/skills/agentsam-cloudflare-workers/SKILL.md +53 -0
- package/skills/agentsam-cloudflare-workers/references/cpu-profiling.md +16 -0
- package/skills/agentsam-cloudflare-workers/references/errors-and-observability.md +29 -0
- package/skills/agentsam-cloudflare-workers/references/wrangler-native-map.md +28 -0
- package/skills/agentsam-jr-dev/SKILL.md +232 -0
- package/skills/agentsam-jr-dev/references/real-application-logic.md +156 -0
- package/skills/agentsam-jr-dev/references/web-application-fundamentals.md +240 -0
- package/skills/agentsam-progression-guard/SKILL.md +197 -0
- package/skills/agentsam-progression-guard/references/checkpoint-chain.md +111 -0
- package/skills/agentsam-progression-guard/references/hooks-operational-io.md +96 -0
- package/skills/catalog.json +71 -0
- package/src/agent/capability-adapter.js +25 -13
- package/src/agent/index.js +1 -0
- package/src/agent/responses-runner.js +325 -0
- package/src/capabilities/index.js +7 -0
- package/src/capabilities/repository-snapshot-view.js +238 -0
- package/src/capabilities/repository-snapshot.js +28 -14
- package/src/cli.js +198 -76
- package/src/cloudflare/cpu-profile.js +115 -0
- package/src/cloudflare/index.js +14 -0
- package/src/cloudflare/wrangler.js +132 -0
- package/src/commands/account-auth.js +47 -0
- package/src/commands/cloudflare.js +58 -0
- package/src/commands/connections.js +93 -0
- package/src/commands/context-economics.js +114 -0
- package/src/commands/context.js +14 -2
- package/src/commands/db.js +4 -7
- package/src/commands/deploy.js +54 -32
- package/src/commands/eval.js +63 -0
- package/src/commands/interactive.js +18 -0
- package/src/commands/knowledge.js +27 -4
- package/src/commands/merkle-persist.js +118 -0
- package/src/commands/merkle.js +32 -17
- package/src/commands/models.js +152 -0
- package/src/commands/ollama.js +259 -0
- package/src/commands/preferences.js +144 -0
- package/src/commands/product.js +86 -16
- package/src/commands/resume.js +67 -0
- package/src/commands/security.js +8 -6
- package/src/commands/shell.js +405 -100
- package/src/commands/skills.js +66 -0
- package/src/commands/start-local.js +1 -1
- package/src/commands/tunnel.js +5 -4
- package/src/commands/whoami.js +86 -0
- package/src/context/budget.js +120 -0
- package/src/context/compact.js +28 -0
- package/src/context/index.js +7 -0
- package/src/context/rehydrate.js +35 -0
- package/src/context/resolve.js +116 -0
- package/src/context/result-policy.js +66 -0
- package/src/errors/diagnostic.js +160 -0
- package/src/errors/index.js +9 -0
- package/src/eval/context.js +191 -0
- package/src/eval/index.js +1 -0
- package/src/index.js +70 -0
- package/src/indexing/execution-boundary.js +144 -0
- package/src/indexing/index.js +8 -0
- package/src/indexing/provider.js +41 -0
- package/src/knowledge/config.js +2 -2
- package/src/knowledge/context-pack.js +12 -1
- package/src/knowledge/contracts.js +9 -4
- package/src/knowledge/engine.js +7 -3
- package/src/knowledge/service/server.js +1 -1
- package/src/lib/account-session.js +98 -0
- package/src/lib/agent-instructions.js +73 -0
- package/src/lib/auth.js +4 -0
- package/src/lib/bridge-client.js +7 -5
- package/src/lib/cli-preferences.js +78 -0
- package/src/lib/core-client.js +8 -8
- package/src/lib/deploy/git-guard.js +69 -0
- package/src/lib/deploy/health.js +57 -0
- package/src/lib/deploy/local-studio.js +283 -0
- package/src/lib/deploy/secret-scan.js +65 -0
- package/src/lib/deploy-receipt/index.js +5 -2
- package/src/lib/detect-context.js +6 -5
- package/src/lib/execution-approvals.js +59 -0
- package/src/lib/identity-scaffold.js +1 -1
- package/src/lib/local-scaffold.js +35 -33
- package/src/lib/local-sessions.js +127 -0
- package/src/lib/local-status.js +9 -17
- package/src/lib/merkle/cloudflare-persistence.js +321 -0
- package/src/lib/merkle/filemeta.js +43 -0
- package/src/lib/merkle/git-ignore.js +24 -0
- package/src/lib/merkle/hash.js +1 -0
- package/src/lib/merkle/index.js +22 -0
- package/src/lib/merkle/persistence.js +72 -0
- package/src/lib/merkle/semantic.js +359 -0
- package/src/lib/merkle/snapshot.js +9 -3
- package/src/lib/merkle/tree.js +11 -6
- package/src/lib/project-config.js +227 -0
- package/src/lib/project-rules.js +68 -0
- package/src/lib/provider-credentials.js +83 -0
- package/src/lib/save-sdk-token.js +1 -1
- package/src/lib/scaffold/templates/worker-api/index.js +101 -20
- package/src/lib/scaffold/wizards/worker-api.js +27 -11
- package/src/lib/slash-commands.js +22 -15
- package/src/lib/tools.js +11 -5
- package/src/models/catalog.js +135 -0
- package/src/models/index.js +7 -0
- package/src/providers/index.js +5 -0
- package/src/providers/openai-responses.js +275 -0
- package/src/security/index.js +1 -0
- package/src/security/inventory.js +4 -1
- package/src/security/process.js +35 -9
- package/src/security/render.js +27 -5
- package/src/security/scan.js +24 -9
- package/src/security/trust-boundary.js +24 -0
- package/src/skills/index.js +64 -0
- package/src/telemetry/contracts.js +203 -0
- package/src/telemetry/events.js +48 -0
- package/src/telemetry/index.js +8 -0
- package/src/tools/hydrate.js +35 -0
- package/src/tools/index.js +2 -0
- package/src/tools/search.js +70 -0
- package/src/ui/ansi.js +1 -1
- package/src/ui/boot.js +54 -0
- package/src/ui/merkle/render.js +1 -0
- package/src/ui/runtime-activity.js +192 -0
- package/src/ui/theme.js +19 -18
- package/test/account-session.test.mjs +36 -0
- package/test/app-building-skills.test.mjs +61 -0
- package/test/apps-scaffold-contract.test.mjs +56 -0
- package/test/capabilities.test.mjs +53 -4
- package/test/cli-preferences.test.mjs +46 -0
- package/test/cloudflare-connector.test.mjs +96 -0
- package/test/cloudflare-runtime.test.mjs +75 -0
- package/test/context.test.mjs +144 -0
- package/test/deploy-health-scan.test.mjs +67 -0
- package/test/error-diagnostics.test.mjs +59 -0
- package/test/eval-context.test.mjs +37 -0
- package/test/execution-approvals.test.mjs +27 -0
- package/test/indexing-provider.test.mjs +29 -0
- package/test/jr-dev-skill.test.mjs +26 -0
- package/test/knowledge-context-pack.test.mjs +19 -0
- package/test/knowledge.test.mjs +1 -1
- package/test/local-sessions.test.mjs +42 -0
- package/test/local-studio-deploy.test.mjs +83 -0
- package/test/merkle-persistence.test.mjs +91 -0
- package/test/merkle.test.mjs +77 -3
- package/test/model-catalog.test.mjs +43 -0
- package/test/models.test.mjs +51 -0
- package/test/npm10-lock.test.mjs +29 -0
- package/test/ollama.test.mjs +94 -0
- package/test/openai-responses.test.mjs +95 -0
- package/test/project-config.test.mjs +81 -0
- package/test/project-rules.test.mjs +44 -0
- package/test/provider-credentials.test.mjs +52 -0
- package/test/rehydrate.test.mjs +25 -0
- package/test/release-hygiene.test.mjs +34 -0
- package/test/repository-snapshot-view.test.mjs +112 -0
- package/test/responses-runner.test.mjs +148 -0
- package/test/runtime-activity.test.mjs +98 -0
- package/test/sdk-worker-contract.test.mjs +68 -0
- package/test/security.test.mjs +46 -0
- package/test/shell.test.mjs +55 -21
- package/test/skills.test.mjs +22 -0
- package/test/smoke.mjs +5 -2
- package/test/telemetry.test.mjs +79 -0
- package/test/theme-portability.test.mjs +14 -0
- package/test/tools-search.test.mjs +40 -0
- package/test/whoami-resume.test.mjs +56 -0
- package/examples/agentsam-tui-ansi.mjs +0 -149
- package/src/commands/tui.js +0 -120
- package/src/ui/splash-xterm.js +0 -290
- package/src/ui/splash.js +0 -426
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"runtime": "node",
|
|
58
58
|
"package": "@inneranimalmedia/agentsam-sdk/knowledge",
|
|
59
59
|
"cli": "agentsam index run",
|
|
60
|
-
"description": "Build
|
|
60
|
+
"description": "Build the SDK local/portable coherent incremental structural/text generation with optional embeddings.",
|
|
61
61
|
"deterministic": true,
|
|
62
62
|
"model_required": false,
|
|
63
63
|
"side_effects": "local-state",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"runtime": "node",
|
|
72
72
|
"package": "@inneranimalmedia/agentsam-sdk/knowledge",
|
|
73
73
|
"cli": "agentsam search \"query\"",
|
|
74
|
-
"description": "Retrieve bounded repository context from
|
|
74
|
+
"description": "Retrieve bounded repository context from the SDK local/portable published knowledge generation.",
|
|
75
75
|
"deterministic": true,
|
|
76
76
|
"model_required": false,
|
|
77
77
|
"side_effects": "none",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"runtime": "node",
|
|
114
114
|
"package": "@inneranimalmedia/agentsam-sdk/security",
|
|
115
115
|
"cli": "agentsam security scan",
|
|
116
|
-
"description": "
|
|
116
|
+
"description": "Scan dependency vulnerability evidence and Merkle-bound AST execution trust boundaries; return deterministic contradiction and repair evidence.",
|
|
117
117
|
"deterministic": true,
|
|
118
118
|
"model_required": false,
|
|
119
119
|
"side_effects": "network-optional",
|
|
@@ -250,6 +250,82 @@
|
|
|
250
250
|
"model_required": false,
|
|
251
251
|
"side_effects": "artifact-write",
|
|
252
252
|
"status": "experimental"
|
|
253
|
+
},
|
|
254
|
+
"tools.search": {
|
|
255
|
+
"id": "tools.search",
|
|
256
|
+
"kind": "capability",
|
|
257
|
+
"version": 1,
|
|
258
|
+
"domain": "agent",
|
|
259
|
+
"runtime": "node",
|
|
260
|
+
"package": "@inneranimalmedia/agentsam-sdk/tools",
|
|
261
|
+
"export": "searchToolCards",
|
|
262
|
+
"description": "Discover compact capability cards without injecting the full tool catalog or full schemas.",
|
|
263
|
+
"deterministic": true,
|
|
264
|
+
"model_required": false,
|
|
265
|
+
"side_effects": "none",
|
|
266
|
+
"status": "experimental"
|
|
267
|
+
},
|
|
268
|
+
"context.resolve": {
|
|
269
|
+
"id": "context.resolve",
|
|
270
|
+
"kind": "capability",
|
|
271
|
+
"version": 1,
|
|
272
|
+
"domain": "agent",
|
|
273
|
+
"runtime": "node",
|
|
274
|
+
"package": "@inneranimalmedia/agentsam-sdk/context",
|
|
275
|
+
"export": "resolveContext",
|
|
276
|
+
"description": "Select bounded evidence against an explicit model-aware context budget and return a measurable receipt.",
|
|
277
|
+
"deterministic": true,
|
|
278
|
+
"model_required": false,
|
|
279
|
+
"side_effects": "none",
|
|
280
|
+
"output_schema": "protocol/context/resolved-context-pack.schema.json",
|
|
281
|
+
"status": "experimental"
|
|
282
|
+
},
|
|
283
|
+
"cloudflare.wrangler.native": {
|
|
284
|
+
"id": "cloudflare.wrangler.native",
|
|
285
|
+
"kind": "capability",
|
|
286
|
+
"version": 1,
|
|
287
|
+
"domain": "cloudflare",
|
|
288
|
+
"runtime": "node+wrangler",
|
|
289
|
+
"package": "@inneranimalmedia/agentsam-sdk/cloudflare",
|
|
290
|
+
"export": "runWranglerNative",
|
|
291
|
+
"cli": "agentsam cloudflare run <command>",
|
|
292
|
+
"description": "Execute one allowlisted read-only Wrangler operation with argv-safe cwd/config scoping and structured diagnostics.",
|
|
293
|
+
"deterministic": false,
|
|
294
|
+
"model_required": false,
|
|
295
|
+
"side_effects": "network-read",
|
|
296
|
+
"input_schema": "protocol/capabilities/cloudflare-wrangler-native-input.schema.json",
|
|
297
|
+
"status": "experimental"
|
|
298
|
+
},
|
|
299
|
+
"cloudflare.cpu.profile": {
|
|
300
|
+
"id": "cloudflare.cpu.profile",
|
|
301
|
+
"kind": "capability",
|
|
302
|
+
"version": 1,
|
|
303
|
+
"domain": "cloudflare",
|
|
304
|
+
"runtime": "node",
|
|
305
|
+
"package": "@inneranimalmedia/agentsam-sdk/cloudflare",
|
|
306
|
+
"export": "summarizeCloudflareCpuProfileFile",
|
|
307
|
+
"cli": "agentsam cloudflare cpu analyze <profile.cpuprofile>",
|
|
308
|
+
"description": "Summarize a local workerd/DevTools CPU profile into bounded ranked self-time evidence.",
|
|
309
|
+
"deterministic": true,
|
|
310
|
+
"model_required": false,
|
|
311
|
+
"side_effects": "none",
|
|
312
|
+
"input_schema": "protocol/capabilities/cloudflare-cpu-profile-input.schema.json",
|
|
313
|
+
"status": "experimental"
|
|
314
|
+
},
|
|
315
|
+
"cloudflare.cpu.audit": {
|
|
316
|
+
"id": "cloudflare.cpu.audit",
|
|
317
|
+
"kind": "agent_primitive",
|
|
318
|
+
"version": 1,
|
|
319
|
+
"domain": "cloudflare",
|
|
320
|
+
"runtime": "node",
|
|
321
|
+
"package": "@inneranimalmedia/agentsam-sdk/cloudflare",
|
|
322
|
+
"export": "runCloudflareCpuAudit",
|
|
323
|
+
"description": "Analyze a bounded Cloudflare CPU profile and selected source evidence through an injected reasoning adapter without deploy authority.",
|
|
324
|
+
"deterministic": false,
|
|
325
|
+
"model_required": true,
|
|
326
|
+
"side_effects": "none",
|
|
327
|
+
"input_schema": "protocol/capabilities/cloudflare-cpu-audit-input.schema.json",
|
|
328
|
+
"status": "experimental"
|
|
253
329
|
}
|
|
254
330
|
}
|
|
255
331
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/context/context-budget.schema.json",
|
|
4
|
+
"title": "ContextBudget",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"windowTokens", "windowChars", "charsPerToken", "targetInputRatio", "hardInputRatio", "hardWindowRatio",
|
|
9
|
+
"targetInputTokens", "compactAtTokens", "interveneAtTokens", "maxNormalInputTokens", "hardInputTokens",
|
|
10
|
+
"pricingThresholdTokens", "safetyMarginTokens", "targetInputChars", "hardInputChars",
|
|
11
|
+
"maxSystemChars", "maxToolSchemaChars", "maxEvidenceChars", "maxFileCharsPerRead", "maxFileCharsPerTurn", "maxToolResultChars"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"windowTokens": { "type": "integer", "minimum": 1 },
|
|
15
|
+
"windowChars": { "type": "integer", "minimum": 1 },
|
|
16
|
+
"charsPerToken": { "type": "number", "exclusiveMinimum": 0 },
|
|
17
|
+
"targetInputRatio": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
|
|
18
|
+
"hardInputRatio": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
|
|
19
|
+
"hardWindowRatio": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
|
|
20
|
+
"targetInputTokens": { "type": "integer", "minimum": 1 },
|
|
21
|
+
"compactAtTokens": { "type": "integer", "minimum": 1 },
|
|
22
|
+
"interveneAtTokens": { "type": "integer", "minimum": 1 },
|
|
23
|
+
"maxNormalInputTokens": { "type": "integer", "minimum": 1 },
|
|
24
|
+
"hardInputTokens": { "type": "integer", "minimum": 1 },
|
|
25
|
+
"pricingThresholdTokens": { "type": ["integer", "null"], "minimum": 1 },
|
|
26
|
+
"safetyMarginTokens": { "type": "integer", "minimum": 0 },
|
|
27
|
+
"targetInputChars": { "type": "integer", "minimum": 1 },
|
|
28
|
+
"hardInputChars": { "type": "integer", "minimum": 1 },
|
|
29
|
+
"maxSystemChars": { "type": "integer", "minimum": 1 },
|
|
30
|
+
"maxToolSchemaChars": { "type": "integer", "minimum": 1 },
|
|
31
|
+
"maxEvidenceChars": { "type": "integer", "minimum": 1 },
|
|
32
|
+
"maxFileCharsPerRead": { "type": "integer", "minimum": 1 },
|
|
33
|
+
"maxFileCharsPerTurn": { "type": "integer", "minimum": 1 },
|
|
34
|
+
"maxToolResultChars": { "type": "integer", "minimum": 1 }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/context/context-item.schema.json",
|
|
4
|
+
"title": "ContextItem",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["ref", "kind", "chars", "priority"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
10
|
+
"kind": { "type": "string", "enum": ["file", "symbol", "memory", "tool_result", "repo", "artifact"] },
|
|
11
|
+
"chars": { "type": "integer", "minimum": 0 },
|
|
12
|
+
"hash": { "type": "string" },
|
|
13
|
+
"priority": { "type": "number" },
|
|
14
|
+
"content": { "type": "string" },
|
|
15
|
+
"truncated": { "type": "boolean" },
|
|
16
|
+
"compacted": { "type": "boolean" },
|
|
17
|
+
"source_chars": { "type": "integer", "minimum": 0 }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/context/resolved-context-pack.schema.json",
|
|
4
|
+
"title": "ResolvedContextPack",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["objective", "refs", "items", "budget", "receipt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"objective": { "type": "string", "minLength": 1 },
|
|
10
|
+
"refs": { "type": "array", "items": { "type": "string" } },
|
|
11
|
+
"rules": { "type": ["object", "null"] },
|
|
12
|
+
"items": { "type": "array", "items": { "$ref": "./context-item.schema.json" } },
|
|
13
|
+
"budget": { "$ref": "./context-budget.schema.json" },
|
|
14
|
+
"receipt": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": [
|
|
18
|
+
"chars", "system_chars", "instruction_chars", "tool_schema_chars", "history_chars", "evidence_chars", "tool_result_chars",
|
|
19
|
+
"estimated_tokens", "estimated_input_tokens", "window_tokens", "utilization_ratio", "pricing_threshold_tokens",
|
|
20
|
+
"tokens_until_pricing_threshold", "pressure", "estimate_kind", "sources_considered", "sources_included",
|
|
21
|
+
"sources_deferred", "deferred_refs", "rehydratable_refs"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"chars": { "type": "integer", "minimum": 0 },
|
|
25
|
+
"system_chars": { "type": "integer", "minimum": 0 },
|
|
26
|
+
"instruction_chars": { "type": "integer", "minimum": 0 },
|
|
27
|
+
"tool_schema_chars": { "type": "integer", "minimum": 0 },
|
|
28
|
+
"history_chars": { "type": "integer", "minimum": 0 },
|
|
29
|
+
"evidence_chars": { "type": "integer", "minimum": 0 },
|
|
30
|
+
"tool_result_chars": { "type": "integer", "minimum": 0 },
|
|
31
|
+
"estimated_tokens": { "type": "integer", "minimum": 0 },
|
|
32
|
+
"estimated_input_tokens": { "type": "integer", "minimum": 0 },
|
|
33
|
+
"window_tokens": { "type": "integer", "minimum": 1 },
|
|
34
|
+
"utilization_ratio": { "type": "number", "minimum": 0 },
|
|
35
|
+
"pricing_threshold_tokens": { "type": ["integer", "null"] },
|
|
36
|
+
"tokens_until_pricing_threshold": { "type": ["integer", "null"] },
|
|
37
|
+
"pressure": { "type": "string", "enum": ["normal", "target", "compact", "intervene", "max-normal", "hard"] },
|
|
38
|
+
"estimate_kind": { "type": "string", "enum": ["local", "provider"] },
|
|
39
|
+
"sources_considered": { "type": "integer", "minimum": 0 },
|
|
40
|
+
"sources_included": { "type": "integer", "minimum": 0 },
|
|
41
|
+
"sources_deferred": { "type": "integer", "minimum": 0 },
|
|
42
|
+
"deferred_refs": { "type": "array", "items": { "type": "string" } },
|
|
43
|
+
"rehydratable_refs": { "type": "array", "items": { "type": "string" } }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/context/result-policy.schema.json",
|
|
4
|
+
"title": "ResultPolicy",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["max_items", "max_chars", "detail"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"max_items": { "type": "integer", "minimum": 1, "default": 8 },
|
|
10
|
+
"max_chars": { "type": "integer", "minimum": 1, "default": 24000 },
|
|
11
|
+
"detail": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["metadata", "card", "excerpt", "range", "full"],
|
|
14
|
+
"default": "excerpt"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -32,6 +32,39 @@
|
|
|
32
32
|
},
|
|
33
33
|
"diagnostics": {
|
|
34
34
|
"type": "object"
|
|
35
|
+
},
|
|
36
|
+
"receipt": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": [
|
|
40
|
+
"chars",
|
|
41
|
+
"estimated_tokens",
|
|
42
|
+
"sources_considered",
|
|
43
|
+
"sources_included",
|
|
44
|
+
"sources_deferred"
|
|
45
|
+
],
|
|
46
|
+
"properties": {
|
|
47
|
+
"chars": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 0
|
|
50
|
+
},
|
|
51
|
+
"estimated_tokens": {
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"minimum": 0
|
|
54
|
+
},
|
|
55
|
+
"sources_considered": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"minimum": 0
|
|
58
|
+
},
|
|
59
|
+
"sources_included": {
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"minimum": 0
|
|
62
|
+
},
|
|
63
|
+
"sources_deferred": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 0
|
|
66
|
+
}
|
|
67
|
+
}
|
|
35
68
|
}
|
|
36
69
|
}
|
|
37
70
|
}
|
|
@@ -4,19 +4,74 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
6
|
"title": "RetrievalQuery",
|
|
7
|
-
"required": [
|
|
7
|
+
"required": [
|
|
8
|
+
"text"
|
|
9
|
+
],
|
|
8
10
|
"properties": {
|
|
9
|
-
"text": {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
11
|
+
"text": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1
|
|
14
|
+
},
|
|
15
|
+
"workspace_id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1,
|
|
18
|
+
"deprecated": true,
|
|
19
|
+
"description": "Legacy compatibility metadata only; repository selection is explicit through repository identity."
|
|
20
|
+
},
|
|
21
|
+
"repositories": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"product_ids": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"refs": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"intent": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"default": "auto"
|
|
42
|
+
},
|
|
43
|
+
"lanes": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"top_k": {
|
|
50
|
+
"type": "integer",
|
|
51
|
+
"minimum": 1,
|
|
52
|
+
"maximum": 8,
|
|
53
|
+
"default": 8
|
|
54
|
+
},
|
|
55
|
+
"token_budget": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"minimum": 256,
|
|
58
|
+
"default": 6000,
|
|
59
|
+
"maximum": 6000
|
|
60
|
+
},
|
|
61
|
+
"require_current_ref": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": true
|
|
64
|
+
},
|
|
65
|
+
"include_archived": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"default": false
|
|
68
|
+
},
|
|
69
|
+
"explain": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"default": true
|
|
72
|
+
},
|
|
73
|
+
"result_policy": {
|
|
74
|
+
"$ref": "../context/result-policy.schema.json"
|
|
75
|
+
}
|
|
21
76
|
}
|
|
22
77
|
}
|