@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
|
@@ -43,6 +43,7 @@ export {
|
|
|
43
43
|
export * from './core/index.js';
|
|
44
44
|
export * from './core/constants.js';
|
|
45
45
|
export { DEFAULT_COMPANY_ID, DEFAULT_COMPANY_SLUG, normalizeCompanyRow } from './contracts/company.js';
|
|
46
|
+
export * from './contracts/auth-config.js';
|
|
46
47
|
export { createPasswordResetService } from './recovery/password-reset.js';
|
|
47
48
|
export {
|
|
48
49
|
finalizeInboundOAuth,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| Developer Google | `GOOGLE_CLIENT_ID` + `GOOGLE_CLIENT_SECRET` | Takes `/api/oauth/google/start` when set |
|
|
7
7
|
| Developer GitHub | `GITHUB_CLIENT_ID` + `GITHUB_CLIENT_SECRET` | Takes `/api/oauth/github/start` when set |
|
|
8
8
|
|
|
9
|
-
Optional: `
|
|
9
|
+
Optional: `IAM_ORIGIN` (default `https://inneranimalmedia.com`).
|
|
10
10
|
|
|
11
11
|
## Secrets law
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ Register IAM redirect URI: `https://<customer-host>/api/oauth/iam/callback`
|
|
|
30
30
|
|
|
31
31
|
## IAM authorization server endpoints (issuer)
|
|
32
32
|
|
|
33
|
-
The customer worker redirects users to the **issuer** (`
|
|
33
|
+
The customer worker redirects users to the **issuer** (`IAM_ORIGIN`, default production IAM):
|
|
34
34
|
|
|
35
35
|
| Step | Endpoint |
|
|
36
36
|
|------|----------|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DEFAULT_IAM_ORIGIN, resolveIamOrigin } from '../contracts/auth-config.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* OAuth credential lanes for customer apps.
|
|
3
5
|
*
|
|
@@ -9,20 +11,22 @@
|
|
|
9
11
|
* take the /api/oauth/{provider}/start button; otherwise the button uses IAM.
|
|
10
12
|
*/
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
/** @deprecated Use DEFAULT_IAM_ORIGIN from the auth configuration contract. */
|
|
15
|
+
export const DEFAULT_IAM_OAUTH_ISSUER = DEFAULT_IAM_ORIGIN;
|
|
13
16
|
export const IAM_PLATFORM_STATE_PROVIDER = 'iam_platform';
|
|
14
17
|
export const IAM_PLATFORM_CALLBACK_PATH = '/api/oauth/iam/callback';
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
20
|
* @param {Record<string, unknown> | null | undefined} env
|
|
18
|
-
* @returns {{ clientId: string, clientSecret: string, issuer: string } | null}
|
|
21
|
+
* @returns {{ clientId: string, clientSecret: string, origin: string, issuer: string } | null}
|
|
19
22
|
*/
|
|
20
23
|
export function resolveIamPlatformCredentials(env) {
|
|
21
24
|
const clientId = String(env?.IAM_CLIENT_ID || '').trim();
|
|
22
25
|
const clientSecret = String(env?.IAM_CLIENT_SECRET || '').trim();
|
|
23
26
|
if (!clientId || !clientSecret) return null;
|
|
24
|
-
const
|
|
25
|
-
|
|
27
|
+
const origin = resolveIamOrigin(env);
|
|
28
|
+
// `issuer` remains for one migration window so existing consumers do not break.
|
|
29
|
+
return { clientId, clientSecret, origin, issuer: origin };
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
/** @param {Record<string, unknown> | null | undefined} env */
|
|
@@ -43,6 +47,7 @@ export function requireIamPlatformCredentials(env) {
|
|
|
43
47
|
* lane: 'iam_platform' | 'byok_google' | 'byok_github',
|
|
44
48
|
* clientId: string,
|
|
45
49
|
* clientSecret: string,
|
|
50
|
+
* origin?: string,
|
|
46
51
|
* issuer?: string,
|
|
47
52
|
* provider: string,
|
|
48
53
|
* } | null}
|
|
@@ -55,6 +60,7 @@ export function resolveOAuthCredentialLane(env, provider) {
|
|
|
55
60
|
lane: 'iam_platform',
|
|
56
61
|
clientId: iam.clientId,
|
|
57
62
|
clientSecret: iam.clientSecret,
|
|
63
|
+
origin: iam.origin,
|
|
58
64
|
issuer: iam.issuer,
|
|
59
65
|
provider: 'iam',
|
|
60
66
|
};
|
|
@@ -83,6 +89,7 @@ export function resolveOAuthCredentialLane(env, provider) {
|
|
|
83
89
|
lane: 'iam_platform',
|
|
84
90
|
clientId: iam.clientId,
|
|
85
91
|
clientSecret: iam.clientSecret,
|
|
92
|
+
origin: iam.origin,
|
|
86
93
|
issuer: iam.issuer,
|
|
87
94
|
provider,
|
|
88
95
|
};
|
|
@@ -42,7 +42,7 @@ export async function iamPlatformOAuthStart(request, env, adapter) {
|
|
|
42
42
|
|
|
43
43
|
const redirectUri = `${url.origin}${IAM_PLATFORM_CALLBACK_PATH}`;
|
|
44
44
|
const authUrl = getIamAuthUrl({
|
|
45
|
-
|
|
45
|
+
origin: creds.origin,
|
|
46
46
|
clientId: creds.clientId,
|
|
47
47
|
redirectUri,
|
|
48
48
|
state,
|
|
@@ -80,7 +80,7 @@ export async function iamPlatformOAuthCallback(request, env, adapter, identity)
|
|
|
80
80
|
|
|
81
81
|
const redirectUri = `${url.origin}${IAM_PLATFORM_CALLBACK_PATH}`;
|
|
82
82
|
const token = await exchangeIamCode({
|
|
83
|
-
|
|
83
|
+
origin: creds.origin,
|
|
84
84
|
clientId: creds.clientId,
|
|
85
85
|
clientSecret: creds.clientSecret,
|
|
86
86
|
code,
|
|
@@ -92,7 +92,7 @@ export async function iamPlatformOAuthCallback(request, env, adapter, identity)
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
const profile = await fetchIamProfile({
|
|
95
|
-
|
|
95
|
+
origin: creds.origin,
|
|
96
96
|
accessToken: token.access_token,
|
|
97
97
|
});
|
|
98
98
|
const normalized = profile ? normalizeIamIdentity(profile) : null;
|
|
@@ -9,18 +9,18 @@ import {
|
|
|
9
9
|
} from './oauth.js';
|
|
10
10
|
import { fetchIamProfile } from './profile.js';
|
|
11
11
|
import { normalizeIamIdentity } from './mapper.js';
|
|
12
|
-
import {
|
|
12
|
+
import { DEFAULT_IAM_ORIGIN } from '../../contracts/auth-config.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {string} [
|
|
15
|
+
* @param {string} [origin]
|
|
16
16
|
*/
|
|
17
|
-
export function createIamIdentityProvider(
|
|
18
|
-
const
|
|
17
|
+
export function createIamIdentityProvider(origin = DEFAULT_IAM_ORIGIN) {
|
|
18
|
+
const resolvedOrigin = String(origin || DEFAULT_IAM_ORIGIN).replace(/\/+$/, '');
|
|
19
19
|
return createIdentityProvider({
|
|
20
20
|
id: 'iam',
|
|
21
|
-
authorizeUrl: (input) => getIamAuthUrl({ ...input,
|
|
22
|
-
exchangeCode: (input) => exchangeIamCode({ ...input,
|
|
23
|
-
getProfile: (accessToken) => fetchIamProfile({
|
|
21
|
+
authorizeUrl: (input) => getIamAuthUrl({ ...input, origin: resolvedOrigin }),
|
|
22
|
+
exchangeCode: (input) => exchangeIamCode({ ...input, origin: resolvedOrigin }),
|
|
23
|
+
getProfile: (accessToken) => fetchIamProfile({ origin: resolvedOrigin, accessToken }),
|
|
24
24
|
normalizeIdentity: normalizeIamIdentity,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -3,14 +3,15 @@ export const IAM_IDENTITY_TOKEN_PATH = '/api/oauth/identity/token';
|
|
|
3
3
|
export const IAM_IDENTITY_USERINFO_PATH = '/api/oauth/identity/userinfo';
|
|
4
4
|
export const IAM_DEFAULT_OIDC_SCOPE = 'openid profile email';
|
|
5
5
|
|
|
6
|
-
function
|
|
7
|
-
return String(issuer || '').replace(/\/+$/, '');
|
|
6
|
+
function normalizeOrigin(origin, issuer) {
|
|
7
|
+
return String(origin || issuer || '').replace(/\/+$/, '');
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @param {import('../../provider-contract.js').OAuthAuthorizeInput & { issuer: string }} input
|
|
12
12
|
*/
|
|
13
13
|
export function getIamAuthUrl({
|
|
14
|
+
origin,
|
|
14
15
|
issuer,
|
|
15
16
|
clientId,
|
|
16
17
|
redirectUri,
|
|
@@ -18,7 +19,7 @@ export function getIamAuthUrl({
|
|
|
18
19
|
codeChallenge,
|
|
19
20
|
scope,
|
|
20
21
|
} = {}) {
|
|
21
|
-
const base =
|
|
22
|
+
const base = normalizeOrigin(origin, issuer);
|
|
22
23
|
const url = new URL(`${base}${IAM_IDENTITY_AUTHORIZE_PATH}`);
|
|
23
24
|
url.searchParams.set('client_id', clientId || '');
|
|
24
25
|
url.searchParams.set('redirect_uri', redirectUri || '');
|
|
@@ -36,6 +37,7 @@ export function getIamAuthUrl({
|
|
|
36
37
|
* @param {import('../../provider-contract.js').OAuthExchangeInput & { issuer: string }} input
|
|
37
38
|
*/
|
|
38
39
|
export async function exchangeIamCode({
|
|
40
|
+
origin,
|
|
39
41
|
issuer,
|
|
40
42
|
code,
|
|
41
43
|
codeVerifier,
|
|
@@ -44,7 +46,7 @@ export async function exchangeIamCode({
|
|
|
44
46
|
redirectUri,
|
|
45
47
|
}) {
|
|
46
48
|
try {
|
|
47
|
-
const base =
|
|
49
|
+
const base = normalizeOrigin(origin, issuer);
|
|
48
50
|
const body = new URLSearchParams();
|
|
49
51
|
body.set('grant_type', 'authorization_code');
|
|
50
52
|
body.set('code', code || '');
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { IAM_IDENTITY_USERINFO_PATH } from './oauth.js';
|
|
2
2
|
|
|
3
|
-
function
|
|
4
|
-
return String(issuer || '').replace(/\/+$/, '');
|
|
3
|
+
function normalizeOrigin(origin, issuer) {
|
|
4
|
+
return String(origin || issuer || '').replace(/\/+$/, '');
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @param {{ issuer
|
|
8
|
+
* @param {{ origin?: string, issuer?: string, accessToken: string }} input
|
|
9
9
|
*/
|
|
10
|
-
export async function fetchIamProfile({ issuer, accessToken }) {
|
|
10
|
+
export async function fetchIamProfile({ origin, issuer, accessToken }) {
|
|
11
11
|
try {
|
|
12
|
-
const base =
|
|
12
|
+
const base = normalizeOrigin(origin, issuer);
|
|
13
13
|
const res = await fetch(`${base}${IAM_IDENTITY_USERINFO_PATH}`, {
|
|
14
14
|
headers: { Authorization: `Bearer ${accessToken}` },
|
|
15
15
|
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { describe, it } from 'node:test';
|
|
3
|
+
import {
|
|
4
|
+
AGENTSAM_AUTH_CONTRACT,
|
|
5
|
+
buildSdkAuthorizationHeaders,
|
|
6
|
+
resolveBridgeKey,
|
|
7
|
+
resolveIamOrigin,
|
|
8
|
+
resolveSdkKey,
|
|
9
|
+
} from '../src/contracts/auth-config.js';
|
|
10
|
+
|
|
11
|
+
describe('auth configuration contract', () => {
|
|
12
|
+
it('prefers canonical IAM_OAUTH_ISSUER over IAM_ORIGIN', () => {
|
|
13
|
+
assert.equal(
|
|
14
|
+
resolveIamOrigin({
|
|
15
|
+
IAM_ORIGIN: 'https://legacy.example.test/',
|
|
16
|
+
IAM_OAUTH_ISSUER: 'https://canonical.example.test/',
|
|
17
|
+
}),
|
|
18
|
+
'https://canonical.example.test',
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('accepts IAM_ORIGIN as migration-only fallback', () => {
|
|
23
|
+
assert.equal(
|
|
24
|
+
resolveIamOrigin({ IAM_ORIGIN: 'https://legacy.example.test/' }),
|
|
25
|
+
'https://legacy.example.test',
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('defaults issuer when neither IAM_OAUTH_ISSUER nor IAM_ORIGIN exists', () => {
|
|
30
|
+
assert.equal(resolveIamOrigin({}), 'https://inneranimalmedia.com');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('prefers AGENTSAM_SDK_KEY over AGENTSAM_SDK_TOKEN', () => {
|
|
34
|
+
assert.equal(
|
|
35
|
+
resolveSdkKey({
|
|
36
|
+
AGENTSAM_SDK_KEY: 'sdk_new',
|
|
37
|
+
AGENTSAM_SDK_TOKEN: 'sdk_old',
|
|
38
|
+
}),
|
|
39
|
+
'sdk_new',
|
|
40
|
+
);
|
|
41
|
+
assert.equal(resolveSdkKey({ AGENTSAM_SDK_TOKEN: 'sdk_old' }), 'sdk_old');
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('never aliases bridge machine trust to a user SDK key', () => {
|
|
45
|
+
assert.equal(
|
|
46
|
+
resolveBridgeKey({ AGENTSAM_BRIDGE_KEY: 'bridge_machine', AGENTSAM_SDK_KEY: 'sdk_user' }),
|
|
47
|
+
'bridge_machine',
|
|
48
|
+
);
|
|
49
|
+
assert.equal(resolveBridgeKey({ AGENTSAM_SDK_KEY: 'sdk_user' }), '');
|
|
50
|
+
assert.equal(AGENTSAM_AUTH_CONTRACT.bridge.userAuth, false);
|
|
51
|
+
assert.equal(AGENTSAM_AUTH_CONTRACT.bridge.sdkTokenType, 'integration');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('builds Bearer authorization only for sdk_ keys', () => {
|
|
55
|
+
assert.deepEqual(buildSdkAuthorizationHeaders('sdk_abc', { Accept: 'application/json' }), {
|
|
56
|
+
Accept: 'application/json',
|
|
57
|
+
Authorization: 'Bearer sdk_abc',
|
|
58
|
+
});
|
|
59
|
+
assert.throws(() => buildSdkAuthorizationHeaders('bridge_machine'), /AGENTSAM_SDK_KEY_required/);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -46,12 +46,23 @@ describe('oauth credentials', () => {
|
|
|
46
46
|
assert.equal(resolveOAuthCredentialLane(env, 'iam')?.lane, 'iam_platform');
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
it('
|
|
49
|
+
it('prefers IAM_OAUTH_ISSUER and exposes issuer as the canonical authority', () => {
|
|
50
|
+
const creds = resolveIamPlatformCredentials({
|
|
51
|
+
IAM_CLIENT_ID: 'c',
|
|
52
|
+
IAM_CLIENT_SECRET: 's',
|
|
53
|
+
IAM_ORIGIN: 'https://legacy.example.test/',
|
|
54
|
+
IAM_OAUTH_ISSUER: 'https://iam.example.test/',
|
|
55
|
+
});
|
|
56
|
+
assert.equal(creds?.origin, 'https://iam.example.test');
|
|
57
|
+
assert.equal(creds?.issuer, 'https://iam.example.test');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('accepts IAM_ORIGIN only as a migration fallback', () => {
|
|
50
61
|
const creds = resolveIamPlatformCredentials({
|
|
51
62
|
IAM_CLIENT_ID: 'c',
|
|
52
63
|
IAM_CLIENT_SECRET: 's',
|
|
53
64
|
IAM_OAUTH_ISSUER: 'https://staging.inneranimalmedia.com/',
|
|
54
65
|
});
|
|
55
|
-
assert.equal(creds?.
|
|
66
|
+
assert.equal(creds?.origin, 'https://staging.inneranimalmedia.com');
|
|
56
67
|
});
|
|
57
68
|
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# AgentSam file metadata format, version 1
|
|
2
|
+
|
|
3
|
+
`agentsam-filemeta` is a deterministic semantic companion to the content-only `agentsam-merkle` protocol. It does **not** replace or extend the content Merkle root. A repository can therefore have the same `merkle_root` and a different `metadata_root` when permissions, classification rules, package metadata, or parser metadata change without changing file bytes or relative paths.
|
|
4
|
+
|
|
5
|
+
## Envelope
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"format": "agentsam-filemeta",
|
|
10
|
+
"version": 1,
|
|
11
|
+
"algorithm": "sha256",
|
|
12
|
+
"classifier": {
|
|
13
|
+
"format": "agentsam-filemeta",
|
|
14
|
+
"version": 1,
|
|
15
|
+
"source": "path+package+ast+execution-boundary",
|
|
16
|
+
"trust_boundary": "execution-domain-v1",
|
|
17
|
+
"ast_parser": "typescript",
|
|
18
|
+
"ast_parser_version": "5.9.3"
|
|
19
|
+
},
|
|
20
|
+
"rootHash": "sha256:...",
|
|
21
|
+
"stats": {},
|
|
22
|
+
"entries": []
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`rootHash` is SHA-256 over the canonical semantic envelope payload using the domain prefix `agentsam-filemeta:root:v1\0`. Object keys are recursively sorted; entry order is sorted by unsigned UTF-8 bytes of `path`. The hashed payload contains `classifier` plus the full semantic `entries` array. Summary `stats` are intentionally outside the metadata root.
|
|
27
|
+
|
|
28
|
+
## File records
|
|
29
|
+
|
|
30
|
+
Semantic entries correspond one-for-one with non-directory content entries and retain their content linkage:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"path": "packages/identity/src/core/accounts.js",
|
|
35
|
+
"type": "file",
|
|
36
|
+
"size": 213,
|
|
37
|
+
"mode": 420,
|
|
38
|
+
"hash": "sha256:...",
|
|
39
|
+
"package": "@inneranimalmedia/agentsam-sdk-identity",
|
|
40
|
+
"package_root": "packages/identity",
|
|
41
|
+
"package_kind": "library",
|
|
42
|
+
"system": "identity",
|
|
43
|
+
"category": "accounts",
|
|
44
|
+
"layer": "core",
|
|
45
|
+
"kind": "source",
|
|
46
|
+
"language": "javascript",
|
|
47
|
+
"role": "business-logic",
|
|
48
|
+
"execution_domain": "unknown",
|
|
49
|
+
"tags": ["account-scoped", "authentication"],
|
|
50
|
+
"symbols": ["accountLinkingNotConfigured"],
|
|
51
|
+
"imports": [],
|
|
52
|
+
"resolved_imports": [],
|
|
53
|
+
"env_accesses": [],
|
|
54
|
+
"ast": {
|
|
55
|
+
"indexed": true,
|
|
56
|
+
"parser": "typescript",
|
|
57
|
+
"symbol_count": 1,
|
|
58
|
+
"dependency_count": 0,
|
|
59
|
+
"env_access_count": 0,
|
|
60
|
+
"parse_error_count": 0
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`hash` is the content Merkle entry hash and `size` must match the linked content entry. `mode` is the observed Unix permission bits in decimal. Semantic metadata is derived by convention from repository/package paths, nearest `package.json` metadata, and syntax parsing. JavaScript/TypeScript-family source files up to the implementation size limit receive AST symbol/import metadata, local import-resolution evidence, and environment-variable access names. Values are never read or stored. `execution_domain` classifies observed code as `browser`, `server`, `shared`, `test`, `tooling`, `framework`, or `unknown`; the trust-boundary analyzer consumes these Merkle-bound facts rather than treating directory names as security authority.
|
|
66
|
+
|
|
67
|
+
## Package overrides
|
|
68
|
+
|
|
69
|
+
A package may declare stable package-level semantics without tagging every file:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"name": "@inneranimalmedia/agentsam-sdk-identity",
|
|
74
|
+
"agentsam": {
|
|
75
|
+
"system": "identity",
|
|
76
|
+
"kind": "library",
|
|
77
|
+
"tags": ["authentication", "account-scoped"],
|
|
78
|
+
"classify": [
|
|
79
|
+
{ "glob": "src/core/**", "role": "business-logic" },
|
|
80
|
+
{ "glob": "src/lib/db.ts", "execution_domain": "server", "tags": ["server-only"] }
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Convention remains the default. `agentsam.classify` is an optional deterministic override layer for exceptional package layouts such as framework-owned server-function bridges or server-only modules that physically live beneath a frontend package. Overrides are themselves hashed into the metadata root through the resulting semantic entries/classifier contract; they do not weaken the client/server rule.
|
|
87
|
+
|
|
88
|
+
## Identity boundary
|
|
89
|
+
|
|
90
|
+
The two roots answer different questions:
|
|
91
|
+
|
|
92
|
+
- `agentsam-merkle` `rootHash`: did included relative names, file bytes, or literal symlink targets change?
|
|
93
|
+
- `agentsam-filemeta` `rootHash`: did the semantic/index view of those content entries change?
|
|
94
|
+
|
|
95
|
+
A classifier or parser upgrade may change only the metadata root. A permission-only change may change only the metadata root. A file-byte change normally changes both.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# AgentSam Inspect Views v1
|
|
2
|
+
|
|
3
|
+
`repository.snapshot` remains the canonical deterministic repository evidence envelope. Its three independent repository identities remain unchanged:
|
|
4
|
+
|
|
5
|
+
- `tree.merkle_root` — content identity (paths, bytes, symlink targets)
|
|
6
|
+
- `tree.manifest.policy_hash` — capture-scope identity
|
|
7
|
+
- `tree.metadata_root` — `agentsam-filemeta/v1` semantic metadata identity
|
|
8
|
+
|
|
9
|
+
Inspect views are **derived projections**, not new repository identities. A projection carries the canonical `snapshot_id`, `content_hash`, and three roots unchanged and adds a separate `projection.projection_hash` for the bounded view itself.
|
|
10
|
+
|
|
11
|
+
## Agent routing flow
|
|
12
|
+
|
|
13
|
+
Start with a small facet index instead of injecting every file record. The CLI defaults to this bounded index view; `--view full` is explicit:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
agentsam inspect --cwd . --json
|
|
17
|
+
agentsam inspect --cwd . --view full --json # persistence/verification only
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
For repeated agent turns, capture the canonical snapshot once and reuse it. This avoids repeating Merkle + AST + repository-intelligence work while preserving the exact same canonical identities:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
agentsam inspect --cwd . --save-snapshot /tmp/repository.snapshot.json --json
|
|
24
|
+
agentsam inspect --cwd . --snapshot-file /tmp/repository.snapshot.json \
|
|
25
|
+
--view files --system identity --tag authentication --limit 40 --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then request only the likely feature surface:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
agentsam inspect --cwd . --view files --system identity --tag authentication --limit 40 --json
|
|
32
|
+
agentsam inspect --cwd . --view files --system cms-frontend --category cms-editor --json
|
|
33
|
+
agentsam inspect --cwd . --view files --path 'packages/agentsam-workbench/**' --match terminal --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Supported selectors are `system`, `package`, `category`, `layer`, `kind`, `language`, `role`, `tag`, `path`, `symbol`, `import`, and `match`. Different selector classes are ANDed; repeated values within one selector class are alternatives. `--match` terms are all required and are tested against routing metadata, paths, tags, symbols, and imports.
|
|
37
|
+
|
|
38
|
+
`--view files` returns compact routing records and never changes `metadata_root`. Use `--view full` when a persistence or verification lane genuinely needs the full canonical evidence envelope.
|
|
39
|
+
|
|
40
|
+
Machine JSON is compact by default. `--pretty` is presentation-only and never changes any repository identity.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# AgentSam Merkle Persistence v1
|
|
2
|
+
|
|
3
|
+
Persistence is a host concern layered on top of the portable Merkle protocol. The SDK exposes the canonical table name, storage prefix, logical asset binding, storage-key helper, and portable SQL schema without owning a customer's database or cloud credentials.
|
|
4
|
+
|
|
5
|
+
## Authority split
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
root_hash = filesystem/content authority
|
|
9
|
+
metadata_root = semantic/index authority
|
|
10
|
+
policy_hash = capture-scope authority
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
None replaces another.
|
|
14
|
+
|
|
15
|
+
The canonical optional index table is `agentsam_fs_merkle_snapshots`. Full snapshot documents are stored beneath the provider-neutral prefix `agentsam_fs_merkle_snapshots/`.
|
|
16
|
+
|
|
17
|
+
For Cloudflare presets the logical R2 role is `WEBSITE_ASSETS`. The generated/hosting application decides which physical bucket is bound to that role. A customer may therefore bind their own bucket without changing SDK code:
|
|
18
|
+
|
|
19
|
+
```toml
|
|
20
|
+
[[r2_buckets]]
|
|
21
|
+
binding = "WEBSITE_ASSETS"
|
|
22
|
+
bucket_name = "customer-selected-bucket"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
A host with dynamic or non-Cloudflare storage may inject its own storage adapter instead. The SDK must not infer user identity, account authority, bucket credentials, or deployment identity.
|
|
26
|
+
|
|
27
|
+
Typical keys are:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
agentsam_fs_merkle_snapshots/<owner>/<repo>/<snapshot>.json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`storage_bucket` records the actual physical destination selected by the host; `storage_key` records the object key. D1/SQLite is the searchable index, not the blob store.
|
|
34
|
+
|
|
35
|
+
## CLI publication
|
|
36
|
+
|
|
37
|
+
Create the semantic snapshot once, then publish that exact file through the host's logical bindings:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
agentsam merkle snapshot . --semantic --out .agentsam/merkle.json
|
|
41
|
+
agentsam merkle persist .agentsam/merkle.json \
|
|
42
|
+
--wrangler-config path/to/wrangler.toml \
|
|
43
|
+
--owner-user-id "$AGENTSAM_OWNER_USER_ID" \
|
|
44
|
+
--capture-kind deploy \
|
|
45
|
+
--deployment-id "$DEPLOYMENT_ID"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`agentsam merkle persist` resolves `WEBSITE_ASSETS` and `DB` from the selected Wrangler config. It never hard-codes a customer's bucket or database and never invents `owner_user_id`. `--dry-run` emits the resolved R2 key and D1 row without writes; `--r2-only` is available when the host intentionally does not maintain the index table.
|
|
49
|
+
|
|
50
|
+
The canonical `agentsam-sdk` Worker binds `WEBSITE_ASSETS` to `agentsam-os-blueprint-content` for the SDK's own development/deployment snapshots. That physical name is an installation choice, not part of the portable protocol; generated/customer Workers should bind `WEBSITE_ASSETS` to their selected bucket while retaining the `agentsam_fs_merkle_snapshots/` object namespace.
|
package/protocol/MERKLE_V1.md
CHANGED
|
@@ -14,7 +14,9 @@ A directory payload is `[[name,type,hash],...]`, sorted by unsigned UTF-8 bytes
|
|
|
14
14
|
|
|
15
15
|
Empty non-root directories and ignored entries are omitted. The root is always a directory node, whose path is the empty string. Node paths use `/` between components, are unique, and cannot contain absolute paths, `.`/`..` segments, NUL, backslashes, or drive prefixes. Filenames/targets must round-trip through UTF-8.
|
|
16
16
|
|
|
17
|
-
A manifest contains `format: "agentsam-merkle"`, `version: 1`, `algorithm: "sha256"`, `rootPath`, `createdAt`, `policy: {include, exclude}`, `rootHash`, `stats`, and a sorted `entries` array. File entries add byte `size`; symlink entries add `target`. Absolute root paths, timestamps, file sizes, and summary stats are metadata outside the root digest. Content hash and size are both recomputed when scanning; loading recomputes summary stats and validates parent relationships and directory hashes. Snapshot loading does not re-read file contents.
|
|
17
|
+
A manifest contains `format: "agentsam-merkle"`, `version: 1`, `algorithm: "sha256"`, `rootPath`, `createdAt`, `policy: {include, exclude}`, `policyHash`, `rootHash`, `stats`, and a sorted `entries` array. File entries add byte `size`; symlink entries add `target`. Entries may also carry decimal Unix permission bits as `mode` (for example `420` = octal `0644`). `mode` is observational metadata and is **not** included in file, symlink, directory, or root digests, so permission-only changes do not change `rootHash`. Older v1 manifests without `mode` or `policyHash` remain valid; loaders deterministically recompute `policyHash` from the normalized policy. Absolute root paths, timestamps, file sizes, modes, and summary stats are metadata outside the root digest. Content hash and size are both recomputed when scanning; loading recomputes summary stats and validates parent relationships and directory hashes. Snapshot loading does not re-read file contents.
|
|
18
|
+
|
|
19
|
+
A v1 manifest may also contain an optional `semantic` envelope whose identity is separately defined by `agentsam-filemeta`; it is never an input to `rootHash`. See [FILEMETA_V1](./FILEMETA_V1.md).
|
|
18
20
|
|
|
19
21
|
The ignore defaults are fixed for version 1 as documented in docs/MERKLE.md. Consumers must compare equivalent policies; an excluded file is outside the integrity claim. A manifest is not signed. Validation checks structure and hash consistency, not baseline authorship. Different line endings or relative names produce different roots even if editors display equivalent text.
|
|
20
22
|
|
package/protocol/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Platform repositories may consume the SDK, provide host adapters, or incubate pr
|
|
|
12
12
|
4. **Contracts travel with the SDK.** Shared schemas and protocol definitions live under `protocol/` and are versioned with the code that consumes them.
|
|
13
13
|
5. **No copied package trees.** Do not duplicate `protocol/`, `agentsam_sdk/`, or package source under another path in this repository or another repository merely to keep two homes in sync.
|
|
14
14
|
6. **Repository tools observe before they prescribe.** Generic repository intelligence must accept an explicit repo root, be read-only by default, and must not hardcode one repository's folder names, tenant IDs, workspace IDs, providers, or framework layout.
|
|
15
|
+
7. **Model facts have one authority chain.** `/models`, CLI JSON, runtime selection, and usage receipts must follow the normative model SSOT contract in `protocol/models/README.md`; provider facts retain authoritative provenance while AgentSam recommendations remain separate policy.
|
|
15
16
|
|
|
16
17
|
## Layout
|
|
17
18
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/capabilities/cloudflare-cpu-audit-input.schema.json",
|
|
4
|
+
"title": "cloudflare.cpu.audit input",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["file"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"cwd": { "type": "string", "minLength": 1 },
|
|
10
|
+
"file": { "type": "string", "minLength": 1 },
|
|
11
|
+
"sources": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"maxItems": 12,
|
|
14
|
+
"items": { "type": "string", "minLength": 1 }
|
|
15
|
+
},
|
|
16
|
+
"maxFrames": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
17
|
+
"maxSourceChars": { "type": "integer", "minimum": 1000, "maximum": 64000, "default": 24000 }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/capabilities/cloudflare-cpu-profile-input.schema.json",
|
|
4
|
+
"title": "cloudflare.cpu.profile input",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["file"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"cwd": { "type": "string", "minLength": 1 },
|
|
10
|
+
"file": { "type": "string", "minLength": 1 },
|
|
11
|
+
"maxFrames": { "type": "integer", "minimum": 1, "maximum": 100 }
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/capabilities/cloudflare-wrangler-native-input.schema.json",
|
|
4
|
+
"title": "cloudflare.wrangler.native input",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["command"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"command": { "enum": ["whoami", "deployments.list", "versions.list", "types.check", "queues.list"] },
|
|
10
|
+
"cwd": { "type": "string", "minLength": 1 },
|
|
11
|
+
"name": { "type": "string" },
|
|
12
|
+
"account": { "type": "string" },
|
|
13
|
+
"config": { "type": "string" },
|
|
14
|
+
"env": { "type": "string" },
|
|
15
|
+
"profile": { "type": "string" },
|
|
16
|
+
"path": { "type": "string" },
|
|
17
|
+
"page": { "type": "integer", "minimum": 1 }
|
|
18
|
+
}
|
|
19
|
+
}
|