@hosty-sdk/app 0.47.0 → 0.48.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.
@@ -0,0 +1,63 @@
1
+ import { type AgentAttachmentChunk, type AgentCancelInput, type AgentCapabilities, type AgentConfiguration, type AgentConfigurationCreate, type AgentControlReceipt, type AgentEvent, type AgentMcpSelection, type AgentOperation, type AgentPendingDecision, type AgentResponseInput, type AgentRunControlInput, type AgentRunInput, type AgentRunSnapshot, type AgentSession, type AgentSessionCreate } from "./agent.js";
2
+ export declare const AGENT_COMMAND_MAX_BYTES: number;
3
+ type AgentParsedBase = {
4
+ method: string;
5
+ path: string;
6
+ sessionId?: string;
7
+ runId?: string;
8
+ requestId?: string;
9
+ connectionId?: string;
10
+ attachmentId?: string;
11
+ chunkIndex?: number;
12
+ query: {
13
+ cursor?: string;
14
+ limit?: number;
15
+ after?: string;
16
+ };
17
+ };
18
+ export type AgentParsedRequest = AgentParsedBase & ({
19
+ operation: "sessions.create";
20
+ input: AgentSessionCreate;
21
+ } | {
22
+ operation: "sessions.configure";
23
+ input: AgentConfigurationCreate;
24
+ } | {
25
+ operation: "runs.start";
26
+ input: AgentRunInput;
27
+ } | {
28
+ operation: "runs.respond";
29
+ input: AgentResponseInput;
30
+ } | {
31
+ operation: "runs.cancel";
32
+ input: AgentCancelInput;
33
+ } | {
34
+ operation: "runs.control";
35
+ input: AgentRunControlInput;
36
+ } | {
37
+ operation: "attachments.write";
38
+ input: AgentAttachmentChunk;
39
+ } | {
40
+ operation: Exclude<AgentOperation, "sessions.create" | "sessions.configure" | "runs.start" | "runs.respond" | "runs.cancel" | "runs.control" | "attachments.write">;
41
+ input: undefined;
42
+ });
43
+ export declare function validateAgentMcpSelection(value: unknown): asserts value is AgentMcpSelection;
44
+ export declare function validateAgentConfiguration(value: unknown): asserts value is AgentConfiguration;
45
+ export declare function validateAgentAttachmentChunk(value: unknown, index?: number): asserts value is AgentAttachmentChunk;
46
+ export declare function validateAgentSessionCreate(value: unknown): asserts value is AgentSessionCreate;
47
+ export declare function validateAgentConfigurationCreate(value: unknown): asserts value is AgentConfigurationCreate;
48
+ export declare function validateAgentRunInput(value: unknown): asserts value is AgentRunInput;
49
+ export declare function validateAgentResponseInput(value: unknown): asserts value is AgentResponseInput;
50
+ export declare function validateAgentCancelInput(value: unknown): asserts value is AgentCancelInput;
51
+ /** This validates an attestation's shape only. Providers must independently confirm actual native exit. */
52
+ export declare function validateAgentRunControlInput(value: unknown): asserts value is AgentRunControlInput;
53
+ /** Validate the actual relative path and bytes before Core introspection. Never trust body identity fields. */
54
+ export declare function validateAgentRequest(method: string, path: string, body: string | Uint8Array, expectedOperation?: AgentOperation): AgentParsedRequest;
55
+ export declare function agentReplayCursor(after?: string | null, lastEventId?: string | null): string | undefined;
56
+ export declare function validateAgentPendingDecision(value: unknown): asserts value is AgentPendingDecision;
57
+ export declare function validateAgentRunSnapshot(value: unknown): asserts value is AgentRunSnapshot;
58
+ export declare function validateAgentEvent(value: unknown): asserts value is AgentEvent;
59
+ export declare function validateAgentCapabilities(value: unknown): asserts value is AgentCapabilities;
60
+ export declare function validateAgentSession(value: unknown): asserts value is AgentSession;
61
+ export declare function validateAgentControlReceipt(value: unknown): asserts value is AgentControlReceipt;
62
+ export declare function encodeAgentSseEvent(event: AgentEvent, cursor: string): string;
63
+ export {};