create-principles-disciple 1.151.0 → 1.152.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 (73) hide show
  1. package/_release/product-identity.json +1 -1
  2. package/console/dist/server/routes/failed-tasks.js +84 -1
  3. package/console/dist/web/assets/app.js +22 -22
  4. package/core/dist/runtime/activation/ledger-identity.d.ts.map +1 -1
  5. package/core/dist/runtime/activation/ledger-identity.js +5 -0
  6. package/core/dist/runtime/activation/ledger-identity.js.map +1 -1
  7. package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts +6 -0
  8. package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts.map +1 -1
  9. package/core/dist/runtime/activation/prompt-activation-reader-contract.js +105 -7
  10. package/core/dist/runtime/activation/prompt-activation-reader-contract.js.map +1 -1
  11. package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts.map +1 -1
  12. package/core/dist/runtime/adapter/principle-tree-ledger-adapter.js +10 -1
  13. package/core/dist/runtime/adapter/principle-tree-ledger-adapter.js.map +1 -1
  14. package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts +13 -0
  15. package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts.map +1 -1
  16. package/core/dist/runtime/internalization/rollout-reviewer-runner.js +28 -4
  17. package/core/dist/runtime/internalization/rollout-reviewer-runner.js.map +1 -1
  18. package/core/dist/runtime/internalization/scribe-runner.d.ts.map +1 -1
  19. package/core/dist/runtime/internalization/scribe-runner.js +25 -3
  20. package/core/dist/runtime/internalization/scribe-runner.js.map +1 -1
  21. package/core/dist/runtime/signal-collector/types.d.ts +6 -0
  22. package/core/dist/runtime/signal-collector/types.d.ts.map +1 -1
  23. package/core/dist/runtime/signal-collector/types.js.map +1 -1
  24. package/core/dist/runtime/types/rule-candidate-binding.d.ts +1 -1
  25. package/core/dist/runtime/types/rule-candidate-binding.d.ts.map +1 -1
  26. package/core/package.json +1 -1
  27. package/dist/index.js +34 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/installer.d.ts +35 -0
  30. package/dist/installer.d.ts.map +1 -1
  31. package/dist/installer.js +82 -1
  32. package/dist/installer.js.map +1 -1
  33. package/dist/installers/index.d.ts +31 -0
  34. package/dist/installers/index.d.ts.map +1 -1
  35. package/dist/installers/index.js +76 -3
  36. package/dist/installers/index.js.map +1 -1
  37. package/dist/update/release-manager.d.ts +1 -1
  38. package/dist/update/release-manager.d.ts.map +1 -1
  39. package/dist/update/release-manager.js +45 -2
  40. package/dist/update/release-manager.js.map +1 -1
  41. package/host-runtime/dist/active-principle-prompt.js +1 -0
  42. package/host-runtime/dist/governance-signal-admission.js +12 -0
  43. package/host-runtime/dist/prompt-activation-deliverability.d.ts +2 -0
  44. package/host-runtime/dist/prompt-activation-deliverability.js +2 -0
  45. package/host-runtime/dist/prompt-injection-status.js +1 -0
  46. package/host-runtime/package.json +1 -1
  47. package/install-layout/dist/mcp-binding-contract.js +5 -0
  48. package/install-layout/package.json +1 -1
  49. package/package.json +3 -3
  50. package/pd-cli/dist/commands/console.d.ts.map +1 -1
  51. package/pd-cli/dist/commands/console.js +8 -0
  52. package/pd-cli/dist/commands/console.js.map +1 -1
  53. package/pd-cli/dist/services/console-launcher.d.ts +15 -0
  54. package/pd-cli/dist/services/console-launcher.d.ts.map +1 -1
  55. package/pd-cli/dist/services/console-launcher.js +7 -1
  56. package/pd-cli/dist/services/console-launcher.js.map +1 -1
  57. package/pd-cli/package.json +1 -1
  58. package/pd-mcp-server/dist/version.d.ts +1 -1
  59. package/pd-mcp-server/dist/version.js +1 -1
  60. package/pd-mcp-server/package.json +1 -1
  61. package/plugin/dist/bundle.js +401 -401
  62. package/plugin/dist/core/mcp-binding.d.ts +3 -1
  63. package/plugin/dist/core/signal-collector-host.d.ts +19 -1
  64. package/plugin/dist/openclaw.plugin.json +1 -1
  65. package/plugin/mcp/launcher.cjs +85 -0
  66. package/plugin/openclaw.plugin.json +1 -1
  67. package/plugin/package.json +1 -1
  68. package/release-manager/dist/installer.js +82 -1
  69. package/release-manager/dist/installers/index.js +76 -3
  70. package/release-manager/dist/update/release-manager.js +45 -2
  71. package/release-manager/package.json +1 -1
  72. package/workbuddy-adapter/package.json +1 -1
  73. package/workbuddy-adapter/plugin/mcp/launcher.cjs +85 -0
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "productVersion": "2.8.6",
4
- "sourceCommit": "d70d277260da6f9ef2fcbecb622501cea504a12c"
4
+ "sourceCommit": "8582e5dde27a582c63f3ad6804675a84c0d0c11e"
5
5
  }
@@ -379,6 +379,58 @@ function optionalString(obj, key) {
379
379
  const value = obj[key];
380
380
  return typeof value === 'string' ? value : null;
381
381
  }
382
+ /** `detail` may itself be a JSON document; expose its useful fields without inventing them. */
383
+ function detailFields(detail) {
384
+ if (detail === null)
385
+ return { missingFields: [], nextAction: null };
386
+ try {
387
+ const parsed = JSON.parse(detail);
388
+ if (!isRecord(parsed))
389
+ return { missingFields: [], nextAction: null };
390
+ return {
391
+ missingFields: toStringArray(parsed.missingFields),
392
+ nextAction: optionalString(parsed, 'nextAction'),
393
+ };
394
+ }
395
+ catch {
396
+ return { missingFields: [], nextAction: null };
397
+ }
398
+ }
399
+ function projectHumanReview(value) {
400
+ const record = asRecord(value);
401
+ if (!record)
402
+ return null;
403
+ const detail = optionalString(record, 'detail');
404
+ const { missingFields, nextAction } = detailFields(detail);
405
+ return {
406
+ reasonCode: optionalString(record, 'reasonCode'),
407
+ detail,
408
+ missingFields,
409
+ nextAction,
410
+ sourceRunId: optionalString(record, 'sourceRunId'),
411
+ sourceArtifactId: optionalString(record, 'sourceArtifactId'),
412
+ createdAt: optionalString(record, 'createdAt'),
413
+ };
414
+ }
415
+ function projectIdentityPreflight(value) {
416
+ const record = asRecord(value);
417
+ if (!record)
418
+ return null;
419
+ const generatedRaw = Object.hasOwn(record, 'generated') ? record.generated : null;
420
+ return {
421
+ status: optionalString(record, 'status'),
422
+ reasonCode: optionalString(record, 'reasonCode') ?? optionalString(record, 'reason'),
423
+ detail: optionalString(record, 'detail') ?? optionalString(record, 'message'),
424
+ nextAction: optionalString(record, 'nextAction'),
425
+ stage: optionalString(record, 'stage'),
426
+ generated: typeof generatedRaw === 'boolean' ? generatedRaw : null,
427
+ };
428
+ }
429
+ function evidenceLine(label, value) {
430
+ if (value === null || value.trim() === '')
431
+ return [];
432
+ return [`${label}: ${value.length > 500 ? `${value.slice(0, 500)}…` : value}`];
433
+ }
382
434
  function projectionFromFailure(failed) {
383
435
  const { attemptCount } = failed;
384
436
  const { maxAttempts } = failed;
@@ -421,17 +473,48 @@ function projectFailureDiagnostics(diagnosticJson) {
421
473
  : outputFailure
422
474
  ? toStringArray(outputFailure.validatorErrors)
423
475
  : [];
476
+ const piMetadata = Object.hasOwn(envelope, 'pi_metadata') ? asRecord(envelope.pi_metadata) : null;
477
+ const humanReview = piMetadata ? projectHumanReview(piMetadata.humanReviewContext) : null;
478
+ const identityPreflight = Object.hasOwn(envelope, 'identityPreflight')
479
+ ? projectIdentityPreflight(envelope.identityPreflight)
480
+ : null;
481
+ const evidenceSummary = [
482
+ ...evidenceLine('humanReview.reasonCode', humanReview?.reasonCode ?? null),
483
+ ...evidenceLine('humanReview.detail', humanReview?.detail ?? null),
484
+ ...evidenceLine('humanReview.missingFields', humanReview && humanReview.missingFields.length > 0 ? humanReview.missingFields.join(', ') : null),
485
+ ...evidenceLine('identityPreflight', identityPreflight
486
+ ? JSON.stringify({
487
+ status: identityPreflight.status,
488
+ reasonCode: identityPreflight.reasonCode,
489
+ detail: identityPreflight.detail,
490
+ stage: identityPreflight.stage,
491
+ generated: identityPreflight.generated,
492
+ })
493
+ : null),
494
+ ...evidenceLine('terminal_failure', terminal ? JSON.stringify(terminal) : null),
495
+ ...evidenceLine('validator_error', effectiveValidatorErrors[effectiveValidatorErrors.length - 1] ?? null),
496
+ ...evidenceLine('failed_stage', failedStage ? JSON.stringify({
497
+ stageTaskId: failedStage.stageTaskId,
498
+ stageTaskKind: failedStage.stageTaskKind,
499
+ errorCategory: failedStage.errorCategory,
500
+ }) : null),
501
+ ].slice(0, 8);
424
502
  const projection = {
425
503
  terminalReason: terminal ? optionalString(terminal, 'reason') : null,
426
504
  terminalErrorCategory: terminal ? optionalString(terminal, 'errorCategory') : null,
427
505
  validatorErrors: effectiveValidatorErrors,
428
506
  failedStage: failedStage ? projectionFromFailure(failedStage) : null,
507
+ humanReview,
508
+ identityPreflight,
509
+ evidenceSummary,
429
510
  };
430
511
  // Nothing to say: behave as if the server never sent the block.
431
512
  if (projection.terminalReason === null
432
513
  && projection.terminalErrorCategory === null
433
514
  && projection.validatorErrors.length === 0
434
- && projection.failedStage === null) {
515
+ && projection.failedStage === null
516
+ && projection.humanReview === null
517
+ && projection.identityPreflight === null) {
435
518
  return null;
436
519
  }
437
520
  return projection;