@cat-factory/orchestration 0.251.0 → 0.251.1

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.
@@ -3,9 +3,12 @@ import type { PipelineStep } from '@cat-factory/kernel';
3
3
  /**
4
4
  * Fold the CLI's tool-server startup report onto a step, returning whether anything changed.
5
5
  *
6
- * Applied on all three poll paths for the same reason `applyValidationReport` is, plus one of its
7
- * own: the CLI announces its servers ONCE, near the start of the run, so a job that settles
8
- * between two polls is never seen `running` and only its terminal poll can deliver the report.
6
+ * Applied at two sites that between them cover every poll disposition: the live poll, and once in
7
+ * the dispatcher AHEAD of the settled branch tree, so all five persisting arms inherit it (where
8
+ * `applyValidationReport` instead has a call per path). The coverage matters for the same reason
9
+ * as there, plus one of its own: the CLI announces its servers ONCE, near the start of the run, so
10
+ * a job that settles between two polls is never seen `running` and only its terminal poll can
11
+ * deliver the report.
9
12
  *
10
13
  * Two guards that are load-bearing rather than defensive:
11
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"toolServers.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/toolServers.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAA4B,MAAM,wBAAwB,CAAA;AAE1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAYvD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAQlF;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,kBAAkB,EAAE,GAAG,IAAI,CAuBnF"}
1
+ {"version":3,"file":"toolServers.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/toolServers.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAA4B,MAAM,wBAAwB,CAAA;AAE1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAYvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAQlF;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,kBAAkB,EAAE,GAAG,IAAI,CAuBnF"}
@@ -11,9 +11,12 @@ import { isToolServerObservedStatus } from '@cat-factory/contracts';
11
11
  /**
12
12
  * Fold the CLI's tool-server startup report onto a step, returning whether anything changed.
13
13
  *
14
- * Applied on all three poll paths for the same reason `applyValidationReport` is, plus one of its
15
- * own: the CLI announces its servers ONCE, near the start of the run, so a job that settles
16
- * between two polls is never seen `running` and only its terminal poll can deliver the report.
14
+ * Applied at two sites that between them cover every poll disposition: the live poll, and once in
15
+ * the dispatcher AHEAD of the settled branch tree, so all five persisting arms inherit it (where
16
+ * `applyValidationReport` instead has a call per path). The coverage matters for the same reason
17
+ * as there, plus one of its own: the CLI announces its servers ONCE, near the start of the run, so
18
+ * a job that settles between two polls is never seen `running` and only its terminal poll can
19
+ * deliver the report.
17
20
  *
18
21
  * Two guards that are load-bearing rather than defensive:
19
22
  *
@@ -1 +1 @@
1
- {"version":3,"file":"toolServers.logic.js","sourceRoot":"","sources":["../../../src/modules/execution/toolServers.logic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAGnE,0FAA0F;AAC1F,2FAA2F;AAC3F,EAAE;AACF,kGAAkG;AAClG,gGAAgG;AAChG,gGAAgG;AAChG,gGAAgG;AAChG,+FAA+F;AAC/F,wCAAwC;AAExC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAkB,EAAE,GAAY;IACvE,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAA;IAC/B,IAAI,CAAC,MAAM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CAAA;CAC5D;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,4BAA4B,GACjC,mBAAmB,EAAE,CA4FvB;AA+kCD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,4BAA4B,GAAG,IAAI,CAuB9E;AAOD,yGAAyG;AACzG,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,4BAA4B,GAAG,IAAI,CASlF;AAED,uFAAuF;AACvF,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD"}
1
+ {"version":3,"file":"validateRegistrations.d.ts","sourceRoot":"","sources":["../../src/validation/validateRegistrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,OAAO,KAAK,EAEV,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAqD5B,4FAA4F;AAC5F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,iBAAiB,EAAE,iBAAiB,CAAA;IACpC;;;;OAIG;IACH,YAAY,EAAE,YAAY,CAAA;IAC1B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;IACnD;;;;;;OAMG;IACH,2BAA2B,CAAC,EAAE,2BAA2B,CAAA;IACzD;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,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L_SERVER_BUDGET, describeFoundationalProblem, isAllowedMcpHttpUrl, isValidMcpServerId, isValidMcpToolName, mcpServableHarnesses, seedPipelines, stubGateContext, toolServerDeclaredBytes, validateFoundationalDefinition, } from '@cat-factory/kernel';
3
- import { binaryGeneratorDefinitionIssues, descriptorConditionHasPredicate, duplicatedDescriptorSectionCaptions, isDeploymentScopedSource, foundationalServiceDefinitionIssues, isEnvVariableName, isNamespacedId, isReservedPlatformEnvKey, isToolchainEnvName, modalitiesOfMediaType, reservedEnvKeyMessage, toolchainEnvNameMessage, isValidResultViewId, RESULT_VIEW_ID_SET, } from '@cat-factory/contracts';
2
+ import { CI_FIXER_AGENT_KIND, CONFLICT_RESOLVER_AGENT_KIND, FIXER_AGENT_KIND, ON_CALL_AGENT_KIND, describeFoundationalProblem, isAllowedMcpHttpUrl, seedPipelines, stubGateContext, validateFoundationalDefinition, } from '@cat-factory/kernel';
3
+ import { binaryGeneratorDefinitionIssues, descriptorConditionHasPredicate, duplicatedDescriptorSectionCaptions, isDeploymentScopedSource, foundationalServiceDefinitionIssues, isNamespacedId, modalitiesOfMediaType, isValidResultViewId, RESULT_VIEW_ID_SET, } from '@cat-factory/contracts';
4
+ import { checkKindToolServers } from './validateToolServers.js';
4
5
  // ---------------------------------------------------------------------------
5
6
  // Boot-time validation of the deployment's registered extensions (agent kinds, gates,
6
7
  // pipelines). A typo'd gate `helperKind`, an unknown `resultView`, or a pipeline naming a
@@ -435,284 +436,6 @@ function checkKindSkills(kind, registry) {
435
436
  }
436
437
  return problems;
437
438
  }
438
- /**
439
- * A kind's declared TOOL SERVERS: the whole-list checks (unregistered ids, the per-dispatch budget,
440
- * the container surface), with each definition's own checks in
441
- * {@link checkToolServerDefinition}. "Declared for" includes assigned servers, see
442
- * {@link checkAgentCapabilities}.
443
- *
444
- * - an unregistered id is an ERROR, like an unregistered skill;
445
- * - past EITHER dimension of the per-dispatch budget is a WARNING, because the dispatch drops the
446
- * excess under `over_budget` rather than failing: the run still works, with fewer tools than the
447
- * deployment believes it wired, and boot is the only place the DECLARATIONS past the line can be
448
- * named. A warning also keeps the accretion case honest, a kind going over budget through
449
- * `assignToolServers` calls in several packages none of which is individually wrong. Both
450
- * dimensions are checked because the dispatch enforces both, and a byte-driven drop is the one
451
- * that surprises: a handful of servers with fat `env`/`args`/`headers` blocks is under the count
452
- * and over the payload;
453
- * - tool servers on a NON-container kind is a WARNING: an inline LLM call has no CLI to wire them
454
- * into, so they can never take effect. A warning rather than an error because a deployment may
455
- * deliberately declare them ahead of moving the kind onto a container surface.
456
- */
457
- function checkKindToolServers(kind, registry) {
458
- const problems = [];
459
- const tools = registry.toolServersFor(kind);
460
- for (const id of tools.unknown) {
461
- problems.push({
462
- severity: 'error',
463
- code: 'unknown_tool_server',
464
- message: `Agent kind "${kind}" declares tool server "${id}", which is not registered. Call ` +
465
- `registry.registerToolServer({ id: '${id}', … }) before registering the kind, or ` +
466
- `declare the server inline.`,
467
- });
468
- }
469
- for (const server of tools.servers)
470
- problems.push(...checkToolServerDefinition(kind, server));
471
- problems.push(...checkToolServerBudget(kind, tools.servers));
472
- if (tools.servers.length && !runsInContainer(kind, registry)) {
473
- problems.push({
474
- severity: 'warn',
475
- code: 'tool_servers_without_container',
476
- message: `Agent kind "${kind}" declares tool servers but does not run in a container — an ` +
477
- `inline LLM step has no agent CLI to wire them into, so they will never be available. ` +
478
- `Give the kind a container surface (agent.surface: 'container-explore' / ` +
479
- `'container-coding') or drop the tool servers.`,
480
- });
481
- }
482
- return problems;
483
- }
484
- /**
485
- * The per-dispatch budget, BOTH dimensions, as warnings: the dispatch drops the excess under
486
- * `over_budget` and the run works with fewer tools, so a registration fault belongs at boot rather
487
- * than in a refusal that takes the deployment down.
488
- *
489
- * The byte check measures {@link toolServerDeclaredBytes}, which is a FLOOR (a resolved credential
490
- * only adds to it), so a declaration already past the budget here is certainly past it at dispatch.
491
- * What boot deliberately does NOT claim is WHICH servers a run will lose: the dispatch keeps every
492
- * server that still fits, so once bytes are what bind the survivors are not a prefix of the
493
- * declaration. The count and the budget are what the author acts on, and the run itself names each
494
- * server it dropped.
495
- */
496
- function checkToolServerBudget(kind, servers) {
497
- const problems = [];
498
- if (servers.length > TOOL_SERVER_BUDGET.maxServers) {
499
- problems.push({
500
- severity: 'warn',
501
- code: 'too_many_tool_servers',
502
- message: `Agent kind "${kind}" has ${servers.length} tool servers declared for it, past the ` +
503
- `per-dispatch budget of ${TOOL_SERVER_BUDGET.maxServers}. A dispatch wires the first ` +
504
- `${TOOL_SERVER_BUDGET.maxServers} in declaration order and states the rest to the agent as ` +
505
- `unavailable (over_budget). Drop some, or split the work across kinds.`,
506
- });
507
- }
508
- const bytes = servers.reduce((total, server) => total + toolServerDeclaredBytes(server), 0);
509
- if (bytes > TOOL_SERVER_BUDGET.maxTotalBytes) {
510
- problems.push({
511
- severity: 'warn',
512
- code: 'tool_servers_over_byte_budget',
513
- message: `Agent kind "${kind}" declares tool servers whose transport config alone measures ${bytes} ` +
514
- `bytes, past the per-dispatch budget of ${TOOL_SERVER_BUDGET.maxTotalBytes}. A dispatch ` +
515
- `wires servers until that budget is spent and states the rest to the agent as unavailable ` +
516
- `(over_budget); resolved credentials only add to this figure, and which servers lose out ` +
517
- `depends on their sizes. Trim the env/args/headers blocks, or split the work across kinds.`,
518
- });
519
- }
520
- return problems;
521
- }
522
- /**
523
- * ONE tool server definition:
524
- *
525
- * - a malformed MCP server id is an ERROR, because it becomes both a tool-name fragment and a
526
- * Codex TOML table key, so the CLI fails on it far from the registration that caused it;
527
- * - an `allowedTools` entry that is not a valid tool NAME is an ERROR, the comma case above all:
528
- * the harness joins the whole list into one `--allowedTools` argument with commas, so an entry
529
- * carrying one splits into two patterns and the second matches nothing, while the prompt goes on
530
- * advertising the name verbatim. That is the "told about a tool it cannot call" failure the
531
- * unavailability vocabulary exists to prevent;
532
- * - a definition NO harness could ever serve is a WARNING, and it is the only check here a run
533
- * structurally cannot report: an `http` server narrowed to `harnesses: ['codex']` (whose client
534
- * is stdio-only), or anything narrowed to `['pi']` (which has no MCP client), is never dropped
535
- * FOR A REASON on any run. It simply never applies, so no prompt and no log line ever mentions
536
- * it. A warning rather than an error because the declaration is inert rather than dangerous;
537
- * - a cleartext `http://` endpoint off loopback is an ERROR: a resolved credential rides that
538
- * request as a header, and the harness refuses the same URL at the job boundary — so allowing
539
- * it here only moves the failure to a place with no registration to point at.
540
- */
541
- function checkToolServerDefinition(kind, server) {
542
- const problems = [];
543
- const on = `(on agent kind "${kind}")`;
544
- if (!isValidMcpServerId(server.id)) {
545
- problems.push({
546
- severity: 'error',
547
- code: 'invalid_tool_server_id',
548
- message: `Tool server "${server.id}" ${on} has an invalid id. It becomes part of the tool names ` +
549
- `the CLI exposes (mcp__<id>__<tool>) and a Codex config key, so it must match ` +
550
- `[a-z0-9][a-z0-9_-]*.`,
551
- });
552
- }
553
- for (const tool of server.allowedTools ?? []) {
554
- if (isValidMcpToolName(tool))
555
- continue;
556
- problems.push({
557
- severity: 'error',
558
- code: 'invalid_tool_server_tool_name',
559
- message: `Tool server "${server.id}" ${on} restricts allowedTools to "${tool}", which is not a ` +
560
- `single tool name (letters, digits, "_", "." and "-"). The harness joins the list into ` +
561
- `one --allowedTools argument with commas, so an entry with a comma or whitespace becomes ` +
562
- `patterns that match nothing while the prompt still advertises the name. List each tool ` +
563
- `as its own entry.`,
564
- });
565
- }
566
- const servable = mcpServableHarnesses(server);
567
- if (servable.length === 0) {
568
- problems.push({
569
- severity: 'warn',
570
- code: 'tool_server_unservable',
571
- message: `Tool server "${server.id}" ${on} declares transport "${server.transport.kind}" for ` +
572
- `harnesses [${(server.harnesses ?? MCP_SUPPORTED_HARNESSES).join(', ')}], and no harness ` +
573
- `can serve that combination, so the server never applies to any run and no prompt or log ` +
574
- `line will say why. Codex's MCP client is stdio-only and Pi has none at all. Widen the ` +
575
- `harnesses, change the transport, or drop the declaration.`,
576
- });
577
- }
578
- if (server.transport.kind === 'http' && !isAllowedMcpHttpUrl(server.transport.url)) {
579
- problems.push({
580
- severity: 'error',
581
- code: 'insecure_tool_server_url',
582
- message: `Tool server "${server.id}" ${on} has url "${server.transport.url}". An HTTP tool server ` +
583
- `carries its resolved credential in a request header, so the url must be https (plain ` +
584
- `http is accepted only on loopback).`,
585
- });
586
- }
587
- for (const secret of server.secretKeys ?? []) {
588
- problems.push(...checkToolServerSecret(kind, server, secret));
589
- }
590
- problems.push(...checkToolServerOAuth(kind, server));
591
- return problems;
592
- }
593
- /**
594
- * A tool server's OAUTH declaration, when it has one. Four rules, and each of them names a failure
595
- * that is otherwise invisible until a run or a button press:
596
- *
597
- * - `oauth` on a `stdio` server is an ERROR. A stdio server is a child process the CLI spawns;
598
- * there is no request to authorise, so the declaration is inert and reads as configured. The
599
- * dispatch drops the OAuth half silently for the mothership case, which is exactly why boot is
600
- * where the fault has to be named.
601
- * - a declared endpoint that fails the URL floor is an ERROR, and this is the sharpest one here:
602
- * an OAuth exchange carries the client secret and the tokens, so a cleartext endpoint puts both
603
- * on the wire. A DISCOVERED endpoint is held to the same rule at the moment it is read.
604
- * - a reserved `clientSecretKey` is an ERROR for the reason every capability credential is: the
605
- * declaration names both the key it wants and the token endpoint that key is posted to.
606
- * - a `secretKeys` entry naming the same header the access token rides is a WARNING. Both would
607
- * land in one header map and the granted token wins, so the static credential silently does
608
- * nothing — which reads, to whoever declared it, as the platform ignoring their credential.
609
- */
610
- function checkToolServerOAuth(kind, server) {
611
- const oauth = server.oauth;
612
- if (!oauth)
613
- return [];
614
- const problems = [];
615
- const on = `(on agent kind "${kind}")`;
616
- if (server.transport.kind !== 'http') {
617
- problems.push({
618
- severity: 'error',
619
- code: 'oauth_requires_http_transport',
620
- message: `Tool server "${server.id}" ${on} declares OAuth on a "${server.transport.kind}" ` +
621
- `transport. OAuth authenticates a REQUEST, and a stdio server is a child process the ` +
622
- `agent CLI spawns with no request to authorise — pass its credential through secretKeys ` +
623
- `instead.`,
624
- });
625
- }
626
- for (const [field, url] of [
627
- ['authorizationUrl', oauth.authorizationUrl],
628
- ['tokenUrl', oauth.tokenUrl],
629
- ]) {
630
- if (url === undefined || isAllowedMcpHttpUrl(url))
631
- continue;
632
- problems.push({
633
- severity: 'error',
634
- code: 'insecure_oauth_endpoint',
635
- message: `Tool server "${server.id}" ${on} declares OAuth ${field} "${url}". The exchange carries ` +
636
- `the client secret and the access token, so the endpoint must be https (plain http is ` +
637
- `accepted only on loopback).`,
638
- });
639
- }
640
- if (oauth.clientSecretKey !== undefined && isReservedPlatformEnvKey(oauth.clientSecretKey)) {
641
- problems.push({
642
- severity: 'error',
643
- code: 'reserved_credential_key',
644
- message: `Tool server "${server.id}" ${on} declares OAuth client secret ` +
645
- reservedEnvKeyMessage(oauth.clientSecretKey),
646
- });
647
- }
648
- const tokenHeader = (oauth.header ?? MCP_OAUTH_DEFAULT_HEADER).toLowerCase();
649
- for (const secret of server.secretKeys ?? []) {
650
- if (secret.header?.toLowerCase() !== tokenHeader)
651
- continue;
652
- problems.push({
653
- severity: 'warn',
654
- code: 'oauth_header_collision',
655
- message: `Tool server "${server.id}" ${on} declares credential "${secret.key}" on header ` +
656
- `"${secret.header}", which is also where its OAuth access token is sent. The granted ` +
657
- `token wins, so that credential reaches the server as nothing at all — send it under a ` +
658
- `different header, or drop it.`,
659
- });
660
- }
661
- return problems;
662
- }
663
- /**
664
- * ONE credential a tool server declares. The reserved-key check is the sharpest rule in this file:
665
- * a definition names both the key it wants and the endpoint that key is sent to, so
666
- * `{ key: 'ENCRYPTION_KEY', header: 'Authorization' }` is a registration that boots clean and ships
667
- * the deployment's master sealing key to a third party. The generative-integration half of the same
668
- * rule is enforced by its credential SCHEMA (there is no schema here — a tool server is a TypeScript
669
- * registration), and dispatch refuses both again for the mothership case.
670
- */
671
- function checkToolServerSecret(kind, server, secret) {
672
- const problems = [];
673
- const on = `(on agent kind "${kind}")`;
674
- if (isReservedPlatformEnvKey(secret.key)) {
675
- problems.push({
676
- severity: 'error',
677
- code: 'reserved_credential_key',
678
- message: `Tool server "${server.id}" ${on} declares credential ${reservedEnvKeyMessage(secret.key)}`,
679
- });
680
- }
681
- if (secret.envName === undefined)
682
- return problems;
683
- // The injection name is NOT held to the reserved floor (it reads nothing), so it carries its own
684
- // rule: a value set as `PATH` or `npm_config_registry` reconfigures the server's process instead
685
- // of authenticating a call. Dispatch drops one too, for the mothership case.
686
- if (!isEnvVariableName(secret.envName)) {
687
- problems.push({
688
- severity: 'error',
689
- code: 'invalid_credential_env_name',
690
- message: `Tool server "${server.id}" ${on} declares credential envName "${secret.envName}", which ` +
691
- `is not a valid environment variable name. It becomes a variable of the server's process, ` +
692
- `and the harness drops anything else.`,
693
- });
694
- }
695
- if (isToolchainEnvName(secret.envName)) {
696
- problems.push({
697
- severity: 'error',
698
- code: 'toolchain_credential_env_name',
699
- message: `Tool server "${server.id}" ${on} declares credential ${toolchainEnvNameMessage(secret.envName)}`,
700
- });
701
- }
702
- // An `http` server sends its value as a HEADER, so an injection name would be read by nothing.
703
- // A warning rather than an error: the declaration still works, it just says something that cannot
704
- // take effect, and failing boot over it would be out of proportion.
705
- if (server.transport.kind === 'http' && secret.header) {
706
- problems.push({
707
- severity: 'warn',
708
- code: 'unused_credential_env_name',
709
- message: `Tool server "${server.id}" ${on} declares credential envName "${secret.envName}" on a ` +
710
- `key that names a header. An http server's value is sent as that header, so the injection ` +
711
- `name is never used.`,
712
- });
713
- }
714
- return problems;
715
- }
716
439
  /**
717
440
  * Section 3 of {@link collectRegistrationProblems}: a coherence WARNING for a kind that declares
718
441
  * postOps but whose agent step is not structured output — those post-ops read `result.custom` and
@@ -1 +1 @@
1
- {"version":3,"file":"validateRegistrations.js","sourceRoot":"","sources":["../../src/validation/validateRegistrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAenF,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,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AAK,CAAA;AACnB,CAAC"}
1
+ {"version":3,"file":"validateRegistrations.js","sourceRoot":"","sources":["../../src/validation/validateRegistrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAanF,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,8BAA8B,GAC/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAIL,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,wBAAwB,EACxB,mCAAmC,EACnC,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAE/D,8EAA8E;AAC9E,sFAAsF;AACtF,0FAA0F;AAC1F,2FAA2F;AAC3F,yFAAyF;AACzF,2FAA2F;AAC3F,6DAA6D;AAC7D,EAAE;AACF,6FAA6F;AAC7F,2FAA2F;AAC3F,wBAAwB;AACxB,8EAA8E;AAE9E;;wCAEwC;AACxC,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAC;IACzD,mBAAmB;IACnB,4BAA4B;IAC5B,kBAAkB;IAClB,0FAA0F;IAC1F,mDAAmD;IACnD,gBAAgB;CACjB,CAAC,CAAA;AAoJF;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CACzC,IAAkC;IAElC,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAA;IACxE,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,IAAI,qBAAqB,CAAA;IAC3E,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAA;IAClD,MAAM,QAAQ,GAA0B,EAAE,CAAA;IAE1C,MAAM,UAAU,GAAG,QAAQ,CA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,CAAA;AAClB,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,gCAAgC;IAC9C,SAAS,GAAG,KAAK,CAAA;AACnB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { AgentKindRegistry } from '@cat-factory/agents';
2
+ import type { AgentKind } from '@cat-factory/kernel';
3
+ import type { RegistrationProblem } from './validateRegistrations.js';
4
+ /**
5
+ * A kind's declared TOOL SERVERS: the whole-list checks (unregistered ids, the per-dispatch budget,
6
+ * the container surface), with each definition's own checks in
7
+ * {@link checkToolServerDefinition}. "Declared for" includes assigned servers, which is why the
8
+ * capability walk in `validateRegistrations.ts` calls this per KIND rather than per registration.
9
+ *
10
+ * - an unregistered id is an ERROR, like an unregistered skill;
11
+ * - past EITHER dimension of the per-dispatch budget is a WARNING, because the dispatch drops the
12
+ * excess under `over_budget` rather than failing: the run still works, with fewer tools than the
13
+ * deployment believes it wired, and boot is the only place the DECLARATIONS past the line can be
14
+ * named. A warning also keeps the accretion case honest, a kind going over budget through
15
+ * `assignToolServers` calls in several packages none of which is individually wrong. Both
16
+ * dimensions are checked because the dispatch enforces both, and a byte-driven drop is the one
17
+ * that surprises: a handful of servers with fat `env`/`args`/`headers` blocks is under the count
18
+ * and over the payload;
19
+ * - tool servers on a NON-container kind is a WARNING: an inline LLM call has no CLI to wire them
20
+ * into, so they can never take effect. A warning rather than an error because a deployment may
21
+ * deliberately declare them ahead of moving the kind onto a container surface.
22
+ */
23
+ export declare function checkKindToolServers(kind: AgentKind, registry: AgentKindRegistry): RegistrationProblem[];
24
+ //# sourceMappingURL=validateToolServers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateToolServers.d.ts","sourceRoot":"","sources":["../../src/validation/validateToolServers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAqC,MAAM,qBAAqB,CAAA;AAmBvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAerE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,iBAAiB,GAC1B,mBAAmB,EAAE,CA2BvB"}
@@ -0,0 +1,337 @@
1
+ import { runsInContainer } from '@cat-factory/agents';
2
+ import { MCP_OAUTH_DEFAULT_HEADER, MCP_SUPPORTED_HARNESSES, TOOL_SERVER_BUDGET, isAllowedMcpHttpUrl, isValidMcpServerId, isValidMcpToolName, mcpServableHarnesses, mcpTransportCarriesCredential, toolServerDeclaredBytes, } from '@cat-factory/kernel';
3
+ import { isEnvVariableName, isReservedPlatformEnvKey, isToolchainEnvName, reservedEnvKeyMessage, toolchainEnvNameMessage, } from '@cat-factory/contracts';
4
+ // ---------------------------------------------------------------------------
5
+ // Boot-time validation of one agent kind's declared TOOL SERVERS (MCP), the section of
6
+ // `collectRegistrationProblems` that grew its own gravity: the whole-list checks (unregistered
7
+ // ids, the per-dispatch budget, the container surface), each definition's own checks (id, url,
8
+ // transport, harness reachability, `allowedTools`), and the credential rules, which are the
9
+ // sharpest in the validator because a tool-server declaration names BOTH the key it wants and the
10
+ // endpoint that key is sent to.
11
+ //
12
+ // Split out of `validateRegistrations.ts` when it crossed the file-size budget, along the seam the
13
+ // checks already had: nothing here is called from anywhere but `checkKindToolServers`, which the
14
+ // capability walk calls once per kind.
15
+ // ---------------------------------------------------------------------------
16
+ /**
17
+ * A kind's declared TOOL SERVERS: the whole-list checks (unregistered ids, the per-dispatch budget,
18
+ * the container surface), with each definition's own checks in
19
+ * {@link checkToolServerDefinition}. "Declared for" includes assigned servers, which is why the
20
+ * capability walk in `validateRegistrations.ts` calls this per KIND rather than per registration.
21
+ *
22
+ * - an unregistered id is an ERROR, like an unregistered skill;
23
+ * - past EITHER dimension of the per-dispatch budget is a WARNING, because the dispatch drops the
24
+ * excess under `over_budget` rather than failing: the run still works, with fewer tools than the
25
+ * deployment believes it wired, and boot is the only place the DECLARATIONS past the line can be
26
+ * named. A warning also keeps the accretion case honest, a kind going over budget through
27
+ * `assignToolServers` calls in several packages none of which is individually wrong. Both
28
+ * dimensions are checked because the dispatch enforces both, and a byte-driven drop is the one
29
+ * that surprises: a handful of servers with fat `env`/`args`/`headers` blocks is under the count
30
+ * and over the payload;
31
+ * - tool servers on a NON-container kind is a WARNING: an inline LLM call has no CLI to wire them
32
+ * into, so they can never take effect. A warning rather than an error because a deployment may
33
+ * deliberately declare them ahead of moving the kind onto a container surface.
34
+ */
35
+ export function checkKindToolServers(kind, registry) {
36
+ const problems = [];
37
+ const tools = registry.toolServersFor(kind);
38
+ for (const id of tools.unknown) {
39
+ problems.push({
40
+ severity: 'error',
41
+ code: 'unknown_tool_server',
42
+ message: `Agent kind "${kind}" declares tool server "${id}", which is not registered. Call ` +
43
+ `registry.registerToolServer({ id: '${id}', … }) before registering the kind, or ` +
44
+ `declare the server inline.`,
45
+ });
46
+ }
47
+ for (const server of tools.servers)
48
+ problems.push(...checkToolServerDefinition(kind, server));
49
+ problems.push(...checkToolServerBudget(kind, tools.servers));
50
+ if (tools.servers.length && !runsInContainer(kind, registry)) {
51
+ problems.push({
52
+ severity: 'warn',
53
+ code: 'tool_servers_without_container',
54
+ message: `Agent kind "${kind}" declares tool servers but does not run in a container — an ` +
55
+ `inline LLM step has no agent CLI to wire them into, so they will never be available. ` +
56
+ `Give the kind a container surface (agent.surface: 'container-explore' / ` +
57
+ `'container-coding') or drop the tool servers.`,
58
+ });
59
+ }
60
+ return problems;
61
+ }
62
+ /**
63
+ * The per-dispatch budget, BOTH dimensions, as warnings: the dispatch drops the excess under
64
+ * `over_budget` and the run works with fewer tools, so a registration fault belongs at boot rather
65
+ * than in a refusal that takes the deployment down.
66
+ *
67
+ * The byte check measures {@link toolServerDeclaredBytes}, which is a FLOOR (a resolved credential
68
+ * only adds to it), so a declaration already past the budget here is certainly past it at dispatch.
69
+ * What boot deliberately does NOT claim is WHICH servers a run will lose: the dispatch keeps every
70
+ * server that still fits, so once bytes are what bind the survivors are not a prefix of the
71
+ * declaration. The count and the budget are what the author acts on, and the run itself names each
72
+ * server it dropped.
73
+ */
74
+ function checkToolServerBudget(kind, servers) {
75
+ const problems = [];
76
+ if (servers.length > TOOL_SERVER_BUDGET.maxServers) {
77
+ problems.push({
78
+ severity: 'warn',
79
+ code: 'too_many_tool_servers',
80
+ message: `Agent kind "${kind}" has ${servers.length} tool servers declared for it, past the ` +
81
+ `per-dispatch budget of ${TOOL_SERVER_BUDGET.maxServers}. A dispatch wires the first ` +
82
+ `${TOOL_SERVER_BUDGET.maxServers} in declaration order and states the rest to the agent as ` +
83
+ `unavailable (over_budget). Drop some, or split the work across kinds.`,
84
+ });
85
+ }
86
+ const bytes = servers.reduce((total, server) => total + toolServerDeclaredBytes(server), 0);
87
+ if (bytes > TOOL_SERVER_BUDGET.maxTotalBytes) {
88
+ problems.push({
89
+ severity: 'warn',
90
+ code: 'tool_servers_over_byte_budget',
91
+ message: `Agent kind "${kind}" declares tool servers whose transport config alone measures ${bytes} ` +
92
+ `bytes, past the per-dispatch budget of ${TOOL_SERVER_BUDGET.maxTotalBytes}. A dispatch ` +
93
+ `wires servers until that budget is spent and states the rest to the agent as unavailable ` +
94
+ `(over_budget); resolved credentials only add to this figure, and which servers lose out ` +
95
+ `depends on their sizes. Trim the env/args/headers blocks, or split the work across kinds.`,
96
+ });
97
+ }
98
+ return problems;
99
+ }
100
+ /**
101
+ * ONE tool server definition:
102
+ *
103
+ * - a malformed MCP server id is an ERROR, because it becomes both a tool-name fragment and a
104
+ * Codex TOML table key, so the CLI fails on it far from the registration that caused it;
105
+ * - an `allowedTools` entry that is not a valid tool NAME is an ERROR, the comma case above all:
106
+ * the harness joins the whole list into one `--allowedTools` argument with commas, so an entry
107
+ * carrying one splits into two patterns and the second matches nothing, while the prompt goes on
108
+ * advertising the name verbatim. That is the "told about a tool it cannot call" failure the
109
+ * unavailability vocabulary exists to prevent;
110
+ * - a definition NO harness could ever serve is a WARNING, and it is the only check here a run
111
+ * structurally cannot report: an `http` server narrowed to `harnesses: ['codex']` (whose client
112
+ * is stdio-only), or anything narrowed to `['pi']` (which has no MCP client), is never dropped
113
+ * FOR A REASON on any run. It simply never applies, so no prompt and no log line ever mentions
114
+ * it. A warning rather than an error because the declaration is inert rather than dangerous;
115
+ * - a cleartext `http://` endpoint off loopback is an ERROR: a resolved credential rides that
116
+ * request as a header, and the harness refuses the same URL at the job boundary — so allowing
117
+ * it here only moves the failure to a place with no registration to point at.
118
+ */
119
+ function checkToolServerDefinition(kind, server) {
120
+ const problems = [];
121
+ const on = `(on agent kind "${kind}")`;
122
+ if (!isValidMcpServerId(server.id)) {
123
+ problems.push({
124
+ severity: 'error',
125
+ code: 'invalid_tool_server_id',
126
+ message: `Tool server "${server.id}" ${on} has an invalid id. It becomes part of the tool names ` +
127
+ `the CLI exposes (mcp__<id>__<tool>) and a Codex config key, so it must match ` +
128
+ `[a-z0-9][a-z0-9_-]*.`,
129
+ });
130
+ }
131
+ for (const tool of server.allowedTools ?? []) {
132
+ if (isValidMcpToolName(tool))
133
+ continue;
134
+ problems.push({
135
+ severity: 'error',
136
+ code: 'invalid_tool_server_tool_name',
137
+ message: `Tool server "${server.id}" ${on} restricts allowedTools to "${tool}", which is not a ` +
138
+ `single tool name (letters, digits, "_", "." and "-"). The harness joins the list into ` +
139
+ `one --allowedTools argument with commas, so an entry with a comma or whitespace becomes ` +
140
+ `patterns that match nothing while the prompt still advertises the name. List each tool ` +
141
+ `as its own entry.`,
142
+ });
143
+ }
144
+ const servable = mcpServableHarnesses(server);
145
+ if (servable.length === 0) {
146
+ problems.push({
147
+ severity: 'warn',
148
+ code: 'tool_server_unservable',
149
+ message: `Tool server "${server.id}" ${on} declares transport "${server.transport.kind}" for ` +
150
+ `harnesses [${(server.harnesses ?? MCP_SUPPORTED_HARNESSES).join(', ')}], and no harness ` +
151
+ `can serve that combination, so the server never applies to any run and no prompt or log ` +
152
+ `line will say why. Codex's MCP client is stdio-only and Pi has none at all. Widen the ` +
153
+ `harnesses, change the transport, or drop the declaration.`,
154
+ });
155
+ }
156
+ if (server.transport.kind === 'http' && !isAllowedMcpHttpUrl(server.transport.url)) {
157
+ problems.push({
158
+ severity: 'error',
159
+ code: 'insecure_tool_server_url',
160
+ message: `Tool server "${server.id}" ${on} has url "${server.transport.url}". An HTTP tool server ` +
161
+ `carries its resolved credential in a request header, so the url must be https (plain ` +
162
+ `http is accepted only on loopback).`,
163
+ });
164
+ }
165
+ for (const secret of server.secretKeys ?? []) {
166
+ problems.push(...checkToolServerSecret(kind, server, secret));
167
+ }
168
+ problems.push(...checkToolServerOAuth(kind, server));
169
+ return problems;
170
+ }
171
+ /**
172
+ * A tool server's OAUTH declaration, when it has one. Four rules, and each of them names a failure
173
+ * that is otherwise invisible until a run or a button press:
174
+ *
175
+ * - `oauth` on a `stdio` server is an ERROR. A stdio server is a child process the CLI spawns;
176
+ * there is no request to authorise, so the declaration is inert and reads as configured. The
177
+ * dispatch drops the OAuth half silently for the mothership case, which is exactly why boot is
178
+ * where the fault has to be named.
179
+ * - a declared endpoint that fails the URL floor is an ERROR, and this is the sharpest one here:
180
+ * an OAuth exchange carries the client secret and the tokens, so a cleartext endpoint puts both
181
+ * on the wire. A DISCOVERED endpoint is held to the same rule at the moment it is read.
182
+ * - a reserved `clientSecretKey` is an ERROR for the reason every capability credential is: the
183
+ * declaration names both the key it wants and the token endpoint that key is posted to.
184
+ * - a `secretKeys` entry naming the same header the access token rides is a WARNING. Both would
185
+ * land in one header map and the granted token wins, so the static credential silently does
186
+ * nothing — which reads, to whoever declared it, as the platform ignoring their credential.
187
+ */
188
+ function checkToolServerOAuth(kind, server) {
189
+ const oauth = server.oauth;
190
+ if (!oauth)
191
+ return [];
192
+ const problems = [];
193
+ const on = `(on agent kind "${kind}")`;
194
+ if (server.transport.kind !== 'http') {
195
+ problems.push({
196
+ severity: 'error',
197
+ code: 'oauth_requires_http_transport',
198
+ message: `Tool server "${server.id}" ${on} declares OAuth on a "${server.transport.kind}" ` +
199
+ `transport. OAuth authenticates a REQUEST, and a stdio server is a child process the ` +
200
+ `agent CLI spawns with no request to authorise — pass its credential through secretKeys ` +
201
+ `instead.`,
202
+ });
203
+ }
204
+ for (const [field, url] of [
205
+ ['authorizationUrl', oauth.authorizationUrl],
206
+ ['tokenUrl', oauth.tokenUrl],
207
+ ]) {
208
+ if (url === undefined || isAllowedMcpHttpUrl(url))
209
+ continue;
210
+ problems.push({
211
+ severity: 'error',
212
+ code: 'insecure_oauth_endpoint',
213
+ message: `Tool server "${server.id}" ${on} declares OAuth ${field} "${url}". The exchange carries ` +
214
+ `the client secret and the access token, so the endpoint must be https (plain http is ` +
215
+ `accepted only on loopback).`,
216
+ });
217
+ }
218
+ if (oauth.clientSecretKey !== undefined && isReservedPlatformEnvKey(oauth.clientSecretKey)) {
219
+ problems.push({
220
+ severity: 'error',
221
+ code: 'reserved_credential_key',
222
+ message: `Tool server "${server.id}" ${on} declares OAuth client secret ` +
223
+ reservedEnvKeyMessage(oauth.clientSecretKey),
224
+ });
225
+ }
226
+ const tokenHeader = (oauth.header ?? MCP_OAUTH_DEFAULT_HEADER).toLowerCase();
227
+ for (const secret of server.secretKeys ?? []) {
228
+ if (secret.header?.toLowerCase() !== tokenHeader)
229
+ continue;
230
+ problems.push({
231
+ severity: 'warn',
232
+ code: 'oauth_header_collision',
233
+ message: `Tool server "${server.id}" ${on} declares credential "${secret.key}" on header ` +
234
+ `"${secret.header}", which is also where its OAuth access token is sent. The granted ` +
235
+ `token wins, so that credential reaches the server as nothing at all — send it under a ` +
236
+ `different header, or drop it.`,
237
+ });
238
+ }
239
+ return problems;
240
+ }
241
+ /**
242
+ * ONE credential a tool server declares. The reserved-key check is the sharpest rule in this file:
243
+ * a definition names both the key it wants and the endpoint that key is sent to, so
244
+ * `{ key: 'ENCRYPTION_KEY', header: 'Authorization' }` is a registration that boots clean and ships
245
+ * the deployment's master sealing key to a third party. The generative-integration half of the same
246
+ * rule is enforced by its credential SCHEMA (there is no schema here — a tool server is a TypeScript
247
+ * registration), and dispatch refuses both again for the mothership case.
248
+ */
249
+ /**
250
+ * The credential's CHANNEL against the one its transport actually has
251
+ * (`mcpTransportCarriesCredential`). Both mismatches are ERRORS, and they are the only rules here
252
+ * that describe a declaration which does not work AT ALL: the value resolves, the projection that
253
+ * builds the job body selects by channel and finds nothing to fold in, and the server is wired,
254
+ * advertised in the prompt, and started unauthenticated. The `unused_credential_env_name` warning
255
+ * below is deliberately not in this class, because there the value still arrives as the header and
256
+ * only the redundant injection name is inert.
257
+ *
258
+ * Two codes rather than one, because the remedies are opposites and an operator reads the code:
259
+ * a stdio declaration has a header to REMOVE, an http one has a header to ADD. Neither message
260
+ * offers `envName` as the fix for a header on stdio, which was the first spelling of this rule and
261
+ * was wrong twice over: the check keys on the header alone, so adding an `envName` beside it
262
+ * re-fires the same error, and the env projection would go on skipping the key.
263
+ */
264
+ function checkCredentialChannel(on, server, secret) {
265
+ if (mcpTransportCarriesCredential(server.transport.kind, secret))
266
+ return undefined;
267
+ const head = `Tool server "${server.id}" ${on} declares credential "${secret.key}"`;
268
+ switch (server.transport.kind) {
269
+ case 'stdio':
270
+ return {
271
+ severity: 'error',
272
+ code: 'unusable_credential_header',
273
+ message: `${head} on header "${secret.header}", but a stdio server is a child process with no ` +
274
+ `request to carry a header, so the value would reach nothing and the server would start ` +
275
+ `without it. Remove the header: a stdio credential is injected into the server's own ` +
276
+ `process, under envName when that process reads a different variable name.`,
277
+ };
278
+ case 'http':
279
+ return {
280
+ severity: 'error',
281
+ code: 'missing_credential_header',
282
+ message: `${head} with no header, but an http server is a remote URL with no process to inject a ` +
283
+ `variable into, so the value would reach nothing and the server would be called ` +
284
+ `unauthenticated. Declare the header it authenticates with, plus a headerTemplate when ` +
285
+ `that header wants a scheme (e.g. "Bearer {value}").`,
286
+ };
287
+ }
288
+ }
289
+ function checkToolServerSecret(kind, server, secret) {
290
+ const problems = [];
291
+ const on = `(on agent kind "${kind}")`;
292
+ if (isReservedPlatformEnvKey(secret.key)) {
293
+ problems.push({
294
+ severity: 'error',
295
+ code: 'reserved_credential_key',
296
+ message: `Tool server "${server.id}" ${on} declares credential ${reservedEnvKeyMessage(secret.key)}`,
297
+ });
298
+ }
299
+ const channel = checkCredentialChannel(on, server, secret);
300
+ if (channel)
301
+ problems.push(channel);
302
+ if (secret.envName === undefined)
303
+ return problems;
304
+ // The injection name is NOT held to the reserved floor (it reads nothing), so it carries its own
305
+ // rule: a value set as `PATH` or `npm_config_registry` reconfigures the server's process instead
306
+ // of authenticating a call. Dispatch drops one too, for the mothership case.
307
+ if (!isEnvVariableName(secret.envName)) {
308
+ problems.push({
309
+ severity: 'error',
310
+ code: 'invalid_credential_env_name',
311
+ message: `Tool server "${server.id}" ${on} declares credential envName "${secret.envName}", which ` +
312
+ `is not a valid environment variable name. It becomes a variable of the server's process, ` +
313
+ `and the harness drops anything else.`,
314
+ });
315
+ }
316
+ if (isToolchainEnvName(secret.envName)) {
317
+ problems.push({
318
+ severity: 'error',
319
+ code: 'toolchain_credential_env_name',
320
+ message: `Tool server "${server.id}" ${on} declares credential ${toolchainEnvNameMessage(secret.envName)}`,
321
+ });
322
+ }
323
+ // An `http` server sends its value as a HEADER, so an injection name would be read by nothing.
324
+ // A warning rather than an error: the declaration still works, it just says something that cannot
325
+ // take effect, and failing boot over it would be out of proportion.
326
+ if (server.transport.kind === 'http' && secret.header) {
327
+ problems.push({
328
+ severity: 'warn',
329
+ code: 'unused_credential_env_name',
330
+ message: `Tool server "${server.id}" ${on} declares credential envName "${secret.envName}" on a ` +
331
+ `key that names a header. An http server's value is sent as that header, so the injection ` +
332
+ `name is never used.`,
333
+ });
334
+ }
335
+ return problems;
336
+ }
337
+ //# sourceMappingURL=validateToolServers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateToolServers.js","sourceRoot":"","sources":["../../src/validation/validateToolServers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM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,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,4BAA4B;YAClC,OAAO,EACL,gBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,iCAAiC,MAAM,CAAC,OAAO,SAAS;gBACxF,2FAA2F;gBAC3F,qBAAqB;SACxB,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/orchestration",
3
- "version": "0.251.0",
3
+ "version": "0.251.1",
4
4
  "description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,20 +25,20 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "ai": "^7.0.58",
28
- "@cat-factory/agents": "0.123.1",
29
- "@cat-factory/caching": "0.18.30",
30
- "@cat-factory/contracts": "0.287.0",
31
- "@cat-factory/integrations": "0.153.6",
32
- "@cat-factory/kernel": "0.281.1",
33
- "@cat-factory/prompt-fragments": "1.0.39",
34
- "@cat-factory/sandbox": "0.11.116",
35
- "@cat-factory/spend": "0.15.57",
36
- "@cat-factory/workspaces": "0.27.1"
28
+ "@cat-factory/agents": "0.123.2",
29
+ "@cat-factory/caching": "0.18.31",
30
+ "@cat-factory/contracts": "0.287.1",
31
+ "@cat-factory/integrations": "0.153.7",
32
+ "@cat-factory/kernel": "0.281.2",
33
+ "@cat-factory/prompt-fragments": "1.0.40",
34
+ "@cat-factory/sandbox": "0.11.117",
35
+ "@cat-factory/spend": "0.15.58",
36
+ "@cat-factory/workspaces": "0.27.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "typescript": "7.0.2",
40
40
  "vitest": "^4.1.10",
41
- "@cat-factory/sandbox-fixtures": "0.7.323"
41
+ "@cat-factory/sandbox-fixtures": "0.7.324"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsc -b tsconfig.build.json",