@agimon-ai/doompi-extension-contracts 0.0.1-alpha.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/LICENSE +21 -0
- package/README.md +34 -0
- package/dist/backgroundWork.cjs +2 -0
- package/dist/backgroundWork.cjs.map +1 -0
- package/dist/backgroundWork.d.cts +73 -0
- package/dist/backgroundWork.d.cts.map +1 -0
- package/dist/backgroundWork.d.mts +73 -0
- package/dist/backgroundWork.d.mts.map +1 -0
- package/dist/backgroundWork.mjs +2 -0
- package/dist/backgroundWork.mjs.map +1 -0
- package/dist/childProcess.cjs +2 -0
- package/dist/childProcess.cjs.map +1 -0
- package/dist/childProcess.d.cts +20 -0
- package/dist/childProcess.d.cts.map +1 -0
- package/dist/childProcess.d.mts +20 -0
- package/dist/childProcess.d.mts.map +1 -0
- package/dist/childProcess.mjs +2 -0
- package/dist/childProcess.mjs.map +1 -0
- package/dist/config.cjs +2 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +517 -0
- package/dist/config.d.cts.map +1 -0
- package/dist/config.d.mts +517 -0
- package/dist/config.d.mts.map +1 -0
- package/dist/config.mjs +2 -0
- package/dist/config.mjs.map +1 -0
- package/dist/delegation.cjs +2 -0
- package/dist/delegation.cjs.map +1 -0
- package/dist/delegation.d.cts +114 -0
- package/dist/delegation.d.cts.map +1 -0
- package/dist/delegation.d.mts +114 -0
- package/dist/delegation.d.mts.map +1 -0
- package/dist/delegation.mjs +2 -0
- package/dist/delegation.mjs.map +1 -0
- package/dist/fablePlan.cjs +2 -0
- package/dist/fablePlan.cjs.map +1 -0
- package/dist/fablePlan.d.cts +143 -0
- package/dist/fablePlan.d.cts.map +1 -0
- package/dist/fablePlan.d.mts +143 -0
- package/dist/fablePlan.d.mts.map +1 -0
- package/dist/fablePlan.mjs +2 -0
- package/dist/fablePlan.mjs.map +1 -0
- package/dist/footer.cjs +2 -0
- package/dist/footer.cjs.map +1 -0
- package/dist/footer.d.cts +141 -0
- package/dist/footer.d.cts.map +1 -0
- package/dist/footer.d.mts +141 -0
- package/dist/footer.d.mts.map +1 -0
- package/dist/footer.mjs +2 -0
- package/dist/footer.mjs.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +1 -0
- package/dist/leader.cjs +2 -0
- package/dist/leader.cjs.map +1 -0
- package/dist/leader.d.cts +171 -0
- package/dist/leader.d.cts.map +1 -0
- package/dist/leader.d.mts +171 -0
- package/dist/leader.d.mts.map +1 -0
- package/dist/leader.mjs +2 -0
- package/dist/leader.mjs.map +1 -0
- package/dist/mcpStatus.cjs +2 -0
- package/dist/mcpStatus.cjs.map +1 -0
- package/dist/mcpStatus.d.cts +79 -0
- package/dist/mcpStatus.d.cts.map +1 -0
- package/dist/mcpStatus.d.mts +79 -0
- package/dist/mcpStatus.d.mts.map +1 -0
- package/dist/mcpStatus.mjs +2 -0
- package/dist/mcpStatus.mjs.map +1 -0
- package/dist/mode.cjs +2 -0
- package/dist/mode.cjs.map +1 -0
- package/dist/mode.d.cts +132 -0
- package/dist/mode.d.cts.map +1 -0
- package/dist/mode.d.mts +132 -0
- package/dist/mode.d.mts.map +1 -0
- package/dist/mode.mjs +2 -0
- package/dist/mode.mjs.map +1 -0
- package/dist/protocol.cjs +2 -0
- package/dist/protocol.cjs.map +1 -0
- package/dist/protocol.d.cts +83 -0
- package/dist/protocol.d.cts.map +1 -0
- package/dist/protocol.d.mts +83 -0
- package/dist/protocol.d.mts.map +1 -0
- package/dist/protocol.mjs +2 -0
- package/dist/protocol.mjs.map +1 -0
- package/dist/runnerPty.cjs +2 -0
- package/dist/runnerPty.cjs.map +1 -0
- package/dist/runnerPty.d.cts +39 -0
- package/dist/runnerPty.d.cts.map +1 -0
- package/dist/runnerPty.d.mts +39 -0
- package/dist/runnerPty.d.mts.map +1 -0
- package/dist/runnerPty.mjs +2 -0
- package/dist/runnerPty.mjs.map +1 -0
- package/dist/skills.cjs +2 -0
- package/dist/skills.cjs.map +1 -0
- package/dist/skills.d.cts +51 -0
- package/dist/skills.d.cts.map +1 -0
- package/dist/skills.d.mts +51 -0
- package/dist/skills.d.mts.map +1 -0
- package/dist/skills.mjs +2 -0
- package/dist/skills.mjs.map +1 -0
- package/dist/subagentPolicy.cjs +2 -0
- package/dist/subagentPolicy.cjs.map +1 -0
- package/dist/subagentPolicy.d.cts +47 -0
- package/dist/subagentPolicy.d.cts.map +1 -0
- package/dist/subagentPolicy.d.mts +47 -0
- package/dist/subagentPolicy.d.mts.map +1 -0
- package/dist/subagentPolicy.mjs +2 -0
- package/dist/subagentPolicy.mjs.map +1 -0
- package/dist/subagentTool.cjs +2 -0
- package/dist/subagentTool.cjs.map +1 -0
- package/dist/subagentTool.d.cts +78 -0
- package/dist/subagentTool.d.cts.map +1 -0
- package/dist/subagentTool.d.mts +78 -0
- package/dist/subagentTool.d.mts.map +1 -0
- package/dist/subagentTool.mjs +2 -0
- package/dist/subagentTool.mjs.map +1 -0
- package/dist/workflow.cjs +2 -0
- package/dist/workflow.cjs.map +1 -0
- package/dist/workflow.d.cts +15 -0
- package/dist/workflow.d.cts.map +1 -0
- package/dist/workflow.d.mts +15 -0
- package/dist/workflow.d.mts.map +1 -0
- package/dist/workflow.mjs +2 -0
- package/dist/workflow.mjs.map +1 -0
- package/package.json +121 -0
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { EventBusLike, NotificationDefinition, ProtocolRuntime } from "./protocol.cjs";
|
|
2
|
+
import { Static, Type } from "typebox";
|
|
3
|
+
//#region src/config.d.ts
|
|
4
|
+
/** Matches the leader contract's source rule: package names, addressable and spoof-checkable. */
|
|
5
|
+
declare const ConfigSourceSchema: Type.TString;
|
|
6
|
+
/**
|
|
7
|
+
* How ready a value is to be used, as opposed to whether it is merely set.
|
|
8
|
+
* `blocked` covers a choice that needs something else first, such as a model
|
|
9
|
+
* whose engine is not installed.
|
|
10
|
+
*/
|
|
11
|
+
declare const ConfigStatusSchema: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>;
|
|
12
|
+
type ConfigStatus = Static<typeof ConfigStatusSchema>;
|
|
13
|
+
declare const ConfigFieldKindSchema: Type.TUnion<[Type.TLiteral<"text">, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>;
|
|
14
|
+
type ConfigFieldKind = Static<typeof ConfigFieldKindSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* A key the renderer offers on the focused field, sent back verbatim as an
|
|
17
|
+
* action. Owners use this for confirmations, so the pending question survives a
|
|
18
|
+
* panel that is closed and reopened.
|
|
19
|
+
*/
|
|
20
|
+
declare const ConfigActionSchema: Type.TObject<{
|
|
21
|
+
key: Type.TString;
|
|
22
|
+
label: Type.TString;
|
|
23
|
+
action: Type.TString;
|
|
24
|
+
}>;
|
|
25
|
+
type ConfigAction = Static<typeof ConfigActionSchema>;
|
|
26
|
+
declare const ConfigChoiceSchema: Type.TObject<{
|
|
27
|
+
id: Type.TString;
|
|
28
|
+
label: Type.TString;
|
|
29
|
+
/** Right-aligned by the renderer. Sizes, ids, anything narrow. */
|
|
30
|
+
detail: Type.TOptional<Type.TString>;
|
|
31
|
+
/** Groups entries under a heading the cursor skips over. */
|
|
32
|
+
group: Type.TOptional<Type.TString>;
|
|
33
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
34
|
+
statusText: Type.TOptional<Type.TString>;
|
|
35
|
+
/**
|
|
36
|
+
* What enter does on this entry. Carrying it per-entry is what lets one list
|
|
37
|
+
* hold both an installed model that only needs selecting and an absent one
|
|
38
|
+
* that needs fetching, without the renderer knowing the difference.
|
|
39
|
+
*/
|
|
40
|
+
action: Type.TOptional<Type.TString>;
|
|
41
|
+
}>;
|
|
42
|
+
type ConfigChoice = Static<typeof ConfigChoiceSchema>;
|
|
43
|
+
/**
|
|
44
|
+
* One line of a multi-step operation.
|
|
45
|
+
*
|
|
46
|
+
* Published as a list rather than a single "current step" string so the panel can
|
|
47
|
+
* show what already ran alongside what is left. During an install that is the
|
|
48
|
+
* difference between "something is happening" and knowing a package manager
|
|
49
|
+
* already finished and a download is now underway.
|
|
50
|
+
*/
|
|
51
|
+
declare const ConfigStepSchema: Type.TObject<{
|
|
52
|
+
label: Type.TString;
|
|
53
|
+
state: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>;
|
|
54
|
+
detail: Type.TOptional<Type.TString>;
|
|
55
|
+
}>;
|
|
56
|
+
type ConfigStep = Static<typeof ConfigStepSchema>;
|
|
57
|
+
declare const ConfigProgressSchema: Type.TObject<{
|
|
58
|
+
label: Type.TString;
|
|
59
|
+
/** 0 to 1. Omitted when the work has no measurable total. */
|
|
60
|
+
ratio: Type.TOptional<Type.TNumber>;
|
|
61
|
+
}>;
|
|
62
|
+
type ConfigProgress = Static<typeof ConfigProgressSchema>;
|
|
63
|
+
declare const ConfigFieldSchema: Type.TObject<{
|
|
64
|
+
id: Type.TString;
|
|
65
|
+
label: Type.TString;
|
|
66
|
+
kind: Type.TUnion<[Type.TLiteral<"text">, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>;
|
|
67
|
+
/** Absent means unset; the renderer shows `placeholder` instead. */
|
|
68
|
+
value: Type.TOptional<Type.TString>;
|
|
69
|
+
placeholder: Type.TOptional<Type.TString>;
|
|
70
|
+
/** One line of help for the focused field. */
|
|
71
|
+
detail: Type.TOptional<Type.TString>;
|
|
72
|
+
/** The config key this writes, shown under the focused field so the file stays legible. */
|
|
73
|
+
keyPath: Type.TOptional<Type.TString>;
|
|
74
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
75
|
+
/** Doubles as the error line: a rejected edit comes back as the old value plus this. */
|
|
76
|
+
statusText: Type.TOptional<Type.TString>;
|
|
77
|
+
choices: Type.TOptional<Type.TArray<Type.TObject<{
|
|
78
|
+
id: Type.TString;
|
|
79
|
+
label: Type.TString;
|
|
80
|
+
/** Right-aligned by the renderer. Sizes, ids, anything narrow. */
|
|
81
|
+
detail: Type.TOptional<Type.TString>;
|
|
82
|
+
/** Groups entries under a heading the cursor skips over. */
|
|
83
|
+
group: Type.TOptional<Type.TString>;
|
|
84
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
85
|
+
statusText: Type.TOptional<Type.TString>;
|
|
86
|
+
/**
|
|
87
|
+
* What enter does on this entry. Carrying it per-entry is what lets one list
|
|
88
|
+
* hold both an installed model that only needs selecting and an absent one
|
|
89
|
+
* that needs fetching, without the renderer knowing the difference.
|
|
90
|
+
*/
|
|
91
|
+
action: Type.TOptional<Type.TString>;
|
|
92
|
+
}>>>;
|
|
93
|
+
actions: Type.TOptional<Type.TArray<Type.TObject<{
|
|
94
|
+
key: Type.TString;
|
|
95
|
+
label: Type.TString;
|
|
96
|
+
action: Type.TString;
|
|
97
|
+
}>>>;
|
|
98
|
+
/** Work is running; the renderer dims the field and offers abort. */
|
|
99
|
+
busy: Type.TOptional<Type.TBoolean>;
|
|
100
|
+
progress: Type.TOptional<Type.TObject<{
|
|
101
|
+
label: Type.TString;
|
|
102
|
+
/** 0 to 1. Omitted when the work has no measurable total. */
|
|
103
|
+
ratio: Type.TOptional<Type.TNumber>;
|
|
104
|
+
}>>;
|
|
105
|
+
steps: Type.TOptional<Type.TArray<Type.TObject<{
|
|
106
|
+
label: Type.TString;
|
|
107
|
+
state: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>;
|
|
108
|
+
detail: Type.TOptional<Type.TString>;
|
|
109
|
+
}>>>;
|
|
110
|
+
/**
|
|
111
|
+
* The tail of a running command's terminal output.
|
|
112
|
+
*
|
|
113
|
+
* A tail rather than the whole scrollback: the field is a few rows of a
|
|
114
|
+
* shared pane, and what matters is the question a package manager just
|
|
115
|
+
* asked, not what it printed a minute ago.
|
|
116
|
+
*/
|
|
117
|
+
output: Type.TOptional<Type.TArray<Type.TString>>;
|
|
118
|
+
/**
|
|
119
|
+
* The command is waiting on the user. The renderer offers a line to type
|
|
120
|
+
* into, which comes back as an owner-defined action carrying the text.
|
|
121
|
+
*/
|
|
122
|
+
awaitingInput: Type.TOptional<Type.TBoolean>;
|
|
123
|
+
}>;
|
|
124
|
+
type ConfigField = Static<typeof ConfigFieldSchema>;
|
|
125
|
+
declare const ConfigSectionSchema: Type.TObject<{
|
|
126
|
+
id: Type.TString;
|
|
127
|
+
title: Type.TString;
|
|
128
|
+
detail: Type.TOptional<Type.TString>;
|
|
129
|
+
order: Type.TInteger;
|
|
130
|
+
/** Section-wide state: readiness, or why a write failed. */
|
|
131
|
+
notice: Type.TOptional<Type.TString>;
|
|
132
|
+
noticeLevel: Type.TOptional<Type.TUnion<[Type.TLiteral<"info">, Type.TLiteral<"error">]>>;
|
|
133
|
+
fields: Type.TArray<Type.TObject<{
|
|
134
|
+
id: Type.TString;
|
|
135
|
+
label: Type.TString;
|
|
136
|
+
kind: Type.TUnion<[Type.TLiteral<"text">, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>;
|
|
137
|
+
/** Absent means unset; the renderer shows `placeholder` instead. */
|
|
138
|
+
value: Type.TOptional<Type.TString>;
|
|
139
|
+
placeholder: Type.TOptional<Type.TString>;
|
|
140
|
+
/** One line of help for the focused field. */
|
|
141
|
+
detail: Type.TOptional<Type.TString>;
|
|
142
|
+
/** The config key this writes, shown under the focused field so the file stays legible. */
|
|
143
|
+
keyPath: Type.TOptional<Type.TString>;
|
|
144
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
145
|
+
/** Doubles as the error line: a rejected edit comes back as the old value plus this. */
|
|
146
|
+
statusText: Type.TOptional<Type.TString>;
|
|
147
|
+
choices: Type.TOptional<Type.TArray<Type.TObject<{
|
|
148
|
+
id: Type.TString;
|
|
149
|
+
label: Type.TString;
|
|
150
|
+
/** Right-aligned by the renderer. Sizes, ids, anything narrow. */
|
|
151
|
+
detail: Type.TOptional<Type.TString>;
|
|
152
|
+
/** Groups entries under a heading the cursor skips over. */
|
|
153
|
+
group: Type.TOptional<Type.TString>;
|
|
154
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
155
|
+
statusText: Type.TOptional<Type.TString>;
|
|
156
|
+
/**
|
|
157
|
+
* What enter does on this entry. Carrying it per-entry is what lets one list
|
|
158
|
+
* hold both an installed model that only needs selecting and an absent one
|
|
159
|
+
* that needs fetching, without the renderer knowing the difference.
|
|
160
|
+
*/
|
|
161
|
+
action: Type.TOptional<Type.TString>;
|
|
162
|
+
}>>>;
|
|
163
|
+
actions: Type.TOptional<Type.TArray<Type.TObject<{
|
|
164
|
+
key: Type.TString;
|
|
165
|
+
label: Type.TString;
|
|
166
|
+
action: Type.TString;
|
|
167
|
+
}>>>;
|
|
168
|
+
/** Work is running; the renderer dims the field and offers abort. */
|
|
169
|
+
busy: Type.TOptional<Type.TBoolean>;
|
|
170
|
+
progress: Type.TOptional<Type.TObject<{
|
|
171
|
+
label: Type.TString;
|
|
172
|
+
/** 0 to 1. Omitted when the work has no measurable total. */
|
|
173
|
+
ratio: Type.TOptional<Type.TNumber>;
|
|
174
|
+
}>>;
|
|
175
|
+
steps: Type.TOptional<Type.TArray<Type.TObject<{
|
|
176
|
+
label: Type.TString;
|
|
177
|
+
state: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>;
|
|
178
|
+
detail: Type.TOptional<Type.TString>;
|
|
179
|
+
}>>>;
|
|
180
|
+
/**
|
|
181
|
+
* The tail of a running command's terminal output.
|
|
182
|
+
*
|
|
183
|
+
* A tail rather than the whole scrollback: the field is a few rows of a
|
|
184
|
+
* shared pane, and what matters is the question a package manager just
|
|
185
|
+
* asked, not what it printed a minute ago.
|
|
186
|
+
*/
|
|
187
|
+
output: Type.TOptional<Type.TArray<Type.TString>>;
|
|
188
|
+
/**
|
|
189
|
+
* The command is waiting on the user. The renderer offers a line to type
|
|
190
|
+
* into, which comes back as an owner-defined action carrying the text.
|
|
191
|
+
*/
|
|
192
|
+
awaitingInput: Type.TOptional<Type.TBoolean>;
|
|
193
|
+
}>>;
|
|
194
|
+
}>;
|
|
195
|
+
type ConfigSection = Static<typeof ConfigSectionSchema>;
|
|
196
|
+
declare const ConfigSourceRefSchema: Type.TObject<{
|
|
197
|
+
source: Type.TString;
|
|
198
|
+
generation: Type.TString;
|
|
199
|
+
}>;
|
|
200
|
+
declare const ConfigSnapshotSchema: Type.TObject<{
|
|
201
|
+
sections: Type.TArray<Type.TObject<{
|
|
202
|
+
id: Type.TString;
|
|
203
|
+
title: Type.TString;
|
|
204
|
+
detail: Type.TOptional<Type.TString>;
|
|
205
|
+
order: Type.TInteger;
|
|
206
|
+
/** Section-wide state: readiness, or why a write failed. */
|
|
207
|
+
notice: Type.TOptional<Type.TString>;
|
|
208
|
+
noticeLevel: Type.TOptional<Type.TUnion<[Type.TLiteral<"info">, Type.TLiteral<"error">]>>;
|
|
209
|
+
fields: Type.TArray<Type.TObject<{
|
|
210
|
+
id: Type.TString;
|
|
211
|
+
label: Type.TString;
|
|
212
|
+
kind: Type.TUnion<[Type.TLiteral<"text">, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>;
|
|
213
|
+
/** Absent means unset; the renderer shows `placeholder` instead. */
|
|
214
|
+
value: Type.TOptional<Type.TString>;
|
|
215
|
+
placeholder: Type.TOptional<Type.TString>;
|
|
216
|
+
/** One line of help for the focused field. */
|
|
217
|
+
detail: Type.TOptional<Type.TString>;
|
|
218
|
+
/** The config key this writes, shown under the focused field so the file stays legible. */
|
|
219
|
+
keyPath: Type.TOptional<Type.TString>;
|
|
220
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
221
|
+
/** Doubles as the error line: a rejected edit comes back as the old value plus this. */
|
|
222
|
+
statusText: Type.TOptional<Type.TString>;
|
|
223
|
+
choices: Type.TOptional<Type.TArray<Type.TObject<{
|
|
224
|
+
id: Type.TString;
|
|
225
|
+
label: Type.TString;
|
|
226
|
+
/** Right-aligned by the renderer. Sizes, ids, anything narrow. */
|
|
227
|
+
detail: Type.TOptional<Type.TString>;
|
|
228
|
+
/** Groups entries under a heading the cursor skips over. */
|
|
229
|
+
group: Type.TOptional<Type.TString>;
|
|
230
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
231
|
+
statusText: Type.TOptional<Type.TString>;
|
|
232
|
+
/**
|
|
233
|
+
* What enter does on this entry. Carrying it per-entry is what lets one list
|
|
234
|
+
* hold both an installed model that only needs selecting and an absent one
|
|
235
|
+
* that needs fetching, without the renderer knowing the difference.
|
|
236
|
+
*/
|
|
237
|
+
action: Type.TOptional<Type.TString>;
|
|
238
|
+
}>>>;
|
|
239
|
+
actions: Type.TOptional<Type.TArray<Type.TObject<{
|
|
240
|
+
key: Type.TString;
|
|
241
|
+
label: Type.TString;
|
|
242
|
+
action: Type.TString;
|
|
243
|
+
}>>>;
|
|
244
|
+
/** Work is running; the renderer dims the field and offers abort. */
|
|
245
|
+
busy: Type.TOptional<Type.TBoolean>;
|
|
246
|
+
progress: Type.TOptional<Type.TObject<{
|
|
247
|
+
label: Type.TString;
|
|
248
|
+
/** 0 to 1. Omitted when the work has no measurable total. */
|
|
249
|
+
ratio: Type.TOptional<Type.TNumber>;
|
|
250
|
+
}>>;
|
|
251
|
+
steps: Type.TOptional<Type.TArray<Type.TObject<{
|
|
252
|
+
label: Type.TString;
|
|
253
|
+
state: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>;
|
|
254
|
+
detail: Type.TOptional<Type.TString>;
|
|
255
|
+
}>>>;
|
|
256
|
+
/**
|
|
257
|
+
* The tail of a running command's terminal output.
|
|
258
|
+
*
|
|
259
|
+
* A tail rather than the whole scrollback: the field is a few rows of a
|
|
260
|
+
* shared pane, and what matters is the question a package manager just
|
|
261
|
+
* asked, not what it printed a minute ago.
|
|
262
|
+
*/
|
|
263
|
+
output: Type.TOptional<Type.TArray<Type.TString>>;
|
|
264
|
+
/**
|
|
265
|
+
* The command is waiting on the user. The renderer offers a line to type
|
|
266
|
+
* into, which comes back as an owner-defined action carrying the text.
|
|
267
|
+
*/
|
|
268
|
+
awaitingInput: Type.TOptional<Type.TBoolean>;
|
|
269
|
+
}>>;
|
|
270
|
+
}>>;
|
|
271
|
+
source: Type.TString;
|
|
272
|
+
generation: Type.TString;
|
|
273
|
+
}>;
|
|
274
|
+
type ConfigSnapshot = Static<typeof ConfigSnapshotSchema>;
|
|
275
|
+
type ConfigSourceRef = Static<typeof ConfigSourceRefSchema>;
|
|
276
|
+
declare const ConfigDiscovery: NotificationDefinition<Type.TObject<{}>>;
|
|
277
|
+
declare const ConfigRegistration: NotificationDefinition<Type.TObject<{
|
|
278
|
+
sections: Type.TArray<Type.TObject<{
|
|
279
|
+
id: Type.TString;
|
|
280
|
+
title: Type.TString;
|
|
281
|
+
detail: Type.TOptional<Type.TString>;
|
|
282
|
+
order: Type.TInteger;
|
|
283
|
+
/** Section-wide state: readiness, or why a write failed. */
|
|
284
|
+
notice: Type.TOptional<Type.TString>;
|
|
285
|
+
noticeLevel: Type.TOptional<Type.TUnion<[Type.TLiteral<"info">, Type.TLiteral<"error">]>>;
|
|
286
|
+
fields: Type.TArray<Type.TObject<{
|
|
287
|
+
id: Type.TString;
|
|
288
|
+
label: Type.TString;
|
|
289
|
+
kind: Type.TUnion<[Type.TLiteral<"text">, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>;
|
|
290
|
+
/** Absent means unset; the renderer shows `placeholder` instead. */
|
|
291
|
+
value: Type.TOptional<Type.TString>;
|
|
292
|
+
placeholder: Type.TOptional<Type.TString>;
|
|
293
|
+
/** One line of help for the focused field. */
|
|
294
|
+
detail: Type.TOptional<Type.TString>;
|
|
295
|
+
/** The config key this writes, shown under the focused field so the file stays legible. */
|
|
296
|
+
keyPath: Type.TOptional<Type.TString>;
|
|
297
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
298
|
+
/** Doubles as the error line: a rejected edit comes back as the old value plus this. */
|
|
299
|
+
statusText: Type.TOptional<Type.TString>;
|
|
300
|
+
choices: Type.TOptional<Type.TArray<Type.TObject<{
|
|
301
|
+
id: Type.TString;
|
|
302
|
+
label: Type.TString;
|
|
303
|
+
/** Right-aligned by the renderer. Sizes, ids, anything narrow. */
|
|
304
|
+
detail: Type.TOptional<Type.TString>;
|
|
305
|
+
/** Groups entries under a heading the cursor skips over. */
|
|
306
|
+
group: Type.TOptional<Type.TString>;
|
|
307
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
308
|
+
statusText: Type.TOptional<Type.TString>;
|
|
309
|
+
/**
|
|
310
|
+
* What enter does on this entry. Carrying it per-entry is what lets one list
|
|
311
|
+
* hold both an installed model that only needs selecting and an absent one
|
|
312
|
+
* that needs fetching, without the renderer knowing the difference.
|
|
313
|
+
*/
|
|
314
|
+
action: Type.TOptional<Type.TString>;
|
|
315
|
+
}>>>;
|
|
316
|
+
actions: Type.TOptional<Type.TArray<Type.TObject<{
|
|
317
|
+
key: Type.TString;
|
|
318
|
+
label: Type.TString;
|
|
319
|
+
action: Type.TString;
|
|
320
|
+
}>>>;
|
|
321
|
+
/** Work is running; the renderer dims the field and offers abort. */
|
|
322
|
+
busy: Type.TOptional<Type.TBoolean>;
|
|
323
|
+
progress: Type.TOptional<Type.TObject<{
|
|
324
|
+
label: Type.TString;
|
|
325
|
+
/** 0 to 1. Omitted when the work has no measurable total. */
|
|
326
|
+
ratio: Type.TOptional<Type.TNumber>;
|
|
327
|
+
}>>;
|
|
328
|
+
steps: Type.TOptional<Type.TArray<Type.TObject<{
|
|
329
|
+
label: Type.TString;
|
|
330
|
+
state: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>;
|
|
331
|
+
detail: Type.TOptional<Type.TString>;
|
|
332
|
+
}>>>;
|
|
333
|
+
/**
|
|
334
|
+
* The tail of a running command's terminal output.
|
|
335
|
+
*
|
|
336
|
+
* A tail rather than the whole scrollback: the field is a few rows of a
|
|
337
|
+
* shared pane, and what matters is the question a package manager just
|
|
338
|
+
* asked, not what it printed a minute ago.
|
|
339
|
+
*/
|
|
340
|
+
output: Type.TOptional<Type.TArray<Type.TString>>;
|
|
341
|
+
/**
|
|
342
|
+
* The command is waiting on the user. The renderer offers a line to type
|
|
343
|
+
* into, which comes back as an owner-defined action carrying the text.
|
|
344
|
+
*/
|
|
345
|
+
awaitingInput: Type.TOptional<Type.TBoolean>;
|
|
346
|
+
}>>;
|
|
347
|
+
}>>;
|
|
348
|
+
source: Type.TString;
|
|
349
|
+
generation: Type.TString;
|
|
350
|
+
}>>;
|
|
351
|
+
/** Also the reply channel: every invoked action is answered by one of these. */
|
|
352
|
+
declare const ConfigChanged: NotificationDefinition<Type.TObject<{
|
|
353
|
+
sections: Type.TArray<Type.TObject<{
|
|
354
|
+
id: Type.TString;
|
|
355
|
+
title: Type.TString;
|
|
356
|
+
detail: Type.TOptional<Type.TString>;
|
|
357
|
+
order: Type.TInteger;
|
|
358
|
+
/** Section-wide state: readiness, or why a write failed. */
|
|
359
|
+
notice: Type.TOptional<Type.TString>;
|
|
360
|
+
noticeLevel: Type.TOptional<Type.TUnion<[Type.TLiteral<"info">, Type.TLiteral<"error">]>>;
|
|
361
|
+
fields: Type.TArray<Type.TObject<{
|
|
362
|
+
id: Type.TString;
|
|
363
|
+
label: Type.TString;
|
|
364
|
+
kind: Type.TUnion<[Type.TLiteral<"text">, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>;
|
|
365
|
+
/** Absent means unset; the renderer shows `placeholder` instead. */
|
|
366
|
+
value: Type.TOptional<Type.TString>;
|
|
367
|
+
placeholder: Type.TOptional<Type.TString>;
|
|
368
|
+
/** One line of help for the focused field. */
|
|
369
|
+
detail: Type.TOptional<Type.TString>;
|
|
370
|
+
/** The config key this writes, shown under the focused field so the file stays legible. */
|
|
371
|
+
keyPath: Type.TOptional<Type.TString>;
|
|
372
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
373
|
+
/** Doubles as the error line: a rejected edit comes back as the old value plus this. */
|
|
374
|
+
statusText: Type.TOptional<Type.TString>;
|
|
375
|
+
choices: Type.TOptional<Type.TArray<Type.TObject<{
|
|
376
|
+
id: Type.TString;
|
|
377
|
+
label: Type.TString;
|
|
378
|
+
/** Right-aligned by the renderer. Sizes, ids, anything narrow. */
|
|
379
|
+
detail: Type.TOptional<Type.TString>;
|
|
380
|
+
/** Groups entries under a heading the cursor skips over. */
|
|
381
|
+
group: Type.TOptional<Type.TString>;
|
|
382
|
+
status: Type.TOptional<Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>;
|
|
383
|
+
statusText: Type.TOptional<Type.TString>;
|
|
384
|
+
/**
|
|
385
|
+
* What enter does on this entry. Carrying it per-entry is what lets one list
|
|
386
|
+
* hold both an installed model that only needs selecting and an absent one
|
|
387
|
+
* that needs fetching, without the renderer knowing the difference.
|
|
388
|
+
*/
|
|
389
|
+
action: Type.TOptional<Type.TString>;
|
|
390
|
+
}>>>;
|
|
391
|
+
actions: Type.TOptional<Type.TArray<Type.TObject<{
|
|
392
|
+
key: Type.TString;
|
|
393
|
+
label: Type.TString;
|
|
394
|
+
action: Type.TString;
|
|
395
|
+
}>>>;
|
|
396
|
+
/** Work is running; the renderer dims the field and offers abort. */
|
|
397
|
+
busy: Type.TOptional<Type.TBoolean>;
|
|
398
|
+
progress: Type.TOptional<Type.TObject<{
|
|
399
|
+
label: Type.TString;
|
|
400
|
+
/** 0 to 1. Omitted when the work has no measurable total. */
|
|
401
|
+
ratio: Type.TOptional<Type.TNumber>;
|
|
402
|
+
}>>;
|
|
403
|
+
steps: Type.TOptional<Type.TArray<Type.TObject<{
|
|
404
|
+
label: Type.TString;
|
|
405
|
+
state: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>;
|
|
406
|
+
detail: Type.TOptional<Type.TString>;
|
|
407
|
+
}>>>;
|
|
408
|
+
/**
|
|
409
|
+
* The tail of a running command's terminal output.
|
|
410
|
+
*
|
|
411
|
+
* A tail rather than the whole scrollback: the field is a few rows of a
|
|
412
|
+
* shared pane, and what matters is the question a package manager just
|
|
413
|
+
* asked, not what it printed a minute ago.
|
|
414
|
+
*/
|
|
415
|
+
output: Type.TOptional<Type.TArray<Type.TString>>;
|
|
416
|
+
/**
|
|
417
|
+
* The command is waiting on the user. The renderer offers a line to type
|
|
418
|
+
* into, which comes back as an owner-defined action carrying the text.
|
|
419
|
+
*/
|
|
420
|
+
awaitingInput: Type.TOptional<Type.TBoolean>;
|
|
421
|
+
}>>;
|
|
422
|
+
}>>;
|
|
423
|
+
source: Type.TString;
|
|
424
|
+
generation: Type.TString;
|
|
425
|
+
}>>;
|
|
426
|
+
declare const ConfigUnregistration: NotificationDefinition<Type.TObject<{
|
|
427
|
+
source: Type.TString;
|
|
428
|
+
generation: Type.TString;
|
|
429
|
+
}>>;
|
|
430
|
+
/**
|
|
431
|
+
* A keystroke handed back to the field's owner.
|
|
432
|
+
*
|
|
433
|
+
* A notification rather than a request/reply because every owner listens on one
|
|
434
|
+
* channel: with request/reply each `provide` would answer, and a non-addressed
|
|
435
|
+
* owner's reply would race the real one. Owners answer with `ConfigChanged`
|
|
436
|
+
* instead, on success and on failure alike, which is also what carries progress
|
|
437
|
+
* while long work runs.
|
|
438
|
+
*
|
|
439
|
+
* `set` and `clear` are the two the renderer originates on its own. Everything
|
|
440
|
+
* else is an owner-defined name the renderer read off a choice or an action and
|
|
441
|
+
* hands back verbatim.
|
|
442
|
+
*/
|
|
443
|
+
declare const ConfigInvoked: NotificationDefinition<Type.TObject<{
|
|
444
|
+
/** The addressed owner. Checked against the envelope source by the receiver. */
|
|
445
|
+
source: Type.TString;
|
|
446
|
+
sectionId: Type.TString;
|
|
447
|
+
fieldId: Type.TString;
|
|
448
|
+
action: Type.TString;
|
|
449
|
+
/** The typed text for `set`, or the chosen entry's id for a choice action. */
|
|
450
|
+
value: Type.TOptional<Type.TString>;
|
|
451
|
+
}>>;
|
|
452
|
+
declare const CONFIG_ACTION: {
|
|
453
|
+
readonly set: "set";
|
|
454
|
+
readonly clear: "clear";
|
|
455
|
+
};
|
|
456
|
+
interface ConfigProvider {
|
|
457
|
+
source: string;
|
|
458
|
+
listSections(): readonly ConfigSection[];
|
|
459
|
+
}
|
|
460
|
+
interface ConfigProviderHandle {
|
|
461
|
+
update(): void;
|
|
462
|
+
dispose(): void;
|
|
463
|
+
}
|
|
464
|
+
declare function registerConfigProvider(runtime: ProtocolRuntime, provider: ConfigProvider): ConfigProviderHandle;
|
|
465
|
+
interface DoomExtensionContext {
|
|
466
|
+
sessionManager: {
|
|
467
|
+
getSessionId(): string;
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
interface DoomExtensionHost {
|
|
471
|
+
events: EventBusLike;
|
|
472
|
+
on(event: string, handler: (event: unknown, context: DoomExtensionContext) => void): void;
|
|
473
|
+
}
|
|
474
|
+
interface DoomConfigSectionView extends ConfigSection {
|
|
475
|
+
source: string;
|
|
476
|
+
}
|
|
477
|
+
interface DoomConfigInvocation {
|
|
478
|
+
source: string;
|
|
479
|
+
sectionId: string;
|
|
480
|
+
fieldId: string;
|
|
481
|
+
action: string;
|
|
482
|
+
value?: string;
|
|
483
|
+
}
|
|
484
|
+
declare class DoomConfigRegistry {
|
|
485
|
+
private readonly sources;
|
|
486
|
+
private readonly listeners;
|
|
487
|
+
private runtime;
|
|
488
|
+
bind(runtime: ProtocolRuntime): () => void;
|
|
489
|
+
getSections(): DoomConfigSectionView[];
|
|
490
|
+
invoke(invocation: DoomConfigInvocation): void;
|
|
491
|
+
subscribe(listener: () => void): () => void;
|
|
492
|
+
reset(): void;
|
|
493
|
+
private register;
|
|
494
|
+
private update;
|
|
495
|
+
private unregister;
|
|
496
|
+
private notify;
|
|
497
|
+
}
|
|
498
|
+
interface DoomConfigActionInput {
|
|
499
|
+
ctx: DoomExtensionContext;
|
|
500
|
+
sectionId: string;
|
|
501
|
+
fieldId: string;
|
|
502
|
+
value?: string;
|
|
503
|
+
}
|
|
504
|
+
interface DoomConfigContributionOptions {
|
|
505
|
+
source: string;
|
|
506
|
+
listSections: () => readonly ConfigSection[];
|
|
507
|
+
handlers: Readonly<Record<string, (input: DoomConfigActionInput) => void | Promise<void>>>;
|
|
508
|
+
onError: (error: unknown, actionName: string, ctx: DoomExtensionContext) => void;
|
|
509
|
+
}
|
|
510
|
+
interface DoomConfigContributionHandle {
|
|
511
|
+
update(): void;
|
|
512
|
+
dispose(): void;
|
|
513
|
+
}
|
|
514
|
+
declare function registerDoomConfigContribution(pi: DoomExtensionHost, options: DoomConfigContributionOptions): DoomConfigContributionHandle;
|
|
515
|
+
//#endregion
|
|
516
|
+
export { CONFIG_ACTION, ConfigAction, ConfigActionSchema, ConfigChanged, ConfigChoice, ConfigChoiceSchema, ConfigDiscovery, ConfigField, ConfigFieldKind, ConfigFieldKindSchema, ConfigFieldSchema, ConfigInvoked, ConfigProgress, ConfigProgressSchema, ConfigProvider, ConfigProviderHandle, ConfigRegistration, ConfigSection, ConfigSectionSchema, ConfigSnapshot, ConfigSourceRef, ConfigSourceSchema, ConfigStatus, ConfigStatusSchema, ConfigStep, ConfigStepSchema, ConfigUnregistration, DoomConfigActionInput, DoomConfigContributionHandle, DoomConfigContributionOptions, DoomConfigInvocation, DoomConfigRegistry, DoomConfigSectionView, DoomExtensionContext, DoomExtensionHost, registerConfigProvider, registerDoomConfigContribution };
|
|
517
|
+
//# sourceMappingURL=config.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":";;;;cAuBa,oBAAkB,KAAA;;;;;;cAalB,oBAAkB,KAAA,QAAA,KAAA,mBAAA,KAAA,uBAAA,KAAA;KAKnB,eAAe,cAAc;cAE5B,uBAAqB,KAAA,QAAA,KAAA,kBAAA,KAAA,kBAAA,KAAA,oBAAA,KAAA;KAUtB,kBAAkB,cAAc;;;;;;cAO/B,oBAAkB,KAAA;;;;;KAQnB,eAAe,cAAc;cAE5B,oBAAkB,KAAA;;;;;;;;;;;;;;;;KAmBnB,eAAe,cAAc;;;;;;;;;cAU5B,kBAAgB,KAAA;;;;;KAejB,aAAa,cAAc;cAE1B,sBAAoB,KAAA;;;;;KAQrB,iBAAiB,cAAc;cAE9B,mBAAiB,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqClB,cAAc,cAAc;cAE3B,qBAAmB,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAapB,gBAAgB,cAAc;cAEpC,uBAAqB,KAAA;;;;cAKrB,sBAAoB,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAId,iBAAiB,cAAc;KAC/B,kBAAkB,cAAc;cAE/B,iBAAe,uBAAA,KAAA;cAMf,oBAAkB,uBAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAOlB,eAAa,uBAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAMb,sBAAoB,uBAAA,KAAA;;;;;;;;;;;;;;;;;cAmBpB,eAAa,uBAAA,KAAA;;;;;;;;;cAiBb;WAAA;WAAA;;UAKI;EACf;EACA,yBAAyB;;UAGV;EACf;EACA;;iBAGc,uBAAuB,SAAS,iBAAiB,UAAU,iBAAiB;UAiC3E;EACf;IAAkB;;;UAGH;EACf,QAAQ;EACR,GAAG,eAAe,UAAU,gBAAgB,SAAS;;UAGtC,8BAA8B;EAC7C;;UAGe;EACf;EACA;EACA;EACA;EACA;;cAQW;mBACM;mBACA;UACT;EAER,KAAK,SAAS;EA0Bd,eAAe;EASf,OAAO,YAAY;EAUnB,UAAU;EAKV;UAMQ;UAKA;UAMA;UAMA;;UASO;EACf,KAAK;EACL;EACA;EACA;;UAGe;EACf;EACA,6BAA6B;EAC7B,UAAU,SAAS,gBAAgB,OAAO,iCAAiC;EAC3E,UAAU,gBAAgB,oBAAoB,KAAK;;UAGpC;EACf;EACA;;iBAGc,+BACd,IAAI,mBACJ,SAAS,gCACR"}
|