create-principles-disciple 1.145.6 → 1.145.8

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 (102) hide show
  1. package/_release/product-identity.json +2 -2
  2. package/codex-adapter/dist/ingestion/explicit-owner-statement.d.ts +1 -17
  3. package/codex-adapter/dist/ingestion/explicit-owner-statement.js +1 -21
  4. package/console/dist/server/models/CodexGovernanceHealthModel.d.ts +39 -2
  5. package/console/dist/server/models/CodexGovernanceHealthModel.js +228 -29
  6. package/core/dist/runtime-v2/adapter/artificer-l2-adapter.d.ts.map +1 -1
  7. package/core/dist/runtime-v2/adapter/artificer-l2-adapter.js +28 -9
  8. package/core/dist/runtime-v2/adapter/artificer-l2-adapter.js.map +1 -1
  9. package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.d.ts.map +1 -1
  10. package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js +29 -9
  11. package/core/dist/runtime-v2/adapter/l2-agent-loop-adapter.js.map +1 -1
  12. package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +6 -0
  13. package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
  14. package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +105 -1
  15. package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
  16. package/core/dist/runtime-v2/context-payload.d.ts +4 -4
  17. package/core/dist/runtime-v2/context-payload.d.ts.map +1 -1
  18. package/core/dist/runtime-v2/context-payload.js +1 -0
  19. package/core/dist/runtime-v2/context-payload.js.map +1 -1
  20. package/core/dist/runtime-v2/index.d.ts +7 -2
  21. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  22. package/core/dist/runtime-v2/index.js +4 -1
  23. package/core/dist/runtime-v2/index.js.map +1 -1
  24. package/core/dist/runtime-v2/internalization/artificer-intent-preflight.d.ts +154 -0
  25. package/core/dist/runtime-v2/internalization/artificer-intent-preflight.d.ts.map +1 -0
  26. package/core/dist/runtime-v2/internalization/artificer-intent-preflight.js +686 -0
  27. package/core/dist/runtime-v2/internalization/artificer-intent-preflight.js.map +1 -0
  28. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +21 -3
  29. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
  30. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +48 -5
  31. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
  32. package/core/dist/runtime-v2/internalization/artificer-runner.d.ts +17 -0
  33. package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
  34. package/core/dist/runtime-v2/internalization/artificer-runner.js +45 -2
  35. package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
  36. package/core/dist/runtime-v2/internalization/behavior-example-pack.d.ts +0 -19
  37. package/core/dist/runtime-v2/internalization/behavior-example-pack.d.ts.map +1 -1
  38. package/core/dist/runtime-v2/internalization/behavior-example-pack.js +31 -0
  39. package/core/dist/runtime-v2/internalization/behavior-example-pack.js.map +1 -1
  40. package/core/dist/runtime-v2/internalization/intent-contract.d.ts +31 -0
  41. package/core/dist/runtime-v2/internalization/intent-contract.d.ts.map +1 -1
  42. package/core/dist/runtime-v2/internalization/intent-contract.js +42 -0
  43. package/core/dist/runtime-v2/internalization/intent-contract.js.map +1 -1
  44. package/core/dist/runtime-v2/internalization/peer-runner-contracts.d.ts +14 -1
  45. package/core/dist/runtime-v2/internalization/peer-runner-contracts.d.ts.map +1 -1
  46. package/core/dist/runtime-v2/internalization/peer-runner-contracts.js.map +1 -1
  47. package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts +64 -0
  48. package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts.map +1 -1
  49. package/core/dist/runtime-v2/internalization/pitask-metadata.js +84 -0
  50. package/core/dist/runtime-v2/internalization/pitask-metadata.js.map +1 -1
  51. package/core/dist/runtime-v2/internalization/scribe-output.d.ts +13 -1
  52. package/core/dist/runtime-v2/internalization/scribe-output.d.ts.map +1 -1
  53. package/core/dist/runtime-v2/internalization/scribe-output.js +13 -1
  54. package/core/dist/runtime-v2/internalization/scribe-output.js.map +1 -1
  55. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts +15 -1
  56. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.d.ts.map +1 -1
  57. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js +29 -1
  58. package/core/dist/runtime-v2/internalization/scribe-prompt-builder.js.map +1 -1
  59. package/core/dist/runtime-v2/task-status.d.ts +1 -1
  60. package/core/dist/runtime-v2/tools/agent-tool-contract.d.ts +2 -1
  61. package/core/dist/runtime-v2/tools/agent-tool-contract.d.ts.map +1 -1
  62. package/core/dist/runtime-v2/tools/agent-tool-contract.js +1 -1
  63. package/core/dist/runtime-v2/tools/agent-tool-contract.js.map +1 -1
  64. package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts +1 -1
  65. package/core/dist/telemetry-event.d.ts +4 -2
  66. package/core/dist/telemetry-event.d.ts.map +1 -1
  67. package/core/dist/telemetry-event.js +12 -0
  68. package/core/dist/telemetry-event.js.map +1 -1
  69. package/core/package.json +3 -3
  70. package/dist/installers/workbuddy-host-installer.d.ts +10 -3
  71. package/dist/installers/workbuddy-host-installer.d.ts.map +1 -1
  72. package/dist/installers/workbuddy-host-installer.js +400 -39
  73. package/dist/installers/workbuddy-host-installer.js.map +1 -1
  74. package/host-runtime/dist/explicit-owner-statement-prefix.d.ts +17 -0
  75. package/host-runtime/dist/explicit-owner-statement-prefix.js +21 -0
  76. package/host-runtime/dist/governance-signal-admission.d.ts +2 -2
  77. package/host-runtime/dist/governance-signal-admission.js +15 -8
  78. package/host-runtime/dist/index.d.ts +1 -0
  79. package/host-runtime/dist/index.js +1 -0
  80. package/host-runtime/dist/internalization-consumer-cycle.d.ts +10 -1
  81. package/host-runtime/dist/internalization-consumer-cycle.js +85 -4
  82. package/host-runtime/dist/production-rulehost-gate.js +40 -3
  83. package/host-runtime/package.json +1 -1
  84. package/package.json +2 -2
  85. package/plugin/dist/bundle.js +655 -781
  86. package/plugin/dist/openclaw.plugin.json +1 -1
  87. package/plugin/dist/rulehost-evidence.js +27 -27
  88. package/plugin/openclaw.plugin.json +1 -1
  89. package/plugin/package.json +1 -1
  90. package/release-manager/dist/installers/workbuddy-host-installer.d.ts +10 -3
  91. package/release-manager/dist/installers/workbuddy-host-installer.d.ts.map +1 -1
  92. package/release-manager/dist/installers/workbuddy-host-installer.js +400 -39
  93. package/release-manager/dist/installers/workbuddy-host-installer.js.map +1 -1
  94. package/release-manager/package.json +2 -2
  95. package/workbuddy-adapter/dist/explicit-owner-statement.d.ts +3 -0
  96. package/workbuddy-adapter/dist/explicit-owner-statement.js +52 -0
  97. package/workbuddy-adapter/dist/pd-hook.js +31 -7
  98. package/workbuddy-adapter/plugin/scripts/pd-control.cjs +45 -0
  99. package/workbuddy-adapter/plugin/skills/pd-disable/SKILL.md +18 -0
  100. package/workbuddy-adapter/plugin/skills/pd-record-pain/SKILL.md +21 -0
  101. package/workbuddy-adapter/plugin/skills/pd-review/SKILL.md +16 -0
  102. package/workbuddy-adapter/plugin/skills/pd-status/SKILL.md +17 -0
@@ -85,6 +85,13 @@ export function createProductionRuleHostGate(options = {}) {
85
85
  if (action.normalizedPath === null)
86
86
  return { decision: 'allow', source: event.source, metadata: { evaluatedLiveRules: 0 } };
87
87
  let context;
88
+ /**
89
+ * SPEC-RULECODE-QUALITY-001 A3 (Q10): the precise reason a v2 rule is
90
+ * suspended — carried into the skip warning so each fault kind (absent /
91
+ * undefined / invalid / failed / unavailable) is distinguishable in host
92
+ * telemetry instead of merging into one opaque 'unavailable'.
93
+ */
94
+ let contextFault;
88
95
  let enrichment = { currentGfi: 0, epTier: 0, bashRisk: 'unknown' };
89
96
  const request = {
90
97
  workspaceDir: event.context.workspaceDir, sessionId: event.context.sessionId,
@@ -110,6 +117,7 @@ export function createProductionRuleHostGate(options = {}) {
110
117
  const candidate = await withinGateDeadline(options.ruleContextProvider(request), startedAt);
111
118
  if (candidate === undefined) {
112
119
  context = undefined;
120
+ contextFault = 'provider_returned_undefined';
113
121
  }
114
122
  else {
115
123
  const validation = validateRuleContextV2(candidate);
@@ -117,18 +125,27 @@ export function createProductionRuleHostGate(options = {}) {
117
125
  context = candidate;
118
126
  else {
119
127
  context = UNAVAILABLE_RULE_CONTEXT;
128
+ contextFault = 'provider_invalid';
120
129
  addWarning(warnings, `rule_context_invalid: ${validation.errors.join('; ')}`, 'repair the host context provider');
121
130
  }
122
131
  }
123
132
  }
124
133
  catch (error) {
125
134
  context = UNAVAILABLE_RULE_CONTEXT;
135
+ contextFault = 'provider_failed';
126
136
  addWarning(warnings, `rule_context_provider_failed: ${error instanceof Error ? error.message : String(error)}`, 'inspect the host context provider and retry');
127
137
  }
128
138
  }
139
+ else {
140
+ contextFault = 'provider_absent';
141
+ }
129
142
  const dbPath = path.join(event.context.workspaceDir, '.pd', 'state.db');
130
143
  if (remainingGateMs(startedAt) <= 0) {
131
- return { decision: 'allow', source: event.source, warnings: [boundedWarning('gate_deadline_exceeded', 'inspect host context providers and active RuleCode resource use')] };
144
+ // SPEC-RULECODE-QUALITY-001 Q24: a deadline-exhausted allow must be
145
+ // observable as "no rule executed" (evaluatedLiveRules=0), never read
146
+ // as successful governance — isolated probe finding (the early return
147
+ // previously carried no evaluation facts at all).
148
+ return { decision: 'allow', source: event.source, warnings: [boundedWarning('gate_deadline_exceeded', 'inspect host context providers and active RuleCode resource use')], metadata: { evaluatedLiveRules: 0 } };
132
149
  }
133
150
  if (!fs.existsSync(dbPath)) {
134
151
  // Security audit run-1 (gate-failopen-allow-on-state-corruption):
@@ -308,8 +325,28 @@ export function createProductionRuleHostGate(options = {}) {
308
325
  addWarning(warnings, `unsupported_context_version: ${String(content.requiresContextVersion)}`, 'regenerate the rule artifact for context version 2');
309
326
  continue;
310
327
  }
311
- if (!context) {
312
- addWarning(warnings, 'rule_context_v2_unavailable', 'enable and wire the host rule context provider');
328
+ // SPEC-RULECODE-QUALITY-001 A3 / §7.1 (Q10): MANDATORY runtime
329
+ // suspension of context-dependent rules. A v2 rule may only
330
+ // execute when the provider resolved a schema-valid context
331
+ // whose history.status is 'available'. The old check (`!context`)
332
+ // let the truthy UNAVAILABLE_RULE_CONTEXT sentinel (provider
333
+ // invalid/thrown) and schema-valid unavailable contexts through,
334
+ // so a v2 rule without its own self-protection still executed on
335
+ // untrusted input. Skipping happens per-call, per-rule — healthy
336
+ // sibling rules (v1 or well-fed v2) keep evaluating, and no
337
+ // governance state changes. Intentional behavior change vs the
338
+ // pre-fix "legal unavailable still executed" path.
339
+ if (context === undefined || context.history.status !== 'available') {
340
+ // Reference identity against the frozen sentinel distinguishes
341
+ // "the provider faulted" from "the provider legitimately
342
+ // declared history unavailable" (same wire shape, different
343
+ // fault class — Q10 asserts them separately).
344
+ const fault = context === undefined
345
+ ? (contextFault ?? 'provider_absent')
346
+ : context === UNAVAILABLE_RULE_CONTEXT
347
+ ? (contextFault ?? 'provider_invalid')
348
+ : 'history_unavailable';
349
+ addWarning(warnings, `rule_context_v2_unavailable: ${fault} (activation=${activationId})`, 'enable and wire the host rule context provider, or regenerate the rule without context dependence');
313
350
  continue;
314
351
  }
315
352
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/host-runtime",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Shared host-neutral orchestration for Principles Disciple MVP-Core hook paths.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-principles-disciple",
3
- "version": "1.145.6",
3
+ "version": "1.145.8",
4
4
  "description": "Interactive CLI installer for Principles Disciple OpenClaw plugin",
5
5
  "type": "module",
6
6
  "bin": {
@@ -89,6 +89,6 @@
89
89
  "directory": "packages/create-principles-disciple"
90
90
  },
91
91
  "pd": {
92
- "bundledPluginVersion": "2.1.7"
92
+ "bundledPluginVersion": "2.1.8"
93
93
  }
94
94
  }