create-principles-disciple 1.135.2 → 1.137.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.
Files changed (117) hide show
  1. package/codex-adapter/dist/worker/workspace-worker.js +3 -0
  2. package/console/dist/server/routes/failed-tasks.js +31 -3
  3. package/console/dist/ui/api.d.ts +4 -3
  4. package/console/dist/ui/api.js +9 -2
  5. package/console/dist/ui/i18n/en.json +12 -1
  6. package/console/dist/ui/i18n/zh-CN.json +12 -1
  7. package/console/dist/ui/pages/failed-tasks/FailedTasksPage.js +80 -4
  8. package/console/dist/ui/pages/pain/PainPage.js +13 -3
  9. package/console/dist/ui/utils/validators.d.ts +25 -0
  10. package/console/dist/ui/utils/validators.js +87 -0
  11. package/console/dist/web/assets/app.css +29 -2
  12. package/console/dist/web/assets/app.js +259 -46
  13. package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +5 -3
  14. package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
  15. package/core/dist/runtime-v2/index.d.ts +2 -1
  16. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  17. package/core/dist/runtime-v2/index.js +2 -0
  18. package/core/dist/runtime-v2/index.js.map +1 -1
  19. package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +75 -5
  20. package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -1
  21. package/core/dist/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.d.ts +2 -0
  22. package/core/dist/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.d.ts.map +1 -0
  23. package/core/dist/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.js +279 -0
  24. package/core/dist/runtime-v2/internalization/__tests__/evaluator-host-alias-replay.test.js.map +1 -0
  25. package/core/dist/runtime-v2/internalization/__tests__/tool-semantic-registry.test.js +43 -0
  26. package/core/dist/runtime-v2/internalization/__tests__/tool-semantic-registry.test.js.map +1 -1
  27. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +36 -2
  28. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
  29. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +64 -7
  30. package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
  31. package/core/dist/runtime-v2/internalization/artificer-runner.d.ts +10 -1
  32. package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
  33. package/core/dist/runtime-v2/internalization/artificer-runner.js +6 -0
  34. package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
  35. package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts +31 -0
  36. package/core/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
  37. package/core/dist/runtime-v2/internalization/evaluator-runner.js +93 -1
  38. package/core/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
  39. package/core/dist/runtime-v2/internalization/index.d.ts +2 -1
  40. package/core/dist/runtime-v2/internalization/index.d.ts.map +1 -1
  41. package/core/dist/runtime-v2/internalization/index.js +2 -0
  42. package/core/dist/runtime-v2/internalization/index.js.map +1 -1
  43. package/core/dist/runtime-v2/internalization/tool-semantic-registry.d.ts +7 -0
  44. package/core/dist/runtime-v2/internalization/tool-semantic-registry.d.ts.map +1 -1
  45. package/core/dist/runtime-v2/internalization/tool-semantic-registry.js +9 -0
  46. package/core/dist/runtime-v2/internalization/tool-semantic-registry.js.map +1 -1
  47. package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.d.ts.map +1 -1
  48. package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js +6 -0
  49. package/core/dist/runtime-v2/tools/artificer-l2-tool-contract.js.map +1 -1
  50. package/core/dist/telemetry-event.d.ts +2 -2
  51. package/core/dist/telemetry-event.d.ts.map +1 -1
  52. package/core/dist/telemetry-event.js +4 -0
  53. package/core/dist/telemetry-event.js.map +1 -1
  54. package/core/package.json +1 -1
  55. package/host-runtime/dist/evaluator-runtime-context.d.ts +10 -0
  56. package/host-runtime/dist/evaluator-runtime-context.js +3 -0
  57. package/host-runtime/dist/internalization-consumer-cycle.d.ts +6 -0
  58. package/host-runtime/dist/internalization-consumer-cycle.js +14 -2
  59. package/package.json +2 -2
  60. package/pd-cli/dist/commands/errors-list.d.ts.map +1 -1
  61. package/pd-cli/dist/commands/errors-list.js +9 -10
  62. package/pd-cli/dist/commands/errors-list.js.map +1 -1
  63. package/pd-cli/dist/commands/pain-list.d.ts +14 -0
  64. package/pd-cli/dist/commands/pain-list.d.ts.map +1 -1
  65. package/pd-cli/dist/commands/pain-list.js +28 -1
  66. package/pd-cli/dist/commands/pain-list.js.map +1 -1
  67. package/pd-cli/dist/commands/pain-record.d.ts +8 -0
  68. package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
  69. package/pd-cli/dist/commands/pain-record.js +120 -4
  70. package/pd-cli/dist/commands/pain-record.js.map +1 -1
  71. package/pd-cli/dist/commands/runtime-init.d.ts +3 -1
  72. package/pd-cli/dist/commands/runtime-init.d.ts.map +1 -1
  73. package/pd-cli/dist/commands/runtime-init.js +7 -47
  74. package/pd-cli/dist/commands/runtime-init.js.map +1 -1
  75. package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
  76. package/pd-cli/dist/commands/runtime-internalization-run-once.js +29 -2
  77. package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
  78. package/pd-cli/dist/index.js +5 -1
  79. package/pd-cli/dist/index.js.map +1 -1
  80. package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
  81. package/pd-cli/dist/services/rulehost-pipeline-runner.js +18 -3
  82. package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
  83. package/pd-cli/package.json +1 -1
  84. package/plugin/dist/bundle.js +596 -706
  85. package/plugin/dist/config/defaults/runtime.d.ts +0 -10
  86. package/plugin/dist/constants/tools.d.ts +13 -5
  87. package/plugin/dist/core/config.d.ts +0 -9
  88. package/plugin/dist/core/detection-funnel.d.ts +1 -1
  89. package/plugin/dist/core/paths.d.ts +0 -2
  90. package/plugin/dist/core/principle-tree-ledger.d.ts +1 -1
  91. package/plugin/dist/core/system-logger.d.ts +1 -3
  92. package/plugin/dist/governance-audit.js +3 -3
  93. package/plugin/dist/index.d.ts +0 -10
  94. package/plugin/dist/rulehost-evidence.js +128 -128
  95. package/plugin/dist/service/internalization-auto-consumer-service.d.ts +13 -0
  96. package/plugin/dist/service/keyword-optimization-service.d.ts +2 -2
  97. package/plugin/dist/templates/pain_settings.json +0 -5
  98. package/plugin/dist/utils/trace-id.d.ts +9 -0
  99. package/plugin/docs/COMMAND_REFERENCE.md +2 -3
  100. package/plugin/docs/COMMAND_REFERENCE_EN.md +1 -2
  101. package/plugin/openclaw.plugin.json +1 -1
  102. package/plugin/package.json +1 -1
  103. package/plugin/templates/pain_settings.json +0 -5
  104. package/release-manager/package.json +2 -2
  105. package/console/dist/ui/utils/format.d.ts +0 -3
  106. package/console/dist/ui/utils/format.js +0 -20
  107. package/plugin/dist/commands/workflow-debug.d.ts +0 -4
  108. package/plugin/dist/core/evolution-engine.d.ts +0 -119
  109. package/plugin/dist/core/evolution-logger.d.ts +0 -137
  110. package/plugin/dist/service/evolution-dedup.d.ts +0 -27
  111. package/plugin/dist/service/evolution-worker.d.ts +0 -105
  112. package/plugin/dist/service/queue-io.d.ts +0 -30
  113. package/plugin/dist/service/queue-migration.d.ts +0 -84
  114. package/plugin/dist/service/subagent-workflow/subagent-error-utils.d.ts +0 -8
  115. package/plugin/dist/service/subagent-workflow/types.d.ts +0 -264
  116. package/plugin/dist/service/subagent-workflow/workflow-store.d.ts +0 -44
  117. package/plugin/dist/service/workflow-watchdog.d.ts +0 -23
@@ -22,12 +22,6 @@ export declare const ONE_HOUR_MS: number;
22
22
  export declare const ONE_DAY_MS: number;
23
23
  /** One week in milliseconds */
24
24
  export declare const ONE_WEEK_MS: number;
25
- /** Default TTL for helper workflows (5 minutes) */
26
- export declare const WORKFLOW_TTL_MS: number;
27
- /** Default workflow timeout (15 minutes) */
28
- export declare const WORKFLOW_TIMEOUT_MS: number;
29
- /** Default workflow sweep interval (30 minutes) */
30
- export declare const WORKFLOW_SWEEP_MS: number;
31
25
  /**
32
26
  * Trajectory gate block retry settings
33
27
  * Used when trajectory recording fails and needs to retry
@@ -40,10 +34,6 @@ export declare const THINKING_CHECKPOINT_DEFAULT_HIGH_RISK_TOOLS: readonly ['run
40
34
  export declare const GFI_LARGE_CHANGE_LINES = 50;
41
35
  /** Agent spawn GFI threshold (critically high = no spawn) */
42
36
  export declare const AGENT_SPAWN_GFI_THRESHOLD = 90;
43
- /** Evolution worker polling interval (15 minutes) */
44
- export declare const EVOLUTION_WORKER_POLL_INTERVAL_MS: number;
45
- /** Evolution queue batch size */
46
- export declare const EVOLUTION_QUEUE_BATCH_SIZE = 10;
47
37
  export declare const SESSION_TOKEN_WARNING_THRESHOLD = 8000;
48
38
  export declare const SESSION_MAX_IDLE_MS: number;
49
39
  export declare const EVENT_LOG_BUFFER_SIZE = 20;
@@ -1,10 +1,18 @@
1
1
  export declare const READ_ONLY_TOOL_NAMES: readonly ['read', 'read_file', 'read_many_files', 'image_read', 'search_file_content', 'grep', 'grep_search', 'list_directory', 'ls', 'glob', 'lsp_hover', 'lsp_goto_definition', 'lsp_find_references', 'web_fetch', 'web_search', 'ref_search_documentation', 'ref_read_url', 'resolve-library-id', 'get-library-docs', 'memory_recall', 'save_memory', 'todo_read', 'todo_write', 'ask_user', 'ask_user_question', 'pd-status', 'report'];
2
- export declare const LOW_RISK_WRITE_TOOL_NAMES: readonly ['write', 'write_file', 'edit', 'edit_file', 'replace', 'apply_patch', 'insert', 'patch'];
3
- export declare const BASH_TOOL_NAMES: readonly ['bash', 'run_shell_command', 'exec', 'execute', 'shell', 'cmd'];
4
- export declare const HIGH_RISK_TOOL_NAMES: readonly ["delete_file", "move_file", "bash", "run_shell_command", "exec", "execute", "shell", "cmd"];
2
+ /**
3
+ * PRI-741 declaration correction: this list is the OpenClaw HOST layer of the
4
+ * tool semantic registry, so it may only contain names the OpenClaw hook
5
+ * actually dispatches (evidence: OpenClaw tool-mutation-names.ts — the file
6
+ * mutation family is exactly write/edit/apply_patch). Generic LLM vocabulary
7
+ * names (write_file/edit_file/replace/insert/patch) are NOT OpenClaw tools;
8
+ * declaring them made `hasHostTool` pass for rules that can never fire.
9
+ */
10
+ export declare const LOW_RISK_WRITE_TOOL_NAMES: readonly ['write', 'edit', 'apply_patch'];
11
+ export declare const BASH_TOOL_NAMES: readonly ['exec'];
12
+ export declare const HIGH_RISK_TOOL_NAMES: readonly ["exec"];
5
13
  export declare const AGENT_TOOL_NAMES: readonly ['sessions_spawn'];
6
- export declare const CONTENT_LIMITED_TOOL_NAMES: readonly ["write", "write_file", "edit", "edit_file", "replace", "apply_patch", "insert", "patch"];
7
- export declare const CONSTRUCTIVE_TOOL_NAMES: readonly ["write", "write_file", "edit", "edit_file", "replace", "apply_patch", "insert", "patch", "delete_file", "move_file", "bash", "run_shell_command", "exec", "execute", "shell", "cmd", "sessions_spawn"];
14
+ export declare const CONTENT_LIMITED_TOOL_NAMES: readonly ["write", "edit", "apply_patch"];
15
+ export declare const CONSTRUCTIVE_TOOL_NAMES: readonly ["write", "edit", "apply_patch", "exec", "sessions_spawn"];
8
16
  export declare const EXPLORATORY_TOOL_NAMES: readonly ["read", "read_file", "read_many_files", "image_read", "search_file_content", "grep", "grep_search", "list_directory", "ls", "glob", "lsp_hover", "lsp_goto_definition", "lsp_find_references", "web_fetch", "web_search", "ref_search_documentation", "ref_read_url", "resolve-library-id", "get-library-docs", "memory_recall", "save_memory", "todo_read", "todo_write", "ask_user", "ask_user_question", "pd-status", "report"];
9
17
  export declare const READ_ONLY_TOOLS: Set<string>;
10
18
  export declare const LOW_RISK_WRITE_TOOLS: Set<string>;
@@ -55,11 +55,6 @@ export interface PainSettings {
55
55
  medium: number;
56
56
  low: number;
57
57
  };
58
- intervals: {
59
- worker_poll_ms: number;
60
- initial_delay_ms: number;
61
- task_timeout_ms: number;
62
- };
63
58
  empathy_engine?: {
64
59
  enabled?: boolean;
65
60
  dedupe_window_ms?: number;
@@ -96,10 +91,6 @@ export declare class PainConfig {
96
91
  load(): void;
97
92
  save(): void;
98
93
  private deepMerge;
99
- /**
100
- * Basic validation for critical settings
101
- */
102
- private validate;
103
94
  /**
104
95
  * Gets a value using dot notation (e.g. 'thresholds.pain_trigger')
105
96
  */
@@ -11,7 +11,7 @@
11
11
  * - shouldIgnorePainProtocolText (the protocol-token gate)
12
12
  *
13
13
  * It re-exports DetectionFunnel (same class name + constructor signature) and
14
- * DetectionResult so DetectionService, llm.ts, and evolution-worker keep working
14
+ * DetectionResult so DetectionService and llm.ts keep working
15
15
  * unchanged.
16
16
  *
17
17
  * ERR checklist:
@@ -24,8 +24,6 @@ export declare const PD_FILES: {
24
24
  DECISION_POLICY: string;
25
25
  MODELS_DIR: string;
26
26
  STATE_DIR: string;
27
- EVOLUTION_QUEUE: string;
28
- EVOLUTION_DIRECTIVE: string;
29
27
  WORKBOARD: string;
30
28
  AGENT_SCORECARD: string;
31
29
  PAIN_FLAG: string;
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * 1. Lost updates — core wrote the file UNLOCKED, the plugin wrote it WITH
10
10
  * a lock, and neither knew the other's lock. Concurrent writers (e.g.
11
- * evolution-worker async + a pd-cli command) could silently drop edits.
11
+ * async plugin writers + a pd-cli command) could silently drop edits.
12
12
  * 2. Silent field loss — the two codecs parsed the same bytes at different
13
13
  * strictness; a field one side persisted could be dropped on the next
14
14
  * load by the other.
@@ -13,12 +13,10 @@ export declare const SystemLogger: {
13
13
  /**
14
14
  * PRI-504: dispose the SystemLogger cache for a single workspace.
15
15
  * Useful for tests and for workspace teardown in multi-workspace processes.
16
- * Pattern follows evolution-engine.ts:564-570 (disposeEvolutionEngine).
17
16
  */
18
17
  export declare function disposeSystemLogger(workspaceDir: string): void;
19
18
  /**
20
19
  * PRI-504: dispose ALL SystemLogger caches. Call this in test afterEach
21
- * hooks to prevent state leakage between tests. Pattern follows
22
- * evolution-engine.ts:572-577 (disposeAllEvolutionEngines).
20
+ * hooks to prevent state leakage between tests.
23
21
  */
24
22
  export declare function disposeAllSystemLoggers(): void;