principles-disciple 1.210.0 → 1.211.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/README.md +2 -3
- package/dist/bundle.js +537 -758
- package/dist/core/event-log.d.ts +1 -2
- package/dist/core/paths.d.ts +0 -2
- package/dist/core/profile.d.ts +0 -19
- package/dist/core/rule-host.d.ts +19 -0
- package/dist/core/session-tracker.d.ts +0 -13
- package/dist/core/thinking-os-parser.d.ts +0 -5
- package/dist/core/trajectory-types.d.ts +0 -1
- package/dist/core/trajectory.d.ts +0 -12
- package/dist/hooks/gate.d.ts +0 -1
- package/dist/openclaw.plugin.json +1 -1
- package/dist/templates/langs/en/skills/pd-mentor/SKILL.md +3 -4
- package/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +3 -4
- package/dist/templates/workspace/.principles/PROFILE.json +0 -29
- package/dist/templates/workspace/.principles/PROFILE.schema.json +16 -25
- package/dist/templates/workspace/okr/CURRENT_FOCUS.md +0 -1
- package/dist/types/event-types.d.ts +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/templates/langs/en/skills/pd-mentor/SKILL.md +3 -4
- package/templates/langs/zh/skills/pd-mentor/SKILL.md +3 -4
- package/templates/workspace/.principles/PROFILE.json +0 -29
- package/templates/workspace/.principles/PROFILE.schema.json +16 -25
- package/templates/workspace/okr/CURRENT_FOCUS.md +0 -1
- package/dist/commands/thinking-os.d.ts +0 -2
- package/dist/core/control-ui-db.d.ts +0 -117
- package/dist/core/thinking-models.d.ts +0 -25
- package/dist/templates/workspace/.principles/THINKING_OS_CANDIDATES.md +0 -9
- package/templates/workspace/.principles/THINKING_OS_CANDIDATES.md +0 -9
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Control UI database stores ANALYTICS READ MODELS.
|
|
3
|
-
*
|
|
4
|
-
* PURPOSE: Aggregated data for dashboard visualization and historical insights.
|
|
5
|
-
* USAGE: Control UI queries and dashboard displays.
|
|
6
|
-
* NOT FOR: Control decisions, Phase 3 eligibility, or real-time operations.
|
|
7
|
-
*
|
|
8
|
-
* Runtime truth comes from: queue state, workspace trust scorecard, active sessions
|
|
9
|
-
*/
|
|
10
|
-
export interface ThinkingModelEventInput {
|
|
11
|
-
sessionId: string;
|
|
12
|
-
runId: string;
|
|
13
|
-
assistantTurnId: number;
|
|
14
|
-
modelId: string;
|
|
15
|
-
matchedPattern: string;
|
|
16
|
-
scenarioJson: unknown;
|
|
17
|
-
toolContextJson: unknown;
|
|
18
|
-
painContextJson: unknown;
|
|
19
|
-
principleContextJson: unknown;
|
|
20
|
-
triggerExcerpt: string;
|
|
21
|
-
createdAt: string;
|
|
22
|
-
}
|
|
23
|
-
export interface ControlUiDatabaseOptions {
|
|
24
|
-
workspaceDir: string;
|
|
25
|
-
busyTimeoutMs?: number;
|
|
26
|
-
}
|
|
27
|
-
export interface RecentThinkingContext {
|
|
28
|
-
toolCalls: {
|
|
29
|
-
id: number;
|
|
30
|
-
toolName: string;
|
|
31
|
-
outcome: 'success' | 'failure' | 'blocked';
|
|
32
|
-
errorType: string | null;
|
|
33
|
-
errorMessage: string | null;
|
|
34
|
-
createdAt: string;
|
|
35
|
-
}[];
|
|
36
|
-
painEvents: {
|
|
37
|
-
id: number;
|
|
38
|
-
source: string;
|
|
39
|
-
score: number;
|
|
40
|
-
reason: string | null;
|
|
41
|
-
createdAt: string;
|
|
42
|
-
}[];
|
|
43
|
-
gateBlocks: {
|
|
44
|
-
id: number;
|
|
45
|
-
toolName: string;
|
|
46
|
-
reason: string;
|
|
47
|
-
filePath: string | null;
|
|
48
|
-
createdAt: string;
|
|
49
|
-
}[];
|
|
50
|
-
userCorrections: {
|
|
51
|
-
id: number;
|
|
52
|
-
correctionCue: string | null;
|
|
53
|
-
rawExcerpt: string | null;
|
|
54
|
-
createdAt: string;
|
|
55
|
-
}[];
|
|
56
|
-
principleEvents: {
|
|
57
|
-
id: number;
|
|
58
|
-
principleId: string | null;
|
|
59
|
-
eventType: string;
|
|
60
|
-
createdAt: string;
|
|
61
|
-
}[];
|
|
62
|
-
}
|
|
63
|
-
export declare class ControlUiDatabase {
|
|
64
|
-
private readonly workspaceDir;
|
|
65
|
-
private readonly dbPath;
|
|
66
|
-
private readonly blobDir;
|
|
67
|
-
private readonly db;
|
|
68
|
-
constructor(opts: ControlUiDatabaseOptions);
|
|
69
|
-
dispose(): void;
|
|
70
|
-
recordThinkingModelEvent(input: ThinkingModelEventInput): number;
|
|
71
|
-
/**
|
|
72
|
-
* Get recent thinking context for a session.
|
|
73
|
-
*
|
|
74
|
-
* Returns: Analytics data (read model) aggregated from trajectory database.
|
|
75
|
-
* Not: Runtime truth or real-time queue state.
|
|
76
|
-
*/
|
|
77
|
-
getRecentThinkingContext(sessionId: string, beforeCreatedAt: string, limit?: number): RecentThinkingContext;
|
|
78
|
-
/**
|
|
79
|
-
* Execute SQL query and return all rows.
|
|
80
|
-
*
|
|
81
|
-
* Returns: Analytics data (read model) aggregated from trajectory database.
|
|
82
|
-
* Not: Runtime truth or real-time queue state.
|
|
83
|
-
*/
|
|
84
|
-
all<T>(sql: string, ...params: unknown[]): T[];
|
|
85
|
-
/**
|
|
86
|
-
* Execute SQL query and return first row.
|
|
87
|
-
*
|
|
88
|
-
* Returns: Analytics data (read model) aggregated from trajectory database.
|
|
89
|
-
* Not: Runtime truth or real-time queue state.
|
|
90
|
-
*/
|
|
91
|
-
get<T>(sql: string, ...params: unknown[]): T | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Execute SQL statement that does not return rows (DDL, CREATE TABLE, etc.).
|
|
94
|
-
*
|
|
95
|
-
* Returns: void (executes directly)
|
|
96
|
-
* Not for: SELECT queries (use all() or get() instead)
|
|
97
|
-
*/
|
|
98
|
-
execute(sql: string): void;
|
|
99
|
-
/**
|
|
100
|
-
* Execute a parameterized write statement (INSERT, UPDATE, DELETE).
|
|
101
|
-
*/
|
|
102
|
-
run(sql: string, ...params: unknown[]): void;
|
|
103
|
-
restoreRawText(inlineText?: string | null, blobRef?: string | null): string;
|
|
104
|
-
private initSchema;
|
|
105
|
-
/**
|
|
106
|
-
* Create or replace a view, tolerating missing dependency tables.
|
|
107
|
-
*
|
|
108
|
-
* Views in ControlUiDatabase depend on tables created by TrajectoryDatabase
|
|
109
|
-
* (assistant_turns, tool_calls, pain_events, user_turns, correction_samples).
|
|
110
|
-
* If ControlUiDatabase is constructed before TrajectoryDatabase has created
|
|
111
|
-
* those tables, CREATE VIEW would throw. We DROP+CREATE with try/catch so
|
|
112
|
-
* missing-dependency views are skipped with a warning (rc-9: surfaced via
|
|
113
|
-
* console.info) rather than aborting schema initialization.
|
|
114
|
-
*/
|
|
115
|
-
private createViewSafely;
|
|
116
|
-
private withWrite;
|
|
117
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Thinking Models — Plugin I/O Adapter (Stage 3 slim)
|
|
3
|
-
*
|
|
4
|
-
* Pure logic (BUILTIN_PATTERNS, BUILTIN_PATTERN_MAP, getFallbackName,
|
|
5
|
-
* getFallbackDescription, deriveThinkingScenarios, types) lives in
|
|
6
|
-
* @principles/core/runtime-v2/thinking-models.
|
|
7
|
-
*
|
|
8
|
-
* This file owns only the I/O boundary: reading THINKING_OS.md from a
|
|
9
|
-
* workspace dir and merging it with the builtin patterns. It re-exports
|
|
10
|
-
* the pure functions and types so existing relative imports
|
|
11
|
-
* (../core/thinking-models.js) continue to resolve.
|
|
12
|
-
*/
|
|
13
|
-
import { type ThinkingModelDefinition, type ThinkingModelMatch } from '@principles/core/runtime-v2';
|
|
14
|
-
export { BUILTIN_PATTERN_MAP, getFallbackName, getFallbackDescription, } from '@principles/core/runtime-v2';
|
|
15
|
-
export { deriveThinkingScenarios } from '@principles/core/runtime-v2';
|
|
16
|
-
export type { ThinkingModelDefinition, ThinkingModelMatch, ThinkingScenarioContext, } from '@principles/core/runtime-v2';
|
|
17
|
-
/**
|
|
18
|
-
* Load thinking model definitions dynamically from THINKING_OS.md.
|
|
19
|
-
* Falls back to built-in definitions if parsing fails.
|
|
20
|
-
*
|
|
21
|
-
* @param workspaceDir Optional. If provided, loads from that workspace's THINKING_OS.md.
|
|
22
|
-
*/
|
|
23
|
-
export declare function listThinkingModels(workspaceDir?: string): ThinkingModelDefinition[];
|
|
24
|
-
export declare function getThinkingModel(modelId: string, workspaceDir?: string): ThinkingModelDefinition | undefined;
|
|
25
|
-
export declare function detectThinkingModelMatches(text: string, workspaceDir?: string): ThinkingModelMatch[];
|