principles-disciple 1.222.3 → 1.222.5

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/README.md CHANGED
@@ -172,15 +172,16 @@ boundary, see the project documentation linked below.
172
172
  Principles Disciple is a local-first behavior-governance layer. This section
173
173
  describes what this npm package (`principles-disciple`, the OpenClaw plugin)
174
174
  actually does, so you can evaluate it before installing. It reflects a
175
- source audit of the published artifact (PRI-547).
175
+ source audit of the published artifact (PRI-547; updated 2026-08 for the
176
+ optional anonymous product telemetry channel).
176
177
 
177
178
  ### Local data
178
179
 
179
180
  Behavior evidence, principles, decision records, and trajectories are stored
180
181
  in the user-controlled local workspace (flat files plus SQLite databases
181
- under the workspace's PD state directories). The core plugin does not send
182
- product telemetry; network access occurs only when an Owner-configured LLM
183
- runtime provider is used (see below).
182
+ under the workspace's PD state directories). Governance state never leaves
183
+ your machine. The only outbound data channel is the optional anonymous
184
+ product telemetry described below, which is **off by default**.
184
185
 
185
186
  ### Agent authority
186
187
 
@@ -209,23 +210,73 @@ function. The `/pd-bootstrap` command runs `<tool> --version` probes (rg,
209
210
  fd, shellcheck, …) to scan your local development environment; it only runs
210
211
  when you invoke it.
211
212
 
212
- ### Network access and LLM providers
213
+ ### Network access
214
+
215
+ This plugin makes network requests in exactly two places:
216
+
217
+ 1. **Owner-configured LLM providers.** Optional LLM calls happen only when
218
+ you configure a runtime profile: the bundled provider SDKs read their
219
+ standard credential environment variables (AWS/Azure/GCP/OpenAI-style,
220
+ depending on the chosen provider) and call that provider from your
221
+ machine. Diagnostics, principle refinement, and internal agents run
222
+ through this user-configured provider.
223
+ 2. **Optional anonymous product telemetry (default: OFF).** One minimized
224
+ daily snapshot per workspace, sent only after you explicitly opt in —
225
+ see the next section.
213
226
 
214
- The core plugin performs no network I/O except through Owner-configured
215
- provider SDKs. Optional LLM calls happen only when you configure a runtime
216
- profile: the bundled provider SDKs read their standard credential
217
- environment variables (AWS/Azure/GCP/OpenAI-style, depending on the chosen
218
- provider) and call that provider from your machine. Diagnostics, principle
219
- refinement, and internal agents run through this user-configured provider.
220
227
  Some antivirus engines flag the bundled provider SDKs'
221
228
  environment-variable handling; that is disclosed here rather than
222
229
  obfuscated.
223
230
 
224
- ### Telemetry
231
+ ### Optional anonymous product telemetry
232
+
233
+ Default: **OFF**. The plugin makes **no telemetry network request at all**
234
+ unless the `anonymous_product_telemetry` feature flag is enabled AND you
235
+ have run `pd telemetry enable --confirm`. Zero consent = zero telemetry
236
+ network requests; this is enforced by transport-level gate tests, not just
237
+ policy.
238
+
239
+ When opted in, the plugin sends one small HTTPS POST per workspace per day
240
+ to `https://principles-website.pages.dev/api/product-telemetry/snapshot`
241
+ containing only:
242
+
243
+ | Field | Content |
244
+ |-------|---------|
245
+ | `schemaVersion`, `consentVersion` | schema constants (`"1"`) |
246
+ | `dailyTelemetryId` | 32-hex identifier that rotates daily and is unlinkable across days and workspaces (derived from a local secret that never leaves your machine) |
247
+ | `bucketDate` | UTC date (`YYYY-MM-DD`) |
248
+ | `pdVersion` | PD version string |
249
+ | `hostKind` | `openclaw` / `codex` / `other` |
250
+ | `milestones` | six `true`/`false`/`null` flags: `initialized`, `painObserved`, `principleObserved`, `activationObserved`, `presenceReceiptObserved`, `effectReceiptObserved` |
251
+ | `reliability` | one `initializationFailed` flag |
252
+
253
+ **Never sent** (enforced by a strict schema validator and a privacy-guard
254
+ test that rejects unknown or content-bearing fields): conversation content,
255
+ prompts, agent responses, principle or pain text, source code, file or
256
+ workspace paths, file names, repository URLs, usernames, emails, hostnames,
257
+ environment variables, error messages, stack traces, and any stable
258
+ installation or workspace identifier.
259
+
260
+ Controls (`pd` = the Principles Disciple CLI):
261
+
262
+ ```bash
263
+ pd telemetry status # consent state, gates, last export status
264
+ pd telemetry preview # exact outbound payload; nothing is sent
265
+ pd telemetry enable --confirm # grant consent (required before anything sends)
266
+ pd telemetry disable --confirm # deny consent and delete the local identity
267
+ pd telemetry reset --confirm # rotate the identity (unlink future daily IDs)
268
+ ```
269
+
270
+ The `PD_TELEMETRY_DISABLED` environment variable disables telemetry even
271
+ when consent was granted, and export is automatically suppressed in CI,
272
+ test, demo, and development environments. Telemetry failures never block
273
+ or crash the plugin: bounded timeout, at most 5 attempts per workspace per
274
+ day, fire-and-forget scheduling.
275
+
276
+ ### Sensitive-data redaction
225
277
 
226
- The core OpenClaw plugin does not send product-usage telemetry. PD redacts
227
- supported sensitive patterns before persistenceincluding known Windows
228
- and Unix paths, email addresses, and common token formats — and `/pd-export`
278
+ PD redacts supported sensitive patterns before persistence including known
279
+ Windows and Unix paths, email addresses, and common token formats and `/pd-export`
229
280
  redacts by default. This is not a general-purpose PII scrubber: automatic
230
281
  redaction does not yet cover phone numbers, credit cards, IP addresses, or
231
282
  other unknown PII. Remaining limitations are tracked in the project's
@@ -237,8 +288,9 @@ Other PD components ship as their own packages and have their own
237
288
  boundaries: the `create-principles-disciple` installer downloads from the
238
289
  npm registry and installs files under `~/.openclaw/`; `pd-console` is a
239
290
  local web console that performs npm registry update checks and
240
- user-initiated feedback submission when you use those features. They are not
241
- part of this plugin tarball.
291
+ user-initiated feedback submission when you use those features, and its
292
+ startup also schedules the same gated opt-in telemetry export described
293
+ above. They are not part of this plugin tarball.
242
294
 
243
295
  ## Part of the principles monorepo
244
296