@hearsay-tools/squawk 0.18.0-dev.7439 → 0.18.0-dev.7447
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/agent-config/catalog.d.ts +6 -60
- package/dist/agent-config/catalog.js +12 -337
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/files.js.map +1 -1
- package/dist/agent-config/model-settings/claude.d.ts +1 -1
- package/dist/agent-config/model-settings/codex.d.ts +1 -1
- package/dist/agent-config/model-settings/opencode.d.ts +1 -1
- package/dist/agent-config/model-settings/pi.d.ts +1 -1
- package/dist/agent-config/model-settings/shared.d.ts +1 -1
- package/dist/agent-config/model-settings/shared.js +2 -2
- package/dist/agent-config/model-settings/shared.js.map +1 -1
- package/dist/agent-config/models.d.ts +5 -1
- package/dist/agent-config/models.js +5 -19
- package/dist/agent-config/models.js.map +1 -1
- package/dist/agent-config/seed.js +2 -2
- package/dist/agent-config/seed.js.map +1 -1
- package/dist/agent-config/service.d.ts +1 -1
- package/dist/agent-config/service.js +2 -2
- package/dist/agent-config/service.js.map +1 -1
- package/dist/agent-config/validate.d.ts +1 -1
- package/dist/ci-wait/controller.d.ts +42 -42
- package/dist/core/host-model-catalog.d.ts +2 -1
- package/dist/core/host-model-catalog.js +7 -13
- package/dist/core/host-model-catalog.js.map +1 -1
- package/dist/core/host-skill-catalog.d.ts +5 -2
- package/dist/core/host-skill-catalog.js +9 -12
- package/dist/core/host-skill-catalog.js.map +1 -1
- package/dist/core/model-identity.d.ts +9 -11
- package/dist/core/model-identity.js +12 -28
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +0 -5
- package/dist/core/model-presets.js +11 -30
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/opencode-minimal.js +1 -2
- package/dist/core/opencode-minimal.js.map +1 -1
- package/dist/core/opencode-runtime-config.d.ts +3 -0
- package/dist/core/opencode-runtime-config.js +11 -0
- package/dist/core/opencode-runtime-config.js.map +1 -1
- package/dist/core/pi-runner.js +1 -1
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/core/runner-config-files.d.ts +60 -0
- package/dist/core/runner-config-files.js +2 -0
- package/dist/core/runner-config-files.js.map +1 -0
- package/dist/core/runner-definition.d.ts +33 -0
- package/dist/core/runner-definition.js.map +1 -1
- package/dist/{agent-config/model-settings/types.d.ts → core/runner-model-settings.d.ts} +3 -1
- package/dist/core/runner-model-settings.js +2 -0
- package/dist/core/runner-model-settings.js.map +1 -0
- package/dist/delegation/routes.d.ts +16 -16
- package/dist/delegation/transport.d.ts +74 -74
- package/dist/paths.d.ts +1 -1
- package/dist/runners/claude/config-files.d.ts +7 -0
- package/dist/runners/claude/config-files.js +112 -0
- package/dist/runners/claude/config-files.js.map +1 -0
- package/dist/runners/claude/definition.js +11 -0
- package/dist/runners/claude/definition.js.map +1 -1
- package/dist/runners/claude/extra-tools.d.ts +3 -0
- package/dist/runners/claude/extra-tools.js +4 -0
- package/dist/runners/claude/extra-tools.js.map +1 -0
- package/dist/runners/claude/models.d.ts +3 -0
- package/dist/runners/claude/models.js +16 -0
- package/dist/runners/claude/models.js.map +1 -0
- package/dist/runners/codex/config-files.d.ts +7 -0
- package/dist/runners/codex/config-files.js +58 -0
- package/dist/runners/codex/config-files.js.map +1 -0
- package/dist/runners/codex/definition.js +11 -0
- package/dist/runners/codex/definition.js.map +1 -1
- package/dist/runners/codex/extra-tools.d.ts +3 -0
- package/dist/runners/codex/extra-tools.js +4 -0
- package/dist/runners/codex/extra-tools.js.map +1 -0
- package/dist/runners/codex/models.d.ts +3 -0
- package/dist/runners/codex/models.js +9 -0
- package/dist/runners/codex/models.js.map +1 -0
- package/dist/runners/omp/config-files.d.ts +7 -0
- package/dist/runners/omp/config-files.js +87 -0
- package/dist/runners/omp/config-files.js.map +1 -0
- package/dist/runners/omp/definition.js +14 -0
- package/dist/runners/omp/definition.js.map +1 -1
- package/dist/runners/omp/extra-tools.d.ts +3 -0
- package/dist/runners/omp/extra-tools.js +6 -0
- package/dist/runners/omp/extra-tools.js.map +1 -0
- package/dist/runners/omp/models.d.ts +3 -0
- package/dist/runners/omp/models.js +9 -0
- package/dist/runners/omp/models.js.map +1 -0
- package/dist/runners/opencode/config-files.d.ts +7 -0
- package/dist/runners/opencode/config-files.js +57 -0
- package/dist/runners/opencode/config-files.js.map +1 -0
- package/dist/runners/opencode/definition.js +11 -0
- package/dist/runners/opencode/definition.js.map +1 -1
- package/dist/runners/opencode/extra-tools.d.ts +3 -0
- package/dist/runners/opencode/extra-tools.js +4 -0
- package/dist/runners/opencode/extra-tools.js.map +1 -0
- package/dist/runners/opencode/models.d.ts +3 -0
- package/dist/runners/opencode/models.js +8 -0
- package/dist/runners/opencode/models.js.map +1 -0
- package/dist/runners/pi/config-files.d.ts +7 -0
- package/dist/runners/pi/config-files.js +59 -0
- package/dist/runners/pi/config-files.js.map +1 -0
- package/dist/runners/pi/definition.js +11 -0
- package/dist/runners/pi/definition.js.map +1 -1
- package/dist/runners/pi/extra-tools.d.ts +3 -0
- package/dist/runners/pi/extra-tools.js +7 -0
- package/dist/runners/pi/extra-tools.js.map +1 -0
- package/dist/runners/pi/models.d.ts +3 -0
- package/dist/runners/pi/models.js +15 -0
- package/dist/runners/pi/models.js.map +1 -0
- package/dist/runners/project-agents-file.d.ts +6 -0
- package/dist/runners/project-agents-file.js +19 -0
- package/dist/runners/project-agents-file.js.map +1 -0
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/server.d.ts +254 -254
- package/dist/workflows/types.d.ts +1 -5
- package/dist/workflows/types.js +4 -15
- package/dist/workflows/types.js.map +1 -1
- package/package.json +4 -4
- package/dist/agent-config/model-settings/types.js +0 -2
- package/dist/agent-config/model-settings/types.js.map +0 -1
- package/dist/ci-wait/injection.d.ts +0 -3
- package/dist/ci-wait/injection.js +0 -13
- package/dist/ci-wait/injection.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.js","sourceRoot":"","sources":["../../src/agent-config/seed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAA6B,MAAM,yBAAyB,CAAC;AACrG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"seed.js","sourceRoot":"","sources":["../../src/agent-config/seed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAA6B,MAAM,yBAAyB,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C;;;GAGG;AAEH,KAAK,UAAU,UAAU,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,WAAW,CAAC,QAA6B,EAAE,GAAW,EAAE,SAAS,GAAW,GAAG;IAC7F,OAAO,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,S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CAAC,CAAC;YACnB,CAAC;YAAC,MAAM,CAAC;gBACP,oDAAoD;YACtD,CAAC;QACH,CAAC;QACD,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACrB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ConfigFileDef } from '../core/runner-config-files.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Assembles the `GET /api/agent-config` payload: every catalog file's current
|
|
4
4
|
* on-disk state plus, locally, a read-only listing of the MCP servers Claude
|
|
@@ -2,7 +2,7 @@ import { productIdentity } from '../home/identity.js';
|
|
|
2
2
|
import { defined } from '../core/defined.js';
|
|
3
3
|
import { readFile } from 'node:fs/promises';
|
|
4
4
|
import { agentHomePaths, claudeStateFilePath } from '../paths.js';
|
|
5
|
-
import {
|
|
5
|
+
import { listConfigFiles } from './catalog.js';
|
|
6
6
|
import { hashBytes, statConfigPath } from './files.js';
|
|
7
7
|
const HOSTED_REASON = `agent config is read-only on this remote cockpit; run \`${productIdentity().command} remote-settings enable\` on the host to allow edits`;
|
|
8
8
|
/** ~/.claude.json can be large (per-project history); cap the read. */
|
|
@@ -40,7 +40,7 @@ export async function readUserMcpServers(env) {
|
|
|
40
40
|
}
|
|
41
41
|
export async function listAgentConfig(repoRoot, env, editable) {
|
|
42
42
|
const home = agentHomePaths(env);
|
|
43
|
-
const files = await Promise.all(
|
|
43
|
+
const files = await Promise.all(listConfigFiles().map(async (def) => {
|
|
44
44
|
const path = def.resolve(repoRoot, home);
|
|
45
45
|
const { exists, size } = await statConfigPath(path);
|
|
46
46
|
return defined({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/agent-config/service.ts"],"names":[],"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E,IAAI,CAAC,CAAC;QACzC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;QACpD,OAAO,OAAO,CAAC;YACb,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,IAAI;YACJ,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;YAC3B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC/B,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,MAAM;YACN,IAAI;YACJ,OAAO,EAAE,MAAM,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;YACtC,QAAQ,EAAE,QAAQ;YAClB,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa;SACrD,CAAC,CAAC;IACL,CAAC,CAAC,CACH,CAAC;IACF,OAAO;QACL,QAAQ;QACR,KAAK;QACL,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;KACzD,CAAC;AACJ,CAAC"}
|
|
@@ -282,11 +282,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
282
282
|
"/api/v1/tools/ask": {
|
|
283
283
|
$post: {
|
|
284
284
|
output: {
|
|
285
|
-
|
|
285
|
+
ok: false;
|
|
286
|
+
code: 'unavailable';
|
|
286
287
|
message: string;
|
|
287
288
|
};
|
|
288
289
|
outputFormat: "json";
|
|
289
|
-
status:
|
|
290
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
290
291
|
input: {
|
|
291
292
|
json: {
|
|
292
293
|
questions: {
|
|
@@ -304,12 +305,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
304
305
|
};
|
|
305
306
|
} | {
|
|
306
307
|
output: {
|
|
307
|
-
|
|
308
|
-
code: 'unavailable';
|
|
308
|
+
code: 'capability_revoked';
|
|
309
309
|
message: string;
|
|
310
310
|
};
|
|
311
311
|
outputFormat: "json";
|
|
312
|
-
status:
|
|
312
|
+
status: 401;
|
|
313
313
|
input: {
|
|
314
314
|
json: {
|
|
315
315
|
questions: {
|
|
@@ -377,11 +377,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
377
377
|
"/api/v1/tools/cancel-wait": {
|
|
378
378
|
$post: {
|
|
379
379
|
output: {
|
|
380
|
-
|
|
380
|
+
cancelled: false;
|
|
381
|
+
code: 'unavailable';
|
|
381
382
|
message: string;
|
|
382
383
|
};
|
|
383
384
|
outputFormat: "json";
|
|
384
|
-
status:
|
|
385
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
385
386
|
input: {
|
|
386
387
|
json: {
|
|
387
388
|
wait_id: string;
|
|
@@ -389,12 +390,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
389
390
|
};
|
|
390
391
|
} | {
|
|
391
392
|
output: {
|
|
392
|
-
|
|
393
|
-
code: 'unavailable';
|
|
393
|
+
code: 'capability_revoked';
|
|
394
394
|
message: string;
|
|
395
395
|
};
|
|
396
396
|
outputFormat: "json";
|
|
397
|
-
status:
|
|
397
|
+
status: 401;
|
|
398
398
|
input: {
|
|
399
399
|
json: {
|
|
400
400
|
wait_id: string;
|
|
@@ -442,11 +442,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
442
442
|
"/api/v1/tools/done": {
|
|
443
443
|
$post: {
|
|
444
444
|
output: {
|
|
445
|
-
|
|
445
|
+
ok: false;
|
|
446
|
+
code: 'unavailable';
|
|
446
447
|
message: string;
|
|
447
448
|
};
|
|
448
449
|
outputFormat: "json";
|
|
449
|
-
status:
|
|
450
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
450
451
|
input: {
|
|
451
452
|
json: {
|
|
452
453
|
summary?: string | undefined;
|
|
@@ -454,12 +455,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
454
455
|
};
|
|
455
456
|
} | {
|
|
456
457
|
output: {
|
|
457
|
-
|
|
458
|
-
code: 'unavailable';
|
|
458
|
+
code: 'capability_revoked';
|
|
459
459
|
message: string;
|
|
460
460
|
};
|
|
461
461
|
outputFormat: "json";
|
|
462
|
-
status:
|
|
462
|
+
status: 401;
|
|
463
463
|
input: {
|
|
464
464
|
json: {
|
|
465
465
|
summary?: string | undefined;
|
|
@@ -542,11 +542,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
542
542
|
"/api/v1/tools/preview-stop": {
|
|
543
543
|
$post: {
|
|
544
544
|
output: {
|
|
545
|
-
|
|
545
|
+
ok: boolean;
|
|
546
|
+
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
546
547
|
message: string;
|
|
548
|
+
hint: string;
|
|
547
549
|
};
|
|
548
550
|
outputFormat: "json";
|
|
549
|
-
status:
|
|
551
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
550
552
|
input: {
|
|
551
553
|
json: {
|
|
552
554
|
port: number;
|
|
@@ -555,13 +557,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
555
557
|
};
|
|
556
558
|
} | {
|
|
557
559
|
output: {
|
|
558
|
-
|
|
559
|
-
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
560
|
+
code: 'capability_revoked';
|
|
560
561
|
message: string;
|
|
561
|
-
hint: string;
|
|
562
562
|
};
|
|
563
563
|
outputFormat: "json";
|
|
564
|
-
status:
|
|
564
|
+
status: 401;
|
|
565
565
|
input: {
|
|
566
566
|
json: {
|
|
567
567
|
port: number;
|
|
@@ -574,11 +574,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
574
574
|
"/api/v1/tools/preview-serve": {
|
|
575
575
|
$post: {
|
|
576
576
|
output: {
|
|
577
|
-
|
|
577
|
+
ok: boolean;
|
|
578
|
+
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
578
579
|
message: string;
|
|
580
|
+
hint: string;
|
|
579
581
|
};
|
|
580
582
|
outputFormat: "json";
|
|
581
|
-
status:
|
|
583
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
582
584
|
input: {
|
|
583
585
|
json: {
|
|
584
586
|
command: string;
|
|
@@ -590,13 +592,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
590
592
|
};
|
|
591
593
|
} | {
|
|
592
594
|
output: {
|
|
593
|
-
|
|
594
|
-
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
595
|
+
code: 'capability_revoked';
|
|
595
596
|
message: string;
|
|
596
|
-
hint: string;
|
|
597
597
|
};
|
|
598
598
|
outputFormat: "json";
|
|
599
|
-
status:
|
|
599
|
+
status: 401;
|
|
600
600
|
input: {
|
|
601
601
|
json: {
|
|
602
602
|
command: string;
|
|
@@ -612,11 +612,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
612
612
|
"/api/v1/tools/automation": {
|
|
613
613
|
$post: {
|
|
614
614
|
output: {
|
|
615
|
-
|
|
615
|
+
ok: false;
|
|
616
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
616
617
|
message: string;
|
|
617
618
|
};
|
|
618
619
|
outputFormat: "json";
|
|
619
|
-
status:
|
|
620
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
620
621
|
input: {
|
|
621
622
|
json: {
|
|
622
623
|
action: "create";
|
|
@@ -696,12 +697,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
696
697
|
};
|
|
697
698
|
} | {
|
|
698
699
|
output: {
|
|
699
|
-
|
|
700
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
700
|
+
code: 'capability_revoked';
|
|
701
701
|
message: string;
|
|
702
702
|
};
|
|
703
703
|
outputFormat: "json";
|
|
704
|
-
status:
|
|
704
|
+
status: 401;
|
|
705
705
|
input: {
|
|
706
706
|
json: {
|
|
707
707
|
action: "create";
|
|
@@ -957,11 +957,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
957
957
|
"/api/v1/tools/schedule-task": {
|
|
958
958
|
$post: {
|
|
959
959
|
output: {
|
|
960
|
-
|
|
960
|
+
ok: false;
|
|
961
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
961
962
|
message: string;
|
|
962
963
|
};
|
|
963
964
|
outputFormat: "json";
|
|
964
|
-
status:
|
|
965
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
965
966
|
input: {
|
|
966
967
|
json: {
|
|
967
968
|
at?: string | undefined;
|
|
@@ -978,12 +979,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
978
979
|
};
|
|
979
980
|
} | {
|
|
980
981
|
output: {
|
|
981
|
-
|
|
982
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
982
|
+
code: 'capability_revoked';
|
|
983
983
|
message: string;
|
|
984
984
|
};
|
|
985
985
|
outputFormat: "json";
|
|
986
|
-
status:
|
|
986
|
+
status: 401;
|
|
987
987
|
input: {
|
|
988
988
|
json: {
|
|
989
989
|
at?: string | undefined;
|
|
@@ -1038,11 +1038,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
1038
1038
|
"/api/v1/tools/scheduled-tasks": {
|
|
1039
1039
|
$post: {
|
|
1040
1040
|
output: {
|
|
1041
|
-
|
|
1041
|
+
ok: false;
|
|
1042
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
1042
1043
|
message: string;
|
|
1043
1044
|
};
|
|
1044
1045
|
outputFormat: "json";
|
|
1045
|
-
status:
|
|
1046
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
1046
1047
|
input: {
|
|
1047
1048
|
json: {
|
|
1048
1049
|
at?: string | undefined;
|
|
@@ -1075,12 +1076,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
1075
1076
|
};
|
|
1076
1077
|
} | {
|
|
1077
1078
|
output: {
|
|
1078
|
-
|
|
1079
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
1079
|
+
code: 'capability_revoked';
|
|
1080
1080
|
message: string;
|
|
1081
1081
|
};
|
|
1082
1082
|
outputFormat: "json";
|
|
1083
|
-
status:
|
|
1083
|
+
status: 401;
|
|
1084
1084
|
input: {
|
|
1085
1085
|
json: {
|
|
1086
1086
|
at?: string | undefined;
|
|
@@ -2,6 +2,7 @@ import type { ModelDiscoveryRunner } from '../contract/index.js';
|
|
|
2
2
|
import type { RunnerModelCatalogAdapter } from './runner-model-catalog.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Host model-discovery adapters, exhaustive over modelDiscoveryRunnerSchema. Keep the map and
|
|
5
|
-
* RUNNER_IDS guard aligned so a missing adapter fails validation.
|
|
5
|
+
* RUNNER_IDS guard aligned so a missing adapter fails validation. Each adapter loads its runner's
|
|
6
|
+
* catalog through the registered definition's `loadModelCatalog` when it first discovers.
|
|
6
7
|
*/
|
|
7
8
|
export declare function hostModelCatalogAdapters(cwd: string): Record<ModelDiscoveryRunner, RunnerModelCatalogAdapter>;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { discoverOpencodeModels } from './opencode-model-catalog.js';
|
|
4
|
-
import { discoverPiModels } from './pi-model-catalog.js';
|
|
5
|
-
import { discoverOmpModels } from './omp-model-catalog.js';
|
|
1
|
+
import { RUNNER_IDS } from './agent-runner.js';
|
|
2
|
+
import { runnerDefinition } from './runner-registry.js';
|
|
6
3
|
/**
|
|
7
4
|
* Host model-discovery adapters, exhaustive over modelDiscoveryRunnerSchema. Keep the map and
|
|
8
|
-
* RUNNER_IDS guard aligned so a missing adapter fails validation.
|
|
5
|
+
* RUNNER_IDS guard aligned so a missing adapter fails validation. Each adapter loads its runner's
|
|
6
|
+
* catalog through the registered definition's `loadModelCatalog` when it first discovers.
|
|
9
7
|
*/
|
|
10
8
|
export function hostModelCatalogAdapters(cwd) {
|
|
11
|
-
return {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
opencode: { discover: () => discoverOpencodeModels({ cwd }) },
|
|
15
|
-
pi: { discover: () => discoverPiModels({ cwd }) },
|
|
16
|
-
omp: { discover: () => discoverOmpModels({ cwd }) },
|
|
17
|
-
};
|
|
9
|
+
return Object.fromEntries(RUNNER_IDS.map(runner => [runner, {
|
|
10
|
+
discover: async () => (await runnerDefinition(runner).loadModelCatalog())({ cwd }),
|
|
11
|
+
}]));
|
|
18
12
|
}
|
|
19
13
|
//# sourceMappingURL=host-model-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-model-catalog.js","sourceRoot":"","sources":["../../src/core/host-model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"host-model-catalog.js","sourceRoot":"","sources":["../../src/core/host-model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,GAAW;IAClD,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;YAC1D,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;SACnF,CAAC,CAAC,CAA4D,CAAC;AAClE,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type RunnerId } from './agent-runner.ts';
|
|
2
2
|
import type { RunnerSkillCatalogAdapter } from './runner-skill-catalog.ts';
|
|
3
3
|
import type { SkillDiscoveryOptions } from './skill-probe.ts';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Each caller supplies its folder and account home. Each adapter loads its runner's skill list
|
|
6
|
+
* through the registered definition's `loadSkillCatalog` when it first discovers.
|
|
7
|
+
*/
|
|
5
8
|
export declare function hostSkillCatalogAdapters(overrides?: Partial<Record<RunnerId, SkillDiscoveryOptions['bin']>>): Record<RunnerId, RunnerSkillCatalogAdapter>;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { RUNNER_IDS } from './agent-runner.js';
|
|
2
|
+
import { runnerDefinition } from './runner-registry.js';
|
|
3
|
+
/**
|
|
4
|
+
* Each caller supplies its folder and account home. Each adapter loads its runner's skill list
|
|
5
|
+
* through the registered definition's `loadSkillCatalog` when it first discovers.
|
|
6
|
+
*/
|
|
7
7
|
export function hostSkillCatalogAdapters(overrides = {}) {
|
|
8
|
-
const adapter = (runner
|
|
9
|
-
discover: (query, signal) =>
|
|
8
|
+
const adapter = (runner) => ({
|
|
9
|
+
discover: async (query, signal) => (await runnerDefinition(runner).loadSkillCatalog())({ ...query, bin: overrides[runner], signal }),
|
|
10
10
|
});
|
|
11
|
-
return
|
|
12
|
-
claude: adapter('claude', discoverClaudeSkills), codex: adapter('codex', discoverCodexSkills),
|
|
13
|
-
opencode: adapter('opencode', discoverOpencodeSkills), pi: adapter('pi', discoverPiSkills), omp: adapter('omp', discoverOmpSkills),
|
|
14
|
-
};
|
|
11
|
+
return Object.fromEntries(RUNNER_IDS.map(runner => [runner, adapter(runner)]));
|
|
15
12
|
}
|
|
16
13
|
//# sourceMappingURL=host-skill-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-skill-catalog.js","sourceRoot":"","sources":["../../src/core/host-skill-catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"host-skill-catalog.js","sourceRoot":"","sources":["../../src/core/host-skill-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIxD;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,SAAS,GAA4D,EAAE;IAC9G,MAAM,OAAO,GAAG,CAAC,MAAgB,EAA6B,EAAE,CAAC,CAAC;QAChE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACrI,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAgD,CAAC;AAChI,CAAC"}
|
|
@@ -28,9 +28,10 @@ export declare class ModelIdentityError extends Error {
|
|
|
28
28
|
* so future models and new backends are never silently rejected — an exported
|
|
29
29
|
* roster of "providers Squawk names today" would gate nothing, and an unused
|
|
30
30
|
* public export reads as a contract someone must keep current. The per-backend
|
|
31
|
-
* knowledge that IS load-bearing lives in `
|
|
31
|
+
* knowledge that IS load-bearing lives in each runner definition's `models.idMap`.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
/** How one runner maps a model id: its definition's `models.idMap` (`runners/<id>/models.ts`). */
|
|
34
|
+
export interface BackendModelMap {
|
|
34
35
|
/**
|
|
35
36
|
* The provider a bare (provider-less) model id belongs to for this backend.
|
|
36
37
|
* `undefined` marks a backend that spans providers and therefore requires an
|
|
@@ -49,15 +50,13 @@ interface BackendModelMap {
|
|
|
49
50
|
readonly providerByModel?: Readonly<Record<string, string>>;
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* through on the way in — not, as the comment used to imply, a mapping for a
|
|
58
|
-
* value the store could never load.
|
|
53
|
+
* The model id map of `backend`: the registered definition's `models.idMap`. `claude-cli` is the
|
|
54
|
+
* legacy id kept so old run records normalise identically to `claude`: `storedRunnerSchema`
|
|
55
|
+
* (`runs/store.ts`) parses the legacy spelling out of `runs.json` and folds it to `claude` (#547),
|
|
56
|
+
* and a lookup resolves it through the registry's legacy map first. An id that no runner
|
|
57
|
+
* registered has no map.
|
|
59
58
|
*/
|
|
60
|
-
export declare
|
|
59
|
+
export declare function backendModelMap(backend: AgentBackend): BackendModelMap | undefined;
|
|
61
60
|
/** Serialize a canonical identity to its `provider/model` string form. */
|
|
62
61
|
export declare function formatModelIdentity(id: ModelIdentity): string;
|
|
63
62
|
/**
|
|
@@ -105,4 +104,3 @@ export declare function normalizeModelForBackend(backend: AgentBackend, raw: str
|
|
|
105
104
|
backendModel: string;
|
|
106
105
|
identity: ModelIdentity;
|
|
107
106
|
} | undefined;
|
|
108
|
-
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isRegisteredRunner, LEGACY_RUNNER_IDS, runnerDefinition } from './runner-registry.js';
|
|
1
2
|
/**
|
|
2
3
|
* Thrown when a non-empty model string cannot be resolved to a canonical
|
|
3
4
|
* identity for the chosen backend (a bare id on a backend that spans
|
|
@@ -11,33 +12,16 @@ export class ModelIdentityError extends Error {
|
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* through on the way in — not, as the comment used to imply, a mapping for a
|
|
20
|
-
* value the store could never load.
|
|
15
|
+
* The model id map of `backend`: the registered definition's `models.idMap`. `claude-cli` is the
|
|
16
|
+
* legacy id kept so old run records normalise identically to `claude`: `storedRunnerSchema`
|
|
17
|
+
* (`runs/store.ts`) parses the legacy spelling out of `runs.json` and folds it to `claude` (#547),
|
|
18
|
+
* and a lookup resolves it through the registry's legacy map first. An id that no runner
|
|
19
|
+
* registered has no map.
|
|
21
20
|
*/
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
'claude-cli': { defaultProvider: 'anthropic', allowExplicitProvider: true, wireProviderQualified: true },
|
|
27
|
-
// Codex selects the provider from model_provider in config.toml. A foreign
|
|
28
|
-
// explicit prefix is accepted only when the caller proves it matches that
|
|
29
|
-
// effective setting; the provider is then stripped from the wire model id.
|
|
30
|
-
codex: { defaultProvider: 'openai' },
|
|
31
|
-
// opencode selects across providers, so a bare model is ambiguous: reject it
|
|
32
|
-
// loudly rather than let the server pick a default the user never asked for.
|
|
33
|
-
opencode: {},
|
|
34
|
-
// pi selects across providers with the same `provider/model` convention as
|
|
35
|
-
// opencode (#387) — no default provider, so a bare model is rejected loudly
|
|
36
|
-
// and `toBackendModel` hands pi the full `provider/model` on its `--model`.
|
|
37
|
-
pi: {},
|
|
38
|
-
// OMP is pi's fork: `provider/model`, no default provider, so a bare model is rejected loudly.
|
|
39
|
-
omp: {},
|
|
40
|
-
};
|
|
21
|
+
export function backendModelMap(backend) {
|
|
22
|
+
const id = LEGACY_RUNNER_IDS.get(backend) ?? backend;
|
|
23
|
+
return isRegisteredRunner(id) ? runnerDefinition(id).models.idMap : undefined;
|
|
24
|
+
}
|
|
41
25
|
const SLASH = '/';
|
|
42
26
|
/** Serialize a canonical identity to its `provider/model` string form. */
|
|
43
27
|
export function formatModelIdentity(id) {
|
|
@@ -77,7 +61,7 @@ export function parseModelIdentity(raw) {
|
|
|
77
61
|
export function resolveModelIdentity(backend, raw, options = {}) {
|
|
78
62
|
if (!raw || !raw.trim())
|
|
79
63
|
return undefined;
|
|
80
|
-
const map =
|
|
64
|
+
const map = backendModelMap(backend) ?? {};
|
|
81
65
|
const configuredProvider = options.configuredProvider?.trim().toLowerCase() || undefined;
|
|
82
66
|
const effectiveProvider = configuredProvider ?? map.defaultProvider;
|
|
83
67
|
const explicit = parseModelIdentity(raw);
|
|
@@ -109,7 +93,7 @@ export function resolveModelIdentity(backend, raw, options = {}) {
|
|
|
109
93
|
* they re-split into their own request shape.
|
|
110
94
|
*/
|
|
111
95
|
export function toBackendModel(backend, id) {
|
|
112
|
-
const map =
|
|
96
|
+
const map = backendModelMap(backend) ?? {};
|
|
113
97
|
if (map.defaultProvider === undefined)
|
|
114
98
|
return formatModelIdentity(id);
|
|
115
99
|
if (map.allowExplicitProvider &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-identity.js","sourceRoot":"","sources":["../../src/core/model-identity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-identity.js","sourceRoot":"","sources":["../../src/core/model-identity.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAA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AAM,IAAI,kBAAkB,CAC1B,UAAU,KAAK,0BAA0B,OAAO,mEAAmE,KAAK,GAAG,CAC5H,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,OAAqB,EAAE,EAAiB;IACrE,MAAM,GAAG,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAC3C,IAAI,GAAG,CAAC,eAAe,KAAK,SAAS;QAAE,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACtE,IACE,GAAG,CAAC,qBAAqB;QACzB,GAAG,CAAC,qBAAqB;QACzB,EAAE,CAAC,QAAQ,KAAK,GAAG,CAAC,eAAe,EACnC,CAAC;QACD,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,EAAE,CAAC,KAAK,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAqB,EACrB,GAAuB,EACvB,OAAO,GAAgD,EAAE;IAEzD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC7D,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChC,OAAO,EAAE,YAAY,EAAE,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { RunnerId } from './agent-runner.ts';
|
|
2
|
-
/**
|
|
3
|
-
* Known per-runner picker presets, mirrored for mismatch checks. This is not a whitelist:
|
|
4
|
-
* unknown custom ids remain valid. OpenCode uses native discovery plus a structural guard.
|
|
5
|
-
*/
|
|
6
|
-
export declare const KNOWN_PRESETS_BY_RUNNER: Record<RunnerId, readonly string[]>;
|
|
7
2
|
/** True when `model` is recognizably a preset of a runner OTHER than `runner` (and not also one
|
|
8
3
|
* of `runner`'s own presets), or when its provider prefix is one this runner is known not to
|
|
9
4
|
* serve. `''`/unknown/custom ids never conflict. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { backendModelMap, parseModelIdentity } from './model-identity.js';
|
|
2
|
+
import { isRegisteredRunner, registeredRunners, runnerDefinition } from './runner-registry.js';
|
|
2
3
|
/**
|
|
3
4
|
* The vendor prefixes this module treats as evidence of a mis-paired model. Deliberately local
|
|
4
5
|
* rather than an export of `model-identity.ts` (#548/#831): nothing else may gate on it, because
|
|
@@ -8,32 +9,12 @@ import { BACKEND_MODEL_MAP, parseModelIdentity } from './model-identity.js';
|
|
|
8
9
|
*/
|
|
9
10
|
const KNOWN_PROVIDERS = ['anthropic', 'openai', 'google', 'openrouter'];
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
12
|
+
* The runner's known picker presets: its definition's `models.known`, mirrored for mismatch
|
|
13
|
+
* checks. An id that no runner registered has none.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'sonnet',
|
|
18
|
-
'haiku',
|
|
19
|
-
'claude-fable-5',
|
|
20
|
-
'claude-opus-4-8',
|
|
21
|
-
'claude-sonnet-5',
|
|
22
|
-
'claude-haiku-4-5',
|
|
23
|
-
],
|
|
24
|
-
codex: ['gpt-5.1-codex', 'gpt-5.1-codex-mini', 'gpt-5-codex'],
|
|
25
|
-
opencode: [],
|
|
26
|
-
// pi lists nothing for the same reason OpenCode does (#794), plus one of its own: it picks a
|
|
27
|
-
// model with the canonical `provider/model` convention and has no default provider, so the
|
|
28
|
-
// structural check in {@link modelConflictsWithRunner} already guards it without vendor
|
|
29
|
-
// knowledge. Listing pi's composer presets here would actively break OpenCode — the ids
|
|
30
|
-
// overlap (`anthropic/claude-sonnet-5`), and a shared id present in pi's list but absent from
|
|
31
|
-
// OpenCode's empty one would read as "another runner's preset" and be refused.
|
|
32
|
-
pi: [],
|
|
33
|
-
// omp lists nothing for pi's reason: `provider/model` ids with no default provider, so the
|
|
34
|
-
// structural check in {@link modelConflictsWithRunner} guards it without vendor knowledge.
|
|
35
|
-
omp: [],
|
|
36
|
-
};
|
|
15
|
+
function knownPresets(runner) {
|
|
16
|
+
return isRegisteredRunner(runner) ? runnerDefinition(runner).models.known : undefined;
|
|
17
|
+
}
|
|
37
18
|
/**
|
|
38
19
|
* True when the `provider/` prefix on `model` names a provider Squawk knows that this
|
|
39
20
|
* single-provider runner does not serve — `anthropic/…` handed to codex.
|
|
@@ -45,7 +26,7 @@ export const KNOWN_PRESETS_BY_RUNNER = {
|
|
|
45
26
|
* vendor is evidence enough to refuse the pairing up front.
|
|
46
27
|
*/
|
|
47
28
|
function namesAnotherKnownProvider(model, runner) {
|
|
48
|
-
const map =
|
|
29
|
+
const map = backendModelMap(runner);
|
|
49
30
|
// Nothing to contradict: OpenCode spans providers (no default of its own), and Claude Code
|
|
50
31
|
// accepts explicit gateway/custom provider ids by design.
|
|
51
32
|
if (map?.defaultProvider === undefined || map.allowExplicitProvider)
|
|
@@ -61,13 +42,13 @@ function namesAnotherKnownProvider(model, runner) {
|
|
|
61
42
|
export function modelConflictsWithRunner(model, runner) {
|
|
62
43
|
if (!model)
|
|
63
44
|
return false;
|
|
64
|
-
if (
|
|
45
|
+
if (knownPresets(runner)?.includes(model))
|
|
65
46
|
return false;
|
|
66
47
|
// The provider half of the guard needs no vendor model knowledge, so — unlike the preset
|
|
67
48
|
// lists — it keeps holding for models that do not exist yet. That is what lets OpenCode's
|
|
68
|
-
//
|
|
49
|
+
// `models.known` be empty (#794) without losing the protection it used to provide.
|
|
69
50
|
if (namesAnotherKnownProvider(model, runner))
|
|
70
51
|
return true;
|
|
71
|
-
return
|
|
52
|
+
return registeredRunners().some((other) => other.id !== runner && other.models.known.includes(model));
|
|
72
53
|
}
|
|
73
54
|
//# sourceMappingURL=model-presets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-presets.js","sourceRoot":"","sources":["../../src/core/model-presets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"model-presets.js","sourceRoot":"","sources":["../../src/core/model-presets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE/F;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAU,CAAC;AAEjF;;;GAGG;AACH,SAAS,YAAY,CAAC,MAAgB;IACpC,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACxF,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,yBAAyB,CAAC,KAAa,EAAE,MAAgB;IAChE,MAAM,GAAG,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,2FAA2F;IAC3F,0DAA0D;IAC1D,IAAI,GAAG,EAAE,eAAe,KAAK,SAAS,IAAI,GAAG,CAAC,qBAAqB;QAAE,OAAO,KAAK,CAAC;IAClF,MAAM,QAAQ,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,KAAK,GAAG,CAAC,eAAe;QAAE,OAAO,KAAK,CAAC;IACzE,OAAQ,eAAqC,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC5E,CAAC;AAED;;qDAEqD;AACrD,MAAM,UAAU,wBAAwB,CAAC,KAAa,EAAE,MAAgB;IACtE,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,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