create-principles-disciple 1.147.4 → 1.147.6

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 (177) hide show
  1. package/_release/product-identity.json +1 -1
  2. package/codex-adapter/package.json +1 -1
  3. package/console/dist/server/models/HealthCheckModel.d.ts +0 -1
  4. package/console/dist/server/models/HealthCheckModel.js +0 -54
  5. package/console/dist/server/routes/update.js +5 -8
  6. package/console/dist/server/types/index.d.ts +1 -9
  7. package/console/dist/web/assets/app.js +18 -18
  8. package/core/dist/index.d.ts +1 -1
  9. package/core/dist/index.d.ts.map +1 -1
  10. package/core/dist/index.js +1 -1
  11. package/core/dist/index.js.map +1 -1
  12. package/core/dist/prompt-builder/index.d.ts +0 -1
  13. package/core/dist/prompt-builder/index.d.ts.map +1 -1
  14. package/core/dist/prompt-builder/index.js +0 -1
  15. package/core/dist/prompt-builder/index.js.map +1 -1
  16. package/core/dist/runtime-v2/adapter/output-schema-registry.js +2 -2
  17. package/core/dist/runtime-v2/control-plane-triage.d.ts +1 -1
  18. package/core/dist/runtime-v2/control-plane-triage.d.ts.map +1 -1
  19. package/core/dist/runtime-v2/control-plane-triage.js +0 -15
  20. package/core/dist/runtime-v2/control-plane-triage.js.map +1 -1
  21. package/core/dist/runtime-v2/evidence-triage/observation-resolver.d.ts +3 -6
  22. package/core/dist/runtime-v2/evidence-triage/observation-resolver.d.ts.map +1 -1
  23. package/core/dist/runtime-v2/evidence-triage/observation-resolver.js +5 -10
  24. package/core/dist/runtime-v2/evidence-triage/observation-resolver.js.map +1 -1
  25. package/core/dist/runtime-v2/evidence-triage/source-descriptors.d.ts +2 -1
  26. package/core/dist/runtime-v2/evidence-triage/source-descriptors.d.ts.map +1 -1
  27. package/core/dist/runtime-v2/evidence-triage/source-descriptors.js +3 -8
  28. package/core/dist/runtime-v2/evidence-triage/source-descriptors.js.map +1 -1
  29. package/core/dist/runtime-v2/evidence-triage/types.d.ts +1 -1
  30. package/core/dist/runtime-v2/evidence-triage/types.d.ts.map +1 -1
  31. package/core/dist/runtime-v2/evidence-triage/types.js +0 -1
  32. package/core/dist/runtime-v2/evidence-triage/types.js.map +1 -1
  33. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
  34. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +4 -1
  35. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
  36. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
  37. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +3 -8
  38. package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
  39. package/core/dist/runtime-v2/golden-trace.d.ts.map +1 -1
  40. package/core/dist/runtime-v2/golden-trace.js +0 -1
  41. package/core/dist/runtime-v2/golden-trace.js.map +1 -1
  42. package/core/dist/runtime-v2/index.d.ts +5 -9
  43. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  44. package/core/dist/runtime-v2/index.js +4 -8
  45. package/core/dist/runtime-v2/index.js.map +1 -1
  46. package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts +0 -1
  47. package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts.map +1 -1
  48. package/core/dist/runtime-v2/operator-health-read-model.d.ts +0 -2
  49. package/core/dist/runtime-v2/operator-health-read-model.d.ts.map +1 -1
  50. package/core/dist/runtime-v2/operator-health-read-model.js +1 -55
  51. package/core/dist/runtime-v2/operator-health-read-model.js.map +1 -1
  52. package/core/dist/runtime-v2/signal-collector/confidence-gate.d.ts +1 -5
  53. package/core/dist/runtime-v2/signal-collector/confidence-gate.d.ts.map +1 -1
  54. package/core/dist/runtime-v2/signal-collector/confidence-gate.js +0 -9
  55. package/core/dist/runtime-v2/signal-collector/confidence-gate.js.map +1 -1
  56. package/core/dist/runtime-v2/signal-collector/keyword-stage.d.ts +2 -2
  57. package/core/dist/runtime-v2/signal-collector/keyword-stage.d.ts.map +1 -1
  58. package/core/dist/runtime-v2/signal-collector/keyword-stage.js +6 -10
  59. package/core/dist/runtime-v2/signal-collector/keyword-stage.js.map +1 -1
  60. package/core/dist/runtime-v2/signal-collector/llm-stage.d.ts +1 -1
  61. package/core/dist/runtime-v2/signal-collector/llm-stage.d.ts.map +1 -1
  62. package/core/dist/runtime-v2/signal-collector/llm-stage.js +3 -4
  63. package/core/dist/runtime-v2/signal-collector/llm-stage.js.map +1 -1
  64. package/core/dist/runtime-v2/signal-collector/signal-collector.js +4 -4
  65. package/core/dist/runtime-v2/signal-collector/signal-collector.js.map +1 -1
  66. package/core/dist/runtime-v2/signal-collector/types.d.ts +6 -8
  67. package/core/dist/runtime-v2/signal-collector/types.d.ts.map +1 -1
  68. package/core/dist/runtime-v2/signal-collector/types.js +6 -6
  69. package/core/dist/runtime-v2/signal-collector/types.js.map +1 -1
  70. package/core/dist/runtime-v2/trajectory-schema.d.ts +24 -4
  71. package/core/dist/runtime-v2/trajectory-schema.d.ts.map +1 -1
  72. package/core/dist/runtime-v2/trajectory-schema.js +58 -2
  73. package/core/dist/runtime-v2/trajectory-schema.js.map +1 -1
  74. package/core/dist/runtime-v2/types/event-types.d.ts +0 -35
  75. package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
  76. package/core/dist/runtime-v2/types/event-types.js +0 -19
  77. package/core/dist/runtime-v2/types/event-types.js.map +1 -1
  78. package/core/dist/runtime-v2/types/index.d.ts +2 -2
  79. package/core/dist/runtime-v2/types/index.d.ts.map +1 -1
  80. package/core/dist/runtime-v2/types/index.js +1 -1
  81. package/core/dist/runtime-v2/types/index.js.map +1 -1
  82. package/core/dist/trajectory-types.d.ts +0 -2
  83. package/core/dist/trajectory-types.d.ts.map +1 -1
  84. package/core/package.json +1 -1
  85. package/dist/i18n.d.ts.map +1 -1
  86. package/dist/i18n.js +6 -0
  87. package/dist/i18n.js.map +1 -1
  88. package/dist/installer.d.ts +21 -0
  89. package/dist/installer.d.ts.map +1 -1
  90. package/dist/installer.js +80 -3
  91. package/dist/installer.js.map +1 -1
  92. package/dist/mvp-config.d.ts +2 -2
  93. package/dist/mvp-config.d.ts.map +1 -1
  94. package/dist/mvp-config.js +4 -2
  95. package/dist/mvp-config.js.map +1 -1
  96. package/host-runtime/dist/governance-signal-admission.d.ts +0 -2
  97. package/host-runtime/dist/governance-signal-admission.js +14 -15
  98. package/host-runtime/dist/production-pain-evidence.d.ts +1 -1
  99. package/host-runtime/dist/production-pain-evidence.js +42 -7
  100. package/host-runtime/dist/production-rulehost-gate.d.ts +0 -1
  101. package/host-runtime/dist/production-rulehost-gate.js +3 -4
  102. package/host-runtime/dist/signal-classifier.d.ts +8 -0
  103. package/host-runtime/dist/signal-classifier.js +10 -2
  104. package/host-runtime/package.json +1 -1
  105. package/package.json +3 -3
  106. package/pd-cli/dist/commands/pain-evidence.d.ts +2 -4
  107. package/pd-cli/dist/commands/pain-evidence.d.ts.map +1 -1
  108. package/pd-cli/dist/commands/pain-evidence.js +2 -4
  109. package/pd-cli/dist/commands/pain-evidence.js.map +1 -1
  110. package/pd-cli/dist/commands/runtime-canary.d.ts.map +1 -1
  111. package/pd-cli/dist/commands/runtime-canary.js +2 -68
  112. package/pd-cli/dist/commands/runtime-canary.js.map +1 -1
  113. package/pd-cli/dist/commands/runtime-diagnostics-export.d.ts.map +1 -1
  114. package/pd-cli/dist/commands/runtime-diagnostics-export.js +1 -25
  115. package/pd-cli/dist/commands/runtime-diagnostics-export.js.map +1 -1
  116. package/pd-cli/dist/commands/runtime-health-snapshot.d.ts.map +1 -1
  117. package/pd-cli/dist/commands/runtime-health-snapshot.js +0 -9
  118. package/pd-cli/dist/commands/runtime-health-snapshot.js.map +1 -1
  119. package/pd-cli/dist/index.js +0 -9
  120. package/pd-cli/dist/index.js.map +1 -1
  121. package/pd-mcp-server/dist/version.d.ts +1 -1
  122. package/pd-mcp-server/dist/version.js +1 -1
  123. package/pd-mcp-server/package.json +1 -1
  124. package/plugin/dist/bundle.js +492 -481
  125. package/plugin/dist/config/defaults/runtime.d.ts +0 -4
  126. package/plugin/dist/core/config.d.ts +0 -35
  127. package/plugin/dist/core/pain.d.ts +0 -1
  128. package/plugin/dist/core/session-tracker.d.ts +3 -51
  129. package/plugin/dist/core/signal-collector-host.d.ts +5 -13
  130. package/plugin/dist/core/signal-keyword-store.d.ts +2 -2
  131. package/plugin/dist/core/trajectory.d.ts +0 -2
  132. package/plugin/dist/governance-audit.js +2 -2
  133. package/plugin/dist/hooks/after-tool-call-helpers.d.ts +5 -12
  134. package/plugin/dist/hooks/after-tool-call-types.d.ts +0 -2
  135. package/plugin/dist/hooks/gate-block-helper.d.ts +1 -1
  136. package/plugin/dist/hooks/gate.d.ts +3 -4
  137. package/plugin/dist/hooks/pain.d.ts +4 -4
  138. package/plugin/dist/openclaw.plugin.json +1 -1
  139. package/plugin/dist/rulehost-evidence.js +45 -45
  140. package/plugin/dist/templates/pain_settings.json +0 -46
  141. package/plugin/dist/types/event-types.d.ts +1 -1
  142. package/plugin/openclaw.plugin.json +1 -1
  143. package/plugin/package.json +1 -1
  144. package/plugin/templates/pain_settings.json +0 -46
  145. package/release-manager/dist/i18n.js +6 -0
  146. package/release-manager/dist/installer.js +80 -3
  147. package/release-manager/dist/mvp-config.js +4 -2
  148. package/release-manager/package.json +1 -1
  149. package/workbuddy-adapter/package.json +1 -1
  150. package/core/dist/prompt-builder/attitude-directive.d.ts +0 -7
  151. package/core/dist/prompt-builder/attitude-directive.d.ts.map +0 -1
  152. package/core/dist/prompt-builder/attitude-directive.js +0 -39
  153. package/core/dist/prompt-builder/attitude-directive.js.map +0 -1
  154. package/core/dist/runtime-v2/gfi/gfi-kernel.d.ts +0 -12
  155. package/core/dist/runtime-v2/gfi/gfi-kernel.d.ts.map +0 -1
  156. package/core/dist/runtime-v2/gfi/gfi-kernel.js +0 -148
  157. package/core/dist/runtime-v2/gfi/gfi-kernel.js.map +0 -1
  158. package/core/dist/runtime-v2/gfi/gfi-policy.d.ts +0 -3
  159. package/core/dist/runtime-v2/gfi/gfi-policy.d.ts.map +0 -1
  160. package/core/dist/runtime-v2/gfi/gfi-policy.js +0 -23
  161. package/core/dist/runtime-v2/gfi/gfi-policy.js.map +0 -1
  162. package/core/dist/runtime-v2/gfi/gfi-read-model.d.ts +0 -78
  163. package/core/dist/runtime-v2/gfi/gfi-read-model.d.ts.map +0 -1
  164. package/core/dist/runtime-v2/gfi/gfi-read-model.js +0 -129
  165. package/core/dist/runtime-v2/gfi/gfi-read-model.js.map +0 -1
  166. package/core/dist/runtime-v2/gfi/gfi-types.d.ts +0 -70
  167. package/core/dist/runtime-v2/gfi/gfi-types.d.ts.map +0 -1
  168. package/core/dist/runtime-v2/gfi/gfi-types.js +0 -2
  169. package/core/dist/runtime-v2/gfi/gfi-types.js.map +0 -1
  170. package/core/dist/runtime-v2/gfi/index.d.ts +0 -6
  171. package/core/dist/runtime-v2/gfi/index.d.ts.map +0 -1
  172. package/core/dist/runtime-v2/gfi/index.js +0 -4
  173. package/core/dist/runtime-v2/gfi/index.js.map +0 -1
  174. package/pd-cli/dist/commands/runtime-gfi-snapshot.d.ts +0 -7
  175. package/pd-cli/dist/commands/runtime-gfi-snapshot.d.ts.map +0 -1
  176. package/pd-cli/dist/commands/runtime-gfi-snapshot.js +0 -101
  177. package/pd-cli/dist/commands/runtime-gfi-snapshot.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "productVersion": "2.8.0",
4
- "sourceCommit": "49a91651ab6c755f9074a653998951f4f88c0f43"
4
+ "sourceCommit": "48ab9505979feb0cb13757e30d41d8567715efe1"
5
5
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/codex-adapter",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Codex CLI host adapter for Principles Disciple — implements HostAdapter interface for OpenAI Codex CLI's stdin/stdout JSON hook model (ADR-0020).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -59,7 +59,6 @@ export declare class HealthCheckModel {
59
59
  private checkPainChainFlow;
60
60
  private checkTaskQueue;
61
61
  private checkPrincipleTree;
62
- private checkGfiHealth;
63
62
  private getPipelineTimestamps;
64
63
  private getRuntime;
65
64
  private getPainChain;
@@ -21,7 +21,6 @@ export class HealthCheckModel {
21
21
  checks.push(await this.checkPainChainFlow());
22
22
  checks.push(await this.checkTaskQueue());
23
23
  checks.push(await this.checkPrincipleTree());
24
- checks.push(await this.checkGfiHealth());
25
24
  const hasError = checks.some(c => c.status === 'error');
26
25
  const hasWarning = checks.some(c => c.status === 'warning');
27
26
  const overall = hasError ? 'error' : hasWarning ? 'degraded' : 'healthy';
@@ -222,59 +221,6 @@ export class HealthCheckModel {
222
221
  };
223
222
  }
224
223
  }
225
- async checkGfiHealth() {
226
- try {
227
- const health = await this.getOperatorHealth();
228
- const snapshot = await health.getSnapshot();
229
- const { gfi } = snapshot;
230
- const { active } = gfi;
231
- if (!active) {
232
- return {
233
- id: 'gfi_health',
234
- name: 'GFI 健康度',
235
- status: 'warning',
236
- message: 'GFI 数据不可用',
237
- lastCheck: new Date().toISOString(),
238
- };
239
- }
240
- const currentGfi = active.currentGfi ?? 0;
241
- const threshold = active.policy?.criticalThreshold ?? 80;
242
- if (currentGfi >= threshold) {
243
- return {
244
- id: 'gfi_health',
245
- name: 'GFI 健康度',
246
- status: 'error',
247
- message: `GFI 过高中: ${currentGfi}/${threshold}`,
248
- lastCheck: new Date().toISOString(),
249
- };
250
- }
251
- if (currentGfi >= threshold * 0.8) {
252
- return {
253
- id: 'gfi_health',
254
- name: 'GFI 健康度',
255
- status: 'warning',
256
- message: `GFI 偏高: ${currentGfi}/${threshold}`,
257
- lastCheck: new Date().toISOString(),
258
- };
259
- }
260
- return {
261
- id: 'gfi_health',
262
- name: 'GFI 健康度',
263
- status: 'healthy',
264
- message: `正常: ${currentGfi}/${threshold}`,
265
- lastCheck: new Date().toISOString(),
266
- };
267
- }
268
- catch (e) {
269
- return {
270
- id: 'gfi_health',
271
- name: 'GFI 健康度',
272
- status: 'error',
273
- message: `检查失败: ${e.message}`,
274
- lastCheck: new Date().toISOString(),
275
- };
276
- }
277
- }
278
224
  async getPipelineTimestamps() {
279
225
  try {
280
226
  const runtime = await this.getRuntime();
@@ -5,7 +5,6 @@ import { spawn } from 'node:child_process';
5
5
  import { randomUUID } from 'node:crypto';
6
6
  import { sendSuccess, sendMethodNotAllowed, sendNotFound } from '../utils/response.js';
7
7
  import { appendUpdateHistory } from './update-history.js';
8
- import { readCurrentVersion, resolvePluginDir } from '../utils/installed-layout.js';
9
8
  const REPAIR_ACTION = 'Resolve the reported cause, or run the official installer (npx create-principles-disciple) to repair the installation, then retry.';
10
9
  function appendGovernedUpdateHistory(workspaceDir, entry) {
11
10
  try {
@@ -26,12 +25,11 @@ async function checkUpdate(authority, res) {
26
25
  && typeof installStatus.generation === 'number' && Number.isSafeInteger(installStatus.generation)
27
26
  ? { productVersion: installStatus.productVersion, releaseId: installStatus.releaseId, generation: installStatus.generation }
28
27
  : undefined;
29
- // The plugin-directory copy is read-only (installed-layout P4 authority); a
30
- // divergence is surfaced, never silently resolved (PR-C contract).
31
- const pluginVersion = readCurrentVersion(resolvePluginDir(''));
32
- const identityDivergence = activeIdentity !== undefined && pluginVersion !== undefined && pluginVersion !== activeIdentity.productVersion
33
- ? { activeVersion: activeIdentity.productVersion, pluginVersion, releaseId: activeIdentity.releaseId, generation: activeIdentity.generation }
34
- : undefined;
28
+ // The product version (signed active release) and the plugin package version
29
+ // are independent version planes (RELEASE_PROCESS.md, "The three version
30
+ // planes"): the installer ships the plugin payload while the product version
31
+ // advances on its own cadence. Comparing them is a false alarm on every
32
+ // healthy installation, so this check reports only the active-release identity.
35
33
  // PRI-848 (SPEC §12.1): one explicit state per check. A policy refusal is
36
34
  // `update_blocked` — the candidate EXISTS but a specific problem must be
37
35
  // resolved — never "up to date".
@@ -45,7 +43,6 @@ async function checkUpdate(authority, res) {
45
43
  currentVersion: installStatus?.productVersion ?? 'unknown',
46
44
  latestVersion: check.candidate?.productVersion ?? '',
47
45
  ...(activeIdentity !== undefined ? { versionSource: 'active-release' } : {}),
48
- ...(identityDivergence !== undefined ? { identityDivergence } : {}),
49
46
  ...(!decision.allowed ? { reason: decision.reason, message: decision.message } : {}),
50
47
  });
51
48
  }
@@ -105,8 +105,7 @@ export interface GateBlockItem {
105
105
  toolName: string;
106
106
  filePath: string | null;
107
107
  reason: string;
108
- gateType: 'gfi' | 'stage' | 'p03' | 'other';
109
- gfi: number;
108
+ gateType: 'stage' | 'p03' | 'other';
110
109
  trustStage: number;
111
110
  }
112
111
  export interface EmpathyEvent {
@@ -115,7 +114,6 @@ export interface EmpathyEvent {
115
114
  score: number;
116
115
  reason: string;
117
116
  origin: string;
118
- gfiAfter: number;
119
117
  }
120
118
  export interface SamplePreview {
121
119
  sampleId: string;
@@ -192,12 +190,6 @@ export interface EmpathyEventLogEntry extends EventLogEntry {
192
190
  }
193
191
  export interface OverviewHealthOutput {
194
192
  status: 'healthy' | 'degraded' | 'error';
195
- gfi: {
196
- current: number;
197
- stage: string;
198
- peakToday: number;
199
- threshold: number;
200
- };
201
193
  trust: {
202
194
  stage: number;
203
195
  score: number;