@harnesys/sdk 1.1.0 → 1.3.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/README.md CHANGED
@@ -8,7 +8,7 @@ Leaf package for addon authors. Implements the addon platform spec (`docs/ADDONS
8
8
  bun add @harnesys/sdk
9
9
  ```
10
10
 
11
- Version `1.0.0` tracks the addon platform contract (`platform: 1`); `1.1.0` adds tool schema validation to the fake host. The SDK ships TypeScript sources for Bun and compiled ESM plus declarations in `dist/`; see [Распространение SDK](../../docs/add-ons/sdk.md#распространение-sdk) for the export modes and the consumer `tsconfig` shape.
11
+ Version `1.0.0` tracks the addon platform contract (`platform: 1`); `1.1.0` adds tool schema validation to the fake host; `1.2.0` adds `createLabel` and `icon` to the viewer descriptor. The SDK ships TypeScript sources for Bun and compiled ESM plus declarations in `dist/`; see [Распространение SDK](../../docs/add-ons/sdk.md#распространение-sdk) for the export modes and the consumer `tsconfig` shape.
12
12
 
13
13
  ## Layout
14
14
 
@@ -63,13 +63,27 @@ Single source in `src/protocol/map.ts`. Every entry: `{ direction, params, resul
63
63
 
64
64
  - host→addon: `initialize`, `shutdown`, `ping`, `lifecycle.upgrade`, `tools.call`, `route.handle`, `trigger.start`, `trigger.stop`, `job.run`, `worker.start`, `worker.stop`, `transport.send`, `transport.edit`, `transport.typing`, `hook.deliver`
65
65
  - host→addon notifications: `initialized`, `config.changed`, `permissions.changed`, `accounts.changed`
66
- - addon→host: `config.get`, `secrets.get`, `db.exec/all/get/run/batch`, `log.write`, `events.emit`, `http.fetch`, `accounts.list/report/access`, `runs.dispatch`, `threads.create`, `triggers.fire`, `bridge.inbound`, `workers.report`
66
+ - addon→host: `config.get`, `secrets.get`, `db.exec/all/get/run/batch`, `log.write`, `events.emit`, `http.fetch`, `accounts.list/report/access`, `runs.list/dispatch/cancel`, `threads.create/get/patch/compact`, `agents.list`, `skills.list`, `usage.summary`, `org.settings.get`, `approvals.request`, `files.stat/read/write`, `triggers.fire/create/update`, `bridge.inbound`, `workers.report`
67
67
  - notifications (both/addon): `$/cancel` (both), `$/progress` (addon)
68
68
 
69
- Permissions: `null` = baseline; otherwise one of `http.fetch`, `accounts.use`, `accounts.credentials`, `runs.dispatch`, `threads.create`, `bridge.inbound`, `trigger`, `worker` (the last two are contribution-derived, see §6.4 "через вклад").
69
+ Permissions: `null` = baseline; otherwise one of `http.fetch`, `accounts.use`,
70
+ `accounts.credentials`, `events.subscribe`, `runs.dispatch`, `runs.read`, `threads.create`,
71
+ `threads.read`, `threads.write`, `threads.compact`, `agents.read`, `skills.read`,
72
+ `usage.read`, `files.read`, `files.write`, `bindings.write`, `approvals.request`,
73
+ `routes.public`, `lifecycle.resident`, `source`, `bridge.inbound`, `trigger`, `worker`
74
+ (the last two are contribution-derived, see §6.4 "через вклад").
70
75
 
71
76
  ## Families
72
77
 
78
+ Trigger instances are host-owned: `trigger.start` receives `config` (declared
79
+ `configFields`), the validated `target` (`threadId`, `agentId`, `modeId?`, `workspace?`)
80
+ and the operator `instructions` that the host appends to every fired run. `target.workspace`
81
+ is the thread's working directory: the host binds it to the target thread, so fired runs and
82
+ manual messages in that thread execute there. Fire with
83
+ `ctx.triggers.fire({ instanceId, runKey, text?, title?, fields?, payload? })`; `text` is
84
+ the event body, `instructions` live on the instance and are edited in the trigger
85
+ settings. One instance per thread is enforced by the core.
86
+
73
87
  `tool-pack`, `trigger`, `job`, `worker`, `route`, `transport`, `hook`, `content`, `config`, `view`, `source-kind`, `mcp`, `lsp` — each with a descriptor interface, Zod schema and schema version (`*_SCHEMA_VERSION = 1`). Tool/route input schemas use the JSON-Schema subset of §6.5 (`src/families/json-schema.ts`): depth ≤ 8, size ≤ 64 KiB, local `$ref` only.
74
88
 
75
89
  ## Deviations from the plan
@@ -1,6 +1,6 @@
1
1
  import type { AddonContext } from './addon-context.ts';
2
2
  import type { HostServiceClient } from './protocol/map.ts';
3
3
  import type { CallMeta } from './protocol/meta.ts';
4
- export type { AddonAccounts, AddonApprovals, AddonBindings, AddonBridge, AddonConfig, AddonContext, AddonDb, AddonEvents, AddonFileChunk, AddonFileStat, AddonFiles, AddonFileWriteResult, AddonHttp, AddonInboundAttachment, AddonLog, AddonLogLevel, AddonOrg, AddonProgress, AddonRuns, AddonSecrets, AddonSkills, AddonThreads, AddonTriggerField, AddonTriggers, AddonTriggerTarget, AddonUsage, AddonWorkers, DbRow, DbStatement, DbWriteResult, SqlParam, } from './addon-context.ts';
4
+ export type { AddonAccounts, AddonApprovals, AddonBindings, AddonBridge, AddonConfig, AddonContext, AddonDb, AddonEvents, AddonFileChunk, AddonFileStat, AddonFiles, AddonFileWriteResult, AddonHttp, AddonInboundAttachment, AddonLog, AddonLogLevel, AddonOrg, AddonProgress, AddonRuns, AddonSecrets, AddonSkills, AddonThreads, AddonTriggerField, AddonTriggers, AddonTriggerTarget, AddonTriggerWorkspace, AddonUsage, AddonWorkers, DbRow, DbStatement, DbWriteResult, SqlParam, } from './addon-context.ts';
5
5
  export type ProgressNotify = (method: string, params: unknown) => void;
6
6
  export declare function createAddonContext(client: HostServiceClient, meta: CallMeta, signal: AbortSignal, notify?: ProgressNotify): AddonContext;
@@ -222,10 +222,29 @@ export interface AddonSkills {
222
222
  source: string;
223
223
  }>>;
224
224
  }
225
+ export type AddonTriggerWorkspace = {
226
+ kind: 'inherit';
227
+ } | {
228
+ kind: 'sandbox';
229
+ } | {
230
+ kind: 'folder';
231
+ path: string;
232
+ hostId?: string;
233
+ } | {
234
+ kind: 'source';
235
+ sourceId: string;
236
+ subpath?: string;
237
+ } | {
238
+ kind: 'worktree';
239
+ sourceId: string;
240
+ worktreeId: string;
241
+ subpath?: string;
242
+ };
225
243
  export interface AddonTriggerTarget {
226
244
  threadId: string;
227
245
  agentId: string;
228
246
  modeId?: string;
247
+ workspace?: AddonTriggerWorkspace;
229
248
  }
230
249
  export interface AddonTriggerField {
231
250
  label: string;
@@ -23,7 +23,7 @@ export interface TransportHandlers {
23
23
  export interface SourceBackendHandlers {
24
24
  list(params: Omit<HostMethodParams<'source.list'>, '_meta'>, ctx: AddonContext): HostMethodResult<'source.list'> | Promise<HostMethodResult<'source.list'>>;
25
25
  stat(params: Omit<HostMethodParams<'source.stat'>, '_meta'>, ctx: AddonContext): HostMethodResult<'source.stat'> | Promise<HostMethodResult<'source.stat'>>;
26
- download(params: Omit<HostMethodParams<'source.download'>, '_meta'>, ctx: AddonContext): HostMethodResult<'source.download'> | Promise<HostMethodResult<'source.download'>>;
26
+ download?(params: Omit<HostMethodParams<'source.download'>, '_meta'>, ctx: AddonContext): HostMethodResult<'source.download'> | Promise<HostMethodResult<'source.download'>>;
27
27
  upload?(params: Omit<HostMethodParams<'source.upload'>, '_meta'>, ctx: AddonContext): HostMethodResult<'source.upload'> | Promise<HostMethodResult<'source.upload'>>;
28
28
  mkdir?(params: Omit<HostMethodParams<'source.mkdir'>, '_meta'>, ctx: AddonContext): HostMethodResult<'source.mkdir'> | Promise<HostMethodResult<'source.mkdir'>>;
29
29
  remove?(params: Omit<HostMethodParams<'source.remove'>, '_meta'>, ctx: AddonContext): Promise<void> | void;
@@ -38,10 +38,10 @@ function sourceHandlerNames(sources) {
38
38
  if (sources === undefined || Object.keys(sources).length === 0) {
39
39
  return [];
40
40
  }
41
- const names = ['source.list', 'source.stat', 'source.download'];
41
+ const names = ['source.list', 'source.stat'];
42
42
  const implementations = Object.values(sources);
43
43
  const anyOp = (op) => implementations.some((backend) => backend[op] !== undefined);
44
- for (const op of ['upload', 'mkdir', 'remove', 'export']) {
44
+ for (const op of ['download', 'upload', 'mkdir', 'remove', 'export']) {
45
45
  if (anyOp(op)) {
46
46
  names.push(`source.${op}`);
47
47
  }
@@ -1,11 +1,13 @@
1
1
  import { z } from 'zod';
2
- export type FieldType = 'text' | 'secret' | 'textarea' | 'url' | 'select' | 'number' | 'boolean' | 'group';
2
+ export type FieldType = 'text' | 'secret' | 'textarea' | 'url' | 'select' | 'number' | 'boolean' | 'file' | 'group';
3
3
  export type FieldValue = string | number | boolean | null;
4
4
  export interface FieldOption {
5
5
  value: string;
6
6
  label: string;
7
7
  /** Hint shown for the currently selected option. */
8
8
  help?: string;
9
+ /** Group label used by multi-value pickers that render grouped panels. */
10
+ group?: string;
9
11
  }
10
12
  /** Conditional visibility: show the field only when `values[key]` matches. */
11
13
  export interface FieldVisibleWhen {
@@ -28,12 +30,16 @@ export type FieldOptionsFrom = {
28
30
  route: string;
29
31
  /** Field keys passed to the route as query params. */
30
32
  dependsOn?: string[];
33
+ /** Static query params always sent to the route alongside `dependsOn` values. */
34
+ params?: Record<string, string>;
31
35
  /** Response body key holding the rows. Defaults to `rows`. */
32
36
  listKey?: string;
33
37
  /** Row field used as the option value. */
34
38
  valueKey: string;
35
39
  /** Row field used as the option label. Defaults to `valueKey`. */
36
40
  labelKey?: string;
41
+ /** Row field used to group options in multi-value pickers. */
42
+ groupKey?: string;
37
43
  } | {
38
44
  kind: 'connections';
39
45
  } | {
@@ -72,6 +78,7 @@ export interface FieldSpec {
72
78
  export declare const FieldTypeSchema: z.ZodEnum<{
73
79
  number: "number";
74
80
  boolean: "boolean";
81
+ file: "file";
75
82
  text: "text";
76
83
  url: "url";
77
84
  group: "group";
@@ -84,6 +91,7 @@ export declare const FieldOptionSchema: z.ZodObject<{
84
91
  value: z.ZodString;
85
92
  label: z.ZodString;
86
93
  help: z.ZodOptional<z.ZodString>;
94
+ group: z.ZodOptional<z.ZodString>;
87
95
  }, z.core.$strip>;
88
96
  export declare const FieldVisibleWhenSchema: z.ZodObject<{
89
97
  key: z.ZodString;
@@ -7,6 +7,7 @@ export const FieldTypeSchema = z.enum([
7
7
  'select',
8
8
  'number',
9
9
  'boolean',
10
+ 'file',
10
11
  'group',
11
12
  ]);
12
13
  export const FieldValueSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
@@ -14,6 +15,7 @@ export const FieldOptionSchema = z.object({
14
15
  value: z.string(),
15
16
  label: z.string(),
16
17
  help: z.string().optional(),
18
+ group: z.string().optional(),
17
19
  });
18
20
  export const FieldVisibleWhenSchema = z.object({
19
21
  key: z.string().min(1),
@@ -29,9 +31,11 @@ export const FieldOptionsFromSchema = z.union([
29
31
  kind: z.literal('addonRoute'),
30
32
  route: z.string().min(1),
31
33
  dependsOn: z.array(z.string().min(1)).optional(),
34
+ params: z.record(z.string(), z.string()).optional(),
32
35
  listKey: z.string().min(1).optional(),
33
36
  valueKey: z.string().min(1),
34
37
  labelKey: z.string().min(1).optional(),
38
+ groupKey: z.string().min(1).optional(),
35
39
  }),
36
40
  z.object({ kind: z.literal('connections') }),
37
41
  z.object({ kind: z.literal('agents') }),
@@ -5,6 +5,13 @@ export interface SourceKindDescriptor {
5
5
  id: string;
6
6
  title: L10n;
7
7
  connection?: string;
8
+ /**
9
+ * What a source attached from this kind is. `cloud` (default) mirrors files
10
+ * through the add-on backend (`source.download`/`upload`). `git` attaches a
11
+ * core git source: entries must carry `url` (an HTTPS clone URL) and the
12
+ * add-on only needs `source.list`/`source.stat`.
13
+ */
14
+ mount?: 'cloud' | 'git';
8
15
  supportsRootMount?: boolean;
9
16
  supportsSearch?: boolean;
10
17
  rootTitle?: string;
@@ -13,6 +20,10 @@ export declare const SourceKindDescriptorSchema: z.ZodObject<{
13
20
  id: z.ZodString;
14
21
  title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
15
22
  connection: z.ZodOptional<z.ZodString>;
23
+ mount: z.ZodOptional<z.ZodEnum<{
24
+ cloud: "cloud";
25
+ git: "git";
26
+ }>>;
16
27
  supportsRootMount: z.ZodOptional<z.ZodBoolean>;
17
28
  supportsSearch: z.ZodOptional<z.ZodBoolean>;
18
29
  rootTitle: z.ZodOptional<z.ZodString>;
@@ -5,6 +5,7 @@ export const SourceKindDescriptorSchema = z.object({
5
5
  id: z.string().min(1),
6
6
  title: L10nSchema,
7
7
  connection: z.string().min(1).optional(),
8
+ mount: z.enum(['cloud', 'git']).optional(),
8
9
  supportsRootMount: z.boolean().optional(),
9
10
  supportsSearch: z.boolean().optional(),
10
11
  rootTitle: z.string().min(1).optional(),
@@ -11,12 +11,46 @@ export interface Column {
11
11
  label: L10n;
12
12
  format: 'text' | 'datetime' | 'number' | 'badge' | 'link' | 'copy';
13
13
  }
14
+ export interface TableFilter {
15
+ key: string;
16
+ label: L10n;
17
+ /** Static filter options; `optionsFrom` takes precedence when both are set. */
18
+ options?: {
19
+ value: string;
20
+ label: string;
21
+ }[];
22
+ /** Options resolved from an add-on-owned GET route. */
23
+ optionsFrom?: {
24
+ route: string;
25
+ valueKey: string;
26
+ labelKey?: string;
27
+ };
28
+ }
29
+ export interface FormDialogAction {
30
+ id: string;
31
+ label: L10n;
32
+ route: RouteRef;
33
+ confirm?: L10n;
34
+ destructive?: boolean;
35
+ }
14
36
  export interface Action {
15
37
  id: string;
16
38
  label: L10n;
17
39
  route: RouteRef;
18
40
  confirm?: L10n;
19
41
  destructive?: boolean;
42
+ /** Render as a switch bound to `checkedKey`, or as a modal form over `fields`. */
43
+ kind?: 'switch' | 'form';
44
+ /** Row field holding the switch state; requires `kind: 'switch'`. */
45
+ checkedKey?: string;
46
+ /** Form fields for the modal; requires `kind: 'form'`. */
47
+ fields?: FieldSpec[];
48
+ /** Maps form field keys to row keys for initial values; requires `kind: 'form'`. */
49
+ prefill?: Record<string, string>;
50
+ /** Extra footer buttons inside the `kind: 'form'` dialog (e.g. test, delete). */
51
+ formActions?: FormDialogAction[];
52
+ /** Header master switch POSTs this route with `{ enabled }` to set every row in the filter context. */
53
+ batchRoute?: RouteRef;
20
54
  }
21
55
  export type ViewSection = {
22
56
  type: 'status';
@@ -42,12 +76,23 @@ export type ViewSection = {
42
76
  columns: Column[];
43
77
  rowActions?: Action[];
44
78
  pageSize?: number;
79
+ /** Render checkboxes and enable `selectionActions` on selected rows. */
80
+ selectable?: boolean;
81
+ /** Bulk actions POSTed once with `{ ids }` of the selected rows. */
82
+ selectionActions?: Action[];
83
+ /** Actions rendered in the section header (e.g. a create-form button). */
84
+ headerActions?: Action[];
85
+ /** Filters rendered above the rows; each adds `key=value` to the source query and to action calls as the filter context. */
86
+ filters?: TableFilter[];
87
+ /** Render a text search input filtering the loaded rows client-side. */
88
+ search?: boolean;
45
89
  } | {
46
90
  type: 'form';
47
91
  title: L10n;
48
92
  fields: FieldSpec[];
49
93
  submit: RouteRef;
50
- confirm?: L10n;
94
+ confirm?: L10n /** Render as a modal opened by a button labeled with the title. */;
95
+ modal?: boolean;
51
96
  } | {
52
97
  type: 'actions';
53
98
  actions: Action[];
@@ -90,6 +135,40 @@ export declare const ActionSchema: z.ZodObject<{
90
135
  }, z.core.$strip>;
91
136
  confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
92
137
  destructive: z.ZodOptional<z.ZodBoolean>;
138
+ kind: z.ZodOptional<z.ZodEnum<{
139
+ switch: "switch";
140
+ form: "form";
141
+ }>>;
142
+ checkedKey: z.ZodOptional<z.ZodString>;
143
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
144
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
145
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
146
+ id: z.ZodString;
147
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
148
+ route: z.ZodObject<{
149
+ route: z.ZodString;
150
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
151
+ }, z.core.$strip>;
152
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
153
+ destructive: z.ZodOptional<z.ZodBoolean>;
154
+ }, z.core.$strip>>>;
155
+ batchRoute: z.ZodOptional<z.ZodObject<{
156
+ route: z.ZodString;
157
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
158
+ }, z.core.$strip>>;
159
+ }, z.core.$strip>;
160
+ export declare const TableFilterSchema: z.ZodObject<{
161
+ key: z.ZodString;
162
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
163
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
164
+ value: z.ZodString;
165
+ label: z.ZodString;
166
+ }, z.core.$strip>>>;
167
+ optionsFrom: z.ZodOptional<z.ZodObject<{
168
+ route: z.ZodString;
169
+ valueKey: z.ZodString;
170
+ labelKey: z.ZodOptional<z.ZodString>;
171
+ }, z.core.$strip>>;
93
172
  }, z.core.$strip>;
94
173
  export declare const ViewSectionSchema: z.ZodUnion<readonly [z.ZodObject<{
95
174
  type: z.ZodLiteral<"status">;
@@ -136,8 +215,106 @@ export declare const ViewSectionSchema: z.ZodUnion<readonly [z.ZodObject<{
136
215
  }, z.core.$strip>;
137
216
  confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
138
217
  destructive: z.ZodOptional<z.ZodBoolean>;
218
+ kind: z.ZodOptional<z.ZodEnum<{
219
+ switch: "switch";
220
+ form: "form";
221
+ }>>;
222
+ checkedKey: z.ZodOptional<z.ZodString>;
223
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
224
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
225
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
226
+ id: z.ZodString;
227
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
228
+ route: z.ZodObject<{
229
+ route: z.ZodString;
230
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
231
+ }, z.core.$strip>;
232
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
233
+ destructive: z.ZodOptional<z.ZodBoolean>;
234
+ }, z.core.$strip>>>;
235
+ batchRoute: z.ZodOptional<z.ZodObject<{
236
+ route: z.ZodString;
237
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
238
+ }, z.core.$strip>>;
139
239
  }, z.core.$strip>>>;
140
240
  pageSize: z.ZodOptional<z.ZodNumber>;
241
+ selectable: z.ZodOptional<z.ZodBoolean>;
242
+ selectionActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
243
+ id: z.ZodString;
244
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
245
+ route: z.ZodObject<{
246
+ route: z.ZodString;
247
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
248
+ }, z.core.$strip>;
249
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
250
+ destructive: z.ZodOptional<z.ZodBoolean>;
251
+ kind: z.ZodOptional<z.ZodEnum<{
252
+ switch: "switch";
253
+ form: "form";
254
+ }>>;
255
+ checkedKey: z.ZodOptional<z.ZodString>;
256
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
257
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
258
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
259
+ id: z.ZodString;
260
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
261
+ route: z.ZodObject<{
262
+ route: z.ZodString;
263
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
264
+ }, z.core.$strip>;
265
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
266
+ destructive: z.ZodOptional<z.ZodBoolean>;
267
+ }, z.core.$strip>>>;
268
+ batchRoute: z.ZodOptional<z.ZodObject<{
269
+ route: z.ZodString;
270
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
271
+ }, z.core.$strip>>;
272
+ }, z.core.$strip>>>;
273
+ headerActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
274
+ id: z.ZodString;
275
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
276
+ route: z.ZodObject<{
277
+ route: z.ZodString;
278
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
279
+ }, z.core.$strip>;
280
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
281
+ destructive: z.ZodOptional<z.ZodBoolean>;
282
+ kind: z.ZodOptional<z.ZodEnum<{
283
+ switch: "switch";
284
+ form: "form";
285
+ }>>;
286
+ checkedKey: z.ZodOptional<z.ZodString>;
287
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
288
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
289
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
290
+ id: z.ZodString;
291
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
292
+ route: z.ZodObject<{
293
+ route: z.ZodString;
294
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
295
+ }, z.core.$strip>;
296
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
297
+ destructive: z.ZodOptional<z.ZodBoolean>;
298
+ }, z.core.$strip>>>;
299
+ batchRoute: z.ZodOptional<z.ZodObject<{
300
+ route: z.ZodString;
301
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
302
+ }, z.core.$strip>>;
303
+ }, z.core.$strip>>>;
304
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
305
+ key: z.ZodString;
306
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
307
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
308
+ value: z.ZodString;
309
+ label: z.ZodString;
310
+ }, z.core.$strip>>>;
311
+ optionsFrom: z.ZodOptional<z.ZodObject<{
312
+ route: z.ZodString;
313
+ valueKey: z.ZodString;
314
+ labelKey: z.ZodOptional<z.ZodString>;
315
+ }, z.core.$strip>>;
316
+ }, z.core.$strip>>>;
317
+ search: z.ZodOptional<z.ZodBoolean>;
141
318
  }, z.core.$strip>, z.ZodObject<{
142
319
  type: z.ZodLiteral<"form">;
143
320
  title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
@@ -147,6 +324,7 @@ export declare const ViewSectionSchema: z.ZodUnion<readonly [z.ZodObject<{
147
324
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
148
325
  }, z.core.$strip>;
149
326
  confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
327
+ modal: z.ZodOptional<z.ZodBoolean>;
150
328
  }, z.core.$strip>, z.ZodObject<{
151
329
  type: z.ZodLiteral<"actions">;
152
330
  actions: z.ZodArray<z.ZodObject<{
@@ -158,6 +336,27 @@ export declare const ViewSectionSchema: z.ZodUnion<readonly [z.ZodObject<{
158
336
  }, z.core.$strip>;
159
337
  confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
160
338
  destructive: z.ZodOptional<z.ZodBoolean>;
339
+ kind: z.ZodOptional<z.ZodEnum<{
340
+ switch: "switch";
341
+ form: "form";
342
+ }>>;
343
+ checkedKey: z.ZodOptional<z.ZodString>;
344
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
345
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
346
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
347
+ id: z.ZodString;
348
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
349
+ route: z.ZodObject<{
350
+ route: z.ZodString;
351
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
352
+ }, z.core.$strip>;
353
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
354
+ destructive: z.ZodOptional<z.ZodBoolean>;
355
+ }, z.core.$strip>>>;
356
+ batchRoute: z.ZodOptional<z.ZodObject<{
357
+ route: z.ZodString;
358
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
359
+ }, z.core.$strip>>;
161
360
  }, z.core.$strip>>;
162
361
  }, z.core.$strip>, z.ZodObject<{
163
362
  type: z.ZodLiteral<"markdown">;
@@ -216,8 +415,106 @@ export declare const ViewDescriptorSchema: z.ZodObject<{
216
415
  }, z.core.$strip>;
217
416
  confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
218
417
  destructive: z.ZodOptional<z.ZodBoolean>;
418
+ kind: z.ZodOptional<z.ZodEnum<{
419
+ switch: "switch";
420
+ form: "form";
421
+ }>>;
422
+ checkedKey: z.ZodOptional<z.ZodString>;
423
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
424
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
425
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
426
+ id: z.ZodString;
427
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
428
+ route: z.ZodObject<{
429
+ route: z.ZodString;
430
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
431
+ }, z.core.$strip>;
432
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
433
+ destructive: z.ZodOptional<z.ZodBoolean>;
434
+ }, z.core.$strip>>>;
435
+ batchRoute: z.ZodOptional<z.ZodObject<{
436
+ route: z.ZodString;
437
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
438
+ }, z.core.$strip>>;
219
439
  }, z.core.$strip>>>;
220
440
  pageSize: z.ZodOptional<z.ZodNumber>;
441
+ selectable: z.ZodOptional<z.ZodBoolean>;
442
+ selectionActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
443
+ id: z.ZodString;
444
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
445
+ route: z.ZodObject<{
446
+ route: z.ZodString;
447
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
448
+ }, z.core.$strip>;
449
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
450
+ destructive: z.ZodOptional<z.ZodBoolean>;
451
+ kind: z.ZodOptional<z.ZodEnum<{
452
+ switch: "switch";
453
+ form: "form";
454
+ }>>;
455
+ checkedKey: z.ZodOptional<z.ZodString>;
456
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
457
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
458
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
459
+ id: z.ZodString;
460
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
461
+ route: z.ZodObject<{
462
+ route: z.ZodString;
463
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
464
+ }, z.core.$strip>;
465
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
466
+ destructive: z.ZodOptional<z.ZodBoolean>;
467
+ }, z.core.$strip>>>;
468
+ batchRoute: z.ZodOptional<z.ZodObject<{
469
+ route: z.ZodString;
470
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
471
+ }, z.core.$strip>>;
472
+ }, z.core.$strip>>>;
473
+ headerActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
474
+ id: z.ZodString;
475
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
476
+ route: z.ZodObject<{
477
+ route: z.ZodString;
478
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
479
+ }, z.core.$strip>;
480
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
481
+ destructive: z.ZodOptional<z.ZodBoolean>;
482
+ kind: z.ZodOptional<z.ZodEnum<{
483
+ switch: "switch";
484
+ form: "form";
485
+ }>>;
486
+ checkedKey: z.ZodOptional<z.ZodString>;
487
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
488
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
489
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
490
+ id: z.ZodString;
491
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
492
+ route: z.ZodObject<{
493
+ route: z.ZodString;
494
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
495
+ }, z.core.$strip>;
496
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
497
+ destructive: z.ZodOptional<z.ZodBoolean>;
498
+ }, z.core.$strip>>>;
499
+ batchRoute: z.ZodOptional<z.ZodObject<{
500
+ route: z.ZodString;
501
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
502
+ }, z.core.$strip>>;
503
+ }, z.core.$strip>>>;
504
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
505
+ key: z.ZodString;
506
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
507
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
508
+ value: z.ZodString;
509
+ label: z.ZodString;
510
+ }, z.core.$strip>>>;
511
+ optionsFrom: z.ZodOptional<z.ZodObject<{
512
+ route: z.ZodString;
513
+ valueKey: z.ZodString;
514
+ labelKey: z.ZodOptional<z.ZodString>;
515
+ }, z.core.$strip>>;
516
+ }, z.core.$strip>>>;
517
+ search: z.ZodOptional<z.ZodBoolean>;
221
518
  }, z.core.$strip>, z.ZodObject<{
222
519
  type: z.ZodLiteral<"form">;
223
520
  title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
@@ -227,6 +524,7 @@ export declare const ViewDescriptorSchema: z.ZodObject<{
227
524
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
228
525
  }, z.core.$strip>;
229
526
  confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
527
+ modal: z.ZodOptional<z.ZodBoolean>;
230
528
  }, z.core.$strip>, z.ZodObject<{
231
529
  type: z.ZodLiteral<"actions">;
232
530
  actions: z.ZodArray<z.ZodObject<{
@@ -238,6 +536,27 @@ export declare const ViewDescriptorSchema: z.ZodObject<{
238
536
  }, z.core.$strip>;
239
537
  confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
240
538
  destructive: z.ZodOptional<z.ZodBoolean>;
539
+ kind: z.ZodOptional<z.ZodEnum<{
540
+ switch: "switch";
541
+ form: "form";
542
+ }>>;
543
+ checkedKey: z.ZodOptional<z.ZodString>;
544
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<FieldSpec, unknown, z.core.$ZodTypeInternals<FieldSpec, unknown>>>>;
545
+ prefill: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
546
+ formActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
547
+ id: z.ZodString;
548
+ label: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
549
+ route: z.ZodObject<{
550
+ route: z.ZodString;
551
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
552
+ }, z.core.$strip>;
553
+ confirm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
554
+ destructive: z.ZodOptional<z.ZodBoolean>;
555
+ }, z.core.$strip>>>;
556
+ batchRoute: z.ZodOptional<z.ZodObject<{
557
+ route: z.ZodString;
558
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
559
+ }, z.core.$strip>>;
241
560
  }, z.core.$strip>>;
242
561
  }, z.core.$strip>, z.ZodObject<{
243
562
  type: z.ZodLiteral<"markdown">;