@theway-ai/sdk 1.3.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.
@@ -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 {
@@ -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/switch/rename/delete), and the SessionService RPC surface.
3
+ // (list/create/rename/delete), and the SessionService RPC surface.
4
4
 
5
5
  syntax = "proto3";
6
6
  package theway.grpc.v1;
@@ -45,6 +45,9 @@ message SessionState {
45
45
  // Session-cumulative token usage: total input, cached input, non-cached
46
46
  // input, output, and cache write totals for the current session.
47
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;
48
51
  }
49
52
 
50
53
  message FeedBlockPatch {
@@ -234,6 +237,16 @@ message SessionSummary {
234
237
  uint32 active_graph_count = 8;
235
238
  bool busy = 9;
236
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;
237
250
  }
238
251
 
239
252
  message ListSessionsResponse {
@@ -243,16 +256,14 @@ message ListSessionsResponse {
243
256
 
244
257
  message CreateSessionRequest {
245
258
  optional string name = 1;
259
+ optional string session_id = 2;
260
+ map<string, string> metadata = 3;
246
261
  }
247
262
 
248
263
  message CreateSessionResponse {
249
264
  SessionSummary session = 1;
250
265
  }
251
266
 
252
- message SwitchSessionRequest {
253
- string session_id = 1;
254
- }
255
-
256
267
  message RenameSessionRequest {
257
268
  string session_id = 1;
258
269
  string name = 2;
@@ -316,15 +327,16 @@ message ClearCredentialRequest {
316
327
 
317
328
  service SessionService {
318
329
  // Full structured state (binary protobuf).
319
- rpc GetState(Empty) returns (SessionState);
320
- // Session resources: list (with current marker) / create / switch / rename /
330
+ rpc GetState(SessionStateRequest) returns (SessionState);
331
+ // Session resources: list (with current marker) / create / rename /
321
332
  // delete. DeleteSession reports the offending run ids when refused because
322
333
  // the session still has running graphs.
323
334
  rpc ListSessions(Empty) returns (ListSessionsResponse);
324
335
  rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse);
325
- rpc SwitchSession(SwitchSessionRequest) returns (CommandResult);
326
336
  rpc RenameSession(RenameSessionRequest) returns (CommandResult);
327
337
  rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse);
338
+ // Update arbitrary session metadata KV (opaque to thewayd).
339
+ rpc UpdateSessionMetadata(UpdateSessionMetadataRequest) returns (CommandResult);
328
340
  // Daemon path context (issue #68): home/base/work_dir plus the current
329
341
  // skill search directories.
330
342
  rpc GetPathContext(Empty) returns (PathContext);
@@ -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);