@cat-factory/contracts 0.296.0 → 0.298.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/known-local-models.d.ts +59 -0
- package/dist/known-local-models.d.ts.map +1 -0
- package/dist/known-local-models.js +130 -0
- package/dist/known-local-models.js.map +1 -0
- package/dist/localModels.d.ts +49 -4
- package/dist/localModels.d.ts.map +1 -1
- package/dist/localModels.js +38 -5
- package/dist/localModels.js.map +1 -1
- package/dist/personal-subscriptions.d.ts +20 -0
- package/dist/personal-subscriptions.d.ts.map +1 -1
- package/dist/personal-subscriptions.js +33 -1
- package/dist/personal-subscriptions.js.map +1 -1
- package/dist/public-api-keys.d.ts +49 -0
- package/dist/public-api-keys.d.ts.map +1 -1
- package/dist/public-api-keys.js +29 -0
- package/dist/public-api-keys.js.map +1 -1
- package/dist/public-provisioning.d.ts +40 -7
- package/dist/public-provisioning.d.ts.map +1 -1
- package/dist/public-provisioning.js +27 -7
- package/dist/public-provisioning.js.map +1 -1
- package/dist/routes/_shared.d.ts +16 -0
- package/dist/routes/_shared.d.ts.map +1 -1
- package/dist/routes/_shared.js +16 -0
- package/dist/routes/_shared.js.map +1 -1
- package/dist/routes/localModels.d.ts +14 -3
- package/dist/routes/localModels.d.ts.map +1 -1
- package/dist/routes/public-api.d.ts +11 -0
- package/dist/routes/public-api.d.ts.map +1 -1
- package/dist/routes/public-api.js +7 -7
- package/dist/routes/public-api.js.map +1 -1
- package/dist/routes/public-decisions.d.ts +80 -0
- package/dist/routes/public-decisions.d.ts.map +1 -1
- package/dist/routes/public-decisions.js +54 -41
- package/dist/routes/public-decisions.js.map +1 -1
- package/dist/routes/public-provisioning.d.ts +1 -0
- package/dist/routes/public-provisioning.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -131,6 +131,7 @@ export * from './public-decisions.js';
|
|
|
131
131
|
export * from './notification-webhooks.js';
|
|
132
132
|
export * from './personal-subscriptions.js';
|
|
133
133
|
export * from './localModels.js';
|
|
134
|
+
export * from './known-local-models.js';
|
|
134
135
|
export * from './openrouter.js';
|
|
135
136
|
export * from './sandbox.js';
|
|
136
137
|
export * from './workspace-settings.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,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,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,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA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BAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,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
|
@@ -131,6 +131,7 @@ export * from './public-decisions.js';
|
|
|
131
131
|
export * from './notification-webhooks.js';
|
|
132
132
|
export * from './personal-subscriptions.js';
|
|
133
133
|
export * from './localModels.js';
|
|
134
|
+
export * from './known-local-models.js';
|
|
134
135
|
export * from './openrouter.js';
|
|
135
136
|
export * from './sandbox.js';
|
|
136
137
|
export * from './workspace-settings.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;AA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c,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,59 @@
|
|
|
1
|
+
/** One recognised local model family and what its weights can be given. */
|
|
2
|
+
export interface KnownLocalModel {
|
|
3
|
+
/** Stable family key, for tests and for anything that wants to group by family. */
|
|
4
|
+
family: string;
|
|
5
|
+
/** Display name, shown to the user beside the modality it implies. */
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Id fragments that identify the family, ALREADY SQUASHED the way {@link squashModelId}
|
|
9
|
+
* squashes a runner's id (lowercase, alphanumerics only), and matched as substrings. That is
|
|
10
|
+
* what lets one entry cover every shape the ecosystem serves the same weights under:
|
|
11
|
+
* `gemma4:12b` (Ollama), `google/gemma-4-12b` (LM Studio), `Gemma-4-12B-it-GGUF` (llama.cpp),
|
|
12
|
+
* `mlx-community/Gemma-4-12B-4bit` (MLX).
|
|
13
|
+
*/
|
|
14
|
+
match: readonly string[];
|
|
15
|
+
/**
|
|
16
|
+
* Whether the family's weights accept IMAGE input.
|
|
17
|
+
*
|
|
18
|
+
* Every entry today says `true`, and that is a rule rather than a coincidence: an entry earns
|
|
19
|
+
* its place only where the platform's SILENCE would cost a capability. A text-only model
|
|
20
|
+
* behaves identically whether this table calls it `false` or says nothing (both withhold the
|
|
21
|
+
* run's design renders), so listing one would add a maintenance surface, and a wrong `false`
|
|
22
|
+
* would silently withhold pictures from a model that could have read them. The field is
|
|
23
|
+
* explicit anyway so a future entry that genuinely needs to correct an assumption can.
|
|
24
|
+
*/
|
|
25
|
+
acceptsImages: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The recognised families. Each is here because its publisher documents image input for the
|
|
29
|
+
* open weights, verified against that publisher's own release material rather than inferred
|
|
30
|
+
* from a family resemblance.
|
|
31
|
+
*
|
|
32
|
+
* A family whose modality depends on the SIZE is deliberately ABSENT rather than approximated:
|
|
33
|
+
* Gemma 3 is the worked example (its 1B is text-only while its 4B and up are not), and an entry
|
|
34
|
+
* matching the family name would have told every `gemma3:1b` user their model reads images. When
|
|
35
|
+
* in doubt, leave it out: the user's own declaration is right there, and an absence self-corrects
|
|
36
|
+
* where a wrong entry does not.
|
|
37
|
+
*/
|
|
38
|
+
export declare const KNOWN_LOCAL_MODELS: readonly KnownLocalModel[];
|
|
39
|
+
/**
|
|
40
|
+
* Reduce a runner-reported model id to its comparable core: the last path segment, lowercased,
|
|
41
|
+
* split on every non-alphanumeric run, packaging tokens dropped, the rest joined.
|
|
42
|
+
*
|
|
43
|
+
* One normalisation rather than a set of per-runner regexes, because the SAME weights arrive under
|
|
44
|
+
* wildly different spellings and the differences are all punctuation and packaging: an org
|
|
45
|
+
* prefix (`google/`), a size tag (`:12b`), a quantisation suffix (`-q4_k_m`), a format
|
|
46
|
+
* (`-gguf`, `-mlx`, `.gguf`), a hyphen where another registry uses none. Squashing both sides
|
|
47
|
+
* and testing for a substring absorbs all of it, and it keeps VERSION digits significant, which
|
|
48
|
+
* is what stops a `gemma4` entry from claiming a `gemma3` id.
|
|
49
|
+
*/
|
|
50
|
+
export declare function squashModelId(id: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* The recognised family for a runner-reported model id, or undefined when the platform knows
|
|
53
|
+
* nothing about it (the normal case for a fine-tune or a private build).
|
|
54
|
+
*
|
|
55
|
+
* Callers must treat undefined as "nobody has said", NEVER as "text only": that distinction is
|
|
56
|
+
* the whole reason `LocalModelDeclaration.acceptsImages` is three-state.
|
|
57
|
+
*/
|
|
58
|
+
export declare function knownLocalModel(id: string | undefined | null): KnownLocalModel | undefined;
|
|
59
|
+
//# sourceMappingURL=known-local-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"known-local-models.d.ts","sourceRoot":"","sources":["../src/known-local-models.ts"],"names":[],"mappings":"AAoBA,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB;;;;;;;;;OASG;IACH,aAAa,EAAE,OAAO,CAAA;CACvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAoDxD,CAAA;AAgBD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAOhD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,eAAe,GAAG,SAAS,CAK1F"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// What the platform KNOWS about the popular locally-run model families, so the common
|
|
3
|
+
// case needs no declaration from the user.
|
|
4
|
+
//
|
|
5
|
+
// A local model has no `MODEL_CATALOG` entry: it lives on one person's machine, the runner's
|
|
6
|
+
// OpenAI-compatible `/models` probe returns ids and nothing else, and the id itself is free
|
|
7
|
+
// text. That is why `LocalModelDeclaration` exists. But most people run a handful of
|
|
8
|
+
// well-known open-weights families, and asking each of them to hand-declare that Gemma 4
|
|
9
|
+
// reads images is asking them to re-supply a fact this repo can simply carry.
|
|
10
|
+
//
|
|
11
|
+
// So there are two tiers, and the ESCAPE HATCH OUT-RANKS the table: a user's own declaration
|
|
12
|
+
// always wins, because they are the one who knows which build they pulled (a text-only quant,
|
|
13
|
+
// a fine-tune, a re-tagged local copy). This table only answers when they have said nothing.
|
|
14
|
+
//
|
|
15
|
+
// Lives in contracts, not kernel, because BOTH sides must agree about it: the SPA labels the
|
|
16
|
+
// "not set" option with what the table will do, and the engine folds the same answer onto the
|
|
17
|
+
// dispatched ref. A copy on either side would let the settings panel promise a model images
|
|
18
|
+
// that the run then withholds.
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
/**
|
|
21
|
+
* The recognised families. Each is here because its publisher documents image input for the
|
|
22
|
+
* open weights, verified against that publisher's own release material rather than inferred
|
|
23
|
+
* from a family resemblance.
|
|
24
|
+
*
|
|
25
|
+
* A family whose modality depends on the SIZE is deliberately ABSENT rather than approximated:
|
|
26
|
+
* Gemma 3 is the worked example (its 1B is text-only while its 4B and up are not), and an entry
|
|
27
|
+
* matching the family name would have told every `gemma3:1b` user their model reads images. When
|
|
28
|
+
* in doubt, leave it out: the user's own declaration is right there, and an absence self-corrects
|
|
29
|
+
* where a wrong entry does not.
|
|
30
|
+
*/
|
|
31
|
+
export const KNOWN_LOCAL_MODELS = [
|
|
32
|
+
{
|
|
33
|
+
family: 'muse-glimmer',
|
|
34
|
+
label: 'Muse Glimmer',
|
|
35
|
+
// Meta's 30B agentic model: a dedicated perception encoder, interleaved text and images.
|
|
36
|
+
match: ['museglimmer'],
|
|
37
|
+
acceptsImages: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
family: 'gemma4',
|
|
41
|
+
label: 'Gemma 4',
|
|
42
|
+
// Google ships native vision in EVERY Gemma 4 variant, 2B through 31B, which is what makes
|
|
43
|
+
// the bare family name safe to match here where `gemma3` is not.
|
|
44
|
+
match: ['gemma4'],
|
|
45
|
+
acceptsImages: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
family: 'qwen-vl',
|
|
49
|
+
label: 'Qwen (VL)',
|
|
50
|
+
// Qwen's vision-language line, which is EXPLICIT in the id. The plain `qwen3.6` / `qwen3`
|
|
51
|
+
// builds are left unrecognised on purpose: the series is described as multimodal while
|
|
52
|
+
// vision is delivered by the `-VL` variants, and that ambiguity is not something to resolve
|
|
53
|
+
// by guessing on a user's behalf.
|
|
54
|
+
match: ['qwenvl', 'qwen2vl', 'qwen25vl', 'qwen3vl', 'qwen35vl', 'qwen36vl'],
|
|
55
|
+
acceptsImages: true,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
family: 'llama4',
|
|
59
|
+
label: 'Llama 4',
|
|
60
|
+
// Natively multimodal across Scout and Maverick; the same fact `MODEL_CATALOG` already
|
|
61
|
+
// declares for the Workers AI flavour of Scout.
|
|
62
|
+
match: ['llama4'],
|
|
63
|
+
acceptsImages: true,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
family: 'llava',
|
|
67
|
+
label: 'LLaVA',
|
|
68
|
+
match: ['llava'],
|
|
69
|
+
acceptsImages: true,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
family: 'minicpm-v',
|
|
73
|
+
label: 'MiniCPM-V',
|
|
74
|
+
match: ['minicpmv'],
|
|
75
|
+
acceptsImages: true,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
family: 'moondream',
|
|
79
|
+
label: 'Moondream',
|
|
80
|
+
match: ['moondream'],
|
|
81
|
+
acceptsImages: true,
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
/**
|
|
85
|
+
* A token that describes how a build was PACKAGED rather than which weights it holds: the
|
|
86
|
+
* parameter size (`12b`, `8x7b`, `500m`), the quantisation (`q4_k_m`, `4bit`, `fp16`, `int8`) and
|
|
87
|
+
* the serialisation format (`gguf`, `mlx`, `awq`, …).
|
|
88
|
+
*
|
|
89
|
+
* Dropped BEFORE the squash, and that order is the whole point: the squash deletes exactly the
|
|
90
|
+
* separators that keep a size tag apart from the family name, so `gemma-4b-it` squashed whole
|
|
91
|
+
* reads as `gemma4bit`, which CONTAINS the `gemma4` fragment and would hand a Gemma 1 4B build
|
|
92
|
+
* the run's design renders. Removing the packaging first cannot create that adjacency, where a
|
|
93
|
+
* boundary rule applied after the squash has no boundary left to test.
|
|
94
|
+
*/
|
|
95
|
+
const PACKAGING_TOKEN = /^(?:\d+(?:x\d+)?[bm]|\d+bits?|q\d\w*|fp\d+|bf\d+|int\d+|gguf|ggml|mlx|awq|gptq|exl\d+|safetensors)$/;
|
|
96
|
+
/**
|
|
97
|
+
* Reduce a runner-reported model id to its comparable core: the last path segment, lowercased,
|
|
98
|
+
* split on every non-alphanumeric run, packaging tokens dropped, the rest joined.
|
|
99
|
+
*
|
|
100
|
+
* One normalisation rather than a set of per-runner regexes, because the SAME weights arrive under
|
|
101
|
+
* wildly different spellings and the differences are all punctuation and packaging: an org
|
|
102
|
+
* prefix (`google/`), a size tag (`:12b`), a quantisation suffix (`-q4_k_m`), a format
|
|
103
|
+
* (`-gguf`, `-mlx`, `.gguf`), a hyphen where another registry uses none. Squashing both sides
|
|
104
|
+
* and testing for a substring absorbs all of it, and it keeps VERSION digits significant, which
|
|
105
|
+
* is what stops a `gemma4` entry from claiming a `gemma3` id.
|
|
106
|
+
*/
|
|
107
|
+
export function squashModelId(id) {
|
|
108
|
+
const segment = id.split('/').pop() ?? id;
|
|
109
|
+
return segment
|
|
110
|
+
.toLowerCase()
|
|
111
|
+
.split(/[^a-z0-9]+/)
|
|
112
|
+
.filter((token) => token.length > 0 && !PACKAGING_TOKEN.test(token))
|
|
113
|
+
.join('');
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The recognised family for a runner-reported model id, or undefined when the platform knows
|
|
117
|
+
* nothing about it (the normal case for a fine-tune or a private build).
|
|
118
|
+
*
|
|
119
|
+
* Callers must treat undefined as "nobody has said", NEVER as "text only": that distinction is
|
|
120
|
+
* the whole reason `LocalModelDeclaration.acceptsImages` is three-state.
|
|
121
|
+
*/
|
|
122
|
+
export function knownLocalModel(id) {
|
|
123
|
+
if (!id)
|
|
124
|
+
return undefined;
|
|
125
|
+
const squashed = squashModelId(id);
|
|
126
|
+
if (!squashed)
|
|
127
|
+
return undefined;
|
|
128
|
+
return KNOWN_LOCAL_MODELS.find((known) => known.match.some((m) => squashed.includes(m)));
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=known-local-models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"known-local-models.js","sourceRoot":"","sources":["../src/known-local-models.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,sFAAsF;AACtF,2CAA2C;AAC3C,EAAE;AACF,6FAA6F;AAC7F,4FAA4F;AAC5F,qFAAqF;AACrF,yFAAyF;AACzF,8EAA8E;AAC9E,EAAE;AACF,6FAA6F;AAC7F,8FAA8F;AAC9F,6FAA6F;AAC7F,EAAE;AACF,6FAA6F;AAC7F,8FAA8F;AAC9F,4FAA4F;AAC5F,+BAA+B;AAC/B,8EAA8E;AA6B9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA+B;IAC5D;QACE,MAAM,EAAE,cAAc;QACtB,KAAK,EAAE,cAAc;QACrB,yFAAyF;QACzF,KAAK,EAAE,CAAC,aAAa,CAAC;QACtB,aAAa,EAAE,IAAI;KACpB;IACD;QACE,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,SAAS;QAChB,2FAA2F;QAC3F,iEAAiE;QACjE,KAAK,EAAE,CAAC,QAAQ,CAAC;QACjB,aAAa,EAAE,IAAI;KACpB;IACD;QACE,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,WAAW;QAClB,0FAA0F;QAC1F,uFAAuF;QACvF,4FAA4F;QAC5F,kCAAkC;QAClC,KAAK,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;QAC3E,aAAa,EAAE,IAAI;KACpB;IACD;QACE,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,SAAS;QAChB,uFAAuF;QACvF,gDAAgD;QAChD,KAAK,EAAE,CAAC,QAAQ,CAAC;QACjB,aAAa,EAAE,IAAI;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CAAC"}
|
package/dist/localModels.d.ts
CHANGED
|
@@ -9,6 +9,30 @@ export declare function isLocalRunner(provider: string): boolean;
|
|
|
9
9
|
export declare const LOCAL_RUNNER_DEFAULTS: Record<LocalRunner, string | null>;
|
|
10
10
|
/** Short display label per runner, shown in the picker as the provider label. */
|
|
11
11
|
export declare const LOCAL_RUNNER_LABELS: Record<LocalRunner, string>;
|
|
12
|
+
/**
|
|
13
|
+
* One model a user has ENABLED on a runner, plus what they have DECLARED about it.
|
|
14
|
+
*
|
|
15
|
+
* The id alone is not enough, because a local model is not in the curated catalog: nothing
|
|
16
|
+
* upstream knows whether `muse-glimmer:30b` reads images the way a `MODEL_CATALOG` entry's
|
|
17
|
+
* flavour declares it. The OpenAI-compatible `/models` probe cannot answer it either (it
|
|
18
|
+
* returns ids and nothing else), so the person who pulled the weights is the only source
|
|
19
|
+
* there is, and this is where they say so.
|
|
20
|
+
*
|
|
21
|
+
* `acceptsImages` is deliberately THREE-STATE, mirroring `ModelRef.acceptsImages`:
|
|
22
|
+
* `true` (the runner serves it with image input), `false` (declared text-only) and ABSENT
|
|
23
|
+
* (nobody has said). The third is the default and is NOT a "no": a run withholds the design
|
|
24
|
+
* renders either way, but reports `unknown_model_image_input` rather than
|
|
25
|
+
* `model_no_image_input`, which is the difference between "declare it and this works" and
|
|
26
|
+
* "this model cannot". Collapsing them would let a multimodal local model read as text-only
|
|
27
|
+
* forever with nothing saying the platform never asked.
|
|
28
|
+
*/
|
|
29
|
+
export declare const localModelDeclarationSchema: v.ObjectSchema<{
|
|
30
|
+
/** The model id as the runner serves it (e.g. `muse-glimmer:30b`). */
|
|
31
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
|
|
32
|
+
/** Whether this runner serves the model with IMAGE input. Absent ⇒ not declared. */
|
|
33
|
+
readonly acceptsImages: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
34
|
+
}, undefined>;
|
|
35
|
+
export type LocalModelDeclaration = v.InferOutput<typeof localModelDeclarationSchema>;
|
|
12
36
|
/**
|
|
13
37
|
* Why a runner base URL is refused by the deployment's local-runner policy. The SPA maps
|
|
14
38
|
* each member to translated copy (`localModels.urlReason.*`), so the operator-facing
|
|
@@ -29,8 +53,20 @@ export declare const localModelEndpointSchema: v.ObjectSchema<{
|
|
|
29
53
|
readonly baseUrl: v.StringSchema<undefined>;
|
|
30
54
|
/** Whether a (write-only) API key is stored for this endpoint. */
|
|
31
55
|
readonly hasApiKey: v.BooleanSchema<undefined>;
|
|
32
|
-
/** The
|
|
33
|
-
readonly models: v.ArraySchema<v.
|
|
56
|
+
/** The models the user has enabled from this runner, with what they declared about each. */
|
|
57
|
+
readonly models: v.ArraySchema<v.ObjectSchema<{
|
|
58
|
+
/** The model id as the runner serves it (e.g. `muse-glimmer:30b`). */
|
|
59
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
|
|
60
|
+
/** Whether this runner serves the model with IMAGE input. Absent ⇒ not declared. */
|
|
61
|
+
readonly acceptsImages: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
62
|
+
}, undefined>, undefined>;
|
|
63
|
+
/**
|
|
64
|
+
* Whether part of this endpoint's stored model list could not be READ and was discarded (a row
|
|
65
|
+
* written before declarations existed held bare strings). Reported rather than swallowed because
|
|
66
|
+
* a discarded list and a runner nobody enabled a model on are the same `models: []` and opposite
|
|
67
|
+
* facts: only one of them is fixed by re-ticking, and nothing else anywhere would say so.
|
|
68
|
+
*/
|
|
69
|
+
readonly unreadableModels: v.BooleanSchema<undefined>;
|
|
34
70
|
/**
|
|
35
71
|
* Why this stored endpoint is currently unusable under the deployment's runner-URL
|
|
36
72
|
* policy, or `null` when it is fine. A row written while LAN hosts were permitted must
|
|
@@ -49,7 +85,12 @@ export declare const upsertLocalModelEndpointSchema: v.ObjectSchema<{
|
|
|
49
85
|
readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 300, undefined>, v.UrlAction<string, undefined>]>;
|
|
50
86
|
/** Optional bearer key (most local runners ignore it); stored encrypted at rest. */
|
|
51
87
|
readonly apiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
|
|
52
|
-
readonly models: v.ArraySchema<v.
|
|
88
|
+
readonly models: v.ArraySchema<v.ObjectSchema<{
|
|
89
|
+
/** The model id as the runner serves it (e.g. `muse-glimmer:30b`). */
|
|
90
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
|
|
91
|
+
/** Whether this runner serves the model with IMAGE input. Absent ⇒ not declared. */
|
|
92
|
+
readonly acceptsImages: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
93
|
+
}, undefined>, undefined>;
|
|
53
94
|
}, undefined>;
|
|
54
95
|
export type UpsertLocalModelEndpointInput = v.InferOutput<typeof upsertLocalModelEndpointSchema>;
|
|
55
96
|
/** Probe a runner endpoint for reachability + the models it currently serves. */
|
|
@@ -62,7 +103,11 @@ export type TestLocalModelEndpointInput = v.InferOutput<typeof testLocalModelEnd
|
|
|
62
103
|
/** The result of probing a runner endpoint's `/models`. */
|
|
63
104
|
export declare const localModelEndpointTestResultSchema: v.ObjectSchema<{
|
|
64
105
|
readonly reachable: v.BooleanSchema<undefined>;
|
|
65
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Model ids the runner reports (empty when unreachable). Bare ids, NOT declarations: the
|
|
108
|
+
* probe reads an OpenAI-compatible `/models` list, which carries no modality, and inventing
|
|
109
|
+
* one here would put a guess where {@link localModelDeclarationSchema} keeps an absence.
|
|
110
|
+
*/
|
|
66
111
|
readonly models: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
67
112
|
/** Human-readable failure reason when `reachable` is false. */
|
|
68
113
|
readonly error: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localModels.d.ts","sourceRoot":"","sources":["../src/localModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAe5B,oFAAoF;AACpF,eAAO,MAAM,aAAa,YAAI,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAA;AAC1F,eAAO,MAAM,iBAAiB,4FAA4B,CAAA;AAC1D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE,8DAA8D;AAC9D,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAMpE,CAAA;AAED,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAM3D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,YACnC,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EACzB,+BAA+B,EAC/B,mBAAmB,EACnB,gBAAgB,CACR,CAAA;AACV,eAAO,MAAM,0BAA0B,gLAAuC,CAAA;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;IAInC,kEAAkE;;IAElE,oFAAoF;;
|
|
1
|
+
{"version":3,"file":"localModels.d.ts","sourceRoot":"","sources":["../src/localModels.ts"],"names":[],"mappings":"AAAA,OAAO,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AAM/E,qFAAqF;AACrF,eAAO,MAAM,8BAA8B;;;;IAIzC,oFAAoF;;;QAjEpF,sEAAsE;;QAEtE,oFAAoF;;;aAkEpF,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAEhG,iFAAiF;AACjF,eAAO,MAAM,4BAA4B;;;;aAIvC,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAE5F,2DAA2D;AAC3D,eAAO,MAAM,kCAAkC;;IAE7C;;;;OAIG;;IAEH,+DAA+D;;IAE/D;;;;OAIG;;aAEH,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kCAAkC,CAAC,CAAA"}
|
package/dist/localModels.js
CHANGED
|
@@ -34,6 +34,29 @@ export const LOCAL_RUNNER_LABELS = {
|
|
|
34
34
|
vllm: 'vLLM',
|
|
35
35
|
custom: 'Custom',
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* One model a user has ENABLED on a runner, plus what they have DECLARED about it.
|
|
39
|
+
*
|
|
40
|
+
* The id alone is not enough, because a local model is not in the curated catalog: nothing
|
|
41
|
+
* upstream knows whether `muse-glimmer:30b` reads images the way a `MODEL_CATALOG` entry's
|
|
42
|
+
* flavour declares it. The OpenAI-compatible `/models` probe cannot answer it either (it
|
|
43
|
+
* returns ids and nothing else), so the person who pulled the weights is the only source
|
|
44
|
+
* there is, and this is where they say so.
|
|
45
|
+
*
|
|
46
|
+
* `acceptsImages` is deliberately THREE-STATE, mirroring `ModelRef.acceptsImages`:
|
|
47
|
+
* `true` (the runner serves it with image input), `false` (declared text-only) and ABSENT
|
|
48
|
+
* (nobody has said). The third is the default and is NOT a "no": a run withholds the design
|
|
49
|
+
* renders either way, but reports `unknown_model_image_input` rather than
|
|
50
|
+
* `model_no_image_input`, which is the difference between "declare it and this works" and
|
|
51
|
+
* "this model cannot". Collapsing them would let a multimodal local model read as text-only
|
|
52
|
+
* forever with nothing saying the platform never asked.
|
|
53
|
+
*/
|
|
54
|
+
export const localModelDeclarationSchema = v.object({
|
|
55
|
+
/** The model id as the runner serves it (e.g. `muse-glimmer:30b`). */
|
|
56
|
+
id: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200)),
|
|
57
|
+
/** Whether this runner serves the model with IMAGE input. Absent ⇒ not declared. */
|
|
58
|
+
acceptsImages: v.optional(v.boolean()),
|
|
59
|
+
});
|
|
37
60
|
/**
|
|
38
61
|
* Why a runner base URL is refused by the deployment's local-runner policy. The SPA maps
|
|
39
62
|
* each member to translated copy (`localModels.urlReason.*`), so the operator-facing
|
|
@@ -60,8 +83,15 @@ export const localModelEndpointSchema = v.object({
|
|
|
60
83
|
baseUrl: v.string(),
|
|
61
84
|
/** Whether a (write-only) API key is stored for this endpoint. */
|
|
62
85
|
hasApiKey: v.boolean(),
|
|
63
|
-
/** The
|
|
64
|
-
models: v.array(
|
|
86
|
+
/** The models the user has enabled from this runner, with what they declared about each. */
|
|
87
|
+
models: v.array(localModelDeclarationSchema),
|
|
88
|
+
/**
|
|
89
|
+
* Whether part of this endpoint's stored model list could not be READ and was discarded (a row
|
|
90
|
+
* written before declarations existed held bare strings). Reported rather than swallowed because
|
|
91
|
+
* a discarded list and a runner nobody enabled a model on are the same `models: []` and opposite
|
|
92
|
+
* facts: only one of them is fixed by re-ticking, and nothing else anywhere would say so.
|
|
93
|
+
*/
|
|
94
|
+
unreadableModels: v.boolean(),
|
|
65
95
|
/**
|
|
66
96
|
* Why this stored endpoint is currently unusable under the deployment's runner-URL
|
|
67
97
|
* policy, or `null` when it is fine. A row written while LAN hosts were permitted must
|
|
@@ -75,7 +105,6 @@ export const localModelEndpointSchema = v.object({
|
|
|
75
105
|
const baseUrlSchema = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(300), v.url());
|
|
76
106
|
const labelSchema = v.pipe(v.string(), v.trim(), v.maxLength(60));
|
|
77
107
|
const apiKeySchema = v.pipe(v.string(), v.maxLength(400));
|
|
78
|
-
const modelIdSchema = v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200));
|
|
79
108
|
/** Create or replace the signed-in user's endpoint for a runner (one per runner). */
|
|
80
109
|
export const upsertLocalModelEndpointSchema = v.object({
|
|
81
110
|
provider: localRunnerSchema,
|
|
@@ -83,7 +112,7 @@ export const upsertLocalModelEndpointSchema = v.object({
|
|
|
83
112
|
baseUrl: baseUrlSchema,
|
|
84
113
|
/** Optional bearer key (most local runners ignore it); stored encrypted at rest. */
|
|
85
114
|
apiKey: v.optional(apiKeySchema),
|
|
86
|
-
models: v.array(
|
|
115
|
+
models: v.array(localModelDeclarationSchema),
|
|
87
116
|
});
|
|
88
117
|
/** Probe a runner endpoint for reachability + the models it currently serves. */
|
|
89
118
|
export const testLocalModelEndpointSchema = v.object({
|
|
@@ -94,7 +123,11 @@ export const testLocalModelEndpointSchema = v.object({
|
|
|
94
123
|
/** The result of probing a runner endpoint's `/models`. */
|
|
95
124
|
export const localModelEndpointTestResultSchema = v.object({
|
|
96
125
|
reachable: v.boolean(),
|
|
97
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* Model ids the runner reports (empty when unreachable). Bare ids, NOT declarations: the
|
|
128
|
+
* probe reads an OpenAI-compatible `/models` list, which carries no modality, and inventing
|
|
129
|
+
* one here would put a guess where {@link localModelDeclarationSchema} keeps an absence.
|
|
130
|
+
*/
|
|
98
131
|
models: v.array(v.string()),
|
|
99
132
|
/** Human-readable failure reason when `reachable` is false. */
|
|
100
133
|
error: v.optional(v.string()),
|
package/dist/localModels.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localModels.js","sourceRoot":"","sources":["../src/localModels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,6EAA6E;AAC7E,6EAA6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AW,EAAE,CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC;CACpD,CAAC,CAAA"}
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
/** The personal password's length bounds, named so a message about them cannot drift from it. */
|
|
3
|
+
export declare const PERSONAL_PASSWORD_MIN_LENGTH = 6;
|
|
4
|
+
export declare const PERSONAL_PASSWORD_MAX_LENGTH = 256;
|
|
2
5
|
/**
|
|
3
6
|
* The personal password that gates the second encryption layer (6–256 chars). Restricted
|
|
4
7
|
* to printable ASCII so the same value can ride **raw** in the `X-Personal-Password`
|
|
5
8
|
* request header (see below) when unlocking a run — HTTP header values must be Latin-1, so
|
|
6
9
|
* a non-ASCII password could not be sent without encoding. Never stored server-side.
|
|
10
|
+
*
|
|
11
|
+
* A SPACE is printable, so a leading or trailing one is part of a legal password. Anything that
|
|
12
|
+
* collects this value must therefore not trim it: see {@link personalPasswordProblem}.
|
|
7
13
|
*/
|
|
8
14
|
export declare const personalPasswordSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 6, undefined>, v.MaxLengthAction<string, 256, undefined>, v.RegexAction<string, "Password must use printable ASCII characters (no tabs/newlines).">]>;
|
|
15
|
+
/**
|
|
16
|
+
* Why a candidate personal password would be refused, in words for a human, or `null` when it
|
|
17
|
+
* would be accepted.
|
|
18
|
+
*
|
|
19
|
+
* It exists because more than one surface has to STATE this rule while collecting the value (the
|
|
20
|
+
* acceptance suite's terminal prompt today, any local check a form adds tomorrow), and a
|
|
21
|
+
* hand-written "must be at least 6 characters" beside the schema is the copy that goes stale the
|
|
22
|
+
* day the schema moves. Checked with the schema itself and worded from the same constants.
|
|
23
|
+
*
|
|
24
|
+
* Deliberately no trimming, here or in the callers: a space is printable ASCII, so `" hunter2"` is
|
|
25
|
+
* a legal stored password, and a collector that trimmed it would send a DIFFERENT password than the
|
|
26
|
+
* one typed and report the deployment's `wrong_password` as if the operator had mistyped.
|
|
27
|
+
*/
|
|
28
|
+
export declare function personalPasswordProblem(candidate: string): string | null;
|
|
9
29
|
/**
|
|
10
30
|
* HTTP header carrying the personal password to unlock a run's individual-usage
|
|
11
31
|
* credential(s). It is an AMBIENT credential — like the bearer token, the client attaches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personal-subscriptions.d.ts","sourceRoot":"","sources":["../src/personal-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAwB5B
|
|
1
|
+
{"version":3,"file":"personal-subscriptions.d.ts","sourceRoot":"","sources":["../src/personal-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAwB5B,iGAAiG;AACjG,eAAO,MAAM,4BAA4B,IAAI,CAAA;AAC7C,eAAO,MAAM,4BAA4B,MAAM,CAAA;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,uOAKlC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWxE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,wBAAwB,CAAA;AAE7D,kFAAkF;AAClF,eAAO,MAAM,+BAA+B;;;IAG1C,sFAAsF;;IAEtF,8EAA8E;;IAE9E;;;OAGG;;aAEH,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAElG,uFAAuF;AACvF,eAAO,MAAM,gCAAgC;;;;;;IAM3C,4DAA4D;;IAE5D,gFAAgF;;IAEhF,4DAA4D;;IAE5D,iFAAiF;;aAEjF,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAE/F,eAAO,MAAM,8BAA8B;;;;;;IAXzC,4DAA4D;;IAE5D,gFAAgF;;IAEhF,4DAA4D;;IAE5D,iFAAiF;;yBAKI,CAAA;AACvF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,8BAA8B,CAAC,CAAA"}
|
|
@@ -20,13 +20,45 @@ import { subscriptionVendorSchema } from './vendor-credentials.js';
|
|
|
20
20
|
// the primary at-rest protection. See docs/individual-subscription-usage.md §3 for the
|
|
21
21
|
// honest threat model + the full safeguards.
|
|
22
22
|
// ---------------------------------------------------------------------------
|
|
23
|
+
/** The personal password's length bounds, named so a message about them cannot drift from it. */
|
|
24
|
+
export const PERSONAL_PASSWORD_MIN_LENGTH = 6;
|
|
25
|
+
export const PERSONAL_PASSWORD_MAX_LENGTH = 256;
|
|
23
26
|
/**
|
|
24
27
|
* The personal password that gates the second encryption layer (6–256 chars). Restricted
|
|
25
28
|
* to printable ASCII so the same value can ride **raw** in the `X-Personal-Password`
|
|
26
29
|
* request header (see below) when unlocking a run — HTTP header values must be Latin-1, so
|
|
27
30
|
* a non-ASCII password could not be sent without encoding. Never stored server-side.
|
|
31
|
+
*
|
|
32
|
+
* A SPACE is printable, so a leading or trailing one is part of a legal password. Anything that
|
|
33
|
+
* collects this value must therefore not trim it: see {@link personalPasswordProblem}.
|
|
28
34
|
*/
|
|
29
|
-
export const personalPasswordSchema = v.pipe(v.string(), v.minLength(
|
|
35
|
+
export const personalPasswordSchema = v.pipe(v.string(), v.minLength(PERSONAL_PASSWORD_MIN_LENGTH), v.maxLength(PERSONAL_PASSWORD_MAX_LENGTH), v.regex(/^[\x20-\x7e]+$/, 'Password must use printable ASCII characters (no tabs/newlines).'));
|
|
36
|
+
/**
|
|
37
|
+
* Why a candidate personal password would be refused, in words for a human, or `null` when it
|
|
38
|
+
* would be accepted.
|
|
39
|
+
*
|
|
40
|
+
* It exists because more than one surface has to STATE this rule while collecting the value (the
|
|
41
|
+
* acceptance suite's terminal prompt today, any local check a form adds tomorrow), and a
|
|
42
|
+
* hand-written "must be at least 6 characters" beside the schema is the copy that goes stale the
|
|
43
|
+
* day the schema moves. Checked with the schema itself and worded from the same constants.
|
|
44
|
+
*
|
|
45
|
+
* Deliberately no trimming, here or in the callers: a space is printable ASCII, so `" hunter2"` is
|
|
46
|
+
* a legal stored password, and a collector that trimmed it would send a DIFFERENT password than the
|
|
47
|
+
* one typed and report the deployment's `wrong_password` as if the operator had mistyped.
|
|
48
|
+
*/
|
|
49
|
+
export function personalPasswordProblem(candidate) {
|
|
50
|
+
if (candidate.length === 0)
|
|
51
|
+
return 'No password entered.';
|
|
52
|
+
if (candidate.length < PERSONAL_PASSWORD_MIN_LENGTH) {
|
|
53
|
+
return `A personal password is at least ${PERSONAL_PASSWORD_MIN_LENGTH} characters; this one is ${candidate.length}.`;
|
|
54
|
+
}
|
|
55
|
+
if (candidate.length > PERSONAL_PASSWORD_MAX_LENGTH) {
|
|
56
|
+
return `A personal password is at most ${PERSONAL_PASSWORD_MAX_LENGTH} characters; this one is ${candidate.length}.`;
|
|
57
|
+
}
|
|
58
|
+
return v.is(personalPasswordSchema, candidate)
|
|
59
|
+
? null
|
|
60
|
+
: 'A personal password must use printable ASCII only (it travels as an HTTP header, which is Latin-1).';
|
|
61
|
+
}
|
|
30
62
|
/**
|
|
31
63
|
* HTTP header carrying the personal password to unlock a run's individual-usage
|
|
32
64
|
* credential(s). It is an AMBIENT credential — like the bearer token, the client attaches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personal-subscriptions.js","sourceRoot":"","sources":["../src/personal-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAElE,8EAA8E;AAC9E,2DAA2D;AAC3D,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,6EAA6E;AAC7E,gFAAgF;AAChF,6EAA6E;AAC7E,uFAAuF;AACvF,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AAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,4DAA4D;IAC5D,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,gFAAgF;IAChF,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACrC,4DAA4D;IAC5D,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,iFAAiF;IACjF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;CACvB,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAA"}
|
|
@@ -61,6 +61,16 @@ export declare const publicApiKeySchema: v.ObjectSchema<{
|
|
|
61
61
|
* value that could move would retro-attribute every run it already started.
|
|
62
62
|
*/
|
|
63
63
|
readonly externalIdentity: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
64
|
+
/**
|
|
65
|
+
* The user (`usr_*`) whose PERSONAL subscriptions this key may unlock, or `null` for a key that
|
|
66
|
+
* did not opt in (the default, and every headlessly-minted key).
|
|
67
|
+
*
|
|
68
|
+
* Always equal to {@link publicApiKeySchema.entries.createdByUserId} when set: a person binds
|
|
69
|
+
* their OWN key, and there is no way to name anyone else. Reading it as "this key can act as
|
|
70
|
+
* this user" overstates it — it admits the per-run personal-credential unlock and nothing more,
|
|
71
|
+
* and only on a call that also carries that user's personal password.
|
|
72
|
+
*/
|
|
73
|
+
readonly actsAsUserId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
64
74
|
readonly createdAt: v.NumberSchema<undefined>;
|
|
65
75
|
readonly lastUsedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
66
76
|
/** Set when the key was revoked (tombstone); a revoked key never authenticates. */
|
|
@@ -94,6 +104,16 @@ export declare const publicApiKeyListResultSchema: v.ObjectSchema<{
|
|
|
94
104
|
* value that could move would retro-attribute every run it already started.
|
|
95
105
|
*/
|
|
96
106
|
readonly externalIdentity: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* The user (`usr_*`) whose PERSONAL subscriptions this key may unlock, or `null` for a key that
|
|
109
|
+
* did not opt in (the default, and every headlessly-minted key).
|
|
110
|
+
*
|
|
111
|
+
* Always equal to {@link publicApiKeySchema.entries.createdByUserId} when set: a person binds
|
|
112
|
+
* their OWN key, and there is no way to name anyone else. Reading it as "this key can act as
|
|
113
|
+
* this user" overstates it — it admits the per-run personal-credential unlock and nothing more,
|
|
114
|
+
* and only on a call that also carries that user's personal password.
|
|
115
|
+
*/
|
|
116
|
+
readonly actsAsUserId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
97
117
|
readonly createdAt: v.NumberSchema<undefined>;
|
|
98
118
|
readonly lastUsedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
99
119
|
/** Set when the key was revoked (tombstone); a revoked key never authenticates. */
|
|
@@ -111,6 +131,25 @@ export type PublicApiKeyListResult = v.InferOutput<typeof publicApiKeyListResult
|
|
|
111
131
|
export declare const createPublicApiKeySchema: v.ObjectSchema<{
|
|
112
132
|
readonly label: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>;
|
|
113
133
|
readonly scope: v.OptionalSchema<v.PicklistSchema<readonly ["read", "write", "decide", "admin"], undefined>, "write">;
|
|
134
|
+
/**
|
|
135
|
+
* Which of the two IDENTITIES this key runs as. The default, `false`, is a SYSTEM key: its runs
|
|
136
|
+
* are attributed to nobody and it can reach no personal (individual-usage) subscription at all,
|
|
137
|
+
* so a task pinned to such a model is refused rather than charged to a person who is not there.
|
|
138
|
+
* `true` binds the key to the person minting it, so a run it starts is theirs and may unlock
|
|
139
|
+
* THEIR subscription with the password supplied on that same call.
|
|
140
|
+
*
|
|
141
|
+
* Both are first-class, and an integration should hold the narrower one unless it specifically
|
|
142
|
+
* needs the other: a shared CI credential wants system, and a developer driving their own
|
|
143
|
+
* headless runs wants self. That is also why the field is not merely a capability toggle — it
|
|
144
|
+
* decides whose credentials, spend and merge-policy role a run answers to.
|
|
145
|
+
*
|
|
146
|
+
* A boolean rather than a user id, and that is the safety property rather than an ergonomic
|
|
147
|
+
* one: the only value the server will write is the caller's own id, so the wire shape cannot
|
|
148
|
+
* express minting a key onto someone else's subscription. Refused outright when there is no
|
|
149
|
+
* signed-in user to bind (a dev-open mint), because a key bound to nobody would silently behave
|
|
150
|
+
* like a system one at the moment a run needed the credential.
|
|
151
|
+
*/
|
|
152
|
+
readonly actsAsSelf: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
114
153
|
}, undefined>;
|
|
115
154
|
export type CreatePublicApiKeyInput = v.InferOutput<typeof createPublicApiKeySchema>;
|
|
116
155
|
/**
|
|
@@ -190,6 +229,16 @@ export declare const createdPublicApiKeySchema: v.ObjectSchema<{
|
|
|
190
229
|
* value that could move would retro-attribute every run it already started.
|
|
191
230
|
*/
|
|
192
231
|
readonly externalIdentity: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
232
|
+
/**
|
|
233
|
+
* The user (`usr_*`) whose PERSONAL subscriptions this key may unlock, or `null` for a key that
|
|
234
|
+
* did not opt in (the default, and every headlessly-minted key).
|
|
235
|
+
*
|
|
236
|
+
* Always equal to {@link publicApiKeySchema.entries.createdByUserId} when set: a person binds
|
|
237
|
+
* their OWN key, and there is no way to name anyone else. Reading it as "this key can act as
|
|
238
|
+
* this user" overstates it — it admits the per-run personal-credential unlock and nothing more,
|
|
239
|
+
* and only on a call that also carries that user's personal password.
|
|
240
|
+
*/
|
|
241
|
+
readonly actsAsUserId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
193
242
|
readonly createdAt: v.NumberSchema<undefined>;
|
|
194
243
|
readonly lastUsedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
195
244
|
/** Set when the key was revoked (tombstone); a revoked key never authenticates. */
|