create-principles-disciple 1.135.0 → 1.135.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/ui/components/onboarding/slashCommands.js +0 -1
- package/console/dist/ui/i18n/en.json +0 -1
- package/console/dist/ui/i18n/zh-CN.json +0 -1
- package/console/dist/web/assets/app.js +1 -4
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +1 -17
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-lifecycle.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +0 -2
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +0 -2
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/types/index.d.ts +0 -2
- package/core/dist/runtime-v2/types/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/index.js +0 -1
- package/core/dist/runtime-v2/types/index.js.map +1 -1
- package/core/package.json +1 -1
- package/package.json +2 -2
- package/plugin/dist/bundle.js +734 -742
- package/plugin/dist/governance-audit.js +164 -164
- package/plugin/dist/hooks/after-tool-call-helpers.d.ts +1 -1
- package/plugin/dist/rulehost-evidence.js +174 -174
- package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +2 -5
- package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +2 -5
- package/plugin/dist/utils/workspace-resolver.d.ts +1 -1
- package/plugin/docs/COMMAND_REFERENCE.md +1 -21
- package/plugin/docs/COMMAND_REFERENCE_EN.md +0 -20
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +2 -5
- package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +2 -5
- package/release-manager/package.json +2 -2
- package/core/dist/runtime-v2/types/runtime-summary-types.d.ts +0 -93
- package/core/dist/runtime-v2/types/runtime-summary-types.d.ts.map +0 -1
- package/core/dist/runtime-v2/types/runtime-summary-types.js +0 -35
- package/core/dist/runtime-v2/types/runtime-summary-types.js.map +0 -1
- package/plugin/dist/commands/evolution-status.d.ts +0 -4
- package/plugin/dist/service/runtime-summary-service.d.ts +0 -156
- package/plugin/dist/types/runtime-summary.d.ts +0 -1
|
@@ -28,7 +28,6 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
|
|
|
28
28
|
| `/pd-init` | Initialize strategy | New project startup |
|
|
29
29
|
| `/pd-bootstrap` | Environment tool scan and upgrade | Tool upgrade |
|
|
30
30
|
| `/pd-research` | Initiate tool upgrade research | Deep research |
|
|
31
|
-
| `/pd-evolution-status` | View trust score and security stage | Permission check |
|
|
32
31
|
| `/pd-status` | View system status (GFI and Pain Dictionary) | Health check |
|
|
33
32
|
| `/pd-help` | Get interactive command guidance | This skill |
|
|
34
33
|
|
|
@@ -55,7 +54,6 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
|
|
|
55
54
|
|
|
56
55
|
**Recommended Flow**:
|
|
57
56
|
1. `/pd-status` - Check system status (GFI and Pain Dictionary)
|
|
58
|
-
2. `/pd-evolution-status` - View EP tier and evolution status
|
|
59
57
|
|
|
60
58
|
**Script**: "Problems are the fuel of evolution. Let me help you diagnose and fix systematically."
|
|
61
59
|
|
|
@@ -66,8 +64,7 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
|
|
|
66
64
|
**Trigger**: The user explicitly asks for a Principles Disciple progress or health review (mentioning PD, EP, GFI, or system status)
|
|
67
65
|
|
|
68
66
|
**Recommended Flow**:
|
|
69
|
-
1. `/pd-
|
|
70
|
-
2. `/pd-status` - Check GFI and Pain Dictionary status
|
|
67
|
+
1. `/pd-status` - Check GFI and Pain Dictionary status
|
|
71
68
|
|
|
72
69
|
**Script**: "Let me help you review the current system status."
|
|
73
70
|
|
|
@@ -78,7 +75,7 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
|
|
|
78
75
|
**Trigger**: The user asks about Principles Disciple permissions, blocks, or security stages
|
|
79
76
|
|
|
80
77
|
**Recommended Flow**:
|
|
81
|
-
1. `/pd-
|
|
78
|
+
1. `/pd-status` - Check system status
|
|
82
79
|
2. Explain current stage's capability boundaries
|
|
83
80
|
|
|
84
81
|
**Script**: "Trust is earned, not given. Let me help you understand your current security level."
|
|
@@ -28,7 +28,6 @@ disable-model-invocation: true
|
|
|
28
28
|
| `/pd-init` | 初始化战略 | 新项目启动 |
|
|
29
29
|
| `/pd-bootstrap` | 环境工具扫描与升级 | 装备升级 |
|
|
30
30
|
| `/pd-research` | 发起工具升级研究 | 深度调研 |
|
|
31
|
-
| `/pd-evolution-status` | 查看EP等级与安全状态 | 状态查询 |
|
|
32
31
|
| `/pd-status` | 查看系统状态(GFI和痛苦词典) | 健康检查 |
|
|
33
32
|
| `/pd-help` | 获取交互式命令引导 | 本技能 |
|
|
34
33
|
|
|
@@ -55,7 +54,6 @@ disable-model-invocation: true
|
|
|
55
54
|
|
|
56
55
|
**推荐流程**:
|
|
57
56
|
1. `/pd-status` - 检查系统状态(GFI 和痛苦词典)
|
|
58
|
-
2. `/pd-evolution-status` - 查看 EP 等级和进化状态
|
|
59
57
|
|
|
60
58
|
**话术**: "问题就是进化的燃料。让我帮你系统化地诊断和修复。"
|
|
61
59
|
|
|
@@ -66,8 +64,7 @@ disable-model-invocation: true
|
|
|
66
64
|
**触发条件**: 用户明确要求 Principles Disciple 的进度或健康回顾(提及 PD、EP、GFI、系统状态)
|
|
67
65
|
|
|
68
66
|
**推荐流程**:
|
|
69
|
-
1. `/pd-
|
|
70
|
-
2. `/pd-status` - 查看 GFI 和痛苦词典状态
|
|
67
|
+
1. `/pd-status` - 查看 GFI 和痛苦词典状态
|
|
71
68
|
|
|
72
69
|
**话术**: "让我帮你回顾一下系统状态。"
|
|
73
70
|
|
|
@@ -78,7 +75,7 @@ disable-model-invocation: true
|
|
|
78
75
|
**触发条件**: 用户询问 Principles Disciple 的权限、拦截或安全等级
|
|
79
76
|
|
|
80
77
|
**推荐流程**:
|
|
81
|
-
1. `/pd-
|
|
78
|
+
1. `/pd-status` - 查看系统状态
|
|
82
79
|
2. 解释当前等级的能力边界
|
|
83
80
|
|
|
84
81
|
**话术**: "信任是挣来的,不是给的。让我帮你了解当前的安全等级。"
|
|
@@ -59,7 +59,7 @@ export declare function resolveCommandWorkspaceDir(api: OpenClawPluginApi, ctx:
|
|
|
59
59
|
* the wrong workspace.
|
|
60
60
|
*
|
|
61
61
|
* @param ctx - Plugin command context (has workspaceDir + config properties)
|
|
62
|
-
* @param source - Source label for error messages (e.g. '
|
|
62
|
+
* @param source - Source label for error messages (e.g. 'pain', 'pd-status')
|
|
63
63
|
* @param logger - Optional logger for divergence warnings (the plugin API logger)
|
|
64
64
|
*/
|
|
65
65
|
export declare function resolvePluginCommandWorkspaceDir(ctx: PluginCommandContext, source: string, logger?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Principles Disciple Command Reference
|
|
2
2
|
|
|
3
3
|
> 当前版本重点:EP (Evolution Points) 系统已接替 trust score 成为唯一门控机制。
|
|
4
|
-
> `rollback` 只回滚 `user_empathy` slice
|
|
4
|
+
> `rollback` 只回滚 `user_empathy` slice。
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -9,32 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
| 命令 | 用途 | 当前口径 |
|
|
11
11
|
|---|---|---|
|
|
12
|
-
| `/pd-evolution-status` | 查看控制面与进化面的当前状态 | 读取 `RuntimeSummaryService` 的 canonical state |
|
|
13
12
|
| `/pd-status empathy` | 查看情绪/共情事件统计 | 用于观察 `user_empathy` 与 `system_infer` 事件是否稳定落日志 |
|
|
14
13
|
| `/pd-rollback last` | 回滚最近一次情绪惩罚 | 只回滚 `user_empathy` 对应的 GFI slice |
|
|
15
14
|
| `/pd-help` | 显示帮助 | |
|
|
16
15
|
|
|
17
16
|
---
|
|
18
17
|
|
|
19
|
-
## `/pd-evolution-status`
|
|
20
|
-
|
|
21
|
-
### 它现在显示什么
|
|
22
|
-
|
|
23
|
-
- `EP Tier`: 当前 EP 等级 (Seed → Sprout → Sapling → Tree → Forest)
|
|
24
|
-
- `Session GFI`: 当前会话 GFI 与峰值
|
|
25
|
-
- `GFI Sources`: 当前 summary 能解释出来的 friction 来源
|
|
26
|
-
- `Pain Flag`: pain flag 是否激活
|
|
27
|
-
- `Gate Events`: 最近的 block / bypass
|
|
28
|
-
- `Queue / Directive`: evolution queue 与 directive 的当前状态
|
|
29
|
-
|
|
30
|
-
### 重要说明
|
|
31
|
-
|
|
32
|
-
- 这是当前控制面的权威读模型入口。
|
|
33
|
-
- 它优先读取 canonical `.state`,并尽量合并 live session / buffered events。
|
|
34
|
-
- 如果数据不完整,会显示 `partial` 或 warning,而不是静默显示 `0`。
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
18
|
## `/pd-rollback`
|
|
39
19
|
|
|
40
20
|
### 当前行为
|
|
@@ -8,31 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
| Command | Purpose |
|
|
10
10
|
|---|---|
|
|
11
|
-
| `/pd-evolution-status` | View EP tier, GFI, pain flag, and gate events |
|
|
12
11
|
| `/pd-status empathy` | Inspect empathy/frustration event statistics |
|
|
13
12
|
| `/pd-rollback last` | Roll back the latest empathy penalty |
|
|
14
13
|
|
|
15
14
|
---
|
|
16
15
|
|
|
17
|
-
## `/pd-evolution-status`
|
|
18
|
-
|
|
19
|
-
### What it shows
|
|
20
|
-
|
|
21
|
-
- `EP Tier`: Current evolution tier (Seed → Sprout → Sapling → Tree → Forest)
|
|
22
|
-
- `Session GFI`: Current session GFI and peak
|
|
23
|
-
- `GFI Sources`: Currently attributable friction sources
|
|
24
|
-
- `Pain Flag`: Whether a pain flag is active
|
|
25
|
-
- `Gate Events`: Recent block / bypass counts
|
|
26
|
-
- `Queue / Directive`: Evolution queue and directive state
|
|
27
|
-
|
|
28
|
-
### Important notes
|
|
29
|
-
|
|
30
|
-
- This is the main operator entry point into the control plane.
|
|
31
|
-
- It reads canonical `.state` and tries to merge live session state and buffered events when available.
|
|
32
|
-
- When data is incomplete, it surfaces `partial` or warnings instead of silently printing `0`.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
16
|
## `/pd-rollback`
|
|
37
17
|
|
|
38
18
|
### Current behavior
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.234.1",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/plugin/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principles-disciple",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.234.1",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,6 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
|
|
|
28
28
|
| `/pd-init` | Initialize strategy | New project startup |
|
|
29
29
|
| `/pd-bootstrap` | Environment tool scan and upgrade | Tool upgrade |
|
|
30
30
|
| `/pd-research` | Initiate tool upgrade research | Deep research |
|
|
31
|
-
| `/pd-evolution-status` | View trust score and security stage | Permission check |
|
|
32
31
|
| `/pd-status` | View system status (GFI and Pain Dictionary) | Health check |
|
|
33
32
|
| `/pd-help` | Get interactive command guidance | This skill |
|
|
34
33
|
|
|
@@ -55,7 +54,6 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
|
|
|
55
54
|
|
|
56
55
|
**Recommended Flow**:
|
|
57
56
|
1. `/pd-status` - Check system status (GFI and Pain Dictionary)
|
|
58
|
-
2. `/pd-evolution-status` - View EP tier and evolution status
|
|
59
57
|
|
|
60
58
|
**Script**: "Problems are the fuel of evolution. Let me help you diagnose and fix systematically."
|
|
61
59
|
|
|
@@ -66,8 +64,7 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
|
|
|
66
64
|
**Trigger**: The user explicitly asks for a Principles Disciple progress or health review (mentioning PD, EP, GFI, or system status)
|
|
67
65
|
|
|
68
66
|
**Recommended Flow**:
|
|
69
|
-
1. `/pd-
|
|
70
|
-
2. `/pd-status` - Check GFI and Pain Dictionary status
|
|
67
|
+
1. `/pd-status` - Check GFI and Pain Dictionary status
|
|
71
68
|
|
|
72
69
|
**Script**: "Let me help you review the current system status."
|
|
73
70
|
|
|
@@ -78,7 +75,7 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
|
|
|
78
75
|
**Trigger**: The user asks about Principles Disciple permissions, blocks, or security stages
|
|
79
76
|
|
|
80
77
|
**Recommended Flow**:
|
|
81
|
-
1. `/pd-
|
|
78
|
+
1. `/pd-status` - Check system status
|
|
82
79
|
2. Explain current stage's capability boundaries
|
|
83
80
|
|
|
84
81
|
**Script**: "Trust is earned, not given. Let me help you understand your current security level."
|
|
@@ -28,7 +28,6 @@ disable-model-invocation: true
|
|
|
28
28
|
| `/pd-init` | 初始化战略 | 新项目启动 |
|
|
29
29
|
| `/pd-bootstrap` | 环境工具扫描与升级 | 装备升级 |
|
|
30
30
|
| `/pd-research` | 发起工具升级研究 | 深度调研 |
|
|
31
|
-
| `/pd-evolution-status` | 查看EP等级与安全状态 | 状态查询 |
|
|
32
31
|
| `/pd-status` | 查看系统状态(GFI和痛苦词典) | 健康检查 |
|
|
33
32
|
| `/pd-help` | 获取交互式命令引导 | 本技能 |
|
|
34
33
|
|
|
@@ -55,7 +54,6 @@ disable-model-invocation: true
|
|
|
55
54
|
|
|
56
55
|
**推荐流程**:
|
|
57
56
|
1. `/pd-status` - 检查系统状态(GFI 和痛苦词典)
|
|
58
|
-
2. `/pd-evolution-status` - 查看 EP 等级和进化状态
|
|
59
57
|
|
|
60
58
|
**话术**: "问题就是进化的燃料。让我帮你系统化地诊断和修复。"
|
|
61
59
|
|
|
@@ -66,8 +64,7 @@ disable-model-invocation: true
|
|
|
66
64
|
**触发条件**: 用户明确要求 Principles Disciple 的进度或健康回顾(提及 PD、EP、GFI、系统状态)
|
|
67
65
|
|
|
68
66
|
**推荐流程**:
|
|
69
|
-
1. `/pd-
|
|
70
|
-
2. `/pd-status` - 查看 GFI 和痛苦词典状态
|
|
67
|
+
1. `/pd-status` - 查看 GFI 和痛苦词典状态
|
|
71
68
|
|
|
72
69
|
**话术**: "让我帮你回顾一下系统状态。"
|
|
73
70
|
|
|
@@ -78,7 +75,7 @@ disable-model-invocation: true
|
|
|
78
75
|
**触发条件**: 用户询问 Principles Disciple 的权限、拦截或安全等级
|
|
79
76
|
|
|
80
77
|
**推荐流程**:
|
|
81
|
-
1. `/pd-
|
|
78
|
+
1. `/pd-status` - 查看系统状态
|
|
82
79
|
2. 解释当前等级的能力边界
|
|
83
80
|
|
|
84
81
|
**话术**: "信任是挣来的,不是给的。让我帮你了解当前的安全等级。"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-principles-disciple",
|
|
3
|
-
"version": "1.135.
|
|
3
|
+
"version": "1.135.2",
|
|
4
4
|
"description": "Interactive CLI installer for Principles Disciple OpenClaw plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"directory": "packages/create-principles-disciple"
|
|
75
75
|
},
|
|
76
76
|
"pd": {
|
|
77
|
-
"bundledPluginVersion": "1.
|
|
77
|
+
"bundledPluginVersion": "1.234.1"
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { type Static } from '@sinclair/typebox';
|
|
2
|
-
/**
|
|
3
|
-
* Runtime truth represents the current state of the system.
|
|
4
|
-
* Used for control decisions, Phase 3 eligibility, and real-time operations.
|
|
5
|
-
* Sources: queue state, active session registry
|
|
6
|
-
*/
|
|
7
|
-
export interface RuntimeTruth {
|
|
8
|
-
queueState: {
|
|
9
|
-
total: number;
|
|
10
|
-
pending: number;
|
|
11
|
-
inProgress: number;
|
|
12
|
-
completed: number;
|
|
13
|
-
lastUpdated: string;
|
|
14
|
-
};
|
|
15
|
-
activeSessions: string[];
|
|
16
|
-
}
|
|
17
|
-
export declare const RuntimeTruthSchema: import("@sinclair/typebox").TObject<{
|
|
18
|
-
queueState: import("@sinclair/typebox").TObject<{
|
|
19
|
-
total: import("@sinclair/typebox").TNumber;
|
|
20
|
-
pending: import("@sinclair/typebox").TNumber;
|
|
21
|
-
inProgress: import("@sinclair/typebox").TNumber;
|
|
22
|
-
completed: import("@sinclair/typebox").TNumber;
|
|
23
|
-
lastUpdated: import("@sinclair/typebox").TString;
|
|
24
|
-
}>;
|
|
25
|
-
activeSessions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
26
|
-
}>;
|
|
27
|
-
export type RuntimeTruthStatic = Static<typeof RuntimeTruthSchema>;
|
|
28
|
-
/**
|
|
29
|
-
* Trend metrics for analytics aggregation.
|
|
30
|
-
*/
|
|
31
|
-
export interface TrendMetrics {
|
|
32
|
-
successRateChange: number;
|
|
33
|
-
toolCallVolumeChange: number;
|
|
34
|
-
painSignalRateChange: number;
|
|
35
|
-
}
|
|
36
|
-
export declare const TrendMetricsSchema: import("@sinclair/typebox").TObject<{
|
|
37
|
-
successRateChange: import("@sinclair/typebox").TNumber;
|
|
38
|
-
toolCallVolumeChange: import("@sinclair/typebox").TNumber;
|
|
39
|
-
painSignalRateChange: import("@sinclair/typebox").TNumber;
|
|
40
|
-
}>;
|
|
41
|
-
export type TrendMetricsStatic = Static<typeof TrendMetricsSchema>;
|
|
42
|
-
/**
|
|
43
|
-
* Analytics truth represents historical data and aggregated metrics.
|
|
44
|
-
* Used for insights, trends, and supporting evidence (where explicitly allowed).
|
|
45
|
-
* NOT used for control decisions or Phase 3 eligibility.
|
|
46
|
-
* Sources: trajectory.db, daily-stats.json, control-ui DB
|
|
47
|
-
*/
|
|
48
|
-
export interface AnalyticsTruth {
|
|
49
|
-
trajectoryData: {
|
|
50
|
-
totalTasks: number;
|
|
51
|
-
successRate: number;
|
|
52
|
-
timeoutRate: number;
|
|
53
|
-
lastUpdated: string;
|
|
54
|
-
};
|
|
55
|
-
dailyStats: {
|
|
56
|
-
toolCalls: number;
|
|
57
|
-
painSignals: number;
|
|
58
|
-
evolutionTasks: number;
|
|
59
|
-
lastUpdated: string;
|
|
60
|
-
};
|
|
61
|
-
trends: {
|
|
62
|
-
sevenDay: TrendMetrics;
|
|
63
|
-
thirtyDay: TrendMetrics;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
export declare const AnalyticsTruthSchema: import("@sinclair/typebox").TObject<{
|
|
67
|
-
trajectoryData: import("@sinclair/typebox").TObject<{
|
|
68
|
-
totalTasks: import("@sinclair/typebox").TNumber;
|
|
69
|
-
successRate: import("@sinclair/typebox").TNumber;
|
|
70
|
-
timeoutRate: import("@sinclair/typebox").TNumber;
|
|
71
|
-
lastUpdated: import("@sinclair/typebox").TString;
|
|
72
|
-
}>;
|
|
73
|
-
dailyStats: import("@sinclair/typebox").TObject<{
|
|
74
|
-
toolCalls: import("@sinclair/typebox").TNumber;
|
|
75
|
-
painSignals: import("@sinclair/typebox").TNumber;
|
|
76
|
-
evolutionTasks: import("@sinclair/typebox").TNumber;
|
|
77
|
-
lastUpdated: import("@sinclair/typebox").TString;
|
|
78
|
-
}>;
|
|
79
|
-
trends: import("@sinclair/typebox").TObject<{
|
|
80
|
-
sevenDay: import("@sinclair/typebox").TObject<{
|
|
81
|
-
successRateChange: import("@sinclair/typebox").TNumber;
|
|
82
|
-
toolCallVolumeChange: import("@sinclair/typebox").TNumber;
|
|
83
|
-
painSignalRateChange: import("@sinclair/typebox").TNumber;
|
|
84
|
-
}>;
|
|
85
|
-
thirtyDay: import("@sinclair/typebox").TObject<{
|
|
86
|
-
successRateChange: import("@sinclair/typebox").TNumber;
|
|
87
|
-
toolCallVolumeChange: import("@sinclair/typebox").TNumber;
|
|
88
|
-
painSignalRateChange: import("@sinclair/typebox").TNumber;
|
|
89
|
-
}>;
|
|
90
|
-
}>;
|
|
91
|
-
}>;
|
|
92
|
-
export type AnalyticsTruthStatic = Static<typeof AnalyticsTruthSchema>;
|
|
93
|
-
//# sourceMappingURL=runtime-summary-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-summary-types.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/types/runtime-summary-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;EAS7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,kBAAkB;;;;EAI7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,UAAU,EAAE;QACV,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE;QACN,QAAQ,EAAE,YAAY,CAAC;QACvB,SAAS,EAAE,YAAY,CAAC;KACzB,CAAC;CACH;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;EAiB/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Type } from '@sinclair/typebox';
|
|
2
|
-
export const RuntimeTruthSchema = Type.Object({
|
|
3
|
-
queueState: Type.Object({
|
|
4
|
-
total: Type.Number(),
|
|
5
|
-
pending: Type.Number(),
|
|
6
|
-
inProgress: Type.Number(),
|
|
7
|
-
completed: Type.Number(),
|
|
8
|
-
lastUpdated: Type.String(),
|
|
9
|
-
}),
|
|
10
|
-
activeSessions: Type.Array(Type.String()),
|
|
11
|
-
});
|
|
12
|
-
export const TrendMetricsSchema = Type.Object({
|
|
13
|
-
successRateChange: Type.Number(),
|
|
14
|
-
toolCallVolumeChange: Type.Number(),
|
|
15
|
-
painSignalRateChange: Type.Number(),
|
|
16
|
-
});
|
|
17
|
-
export const AnalyticsTruthSchema = Type.Object({
|
|
18
|
-
trajectoryData: Type.Object({
|
|
19
|
-
totalTasks: Type.Number(),
|
|
20
|
-
successRate: Type.Number(),
|
|
21
|
-
timeoutRate: Type.Number(),
|
|
22
|
-
lastUpdated: Type.String(),
|
|
23
|
-
}),
|
|
24
|
-
dailyStats: Type.Object({
|
|
25
|
-
toolCalls: Type.Number(),
|
|
26
|
-
painSignals: Type.Number(),
|
|
27
|
-
evolutionTasks: Type.Number(),
|
|
28
|
-
lastUpdated: Type.String(),
|
|
29
|
-
}),
|
|
30
|
-
trends: Type.Object({
|
|
31
|
-
sevenDay: TrendMetricsSchema,
|
|
32
|
-
thirtyDay: TrendMetricsSchema,
|
|
33
|
-
}),
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=runtime-summary-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-summary-types.js","sourceRoot":"","sources":["../../../src/runtime-v2/types/runtime-summary-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AAkBtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5C,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;QACtB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;QACpB,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;QACtB,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE;QACzB,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;QACxB,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;KAC3B,CAAC;IACF,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC;AAYH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5C,iBAAiB,EAAE,IAAI,CAAC,MAAM,EAAE;IAChC,oBAAoB,EAAE,IAAI,CAAC,MAAM,EAAE;IACnC,oBAAoB,EAAE,IAAI,CAAC,MAAM,EAAE;CACpC,CAAC,CAAC;AA4BH,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9C,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC;QAC1B,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE;QACzB,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;QAC1B,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;QAC1B,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;KAC3B,CAAC;IACF,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;QACtB,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;QACxB,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;QAC1B,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE;QAC7B,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;KAC3B,CAAC;IACF,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,QAAQ,EAAE,kBAAkB;QAC5B,SAAS,EAAE,kBAAkB;KAC9B,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import type { WorkflowStage } from '../core/workflow-funnel-loader.js';
|
|
2
|
-
import type { RuntimeTruth, AnalyticsTruth } from '../types/runtime-summary.js';
|
|
3
|
-
import type { GfiWorkspaceSnapshot } from '@principles/core/runtime-v2';
|
|
4
|
-
export type RuntimeDataQuality = 'authoritative' | 'partial';
|
|
5
|
-
export type RuntimeRewardPolicy = 'frozen_all_positive' | 'frozen_atomic_positive_keep_plan_ready';
|
|
6
|
-
interface RuntimeSummarySource {
|
|
7
|
-
source: string;
|
|
8
|
-
score?: number;
|
|
9
|
-
ts?: string;
|
|
10
|
-
confidence?: number;
|
|
11
|
-
origin?: string;
|
|
12
|
-
}
|
|
13
|
-
interface RuntimePainSignal {
|
|
14
|
-
source: string;
|
|
15
|
-
ts: string | null;
|
|
16
|
-
reason: string | null;
|
|
17
|
-
}
|
|
18
|
-
export interface RuntimeSummary {
|
|
19
|
-
/**
|
|
20
|
-
* Runtime truth represents the current state of the system.
|
|
21
|
-
* Used for control decisions, Phase 3 eligibility, and real-time operations.
|
|
22
|
-
*/
|
|
23
|
-
runtime: RuntimeTruth;
|
|
24
|
-
/**
|
|
25
|
-
* Analytics truth represents historical data and aggregated metrics.
|
|
26
|
-
* Used for insights, trends, and supporting evidence (where explicitly allowed).
|
|
27
|
-
* NOT used for control decisions or Phase 3 eligibility.
|
|
28
|
-
*/
|
|
29
|
-
analytics: AnalyticsTruth;
|
|
30
|
-
gfi: {
|
|
31
|
-
current: number | null;
|
|
32
|
-
peak: number | null;
|
|
33
|
-
sources: RuntimeSummarySource[];
|
|
34
|
-
dataQuality: RuntimeDataQuality;
|
|
35
|
-
workspaceSnapshot?: GfiWorkspaceSnapshot;
|
|
36
|
-
};
|
|
37
|
-
evolution: {
|
|
38
|
-
queue: {
|
|
39
|
-
pending: number;
|
|
40
|
-
inProgress: number;
|
|
41
|
-
completed: number;
|
|
42
|
-
};
|
|
43
|
-
directive: {
|
|
44
|
-
exists: boolean;
|
|
45
|
-
active: boolean | null;
|
|
46
|
-
ageSeconds: number | null;
|
|
47
|
-
taskPreview: string | null;
|
|
48
|
-
};
|
|
49
|
-
dataQuality: RuntimeDataQuality;
|
|
50
|
-
};
|
|
51
|
-
runtimeDiagnosis: {
|
|
52
|
-
/** Tasks pending in diagnostician_tasks.json (not yet processed by heartbeat) */
|
|
53
|
-
pendingTasks: number;
|
|
54
|
-
/** Total diagnosis tasks written by evolution worker (today from event log) */
|
|
55
|
-
tasksWrittenToday: number;
|
|
56
|
-
/** Total diagnostician reports written (today from event log) */
|
|
57
|
-
reportsWrittenToday: number;
|
|
58
|
-
/** Total diagnostician reports that were missing JSON (category=missing_json) */
|
|
59
|
-
reportsMissingJsonToday: number;
|
|
60
|
-
/** Total diagnostician reports with incomplete fields (category=incomplete_fields) */
|
|
61
|
-
reportsIncompleteFieldsToday: number;
|
|
62
|
-
/** Total principle candidates created from heartbeat chain (today from event log) */
|
|
63
|
-
candidatesCreatedToday: number;
|
|
64
|
-
/** Heartbeats that injected diagnostician tasks (today from event log) */
|
|
65
|
-
heartbeatsInjectedToday: number;
|
|
66
|
-
};
|
|
67
|
-
phase3: {
|
|
68
|
-
queueTruthReady: boolean;
|
|
69
|
-
phase3ShadowEligible: boolean;
|
|
70
|
-
evolutionEligible: number;
|
|
71
|
-
evolutionReferenceOnly: number;
|
|
72
|
-
evolutionReferenceOnlyReasons: string[];
|
|
73
|
-
evolutionRejected: number;
|
|
74
|
-
evolutionRejectedReasons: string[];
|
|
75
|
-
legacyDirectiveFilePresent: boolean;
|
|
76
|
-
directiveStatus: 'compatibility-only' | 'missing' | 'present';
|
|
77
|
-
directiveIgnoredReason: string;
|
|
78
|
-
/**
|
|
79
|
-
* Source of Phase 3 eligibility calculation.
|
|
80
|
-
* Should always be 'runtime_truth' - analytics not used for control decisions.
|
|
81
|
-
*/
|
|
82
|
-
eligibilitySource: 'runtime_truth';
|
|
83
|
-
};
|
|
84
|
-
pain: {
|
|
85
|
-
candidates: number | null;
|
|
86
|
-
lastSignal: RuntimePainSignal | null;
|
|
87
|
-
};
|
|
88
|
-
gate: {
|
|
89
|
-
recentBlocks: number | null;
|
|
90
|
-
recentBypasses: number | null;
|
|
91
|
-
dataQuality: RuntimeDataQuality;
|
|
92
|
-
};
|
|
93
|
-
/** YAML-driven funnel counts — only present when funnels param is provided (YAML-SSOT-01) */
|
|
94
|
-
workflowFunnels?: WorkflowFunnelOutput[];
|
|
95
|
-
metadata: {
|
|
96
|
-
generatedAt: string;
|
|
97
|
-
workspaceDir: string;
|
|
98
|
-
sessionId: string | null;
|
|
99
|
-
selectedSessionReason: 'explicit' | 'latest_active' | 'none';
|
|
100
|
-
/** 'degraded' when YAML load errors or unresolved statsField paths exist; 'ok' otherwise */
|
|
101
|
-
status: 'ok' | 'degraded';
|
|
102
|
-
warnings: string[];
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
export interface WorkflowFunnelStageOutput {
|
|
106
|
-
key: string;
|
|
107
|
-
label: string;
|
|
108
|
-
statsField: string;
|
|
109
|
-
count: number;
|
|
110
|
-
}
|
|
111
|
-
export interface WorkflowFunnelOutput {
|
|
112
|
-
funnelKey: string;
|
|
113
|
-
funnelLabel: string;
|
|
114
|
-
stages: WorkflowFunnelStageOutput[];
|
|
115
|
-
}
|
|
116
|
-
export declare class RuntimeSummaryService {
|
|
117
|
-
static getSummary(workspaceDir: string, options?: {
|
|
118
|
-
sessionId?: string | null;
|
|
119
|
-
loaderWarnings?: string[];
|
|
120
|
-
funnels?: Map<string, WorkflowStage[]>;
|
|
121
|
-
}): RuntimeSummary;
|
|
122
|
-
private static readSessions;
|
|
123
|
-
private static selectSession;
|
|
124
|
-
private static mergeSessionSnapshots;
|
|
125
|
-
private static buildQueueStats;
|
|
126
|
-
/**
|
|
127
|
-
* Builds directive summary for compatibility display only.
|
|
128
|
-
* NOT a truth source for Phase 3 eligibility or decisions.
|
|
129
|
-
* Queue is the only authoritative execution truth source.
|
|
130
|
-
*/
|
|
131
|
-
private static buildDirectiveSummary;
|
|
132
|
-
private static readEvents;
|
|
133
|
-
private static buildGfiSources;
|
|
134
|
-
private static findLastPainSignal;
|
|
135
|
-
private static buildGateStats;
|
|
136
|
-
private static resolveSessionSortTime;
|
|
137
|
-
private static mergeEvents;
|
|
138
|
-
private static getEventDedupKey;
|
|
139
|
-
private static resolveEvolutionDataQuality;
|
|
140
|
-
private static selectInProgressTask;
|
|
141
|
-
private static getQueuePriority;
|
|
142
|
-
private static isResolvableEvolutionTask;
|
|
143
|
-
private static resolveDirectiveTimestamp;
|
|
144
|
-
private static buildDirectiveTaskPreview;
|
|
145
|
-
private static warnOnLegacyDirectiveMismatch;
|
|
146
|
-
private static readJsonFile;
|
|
147
|
-
private static asFiniteNumber;
|
|
148
|
-
/**
|
|
149
|
-
* Read trajectory analytics data from trajectory database.
|
|
150
|
-
*
|
|
151
|
-
* Returns: Analytics data (historical metrics) aggregated from trajectory database.
|
|
152
|
-
* Not: Runtime truth or real-time queue state.
|
|
153
|
-
*/
|
|
154
|
-
private static readTrajectoryStats;
|
|
155
|
-
}
|
|
156
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { RuntimeTruth, AnalyticsTruth, TrendMetrics, } from '@principles/core/runtime-v2';
|