@qilin-agent/sdk-client 3.1.5 → 3.1.7

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/lib/index.js CHANGED
@@ -441,6 +441,16 @@ var HarnessClient = class {
441
441
  return result.messageId;
442
442
  }
443
443
  /**
444
+ * Restore persisted history without sending a prompt; failures propagate without creating a session.
445
+ * @param sessionId - persisted identity in this runtime's configured persistence store.
446
+ * @returns the restored session identity.
447
+ */
448
+ async resumeSession(sessionId) {
449
+ const result = await this.request("session/resume", { sessionId });
450
+ if (!isRecord(result) || result.sessionId !== sessionId) throw new SdkProtocolError(`session/resume returned an unexpected session id: ${JSON.stringify(result)}`);
451
+ return sessionId;
452
+ }
453
+ /**
444
454
  * Read a Session's effective working directory, recovering it if missing.
445
455
  * @param sessionId - target Session; an unknown id creates it.
446
456
  * @returns the absolute effective directory.
@@ -715,6 +725,17 @@ var DeepSeekHarness = class {
715
725
  return new HarnessSession(this, sessionId ?? `session-${randomUUID().replaceAll("-", "")}`);
716
726
  }
717
727
  /**
728
+ * Start the runtime and restore a persisted session without sending input.
729
+ * The configured Harness home must contain its history; missing or occupied sessions reject.
730
+ * @param sessionId - exact persisted identity to continue.
731
+ * @returns a handle ready to run new prompts on the restored history.
732
+ */
733
+ async resumeSession(sessionId) {
734
+ await this.start();
735
+ const restoredId = await this.client.resumeSession(sessionId);
736
+ return new HarnessSession(this, restoredId);
737
+ }
738
+ /**
718
739
  * Run one prompt on a fresh (or named) session.
719
740
  * @param input - prompt text, or content blocks sent verbatim.
720
741
  * @param options - optional session id and per-notification observer.
@@ -53,6 +53,13 @@ export declare class DeepSeekHarness implements AsyncDisposable {
53
53
  * @returns the session handle.
54
54
  */
55
55
  session(sessionId?: string): HarnessSession;
56
+ /**
57
+ * Start the runtime and restore a persisted session without sending input.
58
+ * The configured Harness home must contain its history; missing or occupied sessions reject.
59
+ * @param sessionId - exact persisted identity to continue.
60
+ * @returns a handle ready to run new prompts on the restored history.
61
+ */
62
+ resumeSession(sessionId: string): Promise<HarnessSession>;
56
63
  /**
57
64
  * Run one prompt on a fresh (or named) session.
58
65
  * @param input - prompt text, or content blocks sent verbatim.
@@ -96,6 +96,12 @@ export declare class HarnessClient {
96
96
  * @returns the queued message id.
97
97
  */
98
98
  prompt(sessionId: string, contentBlocks: SdkPromptContentBlock[]): Promise<string>;
99
+ /**
100
+ * Restore persisted history without sending a prompt; failures propagate without creating a session.
101
+ * @param sessionId - persisted identity in this runtime's configured persistence store.
102
+ * @returns the restored session identity.
103
+ */
104
+ resumeSession(sessionId: string): Promise<string>;
99
105
  /**
100
106
  * Read a Session's effective working directory, recovering it if missing.
101
107
  * @param sessionId - target Session; an unknown id creates it.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qilin-agent/sdk-client",
3
3
  "description": "TypeScript client SDK for driving a QiLin runtime subprocess over stdio JSON-RPC: the DeepSeekHarness high-level turns API and the lower-level HarnessClient",
4
- "version": "3.1.5",
4
+ "version": "3.1.7",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -29,18 +29,18 @@
29
29
  ],
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@qilin-agent/cli": "3.1.5"
32
+ "@qilin-agent/cli": "3.1.7"
33
33
  },
34
34
  "peerDependencies": {
35
- "@qilin-agent/llm": "3.1.5",
36
- "@qilin-agent/sdk-protocol": "3.1.5",
37
- "@qilin-agent/kylin": "~4.0.3",
38
- "@qilin-agent/session": "3.1.5"
35
+ "@qilin-agent/llm": "3.1.7",
36
+ "@qilin-agent/session": "3.1.7",
37
+ "@qilin-agent/kylin": "~4.0.5",
38
+ "@qilin-agent/sdk-protocol": "3.1.7"
39
39
  },
40
40
  "devDependencies": {
41
- "@qilin-agent/llm": "3.1.5",
42
- "@qilin-agent/sdk-protocol": "3.1.5",
43
- "@qilin-agent/session": "3.1.5",
44
- "@qilin-agent/kylin": "~4.0.3"
41
+ "@qilin-agent/kylin": "~4.0.5",
42
+ "@qilin-agent/session": "3.1.7",
43
+ "@qilin-agent/sdk-protocol": "3.1.7",
44
+ "@qilin-agent/llm": "3.1.7"
45
45
  }
46
46
  }