@moxt-ai/mobius-sdk 0.0.64 → 0.0.65
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/channel.d.ts +1 -1
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js.map +1 -1
- package/dist/client.d.ts +1 -89
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -558
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources.d.ts +1 -97
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +5 -194
- package/dist/resources.js.map +1 -1
- package/dist/service-client.d.ts +2 -54
- package/dist/service-client.d.ts.map +1 -1
- package/dist/service-client.js +1 -566
- package/dist/service-client.js.map +1 -1
- package/package.json +2 -2
package/dist/channel.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type AgentInstallCancelRequest, type AgentInstallRequest, type
|
|
1
|
+
export { type AgentInstallCancelRequest, type AgentInstallRequest, type ConnectMobiusClientOptions as ConnectMobiusChannelClientOptions, connectMobiusClient as connectMobiusChannelClient, type ElicitationResponseRequest, MobiusClient as MobiusChannelClient, MobiusClientError as MobiusChannelError, type MobiusRelayUrlProvider, type PermissionResponseRequest, } from "./client.ts";
|
|
2
2
|
export * from "./index.ts";
|
|
3
3
|
//# sourceMappingURL=channel.d.ts.map
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,IAAI,iCAAiC,EACpE,mBAAmB,IAAI,0BAA0B,EACjD,KAAK,0BAA0B,EAC/B,YAAY,IAAI,mBAAmB,EACnC,iBAAiB,IAAI,kBAAkB,EACvC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,GACjC,MAAM,aAAa,CAAC;AACrB,cAAc,YAAY,CAAC"}
|
package/dist/channel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,mBAAmB,IAAI,0BAA0B,EAEjD,YAAY,IAAI,mBAAmB,EACnC,iBAAiB,IAAI,kBAAkB,GAG1C,MAAM,aAAa,CAAC;AACrB,cAAc,YAAY,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,48 +1,19 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type AgentInstallCancelledEvent, type AgentInstallCompletedEvent, type AgentInstallFailedEvent, type AgentInstallProgressEvent, type AgentInstallStartedEvent, type SessionElicitationRespondCommand, type SessionPermissionResolvedEvent } from "@moxt-ai/mobius-protocol";
|
|
2
2
|
import ReconnectingWebSocket from "partysocket/ws";
|
|
3
|
-
export type LiveSessionMessage = SessionStartedEvent | AgentMessageDeltaEvent | SessionCompletedEvent | SessionFailedEvent;
|
|
4
3
|
export type MobiusRelayUrlProvider = (signal: AbortSignal) => Promise<string>;
|
|
5
4
|
export interface ConnectMobiusClientOptions {
|
|
6
5
|
readonly protocols?: readonly string[];
|
|
7
|
-
readonly onNativeSessionResult?: (event: NativeSessionResult) => void;
|
|
8
|
-
readonly onActivity?: () => void;
|
|
9
|
-
readonly onCommands?: (event: SessionCommandsUpdatedEvent) => void;
|
|
10
|
-
readonly onConfig?: (event: SessionConfigUpdatedEvent) => void;
|
|
11
|
-
readonly onContent?: (event: AgentContentEvent) => void;
|
|
12
6
|
readonly onInstallCancelled?: (event: AgentInstallCancelledEvent) => void;
|
|
13
7
|
readonly onInstallCompleted?: (event: AgentInstallCompletedEvent) => void;
|
|
14
8
|
readonly onInstallFailed?: (event: AgentInstallFailedEvent) => void;
|
|
15
9
|
readonly onInstallProgress?: (event: AgentInstallProgressEvent) => void;
|
|
16
10
|
readonly onInstallStarted?: (event: AgentInstallStartedEvent) => void;
|
|
17
|
-
readonly onElicitation?: (event: SessionElicitationRequestedEvent) => void;
|
|
18
|
-
readonly onElicitationResolved?: (event: SessionElicitationResolvedEvent) => void;
|
|
19
|
-
readonly onHistoryChanged?: () => void;
|
|
20
|
-
readonly onLiveMessage?: (message: LiveSessionMessage) => void;
|
|
21
|
-
readonly onInfo?: (event: SessionInfoUpdatedEvent) => void;
|
|
22
|
-
readonly onPermission?: (event: SessionPermissionRequestedEvent) => void;
|
|
23
|
-
readonly onPermissionResolved?: (event: SessionPermissionResolvedEvent) => void;
|
|
24
11
|
readonly onProtocolError?: (error: MobiusClientError) => void;
|
|
25
|
-
readonly onReady?: (event: SessionReadyEvent) => void;
|
|
26
12
|
readonly onReconnecting?: () => void;
|
|
27
13
|
readonly onStatus?: (online: boolean) => void;
|
|
28
|
-
readonly onSessionStatusChanged?: (event: SessionStatusChangedEvent) => void;
|
|
29
14
|
readonly onUnavailable?: () => void;
|
|
30
|
-
readonly onUsage?: (event: SessionUsageUpdatedEvent) => void;
|
|
31
|
-
readonly onWorkspace?: (event: WorkspaceEntriesEvent) => void;
|
|
32
15
|
readonly relayUrl: string | MobiusRelayUrlProvider;
|
|
33
16
|
}
|
|
34
|
-
export interface PromptObserver {
|
|
35
|
-
readonly onActivity?: (activity: AgentActivityEvent) => void;
|
|
36
|
-
readonly onContent?: (content: AgentContentEvent) => void;
|
|
37
|
-
readonly onDelta?: (text: string, committedSequence: string) => void;
|
|
38
|
-
readonly onNarration?: (narration: AgentActivityNarrationEvent) => void;
|
|
39
|
-
readonly onStarted?: (attemptId: string) => void;
|
|
40
|
-
}
|
|
41
|
-
export interface CancelRequest {
|
|
42
|
-
readonly commandId: string;
|
|
43
|
-
readonly sessionId: string;
|
|
44
|
-
readonly turnId?: string;
|
|
45
|
-
}
|
|
46
17
|
export interface AgentInstallRequest {
|
|
47
18
|
readonly agentId: string;
|
|
48
19
|
readonly requestId?: string;
|
|
@@ -50,46 +21,6 @@ export interface AgentInstallRequest {
|
|
|
50
21
|
export interface AgentInstallCancelRequest {
|
|
51
22
|
readonly requestId: string;
|
|
52
23
|
}
|
|
53
|
-
export interface PromptRequest {
|
|
54
|
-
readonly additionalDirectoryIds?: readonly string[];
|
|
55
|
-
readonly agentId: string;
|
|
56
|
-
readonly bindingId: string;
|
|
57
|
-
readonly commandId?: string;
|
|
58
|
-
readonly directoryId?: string;
|
|
59
|
-
readonly disposition?: string;
|
|
60
|
-
readonly images?: readonly PromptImage[];
|
|
61
|
-
readonly observer?: PromptObserver;
|
|
62
|
-
readonly prompt: string;
|
|
63
|
-
readonly resources?: readonly PromptResource[];
|
|
64
|
-
readonly sessionConfigurations?: readonly SessionConfigurationSelection[];
|
|
65
|
-
readonly sessionId?: string;
|
|
66
|
-
readonly targetCommandId?: string;
|
|
67
|
-
}
|
|
68
|
-
export interface WorkspaceListRequest {
|
|
69
|
-
readonly bindingId: string;
|
|
70
|
-
readonly directoryId: string;
|
|
71
|
-
readonly requestId?: string;
|
|
72
|
-
}
|
|
73
|
-
export interface SessionPrepareRequest {
|
|
74
|
-
readonly additionalDirectoryIds: readonly string[];
|
|
75
|
-
readonly agentId: string;
|
|
76
|
-
readonly bindingId: string;
|
|
77
|
-
readonly directoryId: string;
|
|
78
|
-
readonly requestId?: string;
|
|
79
|
-
readonly sessionId: string;
|
|
80
|
-
/**
|
|
81
|
-
* Prepares the Session for inspection only, without creating it on the Relay. A conversation this
|
|
82
|
-
* browser has not sent anything to yet needs the Agent's capabilities and commands to render its
|
|
83
|
-
* composer, but it is not a Session the user has started, so it must not appear in the directory.
|
|
84
|
-
*/
|
|
85
|
-
readonly transient?: boolean;
|
|
86
|
-
}
|
|
87
|
-
export interface SessionConfigureRequest extends SessionPrepareRequest {
|
|
88
|
-
readonly booleanValue: boolean;
|
|
89
|
-
readonly configId: string;
|
|
90
|
-
readonly value: string;
|
|
91
|
-
readonly valueType: SessionConfigUpdatedEvent["configOptions"][number]["type"];
|
|
92
|
-
}
|
|
93
24
|
export interface PermissionResponseRequest {
|
|
94
25
|
readonly interactionId: string;
|
|
95
26
|
readonly optionId: string;
|
|
@@ -102,16 +33,6 @@ export interface ElicitationResponseRequest {
|
|
|
102
33
|
readonly interactionId: string;
|
|
103
34
|
readonly sessionId: string;
|
|
104
35
|
}
|
|
105
|
-
export interface PromptResult {
|
|
106
|
-
readonly sessionId: string;
|
|
107
|
-
readonly stopReason: string;
|
|
108
|
-
}
|
|
109
|
-
export interface FileReadResult {
|
|
110
|
-
readonly bytes: Uint8Array;
|
|
111
|
-
readonly mediaType: string;
|
|
112
|
-
readonly modifiedAt: string;
|
|
113
|
-
readonly name: string;
|
|
114
|
-
}
|
|
115
36
|
export declare class MobiusClientError extends Error {
|
|
116
37
|
readonly code: string;
|
|
117
38
|
constructor(code: string, message: string, options?: ErrorOptions);
|
|
@@ -120,17 +41,8 @@ export declare class MobiusClient {
|
|
|
120
41
|
#private;
|
|
121
42
|
constructor(socket: ReconnectingWebSocket, options: ConnectMobiusClientOptions, connectionController?: AbortController | null);
|
|
122
43
|
readonly ready: () => Promise<void>;
|
|
123
|
-
readonly listWorkspace: (request: WorkspaceListRequest, signal: AbortSignal) => Promise<WorkspaceEntriesEvent>;
|
|
124
|
-
readonly readFile: (sessionId: string, path: string, signal: AbortSignal, maxBytes?: number) => Promise<FileReadResult>;
|
|
125
|
-
readonly prepareSession: (request: SessionPrepareRequest, signal: AbortSignal) => Promise<SessionReadyEvent>;
|
|
126
|
-
readonly manageNativeSession: (command: NativeSessionRequest, signal: AbortSignal) => Promise<NativeSessionResult>;
|
|
127
|
-
readonly configureSession: (request: SessionConfigureRequest, signal: AbortSignal) => Promise<SessionConfigUpdatedEvent>;
|
|
128
|
-
readonly respondPermission: (request: PermissionResponseRequest) => Promise<SessionPermissionResolvedEvent>;
|
|
129
|
-
readonly respondElicitation: (request: ElicitationResponseRequest) => Promise<SessionElicitationResolvedEvent>;
|
|
130
|
-
readonly cancel: (request: CancelRequest) => void;
|
|
131
44
|
readonly cancelAgentInstallation: (request: AgentInstallCancelRequest) => void;
|
|
132
45
|
readonly installAgent: (request: AgentInstallRequest) => Promise<AgentInstallCompletedEvent>;
|
|
133
|
-
readonly prompt: (request: PromptRequest) => Promise<PromptResult>;
|
|
134
46
|
readonly close: () => void;
|
|
135
47
|
}
|
|
136
48
|
export declare function connectMobiusClient(options: ConnectMobiusClientOptions): Promise<MobiusClient>;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAQH,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAc7B,KAAK,gCAAgC,EACrC,KAAK,8BAA8B,EACtC,MAAM,0BAA0B,CAAC;AAClC,OAAO,qBAAoE,MAAM,gBAAgB,CAAC;AAOlG,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,CAAC;IAC1E,QAAQ,CAAC,kBAA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