@parcha/agentrun-client 0.1.0-beta.56 → 0.1.0-beta.58
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 +5 -1
- package/dist/client.d.ts +3 -2
- package/dist/client.js +21 -7
- package/dist/errors.d.ts +4 -2
- package/dist/errors.js +14 -4
- package/dist/operations.generated.d.ts +168 -4
- package/dist/operations.generated.js +23 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -47,7 +47,11 @@ import { AgentRun } from "@parcha/agentrun-client";
|
|
|
47
47
|
const client = new AgentRun({ baseUrl: "https://agentrun.example.com/v2", apiKey: process.env.AGENTRUN_API_KEY });
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
`baseUrl` defaults to `AGENTRUN_BASE_URL` and `apiKey` to `AGENTRUN_API_KEY
|
|
50
|
+
`baseUrl` defaults to `AGENTRUN_BASE_URL` and `apiKey` to `AGENTRUN_API_KEY`, else `AGENTRUN_TOKEN`. `AGENTRUN_TOKEN` is the
|
|
51
|
+
name the local server gives its token, so the client sends it only to a server on this machine (`localhost`, `127.0.0.1` or
|
|
52
|
+
`[::1]`, as the CLI); any other address takes `AGENTRUN_API_KEY` or `apiKey`, and with neither is refused. The base URL is the
|
|
53
|
+
server's address with or without `/v2`: as the CLI takes it, `/v2` is added when its path holds no `v2` segment, a path
|
|
54
|
+
prefix kept. It must be http or https with no
|
|
51
55
|
query, fragment, user or password, and the key must be a valid header value; both are checked here, before any request. The
|
|
52
56
|
client reads no file: finding the server started on this machine (its data directory and the address it records there) is
|
|
53
57
|
the CLI's job (`npx @parcha/agentrun`), not this package's. Other options: `timeoutMs` for one try of a request (default
|
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type FollowOptions, type WaitOptions } from "./live.js";
|
|
2
2
|
import { type Resources, type Run, type TimelinePage } from "./operations.generated.js";
|
|
3
3
|
export interface ClientOptions {
|
|
4
|
-
/** The server's
|
|
4
|
+
/** The server's address (default: AGENTRUN_BASE_URL), with /v2 added when its path holds no v2 segment, as the CLI takes
|
|
5
|
+
* it: http or https, with no query, fragment, user or password. */
|
|
5
6
|
baseUrl?: string;
|
|
6
|
-
/** The API key (default: AGENTRUN_API_KEY). */
|
|
7
|
+
/** The API key (default: AGENTRUN_API_KEY, else AGENTRUN_TOKEN for a server on this machine). */
|
|
7
8
|
apiKey?: string;
|
|
8
9
|
/** How long one try of a request may take, in milliseconds (default 60000). */
|
|
9
10
|
timeoutMs?: number;
|
package/dist/client.js
CHANGED
|
@@ -33,16 +33,24 @@ const retryAfterOf = (response) => {
|
|
|
33
33
|
return Number.isFinite(ms) ? Math.max(0, ms) : 0;
|
|
34
34
|
};
|
|
35
35
|
const env = (name) => globalThis.process?.env?.[name];
|
|
36
|
-
/** A base URL as the client takes it; `where` names it in the refusal. The URL itself is never echoed: it may hold a password.
|
|
36
|
+
/** A base URL as the client takes it; `where` names it in the refusal. The URL itself is never echoed: it may hold a password.
|
|
37
|
+
* As the CLI takes one: the trailing slashes cut, and /v2 added when the path holds no v2 segment, so
|
|
38
|
+
* `https://host/prefix` is `https://host/prefix/v2` and `https://host/v2/` is `https://host/v2`. */
|
|
37
39
|
function baseOf(given, where) {
|
|
38
40
|
if (given === undefined || given === "")
|
|
39
|
-
throw new AgentRunUsage("No server: pass baseUrl, or set AGENTRUN_BASE_URL, to the
|
|
41
|
+
throw new AgentRunUsage("No server: pass baseUrl, or set AGENTRUN_BASE_URL, to the server's address (/v2 is added when its path holds none).");
|
|
40
42
|
const url = URL.canParse(given) ? new URL(given) : undefined;
|
|
41
43
|
if (!url || !/^https?:$/.test(url.protocol) || /[?#]/.test(given) || url.username || url.password) {
|
|
42
|
-
throw new AgentRunUsage(`${where} must be an http or https URL with no query, fragment, user or password: the
|
|
44
|
+
throw new AgentRunUsage(`${where} must be an http or https URL with no query, fragment, user or password: the server's address, with or without /v2.`);
|
|
43
45
|
}
|
|
44
|
-
|
|
46
|
+
const base = given.replace(/\/+$/, "");
|
|
47
|
+
return new URL(base).pathname.split("/").includes("v2") ? base : `${base}/v2`;
|
|
45
48
|
}
|
|
49
|
+
/** The hosts AgentRun's CLI takes as this machine (packages/agentrun/lib/device.mjs LOOPBACK, which this package cannot
|
|
50
|
+
* import; python/agentrun/_client.py holds the same three). AGENTRUN_TOKEN, the name a local server gives its token, goes
|
|
51
|
+
* to no other host; a remote server takes AGENTRUN_API_KEY. */
|
|
52
|
+
const LOOPBACK = new Set(["localhost", "127.0.0.1", "[::1]"]); // key-gate: loopback-rule the hosts AGENTRUN_TOKEN may go to
|
|
53
|
+
const loopback = (base) => LOOPBACK.has(new URL(base).hostname);
|
|
46
54
|
const positive = (value, name, whole = false) => {
|
|
47
55
|
if (value !== undefined && (!Number.isFinite(value) || value < (whole ? 0 : 1) || (whole && !Number.isInteger(value))))
|
|
48
56
|
throw new AgentRunUsage(`${name} must be ${whole ? "a whole number, 0 or more" : "a number of milliseconds, 1 or more"}.`);
|
|
@@ -59,9 +67,15 @@ export class AgentRun {
|
|
|
59
67
|
#reached = false;
|
|
60
68
|
constructor(options = {}) {
|
|
61
69
|
this.baseUrl = baseOf(options.baseUrl ?? env("AGENTRUN_BASE_URL"), options.baseUrl !== undefined ? "baseUrl" : "AGENTRUN_BASE_URL");
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
// AGENTRUN_TOKEN, the name the server and its setup page give the token, stands in when AGENTRUN_API_KEY is not set,
|
|
71
|
+
// for a server on this machine alone: a local server's token is never sent to a remote address.
|
|
72
|
+
const token = loopback(this.baseUrl) ? env("AGENTRUN_TOKEN") : undefined;
|
|
73
|
+
const key = options.apiKey ?? (env("AGENTRUN_API_KEY") || token);
|
|
74
|
+
if (!key) {
|
|
75
|
+
throw new AgentRunAuthError("no_token", !loopback(this.baseUrl) && env("AGENTRUN_TOKEN")
|
|
76
|
+
? `No API key for ${new URL(this.baseUrl).origin}: AGENTRUN_TOKEN goes only to a server on this machine; pass apiKey, or set AGENTRUN_API_KEY.`
|
|
77
|
+
: "No API key: pass apiKey, or set AGENTRUN_API_KEY (or AGENTRUN_TOKEN for a server on this machine).");
|
|
78
|
+
}
|
|
65
79
|
// Refused before it is sent: fetch would quote a bad header value in its error.
|
|
66
80
|
if (BAD_HEADER.test(key) || /\s/.test(key))
|
|
67
81
|
throw new AgentRunAuthError("bad_header", "The API key is not a valid header value (it holds a space, a line break, a control character or a character outside Latin-1).");
|
package/dist/errors.d.ts
CHANGED
|
@@ -3,8 +3,10 @@ import type { Run } from "./operations.generated.js";
|
|
|
3
3
|
export type ServerError = Record<string, unknown>;
|
|
4
4
|
/** The most of the server's reason a message carries. */
|
|
5
5
|
export declare const REASON_CHARS = 300;
|
|
6
|
-
/** The server's reason as a message's end: `: <its message>`, on one line
|
|
7
|
-
*
|
|
6
|
+
/** The server's reason as a message's end: `: <its message>`, on one line (whitespace runs one space, every control,
|
|
7
|
+
* zero-width, bidi and BOM character dropped, the ends trimmed), at most REASON_CHARS characters (code points), the last
|
|
8
|
+
* a … when cut; empty when the error object holds no message, or none that survives. `error` is the one the client
|
|
9
|
+
* keeps, the key already cut from it. The same cases test both clients (packages/client/test/reason-cases.json). */
|
|
8
10
|
export declare function said(error: ServerError | undefined): string;
|
|
9
11
|
/** What every error of this client is: `kind` says which outcome it is. */
|
|
10
12
|
export declare abstract class AgentRunError extends Error {
|
package/dist/errors.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
/** The most of the server's reason a message carries. */
|
|
2
2
|
export const REASON_CHARS = 300;
|
|
3
|
-
/** The
|
|
4
|
-
*
|
|
3
|
+
/** The characters a reason keeps as one space: every whitespace run is one. Spelled out, not \s, so the Python client's
|
|
4
|
+
* rule (python/agentrun/_errors.py) is the same character for character. */
|
|
5
|
+
const SPACES = /[\t\n\v\f\r \u{85}\u{A0}\u{1680}\u{2000}-\u{200A}\u{2028}\u{2029}\u{202F}\u{205F}\u{3000}]+/gu;
|
|
6
|
+
/** The characters a reason drops: every other control character (C0, DEL, C1), the zero-width ones, the bidi controls and
|
|
7
|
+
* the BOM, none of which a terminal or a log shows as what it is. */
|
|
8
|
+
const DROPPED = /[\u{0}-\u{8}\u{E}-\u{1F}\u{7F}-\u{84}\u{86}-\u{9F}\u{200B}-\u{200F}\u{202A}-\u{202E}\u{2060}-\u{2064}\u{2066}-\u{2069}\u{FEFF}]/gu;
|
|
9
|
+
/** The server's reason as a message's end: `: <its message>`, on one line (whitespace runs one space, every control,
|
|
10
|
+
* zero-width, bidi and BOM character dropped, the ends trimmed), at most REASON_CHARS characters (code points), the last
|
|
11
|
+
* a … when cut; empty when the error object holds no message, or none that survives. `error` is the one the client
|
|
12
|
+
* keeps, the key already cut from it. The same cases test both clients (packages/client/test/reason-cases.json). */
|
|
5
13
|
export function said(error) {
|
|
6
14
|
const message = error?.message;
|
|
7
|
-
if (typeof message !== "string"
|
|
15
|
+
if (typeof message !== "string")
|
|
16
|
+
return "";
|
|
17
|
+
const line = [...message.replace(DROPPED, "").replace(SPACES, " ").trim()];
|
|
18
|
+
if (!line.length)
|
|
8
19
|
return "";
|
|
9
|
-
const line = [...message.trim().split(/\s+/).join(" ")];
|
|
10
20
|
return `: ${line.length <= REASON_CHARS ? line.join("") : `${line.slice(0, REASON_CHARS - 1).join("")}…`}`;
|
|
11
21
|
}
|
|
12
22
|
/** What every error of this client is: `kind` says which outcome it is. */
|
|
@@ -527,6 +527,10 @@ export type Cost = {
|
|
|
527
527
|
learning_usd?: number | null;
|
|
528
528
|
tools_usd?: number | null;
|
|
529
529
|
all_in_usd?: number | null;
|
|
530
|
+
compile_usd?: number | null;
|
|
531
|
+
followup_usd?: number | null;
|
|
532
|
+
shadow_usd?: number | null;
|
|
533
|
+
share_usd?: number | null;
|
|
530
534
|
degraded?: true;
|
|
531
535
|
plan?: {
|
|
532
536
|
requests: number;
|
|
@@ -705,7 +709,7 @@ export type Run = {
|
|
|
705
709
|
computer?: {
|
|
706
710
|
kind: "sandbox" | "desktop" | "phone" | "browser";
|
|
707
711
|
provider: string;
|
|
708
|
-
state: "starting" | "ready" | "taken_over" | "ended" | "failed";
|
|
712
|
+
state: "starting" | "ready" | "taken_over" | "released" | "ended" | "failed";
|
|
709
713
|
why?: string;
|
|
710
714
|
held?: {
|
|
711
715
|
state: "starting" | "waiting" | "started" | "ended" | "released";
|
|
@@ -847,6 +851,7 @@ export type RunFile = {
|
|
|
847
851
|
modified_at: Timestamp;
|
|
848
852
|
content_type?: string | null;
|
|
849
853
|
unreadable?: true;
|
|
854
|
+
name?: string;
|
|
850
855
|
};
|
|
851
856
|
export type MessageCreate = {
|
|
852
857
|
content: string;
|
|
@@ -908,6 +913,14 @@ export type TimelinePage = {
|
|
|
908
913
|
final: boolean;
|
|
909
914
|
cost: Cost;
|
|
910
915
|
poll_after_ms?: number;
|
|
916
|
+
in_flight?: Array<{
|
|
917
|
+
kind: "model" | "tool";
|
|
918
|
+
name: string;
|
|
919
|
+
started_at: string | null;
|
|
920
|
+
tool_use_id?: string;
|
|
921
|
+
for_tool?: string;
|
|
922
|
+
input_tokens_max?: number;
|
|
923
|
+
}>;
|
|
911
924
|
};
|
|
912
925
|
export type TimelineRow = {
|
|
913
926
|
id: string;
|
|
@@ -1055,6 +1068,7 @@ export type Capabilities = {
|
|
|
1055
1068
|
billing: "proxy" | "plan";
|
|
1056
1069
|
};
|
|
1057
1070
|
available: boolean;
|
|
1071
|
+
ready_models: Array<string>;
|
|
1058
1072
|
free_models: Array<{
|
|
1059
1073
|
id: string;
|
|
1060
1074
|
context_window: number;
|
|
@@ -1214,12 +1228,14 @@ export type Features = {
|
|
|
1214
1228
|
routes: boolean;
|
|
1215
1229
|
at_rest: "sealed";
|
|
1216
1230
|
harnesses: Array<string>;
|
|
1231
|
+
kept: Array<string>;
|
|
1217
1232
|
};
|
|
1218
1233
|
mcp_client?: {
|
|
1219
1234
|
transports: Array<"streamable-http">;
|
|
1220
1235
|
auth: Array<"none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run">;
|
|
1221
1236
|
at_rest: "sealed";
|
|
1222
1237
|
harnesses: Array<string>;
|
|
1238
|
+
composio_per_run: boolean;
|
|
1223
1239
|
};
|
|
1224
1240
|
tool_permissions?: boolean;
|
|
1225
1241
|
webhooks?: {
|
|
@@ -1228,6 +1244,11 @@ export type Features = {
|
|
|
1228
1244
|
signing: "standard-webhooks/v1";
|
|
1229
1245
|
at_rest: "sealed";
|
|
1230
1246
|
};
|
|
1247
|
+
api_keys?: {
|
|
1248
|
+
routes: boolean;
|
|
1249
|
+
limit: number;
|
|
1250
|
+
at_rest: "hashed";
|
|
1251
|
+
};
|
|
1231
1252
|
slack?: {
|
|
1232
1253
|
routes: boolean;
|
|
1233
1254
|
events: Array<"run.needs_input" | "run.ended" | "trigger.failed">;
|
|
@@ -1884,12 +1905,12 @@ export type GetAgentPackageResponse = {
|
|
|
1884
1905
|
sha256: string;
|
|
1885
1906
|
report: {
|
|
1886
1907
|
blocked: Array<{
|
|
1887
|
-
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "input_schema" | "budget" | "package";
|
|
1908
|
+
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "secrets" | "input_schema" | "budget" | "package";
|
|
1888
1909
|
name: string;
|
|
1889
1910
|
reason: string;
|
|
1890
1911
|
}>;
|
|
1891
1912
|
remade: Array<{
|
|
1892
|
-
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "input_schema" | "budget" | "package";
|
|
1913
|
+
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "secrets" | "input_schema" | "budget" | "package";
|
|
1893
1914
|
name: string;
|
|
1894
1915
|
reason: string;
|
|
1895
1916
|
}>;
|
|
@@ -2093,6 +2114,19 @@ export type VerifyNativeResponse = {
|
|
|
2093
2114
|
};
|
|
2094
2115
|
};
|
|
2095
2116
|
};
|
|
2117
|
+
/** The API keys made for this server's apps; never a key (GET /settings/api-keys). */
|
|
2118
|
+
export type ListApiKeysResponse = {
|
|
2119
|
+
keys: Array<{
|
|
2120
|
+
id: string;
|
|
2121
|
+
name: string;
|
|
2122
|
+
created_at: string;
|
|
2123
|
+
last_used_at: string | null;
|
|
2124
|
+
secret: SecretMeta;
|
|
2125
|
+
}>;
|
|
2126
|
+
limit: number;
|
|
2127
|
+
refused?: string;
|
|
2128
|
+
unreadable?: Array<string>;
|
|
2129
|
+
};
|
|
2096
2130
|
/** The runs waiting and held, the live runners and the recent hand-backs (GET /capacity). */
|
|
2097
2131
|
export interface GetCapacityParams {
|
|
2098
2132
|
window?: number;
|
|
@@ -2526,8 +2560,14 @@ export type ListHarnessKeysResponse = {
|
|
|
2526
2560
|
harnesses: Array<{
|
|
2527
2561
|
id: string;
|
|
2528
2562
|
label: string;
|
|
2563
|
+
named: boolean;
|
|
2529
2564
|
keys: Array<SecretMeta>;
|
|
2565
|
+
kept: Array<SecretMeta>;
|
|
2530
2566
|
ready: boolean;
|
|
2567
|
+
reenter: Array<{
|
|
2568
|
+
name: string;
|
|
2569
|
+
why: "recipe_changed" | "seal_key_changed" | "file_unreadable";
|
|
2570
|
+
}>;
|
|
2531
2571
|
}>;
|
|
2532
2572
|
};
|
|
2533
2573
|
/** Delete one file of the agent's home (DELETE /agents/{agent_id}/home/files/{path}). */
|
|
@@ -2585,6 +2625,11 @@ export type GetLearningCostResponse = {
|
|
|
2585
2625
|
cost_upper_bound: boolean;
|
|
2586
2626
|
learning_usd: number | null;
|
|
2587
2627
|
total_usd: number | null;
|
|
2628
|
+
compile_usd?: number | null;
|
|
2629
|
+
followup_usd?: number | null;
|
|
2630
|
+
shadow_usd?: number | null;
|
|
2631
|
+
share_usd?: number | null;
|
|
2632
|
+
not_served?: "cost_stop" | "cut" | null;
|
|
2588
2633
|
}>;
|
|
2589
2634
|
total_runs: number;
|
|
2590
2635
|
unknown_cost_runs: number;
|
|
@@ -2621,6 +2666,7 @@ export type GetLearningCostResponse = {
|
|
|
2621
2666
|
hand_backs: {
|
|
2622
2667
|
ran: number;
|
|
2623
2668
|
back: number;
|
|
2669
|
+
cut: number;
|
|
2624
2670
|
} | null;
|
|
2625
2671
|
withheld: {
|
|
2626
2672
|
unknown: number;
|
|
@@ -2835,6 +2881,18 @@ export type ConnectGitHubResponse = {
|
|
|
2835
2881
|
manifest: Record<string, unknown>;
|
|
2836
2882
|
state: string;
|
|
2837
2883
|
};
|
|
2884
|
+
/** Make an API key, shown once (POST /settings/api-keys). */
|
|
2885
|
+
export type CreateApiKeyBody = {
|
|
2886
|
+
name: string;
|
|
2887
|
+
};
|
|
2888
|
+
export type CreateApiKeyResponse = {
|
|
2889
|
+
id: string;
|
|
2890
|
+
name: string;
|
|
2891
|
+
created_at: string;
|
|
2892
|
+
last_used_at: string | null;
|
|
2893
|
+
secret: SecretMeta;
|
|
2894
|
+
api_key: string;
|
|
2895
|
+
};
|
|
2838
2896
|
/** A code that pairs a person's own computer with this server (POST /computers/pairings). */
|
|
2839
2897
|
export type CreatePairingResponse = {
|
|
2840
2898
|
id: string;
|
|
@@ -3029,6 +3087,7 @@ export type FinishChatGPTSignInResponse = {
|
|
|
3029
3087
|
expires_at?: string;
|
|
3030
3088
|
models?: Array<string>;
|
|
3031
3089
|
problem?: string;
|
|
3090
|
+
hint?: string;
|
|
3032
3091
|
};
|
|
3033
3092
|
/** This server's calendar: its host, name and time zone, never its address (GET /settings/calendar). */
|
|
3034
3093
|
export type GetCalendarResponse = {
|
|
@@ -3046,6 +3105,7 @@ export type GetChatGPTSignInResponse = {
|
|
|
3046
3105
|
expires_at?: string;
|
|
3047
3106
|
models?: Array<string>;
|
|
3048
3107
|
problem?: string;
|
|
3108
|
+
hint?: string;
|
|
3049
3109
|
};
|
|
3050
3110
|
/** Claude Code's login on this machine: on or off, and what its CLI says of it (GET /settings/claude-login). */
|
|
3051
3111
|
export type GetClaudeLoginResponse = {
|
|
@@ -3064,6 +3124,7 @@ export type GetClaudeLoginResponse = {
|
|
|
3064
3124
|
machine: {
|
|
3065
3125
|
folder: string;
|
|
3066
3126
|
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
3127
|
+
credentials?: string;
|
|
3067
3128
|
};
|
|
3068
3129
|
sign_in?: {
|
|
3069
3130
|
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
@@ -3240,6 +3301,16 @@ export type ListComposioEventsResponse = {
|
|
|
3240
3301
|
instructions?: string;
|
|
3241
3302
|
}>;
|
|
3242
3303
|
};
|
|
3304
|
+
/** List the toolkits Composio offers, for the console's toolkit picker; stores nothing (POST /settings/mcp-servers/composio/toolkits). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
|
|
3305
|
+
export type ListComposioToolkitsBody = {
|
|
3306
|
+
api_key: string;
|
|
3307
|
+
};
|
|
3308
|
+
export type ListComposioToolkitsResponse = {
|
|
3309
|
+
toolkits: Array<{
|
|
3310
|
+
slug: string;
|
|
3311
|
+
name: string;
|
|
3312
|
+
}>;
|
|
3313
|
+
};
|
|
3243
3314
|
/** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
|
|
3244
3315
|
export type ListComposioToolsBody = {
|
|
3245
3316
|
api_key: string;
|
|
@@ -3313,6 +3384,8 @@ export type ListComputersResponse = {
|
|
|
3313
3384
|
online: boolean;
|
|
3314
3385
|
held_by_run: string | null;
|
|
3315
3386
|
held_until: string | null;
|
|
3387
|
+
held_on: string | null;
|
|
3388
|
+
hold_note: string | null;
|
|
3316
3389
|
pairing: string;
|
|
3317
3390
|
created_at: string;
|
|
3318
3391
|
seen_at: string | null;
|
|
@@ -3392,6 +3465,26 @@ export type ListGitHubRepositoriesResponse = {
|
|
|
3392
3465
|
why: string;
|
|
3393
3466
|
}>;
|
|
3394
3467
|
};
|
|
3468
|
+
/** The marketplace's templates: every package on marketplace.agentrun.ai, each with the package here that it is (GET /marketplace/templates). */
|
|
3469
|
+
export type ListMarketplaceTemplatesResponse = {
|
|
3470
|
+
url: string | null;
|
|
3471
|
+
state: "read" | "stale" | "unreachable" | "off";
|
|
3472
|
+
read_at: string | null;
|
|
3473
|
+
templates: Array<{
|
|
3474
|
+
name: string;
|
|
3475
|
+
title: string;
|
|
3476
|
+
tags: Array<string>;
|
|
3477
|
+
needs: Array<string>;
|
|
3478
|
+
page_url: string;
|
|
3479
|
+
summary?: string;
|
|
3480
|
+
description?: string;
|
|
3481
|
+
category?: "engineering" | "security" | "sales" | "marketing" | "research" | "finance" | "operations" | "compliance" | "personal";
|
|
3482
|
+
harness?: Array<string>;
|
|
3483
|
+
source?: string;
|
|
3484
|
+
here?: string;
|
|
3485
|
+
}>;
|
|
3486
|
+
problem?: string;
|
|
3487
|
+
};
|
|
3395
3488
|
/** The names of the MCP servers saved here, and nothing else of them (GET /settings/mcp-server-names). */
|
|
3396
3489
|
export type ListMcpServerNamesResponse = {
|
|
3397
3490
|
names: Array<string>;
|
|
@@ -3627,6 +3720,7 @@ export type RestoreSuggestionResponse = {
|
|
|
3627
3720
|
pull_error: string | null;
|
|
3628
3721
|
};
|
|
3629
3722
|
};
|
|
3723
|
+
/** Revoke an API key; it opens nothing from now on (DELETE /settings/api-keys/{api_key_id}). */
|
|
3630
3724
|
/** Rotate the Composio project's webhook subscription's secret, and keep the new one (POST /settings/mcp-servers/{name}/composio/rotate-secret). */
|
|
3631
3725
|
export type RotateComposioSecretResponse = {
|
|
3632
3726
|
rotated: true;
|
|
@@ -3695,6 +3789,11 @@ export type SaveComposioServerResponse = {
|
|
|
3695
3789
|
listed_at: string;
|
|
3696
3790
|
updated_at: string;
|
|
3697
3791
|
secret?: SecretMeta;
|
|
3792
|
+
composio_account?: {
|
|
3793
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
3794
|
+
labels?: Array<string>;
|
|
3795
|
+
checked_at: string;
|
|
3796
|
+
};
|
|
3698
3797
|
};
|
|
3699
3798
|
connect_url?: string;
|
|
3700
3799
|
not_served?: Array<string>;
|
|
@@ -3847,6 +3946,7 @@ export type StartClaudeLoginResponse = {
|
|
|
3847
3946
|
machine: {
|
|
3848
3947
|
folder: string;
|
|
3849
3948
|
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
3949
|
+
credentials?: string;
|
|
3850
3950
|
};
|
|
3851
3951
|
sign_in?: {
|
|
3852
3952
|
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
@@ -3948,6 +4048,7 @@ export type TurnOffClaudeLoginResponse = {
|
|
|
3948
4048
|
machine: {
|
|
3949
4049
|
folder: string;
|
|
3950
4050
|
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
4051
|
+
credentials?: string;
|
|
3951
4052
|
};
|
|
3952
4053
|
sign_in?: {
|
|
3953
4054
|
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
@@ -3980,6 +4081,7 @@ export type TurnOnClaudeLoginResponse = {
|
|
|
3980
4081
|
machine: {
|
|
3981
4082
|
folder: string;
|
|
3982
4083
|
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
4084
|
+
credentials?: string;
|
|
3983
4085
|
};
|
|
3984
4086
|
sign_in?: {
|
|
3985
4087
|
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
@@ -4043,6 +4145,11 @@ export type GetMcpServerResponse = {
|
|
|
4043
4145
|
listed_at: string;
|
|
4044
4146
|
updated_at: string;
|
|
4045
4147
|
secret?: SecretMeta;
|
|
4148
|
+
composio_account?: {
|
|
4149
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
4150
|
+
labels?: Array<string>;
|
|
4151
|
+
checked_at: string;
|
|
4152
|
+
};
|
|
4046
4153
|
};
|
|
4047
4154
|
/** The remote MCP servers saved here, with their tools; never a credential (GET /settings/mcp-servers). */
|
|
4048
4155
|
export type ListMcpServersResponse = {
|
|
@@ -4089,6 +4196,11 @@ export type ListMcpServersResponse = {
|
|
|
4089
4196
|
listed_at: string;
|
|
4090
4197
|
updated_at: string;
|
|
4091
4198
|
secret?: SecretMeta;
|
|
4199
|
+
composio_account?: {
|
|
4200
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
4201
|
+
labels?: Array<string>;
|
|
4202
|
+
checked_at: string;
|
|
4203
|
+
};
|
|
4092
4204
|
}>;
|
|
4093
4205
|
};
|
|
4094
4206
|
/** This server's OAuth client metadata document (GET /settings/mcp-servers/oauth/client.json). */
|
|
@@ -4180,6 +4292,11 @@ export type RefreshMcpServerResponse = {
|
|
|
4180
4292
|
listed_at: string;
|
|
4181
4293
|
updated_at: string;
|
|
4182
4294
|
secret?: SecretMeta;
|
|
4295
|
+
composio_account?: {
|
|
4296
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
4297
|
+
labels?: Array<string>;
|
|
4298
|
+
checked_at: string;
|
|
4299
|
+
};
|
|
4183
4300
|
};
|
|
4184
4301
|
};
|
|
4185
4302
|
/** Preview a remote MCP server, then save it with the tools listed and its credential sealed (PUT /settings/mcp-servers/{name}). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
|
|
@@ -4236,6 +4353,11 @@ export type SaveMcpServerResponse = {
|
|
|
4236
4353
|
listed_at: string;
|
|
4237
4354
|
updated_at: string;
|
|
4238
4355
|
secret?: SecretMeta;
|
|
4356
|
+
composio_account?: {
|
|
4357
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
4358
|
+
labels?: Array<string>;
|
|
4359
|
+
checked_at: string;
|
|
4360
|
+
};
|
|
4239
4361
|
composio?: {
|
|
4240
4362
|
removed: boolean;
|
|
4241
4363
|
note: string;
|
|
@@ -4402,6 +4524,9 @@ export type CreateRunComputerViewerResponse = {
|
|
|
4402
4524
|
};
|
|
4403
4525
|
/** Purge a run's content and keep its cost (DELETE /runs/{run_id}). */
|
|
4404
4526
|
/** The files the run wrote (GET /runs/{run_id}/files). */
|
|
4527
|
+
export interface ListRunFilesParams {
|
|
4528
|
+
cut?: "run";
|
|
4529
|
+
}
|
|
4405
4530
|
export type ListRunFilesResponse = RunFileList;
|
|
4406
4531
|
/** One run (GET /runs/{run_id}). */
|
|
4407
4532
|
export type GetRunResponse = Run;
|
|
@@ -4574,6 +4699,7 @@ export interface ListAllRunsParams {
|
|
|
4574
4699
|
status?: "queued" | "working" | "paused" | "input_required" | "completed" | "failed" | "cancelled";
|
|
4575
4700
|
archived?: boolean;
|
|
4576
4701
|
label?: string;
|
|
4702
|
+
source?: string;
|
|
4577
4703
|
}
|
|
4578
4704
|
export type ListAllRunsResponse = RunList;
|
|
4579
4705
|
/** Send the run a message (POST /runs/{run_id}/messages). */
|
|
@@ -6370,6 +6496,28 @@ export type ListTriggersResponse = {
|
|
|
6370
6496
|
note?: string;
|
|
6371
6497
|
}>;
|
|
6372
6498
|
};
|
|
6499
|
+
/** The launch hook's host releases a firing it took and will start no run for (POST /triggers/{trigger_id}/firings/{firing_id}/release). */
|
|
6500
|
+
export type ReleaseTriggerFiringBody = {
|
|
6501
|
+
error: string;
|
|
6502
|
+
};
|
|
6503
|
+
export type ReleaseTriggerFiringResponse = {
|
|
6504
|
+
key: string;
|
|
6505
|
+
by: "schedule" | "email" | "feed" | "manual" | "webhook" | "github" | "composio";
|
|
6506
|
+
nominal_at: string;
|
|
6507
|
+
status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
|
|
6508
|
+
at: string;
|
|
6509
|
+
run_id: string | null;
|
|
6510
|
+
reason: string | null;
|
|
6511
|
+
error: {
|
|
6512
|
+
code: string;
|
|
6513
|
+
message: string;
|
|
6514
|
+
} | null;
|
|
6515
|
+
count?: number;
|
|
6516
|
+
attempts?: number;
|
|
6517
|
+
retry_at?: string;
|
|
6518
|
+
start_by?: string;
|
|
6519
|
+
catch_up?: true;
|
|
6520
|
+
};
|
|
6373
6521
|
/** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
|
|
6374
6522
|
export type RotateTriggerSecretResponse = {
|
|
6375
6523
|
secret: SecretMeta;
|
|
@@ -6840,12 +6988,14 @@ export type GetWrappedResponse = {
|
|
|
6840
6988
|
sessions: number;
|
|
6841
6989
|
requests: number;
|
|
6842
6990
|
tokens: number;
|
|
6991
|
+
sources: Array<string>;
|
|
6843
6992
|
}>;
|
|
6844
6993
|
models: Array<{
|
|
6845
6994
|
model: string;
|
|
6846
6995
|
requests: number;
|
|
6847
6996
|
tokens: number;
|
|
6848
6997
|
cost_usd: number;
|
|
6998
|
+
unpriced_requests: number;
|
|
6849
6999
|
}>;
|
|
6850
7000
|
sources: Array<{
|
|
6851
7001
|
source: string;
|
|
@@ -6916,6 +7066,10 @@ export declare function resources(call: Call): {
|
|
|
6916
7066
|
/** Check native CLI and sign-in without a paid model call (POST /agents/{agent_id}/native/verify). */
|
|
6917
7067
|
verifyNative: (agentId: string, options?: RequestOptions) => Promise<VerifyNativeResponse>;
|
|
6918
7068
|
};
|
|
7069
|
+
apiKeys: {
|
|
7070
|
+
/** The API keys made for this server's apps; never a key (GET /settings/api-keys). */
|
|
7071
|
+
list: (options?: RequestOptions) => Promise<ListApiKeysResponse>;
|
|
7072
|
+
};
|
|
6919
7073
|
capabilities: {
|
|
6920
7074
|
/** The runs waiting and held, the live runners and the recent hand-backs (GET /capacity). */
|
|
6921
7075
|
getCapacity: (params?: GetCapacityParams, options?: RequestOptions) => Promise<GetCapacityResponse>;
|
|
@@ -7011,6 +7165,8 @@ export declare function resources(call: Call): {
|
|
|
7011
7165
|
writeCorrections: (agentId: string, body: PutLearningCorrectionsBody | RawBody, params: PutLearningCorrectionsParams, options?: BodyOptions) => Promise<Tagged<PutLearningCorrectionsResponse>>;
|
|
7012
7166
|
};
|
|
7013
7167
|
local: {
|
|
7168
|
+
/** Make an API key, shown once (POST /settings/api-keys). */
|
|
7169
|
+
createApiKey: (body: CreateApiKeyBody, options?: RequestOptions) => Promise<CreateApiKeyResponse>;
|
|
7014
7170
|
/** A code that pairs a person's own computer with this server (POST /computers/pairings). */
|
|
7015
7171
|
createPairing: (options?: RequestOptions) => Promise<CreatePairingResponse>;
|
|
7016
7172
|
/** Create a suggested agent: a branch with its package and client, the agent made here, and a pull request (POST /suggestions/{suggestion_id}/create). */
|
|
@@ -7053,6 +7209,8 @@ export declare function resources(call: Call): {
|
|
|
7053
7209
|
getWorkspaceArchil: (options?: RequestOptions) => Promise<GetWorkspaceArchilResponse>;
|
|
7054
7210
|
/** List a saved Composio server's toolkit's events, for a composio trigger (GET /settings/mcp-servers/{name}/composio/events). */
|
|
7055
7211
|
listComposioEvents: (name: string, options?: RequestOptions) => Promise<ListComposioEventsResponse>;
|
|
7212
|
+
/** List the toolkits Composio offers, for the console's toolkit picker; stores nothing (POST /settings/mcp-servers/composio/toolkits). */
|
|
7213
|
+
listComposioToolkits: (body: ListComposioToolkitsBody, options?: RequestOptions) => Promise<ListComposioToolkitsResponse>;
|
|
7056
7214
|
/** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). */
|
|
7057
7215
|
listComposioTools: (body: ListComposioToolsBody, options?: RequestOptions) => Promise<ListComposioToolsResponse>;
|
|
7058
7216
|
/** A saved Composio server's triggers, each with its instance's state on Composio (GET /settings/mcp-servers/{name}/composio/triggers). */
|
|
@@ -7063,6 +7221,8 @@ export declare function resources(call: Call): {
|
|
|
7063
7221
|
listComputers: (options?: RequestOptions) => Promise<ListComputersResponse>;
|
|
7064
7222
|
/** The repositories this server's GitHub App is installed on (GET /integrations/github/repositories). */
|
|
7065
7223
|
listGitHubRepositories: (options?: RequestOptions) => Promise<ListGitHubRepositoriesResponse>;
|
|
7224
|
+
/** The marketplace's templates: every package on marketplace.agentrun.ai, each with the package here that it is (GET /marketplace/templates). */
|
|
7225
|
+
listMarketplaceTemplates: (options?: RequestOptions) => Promise<ListMarketplaceTemplatesResponse>;
|
|
7066
7226
|
/** The names of the MCP servers saved here, and nothing else of them (GET /settings/mcp-server-names). */
|
|
7067
7227
|
listMcpServerNames: (options?: RequestOptions) => Promise<ListMcpServerNamesResponse>;
|
|
7068
7228
|
/** Every run still going that has a computer (GET /computers/running). */
|
|
@@ -7075,6 +7235,8 @@ export declare function resources(call: Call): {
|
|
|
7075
7235
|
receiveHookComposio: (hook: string, body: RawBody, options?: BodyOptions) => Promise<ReceiveHookComposioResponse>;
|
|
7076
7236
|
/** Bring a discarded suggestion back (an undo) (POST /suggestions/{suggestion_id}/restore). */
|
|
7077
7237
|
restoreSuggestion: (suggestionId: string, options?: RequestOptions) => Promise<RestoreSuggestionResponse>;
|
|
7238
|
+
/** Revoke an API key; it opens nothing from now on (DELETE /settings/api-keys/{api_key_id}). */
|
|
7239
|
+
revokeApiKey: (apiKeyId: string, options?: RequestOptions) => Promise<void>;
|
|
7078
7240
|
/** Rotate the Composio project's webhook subscription's secret, and keep the new one (POST /settings/mcp-servers/{name}/composio/rotate-secret). */
|
|
7079
7241
|
rotateComposioSecret: (name: string, options?: RequestOptions) => Promise<RotateComposioSecretResponse>;
|
|
7080
7242
|
/** Save this server's calendar, its iCal address sealed (PUT /settings/calendar). */
|
|
@@ -7156,7 +7318,7 @@ export declare function resources(call: Call): {
|
|
|
7156
7318
|
/** Purge a run's content and keep its cost (DELETE /runs/{run_id}). */
|
|
7157
7319
|
delete: (runId: string, options?: RequestOptions) => Promise<void>;
|
|
7158
7320
|
/** The files the run wrote (GET /runs/{run_id}/files). */
|
|
7159
|
-
files: (runId: string, options?: RequestOptions) => Promise<ListRunFilesResponse>;
|
|
7321
|
+
files: (runId: string, params?: ListRunFilesParams, options?: RequestOptions) => Promise<ListRunFilesResponse>;
|
|
7160
7322
|
/** One run (GET /runs/{run_id}). */
|
|
7161
7323
|
get: (runId: string, options?: RequestOptions) => Promise<GetRunResponse>;
|
|
7162
7324
|
/** Grade an ended run's answer: right or wrong, and the fields a right answer holds (PUT /runs/{run_id}/grade). */
|
|
@@ -7277,6 +7439,8 @@ export declare function resources(call: Call): {
|
|
|
7277
7439
|
get: (triggerId: string, options?: RequestOptions) => Promise<GetTriggerResponse>;
|
|
7278
7440
|
/** The triggers: schedules and signed webhooks that start an agent's capped runs or message a run (GET /triggers). */
|
|
7279
7441
|
list: (options?: RequestOptions) => Promise<ListTriggersResponse>;
|
|
7442
|
+
/** The launch hook's host releases a firing it took and will start no run for (POST /triggers/{trigger_id}/firings/{firing_id}/release). */
|
|
7443
|
+
releaseFiring: (triggerId: string, firingId: string, body: ReleaseTriggerFiringBody, options?: RequestOptions) => Promise<ReleaseTriggerFiringResponse>;
|
|
7280
7444
|
/** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
|
|
7281
7445
|
rotateSecret: (triggerId: string, options?: RequestOptions) => Promise<RotateTriggerSecretResponse>;
|
|
7282
7446
|
/** Change a trigger, or turn it off and on (PATCH /triggers/{trigger_id}). */
|
|
@@ -26,6 +26,7 @@ export const OPERATIONS = {
|
|
|
26
26
|
unarchiveAgent: { "method": "POST", "path": "/agents/{agent_id}/unarchive", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
27
27
|
updateDefinition: { "method": "PUT", "path": "/agents/{agent_id}/definition", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": ["If-Match"], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": true },
|
|
28
28
|
verifyNative: { "method": "POST", "path": "/agents/{agent_id}/native/verify", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
29
|
+
listApiKeys: { "method": "GET", "path": "/settings/api-keys", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
29
30
|
getCapacity: { "method": "GET", "path": "/capacity", "pathParams": [], "multiSegment": [], "query": ["window"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
30
31
|
completeCliLearningRun: { "method": "POST", "path": "/cli-learning/runs/{run_id}/complete", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": ["Idempotency-Key"], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
31
32
|
enrollCliLearning: { "method": "POST", "path": "/cli-learning/connections", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
@@ -67,6 +68,7 @@ export const OPERATIONS = {
|
|
|
67
68
|
listLearnedWorkflowRevisions: { "method": "GET", "path": "/agents/{agent_id}/learning/workflows/{name}/revisions", "pathParams": ["agent_id", "name"], "multiSegment": [], "query": ["limit"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
68
69
|
putLearningCorrections: { "method": "PUT", "path": "/agents/{agent_id}/learning/corrections", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": ["If-Match"], "body": { "required": true, "types": ["text/markdown", "text/plain", "application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": true },
|
|
69
70
|
connectGitHub: { "method": "POST", "path": "/integrations/github/connect", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
71
|
+
createApiKey: { "method": "POST", "path": "/settings/api-keys", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
70
72
|
createPairing: { "method": "POST", "path": "/computers/pairings", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
71
73
|
createSuggestedAgent: { "method": "POST", "path": "/suggestions/{suggestion_id}/create", "pathParams": ["suggestion_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
72
74
|
deleteCalendar: { "method": "DELETE", "path": "/settings/calendar", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
@@ -90,17 +92,20 @@ export const OPERATIONS = {
|
|
|
90
92
|
gitHubCallback: { "method": "GET", "path": "/integrations/github/callback", "pathParams": [], "multiSegment": [], "query": ["code", "state"], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
91
93
|
gitHubInstalled: { "method": "GET", "path": "/integrations/github/installed", "pathParams": [], "multiSegment": [], "query": ["installation_id", "setup_action", "state"], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
92
94
|
listComposioEvents: { "method": "GET", "path": "/settings/mcp-servers/{name}/composio/events", "pathParams": ["name"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
95
|
+
listComposioToolkits: { "method": "POST", "path": "/settings/mcp-servers/composio/toolkits", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": [], "tagged": false },
|
|
93
96
|
listComposioTools: { "method": "POST", "path": "/settings/mcp-servers/composio/tools", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": ["toolkit"], "tagged": false },
|
|
94
97
|
listComposioTriggers: { "method": "GET", "path": "/settings/mcp-servers/{name}/composio/triggers", "pathParams": ["name"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
95
98
|
listComputerChoices: { "method": "GET", "path": "/computers/{provider}/choices", "pathParams": ["provider"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
96
99
|
listComputers: { "method": "GET", "path": "/computers", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
97
100
|
listGitHubRepositories: { "method": "GET", "path": "/integrations/github/repositories", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
101
|
+
listMarketplaceTemplates: { "method": "GET", "path": "/marketplace/templates", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
98
102
|
listMcpServerNames: { "method": "GET", "path": "/settings/mcp-server-names", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
99
103
|
listRunningComputers: { "method": "GET", "path": "/computers/running", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
100
104
|
listSuggestions: { "method": "GET", "path": "/suggestions", "pathParams": [], "multiSegment": [], "query": ["repo", "status"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
101
105
|
putWorkspaceArchil: { "method": "PUT", "path": "/workspace/archil", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
102
106
|
receiveHook_composio: { "method": "POST", "path": "/hooks/composio/{hook}", "pathParams": ["hook"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["*/*"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
103
107
|
restoreSuggestion: { "method": "POST", "path": "/suggestions/{suggestion_id}/restore", "pathParams": ["suggestion_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
108
|
+
revokeApiKey: { "method": "DELETE", "path": "/settings/api-keys/{api_key_id}", "pathParams": ["api_key_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
104
109
|
rotateComposioSecret: { "method": "POST", "path": "/settings/mcp-servers/{name}/composio/rotate-secret", "pathParams": ["name"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
105
110
|
saveCalendar: { "method": "PUT", "path": "/settings/calendar", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
106
111
|
saveComposioServer: { "method": "PUT", "path": "/settings/mcp-servers/{name}/composio", "pathParams": ["name"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": ["toolkit", "tools.[]", "user_id"], "tagged": false },
|
|
@@ -138,14 +143,14 @@ export const OPERATIONS = {
|
|
|
138
143
|
createInlineRun: { "method": "POST", "path": "/runs", "pathParams": [], "multiSegment": [], "query": [], "headers": ["Idempotency-Key"], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
139
144
|
createRunComputerViewer: { "method": "POST", "path": "/runs/{run_id}/computer/viewer", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
140
145
|
deleteRun: { "method": "DELETE", "path": "/runs/{run_id}", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
141
|
-
listRunFiles: { "method": "GET", "path": "/runs/{run_id}/files", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
146
|
+
listRunFiles: { "method": "GET", "path": "/runs/{run_id}/files", "pathParams": ["run_id"], "multiSegment": [], "query": ["cut"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
142
147
|
getRun: { "method": "GET", "path": "/runs/{run_id}", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
143
148
|
gradeRun: { "method": "PUT", "path": "/runs/{run_id}/grade", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
144
149
|
getRunGraph: { "method": "GET", "path": "/runs/{run_id}/graph", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
145
150
|
handBackRunComputer: { "method": "POST", "path": "/runs/{run_id}/computer/hand-back", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
146
151
|
getRunLearning: { "method": "GET", "path": "/runs/{run_id}/learning", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
147
152
|
getRunLearningDiff: { "method": "GET", "path": "/runs/{run_id}/learning/diff", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
148
|
-
listAllRuns: { "method": "GET", "path": "/runs", "pathParams": [], "multiSegment": [], "query": ["limit", "cursor", "agent", "revision", "status", "archived", "label"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
153
|
+
listAllRuns: { "method": "GET", "path": "/runs", "pathParams": [], "multiSegment": [], "query": ["limit", "cursor", "agent", "revision", "status", "archived", "label", "source"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
149
154
|
sendMessage: { "method": "POST", "path": "/runs/{run_id}/messages", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": ["Idempotency-Key"], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
150
155
|
pauseRun: { "method": "POST", "path": "/runs/{run_id}/pause", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
151
156
|
raiseRunCap: { "method": "PATCH", "path": "/runs/{run_id}", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
@@ -190,6 +195,7 @@ export const OPERATIONS = {
|
|
|
190
195
|
listTriggerFirings: { "method": "GET", "path": "/triggers/{trigger_id}/firings", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
191
196
|
getTrigger: { "method": "GET", "path": "/triggers/{trigger_id}", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
192
197
|
listTriggers: { "method": "GET", "path": "/triggers", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
198
|
+
releaseTriggerFiring: { "method": "POST", "path": "/triggers/{trigger_id}/firings/{firing_id}/release", "pathParams": ["trigger_id", "firing_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
193
199
|
rotateTriggerSecret: { "method": "POST", "path": "/triggers/{trigger_id}/secret", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": true, "publicFields": [], "tagged": false },
|
|
194
200
|
updateTrigger: { "method": "PATCH", "path": "/triggers/{trigger_id}", "pathParams": ["trigger_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
195
201
|
getUsage: { "method": "GET", "path": "/usage", "pathParams": [], "multiSegment": [], "query": ["from", "to", "group_by"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
@@ -260,6 +266,10 @@ export function resources(call) {
|
|
|
260
266
|
/** Check native CLI and sign-in without a paid model call (POST /agents/{agent_id}/native/verify). */
|
|
261
267
|
verifyNative: (agentId, options) => call("verifyNative", [agentId], undefined, undefined, options),
|
|
262
268
|
},
|
|
269
|
+
apiKeys: {
|
|
270
|
+
/** The API keys made for this server's apps; never a key (GET /settings/api-keys). */
|
|
271
|
+
list: (options) => call("listApiKeys", [], undefined, undefined, options),
|
|
272
|
+
},
|
|
263
273
|
capabilities: {
|
|
264
274
|
/** The runs waiting and held, the live runners and the recent hand-backs (GET /capacity). */
|
|
265
275
|
getCapacity: (params, options) => call("getCapacity", [], undefined, params, options),
|
|
@@ -355,6 +365,8 @@ export function resources(call) {
|
|
|
355
365
|
writeCorrections: (agentId, body, params, options) => call("putLearningCorrections", [agentId], body, params, options),
|
|
356
366
|
},
|
|
357
367
|
local: {
|
|
368
|
+
/** Make an API key, shown once (POST /settings/api-keys). */
|
|
369
|
+
createApiKey: (body, options) => call("createApiKey", [], body, undefined, options),
|
|
358
370
|
/** A code that pairs a person's own computer with this server (POST /computers/pairings). */
|
|
359
371
|
createPairing: (options) => call("createPairing", [], undefined, undefined, options),
|
|
360
372
|
/** Create a suggested agent: a branch with its package and client, the agent made here, and a pull request (POST /suggestions/{suggestion_id}/create). */
|
|
@@ -397,6 +409,8 @@ export function resources(call) {
|
|
|
397
409
|
getWorkspaceArchil: (options) => call("getWorkspaceArchil", [], undefined, undefined, options),
|
|
398
410
|
/** List a saved Composio server's toolkit's events, for a composio trigger (GET /settings/mcp-servers/{name}/composio/events). */
|
|
399
411
|
listComposioEvents: (name, options) => call("listComposioEvents", [name], undefined, undefined, options),
|
|
412
|
+
/** List the toolkits Composio offers, for the console's toolkit picker; stores nothing (POST /settings/mcp-servers/composio/toolkits). */
|
|
413
|
+
listComposioToolkits: (body, options) => call("listComposioToolkits", [], body, undefined, options),
|
|
400
414
|
/** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). */
|
|
401
415
|
listComposioTools: (body, options) => call("listComposioTools", [], body, undefined, options),
|
|
402
416
|
/** A saved Composio server's triggers, each with its instance's state on Composio (GET /settings/mcp-servers/{name}/composio/triggers). */
|
|
@@ -407,6 +421,8 @@ export function resources(call) {
|
|
|
407
421
|
listComputers: (options) => call("listComputers", [], undefined, undefined, options),
|
|
408
422
|
/** The repositories this server's GitHub App is installed on (GET /integrations/github/repositories). */
|
|
409
423
|
listGitHubRepositories: (options) => call("listGitHubRepositories", [], undefined, undefined, options),
|
|
424
|
+
/** The marketplace's templates: every package on marketplace.agentrun.ai, each with the package here that it is (GET /marketplace/templates). */
|
|
425
|
+
listMarketplaceTemplates: (options) => call("listMarketplaceTemplates", [], undefined, undefined, options),
|
|
410
426
|
/** The names of the MCP servers saved here, and nothing else of them (GET /settings/mcp-server-names). */
|
|
411
427
|
listMcpServerNames: (options) => call("listMcpServerNames", [], undefined, undefined, options),
|
|
412
428
|
/** Every run still going that has a computer (GET /computers/running). */
|
|
@@ -419,6 +435,8 @@ export function resources(call) {
|
|
|
419
435
|
receiveHookComposio: (hook, body, options) => call("receiveHook_composio", [hook], body, undefined, options),
|
|
420
436
|
/** Bring a discarded suggestion back (an undo) (POST /suggestions/{suggestion_id}/restore). */
|
|
421
437
|
restoreSuggestion: (suggestionId, options) => call("restoreSuggestion", [suggestionId], undefined, undefined, options),
|
|
438
|
+
/** Revoke an API key; it opens nothing from now on (DELETE /settings/api-keys/{api_key_id}). */
|
|
439
|
+
revokeApiKey: (apiKeyId, options) => call("revokeApiKey", [apiKeyId], undefined, undefined, options),
|
|
422
440
|
/** Rotate the Composio project's webhook subscription's secret, and keep the new one (POST /settings/mcp-servers/{name}/composio/rotate-secret). */
|
|
423
441
|
rotateComposioSecret: (name, options) => call("rotateComposioSecret", [name], undefined, undefined, options),
|
|
424
442
|
/** Save this server's calendar, its iCal address sealed (PUT /settings/calendar). */
|
|
@@ -500,7 +518,7 @@ export function resources(call) {
|
|
|
500
518
|
/** Purge a run's content and keep its cost (DELETE /runs/{run_id}). */
|
|
501
519
|
delete: (runId, options) => call("deleteRun", [runId], undefined, undefined, options),
|
|
502
520
|
/** The files the run wrote (GET /runs/{run_id}/files). */
|
|
503
|
-
files: (runId, options) => call("listRunFiles", [runId], undefined,
|
|
521
|
+
files: (runId, params, options) => call("listRunFiles", [runId], undefined, params, options),
|
|
504
522
|
/** One run (GET /runs/{run_id}). */
|
|
505
523
|
get: (runId, options) => call("getRun", [runId], undefined, undefined, options),
|
|
506
524
|
/** Grade an ended run's answer: right or wrong, and the fields a right answer holds (PUT /runs/{run_id}/grade). */
|
|
@@ -621,6 +639,8 @@ export function resources(call) {
|
|
|
621
639
|
get: (triggerId, options) => call("getTrigger", [triggerId], undefined, undefined, options),
|
|
622
640
|
/** The triggers: schedules and signed webhooks that start an agent's capped runs or message a run (GET /triggers). */
|
|
623
641
|
list: (options) => call("listTriggers", [], undefined, undefined, options),
|
|
642
|
+
/** The launch hook's host releases a firing it took and will start no run for (POST /triggers/{trigger_id}/firings/{firing_id}/release). */
|
|
643
|
+
releaseFiring: (triggerId, firingId, body, options) => call("releaseTriggerFiring", [triggerId, firingId], body, undefined, options),
|
|
624
644
|
/** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
|
|
625
645
|
rotateSecret: (triggerId, options) => call("rotateTriggerSecret", [triggerId], undefined, undefined, options),
|
|
626
646
|
/** Change a trigger, or turn it off and on (PATCH /triggers/{trigger_id}). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcha/agentrun-client",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.58",
|
|
4
4
|
"description": "A typed TypeScript client for a self-hosted AgentRun server: a method per operation of its API, typed from its OpenAPI document, with waiting for a run and following its timeline. No dependencies; fetch only.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentrun",
|
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@parcha/agentrun-dsl": "0.1.0-beta.
|
|
86
|
+
"@parcha/agentrun-dsl": "0.1.0-beta.58"
|
|
87
87
|
}
|
|
88
88
|
}
|