@moxxy/sdk 0.26.0 → 0.28.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 +9 -3
- 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 +9 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- 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/checkpoint.d.ts +107 -0
- package/dist/mode/checkpoint.d.ts.map +1 -0
- package/dist/mode/checkpoint.js +2 -0
- package/dist/mode/checkpoint.js.map +1 -0
- package/dist/mode/react-loop.d.ts +129 -0
- package/dist/mode/react-loop.d.ts.map +1 -0
- package/dist/mode/react-loop.js +480 -0
- package/dist/mode/react-loop.js.map +1 -0
- package/dist/mode/stuck-loop.d.ts +7 -0
- package/dist/mode/stuck-loop.d.ts.map +1 -1
- package/dist/mode/stuck-loop.js +4 -0
- package/dist/mode/stuck-loop.js.map +1 -1
- package/dist/mode-helpers.d.ts +4 -0
- package/dist/mode-helpers.d.ts.map +1 -1
- package/dist/mode-helpers.js +3 -0
- package/dist/mode-helpers.js.map +1 -1
- package/dist/mode.d.ts +43 -2
- 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/dist/tool-dispatch.d.ts +35 -1
- package/dist/tool-dispatch.d.ts.map +1 -1
- package/dist/tool-dispatch.js +51 -0
- package/dist/tool-dispatch.js.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 +9 -2
- 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 +32 -4
- package/src/isolation-aggregate.test.ts +69 -0
- package/src/isolation.ts +67 -0
- package/src/mode/checkpoint.ts +105 -0
- package/src/mode/react-loop.ts +694 -0
- package/src/mode/stuck-loop.ts +11 -0
- package/src/mode-helpers.ts +16 -0
- package/src/mode.ts +43 -2
- 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
- package/src/tool-dispatch.test.ts +77 -0
- package/src/tool-dispatch.ts +82 -1
package/dist/mode.d.ts
CHANGED
|
@@ -42,6 +42,13 @@ export interface PluginHostHandle {
|
|
|
42
42
|
kinds?: ReadonlyArray<string>;
|
|
43
43
|
}>;
|
|
44
44
|
reload(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* The plugin (package) that contributed the named tool, or undefined for
|
|
47
|
+
* unknown / dynamically-attached tools. Optional so a thin-client
|
|
48
|
+
* `RemoteSession` can omit it; powers plugin-level security routing
|
|
49
|
+
* (`security.perPlugin`) and package-scoped audit views.
|
|
50
|
+
*/
|
|
51
|
+
ownerOfTool?(toolName: string): string | undefined;
|
|
45
52
|
}
|
|
46
53
|
/**
|
|
47
54
|
* Turn-boundary elision (context-on-demand) settings, resolved from config and
|
|
@@ -120,14 +127,33 @@ export interface ModeContext {
|
|
|
120
127
|
* Absent in synthetic test contexts that don't model a full Session.
|
|
121
128
|
*/
|
|
122
129
|
readonly subagents?: SubagentSpawner;
|
|
130
|
+
/**
|
|
131
|
+
* True when this context belongs to a spawned child agent (set by the
|
|
132
|
+
* subagent runtime). The shared ReAct loop disarms turn-end checkpoints in
|
|
133
|
+
* subagent sessions — the recursion backstop that keeps a checkpoint which
|
|
134
|
+
* (mistakenly) spawns a child in a checkpoint-bearing mode from gating the
|
|
135
|
+
* child's turn-end and recursing forever.
|
|
136
|
+
*/
|
|
137
|
+
readonly isSubagent?: boolean;
|
|
123
138
|
/**
|
|
124
139
|
* Request the session switch its active mode AFTER this turn fully drains.
|
|
125
140
|
* Used by terminal workflow modes (BMAD finishing its last phase) to hand
|
|
126
141
|
* control back to a normal mode so the next message isn't trapped in the
|
|
127
|
-
* workflow
|
|
128
|
-
*
|
|
142
|
+
* workflow, and by {@link ModeDef.transient} modes (goal) to disarm
|
|
143
|
+
* themselves once their objective concludes. The switch is applied
|
|
144
|
+
* post-turn by the runner; an unknown / unregistered mode name is ignored.
|
|
145
|
+
* Absent in synthetic test contexts.
|
|
129
146
|
*/
|
|
130
147
|
readonly requestModeSwitch?: (modeName: string) => void;
|
|
148
|
+
/**
|
|
149
|
+
* Name of the mode that was active before the current one (per the mode
|
|
150
|
+
* registry), when known. Lets a {@link ModeDef.transient} mode hand control
|
|
151
|
+
* back to whatever the user was in before arming it (`/goal` from research
|
|
152
|
+
* mode reverts to research, not blindly to default). Absent when the
|
|
153
|
+
* registry has no history (first mode of the session) or in synthetic test
|
|
154
|
+
* contexts — callers should fall back to `'default'`.
|
|
155
|
+
*/
|
|
156
|
+
readonly previousModeName?: string;
|
|
131
157
|
emit(event: EmittedEvent): Promise<MoxxyEvent>;
|
|
132
158
|
}
|
|
133
159
|
/**
|
|
@@ -208,6 +234,21 @@ export interface ModeDef {
|
|
|
208
234
|
* more later) opt in the same way. See {@link isSelectableMode}.
|
|
209
235
|
*/
|
|
210
236
|
readonly special?: ModeSpecial;
|
|
237
|
+
/**
|
|
238
|
+
* Marks a mode that arms for a SINGLE objective rather than becoming the
|
|
239
|
+
* session's standing behavior (goal mode). Uniformly across surfaces:
|
|
240
|
+
*
|
|
241
|
+
* - it is never persisted as the category default (`plugins.mode.default`)
|
|
242
|
+
* — `/goal` once must not make every future session boot autonomous;
|
|
243
|
+
* - a persisted/config default naming it is refused at boot (the
|
|
244
|
+
* protected default stays active instead);
|
|
245
|
+
* - the mode itself is expected to hand control back (via
|
|
246
|
+
* `ctx.requestModeSwitch`, typically to `ctx.previousModeName`) when
|
|
247
|
+
* its objective concludes.
|
|
248
|
+
*
|
|
249
|
+
* Switching INTO it (picker, `/goal`, `setMode` RPC) still works normally.
|
|
250
|
+
*/
|
|
251
|
+
readonly transient?: boolean;
|
|
211
252
|
run(ctx: ModeContext): AsyncIterable<MoxxyEvent>;
|
|
212
253
|
}
|
|
213
254
|
/** Descriptor for a {@link ModeDef.special} mode — see that field. */
|
package/dist/mode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../src/mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAA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IAAI,EAAE;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAE9E;AAmBD,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQpD"}
|
package/dist/mode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mode.js","sourceRoot":"","sources":["../src/mode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mode.js","sourceRoot":"","sources":["../src/mode.ts"],"names":[],"mappings":"AAkRA;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAoC;IACnE,OAAO,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAqC;IAC1D,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,UAAU;IAC3B,cAAc,EAAE,SAAS;IACzB,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,SAAS;CACrB,CAAC;AAEF,iFAAiF;AACjF,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,2EAA2E;IAC3E,+EAA+E;IAC/E,6EAA6E;IAC7E,+EAA+E;IAC/E,yEAAyE;IACzE,iCAAiC;IACjC,OAAO,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAClF,CAAC"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ import type { ViewRendererDef } from './view-renderer.js';
|
|
|
17
17
|
import type { TunnelProviderDef } from './tunnel.js';
|
|
18
18
|
import type { WorkflowExecutorDef } from './workflow.js';
|
|
19
19
|
import type { EventStoreDef } from './event-store.js';
|
|
20
|
-
|
|
20
|
+
import type { ReflectorDef } from './reflector.js';
|
|
21
|
+
export type PluginKind = 'tools' | 'provider' | 'mode' | 'compactor' | 'cache-strategy' | 'view-renderer' | 'tunnel-provider' | 'mcp' | 'cli' | 'channel' | 'surface' | 'hooks' | 'agent' | 'command' | 'transcriber' | 'synthesizer' | 'embedder' | 'isolator' | 'workflow-executor' | 'event-store' | 'reflector';
|
|
21
22
|
export interface PluginSpec {
|
|
22
23
|
readonly name: string;
|
|
23
24
|
readonly version?: string;
|
|
@@ -51,6 +52,14 @@ export interface PluginSpec {
|
|
|
51
52
|
* boundary, since the store sees every event). See {@link EventStoreDef}.
|
|
52
53
|
*/
|
|
53
54
|
readonly eventStores?: ReadonlyArray<EventStoreDef>;
|
|
55
|
+
/**
|
|
56
|
+
* Reflector backends — the learning-loop block that watches a finished turn
|
|
57
|
+
* and *proposes* memory/skill improvements without silently writing. One
|
|
58
|
+
* active at a time, selected via `plugins.reflector.default`. NULLABLE: core
|
|
59
|
+
* seeds no floor, so reflection is opt-in — no registered reflector means the
|
|
60
|
+
* session never reflects. See {@link ReflectorDef}.
|
|
61
|
+
*/
|
|
62
|
+
readonly reflectors?: ReadonlyArray<ReflectorDef>;
|
|
54
63
|
readonly channels?: ReadonlyArray<ChannelDef>;
|
|
55
64
|
/**
|
|
56
65
|
* Interactive surfaces contributed by the plugin — long-lived panes a human
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CA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U,CAAC,CAAC;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAChE,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CACzD"}
|
|
@@ -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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,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,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