@gitterm/opencode-cloud 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,6 +9,8 @@ session stays local? Use [`@gitterm/opencode-sandbox`](../opencode-sandbox/READM
9
9
 
10
10
  ## 1. Install
11
11
 
12
+ Requires OpenCode 2.2.6 or newer.
13
+
12
14
  ```sh
13
15
  opencode plugin add @gitterm/opencode-cloud
14
16
  ```
@@ -24,7 +26,7 @@ In GitTerm, add your model credentials and repository access first.
24
26
 
25
27
  ## 3. Use it
26
28
 
27
- In a Git repository, stop the agent if it is running, then type:
29
+ In a Git repository, stop the agent and finish or stop its background jobs, then type:
28
30
 
29
31
  ```text
30
32
  /cloud
package/dist/index.js CHANGED
@@ -3865,6 +3865,9 @@ async function assertIdle(client, sessionID, signal) {
3865
3865
  if ((await client.session.active({ signal }))[sessionID]) {
3866
3866
  throw new Error("Stop this session's running agent before continuing in the cloud. Other sessions will not be interrupted.");
3867
3867
  }
3868
+ const jobs = await client.experimental.job.list({ sessionID, status: "running", descendants: true }, { signal });
3869
+ if (jobs.length > 0)
3870
+ throw new Error("This session has running background jobs. Let them finish or stop them before continuing in the cloud; running processes cannot be transferred.");
3868
3871
  if ((await client.session.inbox.list({ sessionID }, { signal })).length > 0) {
3869
3872
  throw new Error("This session has pending input. Finish or cancel it before continuing in the cloud.");
3870
3873
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitterm/opencode-cloud",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Continue OpenCode sessions and local checkout changes in GitTerm cloud workspaces with /cloud",
5
5
  "keywords": [
6
6
  "gitterm",
@@ -12,6 +12,11 @@
12
12
  "homepage": "https://gitterm.dev",
13
13
  "license": "MIT",
14
14
  "author": "Opeyemi Oginni",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/OpeOginni/gitterm.git",
18
+ "directory": "packages/opencode-cloud"
19
+ },
15
20
  "files": [
16
21
  "dist",
17
22
  "README.md"
@@ -34,16 +39,16 @@
34
39
  "prepack": "bun run check-types && bun run build"
35
40
  },
36
41
  "dependencies": {
37
- "@opencode/client": "^2.2.5"
42
+ "@opencode/client": "^2.2.6"
38
43
  },
39
44
  "devDependencies": {
40
45
  "@gitterm/sdk": "workspace:*",
41
- "@opencode/plugin": "^2.2.5",
46
+ "@opencode/plugin": "^2.2.6",
42
47
  "@types/bun": "^1.2.6",
43
48
  "typescript": "^5.8.2"
44
49
  },
45
50
  "peerDependencies": {
46
- "@opencode/plugin": "^2.2.5"
51
+ "@opencode/plugin": "^2.2.6"
47
52
  },
48
53
  "engines": {
49
54
  "bun": ">=1.2.0"