@pellux/goodvibes-tui 1.25.0 → 1.26.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +1 -1
  3. package/docs/foundation-artifacts/operator-contract.json +6616 -2776
  4. package/package.json +8 -7
  5. package/src/cli/help.ts +10 -0
  6. package/src/cli/redaction.ts +68 -3
  7. package/src/config/goodvibes-home.ts +10 -0
  8. package/src/config/secret-config.ts +64 -8
  9. package/src/core/turn-event-wiring.ts +7 -16
  10. package/src/core/workstream-notification.ts +69 -0
  11. package/src/daemon/cli.ts +48 -4
  12. package/src/daemon/handlers/credentials.ts +15 -5
  13. package/src/daemon/send/channels.ts +200 -0
  14. package/src/daemon/send/command.ts +332 -0
  15. package/src/daemon/send/composition.ts +99 -0
  16. package/src/daemon/send/failure-text.ts +93 -0
  17. package/src/daemon/send/inert-text.ts +225 -0
  18. package/src/daemon/send/stdin.ts +24 -0
  19. package/src/input/commands/config.ts +68 -2
  20. package/src/input/commands/local-provider-runtime.ts +9 -1
  21. package/src/input/commands/operator-runtime.ts +6 -1
  22. package/src/input/commands/payment-card-intake.ts +200 -0
  23. package/src/input/commands/profile-render.ts +250 -0
  24. package/src/input/commands/profile-runtime.ts +362 -0
  25. package/src/input/commands/profile-types.ts +381 -0
  26. package/src/input/commands.ts +7 -0
  27. package/src/input/composer-editor.ts +4 -0
  28. package/src/input/onboarding/onboarding-wizard-apply.ts +13 -1
  29. package/src/input/payments-config.ts +167 -0
  30. package/src/input/provider-key-intake.ts +10 -2
  31. package/src/input/settings-modal-commit.ts +146 -0
  32. package/src/input/settings-modal-data.ts +30 -0
  33. package/src/input/settings-modal-reset.ts +6 -2
  34. package/src/input/settings-modal-secrets.ts +9 -2
  35. package/src/input/settings-modal-types.ts +17 -2
  36. package/src/input/settings-modal.ts +27 -107
  37. package/src/panels/modals/marketplace-modal.ts +5 -0
  38. package/src/panels/modals/skills-modal.ts +5 -0
  39. package/src/renderer/settings-modal-helpers.ts +4 -0
  40. package/src/renderer/settings-modal.ts +16 -1
  41. package/src/runtime/bootstrap.ts +2 -2
  42. package/src/runtime/install-self-check-startup.ts +23 -0
  43. package/src/runtime/onboarding/types.ts +6 -1
  44. package/src/runtime/path-shadow-startup.ts +243 -0
  45. package/src/runtime/path-shadow.ts +418 -0
  46. package/src/runtime/reachability-notice.ts +100 -0
  47. package/src/runtime/runtime-services-types.ts +243 -0
  48. package/src/runtime/services.ts +14 -205
  49. package/src/verification/verification-ledger.ts +104 -4
  50. package/src/version.ts +1 -1
@@ -70,12 +70,20 @@ const SETTINGS_BEHAVIOR_BASELINE = 184;
70
70
  * overlaps neither other counted set, so nothing is double-counted and nothing
71
71
  * drifts in uncounted.
72
72
  *
73
- * PER-KEY EVIDENCE. All 25 are read by a LIVE consumer, which is why they were
73
+ * PER-KEY EVIDENCE. All 42 are read by a LIVE consumer, which is why they were
74
74
  * declared at all: the SDK's mail and calendar gateway compositions
75
75
  * (platform/email/surface-config.ts and platform/calendar/caldav-gateway-config.ts)
76
- * resolve every one of them when the daemon serves `email.*` and `calendar.*`.
77
- * The three password keys additionally resolve through the daemon secret tier
78
- * rather than from config, and carry no secret value in config themselves.
76
+ * resolve every one of them when the daemon serves `email.*` and `calendar.*`,
77
+ * and the `surfaces.email.inbound.*` block is read by the daemon's inbound mail
78
+ * reader — the poller/IDLE path that makes incoming mail visible at all.
79
+ * The five password keys (email.password, email.imapPassword,
80
+ * email.imap.password, email.smtp.password, calendar.caldavPassword)
81
+ * additionally resolve through the daemon secret tier rather than from config,
82
+ * and carry no secret value in config themselves. That is now enforced on the
83
+ * write side too: all five are in `config/secret-config.ts`'s
84
+ * SECRET_CONFIG_KEYS, so the settings modal and `/config set` route an entered
85
+ * value into the secret store and leave only a `goodvibes://` reference in
86
+ * config, rather than writing the password itself into a settings file.
79
87
  */
80
88
  export const DAEMON_MAILBOX_LOCAL_SETTINGS = [
81
89
  'surfaces.email.host',
@@ -98,6 +106,31 @@ export const DAEMON_MAILBOX_LOCAL_SETTINGS = [
98
106
  'surfaces.email.smtp.port',
99
107
  'surfaces.email.smtp.password',
100
108
  'surfaces.email.smtp.secure',
109
+ // Inbound mail — the poller/IDLE reader the daemon runs to actually READ mail,
110
+ // which arrived with the platform runtime. These are counted for exactly the
111
+ // reason the keys above are: the same four-part persistence contract runs over
112
+ // every one of them in
113
+ // src/test/verification/daemon-mailbox-settings-persistence.test.ts, and the
114
+ // list is asserted there to be the complete surfaces.email.*/surfaces.calendar.*
115
+ // schema set. Arriving uncounted is what dropped localBehaviorPercent through
116
+ // its floor when the schema grew.
117
+ 'surfaces.email.inbound.enabled',
118
+ 'surfaces.email.inbound.accounts',
119
+ 'surfaces.email.inbound.source',
120
+ 'surfaces.email.inbound.gmailPollSecondsExpecting',
121
+ 'surfaces.email.inbound.gmailPollSecondsIdle',
122
+ 'surfaces.email.inbound.mode',
123
+ 'surfaces.email.inbound.pollIntervalSeconds',
124
+ 'surfaces.email.inbound.idleReissueMinutes',
125
+ 'surfaces.email.inbound.reconnect.maxBackoffSeconds',
126
+ 'surfaces.email.inbound.notice.route',
127
+ 'surfaces.email.inbound.notice.mode',
128
+ 'surfaces.email.inbound.expectationWindowMinutes',
129
+ 'surfaces.email.inbound.dedupTtlMinutes',
130
+ 'surfaces.email.inbound.retentionDays',
131
+ 'surfaces.email.inbound.maxRecords',
132
+ 'surfaces.email.inbound.capabilityRecheckMinutes',
133
+ 'surfaces.email.inbound.onInsufficientCapability',
101
134
  'surfaces.calendar.caldavUrl',
102
135
  'surfaces.calendar.caldavUser',
103
136
  'surfaces.calendar.caldavPassword',
@@ -300,11 +333,78 @@ export const CLUSTER_GROUP_LOCAL_SETTINGS = [
300
333
  'cluster.rosterGossipSeconds',
301
334
  ] as const;
302
335
 
336
+ /**
337
+ * Config keys for the daemon's payment capability: the master switch, which
338
+ * card to use by default, the settlement currency, CVV handling, the six
339
+ * budget knobs, the shipping-tier preference, the fourteen billing/shipping
340
+ * address sub-fields, the two approval/veto windows, and the notify-channel
341
+ * list. Card MATERIAL (number, expiry, CVV, cardholder name) is intentionally
342
+ * NOT here — see the SDK's schema-domain-payments.ts header and this repo's
343
+ * own input/payments-config.ts: that material lives write-only in the daemon
344
+ * secret store, never in CONFIG_SCHEMA, so there is nothing for a persistence
345
+ * contract to count.
346
+ *
347
+ * THIS CONSTANT IS NOT A DIAL, for the same reason as the sets above. Every
348
+ * key below is counted because
349
+ * `src/test/verification/payments-settings-persistence.test.ts` runs the same
350
+ * four-part persistence contract the other counted sets are counted for:
351
+ * schema default exposure, `set()` through the key's own validator to disk,
352
+ * reload into a fresh ConfigManager with read-back equality, and
353
+ * reset-to-default that also survives reload. That test also asserts this
354
+ * list is exactly the CONFIG_SCHEMA's `payments.*` key set, so a future SDK
355
+ * addition under this domain is caught (fails the inventory-integrity test)
356
+ * rather than silently uncounted.
357
+ *
358
+ * PER-KEY EVIDENCE. All 28 are read by the daemon's own payment capability
359
+ * (platform/payments, platform/control-plane/routes/payments.ts): the budget
360
+ * keys size the daily/overage/tolerance pools, the window keys size the
361
+ * veto/approval timers, cvvHandling and shipping.preferredTier select the
362
+ * enum behaviors `platform/payments` documents, and the address sub-fields
363
+ * are read directly by the daemon's shipping-address-required refusal and the
364
+ * card-issuer address-verification path. `enabled` and `defaultCardId` gate
365
+ * and select, respectively, whether/which card a purchase uses.
366
+ */
367
+ export const PAYMENTS_LOCAL_SETTINGS = [
368
+ 'payments.enabled',
369
+ 'payments.defaultCardId',
370
+ 'payments.currency',
371
+ 'payments.cvvHandling',
372
+ 'payments.budget.dailyItemCents',
373
+ 'payments.budget.dailyOverageCents',
374
+ 'payments.budget.perPurchaseCeilingEnabled',
375
+ 'payments.budget.perPurchaseCeilingCents',
376
+ 'payments.budget.overageToleranceEnabled',
377
+ 'payments.budget.overageToleranceDailyAllowanceCents',
378
+ 'payments.shipping.preferredTier',
379
+ 'payments.billingAddress.name',
380
+ 'payments.billingAddress.line1',
381
+ 'payments.billingAddress.line2',
382
+ 'payments.billingAddress.city',
383
+ 'payments.billingAddress.region',
384
+ 'payments.billingAddress.postalCode',
385
+ 'payments.billingAddress.country',
386
+ 'payments.shippingAddress.name',
387
+ 'payments.shippingAddress.line1',
388
+ 'payments.shippingAddress.line2',
389
+ 'payments.shippingAddress.city',
390
+ 'payments.shippingAddress.region',
391
+ 'payments.shippingAddress.postalCode',
392
+ 'payments.shippingAddress.country',
393
+ 'payments.windows.vetoMinutes',
394
+ 'payments.windows.approvalMinutes',
395
+ 'payments.majorRetailersAdditional',
396
+ 'payments.majorRetailersExcluded',
397
+ 'payments.ebayMinSellerFeedbackCount',
398
+ 'payments.ebayMinSellerPositivePercent',
399
+ 'payments.notifyChannels',
400
+ ] as const;
401
+
303
402
  const SETTINGS_BEHAVIOR_VERIFIED = SETTINGS_BEHAVIOR_BASELINE
304
403
  + FEATURE_KNOB_LOCAL_SETTINGS.length
305
404
  + DEVICE_AND_TRIGGER_LOCAL_SETTINGS.length
306
405
  + CLUSTER_GROUP_LOCAL_SETTINGS.length
307
406
  + DAEMON_MAILBOX_LOCAL_SETTINGS.length
407
+ + PAYMENTS_LOCAL_SETTINGS.length
308
408
  + ENABLEMENT_KEYS_BEHAVIOR_VERIFIED;
309
409
 
310
410
  const EXTERNAL_SLASH_COMMANDS = new Set([
package/src/version.ts CHANGED
@@ -6,7 +6,7 @@ import { join } from 'node:path';
6
6
  // The prebuild script updates the fallback value before compilation.
7
7
  // Uses import.meta.dir (Bun) to locate package.json relative to this file,
8
8
  // which is correct regardless of the process working directory.
9
- let _version = '1.25.0';
9
+ let _version = '1.26.0';
10
10
  try {
11
11
  const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8'));
12
12
  // Only trust a version read from OUR OWN package.json. A Bun single-file