create-principles-disciple 1.144.9 → 1.144.11
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/index.js +13 -3
- package/console/dist/server/models/ApprovalsConsoleModel.d.ts +10 -0
- package/console/dist/server/models/ApprovalsConsoleModel.js +39 -5
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.d.ts +11 -3
- package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +74 -14
- package/console/dist/server/update-timeout.d.ts +1 -0
- package/console/dist/server/update-timeout.js +18 -8
- package/console/dist/shared/prompt-injection-contract.d.ts +16 -1
- package/console/dist/ui/i18n/en.json +8 -3
- package/console/dist/ui/i18n/zh-CN.json +8 -3
- package/console/dist/ui/pages/focus/FocusPage.js +30 -8
- package/console/dist/ui/pages/focus/focus-validation.js +11 -0
- package/console/dist/ui/utils/approval-warning-localization.js +22 -3
- package/console/dist/ui/utils/validators.d.ts +6 -0
- package/console/dist/ui/utils/validators.js +18 -1
- package/console/dist/web/assets/app.css +9 -0
- package/console/dist/web/assets/app.js +11 -13
- package/core/dist/runtime-v2/index.d.ts +8 -2
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +8 -2
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts +26 -11
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.js +59 -52
- package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +9 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +17 -8
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime-v2/recovery-sweep-service.d.ts +13 -0
- package/core/dist/runtime-v2/recovery-sweep-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/recovery-sweep-service.js +43 -29
- package/core/dist/runtime-v2/recovery-sweep-service.js.map +1 -1
- package/core/package.json +1 -1
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +52 -0
- package/dist/installer.js.map +1 -1
- package/host-runtime/dist/prompt-injection-projection.d.ts +50 -0
- package/host-runtime/dist/prompt-injection-projection.js +57 -1
- package/host-runtime/package.json +1 -1
- package/package.json +2 -2
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
- package/pd-cli/dist/commands/diagnose.js +42 -1
- package/pd-cli/dist/commands/diagnose.js.map +1 -1
- package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-retry.js +113 -2
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/plugin/dist/bundle.js +434 -434
- package/plugin/dist/core/workspace-dir-validation.d.ts +11 -0
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/utils/workspace-resolver.d.ts +6 -0
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/release-manager/dist/installer.d.ts.map +1 -1
- package/release-manager/dist/installer.js +52 -0
- package/release-manager/dist/installer.js.map +1 -1
- package/release-manager/package.json +2 -2
|
@@ -49,19 +49,38 @@ export function localizeApprovalWarning(warning, t) {
|
|
|
49
49
|
const base = { code, detail: warning.trim() };
|
|
50
50
|
if (code === 'injection_budget_excluded') {
|
|
51
51
|
const budget = intAfterPrefix(message, '(');
|
|
52
|
-
|
|
52
|
+
// The server reports "<injected>/<eligible> eligible injected"; the digit
|
|
53
|
+
// precedes the label, so parse the ratio directly instead of scanning after it.
|
|
54
|
+
const injectedMatch = /(\d+)\/(\d+) eligible/.exec(message);
|
|
55
|
+
const injectedCount = injectedMatch?.[1] !== undefined ? Number(injectedMatch[1]) : null;
|
|
53
56
|
return {
|
|
54
57
|
...base,
|
|
55
58
|
title: t('pages.focus.approveWarning.budgetExcludedTitle'),
|
|
56
59
|
// PRI-875 precedent: a template with placeholders is only safe to use
|
|
57
60
|
// when every value was parsed — otherwise fall back to the
|
|
58
61
|
// placeholder-free variant so no raw "{{budget}}" ever reaches the UI.
|
|
59
|
-
body: budget !== null &&
|
|
60
|
-
? t('pages.focus.approveWarning.budgetExcludedBody', { budget, earlierCount })
|
|
62
|
+
body: budget !== null && injectedCount !== null
|
|
63
|
+
? t('pages.focus.approveWarning.budgetExcludedBody', { budget, earlierCount: injectedCount })
|
|
61
64
|
: t('pages.focus.approveWarning.budgetExcludedBodySimple'),
|
|
62
65
|
activationAction: true,
|
|
63
66
|
};
|
|
64
67
|
}
|
|
68
|
+
// PRI-935: the activation is merely rotated out of the CURRENT window, not
|
|
69
|
+
// starved. This is the common case on a live fair-rotation workspace and the
|
|
70
|
+
// copy must NOT tell the Owner to deactivate healthy older principles.
|
|
71
|
+
if (code === 'injection_budget_queued') {
|
|
72
|
+
const budget = intAfterPrefix(message, '(');
|
|
73
|
+
const turnsMatch = /within at most (\d+) consecutive user turns/.exec(message);
|
|
74
|
+
const turns = turnsMatch?.[1] !== undefined ? Number(turnsMatch[1]) : null;
|
|
75
|
+
return {
|
|
76
|
+
...base,
|
|
77
|
+
title: t('pages.focus.approveWarning.queuedTitle'),
|
|
78
|
+
body: budget !== null && turns !== null
|
|
79
|
+
? t('pages.focus.approveWarning.queuedBody', { budget, turns })
|
|
80
|
+
: t('pages.focus.approveWarning.queuedBodySimple'),
|
|
81
|
+
activationAction: false,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
65
84
|
if (code === 'injection_excluded_non_budget') {
|
|
66
85
|
return {
|
|
67
86
|
...base,
|
|
@@ -636,6 +636,12 @@ export interface ApprovalGroupData {
|
|
|
636
636
|
principleTitle: string;
|
|
637
637
|
/** Wave 7: human-readable principle text from artifact contentJson, if available */
|
|
638
638
|
candidateDescription?: string;
|
|
639
|
+
/**
|
|
640
|
+
* PRI-935: whether this candidate's own serialized prompt entry fits the
|
|
641
|
+
* injection budget alone. Absent = unknown, which the badge treats as
|
|
642
|
+
* "do not promise rotation".
|
|
643
|
+
*/
|
|
644
|
+
fitsPromptBudget?: boolean;
|
|
639
645
|
status: string;
|
|
640
646
|
records: ApprovalGroupRecordData[];
|
|
641
647
|
}
|
|
@@ -1646,6 +1646,12 @@ function validateApprovalGroup(v) {
|
|
|
1646
1646
|
if (Object.hasOwn(v, 'candidateDescription') && isString(v.candidateDescription) && v.candidateDescription.length > 0) {
|
|
1647
1647
|
result.candidateDescription = v.candidateDescription;
|
|
1648
1648
|
}
|
|
1649
|
+
// PRI-935: optional fitsPromptBudget. Only a real boolean is propagated; a
|
|
1650
|
+
// present-but-wrong value is dropped (rc-1/rc-2) so the badge falls back to
|
|
1651
|
+
// copy that promises nothing rather than rendering an unverified claim.
|
|
1652
|
+
if (Object.hasOwn(v, 'fitsPromptBudget') && typeof v.fitsPromptBudget === 'boolean') {
|
|
1653
|
+
result.fitsPromptBudget = v.fitsPromptBudget;
|
|
1654
|
+
}
|
|
1649
1655
|
return result;
|
|
1650
1656
|
}
|
|
1651
1657
|
export function validatePromptInjectionBudgetStatus(v) {
|
|
@@ -1659,7 +1665,18 @@ export function validatePromptInjectionBudgetStatus(v) {
|
|
|
1659
1665
|
typeof truncated !== 'boolean') {
|
|
1660
1666
|
return null;
|
|
1661
1667
|
}
|
|
1662
|
-
|
|
1668
|
+
const result = { budget, usedChars, truncated };
|
|
1669
|
+
// PRI-935: these are optional so a pre-PRI-935 server payload still
|
|
1670
|
+
// validates (backward compatibility). A present-but-invalid value is
|
|
1671
|
+
// DROPPED, never propagated (rc-1/rc-2): the UI then falls back to
|
|
1672
|
+
// policy-agnostic copy rather than rendering an unverified policy claim.
|
|
1673
|
+
if (Object.hasOwn(v, 'productionRotates') && typeof v.productionRotates === 'boolean') {
|
|
1674
|
+
result.productionRotates = v.productionRotates;
|
|
1675
|
+
}
|
|
1676
|
+
if (Object.hasOwn(v, 'eligibleCount') && typeof v.eligibleCount === 'number' && Number.isInteger(v.eligibleCount) && v.eligibleCount >= 0) {
|
|
1677
|
+
result.eligibleCount = v.eligibleCount;
|
|
1678
|
+
}
|
|
1679
|
+
return result;
|
|
1663
1680
|
}
|
|
1664
1681
|
export function validateApprovalsGrouped(v) {
|
|
1665
1682
|
if (!isObject(v))
|
|
@@ -624,6 +624,9 @@
|
|
|
624
624
|
.h-screen {
|
|
625
625
|
height: 100vh;
|
|
626
626
|
}
|
|
627
|
+
.max-h-40 {
|
|
628
|
+
max-height: calc(var(--spacing) * 40);
|
|
629
|
+
}
|
|
627
630
|
.max-h-64 {
|
|
628
631
|
max-height: calc(var(--spacing) * 64);
|
|
629
632
|
}
|
|
@@ -2162,6 +2165,9 @@
|
|
|
2162
2165
|
.opacity-72 {
|
|
2163
2166
|
opacity: 72%;
|
|
2164
2167
|
}
|
|
2168
|
+
.opacity-80 {
|
|
2169
|
+
opacity: 80%;
|
|
2170
|
+
}
|
|
2165
2171
|
.opacity-100 {
|
|
2166
2172
|
opacity: 100%;
|
|
2167
2173
|
}
|
|
@@ -2404,6 +2410,9 @@
|
|
|
2404
2410
|
--tw-content: '';
|
|
2405
2411
|
content: var(--tw-content);
|
|
2406
2412
|
}
|
|
2413
|
+
.last\:mb-0:last-child {
|
|
2414
|
+
margin-bottom: 0px;
|
|
2415
|
+
}
|
|
2407
2416
|
.last\:border-r-0:last-child {
|
|
2408
2417
|
border-right-style: var(--tw-border-style);
|
|
2409
2418
|
border-right-width: 0px;
|