@parcha/agentrun 0.4.0 → 0.4.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
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @parcha/agentrun
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AgentRun is an open-source platform that supercharges your agents. It adds self-improvement, durable execution and a
|
|
4
|
+
control plane on top of your favorite agent harness. Your agents become smarter, more fault tolerant and use fewer
|
|
5
|
+
tokens with every run. Start it on your machine with one command:
|
|
4
6
|
|
|
5
7
|
```sh
|
|
6
8
|
npx @parcha/agentrun
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by scripts/generate-clients.mjs from the server's OpenAPI document. Do not edit: run node scripts/generate-clients.mjs.
|
|
2
|
-
// SHA-256 of what the table is made of (operationsOf in scripts/generate-clients.mjs):
|
|
2
|
+
// SHA-256 of what the table is made of (operationsOf in scripts/generate-clients.mjs): e6a39ba1ef14ca4138503e3dd9e66e9bebd6d9beb91fad5fbfec0a38296841d8
|
|
3
3
|
export const COMMANDS = [
|
|
4
4
|
{
|
|
5
5
|
"command": [
|
package/lib/start.mjs
CHANGED
|
@@ -27,6 +27,10 @@ export function openLineUrl(line, publicUrl) {
|
|
|
27
27
|
return publicUrl !== undefined && URL.canParse(publicUrl) && url.origin === new URL(publicUrl).origin ? word : undefined;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
/** The line an API-only server (AGENTRUN_API_ONLY=1) prints in place of its "Open " line: it has no console to open, so
|
|
31
|
+
* the address this command names is the server's API, from the AGENTRUN_BASE_URL line before it. */
|
|
32
|
+
export const API_ONLY_LINE = /^API only \(AGENTRUN_API_ONLY=1\)/;
|
|
33
|
+
|
|
30
34
|
/** How many of the server's last output lines a start that fails shows. */
|
|
31
35
|
export const TAIL_LINES = 20;
|
|
32
36
|
|
|
@@ -37,7 +41,9 @@ export const SAID = /^(Boxes: |Preparing the Docker box image |The Docker box im
|
|
|
37
41
|
|
|
38
42
|
/** The address a person opens first, as the server says it: the URL of the first "Open " line of its output that names
|
|
39
43
|
* one (openLineUrl). That line is the server's interface for it (the plain address today, a single-use sign-in link
|
|
40
|
-
* once the server prints one), so this command never builds the address itself.
|
|
44
|
+
* once the server prints one), so this command never builds the address itself. An API-only server prints no such line:
|
|
45
|
+
* its API-only line (API_ONLY_LINE) stands for it, and the address is its AGENTRUN_BASE_URL line's, held to the same
|
|
46
|
+
* hosts as an "Open " line's. Resolves undefined when the output ends
|
|
41
47
|
* without one. Until then, the last TAIL_LINES lines before it are kept in `seen`: what a start that fails shows, and each
|
|
42
48
|
* goes to `onBefore`. Every whole line after it goes to `onLine`; the rest of the output is read and dropped, so the
|
|
43
49
|
* server never blocks on a full pipe. */
|
|
@@ -50,6 +56,8 @@ export function openUrl(stdout, publicUrl, seen = [], onLine = () => {}, onBefor
|
|
|
50
56
|
return new Promise((resolve) => {
|
|
51
57
|
let pending = "";
|
|
52
58
|
let found;
|
|
59
|
+
// The API's address, from the banner's AGENTRUN_BASE_URL line: what an API-only server's line stands for.
|
|
60
|
+
let base;
|
|
53
61
|
stdout.setEncoding("utf8");
|
|
54
62
|
stdout.on("data", (chunk) => {
|
|
55
63
|
pending += chunk;
|
|
@@ -58,7 +66,12 @@ export function openUrl(stdout, publicUrl, seen = [], onLine = () => {}, onBefor
|
|
|
58
66
|
pending = pending.slice(end + 1);
|
|
59
67
|
if (found !== undefined) onLine(line);
|
|
60
68
|
else if ((found = openLineUrl(line, publicUrl)) !== undefined) resolve(found);
|
|
61
|
-
else
|
|
69
|
+
else if (base !== undefined && API_ONLY_LINE.test(line)) resolve((found = base));
|
|
70
|
+
else {
|
|
71
|
+
const named = /^AGENTRUN_BASE_URL=(\S+)$/.exec(line)?.[1];
|
|
72
|
+
if (named !== undefined && openLineUrl(`Open ${named}`, publicUrl) !== undefined) base = named;
|
|
73
|
+
keep(line);
|
|
74
|
+
}
|
|
62
75
|
}
|
|
63
76
|
});
|
|
64
77
|
stdout.on("end", () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcha/agentrun",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "AgentRun, the open-source platform that supercharges your agents (self-improvement, durable execution and a control plane on top of your favorite agent harness), on this machine with one command: npx @parcha/agentrun",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"bin": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"NOTICE"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@parcha/agentrun-serve": "0.1.0-beta.
|
|
19
|
+
"@parcha/agentrun-serve": "0.1.0-beta.33"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "node --test 'test/*.test.mjs'"
|
|
@@ -3,7 +3,7 @@ name: agentrun-cli
|
|
|
3
3
|
description: Drive an AgentRun server from a shell with the agentrun CLI. Make an agent from a definition file, start a run with a spend cap and wait for it, answer a run that asks a question, read the files it wrote and what it cost, save tool keys, and call any other route of the server. Use when asked to run or manage AgentRun agents from the terminal or a script, or for anything the server's MCP tools do not cover (files, tool keys, triggers, webhooks, revisions, learning).
|
|
4
4
|
---
|
|
5
5
|
<!-- Generated by scripts/generate-clients.mjs from the server's OpenAPI document and its skill template. Do not edit: run node scripts/generate-clients.mjs. -->
|
|
6
|
-
<!-- SHA-256 of what the command table is made of (operationsOf in scripts/generate-clients.mjs):
|
|
6
|
+
<!-- SHA-256 of what the command table is made of (operationsOf in scripts/generate-clients.mjs): e6a39ba1ef14ca4138503e3dd9e66e9bebd6d9beb91fad5fbfec0a38296841d8 -->
|
|
7
7
|
|
|
8
8
|
# AgentRun CLI
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# agentrun commands
|
|
2
2
|
|
|
3
3
|
<!-- Generated by scripts/generate-clients.mjs from the server's OpenAPI document. Do not edit: run node scripts/generate-clients.mjs. -->
|
|
4
|
-
<!-- SHA-256 of what the command table is made of (operationsOf in scripts/generate-clients.mjs):
|
|
4
|
+
<!-- SHA-256 of what the command table is made of (operationsOf in scripts/generate-clients.mjs): e6a39ba1ef14ca4138503e3dd9e66e9bebd6d9beb91fad5fbfec0a38296841d8 -->
|
|
5
5
|
|
|
6
6
|
Every command of the agentrun CLI, by group. Arguments in capitals are positional; every command also takes `--base-url URL`, `--data DIR` and `--help`. A body field with one value (a string, number or boolean) is a flag of its own, and `--body` gives the whole body. A positional argument is refused when it is or holds a `.` or `..` path segment; a file's PATH keeps its slashes, and no segment of it may be empty.
|
|
7
7
|
|