@theway-ai/sdk 1.1.0 → 1.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theway-ai/sdk",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "TypeScript SDK for the theway gRPC daemon (five theway.grpc.v1 domain services + grpc.health.v1). Typed client for all RPCs, generated from the domain proto files via ts-proto.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,6 +16,7 @@ message StreamFrame {
16
16
  }
17
17
 
18
18
  message StreamEvent {
19
+ string session_id = 7;
19
20
  oneof kind {
20
21
  SubagentStarted subagent_started = 1;
21
22
  SubagentOutput subagent_output = 2;
@@ -42,6 +42,9 @@ 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;
45
48
  }
46
49
 
47
50
  message FeedBlockPatch {
@@ -278,6 +281,39 @@ message SetSkillDirsRequest {
278
281
  repeated string dirs = 1;
279
282
  }
280
283
 
284
+ // Session activation (issue #26): explicit client key and optional runtime.
285
+ // Runtime is a singular message so its presence remains observable.
286
+ message SessionRuntimeContext {
287
+ string work_dir = 1;
288
+ optional string provider = 2;
289
+ optional string model = 3;
290
+ optional string base_url = 4;
291
+ optional bool thinking = 5;
292
+ }
293
+
294
+ message ActivateSessionRequest {
295
+ optional string session_id = 1;
296
+ string client_key = 2;
297
+ optional string name = 3;
298
+ SessionRuntimeContext runtime = 4;
299
+ }
300
+
301
+ message ActivateSessionResponse {
302
+ SessionSummary session = 1;
303
+ bool created = 2;
304
+ }
305
+
306
+ message SetCredentialRequest {
307
+ string session_id = 1;
308
+ string provider = 2;
309
+ bytes secret = 3;
310
+ }
311
+
312
+ message ClearCredentialRequest {
313
+ string session_id = 1;
314
+ optional string provider = 2;
315
+ }
316
+
281
317
  service SessionService {
282
318
  // Full structured state (binary protobuf).
283
319
  rpc GetState(Empty) returns (SessionState);
@@ -296,4 +332,9 @@ service SessionService {
296
332
  // into the event loop, which applies it authoritatively (hot-reload).
297
333
  // `accepted` = the command was queued.
298
334
  rpc SetSkillDirs(SetSkillDirsRequest) returns (CommandResult);
335
+ // Session activation and credentials (issue #26): activate/resume a session
336
+ // and manage provider credentials without echoing secrets.
337
+ rpc ActivateSession(ActivateSessionRequest) returns (ActivateSessionResponse);
338
+ rpc SetCredential(SetCredentialRequest) returns (CommandResult);
339
+ rpc ClearCredential(ClearCredentialRequest) returns (CommandResult);
299
340
  }