@tangle-network/agent-interface 2.6.1 → 2.7.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.
- package/dist/environment-interactive-control.d.ts +1 -1
- package/dist/environment-interactive-control.js +8 -2
- package/dist/environment-runtime.d.ts +1 -1
- package/dist/environment-runtime.js +6 -1
- package/dist/portable-context-continuation.d.ts +1 -1
- package/dist/portable-context-continuation.js +3 -2
- package/dist/runtime-control.js +2 -1
- package/package.json +1 -1
|
@@ -1512,7 +1512,7 @@ export declare const AgentInteractiveSessionPromptCommandSchema: z.ZodObject<{
|
|
|
1512
1512
|
holderId: z.ZodString;
|
|
1513
1513
|
expiresAt: z.ZodISODateTime;
|
|
1514
1514
|
}, z.core.$strict>;
|
|
1515
|
-
prompt: z.
|
|
1515
|
+
prompt: z.ZodCustom<string, string>;
|
|
1516
1516
|
requestDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
|
|
1517
1517
|
}, z.core.$strict>;
|
|
1518
1518
|
export interface AgentInteractiveSessionPromptAcknowledgement {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { canonicalCandidateDigest, sha256DigestSchema, } from "./agent-candidate-schema-common.js";
|
|
3
3
|
import { agentExecutionPreparationReceiptSchema, } from "./agent-execution-preparation-receipt.js";
|
|
4
|
-
import { boundedIdentifierSchema, boundedStringSchema, } from "./contract-limits.js";
|
|
4
|
+
import { boundedIdentifierSchema, boundedEventContentStringSchema, boundedStringSchema, } from "./contract-limits.js";
|
|
5
5
|
import { agentInteractiveDimensionSchema as interactiveDimensionSchema, sameAgentExactRun as sameExactRun, } from "./environment-interactive-shared.js";
|
|
6
6
|
import { AgentExactRunControlRefSchema } from "./runtime-control.js";
|
|
7
7
|
/**
|
|
@@ -348,7 +348,13 @@ const AgentInteractiveSessionPromptCommandMaterialSchema = z
|
|
|
348
348
|
operationId: boundedIdentifierSchema,
|
|
349
349
|
ref: AgentInteractiveSessionRefSchema,
|
|
350
350
|
control: AgentInteractiveSessionControlClaimSchema,
|
|
351
|
-
|
|
351
|
+
// Content, not metadata: see environment-runtime.ts.
|
|
352
|
+
// Content, not metadata: see environment-runtime.ts. `boundedEventContentStringSchema` is a
|
|
353
|
+
// custom schema and carries no `.min`, so the non-empty requirement is kept as a refinement —
|
|
354
|
+
// an interactive prompt with nothing in it is still refused.
|
|
355
|
+
prompt: boundedEventContentStringSchema.refine((value) => value.length >= 1, {
|
|
356
|
+
message: "interactive prompt must not be empty",
|
|
357
|
+
}),
|
|
352
358
|
})
|
|
353
359
|
.superRefine((command, refinement) => {
|
|
354
360
|
if (!agentInteractiveSessionControlClaimMatchesRef(command.ref, command.control)) {
|
|
@@ -38,7 +38,7 @@ export interface AgentTurnInput {
|
|
|
38
38
|
providerOptions?: Record<string, unknown>;
|
|
39
39
|
}
|
|
40
40
|
export declare const AgentTurnInputSchema: z.ZodObject<{
|
|
41
|
-
prompt: z.ZodOptional<z.
|
|
41
|
+
prompt: z.ZodOptional<z.ZodCustom<string, string>>;
|
|
42
42
|
parts: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
43
43
|
type: z.ZodLiteral<"text">;
|
|
44
44
|
text: z.ZodString;
|
|
@@ -9,7 +9,12 @@ import { boundedEventContentJsonSchema, boundedEventContentRecordSchema, bounded
|
|
|
9
9
|
import { InputPartSchema } from "./portable-context-shared.js";
|
|
10
10
|
import { deepFreeze } from "./deep-freeze.js";
|
|
11
11
|
export const AgentTurnInputSchema = z.strictObject({
|
|
12
|
-
prompt:
|
|
12
|
+
// A prompt is what the agent is asked to do, so it is CONTENT: its size is set by the work,
|
|
13
|
+
// not by the protocol. Held to the metadata bound it capped a manager's brief at 16,384
|
|
14
|
+
// characters, which refused a director handing a checker a 27 KB patch to re-verify a measured
|
|
15
|
+
// result (agent-sdk#313). Refusal is still right here — a silently shortened instruction is
|
|
16
|
+
// worse than none — so only the ceiling moves.
|
|
17
|
+
prompt: boundedEventContentStringSchema.optional(),
|
|
13
18
|
parts: z.array(InputPartSchema).max(CONTRACT_MAX_ARRAY_LENGTH).optional(),
|
|
14
19
|
sessionId: boundedIdentifierSchema.optional(),
|
|
15
20
|
model: boundedIdentifierSchema.optional(),
|
|
@@ -62,7 +62,7 @@ export interface NativeContextContinuationTurn {
|
|
|
62
62
|
providerOptions?: Record<string, unknown>;
|
|
63
63
|
}
|
|
64
64
|
export declare const NativeContextContinuationTurnSchema: z.ZodObject<{
|
|
65
|
-
prompt: z.ZodOptional<z.
|
|
65
|
+
prompt: z.ZodOptional<z.ZodCustom<string, string>>;
|
|
66
66
|
parts: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
67
|
type: z.ZodLiteral<"text">;
|
|
68
68
|
text: z.ZodString;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AgentExactRunControlRefSchema, } from "./runtime-control.js";
|
|
3
3
|
import { idSchema, InputPartSchema, jsonRecordSchema, sha256DigestSchema, wireDigest } from "./portable-context-shared.js";
|
|
4
|
-
import { boundedStringSchema, CONTRACT_MAX_ARRAY_LENGTH } from "./contract-limits.js";
|
|
4
|
+
import { boundedEventContentStringSchema, boundedStringSchema, CONTRACT_MAX_ARRAY_LENGTH } from "./contract-limits.js";
|
|
5
5
|
export const NativeContextBoundarySchema = z
|
|
6
6
|
.discriminatedUnion("kind", [
|
|
7
7
|
z.strictObject({ kind: z.literal("token"), token: idSchema }),
|
|
@@ -40,7 +40,8 @@ const NativeContextContinuationRequestMaterialSchema = z.strictObject({
|
|
|
40
40
|
expectedBoundary: NativeContextBoundaryProofSchema,
|
|
41
41
|
});
|
|
42
42
|
export const NativeContextContinuationTurnSchema = z.strictObject({
|
|
43
|
-
|
|
43
|
+
// Content, not metadata: see environment-runtime.ts.
|
|
44
|
+
prompt: boundedEventContentStringSchema.optional(),
|
|
44
45
|
parts: z.array(InputPartSchema).max(CONTRACT_MAX_ARRAY_LENGTH).optional(),
|
|
45
46
|
model: idSchema.optional(),
|
|
46
47
|
context: jsonRecordSchema.optional(),
|
package/dist/runtime-control.js
CHANGED
|
@@ -268,7 +268,8 @@ const partSchema = z.discriminatedUnion("type", [
|
|
|
268
268
|
z.strictObject({
|
|
269
269
|
...partBase,
|
|
270
270
|
type: z.literal("subtask"),
|
|
271
|
-
|
|
271
|
+
// Content, not metadata: see environment-runtime.ts.
|
|
272
|
+
prompt: boundedEventContentStringSchema,
|
|
272
273
|
description: boundedStringSchema,
|
|
273
274
|
agent: stableIdSchema,
|
|
274
275
|
}),
|