@cat-factory/contracts 0.229.0 → 0.231.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/entities.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/execution.d.ts +9 -2
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +11 -2
- package/dist/execution.js.map +1 -1
- package/dist/form-fields.d.ts +203 -0
- package/dist/form-fields.d.ts.map +1 -0
- package/dist/form-fields.js +315 -0
- package/dist/form-fields.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/initiative-preset.d.ts +34 -93
- package/dist/initiative-preset.d.ts.map +1 -1
- package/dist/initiative-preset.js +30 -182
- package/dist/initiative-preset.js.map +1 -1
- package/dist/initiative.d.ts +14 -9
- package/dist/initiative.d.ts.map +1 -1
- package/dist/initiative.js +15 -15
- package/dist/initiative.js.map +1 -1
- package/dist/input-gate.js +1 -1
- package/dist/input-gate.js.map +1 -1
- package/dist/merge.d.ts +374 -344
- package/dist/merge.d.ts.map +1 -1
- package/dist/merge.js +50 -4
- package/dist/merge.js.map +1 -1
- package/dist/primitives.d.ts +10 -5
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +11 -5
- package/dist/primitives.js.map +1 -1
- package/dist/public-decisions.d.ts +2 -2
- package/dist/public-decisions.js +3 -3
- package/dist/public-decisions.js.map +1 -1
- package/dist/requests.d.ts +1 -1
- package/dist/routes/board.d.ts +14 -14
- package/dist/routes/bug-hunt.d.ts +2 -2
- package/dist/routes/execution.d.ts +2 -2
- package/dist/routes/initiative.d.ts +17 -17
- package/dist/routes/input-gate.js +2 -2
- package/dist/routes/input-gate.js.map +1 -1
- package/dist/routes/merge.d.ts +504 -504
- package/dist/routes/public-decisions.d.ts +1 -1
- package/dist/routes/public-decisions.js +2 -2
- package/dist/routes/public-decisions.js.map +1 -1
- package/dist/routes/tasks.d.ts +3 -3
- package/dist/routes/workspaces.d.ts +210 -194
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/snapshot.d.ts +105 -97
- package/dist/snapshot.d.ts.map +1 -1
- package/dist/task-types.d.ts +42 -28
- package/dist/task-types.d.ts.map +1 -1
- package/dist/task-types.js +30 -25
- package/dist/task-types.js.map +1 -1
- package/dist/workspace-settings.d.ts +1 -1
- package/dist/workspace-settings.js +1 -1
- package/package.json +1 -1
package/dist/task-types.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
import { descriptorFieldEntries, descriptorFieldOptionSchema, } from './form-fields.js';
|
|
2
3
|
import { namespacedIdSchema } from './primitives.js';
|
|
3
4
|
// ---------------------------------------------------------------------------
|
|
4
5
|
// The wire projection of a CUSTOM (deployment-registered) task type — the frontend analogue
|
|
@@ -32,34 +33,38 @@ export const taskTypePresentationSchema = v.object({
|
|
|
32
33
|
*/
|
|
33
34
|
category: v.optional(v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(60))),
|
|
34
35
|
});
|
|
35
|
-
/** One choice of a `select` {@link
|
|
36
|
-
export const taskTypeFieldOptionSchema =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
/** One choice of a `select` / `checkbox-group` field (the shared {@link descriptorFieldOptionSchema}). */
|
|
37
|
+
export const taskTypeFieldOptionSchema = descriptorFieldOptionSchema;
|
|
38
|
+
/**
|
|
39
|
+
* Which of the shared descriptor-form input types a task-type field may declare.
|
|
40
|
+
*
|
|
41
|
+
* Everything the initiative-preset form admits EXCEPT `password`, excluded by construction rather
|
|
42
|
+
* than by convention: a collected task field value is folded into agent prompts, projected onto the
|
|
43
|
+
* board snapshot, and captured in agent-context telemetry, so it is the wrong home for a secret. A
|
|
44
|
+
* capability an operation's agents need credentials for declares them by NAME against the
|
|
45
|
+
* per-workspace capability-credential store, where the value never reaches a prompt.
|
|
46
|
+
*/
|
|
47
|
+
export const taskTypeFieldTypeSchema = v.picklist([
|
|
48
|
+
'text',
|
|
49
|
+
'textarea',
|
|
50
|
+
'number',
|
|
51
|
+
'select',
|
|
52
|
+
'checkbox',
|
|
53
|
+
'checkbox-group',
|
|
54
|
+
'path',
|
|
55
|
+
]);
|
|
40
56
|
/**
|
|
41
|
-
* One data-driven field on a custom task type's create-form
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
57
|
+
* One data-driven field on a custom task type's create-form: the SHARED descriptor-form vocabulary
|
|
58
|
+
* (`form-fields.ts`, which the initiative-preset form fills too), narrowed to the types above. Its
|
|
59
|
+
* value lands in the sparse `taskTypeFields.custom` bag keyed by `key`, so adding a field never
|
|
60
|
+
* needs a schema migration, and the shared `validateDescriptorFields` /
|
|
61
|
+
* `sanitizeDescriptorFields` / `renderDescriptorFieldValue` rules apply verbatim: one renderer, one
|
|
62
|
+
* validator, one prose projection across both surfaces.
|
|
45
63
|
*/
|
|
46
64
|
export const taskTypeFieldDescriptorSchema = v.object({
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
label: v.pipe(v.string(), v.minLength(1), v.maxLength(120)),
|
|
51
|
-
/** The control type: free text, multi-line text, a number, or one of {@link options}. */
|
|
52
|
-
type: v.picklist(['text', 'textarea', 'number', 'select']),
|
|
53
|
-
/** One-line helper text shown under the field. */
|
|
54
|
-
help: v.optional(v.pipe(v.string(), v.maxLength(300))),
|
|
55
|
-
/** Placeholder shown in an empty `text`/`textarea`/`number` input. */
|
|
56
|
-
placeholder: v.optional(v.pipe(v.string(), v.maxLength(200))),
|
|
57
|
-
/** The choices for a `select` descriptor; absent (and ignored) for the other types. */
|
|
58
|
-
options: v.optional(v.array(taskTypeFieldOptionSchema)),
|
|
59
|
-
/** Whether the field must be filled before the task can be created. */
|
|
60
|
-
required: v.optional(v.boolean()),
|
|
61
|
-
/** Max length for a `text`/`textarea` value (characters). */
|
|
62
|
-
maxLength: v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(10000))),
|
|
65
|
+
...descriptorFieldEntries,
|
|
66
|
+
/** The control type; absent is treated as `text`. */
|
|
67
|
+
type: v.optional(taskTypeFieldTypeSchema),
|
|
63
68
|
});
|
|
64
69
|
/**
|
|
65
70
|
* A registered custom task type's wire projection — the snapshot entry the SPA merges into its
|
package/dist/task-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-types.js","sourceRoot":"","sources":["../src/task-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD,8EAA8E;AAC9E,4FAA4F;AAC5F,8FAA8F;AAC9F,6FAA6F;AAC7F,8FAA8F;AAC9F,mFAAmF;AACnF,2FAA2F;AAC3F,iDAAiD;AACjD,EAAE;AACF,8FAA8F;AAC9F,6FAA6F;AAC7F,wFAAwF;AACxF,0EAA0E;AAC1E,8EAA8E;AAE9E,wGAAwG;AACxG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,oCAAoC;IACpC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACpE,2CAA2C;IAC3C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1D,uCAAuC;IACvC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,C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AAC;CAC1C,CAAC,CAAA;AAGF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,yEAAyE;IACzE,QAAQ,EAAE,kBAAkB;IAC5B,6CAA6C;IAC7C,YAAY,EAAE,0BAA0B;IACxC,kFAAkF;IAClF,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAC1D;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACzC;;;;;;;;;;;OAWG;IACH,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7F;;;;OAIG;IACH,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;CAC1C,CAAC,CAAA"}
|
|
@@ -105,7 +105,7 @@ export declare const workspaceSettingsSchema: v.ObjectSchema<{
|
|
|
105
105
|
*/
|
|
106
106
|
readonly delegateAgentsToRunnerPool: v.BooleanSchema<undefined>;
|
|
107
107
|
/**
|
|
108
|
-
* Whether/how the PRE-
|
|
108
|
+
* Whether/how the PRE-DISPATCH INPUT GATE applies to this workspace's runs: the deterministic
|
|
109
109
|
* structural check of a task's authored input, run before the first agent step is dispatched
|
|
110
110
|
* so a task nobody could act on parks having spent nothing.
|
|
111
111
|
*
|
|
@@ -164,7 +164,7 @@ export const workspaceSettingsSchema = v.object({
|
|
|
164
164
|
*/
|
|
165
165
|
delegateAgentsToRunnerPool: v.boolean(),
|
|
166
166
|
/**
|
|
167
|
-
* Whether/how the PRE-
|
|
167
|
+
* Whether/how the PRE-DISPATCH INPUT GATE applies to this workspace's runs: the deterministic
|
|
168
168
|
* structural check of a task's authored input, run before the first agent step is dispatched
|
|
169
169
|
* so a task nobody could act on parks having spent nothing.
|
|
170
170
|
*
|