@tangle-network/agent-interface 5.4.0 → 5.5.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.
|
@@ -1816,6 +1816,10 @@ export declare function createAgentEnvironmentWithIdempotency<T extends object>(
|
|
|
1816
1816
|
/** Reconstruct an existing environment; never allocates a replacement. */
|
|
1817
1817
|
export interface AgentEnvironmentGetOptions {
|
|
1818
1818
|
signal?: AbortSignal;
|
|
1819
|
+
/** Side-effect-free custody discovery on a qualified provider. Never resumes, installs or
|
|
1820
|
+
* rebinds; the returned snapshot cannot execute. Unsupported providers must reject this mode.
|
|
1821
|
+
* Expired installed custody may be returned as metadata, never as dispatch authority. */
|
|
1822
|
+
readOnly?: true;
|
|
1819
1823
|
/** Explicit custody attachment through the existing egress lifecycle. Omission reads current
|
|
1820
1824
|
* custody; [] revokes custom bindings. A get never allocates a replacement environment. */
|
|
1821
1825
|
proxySecrets?: readonly ProxySecretBinding[];
|
|
@@ -1827,7 +1831,7 @@ export interface AgentEnvironmentGetOptions {
|
|
|
1827
1831
|
* Authorize the first turn of an accepted portable transfer. The provider looks up the exact
|
|
1828
1832
|
* durable operation and returns its dispatch-capable environment with contextTransferReceipt.
|
|
1829
1833
|
* A missing, uncertain, conflicting or unsupported receipt refuses attachment. The request's
|
|
1830
|
-
* exact profile, workspace and resources remain authoritative;
|
|
1834
|
+
* exact profile, workspace and resources remain authoritative; use readOnly for discovery without reconnect side effects.
|
|
1831
1835
|
*/
|
|
1832
1836
|
contextTransfer?: ContextTransferRequest;
|
|
1833
1837
|
}
|
|
@@ -2323,6 +2327,11 @@ export declare const AgentEnvironmentGetOptionsSchema: z.ZodObject<{
|
|
|
2323
2327
|
}, z.core.$strict>>;
|
|
2324
2328
|
}, z.core.$strict>>;
|
|
2325
2329
|
}, z.core.$strict>;
|
|
2330
|
+
/** Explicit opt-in for providers implementing side-effect-free, non-executable discovery. */
|
|
2331
|
+
export declare const AgentEnvironmentReadOnlyGetOptionsSchema: z.ZodObject<{
|
|
2332
|
+
signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
|
|
2333
|
+
readOnly: z.ZodLiteral<true>;
|
|
2334
|
+
}, z.core.$strict>;
|
|
2326
2335
|
export interface AgentEnvironmentProvider {
|
|
2327
2336
|
readonly name: string;
|
|
2328
2337
|
readonly exactProcess?: AgentExactProcessProvider;
|
|
@@ -526,8 +526,11 @@ export async function createAgentEnvironmentWithIdempotency(records, input, crea
|
|
|
526
526
|
throw error;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
+
// Keep the existing parser strict: published providers that import it must not silently
|
|
530
|
+
// accept readOnly and then perform their ordinary reconnect side effects.
|
|
531
|
+
const environmentGetSignalSchema = z.custom().optional();
|
|
529
532
|
export const AgentEnvironmentGetOptionsSchema = z.strictObject({
|
|
530
|
-
signal:
|
|
533
|
+
signal: environmentGetSignalSchema,
|
|
531
534
|
proxySecrets: ProxySecretsSchema.optional(),
|
|
532
535
|
proxySecretParents: ProxySecretParentsSchema.optional(),
|
|
533
536
|
...ProxySecretUpdateControlsSchema.shape,
|
|
@@ -545,3 +548,8 @@ export const AgentEnvironmentGetOptionsSchema = z.strictObject({
|
|
|
545
548
|
ctx.addIssue({ code: "custom", path: ["proxySecrets"], message: "proxy update controls require an explicit proxySecrets selection" });
|
|
546
549
|
}
|
|
547
550
|
});
|
|
551
|
+
/** Explicit opt-in for providers implementing side-effect-free, non-executable discovery. */
|
|
552
|
+
export const AgentEnvironmentReadOnlyGetOptionsSchema = z.strictObject({
|
|
553
|
+
signal: environmentGetSignalSchema,
|
|
554
|
+
readOnly: z.literal(true),
|
|
555
|
+
});
|