copilotz 1.0.0-rc.18 → 1.0.0-rc.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +2 -2
- package/package.json +1 -1
- package/plugins/compute/computers/program/version.d.ts +1 -1
- package/plugins/compute/computers/program/version.js +1 -1
- package/plugins/compute/computers/resources/downloads.js +1 -1
- package/plugins/compute/computers/resources/tools.js +47 -7
- package/plugins/compute/computers/views/web/calls.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 1.0.0-rc.19 — 2026-11-03
|
|
2
|
+
|
|
3
|
+
- **`terminal` takes the command in `command`.** It took it in `stdin`, while `start_job` takes
|
|
4
|
+
`command`, and the tool answered any other field with an empty success: a model that sent
|
|
5
|
+
`command` (gpt-6-luna in 21 of 22 calls in our tests, Claude Haiku 5.5 in 7 of 35) was told it ran
|
|
6
|
+
when nothing had. Now `command` runs a command; `commandId` with `stdin` answers a running one,
|
|
7
|
+
and with `operation: "interrupt"` stops it. A call it can't read (another field, both a command
|
|
8
|
+
and a commandId, an empty command, `stdin` without a commandId) runs nothing and says what to give
|
|
9
|
+
instead. The computer program is unchanged. A chat shows the command from `command`, and from
|
|
10
|
+
`stdin` on calls made before.
|
|
11
|
+
|
|
1
12
|
## 1.0.0-rc.18 — 2026-11-03
|
|
2
13
|
|
|
3
14
|
- **Model tiers for the app's agents** (the new `tiers` plugin, in `copilotz/plugins/agents`). An
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ bun add copilotz # Bun
|
|
|
22
22
|
deno add jsr:@copilotz/copilotz # Deno (or `deno add npm:copilotz`)
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.
|
|
25
|
+
On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.19"`),
|
|
26
26
|
and the imports below are the same everywhere. Some pieces need a package of their own, installed
|
|
27
27
|
beside it: `esbuild` to bundle the web host on Node, `@electric-sql/pglite` for PostgreSQL in the
|
|
28
28
|
process, and `@types/react` for the front ends' types.
|
|
@@ -204,7 +204,7 @@ and an app serves it from there by default:
|
|
|
204
204
|
import { computerDownloads } from "copilotz/plugins/compute/downloads";
|
|
205
205
|
|
|
206
206
|
plugins: [...plugins, await computerDownloads()], // this Copilotz's release
|
|
207
|
-
plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.
|
|
207
|
+
plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.19" })], // its own: /computer/download/
|
|
208
208
|
plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })], // or elsewhere
|
|
209
209
|
```
|
|
210
210
|
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The computer program's version, as `computer.info` and `--version` say it, and its builds are named. */
|
|
2
|
-
export declare const VERSION = "1.0.0-rc.
|
|
2
|
+
export declare const VERSION = "1.0.0-rc.19";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The computer program's version, as `computer.info` and `--version` say it, and its builds are named. */
|
|
2
|
-
export const VERSION = "1.0.0-rc.
|
|
2
|
+
export const VERSION = "1.0.0-rc.19";
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* ```ts
|
|
16
16
|
* plugins: [...plugins, await computerDownloads()]
|
|
17
|
-
* plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.
|
|
17
|
+
* plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.19" })]
|
|
18
18
|
* plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })]
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
@@ -72,21 +72,61 @@ async function on(ctx, work, given, asked) {
|
|
|
72
72
|
const terminal = tool({
|
|
73
73
|
description: "Runs a command in your own shell on your person's computer, in this space's " +
|
|
74
74
|
"folder: bash on macOS and Linux, PowerShell on Windows (your context says which this " +
|
|
75
|
-
"computer has). Your working directory and environment persist
|
|
76
|
-
'answers within about a second: if the command is still "running",
|
|
77
|
-
"
|
|
78
|
-
"interrupt
|
|
75
|
+
"computer has). Give it in command. Your working directory and environment persist " +
|
|
76
|
+
'between calls. It answers within about a second: if the command is still "running", ' +
|
|
77
|
+
"call again with its commandId to see more, with its commandId and stdin to answer a " +
|
|
78
|
+
"prompt, or with its commandId and operation interrupt to stop it. For servers and other " +
|
|
79
|
+
"long-running commands, use start_job instead.",
|
|
79
80
|
input: {
|
|
80
81
|
type: "object",
|
|
81
82
|
properties: {
|
|
82
|
-
|
|
83
|
-
commandId: {
|
|
83
|
+
command: { type: "string", description: "The command to run." },
|
|
84
|
+
commandId: {
|
|
85
|
+
type: "string",
|
|
86
|
+
description: "A running command's, to see more of it, answer it or stop it.",
|
|
87
|
+
},
|
|
88
|
+
stdin: { type: "string", description: "Input for the running command (with its commandId)." },
|
|
84
89
|
operation: { enum: ["interrupt"] },
|
|
85
90
|
computer: computerChoice,
|
|
86
91
|
},
|
|
92
|
+
additionalProperties: false,
|
|
93
|
+
},
|
|
94
|
+
run: (input, ctx) => {
|
|
95
|
+
const wrong = misused(input);
|
|
96
|
+
if (wrong)
|
|
97
|
+
return `Error: nothing ran: ${wrong}`;
|
|
98
|
+
// The computer's shell takes a new command as its input, as its program always has.
|
|
99
|
+
const { command, ...rest } = input;
|
|
100
|
+
return command
|
|
101
|
+
? on(ctx, WORK.terminal, { ...rest, stdin: command }, { kind: "terminal", detail: command })
|
|
102
|
+
: on(ctx, WORK.terminal, rest);
|
|
87
103
|
},
|
|
88
|
-
run: (input, ctx) => on(ctx, WORK.terminal, input, input.stdin && !input.commandId ? { kind: "terminal", detail: input.stdin } : undefined),
|
|
89
104
|
});
|
|
105
|
+
/**
|
|
106
|
+
* Why a terminal call can't run as given, else undefined. A call it can't
|
|
107
|
+
* read is refused with what to give instead, never answered with an empty
|
|
108
|
+
* success: a model that sent the command under another name would think it
|
|
109
|
+
* ran.
|
|
110
|
+
*/
|
|
111
|
+
function misused(input) {
|
|
112
|
+
const known = ["command", "commandId", "stdin", "operation", "computer"];
|
|
113
|
+
const other = Object.keys(input).filter((key) => !known.includes(key));
|
|
114
|
+
if (other.length) {
|
|
115
|
+
return `terminal takes no ${other.join(" or ")}. Give a new command in command; for a ` +
|
|
116
|
+
"running one, its commandId, with stdin to answer it or operation interrupt to stop it.";
|
|
117
|
+
}
|
|
118
|
+
if (input.command !== undefined && input.commandId !== undefined) {
|
|
119
|
+
return "give a new command (command) or a running one's commandId, not both.";
|
|
120
|
+
}
|
|
121
|
+
if (input.command !== undefined) {
|
|
122
|
+
return String(input.command).trim() ? undefined : "command is empty.";
|
|
123
|
+
}
|
|
124
|
+
if (input.commandId !== undefined)
|
|
125
|
+
return undefined;
|
|
126
|
+
return input.stdin !== undefined
|
|
127
|
+
? "stdin answers a running command, with its commandId. Give a new command in command."
|
|
128
|
+
: "give the command to run in command.";
|
|
129
|
+
}
|
|
90
130
|
const startJob = tool({
|
|
91
131
|
description: "Starts a command that keeps running in the background (a dev server, a watcher, a " +
|
|
92
132
|
"long build), in this space's folder, in the terminal's shell (bash, or PowerShell on " +
|
|
@@ -36,6 +36,8 @@ const isResult = (value) => record(value) && (value.state === "running" || value
|
|
|
36
36
|
export function terminalCall(call) {
|
|
37
37
|
const input = call.input ?? {};
|
|
38
38
|
const stdin = typeof input.stdin === "string" ? input.stdin : "";
|
|
39
|
+
// A command is in `command`; calls from before it said so gave it as `stdin`.
|
|
40
|
+
const text = typeof input.command === "string" ? input.command : stdin;
|
|
39
41
|
const mode = input.operation === "interrupt"
|
|
40
42
|
? "interrupt"
|
|
41
43
|
: !input.commandId
|
|
@@ -46,7 +48,7 @@ export function terminalCall(call) {
|
|
|
46
48
|
const done = outcome(call);
|
|
47
49
|
return {
|
|
48
50
|
mode,
|
|
49
|
-
text:
|
|
51
|
+
text: text.replace(/\n$/, ""),
|
|
50
52
|
...(done.kind === "done" && isResult(done.value) ? { result: done.value } : {}),
|
|
51
53
|
};
|
|
52
54
|
}
|