create-principles-disciple 1.125.0 → 1.126.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 +23 -11
- package/console/dist/server/index.js +8 -1
- package/console/dist/server/models/PrinciplesConsoleModel.d.ts +10 -0
- package/console/dist/server/models/PrinciplesConsoleModel.js +76 -29
- package/console/dist/server/routes/principles.d.ts +9 -0
- package/console/dist/server/routes/principles.js +46 -2
- package/console/dist/ui/App.js +2 -1
- package/console/dist/ui/api.d.ts +4 -3
- package/console/dist/ui/api.js +7 -2
- package/console/dist/ui/i18n/en.json +12 -0
- package/console/dist/ui/i18n/zh-CN.json +12 -0
- package/console/dist/ui/pages/principles/CorePrinciplesPage.d.ts +10 -0
- package/console/dist/ui/pages/principles/CorePrinciplesPage.js +59 -0
- package/console/dist/ui/pages/principles/PrinciplesPage.js +2 -1
- package/console/dist/ui/pages/principles/PrinciplesViewNav.d.ts +8 -0
- package/console/dist/ui/pages/principles/PrinciplesViewNav.js +15 -0
- package/console/dist/ui/utils/validators.d.ts +13 -0
- package/console/dist/ui/utils/validators.js +34 -0
- package/console/dist/web/assets/app.css +6 -0
- package/console/dist/web/assets/app.js +2148 -1962
- package/core/dist/runtime-v2/__tests__/adversarial-loop.test.js +14 -2
- package/core/dist/runtime-v2/__tests__/adversarial-loop.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js +55 -1
- package/core/dist/runtime-v2/__tests__/artificer-runner-vslice.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js +25 -7
- package/core/dist/runtime-v2/__tests__/evaluator-runner-vslice-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-provenance.test.d.ts +24 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-provenance.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-provenance.test.js +208 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-provenance.test.js.map +1 -0
- package/core/dist/runtime-v2/config/index.d.ts +1 -1
- package/core/dist/runtime-v2/config/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/index.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.js +10 -2
- package/core/dist/runtime-v2/config/pd-config-effective.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.d.ts +3 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-feature-flags.js +2 -0
- package/core/dist/runtime-v2/config/pd-config-feature-flags.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts +4 -0
- package/core/dist/runtime-v2/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.js +23 -0
- package/core/dist/runtime-v2/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.js +12 -1
- package/core/dist/runtime-v2/config/pd-config-validate.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/__tests__/installer-config-parity.test.js +4 -3
- package/core/dist/runtime-v2/feature-flags/__tests__/installer-config-parity.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-gate-authority.test.js +223 -1
- package/core/dist/runtime-v2/internalization/__tests__/evaluator-gate-authority.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/owner-decision.test.js +41 -0
- package/core/dist/runtime-v2/internalization/__tests__/owner-decision.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.js +10 -0
- package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +10 -0
- package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js +143 -23
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts +12 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/pitask-metadata.js +15 -0
- package/core/dist/runtime-v2/internalization/pitask-metadata.js.map +1 -1
- package/core/dist/telemetry-event.d.ts +2 -2
- package/core/dist/telemetry-event.d.ts.map +1 -1
- package/core/dist/telemetry-event.js +6 -0
- package/core/dist/telemetry-event.js.map +1 -1
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +30 -20
- package/dist/mvp-config.js.map +1 -1
- package/package.json +1 -1
- package/pd-cli/dist/commands/runtime-init.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-init.js +12 -1
- package/pd-cli/dist/commands/runtime-init.js.map +1 -1
- package/plugin/dist/bundle.js +390 -390
- package/plugin/dist/governance-audit.js +2 -2
- package/plugin/dist/rulehost-evidence.js +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Link } from "react-router-dom";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
/**
|
|
5
|
+
* PRI-641: internal navigation inside the Principles section — Workspace
|
|
6
|
+
* Principles vs the read-only PD Core Principles reference surface. The
|
|
7
|
+
* sidebar keeps a single "Principles" entry; this is the only extra nav.
|
|
8
|
+
*/
|
|
9
|
+
export function PrinciplesViewNav({ view }) {
|
|
10
|
+
const { t } = useTranslation("pages");
|
|
11
|
+
const base = "font-mono text-[11px] uppercase tracking-[0.02em] border rounded-[2px] px-2 py-1 transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gov ";
|
|
12
|
+
const active = "bg-gov text-paper border-gov";
|
|
13
|
+
const inactive = "bg-surface text-ink-3 border-line hover:border-line-2";
|
|
14
|
+
return (_jsxs("div", { className: "flex gap-1 mb-6", role: "group", "aria-label": t("principles.viewNavLabel"), children: [_jsx(Link, { to: "/principles", className: base + (view === "workspace" ? active : inactive), "aria-current": view === "workspace" ? "page" : undefined, children: t("principles.tabWorkspace") }), _jsx(Link, { to: "/principles/core", className: base + (view === "core" ? active : inactive), "aria-current": view === "core" ? "page" : undefined, children: t("principles.tabCore") })] }));
|
|
15
|
+
}
|
|
@@ -474,6 +474,19 @@ export interface PrinciplesListData {
|
|
|
474
474
|
/** If the approval cross-check was unavailable, this explains why (ERR-002) */
|
|
475
475
|
approvalCrossCheckUnavailable?: string;
|
|
476
476
|
}
|
|
477
|
+
export type CorePrincipleLayerData = 'foundational' | 'operating';
|
|
478
|
+
export interface CorePrincipleData {
|
|
479
|
+
id: string;
|
|
480
|
+
layer: CorePrincipleLayerData;
|
|
481
|
+
name: string;
|
|
482
|
+
nameZh: string;
|
|
483
|
+
statement: string;
|
|
484
|
+
statementZh: string;
|
|
485
|
+
}
|
|
486
|
+
export interface CorePrinciplesData {
|
|
487
|
+
principles: CorePrincipleData[];
|
|
488
|
+
}
|
|
489
|
+
export declare function validateCorePrinciples(v: unknown): CorePrinciplesData | null;
|
|
477
490
|
export declare function validatePrinciplesList(v: unknown): PrinciplesListData | null;
|
|
478
491
|
export interface ApprovalGroupRecordData {
|
|
479
492
|
id: string;
|
|
@@ -1303,6 +1303,40 @@ function validatePrincipleListItem(v) {
|
|
|
1303
1303
|
}
|
|
1304
1304
|
return result;
|
|
1305
1305
|
}
|
|
1306
|
+
function validateCorePrinciple(v) {
|
|
1307
|
+
if (!isObject(v))
|
|
1308
|
+
return null;
|
|
1309
|
+
if (!isString(v.id) || v.id.length === 0)
|
|
1310
|
+
return null;
|
|
1311
|
+
if (v.layer !== 'foundational' && v.layer !== 'operating')
|
|
1312
|
+
return null;
|
|
1313
|
+
if (!isString(v.name) || v.name.length === 0)
|
|
1314
|
+
return null;
|
|
1315
|
+
if (!isString(v.nameZh) || v.nameZh.length === 0)
|
|
1316
|
+
return null;
|
|
1317
|
+
if (!isString(v.statement) || v.statement.length === 0)
|
|
1318
|
+
return null;
|
|
1319
|
+
if (!isString(v.statementZh) || v.statementZh.length === 0)
|
|
1320
|
+
return null;
|
|
1321
|
+
return {
|
|
1322
|
+
id: v.id,
|
|
1323
|
+
layer: v.layer,
|
|
1324
|
+
name: v.name,
|
|
1325
|
+
nameZh: v.nameZh,
|
|
1326
|
+
statement: v.statement,
|
|
1327
|
+
statementZh: v.statementZh,
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
export function validateCorePrinciples(v) {
|
|
1331
|
+
if (!isObject(v))
|
|
1332
|
+
return null;
|
|
1333
|
+
if (!Object.hasOwn(v, 'principles') || !Array.isArray(v.principles))
|
|
1334
|
+
return null;
|
|
1335
|
+
const principles = validateArray(v.principles, validateCorePrinciple);
|
|
1336
|
+
if (principles === null)
|
|
1337
|
+
return null;
|
|
1338
|
+
return { principles };
|
|
1339
|
+
}
|
|
1306
1340
|
export function validatePrinciplesList(v) {
|
|
1307
1341
|
if (!isObject(v))
|
|
1308
1342
|
return null;
|
|
@@ -742,6 +742,9 @@
|
|
|
742
742
|
.w-\[18px\] {
|
|
743
743
|
width: 18px;
|
|
744
744
|
}
|
|
745
|
+
.w-\[40\%\] {
|
|
746
|
+
width: 40%;
|
|
747
|
+
}
|
|
745
748
|
.w-\[50\%\] {
|
|
746
749
|
width: 50%;
|
|
747
750
|
}
|
|
@@ -751,6 +754,9 @@
|
|
|
751
754
|
.w-\[60\%\] {
|
|
752
755
|
width: 60%;
|
|
753
756
|
}
|
|
757
|
+
.w-\[70\%\] {
|
|
758
|
+
width: 70%;
|
|
759
|
+
}
|
|
754
760
|
.w-\[75\%\] {
|
|
755
761
|
width: 75%;
|
|
756
762
|
}
|