@cat-factory/contracts 0.323.1 → 0.324.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/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/inline-use-cases.d.ts +367 -0
- package/dist/inline-use-cases.d.ts.map +1 -0
- package/dist/inline-use-cases.js +225 -0
- package/dist/inline-use-cases.js.map +1 -0
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/use-cases.d.ts +265 -0
- package/dist/routes/use-cases.d.ts.map +1 -0
- package/dist/routes/use-cases.js +80 -0
- package/dist/routes/use-cases.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export * from './agent-config.js';
|
|
|
99
99
|
export * from './result-views.js';
|
|
100
100
|
export * from './agent-presentation.js';
|
|
101
101
|
export * from './form-fields.js';
|
|
102
|
+
export * from './inline-use-cases.js';
|
|
102
103
|
export * from './task-types.js';
|
|
103
104
|
export * from './public-task-types.js';
|
|
104
105
|
export * from './testing.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,i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CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -99,6 +99,7 @@ export * from './agent-config.js';
|
|
|
99
99
|
export * from './result-views.js';
|
|
100
100
|
export * from './agent-presentation.js';
|
|
101
101
|
export * from './form-fields.js';
|
|
102
|
+
export * from './inline-use-cases.js';
|
|
102
103
|
export * from './task-types.js';
|
|
103
104
|
export * from './public-task-types.js';
|
|
104
105
|
export * from './testing.js';
|
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,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B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AChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Which of the shared descriptor-form input types a use-case parameter may declare.
|
|
4
|
+
*
|
|
5
|
+
* Two members of the shared vocabulary are excluded by construction rather than by convention:
|
|
6
|
+
*
|
|
7
|
+
* - `password`, for the reason a task-type field excludes it: a collected value is folded into
|
|
8
|
+
* the model prompt and captured in call telemetry, so it is the wrong home for a secret. A
|
|
9
|
+
* use case whose model needs a credential declares it by NAME against the capability-credential
|
|
10
|
+
* store, where the value never reaches a prompt.
|
|
11
|
+
* - `path`, because it means a repo-relative directory and is validated as one. Non-container
|
|
12
|
+
* work has no checkout, so the field would collect a path against a repository that does not
|
|
13
|
+
* exist for this call: a control whose only possible answers are wrong.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useCaseParameterTypeSchema: v.PicklistSchema<["text", "textarea", "number", "select", "checkbox", "checkbox-group"], undefined>;
|
|
16
|
+
export type UseCaseParameterType = v.InferOutput<typeof useCaseParameterTypeSchema>;
|
|
17
|
+
/**
|
|
18
|
+
* One accepted parameter of a use case: the SHARED descriptor-form vocabulary narrowed to the
|
|
19
|
+
* types above, so `validateDescriptorFields` / `sanitizeDescriptorFields` /
|
|
20
|
+
* `renderDescriptorFieldValue` apply verbatim and a wrapper that renders a task type's form can
|
|
21
|
+
* render this one with the same component.
|
|
22
|
+
*/
|
|
23
|
+
export declare const useCaseParameterSchema: v.ObjectSchema<{
|
|
24
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
|
|
25
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
26
|
+
readonly section: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
27
|
+
readonly help: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>, undefined>;
|
|
28
|
+
readonly placeholder: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
29
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
30
|
+
readonly options: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
31
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
32
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
33
|
+
}, undefined>, undefined>, undefined>;
|
|
34
|
+
readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
35
|
+
readonly defaultValues: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, undefined>;
|
|
36
|
+
readonly showWhen: v.OptionalSchema<v.ObjectSchema<{
|
|
37
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
38
|
+
readonly equals: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
39
|
+
readonly includes: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
40
|
+
}, undefined>, undefined>;
|
|
41
|
+
readonly maxLength: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2000, undefined>]>, undefined>;
|
|
42
|
+
readonly min: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
43
|
+
readonly max: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
44
|
+
/** The control type; absent is treated as `text`. */
|
|
45
|
+
readonly type: v.OptionalSchema<v.PicklistSchema<["text", "textarea", "number", "select", "checkbox", "checkbox-group"], undefined>, undefined>;
|
|
46
|
+
}, undefined>;
|
|
47
|
+
export type UseCaseParameter = v.InferOutput<typeof useCaseParameterSchema>;
|
|
48
|
+
/**
|
|
49
|
+
* The bounds on a use case's own captions, as VALUES rather than only as schema internals.
|
|
50
|
+
*
|
|
51
|
+
* Published because two guards must agree on them: the schemas below (what the surface promises,
|
|
52
|
+
* and what the four generated SDKs document as guaranteed) and boot validation (which refuses a
|
|
53
|
+
* registration that would violate them). A response is not re-validated on the way out, so a
|
|
54
|
+
* registration with an empty `label` would otherwise serve a shape this file's own OpenAPI says is
|
|
55
|
+
* impossible, and nothing would fail.
|
|
56
|
+
*/
|
|
57
|
+
export declare const USE_CASE_TEXT_LIMITS: {
|
|
58
|
+
readonly label: 120;
|
|
59
|
+
readonly description: 500;
|
|
60
|
+
readonly category: 60;
|
|
61
|
+
readonly modelId: 120;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Why a model this use case names cannot be served by THIS deployment right now.
|
|
65
|
+
*
|
|
66
|
+
* Two causes, and they lead to different places, which is why they are not one flag:
|
|
67
|
+
*
|
|
68
|
+
* - `provider_unavailable`: nothing resolves the model here, because the catalog id has no route
|
|
69
|
+
* this workspace can take, or no resolver is registered for the ref's provider (no key
|
|
70
|
+
* configured). An operator fixes it by configuring the provider.
|
|
71
|
+
* - `container_only`: the model resolves, but only through a subscription HARNESS that runs
|
|
72
|
+
* inside a per-run container, which a use case has none of. Nothing an operator configures on
|
|
73
|
+
* this deployment changes that; the caller picks another model.
|
|
74
|
+
*/
|
|
75
|
+
export declare const USE_CASE_MODEL_UNAVAILABLE_REASONS: readonly ['provider_unavailable', 'container_only'];
|
|
76
|
+
export type UseCaseModelUnavailableReason = (typeof USE_CASE_MODEL_UNAVAILABLE_REASONS)[number];
|
|
77
|
+
/**
|
|
78
|
+
* One model a use case may run on, as published.
|
|
79
|
+
*
|
|
80
|
+
* `available` is answered per REQUEST rather than baked into the registration, because the answer
|
|
81
|
+
* is a property of the deployment's configured credentials and this workspace's routes, not of the
|
|
82
|
+
* use case. A discovery read that listed a model the invocation would then refuse would send a
|
|
83
|
+
* caller to a choice that cannot work, so an unavailable model is listed WITH its reason rather
|
|
84
|
+
* than hidden: a wrapper can tell "this deployment never offers Magnum" from "nobody has
|
|
85
|
+
* configured the key yet", and those have different owners.
|
|
86
|
+
*/
|
|
87
|
+
export declare const useCaseModelSchema: v.ObjectSchema<{
|
|
88
|
+
/** The id a caller names in an invocation, and the id discovery publishes. */
|
|
89
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
90
|
+
/** Human label for a picker (deployment-supplied English, rendered verbatim). */
|
|
91
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
92
|
+
/** One line on what this model is good for here (deployment-supplied English). */
|
|
93
|
+
readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
94
|
+
/** Whether this is the model an invocation naming none runs on. Exactly one option is. */
|
|
95
|
+
readonly default: v.BooleanSchema<undefined>;
|
|
96
|
+
/** Whether an invocation naming this model could run right now. */
|
|
97
|
+
readonly available: v.BooleanSchema<undefined>;
|
|
98
|
+
/** Present only when `available` is false: which of the two causes it is. */
|
|
99
|
+
readonly unavailableReason: v.OptionalSchema<v.PicklistSchema<readonly ["provider_unavailable", "container_only"], undefined>, undefined>;
|
|
100
|
+
}, undefined>;
|
|
101
|
+
export type UseCaseModel = v.InferOutput<typeof useCaseModelSchema>;
|
|
102
|
+
/** A generation knob a caller may set, with the bounds the registration declares. */
|
|
103
|
+
export declare const useCaseNumericLimitSchema: v.ObjectSchema<{
|
|
104
|
+
/** Applied when the invocation omits the knob. */
|
|
105
|
+
readonly default: v.NumberSchema<undefined>;
|
|
106
|
+
/** The smallest value the invocation may name. */
|
|
107
|
+
readonly min: v.NumberSchema<undefined>;
|
|
108
|
+
/** The largest value the invocation may name. */
|
|
109
|
+
readonly max: v.NumberSchema<undefined>;
|
|
110
|
+
}, undefined>;
|
|
111
|
+
export type UseCaseNumericLimit = v.InferOutput<typeof useCaseNumericLimitSchema>;
|
|
112
|
+
/**
|
|
113
|
+
* What an invocation may steer besides the parameters, and within which bounds.
|
|
114
|
+
*
|
|
115
|
+
* Published because a caller that cannot see the bounds discovers them by being refused. Both
|
|
116
|
+
* knobs are ALWAYS present: a registration that declares neither still has effective values (the
|
|
117
|
+
* platform's own defaults), and publishing them as absent would read as "you may send anything".
|
|
118
|
+
*/
|
|
119
|
+
export declare const useCaseGenerationLimitsSchema: v.ObjectSchema<{
|
|
120
|
+
/** Sampling temperature. Creative work lives on this knob, so a use case usually widens it. */
|
|
121
|
+
readonly temperature: v.ObjectSchema<{
|
|
122
|
+
/** Applied when the invocation omits the knob. */
|
|
123
|
+
readonly default: v.NumberSchema<undefined>;
|
|
124
|
+
/** The smallest value the invocation may name. */
|
|
125
|
+
readonly min: v.NumberSchema<undefined>;
|
|
126
|
+
/** The largest value the invocation may name. */
|
|
127
|
+
readonly max: v.NumberSchema<undefined>;
|
|
128
|
+
}, undefined>;
|
|
129
|
+
/** The reply budget, in tokens. */
|
|
130
|
+
readonly maxOutputTokens: v.ObjectSchema<{
|
|
131
|
+
/** Applied when the invocation omits the knob. */
|
|
132
|
+
readonly default: v.NumberSchema<undefined>;
|
|
133
|
+
/** The smallest value the invocation may name. */
|
|
134
|
+
readonly min: v.NumberSchema<undefined>;
|
|
135
|
+
/** The largest value the invocation may name. */
|
|
136
|
+
readonly max: v.NumberSchema<undefined>;
|
|
137
|
+
}, undefined>;
|
|
138
|
+
}, undefined>;
|
|
139
|
+
export type UseCaseGenerationLimits = v.InferOutput<typeof useCaseGenerationLimitsSchema>;
|
|
140
|
+
/** One registered use case, as `/api/v1/use-cases` publishes it. */
|
|
141
|
+
export declare const publicUseCaseSchema: v.ObjectSchema<{
|
|
142
|
+
/** The namespaced id (`<ns>:<name>`, e.g. `stefka:scene-prose`). */
|
|
143
|
+
readonly useCaseId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>;
|
|
144
|
+
/** Human label for a picker. */
|
|
145
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
146
|
+
/** One line on what this use case produces. */
|
|
147
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
148
|
+
/** Optional grouping caption, so a wrapper offering twenty use cases can group them. */
|
|
149
|
+
readonly category: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 60, undefined>]>, undefined>;
|
|
150
|
+
/** The models this use case may run on, narrowed by the registration. Never empty. */
|
|
151
|
+
readonly models: v.ArraySchema<v.ObjectSchema<{
|
|
152
|
+
/** The id a caller names in an invocation, and the id discovery publishes. */
|
|
153
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
154
|
+
/** Human label for a picker (deployment-supplied English, rendered verbatim). */
|
|
155
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
156
|
+
/** One line on what this model is good for here (deployment-supplied English). */
|
|
157
|
+
readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
158
|
+
/** Whether this is the model an invocation naming none runs on. Exactly one option is. */
|
|
159
|
+
readonly default: v.BooleanSchema<undefined>;
|
|
160
|
+
/** Whether an invocation naming this model could run right now. */
|
|
161
|
+
readonly available: v.BooleanSchema<undefined>;
|
|
162
|
+
/** Present only when `available` is false: which of the two causes it is. */
|
|
163
|
+
readonly unavailableReason: v.OptionalSchema<v.PicklistSchema<readonly ["provider_unavailable", "container_only"], undefined>, undefined>;
|
|
164
|
+
}, undefined>, undefined>;
|
|
165
|
+
/** The accepted parameters (empty ⇒ the use case takes none). */
|
|
166
|
+
readonly parameters: v.ArraySchema<v.ObjectSchema<{
|
|
167
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
|
|
168
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
169
|
+
readonly section: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
170
|
+
readonly help: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>, undefined>;
|
|
171
|
+
readonly placeholder: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
172
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
173
|
+
readonly options: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
174
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
175
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
176
|
+
}, undefined>, undefined>, undefined>;
|
|
177
|
+
readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
178
|
+
readonly defaultValues: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, undefined>;
|
|
179
|
+
readonly showWhen: v.OptionalSchema<v.ObjectSchema<{
|
|
180
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
181
|
+
readonly equals: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
182
|
+
readonly includes: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
183
|
+
}, undefined>, undefined>;
|
|
184
|
+
readonly maxLength: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2000, undefined>]>, undefined>;
|
|
185
|
+
readonly min: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
186
|
+
readonly max: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
187
|
+
/** The control type; absent is treated as `text`. */
|
|
188
|
+
readonly type: v.OptionalSchema<v.PicklistSchema<["text", "textarea", "number", "select", "checkbox", "checkbox-group"], undefined>, undefined>;
|
|
189
|
+
}, undefined>, undefined>;
|
|
190
|
+
/** What an invocation may steer, and within which bounds. */
|
|
191
|
+
readonly generation: v.ObjectSchema<{
|
|
192
|
+
/** Sampling temperature. Creative work lives on this knob, so a use case usually widens it. */
|
|
193
|
+
readonly temperature: v.ObjectSchema<{
|
|
194
|
+
/** Applied when the invocation omits the knob. */
|
|
195
|
+
readonly default: v.NumberSchema<undefined>;
|
|
196
|
+
/** The smallest value the invocation may name. */
|
|
197
|
+
readonly min: v.NumberSchema<undefined>;
|
|
198
|
+
/** The largest value the invocation may name. */
|
|
199
|
+
readonly max: v.NumberSchema<undefined>;
|
|
200
|
+
}, undefined>;
|
|
201
|
+
/** The reply budget, in tokens. */
|
|
202
|
+
readonly maxOutputTokens: v.ObjectSchema<{
|
|
203
|
+
/** Applied when the invocation omits the knob. */
|
|
204
|
+
readonly default: v.NumberSchema<undefined>;
|
|
205
|
+
/** The smallest value the invocation may name. */
|
|
206
|
+
readonly min: v.NumberSchema<undefined>;
|
|
207
|
+
/** The largest value the invocation may name. */
|
|
208
|
+
readonly max: v.NumberSchema<undefined>;
|
|
209
|
+
}, undefined>;
|
|
210
|
+
}, undefined>;
|
|
211
|
+
}, undefined>;
|
|
212
|
+
export type PublicUseCase = v.InferOutput<typeof publicUseCaseSchema>;
|
|
213
|
+
/** The whole catalog this key's workspace may invoke, in registration order. */
|
|
214
|
+
export declare const publicUseCaseListSchema: v.ObjectSchema<{
|
|
215
|
+
readonly useCases: v.ArraySchema<v.ObjectSchema<{
|
|
216
|
+
/** The namespaced id (`<ns>:<name>`, e.g. `stefka:scene-prose`). */
|
|
217
|
+
readonly useCaseId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>;
|
|
218
|
+
/** Human label for a picker. */
|
|
219
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
220
|
+
/** One line on what this use case produces. */
|
|
221
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 500, undefined>]>;
|
|
222
|
+
/** Optional grouping caption, so a wrapper offering twenty use cases can group them. */
|
|
223
|
+
readonly category: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 60, undefined>]>, undefined>;
|
|
224
|
+
/** The models this use case may run on, narrowed by the registration. Never empty. */
|
|
225
|
+
readonly models: v.ArraySchema<v.ObjectSchema<{
|
|
226
|
+
/** The id a caller names in an invocation, and the id discovery publishes. */
|
|
227
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
228
|
+
/** Human label for a picker (deployment-supplied English, rendered verbatim). */
|
|
229
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
230
|
+
/** One line on what this model is good for here (deployment-supplied English). */
|
|
231
|
+
readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
232
|
+
/** Whether this is the model an invocation naming none runs on. Exactly one option is. */
|
|
233
|
+
readonly default: v.BooleanSchema<undefined>;
|
|
234
|
+
/** Whether an invocation naming this model could run right now. */
|
|
235
|
+
readonly available: v.BooleanSchema<undefined>;
|
|
236
|
+
/** Present only when `available` is false: which of the two causes it is. */
|
|
237
|
+
readonly unavailableReason: v.OptionalSchema<v.PicklistSchema<readonly ["provider_unavailable", "container_only"], undefined>, undefined>;
|
|
238
|
+
}, undefined>, undefined>;
|
|
239
|
+
/** The accepted parameters (empty ⇒ the use case takes none). */
|
|
240
|
+
readonly parameters: v.ArraySchema<v.ObjectSchema<{
|
|
241
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>;
|
|
242
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
243
|
+
readonly section: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
244
|
+
readonly help: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 300, undefined>]>, undefined>;
|
|
245
|
+
readonly placeholder: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
246
|
+
readonly required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
247
|
+
readonly options: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
248
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
249
|
+
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
250
|
+
}, undefined>, undefined>, undefined>;
|
|
251
|
+
readonly default: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
252
|
+
readonly defaultValues: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, undefined>;
|
|
253
|
+
readonly showWhen: v.OptionalSchema<v.ObjectSchema<{
|
|
254
|
+
readonly key: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
255
|
+
readonly equals: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
256
|
+
readonly includes: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
257
|
+
}, undefined>, undefined>;
|
|
258
|
+
readonly maxLength: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2000, undefined>]>, undefined>;
|
|
259
|
+
readonly min: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
260
|
+
readonly max: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
261
|
+
/** The control type; absent is treated as `text`. */
|
|
262
|
+
readonly type: v.OptionalSchema<v.PicklistSchema<["text", "textarea", "number", "select", "checkbox", "checkbox-group"], undefined>, undefined>;
|
|
263
|
+
}, undefined>, undefined>;
|
|
264
|
+
/** What an invocation may steer, and within which bounds. */
|
|
265
|
+
readonly generation: v.ObjectSchema<{
|
|
266
|
+
/** Sampling temperature. Creative work lives on this knob, so a use case usually widens it. */
|
|
267
|
+
readonly temperature: v.ObjectSchema<{
|
|
268
|
+
/** Applied when the invocation omits the knob. */
|
|
269
|
+
readonly default: v.NumberSchema<undefined>;
|
|
270
|
+
/** The smallest value the invocation may name. */
|
|
271
|
+
readonly min: v.NumberSchema<undefined>;
|
|
272
|
+
/** The largest value the invocation may name. */
|
|
273
|
+
readonly max: v.NumberSchema<undefined>;
|
|
274
|
+
}, undefined>;
|
|
275
|
+
/** The reply budget, in tokens. */
|
|
276
|
+
readonly maxOutputTokens: v.ObjectSchema<{
|
|
277
|
+
/** Applied when the invocation omits the knob. */
|
|
278
|
+
readonly default: v.NumberSchema<undefined>;
|
|
279
|
+
/** The smallest value the invocation may name. */
|
|
280
|
+
readonly min: v.NumberSchema<undefined>;
|
|
281
|
+
/** The largest value the invocation may name. */
|
|
282
|
+
readonly max: v.NumberSchema<undefined>;
|
|
283
|
+
}, undefined>;
|
|
284
|
+
}, undefined>;
|
|
285
|
+
}, undefined>, undefined>;
|
|
286
|
+
}, undefined>;
|
|
287
|
+
export type PublicUseCaseList = v.InferOutput<typeof publicUseCaseListSchema>;
|
|
288
|
+
/**
|
|
289
|
+
* The invocation body.
|
|
290
|
+
*
|
|
291
|
+
* `parameters` is deliberately a free-form bag validated against the REGISTRATION rather than
|
|
292
|
+
* against a schema minted per use case: the descriptors are deployment data, so the wire schema
|
|
293
|
+
* cannot know them, and the registration's own validator is the one door every caller (this
|
|
294
|
+
* surface, an SDK, the MCP projection) goes through.
|
|
295
|
+
*
|
|
296
|
+
* The bound here is wider than a task-type field's 2,000 characters on purpose: a creative-writing
|
|
297
|
+
* use case is handed the story so far, and truncating that to a form-field bound would silently
|
|
298
|
+
* change what the model was asked about. A registration narrows it per field with `maxLength`.
|
|
299
|
+
*/
|
|
300
|
+
export declare const invokeUseCaseSchema: v.ObjectSchema<{
|
|
301
|
+
/** The model option id to run on; absent ⇒ the use case's default option. */
|
|
302
|
+
readonly model: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
303
|
+
/** The filled parameters, keyed by the descriptor `key`. */
|
|
304
|
+
readonly parameters: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 20000, undefined>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2000, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>;
|
|
305
|
+
/** Sampling temperature, within the published bounds; absent ⇒ the published default. */
|
|
306
|
+
readonly temperature: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
307
|
+
/** Reply budget in tokens, within the published bounds; absent ⇒ the published default. */
|
|
308
|
+
readonly maxOutputTokens: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
309
|
+
}, undefined>;
|
|
310
|
+
export type InvokeUseCase = v.InferOutput<typeof invokeUseCaseSchema>;
|
|
311
|
+
/**
|
|
312
|
+
* Why the model stopped, as a bounded class.
|
|
313
|
+
*
|
|
314
|
+
* `length` is the one that changes what the caller must DO: the text is a prefix of the answer,
|
|
315
|
+
* not the answer, and a consumer that pastes it into a game script would ship a sentence that
|
|
316
|
+
* stops mid-word. It rides `truncated` beside it so the common check is a boolean and the cause
|
|
317
|
+
* is still nameable.
|
|
318
|
+
*/
|
|
319
|
+
export declare const USE_CASE_FINISH_REASONS: readonly ['stop', 'length', 'content-filter', 'other'];
|
|
320
|
+
export type UseCaseFinishReason = (typeof USE_CASE_FINISH_REASONS)[number];
|
|
321
|
+
/**
|
|
322
|
+
* What one invocation cost, as the provider reported it.
|
|
323
|
+
*
|
|
324
|
+
* The three numbers ALWAYS add up, which is a choice: `inputTokens` is the whole billed input
|
|
325
|
+
* (both cache classes included, reconciled across the two shapes vendors report them in), so
|
|
326
|
+
* publishing a provider's own `total` beside it would let a cache-heavy call answer with three
|
|
327
|
+
* figures that disagree, and a wrapper metering its own users off them would under-bill silently.
|
|
328
|
+
*/
|
|
329
|
+
export declare const useCaseUsageSchema: v.ObjectSchema<{
|
|
330
|
+
/** Input tokens the provider billed, both cache classes included. */
|
|
331
|
+
readonly inputTokens: v.NumberSchema<undefined>;
|
|
332
|
+
/** Output tokens the provider billed. */
|
|
333
|
+
readonly outputTokens: v.NumberSchema<undefined>;
|
|
334
|
+
/** The sum of the two above. */
|
|
335
|
+
readonly totalTokens: v.NumberSchema<undefined>;
|
|
336
|
+
}, undefined>;
|
|
337
|
+
export type UseCaseUsage = v.InferOutput<typeof useCaseUsageSchema>;
|
|
338
|
+
/** The result of one invocation. */
|
|
339
|
+
export declare const useCaseInvocationSchema: v.ObjectSchema<{
|
|
340
|
+
/** The use case that produced it. */
|
|
341
|
+
readonly useCaseId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>;
|
|
342
|
+
/** The model option it actually ran on (never a substitute the caller did not name). */
|
|
343
|
+
readonly model: v.ObjectSchema<{
|
|
344
|
+
readonly id: v.StringSchema<undefined>;
|
|
345
|
+
readonly label: v.StringSchema<undefined>;
|
|
346
|
+
/** The resolved provider id and model id, so a caller can attribute the text it stores. */
|
|
347
|
+
readonly provider: v.StringSchema<undefined>;
|
|
348
|
+
readonly model: v.StringSchema<undefined>;
|
|
349
|
+
}, undefined>;
|
|
350
|
+
/** The generated text. */
|
|
351
|
+
readonly text: v.StringSchema<undefined>;
|
|
352
|
+
/** Why the model stopped. */
|
|
353
|
+
readonly finishReason: v.PicklistSchema<readonly ["stop", "length", "content-filter", "other"], undefined>;
|
|
354
|
+
/** Whether the reply hit the output budget, so `text` is a prefix rather than an answer. */
|
|
355
|
+
readonly truncated: v.BooleanSchema<undefined>;
|
|
356
|
+
/** What the call cost. */
|
|
357
|
+
readonly usage: v.ObjectSchema<{
|
|
358
|
+
/** Input tokens the provider billed, both cache classes included. */
|
|
359
|
+
readonly inputTokens: v.NumberSchema<undefined>;
|
|
360
|
+
/** Output tokens the provider billed. */
|
|
361
|
+
readonly outputTokens: v.NumberSchema<undefined>;
|
|
362
|
+
/** The sum of the two above. */
|
|
363
|
+
readonly totalTokens: v.NumberSchema<undefined>;
|
|
364
|
+
}, undefined>;
|
|
365
|
+
}, undefined>;
|
|
366
|
+
export type UseCaseInvocation = v.InferOutput<typeof useCaseInvocationSchema>;
|
|
367
|
+
//# sourceMappingURL=inline-use-cases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-use-cases.d.ts","sourceRoot":"","sources":["../src/inline-use-cases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAqB5B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,qGAOrC,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;IAEjC,qDAAqD;;aAErD,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;aAC/B,KAAK,EAAE,GAAG;aACV,WAAW,EAAE,GAAG;aAChB,QAAQ,EAAE,EAAE;aACZ,OAAO,EAAE,GAAG;CACJ,CAAA;AAEV;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC,YAC7C,sBAAsB,EACtB,gBAAgB,CACR,CAAA;AACV,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,kCAAkC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C,wFAAwF;;;;QAItF,2FAA2F;;;;IAI7F,0BAA0B;;IAE1B,6BAA6B;;IAE7B,4FAA4F;;IAE5F,0BAA0B;;QA3B1B,qEAAqE;;QAErE,yCAAyC;;QAEzC,gCAAgC;;;aAyBhC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { descriptorFieldEntries } from './form-fields.js';
|
|
3
|
+
import { namespacedIdSchema } from './primitives.js';
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// The wire projection of an INLINE USE CASE: a named, non-container unit of model work a
|
|
6
|
+
// DEPLOYMENT registers in code and `/api/v1/use-cases` publishes, so an external editor
|
|
7
|
+
// (a game content tool, a writing surface, any wrapper over this API) can discover what
|
|
8
|
+
// this deployment will generate for it, on which models, from which parameters.
|
|
9
|
+
//
|
|
10
|
+
// It is the non-container sibling of a reusable OPERATION (`task-types.ts`): an operation
|
|
11
|
+
// bundles a form with a pipeline that runs agents on a checkout, while a use case bundles a
|
|
12
|
+
// form with ONE inline model call and no repository, no run and no board row. The two share
|
|
13
|
+
// the descriptor-form vocabulary (`form-fields.ts`) on purpose, so a deployment authoring both
|
|
14
|
+
// writes one kind of form and the platform runs one validator over them.
|
|
15
|
+
//
|
|
16
|
+
// Everything here is DATA about a registration. The registration's own prompt composition is
|
|
17
|
+
// code (kernel's `InlineUseCaseDefinition`), and is deliberately not published: what a caller
|
|
18
|
+
// needs to call the surface is the parameter list, the model choice and the generation bounds.
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
/**
|
|
21
|
+
* Which of the shared descriptor-form input types a use-case parameter may declare.
|
|
22
|
+
*
|
|
23
|
+
* Two members of the shared vocabulary are excluded by construction rather than by convention:
|
|
24
|
+
*
|
|
25
|
+
* - `password`, for the reason a task-type field excludes it: a collected value is folded into
|
|
26
|
+
* the model prompt and captured in call telemetry, so it is the wrong home for a secret. A
|
|
27
|
+
* use case whose model needs a credential declares it by NAME against the capability-credential
|
|
28
|
+
* store, where the value never reaches a prompt.
|
|
29
|
+
* - `path`, because it means a repo-relative directory and is validated as one. Non-container
|
|
30
|
+
* work has no checkout, so the field would collect a path against a repository that does not
|
|
31
|
+
* exist for this call: a control whose only possible answers are wrong.
|
|
32
|
+
*/
|
|
33
|
+
export const useCaseParameterTypeSchema = v.picklist([
|
|
34
|
+
'text',
|
|
35
|
+
'textarea',
|
|
36
|
+
'number',
|
|
37
|
+
'select',
|
|
38
|
+
'checkbox',
|
|
39
|
+
'checkbox-group',
|
|
40
|
+
]);
|
|
41
|
+
/**
|
|
42
|
+
* One accepted parameter of a use case: the SHARED descriptor-form vocabulary narrowed to the
|
|
43
|
+
* types above, so `validateDescriptorFields` / `sanitizeDescriptorFields` /
|
|
44
|
+
* `renderDescriptorFieldValue` apply verbatim and a wrapper that renders a task type's form can
|
|
45
|
+
* render this one with the same component.
|
|
46
|
+
*/
|
|
47
|
+
export const useCaseParameterSchema = v.object({
|
|
48
|
+
...descriptorFieldEntries,
|
|
49
|
+
/** The control type; absent is treated as `text`. */
|
|
50
|
+
type: v.optional(useCaseParameterTypeSchema),
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* The bounds on a use case's own captions, as VALUES rather than only as schema internals.
|
|
54
|
+
*
|
|
55
|
+
* Published because two guards must agree on them: the schemas below (what the surface promises,
|
|
56
|
+
* and what the four generated SDKs document as guaranteed) and boot validation (which refuses a
|
|
57
|
+
* registration that would violate them). A response is not re-validated on the way out, so a
|
|
58
|
+
* registration with an empty `label` would otherwise serve a shape this file's own OpenAPI says is
|
|
59
|
+
* impossible, and nothing would fail.
|
|
60
|
+
*/
|
|
61
|
+
export const USE_CASE_TEXT_LIMITS = {
|
|
62
|
+
label: 120,
|
|
63
|
+
description: 500,
|
|
64
|
+
category: 60,
|
|
65
|
+
modelId: 120,
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Why a model this use case names cannot be served by THIS deployment right now.
|
|
69
|
+
*
|
|
70
|
+
* Two causes, and they lead to different places, which is why they are not one flag:
|
|
71
|
+
*
|
|
72
|
+
* - `provider_unavailable`: nothing resolves the model here, because the catalog id has no route
|
|
73
|
+
* this workspace can take, or no resolver is registered for the ref's provider (no key
|
|
74
|
+
* configured). An operator fixes it by configuring the provider.
|
|
75
|
+
* - `container_only`: the model resolves, but only through a subscription HARNESS that runs
|
|
76
|
+
* inside a per-run container, which a use case has none of. Nothing an operator configures on
|
|
77
|
+
* this deployment changes that; the caller picks another model.
|
|
78
|
+
*/
|
|
79
|
+
export const USE_CASE_MODEL_UNAVAILABLE_REASONS = [
|
|
80
|
+
'provider_unavailable',
|
|
81
|
+
'container_only',
|
|
82
|
+
];
|
|
83
|
+
/**
|
|
84
|
+
* One model a use case may run on, as published.
|
|
85
|
+
*
|
|
86
|
+
* `available` is answered per REQUEST rather than baked into the registration, because the answer
|
|
87
|
+
* is a property of the deployment's configured credentials and this workspace's routes, not of the
|
|
88
|
+
* use case. A discovery read that listed a model the invocation would then refuse would send a
|
|
89
|
+
* caller to a choice that cannot work, so an unavailable model is listed WITH its reason rather
|
|
90
|
+
* than hidden: a wrapper can tell "this deployment never offers Magnum" from "nobody has
|
|
91
|
+
* configured the key yet", and those have different owners.
|
|
92
|
+
*/
|
|
93
|
+
export const useCaseModelSchema = v.object({
|
|
94
|
+
/** The id a caller names in an invocation, and the id discovery publishes. */
|
|
95
|
+
id: v.pipe(v.string(), v.minLength(1), v.maxLength(USE_CASE_TEXT_LIMITS.modelId)),
|
|
96
|
+
/** Human label for a picker (deployment-supplied English, rendered verbatim). */
|
|
97
|
+
label: v.pipe(v.string(), v.minLength(1), v.maxLength(USE_CASE_TEXT_LIMITS.label)),
|
|
98
|
+
/** One line on what this model is good for here (deployment-supplied English). */
|
|
99
|
+
description: v.optional(v.pipe(v.string(), v.maxLength(USE_CASE_TEXT_LIMITS.description))),
|
|
100
|
+
/** Whether this is the model an invocation naming none runs on. Exactly one option is. */
|
|
101
|
+
default: v.boolean(),
|
|
102
|
+
/** Whether an invocation naming this model could run right now. */
|
|
103
|
+
available: v.boolean(),
|
|
104
|
+
/** Present only when `available` is false: which of the two causes it is. */
|
|
105
|
+
unavailableReason: v.optional(v.picklist(USE_CASE_MODEL_UNAVAILABLE_REASONS)),
|
|
106
|
+
});
|
|
107
|
+
/** A generation knob a caller may set, with the bounds the registration declares. */
|
|
108
|
+
export const useCaseNumericLimitSchema = v.object({
|
|
109
|
+
/** Applied when the invocation omits the knob. */
|
|
110
|
+
default: v.number(),
|
|
111
|
+
/** The smallest value the invocation may name. */
|
|
112
|
+
min: v.number(),
|
|
113
|
+
/** The largest value the invocation may name. */
|
|
114
|
+
max: v.number(),
|
|
115
|
+
});
|
|
116
|
+
/**
|
|
117
|
+
* What an invocation may steer besides the parameters, and within which bounds.
|
|
118
|
+
*
|
|
119
|
+
* Published because a caller that cannot see the bounds discovers them by being refused. Both
|
|
120
|
+
* knobs are ALWAYS present: a registration that declares neither still has effective values (the
|
|
121
|
+
* platform's own defaults), and publishing them as absent would read as "you may send anything".
|
|
122
|
+
*/
|
|
123
|
+
export const useCaseGenerationLimitsSchema = v.object({
|
|
124
|
+
/** Sampling temperature. Creative work lives on this knob, so a use case usually widens it. */
|
|
125
|
+
temperature: useCaseNumericLimitSchema,
|
|
126
|
+
/** The reply budget, in tokens. */
|
|
127
|
+
maxOutputTokens: useCaseNumericLimitSchema,
|
|
128
|
+
});
|
|
129
|
+
/** One registered use case, as `/api/v1/use-cases` publishes it. */
|
|
130
|
+
export const publicUseCaseSchema = v.object({
|
|
131
|
+
/** The namespaced id (`<ns>:<name>`, e.g. `stefka:scene-prose`). */
|
|
132
|
+
useCaseId: namespacedIdSchema,
|
|
133
|
+
/** Human label for a picker. */
|
|
134
|
+
label: v.pipe(v.string(), v.minLength(1), v.maxLength(USE_CASE_TEXT_LIMITS.label)),
|
|
135
|
+
/** One line on what this use case produces. */
|
|
136
|
+
description: v.pipe(v.string(), v.minLength(1), v.maxLength(USE_CASE_TEXT_LIMITS.description)),
|
|
137
|
+
/** Optional grouping caption, so a wrapper offering twenty use cases can group them. */
|
|
138
|
+
category: v.optional(v.pipe(v.string(), v.minLength(1), v.maxLength(USE_CASE_TEXT_LIMITS.category))),
|
|
139
|
+
/** The models this use case may run on, narrowed by the registration. Never empty. */
|
|
140
|
+
models: v.array(useCaseModelSchema),
|
|
141
|
+
/** The accepted parameters (empty ⇒ the use case takes none). */
|
|
142
|
+
parameters: v.array(useCaseParameterSchema),
|
|
143
|
+
/** What an invocation may steer, and within which bounds. */
|
|
144
|
+
generation: useCaseGenerationLimitsSchema,
|
|
145
|
+
});
|
|
146
|
+
/** The whole catalog this key's workspace may invoke, in registration order. */
|
|
147
|
+
export const publicUseCaseListSchema = v.object({
|
|
148
|
+
useCases: v.array(publicUseCaseSchema),
|
|
149
|
+
});
|
|
150
|
+
/** Bound on one parameter value; the shared descriptor bound, restated for the request body. */
|
|
151
|
+
const parameterValueSchema = v.union([
|
|
152
|
+
v.pipe(v.string(), v.maxLength(20_000)),
|
|
153
|
+
v.pipe(v.array(v.pipe(v.string(), v.maxLength(2_000))), v.maxLength(50)),
|
|
154
|
+
v.boolean(),
|
|
155
|
+
v.number(),
|
|
156
|
+
]);
|
|
157
|
+
/**
|
|
158
|
+
* The invocation body.
|
|
159
|
+
*
|
|
160
|
+
* `parameters` is deliberately a free-form bag validated against the REGISTRATION rather than
|
|
161
|
+
* against a schema minted per use case: the descriptors are deployment data, so the wire schema
|
|
162
|
+
* cannot know them, and the registration's own validator is the one door every caller (this
|
|
163
|
+
* surface, an SDK, the MCP projection) goes through.
|
|
164
|
+
*
|
|
165
|
+
* The bound here is wider than a task-type field's 2,000 characters on purpose: a creative-writing
|
|
166
|
+
* use case is handed the story so far, and truncating that to a form-field bound would silently
|
|
167
|
+
* change what the model was asked about. A registration narrows it per field with `maxLength`.
|
|
168
|
+
*/
|
|
169
|
+
export const invokeUseCaseSchema = v.object({
|
|
170
|
+
/** The model option id to run on; absent ⇒ the use case's default option. */
|
|
171
|
+
model: v.optional(v.pipe(v.string(), v.minLength(1), v.maxLength(120))),
|
|
172
|
+
/** The filled parameters, keyed by the descriptor `key`. */
|
|
173
|
+
parameters: v.optional(v.record(v.pipe(v.string(), v.minLength(1), v.maxLength(80)), parameterValueSchema)),
|
|
174
|
+
/** Sampling temperature, within the published bounds; absent ⇒ the published default. */
|
|
175
|
+
temperature: v.optional(v.number()),
|
|
176
|
+
/** Reply budget in tokens, within the published bounds; absent ⇒ the published default. */
|
|
177
|
+
maxOutputTokens: v.optional(v.number()),
|
|
178
|
+
});
|
|
179
|
+
/**
|
|
180
|
+
* Why the model stopped, as a bounded class.
|
|
181
|
+
*
|
|
182
|
+
* `length` is the one that changes what the caller must DO: the text is a prefix of the answer,
|
|
183
|
+
* not the answer, and a consumer that pastes it into a game script would ship a sentence that
|
|
184
|
+
* stops mid-word. It rides `truncated` beside it so the common check is a boolean and the cause
|
|
185
|
+
* is still nameable.
|
|
186
|
+
*/
|
|
187
|
+
export const USE_CASE_FINISH_REASONS = ['stop', 'length', 'content-filter', 'other'];
|
|
188
|
+
/**
|
|
189
|
+
* What one invocation cost, as the provider reported it.
|
|
190
|
+
*
|
|
191
|
+
* The three numbers ALWAYS add up, which is a choice: `inputTokens` is the whole billed input
|
|
192
|
+
* (both cache classes included, reconciled across the two shapes vendors report them in), so
|
|
193
|
+
* publishing a provider's own `total` beside it would let a cache-heavy call answer with three
|
|
194
|
+
* figures that disagree, and a wrapper metering its own users off them would under-bill silently.
|
|
195
|
+
*/
|
|
196
|
+
export const useCaseUsageSchema = v.object({
|
|
197
|
+
/** Input tokens the provider billed, both cache classes included. */
|
|
198
|
+
inputTokens: v.number(),
|
|
199
|
+
/** Output tokens the provider billed. */
|
|
200
|
+
outputTokens: v.number(),
|
|
201
|
+
/** The sum of the two above. */
|
|
202
|
+
totalTokens: v.number(),
|
|
203
|
+
});
|
|
204
|
+
/** The result of one invocation. */
|
|
205
|
+
export const useCaseInvocationSchema = v.object({
|
|
206
|
+
/** The use case that produced it. */
|
|
207
|
+
useCaseId: namespacedIdSchema,
|
|
208
|
+
/** The model option it actually ran on (never a substitute the caller did not name). */
|
|
209
|
+
model: v.object({
|
|
210
|
+
id: v.string(),
|
|
211
|
+
label: v.string(),
|
|
212
|
+
/** The resolved provider id and model id, so a caller can attribute the text it stores. */
|
|
213
|
+
provider: v.string(),
|
|
214
|
+
model: v.string(),
|
|
215
|
+
}),
|
|
216
|
+
/** The generated text. */
|
|
217
|
+
text: v.string(),
|
|
218
|
+
/** Why the model stopped. */
|
|
219
|
+
finishReason: v.picklist(USE_CASE_FINISH_REASONS),
|
|
220
|
+
/** Whether the reply hit the output budget, so `text` is a prefix rather than an answer. */
|
|
221
|
+
truncated: v.boolean(),
|
|
222
|
+
/** What the call cost. */
|
|
223
|
+
usage: useCaseUsageSchema,
|
|
224
|
+
});
|
|
225
|
+
//# sourceMappingURL=inline-use-cases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-use-cases.js","sourceRoot":"","sources":["../src/inline-use-cases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD,8EAA8E;AAC9E,yFAAyF;AACzF,wFAAwF;AACxF,wFAAwF;AACxF,gFAAgF;AAChF,EAAE;AACF,0FAA0F;AAC1F,4FAA4F;AAC5F,4FAA4F;AAC5F,+FAA+F;AAC/F,yEAAyE;AACzE,EAAE;AACF,6FAA6F;AAC7F,8FAA8F;AAC9F,+FAA+F;AAC/F,8EAA8E;AAE9E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,QAAQ,CAA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AAE;IAChB,6BAA6B;IAC7B,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACjD,4FAA4F;IAC5F,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,0BAA0B;IAC1B,KAAK,EAAE,kBAAkB;CAC1B,CAAC,CAAA"}
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export * from './model-presets.js';
|
|
|
39
39
|
export * from './agent-prompts.js';
|
|
40
40
|
export * from './agent-settings.js';
|
|
41
41
|
export * from './task-types.js';
|
|
42
|
+
export * from './use-cases.js';
|
|
42
43
|
export * from './shared-stacks.js';
|
|
43
44
|
export * from './models.js';
|
|
44
45
|
export * from './notifications.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA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,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
|
package/dist/routes/index.js
CHANGED
|
@@ -42,6 +42,7 @@ export * from './model-presets.js';
|
|
|
42
42
|
export * from './agent-prompts.js';
|
|
43
43
|
export * from './agent-settings.js';
|
|
44
44
|
export * from './task-types.js';
|
|
45
|
+
export * from './use-cases.js';
|
|
45
46
|
export * from './shared-stacks.js';
|
|
46
47
|
export * from './models.js';
|
|
47
48
|
export * from './notifications.js';
|
package/dist/routes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,oDAAoD;AACpD,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAA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C7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The catalog: every use case this deployment has registered, with its parameters, the models it
|
|
3
|
+
* may run on and the generation bounds an invocation may steer within.
|
|
4
|
+
*
|
|
5
|
+
* The read this surface exists for. Without it a wrapper's only route to the same knowledge is a
|
|
6
|
+
* hard-coded copy of the deployment's own registration, which is a second source of truth that
|
|
7
|
+
* drifts the first time an operator narrows a model list, and drifts SILENTLY, because the
|
|
8
|
+
* wrapper keeps offering a choice the invocation now refuses.
|
|
9
|
+
*/
|
|
10
|
+
export declare const listPublicUseCasesContract: {
|
|
11
|
+
readonly method: "get";
|
|
12
|
+
readonly pathResolver: () => string;
|
|
13
|
+
readonly responsesByStatusCode: {
|
|
14
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
15
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
16
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
17
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
18
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
19
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
20
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
21
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
22
|
+
}, undefined>, undefined>, undefined>;
|
|
23
|
+
}, undefined>;
|
|
24
|
+
}, undefined>;
|
|
25
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
26
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
27
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
28
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
29
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
30
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
31
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
32
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
33
|
+
}, undefined>, undefined>, undefined>;
|
|
34
|
+
}, undefined>;
|
|
35
|
+
}, undefined>;
|
|
36
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
37
|
+
readonly useCases: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
38
|
+
readonly useCaseId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>;
|
|
39
|
+
readonly label: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
40
|
+
readonly description: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 500, undefined>]>;
|
|
41
|
+
readonly category: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 60, undefined>]>, undefined>;
|
|
42
|
+
readonly models: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
43
|
+
readonly id: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
44
|
+
readonly label: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
45
|
+
readonly description: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
46
|
+
readonly default: import("valibot").BooleanSchema<undefined>;
|
|
47
|
+
readonly available: import("valibot").BooleanSchema<undefined>;
|
|
48
|
+
readonly unavailableReason: import("valibot").OptionalSchema<import("valibot").PicklistSchema<readonly ["provider_unavailable", "container_only"], undefined>, undefined>;
|
|
49
|
+
}, undefined>, undefined>;
|
|
50
|
+
readonly parameters: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
51
|
+
readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 80, undefined>]>;
|
|
52
|
+
readonly label: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
53
|
+
readonly section: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
54
|
+
readonly help: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 300, undefined>]>, undefined>;
|
|
55
|
+
readonly placeholder: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
56
|
+
readonly required: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
57
|
+
readonly options: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
58
|
+
readonly value: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
59
|
+
readonly label: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
60
|
+
}, undefined>, undefined>, undefined>;
|
|
61
|
+
readonly default: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
62
|
+
readonly defaultValues: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").ArraySchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>, import("valibot").MaxLengthAction<string[], 50, undefined>]>, undefined>;
|
|
63
|
+
readonly showWhen: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
|
|
64
|
+
readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>]>;
|
|
65
|
+
readonly equals: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").BooleanSchema<undefined>, import("valibot").NumberSchema<undefined>], undefined>, undefined>;
|
|
66
|
+
readonly includes: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
67
|
+
}, undefined>, undefined>;
|
|
68
|
+
readonly maxLength: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>, import("valibot").MaxValueAction<number, 2000, undefined>]>, undefined>;
|
|
69
|
+
readonly min: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
|
|
70
|
+
readonly max: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
|
|
71
|
+
readonly type: import("valibot").OptionalSchema<import("valibot").PicklistSchema<["text", "textarea", "number", "select", "checkbox", "checkbox-group"], undefined>, undefined>;
|
|
72
|
+
}, undefined>, undefined>;
|
|
73
|
+
readonly generation: import("valibot").ObjectSchema<{
|
|
74
|
+
readonly temperature: import("valibot").ObjectSchema<{
|
|
75
|
+
readonly default: import("valibot").NumberSchema<undefined>;
|
|
76
|
+
readonly min: import("valibot").NumberSchema<undefined>;
|
|
77
|
+
readonly max: import("valibot").NumberSchema<undefined>;
|
|
78
|
+
}, undefined>;
|
|
79
|
+
readonly maxOutputTokens: import("valibot").ObjectSchema<{
|
|
80
|
+
readonly default: import("valibot").NumberSchema<undefined>;
|
|
81
|
+
readonly min: import("valibot").NumberSchema<undefined>;
|
|
82
|
+
readonly max: import("valibot").NumberSchema<undefined>;
|
|
83
|
+
}, undefined>;
|
|
84
|
+
}, undefined>;
|
|
85
|
+
}, undefined>, undefined>;
|
|
86
|
+
}, undefined>;
|
|
87
|
+
};
|
|
88
|
+
} & {
|
|
89
|
+
readonly minScope: "read";
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* One use case by id: the point read beside the catalog, so a wrapper holding a `useCaseId` (from
|
|
93
|
+
* its own config, or from a form a user built earlier) can re-read the parameters and the current
|
|
94
|
+
* model availability without paging the whole catalog to find it.
|
|
95
|
+
*/
|
|
96
|
+
export declare const getPublicUseCaseContract: {
|
|
97
|
+
readonly method: "get";
|
|
98
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
99
|
+
useCaseId: import("valibot").StringSchema<undefined>;
|
|
100
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
101
|
+
readonly pathResolver: ({ useCaseId }: {
|
|
102
|
+
useCaseId: string;
|
|
103
|
+
}) => string;
|
|
104
|
+
readonly responsesByStatusCode: {
|
|
105
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
106
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
107
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
108
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
109
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
110
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
111
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
112
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
113
|
+
}, undefined>, undefined>, undefined>;
|
|
114
|
+
}, undefined>;
|
|
115
|
+
}, undefined>;
|
|
116
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
117
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
118
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
119
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
120
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
121
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
122
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
123
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
124
|
+
}, undefined>, undefined>, undefined>;
|
|
125
|
+
}, undefined>;
|
|
126
|
+
}, undefined>;
|
|
127
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
128
|
+
readonly useCaseId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>;
|
|
129
|
+
readonly label: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
130
|
+
readonly description: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 500, undefined>]>;
|
|
131
|
+
readonly category: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 60, undefined>]>, undefined>;
|
|
132
|
+
readonly models: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
133
|
+
readonly id: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
134
|
+
readonly label: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
135
|
+
readonly description: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 500, undefined>]>, undefined>;
|
|
136
|
+
readonly default: import("valibot").BooleanSchema<undefined>;
|
|
137
|
+
readonly available: import("valibot").BooleanSchema<undefined>;
|
|
138
|
+
readonly unavailableReason: import("valibot").OptionalSchema<import("valibot").PicklistSchema<readonly ["provider_unavailable", "container_only"], undefined>, undefined>;
|
|
139
|
+
}, undefined>, undefined>;
|
|
140
|
+
readonly parameters: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
141
|
+
readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 80, undefined>]>;
|
|
142
|
+
readonly label: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
143
|
+
readonly section: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
144
|
+
readonly help: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 300, undefined>]>, undefined>;
|
|
145
|
+
readonly placeholder: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
146
|
+
readonly required: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
147
|
+
readonly options: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
148
|
+
readonly value: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
149
|
+
readonly label: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
|
|
150
|
+
}, undefined>, undefined>, undefined>;
|
|
151
|
+
readonly default: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>;
|
|
152
|
+
readonly defaultValues: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").ArraySchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>, import("valibot").MaxLengthAction<string[], 50, undefined>]>, undefined>;
|
|
153
|
+
readonly showWhen: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
|
|
154
|
+
readonly key: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>]>;
|
|
155
|
+
readonly equals: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").BooleanSchema<undefined>, import("valibot").NumberSchema<undefined>], undefined>, undefined>;
|
|
156
|
+
readonly includes: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
157
|
+
}, undefined>, undefined>;
|
|
158
|
+
readonly maxLength: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>, import("valibot").MaxValueAction<number, 2000, undefined>]>, undefined>;
|
|
159
|
+
readonly min: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
|
|
160
|
+
readonly max: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
|
|
161
|
+
readonly type: import("valibot").OptionalSchema<import("valibot").PicklistSchema<["text", "textarea", "number", "select", "checkbox", "checkbox-group"], undefined>, undefined>;
|
|
162
|
+
}, undefined>, undefined>;
|
|
163
|
+
readonly generation: import("valibot").ObjectSchema<{
|
|
164
|
+
readonly temperature: import("valibot").ObjectSchema<{
|
|
165
|
+
readonly default: import("valibot").NumberSchema<undefined>;
|
|
166
|
+
readonly min: import("valibot").NumberSchema<undefined>;
|
|
167
|
+
readonly max: import("valibot").NumberSchema<undefined>;
|
|
168
|
+
}, undefined>;
|
|
169
|
+
readonly maxOutputTokens: import("valibot").ObjectSchema<{
|
|
170
|
+
readonly default: import("valibot").NumberSchema<undefined>;
|
|
171
|
+
readonly min: import("valibot").NumberSchema<undefined>;
|
|
172
|
+
readonly max: import("valibot").NumberSchema<undefined>;
|
|
173
|
+
}, undefined>;
|
|
174
|
+
}, undefined>;
|
|
175
|
+
}, undefined>;
|
|
176
|
+
};
|
|
177
|
+
} & {
|
|
178
|
+
readonly minScope: "read";
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Run the use case and answer with the generated text.
|
|
182
|
+
*
|
|
183
|
+
* SYNCHRONOUS, unlike `POST /api/v1/jobs`, and that is the feature rather than a shortcut: this is
|
|
184
|
+
* one inline model call with no checkout, no container and no durable driver, so there is no state
|
|
185
|
+
* for a caller to poll and a job id would be a second round-trip around a call that has already
|
|
186
|
+
* finished. `/invocations` rather than a bare `POST /api/v1/use-cases/{id}`, so the URL names what
|
|
187
|
+
* is being created and leaves the use case itself addressable as the resource it is.
|
|
188
|
+
*
|
|
189
|
+
* Refusals a caller acts on, all carrying `details.reason`: an unregistered id is `404`
|
|
190
|
+
* `use_case_not_found`; parameters that do not satisfy the descriptors are `422`
|
|
191
|
+
* `use_case_parameters_invalid` with every problem named at once; a knob outside the published
|
|
192
|
+
* bounds is `422` `use_case_generation_out_of_range`; a model outside the use case's own list is
|
|
193
|
+
* `422` `use_case_model_not_allowed`; a model this deployment cannot serve inline is `503`
|
|
194
|
+
* `use_case_model_unavailable` (never a silent substitution: the narrowing is the point); a
|
|
195
|
+
* deployment with no model provider at all is `503` `use_case_models_unconfigured`; an exhausted
|
|
196
|
+
* budget is `429` `budget_exhausted`; and a model that answers with no usable text is `503`
|
|
197
|
+
* `use_case_empty_reply` rather than a 200 carrying an empty string.
|
|
198
|
+
*
|
|
199
|
+
* Two more name what happened at the VENDOR, and they are listed because they are the likeliest
|
|
200
|
+
* of the set rather than the rarest: `503` `use_case_generation_failed` (the call was made and the
|
|
201
|
+
* provider answered with an error) and `503` `use_case_generation_timeout` (it did not answer
|
|
202
|
+
* inside the deployment's per-invocation deadline). They are separate because the caller's move
|
|
203
|
+
* differs: a failure is worth surfacing to whoever asked, a timeout is worth retrying with a
|
|
204
|
+
* smaller `maxOutputTokens`. A synchronous surface OWES that deadline: without one, a stalled
|
|
205
|
+
* vendor holds the request open for as long as the transport allows.
|
|
206
|
+
*/
|
|
207
|
+
export declare const invokePublicUseCaseContract: {
|
|
208
|
+
readonly method: "post";
|
|
209
|
+
readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
|
|
210
|
+
useCaseId: import("valibot").StringSchema<undefined>;
|
|
211
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
212
|
+
readonly pathResolver: ({ useCaseId }: {
|
|
213
|
+
useCaseId: string;
|
|
214
|
+
}) => string;
|
|
215
|
+
readonly requestBodySchema: import("valibot").ObjectSchema<{
|
|
216
|
+
readonly model: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>, undefined>;
|
|
217
|
+
readonly parameters: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 80, undefined>]>, import("valibot").UnionSchema<[import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 20000, undefined>]>, import("valibot").SchemaWithPipe<readonly [import("valibot").ArraySchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>, import("valibot").MaxLengthAction<string[], 50, undefined>]>, import("valibot").BooleanSchema<undefined>, import("valibot").NumberSchema<undefined>], undefined>, undefined>, undefined>;
|
|
218
|
+
readonly temperature: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
|
|
219
|
+
readonly maxOutputTokens: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
|
|
220
|
+
}, undefined>;
|
|
221
|
+
readonly responsesByStatusCode: {
|
|
222
|
+
readonly '4xx': import("valibot").ObjectSchema<{
|
|
223
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
224
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
225
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
226
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
227
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
228
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
229
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
230
|
+
}, undefined>, undefined>, undefined>;
|
|
231
|
+
}, undefined>;
|
|
232
|
+
}, undefined>;
|
|
233
|
+
readonly '5xx': import("valibot").ObjectSchema<{
|
|
234
|
+
readonly error: import("valibot").ObjectSchema<{
|
|
235
|
+
readonly code: import("valibot").StringSchema<undefined>;
|
|
236
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
237
|
+
readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
|
|
238
|
+
readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
|
|
239
|
+
readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
240
|
+
readonly message: import("valibot").StringSchema<undefined>;
|
|
241
|
+
}, undefined>, undefined>, undefined>;
|
|
242
|
+
}, undefined>;
|
|
243
|
+
}, undefined>;
|
|
244
|
+
readonly 200: import("valibot").ObjectSchema<{
|
|
245
|
+
readonly useCaseId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>;
|
|
246
|
+
readonly model: import("valibot").ObjectSchema<{
|
|
247
|
+
readonly id: import("valibot").StringSchema<undefined>;
|
|
248
|
+
readonly label: import("valibot").StringSchema<undefined>;
|
|
249
|
+
readonly provider: import("valibot").StringSchema<undefined>;
|
|
250
|
+
readonly model: import("valibot").StringSchema<undefined>;
|
|
251
|
+
}, undefined>;
|
|
252
|
+
readonly text: import("valibot").StringSchema<undefined>;
|
|
253
|
+
readonly finishReason: import("valibot").PicklistSchema<readonly ["stop", "length", "content-filter", "other"], undefined>;
|
|
254
|
+
readonly truncated: import("valibot").BooleanSchema<undefined>;
|
|
255
|
+
readonly usage: import("valibot").ObjectSchema<{
|
|
256
|
+
readonly inputTokens: import("valibot").NumberSchema<undefined>;
|
|
257
|
+
readonly outputTokens: import("valibot").NumberSchema<undefined>;
|
|
258
|
+
readonly totalTokens: import("valibot").NumberSchema<undefined>;
|
|
259
|
+
}, undefined>;
|
|
260
|
+
}, undefined>;
|
|
261
|
+
};
|
|
262
|
+
} & {
|
|
263
|
+
readonly minScope: "write";
|
|
264
|
+
};
|
|
265
|
+
//# sourceMappingURL=use-cases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-cases.d.ts","sourceRoot":"","sources":["../../src/routes/use-cases.ts"],"names":[],"mappings":"AA4BA;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOtC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASvC,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { defineApiContract } from '@toad-contracts/valibot';
|
|
2
|
+
import { invokeUseCaseSchema, publicUseCaseListSchema, publicUseCaseSchema, useCaseInvocationSchema, } from '../inline-use-cases.js';
|
|
3
|
+
import { errorResponses, singleStringParam, withMinScope } from './_shared.js';
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Route contracts for the public INLINE USE-CASE surface: the non-container half of `/api/v1`.
|
|
6
|
+
//
|
|
7
|
+
// A deployment registers its use cases in code on the app-owned `InlineUseCaseRegistry`; these
|
|
8
|
+
// three routes are how a wrapper over this API discovers them and runs one. The wire shapes and
|
|
9
|
+
// the reasoning behind them live in `../inline-use-cases.ts`; the engine side is
|
|
10
|
+
// `backend/docs/inline-use-cases.md`.
|
|
11
|
+
//
|
|
12
|
+
// The scope split follows the ladder the rest of the surface uses. Discovery is `read`, like every
|
|
13
|
+
// other "what may I do here" call: knowing which use cases exist is not invoking one, and an
|
|
14
|
+
// integration's startup check must work on whatever rung its key holds. INVOKING is `write`, not
|
|
15
|
+
// `admin`: it spends model tokens and returns text, and it creates no board row, starts no run and
|
|
16
|
+
// merges nothing, the same reasoning that puts `POST /api/v1/jobs` on `write`. Requiring `admin`
|
|
17
|
+
// would mean a content editor whose whole job is generating prose had to hold a key that also
|
|
18
|
+
// deletes services.
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
const useCaseIdParams = singleStringParam('useCaseId');
|
|
21
|
+
/**
|
|
22
|
+
* The catalog: every use case this deployment has registered, with its parameters, the models it
|
|
23
|
+
* may run on and the generation bounds an invocation may steer within.
|
|
24
|
+
*
|
|
25
|
+
* The read this surface exists for. Without it a wrapper's only route to the same knowledge is a
|
|
26
|
+
* hard-coded copy of the deployment's own registration, which is a second source of truth that
|
|
27
|
+
* drifts the first time an operator narrows a model list, and drifts SILENTLY, because the
|
|
28
|
+
* wrapper keeps offering a choice the invocation now refuses.
|
|
29
|
+
*/
|
|
30
|
+
export const listPublicUseCasesContract = withMinScope('read', defineApiContract({
|
|
31
|
+
method: 'get',
|
|
32
|
+
pathResolver: () => '/api/v1/use-cases',
|
|
33
|
+
responsesByStatusCode: { 200: publicUseCaseListSchema, ...errorResponses },
|
|
34
|
+
}));
|
|
35
|
+
/**
|
|
36
|
+
* One use case by id: the point read beside the catalog, so a wrapper holding a `useCaseId` (from
|
|
37
|
+
* its own config, or from a form a user built earlier) can re-read the parameters and the current
|
|
38
|
+
* model availability without paging the whole catalog to find it.
|
|
39
|
+
*/
|
|
40
|
+
export const getPublicUseCaseContract = withMinScope('read', defineApiContract({
|
|
41
|
+
method: 'get',
|
|
42
|
+
requestPathParamsSchema: useCaseIdParams,
|
|
43
|
+
pathResolver: ({ useCaseId }) => `/api/v1/use-cases/${useCaseId}`,
|
|
44
|
+
responsesByStatusCode: { 200: publicUseCaseSchema, ...errorResponses },
|
|
45
|
+
}));
|
|
46
|
+
/**
|
|
47
|
+
* Run the use case and answer with the generated text.
|
|
48
|
+
*
|
|
49
|
+
* SYNCHRONOUS, unlike `POST /api/v1/jobs`, and that is the feature rather than a shortcut: this is
|
|
50
|
+
* one inline model call with no checkout, no container and no durable driver, so there is no state
|
|
51
|
+
* for a caller to poll and a job id would be a second round-trip around a call that has already
|
|
52
|
+
* finished. `/invocations` rather than a bare `POST /api/v1/use-cases/{id}`, so the URL names what
|
|
53
|
+
* is being created and leaves the use case itself addressable as the resource it is.
|
|
54
|
+
*
|
|
55
|
+
* Refusals a caller acts on, all carrying `details.reason`: an unregistered id is `404`
|
|
56
|
+
* `use_case_not_found`; parameters that do not satisfy the descriptors are `422`
|
|
57
|
+
* `use_case_parameters_invalid` with every problem named at once; a knob outside the published
|
|
58
|
+
* bounds is `422` `use_case_generation_out_of_range`; a model outside the use case's own list is
|
|
59
|
+
* `422` `use_case_model_not_allowed`; a model this deployment cannot serve inline is `503`
|
|
60
|
+
* `use_case_model_unavailable` (never a silent substitution: the narrowing is the point); a
|
|
61
|
+
* deployment with no model provider at all is `503` `use_case_models_unconfigured`; an exhausted
|
|
62
|
+
* budget is `429` `budget_exhausted`; and a model that answers with no usable text is `503`
|
|
63
|
+
* `use_case_empty_reply` rather than a 200 carrying an empty string.
|
|
64
|
+
*
|
|
65
|
+
* Two more name what happened at the VENDOR, and they are listed because they are the likeliest
|
|
66
|
+
* of the set rather than the rarest: `503` `use_case_generation_failed` (the call was made and the
|
|
67
|
+
* provider answered with an error) and `503` `use_case_generation_timeout` (it did not answer
|
|
68
|
+
* inside the deployment's per-invocation deadline). They are separate because the caller's move
|
|
69
|
+
* differs: a failure is worth surfacing to whoever asked, a timeout is worth retrying with a
|
|
70
|
+
* smaller `maxOutputTokens`. A synchronous surface OWES that deadline: without one, a stalled
|
|
71
|
+
* vendor holds the request open for as long as the transport allows.
|
|
72
|
+
*/
|
|
73
|
+
export const invokePublicUseCaseContract = withMinScope('write', defineApiContract({
|
|
74
|
+
method: 'post',
|
|
75
|
+
requestPathParamsSchema: useCaseIdParams,
|
|
76
|
+
pathResolver: ({ useCaseId }) => `/api/v1/use-cases/${useCaseId}/invocations`,
|
|
77
|
+
requestBodySchema: invokeUseCaseSchema,
|
|
78
|
+
responsesByStatusCode: { 200: useCaseInvocationSchema, ...errorResponses },
|
|
79
|
+
}));
|
|
80
|
+
//# sourceMappingURL=use-cases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-cases.js","sourceRoot":"","sources":["../../src/routes/use-cases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE9E,8EAA8E;AAC9E,+FAA+F;AAC/F,EAAE;AACF,+FAA+F;AAC/F,gGAAgG;AAChG,iFAAiF;AACjF,sCAAsC;AACtC,EAAE;AACF,mGAAmG;AACnG,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