@moxxy/sdk 0.26.0 → 0.27.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/channel.d.ts +13 -0
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +19 -0
- package/dist/channel.js.map +1 -1
- package/dist/event-store.d.ts +5 -1
- package/dist/event-store.d.ts.map +1 -1
- package/dist/event-store.js +24 -1
- package/dist/event-store.js.map +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/first-party.d.ts +17 -0
- package/dist/first-party.d.ts.map +1 -0
- package/dist/first-party.js +19 -0
- package/dist/first-party.js.map +1 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/isolation.d.ts +14 -0
- package/dist/isolation.d.ts.map +1 -1
- package/dist/isolation.js +75 -0
- package/dist/isolation.js.map +1 -1
- package/dist/mode.d.ts +7 -0
- package/dist/mode.d.ts.map +1 -1
- package/dist/mode.js.map +1 -1
- package/dist/plugin.d.ts +10 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/reflector.d.ts +58 -0
- package/dist/reflector.d.ts.map +1 -0
- package/dist/reflector.js +2 -0
- package/dist/reflector.js.map +1 -0
- package/dist/schemas.d.ts +215 -8
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +37 -0
- package/dist/schemas.js.map +1 -1
- package/dist/session-like.d.ts +52 -0
- package/dist/session-like.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +25 -0
- package/src/event-store.ts +16 -1
- package/src/events.ts +1 -0
- package/src/exit-after-pair.test.ts +32 -0
- package/src/first-party.test.ts +26 -0
- package/src/first-party.ts +19 -0
- package/src/index.ts +19 -4
- package/src/isolation-aggregate.test.ts +69 -0
- package/src/isolation.ts +67 -0
- package/src/mode.ts +7 -0
- package/src/plugin.ts +10 -1
- package/src/reflector.ts +61 -0
- package/src/schemas.ts +41 -0
- package/src/session-like.ts +49 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { EventLogReader } from './log.js';
|
|
2
|
+
import type { SessionId, TurnId } from './ids.js';
|
|
3
|
+
import type { ServiceRegistry } from './services.js';
|
|
4
|
+
/**
|
|
5
|
+
* The learning-loop block — a swappable strategy that watches a finished turn
|
|
6
|
+
* and *proposes* (never silently writes) memory/skill improvements. It is the
|
|
7
|
+
* def-only sibling of the other single-active registries (compactor, cache
|
|
8
|
+
* strategy, …) but NULLABLE: core seeds NO floor, so reflection is entirely
|
|
9
|
+
* opt-in — a session with no registered reflector simply never reflects.
|
|
10
|
+
*
|
|
11
|
+
* The trust boundary is the "propose, don't write" contract. A reflector reads
|
|
12
|
+
* the turn's events and returns {@link ReflectionProposal}s; the driver that
|
|
13
|
+
* hosts it delivers those as a one-time nudge on the next provider call, phrased
|
|
14
|
+
* so the *model* may choose to call `memory_save` / `synthesize_skill` — which
|
|
15
|
+
* still go through the existing permission prompts. Nothing a reflector returns
|
|
16
|
+
* mutates memory or skills on its own.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The context handed to {@link ReflectorDef.reflect}. Scoped to one finished
|
|
20
|
+
* turn: `log.byTurn(turnId)` yields exactly that turn's events. `services`
|
|
21
|
+
* exposes the host's inter-plugin registry (e.g. `services.get('providers')`
|
|
22
|
+
* for a side-channel LLM pass); `signal` bounds the whole reflection (a timeout
|
|
23
|
+
* and/or session shutdown) so a slow provider can never wedge it.
|
|
24
|
+
*/
|
|
25
|
+
export interface ReflectContext {
|
|
26
|
+
readonly sessionId: SessionId;
|
|
27
|
+
readonly turnId: TurnId;
|
|
28
|
+
readonly cwd: string;
|
|
29
|
+
readonly log: EventLogReader;
|
|
30
|
+
readonly services: ServiceRegistry;
|
|
31
|
+
readonly signal: AbortSignal;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One improvement a reflector suggests. `kind` picks the target surface
|
|
35
|
+
* (`'memory'` → a fact worth `memory_save`; `'skill'` → a repeated procedure
|
|
36
|
+
* worth `synthesize_skill`); `title` is a short label; `nudge` is a
|
|
37
|
+
* one-paragraph suggestion addressed to the assistant. A proposal is a HINT,
|
|
38
|
+
* not a command — the model decides whether to act, and any resulting write
|
|
39
|
+
* still hits its own permission prompt.
|
|
40
|
+
*/
|
|
41
|
+
export interface ReflectionProposal {
|
|
42
|
+
readonly kind: 'memory' | 'skill';
|
|
43
|
+
readonly title: string;
|
|
44
|
+
/** One-paragraph suggestion addressed to the assistant. */
|
|
45
|
+
readonly nudge: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A registered reflector backend. `reflect` inspects the just-finished turn and
|
|
49
|
+
* returns 0 or more proposals (an empty array = "nothing worth suggesting").
|
|
50
|
+
* It MUST be side-effect-free with respect to memory/skills — it only reads and
|
|
51
|
+
* proposes — and MUST honor `ctx.signal` (abort/timeout).
|
|
52
|
+
*/
|
|
53
|
+
export interface ReflectorDef {
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly displayName?: string;
|
|
56
|
+
reflect(ctx: ReflectContext): Promise<ReadonlyArray<ReflectionProposal>>;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=reflector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflector.d.ts","sourceRoot":"","sources":["../src/reflector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;CAC1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflector.js","sourceRoot":"","sources":["../src/reflector.ts"],"names":[],"mappings":""}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -131,15 +131,15 @@ export declare const skillFrontmatterSchema: z.ZodObject<{
|
|
|
131
131
|
}>;
|
|
132
132
|
export declare const pluginManifestSchema: z.ZodObject<{
|
|
133
133
|
entry: z.ZodString;
|
|
134
|
-
kind: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["tools", "provider", "mode", "compactor", "cache-strategy", "view-renderer", "tunnel-provider", "mcp", "cli", "channel", "hooks", "agent", "command", "transcriber", "synthesizer"]>, z.ZodArray<z.ZodEnum<["tools", "provider", "mode", "compactor", "cache-strategy", "view-renderer", "tunnel-provider", "mcp", "cli", "channel", "hooks", "agent", "command", "transcriber", "synthesizer"]>, "many">]>>;
|
|
134
|
+
kind: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["tools", "provider", "mode", "compactor", "cache-strategy", "view-renderer", "tunnel-provider", "mcp", "cli", "channel", "hooks", "agent", "command", "transcriber", "synthesizer", "reflector"]>, z.ZodArray<z.ZodEnum<["tools", "provider", "mode", "compactor", "cache-strategy", "view-renderer", "tunnel-provider", "mcp", "cli", "channel", "hooks", "agent", "command", "transcriber", "synthesizer", "reflector"]>, "many">]>>;
|
|
135
135
|
skills: z.ZodOptional<z.ZodString>;
|
|
136
136
|
}, "strip", z.ZodTypeAny, {
|
|
137
137
|
entry: string;
|
|
138
|
-
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer")[] | undefined;
|
|
138
|
+
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector")[] | undefined;
|
|
139
139
|
skills?: string | undefined;
|
|
140
140
|
}, {
|
|
141
141
|
entry: string;
|
|
142
|
-
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer")[] | undefined;
|
|
142
|
+
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector")[] | undefined;
|
|
143
143
|
skills?: string | undefined;
|
|
144
144
|
}>;
|
|
145
145
|
/**
|
|
@@ -152,18 +152,128 @@ export declare const pluginManifestSchema: z.ZodObject<{
|
|
|
152
152
|
* requirements may be authored; per-tool/per-transcriber/per-anything
|
|
153
153
|
* runtime declarations were removed in favor of static analysis.
|
|
154
154
|
*/
|
|
155
|
+
/**
|
|
156
|
+
* One field of a plugin's declarative setup step (`package.json#moxxy.setup`).
|
|
157
|
+
* Declarative-only so EVERY frontend (the init wizard, the TUI, desktop
|
|
158
|
+
* onboarding) can render it without executing plugin code:
|
|
159
|
+
* - `secret` values land in the VAULT (never plaintext config); the plugin's
|
|
160
|
+
* `options.<key>` gets a `${vault:<name>}` ref, resolved at boot.
|
|
161
|
+
* - other kinds land at `plugins.packages.<pkg>.options.<key>` in the user
|
|
162
|
+
* config through the shared schema-validated writer.
|
|
163
|
+
*/
|
|
164
|
+
export declare const pluginSetupFieldSchema: z.ZodObject<{
|
|
165
|
+
key: z.ZodString;
|
|
166
|
+
label: z.ZodString;
|
|
167
|
+
description: z.ZodOptional<z.ZodString>;
|
|
168
|
+
kind: z.ZodEnum<["secret", "string", "boolean", "select"]>;
|
|
169
|
+
/** Vault entry name for `secret` fields. Default: `<PKG>_<KEY>` upper-snake. */
|
|
170
|
+
vaultKey: z.ZodOptional<z.ZodString>;
|
|
171
|
+
/** Choices for `select` fields. */
|
|
172
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
173
|
+
/** Required fields block completion; optional ones may stay unset. */
|
|
174
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
key: string;
|
|
178
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
179
|
+
label: string;
|
|
180
|
+
required?: boolean | undefined;
|
|
181
|
+
options?: string[] | undefined;
|
|
182
|
+
description?: string | undefined;
|
|
183
|
+
vaultKey?: string | undefined;
|
|
184
|
+
placeholder?: string | undefined;
|
|
185
|
+
}, {
|
|
186
|
+
key: string;
|
|
187
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
188
|
+
label: string;
|
|
189
|
+
required?: boolean | undefined;
|
|
190
|
+
options?: string[] | undefined;
|
|
191
|
+
description?: string | undefined;
|
|
192
|
+
vaultKey?: string | undefined;
|
|
193
|
+
placeholder?: string | undefined;
|
|
194
|
+
}>;
|
|
195
|
+
/**
|
|
196
|
+
* A plugin's declarative configuration step, walked by `moxxy init` (and
|
|
197
|
+
* surfaced after an on-demand install). `required: true` means the plugin is
|
|
198
|
+
* left DISABLED until its required fields are provided — the author's way to
|
|
199
|
+
* say "this cannot work unconfigured".
|
|
200
|
+
*/
|
|
201
|
+
export declare const pluginSetupSchema: z.ZodObject<{
|
|
202
|
+
title: z.ZodString;
|
|
203
|
+
description: z.ZodOptional<z.ZodString>;
|
|
204
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
205
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
206
|
+
key: z.ZodString;
|
|
207
|
+
label: z.ZodString;
|
|
208
|
+
description: z.ZodOptional<z.ZodString>;
|
|
209
|
+
kind: z.ZodEnum<["secret", "string", "boolean", "select"]>;
|
|
210
|
+
/** Vault entry name for `secret` fields. Default: `<PKG>_<KEY>` upper-snake. */
|
|
211
|
+
vaultKey: z.ZodOptional<z.ZodString>;
|
|
212
|
+
/** Choices for `select` fields. */
|
|
213
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
214
|
+
/** Required fields block completion; optional ones may stay unset. */
|
|
215
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
216
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, "strip", z.ZodTypeAny, {
|
|
218
|
+
key: string;
|
|
219
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
220
|
+
label: string;
|
|
221
|
+
required?: boolean | undefined;
|
|
222
|
+
options?: string[] | undefined;
|
|
223
|
+
description?: string | undefined;
|
|
224
|
+
vaultKey?: string | undefined;
|
|
225
|
+
placeholder?: string | undefined;
|
|
226
|
+
}, {
|
|
227
|
+
key: string;
|
|
228
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
229
|
+
label: string;
|
|
230
|
+
required?: boolean | undefined;
|
|
231
|
+
options?: string[] | undefined;
|
|
232
|
+
description?: string | undefined;
|
|
233
|
+
vaultKey?: string | undefined;
|
|
234
|
+
placeholder?: string | undefined;
|
|
235
|
+
}>, "many">;
|
|
236
|
+
}, "strip", z.ZodTypeAny, {
|
|
237
|
+
title: string;
|
|
238
|
+
fields: {
|
|
239
|
+
key: string;
|
|
240
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
241
|
+
label: string;
|
|
242
|
+
required?: boolean | undefined;
|
|
243
|
+
options?: string[] | undefined;
|
|
244
|
+
description?: string | undefined;
|
|
245
|
+
vaultKey?: string | undefined;
|
|
246
|
+
placeholder?: string | undefined;
|
|
247
|
+
}[];
|
|
248
|
+
required?: boolean | undefined;
|
|
249
|
+
description?: string | undefined;
|
|
250
|
+
}, {
|
|
251
|
+
title: string;
|
|
252
|
+
fields: {
|
|
253
|
+
key: string;
|
|
254
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
255
|
+
label: string;
|
|
256
|
+
required?: boolean | undefined;
|
|
257
|
+
options?: string[] | undefined;
|
|
258
|
+
description?: string | undefined;
|
|
259
|
+
vaultKey?: string | undefined;
|
|
260
|
+
placeholder?: string | undefined;
|
|
261
|
+
}[];
|
|
262
|
+
required?: boolean | undefined;
|
|
263
|
+
description?: string | undefined;
|
|
264
|
+
}>;
|
|
155
265
|
export declare const moxxyPackageSchema: z.ZodObject<{
|
|
156
266
|
plugin: z.ZodOptional<z.ZodObject<{
|
|
157
267
|
entry: z.ZodString;
|
|
158
|
-
kind: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["tools", "provider", "mode", "compactor", "cache-strategy", "view-renderer", "tunnel-provider", "mcp", "cli", "channel", "hooks", "agent", "command", "transcriber", "synthesizer"]>, z.ZodArray<z.ZodEnum<["tools", "provider", "mode", "compactor", "cache-strategy", "view-renderer", "tunnel-provider", "mcp", "cli", "channel", "hooks", "agent", "command", "transcriber", "synthesizer"]>, "many">]>>;
|
|
268
|
+
kind: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["tools", "provider", "mode", "compactor", "cache-strategy", "view-renderer", "tunnel-provider", "mcp", "cli", "channel", "hooks", "agent", "command", "transcriber", "synthesizer", "reflector"]>, z.ZodArray<z.ZodEnum<["tools", "provider", "mode", "compactor", "cache-strategy", "view-renderer", "tunnel-provider", "mcp", "cli", "channel", "hooks", "agent", "command", "transcriber", "synthesizer", "reflector"]>, "many">]>>;
|
|
159
269
|
skills: z.ZodOptional<z.ZodString>;
|
|
160
270
|
}, "strip", z.ZodTypeAny, {
|
|
161
271
|
entry: string;
|
|
162
|
-
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer")[] | undefined;
|
|
272
|
+
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector")[] | undefined;
|
|
163
273
|
skills?: string | undefined;
|
|
164
274
|
}, {
|
|
165
275
|
entry: string;
|
|
166
|
-
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer")[] | undefined;
|
|
276
|
+
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector")[] | undefined;
|
|
167
277
|
skills?: string | undefined;
|
|
168
278
|
}>>;
|
|
169
279
|
requirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -191,10 +301,75 @@ export declare const moxxyPackageSchema: z.ZodObject<{
|
|
|
191
301
|
state?: "registered" | "active" | "ready" | undefined;
|
|
192
302
|
optional?: boolean | undefined;
|
|
193
303
|
}>, "many">>;
|
|
304
|
+
/** Declarative setup step users walk through in init / post-install. */
|
|
305
|
+
setup: z.ZodOptional<z.ZodObject<{
|
|
306
|
+
title: z.ZodString;
|
|
307
|
+
description: z.ZodOptional<z.ZodString>;
|
|
308
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
310
|
+
key: z.ZodString;
|
|
311
|
+
label: z.ZodString;
|
|
312
|
+
description: z.ZodOptional<z.ZodString>;
|
|
313
|
+
kind: z.ZodEnum<["secret", "string", "boolean", "select"]>;
|
|
314
|
+
/** Vault entry name for `secret` fields. Default: `<PKG>_<KEY>` upper-snake. */
|
|
315
|
+
vaultKey: z.ZodOptional<z.ZodString>;
|
|
316
|
+
/** Choices for `select` fields. */
|
|
317
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
318
|
+
/** Required fields block completion; optional ones may stay unset. */
|
|
319
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
320
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
321
|
+
}, "strip", z.ZodTypeAny, {
|
|
322
|
+
key: string;
|
|
323
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
324
|
+
label: string;
|
|
325
|
+
required?: boolean | undefined;
|
|
326
|
+
options?: string[] | undefined;
|
|
327
|
+
description?: string | undefined;
|
|
328
|
+
vaultKey?: string | undefined;
|
|
329
|
+
placeholder?: string | undefined;
|
|
330
|
+
}, {
|
|
331
|
+
key: string;
|
|
332
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
333
|
+
label: string;
|
|
334
|
+
required?: boolean | undefined;
|
|
335
|
+
options?: string[] | undefined;
|
|
336
|
+
description?: string | undefined;
|
|
337
|
+
vaultKey?: string | undefined;
|
|
338
|
+
placeholder?: string | undefined;
|
|
339
|
+
}>, "many">;
|
|
340
|
+
}, "strip", z.ZodTypeAny, {
|
|
341
|
+
title: string;
|
|
342
|
+
fields: {
|
|
343
|
+
key: string;
|
|
344
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
345
|
+
label: string;
|
|
346
|
+
required?: boolean | undefined;
|
|
347
|
+
options?: string[] | undefined;
|
|
348
|
+
description?: string | undefined;
|
|
349
|
+
vaultKey?: string | undefined;
|
|
350
|
+
placeholder?: string | undefined;
|
|
351
|
+
}[];
|
|
352
|
+
required?: boolean | undefined;
|
|
353
|
+
description?: string | undefined;
|
|
354
|
+
}, {
|
|
355
|
+
title: string;
|
|
356
|
+
fields: {
|
|
357
|
+
key: string;
|
|
358
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
359
|
+
label: string;
|
|
360
|
+
required?: boolean | undefined;
|
|
361
|
+
options?: string[] | undefined;
|
|
362
|
+
description?: string | undefined;
|
|
363
|
+
vaultKey?: string | undefined;
|
|
364
|
+
placeholder?: string | undefined;
|
|
365
|
+
}[];
|
|
366
|
+
required?: boolean | undefined;
|
|
367
|
+
description?: string | undefined;
|
|
368
|
+
}>>;
|
|
194
369
|
}, "strip", z.ZodTypeAny, {
|
|
195
370
|
plugin?: {
|
|
196
371
|
entry: string;
|
|
197
|
-
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer")[] | undefined;
|
|
372
|
+
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector")[] | undefined;
|
|
198
373
|
skills?: string | undefined;
|
|
199
374
|
} | undefined;
|
|
200
375
|
requirements?: {
|
|
@@ -206,10 +381,25 @@ export declare const moxxyPackageSchema: z.ZodObject<{
|
|
|
206
381
|
state?: "registered" | "active" | "ready" | undefined;
|
|
207
382
|
optional?: boolean | undefined;
|
|
208
383
|
}[] | undefined;
|
|
384
|
+
setup?: {
|
|
385
|
+
title: string;
|
|
386
|
+
fields: {
|
|
387
|
+
key: string;
|
|
388
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
389
|
+
label: string;
|
|
390
|
+
required?: boolean | undefined;
|
|
391
|
+
options?: string[] | undefined;
|
|
392
|
+
description?: string | undefined;
|
|
393
|
+
vaultKey?: string | undefined;
|
|
394
|
+
placeholder?: string | undefined;
|
|
395
|
+
}[];
|
|
396
|
+
required?: boolean | undefined;
|
|
397
|
+
description?: string | undefined;
|
|
398
|
+
} | undefined;
|
|
209
399
|
}, {
|
|
210
400
|
plugin?: {
|
|
211
401
|
entry: string;
|
|
212
|
-
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer")[] | undefined;
|
|
402
|
+
kind?: "compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector" | ("compactor" | "tools" | "provider" | "mode" | "cache-strategy" | "view-renderer" | "tunnel-provider" | "mcp" | "cli" | "channel" | "hooks" | "agent" | "command" | "transcriber" | "synthesizer" | "reflector")[] | undefined;
|
|
213
403
|
skills?: string | undefined;
|
|
214
404
|
} | undefined;
|
|
215
405
|
requirements?: {
|
|
@@ -221,7 +411,24 @@ export declare const moxxyPackageSchema: z.ZodObject<{
|
|
|
221
411
|
state?: "registered" | "active" | "ready" | undefined;
|
|
222
412
|
optional?: boolean | undefined;
|
|
223
413
|
}[] | undefined;
|
|
414
|
+
setup?: {
|
|
415
|
+
title: string;
|
|
416
|
+
fields: {
|
|
417
|
+
key: string;
|
|
418
|
+
kind: "string" | "boolean" | "secret" | "select";
|
|
419
|
+
label: string;
|
|
420
|
+
required?: boolean | undefined;
|
|
421
|
+
options?: string[] | undefined;
|
|
422
|
+
description?: string | undefined;
|
|
423
|
+
vaultKey?: string | undefined;
|
|
424
|
+
placeholder?: string | undefined;
|
|
425
|
+
}[];
|
|
426
|
+
required?: boolean | undefined;
|
|
427
|
+
description?: string | undefined;
|
|
428
|
+
} | undefined;
|
|
224
429
|
}>;
|
|
430
|
+
export type PluginSetupField = z.infer<typeof pluginSetupFieldSchema>;
|
|
431
|
+
export type PluginSetupSpec = z.infer<typeof pluginSetupSchema>;
|
|
225
432
|
export type SkillFrontmatterInput = z.infer<typeof skillFrontmatterSchema>;
|
|
226
433
|
export type PluginManifestInput = z.infer<typeof pluginManifestSchema>;
|
|
227
434
|
export type MoxxyPackageInput = z.infer<typeof moxxyPackageSchema>;
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;EAoB5B,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY5B,CAAC;AAEL,eAAO,MAAM,sBAAsB;;;;;;;IAOjC,iEAAiE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjE,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAM/B,CAAC;AAEH;;;;;;;;;GASG;AACH;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;;;;;IAKjC,gFAAgF;;IAEhF,mCAAmC;;IAEnC,sEAAsE;;;;;;;;;;;;;;;;;;;;;EAGtE,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;QAf5B,gFAAgF;;QAEhF,mCAAmC;;QAEnC,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBtE,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG7B,wEAAwE;;;;;;;;;;YAzBxE,gFAAgF;;YAEhF,mCAAmC;;YAEnC,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBtE,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAChE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC3E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/schemas.js
CHANGED
|
@@ -15,6 +15,7 @@ const pluginKindSchema = z.enum([
|
|
|
15
15
|
'command',
|
|
16
16
|
'transcriber',
|
|
17
17
|
'synthesizer',
|
|
18
|
+
'reflector',
|
|
18
19
|
]);
|
|
19
20
|
export const requirementSchema = z.object({
|
|
20
21
|
kind: z.enum([
|
|
@@ -83,8 +84,44 @@ export const pluginManifestSchema = z.object({
|
|
|
83
84
|
* requirements may be authored; per-tool/per-transcriber/per-anything
|
|
84
85
|
* runtime declarations were removed in favor of static analysis.
|
|
85
86
|
*/
|
|
87
|
+
/**
|
|
88
|
+
* One field of a plugin's declarative setup step (`package.json#moxxy.setup`).
|
|
89
|
+
* Declarative-only so EVERY frontend (the init wizard, the TUI, desktop
|
|
90
|
+
* onboarding) can render it without executing plugin code:
|
|
91
|
+
* - `secret` values land in the VAULT (never plaintext config); the plugin's
|
|
92
|
+
* `options.<key>` gets a `${vault:<name>}` ref, resolved at boot.
|
|
93
|
+
* - other kinds land at `plugins.packages.<pkg>.options.<key>` in the user
|
|
94
|
+
* config through the shared schema-validated writer.
|
|
95
|
+
*/
|
|
96
|
+
export const pluginSetupFieldSchema = z.object({
|
|
97
|
+
key: z.string().min(1).regex(/^[a-zA-Z][a-zA-Z0-9_]*$/, 'key must be an identifier'),
|
|
98
|
+
label: z.string().min(1),
|
|
99
|
+
description: z.string().optional(),
|
|
100
|
+
kind: z.enum(['secret', 'string', 'boolean', 'select']),
|
|
101
|
+
/** Vault entry name for `secret` fields. Default: `<PKG>_<KEY>` upper-snake. */
|
|
102
|
+
vaultKey: z.string().min(1).optional(),
|
|
103
|
+
/** Choices for `select` fields. */
|
|
104
|
+
options: z.array(z.string().min(1)).optional(),
|
|
105
|
+
/** Required fields block completion; optional ones may stay unset. */
|
|
106
|
+
required: z.boolean().optional(),
|
|
107
|
+
placeholder: z.string().optional(),
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* A plugin's declarative configuration step, walked by `moxxy init` (and
|
|
111
|
+
* surfaced after an on-demand install). `required: true` means the plugin is
|
|
112
|
+
* left DISABLED until its required fields are provided — the author's way to
|
|
113
|
+
* say "this cannot work unconfigured".
|
|
114
|
+
*/
|
|
115
|
+
export const pluginSetupSchema = z.object({
|
|
116
|
+
title: z.string().min(1),
|
|
117
|
+
description: z.string().optional(),
|
|
118
|
+
required: z.boolean().optional(),
|
|
119
|
+
fields: z.array(pluginSetupFieldSchema).min(1),
|
|
120
|
+
});
|
|
86
121
|
export const moxxyPackageSchema = z.object({
|
|
87
122
|
plugin: pluginManifestSchema.optional(),
|
|
88
123
|
requirements: z.array(requirementSchema).optional(),
|
|
124
|
+
/** Declarative setup step users walk through in init / post-install. */
|
|
125
|
+
setup: pluginSetupSchema.optional(),
|
|
89
126
|
});
|
|
90
127
|
//# sourceMappingURL=schemas.js.map
|
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9B,OAAO;IACP,UAAU;IACV,MAAM;IACN,WAAW;IACX,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,KAAK;IACL,KAAK;IACL,SAAS;IACT,OAAO;IACP,OAAO;IACP,SAAS;IACT,aAAa;IACb,aAAa;
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9B,OAAO;IACP,UAAU;IACV,MAAM;IACN,WAAW;IACX,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,KAAK;IACL,KAAK;IACL,SAAS;IACT,OAAO;IACP,OAAO;IACP,SAAS;IACT,aAAa;IACb,aAAa;IACb,WAAW;CACZ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QACX,QAAQ;QACR,UAAU;QACV,MAAM;QACN,aAAa;QACb,aAAa;QACb,MAAM;QACN,WAAW;QACX,SAAS;QACT,OAAO;QACP,SAAS;QACT,SAAS;KACV,CAAC;IACF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,QAA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AAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IACnD,wEAAwE;IACxE,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC"}
|
package/dist/session-like.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { MoxxyEvent, TriggerOrigin, UserPromptAttachment } from './events.js';
|
|
2
2
|
import type { SessionId, TurnId } from './ids.js';
|
|
3
|
+
import type { CapabilitySpec } from './isolation.js';
|
|
3
4
|
import type { EventLogReader } from './log.js';
|
|
4
5
|
import type { ApprovalResolver, ModeBadge } from './mode.js';
|
|
5
6
|
import type { PermissionResolver } from './permission.js';
|
|
6
7
|
import type { ModelDescriptor, ProviderKeyValidation } from './provider.js';
|
|
8
|
+
import type { PluginSetupSpec } from './schemas.js';
|
|
7
9
|
import type { ToolCompactPresentation } from './tool.js';
|
|
8
10
|
/**
|
|
9
11
|
* Options accepted by `SessionLike.runTurn`. Defined here (rather than in
|
|
@@ -356,6 +358,44 @@ export interface PluginsAdminView {
|
|
|
356
358
|
install?(idOrSpec: string): Promise<{
|
|
357
359
|
readonly installed: string;
|
|
358
360
|
readonly registered: Readonly<Partial<Record<string, ReadonlyArray<string>>>>;
|
|
361
|
+
/**
|
|
362
|
+
* Combined capability surface of the tools this install registered —
|
|
363
|
+
* the package's blast radius, so a channel can render post-install
|
|
364
|
+
* consent (third-party packages) or an info line (first-party). Absent
|
|
365
|
+
* when the install registered no tools or the host cannot introspect
|
|
366
|
+
* isolation specs.
|
|
367
|
+
*/
|
|
368
|
+
readonly capabilities?: {
|
|
369
|
+
/** Tools that declared an isolation spec. */
|
|
370
|
+
readonly declared: number;
|
|
371
|
+
/** Tools the install registered. */
|
|
372
|
+
readonly total: number;
|
|
373
|
+
/** Widest-wins union of the declared specs. */
|
|
374
|
+
readonly surface: CapabilitySpec;
|
|
375
|
+
/** Tools with NO declaration: their surface is unknown, not empty. */
|
|
376
|
+
readonly undeclaredTools?: ReadonlyArray<string>;
|
|
377
|
+
};
|
|
378
|
+
/** Present when the package declares a `moxxy.setup` step to complete. */
|
|
379
|
+
readonly needsSetup?: {
|
|
380
|
+
readonly title: string;
|
|
381
|
+
readonly required: boolean;
|
|
382
|
+
};
|
|
383
|
+
}>;
|
|
384
|
+
/**
|
|
385
|
+
* The package's declarative setup step (`moxxy.setup`), read from its
|
|
386
|
+
* installed package.json — plain data, safe to render anywhere. Null when
|
|
387
|
+
* absent. Powers the post-install dialog and `/setup`.
|
|
388
|
+
*/
|
|
389
|
+
setupSpec?(packageName: string): Promise<PluginSetupSpec | null>;
|
|
390
|
+
/**
|
|
391
|
+
* Persist collected setup values: secrets → vault + `${vault:NAME}` option
|
|
392
|
+
* ref; other kinds → `plugins.packages.<pkg>.options.<key>`. A complete
|
|
393
|
+
* required setup re-enables the package; an incomplete one disables it
|
|
394
|
+
* (mirrors the init wizard). Optional capability per the seam convention.
|
|
395
|
+
*/
|
|
396
|
+
applySetup?(packageName: string, values: Readonly<Record<string, string | boolean>>): Promise<{
|
|
397
|
+
readonly complete: boolean;
|
|
398
|
+
readonly missing: ReadonlyArray<string>;
|
|
359
399
|
}>;
|
|
360
400
|
}
|
|
361
401
|
/** IO a channel supplies to drive an interactive OAuth flow inside its own
|
|
@@ -458,5 +498,17 @@ export interface SessionLike {
|
|
|
458
498
|
pluginsAdmin?: PluginsAdminView;
|
|
459
499
|
/** Provider onboarding slice backing in-channel connect (key entry / OAuth). */
|
|
460
500
|
providerSetup?: ProviderSetupView;
|
|
501
|
+
/**
|
|
502
|
+
* Re-read the merged config from disk and live-apply the safe subset —
|
|
503
|
+
* backs the TUI /settings panel's write-then-apply. Structurally matches
|
|
504
|
+
* @moxxy/config's ConfigApplyResult (the SDK stays config-free). Absent on
|
|
505
|
+
* a RemoteSession: writes still land, but apply waits for a restart.
|
|
506
|
+
*/
|
|
507
|
+
configAdmin?: {
|
|
508
|
+
apply(): Promise<{
|
|
509
|
+
readonly applied: ReadonlyArray<string>;
|
|
510
|
+
readonly pending: ReadonlyArray<string>;
|
|
511
|
+
}>;
|
|
512
|
+
};
|
|
461
513
|
}
|
|
462
514
|
//# sourceMappingURL=session-like.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-like.d.ts","sourceRoot":"","sources":["../src/session-like.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAC3D;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,SAAS,CAAC,EAAE,EAAE,CAAC,K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IAC7D,qDAAqD;IACrD,OAAO,IAAI,WAAW,CAAC;IACvB,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;;;;OAKG;IACH,yEAAyE;IACzE,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,yEAAyE;IACzE,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,sDAAsD;IACtD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,gFAAgF;IAChF,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC;;;;;OAKG;IACH,WAAW,CAAC,EAAE;QACZ,KAAK,IAAI,OAAO,CAAC;YACf,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;YACxC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;SACzC,CAAC,CAAC;KACJ,CAAC;CACH"}
|
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -300,6 +300,31 @@ export interface ChannelSubcommand {
|
|
|
300
300
|
run(ctx: ChannelSubcommandContext): Promise<number>;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Flag an orchestrator (e.g. `moxxy onboard`) passes to a channel's `pair`
|
|
305
|
+
* subcommand to say "hand control back once pairing succeeds". Every pair
|
|
306
|
+
* flow's default is to keep the just-paired channel running until Ctrl+C —
|
|
307
|
+
* right for a human running `moxxy <name> pair` standalone, wrong for a
|
|
308
|
+
* caller that pairs as one step of a longer flow (its SIGINT handlers call
|
|
309
|
+
* `process.exit`, which would kill the orchestrator). Pair flows check this
|
|
310
|
+
* via {@link exitAfterPairRequested} after a successful pairing and stop the
|
|
311
|
+
* channel + return 0 instead of blocking forever.
|
|
312
|
+
*/
|
|
313
|
+
export const EXIT_AFTER_PAIR_FLAG = 'exit-after-pair';
|
|
314
|
+
|
|
315
|
+
/** Whether the subcommand invocation asked for the pair-then-return contract. */
|
|
316
|
+
export function exitAfterPairRequested(
|
|
317
|
+
ctx: Pick<ChannelSubcommandContext, 'args' | 'deps'>,
|
|
318
|
+
): boolean {
|
|
319
|
+
// The CLI forwards subcommand argv flags both as `args.flags` and merged
|
|
320
|
+
// into `deps.options`; accept either carrier so programmatic callers that
|
|
321
|
+
// only build one of the two still opt in.
|
|
322
|
+
return (
|
|
323
|
+
ctx.args.flags[EXIT_AFTER_PAIR_FLAG] === true ||
|
|
324
|
+
ctx.deps.options?.[EXIT_AFTER_PAIR_FLAG] === true
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
303
328
|
/**
|
|
304
329
|
* Read-only registry of channels available in a Session. Implementation lives
|
|
305
330
|
* in @moxxy/core.
|
package/src/event-store.ts
CHANGED
|
@@ -12,8 +12,23 @@ import type { SessionId } from './ids.js';
|
|
|
12
12
|
* event (prompts, tool I/O), so that explicit opt-in is the trust boundary.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
/** Every valid {@link SessionSource}, as a runtime constant — so validators
|
|
16
|
+
* (e.g. the CLI's `MOXXY_SESSION_SOURCE` guard) enumerate the same list the
|
|
17
|
+
* type is derived from instead of hand-listing the literals. */
|
|
18
|
+
export const SESSION_SOURCES = [
|
|
19
|
+
'cli',
|
|
20
|
+
'tui',
|
|
21
|
+
'desktop',
|
|
22
|
+
'mobile',
|
|
23
|
+
'slack',
|
|
24
|
+
'telegram',
|
|
25
|
+
'signal',
|
|
26
|
+
'whatsapp',
|
|
27
|
+
'discord',
|
|
28
|
+
] as const;
|
|
29
|
+
|
|
15
30
|
/** Originating channel of a session (persisted into the meta sidecar). */
|
|
16
|
-
export type SessionSource =
|
|
31
|
+
export type SessionSource = (typeof SESSION_SOURCES)[number];
|
|
17
32
|
|
|
18
33
|
/**
|
|
19
34
|
* The single per-session metadata record (the JSONL impl writes it to
|