@agimon-ai/doompi-minor-mode 0.0.1-alpha.70
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 +3 -0
- package/dist/api-contracts.cjs +7 -0
- package/dist/api-contracts.d.cts +2 -0
- package/dist/api-contracts.d.mts +2 -0
- package/dist/api-contracts.mjs +2 -0
- package/dist/catalog.cjs +223 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +222 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/command.cjs +134 -0
- package/dist/command.cjs.map +1 -0
- package/dist/command.d.cts +25 -0
- package/dist/command.d.cts.map +1 -0
- package/dist/command.d.mts +25 -0
- package/dist/command.d.mts.map +1 -0
- package/dist/command.mjs +129 -0
- package/dist/command.mjs.map +1 -0
- package/dist/constants/command.cjs +6 -0
- package/dist/constants/command.cjs.map +1 -0
- package/dist/constants/command.d.cts +4 -0
- package/dist/constants/command.d.cts.map +1 -0
- package/dist/constants/command.d.mts +4 -0
- package/dist/constants/command.d.mts.map +1 -0
- package/dist/constants/command.mjs +6 -0
- package/dist/constants/command.mjs.map +1 -0
- package/dist/controllers/catalogRuntime.cjs +123 -0
- package/dist/controllers/catalogRuntime.cjs.map +1 -0
- package/dist/controllers/catalogRuntime.mjs +123 -0
- package/dist/controllers/catalogRuntime.mjs.map +1 -0
- package/dist/extensions/pi.cjs +7 -0
- package/dist/extensions/pi.cjs.map +1 -0
- package/dist/extensions/pi.d.cts +4 -0
- package/dist/extensions/pi.d.cts.map +1 -0
- package/dist/extensions/pi.d.mts +5 -0
- package/dist/extensions/pi.d.mts.map +1 -0
- package/dist/extensions/pi.mjs +8 -0
- package/dist/extensions/pi.mjs.map +1 -0
- package/dist/extensions/server.cjs +85 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.cts +4 -0
- package/dist/extensions/server.d.cts.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +86 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/index.cjs +53 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +9 -0
- package/dist/minor-mode-command.cjs +37 -0
- package/dist/minor-mode-command.cjs.map +1 -0
- package/dist/minor-mode-command.d.cts +9 -0
- package/dist/minor-mode-command.d.cts.map +1 -0
- package/dist/minor-mode-command.d.mts +9 -0
- package/dist/minor-mode-command.d.mts.map +1 -0
- package/dist/minor-mode-command.mjs +33 -0
- package/dist/minor-mode-command.mjs.map +1 -0
- package/dist/mode-definition.cjs +47 -0
- package/dist/mode-definition.cjs.map +1 -0
- package/dist/mode-definition.d.cts +30 -0
- package/dist/mode-definition.d.cts.map +1 -0
- package/dist/mode-definition.d.mts +30 -0
- package/dist/mode-definition.d.mts.map +1 -0
- package/dist/mode-definition.mjs +46 -0
- package/dist/mode-definition.mjs.map +1 -0
- package/dist/mode.cjs +275 -0
- package/dist/mode.cjs.map +1 -0
- package/dist/mode.d.cts +491 -0
- package/dist/mode.d.cts.map +1 -0
- package/dist/mode.d.mts +491 -0
- package/dist/mode.d.mts.map +1 -0
- package/dist/mode.mjs +241 -0
- package/dist/mode.mjs.map +1 -0
- package/dist/owner.cjs +10 -0
- package/dist/owner.cjs.map +1 -0
- package/dist/owner.d.cts +7 -0
- package/dist/owner.d.cts.map +1 -0
- package/dist/owner.d.mts +7 -0
- package/dist/owner.d.mts.map +1 -0
- package/dist/owner.mjs +9 -0
- package/dist/owner.mjs.map +1 -0
- package/dist/projection.cjs +49 -0
- package/dist/projection.cjs.map +1 -0
- package/dist/projection.d.cts +12 -0
- package/dist/projection.d.cts.map +1 -0
- package/dist/projection.d.mts +12 -0
- package/dist/projection.d.mts.map +1 -0
- package/dist/projection.mjs +47 -0
- package/dist/projection.mjs.map +1 -0
- package/dist/reload-handoff.cjs +57 -0
- package/dist/reload-handoff.cjs.map +1 -0
- package/dist/reload-handoff.d.cts +11 -0
- package/dist/reload-handoff.d.cts.map +1 -0
- package/dist/reload-handoff.d.mts +11 -0
- package/dist/reload-handoff.d.mts.map +1 -0
- package/dist/reload-handoff.mjs +54 -0
- package/dist/reload-handoff.mjs.map +1 -0
- package/dist/schemas/apiContracts.cjs +13 -0
- package/dist/schemas/apiContracts.cjs.map +1 -0
- package/dist/schemas/apiContracts.d.cts +53 -0
- package/dist/schemas/apiContracts.d.cts.map +1 -0
- package/dist/schemas/apiContracts.d.mts +53 -0
- package/dist/schemas/apiContracts.d.mts.map +1 -0
- package/dist/schemas/apiContracts.mjs +13 -0
- package/dist/schemas/apiContracts.mjs.map +1 -0
- package/dist/schemas/headless.d.cts +16 -0
- package/dist/schemas/headless.d.cts.map +1 -0
- package/dist/schemas/headless.d.mts +16 -0
- package/dist/schemas/headless.d.mts.map +1 -0
- package/dist/services/client/index.cjs +18 -0
- package/dist/services/client/index.cjs.map +1 -0
- package/dist/services/client/index.d.cts +12 -0
- package/dist/services/client/index.d.cts.map +1 -0
- package/dist/services/client/index.d.mts +12 -0
- package/dist/services/client/index.d.mts.map +1 -0
- package/dist/services/client/index.mjs +18 -0
- package/dist/services/client/index.mjs.map +1 -0
- package/dist/services/headlessCommand/index.cjs +53 -0
- package/dist/services/headlessCommand/index.cjs.map +1 -0
- package/dist/services/headlessCommand/index.d.cts +6 -0
- package/dist/services/headlessCommand/index.d.cts.map +1 -0
- package/dist/services/headlessCommand/index.d.mts +6 -0
- package/dist/services/headlessCommand/index.d.mts.map +1 -0
- package/dist/services/headlessCommand/index.mjs +53 -0
- package/dist/services/headlessCommand/index.mjs.map +1 -0
- package/dist/services/piRegistration/index.cjs +86 -0
- package/dist/services/piRegistration/index.cjs.map +1 -0
- package/dist/services/piRegistration/index.d.cts +15 -0
- package/dist/services/piRegistration/index.d.cts.map +1 -0
- package/dist/services/piRegistration/index.d.mts +15 -0
- package/dist/services/piRegistration/index.d.mts.map +1 -0
- package/dist/services/piRegistration/index.mjs +86 -0
- package/dist/services/piRegistration/index.mjs.map +1 -0
- package/dist/services/serverRegistration/index.cjs +35 -0
- package/dist/services/serverRegistration/index.cjs.map +1 -0
- package/dist/services/serverRegistration/index.d.cts +7 -0
- package/dist/services/serverRegistration/index.d.cts.map +1 -0
- package/dist/services/serverRegistration/index.d.mts +7 -0
- package/dist/services/serverRegistration/index.d.mts.map +1 -0
- package/dist/services/serverRegistration/index.mjs +35 -0
- package/dist/services/serverRegistration/index.mjs.map +1 -0
- package/dist/services/validation/index.cjs +84 -0
- package/dist/services/validation/index.cjs.map +1 -0
- package/dist/services/validation/index.d.cts +8 -0
- package/dist/services/validation/index.d.cts.map +1 -0
- package/dist/services/validation/index.d.mts +8 -0
- package/dist/services/validation/index.d.mts.map +1 -0
- package/dist/services/validation/index.mjs +81 -0
- package/dist/services/validation/index.mjs.map +1 -0
- package/package.json +157 -0
package/dist/mode.d.cts
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import { DoomExtensionContext } from "@agimon-ai/doompi-core/runtime-config";
|
|
2
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
import { Static, Type } from "typebox";
|
|
4
|
+
//#region src/schemas/mode.d.ts
|
|
5
|
+
export declare const MINOR_MODE_CATALOG_SOURCE = "@agimon-ai/doompi/mode-catalog";
|
|
6
|
+
export declare const DOOM_MINOR_MODE_CATALOG_SERVICE = "doom/minor-mode-catalog";
|
|
7
|
+
export declare const MINOR_MODE_TOOL_NAME = "minor_mode";
|
|
8
|
+
export declare const MINOR_MODE_ACTION_TIMEOUT_MS = 30000;
|
|
9
|
+
export declare const MINOR_MODE_MAX_RECORDS = 128;
|
|
10
|
+
export declare const MINOR_MODE_MAX_ACTIONS = 16;
|
|
11
|
+
export declare const MINOR_MODE_MAX_PARAMETERS = 16;
|
|
12
|
+
export declare const MINOR_MODE_MAX_ENUM_CHOICES = 32;
|
|
13
|
+
export declare const MINOR_MODE_MAX_ARGUMENT_LENGTH = 4096;
|
|
14
|
+
export declare const MINOR_MODE_ERROR_CODE: {
|
|
15
|
+
readonly actionAborted: 'MINOR_MODE_ACTION_ABORTED';
|
|
16
|
+
readonly actionDisabled: 'MINOR_MODE_ACTION_DISABLED';
|
|
17
|
+
readonly actionNotFound: 'MINOR_MODE_ACTION_NOT_FOUND';
|
|
18
|
+
readonly actionTimeout: 'MINOR_MODE_ACTION_TIMEOUT';
|
|
19
|
+
readonly invalidArguments: 'MINOR_MODE_INVALID_ARGUMENTS';
|
|
20
|
+
readonly modeBusy: 'MINOR_MODE_BUSY';
|
|
21
|
+
readonly modeNotFound: 'MINOR_MODE_NOT_FOUND';
|
|
22
|
+
readonly ownerFailed: 'MINOR_MODE_OWNER_FAILED';
|
|
23
|
+
readonly registrationConflict: 'MINOR_MODE_REGISTRATION_CONFLICT';
|
|
24
|
+
readonly sessionReplaced: 'MINOR_MODE_SESSION_REPLACED';
|
|
25
|
+
readonly staleRegistration: 'MINOR_MODE_STALE_REGISTRATION';
|
|
26
|
+
readonly unsupportedContext: 'MINOR_MODE_UNSUPPORTED_CONTEXT';
|
|
27
|
+
};
|
|
28
|
+
export declare const MinorModeSourceSchema: Type.TString;
|
|
29
|
+
export declare const MinorModeIdSchema: Type.TString;
|
|
30
|
+
export declare const MinorModeParameterNameSchema: Type.TString;
|
|
31
|
+
export declare const ModeTextColorSchema: Type.TUnion<[Type.TLiteral<"accent">, Type.TLiteral<"warning">, Type.TLiteral<"mdHeading">, Type.TLiteral<"muted">, Type.TLiteral<"dim">]>;
|
|
32
|
+
export type ModeTextColor = Static<typeof ModeTextColorSchema>;
|
|
33
|
+
export declare const MinorModeSessionKindSchema: Type.TUnion<[Type.TLiteral<"tui">, Type.TLiteral<"headless">]>;
|
|
34
|
+
export type MinorModeSessionKind = Static<typeof MinorModeSessionKindSchema>;
|
|
35
|
+
export declare const MinorModeActivationSchema: Type.TUnion<[Type.TLiteral<"inactive">, Type.TLiteral<"activating">, Type.TLiteral<"active">, Type.TLiteral<"deactivating">]>;
|
|
36
|
+
export type MinorModeActivation = Static<typeof MinorModeActivationSchema>;
|
|
37
|
+
export declare const MinorModeConditionSchema: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"paused">, Type.TLiteral<"blocked">, Type.TLiteral<"limited">, Type.TLiteral<"queued">, Type.TLiteral<"degraded">, Type.TLiteral<"failed">]>;
|
|
38
|
+
export type MinorModeCondition = Static<typeof MinorModeConditionSchema>;
|
|
39
|
+
export declare const MinorModeScalarSchema: Type.TUnion<[Type.TString, Type.TNumber, Type.TBoolean]>;
|
|
40
|
+
export type MinorModeScalar = Static<typeof MinorModeScalarSchema>;
|
|
41
|
+
export declare const MinorModeActionParameterSchema: Type.TUnion<[Type.TObject<{
|
|
42
|
+
name: Type.TString;
|
|
43
|
+
label: Type.TString;
|
|
44
|
+
description: Type.TOptional<Type.TString>;
|
|
45
|
+
required: Type.TBoolean;
|
|
46
|
+
kind: Type.TLiteral<"string">;
|
|
47
|
+
minLength: Type.TOptional<Type.TInteger>;
|
|
48
|
+
maxLength: Type.TOptional<Type.TInteger>;
|
|
49
|
+
}>, Type.TObject<{
|
|
50
|
+
name: Type.TString;
|
|
51
|
+
label: Type.TString;
|
|
52
|
+
description: Type.TOptional<Type.TString>;
|
|
53
|
+
required: Type.TBoolean;
|
|
54
|
+
kind: Type.TLiteral<"number">;
|
|
55
|
+
integer: Type.TOptional<Type.TBoolean>;
|
|
56
|
+
minimum: Type.TOptional<Type.TNumber>;
|
|
57
|
+
maximum: Type.TOptional<Type.TNumber>;
|
|
58
|
+
}>, Type.TObject<{
|
|
59
|
+
name: Type.TString;
|
|
60
|
+
label: Type.TString;
|
|
61
|
+
description: Type.TOptional<Type.TString>;
|
|
62
|
+
required: Type.TBoolean;
|
|
63
|
+
kind: Type.TLiteral<"boolean">;
|
|
64
|
+
}>, Type.TObject<{
|
|
65
|
+
name: Type.TString;
|
|
66
|
+
label: Type.TString;
|
|
67
|
+
description: Type.TOptional<Type.TString>;
|
|
68
|
+
required: Type.TBoolean;
|
|
69
|
+
kind: Type.TLiteral<"enum">;
|
|
70
|
+
choices: Type.TArray<Type.TObject<{
|
|
71
|
+
value: Type.TString;
|
|
72
|
+
label: Type.TString;
|
|
73
|
+
}>>;
|
|
74
|
+
}>]>;
|
|
75
|
+
export type MinorModeActionParameter = Static<typeof MinorModeActionParameterSchema>;
|
|
76
|
+
export declare const MinorModeActionDescriptorSchema: Type.TObject<{
|
|
77
|
+
id: Type.TString;
|
|
78
|
+
label: Type.TString;
|
|
79
|
+
description: Type.TString;
|
|
80
|
+
contexts: Type.TArray<Type.TUnion<[Type.TLiteral<"tui">, Type.TLiteral<"headless">]>>;
|
|
81
|
+
parameters: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
82
|
+
name: Type.TString;
|
|
83
|
+
label: Type.TString;
|
|
84
|
+
description: Type.TOptional<Type.TString>;
|
|
85
|
+
required: Type.TBoolean;
|
|
86
|
+
kind: Type.TLiteral<"string">;
|
|
87
|
+
minLength: Type.TOptional<Type.TInteger>;
|
|
88
|
+
maxLength: Type.TOptional<Type.TInteger>;
|
|
89
|
+
}>, Type.TObject<{
|
|
90
|
+
name: Type.TString;
|
|
91
|
+
label: Type.TString;
|
|
92
|
+
description: Type.TOptional<Type.TString>;
|
|
93
|
+
required: Type.TBoolean;
|
|
94
|
+
kind: Type.TLiteral<"number">;
|
|
95
|
+
integer: Type.TOptional<Type.TBoolean>;
|
|
96
|
+
minimum: Type.TOptional<Type.TNumber>;
|
|
97
|
+
maximum: Type.TOptional<Type.TNumber>;
|
|
98
|
+
}>, Type.TObject<{
|
|
99
|
+
name: Type.TString;
|
|
100
|
+
label: Type.TString;
|
|
101
|
+
description: Type.TOptional<Type.TString>;
|
|
102
|
+
required: Type.TBoolean;
|
|
103
|
+
kind: Type.TLiteral<"boolean">;
|
|
104
|
+
}>, Type.TObject<{
|
|
105
|
+
name: Type.TString;
|
|
106
|
+
label: Type.TString;
|
|
107
|
+
description: Type.TOptional<Type.TString>;
|
|
108
|
+
required: Type.TBoolean;
|
|
109
|
+
kind: Type.TLiteral<"enum">;
|
|
110
|
+
choices: Type.TArray<Type.TObject<{
|
|
111
|
+
value: Type.TString;
|
|
112
|
+
label: Type.TString;
|
|
113
|
+
}>>;
|
|
114
|
+
}>]>>;
|
|
115
|
+
}>;
|
|
116
|
+
export type MinorModeActionDescriptor = Static<typeof MinorModeActionDescriptorSchema>;
|
|
117
|
+
export declare const MinorModeDescriptorSchema: Type.TObject<{
|
|
118
|
+
source: Type.TString;
|
|
119
|
+
id: Type.TString;
|
|
120
|
+
label: Type.TString;
|
|
121
|
+
description: Type.TString;
|
|
122
|
+
order: Type.TInteger;
|
|
123
|
+
actions: Type.TArray<Type.TObject<{
|
|
124
|
+
id: Type.TString;
|
|
125
|
+
label: Type.TString;
|
|
126
|
+
description: Type.TString;
|
|
127
|
+
contexts: Type.TArray<Type.TUnion<[Type.TLiteral<"tui">, Type.TLiteral<"headless">]>>;
|
|
128
|
+
parameters: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
129
|
+
name: Type.TString;
|
|
130
|
+
label: Type.TString;
|
|
131
|
+
description: Type.TOptional<Type.TString>;
|
|
132
|
+
required: Type.TBoolean;
|
|
133
|
+
kind: Type.TLiteral<"string">;
|
|
134
|
+
minLength: Type.TOptional<Type.TInteger>;
|
|
135
|
+
maxLength: Type.TOptional<Type.TInteger>;
|
|
136
|
+
}>, Type.TObject<{
|
|
137
|
+
name: Type.TString;
|
|
138
|
+
label: Type.TString;
|
|
139
|
+
description: Type.TOptional<Type.TString>;
|
|
140
|
+
required: Type.TBoolean;
|
|
141
|
+
kind: Type.TLiteral<"number">;
|
|
142
|
+
integer: Type.TOptional<Type.TBoolean>;
|
|
143
|
+
minimum: Type.TOptional<Type.TNumber>;
|
|
144
|
+
maximum: Type.TOptional<Type.TNumber>;
|
|
145
|
+
}>, Type.TObject<{
|
|
146
|
+
name: Type.TString;
|
|
147
|
+
label: Type.TString;
|
|
148
|
+
description: Type.TOptional<Type.TString>;
|
|
149
|
+
required: Type.TBoolean;
|
|
150
|
+
kind: Type.TLiteral<"boolean">;
|
|
151
|
+
}>, Type.TObject<{
|
|
152
|
+
name: Type.TString;
|
|
153
|
+
label: Type.TString;
|
|
154
|
+
description: Type.TOptional<Type.TString>;
|
|
155
|
+
required: Type.TBoolean;
|
|
156
|
+
kind: Type.TLiteral<"enum">;
|
|
157
|
+
choices: Type.TArray<Type.TObject<{
|
|
158
|
+
value: Type.TString;
|
|
159
|
+
label: Type.TString;
|
|
160
|
+
}>>;
|
|
161
|
+
}>]>>;
|
|
162
|
+
}>>;
|
|
163
|
+
}>;
|
|
164
|
+
export type MinorModeDescriptor = Static<typeof MinorModeDescriptorSchema>;
|
|
165
|
+
export declare const MinorModeActionAvailabilitySchema: Type.TObject<{
|
|
166
|
+
id: Type.TString;
|
|
167
|
+
enabled: Type.TBoolean;
|
|
168
|
+
disabledReason: Type.TOptional<Type.TString>;
|
|
169
|
+
}>;
|
|
170
|
+
export type MinorModeActionAvailability = Static<typeof MinorModeActionAvailabilitySchema>;
|
|
171
|
+
export declare const MinorModeStateSchema: Type.TObject<{
|
|
172
|
+
activation: Type.TUnion<[Type.TLiteral<"inactive">, Type.TLiteral<"activating">, Type.TLiteral<"active">, Type.TLiteral<"deactivating">]>;
|
|
173
|
+
condition: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"paused">, Type.TLiteral<"blocked">, Type.TLiteral<"limited">, Type.TLiteral<"queued">, Type.TLiteral<"degraded">, Type.TLiteral<"failed">]>;
|
|
174
|
+
detail: Type.TOptional<Type.TString>;
|
|
175
|
+
color: Type.TOptional<Type.TUnion<[Type.TLiteral<"accent">, Type.TLiteral<"warning">, Type.TLiteral<"mdHeading">, Type.TLiteral<"muted">, Type.TLiteral<"dim">]>>;
|
|
176
|
+
modelContextVariant: Type.TOptional<Type.TString>;
|
|
177
|
+
actions: Type.TArray<Type.TObject<{
|
|
178
|
+
id: Type.TString;
|
|
179
|
+
enabled: Type.TBoolean;
|
|
180
|
+
disabledReason: Type.TOptional<Type.TString>;
|
|
181
|
+
}>>;
|
|
182
|
+
}>;
|
|
183
|
+
export type MinorModeState = Static<typeof MinorModeStateSchema>;
|
|
184
|
+
export declare const MinorModeRegistrationRefSchema: Type.TObject<{
|
|
185
|
+
source: Type.TString;
|
|
186
|
+
id: Type.TString;
|
|
187
|
+
ownerGeneration: Type.TString;
|
|
188
|
+
registrationId: Type.TString;
|
|
189
|
+
}>;
|
|
190
|
+
export type MinorModeRegistrationRef = Static<typeof MinorModeRegistrationRefSchema>;
|
|
191
|
+
export declare const MinorModeRecordSchema: Type.TObject<{
|
|
192
|
+
descriptor: Type.TObject<{
|
|
193
|
+
source: Type.TString;
|
|
194
|
+
id: Type.TString;
|
|
195
|
+
label: Type.TString;
|
|
196
|
+
description: Type.TString;
|
|
197
|
+
order: Type.TInteger;
|
|
198
|
+
actions: Type.TArray<Type.TObject<{
|
|
199
|
+
id: Type.TString;
|
|
200
|
+
label: Type.TString;
|
|
201
|
+
description: Type.TString;
|
|
202
|
+
contexts: Type.TArray<Type.TUnion<[Type.TLiteral<"tui">, Type.TLiteral<"headless">]>>;
|
|
203
|
+
parameters: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
204
|
+
name: Type.TString;
|
|
205
|
+
label: Type.TString;
|
|
206
|
+
description: Type.TOptional<Type.TString>;
|
|
207
|
+
required: Type.TBoolean;
|
|
208
|
+
kind: Type.TLiteral<"string">;
|
|
209
|
+
minLength: Type.TOptional<Type.TInteger>;
|
|
210
|
+
maxLength: Type.TOptional<Type.TInteger>;
|
|
211
|
+
}>, Type.TObject<{
|
|
212
|
+
name: Type.TString;
|
|
213
|
+
label: Type.TString;
|
|
214
|
+
description: Type.TOptional<Type.TString>;
|
|
215
|
+
required: Type.TBoolean;
|
|
216
|
+
kind: Type.TLiteral<"number">;
|
|
217
|
+
integer: Type.TOptional<Type.TBoolean>;
|
|
218
|
+
minimum: Type.TOptional<Type.TNumber>;
|
|
219
|
+
maximum: Type.TOptional<Type.TNumber>;
|
|
220
|
+
}>, Type.TObject<{
|
|
221
|
+
name: Type.TString;
|
|
222
|
+
label: Type.TString;
|
|
223
|
+
description: Type.TOptional<Type.TString>;
|
|
224
|
+
required: Type.TBoolean;
|
|
225
|
+
kind: Type.TLiteral<"boolean">;
|
|
226
|
+
}>, Type.TObject<{
|
|
227
|
+
name: Type.TString;
|
|
228
|
+
label: Type.TString;
|
|
229
|
+
description: Type.TOptional<Type.TString>;
|
|
230
|
+
required: Type.TBoolean;
|
|
231
|
+
kind: Type.TLiteral<"enum">;
|
|
232
|
+
choices: Type.TArray<Type.TObject<{
|
|
233
|
+
value: Type.TString;
|
|
234
|
+
label: Type.TString;
|
|
235
|
+
}>>;
|
|
236
|
+
}>]>>;
|
|
237
|
+
}>>;
|
|
238
|
+
}>;
|
|
239
|
+
state: Type.TObject<{
|
|
240
|
+
activation: Type.TUnion<[Type.TLiteral<"inactive">, Type.TLiteral<"activating">, Type.TLiteral<"active">, Type.TLiteral<"deactivating">]>;
|
|
241
|
+
condition: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"paused">, Type.TLiteral<"blocked">, Type.TLiteral<"limited">, Type.TLiteral<"queued">, Type.TLiteral<"degraded">, Type.TLiteral<"failed">]>;
|
|
242
|
+
detail: Type.TOptional<Type.TString>;
|
|
243
|
+
color: Type.TOptional<Type.TUnion<[Type.TLiteral<"accent">, Type.TLiteral<"warning">, Type.TLiteral<"mdHeading">, Type.TLiteral<"muted">, Type.TLiteral<"dim">]>>;
|
|
244
|
+
modelContextVariant: Type.TOptional<Type.TString>;
|
|
245
|
+
actions: Type.TArray<Type.TObject<{
|
|
246
|
+
id: Type.TString;
|
|
247
|
+
enabled: Type.TBoolean;
|
|
248
|
+
disabledReason: Type.TOptional<Type.TString>;
|
|
249
|
+
}>>;
|
|
250
|
+
}>;
|
|
251
|
+
ownerGeneration: Type.TString;
|
|
252
|
+
registrationId: Type.TString;
|
|
253
|
+
stateRevision: Type.TInteger;
|
|
254
|
+
}>;
|
|
255
|
+
export type MinorModeRecord = Static<typeof MinorModeRecordSchema>;
|
|
256
|
+
export declare const MinorModeCatalogSnapshotSchema: Type.TObject<{
|
|
257
|
+
hostGeneration: Type.TString;
|
|
258
|
+
revision: Type.TInteger;
|
|
259
|
+
modes: Type.TArray<Type.TObject<{
|
|
260
|
+
descriptor: Type.TObject<{
|
|
261
|
+
source: Type.TString;
|
|
262
|
+
id: Type.TString;
|
|
263
|
+
label: Type.TString;
|
|
264
|
+
description: Type.TString;
|
|
265
|
+
order: Type.TInteger;
|
|
266
|
+
actions: Type.TArray<Type.TObject<{
|
|
267
|
+
id: Type.TString;
|
|
268
|
+
label: Type.TString;
|
|
269
|
+
description: Type.TString;
|
|
270
|
+
contexts: Type.TArray<Type.TUnion<[Type.TLiteral<"tui">, Type.TLiteral<"headless">]>>;
|
|
271
|
+
parameters: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
272
|
+
name: Type.TString;
|
|
273
|
+
label: Type.TString;
|
|
274
|
+
description: Type.TOptional<Type.TString>;
|
|
275
|
+
required: Type.TBoolean;
|
|
276
|
+
kind: Type.TLiteral<"string">;
|
|
277
|
+
minLength: Type.TOptional<Type.TInteger>;
|
|
278
|
+
maxLength: Type.TOptional<Type.TInteger>;
|
|
279
|
+
}>, Type.TObject<{
|
|
280
|
+
name: Type.TString;
|
|
281
|
+
label: Type.TString;
|
|
282
|
+
description: Type.TOptional<Type.TString>;
|
|
283
|
+
required: Type.TBoolean;
|
|
284
|
+
kind: Type.TLiteral<"number">;
|
|
285
|
+
integer: Type.TOptional<Type.TBoolean>;
|
|
286
|
+
minimum: Type.TOptional<Type.TNumber>;
|
|
287
|
+
maximum: Type.TOptional<Type.TNumber>;
|
|
288
|
+
}>, Type.TObject<{
|
|
289
|
+
name: Type.TString;
|
|
290
|
+
label: Type.TString;
|
|
291
|
+
description: Type.TOptional<Type.TString>;
|
|
292
|
+
required: Type.TBoolean;
|
|
293
|
+
kind: Type.TLiteral<"boolean">;
|
|
294
|
+
}>, Type.TObject<{
|
|
295
|
+
name: Type.TString;
|
|
296
|
+
label: Type.TString;
|
|
297
|
+
description: Type.TOptional<Type.TString>;
|
|
298
|
+
required: Type.TBoolean;
|
|
299
|
+
kind: Type.TLiteral<"enum">;
|
|
300
|
+
choices: Type.TArray<Type.TObject<{
|
|
301
|
+
value: Type.TString;
|
|
302
|
+
label: Type.TString;
|
|
303
|
+
}>>;
|
|
304
|
+
}>]>>;
|
|
305
|
+
}>>;
|
|
306
|
+
}>;
|
|
307
|
+
state: Type.TObject<{
|
|
308
|
+
activation: Type.TUnion<[Type.TLiteral<"inactive">, Type.TLiteral<"activating">, Type.TLiteral<"active">, Type.TLiteral<"deactivating">]>;
|
|
309
|
+
condition: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"paused">, Type.TLiteral<"blocked">, Type.TLiteral<"limited">, Type.TLiteral<"queued">, Type.TLiteral<"degraded">, Type.TLiteral<"failed">]>;
|
|
310
|
+
detail: Type.TOptional<Type.TString>;
|
|
311
|
+
color: Type.TOptional<Type.TUnion<[Type.TLiteral<"accent">, Type.TLiteral<"warning">, Type.TLiteral<"mdHeading">, Type.TLiteral<"muted">, Type.TLiteral<"dim">]>>;
|
|
312
|
+
modelContextVariant: Type.TOptional<Type.TString>;
|
|
313
|
+
actions: Type.TArray<Type.TObject<{
|
|
314
|
+
id: Type.TString;
|
|
315
|
+
enabled: Type.TBoolean;
|
|
316
|
+
disabledReason: Type.TOptional<Type.TString>;
|
|
317
|
+
}>>;
|
|
318
|
+
}>;
|
|
319
|
+
ownerGeneration: Type.TString;
|
|
320
|
+
registrationId: Type.TString;
|
|
321
|
+
stateRevision: Type.TInteger;
|
|
322
|
+
}>>;
|
|
323
|
+
}>;
|
|
324
|
+
export type MinorModeCatalogSnapshot = Static<typeof MinorModeCatalogSnapshotSchema>;
|
|
325
|
+
export declare const MinorModeArgumentsSchema: Type.TRecord<"^.*$", Type.TUnion<[Type.TString, Type.TNumber, Type.TBoolean]>>;
|
|
326
|
+
export type MinorModeArguments = Static<typeof MinorModeArgumentsSchema>;
|
|
327
|
+
export declare const MinorModeToolInputSchema: Type.TObject<{
|
|
328
|
+
action: Type.TUnion<[Type.TLiteral<"list">, Type.TLiteral<"invoke">]>;
|
|
329
|
+
source: Type.TOptional<Type.TString>;
|
|
330
|
+
id: Type.TOptional<Type.TString>;
|
|
331
|
+
ownerGeneration: Type.TOptional<Type.TString>;
|
|
332
|
+
registrationId: Type.TOptional<Type.TString>;
|
|
333
|
+
modeAction: Type.TOptional<Type.TString>;
|
|
334
|
+
arguments: Type.TOptional<Type.TRecord<"^.*$", Type.TUnion<[Type.TString, Type.TNumber, Type.TBoolean]>>>;
|
|
335
|
+
}>;
|
|
336
|
+
export type MinorModeToolInput = Static<typeof MinorModeToolInputSchema>;
|
|
337
|
+
export declare const MinorModeToolResultSchema: Type.TUnknown;
|
|
338
|
+
export declare const MinorModeActionRequestSchema: Type.TObject<{
|
|
339
|
+
operationId: Type.TString;
|
|
340
|
+
mode: Type.TObject<{
|
|
341
|
+
source: Type.TString;
|
|
342
|
+
id: Type.TString;
|
|
343
|
+
ownerGeneration: Type.TString;
|
|
344
|
+
registrationId: Type.TString;
|
|
345
|
+
}>;
|
|
346
|
+
actionId: Type.TString;
|
|
347
|
+
arguments: Type.TRecord<"^.*$", Type.TUnion<[Type.TString, Type.TNumber, Type.TBoolean]>>;
|
|
348
|
+
}>;
|
|
349
|
+
export type MinorModeActionRequest = Static<typeof MinorModeActionRequestSchema>;
|
|
350
|
+
export declare const MinorModeActionResponseSchema: Type.TObject<{
|
|
351
|
+
operationId: Type.TString;
|
|
352
|
+
catalogRevision: Type.TInteger;
|
|
353
|
+
mode: Type.TObject<{
|
|
354
|
+
descriptor: Type.TObject<{
|
|
355
|
+
source: Type.TString;
|
|
356
|
+
id: Type.TString;
|
|
357
|
+
label: Type.TString;
|
|
358
|
+
description: Type.TString;
|
|
359
|
+
order: Type.TInteger;
|
|
360
|
+
actions: Type.TArray<Type.TObject<{
|
|
361
|
+
id: Type.TString;
|
|
362
|
+
label: Type.TString;
|
|
363
|
+
description: Type.TString;
|
|
364
|
+
contexts: Type.TArray<Type.TUnion<[Type.TLiteral<"tui">, Type.TLiteral<"headless">]>>;
|
|
365
|
+
parameters: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
366
|
+
name: Type.TString;
|
|
367
|
+
label: Type.TString;
|
|
368
|
+
description: Type.TOptional<Type.TString>;
|
|
369
|
+
required: Type.TBoolean;
|
|
370
|
+
kind: Type.TLiteral<"string">;
|
|
371
|
+
minLength: Type.TOptional<Type.TInteger>;
|
|
372
|
+
maxLength: Type.TOptional<Type.TInteger>;
|
|
373
|
+
}>, Type.TObject<{
|
|
374
|
+
name: Type.TString;
|
|
375
|
+
label: Type.TString;
|
|
376
|
+
description: Type.TOptional<Type.TString>;
|
|
377
|
+
required: Type.TBoolean;
|
|
378
|
+
kind: Type.TLiteral<"number">;
|
|
379
|
+
integer: Type.TOptional<Type.TBoolean>;
|
|
380
|
+
minimum: Type.TOptional<Type.TNumber>;
|
|
381
|
+
maximum: Type.TOptional<Type.TNumber>;
|
|
382
|
+
}>, Type.TObject<{
|
|
383
|
+
name: Type.TString;
|
|
384
|
+
label: Type.TString;
|
|
385
|
+
description: Type.TOptional<Type.TString>;
|
|
386
|
+
required: Type.TBoolean;
|
|
387
|
+
kind: Type.TLiteral<"boolean">;
|
|
388
|
+
}>, Type.TObject<{
|
|
389
|
+
name: Type.TString;
|
|
390
|
+
label: Type.TString;
|
|
391
|
+
description: Type.TOptional<Type.TString>;
|
|
392
|
+
required: Type.TBoolean;
|
|
393
|
+
kind: Type.TLiteral<"enum">;
|
|
394
|
+
choices: Type.TArray<Type.TObject<{
|
|
395
|
+
value: Type.TString;
|
|
396
|
+
label: Type.TString;
|
|
397
|
+
}>>;
|
|
398
|
+
}>]>>;
|
|
399
|
+
}>>;
|
|
400
|
+
}>;
|
|
401
|
+
state: Type.TObject<{
|
|
402
|
+
activation: Type.TUnion<[Type.TLiteral<"inactive">, Type.TLiteral<"activating">, Type.TLiteral<"active">, Type.TLiteral<"deactivating">]>;
|
|
403
|
+
condition: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"paused">, Type.TLiteral<"blocked">, Type.TLiteral<"limited">, Type.TLiteral<"queued">, Type.TLiteral<"degraded">, Type.TLiteral<"failed">]>;
|
|
404
|
+
detail: Type.TOptional<Type.TString>;
|
|
405
|
+
color: Type.TOptional<Type.TUnion<[Type.TLiteral<"accent">, Type.TLiteral<"warning">, Type.TLiteral<"mdHeading">, Type.TLiteral<"muted">, Type.TLiteral<"dim">]>>;
|
|
406
|
+
modelContextVariant: Type.TOptional<Type.TString>;
|
|
407
|
+
actions: Type.TArray<Type.TObject<{
|
|
408
|
+
id: Type.TString;
|
|
409
|
+
enabled: Type.TBoolean;
|
|
410
|
+
disabledReason: Type.TOptional<Type.TString>;
|
|
411
|
+
}>>;
|
|
412
|
+
}>;
|
|
413
|
+
ownerGeneration: Type.TString;
|
|
414
|
+
registrationId: Type.TString;
|
|
415
|
+
stateRevision: Type.TInteger;
|
|
416
|
+
}>;
|
|
417
|
+
message: Type.TOptional<Type.TString>;
|
|
418
|
+
}>;
|
|
419
|
+
export type MinorModeActionResponse = Static<typeof MinorModeActionResponseSchema>;
|
|
420
|
+
/**
|
|
421
|
+
* The custom session entry the catalog host journals whenever its projection
|
|
422
|
+
* changes. It rides Pi's entry_appended frames, so any RPC client (the web
|
|
423
|
+
* cockpit) sees minor-mode state live and on replay without a new protocol.
|
|
424
|
+
*/
|
|
425
|
+
export declare const DOOM_MINOR_MODE_ENTRY_TYPE = "doom-minor-modes";
|
|
426
|
+
export interface MinorModeActionProjection {
|
|
427
|
+
readonly id: string;
|
|
428
|
+
readonly label: string;
|
|
429
|
+
readonly description: string;
|
|
430
|
+
readonly enabled: boolean;
|
|
431
|
+
readonly disabledReason?: string;
|
|
432
|
+
/** Whether invoking it needs arguments a client must ask for first. */
|
|
433
|
+
readonly needsInput: boolean;
|
|
434
|
+
}
|
|
435
|
+
export interface MinorModeRecordProjection {
|
|
436
|
+
readonly id: string;
|
|
437
|
+
readonly label: string;
|
|
438
|
+
readonly description: string;
|
|
439
|
+
readonly order: number;
|
|
440
|
+
readonly activation: MinorModeActivation;
|
|
441
|
+
readonly condition: MinorModeCondition;
|
|
442
|
+
readonly detail?: string;
|
|
443
|
+
readonly actions: readonly MinorModeActionProjection[];
|
|
444
|
+
}
|
|
445
|
+
export interface MinorModeProjection {
|
|
446
|
+
readonly version: 1;
|
|
447
|
+
readonly revision: number;
|
|
448
|
+
readonly modes: readonly MinorModeRecordProjection[];
|
|
449
|
+
}
|
|
450
|
+
export interface MinorModeOwnerActionResult {
|
|
451
|
+
message?: string;
|
|
452
|
+
}
|
|
453
|
+
export interface MinorModeOwnerActionContext<ExtensionContext extends DoomExtensionContext> {
|
|
454
|
+
context: ExtensionContext;
|
|
455
|
+
operationId: string;
|
|
456
|
+
sessionKind: MinorModeSessionKind;
|
|
457
|
+
signal: AbortSignal;
|
|
458
|
+
}
|
|
459
|
+
export interface MinorModeOwnerDefinition<ExtensionContext extends DoomExtensionContext> {
|
|
460
|
+
descriptor: MinorModeDescriptor;
|
|
461
|
+
initialState: MinorModeState;
|
|
462
|
+
handleAction(actionId: string, argumentsValue: MinorModeArguments, execution: MinorModeOwnerActionContext<ExtensionContext>): MinorModeOwnerActionResult | void | Promise<MinorModeOwnerActionResult | void>;
|
|
463
|
+
onError?(error: unknown): void;
|
|
464
|
+
}
|
|
465
|
+
export interface MinorModeOwnerHandle {
|
|
466
|
+
getState(): MinorModeState;
|
|
467
|
+
publish(state: MinorModeState): void;
|
|
468
|
+
dispose(): void;
|
|
469
|
+
}
|
|
470
|
+
export interface MinorModeInvokeOptions {
|
|
471
|
+
readonly signal?: AbortSignal;
|
|
472
|
+
}
|
|
473
|
+
/** Direct session-local catalog shared through Cordis. */
|
|
474
|
+
export interface MinorModeCatalogService {
|
|
475
|
+
readonly generation: string;
|
|
476
|
+
getSnapshot(): MinorModeCatalogSnapshot;
|
|
477
|
+
list(): MinorModeRecord[];
|
|
478
|
+
subscribe(listener: () => void): () => void;
|
|
479
|
+
registerOwner<ExtensionContext extends DoomExtensionContext>(definition: MinorModeOwnerDefinition<ExtensionContext>): MinorModeOwnerHandle;
|
|
480
|
+
invoke(request: MinorModeActionRequest, requesterSource: string, signal?: AbortSignal): Promise<MinorModeActionResponse>;
|
|
481
|
+
dispose(): void;
|
|
482
|
+
}
|
|
483
|
+
declare module '@deepseek-ai/cordis' {
|
|
484
|
+
interface Context {
|
|
485
|
+
'doom/minor-mode-catalog': MinorModeCatalogService;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
export declare function readMinorModeCatalog(context: Context): MinorModeCatalogService | undefined;
|
|
489
|
+
export declare function requireMinorModeCatalog(context: Context): MinorModeCatalogService;
|
|
490
|
+
//#endregion
|
|
491
|
+
//# sourceMappingURL=mode.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mode.d.cts","names":[],"sources":["../src/schemas/mode.ts"],"mappings":"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"}
|