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.
- package/_release/product-identity.json +1 -1
- package/console/dist/server/routes/failed-tasks.js +84 -1
- package/console/dist/web/assets/app.js +22 -22
- package/core/dist/runtime/activation/ledger-identity.d.ts.map +1 -1
- package/core/dist/runtime/activation/ledger-identity.js +5 -0
- package/core/dist/runtime/activation/ledger-identity.js.map +1 -1
- package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts +6 -0
- package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts.map +1 -1
- package/core/dist/runtime/activation/prompt-activation-reader-contract.js +105 -7
- package/core/dist/runtime/activation/prompt-activation-reader-contract.js.map +1 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts.map +1 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.js +10 -1
- package/core/dist/runtime/adapter/principle-tree-ledger-adapter.js.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts +13 -0
- package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/rollout-reviewer-runner.js +28 -4
- package/core/dist/runtime/internalization/rollout-reviewer-runner.js.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.d.ts.map +1 -1
- package/core/dist/runtime/internalization/scribe-runner.js +25 -3
- package/core/dist/runtime/internalization/scribe-runner.js.map +1 -1
- package/core/dist/runtime/signal-collector/types.d.ts +6 -0
- package/core/dist/runtime/signal-collector/types.d.ts.map +1 -1
- package/core/dist/runtime/signal-collector/types.js.map +1 -1
- package/core/dist/runtime/types/rule-candidate-binding.d.ts +1 -1
- package/core/dist/runtime/types/rule-candidate-binding.d.ts.map +1 -1
- package/core/package.json +1 -1
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -1
- package/dist/installer.d.ts +35 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +82 -1
- package/dist/installer.js.map +1 -1
- package/dist/installers/index.d.ts +31 -0
- package/dist/installers/index.d.ts.map +1 -1
- package/dist/installers/index.js +76 -3
- package/dist/installers/index.js.map +1 -1
- package/dist/update/release-manager.d.ts +1 -1
- package/dist/update/release-manager.d.ts.map +1 -1
- package/dist/update/release-manager.js +45 -2
- package/dist/update/release-manager.js.map +1 -1
- package/host-runtime/dist/active-principle-prompt.js +1 -0
- package/host-runtime/dist/governance-signal-admission.js +12 -0
- package/host-runtime/dist/prompt-activation-deliverability.d.ts +2 -0
- package/host-runtime/dist/prompt-activation-deliverability.js +2 -0
- package/host-runtime/dist/prompt-injection-status.js +1 -0
- package/host-runtime/package.json +1 -1
- package/install-layout/dist/mcp-binding-contract.js +5 -0
- package/install-layout/package.json +1 -1
- package/package.json +3 -3
- package/pd-cli/dist/commands/console.d.ts.map +1 -1
- package/pd-cli/dist/commands/console.js +8 -0
- package/pd-cli/dist/commands/console.js.map +1 -1
- package/pd-cli/dist/services/console-launcher.d.ts +15 -0
- package/pd-cli/dist/services/console-launcher.d.ts.map +1 -1
- package/pd-cli/dist/services/console-launcher.js +7 -1
- package/pd-cli/dist/services/console-launcher.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/pd-mcp-server/dist/version.d.ts +1 -1
- package/pd-mcp-server/dist/version.js +1 -1
- package/pd-mcp-server/package.json +1 -1
- package/plugin/dist/bundle.js +401 -401
- package/plugin/dist/core/mcp-binding.d.ts +3 -1
- package/plugin/dist/core/signal-collector-host.d.ts +19 -1
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/mcp/launcher.cjs +85 -0
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/release-manager/dist/installer.js +82 -1
- package/release-manager/dist/installers/index.js +76 -3
- package/release-manager/dist/update/release-manager.js +45 -2
- package/release-manager/package.json +1 -1
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/mcp/launcher.cjs +85 -0
|
@@ -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;
|