diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index d3a4b9e..86d566e 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -19,3 +19,4 @@ jobs:
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.OPENCODE_NPM_TOKEN || secrets.NPM_TOKEN }}
+
diff --git a/.gitignore b/.gitignore
index d98d51a..2412bb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,5 @@ dist
dist-deno
/*.tgz
.idea/
+.eslintcache
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index e003ff7..adddf7b 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-alpha.21"
+ ".": "0.1.0-alpha.22"
}
diff --git a/.stats.yml b/.stats.yml
index 55ffae9..79ec5d8 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 26
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-be4c3fb58765ee2b56c3b548182b9d0f1a9d5ebb7c340083bc578bcf3876b026.yml
-openapi_spec_hash: dd5d801d838fd6b522b1dd892a75fce1
-config_hash: 1ae82c93499b9f0b9ba828b8919f9cb3
+configured_endpoints: 43
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-97b61518d8666ea7cb310af04248e00bcf8dc9753ba3c7e84471df72b3232004.yml
+openapi_spec_hash: a3500531973ad999c350b87c21aa3ab8
+config_hash: 026ef000d34bf2f930e7b41e77d2d3ff
diff --git a/CHANGELOG.md b/CHANGELOG.md
index efe7eac..1fea3de 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,223 +1,36 @@
# Changelog
-## 0.1.0-alpha.21 (2025-07-28)
+## 0.1.0-alpha.22 (2026-01-01)
-Full Changelog: [v0.1.0-alpha.20...v0.1.0-alpha.21](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.20...v0.1.0-alpha.21)
+Full Changelog: [v0.1.0-alpha.21...v0.1.0-alpha.22](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.21...v0.1.0-alpha.22)
### Features
-* **api:** api update ([df7ea7d](https://github.com/sst/opencode-sdk-js/commit/df7ea7dc58fb08a8599fa40631032a626aa3ad0b))
-* **api:** api update ([f9b52a1](https://github.com/sst/opencode-sdk-js/commit/f9b52a139591e743ad686c359fdfb003f0e49ccc))
-* **api:** api update ([8d150d2](https://github.com/sst/opencode-sdk-js/commit/8d150d245a57667cafd5cc0f6a15a5c7a9c5ce71))
-* **api:** api update ([1104b32](https://github.com/sst/opencode-sdk-js/commit/1104b32191c80996b21fdac0a726e25e8650cdb6))
-* **api:** api update ([3da7c3e](https://github.com/sst/opencode-sdk-js/commit/3da7c3e68e96ed093128c18be19d8f7e7769c3fa))
-* **api:** api update ([8980631](https://github.com/sst/opencode-sdk-js/commit/898063187f13d77abc6337e6094ab24766d9bb30))
-* **api:** api update ([efe5d7f](https://github.com/sst/opencode-sdk-js/commit/efe5d7fe580e75efe6ab08fde869c2a13d4e9200))
-* **api:** api update ([fb92736](https://github.com/sst/opencode-sdk-js/commit/fb92736bdf4b0212c3c3be3b3dcb3a2036bc0d68))
-* **api:** api update ([c428ecf](https://github.com/sst/opencode-sdk-js/commit/c428ecf250ff9dc72f855bfe5b40dbe004fefbba))
-* **api:** api update ([c59a5a3](https://github.com/sst/opencode-sdk-js/commit/c59a5a33aa3969fb2724edd975527348001f1db9))
-* **api:** api update ([c776a45](https://github.com/sst/opencode-sdk-js/commit/c776a457f5d120830bad54951edbddda1867a6e4))
-* **api:** api update ([1c7312c](https://github.com/sst/opencode-sdk-js/commit/1c7312c6e50fce79f113cc34370828f9ca502a3a))
-* **api:** api update ([046bc67](https://github.com/sst/opencode-sdk-js/commit/046bc67789d10a12d3acdc9a8cc6eef84390ae0b))
-* **api:** api update ([a1fad7a](https://github.com/sst/opencode-sdk-js/commit/a1fad7a6eb72cbdee9ea828ac1ace12673d89c78))
-* **api:** api update ([5a8c2e7](https://github.com/sst/opencode-sdk-js/commit/5a8c2e7de8542093ce465ab4012ebafe409361f6))
+* **api:** manual updates ([7149e6a](https://github.com/sst/opencode-sdk-js/commit/7149e6a0575bc4e5b90489f31f509af7b226e2ec))
-### Chores
-
-* **ts:** reorder package.json imports ([6d9aed6](https://github.com/sst/opencode-sdk-js/commit/6d9aed6827bb415550ae17edec138a98760f1f0e))
-
-## 0.1.0-alpha.20 (2025-07-16)
-
-Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.19...v0.1.0-alpha.20)
-
-### Features
-
-* **api:** api update ([d296473](https://github.com/sst/opencode-sdk-js/commit/d296473db58378932b85d1afaa60942ac5599c49))
-* **api:** api update ([af2b587](https://github.com/sst/opencode-sdk-js/commit/af2b5875534a4782fac186542ecb9b04393c9b0a))
-
-## 0.1.0-alpha.19 (2025-07-16)
-
-Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)
-
-### Features
-
-* **api:** api update ([2e505ef](https://github.com/sst/opencode-sdk-js/commit/2e505ef451fdcf49358189c5f76bdc42fb821352))
-
-## 0.1.0-alpha.18 (2025-07-15)
-
-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)
-
-### Features
-
-* **api:** api update ([25a23e5](https://github.com/sst/opencode-sdk-js/commit/25a23e599f1180754910961df65f0cc044aa2935))
-
-## 0.1.0-alpha.17 (2025-07-15)
-
-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)
-
-### Features
-
-* **api:** api update ([8b5d592](https://github.com/sst/opencode-sdk-js/commit/8b5d59243a0212f98269412f4483e729e2367a77))
-* **api:** api update ([ebd8986](https://github.com/sst/opencode-sdk-js/commit/ebd89862c48be2742eda727c83c01430413e00c0))
-
-## 0.1.0-alpha.16 (2025-07-15)
-
-Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)
-
-### Features
-
-* **api:** api update ([f26379d](https://github.com/sst/opencode-sdk-js/commit/f26379d83ae7094d6ba91c6705a97a3fbd88a55a))
-
-
-### Chores
-
-* make some internal functions async ([36b1db9](https://github.com/sst/opencode-sdk-js/commit/36b1db9ca9d47d9199e2eab5f0b454b7cd31f58f))
-
-## 0.1.0-alpha.15 (2025-07-05)
-
-Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.14...v0.1.0-alpha.15)
-
-### Features
-
-* **api:** manual updates ([f6ee467](https://github.com/sst/opencode-sdk-js/commit/f6ee46752d0c174c8b934894cf2b140864864208))
-
-
-### Chores
-
-* **internal:** codegen related update ([47a1a97](https://github.com/sst/opencode-sdk-js/commit/47a1a972e755735d6b5472c61f726ab2face9e62))
-
-## 0.1.0-alpha.14 (2025-07-03)
-
-Full Changelog: [v0.1.0-alpha.13...v0.1.0-alpha.14](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.13...v0.1.0-alpha.14)
-
-### Features
-
-* **api:** api update ([a1d7cf9](https://github.com/sst/opencode-sdk-js/commit/a1d7cf948a2ff47ce4e98b4a52d0e4d213b87bf6))
-
-
-### Chores
-
-* **internal:** version bump ([f8ad145](https://github.com/sst/opencode-sdk-js/commit/f8ad145b9af0c4a465642630043e59236d5f4e8d))
-
-## 0.1.0-alpha.13 (2025-07-03)
-
-Full Changelog: [v0.1.0-alpha.12...v0.1.0-alpha.13](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.12...v0.1.0-alpha.13)
-
### Bug Fixes
-* avoid console usage ([f96ac97](https://github.com/sst/opencode-sdk-js/commit/f96ac97fbaf7417efda306d8727654d1a4138386))
+* coerce nullable values to undefined ([5ca85f3](https://github.com/sst/opencode-sdk-js/commit/5ca85f395e722bff524cc1b20d9107a0febf5374))
-### Chores
-
-* add docs to RequestOptions type ([1ca6677](https://github.com/sst/opencode-sdk-js/commit/1ca667765c22b706732c61ea3d9d2823aeda0a8e))
-
-## 0.1.0-alpha.12 (2025-07-02)
-
-Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
-
-### Features
-
-* **api:** update via SDK Studio ([7739340](https://github.com/sst/opencode-sdk-js/commit/77393403648067fe937637c39e80067c347a8c5b))
-
-## 0.1.0-alpha.11 (2025-06-30)
-
-Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)
-
-### Features
-
-* **api:** update via SDK Studio ([2ce98e5](https://github.com/sst/opencode-sdk-js/commit/2ce98e55bf330cca0c38f60f011ffd9063b34ea0))
-
-## 0.1.0-alpha.10 (2025-06-30)
-
-Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
-
-### Features
-
-* **api:** update via SDK Studio ([fa7c91c](https://github.com/sst/opencode-sdk-js/commit/fa7c91cc2fe52d42be7365ca2c4ce3e48c2e76ac))
-
-
-### Chores
-
-* **ci:** only run for pushes and fork pull requests ([0e850e5](https://github.com/sst/opencode-sdk-js/commit/0e850e51daac413dcf2d5e30c0ea7a1cd5346c4b))
-* **client:** improve path param validation ([bc3ff0e](https://github.com/sst/opencode-sdk-js/commit/bc3ff0ee2de9af8be42deae87d12f003fb5f7aa5))
-
-## 0.1.0-alpha.9 (2025-06-27)
-
-Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
-
-### Features
-
-* **api:** update via SDK Studio ([7009d10](https://github.com/sst/opencode-sdk-js/commit/7009d10aab99be7102371cee49013ab3edae4450))
-* **api:** update via SDK Studio ([e60aa00](https://github.com/sst/opencode-sdk-js/commit/e60aa0024079671e3725ee6f6bfbf8c2dad78da2))
-
-## 0.1.0-alpha.8 (2025-06-27)
-
-Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
-
-### Features
-
-* **api:** update via SDK Studio ([171e3d5](https://github.com/sst/opencode-sdk-js/commit/171e3d5f3ba69ff9ba8547dac90d85b1a0a137c1))
-
-## 0.1.0-alpha.7 (2025-06-27)
-
-Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
-
-### Features
-
-* **api:** update via SDK Studio ([14d2d04](https://github.com/sst/opencode-sdk-js/commit/14d2d04d80c1d5880940c9c70a5c1ea200df2ebc))
-
-## 0.1.0-alpha.6 (2025-06-27)
-
-Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
-
-### Features
-
-* **api:** update via SDK Studio ([45e78b2](https://github.com/sst/opencode-sdk-js/commit/45e78b2f0fca18f537de9986e358aa876fb0b686))
-
-## 0.1.0-alpha.5 (2025-06-27)
-
-Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
-
-### Features
-
-* **api:** update via SDK Studio ([10a5be9](https://github.com/sst/opencode-sdk-js/commit/10a5be9261c4ba8aeece7bb6921752f5fa6d9f28))
-
-## 0.1.0-alpha.4 (2025-06-27)
-
-Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
-
-### Features
-
-* **api:** update via SDK Studio ([20dcd17](https://github.com/sst/opencode-sdk-js/commit/20dcd171405b05801e5a56f1b40fd635259b6a94))
-
-## 0.1.0-alpha.3 (2025-06-27)
-
-Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
-
-### Bug Fixes
-
-* **ci:** release-doctor — report correct token name ([128884f](https://github.com/sst/opencode-sdk-js/commit/128884f4bc64e618177a0b090cd6d52b122a059a))
-
-## 0.1.0-alpha.2 (2025-06-24)
-
-Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/sst/opencode-sdk-js/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
-
-### Features
-
-* **api:** update via SDK Studio ([2320f32](https://github.com/sst/opencode-sdk-js/commit/2320f32190ab58d15d00d7c3328f9fba2421536c))
-
-## 0.1.0-alpha.1 (2025-06-24)
-
-Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/sst/opencode-sdk-js/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
-
-### Features
+### Performance Improvements
-* **api:** update via SDK Studio ([e448306](https://github.com/sst/opencode-sdk-js/commit/e4483068738cbb10233fca5a9d9d44a9c9815c8b))
-* **api:** update via SDK Studio ([b222c96](https://github.com/sst/opencode-sdk-js/commit/b222c96a679a8aeecb60bcf92c247fef90c75b3d))
+* faster formatting ([f9fcfce](https://github.com/sst/opencode-sdk-js/commit/f9fcfceb5ac14993cc754d168eb16d7acf7681ca))
### Chores
-* update SDK settings ([c1481ea](https://github.com/sst/opencode-sdk-js/commit/c1481ea7949c1422bedaeac278600b4ec3f58038))
+* ci build action ([390c5bc](https://github.com/sst/opencode-sdk-js/commit/390c5bc6dd6811c86e1b0f904b849feb97edf94d))
+* do not install brew dependencies in ./scripts/bootstrap by default ([dac8db1](https://github.com/sst/opencode-sdk-js/commit/dac8db1364ff4673f60400b77607939c89b33337))
+* **internal:** codegen related update ([5f6a323](https://github.com/sst/opencode-sdk-js/commit/5f6a32393cb58e7b559cf874bdd52642ca0c1f47))
+* **internal:** codegen related update ([08dc558](https://github.com/sst/opencode-sdk-js/commit/08dc558e739dc6a25a707b238185a7e7caccfe1f))
+* **internal:** codegen related update ([44769be](https://github.com/sst/opencode-sdk-js/commit/44769be3541603d324af5ee82fdae5be6fe9bf6e))
+* **internal:** codegen related update ([e3b3da8](https://github.com/sst/opencode-sdk-js/commit/e3b3da823252632318d73016aa2dbd090adda81d))
+* **internal:** fix incremental formatting in some cases ([80566db](https://github.com/sst/opencode-sdk-js/commit/80566dba1700677b2dcb79907c2652d12257ac23))
+* **internal:** ignore .eslintcache ([c3e7ac0](https://github.com/sst/opencode-sdk-js/commit/c3e7ac0d1fbd994706a760b0b8ac9f6c4f44e8db))
+* **internal:** remove .eslintcache ([a134112](https://github.com/sst/opencode-sdk-js/commit/a134112eb2f38560518ccb3874de983a187abc75))
+* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([c1cac11](https://github.com/sst/opencode-sdk-js/commit/c1cac11fa7ab368111f4bd9a43f3cadff47c6c5d))
+* **internal:** use npm pack for build uploads ([d0502a3](https://github.com/sst/opencode-sdk-js/commit/d0502a3eb00855d9ff819b5a1f24df63e6fcd32b))
+* **jsdoc:** fix [@link](https://github.com/link) annotations to refer only to parts of the package‘s public interface ([71866ed](https://github.com/sst/opencode-sdk-js/commit/71866edd193b7a5dc907f18ad81caeeb6f26004b))
+* sync repo ([63195c8](https://github.com/sst/opencode-sdk-js/commit/63195c8a634ffa05709a3dccb7113a0d4925dead))
diff --git a/LICENSE b/LICENSE
index 821edeb..47e2776 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2025 opencode
+Copyright 2026 opencode
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/api.md b/api.md
index c0526f0..606dba3 100644
--- a/api.md
+++ b/api.md
@@ -14,28 +14,42 @@ Types:
Methods:
-- client.event.list() -> EventListResponse
+- client.event.list({ ...params }) -> EventListResponse
+
+# Path
+
+Types:
+
+- Path
+
+Methods:
+
+- client.path.get({ ...params }) -> Path
# App
Types:
-- App
-- Mode
- Model
- Provider
-- AppInitResponse
- AppLogResponse
-- AppModesResponse
- AppProvidersResponse
Methods:
-- client.app.get() -> App
-- client.app.init() -> AppInitResponse
- client.app.log({ ...params }) -> AppLogResponse
-- client.app.modes() -> AppModesResponse
-- client.app.providers() -> AppProvidersResponse
+- client.app.providers({ ...params }) -> AppProvidersResponse
+
+# Agent
+
+Types:
+
+- Agent
+- AgentListResponse
+
+Methods:
+
+- client.agent.list({ ...params }) -> AgentListResponse
# Find
@@ -57,13 +71,16 @@ Methods:
Types:
- File
+- FileNode
+- FileListResponse
- FileReadResponse
- FileStatusResponse
Methods:
-- client.file.read({ ...params }) -> FileReadResponse
-- client.file.status() -> FileStatusResponse
+- client.file.list({ ...params }) -> FileListResponse
+- client.file.read({ ...params }) -> FileReadResponse
+- client.file.status({ ...params }) -> FileStatusResponse
# Config
@@ -73,67 +90,127 @@ Types:
- KeybindsConfig
- McpLocalConfig
- McpRemoteConfig
-- ModeConfig
Methods:
-- client.config.get() -> Config
+- client.config.get({ ...params }) -> Config
+
+# Command
+
+Types:
+
+- Command
+- CommandListResponse
+
+Methods:
+
+- client.command.list({ ...params }) -> CommandListResponse
+
+# Project
+
+Types:
+
+- Project
+- ProjectListResponse
+
+Methods:
+
+- client.project.list({ ...params }) -> ProjectListResponse
+- client.project.current({ ...params }) -> Project
# Session
Types:
-- AssistantMessage
-- FilePart
-- FilePartInput
-- FilePartSource
-- FilePartSourceText
-- FileSource
-- Message
-- Part
-- Session
-- SnapshotPart
-- StepFinishPart
-- StepStartPart
-- SymbolSource
-- TextPart
-- TextPartInput
-- ToolPart
-- ToolStateCompleted
-- ToolStateError
-- ToolStatePending
-- ToolStateRunning
-- UserMessage
-- SessionListResponse
-- SessionDeleteResponse
-- SessionAbortResponse
-- SessionInitResponse
-- SessionMessagesResponse
-- SessionSummarizeResponse
+- AgentPart
+- AgentPartInput
+- AssistantMessage
+- FilePart
+- FilePartInput
+- FilePartSource
+- FilePartSourceText
+- FileSource
+- Message
+- Part
+- ReasoningPart
+- Session
+- SnapshotPart
+- StepFinishPart
+- StepStartPart
+- SymbolSource
+- TextPart
+- TextPartInput
+- ToolPart
+- ToolStateCompleted
+- ToolStateError
+- ToolStatePending
+- ToolStateRunning
+- UserMessage
+- SessionListResponse
+- SessionDeleteResponse
+- SessionAbortResponse
+- SessionChildrenResponse
+- SessionCommandResponse
+- SessionInitResponse
+- SessionMessageResponse
+- SessionMessagesResponse
+- SessionPromptResponse
+- SessionSummarizeResponse
+
+Methods:
+
+- client.session.create({ ...params }) -> Session
+- client.session.update(id, { ...params }) -> Session
+- client.session.list({ ...params }) -> SessionListResponse
+- client.session.delete(id, { ...params }) -> SessionDeleteResponse
+- client.session.abort(id, { ...params }) -> SessionAbortResponse
+- client.session.children(id, { ...params }) -> SessionChildrenResponse
+- client.session.command(id, { ...params }) -> SessionCommandResponse
+- client.session.get(id, { ...params }) -> Session
+- client.session.init(id, { ...params }) -> SessionInitResponse
+- client.session.message(messageID, { ...params }) -> SessionMessageResponse
+- client.session.messages(id, { ...params }) -> SessionMessagesResponse
+- client.session.prompt(id, { ...params }) -> SessionPromptResponse
+- client.session.revert(id, { ...params }) -> Session
+- client.session.share(id, { ...params }) -> Session
+- client.session.shell(id, { ...params }) -> AssistantMessage
+- client.session.summarize(id, { ...params }) -> SessionSummarizeResponse
+- client.session.unrevert(id, { ...params }) -> Session
+- client.session.unshare(id, { ...params }) -> Session
+
+## Permissions
+
+Types:
+
+- Permission
+- PermissionRespondResponse
Methods:
-- client.session.create() -> Session
-- client.session.list() -> SessionListResponse
-- client.session.delete(id) -> SessionDeleteResponse
-- client.session.abort(id) -> SessionAbortResponse
-- client.session.chat(id, { ...params }) -> AssistantMessage
-- client.session.init(id, { ...params }) -> SessionInitResponse
-- client.session.messages(id) -> SessionMessagesResponse
-- client.session.revert(id, { ...params }) -> Session
-- client.session.share(id) -> Session
-- client.session.summarize(id, { ...params }) -> SessionSummarizeResponse
-- client.session.unrevert(id) -> Session
-- client.session.unshare(id) -> Session
+- client.session.permissions.respond(permissionID, { ...params }) -> PermissionRespondResponse
# Tui
Types:
- TuiAppendPromptResponse
+- TuiClearPromptResponse
+- TuiExecuteCommandResponse
- TuiOpenHelpResponse
+- TuiOpenModelsResponse
+- TuiOpenSessionsResponse
+- TuiOpenThemesResponse
+- TuiShowToastResponse
+- TuiSubmitPromptResponse
Methods:
- client.tui.appendPrompt({ ...params }) -> TuiAppendPromptResponse
-- client.tui.openHelp() -> TuiOpenHelpResponse
+- client.tui.clearPrompt({ ...params }) -> TuiClearPromptResponse
+- client.tui.executeCommand({ ...params }) -> TuiExecuteCommandResponse
+- client.tui.openHelp({ ...params }) -> TuiOpenHelpResponse
+- client.tui.openModels({ ...params }) -> TuiOpenModelsResponse
+- client.tui.openSessions({ ...params }) -> TuiOpenSessionsResponse
+- client.tui.openThemes({ ...params }) -> TuiOpenThemesResponse
+- client.tui.showToast({ ...params }) -> TuiShowToastResponse
+- client.tui.submitPrompt({ ...params }) -> TuiSubmitPromptResponse
diff --git a/bin/publish-npm b/bin/publish-npm
index fa2243d..45e8aa8 100644
--- a/bin/publish-npm
+++ b/bin/publish-npm
@@ -58,4 +58,4 @@ else
fi
# Publish with the appropriate tag
-yarn publish --access public --tag "$TAG"
+yarn publish --tag "$TAG"
diff --git a/package.json b/package.json
index 9be32f9..31b09cd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/sdk",
- "version": "0.1.0-alpha.21",
+ "version": "0.1.0-alpha.22",
"description": "The official TypeScript library for the Opencode API",
"author": "Opencode ",
"types": "dist/index.d.ts",
@@ -13,6 +13,9 @@
"**/*"
],
"private": false,
+ "publishConfig": {
+ "access": "public"
+ },
"scripts": {
"test": "./scripts/test",
"build": "./scripts/build",
@@ -32,7 +35,7 @@
"@types/node": "^20.17.6",
"@typescript-eslint/eslint-plugin": "8.31.1",
"@typescript-eslint/parser": "8.31.1",
- "eslint": "^9.20.1",
+ "eslint": "^9.39.1",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unused-imports": "^4.1.4",
"iconv-lite": "^0.6.3",
@@ -41,15 +44,12 @@
"publint": "^0.2.12",
"ts-jest": "^29.1.0",
"ts-node": "^10.5.0",
- "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz",
+ "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0",
+ "tslib": "^2.8.1",
"typescript": "5.8.3",
"typescript-eslint": "8.31.1"
},
- "imports": {
- "@opencode-ai/sdk": ".",
- "@opencode-ai/sdk/*": "./src/*"
- },
"exports": {
".": {
"import": "./dist/index.mjs",
diff --git a/scripts/bootstrap b/scripts/bootstrap
index 0af58e2..a8b69ff 100755
--- a/scripts/bootstrap
+++ b/scripts/bootstrap
@@ -4,10 +4,18 @@ set -e
cd "$(dirname "$0")/.."
-if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
+if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
- echo "==> Installing Homebrew dependencies…"
- brew bundle
+ echo -n "==> Install Homebrew dependencies? (y/N): "
+ read -r response
+ case "$response" in
+ [yY][eE][sS]|[yY])
+ brew bundle
+ ;;
+ *)
+ ;;
+ esac
+ echo
}
fi
@@ -15,4 +23,4 @@ echo "==> Installing Node dependencies…"
PACKAGE_MANAGER=$(command -v yarn >/dev/null 2>&1 && echo "yarn" || echo "npm")
-$PACKAGE_MANAGER install
+$PACKAGE_MANAGER install "$@"
diff --git a/scripts/fast-format b/scripts/fast-format
new file mode 100755
index 0000000..53721ac
--- /dev/null
+++ b/scripts/fast-format
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+echo "Script started with $# arguments"
+echo "Arguments: $*"
+echo "Script location: $(dirname "$0")"
+
+cd "$(dirname "$0")/.."
+echo "Changed to directory: $(pwd)"
+
+if [ $# -eq 0 ]; then
+ echo "Usage: $0 [additional-formatter-args...]"
+ echo "The file should contain one file path per line"
+ exit 1
+fi
+
+FILE_LIST="$1"
+
+echo "Looking for file: $FILE_LIST"
+
+if [ ! -f "$FILE_LIST" ]; then
+ echo "Error: File '$FILE_LIST' not found"
+ exit 1
+fi
+
+echo "==> Running eslint --fix"
+ESLINT_FILES="$(grep '\.ts$' "$FILE_LIST" || true)"
+if ! [ -z "$ESLINT_FILES" ]; then
+ echo "$ESLINT_FILES" | xargs ./node_modules/.bin/eslint --cache --fix
+fi
+
+echo "==> Running prettier --write"
+# format things eslint didn't
+PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)"
+if ! [ -z "$PRETTIER_FILES" ]; then
+ echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \
+ --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \
+ '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs'
+fi
diff --git a/scripts/mock b/scripts/mock
index d2814ae..0b28f6e 100755
--- a/scripts/mock
+++ b/scripts/mock
@@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"
# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
- npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log &
+ npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
# Wait for server to come online
echo -n "Waiting for server"
@@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then
echo
else
- npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL"
+ npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
fi
diff --git a/scripts/test b/scripts/test
index 2049e31..7bce051 100755
--- a/scripts/test
+++ b/scripts/test
@@ -43,7 +43,7 @@ elif ! prism_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
- echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}"
+ echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo
exit 1
diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
index ac113aa..683f65d 100755
--- a/scripts/utils/upload-artifact.sh
+++ b/scripts/utils/upload-artifact.sh
@@ -12,9 +12,11 @@ if [[ "$SIGNED_URL" == "null" ]]; then
exit 1
fi
-UPLOAD_RESPONSE=$(tar -cz dist | curl -v -X PUT \
+TARBALL=$(cd dist && npm pack --silent)
+
+UPLOAD_RESPONSE=$(curl -v -X PUT \
-H "Content-Type: application/gzip" \
- --data-binary @- "$SIGNED_URL" 2>&1)
+ --data-binary "@dist/$TARBALL" "$SIGNED_URL" 2>&1)
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
diff --git a/src/client.ts b/src/client.ts
index 9241bd5..e56f786 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -16,28 +16,37 @@ import * as Errors from './core/error';
import * as Uploads from './core/uploads';
import * as API from './resources/index';
import { APIPromise } from './core/api-promise';
+import { Agent, AgentListParams, AgentListResponse, AgentResource } from './resources/agent';
import {
App,
- AppInitResponse,
AppLogParams,
AppLogResponse,
- AppModesResponse,
+ AppProvidersParams,
AppProvidersResponse,
- AppResource,
- Mode,
Model,
Provider,
} from './resources/app';
+import { Command, CommandListParams, CommandListResponse, CommandResource } from './resources/command';
import {
Config,
+ ConfigGetParams,
ConfigResource,
KeybindsConfig,
McpLocalConfig,
McpRemoteConfig,
- ModeConfig,
} from './resources/config';
-import { Event, EventListResponse } from './resources/event';
-import { File, FileReadParams, FileReadResponse, FileResource, FileStatusResponse } from './resources/file';
+import { Event, EventListParams, EventListResponse } from './resources/event';
+import {
+ File,
+ FileListParams,
+ FileListResponse,
+ FileNode,
+ FileReadParams,
+ FileReadResponse,
+ FileResource,
+ FileStatusParams,
+ FileStatusResponse,
+} from './resources/file';
import {
Find,
FindFilesParams,
@@ -48,7 +57,38 @@ import {
FindTextResponse,
Symbol,
} from './resources/find';
+import { Path, PathGetParams, PathResource } from './resources/path';
+import {
+ Project,
+ ProjectCurrentParams,
+ ProjectListParams,
+ ProjectListResponse,
+ ProjectResource,
+} from './resources/project';
+import {
+ Tui,
+ TuiAppendPromptParams,
+ TuiAppendPromptResponse,
+ TuiClearPromptParams,
+ TuiClearPromptResponse,
+ TuiExecuteCommandParams,
+ TuiExecuteCommandResponse,
+ TuiOpenHelpParams,
+ TuiOpenHelpResponse,
+ TuiOpenModelsParams,
+ TuiOpenModelsResponse,
+ TuiOpenSessionsParams,
+ TuiOpenSessionsResponse,
+ TuiOpenThemesParams,
+ TuiOpenThemesResponse,
+ TuiShowToastParams,
+ TuiShowToastResponse,
+ TuiSubmitPromptParams,
+ TuiSubmitPromptResponse,
+} from './resources/tui';
import {
+ AgentPart,
+ AgentPartInput,
AssistantMessage,
FilePart,
FilePartInput,
@@ -57,18 +97,37 @@ import {
FileSource,
Message,
Part,
+ ReasoningPart,
Session,
+ SessionAbortParams,
SessionAbortResponse,
- SessionChatParams,
+ SessionChildrenParams,
+ SessionChildrenResponse,
+ SessionCommandParams,
+ SessionCommandResponse,
+ SessionCreateParams,
+ SessionDeleteParams,
SessionDeleteResponse,
+ SessionGetParams,
SessionInitParams,
SessionInitResponse,
+ SessionListParams,
SessionListResponse,
+ SessionMessageParams,
+ SessionMessageResponse,
+ SessionMessagesParams,
SessionMessagesResponse,
+ SessionPromptParams,
+ SessionPromptResponse,
SessionResource,
SessionRevertParams,
+ SessionShareParams,
+ SessionShellParams,
SessionSummarizeParams,
SessionSummarizeResponse,
+ SessionUnrevertParams,
+ SessionUnshareParams,
+ SessionUpdateParams,
SnapshotPart,
StepFinishPart,
StepStartPart,
@@ -81,8 +140,7 @@ import {
ToolStatePending,
ToolStateRunning,
UserMessage,
-} from './resources/session';
-import { Tui, TuiAppendPromptParams, TuiAppendPromptResponse, TuiOpenHelpResponse } from './resources/tui';
+} from './resources/session/session';
import { type Fetch } from './internal/builtin-types';
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
@@ -173,7 +231,7 @@ export class Opencode {
baseURL: string;
maxRetries: number;
timeout: number;
- logger: Logger | undefined;
+ logger: Logger;
logLevel: LogLevel | undefined;
fetchOptions: MergedRequestInit | undefined;
@@ -408,7 +466,7 @@ export class Opencode {
const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError);
const headersTime = Date.now();
- if (response instanceof Error) {
+ if (response instanceof globalThis.Error) {
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
if (options.signal?.aborted) {
throw new Errors.APIUserAbortError();
@@ -714,7 +772,7 @@ export class Opencode {
// Preserve legacy string encoding behavior for now
headers.values.has('content-type')) ||
// `Blob` is superset of `File`
- body instanceof Blob ||
+ ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) ||
// `FormData` -> `multipart/form-data`
body instanceof FormData ||
// `URLSearchParams` -> `application/x-www-form-urlencoded`
@@ -754,36 +812,56 @@ export class Opencode {
static toFile = Uploads.toFile;
event: API.Event = new API.Event(this);
- app: API.AppResource = new API.AppResource(this);
+ path: API.PathResource = new API.PathResource(this);
+ app: API.App = new API.App(this);
+ agent: API.AgentResource = new API.AgentResource(this);
find: API.Find = new API.Find(this);
file: API.FileResource = new API.FileResource(this);
config: API.ConfigResource = new API.ConfigResource(this);
+ command: API.CommandResource = new API.CommandResource(this);
+ project: API.ProjectResource = new API.ProjectResource(this);
session: API.SessionResource = new API.SessionResource(this);
tui: API.Tui = new API.Tui(this);
}
+
Opencode.Event = Event;
-Opencode.AppResource = AppResource;
+Opencode.PathResource = PathResource;
+Opencode.App = App;
+Opencode.AgentResource = AgentResource;
Opencode.Find = Find;
Opencode.FileResource = FileResource;
Opencode.ConfigResource = ConfigResource;
+Opencode.CommandResource = CommandResource;
+Opencode.ProjectResource = ProjectResource;
Opencode.SessionResource = SessionResource;
Opencode.Tui = Tui;
+
export declare namespace Opencode {
export type RequestOptions = Opts.RequestOptions;
- export { Event as Event, type EventListResponse as EventListResponse };
+ export {
+ Event as Event,
+ type EventListResponse as EventListResponse,
+ type EventListParams as EventListParams,
+ };
+
+ export { PathResource as PathResource, type Path as Path, type PathGetParams as PathGetParams };
export {
- AppResource as AppResource,
- type App as App,
- type Mode as Mode,
+ App as App,
type Model as Model,
type Provider as Provider,
- type AppInitResponse as AppInitResponse,
type AppLogResponse as AppLogResponse,
- type AppModesResponse as AppModesResponse,
type AppProvidersResponse as AppProvidersResponse,
type AppLogParams as AppLogParams,
+ type AppProvidersParams as AppProvidersParams,
+ };
+
+ export {
+ AgentResource as AgentResource,
+ type Agent as Agent,
+ type AgentListResponse as AgentListResponse,
+ type AgentListParams as AgentListParams,
};
export {
@@ -800,9 +878,13 @@ export declare namespace Opencode {
export {
FileResource as FileResource,
type File as File,
+ type FileNode as FileNode,
+ type FileListResponse as FileListResponse,
type FileReadResponse as FileReadResponse,
type FileStatusResponse as FileStatusResponse,
+ type FileListParams as FileListParams,
type FileReadParams as FileReadParams,
+ type FileStatusParams as FileStatusParams,
};
export {
@@ -811,11 +893,28 @@ export declare namespace Opencode {
type KeybindsConfig as KeybindsConfig,
type McpLocalConfig as McpLocalConfig,
type McpRemoteConfig as McpRemoteConfig,
- type ModeConfig as ModeConfig,
+ type ConfigGetParams as ConfigGetParams,
+ };
+
+ export {
+ CommandResource as CommandResource,
+ type Command as Command,
+ type CommandListResponse as CommandListResponse,
+ type CommandListParams as CommandListParams,
+ };
+
+ export {
+ ProjectResource as ProjectResource,
+ type Project as Project,
+ type ProjectListResponse as ProjectListResponse,
+ type ProjectListParams as ProjectListParams,
+ type ProjectCurrentParams as ProjectCurrentParams,
};
export {
SessionResource as SessionResource,
+ type AgentPart as AgentPart,
+ type AgentPartInput as AgentPartInput,
type AssistantMessage as AssistantMessage,
type FilePart as FilePart,
type FilePartInput as FilePartInput,
@@ -824,6 +923,7 @@ export declare namespace Opencode {
type FileSource as FileSource,
type Message as Message,
type Part as Part,
+ type ReasoningPart as ReasoningPart,
type Session as Session,
type SnapshotPart as SnapshotPart,
type StepFinishPart as StepFinishPart,
@@ -840,20 +940,53 @@ export declare namespace Opencode {
type SessionListResponse as SessionListResponse,
type SessionDeleteResponse as SessionDeleteResponse,
type SessionAbortResponse as SessionAbortResponse,
+ type SessionChildrenResponse as SessionChildrenResponse,
+ type SessionCommandResponse as SessionCommandResponse,
type SessionInitResponse as SessionInitResponse,
+ type SessionMessageResponse as SessionMessageResponse,
type SessionMessagesResponse as SessionMessagesResponse,
+ type SessionPromptResponse as SessionPromptResponse,
type SessionSummarizeResponse as SessionSummarizeResponse,
- type SessionChatParams as SessionChatParams,
+ type SessionCreateParams as SessionCreateParams,
+ type SessionUpdateParams as SessionUpdateParams,
+ type SessionListParams as SessionListParams,
+ type SessionDeleteParams as SessionDeleteParams,
+ type SessionAbortParams as SessionAbortParams,
+ type SessionChildrenParams as SessionChildrenParams,
+ type SessionCommandParams as SessionCommandParams,
+ type SessionGetParams as SessionGetParams,
type SessionInitParams as SessionInitParams,
+ type SessionMessageParams as SessionMessageParams,
+ type SessionMessagesParams as SessionMessagesParams,
+ type SessionPromptParams as SessionPromptParams,
type SessionRevertParams as SessionRevertParams,
+ type SessionShareParams as SessionShareParams,
+ type SessionShellParams as SessionShellParams,
type SessionSummarizeParams as SessionSummarizeParams,
+ type SessionUnrevertParams as SessionUnrevertParams,
+ type SessionUnshareParams as SessionUnshareParams,
};
export {
Tui as Tui,
type TuiAppendPromptResponse as TuiAppendPromptResponse,
+ type TuiClearPromptResponse as TuiClearPromptResponse,
+ type TuiExecuteCommandResponse as TuiExecuteCommandResponse,
type TuiOpenHelpResponse as TuiOpenHelpResponse,
+ type TuiOpenModelsResponse as TuiOpenModelsResponse,
+ type TuiOpenSessionsResponse as TuiOpenSessionsResponse,
+ type TuiOpenThemesResponse as TuiOpenThemesResponse,
+ type TuiShowToastResponse as TuiShowToastResponse,
+ type TuiSubmitPromptResponse as TuiSubmitPromptResponse,
type TuiAppendPromptParams as TuiAppendPromptParams,
+ type TuiClearPromptParams as TuiClearPromptParams,
+ type TuiExecuteCommandParams as TuiExecuteCommandParams,
+ type TuiOpenHelpParams as TuiOpenHelpParams,
+ type TuiOpenModelsParams as TuiOpenModelsParams,
+ type TuiOpenSessionsParams as TuiOpenSessionsParams,
+ type TuiOpenThemesParams as TuiOpenThemesParams,
+ type TuiShowToastParams as TuiShowToastParams,
+ type TuiSubmitPromptParams as TuiSubmitPromptParams,
};
export type MessageAbortedError = API.MessageAbortedError;
diff --git a/src/internal/to-file.ts b/src/internal/to-file.ts
index 245e849..30eada3 100644
--- a/src/internal/to-file.ts
+++ b/src/internal/to-file.ts
@@ -73,7 +73,7 @@ export type ToFileInput =
/**
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
- * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
+ * @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
* @param {Object=} options additional properties
* @param {string=} options.type the MIME type of the content
diff --git a/src/internal/utils/values.ts b/src/internal/utils/values.ts
index b2421fd..4e0f1c2 100644
--- a/src/internal/utils/values.ts
+++ b/src/internal/utils/values.ts
@@ -76,21 +76,21 @@ export const coerceBoolean = (value: unknown): boolean => {
};
export const maybeCoerceInteger = (value: unknown): number | undefined => {
- if (value === undefined) {
+ if (value == null) {
return undefined;
}
return coerceInteger(value);
};
export const maybeCoerceFloat = (value: unknown): number | undefined => {
- if (value === undefined) {
+ if (value == null) {
return undefined;
}
return coerceFloat(value);
};
export const maybeCoerceBoolean = (value: unknown): boolean | undefined => {
- if (value === undefined) {
+ if (value == null) {
return undefined;
}
return coerceBoolean(value);
diff --git a/src/resources/agent.ts b/src/resources/agent.ts
new file mode 100644
index 0000000..9892ef2
--- /dev/null
+++ b/src/resources/agent.ts
@@ -0,0 +1,71 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../core/resource';
+import { APIPromise } from '../core/api-promise';
+import { RequestOptions } from '../internal/request-options';
+
+export class AgentResource extends APIResource {
+ /**
+ * List all agents
+ */
+ list(
+ query: AgentListParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/agent', { query, ...options });
+ }
+}
+
+export interface Agent {
+ builtIn: boolean;
+
+ mode: 'subagent' | 'primary' | 'all';
+
+ name: string;
+
+ options: { [key: string]: unknown };
+
+ permission: Agent.Permission;
+
+ tools: { [key: string]: boolean };
+
+ description?: string;
+
+ model?: Agent.Model;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ topP?: number;
+}
+
+export namespace Agent {
+ export interface Permission {
+ bash: { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+
+ export interface Model {
+ modelID: string;
+
+ providerID: string;
+ }
+}
+
+export type AgentListResponse = Array;
+
+export interface AgentListParams {
+ directory?: string;
+}
+
+export declare namespace AgentResource {
+ export {
+ type Agent as Agent,
+ type AgentListResponse as AgentListResponse,
+ type AgentListParams as AgentListParams,
+ };
+}
diff --git a/src/resources/app.ts b/src/resources/app.ts
index 8ee56e3..c758898 100644
--- a/src/resources/app.ts
+++ b/src/resources/app.ts
@@ -4,88 +4,23 @@ import { APIResource } from '../core/resource';
import { APIPromise } from '../core/api-promise';
import { RequestOptions } from '../internal/request-options';
-export class AppResource extends APIResource {
- /**
- * Get app info
- */
- get(options?: RequestOptions): APIPromise {
- return this._client.get('/app', options);
- }
-
- /**
- * Initialize the app
- */
- init(options?: RequestOptions): APIPromise {
- return this._client.post('/app/init', options);
- }
-
+export class App extends APIResource {
/**
* Write a log entry to the server logs
*/
- log(body: AppLogParams, options?: RequestOptions): APIPromise {
- return this._client.post('/log', { body, ...options });
- }
-
- /**
- * List all modes
- */
- modes(options?: RequestOptions): APIPromise {
- return this._client.get('/mode', options);
+ log(params: AppLogParams, options?: RequestOptions): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post('/log', { query: { directory }, body, ...options });
}
/**
* List all providers
*/
- providers(options?: RequestOptions): APIPromise {
- return this._client.get('/config/providers', options);
- }
-}
-
-export interface App {
- git: boolean;
-
- hostname: string;
-
- path: App.Path;
-
- time: App.Time;
-}
-
-export namespace App {
- export interface Path {
- config: string;
-
- cwd: string;
-
- data: string;
-
- root: string;
-
- state: string;
- }
-
- export interface Time {
- initialized?: number;
- }
-}
-
-export interface Mode {
- name: string;
-
- tools: { [key: string]: boolean };
-
- model?: Mode.Model;
-
- prompt?: string;
-
- temperature?: number;
-}
-
-export namespace Mode {
- export interface Model {
- modelID: string;
-
- providerID: string;
+ providers(
+ query: AppProvidersParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/config/providers', { query, ...options });
}
}
@@ -143,12 +78,8 @@ export interface Provider {
npm?: string;
}
-export type AppInitResponse = boolean;
-
export type AppLogResponse = boolean;
-export type AppModesResponse = Array;
-
export interface AppProvidersResponse {
default: { [key: string]: string };
@@ -157,36 +88,42 @@ export interface AppProvidersResponse {
export interface AppLogParams {
/**
- * Log level
+ * Body param: Log level
*/
level: 'debug' | 'info' | 'error' | 'warn';
/**
- * Log message
+ * Body param: Log message
*/
message: string;
/**
- * Service name for the log entry
+ * Body param: Service name for the log entry
*/
service: string;
/**
- * Additional metadata for the log entry
+ * Query param:
+ */
+ directory?: string;
+
+ /**
+ * Body param: Additional metadata for the log entry
*/
extra?: { [key: string]: unknown };
}
-export declare namespace AppResource {
+export interface AppProvidersParams {
+ directory?: string;
+}
+
+export declare namespace App {
export {
- type App as App,
- type Mode as Mode,
type Model as Model,
type Provider as Provider,
- type AppInitResponse as AppInitResponse,
type AppLogResponse as AppLogResponse,
- type AppModesResponse as AppModesResponse,
type AppProvidersResponse as AppProvidersResponse,
type AppLogParams as AppLogParams,
+ type AppProvidersParams as AppProvidersParams,
};
}
diff --git a/src/resources/command.ts b/src/resources/command.ts
new file mode 100644
index 0000000..ba81a8b
--- /dev/null
+++ b/src/resources/command.ts
@@ -0,0 +1,43 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../core/resource';
+import { APIPromise } from '../core/api-promise';
+import { RequestOptions } from '../internal/request-options';
+
+export class CommandResource extends APIResource {
+ /**
+ * List all commands
+ */
+ list(
+ query: CommandListParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/command', { query, ...options });
+ }
+}
+
+export interface Command {
+ name: string;
+
+ template: string;
+
+ agent?: string;
+
+ description?: string;
+
+ model?: string;
+}
+
+export type CommandListResponse = Array;
+
+export interface CommandListParams {
+ directory?: string;
+}
+
+export declare namespace CommandResource {
+ export {
+ type Command as Command,
+ type CommandListResponse as CommandListResponse,
+ type CommandListParams as CommandListParams,
+ };
+}
diff --git a/src/resources/config.ts b/src/resources/config.ts
index 11592f4..5240b4a 100644
--- a/src/resources/config.ts
+++ b/src/resources/config.ts
@@ -1,7 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
-import * as ConfigAPI from './config';
import { APIPromise } from '../core/api-promise';
import { RequestOptions } from '../internal/request-options';
@@ -9,8 +8,8 @@ export class ConfigResource extends APIResource {
/**
* Get config info
*/
- get(options?: RequestOptions): APIPromise {
- return this._client.get('/config', options);
+ get(query: ConfigGetParams | null | undefined = {}, options?: RequestOptions): APIPromise {
+ return this._client.get('/config', { query, ...options });
}
}
@@ -21,7 +20,7 @@ export interface Config {
$schema?: string;
/**
- * Modes configuration, see https://opencode.ai/docs/modes
+ * Agent configuration, see https://opencode.ai/docs/agent
*/
agent?: Config.Agent;
@@ -36,6 +35,11 @@ export interface Config {
*/
autoupdate?: boolean;
+ /**
+ * Command configuration, see https://opencode.ai/docs/commands
+ */
+ command?: { [key: string]: Config.Command };
+
/**
* Disable providers that are loaded automatically
*/
@@ -43,6 +47,8 @@ export interface Config {
experimental?: Config.Experimental;
+ formatter?: { [key: string]: Config.Formatter };
+
/**
* Additional instruction files or patterns to include
*/
@@ -58,13 +64,15 @@ export interface Config {
*/
layout?: 'auto' | 'stretch';
+ lsp?: { [key: string]: Config.Disabled | Config.UnionMember1 };
+
/**
* MCP (Model Context Protocol) server configurations
*/
mcp?: { [key: string]: McpLocalConfig | McpRemoteConfig };
/**
- * Modes configuration, see https://opencode.ai/docs/modes
+ * @deprecated Use `agent` field instead.
*/
mode?: Config.Mode;
@@ -73,6 +81,10 @@ export interface Config {
*/
model?: string;
+ permission?: Config.Permission;
+
+ plugin?: Array;
+
/**
* Custom provider configurations and model overrides
*/
@@ -85,16 +97,25 @@ export interface Config {
share?: 'manual' | 'auto' | 'disabled';
/**
- * Small model to use for tasks like summarization and title generation in the
- * format of provider/model
+ * Small model to use for tasks like title generation in the format of
+ * provider/model
*/
small_model?: string;
+ snapshot?: boolean;
+
/**
* Theme name to use for the interface
*/
theme?: string;
+ tools?: { [key: string]: boolean };
+
+ /**
+ * TUI specific settings
+ */
+ tui?: Config.Tui;
+
/**
* Custom username to display in conversations instead of system username
*/
@@ -103,30 +124,238 @@ export interface Config {
export namespace Config {
/**
- * Modes configuration, see https://opencode.ai/docs/modes
+ * Agent configuration, see https://opencode.ai/docs/agent
*/
export interface Agent {
+ build?: Agent.Build;
+
general?: Agent.General;
+ plan?: Agent.Plan;
+
[k: string]: Agent.AgentConfig | undefined;
}
export namespace Agent {
- export interface General extends ConfigAPI.ModeConfig {
- description: string;
+ export interface Build {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: Build.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace Build {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface General {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: General.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace General {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface Plan {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: Plan.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace Plan {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface AgentConfig {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: AgentConfig.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
}
- export interface AgentConfig extends ConfigAPI.ModeConfig {
- description: string;
+ export namespace AgentConfig {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
}
}
- export interface AgentConfig extends ConfigAPI.ModeConfig {
- description: string;
+ export interface AgentConfig {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: AgentConfig.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
}
- export interface AgentConfig extends ConfigAPI.ModeConfig {
- description: string;
+ export namespace AgentConfig {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface AgentConfig {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: AgentConfig.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace AgentConfig {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface Command {
+ template: string;
+
+ agent?: string;
+
+ description?: string;
+
+ model?: string;
}
export interface Experimental {
@@ -155,26 +384,237 @@ export namespace Config {
}
}
+ export interface Formatter {
+ command?: Array;
+
+ disabled?: boolean;
+
+ environment?: { [key: string]: string };
+
+ extensions?: Array;
+ }
+
+ export interface Disabled {
+ disabled: true;
+ }
+
+ export interface UnionMember1 {
+ command: Array;
+
+ disabled?: boolean;
+
+ env?: { [key: string]: string };
+
+ extensions?: Array;
+
+ initialization?: { [key: string]: unknown };
+ }
+
/**
- * Modes configuration, see https://opencode.ai/docs/modes
+ * @deprecated Use `agent` field instead.
*/
export interface Mode {
- build?: ConfigAPI.ModeConfig;
+ build?: Mode.Build;
- plan?: ConfigAPI.ModeConfig;
+ plan?: Mode.Plan;
- [k: string]: ConfigAPI.ModeConfig | undefined;
+ [k: string]: Mode.AgentConfig | undefined;
}
- export interface Provider {
- models: { [key: string]: Provider.Models };
+ export namespace Mode {
+ export interface Build {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: Build.Permission;
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace Build {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface Plan {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: Plan.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace Plan {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface AgentConfig {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: AgentConfig.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace AgentConfig {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+ }
+
+ export interface AgentConfig {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: AgentConfig.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace AgentConfig {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface AgentConfig {
+ /**
+ * Description of when to use the agent
+ */
+ description?: string;
+
+ disable?: boolean;
+
+ mode?: 'subagent' | 'primary' | 'all';
+
+ model?: string;
+
+ permission?: AgentConfig.Permission;
+
+ prompt?: string;
+
+ temperature?: number;
+
+ tools?: { [key: string]: boolean };
+
+ top_p?: number;
+
+ [k: string]: unknown;
+ }
+
+ export namespace AgentConfig {
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+ }
+
+ export interface Permission {
+ bash?: 'ask' | 'allow' | 'deny' | { [key: string]: 'ask' | 'allow' | 'deny' };
+
+ edit?: 'ask' | 'allow' | 'deny';
+
+ webfetch?: 'ask' | 'allow' | 'deny';
+ }
+
+ export interface Provider {
id?: string;
api?: string;
env?: Array;
+ models?: { [key: string]: Provider.Models };
+
name?: string;
npm?: string;
@@ -228,12 +668,43 @@ export namespace Config {
baseURL?: string;
+ /**
+ * Timeout in milliseconds for requests to this provider. Default is 300000 (5
+ * minutes). Set to false to disable timeout.
+ */
+ timeout?: number | boolean;
+
[k: string]: unknown;
}
}
+
+ /**
+ * TUI specific settings
+ */
+ export interface Tui {
+ /**
+ * TUI scroll speed
+ */
+ scroll_speed: number;
+ }
}
export interface KeybindsConfig {
+ /**
+ * Next agent
+ */
+ agent_cycle: string;
+
+ /**
+ * Previous agent
+ */
+ agent_cycle_reverse: string;
+
+ /**
+ * List agents
+ */
+ agent_list: string;
+
/**
* Exit the application
*/
@@ -250,22 +721,22 @@ export interface KeybindsConfig {
editor_open: string;
/**
- * Close file
+ * @deprecated Close file
*/
file_close: string;
/**
- * Split/unified diff
+ * @deprecated Split/unified diff
*/
file_diff_toggle: string;
/**
- * List files
+ * @deprecated Currently not available. List files
*/
file_list: string;
/**
- * Search file
+ * @deprecated Search file
*/
file_search: string;
@@ -320,12 +791,12 @@ export interface KeybindsConfig {
messages_last: string;
/**
- * Toggle layout
+ * @deprecated Toggle layout
*/
messages_layout_toggle: string;
/**
- * Navigate to next message
+ * @deprecated Navigate to next message
*/
messages_next: string;
@@ -340,7 +811,7 @@ export interface KeybindsConfig {
messages_page_up: string;
/**
- * Navigate to previous message
+ * @deprecated Navigate to previous message
*/
messages_previous: string;
@@ -359,6 +830,16 @@ export interface KeybindsConfig {
*/
messages_undo: string;
+ /**
+ * Next recent model
+ */
+ model_cycle_recent: string;
+
+ /**
+ * Previous recent model
+ */
+ model_cycle_recent_reverse: string;
+
/**
* List available models
*/
@@ -369,6 +850,16 @@ export interface KeybindsConfig {
*/
project_init: string;
+ /**
+ * Cycle to next child session
+ */
+ session_child_cycle: string;
+
+ /**
+ * Cycle to previous child session
+ */
+ session_child_cycle_reverse: string;
+
/**
* Compact the session
*/
@@ -399,18 +890,33 @@ export interface KeybindsConfig {
*/
session_share: string;
+ /**
+ * Show session timeline
+ */
+ session_timeline: string;
+
/**
* Unshare current session
*/
session_unshare: string;
/**
- * Next mode
+ * @deprecated use agent_cycle. Next agent
+ */
+ switch_agent: string;
+
+ /**
+ * @deprecated use agent_cycle_reverse. Previous agent
+ */
+ switch_agent_reverse: string;
+
+ /**
+ * @deprecated use agent_cycle. Next mode
*/
switch_mode: string;
/**
- * Previous Mode
+ * @deprecated use agent_cycle_reverse. Previous mode
*/
switch_mode_reverse: string;
@@ -419,6 +925,11 @@ export interface KeybindsConfig {
*/
theme_list: string;
+ /**
+ * Toggle thinking blocks
+ */
+ thinking_blocks: string;
+
/**
* Toggle tool details
*/
@@ -469,16 +980,8 @@ export interface McpRemoteConfig {
headers?: { [key: string]: string };
}
-export interface ModeConfig {
- disable?: boolean;
-
- model?: string;
-
- prompt?: string;
-
- temperature?: number;
-
- tools?: { [key: string]: boolean };
+export interface ConfigGetParams {
+ directory?: string;
}
export declare namespace ConfigResource {
@@ -487,6 +990,6 @@ export declare namespace ConfigResource {
type KeybindsConfig as KeybindsConfig,
type McpLocalConfig as McpLocalConfig,
type McpRemoteConfig as McpRemoteConfig,
- type ModeConfig as ModeConfig,
+ type ConfigGetParams as ConfigGetParams,
};
}
diff --git a/src/resources/event.ts b/src/resources/event.ts
index 25f63e9..20a4d2f 100644
--- a/src/resources/event.ts
+++ b/src/resources/event.ts
@@ -1,18 +1,28 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
-import * as SessionAPI from './session';
import * as Shared from './shared';
+import * as PermissionsAPI from './session/permissions';
+import * as SessionAPI from './session/session';
import { APIPromise } from '../core/api-promise';
import { Stream } from '../core/streaming';
+import { buildHeaders } from '../internal/headers';
import { RequestOptions } from '../internal/request-options';
export class Event extends APIResource {
/**
* Get events
*/
- list(options?: RequestOptions): APIPromise> {
- return this._client.get('/event', { ...options, stream: true }) as APIPromise>;
+ list(
+ query: EventListParams | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise> {
+ return this._client.get('/event', {
+ query,
+ ...options,
+ headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
+ stream: true,
+ }) as APIPromise>;
}
}
@@ -23,15 +33,14 @@ export type EventListResponse =
| EventListResponse.EventMessageRemoved
| EventListResponse.EventMessagePartUpdated
| EventListResponse.EventMessagePartRemoved
- | EventListResponse.EventStorageWrite
| EventListResponse.EventPermissionUpdated
+ | EventListResponse.EventPermissionReplied
| EventListResponse.EventFileEdited
| EventListResponse.EventSessionUpdated
| EventListResponse.EventSessionDeleted
| EventListResponse.EventSessionIdle
| EventListResponse.EventSessionError
- | EventListResponse.EventFileWatcherUpdated
- | EventListResponse.EventIdeInstalled;
+ | EventListResponse.EventServerConnected;
export namespace EventListResponse {
export interface EventInstallationUpdated {
@@ -109,46 +118,30 @@ export namespace EventListResponse {
messageID: string;
partID: string;
- }
- }
-
- export interface EventStorageWrite {
- properties: EventStorageWrite.Properties;
-
- type: 'storage.write';
- }
-
- export namespace EventStorageWrite {
- export interface Properties {
- key: string;
- content?: unknown;
+ sessionID: string;
}
}
export interface EventPermissionUpdated {
- properties: EventPermissionUpdated.Properties;
+ properties: PermissionsAPI.Permission;
type: 'permission.updated';
}
- export namespace EventPermissionUpdated {
- export interface Properties {
- id: string;
-
- metadata: { [key: string]: unknown };
+ export interface EventPermissionReplied {
+ properties: EventPermissionReplied.Properties;
- sessionID: string;
+ type: 'permission.replied';
+ }
- time: Properties.Time;
+ export namespace EventPermissionReplied {
+ export interface Properties {
+ permissionID: string;
- title: string;
- }
+ response: string;
- export namespace Properties {
- export interface Time {
- created: number;
- }
+ sessionID: string;
}
}
@@ -226,33 +219,17 @@ export namespace EventListResponse {
}
}
- export interface EventFileWatcherUpdated {
- properties: EventFileWatcherUpdated.Properties;
-
- type: 'file.watcher.updated';
- }
-
- export namespace EventFileWatcherUpdated {
- export interface Properties {
- event: 'rename' | 'change';
+ export interface EventServerConnected {
+ properties: unknown;
- file: string;
- }
- }
-
- export interface EventIdeInstalled {
- properties: EventIdeInstalled.Properties;
-
- type: 'ide.installed';
+ type: 'server.connected';
}
+}
- export namespace EventIdeInstalled {
- export interface Properties {
- ide: string;
- }
- }
+export interface EventListParams {
+ directory?: string;
}
export declare namespace Event {
- export { type EventListResponse as EventListResponse };
+ export { type EventListResponse as EventListResponse, type EventListParams as EventListParams };
}
diff --git a/src/resources/file.ts b/src/resources/file.ts
index fd7bdac..1feb735 100644
--- a/src/resources/file.ts
+++ b/src/resources/file.ts
@@ -5,18 +5,28 @@ import { APIPromise } from '../core/api-promise';
import { RequestOptions } from '../internal/request-options';
export class FileResource extends APIResource {
+ /**
+ * List files and directories
+ */
+ list(query: FileListParams, options?: RequestOptions): APIPromise {
+ return this._client.get('/file', { query, ...options });
+ }
+
/**
* Read a file
*/
read(query: FileReadParams, options?: RequestOptions): APIPromise {
- return this._client.get('/file', { query, ...options });
+ return this._client.get('/file/content', { query, ...options });
}
/**
* Get file status
*/
- status(options?: RequestOptions): APIPromise {
- return this._client.get('/file/status', options);
+ status(
+ query: FileStatusParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/file/status', { query, ...options });
}
}
@@ -30,6 +40,18 @@ export interface File {
status: 'added' | 'deleted' | 'modified';
}
+export interface FileNode {
+ ignored: boolean;
+
+ name: string;
+
+ path: string;
+
+ type: 'file' | 'directory';
+}
+
+export type FileListResponse = Array;
+
export interface FileReadResponse {
content: string;
@@ -38,15 +60,31 @@ export interface FileReadResponse {
export type FileStatusResponse = Array;
+export interface FileListParams {
+ path: string;
+
+ directory?: string;
+}
+
export interface FileReadParams {
path: string;
+
+ directory?: string;
+}
+
+export interface FileStatusParams {
+ directory?: string;
}
export declare namespace FileResource {
export {
type File as File,
+ type FileNode as FileNode,
+ type FileListResponse as FileListResponse,
type FileReadResponse as FileReadResponse,
type FileStatusResponse as FileStatusResponse,
+ type FileListParams as FileListParams,
type FileReadParams as FileReadParams,
+ type FileStatusParams as FileStatusParams,
};
}
diff --git a/src/resources/find.ts b/src/resources/find.ts
index d9d6597..b902b2a 100644
--- a/src/resources/find.ts
+++ b/src/resources/find.ts
@@ -111,14 +111,20 @@ export namespace FindTextResponse {
export interface FindFilesParams {
query: string;
+
+ directory?: string;
}
export interface FindSymbolsParams {
query: string;
+
+ directory?: string;
}
export interface FindTextParams {
pattern: string;
+
+ directory?: string;
}
export declare namespace Find {
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 4e7934a..b706b59 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -1,33 +1,36 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export * from './shared';
+export { AgentResource, type Agent, type AgentListResponse, type AgentListParams } from './agent';
export {
- AppResource,
- type App,
- type Mode,
+ App,
type Model,
type Provider,
- type AppInitResponse,
type AppLogResponse,
- type AppModesResponse,
type AppProvidersResponse,
type AppLogParams,
+ type AppProvidersParams,
} from './app';
+export { CommandResource, type Command, type CommandListResponse, type CommandListParams } from './command';
export {
ConfigResource,
type Config,
type KeybindsConfig,
type McpLocalConfig,
type McpRemoteConfig,
- type ModeConfig,
+ type ConfigGetParams,
} from './config';
-export { Event, type EventListResponse } from './event';
+export { Event, type EventListResponse, type EventListParams } from './event';
export {
FileResource,
type File,
+ type FileNode,
+ type FileListResponse,
type FileReadResponse,
type FileStatusResponse,
+ type FileListParams,
type FileReadParams,
+ type FileStatusParams,
} from './file';
export {
Find,
@@ -39,8 +42,18 @@ export {
type FindSymbolsParams,
type FindTextParams,
} from './find';
+export { PathResource, type Path, type PathGetParams } from './path';
+export {
+ ProjectResource,
+ type Project,
+ type ProjectListResponse,
+ type ProjectListParams,
+ type ProjectCurrentParams,
+} from './project';
export {
SessionResource,
+ type AgentPart,
+ type AgentPartInput,
type AssistantMessage,
type FilePart,
type FilePartInput,
@@ -49,6 +62,7 @@ export {
type FileSource,
type Message,
type Part,
+ type ReasoningPart,
type Session,
type SnapshotPart,
type StepFinishPart,
@@ -65,17 +79,50 @@ export {
type SessionListResponse,
type SessionDeleteResponse,
type SessionAbortResponse,
+ type SessionChildrenResponse,
+ type SessionCommandResponse,
type SessionInitResponse,
+ type SessionMessageResponse,
type SessionMessagesResponse,
+ type SessionPromptResponse,
type SessionSummarizeResponse,
- type SessionChatParams,
+ type SessionCreateParams,
+ type SessionUpdateParams,
+ type SessionListParams,
+ type SessionDeleteParams,
+ type SessionAbortParams,
+ type SessionChildrenParams,
+ type SessionCommandParams,
+ type SessionGetParams,
type SessionInitParams,
+ type SessionMessageParams,
+ type SessionMessagesParams,
+ type SessionPromptParams,
type SessionRevertParams,
+ type SessionShareParams,
+ type SessionShellParams,
type SessionSummarizeParams,
-} from './session';
+ type SessionUnrevertParams,
+ type SessionUnshareParams,
+} from './session/session';
export {
Tui,
type TuiAppendPromptResponse,
+ type TuiClearPromptResponse,
+ type TuiExecuteCommandResponse,
type TuiOpenHelpResponse,
+ type TuiOpenModelsResponse,
+ type TuiOpenSessionsResponse,
+ type TuiOpenThemesResponse,
+ type TuiShowToastResponse,
+ type TuiSubmitPromptResponse,
type TuiAppendPromptParams,
+ type TuiClearPromptParams,
+ type TuiExecuteCommandParams,
+ type TuiOpenHelpParams,
+ type TuiOpenModelsParams,
+ type TuiOpenSessionsParams,
+ type TuiOpenThemesParams,
+ type TuiShowToastParams,
+ type TuiSubmitPromptParams,
} from './tui';
diff --git a/src/resources/path.ts b/src/resources/path.ts
new file mode 100644
index 0000000..293a044
--- /dev/null
+++ b/src/resources/path.ts
@@ -0,0 +1,32 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../core/resource';
+import { APIPromise } from '../core/api-promise';
+import { RequestOptions } from '../internal/request-options';
+
+export class PathResource extends APIResource {
+ /**
+ * Get the current path
+ */
+ get(query: PathGetParams | null | undefined = {}, options?: RequestOptions): APIPromise {
+ return this._client.get('/path', { query, ...options });
+ }
+}
+
+export interface Path {
+ config: string;
+
+ directory: string;
+
+ state: string;
+
+ worktree: string;
+}
+
+export interface PathGetParams {
+ directory?: string;
+}
+
+export declare namespace PathResource {
+ export { type Path as Path, type PathGetParams as PathGetParams };
+}
diff --git a/src/resources/project.ts b/src/resources/project.ts
new file mode 100644
index 0000000..7861920
--- /dev/null
+++ b/src/resources/project.ts
@@ -0,0 +1,64 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../core/resource';
+import { APIPromise } from '../core/api-promise';
+import { RequestOptions } from '../internal/request-options';
+
+export class ProjectResource extends APIResource {
+ /**
+ * List all projects
+ */
+ list(
+ query: ProjectListParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/project', { query, ...options });
+ }
+
+ /**
+ * Get the current project
+ */
+ current(
+ query: ProjectCurrentParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/project/current', { query, ...options });
+ }
+}
+
+export interface Project {
+ id: string;
+
+ time: Project.Time;
+
+ worktree: string;
+
+ vcs?: 'git';
+}
+
+export namespace Project {
+ export interface Time {
+ created: number;
+
+ initialized?: number;
+ }
+}
+
+export type ProjectListResponse = Array;
+
+export interface ProjectListParams {
+ directory?: string;
+}
+
+export interface ProjectCurrentParams {
+ directory?: string;
+}
+
+export declare namespace ProjectResource {
+ export {
+ type Project as Project,
+ type ProjectListResponse as ProjectListResponse,
+ type ProjectListParams as ProjectListParams,
+ type ProjectCurrentParams as ProjectCurrentParams,
+ };
+}
diff --git a/src/resources/session.ts b/src/resources/session.ts
index 5dbdc31..5f4f523 100644
--- a/src/resources/session.ts
+++ b/src/resources/session.ts
@@ -1,605 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-import { APIResource } from '../core/resource';
-import * as SessionAPI from './session';
-import * as Shared from './shared';
-import { APIPromise } from '../core/api-promise';
-import { RequestOptions } from '../internal/request-options';
-import { path } from '../internal/utils/path';
-
-export class SessionResource extends APIResource {
- /**
- * Create a new session
- */
- create(options?: RequestOptions): APIPromise {
- return this._client.post('/session', options);
- }
-
- /**
- * List all sessions
- */
- list(options?: RequestOptions): APIPromise {
- return this._client.get('/session', options);
- }
-
- /**
- * Delete a session and all its data
- */
- delete(id: string, options?: RequestOptions): APIPromise {
- return this._client.delete(path`/session/${id}`, options);
- }
-
- /**
- * Abort a session
- */
- abort(id: string, options?: RequestOptions): APIPromise {
- return this._client.post(path`/session/${id}/abort`, options);
- }
-
- /**
- * Create and send a new message to a session
- */
- chat(id: string, body: SessionChatParams, options?: RequestOptions): APIPromise {
- return this._client.post(path`/session/${id}/message`, { body, ...options });
- }
-
- /**
- * Analyze the app and create an AGENTS.md file
- */
- init(id: string, body: SessionInitParams, options?: RequestOptions): APIPromise {
- return this._client.post(path`/session/${id}/init`, { body, ...options });
- }
-
- /**
- * List messages for a session
- */
- messages(id: string, options?: RequestOptions): APIPromise {
- return this._client.get(path`/session/${id}/message`, options);
- }
-
- /**
- * Revert a message
- */
- revert(id: string, body: SessionRevertParams, options?: RequestOptions): APIPromise {
- return this._client.post(path`/session/${id}/revert`, { body, ...options });
- }
-
- /**
- * Share a session
- */
- share(id: string, options?: RequestOptions): APIPromise {
- return this._client.post(path`/session/${id}/share`, options);
- }
-
- /**
- * Summarize the session
- */
- summarize(
- id: string,
- body: SessionSummarizeParams,
- options?: RequestOptions,
- ): APIPromise {
- return this._client.post(path`/session/${id}/summarize`, { body, ...options });
- }
-
- /**
- * Restore all reverted messages
- */
- unrevert(id: string, options?: RequestOptions): APIPromise {
- return this._client.post(path`/session/${id}/unrevert`, options);
- }
-
- /**
- * Unshare the session
- */
- unshare(id: string, options?: RequestOptions): APIPromise {
- return this._client.delete(path`/session/${id}/share`, options);
- }
-}
-
-export interface AssistantMessage {
- id: string;
-
- cost: number;
-
- mode: string;
-
- modelID: string;
-
- path: AssistantMessage.Path;
-
- providerID: string;
-
- role: 'assistant';
-
- sessionID: string;
-
- system: Array;
-
- time: AssistantMessage.Time;
-
- tokens: AssistantMessage.Tokens;
-
- error?:
- | Shared.ProviderAuthError
- | Shared.UnknownError
- | AssistantMessage.MessageOutputLengthError
- | Shared.MessageAbortedError;
-
- summary?: boolean;
-}
-
-export namespace AssistantMessage {
- export interface Path {
- cwd: string;
-
- root: string;
- }
-
- export interface Time {
- created: number;
-
- completed?: number;
- }
-
- export interface Tokens {
- cache: Tokens.Cache;
-
- input: number;
-
- output: number;
-
- reasoning: number;
- }
-
- export namespace Tokens {
- export interface Cache {
- read: number;
-
- write: number;
- }
- }
-
- export interface MessageOutputLengthError {
- data: unknown;
-
- name: 'MessageOutputLengthError';
- }
-}
-
-export interface FilePart {
- id: string;
-
- messageID: string;
-
- mime: string;
-
- sessionID: string;
-
- type: 'file';
-
- url: string;
-
- filename?: string;
-
- source?: FilePartSource;
-}
-
-export interface FilePartInput {
- mime: string;
-
- type: 'file';
-
- url: string;
-
- id?: string;
-
- filename?: string;
-
- source?: FilePartSource;
-}
-
-export type FilePartSource = FileSource | SymbolSource;
-
-export interface FilePartSourceText {
- end: number;
-
- start: number;
-
- value: string;
-}
-
-export interface FileSource {
- path: string;
-
- text: FilePartSourceText;
-
- type: 'file';
-}
-
-export type Message = UserMessage | AssistantMessage;
-
-export type Part =
- | TextPart
- | FilePart
- | ToolPart
- | StepStartPart
- | StepFinishPart
- | SnapshotPart
- | Part.PatchPart;
-
-export namespace Part {
- export interface PatchPart {
- id: string;
-
- files: Array;
-
- hash: string;
-
- messageID: string;
-
- sessionID: string;
-
- type: 'patch';
- }
-}
-
-export interface Session {
- id: string;
-
- time: Session.Time;
-
- title: string;
-
- version: string;
-
- parentID?: string;
-
- revert?: Session.Revert;
-
- share?: Session.Share;
-}
-
-export namespace Session {
- export interface Time {
- created: number;
-
- updated: number;
- }
-
- export interface Revert {
- messageID: string;
-
- diff?: string;
-
- partID?: string;
-
- snapshot?: string;
- }
-
- export interface Share {
- url: string;
- }
-}
-
-export interface SnapshotPart {
- id: string;
-
- messageID: string;
-
- sessionID: string;
-
- snapshot: string;
-
- type: 'snapshot';
-}
-
-export interface StepFinishPart {
- id: string;
-
- cost: number;
-
- messageID: string;
-
- sessionID: string;
-
- tokens: StepFinishPart.Tokens;
-
- type: 'step-finish';
-}
-
-export namespace StepFinishPart {
- export interface Tokens {
- cache: Tokens.Cache;
-
- input: number;
-
- output: number;
-
- reasoning: number;
- }
-
- export namespace Tokens {
- export interface Cache {
- read: number;
-
- write: number;
- }
- }
-}
-
-export interface StepStartPart {
- id: string;
-
- messageID: string;
-
- sessionID: string;
-
- type: 'step-start';
-}
-
-export interface SymbolSource {
- kind: number;
-
- name: string;
-
- path: string;
-
- range: SymbolSource.Range;
-
- text: FilePartSourceText;
-
- type: 'symbol';
-}
-
-export namespace SymbolSource {
- export interface Range {
- end: Range.End;
-
- start: Range.Start;
- }
-
- export namespace Range {
- export interface End {
- character: number;
-
- line: number;
- }
-
- export interface Start {
- character: number;
-
- line: number;
- }
- }
-}
-
-export interface TextPart {
- id: string;
-
- messageID: string;
-
- sessionID: string;
-
- text: string;
-
- type: 'text';
-
- synthetic?: boolean;
-
- time?: TextPart.Time;
-}
-
-export namespace TextPart {
- export interface Time {
- start: number;
-
- end?: number;
- }
-}
-
-export interface TextPartInput {
- text: string;
-
- type: 'text';
-
- id?: string;
-
- synthetic?: boolean;
-
- time?: TextPartInput.Time;
-}
-
-export namespace TextPartInput {
- export interface Time {
- start: number;
-
- end?: number;
- }
-}
-
-export interface ToolPart {
- id: string;
-
- callID: string;
-
- messageID: string;
-
- sessionID: string;
-
- state: ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;
-
- tool: string;
-
- type: 'tool';
-}
-
-export interface ToolStateCompleted {
- input: { [key: string]: unknown };
-
- metadata: { [key: string]: unknown };
-
- output: string;
-
- status: 'completed';
-
- time: ToolStateCompleted.Time;
-
- title: string;
-}
-
-export namespace ToolStateCompleted {
- export interface Time {
- end: number;
-
- start: number;
- }
-}
-
-export interface ToolStateError {
- error: string;
-
- input: { [key: string]: unknown };
-
- status: 'error';
-
- time: ToolStateError.Time;
-}
-
-export namespace ToolStateError {
- export interface Time {
- end: number;
-
- start: number;
- }
-}
-
-export interface ToolStatePending {
- status: 'pending';
-}
-
-export interface ToolStateRunning {
- status: 'running';
-
- time: ToolStateRunning.Time;
-
- input?: unknown;
-
- metadata?: { [key: string]: unknown };
-
- title?: string;
-}
-
-export namespace ToolStateRunning {
- export interface Time {
- start: number;
- }
-}
-
-export interface UserMessage {
- id: string;
-
- role: 'user';
-
- sessionID: string;
-
- time: UserMessage.Time;
-}
-
-export namespace UserMessage {
- export interface Time {
- created: number;
- }
-}
-
-export type SessionListResponse = Array;
-
-export type SessionDeleteResponse = boolean;
-
-export type SessionAbortResponse = boolean;
-
-export type SessionInitResponse = boolean;
-
-export type SessionMessagesResponse = Array;
-
-export namespace SessionMessagesResponse {
- export interface SessionMessagesResponseItem {
- info: SessionAPI.Message;
-
- parts: Array;
- }
-}
-
-export type SessionSummarizeResponse = boolean;
-
-export interface SessionChatParams {
- modelID: string;
-
- parts: Array;
-
- providerID: string;
-
- messageID?: string;
-
- mode?: string;
-
- system?: string;
-
- tools?: { [key: string]: boolean };
-}
-
-export interface SessionInitParams {
- messageID: string;
-
- modelID: string;
-
- providerID: string;
-}
-
-export interface SessionRevertParams {
- messageID: string;
-
- partID?: string;
-}
-
-export interface SessionSummarizeParams {
- modelID: string;
-
- providerID: string;
-}
-
-export declare namespace SessionResource {
- export {
- type AssistantMessage as AssistantMessage,
- type FilePart as FilePart,
- type FilePartInput as FilePartInput,
- type FilePartSource as FilePartSource,
- type FilePartSourceText as FilePartSourceText,
- type FileSource as FileSource,
- type Message as Message,
- type Part as Part,
- type Session as Session,
- type SnapshotPart as SnapshotPart,
- type StepFinishPart as StepFinishPart,
- type StepStartPart as StepStartPart,
- type SymbolSource as SymbolSource,
- type TextPart as TextPart,
- type TextPartInput as TextPartInput,
- type ToolPart as ToolPart,
- type ToolStateCompleted as ToolStateCompleted,
- type ToolStateError as ToolStateError,
- type ToolStatePending as ToolStatePending,
- type ToolStateRunning as ToolStateRunning,
- type UserMessage as UserMessage,
- type SessionListResponse as SessionListResponse,
- type SessionDeleteResponse as SessionDeleteResponse,
- type SessionAbortResponse as SessionAbortResponse,
- type SessionInitResponse as SessionInitResponse,
- type SessionMessagesResponse as SessionMessagesResponse,
- type SessionSummarizeResponse as SessionSummarizeResponse,
- type SessionChatParams as SessionChatParams,
- type SessionInitParams as SessionInitParams,
- type SessionRevertParams as SessionRevertParams,
- type SessionSummarizeParams as SessionSummarizeParams,
- };
-}
+export * from './session/index';
diff --git a/src/resources/session/index.ts b/src/resources/session/index.ts
new file mode 100644
index 0000000..6bae5d7
--- /dev/null
+++ b/src/resources/session/index.ts
@@ -0,0 +1,63 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export {
+ Permissions,
+ type Permission,
+ type PermissionRespondResponse,
+ type PermissionRespondParams,
+} from './permissions';
+export {
+ SessionResource,
+ type AgentPart,
+ type AgentPartInput,
+ type AssistantMessage,
+ type FilePart,
+ type FilePartInput,
+ type FilePartSource,
+ type FilePartSourceText,
+ type FileSource,
+ type Message,
+ type Part,
+ type ReasoningPart,
+ type Session,
+ type SnapshotPart,
+ type StepFinishPart,
+ type StepStartPart,
+ type SymbolSource,
+ type TextPart,
+ type TextPartInput,
+ type ToolPart,
+ type ToolStateCompleted,
+ type ToolStateError,
+ type ToolStatePending,
+ type ToolStateRunning,
+ type UserMessage,
+ type SessionListResponse,
+ type SessionDeleteResponse,
+ type SessionAbortResponse,
+ type SessionChildrenResponse,
+ type SessionCommandResponse,
+ type SessionInitResponse,
+ type SessionMessageResponse,
+ type SessionMessagesResponse,
+ type SessionPromptResponse,
+ type SessionSummarizeResponse,
+ type SessionCreateParams,
+ type SessionUpdateParams,
+ type SessionListParams,
+ type SessionDeleteParams,
+ type SessionAbortParams,
+ type SessionChildrenParams,
+ type SessionCommandParams,
+ type SessionGetParams,
+ type SessionInitParams,
+ type SessionMessageParams,
+ type SessionMessagesParams,
+ type SessionPromptParams,
+ type SessionRevertParams,
+ type SessionShareParams,
+ type SessionShellParams,
+ type SessionSummarizeParams,
+ type SessionUnrevertParams,
+ type SessionUnshareParams,
+} from './session';
diff --git a/src/resources/session/permissions.ts b/src/resources/session/permissions.ts
new file mode 100644
index 0000000..7a4f67e
--- /dev/null
+++ b/src/resources/session/permissions.ts
@@ -0,0 +1,77 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../core/resource';
+import { APIPromise } from '../../core/api-promise';
+import { RequestOptions } from '../../internal/request-options';
+import { path } from '../../internal/utils/path';
+
+export class Permissions extends APIResource {
+ /**
+ * Respond to a permission request
+ */
+ respond(
+ permissionID: string,
+ params: PermissionRespondParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { id, directory, ...body } = params;
+ return this._client.post(path`/session/${id}/permissions/${permissionID}`, {
+ query: { directory },
+ body,
+ ...options,
+ });
+ }
+}
+
+export interface Permission {
+ id: string;
+
+ messageID: string;
+
+ metadata: { [key: string]: unknown };
+
+ sessionID: string;
+
+ time: Permission.Time;
+
+ title: string;
+
+ type: string;
+
+ callID?: string;
+
+ pattern?: string;
+}
+
+export namespace Permission {
+ export interface Time {
+ created: number;
+ }
+}
+
+export type PermissionRespondResponse = boolean;
+
+export interface PermissionRespondParams {
+ /**
+ * Path param:
+ */
+ id: string;
+
+ /**
+ * Body param:
+ */
+ response: 'once' | 'always' | 'reject';
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+}
+
+export declare namespace Permissions {
+ export {
+ type Permission as Permission,
+ type PermissionRespondResponse as PermissionRespondResponse,
+ type PermissionRespondParams as PermissionRespondParams,
+ };
+}
diff --git a/src/resources/session/session.ts b/src/resources/session/session.ts
new file mode 100644
index 0000000..72d91ba
--- /dev/null
+++ b/src/resources/session/session.ts
@@ -0,0 +1,1033 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../core/resource';
+import * as SessionAPI from './session';
+import * as Shared from '../shared';
+import * as PermissionsAPI from './permissions';
+import { Permission, PermissionRespondParams, PermissionRespondResponse, Permissions } from './permissions';
+import { APIPromise } from '../../core/api-promise';
+import { RequestOptions } from '../../internal/request-options';
+import { path } from '../../internal/utils/path';
+
+export class SessionResource extends APIResource {
+ permissions: PermissionsAPI.Permissions = new PermissionsAPI.Permissions(this._client);
+
+ /**
+ * Create a new session
+ */
+ create(params: SessionCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise {
+ const { directory, ...body } = params ?? {};
+ return this._client.post('/session', { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Update session properties
+ */
+ update(
+ id: string,
+ params: SessionUpdateParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory, ...body } = params ?? {};
+ return this._client.patch(path`/session/${id}`, { query: { directory }, body, ...options });
+ }
+
+ /**
+ * List all sessions
+ */
+ list(
+ query: SessionListParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get('/session', { query, ...options });
+ }
+
+ /**
+ * Delete a session and all its data
+ */
+ delete(
+ id: string,
+ params: SessionDeleteParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.delete(path`/session/${id}`, { query: { directory }, ...options });
+ }
+
+ /**
+ * Abort a session
+ */
+ abort(
+ id: string,
+ params: SessionAbortParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post(path`/session/${id}/abort`, { query: { directory }, ...options });
+ }
+
+ /**
+ * Get a session's children
+ */
+ children(
+ id: string,
+ query: SessionChildrenParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/session/${id}/children`, { query, ...options });
+ }
+
+ /**
+ * Send a new command to a session
+ */
+ command(
+ id: string,
+ params: SessionCommandParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post(path`/session/${id}/command`, { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Get session
+ */
+ get(
+ id: string,
+ query: SessionGetParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/session/${id}`, { query, ...options });
+ }
+
+ /**
+ * Analyze the app and create an AGENTS.md file
+ */
+ init(id: string, params: SessionInitParams, options?: RequestOptions): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post(path`/session/${id}/init`, { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Get a message from a session
+ */
+ message(
+ messageID: string,
+ params: SessionMessageParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { id, ...query } = params;
+ return this._client.get(path`/session/${id}/message/${messageID}`, { query, ...options });
+ }
+
+ /**
+ * List messages for a session
+ */
+ messages(
+ id: string,
+ query: SessionMessagesParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.get(path`/session/${id}/message`, { query, ...options });
+ }
+
+ /**
+ * Create and send a new message to a session
+ */
+ prompt(
+ id: string,
+ params: SessionPromptParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post(path`/session/${id}/message`, { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Revert a message
+ */
+ revert(id: string, params: SessionRevertParams, options?: RequestOptions): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post(path`/session/${id}/revert`, { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Share a session
+ */
+ share(
+ id: string,
+ params: SessionShareParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post(path`/session/${id}/share`, { query: { directory }, ...options });
+ }
+
+ /**
+ * Run a shell command
+ */
+ shell(id: string, params: SessionShellParams, options?: RequestOptions): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post(path`/session/${id}/shell`, { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Summarize the session
+ */
+ summarize(
+ id: string,
+ params: SessionSummarizeParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post(path`/session/${id}/summarize`, { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Restore all reverted messages
+ */
+ unrevert(
+ id: string,
+ params: SessionUnrevertParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post(path`/session/${id}/unrevert`, { query: { directory }, ...options });
+ }
+
+ /**
+ * Unshare the session
+ */
+ unshare(
+ id: string,
+ params: SessionUnshareParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.delete(path`/session/${id}/share`, { query: { directory }, ...options });
+ }
+}
+
+export interface AgentPart {
+ id: string;
+
+ messageID: string;
+
+ name: string;
+
+ sessionID: string;
+
+ type: 'agent';
+
+ source?: AgentPart.Source;
+}
+
+export namespace AgentPart {
+ export interface Source {
+ end: number;
+
+ start: number;
+
+ value: string;
+ }
+}
+
+export interface AgentPartInput {
+ name: string;
+
+ type: 'agent';
+
+ id?: string;
+
+ source?: AgentPartInput.Source;
+}
+
+export namespace AgentPartInput {
+ export interface Source {
+ end: number;
+
+ start: number;
+
+ value: string;
+ }
+}
+
+export interface AssistantMessage {
+ id: string;
+
+ cost: number;
+
+ mode: string;
+
+ modelID: string;
+
+ path: AssistantMessage.Path;
+
+ providerID: string;
+
+ role: 'assistant';
+
+ sessionID: string;
+
+ system: Array;
+
+ time: AssistantMessage.Time;
+
+ tokens: AssistantMessage.Tokens;
+
+ error?:
+ | Shared.ProviderAuthError
+ | Shared.UnknownError
+ | AssistantMessage.MessageOutputLengthError
+ | Shared.MessageAbortedError;
+
+ summary?: boolean;
+}
+
+export namespace AssistantMessage {
+ export interface Path {
+ cwd: string;
+
+ root: string;
+ }
+
+ export interface Time {
+ created: number;
+
+ completed?: number;
+ }
+
+ export interface Tokens {
+ cache: Tokens.Cache;
+
+ input: number;
+
+ output: number;
+
+ reasoning: number;
+ }
+
+ export namespace Tokens {
+ export interface Cache {
+ read: number;
+
+ write: number;
+ }
+ }
+
+ export interface MessageOutputLengthError {
+ data: unknown;
+
+ name: 'MessageOutputLengthError';
+ }
+}
+
+export interface FilePart {
+ id: string;
+
+ messageID: string;
+
+ mime: string;
+
+ sessionID: string;
+
+ type: 'file';
+
+ url: string;
+
+ filename?: string;
+
+ source?: FilePartSource;
+}
+
+export interface FilePartInput {
+ mime: string;
+
+ type: 'file';
+
+ url: string;
+
+ id?: string;
+
+ filename?: string;
+
+ source?: FilePartSource;
+}
+
+export type FilePartSource = FileSource | SymbolSource;
+
+export interface FilePartSourceText {
+ end: number;
+
+ start: number;
+
+ value: string;
+}
+
+export interface FileSource {
+ path: string;
+
+ text: FilePartSourceText;
+
+ type: 'file';
+}
+
+export type Message = UserMessage | AssistantMessage;
+
+export type Part =
+ | TextPart
+ | ReasoningPart
+ | FilePart
+ | ToolPart
+ | StepStartPart
+ | StepFinishPart
+ | SnapshotPart
+ | Part.PatchPart
+ | AgentPart;
+
+export namespace Part {
+ export interface PatchPart {
+ id: string;
+
+ files: Array;
+
+ hash: string;
+
+ messageID: string;
+
+ sessionID: string;
+
+ type: 'patch';
+ }
+}
+
+export interface ReasoningPart {
+ id: string;
+
+ messageID: string;
+
+ sessionID: string;
+
+ text: string;
+
+ time: ReasoningPart.Time;
+
+ type: 'reasoning';
+
+ metadata?: { [key: string]: unknown };
+}
+
+export namespace ReasoningPart {
+ export interface Time {
+ start: number;
+
+ end?: number;
+ }
+}
+
+export interface Session {
+ id: string;
+
+ directory: string;
+
+ projectID: string;
+
+ time: Session.Time;
+
+ title: string;
+
+ version: string;
+
+ parentID?: string;
+
+ revert?: Session.Revert;
+
+ share?: Session.Share;
+}
+
+export namespace Session {
+ export interface Time {
+ created: number;
+
+ updated: number;
+ }
+
+ export interface Revert {
+ messageID: string;
+
+ diff?: string;
+
+ partID?: string;
+
+ snapshot?: string;
+ }
+
+ export interface Share {
+ url: string;
+ }
+}
+
+export interface SnapshotPart {
+ id: string;
+
+ messageID: string;
+
+ sessionID: string;
+
+ snapshot: string;
+
+ type: 'snapshot';
+}
+
+export interface StepFinishPart {
+ id: string;
+
+ cost: number;
+
+ messageID: string;
+
+ sessionID: string;
+
+ tokens: StepFinishPart.Tokens;
+
+ type: 'step-finish';
+}
+
+export namespace StepFinishPart {
+ export interface Tokens {
+ cache: Tokens.Cache;
+
+ input: number;
+
+ output: number;
+
+ reasoning: number;
+ }
+
+ export namespace Tokens {
+ export interface Cache {
+ read: number;
+
+ write: number;
+ }
+ }
+}
+
+export interface StepStartPart {
+ id: string;
+
+ messageID: string;
+
+ sessionID: string;
+
+ type: 'step-start';
+}
+
+export interface SymbolSource {
+ kind: number;
+
+ name: string;
+
+ path: string;
+
+ range: SymbolSource.Range;
+
+ text: FilePartSourceText;
+
+ type: 'symbol';
+}
+
+export namespace SymbolSource {
+ export interface Range {
+ end: Range.End;
+
+ start: Range.Start;
+ }
+
+ export namespace Range {
+ export interface End {
+ character: number;
+
+ line: number;
+ }
+
+ export interface Start {
+ character: number;
+
+ line: number;
+ }
+ }
+}
+
+export interface TextPart {
+ id: string;
+
+ messageID: string;
+
+ sessionID: string;
+
+ text: string;
+
+ type: 'text';
+
+ synthetic?: boolean;
+
+ time?: TextPart.Time;
+}
+
+export namespace TextPart {
+ export interface Time {
+ start: number;
+
+ end?: number;
+ }
+}
+
+export interface TextPartInput {
+ text: string;
+
+ type: 'text';
+
+ id?: string;
+
+ synthetic?: boolean;
+
+ time?: TextPartInput.Time;
+}
+
+export namespace TextPartInput {
+ export interface Time {
+ start: number;
+
+ end?: number;
+ }
+}
+
+export interface ToolPart {
+ id: string;
+
+ callID: string;
+
+ messageID: string;
+
+ sessionID: string;
+
+ state: ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;
+
+ tool: string;
+
+ type: 'tool';
+}
+
+export interface ToolStateCompleted {
+ input: { [key: string]: unknown };
+
+ metadata: { [key: string]: unknown };
+
+ output: string;
+
+ status: 'completed';
+
+ time: ToolStateCompleted.Time;
+
+ title: string;
+}
+
+export namespace ToolStateCompleted {
+ export interface Time {
+ end: number;
+
+ start: number;
+ }
+}
+
+export interface ToolStateError {
+ error: string;
+
+ input: { [key: string]: unknown };
+
+ status: 'error';
+
+ time: ToolStateError.Time;
+
+ metadata?: { [key: string]: unknown };
+}
+
+export namespace ToolStateError {
+ export interface Time {
+ end: number;
+
+ start: number;
+ }
+}
+
+export interface ToolStatePending {
+ status: 'pending';
+}
+
+export interface ToolStateRunning {
+ status: 'running';
+
+ time: ToolStateRunning.Time;
+
+ input?: unknown;
+
+ metadata?: { [key: string]: unknown };
+
+ title?: string;
+}
+
+export namespace ToolStateRunning {
+ export interface Time {
+ start: number;
+ }
+}
+
+export interface UserMessage {
+ id: string;
+
+ role: 'user';
+
+ sessionID: string;
+
+ time: UserMessage.Time;
+}
+
+export namespace UserMessage {
+ export interface Time {
+ created: number;
+ }
+}
+
+export type SessionListResponse = Array;
+
+export type SessionDeleteResponse = boolean;
+
+export type SessionAbortResponse = boolean;
+
+export type SessionChildrenResponse = Array;
+
+export interface SessionCommandResponse {
+ info: AssistantMessage;
+
+ parts: Array;
+}
+
+export type SessionInitResponse = boolean;
+
+export interface SessionMessageResponse {
+ info: Message;
+
+ parts: Array;
+}
+
+export type SessionMessagesResponse = Array;
+
+export namespace SessionMessagesResponse {
+ export interface SessionMessagesResponseItem {
+ info: SessionAPI.Message;
+
+ parts: Array;
+ }
+}
+
+export interface SessionPromptResponse {
+ info: AssistantMessage;
+
+ parts: Array;
+}
+
+export type SessionSummarizeResponse = boolean;
+
+export interface SessionCreateParams {
+ /**
+ * Query param:
+ */
+ directory?: string;
+
+ /**
+ * Body param:
+ */
+ parentID?: string;
+
+ /**
+ * Body param:
+ */
+ title?: string;
+}
+
+export interface SessionUpdateParams {
+ /**
+ * Query param:
+ */
+ directory?: string;
+
+ /**
+ * Body param:
+ */
+ title?: string;
+}
+
+export interface SessionListParams {
+ directory?: string;
+}
+
+export interface SessionDeleteParams {
+ directory?: string;
+}
+
+export interface SessionAbortParams {
+ directory?: string;
+}
+
+export interface SessionChildrenParams {
+ directory?: string;
+}
+
+export interface SessionCommandParams {
+ /**
+ * Body param:
+ */
+ arguments: string;
+
+ /**
+ * Body param:
+ */
+ command: string;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+
+ /**
+ * Body param:
+ */
+ agent?: string;
+
+ /**
+ * Body param:
+ */
+ messageID?: string;
+
+ /**
+ * Body param:
+ */
+ model?: string;
+}
+
+export interface SessionGetParams {
+ directory?: string;
+}
+
+export interface SessionInitParams {
+ /**
+ * Body param:
+ */
+ messageID: string;
+
+ /**
+ * Body param:
+ */
+ modelID: string;
+
+ /**
+ * Body param:
+ */
+ providerID: string;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+}
+
+export interface SessionMessageParams {
+ /**
+ * Path param: Session ID
+ */
+ id: string;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+}
+
+export interface SessionMessagesParams {
+ directory?: string;
+}
+
+export interface SessionPromptParams {
+ /**
+ * Body param:
+ */
+ parts: Array;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+
+ /**
+ * Body param:
+ */
+ agent?: string;
+
+ /**
+ * Body param:
+ */
+ messageID?: string;
+
+ /**
+ * Body param:
+ */
+ model?: SessionPromptParams.Model;
+
+ /**
+ * Body param:
+ */
+ system?: string;
+
+ /**
+ * Body param:
+ */
+ tools?: { [key: string]: boolean };
+}
+
+export namespace SessionPromptParams {
+ export interface Model {
+ modelID: string;
+
+ providerID: string;
+ }
+}
+
+export interface SessionRevertParams {
+ /**
+ * Body param:
+ */
+ messageID: string;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+
+ /**
+ * Body param:
+ */
+ partID?: string;
+}
+
+export interface SessionShareParams {
+ directory?: string;
+}
+
+export interface SessionShellParams {
+ /**
+ * Body param:
+ */
+ agent: string;
+
+ /**
+ * Body param:
+ */
+ command: string;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+}
+
+export interface SessionSummarizeParams {
+ /**
+ * Body param:
+ */
+ modelID: string;
+
+ /**
+ * Body param:
+ */
+ providerID: string;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+}
+
+export interface SessionUnrevertParams {
+ directory?: string;
+}
+
+export interface SessionUnshareParams {
+ directory?: string;
+}
+
+SessionResource.Permissions = Permissions;
+
+export declare namespace SessionResource {
+ export {
+ type AgentPart as AgentPart,
+ type AgentPartInput as AgentPartInput,
+ type AssistantMessage as AssistantMessage,
+ type FilePart as FilePart,
+ type FilePartInput as FilePartInput,
+ type FilePartSource as FilePartSource,
+ type FilePartSourceText as FilePartSourceText,
+ type FileSource as FileSource,
+ type Message as Message,
+ type Part as Part,
+ type ReasoningPart as ReasoningPart,
+ type Session as Session,
+ type SnapshotPart as SnapshotPart,
+ type StepFinishPart as StepFinishPart,
+ type StepStartPart as StepStartPart,
+ type SymbolSource as SymbolSource,
+ type TextPart as TextPart,
+ type TextPartInput as TextPartInput,
+ type ToolPart as ToolPart,
+ type ToolStateCompleted as ToolStateCompleted,
+ type ToolStateError as ToolStateError,
+ type ToolStatePending as ToolStatePending,
+ type ToolStateRunning as ToolStateRunning,
+ type UserMessage as UserMessage,
+ type SessionListResponse as SessionListResponse,
+ type SessionDeleteResponse as SessionDeleteResponse,
+ type SessionAbortResponse as SessionAbortResponse,
+ type SessionChildrenResponse as SessionChildrenResponse,
+ type SessionCommandResponse as SessionCommandResponse,
+ type SessionInitResponse as SessionInitResponse,
+ type SessionMessageResponse as SessionMessageResponse,
+ type SessionMessagesResponse as SessionMessagesResponse,
+ type SessionPromptResponse as SessionPromptResponse,
+ type SessionSummarizeResponse as SessionSummarizeResponse,
+ type SessionCreateParams as SessionCreateParams,
+ type SessionUpdateParams as SessionUpdateParams,
+ type SessionListParams as SessionListParams,
+ type SessionDeleteParams as SessionDeleteParams,
+ type SessionAbortParams as SessionAbortParams,
+ type SessionChildrenParams as SessionChildrenParams,
+ type SessionCommandParams as SessionCommandParams,
+ type SessionGetParams as SessionGetParams,
+ type SessionInitParams as SessionInitParams,
+ type SessionMessageParams as SessionMessageParams,
+ type SessionMessagesParams as SessionMessagesParams,
+ type SessionPromptParams as SessionPromptParams,
+ type SessionRevertParams as SessionRevertParams,
+ type SessionShareParams as SessionShareParams,
+ type SessionShellParams as SessionShellParams,
+ type SessionSummarizeParams as SessionSummarizeParams,
+ type SessionUnrevertParams as SessionUnrevertParams,
+ type SessionUnshareParams as SessionUnshareParams,
+ };
+
+ export {
+ Permissions as Permissions,
+ type Permission as Permission,
+ type PermissionRespondResponse as PermissionRespondResponse,
+ type PermissionRespondParams as PermissionRespondParams,
+ };
+}
diff --git a/src/resources/tui.ts b/src/resources/tui.ts
index c7efbdd..50f44b3 100644
--- a/src/resources/tui.ts
+++ b/src/resources/tui.ts
@@ -8,30 +8,204 @@ export class Tui extends APIResource {
/**
* Append prompt to the TUI
*/
- appendPrompt(body: TuiAppendPromptParams, options?: RequestOptions): APIPromise {
- return this._client.post('/tui/append-prompt', { body, ...options });
+ appendPrompt(params: TuiAppendPromptParams, options?: RequestOptions): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post('/tui/append-prompt', { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Clear the prompt
+ */
+ clearPrompt(
+ params: TuiClearPromptParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post('/tui/clear-prompt', { query: { directory }, ...options });
+ }
+
+ /**
+ * Execute a TUI command (e.g. agent_cycle)
+ */
+ executeCommand(
+ params: TuiExecuteCommandParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post('/tui/execute-command', { query: { directory }, body, ...options });
}
/**
* Open the help dialog
*/
- openHelp(options?: RequestOptions): APIPromise {
- return this._client.post('/tui/open-help', options);
+ openHelp(
+ params: TuiOpenHelpParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post('/tui/open-help', { query: { directory }, ...options });
+ }
+
+ /**
+ * Open the model dialog
+ */
+ openModels(
+ params: TuiOpenModelsParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post('/tui/open-models', { query: { directory }, ...options });
+ }
+
+ /**
+ * Open the session dialog
+ */
+ openSessions(
+ params: TuiOpenSessionsParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post('/tui/open-sessions', { query: { directory }, ...options });
+ }
+
+ /**
+ * Open the theme dialog
+ */
+ openThemes(
+ params: TuiOpenThemesParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post('/tui/open-themes', { query: { directory }, ...options });
+ }
+
+ /**
+ * Show a toast notification in the TUI
+ */
+ showToast(params: TuiShowToastParams, options?: RequestOptions): APIPromise {
+ const { directory, ...body } = params;
+ return this._client.post('/tui/show-toast', { query: { directory }, body, ...options });
+ }
+
+ /**
+ * Submit the prompt
+ */
+ submitPrompt(
+ params: TuiSubmitPromptParams | null | undefined = {},
+ options?: RequestOptions,
+ ): APIPromise {
+ const { directory } = params ?? {};
+ return this._client.post('/tui/submit-prompt', { query: { directory }, ...options });
}
}
export type TuiAppendPromptResponse = boolean;
+export type TuiClearPromptResponse = boolean;
+
+export type TuiExecuteCommandResponse = boolean;
+
export type TuiOpenHelpResponse = boolean;
+export type TuiOpenModelsResponse = boolean;
+
+export type TuiOpenSessionsResponse = boolean;
+
+export type TuiOpenThemesResponse = boolean;
+
+export type TuiShowToastResponse = boolean;
+
+export type TuiSubmitPromptResponse = boolean;
+
export interface TuiAppendPromptParams {
+ /**
+ * Body param:
+ */
text: string;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+}
+
+export interface TuiClearPromptParams {
+ directory?: string;
+}
+
+export interface TuiExecuteCommandParams {
+ /**
+ * Body param:
+ */
+ command: string;
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+}
+
+export interface TuiOpenHelpParams {
+ directory?: string;
+}
+
+export interface TuiOpenModelsParams {
+ directory?: string;
+}
+
+export interface TuiOpenSessionsParams {
+ directory?: string;
+}
+
+export interface TuiOpenThemesParams {
+ directory?: string;
+}
+
+export interface TuiShowToastParams {
+ /**
+ * Body param:
+ */
+ message: string;
+
+ /**
+ * Body param:
+ */
+ variant: 'info' | 'success' | 'warning' | 'error';
+
+ /**
+ * Query param:
+ */
+ directory?: string;
+
+ /**
+ * Body param:
+ */
+ title?: string;
+}
+
+export interface TuiSubmitPromptParams {
+ directory?: string;
}
export declare namespace Tui {
export {
type TuiAppendPromptResponse as TuiAppendPromptResponse,
+ type TuiClearPromptResponse as TuiClearPromptResponse,
+ type TuiExecuteCommandResponse as TuiExecuteCommandResponse,
type TuiOpenHelpResponse as TuiOpenHelpResponse,
+ type TuiOpenModelsResponse as TuiOpenModelsResponse,
+ type TuiOpenSessionsResponse as TuiOpenSessionsResponse,
+ type TuiOpenThemesResponse as TuiOpenThemesResponse,
+ type TuiShowToastResponse as TuiShowToastResponse,
+ type TuiSubmitPromptResponse as TuiSubmitPromptResponse,
type TuiAppendPromptParams as TuiAppendPromptParams,
+ type TuiClearPromptParams as TuiClearPromptParams,
+ type TuiExecuteCommandParams as TuiExecuteCommandParams,
+ type TuiOpenHelpParams as TuiOpenHelpParams,
+ type TuiOpenModelsParams as TuiOpenModelsParams,
+ type TuiOpenSessionsParams as TuiOpenSessionsParams,
+ type TuiOpenThemesParams as TuiOpenThemesParams,
+ type TuiShowToastParams as TuiShowToastParams,
+ type TuiSubmitPromptParams as TuiSubmitPromptParams,
};
}
diff --git a/src/version.ts b/src/version.ts
index 0176b61..bb43faa 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.1.0-alpha.21'; // x-release-please-version
+export const VERSION = '0.1.0-alpha.22'; // x-release-please-version
diff --git a/tests/api-resources/agent.test.ts b/tests/api-resources/agent.test.ts
new file mode 100644
index 0000000..42584f4
--- /dev/null
+++ b/tests/api-resources/agent.test.ts
@@ -0,0 +1,27 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Opencode from '@opencode-ai/sdk';
+
+const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
+
+describe('resource agent', () => {
+ // Prism tests are disabled
+ test.skip('list', async () => {
+ const responsePromise = client.agent.list();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('list: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.agent.list({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+});
diff --git a/tests/api-resources/app.test.ts b/tests/api-resources/app.test.ts
index 9ccf455..e668e90 100644
--- a/tests/api-resources/app.test.ts
+++ b/tests/api-resources/app.test.ts
@@ -5,31 +5,7 @@ import Opencode from '@opencode-ai/sdk';
const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
describe('resource app', () => {
- // skipped: tests are disabled for the time being
- test.skip('get', async () => {
- const responsePromise = client.app.get();
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('init', async () => {
- const responsePromise = client.app.init();
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('log: only required params', async () => {
const responsePromise = client.app.log({ level: 'debug', message: 'message', service: 'service' });
const rawResponse = await responsePromise.asResponse();
@@ -41,29 +17,18 @@ describe('resource app', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('log: required and optional params', async () => {
const response = await client.app.log({
level: 'debug',
message: 'message',
service: 'service',
+ directory: 'directory',
extra: { foo: 'bar' },
});
});
- // skipped: tests are disabled for the time being
- test.skip('modes', async () => {
- const responsePromise = client.app.modes();
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('providers', async () => {
const responsePromise = client.app.providers();
const rawResponse = await responsePromise.asResponse();
@@ -74,4 +39,12 @@ describe('resource app', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
+
+ // Prism tests are disabled
+ test.skip('providers: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.app.providers({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
});
diff --git a/tests/api-resources/command.test.ts b/tests/api-resources/command.test.ts
new file mode 100644
index 0000000..84cee94
--- /dev/null
+++ b/tests/api-resources/command.test.ts
@@ -0,0 +1,27 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Opencode from '@opencode-ai/sdk';
+
+const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
+
+describe('resource command', () => {
+ // Prism tests are disabled
+ test.skip('list', async () => {
+ const responsePromise = client.command.list();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('list: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.command.list({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+});
diff --git a/tests/api-resources/config.test.ts b/tests/api-resources/config.test.ts
index f85fb10..dc6f00d 100644
--- a/tests/api-resources/config.test.ts
+++ b/tests/api-resources/config.test.ts
@@ -5,7 +5,7 @@ import Opencode from '@opencode-ai/sdk';
const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
describe('resource config', () => {
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('get', async () => {
const responsePromise = client.config.get();
const rawResponse = await responsePromise.asResponse();
@@ -16,4 +16,12 @@ describe('resource config', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
+
+ // Prism tests are disabled
+ test.skip('get: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.config.get({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
});
diff --git a/tests/api-resources/event.test.ts b/tests/api-resources/event.test.ts
index 4e228bc..274ec61 100644
--- a/tests/api-resources/event.test.ts
+++ b/tests/api-resources/event.test.ts
@@ -5,7 +5,7 @@ import Opencode from '@opencode-ai/sdk';
const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
describe('resource event', () => {
- // skipped: tests are disabled for the time being
+ // Prism doesn't support text/event-stream responses
test.skip('list', async () => {
const responsePromise = client.event.list();
const rawResponse = await responsePromise.asResponse();
@@ -16,4 +16,12 @@ describe('resource event', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
+
+ // Prism doesn't support text/event-stream responses
+ test.skip('list: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.event.list({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
});
diff --git a/tests/api-resources/file.test.ts b/tests/api-resources/file.test.ts
index 4c51787..5b55c81 100644
--- a/tests/api-resources/file.test.ts
+++ b/tests/api-resources/file.test.ts
@@ -5,7 +5,24 @@ import Opencode from '@opencode-ai/sdk';
const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
describe('resource file', () => {
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
+ test.skip('list: only required params', async () => {
+ const responsePromise = client.file.list({ path: 'path' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('list: required and optional params', async () => {
+ const response = await client.file.list({ path: 'path', directory: 'directory' });
+ });
+
+ // Prism tests are disabled
test.skip('read: only required params', async () => {
const responsePromise = client.file.read({ path: 'path' });
const rawResponse = await responsePromise.asResponse();
@@ -17,12 +34,12 @@ describe('resource file', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('read: required and optional params', async () => {
- const response = await client.file.read({ path: 'path' });
+ const response = await client.file.read({ path: 'path', directory: 'directory' });
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('status', async () => {
const responsePromise = client.file.status();
const rawResponse = await responsePromise.asResponse();
@@ -33,4 +50,12 @@ describe('resource file', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
+
+ // Prism tests are disabled
+ test.skip('status: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.file.status({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
});
diff --git a/tests/api-resources/find.test.ts b/tests/api-resources/find.test.ts
index ce0e7c0..cc9497c 100644
--- a/tests/api-resources/find.test.ts
+++ b/tests/api-resources/find.test.ts
@@ -5,7 +5,7 @@ import Opencode from '@opencode-ai/sdk';
const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
describe('resource find', () => {
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('files: only required params', async () => {
const responsePromise = client.find.files({ query: 'query' });
const rawResponse = await responsePromise.asResponse();
@@ -17,12 +17,12 @@ describe('resource find', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('files: required and optional params', async () => {
- const response = await client.find.files({ query: 'query' });
+ const response = await client.find.files({ query: 'query', directory: 'directory' });
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('symbols: only required params', async () => {
const responsePromise = client.find.symbols({ query: 'query' });
const rawResponse = await responsePromise.asResponse();
@@ -34,12 +34,12 @@ describe('resource find', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('symbols: required and optional params', async () => {
- const response = await client.find.symbols({ query: 'query' });
+ const response = await client.find.symbols({ query: 'query', directory: 'directory' });
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('text: only required params', async () => {
const responsePromise = client.find.text({ pattern: 'pattern' });
const rawResponse = await responsePromise.asResponse();
@@ -51,8 +51,8 @@ describe('resource find', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('text: required and optional params', async () => {
- const response = await client.find.text({ pattern: 'pattern' });
+ const response = await client.find.text({ pattern: 'pattern', directory: 'directory' });
});
});
diff --git a/tests/api-resources/path.test.ts b/tests/api-resources/path.test.ts
new file mode 100644
index 0000000..e9b9b9e
--- /dev/null
+++ b/tests/api-resources/path.test.ts
@@ -0,0 +1,27 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Opencode from '@opencode-ai/sdk';
+
+const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
+
+describe('resource path', () => {
+ // Prism tests are disabled
+ test.skip('get', async () => {
+ const responsePromise = client.path.get();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('get: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.path.get({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+});
diff --git a/tests/api-resources/project.test.ts b/tests/api-resources/project.test.ts
new file mode 100644
index 0000000..4e46f0e
--- /dev/null
+++ b/tests/api-resources/project.test.ts
@@ -0,0 +1,47 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Opencode from '@opencode-ai/sdk';
+
+const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
+
+describe('resource project', () => {
+ // Prism tests are disabled
+ test.skip('list', async () => {
+ const responsePromise = client.project.list();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('list: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.project.list({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('current', async () => {
+ const responsePromise = client.project.current();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('current: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.project.current({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+});
diff --git a/tests/api-resources/session.test.ts b/tests/api-resources/session.test.ts
deleted file mode 100644
index 2acf082..0000000
--- a/tests/api-resources/session.test.ts
+++ /dev/null
@@ -1,191 +0,0 @@
-// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-import Opencode from '@opencode-ai/sdk';
-
-const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
-
-describe('resource session', () => {
- // skipped: tests are disabled for the time being
- test.skip('create', async () => {
- const responsePromise = client.session.create();
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('list', async () => {
- const responsePromise = client.session.list();
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('delete', async () => {
- const responsePromise = client.session.delete('id');
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('abort', async () => {
- const responsePromise = client.session.abort('id');
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('chat: only required params', async () => {
- const responsePromise = client.session.chat('id', {
- modelID: 'modelID',
- parts: [{ text: 'text', type: 'text' }],
- providerID: 'providerID',
- });
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('chat: required and optional params', async () => {
- const response = await client.session.chat('id', {
- modelID: 'modelID',
- parts: [{ text: 'text', type: 'text', id: 'id', synthetic: true, time: { start: 0, end: 0 } }],
- providerID: 'providerID',
- messageID: 'msg',
- mode: 'mode',
- system: 'system',
- tools: { foo: true },
- });
- });
-
- // skipped: tests are disabled for the time being
- test.skip('init: only required params', async () => {
- const responsePromise = client.session.init('id', {
- messageID: 'messageID',
- modelID: 'modelID',
- providerID: 'providerID',
- });
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('init: required and optional params', async () => {
- const response = await client.session.init('id', {
- messageID: 'messageID',
- modelID: 'modelID',
- providerID: 'providerID',
- });
- });
-
- // skipped: tests are disabled for the time being
- test.skip('messages', async () => {
- const responsePromise = client.session.messages('id');
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('revert: only required params', async () => {
- const responsePromise = client.session.revert('id', { messageID: 'msg' });
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('revert: required and optional params', async () => {
- const response = await client.session.revert('id', { messageID: 'msg', partID: 'prt' });
- });
-
- // skipped: tests are disabled for the time being
- test.skip('share', async () => {
- const responsePromise = client.session.share('id');
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('summarize: only required params', async () => {
- const responsePromise = client.session.summarize('id', { modelID: 'modelID', providerID: 'providerID' });
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('summarize: required and optional params', async () => {
- const response = await client.session.summarize('id', { modelID: 'modelID', providerID: 'providerID' });
- });
-
- // skipped: tests are disabled for the time being
- test.skip('unrevert', async () => {
- const responsePromise = client.session.unrevert('id');
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-
- // skipped: tests are disabled for the time being
- test.skip('unshare', async () => {
- const responsePromise = client.session.unshare('id');
- const rawResponse = await responsePromise.asResponse();
- expect(rawResponse).toBeInstanceOf(Response);
- const response = await responsePromise;
- expect(response).not.toBeInstanceOf(Response);
- const dataAndResponse = await responsePromise.withResponse();
- expect(dataAndResponse.data).toBe(response);
- expect(dataAndResponse.response).toBe(rawResponse);
- });
-});
diff --git a/tests/api-resources/session/permissions.test.ts b/tests/api-resources/session/permissions.test.ts
new file mode 100644
index 0000000..56a9c5f
--- /dev/null
+++ b/tests/api-resources/session/permissions.test.ts
@@ -0,0 +1,31 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Opencode from '@opencode-ai/sdk';
+
+const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
+
+describe('resource permissions', () => {
+ // Prism tests are disabled
+ test.skip('respond: only required params', async () => {
+ const responsePromise = client.session.permissions.respond('permissionID', {
+ id: 'id',
+ response: 'once',
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('respond: required and optional params', async () => {
+ const response = await client.session.permissions.respond('permissionID', {
+ id: 'id',
+ response: 'once',
+ directory: 'directory',
+ });
+ });
+});
diff --git a/tests/api-resources/session/session.test.ts b/tests/api-resources/session/session.test.ts
new file mode 100644
index 0000000..e0254f8
--- /dev/null
+++ b/tests/api-resources/session/session.test.ts
@@ -0,0 +1,389 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Opencode from '@opencode-ai/sdk';
+
+const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
+
+describe('resource session', () => {
+ // Prism tests are disabled
+ test.skip('create', async () => {
+ const responsePromise = client.session.create();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('create: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.create(
+ { directory: 'directory', parentID: 'parentID', title: 'title' },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('update', async () => {
+ const responsePromise = client.session.update('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('update: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.update(
+ 'id',
+ { directory: 'directory', title: 'title' },
+ { path: '/_stainless_unknown_path' },
+ ),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('list', async () => {
+ const responsePromise = client.session.list();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('list: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.list({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('delete', async () => {
+ const responsePromise = client.session.delete('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('delete: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.delete('id', { directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('abort', async () => {
+ const responsePromise = client.session.abort('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('abort: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.abort('id', { directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('children', async () => {
+ const responsePromise = client.session.children('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('children: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.children('id', { directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('command: only required params', async () => {
+ const responsePromise = client.session.command('id', { arguments: 'arguments', command: 'command' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('command: required and optional params', async () => {
+ const response = await client.session.command('id', {
+ arguments: 'arguments',
+ command: 'command',
+ directory: 'directory',
+ agent: 'agent',
+ messageID: 'msg',
+ model: 'model',
+ });
+ });
+
+ // Prism tests are disabled
+ test.skip('get', async () => {
+ const responsePromise = client.session.get('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('get: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.get('id', { directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('init: only required params', async () => {
+ const responsePromise = client.session.init('id', {
+ messageID: 'messageID',
+ modelID: 'modelID',
+ providerID: 'providerID',
+ });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('init: required and optional params', async () => {
+ const response = await client.session.init('id', {
+ messageID: 'messageID',
+ modelID: 'modelID',
+ providerID: 'providerID',
+ directory: 'directory',
+ });
+ });
+
+ // Prism tests are disabled
+ test.skip('message: only required params', async () => {
+ const responsePromise = client.session.message('messageID', { id: 'id' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('message: required and optional params', async () => {
+ const response = await client.session.message('messageID', { id: 'id', directory: 'directory' });
+ });
+
+ // Prism tests are disabled
+ test.skip('messages', async () => {
+ const responsePromise = client.session.messages('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('messages: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.messages('id', { directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('prompt: only required params', async () => {
+ const responsePromise = client.session.prompt('id', { parts: [{ text: 'text', type: 'text' }] });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('prompt: required and optional params', async () => {
+ const response = await client.session.prompt('id', {
+ parts: [{ text: 'text', type: 'text', id: 'id', synthetic: true, time: { start: 0, end: 0 } }],
+ directory: 'directory',
+ agent: 'agent',
+ messageID: 'msg',
+ model: { modelID: 'modelID', providerID: 'providerID' },
+ system: 'system',
+ tools: { foo: true },
+ });
+ });
+
+ // Prism tests are disabled
+ test.skip('revert: only required params', async () => {
+ const responsePromise = client.session.revert('id', { messageID: 'msg' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('revert: required and optional params', async () => {
+ const response = await client.session.revert('id', {
+ messageID: 'msg',
+ directory: 'directory',
+ partID: 'prt',
+ });
+ });
+
+ // Prism tests are disabled
+ test.skip('share', async () => {
+ const responsePromise = client.session.share('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('share: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.share('id', { directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('shell: only required params', async () => {
+ const responsePromise = client.session.shell('id', { agent: 'agent', command: 'command' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('shell: required and optional params', async () => {
+ const response = await client.session.shell('id', {
+ agent: 'agent',
+ command: 'command',
+ directory: 'directory',
+ });
+ });
+
+ // Prism tests are disabled
+ test.skip('summarize: only required params', async () => {
+ const responsePromise = client.session.summarize('id', { modelID: 'modelID', providerID: 'providerID' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('summarize: required and optional params', async () => {
+ const response = await client.session.summarize('id', {
+ modelID: 'modelID',
+ providerID: 'providerID',
+ directory: 'directory',
+ });
+ });
+
+ // Prism tests are disabled
+ test.skip('unrevert', async () => {
+ const responsePromise = client.session.unrevert('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('unrevert: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.unrevert('id', { directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('unshare', async () => {
+ const responsePromise = client.session.unshare('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('unshare: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.session.unshare('id', { directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+});
diff --git a/tests/api-resources/tui.test.ts b/tests/api-resources/tui.test.ts
index 8ac0d43..cd138ce 100644
--- a/tests/api-resources/tui.test.ts
+++ b/tests/api-resources/tui.test.ts
@@ -5,7 +5,7 @@ import Opencode from '@opencode-ai/sdk';
const client = new Opencode({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010' });
describe('resource tui', () => {
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('appendPrompt: only required params', async () => {
const responsePromise = client.tui.appendPrompt({ text: 'text' });
const rawResponse = await responsePromise.asResponse();
@@ -17,12 +17,49 @@ describe('resource tui', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
test.skip('appendPrompt: required and optional params', async () => {
- const response = await client.tui.appendPrompt({ text: 'text' });
+ const response = await client.tui.appendPrompt({ text: 'text', directory: 'directory' });
});
- // skipped: tests are disabled for the time being
+ // Prism tests are disabled
+ test.skip('clearPrompt', async () => {
+ const responsePromise = client.tui.clearPrompt();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('clearPrompt: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.tui.clearPrompt({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('executeCommand: only required params', async () => {
+ const responsePromise = client.tui.executeCommand({ command: 'command' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('executeCommand: required and optional params', async () => {
+ const response = await client.tui.executeCommand({ command: 'command', directory: 'directory' });
+ });
+
+ // Prism tests are disabled
test.skip('openHelp', async () => {
const responsePromise = client.tui.openHelp();
const rawResponse = await responsePromise.asResponse();
@@ -33,4 +70,114 @@ describe('resource tui', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
+
+ // Prism tests are disabled
+ test.skip('openHelp: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.tui.openHelp({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('openModels', async () => {
+ const responsePromise = client.tui.openModels();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('openModels: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.tui.openModels({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('openSessions', async () => {
+ const responsePromise = client.tui.openSessions();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('openSessions: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.tui.openSessions({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('openThemes', async () => {
+ const responsePromise = client.tui.openThemes();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('openThemes: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.tui.openThemes({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
+
+ // Prism tests are disabled
+ test.skip('showToast: only required params', async () => {
+ const responsePromise = client.tui.showToast({ message: 'message', variant: 'info' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('showToast: required and optional params', async () => {
+ const response = await client.tui.showToast({
+ message: 'message',
+ variant: 'info',
+ directory: 'directory',
+ title: 'title',
+ });
+ });
+
+ // Prism tests are disabled
+ test.skip('submitPrompt', async () => {
+ const responsePromise = client.tui.submitPrompt();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('submitPrompt: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.tui.submitPrompt({ directory: 'directory' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Opencode.NotFoundError);
+ });
});
diff --git a/tsconfig.build.json b/tsconfig.build.json
index 2421951..ed09e19 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -5,8 +5,8 @@
"compilerOptions": {
"rootDir": "./dist/src",
"paths": {
- "@opencode-ai/sdk/*": ["dist/src/*"],
- "@opencode-ai/sdk": ["dist/src/index.ts"]
+ "@opencode-ai/sdk/*": ["./dist/src/*"],
+ "@opencode-ai/sdk": ["./dist/src/index.ts"]
},
"noEmit": false,
"declaration": true,
diff --git a/tsconfig.json b/tsconfig.json
index aafeb41..b7290ec 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,10 +7,9 @@
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
- "baseUrl": "./",
"paths": {
- "@opencode-ai/sdk/*": ["src/*"],
- "@opencode-ai/sdk": ["src/index.ts"]
+ "@opencode-ai/sdk/*": ["./src/*"],
+ "@opencode-ai/sdk": ["./src/index.ts"]
},
"noEmit": true,
diff --git a/yarn.lock b/yarn.lock
index 58c08d5..5f56a20 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -350,45 +350,52 @@
dependencies:
"@cspotcode/source-map-consumer" "0.8.0"
-"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
+"@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"
+"@eslint-community/eslint-utils@^4.8.0":
+ version "4.9.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3"
+ integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==
+ dependencies:
+ eslint-visitor-keys "^3.4.3"
+
"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1":
version "4.12.1"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0"
integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==
-"@eslint/config-array@^0.19.0":
- version "0.19.2"
- resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.2.tgz#3060b809e111abfc97adb0bb1172778b90cb46aa"
- integrity sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==
+"@eslint/config-array@^0.21.1":
+ version "0.21.1"
+ resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.1.tgz#7d1b0060fea407f8301e932492ba8c18aff29713"
+ integrity sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==
dependencies:
- "@eslint/object-schema" "^2.1.6"
+ "@eslint/object-schema" "^2.1.7"
debug "^4.3.1"
minimatch "^3.1.2"
-"@eslint/core@^0.10.0":
- version "0.10.0"
- resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.10.0.tgz#23727063c21b335f752dbb3a16450f6f9cbc9091"
- integrity sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==
+"@eslint/config-helpers@^0.4.2":
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda"
+ integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==
dependencies:
- "@types/json-schema" "^7.0.15"
+ "@eslint/core" "^0.17.0"
-"@eslint/core@^0.11.0":
- version "0.11.0"
- resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.11.0.tgz#7a9226e850922e42cbd2ba71361eacbe74352a12"
- integrity sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==
+"@eslint/core@^0.17.0":
+ version "0.17.0"
+ resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c"
+ integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==
dependencies:
"@types/json-schema" "^7.0.15"
-"@eslint/eslintrc@^3.2.0":
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c"
- integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==
+"@eslint/eslintrc@^3.3.1":
+ version "3.3.3"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.3.tgz#26393a0806501b5e2b6a43aa588a4d8df67880ac"
+ integrity sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
@@ -396,26 +403,26 @@
globals "^14.0.0"
ignore "^5.2.0"
import-fresh "^3.2.1"
- js-yaml "^4.1.0"
+ js-yaml "^4.1.1"
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/js@9.20.0":
- version "9.20.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.20.0.tgz#7421bcbe74889fcd65d1be59f00130c289856eb4"
- integrity sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==
+"@eslint/js@9.39.1":
+ version "9.39.1"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.1.tgz#0dd59c3a9f40e3f1882975c321470969243e0164"
+ integrity sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==
-"@eslint/object-schema@^2.1.6":
- version "2.1.6"
- resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f"
- integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==
+"@eslint/object-schema@^2.1.7":
+ version "2.1.7"
+ resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad"
+ integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==
-"@eslint/plugin-kit@^0.2.5":
- version "0.2.5"
- resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz#ee07372035539e7847ef834e3f5e7b79f09e3a81"
- integrity sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==
+"@eslint/plugin-kit@^0.4.1":
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2"
+ integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==
dependencies:
- "@eslint/core" "^0.10.0"
+ "@eslint/core" "^0.17.0"
levn "^0.4.1"
"@humanfs/core@^0.19.1":
@@ -441,10 +448,10 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a"
integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==
-"@humanwhocodes/retry@^0.4.1":
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b"
- integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==
+"@humanwhocodes/retry@^0.4.2":
+ version "0.4.3"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba"
+ integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==
"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
@@ -938,11 +945,11 @@
undici-types "~5.26.4"
"@types/node@^20.17.6":
- version "20.17.6"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.6.tgz#6e4073230c180d3579e8c60141f99efdf5df0081"
- integrity sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==
+ version "20.19.11"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.11.tgz#728cab53092bd5f143beed7fbba7ba99de3c16c4"
+ integrity sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow==
dependencies:
- undici-types "~6.19.2"
+ undici-types "~6.21.0"
"@types/stack-utils@^2.0.0":
version "2.0.3"
@@ -1057,6 +1064,11 @@ acorn@^8.14.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0"
integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==
+acorn@^8.15.0:
+ version "8.15.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816"
+ integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==
+
acorn@^8.4.1:
version "8.7.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf"
@@ -1560,15 +1572,15 @@ eslint-plugin-unused-imports@^4.1.4:
resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738"
integrity sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==
-eslint-scope@^8.2.0:
- version "8.2.0"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442"
- integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==
+eslint-scope@^8.4.0:
+ version "8.4.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.4.0.tgz#88e646a207fad61436ffa39eb505147200655c82"
+ integrity sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==
dependencies:
esrecurse "^4.3.0"
estraverse "^5.2.0"
-eslint-visitor-keys@^3.3.0:
+eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
@@ -1578,31 +1590,36 @@ eslint-visitor-keys@^4.2.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45"
integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==
-eslint@^9.20.1:
- version "9.20.1"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.20.1.tgz#923924c078f5226832449bac86662dd7e53c91d6"
- integrity sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g==
+eslint-visitor-keys@^4.2.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1"
+ integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==
+
+eslint@^9.39.1:
+ version "9.39.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.1.tgz#be8bf7c6de77dcc4252b5a8dcb31c2efff74a6e5"
+ integrity sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==
dependencies:
- "@eslint-community/eslint-utils" "^4.2.0"
+ "@eslint-community/eslint-utils" "^4.8.0"
"@eslint-community/regexpp" "^4.12.1"
- "@eslint/config-array" "^0.19.0"
- "@eslint/core" "^0.11.0"
- "@eslint/eslintrc" "^3.2.0"
- "@eslint/js" "9.20.0"
- "@eslint/plugin-kit" "^0.2.5"
+ "@eslint/config-array" "^0.21.1"
+ "@eslint/config-helpers" "^0.4.2"
+ "@eslint/core" "^0.17.0"
+ "@eslint/eslintrc" "^3.3.1"
+ "@eslint/js" "9.39.1"
+ "@eslint/plugin-kit" "^0.4.1"
"@humanfs/node" "^0.16.6"
"@humanwhocodes/module-importer" "^1.0.1"
- "@humanwhocodes/retry" "^0.4.1"
+ "@humanwhocodes/retry" "^0.4.2"
"@types/estree" "^1.0.6"
- "@types/json-schema" "^7.0.15"
ajv "^6.12.4"
chalk "^4.0.0"
cross-spawn "^7.0.6"
debug "^4.3.2"
escape-string-regexp "^4.0.0"
- eslint-scope "^8.2.0"
- eslint-visitor-keys "^4.2.0"
- espree "^10.3.0"
+ eslint-scope "^8.4.0"
+ eslint-visitor-keys "^4.2.1"
+ espree "^10.4.0"
esquery "^1.5.0"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
@@ -1618,7 +1635,7 @@ eslint@^9.20.1:
natural-compare "^1.4.0"
optionator "^0.9.3"
-espree@^10.0.1, espree@^10.3.0:
+espree@^10.0.1:
version "10.3.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a"
integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==
@@ -1627,6 +1644,15 @@ espree@^10.0.1, espree@^10.3.0:
acorn-jsx "^5.3.2"
eslint-visitor-keys "^4.2.0"
+espree@^10.4.0:
+ version "10.4.0"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837"
+ integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==
+ dependencies:
+ acorn "^8.15.0"
+ acorn-jsx "^5.3.2"
+ eslint-visitor-keys "^4.2.1"
+
esprima@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
@@ -2440,10 +2466,10 @@ js-yaml@^3.13.1:
argparse "^1.0.7"
esprima "^4.0.0"
-js-yaml@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
- integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
+js-yaml@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b"
+ integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==
dependencies:
argparse "^2.0.1"
@@ -3283,9 +3309,9 @@ ts-node@^10.5.0:
v8-compile-cache-lib "^3.0.0"
yn "3.1.1"
-"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz":
- version "1.1.8"
- resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz#f544b359b8f05e607771ffacc280e58201476b04"
+"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz":
+ version "1.1.9"
+ resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz#777f6f5d9e26bf0e94e5170990dd3a841d6707cd"
dependencies:
debug "^4.3.7"
fast-glob "^3.3.2"
@@ -3353,10 +3379,10 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
-undici-types@~6.19.2:
- version "6.19.8"
- resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
- integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
+undici-types@~6.21.0:
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
+ integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==
unicode-emoji-modifier-base@^1.0.0:
version "1.0.0"