@tangle-network/agent-interface 0.28.0 → 0.30.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.
Files changed (30) hide show
  1. package/dist/agent-candidate-code-schema.d.ts +0 -8
  2. package/dist/agent-candidate-code-schema.js +0 -1
  3. package/dist/agent-candidate-execution-plan-schema.d.ts +193 -350
  4. package/dist/agent-candidate-execution-plan-schema.js +98 -131
  5. package/dist/agent-candidate-lineage-schema.d.ts +1 -28
  6. package/dist/agent-candidate-lineage-schema.js +3 -33
  7. package/dist/agent-candidate-outcome-schema.d.ts +48 -18
  8. package/dist/agent-candidate-outcome-schema.js +19 -24
  9. package/dist/agent-candidate-profile-schema.d.ts +3 -28
  10. package/dist/agent-candidate-profile-schema.js +15 -27
  11. package/dist/agent-candidate-promotion-schema.d.ts +10981 -2356
  12. package/dist/agent-candidate-promotion-schema.js +495 -105
  13. package/dist/agent-candidate-receipt-schema.d.ts +268 -303
  14. package/dist/agent-candidate-receipt-schema.js +82 -8
  15. package/dist/agent-candidate-schema-common.d.ts +8 -0
  16. package/dist/agent-candidate-schema-common.js +35 -1
  17. package/dist/agent-candidate-schema.d.ts +3 -52
  18. package/dist/agent-candidate-schema.js +3 -28
  19. package/dist/agent-candidate-task-schema.d.ts +643 -0
  20. package/dist/agent-candidate-task-schema.js +191 -0
  21. package/dist/agent-candidate.d.ts +191 -75
  22. package/dist/agent-candidate.test-fixture.d.ts +0 -26
  23. package/dist/agent-candidate.test-fixture.js +0 -26
  24. package/dist/agent-profile.d.ts +33 -9
  25. package/dist/harness-capabilities.d.ts +2 -2
  26. package/dist/harness-capabilities.js +23 -14
  27. package/dist/profile-schema.d.ts +65 -84
  28. package/dist/profile-schema.js +82 -32
  29. package/dist/profile-security.js +2 -0
  30. package/package.json +2 -2
@@ -6,41 +6,29 @@ import { agentProfileConfidentialSchema, agentProfileModeSchema, agentProfileMod
6
6
  const executableSchema = z
7
7
  .string()
8
8
  .refine(isSafeExecutable, "executable must be a canonical non-shell command");
9
- export const agentCandidateMcpServerSchema = z
10
- .object({
9
+ const agentCandidateLocalMcpServerSchema = z.strictObject({
11
10
  transport: z.literal("stdio").optional(),
12
- command: executableSchema.optional(),
11
+ command: executableSchema,
13
12
  args: z.array(agentCandidateConfigValueSchema).optional(),
14
13
  env: environmentConfigSchema.optional(),
15
14
  cwd: z
16
15
  .string()
17
16
  .refine((value) => isSafeRelativePath(value, true), "MCP cwd must be a canonical workspace-relative path")
18
17
  .optional(),
19
- enabled: z.boolean().optional(),
20
- })
21
- .strict()
22
- .superRefine((server, ctx) => {
23
- if (server.enabled === false) {
24
- if (server.transport !== undefined ||
25
- server.command !== undefined ||
26
- server.args !== undefined ||
27
- server.env !== undefined ||
28
- server.cwd !== undefined) {
29
- ctx.addIssue({
30
- code: "custom",
31
- message: "disabled MCP servers cannot carry process fields",
32
- });
33
- }
34
- return;
35
- }
36
- if (server.command === undefined) {
37
- ctx.addIssue({
38
- code: "custom",
39
- path: ["command"],
40
- message: "enabled stdio MCP servers require a command",
41
- });
42
- }
18
+ enabled: z.literal(true).optional(),
19
+ });
20
+ const agentCandidateDisabledMcpServerSchema = z.strictObject({
21
+ enabled: z.literal(false),
22
+ transport: z.undefined().optional(),
23
+ command: z.undefined().optional(),
24
+ args: z.undefined().optional(),
25
+ env: z.undefined().optional(),
26
+ cwd: z.undefined().optional(),
43
27
  });
28
+ export const agentCandidateMcpServerSchema = z.union([
29
+ agentCandidateLocalMcpServerSchema,
30
+ agentCandidateDisabledMcpServerSchema,
31
+ ]);
44
32
  export const agentCandidateHookCommandSchema = z
45
33
  .object({
46
34
  executable: executableSchema,