@theway-ai/sdk 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +33 -17
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +110 -37
- package/dist/client.js.map +1 -1
- package/dist/generated/commands.d.ts +44 -9
- package/dist/generated/commands.d.ts.map +1 -1
- package/dist/generated/commands.js +190 -6
- package/dist/generated/commands.js.map +1 -1
- package/dist/generated/events.d.ts +22 -9
- package/dist/generated/events.d.ts.map +1 -1
- package/dist/generated/events.js +63 -4
- package/dist/generated/events.js.map +1 -1
- package/dist/generated/graph_engine.d.ts +6 -0
- package/dist/generated/graph_engine.d.ts.map +1 -1
- package/dist/generated/graph_engine.js +120 -6
- package/dist/generated/graph_engine.js.map +1 -1
- package/dist/generated/session.d.ts +68 -26
- package/dist/generated/session.d.ts.map +1 -1
- package/dist/generated/session.js +479 -48
- package/dist/generated/session.js.map +1 -1
- package/dist/generated/settings.d.ts +7 -0
- package/dist/generated/settings.d.ts.map +1 -1
- package/dist/generated/settings.js +20 -0
- package/dist/generated/settings.js.map +1 -1
- package/dist/generated/state.d.ts +14 -1
- package/dist/generated/state.d.ts.map +1 -1
- package/dist/generated/state.js +10 -1
- package/dist/generated/state.js.map +1 -1
- package/package.json +1 -1
- package/proto/commands.proto +17 -4
- package/proto/events.proto +7 -1
- package/proto/graph_engine.proto +6 -0
- package/proto/session.proto +23 -8
- package/proto/settings.proto +6 -0
- package/proto/state.proto +1 -0
package/proto/graph_engine.proto
CHANGED
|
@@ -77,6 +77,7 @@ message GetNodeOutputRequest {
|
|
|
77
77
|
string run_id = 1;
|
|
78
78
|
string node_id = 2;
|
|
79
79
|
uint64 offset = 3;
|
|
80
|
+
string session_id = 4;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
message GetNodeOutputResponse {
|
|
@@ -99,11 +100,13 @@ enum GraphKind {
|
|
|
99
100
|
|
|
100
101
|
message GraphCancelRequest {
|
|
101
102
|
string run_id = 1;
|
|
103
|
+
string session_id = 2;
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
message GraphRetryRequest {
|
|
105
107
|
string run_id = 1;
|
|
106
108
|
optional string node_id = 2; // omitted = all failed/cancelled nodes
|
|
109
|
+
string session_id = 3;
|
|
107
110
|
}
|
|
108
111
|
|
|
109
112
|
message GraphRetryResponse {
|
|
@@ -113,18 +116,21 @@ message GraphRetryResponse {
|
|
|
113
116
|
message GraphSkipRequest {
|
|
114
117
|
string run_id = 1;
|
|
115
118
|
string node_id = 2;
|
|
119
|
+
string session_id = 3;
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
// Turn-level control for a running DAG node's subagent.
|
|
119
123
|
message GraphNodeInterruptRequest {
|
|
120
124
|
string run_id = 1;
|
|
121
125
|
string node_id = 2;
|
|
126
|
+
string session_id = 3;
|
|
122
127
|
}
|
|
123
128
|
|
|
124
129
|
message GraphNodeSteerRequest {
|
|
125
130
|
string run_id = 1;
|
|
126
131
|
string node_id = 2;
|
|
127
132
|
string text = 3;
|
|
133
|
+
string session_id = 4;
|
|
128
134
|
}
|
|
129
135
|
|
|
130
136
|
message GraphSkipResponse {
|
package/proto/session.proto
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Session domain: the full session state plane (snapshot, sidebar, feed,
|
|
2
2
|
// model catalog, status), session resource messages
|
|
3
|
-
// (list/create/
|
|
3
|
+
// (list/create/rename/delete), and the SessionService RPC surface.
|
|
4
4
|
|
|
5
5
|
syntax = "proto3";
|
|
6
6
|
package theway.grpc.v1;
|
|
@@ -42,6 +42,12 @@ message SessionState {
|
|
|
42
42
|
repeated FeedBlockPatch feed_block_patches = 19;
|
|
43
43
|
// Runtime-extension status is additive; older clients ignore this field.
|
|
44
44
|
ExtensionSnapshot extensions = 20;
|
|
45
|
+
// Session-cumulative token usage: total input, cached input, non-cached
|
|
46
|
+
// input, output, and cache write totals for the current session.
|
|
47
|
+
ContextUsage session_context_usage = 21;
|
|
48
|
+
// Active thinking level ("off" | "minimal" | "low" | "medium" | "high" |
|
|
49
|
+
// "xhigh"); empty for older daemons.
|
|
50
|
+
string thinking_level = 22;
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
message FeedBlockPatch {
|
|
@@ -231,6 +237,16 @@ message SessionSummary {
|
|
|
231
237
|
uint32 active_graph_count = 8;
|
|
232
238
|
bool busy = 9;
|
|
233
239
|
optional string preview = 10;
|
|
240
|
+
map<string, string> metadata = 11;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
message SessionStateRequest {
|
|
244
|
+
string session_id = 1;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
message UpdateSessionMetadataRequest {
|
|
248
|
+
string session_id = 1;
|
|
249
|
+
map<string, string> metadata = 2;
|
|
234
250
|
}
|
|
235
251
|
|
|
236
252
|
message ListSessionsResponse {
|
|
@@ -240,16 +256,14 @@ message ListSessionsResponse {
|
|
|
240
256
|
|
|
241
257
|
message CreateSessionRequest {
|
|
242
258
|
optional string name = 1;
|
|
259
|
+
optional string session_id = 2;
|
|
260
|
+
map<string, string> metadata = 3;
|
|
243
261
|
}
|
|
244
262
|
|
|
245
263
|
message CreateSessionResponse {
|
|
246
264
|
SessionSummary session = 1;
|
|
247
265
|
}
|
|
248
266
|
|
|
249
|
-
message SwitchSessionRequest {
|
|
250
|
-
string session_id = 1;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
267
|
message RenameSessionRequest {
|
|
254
268
|
string session_id = 1;
|
|
255
269
|
string name = 2;
|
|
@@ -313,15 +327,16 @@ message ClearCredentialRequest {
|
|
|
313
327
|
|
|
314
328
|
service SessionService {
|
|
315
329
|
// Full structured state (binary protobuf).
|
|
316
|
-
rpc GetState(
|
|
317
|
-
// Session resources: list (with current marker) / create /
|
|
330
|
+
rpc GetState(SessionStateRequest) returns (SessionState);
|
|
331
|
+
// Session resources: list (with current marker) / create / rename /
|
|
318
332
|
// delete. DeleteSession reports the offending run ids when refused because
|
|
319
333
|
// the session still has running graphs.
|
|
320
334
|
rpc ListSessions(Empty) returns (ListSessionsResponse);
|
|
321
335
|
rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse);
|
|
322
|
-
rpc SwitchSession(SwitchSessionRequest) returns (CommandResult);
|
|
323
336
|
rpc RenameSession(RenameSessionRequest) returns (CommandResult);
|
|
324
337
|
rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse);
|
|
338
|
+
// Update arbitrary session metadata KV (opaque to thewayd).
|
|
339
|
+
rpc UpdateSessionMetadata(UpdateSessionMetadataRequest) returns (CommandResult);
|
|
325
340
|
// Daemon path context (issue #68): home/base/work_dir plus the current
|
|
326
341
|
// skill search directories.
|
|
327
342
|
rpc GetPathContext(Empty) returns (PathContext);
|
package/proto/settings.proto
CHANGED
|
@@ -54,6 +54,12 @@ message DaemonConfig {
|
|
|
54
54
|
// trigger rules, cron jobs) over RPC instead of local storage directly.
|
|
55
55
|
optional string storage_service_addr = 10;
|
|
56
56
|
|
|
57
|
+
// ── thinking level (persisted last-choice default) ──
|
|
58
|
+
// Full thinking level string ("off" | "minimal" | "low" | "medium" |
|
|
59
|
+
// "high" | "xhigh"). Finer-grained than the `thinking` toggle; the toggle
|
|
60
|
+
// stays for legacy compatibility.
|
|
61
|
+
optional string thinking_level = 12;
|
|
62
|
+
|
|
57
63
|
// Field names to clear before applying values present in this message.
|
|
58
64
|
// Unknown names make the daemon reject the patch without partial changes.
|
|
59
65
|
repeated string clear_fields = 11;
|
package/proto/state.proto
CHANGED
|
@@ -114,6 +114,7 @@ service StorageService {
|
|
|
114
114
|
rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse);
|
|
115
115
|
rpc RenameSession(RenameSessionRequest) returns (CommandResult);
|
|
116
116
|
rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse);
|
|
117
|
+
rpc UpdateSessionMetadata(UpdateSessionMetadataRequest) returns (CommandResult);
|
|
117
118
|
|
|
118
119
|
// DAG run persistence.
|
|
119
120
|
rpc SaveDagRun(SaveDagRunRequest) returns (SaveDagRunResponse);
|