@roj-ai/shared 0.0.2
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/chat-protocol.d.ts +60 -0
- package/dist/chat-protocol.d.ts.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/domain-utils.d.ts +16 -0
- package/dist/lib/domain-utils.d.ts.map +1 -0
- package/dist/lib/ids.d.ts +18 -0
- package/dist/lib/ids.d.ts.map +1 -0
- package/dist/lib/result.d.ts +26 -0
- package/dist/lib/result.d.ts.map +1 -0
- package/dist/projections/agent-detail-projection.d.ts +91 -0
- package/dist/projections/agent-detail-projection.d.ts.map +1 -0
- package/dist/projections/agent-registry.d.ts +16 -0
- package/dist/projections/agent-registry.d.ts.map +1 -0
- package/dist/projections/agent-tree-projection.d.ts +30 -0
- package/dist/projections/agent-tree-projection.d.ts.map +1 -0
- package/dist/projections/chat-debug.d.ts +34 -0
- package/dist/projections/chat-debug.d.ts.map +1 -0
- package/dist/projections/events.d.ts +9 -0
- package/dist/projections/events.d.ts.map +1 -0
- package/dist/projections/index.d.ts +22 -0
- package/dist/projections/index.d.ts.map +1 -0
- package/dist/projections/mailbox.d.ts +21 -0
- package/dist/projections/mailbox.d.ts.map +1 -0
- package/dist/projections/metrics.d.ts +30 -0
- package/dist/projections/metrics.d.ts.map +1 -0
- package/dist/projections/protocol-status.d.ts +9 -0
- package/dist/projections/protocol-status.d.ts.map +1 -0
- package/dist/projections/services-projection.d.ts +24 -0
- package/dist/projections/services-projection.d.ts.map +1 -0
- package/dist/projections/session-info.d.ts +19 -0
- package/dist/projections/session-info.d.ts.map +1 -0
- package/dist/projections/timeline.d.ts +26 -0
- package/dist/projections/timeline.d.ts.map +1 -0
- package/dist/projections/types.d.ts +182 -0
- package/dist/projections/types.d.ts.map +1 -0
- package/dist/rpc/client.d.ts +79 -0
- package/dist/rpc/client.d.ts.map +1 -0
- package/dist/rpc/index.d.ts +9 -0
- package/dist/rpc/index.d.ts.map +1 -0
- package/dist/src/api-types.d.ts +8 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/rpc/admin-methods.d.ts +99 -0
- package/dist/src/rpc/client.d.ts +26 -0
- package/dist/src/rpc/definition.d.ts +39 -0
- package/dist/src/rpc/instance-methods.d.ts +94 -0
- package/dist/src/rpc/methods.d.ts +260 -0
- package/dist/src/rpc/server.d.ts +21 -0
- package/dist/src/workspace-config.d.ts +16 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +36 -0
- package/src/chat-protocol.ts +46 -0
- package/src/globals.d.ts +3 -0
- package/src/index.ts +82 -0
- package/src/lib/domain-utils.ts +26 -0
- package/src/lib/ids.ts +19 -0
- package/src/lib/result.ts +35 -0
- package/src/projections/agent-detail-projection.ts +623 -0
- package/src/projections/agent-registry.ts +37 -0
- package/src/projections/agent-tree-projection.ts +229 -0
- package/src/projections/chat-debug.ts +260 -0
- package/src/projections/events.ts +10 -0
- package/src/projections/index.ts +59 -0
- package/src/projections/mailbox.ts +113 -0
- package/src/projections/metrics.ts +111 -0
- package/src/projections/protocol-status.ts +23 -0
- package/src/projections/services-projection.ts +89 -0
- package/src/projections/session-info.ts +47 -0
- package/src/projections/timeline.ts +228 -0
- package/src/projections/types.ts +237 -0
- package/src/rpc/client.ts +188 -0
- package/src/rpc/index.ts +14 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View model types for client-side projections.
|
|
3
|
+
*/
|
|
4
|
+
import type { AgentCounters, AgentId, AgentPauseReason, AskUserInputType, ChatMessageId, DomainEvent, LLMCallId, MessageId, ProtocolAgentStatus, ToolCallId } from '@roj-ai/sdk';
|
|
5
|
+
/**
|
|
6
|
+
* Agent tree node for visualization.
|
|
7
|
+
*/
|
|
8
|
+
export interface AgentTreeNode {
|
|
9
|
+
id: AgentId;
|
|
10
|
+
definitionName: string;
|
|
11
|
+
status: ProtocolAgentStatus;
|
|
12
|
+
parentId: AgentId | null;
|
|
13
|
+
children: AgentTreeNode[];
|
|
14
|
+
mailboxCount: number;
|
|
15
|
+
pendingToolCalls: number;
|
|
16
|
+
isExecuting: boolean;
|
|
17
|
+
cost: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Agent detail response - computed client-side from SessionState.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetAgentDetailResponse {
|
|
23
|
+
id: AgentId;
|
|
24
|
+
definitionName: string;
|
|
25
|
+
status: ProtocolAgentStatus;
|
|
26
|
+
parentId: AgentId | null;
|
|
27
|
+
mailbox: MailboxMessageView[];
|
|
28
|
+
conversationHistory: ConversationMessageView[];
|
|
29
|
+
pendingToolCalls: ToolCallView[];
|
|
30
|
+
counters: AgentCounters;
|
|
31
|
+
loadedSkills: {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
loadedAt: number;
|
|
35
|
+
}[];
|
|
36
|
+
cost: number;
|
|
37
|
+
typedInput?: unknown;
|
|
38
|
+
pauseReason?: AgentPauseReason;
|
|
39
|
+
pauseMessage?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface MailboxMessageView {
|
|
42
|
+
id: MessageId;
|
|
43
|
+
from: string;
|
|
44
|
+
content: string;
|
|
45
|
+
timestamp: number;
|
|
46
|
+
consumed: boolean;
|
|
47
|
+
}
|
|
48
|
+
export type ConversationMessageView = UserConversationMessageView | AssistantConversationMessageView | ToolConversationMessageView | SystemConversationMessageView;
|
|
49
|
+
export interface UserConversationMessageView {
|
|
50
|
+
role: 'user';
|
|
51
|
+
content: string;
|
|
52
|
+
fullContent: string;
|
|
53
|
+
timestamp?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface AssistantConversationMessageView {
|
|
56
|
+
role: 'assistant';
|
|
57
|
+
content: string;
|
|
58
|
+
fullContent: string;
|
|
59
|
+
toolCalls?: {
|
|
60
|
+
id: ToolCallId;
|
|
61
|
+
name: string;
|
|
62
|
+
input: unknown;
|
|
63
|
+
}[];
|
|
64
|
+
timestamp?: number;
|
|
65
|
+
cost?: number;
|
|
66
|
+
llmCallId?: LLMCallId;
|
|
67
|
+
promptTokens?: number;
|
|
68
|
+
cachedTokens?: number;
|
|
69
|
+
cacheWriteTokens?: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ToolConversationMessageView {
|
|
72
|
+
role: 'tool';
|
|
73
|
+
toolCallId: ToolCallId;
|
|
74
|
+
content: string;
|
|
75
|
+
fullContent: string;
|
|
76
|
+
isError: boolean;
|
|
77
|
+
timestamp?: number;
|
|
78
|
+
}
|
|
79
|
+
export interface SystemConversationMessageView {
|
|
80
|
+
role: 'system';
|
|
81
|
+
content: string;
|
|
82
|
+
fullContent: string;
|
|
83
|
+
timestamp?: number;
|
|
84
|
+
}
|
|
85
|
+
export interface ToolCallView {
|
|
86
|
+
id: ToolCallId;
|
|
87
|
+
name: string;
|
|
88
|
+
input: unknown;
|
|
89
|
+
status: 'pending' | 'executing' | 'completed' | 'failed';
|
|
90
|
+
result?: unknown;
|
|
91
|
+
error?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Events response - used by sessions.getEvents RPC method.
|
|
95
|
+
*/
|
|
96
|
+
export interface GetEventsResponse {
|
|
97
|
+
events: DomainEvent[];
|
|
98
|
+
total: number;
|
|
99
|
+
lastIndex: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Metrics view - computed client-side from events.
|
|
103
|
+
*/
|
|
104
|
+
export interface ProviderMetrics {
|
|
105
|
+
llmCalls: number;
|
|
106
|
+
totalTokens: number;
|
|
107
|
+
promptTokens: number;
|
|
108
|
+
completionTokens: number;
|
|
109
|
+
totalCost: number;
|
|
110
|
+
}
|
|
111
|
+
export interface GetMetricsResponse {
|
|
112
|
+
totalTokens: number;
|
|
113
|
+
promptTokens: number;
|
|
114
|
+
completionTokens: number;
|
|
115
|
+
totalCost?: number;
|
|
116
|
+
llmCalls: number;
|
|
117
|
+
toolCalls: number;
|
|
118
|
+
agentCount: number;
|
|
119
|
+
durationMs: number;
|
|
120
|
+
byProvider: Record<string, ProviderMetrics>;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Timeline item representing an LLM call, tool execution, or context compaction.
|
|
124
|
+
*/
|
|
125
|
+
export interface TimelineItem {
|
|
126
|
+
id: string;
|
|
127
|
+
type: 'llm' | 'tool' | 'compaction';
|
|
128
|
+
agentId: AgentId;
|
|
129
|
+
agentName: string;
|
|
130
|
+
startedAt: number;
|
|
131
|
+
completedAt?: number;
|
|
132
|
+
durationMs?: number;
|
|
133
|
+
status: 'running' | 'success' | 'error';
|
|
134
|
+
model?: string;
|
|
135
|
+
promptTokens?: number;
|
|
136
|
+
completionTokens?: number;
|
|
137
|
+
cachedTokens?: number;
|
|
138
|
+
cacheWriteTokens?: number;
|
|
139
|
+
cost?: number;
|
|
140
|
+
llmCallId?: LLMCallId;
|
|
141
|
+
toolName?: string;
|
|
142
|
+
toolCallId?: ToolCallId;
|
|
143
|
+
toolInput?: unknown;
|
|
144
|
+
toolResult?: unknown;
|
|
145
|
+
originalTokens?: number;
|
|
146
|
+
compactedTokens?: number;
|
|
147
|
+
messagesRemoved?: number;
|
|
148
|
+
error?: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Message in the global mailbox view.
|
|
152
|
+
*/
|
|
153
|
+
export interface GlobalMailboxMessage {
|
|
154
|
+
id: MessageId;
|
|
155
|
+
fromAgentId: string;
|
|
156
|
+
fromAgentName: string;
|
|
157
|
+
toAgentId: AgentId;
|
|
158
|
+
toAgentName: string;
|
|
159
|
+
content: string;
|
|
160
|
+
timestamp: number;
|
|
161
|
+
consumed: boolean;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Debug chat message with links to related entities.
|
|
165
|
+
*/
|
|
166
|
+
export interface DebugChatMessage {
|
|
167
|
+
type: 'user_message' | 'agent_message' | 'ask_user';
|
|
168
|
+
messageId: MessageId | ChatMessageId;
|
|
169
|
+
content: string;
|
|
170
|
+
timestamp: number;
|
|
171
|
+
eventIndex: number;
|
|
172
|
+
agentId?: AgentId;
|
|
173
|
+
agentName?: string;
|
|
174
|
+
llmCallId?: LLMCallId;
|
|
175
|
+
toolCallId?: ToolCallId;
|
|
176
|
+
mailboxMessageId?: MessageId;
|
|
177
|
+
format?: 'text' | 'markdown';
|
|
178
|
+
inputType?: AskUserInputType;
|
|
179
|
+
answered?: boolean;
|
|
180
|
+
answer?: unknown;
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/projections/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACX,aAAa,EACb,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,MAAM,aAAa,CAAA;AAMpB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,OAAO,CAAA;IACX,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,mBAAmB,CAAA;IAC3B,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,aAAa,EAAE,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,EAAE,EAAE,OAAO,CAAA;IACX,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,mBAAmB,CAAA;IAC3B,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,mBAAmB,EAAE,uBAAuB,EAAE,CAAA;IAC9C,gBAAgB,EAAE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,OAAO,CAAA;CACjB;AAMD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAEhC,IAAI,EAAE,cAAc,GAAG,eAAe,GAAG,UAAU,CAAA;IACnD,SAAS,EAAE,SAAS,GAAG,aAAa,CAAA;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAGlB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,gBAAgB,CAAC,EAAE,SAAS,CAAA;IAG5B,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IAC5B,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;CAChB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-safe RPC Client
|
|
3
|
+
*
|
|
4
|
+
* Provides a fully typed interface for calling RPC methods.
|
|
5
|
+
* All method names and input/output types are validated at compile time.
|
|
6
|
+
*
|
|
7
|
+
* Supports both single calls and batch calls:
|
|
8
|
+
* - Single: rpc.call("method", input) -> Result<output, RpcErrorInfo>
|
|
9
|
+
* - Batch: rpc.batch(b => [b.add("m1", i1), b.add("m2", i2)]) -> Result<[o1, o2], RpcErrorInfo>
|
|
10
|
+
*/
|
|
11
|
+
import type { RpcInput, RpcMethodName, RpcOutput } from '@roj-ai/sdk/rpc';
|
|
12
|
+
import type { Result } from '../lib/result.js';
|
|
13
|
+
/**
|
|
14
|
+
* Structured error info from RPC responses.
|
|
15
|
+
*/
|
|
16
|
+
export interface RpcErrorInfo {
|
|
17
|
+
type: string;
|
|
18
|
+
message: string;
|
|
19
|
+
details?: unknown;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* RPC error class for backwards compatibility.
|
|
23
|
+
*/
|
|
24
|
+
export declare class RpcError extends Error {
|
|
25
|
+
status: number;
|
|
26
|
+
error: RpcErrorInfo;
|
|
27
|
+
constructor(status: number, error: RpcErrorInfo);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A typed marker for a batch call entry. Carries the output type at compile time.
|
|
31
|
+
*/
|
|
32
|
+
export interface BatchEntry<_T> {
|
|
33
|
+
readonly method: string;
|
|
34
|
+
readonly input: unknown;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Batch call builder. Collects typed entries for a batch RPC request.
|
|
38
|
+
*/
|
|
39
|
+
export declare class BatchBuilder {
|
|
40
|
+
add<M extends RpcMethodName>(method: M, input: RpcInput<M>): BatchEntry<RpcOutput<M>>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Maps a tuple of BatchEntry<T> to a tuple of T.
|
|
44
|
+
*/
|
|
45
|
+
type BatchResults<T extends readonly BatchEntry<unknown>[]> = {
|
|
46
|
+
[K in keyof T]: T[K] extends BatchEntry<infer R> ? R : never;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Type-safe RPC client for calling server methods.
|
|
50
|
+
*/
|
|
51
|
+
export declare class RpcClient {
|
|
52
|
+
private baseUrl;
|
|
53
|
+
private projectId;
|
|
54
|
+
constructor(baseUrl?: string);
|
|
55
|
+
/**
|
|
56
|
+
* Get the base URL for non-RPC requests.
|
|
57
|
+
*/
|
|
58
|
+
getBaseUrl(): string;
|
|
59
|
+
/**
|
|
60
|
+
* Set the project ID for DO-based RPC calls.
|
|
61
|
+
* When set, the projectId is added as a query parameter to /rpc requests.
|
|
62
|
+
*/
|
|
63
|
+
setProjectId(projectId: string | null): void;
|
|
64
|
+
/**
|
|
65
|
+
* Get the currently configured project ID.
|
|
66
|
+
*/
|
|
67
|
+
getProjectId(): string | null;
|
|
68
|
+
private getRpcUrl;
|
|
69
|
+
/**
|
|
70
|
+
* Call an RPC method with type-safe input and output.
|
|
71
|
+
*/
|
|
72
|
+
call<M extends RpcMethodName>(method: M, input: RpcInput<M>): Promise<Result<RpcOutput<M>, RpcErrorInfo>>;
|
|
73
|
+
/**
|
|
74
|
+
* Execute multiple RPC calls as a batch.
|
|
75
|
+
*/
|
|
76
|
+
batch<const T extends readonly BatchEntry<unknown>[]>(buildCalls: (b: BatchBuilder) => T): Promise<Result<BatchResults<T>, RpcErrorInfo>>;
|
|
77
|
+
}
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/rpc/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAG9C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAE1B,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,YAAY;gBADnB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,YAAY;CAK3B;AAiBD;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,EAAE;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACvB;AAED;;GAEG;AACH,qBAAa,YAAY;IACxB,GAAG,CAAC,CAAC,SAAS,aAAa,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;CAGrF;AAED;;GAEG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,SAAS,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI;KAC5D,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK;CAC5D,CAAA;AAED;;GAEG;AACH,qBAAa,SAAS;IAGT,OAAO,CAAC,OAAO;IAF3B,OAAO,CAAC,SAAS,CAAsB;gBAEnB,OAAO,GAAE,MAAW;IAExC;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAI5C;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI;IAI7B,OAAO,CAAC,SAAS;IAQjB;;OAEG;IACG,IAAI,CAAC,CAAC,SAAS,aAAa,EACjC,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAChB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAuB9C;;OAEG;IACG,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,UAAU,CAAC,OAAO,CAAC,EAAE,EACzD,UAAU,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,CAAC,GAChC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;CAuCjD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RPC Module - Shared re-exports for client/CLI consumers.
|
|
3
|
+
*/
|
|
4
|
+
export { BatchBuilder, type BatchEntry, RpcClient, RpcError, type RpcErrorInfo } from './client.js';
|
|
5
|
+
export { Err, flatMapResult, isErr, isOk, mapResult, Ok, unwrapOr, unwrapOrThrow } from '../lib/result.js';
|
|
6
|
+
export type { Result } from '../lib/result.js';
|
|
7
|
+
export type { RpcInput, RpcMethodDef, RpcMethodName, RpcMethods, RpcOutput } from '@roj-ai/sdk/rpc';
|
|
8
|
+
export type { AgentChatMessage, AskUserChatMessage, ChatMessage, UserChatMessage } from '@roj-ai/sdk/rpc';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rpc/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAGnG,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAC1G,YAAY,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAG9C,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnG,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type { WorkspaceConfig } from './workspace-config';
|
|
2
|
+
export type { SandboxState, WebhookEvent } from './api-types';
|
|
3
|
+
export { method, defineMethods } from './rpc/definition';
|
|
4
|
+
export type { MethodDef, MethodInput, MethodOutput, RpcRequest, RpcResponse, RpcError } from './rpc/definition';
|
|
5
|
+
export { platformMethods } from './rpc/methods';
|
|
6
|
+
export type { PlatformMethods, PlatformMethodName } from './rpc/methods';
|
|
7
|
+
export type * from './rpc/methods';
|
|
8
|
+
export { adminMethods } from './rpc/admin-methods';
|
|
9
|
+
export type { AdminMethods, AdminMethodName } from './rpc/admin-methods';
|
|
10
|
+
export type * from './rpc/admin-methods';
|
|
11
|
+
export { instanceMethods } from './rpc/instance-methods';
|
|
12
|
+
export type { InstanceMethods, InstanceMethodName } from './rpc/instance-methods';
|
|
13
|
+
export type * from './rpc/instance-methods';
|
|
14
|
+
export { createRpcRouter } from './rpc/server';
|
|
15
|
+
export type { RpcRouter, MethodHandler, MethodHandlers } from './rpc/server';
|
|
16
|
+
export { createRpcClient } from './rpc/client';
|
|
17
|
+
export type { RpcClient, RpcResult, RpcClientOptions } from './rpc/client';
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { PauseSandboxInput, ResumeSandboxInput, TerminateSandboxInput, RestartAgentInput, GetAgentLogsInput, GetAgentLogsOutput, SandboxActionOutput } from './methods';
|
|
2
|
+
export interface DebugGetStatusInput {
|
|
3
|
+
instanceId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DebugGetStatusOutput {
|
|
6
|
+
sessions: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
presetId: string | null;
|
|
9
|
+
status: string;
|
|
10
|
+
sandboxId: string | null;
|
|
11
|
+
}>;
|
|
12
|
+
sandboxes: Array<{
|
|
13
|
+
id: string;
|
|
14
|
+
state: string;
|
|
15
|
+
e2bId: string | null;
|
|
16
|
+
lastActivityAt: number;
|
|
17
|
+
}>;
|
|
18
|
+
agentConnected: boolean;
|
|
19
|
+
connections: number;
|
|
20
|
+
initialization: {
|
|
21
|
+
phase: string | null;
|
|
22
|
+
error?: string | null;
|
|
23
|
+
sessionId?: string | null;
|
|
24
|
+
};
|
|
25
|
+
lifecycleEvents: Array<{
|
|
26
|
+
event: string;
|
|
27
|
+
detail?: string;
|
|
28
|
+
createdAt: number;
|
|
29
|
+
}>;
|
|
30
|
+
serviceUrls: Array<{
|
|
31
|
+
code: string;
|
|
32
|
+
sessionId: string | null;
|
|
33
|
+
serviceType: string | null;
|
|
34
|
+
port: number;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
export interface DebugSandboxGetLogsInput {
|
|
38
|
+
instanceId: string;
|
|
39
|
+
sandboxId: string;
|
|
40
|
+
lines?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface DebugSandboxGetLogsOutput {
|
|
43
|
+
logs: string;
|
|
44
|
+
truncated?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface DebugSandboxActionInput {
|
|
47
|
+
instanceId: string;
|
|
48
|
+
sandboxId: string;
|
|
49
|
+
action: 'restartAgent' | 'redeployAgent' | 'pause' | 'resume' | 'terminate';
|
|
50
|
+
}
|
|
51
|
+
export type DebugSandboxActionOutput = null;
|
|
52
|
+
export interface TransferSandboxInput {
|
|
53
|
+
instanceId: string;
|
|
54
|
+
sandboxId: string;
|
|
55
|
+
}
|
|
56
|
+
export interface TransferSandboxOutput {
|
|
57
|
+
newSandboxId: string;
|
|
58
|
+
}
|
|
59
|
+
export type EventLogCategory = 'rpc_in' | 'rpc_session' | 'rpc_agent' | 'sandbox' | 'agent_event' | 'ws' | 'dev_proxy';
|
|
60
|
+
export interface DebugGetEventLogInput {
|
|
61
|
+
instanceId: string;
|
|
62
|
+
category?: EventLogCategory;
|
|
63
|
+
sessionId?: string;
|
|
64
|
+
sandboxId?: string;
|
|
65
|
+
correlation?: string;
|
|
66
|
+
since?: number;
|
|
67
|
+
until?: number;
|
|
68
|
+
limit?: number;
|
|
69
|
+
}
|
|
70
|
+
export interface DebugEventLogRow {
|
|
71
|
+
id: number;
|
|
72
|
+
ts: number;
|
|
73
|
+
category: string;
|
|
74
|
+
event: string;
|
|
75
|
+
status: string;
|
|
76
|
+
sessionId: string | null;
|
|
77
|
+
sandboxId: string | null;
|
|
78
|
+
method: string | null;
|
|
79
|
+
durationMs: number | null;
|
|
80
|
+
errorCode: string | null;
|
|
81
|
+
errorMsg: string | null;
|
|
82
|
+
correlation: string | null;
|
|
83
|
+
details: string | null;
|
|
84
|
+
}
|
|
85
|
+
export type DebugGetEventLogOutput = DebugEventLogRow[];
|
|
86
|
+
export declare const adminMethods: {
|
|
87
|
+
'debug.getStatus': import("./definition").MethodDef<DebugGetStatusInput, DebugGetStatusOutput>;
|
|
88
|
+
'debug.sandboxGetLogs': import("./definition").MethodDef<DebugSandboxGetLogsInput, DebugSandboxGetLogsOutput>;
|
|
89
|
+
'debug.sandboxAction': import("./definition").MethodDef<DebugSandboxActionInput, null>;
|
|
90
|
+
'debug.getEventLog': import("./definition").MethodDef<DebugGetEventLogInput, DebugGetEventLogOutput>;
|
|
91
|
+
'sandbox.pause': import("./definition").MethodDef<PauseSandboxInput, SandboxActionOutput>;
|
|
92
|
+
'sandbox.resume': import("./definition").MethodDef<ResumeSandboxInput, SandboxActionOutput>;
|
|
93
|
+
'sandbox.terminate': import("./definition").MethodDef<TerminateSandboxInput, SandboxActionOutput>;
|
|
94
|
+
'sandbox.restartAgent': import("./definition").MethodDef<RestartAgentInput, SandboxActionOutput>;
|
|
95
|
+
'sandbox.logs': import("./definition").MethodDef<GetAgentLogsInput, GetAgentLogsOutput>;
|
|
96
|
+
'sandbox.transfer': import("./definition").MethodDef<TransferSandboxInput, TransferSandboxOutput>;
|
|
97
|
+
};
|
|
98
|
+
export type AdminMethods = typeof adminMethods;
|
|
99
|
+
export type AdminMethodName = keyof AdminMethods;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-safe RPC client.
|
|
3
|
+
* Mirrors the method definitions for compile-time safety.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* const client = createRpcClient<PlatformMethods>('https://api.buresh.cloud/rpc', {
|
|
7
|
+
* headers: { Authorization: `Bearer ${apiKey}` },
|
|
8
|
+
* })
|
|
9
|
+
* const result = await client.call('instances.create', { ... })
|
|
10
|
+
*/
|
|
11
|
+
import type { MethodDef, MethodInput, MethodOutput, RpcError } from './definition';
|
|
12
|
+
export interface RpcClientOptions {
|
|
13
|
+
headers?: Record<string, string>;
|
|
14
|
+
credentials?: RequestCredentials;
|
|
15
|
+
}
|
|
16
|
+
export interface RpcClient<Methods extends Record<string, MethodDef>> {
|
|
17
|
+
call<M extends string & keyof Methods>(method: M, input: MethodInput<Methods, M>): Promise<RpcResult<MethodOutput<Methods, M>>>;
|
|
18
|
+
}
|
|
19
|
+
export type RpcResult<T> = {
|
|
20
|
+
ok: true;
|
|
21
|
+
value: T;
|
|
22
|
+
} | {
|
|
23
|
+
ok: false;
|
|
24
|
+
error: RpcError;
|
|
25
|
+
};
|
|
26
|
+
export declare function createRpcClient<Methods extends Record<string, MethodDef>>(baseUrl: string, options?: RpcClientOptions): RpcClient<Methods>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-safe RPC definition system.
|
|
3
|
+
* No external dependencies — just TypeScript types + minimal runtime.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* const methods = defineMethods({
|
|
7
|
+
* 'instances.create': method<CreateInput, CreateOutput>(),
|
|
8
|
+
* 'sessions.list': method<ListInput, ListOutput>(),
|
|
9
|
+
* })
|
|
10
|
+
*/
|
|
11
|
+
/** Marker type for a method definition (input → output). */
|
|
12
|
+
export interface MethodDef<I = unknown, O = unknown> {
|
|
13
|
+
readonly _input: I;
|
|
14
|
+
readonly _output: O;
|
|
15
|
+
}
|
|
16
|
+
/** Define a method type. Zero runtime cost — just a type marker. */
|
|
17
|
+
export declare function method<I, O>(): MethodDef<I, O>;
|
|
18
|
+
/** Define a set of methods. Returns the definition object as-is (typed). */
|
|
19
|
+
export declare function defineMethods<T extends Record<string, MethodDef>>(methods: T): T;
|
|
20
|
+
/** Extract input type from a method name. */
|
|
21
|
+
export type MethodInput<Methods extends Record<string, MethodDef>, M extends keyof Methods> = Methods[M]['_input'];
|
|
22
|
+
/** Extract output type from a method name. */
|
|
23
|
+
export type MethodOutput<Methods extends Record<string, MethodDef>, M extends keyof Methods> = Methods[M]['_output'];
|
|
24
|
+
/** RPC request envelope. */
|
|
25
|
+
export interface RpcRequest<M extends string = string> {
|
|
26
|
+
method: M;
|
|
27
|
+
input: unknown;
|
|
28
|
+
}
|
|
29
|
+
/** RPC response envelope. */
|
|
30
|
+
export interface RpcResponse<T = unknown> {
|
|
31
|
+
ok: boolean;
|
|
32
|
+
value?: T;
|
|
33
|
+
error?: RpcError;
|
|
34
|
+
}
|
|
35
|
+
export interface RpcError {
|
|
36
|
+
type: string;
|
|
37
|
+
message: string;
|
|
38
|
+
details?: unknown;
|
|
39
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { PublishSessionOutput, GetAgentLogsOutput } from './methods';
|
|
2
|
+
export type InstanceCreateSandboxInput = {};
|
|
3
|
+
export interface InstanceCreateSandboxOutput {
|
|
4
|
+
sandboxId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface InstancePauseSandboxInput {
|
|
7
|
+
sandboxId: string;
|
|
8
|
+
}
|
|
9
|
+
export type InstanceResumeSandboxInput = {};
|
|
10
|
+
export interface InstanceTerminateSandboxInput {
|
|
11
|
+
sandboxId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface InstanceRestartAgentInput {
|
|
14
|
+
sandboxId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface InstanceGetAgentLogsInput {
|
|
17
|
+
sandboxId: string;
|
|
18
|
+
lines?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface InstanceExecInSandboxInput {
|
|
21
|
+
command: string;
|
|
22
|
+
}
|
|
23
|
+
export interface InstanceExecInSandboxOutput {
|
|
24
|
+
stdout: string;
|
|
25
|
+
stderr: string;
|
|
26
|
+
success: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface InstanceValidateSandboxTokenInput {
|
|
29
|
+
sandboxId: string;
|
|
30
|
+
token: string;
|
|
31
|
+
}
|
|
32
|
+
export interface InstanceValidateSandboxTokenOutput {
|
|
33
|
+
value: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface InstanceCreateSessionInput {
|
|
36
|
+
presetId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface InstanceCreateSessionOutput {
|
|
39
|
+
sessionId: string;
|
|
40
|
+
}
|
|
41
|
+
export type InstanceListSessionsInput = {};
|
|
42
|
+
export interface InstanceListSessionsOutput {
|
|
43
|
+
sessions: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
presetId: string | null;
|
|
46
|
+
status: string;
|
|
47
|
+
createdAt: number;
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
export interface InstancePublishSessionInput {
|
|
51
|
+
sessionId: string;
|
|
52
|
+
}
|
|
53
|
+
export interface InstanceGetServiceUrlInput {
|
|
54
|
+
sessionId: string;
|
|
55
|
+
serviceType: string;
|
|
56
|
+
}
|
|
57
|
+
export interface InstanceGetServiceUrlOutput {
|
|
58
|
+
url: string | null;
|
|
59
|
+
}
|
|
60
|
+
export interface InstanceGetServiceUrlsInput {
|
|
61
|
+
sessionId: string;
|
|
62
|
+
}
|
|
63
|
+
export interface InstanceGetServiceUrlsOutput {
|
|
64
|
+
services: Array<{
|
|
65
|
+
serviceType: string;
|
|
66
|
+
code: string;
|
|
67
|
+
port: number;
|
|
68
|
+
}>;
|
|
69
|
+
}
|
|
70
|
+
export interface InstanceEnsureSandboxOutput {
|
|
71
|
+
sandboxId: string;
|
|
72
|
+
state: string;
|
|
73
|
+
}
|
|
74
|
+
export interface InstanceOkOutput {
|
|
75
|
+
ok: boolean;
|
|
76
|
+
}
|
|
77
|
+
export declare const instanceMethods: {
|
|
78
|
+
createSandbox: import("./definition").MethodDef<InstanceCreateSandboxInput, InstanceCreateSandboxOutput>;
|
|
79
|
+
pauseSandbox: import("./definition").MethodDef<InstancePauseSandboxInput, InstanceOkOutput>;
|
|
80
|
+
resumeSandbox: import("./definition").MethodDef<InstanceResumeSandboxInput, InstanceOkOutput>;
|
|
81
|
+
terminateSandbox: import("./definition").MethodDef<InstanceTerminateSandboxInput, InstanceOkOutput>;
|
|
82
|
+
restartAgent: import("./definition").MethodDef<InstanceRestartAgentInput, InstanceOkOutput>;
|
|
83
|
+
getAgentLogs: import("./definition").MethodDef<InstanceGetAgentLogsInput, GetAgentLogsOutput>;
|
|
84
|
+
execInSandbox: import("./definition").MethodDef<InstanceExecInSandboxInput, InstanceExecInSandboxOutput>;
|
|
85
|
+
validateSandboxToken: import("./definition").MethodDef<InstanceValidateSandboxTokenInput, InstanceValidateSandboxTokenOutput>;
|
|
86
|
+
createSession: import("./definition").MethodDef<InstanceCreateSessionInput, InstanceCreateSessionOutput>;
|
|
87
|
+
listSessions: import("./definition").MethodDef<InstanceListSessionsInput, InstanceListSessionsOutput>;
|
|
88
|
+
publishSession: import("./definition").MethodDef<InstancePublishSessionInput, PublishSessionOutput>;
|
|
89
|
+
getServiceUrl: import("./definition").MethodDef<InstanceGetServiceUrlInput, InstanceGetServiceUrlOutput>;
|
|
90
|
+
getServiceUrls: import("./definition").MethodDef<InstanceGetServiceUrlsInput, InstanceGetServiceUrlsOutput>;
|
|
91
|
+
ensureSandbox: import("./definition").MethodDef<{}, InstanceEnsureSandboxOutput>;
|
|
92
|
+
};
|
|
93
|
+
export type InstanceMethods = typeof instanceMethods;
|
|
94
|
+
export type InstanceMethodName = keyof InstanceMethods;
|