@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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# `agentsam-sdk` Cloudflare application
|
|
2
|
+
|
|
3
|
+
The SDK repository root owns package/tooling concerns. Each deployable product under `apps/` owns its own runtime. For Local Studio, the production Cloudflare application is owned by `apps/local-studio/backend/`.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
agentsam-sdk/
|
|
7
|
+
├─ package.json
|
|
8
|
+
├─ package-lock.json
|
|
9
|
+
├─ packages/...
|
|
10
|
+
└─ apps/local-studio/
|
|
11
|
+
├─ package.json
|
|
12
|
+
├─ package-lock.json
|
|
13
|
+
├─ frontend/package.json
|
|
14
|
+
├─ backend/
|
|
15
|
+
│ ├─ package.json
|
|
16
|
+
│ ├─ wrangler.jsonc
|
|
17
|
+
│ ├─ worker/
|
|
18
|
+
│ │ └─ index.js checked-in Worker authority
|
|
19
|
+
│ └─ server/ Nitro routes/runtime modules
|
|
20
|
+
└─ shared/agentsam/package.json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`backend/worker/index.js` is the stable Cloudflare entrypoint and imports the generated Nitro handler from `../../.output/server/index.mjs`. `backend/wrangler.jsonc` therefore points to `worker/index.js`; assets remain generated under `../.output/public`.
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
main = worker/index.js
|
|
27
|
+
assets.directory = ../.output/public
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Run installs from `apps/local-studio/` with its committed lockfile:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npm ci
|
|
34
|
+
npm run build
|
|
35
|
+
npm run cf:verify-output
|
|
36
|
+
npm run cf:dry-run
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Production uses only `https://agentsam.inneranimalmedia.com`; `workers_dev` is disabled. The SDK root has no production `worker/` or `wrangler.jsonc`.
|
|
40
|
+
|
|
41
|
+
## Binding contract
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
agentsam-sdk
|
|
45
|
+
├─ DB -> inneranimalmedia-business
|
|
46
|
+
├─ WEBSITE_ASSETS -> agentsam-os-blueprint-content
|
|
47
|
+
├─ AGENTSAM_WAI -> Workers AI provider
|
|
48
|
+
├─ EXECOS -> execos service binding
|
|
49
|
+
├─ PTY_SERVICE -> iam-vpc VPC service
|
|
50
|
+
├─ IAM_ORIGIN -> https://inneranimalmedia.com
|
|
51
|
+
├─ IAM_CLIENT_ID -> public OAuth client id
|
|
52
|
+
├─ IAM_CLIENT_SECRET -> secret
|
|
53
|
+
├─ AGENTSAM_SDK_KEY -> secret
|
|
54
|
+
└─ AGENTSAM_BRIDGE_KEY -> secret
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Hosted model credentials are secrets: `XAI_API_KEY`, `OPENAI_API_KEY`, and `GEMINI_API_KEY`. Grok model inference is the `XAI_API_KEY` provider lane and is independent from the pre-wired Grok gate viewer identity/session system.
|
|
58
|
+
|
|
59
|
+
`AGENTSAM_WORKER_ROLE` is not part of the SDK contract. `IAM_OAUTH_ISSUER` and `AGENTSAM_SDK_TOKEN` are SDK 2.5 migration-read aliases only; new configuration uses `IAM_ORIGIN` and `AGENTSAM_SDK_KEY`.
|
|
60
|
+
|
|
61
|
+
## Ollama
|
|
62
|
+
|
|
63
|
+
Ollama is local compute with two ways to reach it:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
CLI on developer machine
|
|
67
|
+
-> http://127.0.0.1:11434
|
|
68
|
+
|
|
69
|
+
agentsam-sdk Worker
|
|
70
|
+
-> EXECOS service binding
|
|
71
|
+
-> explicit target=local + neutral cwd (`/`)
|
|
72
|
+
-> existing local execution/tunnel fabric
|
|
73
|
+
-> http://127.0.0.1:11434
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
There is no production `OLLAMA_BASE_URL` and no public Ollama hostname. `PTY_SERVICE` remains the lower-level VPC/PTY health lane; model execution goes through ExecOS rather than bypassing the dispatcher. Ollama commands are filesystem-independent, so the ExecOS cwd defaults to portable `/`; `OLLAMA_LOCAL_CWD` can override it when needed. Default local models are `qwen2.5-coder` for chat/code and `mxbai-embed-large` for embeddings.
|
|
77
|
+
|
|
78
|
+
## Merkle persistence
|
|
79
|
+
|
|
80
|
+
Semantic deployment snapshots use the logical `WEBSITE_ASSETS` binding and the provider-neutral `agentsam_fs_merkle_snapshots/` namespace. D1 indexes the snapshot row in `agentsam_fs_merkle_snapshots`; R2 stores the full document. Customer/generated Workers keep the same logical binding and may point it at their own selected storage.
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
root_hash = content identity
|
|
84
|
+
policy_hash = capture-scope identity
|
|
85
|
+
metadata_root = semantic/index identity
|
|
86
|
+
```
|
package/docs/SECURITY.md
CHANGED
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Security scan and evidence-backed repair
|
|
2
2
|
|
|
3
|
-
AgentSam
|
|
3
|
+
AgentSam combines dependency security evidence with a deterministic execution trust-boundary analysis. `agentsam security scan` checks the npm dependency graph against OSV **and** derives browser/server/shared execution facts from the repository's AST + Merkle semantic index.
|
|
4
|
+
|
|
5
|
+
The core security rule is execution authority, not folder naming:
|
|
6
|
+
|
|
7
|
+
> Code executed on hardware controlled by the user is untrusted client code. Code executed on hardware controlled by the application operator is the trusted server boundary.
|
|
8
|
+
|
|
9
|
+
Anything sent to a browser can be read or modified. Client validation is useful UX, but authentication, authorization, ownership, prices, permissions, resource identity, and other security/correctness invariants must be re-verified by server-owned code. Secrets must never enter the browser dependency graph or public environment.
|
|
10
|
+
|
|
11
|
+
A clean scan means no findings in the checks AgentSam could completely evaluate. It is **not** a proof that an application is secure, and the local AST analyzer currently covers JavaScript/TypeScript-family source. Hosted/custom repository knowledge providers may supply richer structural evidence for additional languages.
|
|
4
12
|
|
|
5
13
|
## Commands
|
|
6
14
|
|
|
7
15
|
~~~bash
|
|
8
16
|
agentsam security scan --path .
|
|
9
17
|
agentsam security check --path . --log /tmp/deploy.log --json
|
|
10
|
-
agentsam security run --path . -- npm run build
|
|
18
|
+
agentsam security run --path . --json -- npm run build
|
|
11
19
|
agentsam security repair --path . --log /tmp/deploy.log --json
|
|
12
20
|
agentsam security repair --path . --apply --verify verify --json
|
|
13
21
|
~~~
|
|
14
22
|
|
|
15
|
-
The alias is
|
|
23
|
+
The alias is `agentsam sca`. Offline scanning still performs the deterministic AST/Merkle trust-boundary analysis, but dependency vulnerability coverage is incomplete without OSV and therefore the overall command exits 2.
|
|
16
24
|
|
|
17
|
-
The run command executes the exact argument vector after
|
|
25
|
+
The `run` command executes the exact argument vector after `--`, without a shell, captures up to 8 MiB, and checks the resulting logs, dependency graph, and source trust boundary. It preserves a failed command as a failed result. Logs are captured rather than streamed; receipts contain categories and line numbers, never raw log lines. It does not roll back a deployment already performed by that command.
|
|
18
26
|
|
|
19
27
|
## What is checked
|
|
20
28
|
|
|
29
|
+
### Dependencies and logs
|
|
30
|
+
|
|
21
31
|
- Exact npm package-lock / shrinkwrap versions 1, 2 and 3, including nested dependencies, aliases, and workspaces. npm-shrinkwrap takes precedence.
|
|
22
32
|
- Lockfile consistency with root/workspace manifest declarations and missing direct lock entries.
|
|
23
33
|
- Full paginated OSV advisories, including IDs, aliases, severity evidence, and package-specific fixed releases. Withdrawn advisories are excluded.
|
|
@@ -25,41 +35,68 @@ The run command executes the exact argument vector after "--", without a shell,
|
|
|
25
35
|
- Engine mismatches, peer conflicts, package-manager configuration warnings, audit summaries, and unclassified warnings.
|
|
26
36
|
- Experimental runtime and pip/npm update notices are explicitly informational.
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
### Execution trust boundary
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
AgentSam's semantic Merkle pass records, for indexed JS/TS files:
|
|
31
41
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
42
|
+
- content hash and metadata root;
|
|
43
|
+
- inferred/declared `execution_domain` (`browser`, `server`, `shared`, `test`, `tooling`, `framework`, `unknown`);
|
|
44
|
+
- AST imports plus resolved local import edges;
|
|
45
|
+
- names of `process.env` / `import.meta.env` accesses, never their values;
|
|
46
|
+
- parser coverage/errors.
|
|
47
|
+
|
|
48
|
+
The deterministic analyzer then follows the browser-reachable graph and reports contradictions such as:
|
|
49
|
+
|
|
50
|
+
- browser code importing server-owned modules;
|
|
51
|
+
- browser-reachable code importing Node/server-only runtime dependencies;
|
|
52
|
+
- browser code reading private server environment names;
|
|
53
|
+
- public environment names that look secret-bearing (`VITE_*`, `NEXT_PUBLIC_*`, etc. do **not** make a secret safe);
|
|
54
|
+
- shared code depending on server environment state.
|
|
55
|
+
|
|
56
|
+
Findings carry source/target hashes and the semantic `metadata_root`, so a repair can be tied to exact evidence rather than a prose guess. The same analyzer is embedded in `repository.snapshot`, so `agentsam inspect` and `agentsam security scan` do not maintain competing architecture models.
|
|
35
57
|
|
|
36
|
-
|
|
58
|
+
Framework adapters are not guessed away. Exceptional layouts can declare deterministic `agentsam.classify` rules in the nearest package manifest. For example, a server-only DB module physically located in a frontend workspace can declare `execution_domain: "server"`; a generated router/server-function bridge can declare `framework`. Tests and known build-tool config files are separately classified instead of being mistaken for shipped browser roots.
|
|
37
59
|
|
|
38
|
-
|
|
60
|
+
## Mechanical repair contract
|
|
39
61
|
|
|
40
|
-
|
|
62
|
+
Every trust-boundary finding has a deterministic repair action such as:
|
|
41
63
|
|
|
42
|
-
|
|
64
|
+
- `move-server-call-behind-api-boundary`
|
|
65
|
+
- `move-server-dependency-out-of-browser-graph`
|
|
66
|
+
- `move-secret-to-server-runtime`
|
|
67
|
+
- `split-shared-contract-from-server-implementation`
|
|
43
68
|
|
|
44
|
-
|
|
69
|
+
`agentsam security repair` includes these in its plan with the exact evidence refs. They are deliberately `automatic: false` today. Moving an application boundary can change behavior, so AgentSam does not blindly rewrite architecture and claim success.
|
|
70
|
+
|
|
71
|
+
The reliable automatic-repair target is an isolated-worktree workflow: capture the Merkle/metadata baseline, apply a bounded recipe, rebuild/retest, create a fresh semantic snapshot, prove the contradiction disappeared without introducing new ones, and return a before/after receipt. Dependency repair already uses this isolated verified pattern; source-boundary repair will only become automatic when a recipe can satisfy the same proof standard.
|
|
72
|
+
|
|
73
|
+
## Dependency repair
|
|
74
|
+
|
|
75
|
+
Dependency repair produces a plan by default. Applying requires an online complete dependency scan, a clean Git repository root, and an existing npm verification script (`verify`, otherwise `test`, or explicit `--verify SCRIPT`). Automated dependency repair currently requires macOS/Linux; Windows can scan and triage.
|
|
76
|
+
|
|
77
|
+
The command creates a new `agentsam/security-*` branch and worktree under the system temporary directory, leaving the source checkout untouched. It:
|
|
45
78
|
|
|
46
79
|
1. Runs npm audit fix with package-lock-only, ignore-scripts, force=false and legacy-peer-deps=false.
|
|
47
80
|
2. For deprecated dependencies, also runs npm update within existing declared ranges, with scripts disabled and no manifest saving.
|
|
48
81
|
3. Rejects changes outside the selected lockfile and major-version changes at existing dependency paths.
|
|
49
82
|
4. Runs a fresh npm ci with install scripts disabled, then the configured verification script.
|
|
50
|
-
5. Rescans OSV and
|
|
83
|
+
5. Rescans OSV, logs, and the AST/Merkle trust boundary.
|
|
51
84
|
6. Returns a structured receipt with branch, worktree, step exit codes, before/after reports, and verified status.
|
|
52
85
|
|
|
53
|
-
A verified candidate remains available for review/commit. Failed or unresolved candidates are retained for inspection and never marked fixed.
|
|
86
|
+
A verified candidate remains available for review/commit. Failed or unresolved candidates are retained for inspection and never marked fixed. The command never force-pushes, publishes, deploys, executes instructions copied from logs/advisories, or treats an advisory's fixed version as proof of application compatibility.
|
|
54
87
|
|
|
55
|
-
|
|
88
|
+
## Coverage and exit codes
|
|
56
89
|
|
|
57
|
-
|
|
90
|
+
- **0:** complete and clean, already clean, or verified repair candidate.
|
|
91
|
+
- **1:** complete scan with unresolved findings, failed wrapped command, or manual action needed.
|
|
92
|
+
- **2:** incomplete lookup/coverage, offline dependency inventory, invalid input, or failed repair execution.
|
|
58
93
|
|
|
59
|
-
|
|
94
|
+
The npm adapter does not pretend to parse pnpm, Yarn or Bun lock formats. Missing lockfiles, unresolved/external dependencies, and mismatched workspace manifests remain explicitly incomplete. An app workspace that links packages outside its own root can still receive a complete trust-boundary result while its dependency section reports that external package coverage must be scanned at the owning repository root.
|
|
95
|
+
|
|
96
|
+
## Installed automation in this repository
|
|
60
97
|
|
|
61
|
-
|
|
98
|
+
CI and publication workflows use the same `agentsam security` implementation. The root `prepublishOnly` hook runs `npm run verify:release`, which includes the online security scan. The dependency-maintenance workflow can prepare verified lockfile repairs but does not auto-merge, publish, or deploy.
|
|
62
99
|
|
|
63
|
-
Other projects
|
|
100
|
+
Other projects can use the CLI or the exported `@inneranimalmedia/agentsam-sdk/security` API. Repository inspection also carries bounded trust-boundary analysis through `repository.snapshot`; observability/index evidence is not injected wholesale into model context.
|
|
64
101
|
|
|
65
102
|
References: [OSV query API](https://google.github.io/osv.dev/post-v1-query/), [npm audit](https://docs.npmjs.com/cli/v11/commands/npm-audit/), [npm update](https://docs.npmjs.com/cli/v11/commands/npm-update/).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Client CMS Editor
|
|
2
|
+
|
|
3
|
+
The SDK development authority for the portable CMS authoring application is now:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
apps/client-cms-editor/
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
It was imported from the Inner Animal Media mirror at `packages/client-cms-editor/` and normalized into one independent npm workspace root with `frontend/`, `backend/`, and `shared/cms/` packages. The exact donor commit is recorded in `apps/client-cms-editor/IMPORT_PROVENANCE.json`.
|
|
10
|
+
|
|
11
|
+
The full platform CMS server/domain is **not** duplicated here. It remains in `inneranimalmedia/src/core/agentsam/cms/` until that domain is deliberately extracted into reusable SDK `packages/agentsam-cms-*` packages.
|
|
12
|
+
|
|
13
|
+
CMS AgentSam UI must consume `@inneranimalmedia/agentsam-workbench` and `@inneranimalmedia/agentsam-contracts`. `CmsEditor` accepts an optional authenticated `agent` configuration; when supplied by a host it exposes the shared AgentSam surface with explicit site/page/section/block context. When the host does not supply a real adapter and principal, the editor does not fabricate an AgentSam runtime.
|
|
14
|
+
|
|
15
|
+
See `docs/CMS_STUDIO.md` for authoring/public-runtime and Cloudflare binding boundaries.
|