@parcha/agentrun-client 0.1.0-beta.55 → 0.1.0-beta.57
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 +262 -4
- package/dist/operations.generated.js +25 -2
- 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. */
|
|
@@ -705,7 +705,7 @@ export type Run = {
|
|
|
705
705
|
computer?: {
|
|
706
706
|
kind: "sandbox" | "desktop" | "phone" | "browser";
|
|
707
707
|
provider: string;
|
|
708
|
-
state: "starting" | "ready" | "taken_over" | "ended" | "failed";
|
|
708
|
+
state: "starting" | "ready" | "taken_over" | "released" | "ended" | "failed";
|
|
709
709
|
why?: string;
|
|
710
710
|
held?: {
|
|
711
711
|
state: "starting" | "waiting" | "started" | "ended" | "released";
|
|
@@ -847,6 +847,7 @@ export type RunFile = {
|
|
|
847
847
|
modified_at: Timestamp;
|
|
848
848
|
content_type?: string | null;
|
|
849
849
|
unreadable?: true;
|
|
850
|
+
name?: string;
|
|
850
851
|
};
|
|
851
852
|
export type MessageCreate = {
|
|
852
853
|
content: string;
|
|
@@ -908,6 +909,14 @@ export type TimelinePage = {
|
|
|
908
909
|
final: boolean;
|
|
909
910
|
cost: Cost;
|
|
910
911
|
poll_after_ms?: number;
|
|
912
|
+
in_flight?: Array<{
|
|
913
|
+
kind: "model" | "tool";
|
|
914
|
+
name: string;
|
|
915
|
+
started_at: string | null;
|
|
916
|
+
tool_use_id?: string;
|
|
917
|
+
for_tool?: string;
|
|
918
|
+
input_tokens_max?: number;
|
|
919
|
+
}>;
|
|
911
920
|
};
|
|
912
921
|
export type TimelineRow = {
|
|
913
922
|
id: string;
|
|
@@ -1055,6 +1064,7 @@ export type Capabilities = {
|
|
|
1055
1064
|
billing: "proxy" | "plan";
|
|
1056
1065
|
};
|
|
1057
1066
|
available: boolean;
|
|
1067
|
+
ready_models: Array<string>;
|
|
1058
1068
|
free_models: Array<{
|
|
1059
1069
|
id: string;
|
|
1060
1070
|
context_window: number;
|
|
@@ -1214,12 +1224,14 @@ export type Features = {
|
|
|
1214
1224
|
routes: boolean;
|
|
1215
1225
|
at_rest: "sealed";
|
|
1216
1226
|
harnesses: Array<string>;
|
|
1227
|
+
kept: Array<string>;
|
|
1217
1228
|
};
|
|
1218
1229
|
mcp_client?: {
|
|
1219
1230
|
transports: Array<"streamable-http">;
|
|
1220
1231
|
auth: Array<"none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run">;
|
|
1221
1232
|
at_rest: "sealed";
|
|
1222
1233
|
harnesses: Array<string>;
|
|
1234
|
+
composio_per_run: boolean;
|
|
1223
1235
|
};
|
|
1224
1236
|
tool_permissions?: boolean;
|
|
1225
1237
|
webhooks?: {
|
|
@@ -1228,6 +1240,11 @@ export type Features = {
|
|
|
1228
1240
|
signing: "standard-webhooks/v1";
|
|
1229
1241
|
at_rest: "sealed";
|
|
1230
1242
|
};
|
|
1243
|
+
api_keys?: {
|
|
1244
|
+
routes: boolean;
|
|
1245
|
+
limit: number;
|
|
1246
|
+
at_rest: "hashed";
|
|
1247
|
+
};
|
|
1231
1248
|
slack?: {
|
|
1232
1249
|
routes: boolean;
|
|
1233
1250
|
events: Array<"run.needs_input" | "run.ended" | "trigger.failed">;
|
|
@@ -1884,12 +1901,12 @@ export type GetAgentPackageResponse = {
|
|
|
1884
1901
|
sha256: string;
|
|
1885
1902
|
report: {
|
|
1886
1903
|
blocked: Array<{
|
|
1887
|
-
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "input_schema" | "budget" | "package";
|
|
1904
|
+
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "secrets" | "input_schema" | "budget" | "package";
|
|
1888
1905
|
name: string;
|
|
1889
1906
|
reason: string;
|
|
1890
1907
|
}>;
|
|
1891
1908
|
remade: Array<{
|
|
1892
|
-
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "input_schema" | "budget" | "package";
|
|
1909
|
+
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "secrets" | "input_schema" | "budget" | "package";
|
|
1893
1910
|
name: string;
|
|
1894
1911
|
reason: string;
|
|
1895
1912
|
}>;
|
|
@@ -2093,6 +2110,19 @@ export type VerifyNativeResponse = {
|
|
|
2093
2110
|
};
|
|
2094
2111
|
};
|
|
2095
2112
|
};
|
|
2113
|
+
/** The API keys made for this server's apps; never a key (GET /settings/api-keys). */
|
|
2114
|
+
export type ListApiKeysResponse = {
|
|
2115
|
+
keys: Array<{
|
|
2116
|
+
id: string;
|
|
2117
|
+
name: string;
|
|
2118
|
+
created_at: string;
|
|
2119
|
+
last_used_at: string | null;
|
|
2120
|
+
secret: SecretMeta;
|
|
2121
|
+
}>;
|
|
2122
|
+
limit: number;
|
|
2123
|
+
refused?: string;
|
|
2124
|
+
unreadable?: Array<string>;
|
|
2125
|
+
};
|
|
2096
2126
|
/** The runs waiting and held, the live runners and the recent hand-backs (GET /capacity). */
|
|
2097
2127
|
export interface GetCapacityParams {
|
|
2098
2128
|
window?: number;
|
|
@@ -2526,8 +2556,14 @@ export type ListHarnessKeysResponse = {
|
|
|
2526
2556
|
harnesses: Array<{
|
|
2527
2557
|
id: string;
|
|
2528
2558
|
label: string;
|
|
2559
|
+
named: boolean;
|
|
2529
2560
|
keys: Array<SecretMeta>;
|
|
2561
|
+
kept: Array<SecretMeta>;
|
|
2530
2562
|
ready: boolean;
|
|
2563
|
+
reenter: Array<{
|
|
2564
|
+
name: string;
|
|
2565
|
+
why: "recipe_changed" | "seal_key_changed" | "file_unreadable";
|
|
2566
|
+
}>;
|
|
2531
2567
|
}>;
|
|
2532
2568
|
};
|
|
2533
2569
|
/** Delete one file of the agent's home (DELETE /agents/{agent_id}/home/files/{path}). */
|
|
@@ -2621,6 +2657,7 @@ export type GetLearningCostResponse = {
|
|
|
2621
2657
|
hand_backs: {
|
|
2622
2658
|
ran: number;
|
|
2623
2659
|
back: number;
|
|
2660
|
+
cut: number;
|
|
2624
2661
|
} | null;
|
|
2625
2662
|
withheld: {
|
|
2626
2663
|
unknown: number;
|
|
@@ -2835,6 +2872,18 @@ export type ConnectGitHubResponse = {
|
|
|
2835
2872
|
manifest: Record<string, unknown>;
|
|
2836
2873
|
state: string;
|
|
2837
2874
|
};
|
|
2875
|
+
/** Make an API key, shown once (POST /settings/api-keys). */
|
|
2876
|
+
export type CreateApiKeyBody = {
|
|
2877
|
+
name: string;
|
|
2878
|
+
};
|
|
2879
|
+
export type CreateApiKeyResponse = {
|
|
2880
|
+
id: string;
|
|
2881
|
+
name: string;
|
|
2882
|
+
created_at: string;
|
|
2883
|
+
last_used_at: string | null;
|
|
2884
|
+
secret: SecretMeta;
|
|
2885
|
+
api_key: string;
|
|
2886
|
+
};
|
|
2838
2887
|
/** A code that pairs a person's own computer with this server (POST /computers/pairings). */
|
|
2839
2888
|
export type CreatePairingResponse = {
|
|
2840
2889
|
id: string;
|
|
@@ -3028,6 +3077,8 @@ export type FinishChatGPTSignInResponse = {
|
|
|
3028
3077
|
authorize_url?: string;
|
|
3029
3078
|
expires_at?: string;
|
|
3030
3079
|
models?: Array<string>;
|
|
3080
|
+
problem?: string;
|
|
3081
|
+
hint?: string;
|
|
3031
3082
|
};
|
|
3032
3083
|
/** This server's calendar: its host, name and time zone, never its address (GET /settings/calendar). */
|
|
3033
3084
|
export type GetCalendarResponse = {
|
|
@@ -3044,6 +3095,8 @@ export type GetChatGPTSignInResponse = {
|
|
|
3044
3095
|
authorize_url?: string;
|
|
3045
3096
|
expires_at?: string;
|
|
3046
3097
|
models?: Array<string>;
|
|
3098
|
+
problem?: string;
|
|
3099
|
+
hint?: string;
|
|
3047
3100
|
};
|
|
3048
3101
|
/** Claude Code's login on this machine: on or off, and what its CLI says of it (GET /settings/claude-login). */
|
|
3049
3102
|
export type GetClaudeLoginResponse = {
|
|
@@ -3058,6 +3111,21 @@ export type GetClaudeLoginResponse = {
|
|
|
3058
3111
|
organization?: string;
|
|
3059
3112
|
plan?: string;
|
|
3060
3113
|
};
|
|
3114
|
+
folder: string;
|
|
3115
|
+
machine: {
|
|
3116
|
+
folder: string;
|
|
3117
|
+
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
3118
|
+
credentials?: string;
|
|
3119
|
+
};
|
|
3120
|
+
sign_in?: {
|
|
3121
|
+
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
3122
|
+
started_at: string;
|
|
3123
|
+
ended_at?: string;
|
|
3124
|
+
limit_ms: number;
|
|
3125
|
+
exit_code?: number;
|
|
3126
|
+
signal?: string;
|
|
3127
|
+
error?: string;
|
|
3128
|
+
};
|
|
3061
3129
|
};
|
|
3062
3130
|
/** This server's email account: its address, servers and who signs in, never its password (GET /settings/email). */
|
|
3063
3131
|
export type GetEmailAccountResponse = {
|
|
@@ -3224,6 +3292,16 @@ export type ListComposioEventsResponse = {
|
|
|
3224
3292
|
instructions?: string;
|
|
3225
3293
|
}>;
|
|
3226
3294
|
};
|
|
3295
|
+
/** 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. */
|
|
3296
|
+
export type ListComposioToolkitsBody = {
|
|
3297
|
+
api_key: string;
|
|
3298
|
+
};
|
|
3299
|
+
export type ListComposioToolkitsResponse = {
|
|
3300
|
+
toolkits: Array<{
|
|
3301
|
+
slug: string;
|
|
3302
|
+
name: string;
|
|
3303
|
+
}>;
|
|
3304
|
+
};
|
|
3227
3305
|
/** 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. */
|
|
3228
3306
|
export type ListComposioToolsBody = {
|
|
3229
3307
|
api_key: string;
|
|
@@ -3376,6 +3454,26 @@ export type ListGitHubRepositoriesResponse = {
|
|
|
3376
3454
|
why: string;
|
|
3377
3455
|
}>;
|
|
3378
3456
|
};
|
|
3457
|
+
/** The marketplace's templates: every package on marketplace.agentrun.ai, each with the package here that it is (GET /marketplace/templates). */
|
|
3458
|
+
export type ListMarketplaceTemplatesResponse = {
|
|
3459
|
+
url: string | null;
|
|
3460
|
+
state: "read" | "stale" | "unreachable" | "off";
|
|
3461
|
+
read_at: string | null;
|
|
3462
|
+
templates: Array<{
|
|
3463
|
+
name: string;
|
|
3464
|
+
title: string;
|
|
3465
|
+
tags: Array<string>;
|
|
3466
|
+
needs: Array<string>;
|
|
3467
|
+
page_url: string;
|
|
3468
|
+
summary?: string;
|
|
3469
|
+
description?: string;
|
|
3470
|
+
category?: "engineering" | "security" | "sales" | "marketing" | "research" | "finance" | "operations" | "compliance" | "personal";
|
|
3471
|
+
harness?: Array<string>;
|
|
3472
|
+
source?: string;
|
|
3473
|
+
here?: string;
|
|
3474
|
+
}>;
|
|
3475
|
+
problem?: string;
|
|
3476
|
+
};
|
|
3379
3477
|
/** The names of the MCP servers saved here, and nothing else of them (GET /settings/mcp-server-names). */
|
|
3380
3478
|
export type ListMcpServerNamesResponse = {
|
|
3381
3479
|
names: Array<string>;
|
|
@@ -3611,6 +3709,7 @@ export type RestoreSuggestionResponse = {
|
|
|
3611
3709
|
pull_error: string | null;
|
|
3612
3710
|
};
|
|
3613
3711
|
};
|
|
3712
|
+
/** Revoke an API key; it opens nothing from now on (DELETE /settings/api-keys/{api_key_id}). */
|
|
3614
3713
|
/** Rotate the Composio project's webhook subscription's secret, and keep the new one (POST /settings/mcp-servers/{name}/composio/rotate-secret). */
|
|
3615
3714
|
export type RotateComposioSecretResponse = {
|
|
3616
3715
|
rotated: true;
|
|
@@ -3679,6 +3778,11 @@ export type SaveComposioServerResponse = {
|
|
|
3679
3778
|
listed_at: string;
|
|
3680
3779
|
updated_at: string;
|
|
3681
3780
|
secret?: SecretMeta;
|
|
3781
|
+
composio_account?: {
|
|
3782
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
3783
|
+
labels?: Array<string>;
|
|
3784
|
+
checked_at: string;
|
|
3785
|
+
};
|
|
3682
3786
|
};
|
|
3683
3787
|
connect_url?: string;
|
|
3684
3788
|
not_served?: Array<string>;
|
|
@@ -3827,6 +3931,21 @@ export type StartClaudeLoginResponse = {
|
|
|
3827
3931
|
organization?: string;
|
|
3828
3932
|
plan?: string;
|
|
3829
3933
|
};
|
|
3934
|
+
folder: string;
|
|
3935
|
+
machine: {
|
|
3936
|
+
folder: string;
|
|
3937
|
+
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
3938
|
+
credentials?: string;
|
|
3939
|
+
};
|
|
3940
|
+
sign_in?: {
|
|
3941
|
+
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
3942
|
+
started_at: string;
|
|
3943
|
+
ended_at?: string;
|
|
3944
|
+
limit_ms: number;
|
|
3945
|
+
exit_code?: number;
|
|
3946
|
+
signal?: string;
|
|
3947
|
+
error?: string;
|
|
3948
|
+
};
|
|
3830
3949
|
};
|
|
3831
3950
|
/** Start signing in to an MCP server with OAuth: the page the owner opens (POST /settings/mcp-servers/{name}/oauth/start). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
|
|
3832
3951
|
export type StartMcpOAuthBody = {
|
|
@@ -3914,6 +4033,21 @@ export type TurnOffClaudeLoginResponse = {
|
|
|
3914
4033
|
organization?: string;
|
|
3915
4034
|
plan?: string;
|
|
3916
4035
|
};
|
|
4036
|
+
folder: string;
|
|
4037
|
+
machine: {
|
|
4038
|
+
folder: string;
|
|
4039
|
+
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
4040
|
+
credentials?: string;
|
|
4041
|
+
};
|
|
4042
|
+
sign_in?: {
|
|
4043
|
+
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
4044
|
+
started_at: string;
|
|
4045
|
+
ended_at?: string;
|
|
4046
|
+
limit_ms: number;
|
|
4047
|
+
exit_code?: number;
|
|
4048
|
+
signal?: string;
|
|
4049
|
+
error?: string;
|
|
4050
|
+
};
|
|
3917
4051
|
};
|
|
3918
4052
|
/** Turn on Claude Code's login on this machine for claude-agent's runs (PUT /settings/claude-login). */
|
|
3919
4053
|
export type TurnOnClaudeLoginBody = {
|
|
@@ -3932,6 +4066,21 @@ export type TurnOnClaudeLoginResponse = {
|
|
|
3932
4066
|
organization?: string;
|
|
3933
4067
|
plan?: string;
|
|
3934
4068
|
};
|
|
4069
|
+
folder: string;
|
|
4070
|
+
machine: {
|
|
4071
|
+
folder: string;
|
|
4072
|
+
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
4073
|
+
credentials?: string;
|
|
4074
|
+
};
|
|
4075
|
+
sign_in?: {
|
|
4076
|
+
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
4077
|
+
started_at: string;
|
|
4078
|
+
ended_at?: string;
|
|
4079
|
+
limit_ms: number;
|
|
4080
|
+
exit_code?: number;
|
|
4081
|
+
signal?: string;
|
|
4082
|
+
error?: string;
|
|
4083
|
+
};
|
|
3935
4084
|
};
|
|
3936
4085
|
/** Forget a saved MCP server and its credential (DELETE /settings/mcp-servers/{name}). */
|
|
3937
4086
|
export type DeleteMcpServerResponse = {
|
|
@@ -3985,6 +4134,11 @@ export type GetMcpServerResponse = {
|
|
|
3985
4134
|
listed_at: string;
|
|
3986
4135
|
updated_at: string;
|
|
3987
4136
|
secret?: SecretMeta;
|
|
4137
|
+
composio_account?: {
|
|
4138
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
4139
|
+
labels?: Array<string>;
|
|
4140
|
+
checked_at: string;
|
|
4141
|
+
};
|
|
3988
4142
|
};
|
|
3989
4143
|
/** The remote MCP servers saved here, with their tools; never a credential (GET /settings/mcp-servers). */
|
|
3990
4144
|
export type ListMcpServersResponse = {
|
|
@@ -4031,6 +4185,11 @@ export type ListMcpServersResponse = {
|
|
|
4031
4185
|
listed_at: string;
|
|
4032
4186
|
updated_at: string;
|
|
4033
4187
|
secret?: SecretMeta;
|
|
4188
|
+
composio_account?: {
|
|
4189
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
4190
|
+
labels?: Array<string>;
|
|
4191
|
+
checked_at: string;
|
|
4192
|
+
};
|
|
4034
4193
|
}>;
|
|
4035
4194
|
};
|
|
4036
4195
|
/** This server's OAuth client metadata document (GET /settings/mcp-servers/oauth/client.json). */
|
|
@@ -4122,6 +4281,11 @@ export type RefreshMcpServerResponse = {
|
|
|
4122
4281
|
listed_at: string;
|
|
4123
4282
|
updated_at: string;
|
|
4124
4283
|
secret?: SecretMeta;
|
|
4284
|
+
composio_account?: {
|
|
4285
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
4286
|
+
labels?: Array<string>;
|
|
4287
|
+
checked_at: string;
|
|
4288
|
+
};
|
|
4125
4289
|
};
|
|
4126
4290
|
};
|
|
4127
4291
|
/** 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. */
|
|
@@ -4178,6 +4342,11 @@ export type SaveMcpServerResponse = {
|
|
|
4178
4342
|
listed_at: string;
|
|
4179
4343
|
updated_at: string;
|
|
4180
4344
|
secret?: SecretMeta;
|
|
4345
|
+
composio_account?: {
|
|
4346
|
+
state: "connected" | "pending" | "expired" | "none" | "unknown";
|
|
4347
|
+
labels?: Array<string>;
|
|
4348
|
+
checked_at: string;
|
|
4349
|
+
};
|
|
4181
4350
|
composio?: {
|
|
4182
4351
|
removed: boolean;
|
|
4183
4352
|
note: string;
|
|
@@ -4344,6 +4513,9 @@ export type CreateRunComputerViewerResponse = {
|
|
|
4344
4513
|
};
|
|
4345
4514
|
/** Purge a run's content and keep its cost (DELETE /runs/{run_id}). */
|
|
4346
4515
|
/** The files the run wrote (GET /runs/{run_id}/files). */
|
|
4516
|
+
export interface ListRunFilesParams {
|
|
4517
|
+
cut?: "run";
|
|
4518
|
+
}
|
|
4347
4519
|
export type ListRunFilesResponse = RunFileList;
|
|
4348
4520
|
/** One run (GET /runs/{run_id}). */
|
|
4349
4521
|
export type GetRunResponse = Run;
|
|
@@ -6312,6 +6484,28 @@ export type ListTriggersResponse = {
|
|
|
6312
6484
|
note?: string;
|
|
6313
6485
|
}>;
|
|
6314
6486
|
};
|
|
6487
|
+
/** The launch hook's host releases a firing it took and will start no run for (POST /triggers/{trigger_id}/firings/{firing_id}/release). */
|
|
6488
|
+
export type ReleaseTriggerFiringBody = {
|
|
6489
|
+
error: string;
|
|
6490
|
+
};
|
|
6491
|
+
export type ReleaseTriggerFiringResponse = {
|
|
6492
|
+
key: string;
|
|
6493
|
+
by: "schedule" | "email" | "feed" | "manual" | "webhook" | "github" | "composio";
|
|
6494
|
+
nominal_at: string;
|
|
6495
|
+
status: "due" | "started" | "sent" | "skipped" | "failed" | "missed";
|
|
6496
|
+
at: string;
|
|
6497
|
+
run_id: string | null;
|
|
6498
|
+
reason: string | null;
|
|
6499
|
+
error: {
|
|
6500
|
+
code: string;
|
|
6501
|
+
message: string;
|
|
6502
|
+
} | null;
|
|
6503
|
+
count?: number;
|
|
6504
|
+
attempts?: number;
|
|
6505
|
+
retry_at?: string;
|
|
6506
|
+
start_by?: string;
|
|
6507
|
+
catch_up?: true;
|
|
6508
|
+
};
|
|
6315
6509
|
/** 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. */
|
|
6316
6510
|
export type RotateTriggerSecretResponse = {
|
|
6317
6511
|
secret: SecretMeta;
|
|
@@ -6752,6 +6946,54 @@ export type ValidateWorkflowResponse = {
|
|
|
6752
6946
|
}>;
|
|
6753
6947
|
warnings: Array<string>;
|
|
6754
6948
|
};
|
|
6949
|
+
/** A year of the work under this machine's session files (GET /wrapped). */
|
|
6950
|
+
export interface GetWrappedParams {
|
|
6951
|
+
year?: number;
|
|
6952
|
+
}
|
|
6953
|
+
export type GetWrappedResponse = {
|
|
6954
|
+
year: number;
|
|
6955
|
+
sessions: number;
|
|
6956
|
+
turns: number;
|
|
6957
|
+
requests: number;
|
|
6958
|
+
tokens: {
|
|
6959
|
+
input: number;
|
|
6960
|
+
output: number;
|
|
6961
|
+
cache_read: number;
|
|
6962
|
+
cache_write: number;
|
|
6963
|
+
};
|
|
6964
|
+
cost_usd: number;
|
|
6965
|
+
unpriced_requests: number;
|
|
6966
|
+
days: Array<{
|
|
6967
|
+
day: string;
|
|
6968
|
+
requests: number;
|
|
6969
|
+
tokens: number;
|
|
6970
|
+
}>;
|
|
6971
|
+
hours: Array<number>;
|
|
6972
|
+
weekdays: Array<number>;
|
|
6973
|
+
active_ms: number;
|
|
6974
|
+
harnesses: Array<{
|
|
6975
|
+
harness: string;
|
|
6976
|
+
sessions: number;
|
|
6977
|
+
requests: number;
|
|
6978
|
+
tokens: number;
|
|
6979
|
+
}>;
|
|
6980
|
+
models: Array<{
|
|
6981
|
+
model: string;
|
|
6982
|
+
requests: number;
|
|
6983
|
+
tokens: number;
|
|
6984
|
+
cost_usd: number;
|
|
6985
|
+
}>;
|
|
6986
|
+
sources: Array<{
|
|
6987
|
+
source: string;
|
|
6988
|
+
sessions: number;
|
|
6989
|
+
requests: number;
|
|
6990
|
+
}>;
|
|
6991
|
+
imported: Array<{
|
|
6992
|
+
source: string;
|
|
6993
|
+
runs: number;
|
|
6994
|
+
}>;
|
|
6995
|
+
unread_files: number;
|
|
6996
|
+
};
|
|
6755
6997
|
/** Each operation as the runtime sends it, by operationId. */
|
|
6756
6998
|
export declare const OPERATIONS: Readonly<Record<string, Operation>>;
|
|
6757
6999
|
/** The resource groups, each operation a method that sends it through `call`. */
|
|
@@ -6810,6 +7052,10 @@ export declare function resources(call: Call): {
|
|
|
6810
7052
|
/** Check native CLI and sign-in without a paid model call (POST /agents/{agent_id}/native/verify). */
|
|
6811
7053
|
verifyNative: (agentId: string, options?: RequestOptions) => Promise<VerifyNativeResponse>;
|
|
6812
7054
|
};
|
|
7055
|
+
apiKeys: {
|
|
7056
|
+
/** The API keys made for this server's apps; never a key (GET /settings/api-keys). */
|
|
7057
|
+
list: (options?: RequestOptions) => Promise<ListApiKeysResponse>;
|
|
7058
|
+
};
|
|
6813
7059
|
capabilities: {
|
|
6814
7060
|
/** The runs waiting and held, the live runners and the recent hand-backs (GET /capacity). */
|
|
6815
7061
|
getCapacity: (params?: GetCapacityParams, options?: RequestOptions) => Promise<GetCapacityResponse>;
|
|
@@ -6905,6 +7151,8 @@ export declare function resources(call: Call): {
|
|
|
6905
7151
|
writeCorrections: (agentId: string, body: PutLearningCorrectionsBody | RawBody, params: PutLearningCorrectionsParams, options?: BodyOptions) => Promise<Tagged<PutLearningCorrectionsResponse>>;
|
|
6906
7152
|
};
|
|
6907
7153
|
local: {
|
|
7154
|
+
/** Make an API key, shown once (POST /settings/api-keys). */
|
|
7155
|
+
createApiKey: (body: CreateApiKeyBody, options?: RequestOptions) => Promise<CreateApiKeyResponse>;
|
|
6908
7156
|
/** A code that pairs a person's own computer with this server (POST /computers/pairings). */
|
|
6909
7157
|
createPairing: (options?: RequestOptions) => Promise<CreatePairingResponse>;
|
|
6910
7158
|
/** Create a suggested agent: a branch with its package and client, the agent made here, and a pull request (POST /suggestions/{suggestion_id}/create). */
|
|
@@ -6947,6 +7195,8 @@ export declare function resources(call: Call): {
|
|
|
6947
7195
|
getWorkspaceArchil: (options?: RequestOptions) => Promise<GetWorkspaceArchilResponse>;
|
|
6948
7196
|
/** List a saved Composio server's toolkit's events, for a composio trigger (GET /settings/mcp-servers/{name}/composio/events). */
|
|
6949
7197
|
listComposioEvents: (name: string, options?: RequestOptions) => Promise<ListComposioEventsResponse>;
|
|
7198
|
+
/** List the toolkits Composio offers, for the console's toolkit picker; stores nothing (POST /settings/mcp-servers/composio/toolkits). */
|
|
7199
|
+
listComposioToolkits: (body: ListComposioToolkitsBody, options?: RequestOptions) => Promise<ListComposioToolkitsResponse>;
|
|
6950
7200
|
/** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). */
|
|
6951
7201
|
listComposioTools: (body: ListComposioToolsBody, options?: RequestOptions) => Promise<ListComposioToolsResponse>;
|
|
6952
7202
|
/** A saved Composio server's triggers, each with its instance's state on Composio (GET /settings/mcp-servers/{name}/composio/triggers). */
|
|
@@ -6957,6 +7207,8 @@ export declare function resources(call: Call): {
|
|
|
6957
7207
|
listComputers: (options?: RequestOptions) => Promise<ListComputersResponse>;
|
|
6958
7208
|
/** The repositories this server's GitHub App is installed on (GET /integrations/github/repositories). */
|
|
6959
7209
|
listGitHubRepositories: (options?: RequestOptions) => Promise<ListGitHubRepositoriesResponse>;
|
|
7210
|
+
/** The marketplace's templates: every package on marketplace.agentrun.ai, each with the package here that it is (GET /marketplace/templates). */
|
|
7211
|
+
listMarketplaceTemplates: (options?: RequestOptions) => Promise<ListMarketplaceTemplatesResponse>;
|
|
6960
7212
|
/** The names of the MCP servers saved here, and nothing else of them (GET /settings/mcp-server-names). */
|
|
6961
7213
|
listMcpServerNames: (options?: RequestOptions) => Promise<ListMcpServerNamesResponse>;
|
|
6962
7214
|
/** Every run still going that has a computer (GET /computers/running). */
|
|
@@ -6969,6 +7221,8 @@ export declare function resources(call: Call): {
|
|
|
6969
7221
|
receiveHookComposio: (hook: string, body: RawBody, options?: BodyOptions) => Promise<ReceiveHookComposioResponse>;
|
|
6970
7222
|
/** Bring a discarded suggestion back (an undo) (POST /suggestions/{suggestion_id}/restore). */
|
|
6971
7223
|
restoreSuggestion: (suggestionId: string, options?: RequestOptions) => Promise<RestoreSuggestionResponse>;
|
|
7224
|
+
/** Revoke an API key; it opens nothing from now on (DELETE /settings/api-keys/{api_key_id}). */
|
|
7225
|
+
revokeApiKey: (apiKeyId: string, options?: RequestOptions) => Promise<void>;
|
|
6972
7226
|
/** Rotate the Composio project's webhook subscription's secret, and keep the new one (POST /settings/mcp-servers/{name}/composio/rotate-secret). */
|
|
6973
7227
|
rotateComposioSecret: (name: string, options?: RequestOptions) => Promise<RotateComposioSecretResponse>;
|
|
6974
7228
|
/** Save this server's calendar, its iCal address sealed (PUT /settings/calendar). */
|
|
@@ -7050,7 +7304,7 @@ export declare function resources(call: Call): {
|
|
|
7050
7304
|
/** Purge a run's content and keep its cost (DELETE /runs/{run_id}). */
|
|
7051
7305
|
delete: (runId: string, options?: RequestOptions) => Promise<void>;
|
|
7052
7306
|
/** The files the run wrote (GET /runs/{run_id}/files). */
|
|
7053
|
-
files: (runId: string, options?: RequestOptions) => Promise<ListRunFilesResponse>;
|
|
7307
|
+
files: (runId: string, params?: ListRunFilesParams, options?: RequestOptions) => Promise<ListRunFilesResponse>;
|
|
7054
7308
|
/** One run (GET /runs/{run_id}). */
|
|
7055
7309
|
get: (runId: string, options?: RequestOptions) => Promise<GetRunResponse>;
|
|
7056
7310
|
/** Grade an ended run's answer: right or wrong, and the fields a right answer holds (PUT /runs/{run_id}/grade). */
|
|
@@ -7130,6 +7384,8 @@ export declare function resources(call: Call): {
|
|
|
7130
7384
|
stats: (params?: GetStatsParams, options?: RequestOptions) => Promise<GetStatsResponse>;
|
|
7131
7385
|
/** Usage by meter over a period (GET /usage). */
|
|
7132
7386
|
usage: (params?: GetUsageParams, options?: RequestOptions) => Promise<GetUsageResponse>;
|
|
7387
|
+
/** A year of the work under this machine's session files (GET /wrapped). */
|
|
7388
|
+
wrapped: (params?: GetWrappedParams, options?: RequestOptions) => Promise<GetWrappedResponse>;
|
|
7133
7389
|
template: {
|
|
7134
7390
|
/** Apply a template package: make its agent, with its skills, then its triggers (POST /templates/{template}/apply). */
|
|
7135
7391
|
apply: (template: string, body: ApplyTemplateBody, params?: ApplyTemplateParams, options?: RequestOptions) => Promise<ApplyTemplateResponse>;
|
|
@@ -7169,6 +7425,8 @@ export declare function resources(call: Call): {
|
|
|
7169
7425
|
get: (triggerId: string, options?: RequestOptions) => Promise<GetTriggerResponse>;
|
|
7170
7426
|
/** The triggers: schedules and signed webhooks that start an agent's capped runs or message a run (GET /triggers). */
|
|
7171
7427
|
list: (options?: RequestOptions) => Promise<ListTriggersResponse>;
|
|
7428
|
+
/** The launch hook's host releases a firing it took and will start no run for (POST /triggers/{trigger_id}/firings/{firing_id}/release). */
|
|
7429
|
+
releaseFiring: (triggerId: string, firingId: string, body: ReleaseTriggerFiringBody, options?: RequestOptions) => Promise<ReleaseTriggerFiringResponse>;
|
|
7172
7430
|
/** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
|
|
7173
7431
|
rotateSecret: (triggerId: string, options?: RequestOptions) => Promise<RotateTriggerSecretResponse>;
|
|
7174
7432
|
/** 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,7 +143,7 @@ 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 },
|
|
@@ -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 },
|
|
@@ -201,6 +207,7 @@ export const OPERATIONS = {
|
|
|
201
207
|
saveWebhook: { "method": "PUT", "path": "/settings/webhook", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
202
208
|
testWebhook: { "method": "POST", "path": "/settings/webhook/test", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
203
209
|
validateWorkflow: { "method": "POST", "path": "/workflows/validate", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
210
|
+
getWrapped: { "method": "GET", "path": "/wrapped", "pathParams": [], "multiSegment": [], "query": ["year"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
204
211
|
};
|
|
205
212
|
/** The resource groups, each operation a method that sends it through `call`. */
|
|
206
213
|
export function resources(call) {
|
|
@@ -259,6 +266,10 @@ export function resources(call) {
|
|
|
259
266
|
/** Check native CLI and sign-in without a paid model call (POST /agents/{agent_id}/native/verify). */
|
|
260
267
|
verifyNative: (agentId, options) => call("verifyNative", [agentId], undefined, undefined, options),
|
|
261
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
|
+
},
|
|
262
273
|
capabilities: {
|
|
263
274
|
/** The runs waiting and held, the live runners and the recent hand-backs (GET /capacity). */
|
|
264
275
|
getCapacity: (params, options) => call("getCapacity", [], undefined, params, options),
|
|
@@ -354,6 +365,8 @@ export function resources(call) {
|
|
|
354
365
|
writeCorrections: (agentId, body, params, options) => call("putLearningCorrections", [agentId], body, params, options),
|
|
355
366
|
},
|
|
356
367
|
local: {
|
|
368
|
+
/** Make an API key, shown once (POST /settings/api-keys). */
|
|
369
|
+
createApiKey: (body, options) => call("createApiKey", [], body, undefined, options),
|
|
357
370
|
/** A code that pairs a person's own computer with this server (POST /computers/pairings). */
|
|
358
371
|
createPairing: (options) => call("createPairing", [], undefined, undefined, options),
|
|
359
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). */
|
|
@@ -396,6 +409,8 @@ export function resources(call) {
|
|
|
396
409
|
getWorkspaceArchil: (options) => call("getWorkspaceArchil", [], undefined, undefined, options),
|
|
397
410
|
/** List a saved Composio server's toolkit's events, for a composio trigger (GET /settings/mcp-servers/{name}/composio/events). */
|
|
398
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),
|
|
399
414
|
/** List the actions of a Composio toolkit, for the console's picker; stores nothing (POST /settings/mcp-servers/composio/tools). */
|
|
400
415
|
listComposioTools: (body, options) => call("listComposioTools", [], body, undefined, options),
|
|
401
416
|
/** A saved Composio server's triggers, each with its instance's state on Composio (GET /settings/mcp-servers/{name}/composio/triggers). */
|
|
@@ -406,6 +421,8 @@ export function resources(call) {
|
|
|
406
421
|
listComputers: (options) => call("listComputers", [], undefined, undefined, options),
|
|
407
422
|
/** The repositories this server's GitHub App is installed on (GET /integrations/github/repositories). */
|
|
408
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),
|
|
409
426
|
/** The names of the MCP servers saved here, and nothing else of them (GET /settings/mcp-server-names). */
|
|
410
427
|
listMcpServerNames: (options) => call("listMcpServerNames", [], undefined, undefined, options),
|
|
411
428
|
/** Every run still going that has a computer (GET /computers/running). */
|
|
@@ -418,6 +435,8 @@ export function resources(call) {
|
|
|
418
435
|
receiveHookComposio: (hook, body, options) => call("receiveHook_composio", [hook], body, undefined, options),
|
|
419
436
|
/** Bring a discarded suggestion back (an undo) (POST /suggestions/{suggestion_id}/restore). */
|
|
420
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),
|
|
421
440
|
/** Rotate the Composio project's webhook subscription's secret, and keep the new one (POST /settings/mcp-servers/{name}/composio/rotate-secret). */
|
|
422
441
|
rotateComposioSecret: (name, options) => call("rotateComposioSecret", [name], undefined, undefined, options),
|
|
423
442
|
/** Save this server's calendar, its iCal address sealed (PUT /settings/calendar). */
|
|
@@ -499,7 +518,7 @@ export function resources(call) {
|
|
|
499
518
|
/** Purge a run's content and keep its cost (DELETE /runs/{run_id}). */
|
|
500
519
|
delete: (runId, options) => call("deleteRun", [runId], undefined, undefined, options),
|
|
501
520
|
/** The files the run wrote (GET /runs/{run_id}/files). */
|
|
502
|
-
files: (runId, options) => call("listRunFiles", [runId], undefined,
|
|
521
|
+
files: (runId, params, options) => call("listRunFiles", [runId], undefined, params, options),
|
|
503
522
|
/** One run (GET /runs/{run_id}). */
|
|
504
523
|
get: (runId, options) => call("getRun", [runId], undefined, undefined, options),
|
|
505
524
|
/** Grade an ended run's answer: right or wrong, and the fields a right answer holds (PUT /runs/{run_id}/grade). */
|
|
@@ -579,6 +598,8 @@ export function resources(call) {
|
|
|
579
598
|
stats: (params, options) => call("getStats", [], undefined, params, options),
|
|
580
599
|
/** Usage by meter over a period (GET /usage). */
|
|
581
600
|
usage: (params, options) => call("getUsage", [], undefined, params, options),
|
|
601
|
+
/** A year of the work under this machine's session files (GET /wrapped). */
|
|
602
|
+
wrapped: (params, options) => call("getWrapped", [], undefined, params, options),
|
|
582
603
|
template: {
|
|
583
604
|
/** Apply a template package: make its agent, with its skills, then its triggers (POST /templates/{template}/apply). */
|
|
584
605
|
apply: (template, body, params, options) => call("applyTemplate", [template], body, params, options),
|
|
@@ -618,6 +639,8 @@ export function resources(call) {
|
|
|
618
639
|
get: (triggerId, options) => call("getTrigger", [triggerId], undefined, undefined, options),
|
|
619
640
|
/** The triggers: schedules and signed webhooks that start an agent's capped runs or message a run (GET /triggers). */
|
|
620
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),
|
|
621
644
|
/** A webhook trigger's new secret, shown once; the old one signs nothing from now on (POST /triggers/{trigger_id}/secret). */
|
|
622
645
|
rotateSecret: (triggerId, options) => call("rotateTriggerSecret", [triggerId], undefined, undefined, options),
|
|
623
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.57",
|
|
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.57"
|
|
87
87
|
}
|
|
88
88
|
}
|