@darkelogix/openclaw-trusted-mode 1.0.1 → 1.0.3

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/CHANGELOG.md CHANGED
@@ -9,8 +9,16 @@ Terminology and acronyms: [`GLOSSARY.md`](./GLOSSARY.md).
9
9
  - `CLI`: Command Line Interface
10
10
  - `CI`: Continuous Integration
11
11
 
12
- ## Unreleased
13
- - Add governed release artifacts (`SECURITY.md`, `RELEASE_v1.0.0.md`, compatibility matrix).
12
+ ## Unreleased
13
+ - Add gateway/environment fields to the published Trusted Mode Check PDP requests so live Guard Pro runtime validation works against quota-aware runtime bundles.
14
+
15
+ ## v1.0.3
16
+ - Include the signed attestation pack files in the public npm package so Trusted Mode Check can verify local attestation out of the box.
17
+
18
+ ## v1.0.2
19
+ - Publish the gateway/environment-aware Trusted Mode Check flow so governed runtime validation uses the same tenant, gateway, and environment context as the customer runtime.
20
+
21
+ - Add governed release artifacts (`SECURITY.md`, `RELEASE_v1.0.0.md`, compatibility matrix).
14
22
  - Add Trusted Mode Check attestation status contract (`ENFORCED_OK`, `LOCKDOWN_ONLY`, `UNSAFE`) with JSON output.
15
23
  - Add CI gates for release artifact and changelog version discipline.
16
24
  - Add runtime certification gating (`CERTIFIED_ENFORCED` vs `LOCKDOWN_ONLY`/`UNSUPPORTED`) in plugin.
@@ -25,13 +33,9 @@ Terminology and acronyms: [`GLOSSARY.md`](./GLOSSARY.md).
25
33
  - Add generated `SECURITY_RELEASE_INDEX.md` artifact and workflow integration for release evidence traceability.
26
34
  - Add enterprise hardening options in plugin config (`toolPolicyMode`, `allowedTools`, `requireTenantId`, `allowedTenantIds`) with fail-closed validation behavior.
27
35
  - Add plugin schema/runtime contract check (`verify-plugin-schema-contract`) and CI enforcement.
28
- - Add consolidated release evidence bundling command (`bundle-release-evidence`) and release workflow artifact publication.
29
- - Add enterprise TCTP/EVTP validation matrix runner (`npm run test-pack-matrix`) against live PDP.
30
- - Add release documentation for deterministic certification proof (`decision_proof`) vs timestamped operational `outcome_event`.
31
-
32
- ## v1.0.1
33
- - normalize constrained paths before prefix enforcement so `/tmp-evil`, traversal segments, and Windows path-prefix collisions do not bypass policy
34
- - add regression coverage for path normalization and descendant-boundary checks
36
+ - Add consolidated release evidence bundling command (`bundle-release-evidence`) and release workflow artifact publication.
37
+ - Add enterprise TCTP/EVTP validation matrix runner (`npm run test-pack-matrix`) against live PDP.
38
+ - Add release documentation for deterministic certification proof (`decision_proof`) vs timestamped operational `outcome_event`.
35
39
 
36
40
  ## v1.0.0
37
41
  - Add Trusted Mode Check CLI (Node) with mock PDP for CI.
package/README.md CHANGED
@@ -1,202 +1,201 @@
1
- # @darkelogix/openclaw-trusted-mode
2
-
3
- Terminology and acronyms: [`GLOSSARY.md`](./GLOSSARY.md).
4
-
5
- ## Acronym Expansions
6
-
7
- - `SDE`: Strategic Decision Engine
8
- - `PDP`: Policy Decision Point
9
- - `WSL`: Windows Subsystem for Linux
10
- - `CI`: Continuous Integration
11
-
12
- OpenClaw plugin that enforces Trusted Mode policy checks on `before_tool_call`.
13
- Documentation index (by audience and task): [`docs/README.md`](./docs/README.md).
14
-
15
- ## npm Package
16
-
17
- Install the public MIT adapter/plugin package with:
18
-
19
- ```bash
20
- npm install @darkelogix/openclaw-trusted-mode
21
- ```
22
-
23
- ## What `npm install` gives you
24
-
25
- `npm install @darkelogix/openclaw-trusted-mode` gives you the MIT adapter/plugin layer and standalone hardening flow only. It does not grant access to the proprietary SDE runtime, enterprise deployment packs, or governed tenant entitlements.
26
-
27
- ## Need governed mode?
28
-
29
- If you want SDE-backed governed mode, obtain your licensed SDE runtime and deployment instructions from the Darkelogix customer console. Use the public npm package for adapter installation, then connect it to your licensed SDE environment for governed authorization, evidence, and rollout controls.
30
-
31
- The npm package contains the MIT plugin files and standalone hardening logic only.
32
- It does not include the proprietary `sde-enterprise` runtime.
33
-
34
- ## Licensing
35
-
36
- `openclaw-trusted-mode` is licensed under the MIT License.
37
-
38
- `sde-enterprise`, including the SDE PDP runtime and related enterprise deployment assets, is proprietary software and is not covered by the plugin's MIT license. Use, copying, modification, distribution, or deployment of the SDE runtime requires a separate commercial license or written permission from Darkelogix.
39
-
40
- First-time setup (download/install/configure/test/run): [`START_HERE.md`](./START_HERE.md).
41
- Troubleshooting decision tree: [`SELF_SERVICE_FAQ.md`](./SELF_SERVICE_FAQ.md).
42
- Org defaults and support metadata: `<org-values-file>`.
43
- One-command setup: `powershell -ExecutionPolicy Bypass -File <bootstrap-self-service-script-path>`.
44
- For full install/reinstall/uninstall/startup/config/troubleshooting guidance across both plugin and SDE-PDP, see [`OPERATIONS_GUIDE.md`](./OPERATIONS_GUIDE.md).
45
- For a simpler operator runbook, see [`RUNBOOK_NON_TECHNICAL.md`](./RUNBOOK_NON_TECHNICAL.md).
46
- For go-live gating, use [`PRODUCTION_READINESS_CHECKLIST.md`](./PRODUCTION_READINESS_CHECKLIST.md).
47
- For a pre-filled starting point, use [`PRODUCTION_READINESS_CHECKLIST_EXAMPLE.md`](./PRODUCTION_READINESS_CHECKLIST_EXAMPLE.md).
48
- For alternate port deployments, use [`PRODUCTION_READINESS_CHECKLIST_EXAMPLE_ALT_PORTS.md`](./PRODUCTION_READINESS_CHECKLIST_EXAMPLE_ALT_PORTS.md).
49
- For public launch readiness, use [`PUBLIC_RELEASE_READINESS_CHECKLIST.md`](./PUBLIC_RELEASE_READINESS_CHECKLIST.md).
50
- For end-to-end public release execution steps (what/where/how), use [`PUBLIC_RELEASE_PROCESS_RUNBOOK.md`](./PUBLIC_RELEASE_PROCESS_RUNBOOK.md).
51
- For certified runtime support status, see [`COMPATIBILITY_MATRIX.md`](./COMPATIBILITY_MATRIX.md).
52
- For vulnerability reporting and security posture, see [`SECURITY.md`](./SECURITY.md).
53
- For release hardening process, see [`RELEASE_OPERATIONS.md`](./RELEASE_OPERATIONS.md).
54
- For security evidence indexing, see [`SECURITY_EVIDENCE_BUNDLE.md`](./SECURITY_EVIDENCE_BUNDLE.md).
55
- For performance baseline evidence, see [`PERFORMANCE_BASELINE.md`](./PERFORMANCE_BASELINE.md).
56
- For governed release declaration, see [`RELEASE_v1.0.0.md`](./RELEASE_v1.0.0.md).
57
-
58
- ## What it does
59
-
1
+ # @darkelogix/openclaw-trusted-mode
2
+
3
+ Terminology and acronyms: [`GLOSSARY.md`](./GLOSSARY.md).
4
+
5
+ ## Acronym Expansions
6
+
7
+ - `SDE`: Strategic Decision Engine
8
+ - `PDP`: Policy Decision Point
9
+ - `WSL`: Windows Subsystem for Linux
10
+ - `CI`: Continuous Integration
11
+
12
+ OpenClaw plugin that enforces Trusted Mode policy checks on `before_tool_call`.
13
+ Documentation index (by audience and task): [`docs/README.md`](./docs/README.md).
14
+
15
+ ## npm Package
16
+
17
+ Install the public MIT adapter/plugin package with:
18
+
19
+ ```bash
20
+ npm install @darkelogix/openclaw-trusted-mode
21
+ ```
22
+
23
+ ## What `npm install` gives you
24
+
25
+ `npm install @darkelogix/openclaw-trusted-mode` gives you the MIT adapter/plugin layer and standalone hardening flow only. It does not grant access to the proprietary SDE runtime, enterprise deployment packs, or governed tenant entitlements.
26
+
27
+ ## Need governed mode?
28
+
29
+ If you want SDE-backed governed mode, obtain your licensed SDE runtime and deployment instructions from the Darkelogix customer console. Use the public npm package for adapter installation, then connect it to your licensed SDE environment for governed authorization, evidence, and rollout controls.
30
+
31
+ The npm package contains the MIT plugin files and standalone hardening logic only.
32
+ It does not include the proprietary `sde-enterprise` runtime.
33
+
34
+ ## Licensing
35
+
36
+ `openclaw-trusted-mode` is licensed under the MIT License.
37
+
38
+ `sde-enterprise`, including the SDE PDP runtime and related enterprise deployment assets, is proprietary software and is not covered by the plugin's MIT license. Use, copying, modification, distribution, or deployment of the SDE runtime requires a separate commercial license or written permission from Darkelogix.
39
+
40
+ First-time setup (download/install/configure/test/run): [`START_HERE.md`](./START_HERE.md).
41
+ Troubleshooting decision tree: [`SELF_SERVICE_FAQ.md`](./SELF_SERVICE_FAQ.md).
42
+ Org defaults and support metadata: `<org-values-file>`.
43
+ One-command setup: `powershell -ExecutionPolicy Bypass -File <bootstrap-self-service-script-path>`.
44
+ For full install/reinstall/uninstall/startup/config/troubleshooting guidance across both plugin and SDE-PDP, see [`OPERATIONS_GUIDE.md`](./OPERATIONS_GUIDE.md).
45
+ For a simpler operator runbook, see [`RUNBOOK_NON_TECHNICAL.md`](./RUNBOOK_NON_TECHNICAL.md).
46
+ For go-live gating, use [`PRODUCTION_READINESS_CHECKLIST.md`](./PRODUCTION_READINESS_CHECKLIST.md).
47
+ For a pre-filled starting point, use [`PRODUCTION_READINESS_CHECKLIST_EXAMPLE.md`](./PRODUCTION_READINESS_CHECKLIST_EXAMPLE.md).
48
+ For alternate port deployments, use [`PRODUCTION_READINESS_CHECKLIST_EXAMPLE_ALT_PORTS.md`](./PRODUCTION_READINESS_CHECKLIST_EXAMPLE_ALT_PORTS.md).
49
+ For public launch readiness, use [`PUBLIC_RELEASE_READINESS_CHECKLIST.md`](./PUBLIC_RELEASE_READINESS_CHECKLIST.md).
50
+ For end-to-end public release execution steps (what/where/how), use [`PUBLIC_RELEASE_PROCESS_RUNBOOK.md`](./PUBLIC_RELEASE_PROCESS_RUNBOOK.md).
51
+ For certified runtime support status, see [`COMPATIBILITY_MATRIX.md`](./COMPATIBILITY_MATRIX.md).
52
+ For vulnerability reporting and security posture, see [`SECURITY.md`](./SECURITY.md).
53
+ For release hardening process, see [`RELEASE_OPERATIONS.md`](./RELEASE_OPERATIONS.md).
54
+ For security evidence indexing, see [`SECURITY_EVIDENCE_BUNDLE.md`](./SECURITY_EVIDENCE_BUNDLE.md).
55
+ For performance baseline evidence, see [`PERFORMANCE_BASELINE.md`](./PERFORMANCE_BASELINE.md).
56
+ For governed release declaration, see [`RELEASE_v1.0.0.md`](./RELEASE_v1.0.0.md).
57
+
58
+ ## What it does
59
+
60
60
  - Free standalone mode defaults to local hardening with a minimal allowlist:
61
61
  - `read_file`
62
62
  - `list_files`
63
63
  - `search_files`
64
64
  - Blocks high-risk tools such as `exec`, file writes/edits, and deletes unless you deliberately widen the policy.
65
- - Normalizes constrained paths before enforcing allowed prefixes so traversal and lookalike prefixes do not slip through.
66
65
  - Sends tool call context to a Policy Decision Point (PDP) endpoint.
67
- - Denies execution when PDP returns a deny decision.
68
- - Optionally enforces returned constraints.
69
- - Supports fail-closed (default) or fail-open behavior.
70
-
71
- ## Free vs Paid
72
-
73
- The product boundary should be explicit at install time:
74
-
75
- - `npm install` gets you the adapter/plugin and standalone hardening path
76
- - governed mode requires a separately licensed SDE deployment
77
- - the customer console is the supported way to obtain governed runtime artifacts and deployment instructions
78
-
79
-
80
- - Free standalone use:
81
- - useful as a local hardening layer
82
- - works without `sde-enterprise`
83
- - best for "read/search only" OpenClaw sessions
84
- - Paid / enterprise use:
85
- - PDP-backed authorization and deny decisions
86
- - signed policy packs
87
- - tenant entitlements and governed rollout
88
- - release attestation and compatibility certification
89
-
90
- ## Build and test
91
-
92
- ```powershell
93
- npm run build
94
- npm test
95
- npm run adversarial-check
96
- npm run performance-benchmark
97
- npm run test-pack-matrix
98
- ```
99
-
100
- ## Trusted Mode Check
101
-
102
- ```bash
103
- npm run trusted-mode-check
104
- npm run trusted-mode-check -- --json
105
- ```
106
-
107
- `trusted-mode-check` is a PDP-backed validation path. It is useful for SDE-integrated deployments, not for standalone free-mode validation.
108
-
109
- JSON output status values:
110
- - `ENFORCED_OK`
111
- - `LOCKDOWN_ONLY`
112
- - `UNSAFE`
113
-
114
- Attestation pack inputs:
115
- - `attestation/trusted_mode_attest_v1.json`
116
- - `attestation/trusted_mode_attest_v1.sig`
117
-
118
- Runtime/certification env vars:
119
- - `CERTIFICATION_STATUS` (`CERTIFIED_ENFORCED` | `LOCKDOWN_ONLY` | `UNSUPPORTED`)
120
- - `OPENCLAW_VERSION`
121
- - `EXPECTED_STATUS` (optional CI assertion override)
122
-
123
- ## Local install in OpenClaw (WSL)
124
-
125
- ```bash
126
- openclaw plugins install /mnt/c/path/to/openclaw-trusted-mode
127
- openclaw plugins info openclaw-trusted-mode
128
- ```
129
-
130
- For a standalone free-mode config, start from [`openclaw.user-config.entry.example.json`](./openclaw.user-config.entry.example.json).
131
-
132
- ## Plugin config
133
-
134
- See [`openclaw.plugin.json`](./openclaw.plugin.json) for config schema and defaults, including:
135
-
136
- - `pdpUrl`
137
- - `policyVariant`
138
- - `pdpTimeoutMs`
139
- - `failClosed`
140
- - `tenantId`
141
- - `certificationStatus`
142
- - `openclawVersion`
143
- - `certifiedOpenClawVersions`
144
- - `highRiskTools`
145
- - `toolPolicyMode`
146
- - `allowedTools`
147
- - `requireTenantId`
148
- - `allowedTenantIds`
149
- - `contextCurator`
150
-
151
- Recommended standalone free-mode baseline:
152
-
153
- ```json
154
- {
155
- "toolPolicyMode": "ALLOWLIST_ONLY",
156
- "allowedTools": ["read_file", "list_files", "search_files"],
157
- "failClosed": true,
158
- "certificationStatus": "LOCKDOWN_ONLY"
159
- }
160
- ```
161
-
162
- Recommended paid / PDP-backed baseline:
163
-
164
- ```json
165
- {
166
- "toolPolicyMode": "PDP",
167
- "pdpUrl": "http://localhost:8001/v1/authorize",
168
- "tenantId": "trial-tenant",
169
- "failClosed": true,
170
- "certificationStatus": "LOCKDOWN_ONLY"
171
- }
172
- ```
173
-
174
- ## Compatibility Matrix Automation
175
-
176
- ```bash
177
- npm run update-compatibility-matrix
178
- npm run verify-compatibility-matrix
179
- ```
180
-
181
- ## Security Gates
182
-
183
- ```bash
184
- npm run collect-security-evidence
185
- npm run generate-security-release-index
186
- npm run verify-security-gates
187
- ```
188
-
189
- ## Schema Contract and Evidence Bundle
190
-
191
- ```bash
192
- npm run verify-plugin-schema-contract
193
- npm run bundle-release-evidence
194
- ```
195
-
196
- ## Startup Health Verification
197
-
198
- ```bash
199
- npm run startup-health-check -- --skip-plugin-check
200
- ```
201
-
202
-
66
+ - Denies execution when PDP returns a deny decision.
67
+ - Optionally enforces returned constraints.
68
+ - Supports fail-closed (default) or fail-open behavior.
69
+
70
+ ## Free vs Paid
71
+
72
+ The product boundary should be explicit at install time:
73
+
74
+ - `npm install` gets you the adapter/plugin and standalone hardening path
75
+ - governed mode requires a separately licensed SDE deployment
76
+ - the customer console is the supported way to obtain governed runtime artifacts and deployment instructions
77
+
78
+
79
+ - Free standalone use:
80
+ - useful as a local hardening layer
81
+ - works without `sde-enterprise`
82
+ - best for "read/search only" OpenClaw sessions
83
+ - Paid / enterprise use:
84
+ - PDP-backed authorization and deny decisions
85
+ - signed policy packs
86
+ - tenant entitlements and governed rollout
87
+ - release attestation and compatibility certification
88
+
89
+ ## Build and test
90
+
91
+ ```powershell
92
+ npm run build
93
+ npm test
94
+ npm run adversarial-check
95
+ npm run performance-benchmark
96
+ npm run test-pack-matrix
97
+ ```
98
+
99
+ ## Trusted Mode Check
100
+
101
+ ```bash
102
+ npm run trusted-mode-check
103
+ npm run trusted-mode-check -- --json
104
+ ```
105
+
106
+ `trusted-mode-check` is a PDP-backed validation path. It is useful for SDE-integrated deployments, not for standalone free-mode validation.
107
+
108
+ JSON output status values:
109
+ - `ENFORCED_OK`
110
+ - `LOCKDOWN_ONLY`
111
+ - `UNSAFE`
112
+
113
+ Attestation pack inputs:
114
+ - `attestation/trusted_mode_attest_v1.json`
115
+ - `attestation/trusted_mode_attest_v1.sig`
116
+
117
+ Runtime/certification env vars:
118
+ - `CERTIFICATION_STATUS` (`CERTIFIED_ENFORCED` | `LOCKDOWN_ONLY` | `UNSUPPORTED`)
119
+ - `OPENCLAW_VERSION`
120
+ - `EXPECTED_STATUS` (optional CI assertion override)
121
+
122
+ ## Local install in OpenClaw (WSL)
123
+
124
+ ```bash
125
+ openclaw plugins install /mnt/c/path/to/openclaw-trusted-mode
126
+ openclaw plugins info openclaw-trusted-mode
127
+ ```
128
+
129
+ For a standalone free-mode config, start from [`openclaw.user-config.entry.example.json`](./openclaw.user-config.entry.example.json).
130
+
131
+ ## Plugin config
132
+
133
+ See [`openclaw.plugin.json`](./openclaw.plugin.json) for config schema and defaults, including:
134
+
135
+ - `pdpUrl`
136
+ - `policyVariant`
137
+ - `pdpTimeoutMs`
138
+ - `failClosed`
139
+ - `tenantId`
140
+ - `certificationStatus`
141
+ - `openclawVersion`
142
+ - `certifiedOpenClawVersions`
143
+ - `highRiskTools`
144
+ - `toolPolicyMode`
145
+ - `allowedTools`
146
+ - `requireTenantId`
147
+ - `allowedTenantIds`
148
+ - `contextCurator`
149
+
150
+ Recommended standalone free-mode baseline:
151
+
152
+ ```json
153
+ {
154
+ "toolPolicyMode": "ALLOWLIST_ONLY",
155
+ "allowedTools": ["read_file", "list_files", "search_files"],
156
+ "failClosed": true,
157
+ "certificationStatus": "LOCKDOWN_ONLY"
158
+ }
159
+ ```
160
+
161
+ Recommended paid / PDP-backed baseline:
162
+
163
+ ```json
164
+ {
165
+ "toolPolicyMode": "PDP",
166
+ "pdpUrl": "http://localhost:8001/v1/authorize",
167
+ "tenantId": "trial-tenant",
168
+ "failClosed": true,
169
+ "certificationStatus": "LOCKDOWN_ONLY"
170
+ }
171
+ ```
172
+
173
+ ## Compatibility Matrix Automation
174
+
175
+ ```bash
176
+ npm run update-compatibility-matrix
177
+ npm run verify-compatibility-matrix
178
+ ```
179
+
180
+ ## Security Gates
181
+
182
+ ```bash
183
+ npm run collect-security-evidence
184
+ npm run generate-security-release-index
185
+ npm run verify-security-gates
186
+ ```
187
+
188
+ ## Schema Contract and Evidence Bundle
189
+
190
+ ```bash
191
+ npm run verify-plugin-schema-contract
192
+ npm run bundle-release-evidence
193
+ ```
194
+
195
+ ## Startup Health Verification
196
+
197
+ ```bash
198
+ npm run startup-health-check -- --skip-plugin-check
199
+ ```
200
+
201
+
@@ -1,151 +1,151 @@
1
- # Self-Service FAQ
2
-
3
- Terminology and acronyms: [`GLOSSARY.md`](./GLOSSARY.md).
4
-
5
- ## Acronym Expansions
6
-
7
- - `SDE`: Strategic Decision Engine
8
- - `PDP`: Policy Decision Point
9
- - `CLI`: Command Line Interface
10
- - `FQDN`: Fully Qualified Domain Name
11
- - `SKU`: Stock Keeping Unit
12
- - `WSL`: Windows Subsystem for Linux
13
-
14
- ## 1) `openclaw` command not found
15
-
16
- Install OpenClaw CLI and verify:
17
-
18
- ```powershell
19
- openclaw --version
20
- ```
21
-
22
- If still not found:
23
-
24
- 1. Confirm CLI install location is on PATH.
25
- 2. Open a new terminal and retry.
26
-
27
- ## 2) PDP health check fails
28
-
29
- If you are using the free standalone plugin mode, you can ignore this section. PDP is required only for SDE-backed governed mode.
30
-
31
- 1. Start/restart PDP:
32
-
33
- ```powershell
34
- Set-Location <sde-enterprise-path>
35
- docker compose -f ops/docker-compose.pdp.yml up --build -d
36
- ```
37
-
38
- 2. Retry health:
39
-
40
- ```powershell
41
- curl -s http://localhost:8001/healthz
42
- ```
43
-
44
- Expected: `{"status":"ok"}`.
45
-
46
- If not:
47
-
48
- - Check container status: `docker ps`
49
- - Check PDP logs: `docker compose -f ops/docker-compose.pdp.yml logs`
50
-
51
- ## 3) Plugin not loaded
52
-
53
- ```powershell
54
- Set-Location <openclaw-trusted-mode-path>
55
- npm install
56
- npm run build
57
- openclaw plugins install <openclaw-trusted-mode-path> --no-color
58
- openclaw plugins info openclaw-trusted-mode --no-color
59
- ```
60
-
61
- Expected: plugin status is `loaded`.
62
-
63
- If not loaded:
64
-
65
- 1. Confirm plugin ID matches `openclaw-trusted-mode`.
66
- 2. Reinstall plugin and restart OpenClaw gateway.
67
-
68
- ## 4) Actions are allowed when they should be denied
69
-
70
- If you are using standalone free mode, check these first:
71
-
1
+ # Self-Service FAQ
2
+
3
+ Terminology and acronyms: [`GLOSSARY.md`](./GLOSSARY.md).
4
+
5
+ ## Acronym Expansions
6
+
7
+ - `SDE`: Strategic Decision Engine
8
+ - `PDP`: Policy Decision Point
9
+ - `CLI`: Command Line Interface
10
+ - `FQDN`: Fully Qualified Domain Name
11
+ - `SKU`: Stock Keeping Unit
12
+ - `WSL`: Windows Subsystem for Linux
13
+
14
+ ## 1) `openclaw` command not found
15
+
16
+ Install OpenClaw CLI and verify:
17
+
18
+ ```powershell
19
+ openclaw --version
20
+ ```
21
+
22
+ If still not found:
23
+
24
+ 1. Confirm CLI install location is on PATH.
25
+ 2. Open a new terminal and retry.
26
+
27
+ ## 2) PDP health check fails
28
+
29
+ If you are using the free standalone plugin mode, you can ignore this section. PDP is required only for SDE-backed governed mode.
30
+
31
+ 1. Start/restart PDP:
32
+
33
+ ```powershell
34
+ Set-Location <sde-enterprise-path>
35
+ docker compose -f ops/docker-compose.pdp.yml up --build -d
36
+ ```
37
+
38
+ 2. Retry health:
39
+
40
+ ```powershell
41
+ curl -s http://localhost:8001/healthz
42
+ ```
43
+
44
+ Expected: `{"status":"ok"}`.
45
+
46
+ If not:
47
+
48
+ - Check container status: `docker ps`
49
+ - Check PDP logs: `docker compose -f ops/docker-compose.pdp.yml logs`
50
+
51
+ ## 3) Plugin not loaded
52
+
53
+ ```powershell
54
+ Set-Location <openclaw-trusted-mode-path>
55
+ npm install
56
+ npm run build
57
+ openclaw plugins install <openclaw-trusted-mode-path> --no-color
58
+ openclaw plugins info openclaw-trusted-mode --no-color
59
+ ```
60
+
61
+ Expected: plugin status is `loaded`.
62
+
63
+ If not loaded:
64
+
65
+ 1. Confirm plugin ID matches `openclaw-trusted-mode`.
66
+ 2. Reinstall plugin and restart OpenClaw gateway.
67
+
68
+ ## 4) Actions are allowed when they should be denied
69
+
70
+ If you are using standalone free mode, check these first:
71
+
72
72
  1. Confirm `toolPolicyMode` is `ALLOWLIST_ONLY`.
73
73
  2. Confirm the blocked tool is not present in `allowedTools`.
74
- 3. For shell execution, the runtime commonly emits `exec`; current SDE governance canonicalizes `exec`, `execute_shell`, and `run_shell_command` to the same shell policy, but verifying the observed tool id is still useful for troubleshooting.
75
-
76
- Run SDE smoke test:
77
-
78
- ```powershell
79
- Set-Location <sde-enterprise-path>
80
- powershell -ExecutionPolicy Bypass -File scripts\first_success_smoke.ps1
81
- ```
82
-
83
- Then verify:
84
-
85
- 1. Active policy pack includes exact runtime tool key.
86
- 2. Tenant variant mapping points to intended variant.
87
- 3. Entitlement and tenant ID are correct.
88
-
89
- ## 5) `[Trusted Mode BLOCKED] fetch failed`
90
-
91
- Meaning: plugin cannot reach PDP.
92
-
93
- If you intended to use the free standalone plugin only, switch to:
94
-
95
- - `toolPolicyMode = ALLOWLIST_ONLY`
96
- - a non-empty `allowedTools` list
97
-
98
- That removes the PDP dependency.
99
-
100
- Check in order:
101
-
102
- 1. PDP is running and healthy.
103
- 2. Plugin `pdpUrl` points to reachable host/port.
104
- 3. If using WSL, test `host.docker.internal` endpoint.
105
- 4. Keep `failClosed=true` in production.
106
-
107
- ## 6) License endpoint or support placeholders are unresolved
108
-
109
- Define and verify the values from `START_HERE.md` section "Remaining org-specific values to fill once":
110
-
111
- 1. License server FQDN.
112
- 2. Support contacts and escalation channel.
113
- 3. Artifact/registry coordinates used by your deployment.
114
-
115
- After setting values:
116
-
117
- 1. Re-run licensing/activation check (`sde-cli license status`).
118
- 2. Re-run pilot or production readiness checklist.
119
-
120
- ## 7) `ENTITLEMENT_DENIED` for expected active tenant
121
-
122
- 1. Inspect `ops/entitlements.json` for exact tenant key and SKU.
123
- 2. Confirm request `tenant_id` matches exactly.
124
- 3. Restart PDP after file changes.
125
- 4. Re-test with:
126
-
127
- ```powershell
128
- Set-Location <sde-enterprise-path>
129
- python ops\pdp_admin_cli.py authorize-test --tenant-id <tenant_id> --tool-name read_file --gateway-id gw-1 --environment prod
130
- ```
131
-
132
- ## 8) Policy pack signature verification errors
133
-
134
- 1. Confirm both files exist for active variant:
135
- - `<variant>.json`
136
- - `<variant>.sig`
137
- 2. Validate with:
138
-
139
- ```powershell
140
- Set-Location <sde-enterprise-path>
141
- python ops\pdp_admin_cli.py validate-policy-pack --variant <variant>
142
- ```
143
-
144
- 3. If validation fails, restore known-good signed pair and restart PDP.
145
-
146
- ## 9) Where to go next
147
-
148
- - First-time setup: `START_HERE.md`
149
- - Detailed operations: `OPERATIONS_GUIDE.md`
150
- - Non-technical operations: `RUNBOOK_NON_TECHNICAL.md`
151
- - Governance controls: `<sde-enterprise-path>\docs\governance_control_plane.md`
74
+ 3. For shell execution, verify the runtime tool name is `exec`.
75
+
76
+ Run SDE smoke test:
77
+
78
+ ```powershell
79
+ Set-Location <sde-enterprise-path>
80
+ powershell -ExecutionPolicy Bypass -File scripts\first_success_smoke.ps1
81
+ ```
82
+
83
+ Then verify:
84
+
85
+ 1. Active policy pack includes exact runtime tool key.
86
+ 2. Tenant variant mapping points to intended variant.
87
+ 3. Entitlement and tenant ID are correct.
88
+
89
+ ## 5) `[Trusted Mode BLOCKED] fetch failed`
90
+
91
+ Meaning: plugin cannot reach PDP.
92
+
93
+ If you intended to use the free standalone plugin only, switch to:
94
+
95
+ - `toolPolicyMode = ALLOWLIST_ONLY`
96
+ - a non-empty `allowedTools` list
97
+
98
+ That removes the PDP dependency.
99
+
100
+ Check in order:
101
+
102
+ 1. PDP is running and healthy.
103
+ 2. Plugin `pdpUrl` points to reachable host/port.
104
+ 3. If using WSL, test `host.docker.internal` endpoint.
105
+ 4. Keep `failClosed=true` in production.
106
+
107
+ ## 6) License endpoint or support placeholders are unresolved
108
+
109
+ Define and verify the values from `START_HERE.md` section "Remaining org-specific values to fill once":
110
+
111
+ 1. License server FQDN.
112
+ 2. Support contacts and escalation channel.
113
+ 3. Artifact/registry coordinates used by your deployment.
114
+
115
+ After setting values:
116
+
117
+ 1. Re-run licensing/activation check (`sde-cli license status`).
118
+ 2. Re-run pilot or production readiness checklist.
119
+
120
+ ## 7) `ENTITLEMENT_DENIED` for expected active tenant
121
+
122
+ 1. Inspect `ops/entitlements.json` for exact tenant key and SKU.
123
+ 2. Confirm request `tenant_id` matches exactly.
124
+ 3. Restart PDP after file changes.
125
+ 4. Re-test with:
126
+
127
+ ```powershell
128
+ Set-Location <sde-enterprise-path>
129
+ python ops\pdp_admin_cli.py authorize-test --tenant-id <tenant_id> --tool-name read_file --gateway-id gw-1 --environment prod
130
+ ```
131
+
132
+ ## 8) Policy pack signature verification errors
133
+
134
+ 1. Confirm both files exist for active variant:
135
+ - `<variant>.json`
136
+ - `<variant>.sig`
137
+ 2. Validate with:
138
+
139
+ ```powershell
140
+ Set-Location <sde-enterprise-path>
141
+ python ops\pdp_admin_cli.py validate-policy-pack --variant <variant>
142
+ ```
143
+
144
+ 3. If validation fails, restore known-good signed pair and restart PDP.
145
+
146
+ ## 9) Where to go next
147
+
148
+ - First-time setup: `START_HERE.md`
149
+ - Detailed operations: `OPERATIONS_GUIDE.md`
150
+ - Non-technical operations: `RUNBOOK_NON_TECHNICAL.md`
151
+ - Governance controls: `<sde-enterprise-path>\docs\governance_control_plane.md`
@@ -0,0 +1,21 @@
1
+ {
2
+ "pack_id": "trusted_mode_attest",
3
+ "pack_version": "v1.0.0",
4
+ "schema_version": "2026-03-01",
5
+ "issued_at": "2026-03-01T00:00:00Z",
6
+ "checks": [
7
+ "attestation_pack_signature",
8
+ "deny_high_impact",
9
+ "allow_low_impact",
10
+ "signature_failure"
11
+ ],
12
+ "output_contract": {
13
+ "status_values": ["ENFORCED_OK", "LOCKDOWN_ONLY", "UNSAFE"],
14
+ "axis_scores": [
15
+ "interception_proof",
16
+ "fail_safe_posture",
17
+ "integrity",
18
+ "certified_compatibility"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1 @@
1
+ sha256:6d58bfc4a02e6efeb0607864951deeb03a5d71bd4790c1d3aea9524e71456e08
package/dist/cli.js CHANGED
@@ -9,6 +9,8 @@ const packageVersion_1 = require("./packageVersion");
9
9
  const PDP_URL = process.env.PDP_URL || 'http://localhost:8001/v1/authorize';
10
10
  const POLICY_VARIANT = process.env.POLICY_VARIANT || 'guard-pro.v2026.02';
11
11
  const TENANT_ID = process.env.TENANT_ID || 'trial-tenant';
12
+ const GATEWAY_ID = process.env.GATEWAY_ID || process.env.OPENCLAW_GATEWAY_ID || 'gw-smoke-1';
13
+ const ENVIRONMENT = process.env.ENVIRONMENT || process.env.OPENCLAW_ENVIRONMENT || 'prod';
12
14
  const OPENCLAW_VERSION = (0, packageVersion_1.resolveOpenClawVersion)();
13
15
  const RUNTIME_CERTIFICATION_STATUS = (0, runtimeCertification_1.normalizeRuntimeCertificationStatus)(process.env.CERTIFICATION_STATUS || 'CERTIFIED_ENFORCED');
14
16
  const JSON_MODE = process.argv.includes('--json');
@@ -35,6 +37,8 @@ async function testDenyHighImpact() {
35
37
  decision_sku: 'openclaw.trusted_mode.authorize.v1',
36
38
  policy_variant: POLICY_VARIANT,
37
39
  tenant_id: TENANT_ID,
40
+ gateway_id: GATEWAY_ID,
41
+ environment: ENVIRONMENT,
38
42
  inputs: { action_request: { tool_name: 'exec', params: {} } },
39
43
  };
40
44
  try {
@@ -58,6 +62,8 @@ async function testAllowLowImpact() {
58
62
  decision_sku: 'openclaw.trusted_mode.authorize.v1',
59
63
  policy_variant: POLICY_VARIANT,
60
64
  tenant_id: TENANT_ID,
65
+ gateway_id: GATEWAY_ID,
66
+ environment: ENVIRONMENT,
61
67
  inputs: { action_request: { tool_name: 'read_file', params: {} } },
62
68
  };
63
69
  try {
@@ -78,6 +84,8 @@ async function testSignatureFailure() {
78
84
  decision_sku: 'openclaw.trusted_mode.authorize.v1',
79
85
  policy_variant: 'invalid-pack',
80
86
  tenant_id: TENANT_ID,
87
+ gateway_id: GATEWAY_ID,
88
+ environment: ENVIRONMENT,
81
89
  inputs: { action_request: { tool_name: 'exec', params: {} } },
82
90
  };
83
91
  try {
@@ -1,58 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.enforceConstraints = enforceConstraints;
7
- const node_path_1 = __importDefault(require("node:path"));
8
- function normalizePathValue(value) {
9
- const trimmed = String(value || '').trim();
10
- if (!trimmed)
11
- return null;
12
- const windows = /^[a-zA-Z]:[\\/]/.test(trimmed) || trimmed.includes('\\');
13
- const pathApi = windows ? node_path_1.default.win32 : node_path_1.default.posix;
14
- const separator = windows ? '\\' : '/';
15
- const root = pathApi.parse(trimmed).root;
16
- let normalized = pathApi.normalize(trimmed);
17
- if (windows)
18
- normalized = normalized.replace(/\//g, '\\');
19
- while (normalized.length > root.length &&
20
- (normalized.endsWith('/') || normalized.endsWith('\\'))) {
21
- normalized = normalized.slice(0, -1);
22
- }
23
- return {
24
- normalized: normalized || root || separator,
25
- root,
26
- separator,
27
- windows,
28
- };
29
- }
30
- function isPathWithinPrefix(value, prefix) {
31
- const normalizedValue = normalizePathValue(value);
32
- const normalizedPrefix = normalizePathValue(prefix);
33
- if (!normalizedValue || !normalizedPrefix)
34
- return false;
35
- if (normalizedValue.windows !== normalizedPrefix.windows)
36
- return false;
37
- const left = normalizedValue.windows
38
- ? normalizedValue.normalized.toLowerCase()
39
- : normalizedValue.normalized;
40
- const right = normalizedPrefix.windows
41
- ? normalizedPrefix.normalized.toLowerCase()
42
- : normalizedPrefix.normalized;
43
- if (left === right)
44
- return true;
45
- if (right === normalizedPrefix.root) {
46
- return left.startsWith(right);
47
- }
48
- return left.startsWith(`${right}${normalizedPrefix.separator}`);
49
- }
50
- function matchesAllowedPrefix(key, value, prefix) {
51
- if (key.toLowerCase().includes('path')) {
52
- return isPathWithinPrefix(value, prefix);
53
- }
54
- return value.startsWith(prefix);
55
- }
56
4
  function enforceConstraints(params, constraints) {
57
5
  if (!Array.isArray(constraints)) {
58
6
  throw new Error(`[Trusted Mode ERROR] Invalid constraints format`);
@@ -67,7 +15,7 @@ function enforceConstraints(params, constraints) {
67
15
  const value = params?.[key];
68
16
  if (typeof value !== 'string')
69
17
  continue;
70
- const ok = allowedPrefixes.some((prefix) => typeof prefix === 'string' && matchesAllowedPrefix(key, value, prefix));
18
+ const ok = allowedPrefixes.some((prefix) => value.startsWith(prefix));
71
19
  if (!ok) {
72
20
  throw new Error(`[Trusted Mode BLOCKED] Constraint violation for "${key}" (allowed prefixes: ${allowedPrefixes.join(', ')})`);
73
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darkelogix/openclaw-trusted-mode",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "MIT-licensed OpenClaw Trusted Mode plugin with standalone hardening and optional SDE-backed governance",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -50,7 +50,9 @@
50
50
  "START_HERE.md",
51
51
  "GLOSSARY.md",
52
52
  "SELF_SERVICE_FAQ.md",
53
- "CHANGELOG.md"
53
+ "CHANGELOG.md",
54
+ "attestation/trusted_mode_attest_v1.json",
55
+ "attestation/trusted_mode_attest_v1.sig"
54
56
  ],
55
57
  "scripts": {
56
58
  "build": "tsc",