create-principles-disciple 1.95.0 → 1.96.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/console/dist/server/config/pd-config-store.js +49 -12
- package/console/dist/server/index.js +4 -3
- package/console/dist/server/models/IntentPageModel.d.ts +36 -2
- package/console/dist/server/models/IntentPageModel.js +213 -11
- package/console/dist/server/routes/intent.d.ts +5 -1
- package/console/dist/server/routes/intent.js +200 -12
- package/console/dist/types.d.ts +1 -0
- package/console/dist/ui/App.js +0 -53
- package/console/dist/ui/api.d.ts +18 -4
- package/console/dist/ui/api.js +38 -5
- package/console/dist/ui/components/layout/app-sidebar.js +12 -12
- package/console/dist/ui/components/ui/badge.d.ts +1 -1
- package/console/dist/ui/i18n/en.json +142 -3
- package/console/dist/ui/i18n/zh-CN.json +142 -3
- package/console/dist/ui/pages/control-center/AgentCard.d.ts +31 -0
- package/console/dist/ui/pages/control-center/AgentCard.js +156 -0
- package/console/dist/ui/pages/control-center/AgentGroup.d.ts +26 -0
- package/console/dist/ui/pages/control-center/AgentGroup.js +38 -0
- package/console/dist/ui/pages/control-center/ControlCenterPage.js +77 -41
- package/console/dist/ui/pages/control-center/WorkflowDiagram.d.ts +17 -0
- package/console/dist/ui/pages/control-center/WorkflowDiagram.js +55 -0
- package/console/dist/ui/pages/intent/IntentOnboarding.d.ts +67 -0
- package/console/dist/ui/pages/intent/IntentOnboarding.js +289 -0
- package/console/dist/ui/pages/intent/IntentPage.js +117 -6
- package/console/dist/ui/utils/agent-metadata.d.ts +58 -0
- package/console/dist/ui/utils/agent-metadata.js +275 -0
- package/console/dist/ui/utils/control-center-helpers.d.ts +19 -0
- package/console/dist/ui/utils/control-center-helpers.js +37 -0
- package/console/dist/ui/utils/validators.d.ts +37 -0
- package/console/dist/ui/utils/validators.js +130 -0
- package/console/dist/web/assets/app.css +360 -3
- package/console/dist/web/assets/app.js +2703 -894
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +27 -35
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js +85 -7
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js +70 -0
- package/core/dist/runtime-v2/__tests__/golden-trace-replay-validator.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/golden-trace.test.js +136 -1
- package/core/dist/runtime-v2/__tests__/golden-trace.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/v2-adversarial-cases.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/v2-adversarial-cases.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/v2-adversarial-cases.test.js +211 -0
- package/core/dist/runtime-v2/__tests__/v2-adversarial-cases.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js +93 -0
- package/core/dist/runtime-v2/activation/writers/__tests__/rule-host-writer.test.js.map +1 -1
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts +11 -0
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js +22 -0
- package/core/dist/runtime-v2/activation/writers/rule-host-writer.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/rulecode-context-v2-flag.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/rulecode-context-v2-flag.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/rulecode-context-v2-flag.test.js +74 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/rulecode-context-v2-flag.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.js +246 -0
- package/core/dist/runtime-v2/feature-flags/__tests__/surface-guard-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +7 -0
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/index.d.ts +2 -0
- package/core/dist/runtime-v2/feature-flags/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/feature-flags/index.js +2 -0
- package/core/dist/runtime-v2/feature-flags/index.js.map +1 -1
- package/{plugin/dist/core/surface-guard.d.ts → core/dist/runtime-v2/feature-flags/surface-guard-policy.d.ts} +15 -5
- package/core/dist/runtime-v2/feature-flags/surface-guard-policy.d.ts.map +1 -0
- package/{plugin/dist/core/surface-guard.js → core/dist/runtime-v2/feature-flags/surface-guard-policy.js} +14 -2
- package/core/dist/runtime-v2/feature-flags/surface-guard-policy.js.map +1 -0
- package/core/dist/runtime-v2/golden-trace-replay-validator.js +1 -1
- package/core/dist/runtime-v2/golden-trace-replay-validator.js.map +1 -1
- package/core/dist/runtime-v2/golden-trace.d.ts +19 -3
- package/core/dist/runtime-v2/golden-trace.d.ts.map +1 -1
- package/core/dist/runtime-v2/golden-trace.js +2 -0
- package/core/dist/runtime-v2/golden-trace.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +15 -3
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +11 -2
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/intent/__tests__/intent-doc-version.test.d.ts +2 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc-version.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc-version.test.js +88 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc-version.test.js.map +1 -0
- package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.js +91 -1
- package/core/dist/runtime-v2/intent/__tests__/intent-doc.test.js.map +1 -1
- package/core/dist/runtime-v2/intent/index.d.ts +2 -0
- package/core/dist/runtime-v2/intent/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/intent/index.js +2 -0
- package/core/dist/runtime-v2/intent/index.js.map +1 -1
- package/core/dist/runtime-v2/intent/intent-browser.d.ts +23 -0
- package/core/dist/runtime-v2/intent/intent-browser.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-browser.js +21 -0
- package/core/dist/runtime-v2/intent/intent-browser.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc-version.d.ts +28 -0
- package/core/dist/runtime-v2/intent/intent-doc-version.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc-version.js +21 -0
- package/core/dist/runtime-v2/intent/intent-doc-version.js.map +1 -0
- package/core/dist/runtime-v2/intent/intent-doc.d.ts +17 -1
- package/core/dist/runtime-v2/intent/intent-doc.d.ts.map +1 -1
- package/core/dist/runtime-v2/intent/intent-doc.js +95 -7
- package/core/dist/runtime-v2/intent/intent-doc.js.map +1 -1
- package/core/dist/runtime-v2/intent/intent-hash.d.ts +2 -0
- package/core/dist/runtime-v2/intent/intent-hash.d.ts.map +1 -0
- package/core/dist/runtime-v2/intent/intent-hash.js +10 -0
- package/core/dist/runtime-v2/intent/intent-hash.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +41 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.js +130 -2
- package/core/dist/runtime-v2/internalization/__tests__/artificer-rule-output.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.js +228 -0
- package/core/dist/runtime-v2/internalization/__tests__/behavior-example-pack.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js +41 -11
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js +135 -0
- package/core/dist/runtime-v2/internalization/__tests__/refiner-sandbox-wrapper.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.d.ts +2 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.js +449 -0
- package/core/dist/runtime-v2/internalization/__tests__/rule-context-v2.test.js.map +1 -0
- package/core/dist/runtime-v2/internalization/adversarial-case.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/adversarial-case.js +24 -0
- package/core/dist/runtime-v2/internalization/adversarial-case.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts +10 -0
- package/core/dist/runtime-v2/internalization/artificer-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-output.js +45 -0
- package/core/dist/runtime-v2/internalization/artificer-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +2 -2
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +7 -2
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
- package/core/dist/runtime-v2/internalization/behavior-example-pack.d.ts +66 -0
- package/core/dist/runtime-v2/internalization/behavior-example-pack.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/behavior-example-pack.js +183 -0
- package/core/dist/runtime-v2/internalization/behavior-example-pack.js.map +1 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts +8 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-output.js +10 -0
- package/core/dist/runtime-v2/internalization/evaluator-output.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +17 -0
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +118 -24
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js +1 -1
- package/core/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js.map +1 -1
- package/core/dist/runtime-v2/internalization/rule-context-v2.d.ts +61 -0
- package/core/dist/runtime-v2/internalization/rule-context-v2.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-context-v2.js +301 -0
- package/core/dist/runtime-v2/internalization/rule-context-v2.js.map +1 -0
- package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts +9 -0
- package/core/dist/runtime-v2/internalization/rule-host-contracts.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/v2-adversarial-cases.d.ts +55 -0
- package/core/dist/runtime-v2/internalization/v2-adversarial-cases.d.ts.map +1 -0
- package/core/dist/runtime-v2/internalization/v2-adversarial-cases.js +131 -0
- package/core/dist/runtime-v2/internalization/v2-adversarial-cases.js.map +1 -0
- package/core/dist/runtime-v2/pain-signal-observability.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-observability.js +24 -1
- package/core/dist/runtime-v2/pain-signal-observability.js.map +1 -1
- package/core/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.d.ts +2 -0
- package/core/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.js +95 -0
- package/core/dist/runtime-v2/risk/__tests__/risk-calculator-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/risk/index.d.ts +7 -0
- package/core/dist/runtime-v2/risk/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/risk/index.js +6 -0
- package/core/dist/runtime-v2/risk/index.js.map +1 -0
- package/core/dist/runtime-v2/risk/risk-calculator-policy.d.ts +18 -0
- package/core/dist/runtime-v2/risk/risk-calculator-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/risk/risk-calculator-policy.js +47 -0
- package/core/dist/runtime-v2/risk/risk-calculator-policy.js.map +1 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-doc-version-store.test.d.ts +2 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-doc-version-store.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-doc-version-store.test.js +83 -0
- package/core/dist/runtime-v2/store/intent/__tests__/sqlite-intent-doc-version-store.test.js.map +1 -0
- package/core/dist/runtime-v2/store/intent/index.d.ts +2 -1
- package/core/dist/runtime-v2/store/intent/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/intent/index.js +2 -1
- package/core/dist/runtime-v2/store/intent/index.js.map +1 -1
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.d.ts +28 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.d.ts.map +1 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.js +88 -0
- package/core/dist/runtime-v2/store/intent/sqlite-intent-doc-version-store.js.map +1 -0
- package/core/dist/runtime-v2/store/sqlite-connection.d.ts.map +1 -1
- package/core/dist/runtime-v2/store/sqlite-connection.js +14 -0
- package/core/dist/runtime-v2/store/sqlite-connection.js.map +1 -1
- package/core/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.d.ts +2 -0
- package/core/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.js +149 -0
- package/core/dist/runtime-v2/thinking-models/__tests__/thinking-models-policy.test.js.map +1 -0
- package/core/dist/runtime-v2/thinking-models/index.d.ts +3 -0
- package/core/dist/runtime-v2/thinking-models/index.d.ts.map +1 -0
- package/core/dist/runtime-v2/thinking-models/index.js +3 -0
- package/core/dist/runtime-v2/thinking-models/index.js.map +1 -0
- package/core/dist/runtime-v2/thinking-models/thinking-models-policy.d.ts +73 -0
- package/core/dist/runtime-v2/thinking-models/thinking-models-policy.d.ts.map +1 -0
- package/core/dist/runtime-v2/thinking-models/thinking-models-policy.js +227 -0
- package/core/dist/runtime-v2/thinking-models/thinking-models-policy.js.map +1 -0
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js +40 -1
- package/core/dist/runtime-v2/tools/__tests__/artificer-l2-tool-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts.map +1 -1
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js +28 -1
- package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js.map +1 -1
- package/core/dist/runtime-v2/tools/artificer-output-typebox.d.ts +3 -0
- package/core/dist/runtime-v2/tools/artificer-output-typebox.d.ts.map +1 -1
- package/core/dist/runtime-v2/tools/artificer-output-typebox.js +3 -0
- package/core/dist/runtime-v2/tools/artificer-output-typebox.js.map +1 -1
- package/core/package.json +4 -0
- package/package.json +1 -1
- package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.js +74 -3
- package/pd-cli/dist/commands/__tests__/intent-flag-wiring.test.js.map +1 -1
- package/pd-cli/dist/commands/intent.d.ts +21 -4
- package/pd-cli/dist/commands/intent.d.ts.map +1 -1
- package/pd-cli/dist/commands/intent.js +88 -27
- package/pd-cli/dist/commands/intent.js.map +1 -1
- package/plugin/dist/commands/pain.js +2 -2
- package/plugin/dist/core/behavior-example-pack-assembler.d.ts +43 -0
- package/plugin/dist/core/behavior-example-pack-assembler.js +247 -0
- package/plugin/dist/core/intent-doc-reader-adapter.d.ts +13 -5
- package/plugin/dist/core/intent-doc-reader-adapter.js +25 -5
- package/plugin/dist/core/intent-doc-reader.d.ts +13 -4
- package/plugin/dist/core/intent-doc-reader.js +45 -24
- package/plugin/dist/core/rule-context-assembler.d.ts +45 -0
- package/plugin/dist/core/rule-context-assembler.js +148 -0
- package/plugin/dist/core/thinking-models.d.ts +12 -57
- package/plugin/dist/core/thinking-models.js +18 -224
- package/plugin/dist/core/trajectory-types.d.ts +18 -0
- package/plugin/dist/core/trajectory.d.ts +34 -2
- package/plugin/dist/core/trajectory.js +103 -0
- package/plugin/dist/hooks/gate.js +59 -2
- package/plugin/dist/hooks/pain.js +2 -2
- package/plugin/dist/hooks/prompt.js +2 -1
- package/plugin/dist/index.js +1 -1
- package/plugin/dist/core/evolution-migration.d.ts +0 -5
- package/plugin/dist/core/evolution-migration.js +0 -65
- package/plugin/dist/core/risk-calculator.d.ts +0 -22
- package/plugin/dist/core/risk-calculator.js +0 -88
- package/plugin/dist/core/rule-host-helpers.d.ts +0 -8
- package/plugin/dist/core/rule-host-helpers.js +0 -7
- package/plugin/dist/core/rule-host-types.d.ts +0 -7
- package/plugin/dist/core/rule-host-types.js +0 -7
- package/plugin/dist/core/schema/db-types.d.ts +0 -11
- package/plugin/dist/core/schema/db-types.js +0 -5
- package/plugin/dist/core/schema/index.d.ts +0 -17
- package/plugin/dist/core/schema/index.js +0 -15
- package/plugin/dist/core/schema/migration-runner.d.ts +0 -53
- package/plugin/dist/core/schema/migration-runner.js +0 -170
- package/plugin/dist/core/schema/migrations/001-init-trajectory.d.ts +0 -6
- package/plugin/dist/core/schema/migrations/001-init-trajectory.js +0 -190
- package/plugin/dist/core/schema/migrations/002-init-central.d.ts +0 -5
- package/plugin/dist/core/schema/migrations/002-init-central.js +0 -108
- package/plugin/dist/core/schema/migrations/003-init-workflow.d.ts +0 -5
- package/plugin/dist/core/schema/migrations/003-init-workflow.js +0 -50
- package/plugin/dist/core/schema/migrations/004-add-thinking-and-gfi.d.ts +0 -8
- package/plugin/dist/core/schema/migrations/004-add-thinking-and-gfi.js +0 -66
- package/plugin/dist/core/schema/migrations/index.d.ts +0 -16
- package/plugin/dist/core/schema/migrations/index.js +0 -27
- package/plugin/dist/core/schema/schema-definitions.d.ts +0 -46
- package/plugin/dist/core/schema/schema-definitions.js +0 -599
- package/plugin/scripts/db-migrate.mjs +0 -170
package/console/dist/ui/App.js
CHANGED
|
@@ -38,59 +38,6 @@ function AuthRoutes() {
|
|
|
38
38
|
useEffect(() => {
|
|
39
39
|
verifyAuth();
|
|
40
40
|
}, [verifyAuth]);
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
if (authed !== true)
|
|
43
|
-
return;
|
|
44
|
-
const handleKeyDown = (e) => {
|
|
45
|
-
if (!e.altKey)
|
|
46
|
-
return;
|
|
47
|
-
const target = e.target;
|
|
48
|
-
if (target &&
|
|
49
|
-
(target.tagName === "INPUT" ||
|
|
50
|
-
target.tagName === "TEXTAREA" ||
|
|
51
|
-
target.tagName === "SELECT" ||
|
|
52
|
-
target.isContentEditable)) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
let targetPath = null;
|
|
56
|
-
switch (e.key) {
|
|
57
|
-
case "3":
|
|
58
|
-
targetPath = "/focus";
|
|
59
|
-
break;
|
|
60
|
-
case "4":
|
|
61
|
-
targetPath = "/pain";
|
|
62
|
-
break;
|
|
63
|
-
case "5":
|
|
64
|
-
targetPath = "/principles";
|
|
65
|
-
break;
|
|
66
|
-
case "6":
|
|
67
|
-
targetPath = "/activation";
|
|
68
|
-
break;
|
|
69
|
-
case "7":
|
|
70
|
-
targetPath = "/debt";
|
|
71
|
-
break;
|
|
72
|
-
case "8":
|
|
73
|
-
targetPath = "/control-center";
|
|
74
|
-
break;
|
|
75
|
-
case "9":
|
|
76
|
-
targetPath = "/report-problem";
|
|
77
|
-
break;
|
|
78
|
-
case "0":
|
|
79
|
-
targetPath = "/settings";
|
|
80
|
-
break;
|
|
81
|
-
default:
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
if (targetPath) {
|
|
85
|
-
e.preventDefault();
|
|
86
|
-
navigate(targetPath);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
90
|
-
return () => {
|
|
91
|
-
window.removeEventListener("keydown", handleKeyDown);
|
|
92
|
-
};
|
|
93
|
-
}, [authed, navigate]);
|
|
94
41
|
useEffect(() => {
|
|
95
42
|
if (!showSplash)
|
|
96
43
|
return;
|
package/console/dist/ui/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ApiResponse } from "../types.js";
|
|
2
|
-
import type { FeedbackReportData, FeedbackDraftSummaryData, FeedbackDraftEnvelopeData, DeleteEnvelopeData, WorkspaceEntryData, RemovedEnvelopeData, SyncResultData, ConfigSummaryData, ConfigCatalogData, AgentBindingUpdateData, DefaultRuntimeUpdateData, FeatureFlagUpdateData, OutputLanguageData, GovernanceQueueData, ActivationsData, DisableActivationData, LifecycleMetricsData, UpdateStatusData, UpdateHistoryData, ApplyUpdateResultData, RollbackResultData, ApprovalRecordData, PrinciplesListData, ApprovalsGroupedData, EvidenceChainData, TrajectoryData, IntentSummaryData, IntentDecisionRecordData, IntentDecisionResultData, IntentDecisionSummaryData, FollowUpResponseData } from "./utils/validators.js";
|
|
2
|
+
import type { FeedbackReportData, FeedbackDraftSummaryData, FeedbackDraftEnvelopeData, DeleteEnvelopeData, WorkspaceEntryData, RemovedEnvelopeData, SyncResultData, ConfigSummaryData, ConfigCatalogData, AgentBindingUpdateData, DefaultRuntimeUpdateData, FeatureFlagUpdateData, OutputLanguageData, GovernanceQueueData, ActivationsData, DisableActivationData, LifecycleMetricsData, UpdateStatusData, UpdateHistoryData, ApplyUpdateResultData, RollbackResultData, ApprovalRecordData, PrinciplesListData, ApprovalsGroupedData, EvidenceChainData, TrajectoryData, IntentSummaryData, IntentDecisionRecordData, IntentDecisionResultData, IntentDecisionSummaryData, FollowUpResponseData, IntentInitResultData, IntentSaveResultData, IntentRawContentData, IntentVersionData } from "./utils/validators.js";
|
|
3
3
|
declare function getToken(): string | null;
|
|
4
4
|
declare function setToken(token: string): void;
|
|
5
5
|
declare function clearToken(): void;
|
|
@@ -39,7 +39,21 @@ declare function fetchUpdateHistory(): Promise<ApiResponse<UpdateHistoryData>>;
|
|
|
39
39
|
declare function applyUpdate(): Promise<ApiResponse<ApplyUpdateResultData>>;
|
|
40
40
|
declare function rollbackUpdate(backupDir: string): Promise<ApiResponse<RollbackResultData>>;
|
|
41
41
|
declare function fetchEvidenceChain(): Promise<ApiResponse<EvidenceChainData>>;
|
|
42
|
-
declare function fetchIntentSummary(): Promise<ApiResponse<IntentSummaryData>>;
|
|
42
|
+
declare function fetchIntentSummary(lang?: 'zh-CN' | 'en'): Promise<ApiResponse<IntentSummaryData>>;
|
|
43
|
+
/**
|
|
44
|
+
* Fetch raw INTENT.md content for editing via GET /api/v1/intent/content.
|
|
45
|
+
*/
|
|
46
|
+
declare function fetchIntentContent(lang?: 'zh-CN' | 'en'): Promise<ApiResponse<IntentRawContentData>>;
|
|
47
|
+
/**
|
|
48
|
+
* Create INTENT.md from the SPEC §7 template via POST /api/v1/intent/init.
|
|
49
|
+
* Does NOT overwrite an existing file unless force=true.
|
|
50
|
+
*/
|
|
51
|
+
declare function createIntentTemplate(force?: boolean, lang?: 'zh-CN' | 'en'): Promise<ApiResponse<IntentInitResultData>>;
|
|
52
|
+
/**
|
|
53
|
+
* Save user-edited INTENT.md content via PUT /api/v1/intent/content.
|
|
54
|
+
*/
|
|
55
|
+
declare function saveIntentContent(content: string, lang?: 'zh-CN' | 'en'): Promise<ApiResponse<IntentSaveResultData>>;
|
|
56
|
+
declare function fetchIntentVersions(lang?: 'zh-CN' | 'en'): Promise<ApiResponse<IntentVersionData>>;
|
|
43
57
|
/**
|
|
44
58
|
* Frontend-friendly payload for recording an Owner decision on an intent tension.
|
|
45
59
|
* Field names match the server's `IntentDecisionInput` contract (SPEC §21.7).
|
|
@@ -77,8 +91,8 @@ export interface FollowUpPayload {
|
|
|
77
91
|
candidateId?: string;
|
|
78
92
|
}
|
|
79
93
|
declare function dispatchFollowUp(decisionId: string, payload: FollowUpPayload): Promise<ApiResponse<FollowUpResponseData>>;
|
|
80
|
-
export { getToken, setToken, clearToken, checkAuth, approveApproval, rejectApproval, editApproval, fetchPrinciples, fetchPrincipleDetail, fetchPrincipleTrajectory, archivePrinciple, unarchivePrinciple, createFeedbackReport, listFeedbackReports, getFeedbackReport, deleteFeedbackReport, fetchConfigSummary, fetchConfigCatalog, updateAgentBinding, updateDefaultRuntime, patchFeatureFlag, fetchOutputLanguage, updateOutputLanguage, fetchWorkspaces, addWorkspace, removeWorkspace, syncWorkspace, fetchGovernanceQueue, fetchApprovalsGrouped, fetchAllActivations, disableActivation, fetchLifecycleMetrics, fetchUpdateStatus, fetchUpdateHistory, applyUpdate, rollbackUpdate, fetchEvidenceChain, fetchIntentSummary, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
81
|
-
export type { FeedbackReportData, FeedbackDraftSummaryData, FeedbackDraftEnvelopeData, DeleteEnvelopeData, WorkspaceEntryData, RemovedEnvelopeData, SyncResultData, ConfigSummaryData, ConfigCatalogData, AgentBindingUpdateData, DefaultRuntimeUpdateData, FeatureFlagUpdateData, OutputLanguageData, GovernanceQueueData, ActivationsData, DisableActivationData, LifecycleMetricsData, UpdateStatusData, UpdateHistoryData, ApplyUpdateResultData, RollbackResultData, ApprovalRecordData, PrinciplesListData, ApprovalsGroupedData, EvidenceChainData, EvidenceChainRecordData, EvidenceChainStateData, TrajectoryData, TrajectoryStageData, IntentSummaryData, IntentSectionsData, IntentDocWarningData, IntentDecisionRecordData, IntentDecisionResultData, IntentDecisionSummaryData, FollowUpResponseData, LinkCandidateFollowUpData, GuideRulehostFollowUpData, GeneratePatchProposalFollowUpData, } from "./utils/validators.js";
|
|
94
|
+
export { getToken, setToken, clearToken, checkAuth, approveApproval, rejectApproval, editApproval, fetchPrinciples, fetchPrincipleDetail, fetchPrincipleTrajectory, archivePrinciple, unarchivePrinciple, createFeedbackReport, listFeedbackReports, getFeedbackReport, deleteFeedbackReport, fetchConfigSummary, fetchConfigCatalog, updateAgentBinding, updateDefaultRuntime, patchFeatureFlag, fetchOutputLanguage, updateOutputLanguage, fetchWorkspaces, addWorkspace, removeWorkspace, syncWorkspace, fetchGovernanceQueue, fetchApprovalsGrouped, fetchAllActivations, disableActivation, fetchLifecycleMetrics, fetchUpdateStatus, fetchUpdateHistory, applyUpdate, rollbackUpdate, fetchEvidenceChain, fetchIntentSummary, fetchIntentContent, createIntentTemplate, saveIntentContent, fetchIntentVersions, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
95
|
+
export type { FeedbackReportData, FeedbackDraftSummaryData, FeedbackDraftEnvelopeData, DeleteEnvelopeData, WorkspaceEntryData, RemovedEnvelopeData, SyncResultData, ConfigSummaryData, ConfigCatalogData, AgentBindingUpdateData, DefaultRuntimeUpdateData, FeatureFlagUpdateData, OutputLanguageData, GovernanceQueueData, ActivationsData, DisableActivationData, LifecycleMetricsData, UpdateStatusData, UpdateHistoryData, ApplyUpdateResultData, RollbackResultData, ApprovalRecordData, PrinciplesListData, ApprovalsGroupedData, EvidenceChainData, EvidenceChainRecordData, EvidenceChainStateData, TrajectoryData, TrajectoryStageData, IntentSummaryData, IntentSectionsData, IntentDocWarningData, IntentDecisionRecordData, IntentDecisionResultData, IntentDecisionSummaryData, FollowUpResponseData, LinkCandidateFollowUpData, GuideRulehostFollowUpData, GeneratePatchProposalFollowUpData, IntentVersionEntry, IntentVersionData, } from "./utils/validators.js";
|
|
82
96
|
export type { ActivationRecordData as ActivationRecord } from "./utils/validators.js";
|
|
83
97
|
export type { ApprovalRecordData as ApprovalRecord } from "./utils/validators.js";
|
|
84
98
|
export type { WorkspaceEntryData as WorkspaceEntry } from "./utils/validators.js";
|
package/console/dist/ui/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { validateErrorResponse, validateHeaders, validateFeedbackReport, validateFeedbackDraftsList, validateFeedbackDraftEnvelope, validateDeleteEnvelope, validateWorkspaceEntry, validateWorkspaceList, validateRemovedEnvelope, validateSyncResult, validateConfigSummary, validateConfigCatalog, validateAgentBindingUpdate, validateDefaultRuntimeUpdate, validateFeatureFlagUpdate, validateOutputLanguage, validateGovernanceQueue, validateActivations, validateDisableActivation, validateLifecycleMetrics, validateUpdateStatus, validateUpdateHistory, validateApplyUpdateResult, validateRollbackResult, validateApprovalRecordDirect, validatePrinciplesList, validateApprovalsGrouped, validateEvidenceChain, validateTrajectoryData, validateIntentSummary, validateIntentDecisionList, validateIntentDecisionResult, validateIntentDecisionSummary, validateFollowUpResponse, } from "./utils/validators.js";
|
|
1
|
+
import { validateErrorResponse, validateHeaders, validateFeedbackReport, validateFeedbackDraftsList, validateFeedbackDraftEnvelope, validateDeleteEnvelope, validateWorkspaceEntry, validateWorkspaceList, validateRemovedEnvelope, validateSyncResult, validateConfigSummary, validateConfigCatalog, validateAgentBindingUpdate, validateDefaultRuntimeUpdate, validateFeatureFlagUpdate, validateOutputLanguage, validateGovernanceQueue, validateActivations, validateDisableActivation, validateLifecycleMetrics, validateUpdateStatus, validateUpdateHistory, validateApplyUpdateResult, validateRollbackResult, validateApprovalRecordDirect, validatePrinciplesList, validateApprovalsGrouped, validateEvidenceChain, validateTrajectoryData, validateIntentSummary, validateIntentDecisionList, validateIntentDecisionResult, validateIntentDecisionSummary, validateFollowUpResponse, validateIntentInitResult, validateIntentSaveResult, validateIntentRawContent, validateIntentVersions, } from "./utils/validators.js";
|
|
2
2
|
// ── Auth ──────────────────────────────────────────────────────────────────────
|
|
3
3
|
function getToken() {
|
|
4
4
|
return sessionStorage.getItem("pd_token");
|
|
@@ -37,6 +37,7 @@ async function request(path, options, validate) {
|
|
|
37
37
|
}
|
|
38
38
|
let errorMessage = `HTTP ${response.status}`;
|
|
39
39
|
let nextAction;
|
|
40
|
+
let reason;
|
|
40
41
|
try {
|
|
41
42
|
const raw = await response.json();
|
|
42
43
|
const parsed = validateErrorResponse(raw);
|
|
@@ -47,6 +48,9 @@ async function request(path, options, validate) {
|
|
|
47
48
|
else if (parsed.error) {
|
|
48
49
|
errorMessage = parsed.error;
|
|
49
50
|
}
|
|
51
|
+
if (parsed.reason) {
|
|
52
|
+
({ reason } = parsed);
|
|
53
|
+
}
|
|
50
54
|
if (parsed.nextAction) {
|
|
51
55
|
({ nextAction } = parsed);
|
|
52
56
|
}
|
|
@@ -55,7 +59,7 @@ async function request(path, options, validate) {
|
|
|
55
59
|
catch {
|
|
56
60
|
// ignore parse errors
|
|
57
61
|
}
|
|
58
|
-
return { success: false, error: errorMessage, nextAction };
|
|
62
|
+
return { success: false, error: errorMessage, reason, nextAction };
|
|
59
63
|
}
|
|
60
64
|
const raw = await response.json();
|
|
61
65
|
const apiData = (raw && typeof raw === "object" && "success" in raw && "data" in raw)
|
|
@@ -250,8 +254,37 @@ async function fetchEvidenceChain() {
|
|
|
250
254
|
return request('/api/v1/evidence-chain', undefined, validateEvidenceChain);
|
|
251
255
|
}
|
|
252
256
|
// ── Intent Summary (PRI-466) ─────────────────────────────────────────────────
|
|
253
|
-
async function fetchIntentSummary() {
|
|
254
|
-
return request(
|
|
257
|
+
async function fetchIntentSummary(lang = 'zh-CN') {
|
|
258
|
+
return request(`/api/v1/intent?lang=${lang}`, undefined, validateIntentSummary);
|
|
259
|
+
}
|
|
260
|
+
// ── Intent Init / Edit (PRI-477 onboarding) ──────────────────────────────────
|
|
261
|
+
/**
|
|
262
|
+
* Fetch raw INTENT.md content for editing via GET /api/v1/intent/content.
|
|
263
|
+
*/
|
|
264
|
+
async function fetchIntentContent(lang = 'zh-CN') {
|
|
265
|
+
return request(`/api/v1/intent/content?lang=${lang}`, undefined, validateIntentRawContent);
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Create INTENT.md from the SPEC §7 template via POST /api/v1/intent/init.
|
|
269
|
+
* Does NOT overwrite an existing file unless force=true.
|
|
270
|
+
*/
|
|
271
|
+
async function createIntentTemplate(force = false, lang = 'zh-CN') {
|
|
272
|
+
return request(`/api/v1/intent/init?lang=${lang}`, {
|
|
273
|
+
method: 'POST',
|
|
274
|
+
body: JSON.stringify({ force }),
|
|
275
|
+
}, validateIntentInitResult);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Save user-edited INTENT.md content via PUT /api/v1/intent/content.
|
|
279
|
+
*/
|
|
280
|
+
async function saveIntentContent(content, lang = 'zh-CN') {
|
|
281
|
+
return request(`/api/v1/intent/content?lang=${lang}`, {
|
|
282
|
+
method: 'PUT',
|
|
283
|
+
body: JSON.stringify({ content }),
|
|
284
|
+
}, validateIntentSaveResult);
|
|
285
|
+
}
|
|
286
|
+
async function fetchIntentVersions(lang = 'zh-CN') {
|
|
287
|
+
return request(`/api/v1/intent/versions?lang=${lang}`, undefined, validateIntentVersions);
|
|
255
288
|
}
|
|
256
289
|
async function recordIntentDecision(payload) {
|
|
257
290
|
return request('/api/v1/intent-decisions', {
|
|
@@ -275,4 +308,4 @@ async function dispatchFollowUp(decisionId, payload) {
|
|
|
275
308
|
}, validateFollowUpResponse);
|
|
276
309
|
}
|
|
277
310
|
// ── Exports ───────────────────────────────────────────────────────────────────
|
|
278
|
-
export { getToken, setToken, clearToken, checkAuth, approveApproval, rejectApproval, editApproval, fetchPrinciples, fetchPrincipleDetail, fetchPrincipleTrajectory, archivePrinciple, unarchivePrinciple, createFeedbackReport, listFeedbackReports, getFeedbackReport, deleteFeedbackReport, fetchConfigSummary, fetchConfigCatalog, updateAgentBinding, updateDefaultRuntime, patchFeatureFlag, fetchOutputLanguage, updateOutputLanguage, fetchWorkspaces, addWorkspace, removeWorkspace, syncWorkspace, fetchGovernanceQueue, fetchApprovalsGrouped, fetchAllActivations, disableActivation, fetchLifecycleMetrics, fetchUpdateStatus, fetchUpdateHistory, applyUpdate, rollbackUpdate, fetchEvidenceChain, fetchIntentSummary, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
311
|
+
export { getToken, setToken, clearToken, checkAuth, approveApproval, rejectApproval, editApproval, fetchPrinciples, fetchPrincipleDetail, fetchPrincipleTrajectory, archivePrinciple, unarchivePrinciple, createFeedbackReport, listFeedbackReports, getFeedbackReport, deleteFeedbackReport, fetchConfigSummary, fetchConfigCatalog, updateAgentBinding, updateDefaultRuntime, patchFeatureFlag, fetchOutputLanguage, updateOutputLanguage, fetchWorkspaces, addWorkspace, removeWorkspace, syncWorkspace, fetchGovernanceQueue, fetchApprovalsGrouped, fetchAllActivations, disableActivation, fetchLifecycleMetrics, fetchUpdateStatus, fetchUpdateHistory, applyUpdate, rollbackUpdate, fetchEvidenceChain, fetchIntentSummary, fetchIntentContent, createIntentTemplate, saveIntentContent, fetchIntentVersions, recordIntentDecision, listIntentDecisionsByPainId, listIntentDecisionsByTaskId, fetchIntentDecisionSummary, dispatchFollowUp, };
|
|
@@ -10,18 +10,18 @@ function ThresholdMark({ className }) {
|
|
|
10
10
|
return (_jsxs("svg", { viewBox: "0 0 28 28", className: className, fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: [_jsx("path", { d: "M6 4V24M22 4V24M2 14H26", strokeLinecap: "square" }), _jsx("circle", { cx: "14", cy: "14", r: "2.5", fill: "currentColor", stroke: "none" })] }));
|
|
11
11
|
}
|
|
12
12
|
const mainNavItems = [
|
|
13
|
-
{ id: "focus", labelKey: "components.sidebar.focus", href: "/focus", icon: Focus
|
|
14
|
-
{ id: "pain", labelKey: "components.sidebar.pain", href: "/pain", icon: AlertTriangle
|
|
15
|
-
{ id: "principles", labelKey: "components.sidebar.principles", href: "/principles", icon: BookOpen
|
|
16
|
-
{ id: "activation", labelKey: "components.sidebar.activation", href: "/activation", icon: Zap
|
|
17
|
-
{ id: "debt", labelKey: "components.sidebar.debt", href: "/debt", icon: Archive
|
|
18
|
-
{ id: "intent", labelKey: "components.sidebar.intent", href: "/intent", icon: Compass
|
|
13
|
+
{ id: "focus", labelKey: "components.sidebar.focus", href: "/focus", icon: Focus },
|
|
14
|
+
{ id: "pain", labelKey: "components.sidebar.pain", href: "/pain", icon: AlertTriangle },
|
|
15
|
+
{ id: "principles", labelKey: "components.sidebar.principles", href: "/principles", icon: BookOpen },
|
|
16
|
+
{ id: "activation", labelKey: "components.sidebar.activation", href: "/activation", icon: Zap },
|
|
17
|
+
{ id: "debt", labelKey: "components.sidebar.debt", href: "/debt", icon: Archive },
|
|
18
|
+
{ id: "intent", labelKey: "components.sidebar.intent", href: "/intent", icon: Compass },
|
|
19
19
|
];
|
|
20
20
|
const toolNavItems = [
|
|
21
|
-
{ id: "control-center", labelKey: "components.sidebar.controlCenter", href: "/control-center", icon: Settings
|
|
22
|
-
{ id: "report-problem", labelKey: "components.sidebar.reportProblem", href: "/report-problem", icon: MessageSquare
|
|
23
|
-
{ id: "settings", labelKey: "components.sidebar.settings", href: "/settings", icon: Settings
|
|
24
|
-
{ id: "update", labelKey: "components.sidebar.update", href: "/update", icon: RefreshCw
|
|
21
|
+
{ id: "control-center", labelKey: "components.sidebar.controlCenter", href: "/control-center", icon: Settings },
|
|
22
|
+
{ id: "report-problem", labelKey: "components.sidebar.reportProblem", href: "/report-problem", icon: MessageSquare },
|
|
23
|
+
{ id: "settings", labelKey: "components.sidebar.settings", href: "/settings", icon: Settings },
|
|
24
|
+
{ id: "update", labelKey: "components.sidebar.update", href: "/update", icon: RefreshCw },
|
|
25
25
|
];
|
|
26
26
|
export function AppSidebar() {
|
|
27
27
|
const location = useLocation();
|
|
@@ -48,12 +48,12 @@ export function AppSidebar() {
|
|
|
48
48
|
const active = isActive(item.href);
|
|
49
49
|
return (_jsxs(Link, { to: item.href, "data-testid": `nav-${item.id}`, className: cn("flex items-center gap-3 px-3 py-2 rounded-[var(--radius-sm)] text-[13px] transition-all duration-150", active
|
|
50
50
|
? "border-l-2 border-l-gov bg-paper-2 text-ink"
|
|
51
|
-
: "border-l-2 border-l-transparent text-ink-3 hover:text-ink hover:bg-paper-2"), children: [_jsx(Icon, { className: "h-4 w-4 flex-shrink-0", "aria-hidden": "true" }), _jsx("span", { className: "flex-1", children: t(item.labelKey) }), item.id === "focus" && pendingCount > 0 ? (_jsx("span", { className: "ml-auto h-2 w-2 rotate-45 rounded-[1px] border border-rose-400/50 bg-rose-400/15 shadow-[0_0_3px_rgba(251,113,133,0.35)]", role: "status", "aria-label": t("components.sidebar.pendingApprovalsAria", { count: pendingCount }) })) :
|
|
51
|
+
: "border-l-2 border-l-transparent text-ink-3 hover:text-ink hover:bg-paper-2"), children: [_jsx(Icon, { className: "h-4 w-4 flex-shrink-0", "aria-hidden": "true" }), _jsx("span", { className: "flex-1", children: t(item.labelKey) }), item.id === "focus" && pendingCount > 0 ? (_jsx("span", { className: "ml-auto h-2 w-2 rotate-45 rounded-[1px] border border-rose-400/50 bg-rose-400/15 shadow-[0_0_3px_rgba(251,113,133,0.35)]", role: "status", "aria-label": t("components.sidebar.pendingApprovalsAria", { count: pendingCount }) })) : null] }, item.id));
|
|
52
52
|
}) }), _jsxs("div", { className: "mt-4 pt-3 border-t border-line mx-4", children: [_jsx("div", { className: "px-1 pb-1 text-[10px] font-mono tracking-[0.1em] uppercase text-ink-4", children: "Tools" }), _jsx("div", { className: "px-0", children: toolNavItems.map((item) => {
|
|
53
53
|
const Icon = item.icon;
|
|
54
54
|
const active = isActive(item.href);
|
|
55
55
|
return (_jsxs(Link, { to: item.href, "data-testid": `nav-${item.id}`, className: cn("flex items-center gap-3 px-3 py-1.5 rounded-[var(--radius-sm)] text-[12px] transition-all duration-150", active
|
|
56
56
|
? "border-l-2 border-l-gov bg-paper-2 text-ink"
|
|
57
|
-
: "border-l-2 border-l-transparent text-ink-4 hover:text-ink-3 hover:bg-paper-2"), children: [_jsx(Icon, { className: "h-3.5 w-3.5 flex-shrink-0", "aria-hidden": "true" }), _jsx("span", { className: "flex-1", children: t(item.labelKey) }), item.id === "control-center" && degradedCount > 0 ? (_jsx("span", { className: "ml-auto h-[7px] w-[7px] rotate-45 rounded-[1px] border border-amber-400/50 bg-amber-400/15 shadow-[0_0_3px_rgba(251,191,36,0.35)]", role: "status", "aria-label": t("components.sidebar.degradedSignalsAria", { count: degradedCount }) })) :
|
|
57
|
+
: "border-l-2 border-l-transparent text-ink-4 hover:text-ink-3 hover:bg-paper-2"), children: [_jsx(Icon, { className: "h-3.5 w-3.5 flex-shrink-0", "aria-hidden": "true" }), _jsx("span", { className: "flex-1", children: t(item.labelKey) }), item.id === "control-center" && degradedCount > 0 ? (_jsx("span", { className: "ml-auto h-[7px] w-[7px] rotate-45 rounded-[1px] border border-amber-400/50 bg-amber-400/15 shadow-[0_0_3px_rgba(251,191,36,0.35)]", role: "status", "aria-label": t("components.sidebar.degradedSignalsAria", { count: degradedCount }) })) : null] }, item.id));
|
|
58
58
|
}) })] })] }), _jsxs("div", { className: "px-3 py-3 border-t border-line space-y-1", children: [_jsxs("button", { type: "button", onClick: () => setTheme(theme === "dark" ? "light" : "dark"), className: "flex items-center gap-3 px-3 py-1.5 rounded-[var(--radius-sm)] text-[12px] text-ink-4 hover:text-ink-3 hover:bg-paper-2 transition-colors w-full", title: theme === "dark" ? "切换亮色模式" : "切换暗色模式", children: [theme === "dark" ? (_jsx(Sun, { className: "h-3.5 w-3.5 flex-shrink-0", "aria-hidden": "true" })) : (_jsx(Moon, { className: "h-3.5 w-3.5 flex-shrink-0", "aria-hidden": "true" })), _jsx("span", { children: theme === "dark" ? "亮色模式" : "暗色模式" })] }), _jsxs("button", { type: "button", onClick: toggleLanguage, className: "flex items-center gap-3 px-3 py-1.5 rounded-[var(--radius-sm)] text-[12px] text-ink-4 hover:text-ink-3 hover:bg-paper-2 transition-colors w-full", title: "\u5207\u6362\u8BED\u8A00", children: [_jsx(Languages, { className: "h-3.5 w-3.5 flex-shrink-0", "aria-hidden": "true" }), _jsx("span", { children: i18n.language === "zh-CN" ? "English" : "中文" })] }), _jsxs("button", { type: "button", onClick: handleSignOut, className: "flex items-center gap-3 px-3 py-1.5 rounded-[var(--radius-sm)] text-[12px] text-ink-4 hover:text-ink-3 hover:bg-paper-2 transition-colors w-full", children: [_jsx(LogOut, { className: "h-3.5 w-3.5 flex-shrink-0", "aria-hidden": "true" }), _jsx("span", { children: "\u9000\u51FA" })] })] })] }));
|
|
59
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "amber" | "green" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
|
@@ -650,9 +650,55 @@
|
|
|
650
650
|
"readinessLabel": "Readiness",
|
|
651
651
|
"empathyCostHint": {
|
|
652
652
|
"body": "Empathy Observer is on — every unmatched message triggers an LLM call (current model: {{provider}}/{{model}}).",
|
|
653
|
-
"muted": "To reduce cost, switch pd-empathy-observer.policy.model in workflows.yaml to a cheaper model.",
|
|
653
|
+
"muted": "To reduce cost, consider using a local LLM model (e.g. Ollama), or switch pd-empathy-observer.policy.model in workflows.yaml to a cheaper model.",
|
|
654
654
|
"ack": "Got it"
|
|
655
|
-
}
|
|
655
|
+
},
|
|
656
|
+
"workflow": {
|
|
657
|
+
"title": "PD Behavior Loop",
|
|
658
|
+
"subtitle": "From error to principle, from principle to change",
|
|
659
|
+
"phase01": "Detect Error",
|
|
660
|
+
"phase01Desc": "Observe Agent behavior\nIdentify patterns to improve",
|
|
661
|
+
"phase02": "Form Principle",
|
|
662
|
+
"phase02Desc": "Distill experience into\na followable principle",
|
|
663
|
+
"phase03": "Owner Approval",
|
|
664
|
+
"phase03Desc": "You decide which principles\ncan take effect",
|
|
665
|
+
"phase04": "Change Behavior",
|
|
666
|
+
"phase04Desc": "Principle acts on\nAgent's next behavior",
|
|
667
|
+
"loopHint": "After behavior changes, PD keeps observing — forming a closed loop. 9 agents are distributed across this loop, each with its own role."
|
|
668
|
+
},
|
|
669
|
+
"status": {
|
|
670
|
+
"enabled": "Enabled",
|
|
671
|
+
"notReady": "Not Ready",
|
|
672
|
+
"corePipeline": "Core Pipeline",
|
|
673
|
+
"corePipelineOk": "OK",
|
|
674
|
+
"corePipelineDegraded": "Degraded",
|
|
675
|
+
"corePipelineParalyzed": "Paralyzed",
|
|
676
|
+
"needsConfig": "Needs Config"
|
|
677
|
+
},
|
|
678
|
+
"groups": {
|
|
679
|
+
"coreTrio": "Core Trio",
|
|
680
|
+
"coreTrioTag": "Must together",
|
|
681
|
+
"coreTrioHint": "Disabling any one breaks the error-to-principle pipeline",
|
|
682
|
+
"codeChain": "Code Chain",
|
|
683
|
+
"codeChainTag": "Recommend together",
|
|
684
|
+
"codeChainHint": "Only artificer degrades to prompt-only; only evaluator is meaningless",
|
|
685
|
+
"qualityPolish": "Quality Polish",
|
|
686
|
+
"qualityPolishTag": "Optional · toggle individually",
|
|
687
|
+
"qualityPolishHint": "Refines principles; disabling is fine, just slightly rougher quality",
|
|
688
|
+
"sidechain": "Sidechain",
|
|
689
|
+
"sidechainTag": "Independent · toggle individually",
|
|
690
|
+
"sidechainHint": "Does not affect the main pipeline; only pain signal detection precision"
|
|
691
|
+
},
|
|
692
|
+
"impact": {
|
|
693
|
+
"label": "If disabled",
|
|
694
|
+
"confirmTitle": "Confirm disabling core agent",
|
|
695
|
+
"confirmAck": "Confirm disable",
|
|
696
|
+
"confirmCancel": "Cancel"
|
|
697
|
+
},
|
|
698
|
+
"techDetail": "Technical Details",
|
|
699
|
+
"profileLabelShort": "Runtime",
|
|
700
|
+
"unknownAgentsWarning": "Detected {{count}} unrecognized agent(s): {{names}}. They are not shown in groups.",
|
|
701
|
+
"footerNote": "9 agents are distributed across the internalization pipeline and sidechain services. The Core Trio must be enabled together — otherwise PD cannot turn errors into principles."
|
|
656
702
|
},
|
|
657
703
|
"login": {
|
|
658
704
|
"title": "Login",
|
|
@@ -730,7 +776,55 @@
|
|
|
730
776
|
"notFound": {
|
|
731
777
|
"title": "No INTENT.md found",
|
|
732
778
|
"description": "PD did not find an INTENT.md file in the .principles/ directory. Without this anchor, intent-grounded diagnosis cannot run.",
|
|
733
|
-
"nextAction": "Run: pd intent init --confirm --workspace <path>"
|
|
779
|
+
"nextAction": "Run: pd intent init --confirm --workspace <path>",
|
|
780
|
+
"createButton": "Create INTENT.md",
|
|
781
|
+
"creating": "Creating…",
|
|
782
|
+
"createFailed": "Creation failed, please try again later",
|
|
783
|
+
"createSuccess": "INTENT.md created. You can start filling in your intent."
|
|
784
|
+
},
|
|
785
|
+
"onboarding": {
|
|
786
|
+
"title": "Welcome to Intent Engineering",
|
|
787
|
+
"subtitle": "Before we begin, let's understand what intent engineering is",
|
|
788
|
+
"whatIsIt": {
|
|
789
|
+
"title": "What is Intent Engineering?",
|
|
790
|
+
"description": "INTENT.md is your long-term intent anchor — recording your goals, non-negotiable boundaries, and when to stop and escalate. It helps PD align with your true intent at key decision points."
|
|
791
|
+
},
|
|
792
|
+
"whyYouFill": {
|
|
793
|
+
"title": "Why do you need to fill it in?",
|
|
794
|
+
"description": "Intent is Owner-owned. PD will not auto-generate intent because only you know the project's real goals and boundaries. This is your decision authority; PD only helps you execute and align."
|
|
795
|
+
},
|
|
796
|
+
"sectionGuide": {
|
|
797
|
+
"title": "5-section guide",
|
|
798
|
+
"description": "INTENT.md contains 5 sections, each with a clear purpose:",
|
|
799
|
+
"sections": {
|
|
800
|
+
"why": "Why — the fundamental motivation for this project",
|
|
801
|
+
"desiredOutcome": "Desired Outcome — the specific results you want to achieve",
|
|
802
|
+
"nonNegotiables": "Non-Negotiables — boundaries that must never be violated",
|
|
803
|
+
"stopEscalation": "Stop / Escalation — when to stop the current action and escalate to you",
|
|
804
|
+
"currentStrategicFocus": "Current Strategic Focus — phase-specific priorities"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
"skipOption": "Skip guide, create empty template to fill in later",
|
|
808
|
+
"startFilling": "Start filling",
|
|
809
|
+
"skip": "Skip",
|
|
810
|
+
"close": "Close",
|
|
811
|
+
"dontShowAgain": "Don't show again"
|
|
812
|
+
},
|
|
813
|
+
"editor": {
|
|
814
|
+
"title": "Edit INTENT.md",
|
|
815
|
+
"description": "Edit your intent document directly in the browser. Changes take effect immediately after saving.",
|
|
816
|
+
"placeholder": "Enter INTENT.md content here (Markdown format)…",
|
|
817
|
+
"save": "Save",
|
|
818
|
+
"saving": "Saving…",
|
|
819
|
+
"cancel": "Cancel",
|
|
820
|
+
"edit": "Edit",
|
|
821
|
+
"saveSuccess": "INTENT.md saved",
|
|
822
|
+
"saveFailed": "Save failed, please try again later",
|
|
823
|
+
"emptyContent": "Content cannot be empty",
|
|
824
|
+
"oversized": "Content exceeds 32KB limit, please trim and retry",
|
|
825
|
+
"confirmDiscard": "You have unsaved changes. Discard them?",
|
|
826
|
+
"yes": "Yes, discard changes",
|
|
827
|
+
"no": "Continue editing"
|
|
734
828
|
},
|
|
735
829
|
"oversized": {
|
|
736
830
|
"title": "INTENT.md exceeds 32KB",
|
|
@@ -775,6 +869,51 @@
|
|
|
775
869
|
"lastDecisionAtLabel": "Last decision",
|
|
776
870
|
"noDecisions": "No decisions recorded yet",
|
|
777
871
|
"loadError": "Failed to load decision summary"
|
|
872
|
+
},
|
|
873
|
+
"langSelector": {
|
|
874
|
+
"ariaLabel": "Select INTENT.md language",
|
|
875
|
+
"disabledWhileEditing": "Save or cancel your edit before switching language"
|
|
876
|
+
},
|
|
877
|
+
"versionHistory": {
|
|
878
|
+
"title": "Version History",
|
|
879
|
+
"reasonInit": "Initialized",
|
|
880
|
+
"reasonSave": "Saved"
|
|
881
|
+
},
|
|
882
|
+
"wizard": {
|
|
883
|
+
"progressLabel": "Step {{current}}/5",
|
|
884
|
+
"next": "Next",
|
|
885
|
+
"prev": "Previous",
|
|
886
|
+
"finish": "Finish",
|
|
887
|
+
"review": "Review",
|
|
888
|
+
"complete": "Complete",
|
|
889
|
+
"cancel": "Cancel",
|
|
890
|
+
"emptyWarning": "This section cannot be empty. Please fill it in before continuing.",
|
|
891
|
+
"stepLabels": {
|
|
892
|
+
"why": "1. Why",
|
|
893
|
+
"desiredOutcome": "2. Desired Outcome",
|
|
894
|
+
"nonNegotiables": "3. Non-negotiables",
|
|
895
|
+
"stopEscalation": "4. Stop / Escalation",
|
|
896
|
+
"currentStrategicFocus": "5. Current Strategic Focus"
|
|
897
|
+
},
|
|
898
|
+
"guidance": {
|
|
899
|
+
"why": "Explain why this project matters. What does the Owner care about? What happens if it is not solved?",
|
|
900
|
+
"desiredOutcome": "Describe an observable change. After completion, what will be better?",
|
|
901
|
+
"nonNegotiables": "List hard constraints that cannot be violated (compliance / safety / boundaries).",
|
|
902
|
+
"stopEscalation": "Under what circumstances should the Agent stop and escalate to the Owner instead of pushing forward?",
|
|
903
|
+
"currentStrategicFocus": "What is the top priority for the current phase? (Will be updated as phases change.)"
|
|
904
|
+
},
|
|
905
|
+
"discardConfirmTitle": "Discard your input?",
|
|
906
|
+
"discardConfirmBody": "Content you have entered will be lost and cannot be recovered.",
|
|
907
|
+
"discardConfirmCancel": "Continue editing",
|
|
908
|
+
"discardConfirmConfirm": "Discard"
|
|
909
|
+
},
|
|
910
|
+
"versionDiff": {
|
|
911
|
+
"changed": "Changed",
|
|
912
|
+
"unchanged": "Unchanged",
|
|
913
|
+
"oldPreview": "Previous version",
|
|
914
|
+
"newPreview": "New version",
|
|
915
|
+
"expandHint": "Click to view section-level diff",
|
|
916
|
+
"collapseHint": "Click to collapse diff"
|
|
778
917
|
}
|
|
779
918
|
},
|
|
780
919
|
"debt": {
|
|
@@ -650,9 +650,55 @@
|
|
|
650
650
|
"readinessLabel": "就绪状态",
|
|
651
651
|
"empathyCostHint": {
|
|
652
652
|
"body": "共情观察器已启用 — 每次关键词未命中时会调用 LLM 做深度分析(当前模型:{{provider}}/{{model}})。",
|
|
653
|
-
"muted": "
|
|
653
|
+
"muted": "如需节省成本,建议使用本地 LLM 模型(如 Ollama),或在 workflows.yaml 的 pd-empathy-observer.policy.model 换更便宜模型。",
|
|
654
654
|
"ack": "知道了"
|
|
655
|
-
}
|
|
655
|
+
},
|
|
656
|
+
"workflow": {
|
|
657
|
+
"title": "PD 行为回路",
|
|
658
|
+
"subtitle": "从错误到原则,从原则到改变",
|
|
659
|
+
"phase01": "发现错误",
|
|
660
|
+
"phase01Desc": "观察智能体行为\n识别需要改进的模式",
|
|
661
|
+
"phase02": "形成原则",
|
|
662
|
+
"phase02Desc": "把经验提炼成\n可遵循的原则",
|
|
663
|
+
"phase03": "拥有者审批",
|
|
664
|
+
"phase03Desc": "你决定哪些原则\n可以生效",
|
|
665
|
+
"phase04": "改变行为",
|
|
666
|
+
"phase04Desc": "原则作用于\n智能体下次行为",
|
|
667
|
+
"loopHint": "行为改变后,PD 继续观察 —— 形成闭环。9 个代理分布在这条回路上,各司其职。"
|
|
668
|
+
},
|
|
669
|
+
"status": {
|
|
670
|
+
"enabled": "已启用",
|
|
671
|
+
"notReady": "未就绪",
|
|
672
|
+
"corePipeline": "核心管道",
|
|
673
|
+
"corePipelineOk": "正常",
|
|
674
|
+
"corePipelineDegraded": "降级可用",
|
|
675
|
+
"corePipelineParalyzed": "瘫痪",
|
|
676
|
+
"needsConfig": "需配置"
|
|
677
|
+
},
|
|
678
|
+
"groups": {
|
|
679
|
+
"coreTrio": "核心三件套",
|
|
680
|
+
"coreTrioTag": "必须一起开",
|
|
681
|
+
"coreTrioHint": "关掉任何一个,PD 都无法把错误转化为原则",
|
|
682
|
+
"codeChain": "代码实现链",
|
|
683
|
+
"codeChainTag": "推荐一起开",
|
|
684
|
+
"codeChainHint": "只开 artificer 会降级为纯提示通道;只开 evaluator 无意义",
|
|
685
|
+
"qualityPolish": "质量打磨",
|
|
686
|
+
"qualityPolishTag": "可选 · 单独开关",
|
|
687
|
+
"qualityPolishHint": "让原则更精炼,关掉也能用,只是质量略粗",
|
|
688
|
+
"sidechain": "侧链服务",
|
|
689
|
+
"sidechainTag": "独立 · 单独开关",
|
|
690
|
+
"sidechainHint": "不影响主管道,只影响 pain 信号检测精度"
|
|
691
|
+
},
|
|
692
|
+
"impact": {
|
|
693
|
+
"label": "关掉会怎样",
|
|
694
|
+
"confirmTitle": "确认关闭核心代理",
|
|
695
|
+
"confirmAck": "确认关闭",
|
|
696
|
+
"confirmCancel": "取消"
|
|
697
|
+
},
|
|
698
|
+
"techDetail": "技术细节",
|
|
699
|
+
"profileLabelShort": "运行时",
|
|
700
|
+
"unknownAgentsWarning": "检测到 {{count}} 个未识别的代理:{{names}}。它们未被分组显示。",
|
|
701
|
+
"footerNote": "9 个代理分布在内化管道与侧链服务两条路径上。核心三件套必须一起开,否则 PD 无法把错误转化为原则。"
|
|
656
702
|
},
|
|
657
703
|
"login": {
|
|
658
704
|
"title": "登录",
|
|
@@ -730,7 +776,55 @@
|
|
|
730
776
|
"notFound": {
|
|
731
777
|
"title": "未找到 INTENT.md",
|
|
732
778
|
"description": "PD 在 .principles/ 目录中未找到 INTENT.md 文件。缺少此锚点时,基于意图的诊断无法运行。",
|
|
733
|
-
"nextAction": "运行:pd intent init --confirm --workspace <path>"
|
|
779
|
+
"nextAction": "运行:pd intent init --confirm --workspace <path>",
|
|
780
|
+
"createButton": "创建 INTENT.md",
|
|
781
|
+
"creating": "创建中…",
|
|
782
|
+
"createFailed": "创建失败,请稍后重试",
|
|
783
|
+
"createSuccess": "INTENT.md 已创建,你可以开始填写意图"
|
|
784
|
+
},
|
|
785
|
+
"onboarding": {
|
|
786
|
+
"title": "欢迎使用意图工程",
|
|
787
|
+
"subtitle": "在开始之前,让我们先了解一下意图工程",
|
|
788
|
+
"whatIsIt": {
|
|
789
|
+
"title": "什么是意图工程?",
|
|
790
|
+
"description": "INTENT.md 是你的长期意图锚点 — 记录你的目标、不可违背的边界、以及何时应当停止并升级。它帮助 PD 在关键决策点对齐你的真实意图。"
|
|
791
|
+
},
|
|
792
|
+
"whyYouFill": {
|
|
793
|
+
"title": "为什么需要你填写?",
|
|
794
|
+
"description": "意图是拥有者自有的。PD 不会自动生成意图,因为只有你知道项目的真实目标和边界。这是你的决策权,PD 只负责帮助你执行和对齐。"
|
|
795
|
+
},
|
|
796
|
+
"sectionGuide": {
|
|
797
|
+
"title": "5 个章节填写引导",
|
|
798
|
+
"description": "INTENT.md 包含 5 个章节,每个章节有明确的用途:",
|
|
799
|
+
"sections": {
|
|
800
|
+
"why": "为什么 — 这个项目的根本动机",
|
|
801
|
+
"desiredOutcome": "期望结果 — 你希望达成的具体结果",
|
|
802
|
+
"nonNegotiables": "不可妥协项 — 绝对不能违反的边界",
|
|
803
|
+
"stopEscalation": "停止 / 升级 — 何时应当停止当前操作并升级给你",
|
|
804
|
+
"currentStrategicFocus": "当前战略焦点 — 阶段性重点"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
"skipOption": "跳过引导,创建空模板稍后填写",
|
|
808
|
+
"startFilling": "开始填写",
|
|
809
|
+
"skip": "跳过",
|
|
810
|
+
"close": "关闭",
|
|
811
|
+
"dontShowAgain": "不再显示"
|
|
812
|
+
},
|
|
813
|
+
"editor": {
|
|
814
|
+
"title": "编辑 INTENT.md",
|
|
815
|
+
"description": "直接在浏览器中编辑你的意图文档。保存后会立即生效。",
|
|
816
|
+
"placeholder": "在此输入 INTENT.md 内容(Markdown 格式)…",
|
|
817
|
+
"save": "保存",
|
|
818
|
+
"saving": "保存中…",
|
|
819
|
+
"cancel": "取消",
|
|
820
|
+
"edit": "编辑",
|
|
821
|
+
"saveSuccess": "INTENT.md 已保存",
|
|
822
|
+
"saveFailed": "保存失败,请稍后重试",
|
|
823
|
+
"emptyContent": "内容不能为空",
|
|
824
|
+
"oversized": "内容超过 32KB 上限,请精简后重试",
|
|
825
|
+
"confirmDiscard": "你有未保存的修改,确定要放弃吗?",
|
|
826
|
+
"yes": "是,放弃修改",
|
|
827
|
+
"no": "继续编辑"
|
|
734
828
|
},
|
|
735
829
|
"oversized": {
|
|
736
830
|
"title": "INTENT.md 超过 32KB",
|
|
@@ -775,6 +869,51 @@
|
|
|
775
869
|
"lastDecisionAtLabel": "最近决策",
|
|
776
870
|
"noDecisions": "暂无决策记录",
|
|
777
871
|
"loadError": "加载决策摘要失败"
|
|
872
|
+
},
|
|
873
|
+
"langSelector": {
|
|
874
|
+
"ariaLabel": "选择 INTENT.md 语言",
|
|
875
|
+
"disabledWhileEditing": "请先保存或取消编辑,再切换语言"
|
|
876
|
+
},
|
|
877
|
+
"versionHistory": {
|
|
878
|
+
"title": "版本历史",
|
|
879
|
+
"reasonInit": "初始化",
|
|
880
|
+
"reasonSave": "保存"
|
|
881
|
+
},
|
|
882
|
+
"wizard": {
|
|
883
|
+
"progressLabel": "第 {{current}}/5 步",
|
|
884
|
+
"next": "下一步",
|
|
885
|
+
"prev": "上一步",
|
|
886
|
+
"finish": "完成",
|
|
887
|
+
"review": "查看摘要",
|
|
888
|
+
"complete": "完成保存",
|
|
889
|
+
"cancel": "取消",
|
|
890
|
+
"emptyWarning": "此节不能为空,请填写后再继续",
|
|
891
|
+
"stepLabels": {
|
|
892
|
+
"why": "1. 为什么(Why)",
|
|
893
|
+
"desiredOutcome": "2. 期望结果(Desired Outcome)",
|
|
894
|
+
"nonNegotiables": "3. 不可妥协项(Non-negotiables)",
|
|
895
|
+
"stopEscalation": "4. 止损/升级(Stop / Escalation)",
|
|
896
|
+
"currentStrategicFocus": "5. 当前战略焦点(Current Strategic Focus)"
|
|
897
|
+
},
|
|
898
|
+
"guidance": {
|
|
899
|
+
"why": "说明这个项目为什么重要。拥有者关心什么?不解决会怎样?",
|
|
900
|
+
"desiredOutcome": "描述可观察的改变。做完后,什么会变好?",
|
|
901
|
+
"nonNegotiables": "列出不可违反的硬约束(合规/安全/边界)。",
|
|
902
|
+
"stopEscalation": "什么情况下应该停下来升级给拥有者,而不是继续推进?",
|
|
903
|
+
"currentStrategicFocus": "当前阶段最优先的事是什么?(会随阶段更新)"
|
|
904
|
+
},
|
|
905
|
+
"discardConfirmTitle": "放弃填写?",
|
|
906
|
+
"discardConfirmBody": "你已填写的内容将丢失,无法恢复。",
|
|
907
|
+
"discardConfirmCancel": "继续填写",
|
|
908
|
+
"discardConfirmConfirm": "放弃"
|
|
909
|
+
},
|
|
910
|
+
"versionDiff": {
|
|
911
|
+
"changed": "已变更",
|
|
912
|
+
"unchanged": "未变更",
|
|
913
|
+
"oldPreview": "旧版本",
|
|
914
|
+
"newPreview": "新版本",
|
|
915
|
+
"expandHint": "点击查看 section 级差异",
|
|
916
|
+
"collapseHint": "点击折叠差异"
|
|
778
917
|
}
|
|
779
918
|
},
|
|
780
919
|
"debt": {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AgentMeta } from "../../utils/agent-metadata.js";
|
|
2
|
+
import type { RedactedAgentSummary, RedactedRuntimeProfileSummary } from "../../api.js";
|
|
3
|
+
/**
|
|
4
|
+
* AgentCard — 三层渐进式披露代理卡片 + 核心代理内联确认
|
|
5
|
+
*
|
|
6
|
+
* L1(折叠态):状态点 + 显示名 + agent.name + 角色一句话 + 开关 + 展开箭头
|
|
7
|
+
* L2(展开态):详细说明段落 + impact-box + 技术细节 toggle + profile-row
|
|
8
|
+
* L3(嵌套折叠):技术细节 grid
|
|
9
|
+
*
|
|
10
|
+
* 核心代理(isCore=true)关闭时显示内联确认条(不弹模态)。
|
|
11
|
+
*
|
|
12
|
+
* rc 合规:
|
|
13
|
+
* - rc-1: agent/profiles 由父组件已验证;meta 是静态数据
|
|
14
|
+
* - rc-2: 无 as 绕过
|
|
15
|
+
* - rc-8: 无 JSON 序列化
|
|
16
|
+
*
|
|
17
|
+
* 品牌约束(PRI-CR1 B.4.4):
|
|
18
|
+
* - 禁止 translateY / scale hover(rotate 仅用于箭头朝向,允许)
|
|
19
|
+
* - 无硬编码十六进制色值
|
|
20
|
+
*/
|
|
21
|
+
export type AgentLocale = "zh-CN" | "en";
|
|
22
|
+
interface AgentCardProps {
|
|
23
|
+
agent: RedactedAgentSummary;
|
|
24
|
+
meta: AgentMeta;
|
|
25
|
+
profiles: RedactedRuntimeProfileSummary[];
|
|
26
|
+
onBindingChange: (agentName: string, runtimeProfile: string, enabled: boolean) => void;
|
|
27
|
+
saving: string | null;
|
|
28
|
+
locale: AgentLocale;
|
|
29
|
+
}
|
|
30
|
+
export declare function AgentCard({ agent, meta, profiles, onBindingChange, saving, locale, }: AgentCardProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export {};
|