@darkelogix/openclaw-trusted-mode 1.0.0-rc.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/CHANGELOG.md ADDED
@@ -0,0 +1,35 @@
1
+ # Changelog
2
+
3
+ Terminology and acronyms: [`GLOSSARY.md`](./GLOSSARY.md).
4
+
5
+ ## Acronym Expansions
6
+
7
+ - `PDP`: Policy Decision Point
8
+ - `PEP`: Policy Enforcement Point
9
+ - `CLI`: Command Line Interface
10
+ - `CI`: Continuous Integration
11
+
12
+ ## Unreleased
13
+ - Add governed release artifacts (`SECURITY.md`, `RELEASE_v1.0.0.md`, compatibility matrix).
14
+ - Add Trusted Mode Check attestation status contract (`ENFORCED_OK`, `LOCKDOWN_ONLY`, `UNSAFE`) with JSON output.
15
+ - Add CI gates for release artifact and changelog version discipline.
16
+ - Add runtime certification gating (`CERTIFIED_ENFORCED` vs `LOCKDOWN_ONLY`/`UNSUPPORTED`) in plugin.
17
+ - Add signed `trusted_mode_attest` pack verification and trace/axis metadata in Trusted Mode Check output.
18
+ - Add compatibility certification workflow and matrix sync script.
19
+ - Add release operations hardening workflow with reproducible artifact checksum/manifest generation.
20
+ - Add security evidence workflow, threat model summary, triage log, and third-party notices generation/review templates.
21
+ - Add adversarial regression suite script and CI gate (tampered attestation, malformed PDP schema, unreachable PDP, uncertified runtime).
22
+ - Add unified startup health verification script for plugin/PDP/attestation/certification checks.
23
+ - Add performance benchmark automation (PDP p50/p95 + interception overhead), CI workflow, and published baseline report.
24
+ - Add security gate automation (`verify-security-gates`) with vulnerability threshold enforcement and triage log validation.
25
+ - Add generated `SECURITY_RELEASE_INDEX.md` artifact and workflow integration for release evidence traceability.
26
+ - Add enterprise hardening options in plugin config (`toolPolicyMode`, `allowedTools`, `requireTenantId`, `allowedTenantIds`) with fail-closed validation behavior.
27
+ - 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.0
33
+ - Add Trusted Mode Check CLI (Node) with mock PDP for CI.
34
+ - Add CI workflow to run build, tests, and CLI against mock PDP.
35
+ - Enforce PDP timeout/fail-closed behavior and constraint checks in PEP.
package/GLOSSARY.md ADDED
@@ -0,0 +1,51 @@
1
+ # Glossary
2
+
3
+ This glossary defines terms used across the OpenClaw Trusted Mode plugin and related SDE runtime docs.
4
+
5
+ ## Core architecture terms
6
+
7
+ - **SDE**: Strategic Decision Engine. The policy/decision platform used to evaluate governance rules.
8
+ - **PDP**: Policy Decision Point. The service endpoint that returns allow/deny decisions.
9
+ - **PEP**: Policy Enforcement Point. The runtime component that enforces PDP decisions.
10
+ In this project, the OpenClaw plugin is the PEP.
11
+ - **OpenClaw plugin**: The `openclaw-trusted-mode` extension that intercepts tool calls and queries PDP.
12
+ - **Policy pack**: Versioned JSON rule bundle used by PDP to decide allow/deny outcomes.
13
+ - **Policy variant**: A named policy pack version (for example `guard-pro.v2026.02`).
14
+ - **Entitlement**: Tenant-level authorization to use a decision capability (`decision_sku`).
15
+ - **Tenant**: Logical customer/environment boundary for policy and entitlement isolation.
16
+
17
+ ## Decision and evidence terms
18
+
19
+ - **Decision SKU**: Canonical identifier for a governed decision contract
20
+ (for example `openclaw.trusted_mode.authorize.v1`).
21
+ - **Allow path**: Expected decision flow where a low-risk request returns `decision=allow`.
22
+ - **Deny path**: Expected decision flow where a blocked request returns `decision=deny`.
23
+ - **Fail-closed**: If PDP is unavailable, block tool execution for safety.
24
+ - **Fail-open**: If PDP is unavailable, allow execution for availability.
25
+ - **`decision_hash`**: Deterministic hash of decision output used for traceability.
26
+ - **`decision_proof`**: Deterministic proof artifact (optionally signed) tied to a decision.
27
+ - **`outcome_event`**: Operational event artifact emitted with decision context.
28
+ - **Audit export**: JSON Lines (`.jsonl`) records for downstream audit/SIEM processing.
29
+
30
+ ## Packaging and deployment terms
31
+
32
+ - **Reference stack**: Compose deployment including PDP, hardening service, and license service.
33
+ - **Air-gapped deployment**: Installation with no outbound internet dependency at runtime.
34
+ - **FQDN**: Fully Qualified Domain Name (for example `license.example.com`).
35
+
36
+ ## Tooling and operations terms
37
+
38
+ - **CLI**: Command Line Interface.
39
+ - **OpenClaw CLI**: `openclaw` command used to install/manage plugins and gateway state.
40
+ - **`sde-cli`**: SDE command-line tool from `core/sde-core`.
41
+ - **WSL**: Windows Subsystem for Linux.
42
+ - **CI**: Continuous Integration pipeline automation.
43
+ - **SLA**: Service Level Agreement (support response/mitigation targets).
44
+ - **MTTD**: Mean Time To Detect.
45
+ - **MTTR**: Mean Time To Resolve.
46
+
47
+ ## Severity shorthand used in operations
48
+
49
+ - **P1**: Highest-priority incident (critical governance bypass or full outage risk).
50
+ - **P2**: High-priority incident (major partial impact).
51
+ - **P3**: Lower-priority incident (non-critical degradation or documentation/tooling issue).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Darkelogix
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +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
+
60
+ - Free standalone mode defaults to local hardening with a minimal allowlist:
61
+ - `read_file`
62
+ - `list_files`
63
+ - `search_files`
64
+ - Blocks high-risk tools such as `exec`, file writes/edits, and deletes unless you deliberately widen the policy.
65
+ - Sends tool call context to a Policy Decision Point (PDP) endpoint.
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
+
@@ -0,0 +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
+
72
+ 1. Confirm `toolPolicyMode` is `ALLOWLIST_ONLY`.
73
+ 2. Confirm the blocked tool is not present in `allowedTools`.
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`
package/START_HERE.md ADDED
@@ -0,0 +1,204 @@
1
+ # Start Here: Self-Service Setup
2
+
3
+ This guide assumes an npm-first customer path:
4
+
5
+ - install the public adapter/plugin from npm
6
+ - use standalone mode immediately if you only need local hardening
7
+ - obtain the licensed SDE runtime and deployment materials through the Darkelogix customer console only if you want governed mode
8
+
9
+ Terminology and acronyms: [`GLOSSARY.md`](./GLOSSARY.md).
10
+
11
+ ## Acronym Expansions
12
+
13
+ - `SDE`: Strategic Decision Engine
14
+ - `PDP`: Policy Decision Point
15
+ - `CLI`: Command Line Interface
16
+
17
+ This guide is the single entrypoint for first-time users of:
18
+
19
+ - `<openclaw-trusted-mode-path>` (plugin)
20
+ - `<sde-enterprise-path>` (Strategic Decision Engine (SDE) Policy Decision Point (PDP) runtime)
21
+
22
+ Goal: download, install, configure, test, and run without direct support.
23
+
24
+ There are two valid setup paths:
25
+
26
+ - npm package: public adapter/plugin only
27
+ - customer console: licensed SDE runtime, deployment bundles, and governed rollout instructions
28
+
29
+ Then choose one of these runtime paths:
30
+
31
+ - Free standalone plugin hardening:
32
+ - local allowlist-only mode
33
+ - no SDE PDP required
34
+ - SDE-backed governed mode:
35
+ - requires `<sde-enterprise-path>`
36
+ - adds PDP authorization, signed policy packs, and entitlements
37
+
38
+ Org-specific values are centralized in `<org-values-file>`.
39
+
40
+ ## 0) One-command bootstrap (recommended)
41
+
42
+ If you are coming from the public npm package, you can install it first with:
43
+
44
+ ```powershell
45
+ npm install @darkelogix/openclaw-trusted-mode
46
+ ```
47
+
48
+ Use the bootstrap path when you want the guided local setup flow.
49
+
50
+
51
+ ```powershell
52
+ powershell -ExecutionPolicy Bypass -File <bootstrap-self-service-script-path>
53
+ ```
54
+
55
+ Optional (also install `sde-cli`):
56
+
57
+ ```powershell
58
+ powershell -ExecutionPolicy Bypass -File <bootstrap-self-service-script-path> -InstallSdeCli
59
+ ```
60
+
61
+ ## 1) Prerequisites
62
+
63
+ - Windows PowerShell 7+ or bash
64
+ - Git
65
+ - Docker Desktop (or Docker Engine + Compose)
66
+ - Node.js 22.x (plugin build/runtime)
67
+ - Python 3.11+ (for `sde-cli` and plugin matrix test)
68
+ - OpenClaw Command Line Interface (CLI) available in shell as `openclaw`
69
+
70
+ Quick version checks:
71
+
72
+ ```powershell
73
+ node --version
74
+ python --version
75
+ docker --version
76
+ docker compose version
77
+ openclaw --version
78
+ ```
79
+
80
+ ## 2) Acquire the two repos
81
+
82
+ Option A: you already have them locally at:
83
+
84
+ - `<openclaw-trusted-mode-path>`
85
+ - `<sde-enterprise-path>`
86
+
87
+ Option B: clone them:
88
+
89
+ ```powershell
90
+ git clone <openclaw-trusted-mode-repo-url> <openclaw-trusted-mode-path>
91
+ git clone <sde-enterprise-repo-url> <sde-enterprise-path>
92
+ ```
93
+
94
+ ## 3) Configure known-good local defaults
95
+
96
+ 1. Create local SDE env file:
97
+
98
+ ```powershell
99
+ Copy-Item <sde-enterprise-path>\.env.example <sde-enterprise-path>\.env -Force
100
+ ```
101
+
102
+ 2. Use the default tenant/policy mapping (already present in repo):
103
+ - `<sde-enterprise-path>\ops\entitlements.json`
104
+ - `<sde-enterprise-path>\ops\tenant_variants.json`
105
+
106
+ 3. Optional plugin config template:
107
+ - `<openclaw-trusted-mode-path>\openclaw.user-config.entry.example.json`
108
+
109
+ ## 4) Free standalone plugin install
110
+
111
+ Use this path if you want practical local hardening without SDE PDP.
112
+
113
+ ```powershell
114
+ Set-Location <openclaw-trusted-mode-path>
115
+ npm install
116
+ npm run build
117
+ openclaw plugins install <openclaw-trusted-mode-path> --no-color
118
+ openclaw plugins info openclaw-trusted-mode --no-color
119
+ ```
120
+
121
+ Expected: plugin status is `loaded`.
122
+
123
+ Default free posture:
124
+
125
+ - `toolPolicyMode = ALLOWLIST_ONLY`
126
+ - `allowedTools = ["read_file", "list_files", "search_files"]`
127
+ - shell/write/delete tools blocked locally
128
+
129
+ ## 5) Build and run SDE PDP (Policy Decision Point)
130
+
131
+ Use this governed path only after you have licensed access to SDE. The supported customer-facing way to obtain the runtime, bundles, and instructions is through the Darkelogix customer console, not by assuming direct source-repo access.
132
+
133
+
134
+ Use the hardened profile for all production-style and release validation runs.
135
+
136
+ ```powershell
137
+ Set-Location <sde-enterprise-path>
138
+ docker compose -f ops/docker-compose.pdp.yml -f ops/docker-compose.pdp.hardened.yml up --build -d
139
+ ```
140
+
141
+ Verify health:
142
+
143
+ ```powershell
144
+ curl -s http://localhost:8001/healthz
145
+ ```
146
+
147
+ Expected:
148
+
149
+ ```json
150
+ {"status":"ok"}
151
+ ```
152
+
153
+ ## 6) Build and install plugin for SDE-backed mode
154
+
155
+ ```powershell
156
+ Set-Location <openclaw-trusted-mode-path>
157
+ npm install
158
+ npm run build
159
+ openclaw plugins install <openclaw-trusted-mode-path> --no-color
160
+ openclaw plugins info openclaw-trusted-mode --no-color
161
+ ```
162
+
163
+ Expected: plugin status is `loaded`.
164
+
165
+ ## 7) Run first-success smoke tests
166
+
167
+ Standalone free-mode smoke test:
168
+
169
+ 1. Confirm `read_file` still works in OpenClaw.
170
+ 2. Confirm high-risk actions such as `exec` are blocked.
171
+
172
+ SDE-backed smoke test:
173
+
174
+ ```powershell
175
+ Set-Location <sde-enterprise-path>
176
+ powershell -ExecutionPolicy Bypass -File scripts\first_success_smoke.ps1
177
+ ```
178
+
179
+ Run plugin startup health:
180
+
181
+ ```powershell
182
+ Set-Location <openclaw-trusted-mode-path>
183
+ powershell -ExecutionPolicy Bypass -File scripts\first_success_smoke.ps1
184
+ ```
185
+
186
+ ## 8) Day-2 operations docs
187
+
188
+ - Primary technical ops: `<openclaw-trusted-mode-path>\OPERATIONS_GUIDE.md`
189
+ - Non-technical runbook: `<openclaw-trusted-mode-path>\RUNBOOK_NON_TECHNICAL.md`
190
+ - SDE deployment docs: `<sde-enterprise-path>\README.md`
191
+
192
+ ## 9) Remaining org-specific values to fill once
193
+
194
+ For full production self-service, define these values once in your operations documentation:
195
+
196
+ 1. `<openclaw-trusted-mode-repo-url>`
197
+ 2. `<sde-enterprise-repo-url>`
198
+ 3. `<license-server-fqdn>`
199
+ 4. Support contact block (owner/channel/email)
200
+ 5. Private registry/image coordinates (if used)
201
+
202
+ These values are release-ops inputs, not blockers for local build/test validation.
203
+
204
+