@ashlr/hub 3.2.7 → 3.3.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 (149) hide show
  1. package/CHANGELOG.md +268 -0
  2. package/README.md +4 -1
  3. package/dist/build-identity.json +2 -2
  4. package/dist/cli/activation.d.ts +41 -0
  5. package/dist/cli/activation.js +485 -0
  6. package/dist/cli/activation.js.map +1 -0
  7. package/dist/cli/audit.js +18 -0
  8. package/dist/cli/audit.js.map +1 -1
  9. package/dist/cli/backlog.d.ts +0 -5
  10. package/dist/cli/backlog.js +18 -0
  11. package/dist/cli/backlog.js.map +1 -1
  12. package/dist/cli/comms.js +20 -0
  13. package/dist/cli/comms.js.map +1 -1
  14. package/dist/cli/completions.d.ts +6 -1
  15. package/dist/cli/completions.js +35 -11
  16. package/dist/cli/completions.js.map +1 -1
  17. package/dist/cli/daemon.js +10 -3
  18. package/dist/cli/daemon.js.map +1 -1
  19. package/dist/cli/demo.d.ts +0 -27
  20. package/dist/cli/demo.js +17 -0
  21. package/dist/cli/demo.js.map +1 -1
  22. package/dist/cli/help.js +19 -3
  23. package/dist/cli/help.js.map +1 -1
  24. package/dist/cli/inbox.d.ts +14 -2
  25. package/dist/cli/inbox.js +137 -23
  26. package/dist/cli/inbox.js.map +1 -1
  27. package/dist/cli/index.d.ts +1 -0
  28. package/dist/cli/index.js +10 -0
  29. package/dist/cli/index.js.map +1 -1
  30. package/dist/cli/onboard.d.ts +0 -13
  31. package/dist/cli/onboard.js +20 -0
  32. package/dist/cli/onboard.js.map +1 -1
  33. package/dist/cli/resources.js +15 -0
  34. package/dist/cli/resources.js.map +1 -1
  35. package/dist/cli/run.js +1 -1
  36. package/dist/cli/run.js.map +1 -1
  37. package/dist/cli/sandbox.js +43 -0
  38. package/dist/cli/sandbox.js.map +1 -1
  39. package/dist/cli/tui.d.ts +0 -6
  40. package/dist/cli/tui.js +14 -0
  41. package/dist/cli/tui.js.map +1 -1
  42. package/dist/core/config.js +70 -0
  43. package/dist/core/config.js.map +1 -1
  44. package/dist/core/daemon/activation-permit.d.ts +268 -33
  45. package/dist/core/daemon/activation-permit.js +1111 -106
  46. package/dist/core/daemon/activation-permit.js.map +1 -1
  47. package/dist/core/daemon/loop.d.ts +13 -1
  48. package/dist/core/daemon/loop.js +192 -9
  49. package/dist/core/daemon/loop.js.map +1 -1
  50. package/dist/core/daemon/runtime-activation-resident-start-protocol.d.ts +141 -0
  51. package/dist/core/daemon/runtime-activation-resident-start-protocol.js +462 -0
  52. package/dist/core/daemon/runtime-activation-resident-start-protocol.js.map +1 -0
  53. package/dist/core/daemon/runtime-activation-resident-start-runtime.d.ts +27 -0
  54. package/dist/core/daemon/runtime-activation-resident-start-runtime.js +28 -0
  55. package/dist/core/daemon/runtime-activation-resident-start-runtime.js.map +1 -0
  56. package/dist/core/daemon/runtime-activation-stopped-consumer.d.ts +139 -0
  57. package/dist/core/daemon/runtime-activation-stopped-consumer.js +995 -0
  58. package/dist/core/daemon/runtime-activation-stopped-consumer.js.map +1 -0
  59. package/dist/core/daemon/runtime-activation-stopped-runtime.d.ts +36 -0
  60. package/dist/core/daemon/runtime-activation-stopped-runtime.js +134 -0
  61. package/dist/core/daemon/runtime-activation-stopped-runtime.js.map +1 -0
  62. package/dist/core/daemon/runtime-activation-transaction.d.ts +41 -17
  63. package/dist/core/daemon/runtime-activation-transaction.js +80 -11
  64. package/dist/core/daemon/runtime-activation-transaction.js.map +1 -1
  65. package/dist/core/daemon/runtime-release-dependency-inventory.js +1 -0
  66. package/dist/core/daemon/runtime-release-dependency-inventory.js.map +1 -1
  67. package/dist/core/daemon/service-install-authority.d.ts +0 -4
  68. package/dist/core/daemon/service-install-authority.js +18 -3
  69. package/dist/core/daemon/service-install-authority.js.map +1 -1
  70. package/dist/core/dashboard.d.ts +10 -0
  71. package/dist/core/dashboard.js +103 -28
  72. package/dist/core/dashboard.js.map +1 -1
  73. package/dist/core/effective-config.js +7 -0
  74. package/dist/core/effective-config.js.map +1 -1
  75. package/dist/core/fleet/automerge-pass.js +33 -0
  76. package/dist/core/fleet/automerge-pass.js.map +1 -1
  77. package/dist/core/fleet/decisions-ledger.js +35 -12
  78. package/dist/core/fleet/decisions-ledger.js.map +1 -1
  79. package/dist/core/fleet/external-skill-git-capture.js +9 -1
  80. package/dist/core/fleet/external-skill-git-capture.js.map +1 -1
  81. package/dist/core/fleet/judge-decision-metadata.d.ts +8 -1
  82. package/dist/core/fleet/judge-decision-metadata.js +14 -1
  83. package/dist/core/fleet/judge-decision-metadata.js.map +1 -1
  84. package/dist/core/fleet/manager.d.ts +15 -1
  85. package/dist/core/fleet/manager.js +108 -30
  86. package/dist/core/fleet/manager.js.map +1 -1
  87. package/dist/core/fleet/post-merge-credit.d.ts +134 -9
  88. package/dist/core/fleet/post-merge-credit.js +350 -10
  89. package/dist/core/fleet/post-merge-credit.js.map +1 -1
  90. package/dist/core/fleet/self-improve.d.ts +34 -1
  91. package/dist/core/fleet/self-improve.js +106 -1
  92. package/dist/core/fleet/self-improve.js.map +1 -1
  93. package/dist/core/fleet/skill-library.d.ts +21 -2
  94. package/dist/core/fleet/skill-library.js +54 -12
  95. package/dist/core/fleet/skill-library.js.map +1 -1
  96. package/dist/core/fleet/status.js +1 -0
  97. package/dist/core/fleet/status.js.map +1 -1
  98. package/dist/core/fleet/worked-ledger.d.ts +22 -0
  99. package/dist/core/fleet/worked-ledger.js +32 -0
  100. package/dist/core/fleet/worked-ledger.js.map +1 -1
  101. package/dist/core/foundry/automerge-scope-policy.d.ts +2 -2
  102. package/dist/core/foundry/automerge-scope-policy.js +9 -2
  103. package/dist/core/foundry/automerge-scope-policy.js.map +1 -1
  104. package/dist/core/goals/store.js +18 -4
  105. package/dist/core/goals/store.js.map +1 -1
  106. package/dist/core/inbox/apply.js +5 -2
  107. package/dist/core/inbox/apply.js.map +1 -1
  108. package/dist/core/inbox/merge.d.ts +94 -1
  109. package/dist/core/inbox/merge.js +349 -16
  110. package/dist/core/inbox/merge.js.map +1 -1
  111. package/dist/core/integrations/github.d.ts +2 -0
  112. package/dist/core/integrations/github.js +2 -1
  113. package/dist/core/integrations/github.js.map +1 -1
  114. package/dist/core/learn/reflect.d.ts +42 -4
  115. package/dist/core/learn/reflect.js +56 -5
  116. package/dist/core/learn/reflect.js.map +1 -1
  117. package/dist/core/run/engines.d.ts +8 -0
  118. package/dist/core/run/engines.js +9 -1
  119. package/dist/core/run/engines.js.map +1 -1
  120. package/dist/core/run/learned-router.js +28 -3
  121. package/dist/core/run/learned-router.js.map +1 -1
  122. package/dist/core/run/orchestrator.d.ts +7 -2
  123. package/dist/core/run/orchestrator.js +86 -60
  124. package/dist/core/run/orchestrator.js.map +1 -1
  125. package/dist/core/swarm/rollback.d.ts +11 -0
  126. package/dist/core/swarm/rollback.js +54 -0
  127. package/dist/core/swarm/rollback.js.map +1 -1
  128. package/dist/core/swarm/runner.js +94 -8
  129. package/dist/core/swarm/runner.js.map +1 -1
  130. package/dist/core/types.d.ts +100 -1
  131. package/dist/core/types.js.map +1 -1
  132. package/dist/core/web/api.js +105 -7
  133. package/dist/core/web/api.js.map +1 -1
  134. package/dist/core/web/control.d.ts +20 -0
  135. package/dist/core/web/control.js +44 -32
  136. package/dist/core/web/control.js.map +1 -1
  137. package/dist/core/web/fleet-status-cache.d.ts +68 -0
  138. package/dist/core/web/fleet-status-cache.js +120 -0
  139. package/dist/core/web/fleet-status-cache.js.map +1 -0
  140. package/dist/core/web/public/next/assets/index-CY0U241s.css +1 -0
  141. package/dist/core/web/public/next/assets/index-Ct0mf8n4.js +69 -0
  142. package/dist/core/web/public/next/assets/index-Ct0mf8n4.js.map +1 -0
  143. package/dist/core/web/public/next/index.html +15 -0
  144. package/dist/release-dependency-inventory.json +1 -1
  145. package/docs/RUNTIME_ACTIVATION_AUTHORITY.md +126 -21
  146. package/docs/contracts/CONTRACT-M521.md +102 -0
  147. package/package.json +20 -3
  148. package/schema/config.schema.json +800 -5
  149. package/node_modules/which/CHANGELOG.md +0 -166
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Frozen production adapter for M521.
3
+ *
4
+ * The privileged broker does not exist in this release. Runtime input cannot
5
+ * register roots, replace this adapter, or turn canonical acknowledgement
6
+ * evidence into start authority.
7
+ */
8
+ import { RUNTIME_ACTIVATION_RESIDENT_START_AUTHORITY, } from './runtime-activation-resident-start-protocol.js';
9
+ export const RUNTIME_ACTIVATION_RESIDENT_START_TRUST_ROOTS = Object.freeze([]);
10
+ export const NATIVE_HOSTILE_PROCESS_CAS_UNAVAILABLE = 'native-hostile-process-cas-unavailable';
11
+ function unavailable() {
12
+ return {
13
+ ok: false,
14
+ reason: NATIVE_HOSTILE_PROCESS_CAS_UNAVAILABLE,
15
+ authority: RUNTIME_ACTIVATION_RESIDENT_START_AUTHORITY,
16
+ trustRootCount: 0,
17
+ acknowledgementAccepted: false,
18
+ serviceStarted: false,
19
+ serviceEnabledChanged: false,
20
+ pointerChanged: false,
21
+ providerEffectsUnblocked: false,
22
+ };
23
+ }
24
+ export const runtimeActivationResidentStartRuntime = Object.freeze({
25
+ roots: RUNTIME_ACTIVATION_RESIDENT_START_TRUST_ROOTS,
26
+ requestNativeResidentStart: unavailable,
27
+ });
28
+ //# sourceMappingURL=runtime-activation-resident-start-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-activation-resident-start-runtime.js","sourceRoot":"","sources":["../../../src/core/daemon/runtime-activation-resident-start-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,2CAA2C,GAE5C,MAAM,iDAAiD,CAAC;AAEzD,MAAM,CAAC,MAAM,6CAA6C,GACO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEnF,MAAM,CAAC,MAAM,sCAAsC,GACjD,wCAAiD,CAAC;AAcpD,SAAS,WAAW;IAClB,OAAO;QACL,EAAE,EAAE,KAAK;QACT,MAAM,EAAE,sCAAsC;QAC9C,SAAS,EAAE,2CAA2C;QACtD,cAAc,EAAE,CAAC;QACjB,uBAAuB,EAAE,KAAK;QAC9B,cAAc,EAAE,KAAK;QACrB,qBAAqB,EAAE,KAAK;QAC5B,cAAc,EAAE,KAAK;QACrB,wBAAwB,EAAE,KAAK;KAChC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,qCAAqC,GAAG,MAAM,CAAC,MAAM,CAAC;IACjE,KAAK,EAAE,6CAA6C;IACpD,0BAA0B,EAAE,WAAW;CACxC,CAAC,CAAC"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Dormant, permit-gated stopped-release activation transaction.
3
+ *
4
+ * This module never starts, bootstraps, kickstarts, enables, or acknowledges a
5
+ * resident service. It may only replace the stopped launchd plist and select an
6
+ * already-admitted immutable release while preserving loaded=false and the
7
+ * exact observed disabled bit. Production trust roots are intentionally empty.
8
+ *
9
+ * The pointer operation is a host-local cooperative CAS: under Ashlr's outward
10
+ * and service lifecycle fences it compares the exact old symlink inode and raw
11
+ * target immediately before an atomic rename, then verifies the new target.
12
+ * It is not a kernel compare-exchange and is not a boundary against a hostile
13
+ * process running under the same UID.
14
+ */
15
+ import { type KeyObject } from 'node:crypto';
16
+ import { activityAllowsStoppedRecovery, observeMaintenanceDefault, type RuntimeActivationStoppedConsumerTrustRoot } from './runtime-activation-stopped-runtime.js';
17
+ import { type ImmutablePrivateRecordStoreConfig } from '../util/immutable-private-record-store.js';
18
+ declare const PROTOCOL: "runtime-activation-stopped-consumer-v1";
19
+ export { RUNTIME_ACTIVATION_STOPPED_CONSUMER_TRUST_ROOTS, type RuntimeActivationStoppedConsumerTrustRoot, } from './runtime-activation-stopped-runtime.js';
20
+ export interface RuntimeActivationStoppedPermitPayloadV1 {
21
+ schemaVersion: 1;
22
+ protocol: typeof PROTOCOL;
23
+ permitId: string;
24
+ keyId: string;
25
+ issuedAt: string;
26
+ expiresAt: string;
27
+ scope: {
28
+ action: 'select-verified-3.2.7-stopped-release';
29
+ maintenance: true;
30
+ killSwitch: 'healthy-engaged';
31
+ providerEffectsBlocked: true;
32
+ serviceLoaded: false;
33
+ serviceStart: false;
34
+ serviceEnable: false;
35
+ residentAcknowledgement: false;
36
+ };
37
+ bindings: {
38
+ activationId: string;
39
+ admissionDigest: string;
40
+ planDigest: string;
41
+ canonicalRequestSha256: string;
42
+ trustRootCanonicalSha256: string;
43
+ candidateRevision: string;
44
+ candidateVersion: '3.2.7';
45
+ rollbackRevision: string;
46
+ priorCurrentTarget: string;
47
+ priorPlistSha256: string;
48
+ priorServiceDisabled: boolean;
49
+ priorServiceLoaded: false;
50
+ };
51
+ }
52
+ export interface RuntimeActivationStoppedPermitEnvelopeV1 {
53
+ payload: RuntimeActivationStoppedPermitPayloadV1;
54
+ signature: string;
55
+ }
56
+ export interface RuntimeActivationStoppedPlan {
57
+ request: {
58
+ signedManifest: {
59
+ payload: {
60
+ planId: string;
61
+ candidate: {
62
+ expectedRevision: string;
63
+ packageVersion: string;
64
+ releaseTag: string;
65
+ };
66
+ rollback: {
67
+ expectedRevision: string;
68
+ };
69
+ execution: {
70
+ homePath: string;
71
+ currentPointerPath: string;
72
+ releasesRoot: string;
73
+ prior: {
74
+ currentRevision: string | null;
75
+ plistSha256: string | null;
76
+ serviceLoaded: false;
77
+ };
78
+ };
79
+ };
80
+ };
81
+ };
82
+ preflight: {
83
+ plan: {
84
+ admissionDigest: string | null;
85
+ planDigest: string | null;
86
+ };
87
+ };
88
+ canonicalRequestSha256: string;
89
+ trustRootCanonicalSha256: string;
90
+ candidateServiceDescriptor: string;
91
+ rollbackServiceDescriptor: string;
92
+ }
93
+ export interface RuntimeActivationStoppedResult {
94
+ activationId: string | null;
95
+ candidateRevision: string | null;
96
+ admissionDigest: string | null;
97
+ planDigest: string | null;
98
+ activated: boolean;
99
+ serviceStarted: false;
100
+ serviceEnabledChanged: false;
101
+ phase: 'blocked' | 'activated-stopped';
102
+ reason: string;
103
+ rollbackRestored: boolean;
104
+ recoveryJournalRetained: boolean;
105
+ recoveryJournalObserved: boolean;
106
+ durableOutcome: 'none' | 'restored-prior' | 'settled-candidate';
107
+ permitId: string | null;
108
+ receiptPath: string | null;
109
+ }
110
+ interface ActivationRecordV1 {
111
+ schemaVersion: 1;
112
+ protocol: typeof PROTOCOL;
113
+ kind: 'claim' | 'receipt';
114
+ permitId: string;
115
+ activationId: string;
116
+ admissionDigest: string;
117
+ planDigest: string;
118
+ candidateRevision: string;
119
+ recordDigest: string;
120
+ }
121
+ export declare function runtimeActivationStoppedConsumerKeyId(publicKey: KeyObject): string;
122
+ export declare function signRuntimeActivationStoppedPermit(payload: RuntimeActivationStoppedPermitPayloadV1, privateKey: KeyObject): RuntimeActivationStoppedPermitEnvelopeV1;
123
+ declare function parsePermit(value: unknown): RuntimeActivationStoppedPermitEnvelopeV1 | null;
124
+ declare function verifyPermit(envelope: RuntimeActivationStoppedPermitEnvelopeV1, roots: readonly RuntimeActivationStoppedConsumerTrustRoot[], nowMs: number): string | null;
125
+ declare function permitPath(homePath: string, activationId: string): string;
126
+ declare function recordStore(homePath: string): ImmutablePrivateRecordStoreConfig<ActivationRecordV1>;
127
+ declare function journalPath(homePath: string): string;
128
+ export declare function recoverStoppedRuntimeReleaseForTransaction(homePath: string): RuntimeActivationStoppedResult | null;
129
+ export declare function consumeStoppedRuntimeReleaseForTransaction(plan: RuntimeActivationStoppedPlan, homePath: string, revalidateAdmission: () => boolean): RuntimeActivationStoppedResult;
130
+ export declare const runtimeActivationStoppedConsumerInternals: {
131
+ PROTOCOL: "runtime-activation-stopped-consumer-v1";
132
+ permitPath: typeof permitPath;
133
+ journalPath: typeof journalPath;
134
+ parsePermit: typeof parsePermit;
135
+ verifyPermit: typeof verifyPermit;
136
+ activityAllowsStoppedRecovery: typeof activityAllowsStoppedRecovery;
137
+ observeMaintenanceDefault: typeof observeMaintenanceDefault;
138
+ recordStore: typeof recordStore;
139
+ };