@tangle-network/agent-interface 5.10.27 → 5.10.28

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.
@@ -186,7 +186,6 @@ export declare const agentProfileSeatSchema: z.ZodObject<{
186
186
  openclaw: "openclaw";
187
187
  amp: "amp";
188
188
  "factory-droids": "factory-droids";
189
- forge: "forge";
190
189
  cursor: "cursor";
191
190
  grok: "grok";
192
191
  nanocode: "nanocode";
@@ -500,7 +499,7 @@ export declare const agentProfileMetadataSchema: z.ZodType<AgentProfileMetadata>
500
499
  * the canonical {@link AgentProfile} TS contract. Kept structurally in lock-step
501
500
  * with that interface by the compile-time guard at the bottom of this file.
502
501
  */
503
- export declare const agentProfileSchema: z.ZodObject<{
502
+ export declare const recordedAgentProfileSchema: z.ZodObject<{
504
503
  outputFile: z.ZodOptional<z.ZodObject<{
505
504
  name: z.ZodString;
506
505
  path: z.ZodString;
@@ -545,15 +544,40 @@ export declare const agentProfileSchema: z.ZodObject<{
545
544
  openclaw: "openclaw";
546
545
  amp: "amp";
547
546
  "factory-droids": "factory-droids";
548
- forge: "forge";
549
547
  cursor: "cursor";
550
548
  grok: "grok";
551
549
  nanocode: "nanocode";
552
550
  exo: "exo";
553
551
  acp: "acp";
554
552
  "cli-base": "cli-base";
553
+ forge: "forge";
555
554
  }>>;
556
555
  seats: z.ZodOptional<z.ZodArray<z.ZodObject<{
556
+ provider: z.ZodString;
557
+ model: z.ZodString;
558
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
559
+ none: "none";
560
+ minimal: "minimal";
561
+ low: "low";
562
+ medium: "medium";
563
+ high: "high";
564
+ xhigh: "xhigh";
565
+ ultracode: "ultracode";
566
+ }>>;
567
+ credentialSource: z.ZodOptional<z.ZodEnum<{
568
+ router: "router";
569
+ "api-key": "api-key";
570
+ subscription: "subscription";
571
+ managed: "managed";
572
+ }>>;
573
+ selector: z.ZodUnion<readonly [z.ZodObject<{
574
+ kind: z.ZodLiteral<"all-eligible">;
575
+ }, z.core.$strict>, z.ZodObject<{
576
+ kind: z.ZodLiteral<"seat">;
577
+ id: z.ZodString;
578
+ }, z.core.$strict>]>;
579
+ tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
580
+ permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
557
581
  harness: z.ZodEnum<{
558
582
  "claude-code": "claude-code";
559
583
  nanoclaw: "nanoclaw";
@@ -567,16 +591,215 @@ export declare const agentProfileSchema: z.ZodObject<{
567
591
  openclaw: "openclaw";
568
592
  amp: "amp";
569
593
  "factory-droids": "factory-droids";
570
- forge: "forge";
571
594
  cursor: "cursor";
572
595
  grok: "grok";
573
596
  nanocode: "nanocode";
574
597
  exo: "exo";
575
598
  acp: "acp";
576
599
  "cli-base": "cli-base";
600
+ forge: "forge";
577
601
  }>;
578
- provider: z.ZodString;
579
- model: z.ZodString;
602
+ }, z.core.$strict>>>;
603
+ proxySecrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
604
+ hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
605
+ methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
606
+ paths: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
607
+ envName: z.ZodString;
608
+ secretRef: z.ZodObject<{
609
+ key: z.ZodString;
610
+ kind: z.ZodLiteral<"secret-ref">;
611
+ }, z.core.$strict>;
612
+ presentation: z.ZodDiscriminatedUnion<[z.ZodObject<{
613
+ type: z.ZodLiteral<"bearer">;
614
+ }, z.core.$strict>, z.ZodObject<{
615
+ type: z.ZodLiteral<"basic">;
616
+ username: z.ZodString;
617
+ }, z.core.$strict>, z.ZodObject<{
618
+ type: z.ZodLiteral<"header">;
619
+ name: z.ZodString;
620
+ }, z.core.$strict>, z.ZodObject<{
621
+ type: z.ZodLiteral<"query">;
622
+ name: z.ZodString;
623
+ }, z.core.$strict>], "type">;
624
+ placeholderFormat: z.ZodOptional<z.ZodEnum<{
625
+ jwt: "jwt";
626
+ opaque: "opaque";
627
+ }>>;
628
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
629
+ }, z.core.$strict>>>;
630
+ permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
631
+ tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
632
+ mcp: z.ZodOptional<z.ZodType<Record<string, AgentProfileMcpServer>, unknown, z.core.$ZodTypeInternals<Record<string, AgentProfileMcpServer>, unknown>>>;
633
+ connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
634
+ connectionId: z.ZodString;
635
+ capabilities: z.ZodArray<z.ZodString>;
636
+ alias: z.ZodOptional<z.ZodString>;
637
+ }, z.core.$strict>>>;
638
+ subagents: z.ZodOptional<z.ZodType<Record<string, {
639
+ description?: string | undefined;
640
+ prompt?: string | undefined;
641
+ model?: string | undefined;
642
+ tools?: Record<string, boolean> | undefined;
643
+ permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
644
+ maxSteps?: number | undefined;
645
+ metadata?: Record<string, unknown> | undefined;
646
+ }>, unknown, z.core.$ZodTypeInternals<Record<string, {
647
+ description?: string | undefined;
648
+ prompt?: string | undefined;
649
+ model?: string | undefined;
650
+ tools?: Record<string, boolean> | undefined;
651
+ permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
652
+ maxSteps?: number | undefined;
653
+ metadata?: Record<string, unknown> | undefined;
654
+ }>, unknown>>>;
655
+ resources: z.ZodOptional<z.ZodObject<{
656
+ knowledge: z.ZodOptional<z.ZodArray<z.ZodObject<{
657
+ sourceId: z.ZodString;
658
+ generation: z.ZodString;
659
+ }, z.core.$strict>>>;
660
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
661
+ path: z.ZodString;
662
+ resource: z.ZodUnion<readonly [z.ZodObject<{
663
+ kind: z.ZodLiteral<"inline">;
664
+ name: z.ZodString;
665
+ content: z.ZodString;
666
+ }, z.core.$strict>, z.ZodObject<{
667
+ kind: z.ZodLiteral<"github">;
668
+ repository: z.ZodOptional<z.ZodString>;
669
+ path: z.ZodString;
670
+ ref: z.ZodOptional<z.ZodString>;
671
+ name: z.ZodOptional<z.ZodString>;
672
+ }, z.core.$strict>]>;
673
+ executable: z.ZodOptional<z.ZodBoolean>;
674
+ }, z.core.$strict>>>;
675
+ tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
676
+ kind: z.ZodLiteral<"inline">;
677
+ name: z.ZodString;
678
+ content: z.ZodString;
679
+ }, z.core.$strict>, z.ZodObject<{
680
+ kind: z.ZodLiteral<"github">;
681
+ repository: z.ZodOptional<z.ZodString>;
682
+ path: z.ZodString;
683
+ ref: z.ZodOptional<z.ZodString>;
684
+ name: z.ZodOptional<z.ZodString>;
685
+ }, z.core.$strict>]>>>;
686
+ skills: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
687
+ kind: z.ZodLiteral<"inline">;
688
+ name: z.ZodString;
689
+ content: z.ZodString;
690
+ }, z.core.$strict>, z.ZodObject<{
691
+ kind: z.ZodLiteral<"github">;
692
+ repository: z.ZodOptional<z.ZodString>;
693
+ path: z.ZodString;
694
+ ref: z.ZodOptional<z.ZodString>;
695
+ name: z.ZodOptional<z.ZodString>;
696
+ }, z.core.$strict>]>>>;
697
+ agents: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
698
+ kind: z.ZodLiteral<"inline">;
699
+ name: z.ZodString;
700
+ content: z.ZodString;
701
+ }, z.core.$strict>, z.ZodObject<{
702
+ kind: z.ZodLiteral<"github">;
703
+ repository: z.ZodOptional<z.ZodString>;
704
+ path: z.ZodString;
705
+ ref: z.ZodOptional<z.ZodString>;
706
+ name: z.ZodOptional<z.ZodString>;
707
+ }, z.core.$strict>]>>>;
708
+ commands: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
709
+ kind: z.ZodLiteral<"inline">;
710
+ name: z.ZodString;
711
+ content: z.ZodString;
712
+ }, z.core.$strict>, z.ZodObject<{
713
+ kind: z.ZodLiteral<"github">;
714
+ repository: z.ZodOptional<z.ZodString>;
715
+ path: z.ZodString;
716
+ ref: z.ZodOptional<z.ZodString>;
717
+ name: z.ZodOptional<z.ZodString>;
718
+ }, z.core.$strict>]>>>;
719
+ instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
720
+ kind: z.ZodLiteral<"inline">;
721
+ name: z.ZodString;
722
+ content: z.ZodString;
723
+ }, z.core.$strict>, z.ZodObject<{
724
+ kind: z.ZodLiteral<"github">;
725
+ repository: z.ZodOptional<z.ZodString>;
726
+ path: z.ZodString;
727
+ ref: z.ZodOptional<z.ZodString>;
728
+ name: z.ZodOptional<z.ZodString>;
729
+ }, z.core.$strict>]>]>>;
730
+ failOnError: z.ZodOptional<z.ZodBoolean>;
731
+ }, z.core.$strict>>;
732
+ hooks: z.ZodOptional<z.ZodType<Record<string, {
733
+ command: string;
734
+ timeoutMs?: number | undefined;
735
+ blocking?: boolean | undefined;
736
+ matcher?: string | undefined;
737
+ env?: Record<string, {
738
+ kind: "secret-ref";
739
+ key: string;
740
+ format?: "bearer" | "raw" | undefined;
741
+ } | {
742
+ kind: "public";
743
+ value: string;
744
+ }> | undefined;
745
+ }[]>, unknown, z.core.$ZodTypeInternals<Record<string, {
746
+ command: string;
747
+ timeoutMs?: number | undefined;
748
+ blocking?: boolean | undefined;
749
+ matcher?: string | undefined;
750
+ env?: Record<string, {
751
+ kind: "secret-ref";
752
+ key: string;
753
+ format?: "bearer" | "raw" | undefined;
754
+ } | {
755
+ kind: "public";
756
+ value: string;
757
+ }> | undefined;
758
+ }[]>, unknown>>>;
759
+ modes: z.ZodOptional<z.ZodType<Record<string, {
760
+ description?: string | undefined;
761
+ model?: string | undefined;
762
+ prompt?: string | undefined;
763
+ tools?: Record<string, boolean> | undefined;
764
+ permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
765
+ metadata?: Record<string, unknown> | undefined;
766
+ }>, unknown, z.core.$ZodTypeInternals<Record<string, {
767
+ description?: string | undefined;
768
+ model?: string | undefined;
769
+ prompt?: string | undefined;
770
+ tools?: Record<string, boolean> | undefined;
771
+ permissions?: Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">> | undefined;
772
+ metadata?: Record<string, unknown> | undefined;
773
+ }>, unknown>>>;
774
+ confidential: z.ZodOptional<z.ZodObject<{
775
+ tee: z.ZodOptional<z.ZodString>;
776
+ attestationNonce: z.ZodOptional<z.ZodString>;
777
+ sealed: z.ZodOptional<z.ZodBoolean>;
778
+ attestationRefresh: z.ZodOptional<z.ZodBoolean>;
779
+ }, z.core.$strict>>;
780
+ metadata: z.ZodOptional<z.ZodType<AgentProfileMetadata, unknown, z.core.$ZodTypeInternals<AgentProfileMetadata, unknown>>>;
781
+ extensions: z.ZodOptional<z.ZodType<Record<string, Record<string, unknown> | undefined>, unknown, z.core.$ZodTypeInternals<Record<string, Record<string, unknown> | undefined>, unknown>>>;
782
+ }, z.core.$strict>;
783
+ export type RecordedAgentProfile = z.infer<typeof recordedAgentProfileSchema>;
784
+ /** Intake for new profiles excludes retired identities, including alternate seats. */
785
+ export declare const agentProfileSchema: z.ZodObject<{
786
+ outputFile: z.ZodOptional<z.ZodObject<{
787
+ name: z.ZodString;
788
+ path: z.ZodString;
789
+ }, z.core.$strict>>;
790
+ name: z.ZodOptional<z.ZodString>;
791
+ description: z.ZodOptional<z.ZodString>;
792
+ version: z.ZodOptional<z.ZodString>;
793
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
794
+ prompt: z.ZodOptional<z.ZodObject<{
795
+ systemPrompt: z.ZodOptional<z.ZodString>;
796
+ appendSystemPrompt: z.ZodOptional<z.ZodString>;
797
+ instructions: z.ZodOptional<z.ZodArray<z.ZodString>>;
798
+ }, z.core.$strict>>;
799
+ model: z.ZodOptional<z.ZodObject<{
800
+ default: z.ZodOptional<z.ZodString>;
801
+ small: z.ZodOptional<z.ZodString>;
802
+ provider: z.ZodOptional<z.ZodString>;
580
803
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
581
804
  none: "none";
582
805
  minimal: "minimal";
@@ -586,21 +809,11 @@ export declare const agentProfileSchema: z.ZodObject<{
586
809
  xhigh: "xhigh";
587
810
  ultracode: "ultracode";
588
811
  }>>;
589
- credentialSource: z.ZodOptional<z.ZodEnum<{
590
- router: "router";
591
- "api-key": "api-key";
592
- subscription: "subscription";
593
- managed: "managed";
594
- }>>;
595
- selector: z.ZodUnion<readonly [z.ZodObject<{
596
- kind: z.ZodLiteral<"all-eligible">;
597
- }, z.core.$strict>, z.ZodObject<{
598
- kind: z.ZodLiteral<"seat">;
599
- id: z.ZodString;
600
- }, z.core.$strict>]>;
601
- tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
602
- permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
603
- }, z.core.$strict>>>;
812
+ maxVisibleOutputTokens: z.ZodOptional<z.ZodNumber>;
813
+ maxReasoningTokens: z.ZodOptional<z.ZodNumber>;
814
+ maxTotalOutputTokens: z.ZodOptional<z.ZodNumber>;
815
+ metadata: z.ZodOptional<z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>;
816
+ }, z.core.$strict>>;
604
817
  proxySecrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
605
818
  hosts: z.ZodReadonly<z.ZodArray<z.ZodString>>;
606
819
  methods: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -780,6 +993,73 @@ export declare const agentProfileSchema: z.ZodObject<{
780
993
  }, z.core.$strict>>;
781
994
  metadata: z.ZodOptional<z.ZodType<AgentProfileMetadata, unknown, z.core.$ZodTypeInternals<AgentProfileMetadata, unknown>>>;
782
995
  extensions: z.ZodOptional<z.ZodType<Record<string, Record<string, unknown> | undefined>, unknown, z.core.$ZodTypeInternals<Record<string, Record<string, unknown> | undefined>, unknown>>>;
996
+ harness: z.ZodOptional<z.ZodEnum<{
997
+ "claude-code": "claude-code";
998
+ nanoclaw: "nanoclaw";
999
+ codex: "codex";
1000
+ opencode: "opencode";
1001
+ "kimi-code": "kimi-code";
1002
+ pi: "pi";
1003
+ prime: "prime";
1004
+ gemini: "gemini";
1005
+ hermes: "hermes";
1006
+ openclaw: "openclaw";
1007
+ amp: "amp";
1008
+ "factory-droids": "factory-droids";
1009
+ cursor: "cursor";
1010
+ grok: "grok";
1011
+ nanocode: "nanocode";
1012
+ exo: "exo";
1013
+ acp: "acp";
1014
+ "cli-base": "cli-base";
1015
+ }>>;
1016
+ seats: z.ZodOptional<z.ZodArray<z.ZodObject<{
1017
+ harness: z.ZodEnum<{
1018
+ "claude-code": "claude-code";
1019
+ nanoclaw: "nanoclaw";
1020
+ codex: "codex";
1021
+ opencode: "opencode";
1022
+ "kimi-code": "kimi-code";
1023
+ pi: "pi";
1024
+ prime: "prime";
1025
+ gemini: "gemini";
1026
+ hermes: "hermes";
1027
+ openclaw: "openclaw";
1028
+ amp: "amp";
1029
+ "factory-droids": "factory-droids";
1030
+ cursor: "cursor";
1031
+ grok: "grok";
1032
+ nanocode: "nanocode";
1033
+ exo: "exo";
1034
+ acp: "acp";
1035
+ "cli-base": "cli-base";
1036
+ }>;
1037
+ provider: z.ZodString;
1038
+ model: z.ZodString;
1039
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
1040
+ none: "none";
1041
+ minimal: "minimal";
1042
+ low: "low";
1043
+ medium: "medium";
1044
+ high: "high";
1045
+ xhigh: "xhigh";
1046
+ ultracode: "ultracode";
1047
+ }>>;
1048
+ credentialSource: z.ZodOptional<z.ZodEnum<{
1049
+ router: "router";
1050
+ "api-key": "api-key";
1051
+ subscription: "subscription";
1052
+ managed: "managed";
1053
+ }>>;
1054
+ selector: z.ZodUnion<readonly [z.ZodObject<{
1055
+ kind: z.ZodLiteral<"all-eligible">;
1056
+ }, z.core.$strict>, z.ZodObject<{
1057
+ kind: z.ZodLiteral<"seat">;
1058
+ id: z.ZodString;
1059
+ }, z.core.$strict>]>;
1060
+ tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
1061
+ permissions: z.ZodOptional<z.ZodType<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny" | Record<string, "allow" | "ask" | "deny">>, unknown>>>;
1062
+ }, z.core.$strict>>>;
783
1063
  }, z.core.$strict>;
784
1064
  /**
785
1065
  * Model-facing JSON Schema for an authored {@link AgentProfile}.
@@ -8,7 +8,7 @@ import { agentProfileKnowledgeRefsSchema } from "./profile-knowledge.js";
8
8
  export { agentProfileKnowledgeRefSchema, agentProfileKnowledgeRefsSchema, } from "./profile-knowledge.js";
9
9
  import { REASONING_EFFORTS, TRAINED_MODEL_PREFIX, trainedModelIdForArtifact, } from "./agent-profile.js";
10
10
  import { canonicalCandidateDigest, sha256DigestSchema, environmentNameSchema, headerNameSchema, isSafeExecutable, isSafeRelativePath, isWellFormedUnicode, looksLikeCredential, } from "./agent-candidate-schema-common.js";
11
- import { harnessTypeSchema } from "./harness.js";
11
+ import { harnessTypeSchema, recordedHarnessTypeSchema } from "./harness.js";
12
12
  import { AgentProfileValueError, assertAgentProfileValue, canonicalAgentProfileJson } from "./agent-profile-canonical.js";
13
13
  import { harnessHonorsEffort, harnessHonorsModel, harnessModelSupport, harnessReasoningEfforts, harnessSystemPromptIntents, resolveModelProvider, } from "./harness-capabilities.js";
14
14
  import { profileKbNamesModel } from "./profile-kb/index.js";
@@ -403,7 +403,7 @@ export const agentProfileMetadataSchema = ownPropertyRecordSchema(z.unknown(), {
403
403
  * the canonical {@link AgentProfile} TS contract. Kept structurally in lock-step
404
404
  * with that interface by the compile-time guard at the bottom of this file.
405
405
  */
406
- export const agentProfileSchema = z
406
+ export const recordedAgentProfileSchema = z
407
407
  .strictObject({
408
408
  outputFile: AgentFileOutputPolicySchema.optional(),
409
409
  name: z.string().optional(),
@@ -412,8 +412,8 @@ export const agentProfileSchema = z
412
412
  tags: z.array(z.string()).max(CONTRACT_MAX_ARRAY_LENGTH).optional(),
413
413
  prompt: agentProfilePromptSchema.optional(),
414
414
  model: agentProfileModelHintsSchema.optional(),
415
- harness: harnessTypeSchema.optional(),
416
- seats: z.array(agentProfileSeatSchema).max(CONTRACT_MAX_ARRAY_LENGTH).nonempty().optional(),
415
+ harness: recordedHarnessTypeSchema.optional(),
416
+ seats: z.array(agentProfileSeatSchema.extend({ harness: recordedHarnessTypeSchema })).max(CONTRACT_MAX_ARRAY_LENGTH).nonempty().optional(),
417
417
  proxySecrets: ProxySecretsSchema.optional(),
418
418
  permissions: ownPropertyRecordSchema(agentProfilePermissionSchema).optional(),
419
419
  tools: ownPropertyRecordSchema(z.boolean()).optional(),
@@ -459,19 +459,23 @@ export const agentProfileSchema = z
459
459
  if (owner !== null && owner !== seat.provider && !profileKbNamesModel(`${seat.provider}/${seat.model}`)) {
460
460
  context.addIssue({ code: "custom", path: ["seats", index, "provider"], message: "seat provider must match the model provider" });
461
461
  }
462
- if (!harnessHonorsModel(seat.harness)) {
462
+ // Retired seats keep their authored identity. Only live harnesses have current model capabilities.
463
+ const live = harnessTypeSchema.safeParse(seat.harness);
464
+ if (!live.success)
465
+ continue;
466
+ if (!harnessHonorsModel(live.data)) {
463
467
  context.addIssue({ code: "custom", path: ["seats", index, "harness"], message: "seat harness does not honor an exact model choice" });
464
468
  }
465
469
  const effort = seat.reasoningEffort ?? profile.model?.reasoningEffort;
466
- const support = harnessModelSupport(seat.harness, seat.model, { reasoningEffort: effort });
470
+ const support = harnessModelSupport(live.data, seat.model, { reasoningEffort: effort });
467
471
  if (!support.supported) {
468
472
  context.addIssue({ code: "custom", path: ["seats", index, "model"], message: support.message });
469
473
  }
470
- if (effort !== undefined && (!harnessHonorsEffort(seat.harness) ||
471
- !harnessReasoningEfforts(seat.harness).includes(effort))) {
474
+ if (effort !== undefined && (!harnessHonorsEffort(live.data) ||
475
+ !harnessReasoningEfforts(live.data).includes(effort))) {
472
476
  context.addIssue({ code: "custom", path: ["seats", index, "reasoningEffort"], message: "seat harness cannot honor the stage reasoning effort" });
473
477
  }
474
- const prompt = harnessSystemPromptIntents(seat.harness);
478
+ const prompt = harnessSystemPromptIntents(live.data);
475
479
  if (profile.prompt?.systemPrompt !== undefined && !prompt.replace) {
476
480
  context.addIssue({ code: "custom", path: ["seats", index, "harness"], message: "seat harness cannot replace the system prompt" });
477
481
  }
@@ -497,6 +501,11 @@ export const agentProfileSchema = z
497
501
  context.addIssue({ code: "custom", path: ["model", "default"], message: "trained profile model must equal the receipt's Router model" });
498
502
  }
499
503
  });
504
+ /** Intake for new profiles excludes retired identities, including alternate seats. */
505
+ export const agentProfileSchema = recordedAgentProfileSchema.safeExtend({
506
+ harness: harnessTypeSchema.optional(),
507
+ seats: z.array(agentProfileSeatSchema).max(CONTRACT_MAX_ARRAY_LENGTH).nonempty().optional(),
508
+ });
500
509
  const encodedRecordKeyPattern = "^u(?:[0-9a-f]{4})*$";
501
510
  function isEncodedRecordKeyPropertyNames(value) {
502
511
  if (value === null || typeof value !== "object" || Array.isArray(value)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-interface",
3
- "version": "5.10.27",
3
+ "version": "5.10.28",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",