@theway-ai/sdk 0.1.9
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/README.md +108 -0
- package/dist/client.d.ts +180 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +531 -0
- package/dist/client.js.map +1 -0
- package/dist/generated/commands.d.ts +195 -0
- package/dist/generated/commands.d.ts.map +1 -0
- package/dist/generated/commands.js +633 -0
- package/dist/generated/commands.js.map +1 -0
- package/dist/generated/events.d.ts +158 -0
- package/dist/generated/events.d.ts.map +1 -0
- package/dist/generated/events.js +1122 -0
- package/dist/generated/events.js.map +1 -0
- package/dist/generated/extensions.d.ts +184 -0
- package/dist/generated/extensions.d.ts.map +1 -0
- package/dist/generated/extensions.js +1309 -0
- package/dist/generated/extensions.js.map +1 -0
- package/dist/generated/graph_engine.d.ts +422 -0
- package/dist/generated/graph_engine.d.ts.map +1 -0
- package/dist/generated/graph_engine.js +3048 -0
- package/dist/generated/graph_engine.js.map +1 -0
- package/dist/generated/health.d.ts +83 -0
- package/dist/generated/health.d.ts.map +1 -0
- package/dist/generated/health.js +179 -0
- package/dist/generated/health.js.map +1 -0
- package/dist/generated/session.d.ts +854 -0
- package/dist/generated/session.d.ts.map +1 -0
- package/dist/generated/session.js +6790 -0
- package/dist/generated/session.js.map +1 -0
- package/dist/generated/settings.d.ts +182 -0
- package/dist/generated/settings.d.ts.map +1 -0
- package/dist/generated/settings.js +324 -0
- package/dist/generated/settings.js.map +1 -0
- package/dist/generated/state.d.ts +304 -0
- package/dist/generated/state.d.ts.map +1 -0
- package/dist/generated/state.js +1391 -0
- package/dist/generated/state.js.map +1 -0
- package/dist/generated/tools.d.ts +413 -0
- package/dist/generated/tools.d.ts.map +1 -0
- package/dist/generated/tools.js +2487 -0
- package/dist/generated/tools.js.map +1 -0
- package/dist/health.d.ts +20 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +62 -0
- package/dist/health.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/docs/PROTOCOL.md +129 -0
- package/package.json +47 -0
- package/proto/commands.proto +70 -0
- package/proto/events.proto +87 -0
- package/proto/extensions.proto +99 -0
- package/proto/graph_engine.proto +236 -0
- package/proto/health.proto +26 -0
- package/proto/session.proto +498 -0
- package/proto/settings.proto +79 -0
- package/proto/state.proto +130 -0
- package/proto/tools.proto +238 -0
|
@@ -0,0 +1,854 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { type CallOptions, type ChannelCredentials, Client, type ClientOptions, type ClientReadableStream, type ClientUnaryCall, type handleServerStreamingCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
|
+
import { CommandResult, Empty } from "./commands.js";
|
|
4
|
+
import { ExtensionSnapshot } from "./extensions.js";
|
|
5
|
+
import { CollapsedSessionNode, DagRunSnapshot, SessionGraphNode, SubagentJobSnapshot } from "./graph_engine.js";
|
|
6
|
+
export declare const protobufPackage = "theway.grpc.v1";
|
|
7
|
+
/** Thinking levels supported by the runtime. */
|
|
8
|
+
export declare enum ThinkingLevel {
|
|
9
|
+
THINKING_LEVEL_UNSPECIFIED = 0,
|
|
10
|
+
THINKING_LEVEL_OFF = 1,
|
|
11
|
+
THINKING_LEVEL_MINIMAL = 2,
|
|
12
|
+
THINKING_LEVEL_LOW = 3,
|
|
13
|
+
THINKING_LEVEL_MEDIUM = 4,
|
|
14
|
+
THINKING_LEVEL_HIGH = 5,
|
|
15
|
+
THINKING_LEVEL_XHIGH = 6,
|
|
16
|
+
UNRECOGNIZED = -1
|
|
17
|
+
}
|
|
18
|
+
export declare function thinkingLevelFromJSON(object: any): ThinkingLevel;
|
|
19
|
+
export declare function thinkingLevelToJSON(object: ThinkingLevel): string;
|
|
20
|
+
/** Incremental transcript patch: appends/replacements since a consumer cursor. */
|
|
21
|
+
export interface FeedBlockPatch {
|
|
22
|
+
/**
|
|
23
|
+
* index == consumer length appends; index < length replaces; index > length
|
|
24
|
+
* is a gap and requires a full snapshot resync.
|
|
25
|
+
*/
|
|
26
|
+
index: string;
|
|
27
|
+
block?: FeedBlock | undefined;
|
|
28
|
+
}
|
|
29
|
+
/** Token usage for the current/last turn, plus the model's context window size. */
|
|
30
|
+
export interface ContextUsage {
|
|
31
|
+
cachedTokens: string;
|
|
32
|
+
newTokens: string;
|
|
33
|
+
totalInputTokens: string;
|
|
34
|
+
outputTokens: string;
|
|
35
|
+
cacheWriteTokens: string;
|
|
36
|
+
providerCacheHitRate?: number | undefined;
|
|
37
|
+
prefixCacheHitRate?: number | undefined;
|
|
38
|
+
prefixHitTokens?: string | undefined;
|
|
39
|
+
contextWindow: number;
|
|
40
|
+
}
|
|
41
|
+
export interface ProviderGroup {
|
|
42
|
+
provider: string;
|
|
43
|
+
hasCredential: boolean;
|
|
44
|
+
models: ModelEntry[];
|
|
45
|
+
}
|
|
46
|
+
export interface ModelEntry {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
}
|
|
50
|
+
export interface TriggerPollStatus {
|
|
51
|
+
checkedAt: string;
|
|
52
|
+
traceId: string;
|
|
53
|
+
sourceLabel: string;
|
|
54
|
+
eventLabel: string;
|
|
55
|
+
summary: string;
|
|
56
|
+
}
|
|
57
|
+
export interface GoalSnapshot {
|
|
58
|
+
condition: string;
|
|
59
|
+
status: string;
|
|
60
|
+
iterations: number;
|
|
61
|
+
lastReason?: string | undefined;
|
|
62
|
+
}
|
|
63
|
+
export interface ControlPlanePromptSnapshot {
|
|
64
|
+
toolName: string;
|
|
65
|
+
label: string;
|
|
66
|
+
reason: string;
|
|
67
|
+
argsHash: string;
|
|
68
|
+
payload: string;
|
|
69
|
+
}
|
|
70
|
+
export interface SidebarSnapshot {
|
|
71
|
+
inboxNew: number;
|
|
72
|
+
skills?: SkillsSnapshot | undefined;
|
|
73
|
+
triggers?: TriggersSnapshot | undefined;
|
|
74
|
+
cron?: CronSnapshot | undefined;
|
|
75
|
+
mcp?: McpSnapshot | undefined;
|
|
76
|
+
tools?: ToolsSnapshot | undefined;
|
|
77
|
+
hooks: string[];
|
|
78
|
+
runtime: string[];
|
|
79
|
+
/**
|
|
80
|
+
* Slash-prefixed file-command names (claude-code format, issue #37):
|
|
81
|
+
* discovered from .agents/commands + .claude/commands.
|
|
82
|
+
*/
|
|
83
|
+
commands: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Daemon runtime revision, bumped by the `reload` agent tool; clients
|
|
86
|
+
* watch it to re-read local resources (e.g. ~/.theway/theme.toml).
|
|
87
|
+
*/
|
|
88
|
+
runtimeRevision: string;
|
|
89
|
+
}
|
|
90
|
+
export interface SkillsSnapshot {
|
|
91
|
+
total: number;
|
|
92
|
+
enabled: number;
|
|
93
|
+
disabled: number;
|
|
94
|
+
builtin: number;
|
|
95
|
+
user: number;
|
|
96
|
+
project: number;
|
|
97
|
+
items: SkillSnapshot[];
|
|
98
|
+
}
|
|
99
|
+
export interface SkillSnapshot {
|
|
100
|
+
name: string;
|
|
101
|
+
source: string;
|
|
102
|
+
filePath: string;
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface TriggersSnapshot {
|
|
106
|
+
total: number;
|
|
107
|
+
enabled: number;
|
|
108
|
+
disabled: number;
|
|
109
|
+
rules: TriggerRuleSnapshot[];
|
|
110
|
+
}
|
|
111
|
+
export interface TriggerRuleSnapshot {
|
|
112
|
+
id: string;
|
|
113
|
+
fullId: string;
|
|
114
|
+
enabled: boolean;
|
|
115
|
+
mode: string;
|
|
116
|
+
condition: string;
|
|
117
|
+
action: string;
|
|
118
|
+
}
|
|
119
|
+
export interface CronSnapshot {
|
|
120
|
+
total: number;
|
|
121
|
+
enabled: number;
|
|
122
|
+
disabled: number;
|
|
123
|
+
jobs: CronJobSnapshot[];
|
|
124
|
+
}
|
|
125
|
+
export interface CronJobSnapshot {
|
|
126
|
+
id: string;
|
|
127
|
+
enabled: boolean;
|
|
128
|
+
schedule: string;
|
|
129
|
+
action: string;
|
|
130
|
+
skippedOverlapCount: string;
|
|
131
|
+
lastError?: string | undefined;
|
|
132
|
+
}
|
|
133
|
+
export interface McpSnapshot {
|
|
134
|
+
servers: number;
|
|
135
|
+
tools: number;
|
|
136
|
+
notificationHooks: number;
|
|
137
|
+
serverNames: string[];
|
|
138
|
+
toolNames: string[];
|
|
139
|
+
}
|
|
140
|
+
export interface ToolsSnapshot {
|
|
141
|
+
total: number;
|
|
142
|
+
names: string[];
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* One renderable feed entry. oneof mirrors the serde tagged enum WireFeedBlock;
|
|
146
|
+
* JSON channels keep serde shape until the protojson migration.
|
|
147
|
+
*/
|
|
148
|
+
export interface FeedBlock {
|
|
149
|
+
kind?: {
|
|
150
|
+
$case: "user";
|
|
151
|
+
user: UserBlock;
|
|
152
|
+
} | {
|
|
153
|
+
$case: "assistant";
|
|
154
|
+
assistant: AssistantBlock;
|
|
155
|
+
} | {
|
|
156
|
+
$case: "thinking";
|
|
157
|
+
thinking: ThinkingBlock;
|
|
158
|
+
} | {
|
|
159
|
+
$case: "toolResult";
|
|
160
|
+
toolResult: ToolResultBlock;
|
|
161
|
+
} | {
|
|
162
|
+
$case: "plain";
|
|
163
|
+
plain: PlainBlock;
|
|
164
|
+
} | {
|
|
165
|
+
$case: "toolCall";
|
|
166
|
+
toolCall: ToolCallBlock;
|
|
167
|
+
} | {
|
|
168
|
+
$case: "error";
|
|
169
|
+
error: ErrorBlock;
|
|
170
|
+
} | undefined;
|
|
171
|
+
}
|
|
172
|
+
export interface UserBlock {
|
|
173
|
+
text: string;
|
|
174
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
175
|
+
timestamp?: string | undefined;
|
|
176
|
+
}
|
|
177
|
+
export interface AssistantBlock {
|
|
178
|
+
text: string;
|
|
179
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
180
|
+
timestamp?: string | undefined;
|
|
181
|
+
}
|
|
182
|
+
export interface ThinkingBlock {
|
|
183
|
+
text: string;
|
|
184
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
185
|
+
timestamp?: string | undefined;
|
|
186
|
+
}
|
|
187
|
+
export interface ToolCallBlock {
|
|
188
|
+
name: string;
|
|
189
|
+
args: string;
|
|
190
|
+
/** Optional tool-call metadata (JSON string). */
|
|
191
|
+
metadata?: string | undefined;
|
|
192
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
193
|
+
timestamp?: string | undefined;
|
|
194
|
+
}
|
|
195
|
+
export interface ErrorBlock {
|
|
196
|
+
message: string;
|
|
197
|
+
code?: string | undefined;
|
|
198
|
+
recoverable: boolean;
|
|
199
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
200
|
+
timestamp?: string | undefined;
|
|
201
|
+
}
|
|
202
|
+
export interface ToolResultBlock {
|
|
203
|
+
lines: string[];
|
|
204
|
+
isError: boolean;
|
|
205
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
206
|
+
timestamp?: string | undefined;
|
|
207
|
+
}
|
|
208
|
+
export interface PlainBlock {
|
|
209
|
+
text: string;
|
|
210
|
+
/** "output" | "system" | "error" | "note" (serde snake_case variant names) */
|
|
211
|
+
level: string;
|
|
212
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
213
|
+
timestamp?: string | undefined;
|
|
214
|
+
}
|
|
215
|
+
export interface SessionSummary {
|
|
216
|
+
/**
|
|
217
|
+
* Canonical session id. New clients should use this field; `session_id`
|
|
218
|
+
* remains as a deprecated alias for compatibility with older consumers.
|
|
219
|
+
*/
|
|
220
|
+
id: string;
|
|
221
|
+
/** Compatibility alias; new clients should read `id`. */
|
|
222
|
+
sessionId: string;
|
|
223
|
+
name: string;
|
|
224
|
+
cwd: string;
|
|
225
|
+
model: string;
|
|
226
|
+
/** RFC3339 / ISO-8601 with offset (UTC). */
|
|
227
|
+
createdAt: string;
|
|
228
|
+
/** Deprecated epoch milliseconds; use last_activity_at_rfc3339. */
|
|
229
|
+
lastActivityAt: string;
|
|
230
|
+
graphCount: number;
|
|
231
|
+
activeGraphCount: number;
|
|
232
|
+
busy: boolean;
|
|
233
|
+
preview?: string | undefined;
|
|
234
|
+
metadata: {
|
|
235
|
+
[key: string]: string;
|
|
236
|
+
};
|
|
237
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
238
|
+
lastActivityAtRfc3339?: string | undefined;
|
|
239
|
+
/** Pi-style tree prefix (`├─ ` / `└─ ` / `│ `) for fork-lineage display. */
|
|
240
|
+
treePrefix: string;
|
|
241
|
+
}
|
|
242
|
+
export interface SessionSummary_MetadataEntry {
|
|
243
|
+
key: string;
|
|
244
|
+
value: string;
|
|
245
|
+
}
|
|
246
|
+
/** A resolved model reference in a session runtime. */
|
|
247
|
+
export interface ModelRef {
|
|
248
|
+
provider: string;
|
|
249
|
+
model: string;
|
|
250
|
+
baseUrl?: string | undefined;
|
|
251
|
+
}
|
|
252
|
+
/** Static/dynamic session identity and display metadata. */
|
|
253
|
+
export interface SessionInfo {
|
|
254
|
+
id: string;
|
|
255
|
+
name: string;
|
|
256
|
+
cwd: string;
|
|
257
|
+
/** RFC3339 / ISO-8601 with offset (UTC). */
|
|
258
|
+
createdAt: string;
|
|
259
|
+
/** Deprecated epoch milliseconds. */
|
|
260
|
+
lastActivityAt: string;
|
|
261
|
+
/** RFC3339 / ISO-8601 with offset (UTC), null when absent. */
|
|
262
|
+
lastActivityAtRfc3339?: string | undefined;
|
|
263
|
+
busy: boolean;
|
|
264
|
+
preview?: string | undefined;
|
|
265
|
+
metadata: {
|
|
266
|
+
[key: string]: string;
|
|
267
|
+
};
|
|
268
|
+
graphCount: number;
|
|
269
|
+
activeGraphCount: number;
|
|
270
|
+
queuedCount: number;
|
|
271
|
+
sidebar?: SidebarSnapshot | undefined;
|
|
272
|
+
}
|
|
273
|
+
export interface SessionInfo_MetadataEntry {
|
|
274
|
+
key: string;
|
|
275
|
+
value: string;
|
|
276
|
+
}
|
|
277
|
+
/** Live runtime configuration and model/context metadata. */
|
|
278
|
+
export interface SessionRuntime {
|
|
279
|
+
model?: ModelRef | undefined;
|
|
280
|
+
thinkingLevel: ThinkingLevel;
|
|
281
|
+
supportedThinkingLevels: ThinkingLevel[];
|
|
282
|
+
contextUsage?: ContextUsage | undefined;
|
|
283
|
+
sessionContextUsage?: ContextUsage | undefined;
|
|
284
|
+
tuiMaxFeedLines?: number | undefined;
|
|
285
|
+
modelCatalog: ProviderGroup[];
|
|
286
|
+
latestTriggerPoll?: TriggerPollStatus | undefined;
|
|
287
|
+
goal?: GoalSnapshot | undefined;
|
|
288
|
+
controlPlanePrompt?: ControlPlanePromptSnapshot | undefined;
|
|
289
|
+
extensions?: ExtensionSnapshot | undefined;
|
|
290
|
+
/**
|
|
291
|
+
* Full rendered system context for the next request (base prompt + skills +
|
|
292
|
+
* tool inventory + working directory + memory + lineage). Mirrors the
|
|
293
|
+
* request/header epoch snapshot in deepseek-harness session logs.
|
|
294
|
+
*/
|
|
295
|
+
systemContext: string;
|
|
296
|
+
}
|
|
297
|
+
/** Transcript plane of a session snapshot. */
|
|
298
|
+
export interface SessionFeed {
|
|
299
|
+
blocks: FeedBlock[];
|
|
300
|
+
lines: string[];
|
|
301
|
+
blocksBase: string;
|
|
302
|
+
linesBase: string;
|
|
303
|
+
blockPatches: FeedBlockPatch[];
|
|
304
|
+
}
|
|
305
|
+
/** Graph-mode state mounted under a session snapshot. */
|
|
306
|
+
export interface SessionGraphState {
|
|
307
|
+
dags: DagRunSnapshot[];
|
|
308
|
+
subagents: SubagentJobSnapshot[];
|
|
309
|
+
nodes: SessionGraphNode[];
|
|
310
|
+
activeNodeId?: string | undefined;
|
|
311
|
+
}
|
|
312
|
+
/** Session lineage for fork/collapse ancestry. */
|
|
313
|
+
export interface SessionLineage {
|
|
314
|
+
parentSessionId?: string | undefined;
|
|
315
|
+
rootSessionId?: string | undefined;
|
|
316
|
+
ancestorSessionIds: string[];
|
|
317
|
+
childSessionIds: string[];
|
|
318
|
+
collapsedFromSessionId?: string | undefined;
|
|
319
|
+
collapsedIntoSessionId?: string | undefined;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Full structured session snapshot: the single-version authoritative current
|
|
323
|
+
* state shape served by GetSnapshot and StreamEvents snapshot frames.
|
|
324
|
+
*/
|
|
325
|
+
export interface SessionSnapshot {
|
|
326
|
+
sessionId: string;
|
|
327
|
+
info?: SessionInfo | undefined;
|
|
328
|
+
runtime?: SessionRuntime | undefined;
|
|
329
|
+
feed?: SessionFeed | undefined;
|
|
330
|
+
graphState?: SessionGraphState | undefined;
|
|
331
|
+
lineage?: SessionLineage | undefined;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Cursor-paginated read of the session's full message history. Entries are
|
|
335
|
+
* addressed by storage entry id; `before_entry_id` returns the page of
|
|
336
|
+
* message blocks strictly older than that entry.
|
|
337
|
+
*/
|
|
338
|
+
export interface ListSessionMessagesRequest {
|
|
339
|
+
sessionId: string;
|
|
340
|
+
/** Omitted = newest page of the active branch. */
|
|
341
|
+
beforeEntryId?: string | undefined;
|
|
342
|
+
/** Page size; server caps at 500. */
|
|
343
|
+
limit: number;
|
|
344
|
+
}
|
|
345
|
+
export interface SessionMessagePage {
|
|
346
|
+
sessionId: string;
|
|
347
|
+
/** Oldest → newest within the page. */
|
|
348
|
+
blocks: FeedBlock[];
|
|
349
|
+
/** Entry id of the oldest message in this page; empty when no older page. */
|
|
350
|
+
nextBeforeEntryId?: string | undefined;
|
|
351
|
+
hasMore: boolean;
|
|
352
|
+
/** Total message count on the active branch. */
|
|
353
|
+
total: string;
|
|
354
|
+
}
|
|
355
|
+
/** Collapse a session into a graph node, optionally under another session. */
|
|
356
|
+
export interface CollapseSessionRequest {
|
|
357
|
+
sessionId: string;
|
|
358
|
+
intoSessionId?: string | undefined;
|
|
359
|
+
title?: string | undefined;
|
|
360
|
+
summary?: string | undefined;
|
|
361
|
+
}
|
|
362
|
+
export interface CollapseSessionResponse {
|
|
363
|
+
sessionId: string;
|
|
364
|
+
node?: SessionGraphNode | undefined;
|
|
365
|
+
collapsed?: CollapsedSessionNode | undefined;
|
|
366
|
+
}
|
|
367
|
+
export interface GetSessionGraphNodeRequest {
|
|
368
|
+
sessionId: string;
|
|
369
|
+
nodeId: string;
|
|
370
|
+
}
|
|
371
|
+
export interface GetSessionGraphNodeResponse {
|
|
372
|
+
node?: SessionGraphNode | undefined;
|
|
373
|
+
}
|
|
374
|
+
export interface ListSessionGraphNodeMessagesRequest {
|
|
375
|
+
sessionId: string;
|
|
376
|
+
nodeId: string;
|
|
377
|
+
offset: number;
|
|
378
|
+
limit: number;
|
|
379
|
+
}
|
|
380
|
+
export interface ListSessionGraphNodeMessagesResponse {
|
|
381
|
+
blocks: FeedBlock[];
|
|
382
|
+
}
|
|
383
|
+
export interface StreamSessionGraphNodeRequest {
|
|
384
|
+
sessionId: string;
|
|
385
|
+
nodeId: string;
|
|
386
|
+
}
|
|
387
|
+
/** Streaming frame for node changes and message appends. */
|
|
388
|
+
export interface SessionGraphNodeStreamFrame {
|
|
389
|
+
payload?: {
|
|
390
|
+
$case: "node";
|
|
391
|
+
node: SessionGraphNode;
|
|
392
|
+
} | {
|
|
393
|
+
$case: "block";
|
|
394
|
+
block: FeedBlock;
|
|
395
|
+
} | undefined;
|
|
396
|
+
}
|
|
397
|
+
export interface SessionStateRequest {
|
|
398
|
+
sessionId: string;
|
|
399
|
+
}
|
|
400
|
+
export interface UpdateSessionMetadataRequest {
|
|
401
|
+
sessionId: string;
|
|
402
|
+
metadata: {
|
|
403
|
+
[key: string]: string;
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
export interface UpdateSessionMetadataRequest_MetadataEntry {
|
|
407
|
+
key: string;
|
|
408
|
+
value: string;
|
|
409
|
+
}
|
|
410
|
+
export interface ListSessionsResponse {
|
|
411
|
+
sessions: SessionSummary[];
|
|
412
|
+
currentSessionId: string;
|
|
413
|
+
}
|
|
414
|
+
export interface CreateSessionRequest {
|
|
415
|
+
name?: string | undefined;
|
|
416
|
+
sessionId?: string | undefined;
|
|
417
|
+
metadata: {
|
|
418
|
+
[key: string]: string;
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
export interface CreateSessionRequest_MetadataEntry {
|
|
422
|
+
key: string;
|
|
423
|
+
value: string;
|
|
424
|
+
}
|
|
425
|
+
export interface CreateSessionResponse {
|
|
426
|
+
session?: SessionSummary | undefined;
|
|
427
|
+
}
|
|
428
|
+
export interface RenameSessionRequest {
|
|
429
|
+
sessionId: string;
|
|
430
|
+
name: string;
|
|
431
|
+
}
|
|
432
|
+
export interface DeleteSessionRequest {
|
|
433
|
+
sessionId: string;
|
|
434
|
+
}
|
|
435
|
+
export interface DeleteSessionResponse {
|
|
436
|
+
/** Non-empty = deletion refused, these graphs are still running. */
|
|
437
|
+
runningRunIds: string[];
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Daemon path context (issue #68): home / base / work_dir are fixed at daemon
|
|
441
|
+
* startup; skills_dirs reflects the current skill search directories and is
|
|
442
|
+
* the only mutable part (see SetSkillDirs).
|
|
443
|
+
*/
|
|
444
|
+
export interface PathContext {
|
|
445
|
+
home: string;
|
|
446
|
+
base: string;
|
|
447
|
+
workDir: string;
|
|
448
|
+
skillsDirs: string[];
|
|
449
|
+
}
|
|
450
|
+
export interface SetSkillDirsRequest {
|
|
451
|
+
dirs: string[];
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Session activation (issue #26): explicit client key and optional runtime.
|
|
455
|
+
* Runtime is a singular message so its presence remains observable.
|
|
456
|
+
*/
|
|
457
|
+
export interface SessionRuntimeContext {
|
|
458
|
+
workDir: string;
|
|
459
|
+
provider?: string | undefined;
|
|
460
|
+
model?: string | undefined;
|
|
461
|
+
baseUrl?: string | undefined;
|
|
462
|
+
thinking?: boolean | undefined;
|
|
463
|
+
}
|
|
464
|
+
export interface ActivateSessionRequest {
|
|
465
|
+
sessionId?: string | undefined;
|
|
466
|
+
clientKey: string;
|
|
467
|
+
name?: string | undefined;
|
|
468
|
+
runtime?: SessionRuntimeContext | undefined;
|
|
469
|
+
}
|
|
470
|
+
export interface ActivateSessionResponse {
|
|
471
|
+
session?: SessionSummary | undefined;
|
|
472
|
+
created: boolean;
|
|
473
|
+
}
|
|
474
|
+
export interface SetCredentialRequest {
|
|
475
|
+
sessionId: string;
|
|
476
|
+
provider: string;
|
|
477
|
+
secret: Uint8Array;
|
|
478
|
+
}
|
|
479
|
+
export interface ClearCredentialRequest {
|
|
480
|
+
sessionId: string;
|
|
481
|
+
provider?: string | undefined;
|
|
482
|
+
}
|
|
483
|
+
export declare const FeedBlockPatch: MessageFns<FeedBlockPatch>;
|
|
484
|
+
export declare const ContextUsage: MessageFns<ContextUsage>;
|
|
485
|
+
export declare const ProviderGroup: MessageFns<ProviderGroup>;
|
|
486
|
+
export declare const ModelEntry: MessageFns<ModelEntry>;
|
|
487
|
+
export declare const TriggerPollStatus: MessageFns<TriggerPollStatus>;
|
|
488
|
+
export declare const GoalSnapshot: MessageFns<GoalSnapshot>;
|
|
489
|
+
export declare const ControlPlanePromptSnapshot: MessageFns<ControlPlanePromptSnapshot>;
|
|
490
|
+
export declare const SidebarSnapshot: MessageFns<SidebarSnapshot>;
|
|
491
|
+
export declare const SkillsSnapshot: MessageFns<SkillsSnapshot>;
|
|
492
|
+
export declare const SkillSnapshot: MessageFns<SkillSnapshot>;
|
|
493
|
+
export declare const TriggersSnapshot: MessageFns<TriggersSnapshot>;
|
|
494
|
+
export declare const TriggerRuleSnapshot: MessageFns<TriggerRuleSnapshot>;
|
|
495
|
+
export declare const CronSnapshot: MessageFns<CronSnapshot>;
|
|
496
|
+
export declare const CronJobSnapshot: MessageFns<CronJobSnapshot>;
|
|
497
|
+
export declare const McpSnapshot: MessageFns<McpSnapshot>;
|
|
498
|
+
export declare const ToolsSnapshot: MessageFns<ToolsSnapshot>;
|
|
499
|
+
export declare const FeedBlock: MessageFns<FeedBlock>;
|
|
500
|
+
export declare const UserBlock: MessageFns<UserBlock>;
|
|
501
|
+
export declare const AssistantBlock: MessageFns<AssistantBlock>;
|
|
502
|
+
export declare const ThinkingBlock: MessageFns<ThinkingBlock>;
|
|
503
|
+
export declare const ToolCallBlock: MessageFns<ToolCallBlock>;
|
|
504
|
+
export declare const ErrorBlock: MessageFns<ErrorBlock>;
|
|
505
|
+
export declare const ToolResultBlock: MessageFns<ToolResultBlock>;
|
|
506
|
+
export declare const PlainBlock: MessageFns<PlainBlock>;
|
|
507
|
+
export declare const SessionSummary: MessageFns<SessionSummary>;
|
|
508
|
+
export declare const SessionSummary_MetadataEntry: MessageFns<SessionSummary_MetadataEntry>;
|
|
509
|
+
export declare const ModelRef: MessageFns<ModelRef>;
|
|
510
|
+
export declare const SessionInfo: MessageFns<SessionInfo>;
|
|
511
|
+
export declare const SessionInfo_MetadataEntry: MessageFns<SessionInfo_MetadataEntry>;
|
|
512
|
+
export declare const SessionRuntime: MessageFns<SessionRuntime>;
|
|
513
|
+
export declare const SessionFeed: MessageFns<SessionFeed>;
|
|
514
|
+
export declare const SessionGraphState: MessageFns<SessionGraphState>;
|
|
515
|
+
export declare const SessionLineage: MessageFns<SessionLineage>;
|
|
516
|
+
export declare const SessionSnapshot: MessageFns<SessionSnapshot>;
|
|
517
|
+
export declare const ListSessionMessagesRequest: MessageFns<ListSessionMessagesRequest>;
|
|
518
|
+
export declare const SessionMessagePage: MessageFns<SessionMessagePage>;
|
|
519
|
+
export declare const CollapseSessionRequest: MessageFns<CollapseSessionRequest>;
|
|
520
|
+
export declare const CollapseSessionResponse: MessageFns<CollapseSessionResponse>;
|
|
521
|
+
export declare const GetSessionGraphNodeRequest: MessageFns<GetSessionGraphNodeRequest>;
|
|
522
|
+
export declare const GetSessionGraphNodeResponse: MessageFns<GetSessionGraphNodeResponse>;
|
|
523
|
+
export declare const ListSessionGraphNodeMessagesRequest: MessageFns<ListSessionGraphNodeMessagesRequest>;
|
|
524
|
+
export declare const ListSessionGraphNodeMessagesResponse: MessageFns<ListSessionGraphNodeMessagesResponse>;
|
|
525
|
+
export declare const StreamSessionGraphNodeRequest: MessageFns<StreamSessionGraphNodeRequest>;
|
|
526
|
+
export declare const SessionGraphNodeStreamFrame: MessageFns<SessionGraphNodeStreamFrame>;
|
|
527
|
+
export declare const SessionStateRequest: MessageFns<SessionStateRequest>;
|
|
528
|
+
export declare const UpdateSessionMetadataRequest: MessageFns<UpdateSessionMetadataRequest>;
|
|
529
|
+
export declare const UpdateSessionMetadataRequest_MetadataEntry: MessageFns<UpdateSessionMetadataRequest_MetadataEntry>;
|
|
530
|
+
export declare const ListSessionsResponse: MessageFns<ListSessionsResponse>;
|
|
531
|
+
export declare const CreateSessionRequest: MessageFns<CreateSessionRequest>;
|
|
532
|
+
export declare const CreateSessionRequest_MetadataEntry: MessageFns<CreateSessionRequest_MetadataEntry>;
|
|
533
|
+
export declare const CreateSessionResponse: MessageFns<CreateSessionResponse>;
|
|
534
|
+
export declare const RenameSessionRequest: MessageFns<RenameSessionRequest>;
|
|
535
|
+
export declare const DeleteSessionRequest: MessageFns<DeleteSessionRequest>;
|
|
536
|
+
export declare const DeleteSessionResponse: MessageFns<DeleteSessionResponse>;
|
|
537
|
+
export declare const PathContext: MessageFns<PathContext>;
|
|
538
|
+
export declare const SetSkillDirsRequest: MessageFns<SetSkillDirsRequest>;
|
|
539
|
+
export declare const SessionRuntimeContext: MessageFns<SessionRuntimeContext>;
|
|
540
|
+
export declare const ActivateSessionRequest: MessageFns<ActivateSessionRequest>;
|
|
541
|
+
export declare const ActivateSessionResponse: MessageFns<ActivateSessionResponse>;
|
|
542
|
+
export declare const SetCredentialRequest: MessageFns<SetCredentialRequest>;
|
|
543
|
+
export declare const ClearCredentialRequest: MessageFns<ClearCredentialRequest>;
|
|
544
|
+
export type SessionServiceService = typeof SessionServiceService;
|
|
545
|
+
export declare const SessionServiceService: {
|
|
546
|
+
/** Full nested session snapshot: the single authoritative current snapshot. */
|
|
547
|
+
readonly getSnapshot: {
|
|
548
|
+
readonly path: "/theway.grpc.v1.SessionService/GetSnapshot";
|
|
549
|
+
readonly requestStream: false;
|
|
550
|
+
readonly responseStream: false;
|
|
551
|
+
readonly requestSerialize: (value: SessionStateRequest) => Buffer;
|
|
552
|
+
readonly requestDeserialize: (value: Buffer) => SessionStateRequest;
|
|
553
|
+
readonly responseSerialize: (value: SessionSnapshot) => Buffer;
|
|
554
|
+
readonly responseDeserialize: (value: Buffer) => SessionSnapshot;
|
|
555
|
+
};
|
|
556
|
+
/** Cursor-paginated full message history on the session's active branch. */
|
|
557
|
+
readonly listSessionMessages: {
|
|
558
|
+
readonly path: "/theway.grpc.v1.SessionService/ListSessionMessages";
|
|
559
|
+
readonly requestStream: false;
|
|
560
|
+
readonly responseStream: false;
|
|
561
|
+
readonly requestSerialize: (value: ListSessionMessagesRequest) => Buffer;
|
|
562
|
+
readonly requestDeserialize: (value: Buffer) => ListSessionMessagesRequest;
|
|
563
|
+
readonly responseSerialize: (value: SessionMessagePage) => Buffer;
|
|
564
|
+
readonly responseDeserialize: (value: Buffer) => SessionMessagePage;
|
|
565
|
+
};
|
|
566
|
+
/** Collapse a session into a graph node (session-snapshot-collapse). */
|
|
567
|
+
readonly collapseSession: {
|
|
568
|
+
readonly path: "/theway.grpc.v1.SessionService/CollapseSession";
|
|
569
|
+
readonly requestStream: false;
|
|
570
|
+
readonly responseStream: false;
|
|
571
|
+
readonly requestSerialize: (value: CollapseSessionRequest) => Buffer;
|
|
572
|
+
readonly requestDeserialize: (value: Buffer) => CollapseSessionRequest;
|
|
573
|
+
readonly responseSerialize: (value: CollapseSessionResponse) => Buffer;
|
|
574
|
+
readonly responseDeserialize: (value: Buffer) => CollapseSessionResponse;
|
|
575
|
+
};
|
|
576
|
+
readonly getSessionGraphNode: {
|
|
577
|
+
readonly path: "/theway.grpc.v1.SessionService/GetSessionGraphNode";
|
|
578
|
+
readonly requestStream: false;
|
|
579
|
+
readonly responseStream: false;
|
|
580
|
+
readonly requestSerialize: (value: GetSessionGraphNodeRequest) => Buffer;
|
|
581
|
+
readonly requestDeserialize: (value: Buffer) => GetSessionGraphNodeRequest;
|
|
582
|
+
readonly responseSerialize: (value: GetSessionGraphNodeResponse) => Buffer;
|
|
583
|
+
readonly responseDeserialize: (value: Buffer) => GetSessionGraphNodeResponse;
|
|
584
|
+
};
|
|
585
|
+
readonly listSessionGraphNodeMessages: {
|
|
586
|
+
readonly path: "/theway.grpc.v1.SessionService/ListSessionGraphNodeMessages";
|
|
587
|
+
readonly requestStream: false;
|
|
588
|
+
readonly responseStream: false;
|
|
589
|
+
readonly requestSerialize: (value: ListSessionGraphNodeMessagesRequest) => Buffer;
|
|
590
|
+
readonly requestDeserialize: (value: Buffer) => ListSessionGraphNodeMessagesRequest;
|
|
591
|
+
readonly responseSerialize: (value: ListSessionGraphNodeMessagesResponse) => Buffer;
|
|
592
|
+
readonly responseDeserialize: (value: Buffer) => ListSessionGraphNodeMessagesResponse;
|
|
593
|
+
};
|
|
594
|
+
readonly streamSessionGraphNode: {
|
|
595
|
+
readonly path: "/theway.grpc.v1.SessionService/StreamSessionGraphNode";
|
|
596
|
+
readonly requestStream: false;
|
|
597
|
+
readonly responseStream: true;
|
|
598
|
+
readonly requestSerialize: (value: StreamSessionGraphNodeRequest) => Buffer;
|
|
599
|
+
readonly requestDeserialize: (value: Buffer) => StreamSessionGraphNodeRequest;
|
|
600
|
+
readonly responseSerialize: (value: SessionGraphNodeStreamFrame) => Buffer;
|
|
601
|
+
readonly responseDeserialize: (value: Buffer) => SessionGraphNodeStreamFrame;
|
|
602
|
+
};
|
|
603
|
+
/**
|
|
604
|
+
* Session resources: list (with current marker) / create / rename /
|
|
605
|
+
* delete. DeleteSession reports the offending run ids when refused because
|
|
606
|
+
* the session still has running graphs.
|
|
607
|
+
*/
|
|
608
|
+
readonly listSessions: {
|
|
609
|
+
readonly path: "/theway.grpc.v1.SessionService/ListSessions";
|
|
610
|
+
readonly requestStream: false;
|
|
611
|
+
readonly responseStream: false;
|
|
612
|
+
readonly requestSerialize: (value: Empty) => Buffer;
|
|
613
|
+
readonly requestDeserialize: (value: Buffer) => Empty;
|
|
614
|
+
readonly responseSerialize: (value: ListSessionsResponse) => Buffer;
|
|
615
|
+
readonly responseDeserialize: (value: Buffer) => ListSessionsResponse;
|
|
616
|
+
};
|
|
617
|
+
readonly createSession: {
|
|
618
|
+
readonly path: "/theway.grpc.v1.SessionService/CreateSession";
|
|
619
|
+
readonly requestStream: false;
|
|
620
|
+
readonly responseStream: false;
|
|
621
|
+
readonly requestSerialize: (value: CreateSessionRequest) => Buffer;
|
|
622
|
+
readonly requestDeserialize: (value: Buffer) => CreateSessionRequest;
|
|
623
|
+
readonly responseSerialize: (value: CreateSessionResponse) => Buffer;
|
|
624
|
+
readonly responseDeserialize: (value: Buffer) => CreateSessionResponse;
|
|
625
|
+
};
|
|
626
|
+
readonly renameSession: {
|
|
627
|
+
readonly path: "/theway.grpc.v1.SessionService/RenameSession";
|
|
628
|
+
readonly requestStream: false;
|
|
629
|
+
readonly responseStream: false;
|
|
630
|
+
readonly requestSerialize: (value: RenameSessionRequest) => Buffer;
|
|
631
|
+
readonly requestDeserialize: (value: Buffer) => RenameSessionRequest;
|
|
632
|
+
readonly responseSerialize: (value: CommandResult) => Buffer;
|
|
633
|
+
readonly responseDeserialize: (value: Buffer) => CommandResult;
|
|
634
|
+
};
|
|
635
|
+
readonly deleteSession: {
|
|
636
|
+
readonly path: "/theway.grpc.v1.SessionService/DeleteSession";
|
|
637
|
+
readonly requestStream: false;
|
|
638
|
+
readonly responseStream: false;
|
|
639
|
+
readonly requestSerialize: (value: DeleteSessionRequest) => Buffer;
|
|
640
|
+
readonly requestDeserialize: (value: Buffer) => DeleteSessionRequest;
|
|
641
|
+
readonly responseSerialize: (value: DeleteSessionResponse) => Buffer;
|
|
642
|
+
readonly responseDeserialize: (value: Buffer) => DeleteSessionResponse;
|
|
643
|
+
};
|
|
644
|
+
/** Update arbitrary session metadata KV (opaque to thewayd). */
|
|
645
|
+
readonly updateSessionMetadata: {
|
|
646
|
+
readonly path: "/theway.grpc.v1.SessionService/UpdateSessionMetadata";
|
|
647
|
+
readonly requestStream: false;
|
|
648
|
+
readonly responseStream: false;
|
|
649
|
+
readonly requestSerialize: (value: UpdateSessionMetadataRequest) => Buffer;
|
|
650
|
+
readonly requestDeserialize: (value: Buffer) => UpdateSessionMetadataRequest;
|
|
651
|
+
readonly responseSerialize: (value: CommandResult) => Buffer;
|
|
652
|
+
readonly responseDeserialize: (value: Buffer) => CommandResult;
|
|
653
|
+
};
|
|
654
|
+
/**
|
|
655
|
+
* Daemon path context (issue #68): home/base/work_dir plus the current
|
|
656
|
+
* skill search directories.
|
|
657
|
+
*/
|
|
658
|
+
readonly getPathContext: {
|
|
659
|
+
readonly path: "/theway.grpc.v1.SessionService/GetPathContext";
|
|
660
|
+
readonly requestStream: false;
|
|
661
|
+
readonly responseStream: false;
|
|
662
|
+
readonly requestSerialize: (value: Empty) => Buffer;
|
|
663
|
+
readonly requestDeserialize: (value: Buffer) => Empty;
|
|
664
|
+
readonly responseSerialize: (value: PathContext) => Buffer;
|
|
665
|
+
readonly responseDeserialize: (value: Buffer) => PathContext;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* Replace the extra skill directories dynamically; the command is queued
|
|
669
|
+
* into the event loop, which applies it authoritatively (hot-reload).
|
|
670
|
+
* `accepted` = the command was queued.
|
|
671
|
+
*/
|
|
672
|
+
readonly setSkillDirs: {
|
|
673
|
+
readonly path: "/theway.grpc.v1.SessionService/SetSkillDirs";
|
|
674
|
+
readonly requestStream: false;
|
|
675
|
+
readonly responseStream: false;
|
|
676
|
+
readonly requestSerialize: (value: SetSkillDirsRequest) => Buffer;
|
|
677
|
+
readonly requestDeserialize: (value: Buffer) => SetSkillDirsRequest;
|
|
678
|
+
readonly responseSerialize: (value: CommandResult) => Buffer;
|
|
679
|
+
readonly responseDeserialize: (value: Buffer) => CommandResult;
|
|
680
|
+
};
|
|
681
|
+
/**
|
|
682
|
+
* Session activation and credentials (issue #26): activate/resume a session
|
|
683
|
+
* and manage provider credentials without echoing secrets.
|
|
684
|
+
*/
|
|
685
|
+
readonly activateSession: {
|
|
686
|
+
readonly path: "/theway.grpc.v1.SessionService/ActivateSession";
|
|
687
|
+
readonly requestStream: false;
|
|
688
|
+
readonly responseStream: false;
|
|
689
|
+
readonly requestSerialize: (value: ActivateSessionRequest) => Buffer;
|
|
690
|
+
readonly requestDeserialize: (value: Buffer) => ActivateSessionRequest;
|
|
691
|
+
readonly responseSerialize: (value: ActivateSessionResponse) => Buffer;
|
|
692
|
+
readonly responseDeserialize: (value: Buffer) => ActivateSessionResponse;
|
|
693
|
+
};
|
|
694
|
+
readonly setCredential: {
|
|
695
|
+
readonly path: "/theway.grpc.v1.SessionService/SetCredential";
|
|
696
|
+
readonly requestStream: false;
|
|
697
|
+
readonly responseStream: false;
|
|
698
|
+
readonly requestSerialize: (value: SetCredentialRequest) => Buffer;
|
|
699
|
+
readonly requestDeserialize: (value: Buffer) => SetCredentialRequest;
|
|
700
|
+
readonly responseSerialize: (value: CommandResult) => Buffer;
|
|
701
|
+
readonly responseDeserialize: (value: Buffer) => CommandResult;
|
|
702
|
+
};
|
|
703
|
+
readonly clearCredential: {
|
|
704
|
+
readonly path: "/theway.grpc.v1.SessionService/ClearCredential";
|
|
705
|
+
readonly requestStream: false;
|
|
706
|
+
readonly responseStream: false;
|
|
707
|
+
readonly requestSerialize: (value: ClearCredentialRequest) => Buffer;
|
|
708
|
+
readonly requestDeserialize: (value: Buffer) => ClearCredentialRequest;
|
|
709
|
+
readonly responseSerialize: (value: CommandResult) => Buffer;
|
|
710
|
+
readonly responseDeserialize: (value: Buffer) => CommandResult;
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
export interface SessionServiceServer extends UntypedServiceImplementation {
|
|
714
|
+
/** Full nested session snapshot: the single authoritative current snapshot. */
|
|
715
|
+
getSnapshot: handleUnaryCall<SessionStateRequest, SessionSnapshot>;
|
|
716
|
+
/** Cursor-paginated full message history on the session's active branch. */
|
|
717
|
+
listSessionMessages: handleUnaryCall<ListSessionMessagesRequest, SessionMessagePage>;
|
|
718
|
+
/** Collapse a session into a graph node (session-snapshot-collapse). */
|
|
719
|
+
collapseSession: handleUnaryCall<CollapseSessionRequest, CollapseSessionResponse>;
|
|
720
|
+
getSessionGraphNode: handleUnaryCall<GetSessionGraphNodeRequest, GetSessionGraphNodeResponse>;
|
|
721
|
+
listSessionGraphNodeMessages: handleUnaryCall<ListSessionGraphNodeMessagesRequest, ListSessionGraphNodeMessagesResponse>;
|
|
722
|
+
streamSessionGraphNode: handleServerStreamingCall<StreamSessionGraphNodeRequest, SessionGraphNodeStreamFrame>;
|
|
723
|
+
/**
|
|
724
|
+
* Session resources: list (with current marker) / create / rename /
|
|
725
|
+
* delete. DeleteSession reports the offending run ids when refused because
|
|
726
|
+
* the session still has running graphs.
|
|
727
|
+
*/
|
|
728
|
+
listSessions: handleUnaryCall<Empty, ListSessionsResponse>;
|
|
729
|
+
createSession: handleUnaryCall<CreateSessionRequest, CreateSessionResponse>;
|
|
730
|
+
renameSession: handleUnaryCall<RenameSessionRequest, CommandResult>;
|
|
731
|
+
deleteSession: handleUnaryCall<DeleteSessionRequest, DeleteSessionResponse>;
|
|
732
|
+
/** Update arbitrary session metadata KV (opaque to thewayd). */
|
|
733
|
+
updateSessionMetadata: handleUnaryCall<UpdateSessionMetadataRequest, CommandResult>;
|
|
734
|
+
/**
|
|
735
|
+
* Daemon path context (issue #68): home/base/work_dir plus the current
|
|
736
|
+
* skill search directories.
|
|
737
|
+
*/
|
|
738
|
+
getPathContext: handleUnaryCall<Empty, PathContext>;
|
|
739
|
+
/**
|
|
740
|
+
* Replace the extra skill directories dynamically; the command is queued
|
|
741
|
+
* into the event loop, which applies it authoritatively (hot-reload).
|
|
742
|
+
* `accepted` = the command was queued.
|
|
743
|
+
*/
|
|
744
|
+
setSkillDirs: handleUnaryCall<SetSkillDirsRequest, CommandResult>;
|
|
745
|
+
/**
|
|
746
|
+
* Session activation and credentials (issue #26): activate/resume a session
|
|
747
|
+
* and manage provider credentials without echoing secrets.
|
|
748
|
+
*/
|
|
749
|
+
activateSession: handleUnaryCall<ActivateSessionRequest, ActivateSessionResponse>;
|
|
750
|
+
setCredential: handleUnaryCall<SetCredentialRequest, CommandResult>;
|
|
751
|
+
clearCredential: handleUnaryCall<ClearCredentialRequest, CommandResult>;
|
|
752
|
+
}
|
|
753
|
+
export interface SessionServiceClient extends Client {
|
|
754
|
+
/** Full nested session snapshot: the single authoritative current snapshot. */
|
|
755
|
+
getSnapshot(request: SessionStateRequest, callback: (error: ServiceError | null, response: SessionSnapshot) => void): ClientUnaryCall;
|
|
756
|
+
getSnapshot(request: SessionStateRequest, metadata: Metadata, callback: (error: ServiceError | null, response: SessionSnapshot) => void): ClientUnaryCall;
|
|
757
|
+
getSnapshot(request: SessionStateRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: SessionSnapshot) => void): ClientUnaryCall;
|
|
758
|
+
/** Cursor-paginated full message history on the session's active branch. */
|
|
759
|
+
listSessionMessages(request: ListSessionMessagesRequest, callback: (error: ServiceError | null, response: SessionMessagePage) => void): ClientUnaryCall;
|
|
760
|
+
listSessionMessages(request: ListSessionMessagesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: SessionMessagePage) => void): ClientUnaryCall;
|
|
761
|
+
listSessionMessages(request: ListSessionMessagesRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: SessionMessagePage) => void): ClientUnaryCall;
|
|
762
|
+
/** Collapse a session into a graph node (session-snapshot-collapse). */
|
|
763
|
+
collapseSession(request: CollapseSessionRequest, callback: (error: ServiceError | null, response: CollapseSessionResponse) => void): ClientUnaryCall;
|
|
764
|
+
collapseSession(request: CollapseSessionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CollapseSessionResponse) => void): ClientUnaryCall;
|
|
765
|
+
collapseSession(request: CollapseSessionRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CollapseSessionResponse) => void): ClientUnaryCall;
|
|
766
|
+
getSessionGraphNode(request: GetSessionGraphNodeRequest, callback: (error: ServiceError | null, response: GetSessionGraphNodeResponse) => void): ClientUnaryCall;
|
|
767
|
+
getSessionGraphNode(request: GetSessionGraphNodeRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetSessionGraphNodeResponse) => void): ClientUnaryCall;
|
|
768
|
+
getSessionGraphNode(request: GetSessionGraphNodeRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetSessionGraphNodeResponse) => void): ClientUnaryCall;
|
|
769
|
+
listSessionGraphNodeMessages(request: ListSessionGraphNodeMessagesRequest, callback: (error: ServiceError | null, response: ListSessionGraphNodeMessagesResponse) => void): ClientUnaryCall;
|
|
770
|
+
listSessionGraphNodeMessages(request: ListSessionGraphNodeMessagesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListSessionGraphNodeMessagesResponse) => void): ClientUnaryCall;
|
|
771
|
+
listSessionGraphNodeMessages(request: ListSessionGraphNodeMessagesRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListSessionGraphNodeMessagesResponse) => void): ClientUnaryCall;
|
|
772
|
+
streamSessionGraphNode(request: StreamSessionGraphNodeRequest, options?: Partial<CallOptions>): ClientReadableStream<SessionGraphNodeStreamFrame>;
|
|
773
|
+
streamSessionGraphNode(request: StreamSessionGraphNodeRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<SessionGraphNodeStreamFrame>;
|
|
774
|
+
/**
|
|
775
|
+
* Session resources: list (with current marker) / create / rename /
|
|
776
|
+
* delete. DeleteSession reports the offending run ids when refused because
|
|
777
|
+
* the session still has running graphs.
|
|
778
|
+
*/
|
|
779
|
+
listSessions(request: Empty, callback: (error: ServiceError | null, response: ListSessionsResponse) => void): ClientUnaryCall;
|
|
780
|
+
listSessions(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: ListSessionsResponse) => void): ClientUnaryCall;
|
|
781
|
+
listSessions(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListSessionsResponse) => void): ClientUnaryCall;
|
|
782
|
+
createSession(request: CreateSessionRequest, callback: (error: ServiceError | null, response: CreateSessionResponse) => void): ClientUnaryCall;
|
|
783
|
+
createSession(request: CreateSessionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CreateSessionResponse) => void): ClientUnaryCall;
|
|
784
|
+
createSession(request: CreateSessionRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CreateSessionResponse) => void): ClientUnaryCall;
|
|
785
|
+
renameSession(request: RenameSessionRequest, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
786
|
+
renameSession(request: RenameSessionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
787
|
+
renameSession(request: RenameSessionRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
788
|
+
deleteSession(request: DeleteSessionRequest, callback: (error: ServiceError | null, response: DeleteSessionResponse) => void): ClientUnaryCall;
|
|
789
|
+
deleteSession(request: DeleteSessionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: DeleteSessionResponse) => void): ClientUnaryCall;
|
|
790
|
+
deleteSession(request: DeleteSessionRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: DeleteSessionResponse) => void): ClientUnaryCall;
|
|
791
|
+
/** Update arbitrary session metadata KV (opaque to thewayd). */
|
|
792
|
+
updateSessionMetadata(request: UpdateSessionMetadataRequest, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
793
|
+
updateSessionMetadata(request: UpdateSessionMetadataRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
794
|
+
updateSessionMetadata(request: UpdateSessionMetadataRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
795
|
+
/**
|
|
796
|
+
* Daemon path context (issue #68): home/base/work_dir plus the current
|
|
797
|
+
* skill search directories.
|
|
798
|
+
*/
|
|
799
|
+
getPathContext(request: Empty, callback: (error: ServiceError | null, response: PathContext) => void): ClientUnaryCall;
|
|
800
|
+
getPathContext(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: PathContext) => void): ClientUnaryCall;
|
|
801
|
+
getPathContext(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: PathContext) => void): ClientUnaryCall;
|
|
802
|
+
/**
|
|
803
|
+
* Replace the extra skill directories dynamically; the command is queued
|
|
804
|
+
* into the event loop, which applies it authoritatively (hot-reload).
|
|
805
|
+
* `accepted` = the command was queued.
|
|
806
|
+
*/
|
|
807
|
+
setSkillDirs(request: SetSkillDirsRequest, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
808
|
+
setSkillDirs(request: SetSkillDirsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
809
|
+
setSkillDirs(request: SetSkillDirsRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
810
|
+
/**
|
|
811
|
+
* Session activation and credentials (issue #26): activate/resume a session
|
|
812
|
+
* and manage provider credentials without echoing secrets.
|
|
813
|
+
*/
|
|
814
|
+
activateSession(request: ActivateSessionRequest, callback: (error: ServiceError | null, response: ActivateSessionResponse) => void): ClientUnaryCall;
|
|
815
|
+
activateSession(request: ActivateSessionRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ActivateSessionResponse) => void): ClientUnaryCall;
|
|
816
|
+
activateSession(request: ActivateSessionRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ActivateSessionResponse) => void): ClientUnaryCall;
|
|
817
|
+
setCredential(request: SetCredentialRequest, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
818
|
+
setCredential(request: SetCredentialRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
819
|
+
setCredential(request: SetCredentialRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
820
|
+
clearCredential(request: ClearCredentialRequest, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
821
|
+
clearCredential(request: ClearCredentialRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
822
|
+
clearCredential(request: ClearCredentialRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CommandResult) => void): ClientUnaryCall;
|
|
823
|
+
}
|
|
824
|
+
export declare const SessionServiceClient: {
|
|
825
|
+
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): SessionServiceClient;
|
|
826
|
+
service: typeof SessionServiceService;
|
|
827
|
+
serviceName: string;
|
|
828
|
+
};
|
|
829
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
830
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
831
|
+
$case: string;
|
|
832
|
+
} ? {
|
|
833
|
+
[K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
|
|
834
|
+
} & {
|
|
835
|
+
$case: T["$case"];
|
|
836
|
+
} : T extends {} ? {
|
|
837
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
838
|
+
} : Partial<T>;
|
|
839
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
840
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
841
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
842
|
+
} & {
|
|
843
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
844
|
+
};
|
|
845
|
+
export interface MessageFns<T> {
|
|
846
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
847
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
848
|
+
fromJSON(object: any): T;
|
|
849
|
+
toJSON(message: T): unknown;
|
|
850
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
851
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
852
|
+
}
|
|
853
|
+
export {};
|
|
854
|
+
//# sourceMappingURL=session.d.ts.map
|