@parcha/agentrun-client 0.1.0-beta.54 → 0.1.0-beta.56
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/dist/client.js +4 -4
- package/dist/errors.d.ts +5 -0
- package/dist/errors.js +12 -1
- package/dist/operations.generated.d.ts +206 -54
- package/dist/operations.generated.js +19 -2
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// valid header value before any request; no error holds it. A path argument is encoded whole (a file path keeps its
|
|
4
4
|
// slashes), and one that would read as another route is refused before anything is sent. Only a GET, or a request that
|
|
5
5
|
// carries an Idempotency-Key, is tried again. A secret body's values are cut from the answer to it.
|
|
6
|
-
import { AgentRunAuthError, AgentRunError, AgentRunRefused, AgentRunUnreachable, AgentRunUnsupported, AgentRunUsage } from "./errors.js";
|
|
6
|
+
import { AgentRunAuthError, AgentRunError, AgentRunRefused, AgentRunUnreachable, AgentRunUnsupported, AgentRunUsage, said } from "./errors.js";
|
|
7
7
|
import { BAD_HEADER, backoff, LATE, MAX_RETRY_AFTER_MS, pause, segmentOf, wholeMs } from "./http.js";
|
|
8
8
|
import { followRun, waitRun } from "./live.js";
|
|
9
9
|
import { OPERATIONS, resources } from "./operations.generated.js";
|
|
@@ -210,8 +210,8 @@ function secretAt(method, url) {
|
|
|
210
210
|
return Object.values(OPERATIONS).find((op) => op.secret && op.method === method && route(op).test(pathname));
|
|
211
211
|
}
|
|
212
212
|
/** A refused answer as its outcome. The server's error object is kept with every copy of the key cut from it; after a
|
|
213
|
-
* secret body, with the body's values cut too, only its code, and a code that held one is no code. Its
|
|
214
|
-
* read into
|
|
213
|
+
* secret body, with the body's values cut too, only its code, and a code that held one is no code. Its message, as
|
|
214
|
+
* kept, is the error's reason (said); a body that is not a JSON error object is never read into one. A caller's abort while the body is still coming is thrown as the caller's own reason, and a read
|
|
215
215
|
* that ends at or past the exchange's deadline (a wait's timeout) as LATE: cancelled or late work is never reported as a
|
|
216
216
|
* refusal or a bad key. */
|
|
217
217
|
async function refusal(x, response, apiKey, late) {
|
|
@@ -232,7 +232,7 @@ async function refusal(x, response, apiKey, late) {
|
|
|
232
232
|
if (x.secret)
|
|
233
233
|
error = code ? { code } : undefined;
|
|
234
234
|
if (response.status === 401 || response.status === 403)
|
|
235
|
-
return new AgentRunAuthError("refused", `The server refused the API key for ${x.route}: ${response.status}${code ? ` ${code}` : ""}
|
|
235
|
+
return new AgentRunAuthError("refused", `The server refused the API key for ${x.route}: ${response.status}${code ? ` ${code}` : ""}${said(error) || "."}`, { status: response.status, code, error });
|
|
236
236
|
if (response.status === 501)
|
|
237
237
|
return new AgentRunUnsupported(x.route, response.status, code, error);
|
|
238
238
|
const wait = retryAfterOf(response);
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Run } from "./operations.generated.js";
|
|
2
2
|
/** The server's error object (`{ code, message, ... }`), with every copy of the API key cut from its values and keys. */
|
|
3
3
|
export type ServerError = Record<string, unknown>;
|
|
4
|
+
/** The most of the server's reason a message carries. */
|
|
5
|
+
export declare const REASON_CHARS = 300;
|
|
6
|
+
/** The server's reason as a message's end: `: <its message>`, on one line, at most REASON_CHARS characters (code points);
|
|
7
|
+
* empty when the error object holds no message. `error` is the one the client keeps, the key already cut from it. */
|
|
8
|
+
export declare function said(error: ServerError | undefined): string;
|
|
4
9
|
/** What every error of this client is: `kind` says which outcome it is. */
|
|
5
10
|
export declare abstract class AgentRunError extends Error {
|
|
6
11
|
abstract readonly kind: "refused" | "auth" | "unsupported" | "unreachable" | "usage" | "late";
|
package/dist/errors.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/** The most of the server's reason a message carries. */
|
|
2
|
+
export const REASON_CHARS = 300;
|
|
3
|
+
/** The server's reason as a message's end: `: <its message>`, on one line, at most REASON_CHARS characters (code points);
|
|
4
|
+
* empty when the error object holds no message. `error` is the one the client keeps, the key already cut from it. */
|
|
5
|
+
export function said(error) {
|
|
6
|
+
const message = error?.message;
|
|
7
|
+
if (typeof message !== "string" || !message.trim())
|
|
8
|
+
return "";
|
|
9
|
+
const line = [...message.trim().split(/\s+/).join(" ")];
|
|
10
|
+
return `: ${line.length <= REASON_CHARS ? line.join("") : `${line.slice(0, REASON_CHARS - 1).join("")}…`}`;
|
|
11
|
+
}
|
|
1
12
|
/** What every error of this client is: `kind` says which outcome it is. */
|
|
2
13
|
export class AgentRunError extends Error {
|
|
3
14
|
}
|
|
@@ -11,7 +22,7 @@ export class AgentRunRefused extends AgentRunError {
|
|
|
11
22
|
/** How long the server asked to be left before the same request again (its Retry-After), in milliseconds. */
|
|
12
23
|
retryAfterMs;
|
|
13
24
|
constructor(route, status, code, error, why, retryAfterMs) {
|
|
14
|
-
super(why ?? `The server refused ${route}: ${status}${code ? ` ${code}` : ""}
|
|
25
|
+
super(why ?? `The server refused ${route}: ${status}${code ? ` ${code}` : ""}${said(error) || "."}`);
|
|
15
26
|
this.name = "AgentRunRefused";
|
|
16
27
|
this.status = status;
|
|
17
28
|
this.code = code;
|
|
@@ -210,11 +210,11 @@ export type DefinitionInput = {
|
|
|
210
210
|
permission?: "allow" | "deny";
|
|
211
211
|
};
|
|
212
212
|
web_fetch?: {
|
|
213
|
-
provider?: "kernel" | "parallel";
|
|
213
|
+
provider?: "auto" | "firecrawl-keyless" | "kernel" | "parallel";
|
|
214
214
|
permission?: "allow" | "ask" | "deny";
|
|
215
215
|
};
|
|
216
216
|
web_search?: {
|
|
217
|
-
provider?: "auto" | "native" | "exa-keyless" | "parallel" | "off";
|
|
217
|
+
provider?: "auto" | "native" | "firecrawl-keyless" | "exa-keyless" | "parallel" | "off";
|
|
218
218
|
permission?: "allow" | "ask" | "deny";
|
|
219
219
|
};
|
|
220
220
|
web_save?: {
|
|
@@ -527,6 +527,7 @@ export type Cost = {
|
|
|
527
527
|
learning_usd?: number | null;
|
|
528
528
|
tools_usd?: number | null;
|
|
529
529
|
all_in_usd?: number | null;
|
|
530
|
+
degraded?: true;
|
|
530
531
|
plan?: {
|
|
531
532
|
requests: number;
|
|
532
533
|
tokens: number;
|
|
@@ -583,47 +584,6 @@ export type File = {
|
|
|
583
584
|
created_at: Timestamp;
|
|
584
585
|
expires_at: Timestamp | null;
|
|
585
586
|
};
|
|
586
|
-
export type CancelResult = {
|
|
587
|
-
run_id: Id;
|
|
588
|
-
cancel_requested: boolean;
|
|
589
|
-
already_terminal: boolean;
|
|
590
|
-
status: RunStatus;
|
|
591
|
-
};
|
|
592
|
-
export type RunCreateInline = {
|
|
593
|
-
external: ExternalRef;
|
|
594
|
-
definition: DefinitionInput;
|
|
595
|
-
skills?: SkillFiles;
|
|
596
|
-
note?: string;
|
|
597
|
-
input: Record<string, unknown>;
|
|
598
|
-
file_ids?: Array<Id>;
|
|
599
|
-
effort?: Effort;
|
|
600
|
-
max_cost_usd?: number;
|
|
601
|
-
quote_id?: string;
|
|
602
|
-
model_key?: string;
|
|
603
|
-
keys?: Record<string, string>;
|
|
604
|
-
mcp_auth?: Record<string, {
|
|
605
|
-
headers: Record<string, string>;
|
|
606
|
-
} | ComposioRunBinding>;
|
|
607
|
-
labels?: Record<string, string>;
|
|
608
|
-
workflow_first?: boolean;
|
|
609
|
-
learning?: "use";
|
|
610
|
-
repo?: string;
|
|
611
|
-
archil_disk?: {
|
|
612
|
-
disk_id: string;
|
|
613
|
-
};
|
|
614
|
-
hold?: boolean;
|
|
615
|
-
hold_minutes?: number;
|
|
616
|
-
};
|
|
617
|
-
export type ExternalRef = {
|
|
618
|
-
source: string;
|
|
619
|
-
kind: string;
|
|
620
|
-
id: string;
|
|
621
|
-
version: string | number;
|
|
622
|
-
};
|
|
623
|
-
export type ComposioRunBinding = {
|
|
624
|
-
composio_user_id: string;
|
|
625
|
-
connected_account_id?: string;
|
|
626
|
-
};
|
|
627
587
|
export type Run = {
|
|
628
588
|
run_id: Id;
|
|
629
589
|
agent_id: Id;
|
|
@@ -834,6 +794,47 @@ export type RunResult = {
|
|
|
834
794
|
final_answer: string | null;
|
|
835
795
|
output_error?: string;
|
|
836
796
|
};
|
|
797
|
+
export type CancelResult = {
|
|
798
|
+
run_id: Id;
|
|
799
|
+
cancel_requested: boolean;
|
|
800
|
+
already_terminal: boolean;
|
|
801
|
+
status: RunStatus;
|
|
802
|
+
};
|
|
803
|
+
export type RunCreateInline = {
|
|
804
|
+
external: ExternalRef;
|
|
805
|
+
definition: DefinitionInput;
|
|
806
|
+
skills?: SkillFiles;
|
|
807
|
+
note?: string;
|
|
808
|
+
input: Record<string, unknown>;
|
|
809
|
+
file_ids?: Array<Id>;
|
|
810
|
+
effort?: Effort;
|
|
811
|
+
max_cost_usd?: number;
|
|
812
|
+
quote_id?: string;
|
|
813
|
+
model_key?: string;
|
|
814
|
+
keys?: Record<string, string>;
|
|
815
|
+
mcp_auth?: Record<string, {
|
|
816
|
+
headers: Record<string, string>;
|
|
817
|
+
} | ComposioRunBinding>;
|
|
818
|
+
labels?: Record<string, string>;
|
|
819
|
+
workflow_first?: boolean;
|
|
820
|
+
learning?: "use";
|
|
821
|
+
repo?: string;
|
|
822
|
+
archil_disk?: {
|
|
823
|
+
disk_id: string;
|
|
824
|
+
};
|
|
825
|
+
hold?: boolean;
|
|
826
|
+
hold_minutes?: number;
|
|
827
|
+
};
|
|
828
|
+
export type ExternalRef = {
|
|
829
|
+
source: string;
|
|
830
|
+
kind: string;
|
|
831
|
+
id: string;
|
|
832
|
+
version: string | number;
|
|
833
|
+
};
|
|
834
|
+
export type ComposioRunBinding = {
|
|
835
|
+
composio_user_id: string;
|
|
836
|
+
connected_account_id?: string;
|
|
837
|
+
};
|
|
837
838
|
export type RunFileList = {
|
|
838
839
|
run_id: Id;
|
|
839
840
|
files: Array<RunFile>;
|
|
@@ -1204,10 +1205,16 @@ export type Features = {
|
|
|
1204
1205
|
computers?: {
|
|
1205
1206
|
kinds: Array<"none" | "sandbox" | "desktop" | "phone" | "browser">;
|
|
1206
1207
|
};
|
|
1208
|
+
claude_login?: boolean;
|
|
1207
1209
|
tool_keys?: {
|
|
1208
1210
|
routes: boolean;
|
|
1209
1211
|
at_rest: "sealed";
|
|
1210
1212
|
};
|
|
1213
|
+
harness_keys?: {
|
|
1214
|
+
routes: boolean;
|
|
1215
|
+
at_rest: "sealed";
|
|
1216
|
+
harnesses: Array<string>;
|
|
1217
|
+
};
|
|
1211
1218
|
mcp_client?: {
|
|
1212
1219
|
transports: Array<"streamable-http">;
|
|
1213
1220
|
auth: Array<"none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run">;
|
|
@@ -1877,12 +1884,12 @@ export type GetAgentPackageResponse = {
|
|
|
1877
1884
|
sha256: string;
|
|
1878
1885
|
report: {
|
|
1879
1886
|
blocked: Array<{
|
|
1880
|
-
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "
|
|
1887
|
+
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "input_schema" | "budget" | "package";
|
|
1881
1888
|
name: string;
|
|
1882
1889
|
reason: string;
|
|
1883
1890
|
}>;
|
|
1884
1891
|
remade: Array<{
|
|
1885
|
-
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "
|
|
1892
|
+
kind: "mcp_server" | "trigger" | "pin" | "tool_setting" | "tool_policy" | "computer" | "paired_computer" | "sign_in" | "learning" | "input_schema" | "budget" | "package";
|
|
1886
1893
|
name: string;
|
|
1887
1894
|
reason: string;
|
|
1888
1895
|
}>;
|
|
@@ -2514,6 +2521,15 @@ export type ListFilesResponse = {
|
|
|
2514
2521
|
};
|
|
2515
2522
|
/** Send a reserved file's bytes (PUT /files/{file_id}). */
|
|
2516
2523
|
export type UploadFileResponse = File;
|
|
2524
|
+
/** The keys each plan-billed harness recipe runs on, and which are saved: names only, never a value (GET /settings/harness-keys). */
|
|
2525
|
+
export type ListHarnessKeysResponse = {
|
|
2526
|
+
harnesses: Array<{
|
|
2527
|
+
id: string;
|
|
2528
|
+
label: string;
|
|
2529
|
+
keys: Array<SecretMeta>;
|
|
2530
|
+
ready: boolean;
|
|
2531
|
+
}>;
|
|
2532
|
+
};
|
|
2517
2533
|
/** Delete one file of the agent's home (DELETE /agents/{agent_id}/home/files/{path}). */
|
|
2518
2534
|
/** Every file in the agent's home (GET /agents/{agent_id}/home/files). */
|
|
2519
2535
|
export type ListHomeFilesResponse = {
|
|
@@ -2899,6 +2915,7 @@ export type DeleteComposioSubscriptionResponse = {
|
|
|
2899
2915
|
};
|
|
2900
2916
|
/** Remove a paired computer: its token ends and its socket closes (DELETE /computers/{computer_id}). */
|
|
2901
2917
|
/** Forget this server's email account (DELETE /settings/email). */
|
|
2918
|
+
/** Forget one key of a plan-billed harness recipe (DELETE /settings/harness-keys/{harness_id}/{key}). */
|
|
2902
2919
|
/** Stop using the saved model gateway: the provider keys are back in force (DELETE /settings/model-gateway). */
|
|
2903
2920
|
export type DeleteModelGatewayResponse = {
|
|
2904
2921
|
source: "env" | "console" | null;
|
|
@@ -3011,6 +3028,7 @@ export type FinishChatGPTSignInResponse = {
|
|
|
3011
3028
|
authorize_url?: string;
|
|
3012
3029
|
expires_at?: string;
|
|
3013
3030
|
models?: Array<string>;
|
|
3031
|
+
problem?: string;
|
|
3014
3032
|
};
|
|
3015
3033
|
/** This server's calendar: its host, name and time zone, never its address (GET /settings/calendar). */
|
|
3016
3034
|
export type GetCalendarResponse = {
|
|
@@ -3027,6 +3045,7 @@ export type GetChatGPTSignInResponse = {
|
|
|
3027
3045
|
authorize_url?: string;
|
|
3028
3046
|
expires_at?: string;
|
|
3029
3047
|
models?: Array<string>;
|
|
3048
|
+
problem?: string;
|
|
3030
3049
|
};
|
|
3031
3050
|
/** Claude Code's login on this machine: on or off, and what its CLI says of it (GET /settings/claude-login). */
|
|
3032
3051
|
export type GetClaudeLoginResponse = {
|
|
@@ -3041,6 +3060,20 @@ export type GetClaudeLoginResponse = {
|
|
|
3041
3060
|
organization?: string;
|
|
3042
3061
|
plan?: string;
|
|
3043
3062
|
};
|
|
3063
|
+
folder: string;
|
|
3064
|
+
machine: {
|
|
3065
|
+
folder: string;
|
|
3066
|
+
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
3067
|
+
};
|
|
3068
|
+
sign_in?: {
|
|
3069
|
+
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
3070
|
+
started_at: string;
|
|
3071
|
+
ended_at?: string;
|
|
3072
|
+
limit_ms: number;
|
|
3073
|
+
exit_code?: number;
|
|
3074
|
+
signal?: string;
|
|
3075
|
+
error?: string;
|
|
3076
|
+
};
|
|
3044
3077
|
};
|
|
3045
3078
|
/** This server's email account: its address, servers and who signs in, never its password (GET /settings/email). */
|
|
3046
3079
|
export type GetEmailAccountResponse = {
|
|
@@ -3363,6 +3396,10 @@ export type ListGitHubRepositoriesResponse = {
|
|
|
3363
3396
|
export type ListMcpServerNamesResponse = {
|
|
3364
3397
|
names: Array<string>;
|
|
3365
3398
|
};
|
|
3399
|
+
/** Every run still going that has a computer (GET /computers/running). */
|
|
3400
|
+
export type ListRunningComputersResponse = {
|
|
3401
|
+
runs: Array<Run>;
|
|
3402
|
+
};
|
|
3366
3403
|
/** Suggested agents: each repository's scan and the agents it suggests (GET /suggestions). */
|
|
3367
3404
|
export interface ListSuggestionsParams {
|
|
3368
3405
|
repo?: string;
|
|
@@ -3606,12 +3643,13 @@ export type SaveCalendarResponse = {
|
|
|
3606
3643
|
};
|
|
3607
3644
|
/** Have Composio make a managed MCP server for a toolkit's chosen actions, and save it as an MCP server (PUT /settings/mcp-servers/{name}/composio). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
|
|
3608
3645
|
export type SaveComposioServerBody = {
|
|
3609
|
-
api_key: string;
|
|
3610
3646
|
toolkit: string;
|
|
3611
3647
|
tools: Array<string>;
|
|
3612
3648
|
user_id?: string;
|
|
3613
3649
|
auth_config_id?: string;
|
|
3614
3650
|
price_usd?: number;
|
|
3651
|
+
api_key?: string;
|
|
3652
|
+
api_key_env?: "COMPOSIO_API_KEY";
|
|
3615
3653
|
};
|
|
3616
3654
|
export type SaveComposioServerResponse = {
|
|
3617
3655
|
server: {
|
|
@@ -3622,6 +3660,7 @@ export type SaveComposioServerResponse = {
|
|
|
3622
3660
|
auth: {
|
|
3623
3661
|
type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
|
|
3624
3662
|
headers?: Array<string>;
|
|
3663
|
+
api_key_env?: "COMPOSIO_API_KEY";
|
|
3625
3664
|
};
|
|
3626
3665
|
credential: "sealed" | "unreadable" | "expired" | null;
|
|
3627
3666
|
oauth?: {
|
|
@@ -3737,6 +3776,10 @@ export type SaveEmailAccountResponse = {
|
|
|
3737
3776
|
} | null;
|
|
3738
3777
|
password_unreadable: boolean;
|
|
3739
3778
|
};
|
|
3779
|
+
/** Save one key of a plan-billed harness recipe, sealed, for that harness alone (PUT /settings/harness-keys/{harness_id}/{key}). */
|
|
3780
|
+
export type SaveHarnessKeyBody = {
|
|
3781
|
+
value: string;
|
|
3782
|
+
};
|
|
3740
3783
|
/** Use a model gateway for every model, saved here (PUT /settings/model-gateway). Its body's string values are secrets: each copy is cut from the answer, and a refusal keeps only its code. */
|
|
3741
3784
|
export type SaveModelGatewayBody = {
|
|
3742
3785
|
base_url: string;
|
|
@@ -3800,6 +3843,20 @@ export type StartClaudeLoginResponse = {
|
|
|
3800
3843
|
organization?: string;
|
|
3801
3844
|
plan?: string;
|
|
3802
3845
|
};
|
|
3846
|
+
folder: string;
|
|
3847
|
+
machine: {
|
|
3848
|
+
folder: string;
|
|
3849
|
+
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
3850
|
+
};
|
|
3851
|
+
sign_in?: {
|
|
3852
|
+
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
3853
|
+
started_at: string;
|
|
3854
|
+
ended_at?: string;
|
|
3855
|
+
limit_ms: number;
|
|
3856
|
+
exit_code?: number;
|
|
3857
|
+
signal?: string;
|
|
3858
|
+
error?: string;
|
|
3859
|
+
};
|
|
3803
3860
|
};
|
|
3804
3861
|
/** 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. */
|
|
3805
3862
|
export type StartMcpOAuthBody = {
|
|
@@ -3887,6 +3944,20 @@ export type TurnOffClaudeLoginResponse = {
|
|
|
3887
3944
|
organization?: string;
|
|
3888
3945
|
plan?: string;
|
|
3889
3946
|
};
|
|
3947
|
+
folder: string;
|
|
3948
|
+
machine: {
|
|
3949
|
+
folder: string;
|
|
3950
|
+
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
3951
|
+
};
|
|
3952
|
+
sign_in?: {
|
|
3953
|
+
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
3954
|
+
started_at: string;
|
|
3955
|
+
ended_at?: string;
|
|
3956
|
+
limit_ms: number;
|
|
3957
|
+
exit_code?: number;
|
|
3958
|
+
signal?: string;
|
|
3959
|
+
error?: string;
|
|
3960
|
+
};
|
|
3890
3961
|
};
|
|
3891
3962
|
/** Turn on Claude Code's login on this machine for claude-agent's runs (PUT /settings/claude-login). */
|
|
3892
3963
|
export type TurnOnClaudeLoginBody = {
|
|
@@ -3905,6 +3976,20 @@ export type TurnOnClaudeLoginResponse = {
|
|
|
3905
3976
|
organization?: string;
|
|
3906
3977
|
plan?: string;
|
|
3907
3978
|
};
|
|
3979
|
+
folder: string;
|
|
3980
|
+
machine: {
|
|
3981
|
+
folder: string;
|
|
3982
|
+
source: "CLAUDE_CONFIG_DIR" | "default";
|
|
3983
|
+
};
|
|
3984
|
+
sign_in?: {
|
|
3985
|
+
state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
|
|
3986
|
+
started_at: string;
|
|
3987
|
+
ended_at?: string;
|
|
3988
|
+
limit_ms: number;
|
|
3989
|
+
exit_code?: number;
|
|
3990
|
+
signal?: string;
|
|
3991
|
+
error?: string;
|
|
3992
|
+
};
|
|
3908
3993
|
};
|
|
3909
3994
|
/** Forget a saved MCP server and its credential (DELETE /settings/mcp-servers/{name}). */
|
|
3910
3995
|
export type DeleteMcpServerResponse = {
|
|
@@ -3923,6 +4008,7 @@ export type GetMcpServerResponse = {
|
|
|
3923
4008
|
auth: {
|
|
3924
4009
|
type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
|
|
3925
4010
|
headers?: Array<string>;
|
|
4011
|
+
api_key_env?: "COMPOSIO_API_KEY";
|
|
3926
4012
|
};
|
|
3927
4013
|
credential: "sealed" | "unreadable" | "expired" | null;
|
|
3928
4014
|
oauth?: {
|
|
@@ -3968,6 +4054,7 @@ export type ListMcpServersResponse = {
|
|
|
3968
4054
|
auth: {
|
|
3969
4055
|
type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
|
|
3970
4056
|
headers?: Array<string>;
|
|
4057
|
+
api_key_env?: "COMPOSIO_API_KEY";
|
|
3971
4058
|
};
|
|
3972
4059
|
credential: "sealed" | "unreadable" | "expired" | null;
|
|
3973
4060
|
oauth?: {
|
|
@@ -4058,6 +4145,7 @@ export type RefreshMcpServerResponse = {
|
|
|
4058
4145
|
auth: {
|
|
4059
4146
|
type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
|
|
4060
4147
|
headers?: Array<string>;
|
|
4148
|
+
api_key_env?: "COMPOSIO_API_KEY";
|
|
4061
4149
|
};
|
|
4062
4150
|
credential: "sealed" | "unreadable" | "expired" | null;
|
|
4063
4151
|
oauth?: {
|
|
@@ -4113,6 +4201,7 @@ export type SaveMcpServerResponse = {
|
|
|
4113
4201
|
auth: {
|
|
4114
4202
|
type: "none" | "bearer" | "headers" | "oauth" | "github_app" | "per_run";
|
|
4115
4203
|
headers?: Array<string>;
|
|
4204
|
+
api_key_env?: "COMPOSIO_API_KEY";
|
|
4116
4205
|
};
|
|
4117
4206
|
credential: "sealed" | "unreadable" | "expired" | null;
|
|
4118
4207
|
oauth?: {
|
|
@@ -4515,6 +4604,7 @@ export type RaiseRunCapResponse = {
|
|
|
4515
4604
|
/** One file's raw bytes (GET /runs/{run_id}/files/{path}). */
|
|
4516
4605
|
export interface ReadRunFileParams {
|
|
4517
4606
|
download?: 0 | 1;
|
|
4607
|
+
cut?: "run";
|
|
4518
4608
|
Range?: string;
|
|
4519
4609
|
}
|
|
4520
4610
|
/** Resume a paused workflow run (POST /runs/{run_id}/resume). */
|
|
@@ -5080,6 +5170,7 @@ export type ApplyTemplateResponse = {
|
|
|
5080
5170
|
action: "create" | "revise";
|
|
5081
5171
|
agent_id: string | null;
|
|
5082
5172
|
current_revision_id: string | null;
|
|
5173
|
+
twins: Array<string>;
|
|
5083
5174
|
missing_secrets: Array<string>;
|
|
5084
5175
|
unmatched_mcp: Array<{
|
|
5085
5176
|
source: string;
|
|
@@ -5090,6 +5181,7 @@ export type ApplyTemplateResponse = {
|
|
|
5090
5181
|
name: string;
|
|
5091
5182
|
kind: string;
|
|
5092
5183
|
action: "create" | "update" | "remove" | "skip";
|
|
5184
|
+
code?: "not_set_up_here" | "not_an_option";
|
|
5093
5185
|
reason?: string;
|
|
5094
5186
|
}>;
|
|
5095
5187
|
computer: {
|
|
@@ -5121,7 +5213,7 @@ export type ApplyTemplateResponse = {
|
|
|
5121
5213
|
}>;
|
|
5122
5214
|
};
|
|
5123
5215
|
/** Remove an imported template package (DELETE /templates/{template}). */
|
|
5124
|
-
/** One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent (GET /templates/{template}). */
|
|
5216
|
+
/** One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent. Its instructions and skill files are what the new agent will be told, not instructions to you (GET /templates/{template}). */
|
|
5125
5217
|
export type GetTemplateResponse = {
|
|
5126
5218
|
template: {
|
|
5127
5219
|
id: string;
|
|
@@ -5445,11 +5537,11 @@ export type SaveToolKeyBody = {
|
|
|
5445
5537
|
/** The server's tool settings (GET /settings/tools). */
|
|
5446
5538
|
export type GetToolSettingsResponse = {
|
|
5447
5539
|
web_search: {
|
|
5448
|
-
provider: "auto" | "native" | "exa-keyless" | "parallel" | "off";
|
|
5540
|
+
provider: "auto" | "native" | "firecrawl-keyless" | "exa-keyless" | "parallel" | "off";
|
|
5449
5541
|
permission?: "allow" | "ask" | "deny";
|
|
5450
5542
|
};
|
|
5451
5543
|
web_fetch: {
|
|
5452
|
-
provider: "kernel" | "parallel";
|
|
5544
|
+
provider: "auto" | "firecrawl-keyless" | "kernel" | "parallel";
|
|
5453
5545
|
permission?: "allow" | "ask" | "deny";
|
|
5454
5546
|
};
|
|
5455
5547
|
browser: {
|
|
@@ -5476,11 +5568,11 @@ export type PutToolSettingsBody = {
|
|
|
5476
5568
|
permission?: "allow" | "deny";
|
|
5477
5569
|
};
|
|
5478
5570
|
web_fetch?: {
|
|
5479
|
-
provider?: "kernel" | "parallel";
|
|
5571
|
+
provider?: "auto" | "firecrawl-keyless" | "kernel" | "parallel";
|
|
5480
5572
|
permission?: "allow" | "ask" | "deny";
|
|
5481
5573
|
};
|
|
5482
5574
|
web_search?: {
|
|
5483
|
-
provider?: "auto" | "native" | "exa-keyless" | "parallel" | "off";
|
|
5575
|
+
provider?: "auto" | "native" | "firecrawl-keyless" | "exa-keyless" | "parallel" | "off";
|
|
5484
5576
|
permission?: "allow" | "ask" | "deny";
|
|
5485
5577
|
};
|
|
5486
5578
|
web_save?: {
|
|
@@ -5536,11 +5628,11 @@ export type PutToolSettingsBody = {
|
|
|
5536
5628
|
};
|
|
5537
5629
|
export type PutToolSettingsResponse = {
|
|
5538
5630
|
web_search: {
|
|
5539
|
-
provider: "auto" | "native" | "exa-keyless" | "parallel" | "off";
|
|
5631
|
+
provider: "auto" | "native" | "firecrawl-keyless" | "exa-keyless" | "parallel" | "off";
|
|
5540
5632
|
permission?: "allow" | "ask" | "deny";
|
|
5541
5633
|
};
|
|
5542
5634
|
web_fetch: {
|
|
5543
|
-
provider: "kernel" | "parallel";
|
|
5635
|
+
provider: "auto" | "firecrawl-keyless" | "kernel" | "parallel";
|
|
5544
5636
|
permission?: "allow" | "ask" | "deny";
|
|
5545
5637
|
};
|
|
5546
5638
|
browser: {
|
|
@@ -6718,6 +6810,54 @@ export type ValidateWorkflowResponse = {
|
|
|
6718
6810
|
}>;
|
|
6719
6811
|
warnings: Array<string>;
|
|
6720
6812
|
};
|
|
6813
|
+
/** A year of the work under this machine's session files (GET /wrapped). */
|
|
6814
|
+
export interface GetWrappedParams {
|
|
6815
|
+
year?: number;
|
|
6816
|
+
}
|
|
6817
|
+
export type GetWrappedResponse = {
|
|
6818
|
+
year: number;
|
|
6819
|
+
sessions: number;
|
|
6820
|
+
turns: number;
|
|
6821
|
+
requests: number;
|
|
6822
|
+
tokens: {
|
|
6823
|
+
input: number;
|
|
6824
|
+
output: number;
|
|
6825
|
+
cache_read: number;
|
|
6826
|
+
cache_write: number;
|
|
6827
|
+
};
|
|
6828
|
+
cost_usd: number;
|
|
6829
|
+
unpriced_requests: number;
|
|
6830
|
+
days: Array<{
|
|
6831
|
+
day: string;
|
|
6832
|
+
requests: number;
|
|
6833
|
+
tokens: number;
|
|
6834
|
+
}>;
|
|
6835
|
+
hours: Array<number>;
|
|
6836
|
+
weekdays: Array<number>;
|
|
6837
|
+
active_ms: number;
|
|
6838
|
+
harnesses: Array<{
|
|
6839
|
+
harness: string;
|
|
6840
|
+
sessions: number;
|
|
6841
|
+
requests: number;
|
|
6842
|
+
tokens: number;
|
|
6843
|
+
}>;
|
|
6844
|
+
models: Array<{
|
|
6845
|
+
model: string;
|
|
6846
|
+
requests: number;
|
|
6847
|
+
tokens: number;
|
|
6848
|
+
cost_usd: number;
|
|
6849
|
+
}>;
|
|
6850
|
+
sources: Array<{
|
|
6851
|
+
source: string;
|
|
6852
|
+
sessions: number;
|
|
6853
|
+
requests: number;
|
|
6854
|
+
}>;
|
|
6855
|
+
imported: Array<{
|
|
6856
|
+
source: string;
|
|
6857
|
+
runs: number;
|
|
6858
|
+
}>;
|
|
6859
|
+
unread_files: number;
|
|
6860
|
+
};
|
|
6721
6861
|
/** Each operation as the runtime sends it, by operationId. */
|
|
6722
6862
|
export declare const OPERATIONS: Readonly<Record<string, Operation>>;
|
|
6723
6863
|
/** The resource groups, each operation a method that sends it through `call`. */
|
|
@@ -6834,6 +6974,10 @@ export declare function resources(call: Call): {
|
|
|
6834
6974
|
/** Send a reserved file's bytes (PUT /files/{file_id}). */
|
|
6835
6975
|
upload: (fileId: string, body: RawBody, options?: BodyOptions) => Promise<UploadFileResponse>;
|
|
6836
6976
|
};
|
|
6977
|
+
harnessKeys: {
|
|
6978
|
+
/** The keys each plan-billed harness recipe runs on, and which are saved: names only, never a value (GET /settings/harness-keys). */
|
|
6979
|
+
list: (options?: RequestOptions) => Promise<ListHarnessKeysResponse>;
|
|
6980
|
+
};
|
|
6837
6981
|
home: {
|
|
6838
6982
|
/** Delete one file of the agent's home (DELETE /agents/{agent_id}/home/files/{path}). */
|
|
6839
6983
|
delete: (agentId: string, path: string, options?: RequestOptions) => Promise<void>;
|
|
@@ -6879,6 +7023,8 @@ export declare function resources(call: Call): {
|
|
|
6879
7023
|
deleteComputer: (computerId: string, options?: RequestOptions) => Promise<void>;
|
|
6880
7024
|
/** Forget this server's email account (DELETE /settings/email). */
|
|
6881
7025
|
deleteEmailAccount: (options?: RequestOptions) => Promise<void>;
|
|
7026
|
+
/** Forget one key of a plan-billed harness recipe (DELETE /settings/harness-keys/{harness_id}/{key}). */
|
|
7027
|
+
deleteHarnessKey: (harnessId: string, key: string, options?: RequestOptions) => Promise<void>;
|
|
6882
7028
|
/** Stop using the saved model gateway: the provider keys are back in force (DELETE /settings/model-gateway). */
|
|
6883
7029
|
deleteModelGateway: (options?: RequestOptions) => Promise<DeleteModelGatewayResponse>;
|
|
6884
7030
|
/** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
|
|
@@ -6919,6 +7065,8 @@ export declare function resources(call: Call): {
|
|
|
6919
7065
|
listGitHubRepositories: (options?: RequestOptions) => Promise<ListGitHubRepositoriesResponse>;
|
|
6920
7066
|
/** The names of the MCP servers saved here, and nothing else of them (GET /settings/mcp-server-names). */
|
|
6921
7067
|
listMcpServerNames: (options?: RequestOptions) => Promise<ListMcpServerNamesResponse>;
|
|
7068
|
+
/** Every run still going that has a computer (GET /computers/running). */
|
|
7069
|
+
listRunningComputers: (options?: RequestOptions) => Promise<ListRunningComputersResponse>;
|
|
6922
7070
|
/** Suggested agents: each repository's scan and the agents it suggests (GET /suggestions). */
|
|
6923
7071
|
listSuggestions: (params?: ListSuggestionsParams, options?: RequestOptions) => Promise<ListSuggestionsResponse>;
|
|
6924
7072
|
/** Turn Mode 2 on: run folders on Archil disks, one per agent (PUT /workspace/archil). */
|
|
@@ -6937,6 +7085,8 @@ export declare function resources(call: Call): {
|
|
|
6937
7085
|
saveComputerKeys: (provider: string, body: SaveComputerKeysBody, options?: RequestOptions) => Promise<SaveComputerKeysResponse>;
|
|
6938
7086
|
/** Save this server's email account, its password sealed (PUT /settings/email). */
|
|
6939
7087
|
saveEmailAccount: (body: SaveEmailAccountBody, options?: RequestOptions) => Promise<SaveEmailAccountResponse>;
|
|
7088
|
+
/** Save one key of a plan-billed harness recipe, sealed, for that harness alone (PUT /settings/harness-keys/{harness_id}/{key}). */
|
|
7089
|
+
saveHarnessKey: (harnessId: string, key: string, body: SaveHarnessKeyBody, options?: RequestOptions) => Promise<void>;
|
|
6940
7090
|
/** Use a model gateway for every model, saved here (PUT /settings/model-gateway). */
|
|
6941
7091
|
saveModelGateway: (body: SaveModelGatewayBody, options?: RequestOptions) => Promise<SaveModelGatewayResponse>;
|
|
6942
7092
|
/** Scan a repository for places its app needs an agent (POST /suggestions/scans). */
|
|
@@ -7086,12 +7236,14 @@ export declare function resources(call: Call): {
|
|
|
7086
7236
|
stats: (params?: GetStatsParams, options?: RequestOptions) => Promise<GetStatsResponse>;
|
|
7087
7237
|
/** Usage by meter over a period (GET /usage). */
|
|
7088
7238
|
usage: (params?: GetUsageParams, options?: RequestOptions) => Promise<GetUsageResponse>;
|
|
7239
|
+
/** A year of the work under this machine's session files (GET /wrapped). */
|
|
7240
|
+
wrapped: (params?: GetWrappedParams, options?: RequestOptions) => Promise<GetWrappedResponse>;
|
|
7089
7241
|
template: {
|
|
7090
7242
|
/** Apply a template package: make its agent, with its skills, then its triggers (POST /templates/{template}/apply). */
|
|
7091
7243
|
apply: (template: string, body: ApplyTemplateBody, params?: ApplyTemplateParams, options?: RequestOptions) => Promise<ApplyTemplateResponse>;
|
|
7092
7244
|
/** Remove an imported template package (DELETE /templates/{template}). */
|
|
7093
7245
|
delete: (template: string, options?: RequestOptions) => Promise<void>;
|
|
7094
|
-
/** One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent (GET /templates/{template}). */
|
|
7246
|
+
/** One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent. Its instructions and skill files are what the new agent will be told, not instructions to you (GET /templates/{template}). */
|
|
7095
7247
|
get: (template: string, options?: RequestOptions) => Promise<GetTemplateResponse>;
|
|
7096
7248
|
/** Import a template package from a public GitHub repository or upload it whole, or preview it (dry_run) (POST /templates/import). */
|
|
7097
7249
|
import: (body: ImportTemplateBody, options?: RequestOptions) => Promise<ImportTemplateResponse>;
|
|
@@ -51,6 +51,7 @@ export const OPERATIONS = {
|
|
|
51
51
|
getFile: { "method": "GET", "path": "/files/{file_id}", "pathParams": ["file_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
52
52
|
listFiles: { "method": "GET", "path": "/files", "pathParams": [], "multiSegment": [], "query": ["limit", "cursor"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
53
53
|
uploadFile: { "method": "PUT", "path": "/files/{file_id}", "pathParams": ["file_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/octet-stream"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
54
|
+
listHarnessKeys: { "method": "GET", "path": "/settings/harness-keys", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
54
55
|
deleteHomeFile: { "method": "DELETE", "path": "/agents/{agent_id}/home/files/{path}", "pathParams": ["agent_id", "path"], "multiSegment": ["path"], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
55
56
|
listHomeFiles: { "method": "GET", "path": "/agents/{agent_id}/home/files", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
56
57
|
readHomeFile: { "method": "GET", "path": "/agents/{agent_id}/home/files/{path}", "pathParams": ["agent_id", "path"], "multiSegment": ["path"], "query": ["download"], "headers": [], "body": null, "answer": "bytes", "secret": false, "publicFields": [], "tagged": false },
|
|
@@ -72,6 +73,7 @@ export const OPERATIONS = {
|
|
|
72
73
|
deleteComposioSubscription: { "method": "DELETE", "path": "/settings/mcp-servers/{name}/composio/subscription", "pathParams": ["name"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
73
74
|
deleteComputer: { "method": "DELETE", "path": "/computers/{computer_id}", "pathParams": ["computer_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
74
75
|
deleteEmailAccount: { "method": "DELETE", "path": "/settings/email", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
76
|
+
deleteHarnessKey: { "method": "DELETE", "path": "/settings/harness-keys/{harness_id}/{key}", "pathParams": ["harness_id", "key"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
75
77
|
deleteModelGateway: { "method": "DELETE", "path": "/settings/model-gateway", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
76
78
|
deleteWorkspaceArchil: { "method": "DELETE", "path": "/workspace/archil", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
77
79
|
discardSuggestion: { "method": "POST", "path": "/suggestions/{suggestion_id}/discard", "pathParams": ["suggestion_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
@@ -94,6 +96,7 @@ export const OPERATIONS = {
|
|
|
94
96
|
listComputers: { "method": "GET", "path": "/computers", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
95
97
|
listGitHubRepositories: { "method": "GET", "path": "/integrations/github/repositories", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
96
98
|
listMcpServerNames: { "method": "GET", "path": "/settings/mcp-server-names", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
99
|
+
listRunningComputers: { "method": "GET", "path": "/computers/running", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
97
100
|
listSuggestions: { "method": "GET", "path": "/suggestions", "pathParams": [], "multiSegment": [], "query": ["repo", "status"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
98
101
|
putWorkspaceArchil: { "method": "PUT", "path": "/workspace/archil", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
99
102
|
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,6 +106,7 @@ export const OPERATIONS = {
|
|
|
103
106
|
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 },
|
|
104
107
|
saveComputerKeys: { "method": "PUT", "path": "/computers/{provider}/keys", "pathParams": ["provider"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
105
108
|
saveEmailAccount: { "method": "PUT", "path": "/settings/email", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
109
|
+
saveHarnessKey: { "method": "PUT", "path": "/settings/harness-keys/{harness_id}/{key}", "pathParams": ["harness_id", "key"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "none", "secret": false, "publicFields": [], "tagged": false },
|
|
106
110
|
saveModelGateway: { "method": "PUT", "path": "/settings/model-gateway", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": ["base_url", "ids", "models.default", "models.fast", "models.strong"], "tagged": false },
|
|
107
111
|
scanForSuggestions: { "method": "POST", "path": "/suggestions/scans", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
108
112
|
signOutChatGPT: { "method": "DELETE", "path": "/settings/chatgpt", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
@@ -145,7 +149,7 @@ export const OPERATIONS = {
|
|
|
145
149
|
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 },
|
|
146
150
|
pauseRun: { "method": "POST", "path": "/runs/{run_id}/pause", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
147
151
|
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 },
|
|
148
|
-
readRunFile: { "method": "GET", "path": "/runs/{run_id}/files/{path}", "pathParams": ["run_id", "path"], "multiSegment": ["path"], "query": ["download"], "headers": ["Range"], "body": null, "answer": "bytes", "secret": false, "publicFields": [], "tagged": false },
|
|
152
|
+
readRunFile: { "method": "GET", "path": "/runs/{run_id}/files/{path}", "pathParams": ["run_id", "path"], "multiSegment": ["path"], "query": ["download", "cut"], "headers": ["Range"], "body": null, "answer": "bytes", "secret": false, "publicFields": [], "tagged": false },
|
|
149
153
|
resumeRun: { "method": "POST", "path": "/runs/{run_id}/resume", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
150
154
|
createRun: { "method": "POST", "path": "/agents/{agent_id}/runs", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": ["Idempotency-Key"], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
151
155
|
startRun: { "method": "POST", "path": "/runs/{run_id}/start", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
@@ -197,6 +201,7 @@ export const OPERATIONS = {
|
|
|
197
201
|
saveWebhook: { "method": "PUT", "path": "/settings/webhook", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
198
202
|
testWebhook: { "method": "POST", "path": "/settings/webhook/test", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
199
203
|
validateWorkflow: { "method": "POST", "path": "/workflows/validate", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
204
|
+
getWrapped: { "method": "GET", "path": "/wrapped", "pathParams": [], "multiSegment": [], "query": ["year"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
|
|
200
205
|
};
|
|
201
206
|
/** The resource groups, each operation a method that sends it through `call`. */
|
|
202
207
|
export function resources(call) {
|
|
@@ -313,6 +318,10 @@ export function resources(call) {
|
|
|
313
318
|
/** Send a reserved file's bytes (PUT /files/{file_id}). */
|
|
314
319
|
upload: (fileId, body, options) => call("uploadFile", [fileId], body, undefined, options),
|
|
315
320
|
},
|
|
321
|
+
harnessKeys: {
|
|
322
|
+
/** The keys each plan-billed harness recipe runs on, and which are saved: names only, never a value (GET /settings/harness-keys). */
|
|
323
|
+
list: (options) => call("listHarnessKeys", [], undefined, undefined, options),
|
|
324
|
+
},
|
|
316
325
|
home: {
|
|
317
326
|
/** Delete one file of the agent's home (DELETE /agents/{agent_id}/home/files/{path}). */
|
|
318
327
|
delete: (agentId, path, options) => call("deleteHomeFile", [agentId, path], undefined, undefined, options),
|
|
@@ -358,6 +367,8 @@ export function resources(call) {
|
|
|
358
367
|
deleteComputer: (computerId, options) => call("deleteComputer", [computerId], undefined, undefined, options),
|
|
359
368
|
/** Forget this server's email account (DELETE /settings/email). */
|
|
360
369
|
deleteEmailAccount: (options) => call("deleteEmailAccount", [], undefined, undefined, options),
|
|
370
|
+
/** Forget one key of a plan-billed harness recipe (DELETE /settings/harness-keys/{harness_id}/{key}). */
|
|
371
|
+
deleteHarnessKey: (harnessId, key, options) => call("deleteHarnessKey", [harnessId, key], undefined, undefined, options),
|
|
361
372
|
/** Stop using the saved model gateway: the provider keys are back in force (DELETE /settings/model-gateway). */
|
|
362
373
|
deleteModelGateway: (options) => call("deleteModelGateway", [], undefined, undefined, options),
|
|
363
374
|
/** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
|
|
@@ -398,6 +409,8 @@ export function resources(call) {
|
|
|
398
409
|
listGitHubRepositories: (options) => call("listGitHubRepositories", [], undefined, undefined, options),
|
|
399
410
|
/** The names of the MCP servers saved here, and nothing else of them (GET /settings/mcp-server-names). */
|
|
400
411
|
listMcpServerNames: (options) => call("listMcpServerNames", [], undefined, undefined, options),
|
|
412
|
+
/** Every run still going that has a computer (GET /computers/running). */
|
|
413
|
+
listRunningComputers: (options) => call("listRunningComputers", [], undefined, undefined, options),
|
|
401
414
|
/** Suggested agents: each repository's scan and the agents it suggests (GET /suggestions). */
|
|
402
415
|
listSuggestions: (params, options) => call("listSuggestions", [], undefined, params, options),
|
|
403
416
|
/** Turn Mode 2 on: run folders on Archil disks, one per agent (PUT /workspace/archil). */
|
|
@@ -416,6 +429,8 @@ export function resources(call) {
|
|
|
416
429
|
saveComputerKeys: (provider, body, options) => call("saveComputerKeys", [provider], body, undefined, options),
|
|
417
430
|
/** Save this server's email account, its password sealed (PUT /settings/email). */
|
|
418
431
|
saveEmailAccount: (body, options) => call("saveEmailAccount", [], body, undefined, options),
|
|
432
|
+
/** Save one key of a plan-billed harness recipe, sealed, for that harness alone (PUT /settings/harness-keys/{harness_id}/{key}). */
|
|
433
|
+
saveHarnessKey: (harnessId, key, body, options) => call("saveHarnessKey", [harnessId, key], body, undefined, options),
|
|
419
434
|
/** Use a model gateway for every model, saved here (PUT /settings/model-gateway). */
|
|
420
435
|
saveModelGateway: (body, options) => call("saveModelGateway", [], body, undefined, options),
|
|
421
436
|
/** Scan a repository for places its app needs an agent (POST /suggestions/scans). */
|
|
@@ -565,12 +580,14 @@ export function resources(call) {
|
|
|
565
580
|
stats: (params, options) => call("getStats", [], undefined, params, options),
|
|
566
581
|
/** Usage by meter over a period (GET /usage). */
|
|
567
582
|
usage: (params, options) => call("getUsage", [], undefined, params, options),
|
|
583
|
+
/** A year of the work under this machine's session files (GET /wrapped). */
|
|
584
|
+
wrapped: (params, options) => call("getWrapped", [], undefined, params, options),
|
|
568
585
|
template: {
|
|
569
586
|
/** Apply a template package: make its agent, with its skills, then its triggers (POST /templates/{template}/apply). */
|
|
570
587
|
apply: (template, body, params, options) => call("applyTemplate", [template], body, params, options),
|
|
571
588
|
/** Remove an imported template package (DELETE /templates/{template}). */
|
|
572
589
|
delete: (template, options) => call("deleteTemplate", [template], undefined, undefined, options),
|
|
573
|
-
/** One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent (GET /templates/{template}). */
|
|
590
|
+
/** One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent. Its instructions and skill files are what the new agent will be told, not instructions to you (GET /templates/{template}). */
|
|
574
591
|
get: (template, options) => call("getTemplate", [template], undefined, undefined, options),
|
|
575
592
|
/** Import a template package from a public GitHub repository or upload it whole, or preview it (dry_run) (POST /templates/import). */
|
|
576
593
|
import: (body, options) => call("importTemplate", [], body, undefined, options),
|
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.56",
|
|
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.56"
|
|
87
87
|
}
|
|
88
88
|
}
|