@tangle-network/agent-interface 0.54.0 → 0.56.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.d.ts +1930 -0
- package/dist/environment-interactive.js +557 -0
- package/dist/environment-observation.d.ts +7 -7
- package/dist/environment-provider.d.ts +1 -0
- package/dist/environment-provider.js +1 -0
- package/dist/environment-runtime.d.ts +31 -0
- package/dist/environment-runtime.js +51 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ import type { AgentWorkspaceBranching } from "./workspace-branching.js";
|
|
|
10
10
|
import type { AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentSessionStatus, CheckpointRef, CheckpointRequest, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from "./environment-requests.js";
|
|
11
11
|
import type { AgentExactProcessEgressMode, AgentExactProcessProvider } from "./environment-exact-process.js";
|
|
12
12
|
import type { AgentEnvironmentObservation } from "./environment-observation.js";
|
|
13
|
+
import type { AgentInteractiveSession, AgentInteractiveSessionRef, AgentInteractiveSessionStart } from "./environment-interactive.js";
|
|
13
14
|
import type { AgentTerminalSession, TerminalAttachRequest, TerminalAttachResult } from "./environment-terminal.js";
|
|
14
15
|
export interface AgentTurnInput {
|
|
15
16
|
prompt?: string;
|
|
@@ -688,6 +689,12 @@ export interface AgentEnvironment {
|
|
|
688
689
|
terminal?(terminalSessionId: string, options?: {
|
|
689
690
|
signal?: AbortSignal;
|
|
690
691
|
}): AgentTerminalSession;
|
|
692
|
+
/** Start one native coding-agent TUI bound to an exact admitted run. */
|
|
693
|
+
startInteractive?(request: AgentInteractiveSessionStart, options?: {
|
|
694
|
+
signal?: AbortSignal;
|
|
695
|
+
}): Promise<AgentInteractiveSessionRef>;
|
|
696
|
+
/** Reconstruct the exact native coding-agent TUI named by a durable reference. */
|
|
697
|
+
interactive?(ref: AgentInteractiveSessionRef): AgentInteractiveSession;
|
|
691
698
|
refresh?(options?: {
|
|
692
699
|
signal?: AbortSignal;
|
|
693
700
|
}): Promise<void>;
|
|
@@ -766,6 +773,19 @@ export interface AgentEnvironmentCapabilities {
|
|
|
766
773
|
resize: boolean;
|
|
767
774
|
reattach: boolean;
|
|
768
775
|
};
|
|
776
|
+
/** Present only when the provider can start and rediscover exact agent TUIs. */
|
|
777
|
+
interactiveAgent?: {
|
|
778
|
+
start: boolean;
|
|
779
|
+
/** Provider-issued generation claims fence recovered coordinators. */
|
|
780
|
+
control: boolean;
|
|
781
|
+
status: boolean;
|
|
782
|
+
attach: boolean;
|
|
783
|
+
reattach: boolean;
|
|
784
|
+
sendPrompt: boolean;
|
|
785
|
+
input: boolean;
|
|
786
|
+
resize: boolean;
|
|
787
|
+
stop: boolean;
|
|
788
|
+
};
|
|
769
789
|
}
|
|
770
790
|
/** Strict runtime validator for provider capability negotiation. */
|
|
771
791
|
export declare const AgentEnvironmentCapabilitiesSchema: z.ZodObject<{
|
|
@@ -875,6 +895,17 @@ export declare const AgentEnvironmentCapabilitiesSchema: z.ZodObject<{
|
|
|
875
895
|
resize: z.ZodBoolean;
|
|
876
896
|
reattach: z.ZodBoolean;
|
|
877
897
|
}, z.core.$strict>>;
|
|
898
|
+
interactiveAgent: z.ZodOptional<z.ZodObject<{
|
|
899
|
+
start: z.ZodBoolean;
|
|
900
|
+
control: z.ZodBoolean;
|
|
901
|
+
status: z.ZodBoolean;
|
|
902
|
+
attach: z.ZodBoolean;
|
|
903
|
+
reattach: z.ZodBoolean;
|
|
904
|
+
sendPrompt: z.ZodBoolean;
|
|
905
|
+
input: z.ZodBoolean;
|
|
906
|
+
resize: z.ZodBoolean;
|
|
907
|
+
stop: z.ZodBoolean;
|
|
908
|
+
}, z.core.$strict>>;
|
|
878
909
|
}, z.core.$strict>;
|
|
879
910
|
export interface CreateAgentEnvironmentInput {
|
|
880
911
|
profile: AgentProfileRef;
|
|
@@ -189,6 +189,19 @@ export const AgentEnvironmentCapabilitiesSchema = z
|
|
|
189
189
|
reattach: z.boolean(),
|
|
190
190
|
})
|
|
191
191
|
.optional(),
|
|
192
|
+
interactiveAgent: z
|
|
193
|
+
.strictObject({
|
|
194
|
+
start: z.boolean(),
|
|
195
|
+
control: z.boolean(),
|
|
196
|
+
status: z.boolean(),
|
|
197
|
+
attach: z.boolean(),
|
|
198
|
+
reattach: z.boolean(),
|
|
199
|
+
sendPrompt: z.boolean(),
|
|
200
|
+
input: z.boolean(),
|
|
201
|
+
resize: z.boolean(),
|
|
202
|
+
stop: z.boolean(),
|
|
203
|
+
})
|
|
204
|
+
.optional(),
|
|
192
205
|
})
|
|
193
206
|
.superRefine((capabilities, refinement) => {
|
|
194
207
|
if (capabilities.retainedControl !== undefined &&
|
|
@@ -249,6 +262,44 @@ export const AgentEnvironmentCapabilitiesSchema = z
|
|
|
249
262
|
message: "interactive terminal input, resize, and reattach each require attach",
|
|
250
263
|
});
|
|
251
264
|
}
|
|
265
|
+
const interactiveAgent = capabilities.interactiveAgent;
|
|
266
|
+
if (interactiveAgent !== undefined &&
|
|
267
|
+
(interactiveAgent.status ||
|
|
268
|
+
interactiveAgent.attach ||
|
|
269
|
+
interactiveAgent.reattach ||
|
|
270
|
+
interactiveAgent.sendPrompt ||
|
|
271
|
+
interactiveAgent.input ||
|
|
272
|
+
interactiveAgent.resize ||
|
|
273
|
+
interactiveAgent.stop) &&
|
|
274
|
+
!interactiveAgent.start) {
|
|
275
|
+
refinement.addIssue({
|
|
276
|
+
code: "custom",
|
|
277
|
+
path: ["interactiveAgent"],
|
|
278
|
+
message: "interactive agent status, attach, reattach, sendPrompt, input, resize, and stop each require start",
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
if (interactiveAgent !== undefined &&
|
|
282
|
+
(interactiveAgent.attach ||
|
|
283
|
+
interactiveAgent.sendPrompt ||
|
|
284
|
+
interactiveAgent.input ||
|
|
285
|
+
interactiveAgent.resize ||
|
|
286
|
+
interactiveAgent.stop) &&
|
|
287
|
+
!interactiveAgent.control) {
|
|
288
|
+
refinement.addIssue({
|
|
289
|
+
code: "custom",
|
|
290
|
+
path: ["interactiveAgent", "control"],
|
|
291
|
+
message: "interactive agent mutation requires provider-issued control claims",
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
if (interactiveAgent !== undefined &&
|
|
295
|
+
(interactiveAgent.reattach || interactiveAgent.input || interactiveAgent.resize) &&
|
|
296
|
+
!interactiveAgent.attach) {
|
|
297
|
+
refinement.addIssue({
|
|
298
|
+
code: "custom",
|
|
299
|
+
path: ["interactiveAgent"],
|
|
300
|
+
message: "interactive agent reattach, input, and resize each require attach",
|
|
301
|
+
});
|
|
302
|
+
}
|
|
252
303
|
const extensions = capabilities.profile.extensions;
|
|
253
304
|
if (extensions && new Set(extensions).size !== extensions.length) {
|
|
254
305
|
refinement.addIssue({
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export * from "./host-services.js";
|
|
|
8
8
|
export * from "./mcp.js";
|
|
9
9
|
export * from "./provider-adapter.js";
|
|
10
10
|
export type * from "./environment-provider.js";
|
|
11
|
-
export { AgentEnvironmentCapabilitiesSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, ObservationStateSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, assertObservationCredentialFree, observationContainsCredential, observationOf, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
|
|
11
|
+
export { AgentEnvironmentCapabilitiesSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, ObservationStateSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, assertObservationCredentialFree, observationContainsCredential, observationOf, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentInteractiveSessionStatusSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentInteractiveSessionStopRequestDigest, agentInteractiveSessionRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, exactAgentInteractiveSessionStart, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
|
|
12
12
|
export * from "./plan.js";
|
|
13
13
|
export * from "./runtime-control.js";
|
|
14
14
|
export * from "./portable-context.js";
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export * from "./provider-config.js";
|
|
|
7
7
|
export * from "./host-services.js";
|
|
8
8
|
export * from "./mcp.js";
|
|
9
9
|
export * from "./provider-adapter.js";
|
|
10
|
-
export { AgentEnvironmentCapabilitiesSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, ObservationStateSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, assertObservationCredentialFree, observationContainsCredential, observationOf, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
|
|
10
|
+
export { AgentEnvironmentCapabilitiesSchema, AgentNativeContextContinuationResultSchema, AgentTurnInputSchema, AgentTurnResultSchema, agentNativeContextContinuationResultMatchesRequest, AccountUsageSchema, AgentEnvironmentObservationSchema, AgentEnvironmentStatusSchema, ComputeBillingSchema, EnvironmentLifecycleSchema, ModelUsageSchema, ObservationProvenanceSchema, ObservationStateSchema, PlacementDescriptorSchema, ProviderIdentitySchema, ResourceProfileSchema, ResourceUseSampleSchema, SafeEndpointSchema, agentEnvironmentObservationIdentityMatches, assertObservationCredentialFree, observationContainsCredential, observationOf, AgentInteractiveSessionAttachSchema, AgentInteractiveSessionControlClaimAcknowledgementSchema, AgentInteractiveSessionControlClaimRequestSchema, AgentInteractiveSessionControlClaimSchema, AgentInteractiveSessionPromptAcknowledgementSchema, AgentInteractiveSessionPromptCommandSchema, AgentInteractiveSessionRefSchema, AgentInteractiveSessionStartSchema, AgentInteractiveSessionStopAcknowledgementSchema, AgentInteractiveSessionStopCommandSchema, AgentInteractiveSessionStatusSchema, agentInteractiveSessionControlClaimAcknowledgementMatchesRequest, agentInteractiveSessionControlClaimRequestDigest, agentInteractiveSessionControlClaimMatchesRef, agentInteractiveSessionControlClaimIsNewer, agentInteractiveSessionPromptAcknowledgementMatchesCommand, agentInteractiveSessionPromptRequestDigest, agentInteractiveSessionStopAcknowledgementMatchesCommand, agentInteractiveSessionStopRequestDigest, agentInteractiveSessionRequestDigest, agentInteractiveSessionRefMatchesStart, agentInteractiveSessionRunRef, agentInteractiveSessionStatusMatchesRef, exactAgentInteractiveSessionStart, TerminalAttachRequestSchema, TerminalAttachResultSchema, TerminalDetachAckSchema, TerminalInputSchema, TerminalOutputEventSchema, TerminalReplayWindowSchema, TerminalResizeSchema, TerminalSessionRefSchema, terminalAttachResultMatchesRequest, terminalSessionUsable, } from "./environment-provider.js";
|
|
11
11
|
export * from "./plan.js";
|
|
12
12
|
export * from "./runtime-control.js";
|
|
13
13
|
export * from "./portable-context.js";
|