@cleocode/contracts 2.0.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/dist/adapter.d.ts +36 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +8 -0
- package/dist/adapter.js.map +1 -0
- package/dist/archive.d.ts +100 -0
- package/dist/archive.d.ts.map +1 -0
- package/dist/archive.js +7 -0
- package/dist/archive.js.map +1 -0
- package/dist/brain.d.ts +36 -0
- package/dist/brain.d.ts.map +1 -0
- package/dist/brain.js +10 -0
- package/dist/brain.js.map +1 -0
- package/dist/capabilities.d.ts +21 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +7 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/config.d.ts +118 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -0
- package/dist/context-monitor.d.ts +16 -0
- package/dist/context-monitor.d.ts.map +1 -0
- package/dist/context-monitor.js +7 -0
- package/dist/context-monitor.js.map +1 -0
- package/dist/data-accessor.d.ts +167 -0
- package/dist/data-accessor.d.ts.map +1 -0
- package/dist/data-accessor.js +18 -0
- package/dist/data-accessor.js.map +1 -0
- package/dist/discovery.d.ts +29 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +7 -0
- package/dist/discovery.js.map +1 -0
- package/dist/exit-codes.d.ts +109 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +158 -0
- package/dist/exit-codes.js.map +1 -0
- package/dist/hooks.d.ts +17 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +8 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/install.d.ts +26 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +8 -0
- package/dist/install.js.map +1 -0
- package/dist/lafs.d.ts +132 -0
- package/dist/lafs.d.ts.map +1 -0
- package/dist/lafs.js +26 -0
- package/dist/lafs.js.map +1 -0
- package/dist/memory.d.ts +51 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +8 -0
- package/dist/memory.js.map +1 -0
- package/dist/operations/index.d.ts +17 -0
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +17 -0
- package/dist/operations/index.js.map +1 -0
- package/dist/operations/issues.d.ts +75 -0
- package/dist/operations/issues.d.ts.map +1 -0
- package/dist/operations/issues.js +10 -0
- package/dist/operations/issues.js.map +1 -0
- package/dist/operations/lifecycle.d.ts +141 -0
- package/dist/operations/lifecycle.d.ts.map +1 -0
- package/dist/operations/lifecycle.js +8 -0
- package/dist/operations/lifecycle.js.map +1 -0
- package/dist/operations/orchestrate.d.ts +202 -0
- package/dist/operations/orchestrate.d.ts.map +1 -0
- package/dist/operations/orchestrate.js +8 -0
- package/dist/operations/orchestrate.js.map +1 -0
- package/dist/operations/release.d.ts +97 -0
- package/dist/operations/release.d.ts.map +1 -0
- package/dist/operations/release.js +7 -0
- package/dist/operations/release.js.map +1 -0
- package/dist/operations/research.d.ts +126 -0
- package/dist/operations/research.d.ts.map +1 -0
- package/dist/operations/research.js +11 -0
- package/dist/operations/research.js.map +1 -0
- package/dist/operations/session.d.ts +99 -0
- package/dist/operations/session.d.ts.map +1 -0
- package/dist/operations/session.js +12 -0
- package/dist/operations/session.js.map +1 -0
- package/dist/operations/skills.d.ts +182 -0
- package/dist/operations/skills.d.ts.map +1 -0
- package/dist/operations/skills.js +10 -0
- package/dist/operations/skills.js.map +1 -0
- package/dist/operations/system.d.ts +147 -0
- package/dist/operations/system.d.ts.map +1 -0
- package/dist/operations/system.js +8 -0
- package/dist/operations/system.js.map +1 -0
- package/dist/operations/tasks.d.ts +231 -0
- package/dist/operations/tasks.d.ts.map +1 -0
- package/dist/operations/tasks.js +13 -0
- package/dist/operations/tasks.js.map +1 -0
- package/dist/operations/validate.d.ts +170 -0
- package/dist/operations/validate.d.ts.map +1 -0
- package/dist/operations/validate.js +8 -0
- package/dist/operations/validate.js.map +1 -0
- package/dist/provider-paths.d.ts +16 -0
- package/dist/provider-paths.d.ts.map +1 -0
- package/dist/provider-paths.js +7 -0
- package/dist/provider-paths.js.map +1 -0
- package/dist/results.d.ts +188 -0
- package/dist/results.d.ts.map +1 -0
- package/dist/results.js +10 -0
- package/dist/results.js.map +1 -0
- package/dist/session.d.ts +106 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +77 -0
- package/dist/session.js.map +1 -0
- package/dist/spawn-types.d.ts +119 -0
- package/dist/spawn-types.d.ts.map +1 -0
- package/dist/spawn-types.js +12 -0
- package/dist/spawn-types.js.map +1 -0
- package/dist/spawn.d.ts +30 -0
- package/dist/spawn.d.ts.map +1 -0
- package/dist/spawn.js +7 -0
- package/dist/spawn.js.map +1 -0
- package/dist/status-registry.d.ts +50 -0
- package/dist/status-registry.d.ts.map +1 -0
- package/dist/status-registry.js +125 -0
- package/dist/status-registry.js.map +1 -0
- package/dist/task-record.d.ts +67 -0
- package/dist/task-record.d.ts.map +1 -0
- package/dist/task-record.js +11 -0
- package/dist/task-record.js.map +1 -0
- package/dist/task-sync.d.ts +143 -0
- package/dist/task-sync.d.ts.map +1 -0
- package/dist/task-sync.js +11 -0
- package/dist/task-sync.js.map +1 -0
- package/dist/task.d.ts +294 -0
- package/dist/task.d.ts.map +1 -0
- package/dist/task.js +24 -0
- package/dist/task.js.map +1 -0
- package/dist/tessera.d.ts +32 -0
- package/dist/tessera.d.ts.map +1 -0
- package/dist/tessera.js +11 -0
- package/dist/tessera.js.map +1 -0
- package/dist/todowrite.d.ts +53 -0
- package/dist/todowrite.d.ts.map +1 -0
- package/dist/todowrite.js +7 -0
- package/dist/todowrite.js.map +1 -0
- package/dist/transport.d.ts +12 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +7 -0
- package/dist/transport.js.map +1 -0
- package/dist/warp-chain.d.ts +121 -0
- package/dist/warp-chain.d.ts.map +1 -0
- package/dist/warp-chain.js +13 -0
- package/dist/warp-chain.js.map +1 -0
- package/package.json +29 -0
- package/src/adapter.ts +38 -0
- package/src/archive.ts +121 -0
- package/src/brain.ts +39 -0
- package/src/capabilities.ts +21 -0
- package/src/config.ts +135 -0
- package/src/context-monitor.ts +16 -0
- package/src/data-accessor.ts +239 -0
- package/src/discovery.ts +31 -0
- package/src/exit-codes.ts +175 -0
- package/src/hooks.ts +17 -0
- package/src/index.ts +298 -0
- package/src/install.ts +28 -0
- package/src/lafs.ts +194 -0
- package/src/memory.ts +57 -0
- package/src/operations/index.ts +17 -0
- package/src/operations/issues.ts +86 -0
- package/src/operations/lifecycle.ts +176 -0
- package/src/operations/orchestrate.ts +199 -0
- package/src/operations/release.ts +114 -0
- package/src/operations/research.ts +156 -0
- package/src/operations/session.ts +119 -0
- package/src/operations/skills.ts +210 -0
- package/src/operations/system.ts +174 -0
- package/src/operations/tasks.ts +279 -0
- package/src/operations/validate.ts +199 -0
- package/src/provider-paths.ts +16 -0
- package/src/results.ts +207 -0
- package/src/session.ts +157 -0
- package/src/spawn-types.ts +140 -0
- package/src/spawn.ts +32 -0
- package/src/status-registry.ts +166 -0
- package/src/task-record.ts +71 -0
- package/src/task-sync.ts +167 -0
- package/src/task.ts +387 -0
- package/src/tessera.ts +35 -0
- package/src/todowrite.ts +58 -0
- package/src/transport.ts +12 -0
- package/src/warp-chain.ts +174 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Domain Operations (9 operations)
|
|
3
|
+
*
|
|
4
|
+
* Query operations: 4
|
|
5
|
+
* Mutate operations: 5
|
|
6
|
+
*
|
|
7
|
+
* SYNC: Canonical type definitions live in the CLI package at:
|
|
8
|
+
* src/types/session.ts (Session, SessionScope, etc.)
|
|
9
|
+
* These MCP operation types are the API contract (wire format).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Common session types
|
|
14
|
+
*/
|
|
15
|
+
export interface SessionOp {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
scope: string;
|
|
19
|
+
started: string;
|
|
20
|
+
ended?: string;
|
|
21
|
+
startedTask?: string;
|
|
22
|
+
status: 'active' | 'suspended' | 'ended';
|
|
23
|
+
notes?: string[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Query Operations
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
// session.status
|
|
31
|
+
export type SessionStatusParams = Record<string, never>;
|
|
32
|
+
export interface SessionStatusResult {
|
|
33
|
+
current: SessionOp | null;
|
|
34
|
+
hasStartedTask: boolean;
|
|
35
|
+
startedTask?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// session.list
|
|
39
|
+
export interface SessionListParams {
|
|
40
|
+
active?: boolean;
|
|
41
|
+
status?: string;
|
|
42
|
+
limit?: number;
|
|
43
|
+
offset?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface SessionListResult {
|
|
46
|
+
sessions: SessionOp[];
|
|
47
|
+
total: number;
|
|
48
|
+
filtered: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// session.show
|
|
52
|
+
export interface SessionShowParams {
|
|
53
|
+
sessionId: string;
|
|
54
|
+
}
|
|
55
|
+
export type SessionShowResult = SessionOp;
|
|
56
|
+
|
|
57
|
+
// session.history
|
|
58
|
+
export interface SessionHistoryParams {
|
|
59
|
+
limit?: number;
|
|
60
|
+
}
|
|
61
|
+
export interface SessionHistoryEntry {
|
|
62
|
+
sessionId: string;
|
|
63
|
+
name: string;
|
|
64
|
+
started: string;
|
|
65
|
+
ended: string;
|
|
66
|
+
tasksCompleted: number;
|
|
67
|
+
duration: string;
|
|
68
|
+
}
|
|
69
|
+
export type SessionHistoryResult = SessionHistoryEntry[];
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Mutate Operations
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
// session.start
|
|
76
|
+
export interface SessionStartParams {
|
|
77
|
+
scope: string;
|
|
78
|
+
name?: string;
|
|
79
|
+
autoStart?: boolean;
|
|
80
|
+
startTask?: string;
|
|
81
|
+
}
|
|
82
|
+
export type SessionStartResult = SessionOp;
|
|
83
|
+
|
|
84
|
+
// session.end
|
|
85
|
+
export interface SessionEndParams {
|
|
86
|
+
notes?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface SessionEndResult {
|
|
89
|
+
session: SessionOp;
|
|
90
|
+
summary: {
|
|
91
|
+
duration: string;
|
|
92
|
+
tasksCompleted: number;
|
|
93
|
+
tasksCreated: number;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// session.resume
|
|
98
|
+
export interface SessionResumeParams {
|
|
99
|
+
sessionId: string;
|
|
100
|
+
}
|
|
101
|
+
export type SessionResumeResult = SessionOp;
|
|
102
|
+
|
|
103
|
+
// session.suspend
|
|
104
|
+
export interface SessionSuspendParams {
|
|
105
|
+
notes?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface SessionSuspendResult {
|
|
108
|
+
sessionId: string;
|
|
109
|
+
suspended: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// session.gc
|
|
113
|
+
export interface SessionGcParams {
|
|
114
|
+
olderThan?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface SessionGcResult {
|
|
117
|
+
cleaned: number;
|
|
118
|
+
sessionIds: string[];
|
|
119
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills Domain Operations (12 operations)
|
|
3
|
+
*
|
|
4
|
+
* Query operations: 6 (list, show, find, dispatch, verify, dependencies)
|
|
5
|
+
* Mutate operations: 6 (install, uninstall, enable, disable, configure, refresh)
|
|
6
|
+
*
|
|
7
|
+
* @task T4387
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Common skill types
|
|
12
|
+
*/
|
|
13
|
+
export type SkillCategory = 'core' | 'recommended' | 'specialist' | 'composition' | 'meta';
|
|
14
|
+
export type SkillStatus = 'active' | 'disabled' | 'deprecated' | 'missing';
|
|
15
|
+
export type DispatchStrategy = 'label' | 'type' | 'keyword' | 'fallback';
|
|
16
|
+
|
|
17
|
+
export interface SkillSummary {
|
|
18
|
+
name: string;
|
|
19
|
+
version: string;
|
|
20
|
+
description: string;
|
|
21
|
+
category: SkillCategory;
|
|
22
|
+
core: boolean;
|
|
23
|
+
tier: number;
|
|
24
|
+
status: SkillStatus;
|
|
25
|
+
protocol: string | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface SkillDetail extends SkillSummary {
|
|
29
|
+
path: string;
|
|
30
|
+
references: string[];
|
|
31
|
+
dependencies: string[];
|
|
32
|
+
sharedResources: string[];
|
|
33
|
+
compatibility: string[];
|
|
34
|
+
license: string;
|
|
35
|
+
metadata: Record<string, unknown>;
|
|
36
|
+
capabilities?: {
|
|
37
|
+
inputs: string[];
|
|
38
|
+
outputs: string[];
|
|
39
|
+
dispatch_triggers: string[];
|
|
40
|
+
compatible_subagent_types: string[];
|
|
41
|
+
chains_to: string[];
|
|
42
|
+
dispatch_keywords: {
|
|
43
|
+
primary: string[];
|
|
44
|
+
secondary: string[];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
constraints?: {
|
|
48
|
+
max_context_tokens: number;
|
|
49
|
+
requires_session: boolean;
|
|
50
|
+
requires_epic: boolean;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface DispatchCandidate {
|
|
55
|
+
skill: string;
|
|
56
|
+
score: number;
|
|
57
|
+
strategy: DispatchStrategy;
|
|
58
|
+
reason: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface DependencyNode {
|
|
62
|
+
name: string;
|
|
63
|
+
version: string;
|
|
64
|
+
direct: boolean;
|
|
65
|
+
depth: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface ValidationIssue {
|
|
69
|
+
level: 'error' | 'warn';
|
|
70
|
+
field: string;
|
|
71
|
+
message: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Query Operations
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
// skills.list
|
|
79
|
+
export interface SkillsListParams {
|
|
80
|
+
category?: SkillCategory;
|
|
81
|
+
core?: boolean;
|
|
82
|
+
filter?: string;
|
|
83
|
+
}
|
|
84
|
+
export type SkillsListResult = SkillSummary[];
|
|
85
|
+
|
|
86
|
+
// skills.show
|
|
87
|
+
export interface SkillsShowParams {
|
|
88
|
+
name: string;
|
|
89
|
+
}
|
|
90
|
+
export type SkillsShowResult = SkillDetail;
|
|
91
|
+
|
|
92
|
+
// skills.find
|
|
93
|
+
export interface SkillsFindParams {
|
|
94
|
+
query: string;
|
|
95
|
+
limit?: number;
|
|
96
|
+
}
|
|
97
|
+
export interface SkillsFindResult {
|
|
98
|
+
query: string;
|
|
99
|
+
results: Array<SkillSummary & { score: number; matchReason: string }>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// skills.dispatch
|
|
103
|
+
export interface SkillsDispatchParams {
|
|
104
|
+
taskId?: string;
|
|
105
|
+
taskType?: string;
|
|
106
|
+
labels?: string[];
|
|
107
|
+
title?: string;
|
|
108
|
+
description?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface SkillsDispatchResult {
|
|
111
|
+
selectedSkill: string;
|
|
112
|
+
reason: string;
|
|
113
|
+
strategy: DispatchStrategy;
|
|
114
|
+
candidates: DispatchCandidate[];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// skills.verify
|
|
118
|
+
export interface SkillsVerifyParams {
|
|
119
|
+
name?: string;
|
|
120
|
+
}
|
|
121
|
+
export interface SkillsVerifyResult {
|
|
122
|
+
valid: boolean;
|
|
123
|
+
total: number;
|
|
124
|
+
passed: number;
|
|
125
|
+
failed: number;
|
|
126
|
+
results: Array<{
|
|
127
|
+
name: string;
|
|
128
|
+
valid: boolean;
|
|
129
|
+
issues: ValidationIssue[];
|
|
130
|
+
}>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// skills.dependencies
|
|
134
|
+
export interface SkillsDependenciesParams {
|
|
135
|
+
name: string;
|
|
136
|
+
transitive?: boolean;
|
|
137
|
+
}
|
|
138
|
+
export interface SkillsDependenciesResult {
|
|
139
|
+
name: string;
|
|
140
|
+
dependencies: DependencyNode[];
|
|
141
|
+
resolved: string[];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Mutate Operations
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
// skills.install
|
|
149
|
+
export interface SkillsInstallParams {
|
|
150
|
+
name: string;
|
|
151
|
+
source?: string;
|
|
152
|
+
}
|
|
153
|
+
export interface SkillsInstallResult {
|
|
154
|
+
name: string;
|
|
155
|
+
installed: boolean;
|
|
156
|
+
version: string;
|
|
157
|
+
path: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// skills.uninstall
|
|
161
|
+
export interface SkillsUninstallParams {
|
|
162
|
+
name: string;
|
|
163
|
+
force?: boolean;
|
|
164
|
+
}
|
|
165
|
+
export interface SkillsUninstallResult {
|
|
166
|
+
name: string;
|
|
167
|
+
uninstalled: boolean;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// skills.enable
|
|
171
|
+
export interface SkillsEnableParams {
|
|
172
|
+
name: string;
|
|
173
|
+
}
|
|
174
|
+
export interface SkillsEnableResult {
|
|
175
|
+
name: string;
|
|
176
|
+
enabled: boolean;
|
|
177
|
+
status: SkillStatus;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// skills.disable
|
|
181
|
+
export interface SkillsDisableParams {
|
|
182
|
+
name: string;
|
|
183
|
+
reason?: string;
|
|
184
|
+
}
|
|
185
|
+
export interface SkillsDisableResult {
|
|
186
|
+
name: string;
|
|
187
|
+
disabled: boolean;
|
|
188
|
+
status: SkillStatus;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// skills.configure
|
|
192
|
+
export interface SkillsConfigureParams {
|
|
193
|
+
name: string;
|
|
194
|
+
config: Record<string, unknown>;
|
|
195
|
+
}
|
|
196
|
+
export interface SkillsConfigureResult {
|
|
197
|
+
name: string;
|
|
198
|
+
configured: boolean;
|
|
199
|
+
config: Record<string, unknown>;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// skills.refresh
|
|
203
|
+
export interface SkillsRefreshParams {
|
|
204
|
+
force?: boolean;
|
|
205
|
+
}
|
|
206
|
+
export interface SkillsRefreshResult {
|
|
207
|
+
refreshed: boolean;
|
|
208
|
+
skillCount: number;
|
|
209
|
+
timestamp: string;
|
|
210
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System Domain Operations (12 operations)
|
|
3
|
+
*
|
|
4
|
+
* Query operations: 5
|
|
5
|
+
* Mutate operations: 7
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Common system types
|
|
10
|
+
*/
|
|
11
|
+
export interface HealthCheck {
|
|
12
|
+
component: string;
|
|
13
|
+
healthy: boolean;
|
|
14
|
+
message?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ProjectStats {
|
|
18
|
+
tasks: {
|
|
19
|
+
total: number;
|
|
20
|
+
pending: number;
|
|
21
|
+
active: number;
|
|
22
|
+
blocked: number;
|
|
23
|
+
done: number;
|
|
24
|
+
};
|
|
25
|
+
sessions: {
|
|
26
|
+
total: number;
|
|
27
|
+
active: number;
|
|
28
|
+
};
|
|
29
|
+
research: {
|
|
30
|
+
total: number;
|
|
31
|
+
complete: number;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Query Operations
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
// system.version
|
|
40
|
+
export type SystemVersionParams = Record<string, never>;
|
|
41
|
+
export interface SystemVersionResult {
|
|
42
|
+
version: string;
|
|
43
|
+
schemaVersion: string;
|
|
44
|
+
buildDate: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// system.doctor
|
|
48
|
+
export type SystemDoctorParams = Record<string, never>;
|
|
49
|
+
export interface SystemDoctorResult {
|
|
50
|
+
healthy: boolean;
|
|
51
|
+
checks: HealthCheck[];
|
|
52
|
+
warnings: string[];
|
|
53
|
+
errors: string[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// system.config.get
|
|
57
|
+
export interface SystemConfigGetParams {
|
|
58
|
+
key: string;
|
|
59
|
+
}
|
|
60
|
+
export interface SystemConfigGetResult {
|
|
61
|
+
key: string;
|
|
62
|
+
value: unknown;
|
|
63
|
+
type: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// system.stats
|
|
67
|
+
export type SystemStatsParams = Record<string, never>;
|
|
68
|
+
export type SystemStatsResult = ProjectStats;
|
|
69
|
+
|
|
70
|
+
// system.context
|
|
71
|
+
export type SystemContextParams = Record<string, never>;
|
|
72
|
+
export interface SystemContextResult {
|
|
73
|
+
currentTokens: number;
|
|
74
|
+
maxTokens: number;
|
|
75
|
+
percentUsed: number;
|
|
76
|
+
level: 'safe' | 'medium' | 'high' | 'critical';
|
|
77
|
+
estimatedFiles: number;
|
|
78
|
+
largestFile: {
|
|
79
|
+
path: string;
|
|
80
|
+
tokens: number;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Mutate Operations
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
// system.init
|
|
89
|
+
export interface SystemInitParams {
|
|
90
|
+
projectType?: 'nodejs' | 'python' | 'bash' | 'typescript' | 'rust' | 'go';
|
|
91
|
+
detect?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface SystemInitResult {
|
|
94
|
+
initialized: boolean;
|
|
95
|
+
projectType?: string;
|
|
96
|
+
filesCreated: string[];
|
|
97
|
+
detectedFeatures?: Record<string, boolean>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// system.config.set
|
|
101
|
+
export interface SystemConfigSetParams {
|
|
102
|
+
key: string;
|
|
103
|
+
value: unknown;
|
|
104
|
+
}
|
|
105
|
+
export interface SystemConfigSetResult {
|
|
106
|
+
key: string;
|
|
107
|
+
value: unknown;
|
|
108
|
+
previousValue?: unknown;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// system.backup
|
|
112
|
+
export interface SystemBackupParams {
|
|
113
|
+
type?: 'snapshot' | 'safety' | 'archive' | 'migration';
|
|
114
|
+
note?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface SystemBackupResult {
|
|
117
|
+
backupId: string;
|
|
118
|
+
type: string;
|
|
119
|
+
timestamp: string;
|
|
120
|
+
files: string[];
|
|
121
|
+
size: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// system.restore
|
|
125
|
+
export interface SystemRestoreParams {
|
|
126
|
+
backupId: string;
|
|
127
|
+
}
|
|
128
|
+
export interface SystemRestoreResult {
|
|
129
|
+
backupId: string;
|
|
130
|
+
restored: string;
|
|
131
|
+
filesRestored: string[];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// system.migrate
|
|
135
|
+
export interface SystemMigrateParams {
|
|
136
|
+
version?: string;
|
|
137
|
+
dryRun?: boolean;
|
|
138
|
+
}
|
|
139
|
+
export interface SystemMigrateResult {
|
|
140
|
+
fromVersion: string;
|
|
141
|
+
toVersion: string;
|
|
142
|
+
migrations: Array<{
|
|
143
|
+
name: string;
|
|
144
|
+
applied: boolean;
|
|
145
|
+
error?: string;
|
|
146
|
+
}>;
|
|
147
|
+
dryRun: boolean;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// system.sync
|
|
151
|
+
export interface SystemSyncParams {
|
|
152
|
+
direction?: 'push' | 'pull' | 'bidirectional';
|
|
153
|
+
}
|
|
154
|
+
export interface SystemSyncResult {
|
|
155
|
+
direction: string;
|
|
156
|
+
synced: string;
|
|
157
|
+
tasksSynced: number;
|
|
158
|
+
conflicts: Array<{
|
|
159
|
+
taskId: string;
|
|
160
|
+
resolution: string;
|
|
161
|
+
}>;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// system.cleanup
|
|
165
|
+
export interface SystemCleanupParams {
|
|
166
|
+
type: 'backups' | 'logs' | 'archive' | 'sessions';
|
|
167
|
+
olderThan?: string;
|
|
168
|
+
}
|
|
169
|
+
export interface SystemCleanupResult {
|
|
170
|
+
type: string;
|
|
171
|
+
cleaned: number;
|
|
172
|
+
freed: number;
|
|
173
|
+
items: string[];
|
|
174
|
+
}
|