@cat-factory/contracts 0.99.0 → 0.101.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.
@@ -2,6 +2,16 @@ import * as v from 'valibot';
2
2
  /** The external document sources cat-factory can link to. */
3
3
  export declare const documentSourceKindSchema: v.PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear"], undefined>;
4
4
  export type DocumentSourceKind = v.InferOutput<typeof documentSourceKindSchema>;
5
+ /**
6
+ * The role a workspace+`DocKind`-scoped document link plays for the forward document-authoring
7
+ * track (WS1 items 2–4). A `template` link's parsed sections REPLACE the built-in skeleton for
8
+ * that kind (singular per kind — linking a new one replaces the prior override); `exemplar`
9
+ * links are a "good example to emulate" list the author agents are pointed at (multi-valued).
10
+ * Both ride the SAME document projection + read path as a block-scoped context link — the only
11
+ * new surface is this role/`docKind` tagging (see docs/initiatives/document-task-improvements.md).
12
+ */
13
+ export declare const documentLinkRoleSchema: v.PicklistSchema<["template", "exemplar"], undefined>;
14
+ export type DocumentLinkRole = v.InferOutput<typeof documentLinkRoleSchema>;
5
15
  /** One credential a provider needs to connect (rendered as a form field). */
6
16
  export declare const credentialFieldSchema: v.ObjectSchema<{
7
17
  /** Stable key stored in the credential bag (e.g. `apiToken`). */
@@ -72,6 +82,14 @@ export declare const sourceDocumentSchema: v.ObjectSchema<{
72
82
  readonly excerpt: v.StringSchema<undefined>;
73
83
  /** The board block this document is attached to as context, if any. */
74
84
  readonly linkedBlockId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
85
+ /**
86
+ * The workspace+`DocKind` link role this document plays, if any — `template` (its parsed
87
+ * sections override the kind's built-in skeleton) or `exemplar` (a good example to emulate).
88
+ * Null for a plain imported/block-linked document. Paired with {@link docKind}.
89
+ */
90
+ readonly role: v.NullableSchema<v.PicklistSchema<["template", "exemplar"], undefined>, undefined>;
91
+ /** The document kind a `role`-tagged link is scoped to (null when the document carries no role). */
92
+ readonly docKind: v.NullableSchema<v.PicklistSchema<readonly ["prd", "rfc", "adr", "design", "technical", "api", "runbook", "research", "reference", "other"], undefined>, undefined>;
75
93
  /** When this projection row was last refreshed (epoch ms). */
76
94
  readonly syncedAt: v.NumberSchema<undefined>;
77
95
  }, undefined>;
@@ -194,4 +212,23 @@ export declare const linkDocumentSchema: v.ObjectSchema<{
194
212
  readonly blockId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
195
213
  }, undefined>;
196
214
  export type LinkDocumentInput = v.InferOutput<typeof linkDocumentSchema>;
215
+ /**
216
+ * Tag an imported page as the workspace's `template` or `exemplar` for a document kind (WS1).
217
+ * The page must already be imported (like {@link linkDocumentSchema}, the link references a
218
+ * projected document by its stable `(source, externalId)` key). A `template` role is singular
219
+ * per kind — linking a new one replaces the prior override.
220
+ */
221
+ export declare const linkDocumentForKindSchema: v.ObjectSchema<{
222
+ readonly source: v.PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear"], undefined>;
223
+ readonly externalId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
224
+ readonly role: v.PicklistSchema<["template", "exemplar"], undefined>;
225
+ readonly docKind: v.PicklistSchema<readonly ["prd", "rfc", "adr", "design", "technical", "api", "runbook", "research", "reference", "other"], undefined>;
226
+ }, undefined>;
227
+ export type LinkDocumentForKindInput = v.InferOutput<typeof linkDocumentForKindSchema>;
228
+ /** Clear a document's workspace+`DocKind` role tag (falls back to the built-in template / drops the exemplar). */
229
+ export declare const unlinkDocumentForKindSchema: v.ObjectSchema<{
230
+ readonly source: v.PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear"], undefined>;
231
+ readonly externalId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
232
+ }, undefined>;
233
+ export type UnlinkDocumentForKindInput = v.InferOutput<typeof unlinkDocumentForKindSchema>;
197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ives.js';
2
+ import { blockTypeSchema, DOC_KINDS } from './primitives.js';
3
3
  // ---------------------------------------------------------------------------
4
4
  // Document-source integration wire contracts. A workspace can connect to one or
5
5
  // more external document sources (Confluence, Notion, …), import requirement /
@@ -22,6 +22,15 @@ export const documentSourceKindSchema = v.picklist([
22
22
  'zeplin',
23
23
  'linear',
24
24
  ]);
25
+ /**
26
+ * The role a workspace+`DocKind`-scoped document link plays for the forward document-authoring
27
+ * track (WS1 items 2–4). A `template` link's parsed sections REPLACE the built-in skeleton for
28
+ * that kind (singular per kind — linking a new one replaces the prior override); `exemplar`
29
+ * links are a "good example to emulate" list the author agents are pointed at (multi-valued).
30
+ * Both ride the SAME document projection + read path as a block-scoped context link — the only
31
+ * new surface is this role/`docKind` tagging (see docs/initiatives/document-task-improvements.md).
32
+ */
33
+ export const documentLinkRoleSchema = v.picklist(['template', 'exemplar']);
25
34
  // ---- Provider self-description (drives the generic connect UI) ------------
26
35
  /** One credential a provider needs to connect (rendered as a form field). */
27
36
  export const credentialFieldSchema = v.object({
@@ -80,6 +89,14 @@ export const sourceDocumentSchema = v.object({
80
89
  excerpt: v.string(),
81
90
  /** The board block this document is attached to as context, if any. */
82
91
  linkedBlockId: v.nullable(v.string()),
92
+ /**
93
+ * The workspace+`DocKind` link role this document plays, if any — `template` (its parsed
94
+ * sections override the kind's built-in skeleton) or `exemplar` (a good example to emulate).
95
+ * Null for a plain imported/block-linked document. Paired with {@link docKind}.
96
+ */
97
+ role: v.nullable(documentLinkRoleSchema),
98
+ /** The document kind a `role`-tagged link is scoped to (null when the document carries no role). */
99
+ docKind: v.nullable(v.picklist(DOC_KINDS)),
83
100
  /** When this projection row was last refreshed (epoch ms). */
84
101
  syncedAt: v.number(),
85
102
  });
@@ -165,4 +182,21 @@ export const linkDocumentSchema = v.object({
165
182
  externalId: v.pipe(v.string(), v.trim(), v.minLength(1)),
166
183
  blockId: v.pipe(v.string(), v.trim(), v.minLength(1)),
167
184
  });
185
+ /**
186
+ * Tag an imported page as the workspace's `template` or `exemplar` for a document kind (WS1).
187
+ * The page must already be imported (like {@link linkDocumentSchema}, the link references a
188
+ * projected document by its stable `(source, externalId)` key). A `template` role is singular
189
+ * per kind — linking a new one replaces the prior override.
190
+ */
191
+ export const linkDocumentForKindSchema = v.object({
192
+ source: documentSourceKindSchema,
193
+ externalId: v.pipe(v.string(), v.trim(), v.minLength(1)),
194
+ role: documentLinkRoleSchema,
195
+ docKind: v.picklist(DOC_KINDS),
196
+ });
197
+ /** Clear a document's workspace+`DocKind` role tag (falls back to the built-in template / drops the exemplar). */
198
+ export const unlinkDocumentForKindSchema = v.object({
199
+ source: documentSourceKindSchema,
200
+ externalId: v.pipe(v.string(), v.trim(), v.minLength(1)),
201
+ });
168
202
  //# sourceMappingURL=documents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"documents.js","sourceRoot":"","sources":["../src/documents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AAC/E,0EAA0E;AAC1E,sDAAsD;AACtD,EAAE;AACF,6EAA6E;AAC7E,sEAAsE;AACtE,+EAA+E;AAC/E,4EAA4E;AAC5E,iFAAiF;AACjF,gDAAgD;AAChD,8EAA8E;AAE9E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,QAAQ,CAAC;IACjD,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;CACT,CAAC,CAAA;AAGF,8EAA8E;AAE9E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,iEAAiE;IACjE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,sCAAsC;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,k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AC,CAAC,QAAQ,CAAC,SAAS,CAAC;CAC/B,CAAC,CAAA;AAGF,kHAAkH;AAClH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,wBAAwB;IAChC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;CACzD,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -65,5 +65,6 @@ export * from './sandbox.js';
65
65
  export * from './workspace-settings.js';
66
66
  export * from './kaizen.js';
67
67
  export * from './initiative.js';
68
+ export * from './initiative-preset.js';
68
69
  export * from './routes/index.js';
69
70
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,C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;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -65,5 +65,6 @@ export * from './sandbox.js';
65
65
  export * from './workspace-settings.js';
66
66
  export * from './kaizen.js';
67
67
  export * from './initiative.js';
68
+ export * from './initiative-preset.js';
68
69
  export * from './routes/index.js';
69
70
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc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CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,258 @@
1
+ import * as v from 'valibot';
2
+ import { type InitiativePresetInputs } from './initiative.js';
3
+ /**
4
+ * How a preset field is rendered/collected. The first six mirror {@link ProviderConfigField}'s
5
+ * types exactly; `checkbox-group` (a multi-select, value `string[]`) and `path` (a repo-relative
6
+ * directory, {@link isSafeRepoDirPath}-validated) are the two additions the preset form needs.
7
+ */
8
+ export declare const initiativePresetFieldTypeSchema: v.PicklistSchema<["text", "password", "select", "number", "checkbox", "textarea", "checkbox-group", "path"], undefined>;
9
+ export type InitiativePresetFieldType = v.InferOutput<typeof initiativePresetFieldTypeSchema>;
10
+ /**
11
+ * Single-condition visibility for a field: it renders only when the referenced field's value
12
+ * matches. `equals` compares a scalar value; `includes` tests membership in a `checkbox-group`
13
+ * value (the per-doc-type subfolder case — "show `diagramsDir` only when `docTypes` includes
14
+ * `diagrams`"). Deliberately ONE condition — resist growing this into a recursive schema
15
+ * renderer (that is the descriptor-forms initiative's separate line item).
16
+ */
17
+ export declare const initiativePresetShowWhenSchema: v.ObjectSchema<{
18
+ /** The `key` of the field whose value gates this one's visibility. */
19
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
20
+ /**
21
+ * Show when the referenced scalar value equals this. A union so `equals` can gate a
22
+ * `checkbox` (boolean) or `number` field, not only a `select`/`text` string — the
23
+ * comparison is strict, so the type must match the referenced field's value.
24
+ */
25
+ readonly equals: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
26
+ /** Show when the referenced `checkbox-group` value includes this. */
27
+ readonly includes: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
28
+ }, undefined>;
29
+ export type InitiativePresetShowWhen = v.InferOutput<typeof initiativePresetShowWhenSchema>;
30
+ /** One value a preset needs, rendered as a single form field. */
31
+ export declare const initiativePresetFieldSchema: v.ObjectSchema<{
32
+ /** Stable key the value is stored/sent under (e.g. `docTypes`, `docsRoot`). */
33
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
34
+ /** Human label for the form field (backend-supplied English). */
35
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
36
+ /** Optional helper text shown under the field. */
37
+ readonly help: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
38
+ /** Optional input placeholder. */
39
+ readonly placeholder: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
40
+ /** Whether the value is required (absent ⇒ optional). A hidden (`showWhen`) field is never required. */
41
+ readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
42
+ /** Field type; absent is treated as `text`. */
43
+ readonly type: v.OptionalSchema<v.PicklistSchema<["text", "password", "select", "number", "checkbox", "textarea", "checkbox-group", "path"], undefined>, undefined>;
44
+ /** Choices for a `select` / `checkbox-group` field. */
45
+ readonly options: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
46
+ readonly value: v.StringSchema<undefined>;
47
+ readonly label: v.StringSchema<undefined>;
48
+ }, undefined>, undefined>, undefined>;
49
+ /** The scalar default (`text`/`select`/`path`/`number`/`checkbox`); the form falls back to it when blank. */
50
+ readonly default: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
51
+ /** The multi-select default for a `checkbox-group` field. */
52
+ readonly defaultValues: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
53
+ /** Single-condition visibility; absent ⇒ always shown. */
54
+ readonly showWhen: v.OptionalSchema<v.ObjectSchema<{
55
+ /** The `key` of the field whose value gates this one's visibility. */
56
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
57
+ /**
58
+ * Show when the referenced scalar value equals this. A union so `equals` can gate a
59
+ * `checkbox` (boolean) or `number` field, not only a `select`/`text` string — the
60
+ * comparison is strict, so the type must match the referenced field's value.
61
+ */
62
+ readonly equals: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
63
+ /** Show when the referenced `checkbox-group` value includes this. */
64
+ readonly includes: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
65
+ }, undefined>, undefined>;
66
+ }, undefined>;
67
+ export type InitiativePresetField = v.InferOutput<typeof initiativePresetFieldSchema>;
68
+ /** Display metadata for a preset in the create-initiative picker. */
69
+ export declare const initiativePresetPresentationSchema: v.ObjectSchema<{
70
+ /** Human label, e.g. `Documentation refresh`. */
71
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
72
+ /** Icon id (e.g. an `i-lucide-*` name). */
73
+ readonly icon: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
74
+ /** Accent colour (CSS hex/keyword). */
75
+ readonly color: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 40, undefined>]>;
76
+ /** One-line description shown in the picker. */
77
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>;
78
+ }, undefined>;
79
+ export type InitiativePresetPresentation = v.InferOutput<typeof initiativePresetPresentationSchema>;
80
+ /**
81
+ * The serialisable, SPA-facing description of a preset: everything the create-initiative
82
+ * modal needs to render the picker + form and start planning, attached to the workspace
83
+ * snapshot (the `customAgentKinds` precedent). The code hooks (`detect`/`seedPlan`/
84
+ * `promptAdditions`) live on the kernel registration, NOT here.
85
+ */
86
+ export declare const initiativePresetDescriptorSchema: v.ObjectSchema<{
87
+ /** Stable preset id (e.g. `preset_generic`, `preset_docs_refresh`). */
88
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
89
+ readonly presentation: v.ObjectSchema<{
90
+ /** Human label, e.g. `Documentation refresh`. */
91
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
92
+ /** Icon id (e.g. an `i-lucide-*` name). */
93
+ readonly icon: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
94
+ /** Accent colour (CSS hex/keyword). */
95
+ readonly color: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 40, undefined>]>;
96
+ /** One-line description shown in the picker. */
97
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>;
98
+ }, undefined>;
99
+ /** The form fields the user fills at create time (empty for the generic preset). */
100
+ readonly fields: v.ArraySchema<v.ObjectSchema<{
101
+ /** Stable key the value is stored/sent under (e.g. `docTypes`, `docsRoot`). */
102
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
103
+ /** Human label for the form field (backend-supplied English). */
104
+ readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
105
+ /** Optional helper text shown under the field. */
106
+ readonly help: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
107
+ /** Optional input placeholder. */
108
+ readonly placeholder: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
109
+ /** Whether the value is required (absent ⇒ optional). A hidden (`showWhen`) field is never required. */
110
+ readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
111
+ /** Field type; absent is treated as `text`. */
112
+ readonly type: v.OptionalSchema<v.PicklistSchema<["text", "password", "select", "number", "checkbox", "textarea", "checkbox-group", "path"], undefined>, undefined>;
113
+ /** Choices for a `select` / `checkbox-group` field. */
114
+ readonly options: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
115
+ readonly value: v.StringSchema<undefined>;
116
+ readonly label: v.StringSchema<undefined>;
117
+ }, undefined>, undefined>, undefined>;
118
+ /** The scalar default (`text`/`select`/`path`/`number`/`checkbox`); the form falls back to it when blank. */
119
+ readonly default: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
120
+ /** The multi-select default for a `checkbox-group` field. */
121
+ readonly defaultValues: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
122
+ /** Single-condition visibility; absent ⇒ always shown. */
123
+ readonly showWhen: v.OptionalSchema<v.ObjectSchema<{
124
+ /** The `key` of the field whose value gates this one's visibility. */
125
+ readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
126
+ /**
127
+ * Show when the referenced scalar value equals this. A union so `equals` can gate a
128
+ * `checkbox` (boolean) or `number` field, not only a `select`/`text` string — the
129
+ * comparison is strict, so the type must match the referenced field's value.
130
+ */
131
+ readonly equals: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
132
+ /** Show when the referenced `checkbox-group` value includes this. */
133
+ readonly includes: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
134
+ }, undefined>, undefined>;
135
+ }, undefined>, undefined>;
136
+ /** The planning pipeline the SPA starts (e.g. `pl_initiative`, `pl_initiative_docs`). */
137
+ readonly planningPipelineId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
138
+ /** `full` runs the interviewer; `skip` treats the form AS the interview (seeded qa). */
139
+ readonly interview: v.PicklistSchema<["full", "skip"], undefined>;
140
+ /** Default for the human-review opt-in (mapped to the gate-override seam at start). */
141
+ readonly humanReviewDefault: v.BooleanSchema<undefined>;
142
+ /** Best-practice prompt fragments applied by default (configurable via a form field). */
143
+ readonly defaultFragmentIds: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
144
+ /** Partial execution-policy overrides folded in at plan ingest. */
145
+ readonly policyDefaults: v.OptionalSchema<Omit<v.ObjectSchema<{
146
+ readonly maxConcurrent: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 20, undefined>]>;
147
+ readonly rules: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
148
+ readonly pipelineId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
149
+ readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
150
+ readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
151
+ readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
152
+ }, undefined>, undefined>, readonly []>;
153
+ readonly defaultPipelineId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
154
+ readonly onMissingEstimate: v.OptionalSchema<v.PicklistSchema<["default", "strongest"], undefined>, "default">;
155
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
156
+ readonly entries: {
157
+ readonly maxConcurrent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 20, undefined>]>, undefined>;
158
+ readonly rules: v.OptionalSchema<v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
159
+ readonly pipelineId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
160
+ readonly minComplexity: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
161
+ readonly minRisk: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
162
+ readonly minImpact: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>, undefined>;
163
+ }, undefined>, undefined>, readonly []>, undefined>;
164
+ readonly defaultPipelineId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
165
+ readonly onMissingEstimate: v.OptionalSchema<v.OptionalSchema<v.PicklistSchema<["default", "strongest"], undefined>, "default">, undefined>;
166
+ };
167
+ readonly "~standard": v.StandardProps<{
168
+ maxConcurrent?: number | undefined;
169
+ rules?: {
170
+ pipelineId: string;
171
+ minComplexity?: number | undefined;
172
+ minRisk?: number | undefined;
173
+ minImpact?: number | undefined;
174
+ }[] | undefined;
175
+ defaultPipelineId?: string | undefined;
176
+ onMissingEstimate?: "default" | "strongest" | undefined;
177
+ }, {
178
+ maxConcurrent?: number | undefined;
179
+ rules?: {
180
+ pipelineId: string;
181
+ minComplexity?: number | undefined;
182
+ minRisk?: number | undefined;
183
+ minImpact?: number | undefined;
184
+ }[] | undefined;
185
+ defaultPipelineId?: string | undefined;
186
+ onMissingEstimate?: "default" | "strongest" | undefined;
187
+ }>;
188
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
189
+ maxConcurrent?: number | undefined;
190
+ rules?: {
191
+ pipelineId: string;
192
+ minComplexity?: number | undefined;
193
+ minRisk?: number | undefined;
194
+ minImpact?: number | undefined;
195
+ }[] | undefined;
196
+ defaultPipelineId?: string | undefined;
197
+ onMissingEstimate?: "default" | "strongest" | undefined;
198
+ }, v.ArrayIssue | v.IntegerIssue<number> | v.MaxLengthIssue<string, 80> | v.MaxValueIssue<number, 1> | v.MaxValueIssue<number, 20> | v.MinLengthIssue<string, 1> | v.MinValueIssue<number, 0> | v.MinValueIssue<number, 1> | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue>;
199
+ readonly "~types"?: {
200
+ readonly input: {
201
+ maxConcurrent?: number | undefined;
202
+ rules?: {
203
+ pipelineId: string;
204
+ minComplexity?: number | undefined;
205
+ minRisk?: number | undefined;
206
+ minImpact?: number | undefined;
207
+ }[] | undefined;
208
+ defaultPipelineId?: string | undefined;
209
+ onMissingEstimate?: "default" | "strongest" | undefined;
210
+ };
211
+ readonly output: {
212
+ maxConcurrent?: number | undefined;
213
+ rules?: {
214
+ pipelineId: string;
215
+ minComplexity?: number | undefined;
216
+ minRisk?: number | undefined;
217
+ minImpact?: number | undefined;
218
+ }[] | undefined;
219
+ defaultPipelineId?: string | undefined;
220
+ onMissingEstimate?: "default" | "strongest" | undefined;
221
+ };
222
+ readonly issue: v.ArrayIssue | v.IntegerIssue<number> | v.MaxLengthIssue<string, 80> | v.MaxValueIssue<number, 1> | v.MaxValueIssue<number, 20> | v.MinLengthIssue<string, 1> | v.MinValueIssue<number, 0> | v.MinValueIssue<number, 1> | v.NumberIssue | v.ObjectIssue | v.PicklistIssue | v.StringIssue;
223
+ } | undefined;
224
+ }, undefined>;
225
+ /**
226
+ * Whether this preset supports a repo-detection PREFILL probe (a `detect` hook is wired on
227
+ * the registration). Computed server-side when the snapshot is built (the `supportsTest`
228
+ * convention) so the SPA knows to call `POST …/initiative-presets/:id/probe`. Never blocks
229
+ * create — an unwired probe / GitHub simply falls back to the descriptor defaults.
230
+ */
231
+ readonly probe: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
232
+ }, undefined>;
233
+ export type InitiativePresetDescriptor = v.InferOutput<typeof initiativePresetDescriptorSchema>;
234
+ /** Strictly parse a preset descriptor. Throws on shape violations. */
235
+ export declare function parseInitiativePresetDescriptor(value: unknown): InitiativePresetDescriptor;
236
+ /**
237
+ * Whether `path` is a SAFE repo-relative DIRECTORY (the `path`-field analogue of
238
+ * {@link isSafeDocPath}, minus the `.md` requirement). A preset `path` value is used verbatim
239
+ * as an in-repo placement dir the writers commit under, so it must not escape the repo: no `..`
240
+ * traversal, no absolute path (`/…` or a Windows drive), no backslash / NUL. An empty string is
241
+ * NOT a valid path (callers treat "unset" separately). A trailing slash is tolerated.
242
+ */
243
+ export declare function isSafeRepoDirPath(path: string): boolean;
244
+ /** Whether a field is visible given the current input values (its `showWhen` condition). */
245
+ export declare function isPresetFieldVisible(field: InitiativePresetField, inputs: InitiativePresetInputs): boolean;
246
+ /**
247
+ * Validate a filled preset form against its descriptor, returning a list of human-readable
248
+ * problems (EMPTY ⇒ valid). Pure + total (never throws), so the create controller can map a
249
+ * non-empty result to a single ValidationError. Enforces: no unknown keys, correct value type
250
+ * per field, required VISIBLE fields present (a required `checkbox` must be CHECKED — an
251
+ * unchecked `false` counts as unset), `select`/`checkbox-group` values drawn from the declared
252
+ * options, and `path` values that stay inside the repo ({@link isSafeRepoDirPath}). Hidden
253
+ * fields (failing `showWhen`) are not required and their stale values are ignored.
254
+ */
255
+ export declare function validateInitiativePresetInputs(descriptor: InitiativePresetDescriptor, inputs: InitiativePresetInputs): string[];
256
+ /** Strictly parse a bounded preset-inputs record. Throws on shape violations. */
257
+ export declare function parseInitiativePresetInputs(value: unknown): InitiativePresetInputs;
258
+ //# sourceMappingURL=initiative-preset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initiative-preset.d.ts","sourceRoot":"","sources":["../src/initiative-preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAGL,KAAK,sBAAsB,EAE5B,MAAM,iBAAiB,CAAA;AAuBxB;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,yHAS1C,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;GAMG;AACH,e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