create-principles-disciple 1.126.0 → 1.126.2
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.d.ts +6 -0
- package/console/dist/server/config/pd-config-store.js +37 -4
- package/console/dist/server/routes/config.js +1 -0
- package/console/dist/ui/utils/agent-metadata.js +6 -2
- package/console/dist/web/assets/app.js +7 -3
- package/core/dist/runtime-v2/__tests__/pain-signal-runtime-factory-edge-cases.test.js +4 -1
- package/core/dist/runtime-v2/__tests__/pain-signal-runtime-factory-edge-cases.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/pri638-diagnostician-capability-characterization.test.d.ts +27 -0
- package/core/dist/runtime-v2/__tests__/pri638-diagnostician-capability-characterization.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pri638-diagnostician-capability-characterization.test.js +449 -0
- package/core/dist/runtime-v2/__tests__/pri638-diagnostician-capability-characterization.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pri638-p1d-error-classification.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pri638-p1d-error-classification.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pri638-p1d-error-classification.test.js +116 -0
- package/core/dist/runtime-v2/__tests__/pri638-p1d-error-classification.test.js.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-pri638-cutover.test.d.ts +2 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-pri638-cutover.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-pri638-cutover.test.js +99 -0
- package/core/dist/runtime-v2/config/__tests__/pd-config-pri638-cutover.test.js.map +1 -0
- package/core/dist/runtime-v2/config/pd-config-effective.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-effective.js +34 -0
- package/core/dist/runtime-v2/config/pd-config-effective.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-capability.d.ts +47 -0
- package/core/dist/runtime-v2/diagnostician-capability.d.ts.map +1 -0
- package/core/dist/runtime-v2/diagnostician-capability.js +53 -0
- package/core/dist/runtime-v2/diagnostician-capability.js.map +1 -0
- package/core/dist/runtime-v2/index.d.ts +1 -0
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +2 -0
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js +18 -5
- package/core/dist/runtime-v2/internalization/__tests__/diag-chain-e2e.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts +25 -0
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.js +67 -0
- package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +32 -12
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +113 -46
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts +7 -1
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.js +25 -0
- package/core/dist/runtime-v2/pain-to-principle-service.js.map +1 -1
- package/core/dist/runtime-v2/runner/runner-result.d.ts +6 -0
- package/core/dist/runtime-v2/runner/runner-result.d.ts.map +1 -1
- package/host-runtime/dist/internalization-consumer-cycle.js +14 -0
- package/package.json +2 -2
- package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
- package/pd-cli/dist/commands/diagnose.js +48 -27
- 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 +43 -26
- package/pd-cli/dist/commands/pain-retry.js.map +1 -1
- package/plugin/dist/bundle.js +394 -394
- package/plugin/dist/governance-audit.js +131 -131
- package/plugin/dist/openclaw.plugin.json +1 -0
- package/plugin/dist/rulehost-evidence.js +145 -145
- package/plugin/openclaw.plugin.json +2 -1
- package/plugin/package.json +1 -1
|
@@ -43,6 +43,12 @@ export interface AgentBindingUpdateResultOk {
|
|
|
43
43
|
agent: InternalAgentName;
|
|
44
44
|
runtimeProfile: string;
|
|
45
45
|
enabled: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* PRI-638 (reviewer P1): set when the write retired a conflicting legacy
|
|
48
|
+
* `diagnostician_split_pipeline=false` override so the canonical toggle is
|
|
49
|
+
* authoritative after reload.
|
|
50
|
+
*/
|
|
51
|
+
warning?: string;
|
|
46
52
|
}
|
|
47
53
|
export interface AgentBindingUpdateResultErr {
|
|
48
54
|
ok: false;
|
|
@@ -298,19 +298,30 @@ export function updateAgentBinding(workspaceDir, agentName, payload) {
|
|
|
298
298
|
else {
|
|
299
299
|
rawConfig = {};
|
|
300
300
|
}
|
|
301
|
+
// PRI-638 (reviewer P1 #2): rebuild only what the Owner explicitly changed.
|
|
302
|
+
// Untouched agents keep their RAW binding from the config file verbatim.
|
|
303
|
+
// Defaults / inheritance resolution / compatibility transforms (e.g. the
|
|
304
|
+
// legacy split=false shim folding effective diagnostician to false) belong
|
|
305
|
+
// to the resolver — materializing them back into config would turn the
|
|
306
|
+
// documented read-time cutover into an implicit persistent migration.
|
|
307
|
+
const rawInternalAgents = isRecord(rawConfig.internalAgents) ? rawConfig.internalAgents : {};
|
|
308
|
+
const rawAgents = isRecord(rawInternalAgents.agents) ? rawInternalAgents.agents : {};
|
|
301
309
|
// Update only the agent binding section
|
|
302
310
|
const agentsMap = {};
|
|
303
311
|
for (const name of INTERNAL_AGENT_NAMES) {
|
|
304
|
-
const existing = effective.config.internalAgents.agents[name];
|
|
305
312
|
if (name === agentName) {
|
|
306
313
|
agentsMap[name] = { enabled, runtimeProfile };
|
|
314
|
+
continue;
|
|
307
315
|
}
|
|
308
|
-
|
|
316
|
+
const rawEntry = rawAgents[name];
|
|
317
|
+
if (isRecord(rawEntry) && typeof rawEntry.enabled === 'boolean') {
|
|
309
318
|
agentsMap[name] = {
|
|
310
|
-
enabled:
|
|
311
|
-
...(
|
|
319
|
+
enabled: rawEntry.enabled,
|
|
320
|
+
...(typeof rawEntry.runtimeProfile === 'string' ? { runtimeProfile: rawEntry.runtimeProfile } : {}),
|
|
312
321
|
};
|
|
313
322
|
}
|
|
323
|
+
// Agent absent from raw config → keep it absent (defaults belong to the
|
|
324
|
+
// resolver, never snapshot into config).
|
|
314
325
|
}
|
|
315
326
|
// Merge: start from raw config, overlay known sections, update internalAgents.agents.
|
|
316
327
|
// PRI-637: preserve the file's own `features:` section instead of re-writing
|
|
@@ -328,6 +339,22 @@ export function updateAgentBinding(workspaceDir, agentName, payload) {
|
|
|
328
339
|
},
|
|
329
340
|
ui: { ...effective.config.ui },
|
|
330
341
|
};
|
|
342
|
+
// PRI-638 (reviewer P1 #1): an explicit Owner write to the canonical
|
|
343
|
+
// Diagnostician binding supersedes the legacy compatibility override. While
|
|
344
|
+
// `diagnostician_split_pipeline=false` remains in the raw features section,
|
|
345
|
+
// the read-time shim folds the effective binding back to disabled — a
|
|
346
|
+
// Console ON toggle would otherwise return success while a reload silently
|
|
347
|
+
// disables the agent again. Retire the conflicting legacy override in the
|
|
348
|
+
// SAME atomic write; no new authority, DB or migration subsystem is added.
|
|
349
|
+
let retiredLegacySplit = false;
|
|
350
|
+
if (agentName === 'diagnostician') {
|
|
351
|
+
const features = isRecord(updatedConfig.features) ? updatedConfig.features : {};
|
|
352
|
+
const legacySplit = isRecord(features) ? features.diagnostician_split_pipeline : undefined;
|
|
353
|
+
if (isRecord(legacySplit) && legacySplit.enabled === false) {
|
|
354
|
+
delete features.diagnostician_split_pipeline;
|
|
355
|
+
retiredLegacySplit = true;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
331
358
|
// 7. Validate the updated config before writing
|
|
332
359
|
const validation = validatePdConfig(updatedConfig);
|
|
333
360
|
if (!validation.ok) {
|
|
@@ -345,6 +372,12 @@ export function updateAgentBinding(workspaceDir, agentName, payload) {
|
|
|
345
372
|
agent: agentName,
|
|
346
373
|
runtimeProfile,
|
|
347
374
|
enabled,
|
|
375
|
+
...(retiredLegacySplit
|
|
376
|
+
? {
|
|
377
|
+
warning: 'Retired the conflicting legacy diagnostician_split_pipeline=false override so the canonical ' +
|
|
378
|
+
'Diagnostician toggle is authoritative after reload.',
|
|
379
|
+
}
|
|
380
|
+
: {}),
|
|
348
381
|
};
|
|
349
382
|
}
|
|
350
383
|
export function updateDefaultRuntime(workspaceDir, payload) {
|
|
@@ -81,13 +81,17 @@ export const AGENT_METADATA = {
|
|
|
81
81
|
techDetailZh: {
|
|
82
82
|
'输入': '`DiagnosticianContextPayload`(pain 信号上下文)',
|
|
83
83
|
'输出': '`DiagnosticianOutputV1` · rootCause / violatedPrinciples / recommendations[] / confidence',
|
|
84
|
-
|
|
84
|
+
// PRI-638: the split flag no longer selects an implementation nor
|
|
85
|
+
// disables anything — the capability switch is the agent binding here.
|
|
86
|
+
'编排': '由 `PainSignalBridge` 触发;开关 = 本页面的代理启用开关(`internalAgents.agents.diagnostician.enabled`)',
|
|
85
87
|
'阶段': '`diag_rootcause` → `diag_distiller` → `diag_router`',
|
|
86
88
|
},
|
|
87
89
|
techDetailEn: {
|
|
88
90
|
'Input': '`DiagnosticianContextPayload` (pain signal context)',
|
|
89
91
|
'Output': '`DiagnosticianOutputV1` · rootCause / violatedPrinciples / recommendations[] / confidence',
|
|
90
|
-
|
|
92
|
+
// PRI-638: the split flag no longer selects an implementation nor
|
|
93
|
+
// disables anything — the capability switch is the agent binding here.
|
|
94
|
+
'Orchestration': 'Triggered by `PainSignalBridge`; switch = this agent\'s enable toggle (`internalAgents.agents.diagnostician.enabled`)',
|
|
91
95
|
'Stages': '`diag_rootcause` → `diag_distiller` → `diag_router`',
|
|
92
96
|
},
|
|
93
97
|
isCore: true,
|