@tangle-network/agent-interface 0.37.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -587,11 +587,10 @@ export declare const agentCandidateProfilePlanEvidenceSchema: z.ZodObject<{
587
587
  }, z.core.$strict>]>;
588
588
  }, z.core.$strict>;
589
589
  export declare const agentCandidateProfileActivationSchema: z.ZodObject<{
590
- kind: z.ZodLiteral<"agent-candidate-profile-activation">;
591
- profilePlan: z.ZodObject<{
592
- kind: z.ZodLiteral<"agent-profile-workspace-plan">;
593
- digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
594
- material: z.ZodType<{
590
+ profilePlan: z.ZodType<{
591
+ kind: "agent-profile-workspace-plan";
592
+ digest: `sha256:${string}`;
593
+ material: {
595
594
  sourceProfileDigest: `sha256:${string}`;
596
595
  harness: "claude-code" | "nanoclaw" | "codex" | "opencode" | "kimi-code" | "pi" | "gemini" | "hermes" | "openclaw" | "amp" | "factory-droids" | "acp" | "cli-base";
597
596
  files: {
@@ -615,7 +614,30 @@ export declare const agentCandidateProfileActivationSchema: z.ZodObject<{
615
614
  kind: "public";
616
615
  value: string;
617
616
  } | undefined;
618
- }, unknown, z.core.$ZodTypeInternals<{
617
+ };
618
+ artifact: {
619
+ locator: {
620
+ kind: "s3";
621
+ bucket: string;
622
+ key: string;
623
+ region?: string | undefined;
624
+ } | {
625
+ kind: "ipfs";
626
+ cid: string;
627
+ path?: string | undefined;
628
+ };
629
+ sha256: `sha256:${string}`;
630
+ byteLength: number;
631
+ } | {
632
+ encoding: "base64";
633
+ content: string;
634
+ sha256: `sha256:${string}`;
635
+ byteLength: number;
636
+ };
637
+ }, unknown, z.core.$ZodTypeInternals<{
638
+ kind: "agent-profile-workspace-plan";
639
+ digest: `sha256:${string}`;
640
+ material: {
619
641
  sourceProfileDigest: `sha256:${string}`;
620
642
  harness: "claude-code" | "nanoclaw" | "codex" | "opencode" | "kimi-code" | "pi" | "gemini" | "hermes" | "openclaw" | "amp" | "factory-droids" | "acp" | "cli-base";
621
643
  files: {
@@ -639,33 +661,34 @@ export declare const agentCandidateProfileActivationSchema: z.ZodObject<{
639
661
  kind: "public";
640
662
  value: string;
641
663
  } | undefined;
642
- }, unknown>>;
643
- artifact: z.ZodUnion<readonly [z.ZodObject<{
644
- locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
645
- kind: z.ZodLiteral<"s3">;
646
- bucket: z.ZodString;
647
- key: z.ZodString;
648
- region: z.ZodOptional<z.ZodString>;
649
- }, z.core.$strict>, z.ZodObject<{
650
- kind: z.ZodLiteral<"ipfs">;
651
- cid: z.ZodString;
652
- path: z.ZodOptional<z.ZodString>;
653
- }, z.core.$strict>], "kind">;
654
- sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
655
- byteLength: z.ZodNumber;
656
- }, z.core.$strict>, z.ZodObject<{
657
- encoding: z.ZodLiteral<"base64">;
658
- content: z.ZodString;
659
- sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
660
- byteLength: z.ZodNumber;
661
- }, z.core.$strict>]>;
662
- }, z.core.$strict>;
664
+ };
665
+ artifact: {
666
+ locator: {
667
+ kind: "s3";
668
+ bucket: string;
669
+ key: string;
670
+ region?: string | undefined;
671
+ } | {
672
+ kind: "ipfs";
673
+ cid: string;
674
+ path?: string | undefined;
675
+ };
676
+ sha256: `sha256:${string}`;
677
+ byteLength: number;
678
+ } | {
679
+ encoding: "base64";
680
+ content: string;
681
+ sha256: `sha256:${string}`;
682
+ byteLength: number;
683
+ };
684
+ }, unknown>>;
663
685
  files: z.ZodArray<z.ZodObject<{
664
686
  path: z.ZodString;
665
687
  mode: z.ZodNumber;
666
688
  content: z.ZodString;
667
689
  }, z.core.$strict>>;
668
690
  digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
691
+ kind: z.ZodLiteral<"agent-candidate-profile-activation">;
669
692
  }, z.core.$strict>;
670
693
  export declare const agentCandidateExecutionPlanEvidenceSchema: z.ZodObject<{
671
694
  kind: z.ZodLiteral<"agent-candidate-execution-plan">;
@@ -2,8 +2,9 @@ import { z } from "zod";
2
2
  import { agentCandidateArtifactRefSchema, agentCandidateCapturedArtifactSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, } from "./agent-candidate-artifact-schema.js";
3
3
  import { agentCandidateContainerSchema, agentCandidateInstructionDeliverySchema, agentCandidateWorkingDirectorySchema, } from "./agent-candidate-code-schema.js";
4
4
  import { reasoningEffortSchema } from "./profile-schema.js";
5
- import { addDuplicateIssues, agentCandidateConfigValueSchema, agentCandidateMediaTypeSchema, environmentConfigSchema, gitObjectSchema, isCanonicalJsonValue, isObviouslyPrivateHostname, isSafeExecutable, isSafeRelativePath, isWellFormedUnicode, sameGitObjectFormat, sha256Utf8, sha256DigestSchema, } from "./agent-candidate-schema-common.js";
5
+ import { addDuplicateIssues, agentCandidateConfigValueSchema, agentCandidateMediaTypeSchema, environmentConfigSchema, gitObjectSchema, isCanonicalJsonValue, isObviouslyPrivateHostname, isSafeExecutable, isSafeRelativePath, sameGitObjectFormat, sha256Utf8, sha256DigestSchema, } from "./agent-candidate-schema-common.js";
6
6
  import { harnessTypeSchema } from "./harness.js";
7
+ import { createAgentProfileActivationEvidenceSchema } from "./agent-profile-activation.js";
7
8
  function isCanonicalAbsolutePath(value) {
8
9
  return (value.startsWith("/") &&
9
10
  value !== "/" &&
@@ -471,22 +472,9 @@ function planEvidenceSchema(kind, material) {
471
472
  });
472
473
  }
473
474
  export const agentCandidateProfilePlanEvidenceSchema = planEvidenceSchema("agent-profile-workspace-plan", agentCandidateProfilePlanMaterialSchema);
474
- export const agentCandidateProfileActivationSchema = z
475
- .object({
475
+ export const agentCandidateProfileActivationSchema = createAgentProfileActivationEvidenceSchema(agentCandidateProfilePlanEvidenceSchema)
476
+ .extend({
476
477
  kind: z.literal("agent-candidate-profile-activation"),
477
- profilePlan: agentCandidateProfilePlanEvidenceSchema,
478
- files: z.array(z
479
- .object({
480
- path: z
481
- .string()
482
- .refine((value) => isSafeRelativePath(value, false), "profile activation file must use a canonical relative path"),
483
- mode: z.number().int().min(0).max(0o777),
484
- content: z
485
- .string()
486
- .refine(isWellFormedUnicode, "profile activation content must be valid Unicode"),
487
- })
488
- .strict()),
489
- digest: sha256DigestSchema,
490
478
  })
491
479
  .strict()
492
480
  .superRefine((activation, ctx) => {
@@ -57,25 +57,13 @@ export declare const agentCandidateProfileSchema: z.ZodObject<{
57
57
  allow: "allow";
58
58
  ask: "ask";
59
59
  deny: "deny";
60
- }>, z.ZodRecord<z.ZodString, z.ZodEnum<{
61
- allow: "allow";
62
- ask: "ask";
63
- deny: "deny";
64
- }>>]>>>;
60
+ }>, z.ZodType<Record<string, "allow" | "ask" | "deny">, unknown, z.core.$ZodTypeInternals<Record<string, "allow" | "ask" | "deny">, unknown>>]>>>;
65
61
  tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
66
62
  mcp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AgentCandidateMcpServer, unknown, z.core.$ZodTypeInternals<AgentCandidateMcpServer, unknown>>>>;
67
63
  subagents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
68
64
  prompt: z.ZodOptional<z.ZodString>;
69
- permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
70
- allow: "allow";
71
- ask: "ask";
72
- deny: "deny";
73
- }>, z.ZodRecord<z.ZodString, z.ZodEnum<{
74
- allow: "allow";
75
- ask: "ask";
76
- deny: "deny";
77
- }>>]>>>;
78
- tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
65
+ 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>>>;
66
+ tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
79
67
  description: z.ZodOptional<z.ZodString>;
80
68
  model: z.ZodOptional<z.ZodString>;
81
69
  maxSteps: z.ZodOptional<z.ZodNumber>;
@@ -553,16 +541,8 @@ export declare const agentCandidateProfileSchema: z.ZodObject<{
553
541
  }, z.core.$strict>>>>;
554
542
  modes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
555
543
  prompt: z.ZodOptional<z.ZodString>;
556
- permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
557
- allow: "allow";
558
- ask: "ask";
559
- deny: "deny";
560
- }>, z.ZodRecord<z.ZodString, z.ZodEnum<{
561
- allow: "allow";
562
- ask: "ask";
563
- deny: "deny";
564
- }>>]>>>;
565
- tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
544
+ 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>>>;
545
+ tools: z.ZodOptional<z.ZodType<Record<string, boolean>, unknown, z.core.$ZodTypeInternals<Record<string, boolean>, unknown>>>;
566
546
  description: z.ZodOptional<z.ZodString>;
567
547
  model: z.ZodOptional<z.ZodString>;
568
548
  }, z.core.$strict>>>;