@rzx/ohs 1.0.8 → 1.1.1

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
@@ -8,7 +8,7 @@ OpenHarness-ts 终端 CLI:在终端里跑 AI Agent。默认进入交互式 TUI
8
8
 
9
9
  - Node.js >= 20
10
10
  - 交互式 TUI:额外安装 [Bun](https://bun.sh)
11
- - 可选:Docker(启用 sandbox 时)
11
+ - 可选:SRT(启用本机 sandbox 时);Windows 可选择 WSL 作为 Agent 运行环境
12
12
 
13
13
  ## 安装
14
14
 
@@ -88,7 +88,7 @@ ohs auth status
88
88
  ohs provider list|use|add|edit|remove
89
89
  ohs mcp list|add|remove
90
90
  ohs plugin list|install|uninstall|enable|disable
91
- ohs sandbox on|off|status|doctor
91
+ ohs sandbox enable|disable|status|check
92
92
  ohs daemon start|status|stop|install|uninstall
93
93
  ohs config show
94
94
  ohs config set <key> <value>
@@ -117,4 +117,4 @@ ohs config set daemon.autoStart true
117
117
  - 项目文档:[https://github.com/rzx007/openharness-ts/tree/main/docs](https://github.com/rzx007/openharness-ts/tree/main/docs)
118
118
  - 问题反馈:[https://github.com/rzx007/openharness-ts/issues](https://github.com/rzx007/openharness-ts/issues)
119
119
 
120
- 本地从源码开发请看仓库根目录 `README.md`。
120
+ 本地从源码开发请看仓库根目录 `README.md`。
@@ -504,13 +504,29 @@ function decodeJobWaitResult(value) {
504
504
  }
505
505
  function decodeTerminalSessionInfo(value) {
506
506
  const terminal = object(value, "terminal");
507
- for (const field of ["id", "name", "projectId", "cwd", "shell", "createdAt"]) {
507
+ for (const field of ["id", "name", "cwd", "shell", "createdAt"]) {
508
508
  stringField(terminal, field, "terminal");
509
509
  }
510
- enumField(terminal, "runtime", "terminal", ["local", "sandbox"]);
510
+ const scope = recordField(terminal, "scope", "terminal");
511
+ const scopeKind = enumField(scope, "kind", "terminal.scope", ["project", "session"]);
512
+ if (scopeKind === "project") {
513
+ const projectId = stringField(scope, "projectId", "terminal.scope");
514
+ optionalString(terminal, "projectId", "terminal");
515
+ if (terminal.projectId !== undefined && terminal.projectId !== projectId) {
516
+ throw new ProtocolDataError("terminal.projectId must match terminal.scope.projectId", "terminal.projectId");
517
+ }
518
+ } else {
519
+ const sessionId = stringField(scope, "sessionId", "terminal.scope");
520
+ optionalString(terminal, "sessionId", "terminal");
521
+ if (terminal.sessionId !== undefined && terminal.sessionId !== sessionId) {
522
+ throw new ProtocolDataError("terminal.sessionId must match terminal.scope.sessionId", "terminal.sessionId");
523
+ }
524
+ }
525
+ optionalString(terminal, "projectId", "terminal");
526
+ optionalString(terminal, "sessionId", "terminal");
527
+ enumField(terminal, "runtime", "terminal", ["local", "environment"]);
511
528
  enumField(terminal, "source", "terminal", ["user", "agent"]);
512
529
  enumField(terminal, "status", "terminal", ["running", "stopping", "completed", "killed", "failed"]);
513
- optionalString(terminal, "sessionId", "terminal");
514
530
  numberField(terminal, "cols", "terminal");
515
531
  numberField(terminal, "rows", "terminal");
516
532
  optionalString(terminal, "exitedAt", "terminal");
@@ -1084,6 +1100,18 @@ class OpenHarnessClient {
1084
1100
  signal: options.signal
1085
1101
  });
1086
1102
  }
1103
+ async listSkills(options = {}) {
1104
+ return await this.request("/skills", {
1105
+ signal: options.signal
1106
+ });
1107
+ }
1108
+ async removeSkill(id, input, options = {}) {
1109
+ return await this.request(`/skills/${encodeURIComponent(id)}`, {
1110
+ method: "DELETE",
1111
+ body: input,
1112
+ signal: options.signal
1113
+ });
1114
+ }
1087
1115
  async listAgentPersonas(options = {}) {
1088
1116
  const response = await this.request("/agent-personas", {
1089
1117
  signal: options.signal
@@ -8056,4 +8084,4 @@ try {
8056
8084
  process.exit(1);
8057
8085
  }
8058
8086
 
8059
- //# debugId=5DBCBBC40135AE2E64756E2164756E21
8087
+ //# debugId=336ABBB32A8FF01B64756E2164756E21