@opencode-ai/sdk 0.1.0-alpha.17 → 0.1.0-alpha.18
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/CHANGELOG.md +8 -0
- package/README.md +18 -0
- package/package.json +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.18 (2025-07-15)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([25a23e5](https://github.com/sst/opencode-sdk-js/commit/25a23e599f1180754910961df65f0cc044aa2935))
|
|
10
|
+
|
|
3
11
|
## 0.1.0-alpha.17 (2025-07-15)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.16...v0.1.0-alpha.17)
|
package/README.md
CHANGED
|
@@ -27,6 +27,24 @@ const client = new Opencode();
|
|
|
27
27
|
const sessions = await client.session.list();
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Streaming responses
|
|
31
|
+
|
|
32
|
+
We provide support for streaming responses using Server Sent Events (SSE).
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import Opencode from '@opencode-ai/sdk';
|
|
36
|
+
|
|
37
|
+
const client = new Opencode();
|
|
38
|
+
|
|
39
|
+
const stream = await client.event.list();
|
|
40
|
+
for await (const eventListResponse of stream) {
|
|
41
|
+
console.log(eventListResponse);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If you need to cancel a stream, you can `break` from the loop
|
|
46
|
+
or call `stream.controller.abort()`.
|
|
47
|
+
|
|
30
48
|
### Request & Response types
|
|
31
49
|
|
|
32
50
|
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
|
package/package.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.18'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.18";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.18";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '0.1.0-alpha.
|
|
4
|
+
exports.VERSION = '0.1.0-alpha.18'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.18'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|