@celestia-island/hikari 0.54.3 → 0.54.4
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/package.json
CHANGED
|
@@ -10,19 +10,40 @@ import { getModelMeta, registerModelCatalog } from "./HkModelCatalog";
|
|
|
10
10
|
* keeps unknown-to-nothing lineups legible.
|
|
11
11
|
*/
|
|
12
12
|
const WORLD_LINEUP = [
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// integration world_service `agent_models` (world_content.json) — the
|
|
14
|
+
// model ids demo cruise cards actually carry today.
|
|
15
|
+
"gpt-5.6-sol-pro",
|
|
16
|
+
"claude-sonnet-5",
|
|
15
17
|
"deepseek-v4-pro",
|
|
16
|
-
"
|
|
17
|
-
"gemini-3.1-flash-preview",
|
|
18
|
+
"gemini-3.1-flash-lite",
|
|
18
19
|
"gpt-5.5-pro",
|
|
19
|
-
"gemini-
|
|
20
|
-
"gpt-5.
|
|
21
|
-
"
|
|
20
|
+
"gemini-2.5-pro",
|
|
21
|
+
"gpt-5.6-luna",
|
|
22
|
+
"deepseek-v4-flash",
|
|
23
|
+
"gemini-3.5-flash",
|
|
22
24
|
"claude-haiku-4-5",
|
|
23
|
-
"
|
|
24
|
-
"qwen3.
|
|
25
|
-
"
|
|
25
|
+
"qwen3.6:35b-a3b",
|
|
26
|
+
"qwen3.6:27b",
|
|
27
|
+
"gpt-5.4-nano",
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/** demo db/seed.sql provider lists — every registry spelling, including the
|
|
31
|
+
* dotted Anthropic aliases, must resolve on its own (exact-match lookup). */
|
|
32
|
+
const REGISTRY_LINEUP = [
|
|
33
|
+
"claude-sonnet-5", "claude-fable-5", "claude-opus-4.8-fast", "claude-opus-4.8",
|
|
34
|
+
"claude-opus-4.7", "claude-sonnet-4.6", "claude-haiku-4-5", "claude-haiku-4.5",
|
|
35
|
+
"claude-opus-4.5",
|
|
36
|
+
"gpt-5.6-terra-pro", "gpt-5.6-terra", "gpt-5.6-sol-pro", "gpt-5.6-sol",
|
|
37
|
+
"gpt-5.6-luna-pro", "gpt-5.6-luna", "gpt-5.5-pro", "gpt-5.5", "gpt-5.4",
|
|
38
|
+
"gpt-5.4-mini", "gpt-5.4-nano",
|
|
39
|
+
"gemini-3.5-flash", "gemini-3.1-flash-lite", "gemini-3.1-flash-image",
|
|
40
|
+
"gemini-3.1-flash-lite-image", "gemini-3-pro-image", "gemini-2.5-pro",
|
|
41
|
+
"gemini-2.5-flash", "gemini-2.5-flash-lite",
|
|
42
|
+
"deepseek-v4-pro", "deepseek-v4-flash", "deepseek-v3.2",
|
|
43
|
+
"deepseek-v3.1-terminus", "deepseek-chat-v3.1",
|
|
44
|
+
"glm-5.2", "glm-5.1", "glm-5", "glm-5-turbo", "glm-4.7-flashx",
|
|
45
|
+
"glm-4.7-flash", "glm-4.6v",
|
|
46
|
+
"qwen3.6:35b-a3b", "qwen3.6:27b",
|
|
26
47
|
];
|
|
27
48
|
|
|
28
49
|
describe("HkModelCatalog builtin specs", () => {
|
|
@@ -34,9 +55,18 @@ describe("HkModelCatalog builtin specs", () => {
|
|
|
34
55
|
}
|
|
35
56
|
});
|
|
36
57
|
|
|
58
|
+
it("resolves every demo registry spelling, dotted aliases included", () => {
|
|
59
|
+
for (const model of REGISTRY_LINEUP) {
|
|
60
|
+
const meta = getModelMeta(model);
|
|
61
|
+
expect(meta, `${model} resolves`).toBeDefined();
|
|
62
|
+
expect(meta?.contextWindow ?? 0, `${model} window`).toBeGreaterThan(0);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
37
66
|
it("keeps ollama-style colon tags whole (only # splits)", () => {
|
|
67
|
+
expect(getModelMeta("qwen3.6:27b")?.contextWindow).toBe(262_144);
|
|
68
|
+
expect(getModelMeta("qwen3.6:35b-a3b")?.contextWindow).toBe(262_144);
|
|
38
69
|
expect(getModelMeta("qwen3.7:14b")?.contextWindow).toBe(262_144);
|
|
39
|
-
expect(getModelMeta("qwen3.8:27b")?.contextWindow).toBe(262_144);
|
|
40
70
|
});
|
|
41
71
|
|
|
42
72
|
it("still strips a #tag before lookup", () => {
|
|
@@ -117,6 +117,185 @@ const BUILTIN_CATALOG: HModelCatalog = {
|
|
|
117
117
|
contextWindow: 262_144, maxOutput: 32_768,
|
|
118
118
|
vision: false, reasoning: true, tools: true,
|
|
119
119
|
},
|
|
120
|
+
|
|
121
|
+
// ── Demo registry generation (integration db/seed.sql provider lists +
|
|
122
|
+
// world_service agent_models). Every id a demo card can carry must
|
|
123
|
+
// resolve here, or its context ring degrades to the empty "–" state.
|
|
124
|
+
// Anthropic — dotted ids are the registry's own spellings, kept as
|
|
125
|
+
// first-class entries so exact-match lookup never misses.
|
|
126
|
+
"claude-sonnet-5": {
|
|
127
|
+
contextWindow: 200_000, maxOutput: 64_000,
|
|
128
|
+
pricing: { in: 3, out: 15, cached: 0.3 },
|
|
129
|
+
vision: true, reasoning: true, tools: true,
|
|
130
|
+
},
|
|
131
|
+
"claude-fable-5": {
|
|
132
|
+
contextWindow: 200_000, maxOutput: 32_000,
|
|
133
|
+
pricing: { in: 3, out: 15 },
|
|
134
|
+
vision: true, reasoning: false, tools: true,
|
|
135
|
+
},
|
|
136
|
+
"claude-opus-4.8": {
|
|
137
|
+
contextWindow: 200_000, maxOutput: 64_000,
|
|
138
|
+
pricing: { in: 5, out: 25, cached: 0.5 },
|
|
139
|
+
vision: true, reasoning: true, tools: true,
|
|
140
|
+
},
|
|
141
|
+
"claude-opus-4.8-fast": {
|
|
142
|
+
contextWindow: 200_000, maxOutput: 32_000,
|
|
143
|
+
pricing: { in: 3, out: 15, cached: 0.5 },
|
|
144
|
+
vision: true, reasoning: true, tools: true,
|
|
145
|
+
},
|
|
146
|
+
"claude-opus-4.7": {
|
|
147
|
+
contextWindow: 200_000, maxOutput: 32_000,
|
|
148
|
+
pricing: { in: 5, out: 25, cached: 0.5 },
|
|
149
|
+
vision: true, reasoning: true, tools: true,
|
|
150
|
+
},
|
|
151
|
+
"claude-opus-4.5": {
|
|
152
|
+
contextWindow: 200_000, maxOutput: 32_000,
|
|
153
|
+
pricing: { in: 5, out: 25 },
|
|
154
|
+
vision: true, reasoning: true, tools: true,
|
|
155
|
+
},
|
|
156
|
+
"claude-sonnet-4.6": {
|
|
157
|
+
contextWindow: 200_000, maxOutput: 32_000,
|
|
158
|
+
pricing: { in: 3, out: 15, cached: 0.3 },
|
|
159
|
+
vision: true, reasoning: false, tools: true,
|
|
160
|
+
},
|
|
161
|
+
"claude-haiku-4.5": {
|
|
162
|
+
contextWindow: 200_000, maxOutput: 32_000,
|
|
163
|
+
pricing: { in: 0.8, out: 4, cached: 0.08 },
|
|
164
|
+
vision: false, reasoning: false, tools: true,
|
|
165
|
+
},
|
|
166
|
+
// OpenAI — the 5.6 terra/sol/luna tiers.
|
|
167
|
+
"gpt-5.6-terra-pro": {
|
|
168
|
+
contextWindow: 400_000, maxOutput: 100_000,
|
|
169
|
+
pricing: { in: 12, out: 60, cached: 1.2 },
|
|
170
|
+
vision: true, reasoning: true, tools: true,
|
|
171
|
+
},
|
|
172
|
+
"gpt-5.6-terra": {
|
|
173
|
+
contextWindow: 400_000, maxOutput: 64_000,
|
|
174
|
+
pricing: { in: 6, out: 30, cached: 0.6 },
|
|
175
|
+
vision: true, reasoning: true, tools: true,
|
|
176
|
+
},
|
|
177
|
+
"gpt-5.6-sol-pro": {
|
|
178
|
+
contextWindow: 400_000, maxOutput: 100_000,
|
|
179
|
+
pricing: { in: 10, out: 50, cached: 1 },
|
|
180
|
+
vision: true, reasoning: true, tools: true,
|
|
181
|
+
},
|
|
182
|
+
"gpt-5.6-sol": {
|
|
183
|
+
contextWindow: 400_000, maxOutput: 64_000,
|
|
184
|
+
pricing: { in: 5, out: 30, cached: 0.5 },
|
|
185
|
+
vision: true, reasoning: true, tools: true,
|
|
186
|
+
},
|
|
187
|
+
"gpt-5.6-luna-pro": {
|
|
188
|
+
contextWindow: 400_000, maxOutput: 64_000,
|
|
189
|
+
pricing: { in: 4, out: 20, cached: 0.4 },
|
|
190
|
+
vision: true, reasoning: true, tools: true,
|
|
191
|
+
},
|
|
192
|
+
"gpt-5.6-luna": {
|
|
193
|
+
contextWindow: 400_000, maxOutput: 32_000,
|
|
194
|
+
pricing: { in: 1.5, out: 10, cached: 0.15 },
|
|
195
|
+
vision: true, reasoning: true, tools: true,
|
|
196
|
+
},
|
|
197
|
+
"gpt-5.4-mini": {
|
|
198
|
+
contextWindow: 400_000, maxOutput: 32_000,
|
|
199
|
+
pricing: { in: 1.1, out: 4.4, cached: 0.11 },
|
|
200
|
+
vision: false, reasoning: false, tools: true,
|
|
201
|
+
},
|
|
202
|
+
// Google — 3.1 image variants and the 2.5 series.
|
|
203
|
+
"gemini-3.1-flash-lite": {
|
|
204
|
+
contextWindow: 1_000_000, maxOutput: 32_000,
|
|
205
|
+
pricing: { in: 0.5, out: 3 },
|
|
206
|
+
vision: true, reasoning: false, tools: true,
|
|
207
|
+
},
|
|
208
|
+
"gemini-3.1-flash-image": {
|
|
209
|
+
contextWindow: 1_000_000, maxOutput: 32_000,
|
|
210
|
+
pricing: { in: 1.5, out: 9 },
|
|
211
|
+
vision: true, reasoning: false, tools: true,
|
|
212
|
+
},
|
|
213
|
+
"gemini-3.1-flash-lite-image": {
|
|
214
|
+
contextWindow: 1_000_000, maxOutput: 32_000,
|
|
215
|
+
pricing: { in: 0.5, out: 3 },
|
|
216
|
+
vision: true, reasoning: false, tools: true,
|
|
217
|
+
},
|
|
218
|
+
"gemini-3-pro-image": {
|
|
219
|
+
contextWindow: 1_000_000, maxOutput: 64_000,
|
|
220
|
+
pricing: { in: 5, out: 30 },
|
|
221
|
+
vision: true, reasoning: true, tools: true,
|
|
222
|
+
},
|
|
223
|
+
"gemini-2.5-pro": {
|
|
224
|
+
contextWindow: 1_000_000, maxOutput: 64_000,
|
|
225
|
+
pricing: { in: 1.25, out: 10 },
|
|
226
|
+
vision: true, reasoning: true, tools: true,
|
|
227
|
+
},
|
|
228
|
+
"gemini-2.5-flash": {
|
|
229
|
+
contextWindow: 1_000_000, maxOutput: 64_000,
|
|
230
|
+
pricing: { in: 0.3, out: 2.5 },
|
|
231
|
+
vision: true, reasoning: false, tools: true,
|
|
232
|
+
},
|
|
233
|
+
"gemini-2.5-flash-lite": {
|
|
234
|
+
contextWindow: 1_000_000, maxOutput: 64_000,
|
|
235
|
+
pricing: { in: 0.1, out: 0.4 },
|
|
236
|
+
vision: true, reasoning: false, tools: true,
|
|
237
|
+
},
|
|
238
|
+
// DeepSeek — the v3 line the registry still serves.
|
|
239
|
+
"deepseek-v3.2": {
|
|
240
|
+
contextWindow: 128_000, maxOutput: 8_000,
|
|
241
|
+
pricing: { in: 0.3, out: 1.2 },
|
|
242
|
+
vision: false, reasoning: true, tools: true,
|
|
243
|
+
},
|
|
244
|
+
"deepseek-v3.1-terminus": {
|
|
245
|
+
contextWindow: 128_000, maxOutput: 8_000,
|
|
246
|
+
pricing: { in: 0.3, out: 1.2 },
|
|
247
|
+
vision: false, reasoning: true, tools: true,
|
|
248
|
+
},
|
|
249
|
+
"deepseek-chat-v3.1": {
|
|
250
|
+
contextWindow: 128_000, maxOutput: 8_000,
|
|
251
|
+
pricing: { in: 0.3, out: 1.2 },
|
|
252
|
+
vision: false, reasoning: false, tools: true,
|
|
253
|
+
},
|
|
254
|
+
// Zhipu GLM — the 5.x / 4.7 line.
|
|
255
|
+
"glm-5.2": {
|
|
256
|
+
contextWindow: 200_000, maxOutput: 32_000,
|
|
257
|
+
pricing: { in: 1, out: 4 },
|
|
258
|
+
vision: false, reasoning: true, tools: true,
|
|
259
|
+
},
|
|
260
|
+
"glm-5.1": {
|
|
261
|
+
contextWindow: 128_000, maxOutput: 32_000,
|
|
262
|
+
pricing: { in: 0.8, out: 3 },
|
|
263
|
+
vision: false, reasoning: true, tools: true,
|
|
264
|
+
},
|
|
265
|
+
"glm-5": {
|
|
266
|
+
contextWindow: 128_000, maxOutput: 32_000,
|
|
267
|
+
pricing: { in: 0.7, out: 2.8 },
|
|
268
|
+
vision: false, reasoning: true, tools: true,
|
|
269
|
+
},
|
|
270
|
+
"glm-5-turbo": {
|
|
271
|
+
contextWindow: 128_000, maxOutput: 16_000,
|
|
272
|
+
pricing: { in: 0.3, out: 1.2 },
|
|
273
|
+
vision: false, reasoning: false, tools: true,
|
|
274
|
+
},
|
|
275
|
+
"glm-4.7-flashx": {
|
|
276
|
+
contextWindow: 128_000, maxOutput: 16_000,
|
|
277
|
+
pricing: { in: 0.2, out: 0.8 },
|
|
278
|
+
vision: false, reasoning: false, tools: true,
|
|
279
|
+
},
|
|
280
|
+
"glm-4.7-flash": {
|
|
281
|
+
contextWindow: 128_000, maxOutput: 8_000,
|
|
282
|
+
pricing: { in: 0.1, out: 0.4 },
|
|
283
|
+
vision: false, reasoning: false, tools: true,
|
|
284
|
+
},
|
|
285
|
+
"glm-4.6v": {
|
|
286
|
+
contextWindow: 128_000, maxOutput: 16_000,
|
|
287
|
+
pricing: { in: 0.6, out: 2.4 },
|
|
288
|
+
vision: true, reasoning: false, tools: true,
|
|
289
|
+
},
|
|
290
|
+
// Ollama local — the qwen3.6 GGUF lineup.
|
|
291
|
+
"qwen3.6:35b-a3b": {
|
|
292
|
+
contextWindow: 262_144, maxOutput: 32_768,
|
|
293
|
+
vision: false, reasoning: true, tools: true,
|
|
294
|
+
},
|
|
295
|
+
"qwen3.6:27b": {
|
|
296
|
+
contextWindow: 262_144, maxOutput: 32_768,
|
|
297
|
+
vision: false, reasoning: true, tools: true,
|
|
298
|
+
},
|
|
120
299
|
};
|
|
121
300
|
|
|
122
301
|
/**
|
|
@@ -149,8 +149,13 @@ describe("stylesheet descender-clipping contract", () => {
|
|
|
149
149
|
it("never pairs a clip box with a line box shorter than the ink box", { timeout: 60_000 }, () => {
|
|
150
150
|
const findings: string[] = [];
|
|
151
151
|
const allowed = new Set(ALLOWED.map((entry) => `${entry.file}|${entry.selector}`));
|
|
152
|
+
const files = sheets();
|
|
153
|
+
// The scan above only fails when it actually sees sheets; a moved/renamed
|
|
154
|
+
// styles directory would otherwise make it pass over an empty input set.
|
|
155
|
+
expect(files.length, "stylesheets discovered for the scan").toBeGreaterThan(100);
|
|
156
|
+
let clipRulesSeen = 0;
|
|
152
157
|
|
|
153
|
-
for (const file of
|
|
158
|
+
for (const file of files) {
|
|
154
159
|
const name = file.slice(file.indexOf("/src/") + 1);
|
|
155
160
|
// sass keeps `/* … */` comments in expanded output, and a comment that
|
|
156
161
|
// *talks* about `overflow: hidden` or `line-height: 1` would otherwise be
|
|
@@ -163,6 +168,7 @@ describe("stylesheet descender-clipping contract", () => {
|
|
|
163
168
|
const blocks = [...blocksOf(css, name)];
|
|
164
169
|
for (const block of blocks) {
|
|
165
170
|
if (!clipsOverflow(block.body)) continue;
|
|
171
|
+
clipRulesSeen++;
|
|
166
172
|
const ratio = effectiveRatio(block, blocks);
|
|
167
173
|
if (ratio === null || ratio >= SAFE_LINE_HEIGHT_RATIO) continue;
|
|
168
174
|
if (allowed.has(`${block.file}|${block.selector}`)) continue;
|
|
@@ -172,9 +178,54 @@ describe("stylesheet descender-clipping contract", () => {
|
|
|
172
178
|
}
|
|
173
179
|
}
|
|
174
180
|
|
|
181
|
+
expect(clipRulesSeen, "clip boxes discovered across the sheets").toBeGreaterThan(20);
|
|
175
182
|
expect(findings.sort(), "clip boxes whose line box is too short for the font's ink").toEqual([]);
|
|
176
183
|
});
|
|
177
184
|
|
|
185
|
+
it("keeps the reviewed rules descender-safe", { timeout: 60_000 }, () => {
|
|
186
|
+
// The generic scan above only inspects rules that declare `overflow`
|
|
187
|
+
// themselves. These rules were fixed for the same class but carry no clip
|
|
188
|
+
// in-tree — `.hk-gauge-ring-value` is centred inside the ring and gets its
|
|
189
|
+
// clip from whatever host wrapper truncates — so a refactor that quietly
|
|
190
|
+
// drops their ratio would pass the scan. Pin them by selector.
|
|
191
|
+
const pinned: ReadonlyArray<{ file: string; selector: string; minRatio: number }> = [
|
|
192
|
+
{ file: "HkColorPicker.scss", selector: ".hk-color-picker-label", minRatio: 1.4 },
|
|
193
|
+
{ file: "HkStatCard.scss", selector: ".hk-stat-card-value", minRatio: 1.3 },
|
|
194
|
+
{ file: "HkGaugeRing.scss", selector: ".hk-gauge-ring-value", minRatio: 1.4 },
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
const compiled = new Map<string, ReturnType<typeof compile>["css"]>();
|
|
198
|
+
const found: string[] = [];
|
|
199
|
+
for (const pin of pinned) {
|
|
200
|
+
const file = resolve(componentDir, pin.file);
|
|
201
|
+
if (!compiled.has(file)) {
|
|
202
|
+
compiled.set(
|
|
203
|
+
file,
|
|
204
|
+
compile(file, { style: "expanded", loadPaths: [componentDir, stylesDir] }).css.replace(
|
|
205
|
+
/\/\*[\s\S]*?\*\//g,
|
|
206
|
+
"",
|
|
207
|
+
),
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
const css = compiled.get(file)!;
|
|
211
|
+
const block = [...blocksOf(css, pin.file)].find((entry) => entry.selector === pin.selector);
|
|
212
|
+
if (!block) {
|
|
213
|
+
found.push(`${pin.file} — ${pin.selector} — the pinned rule no longer exists`);
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
const ratio = ratioOf(block.body);
|
|
217
|
+
if (ratio === null) {
|
|
218
|
+
found.push(`${pin.file} — ${pin.selector} — declares no line-height of its own any more`);
|
|
219
|
+
} else if (ratio < pin.minRatio) {
|
|
220
|
+
found.push(
|
|
221
|
+
`${pin.file} — ${pin.selector} — line-height ratio ${ratio.toFixed(2)} fell below the reviewed floor ${pin.minRatio}`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
expect(found.sort(), "pinned descender-safe rules regressed").toEqual([]);
|
|
227
|
+
});
|
|
228
|
+
|
|
178
229
|
it("keeps the review list honest", () => {
|
|
179
230
|
const unmatched = ALLOWED.filter((entry) => {
|
|
180
231
|
const file = resolve(componentDir, "..", entry.file.replace(/^src\//, ""));
|