@parcha/agentrun-client 0.1.0-beta.59 → 0.1.0-beta.60

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.
@@ -337,6 +337,8 @@ export type AgentList = {
337
337
  export type RunList = {
338
338
  runs: Array<RunSummary>;
339
339
  next_cursor: string | null;
340
+ scope?: "active" | "review";
341
+ observed_at?: string;
340
342
  };
341
343
  export type RunSummary = {
342
344
  run_id: Id;
@@ -349,6 +351,18 @@ export type RunSummary = {
349
351
  created_at: Timestamp;
350
352
  ended_at: Timestamp | null;
351
353
  cost: Cost;
354
+ computer?: {
355
+ kind: "sandbox" | "desktop" | "phone" | "browser";
356
+ provider: string;
357
+ state: "starting" | "ready" | "taken_over" | "released" | "ended" | "failed";
358
+ why?: string;
359
+ held?: {
360
+ state: "starting" | "waiting" | "started" | "ended" | "released";
361
+ minutes: number;
362
+ until?: string;
363
+ why?: "timeout" | "lost";
364
+ };
365
+ };
352
366
  sdk?: {
353
367
  runtime: "claude-agent-sdk" | "codex-sdk" | "eve";
354
368
  model: string | null;
@@ -422,6 +436,37 @@ export type RunSummary = {
422
436
  };
423
437
  model_requests: null;
424
438
  };
439
+ factory?: {
440
+ lifecycle_version: string;
441
+ source: "managed" | "native" | "sdk" | "cli";
442
+ runtime: string;
443
+ control: "managed" | "observed";
444
+ controls: {
445
+ stop: boolean;
446
+ cancel: boolean;
447
+ approve: boolean;
448
+ };
449
+ observation: {
450
+ basis: "runner" | "connector" | "unreported";
451
+ status: "current" | "offline" | "revoked" | "unreported";
452
+ last_seen_at: string | null;
453
+ };
454
+ last_activity_at: string | null;
455
+ github: null | {
456
+ repository: string;
457
+ issue: number | null;
458
+ pull_request: number | null;
459
+ head_sha: string | null;
460
+ provenance: "launch" | "github_trigger";
461
+ };
462
+ children: Array<{
463
+ id: string;
464
+ conversation_id: number;
465
+ parent_call_id: string;
466
+ status: "active" | "completed";
467
+ label: string | null;
468
+ }>;
469
+ };
425
470
  console_url?: string;
426
471
  revision: string;
427
472
  kind: "agentic" | "workflow";
@@ -433,7 +478,7 @@ export type RunSummary = {
433
478
  error?: RunError | null;
434
479
  learning?: {
435
480
  state: "seeded" | "reflecting" | "merged" | "dropped";
436
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | "reset" | null;
481
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | "reset" | "purged_since_seed" | null;
437
482
  detail: string | null;
438
483
  workflows?: Array<{
439
484
  file: string;
@@ -539,7 +584,6 @@ export type Cost = {
539
584
  followup_usd?: number | null;
540
585
  shadow_usd?: number | null;
541
586
  share_usd?: number | null;
542
- degraded?: true;
543
587
  plan?: {
544
588
  requests: number;
545
589
  tokens: number;
@@ -685,6 +729,37 @@ export type Run = {
685
729
  };
686
730
  model_requests: null;
687
731
  };
732
+ factory?: {
733
+ lifecycle_version: string;
734
+ source: "managed" | "native" | "sdk" | "cli";
735
+ runtime: string;
736
+ control: "managed" | "observed";
737
+ controls: {
738
+ stop: boolean;
739
+ cancel: boolean;
740
+ approve: boolean;
741
+ };
742
+ observation: {
743
+ basis: "runner" | "connector" | "unreported";
744
+ status: "current" | "offline" | "revoked" | "unreported";
745
+ last_seen_at: string | null;
746
+ };
747
+ last_activity_at: string | null;
748
+ github: null | {
749
+ repository: string;
750
+ issue: number | null;
751
+ pull_request: number | null;
752
+ head_sha: string | null;
753
+ provenance: "launch" | "github_trigger";
754
+ };
755
+ children: Array<{
756
+ id: string;
757
+ conversation_id: number;
758
+ parent_call_id: string;
759
+ status: "active" | "completed";
760
+ label: string | null;
761
+ }>;
762
+ };
688
763
  console_url?: string;
689
764
  revision: string;
690
765
  kind: "agentic" | "workflow";
@@ -728,7 +803,7 @@ export type Run = {
728
803
  };
729
804
  learning?: {
730
805
  state: "seeded" | "reflecting" | "merged" | "dropped";
731
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | "reset" | null;
806
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | "reset" | "purged_since_seed" | null;
732
807
  detail: string | null;
733
808
  at: string;
734
809
  workflows?: Array<{
@@ -1002,7 +1077,7 @@ export type TimelineRow = {
1002
1077
  tool_result_text?: string | null;
1003
1078
  learning?: {
1004
1079
  state: "seeded" | "reflecting" | "merged" | "dropped";
1005
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | "reset" | null;
1080
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | "reset" | "purged_since_seed" | null;
1006
1081
  detail: string | null;
1007
1082
  };
1008
1083
  };
@@ -1071,7 +1146,7 @@ export type Capabilities = {
1071
1146
  } | {
1072
1147
  mode: "sandbox";
1073
1148
  box: "docker" | "daytona" | "modal" | "e2b" | "agent37" | "morph" | "cloudflare" | "fly" | "boxd" | "groundbox";
1074
- };
1149
+ } | null;
1075
1150
  default_reason?: string;
1076
1151
  allow: Array<string>;
1077
1152
  };
@@ -1252,7 +1327,6 @@ export type Features = {
1252
1327
  routes: boolean;
1253
1328
  at_rest: "sealed";
1254
1329
  harnesses: Array<string>;
1255
- kept: Array<string>;
1256
1330
  };
1257
1331
  mcp_client?: {
1258
1332
  transports: Array<"streamable-http">;
@@ -2145,6 +2219,7 @@ export interface ListRunsParams {
2145
2219
  limit?: number;
2146
2220
  cursor?: string;
2147
2221
  status?: "queued" | "working" | "paused" | "input_required" | "completed" | "failed" | "cancelled";
2222
+ scope?: "active" | "review";
2148
2223
  label?: string;
2149
2224
  }
2150
2225
  export type ListRunsResponse = RunList;
@@ -3120,6 +3195,7 @@ export type DeleteModelGatewayResponse = {
3120
3195
  /** Turn Mode 2 off: run folders on this server's own disk (DELETE /workspace/archil). */
3121
3196
  export type DeleteWorkspaceArchilResponse = {
3122
3197
  on: boolean;
3198
+ regions: Record<string, string>;
3123
3199
  secret: {
3124
3200
  name: string;
3125
3201
  set: boolean;
@@ -3129,6 +3205,7 @@ export type DeleteWorkspaceArchilResponse = {
3129
3205
  source?: "env" | "console";
3130
3206
  region?: string;
3131
3207
  s3Url?: string;
3208
+ s3UrlFrom?: "region" | "given";
3132
3209
  image?: string;
3133
3210
  };
3134
3211
  /** Discard a suggested agent: it goes away, and later scans leave it out (POST /suggestions/{suggestion_id}/discard). */
@@ -3389,6 +3466,7 @@ export type GetSuggestionResponse = {
3389
3466
  /** Whether run folders are on Archil disks (Mode 2), the settings, and whether its keys are saved (GET /workspace/archil). */
3390
3467
  export type GetWorkspaceArchilResponse = {
3391
3468
  on: boolean;
3469
+ regions: Record<string, string>;
3392
3470
  secret: {
3393
3471
  name: string;
3394
3472
  set: boolean;
@@ -3398,6 +3476,7 @@ export type GetWorkspaceArchilResponse = {
3398
3476
  source?: "env" | "console";
3399
3477
  region?: string;
3400
3478
  s3Url?: string;
3479
+ s3UrlFrom?: "region" | "given";
3401
3480
  image?: string;
3402
3481
  };
3403
3482
  /** Where GitHub sends the owner's browser back with the new App's code (GET /integrations/github/callback). */
@@ -3717,7 +3796,7 @@ export type ListSuggestionsResponse = {
3717
3796
  /** Turn Mode 2 on: run folders on Archil disks, one per agent (PUT /workspace/archil). */
3718
3797
  export type PutWorkspaceArchilBody = {
3719
3798
  region: string;
3720
- s3Url: string;
3799
+ s3Url?: string;
3721
3800
  image?: string;
3722
3801
  keys?: {
3723
3802
  ARCHIL_API_KEY?: string | null;
@@ -3725,6 +3804,7 @@ export type PutWorkspaceArchilBody = {
3725
3804
  };
3726
3805
  export type PutWorkspaceArchilResponse = {
3727
3806
  on: boolean;
3807
+ regions: Record<string, string>;
3728
3808
  secret: {
3729
3809
  name: string;
3730
3810
  set: boolean;
@@ -3734,6 +3814,7 @@ export type PutWorkspaceArchilResponse = {
3734
3814
  source?: "env" | "console";
3735
3815
  region?: string;
3736
3816
  s3Url?: string;
3817
+ s3UrlFrom?: "region" | "given";
3737
3818
  image?: string;
3738
3819
  };
3739
3820
  /** Fire a Composio trigger: a request it checks, no token (POST /hooks/composio/{hook}). */
@@ -4048,6 +4129,39 @@ export type SignOutChatGPTResponse = {
4048
4129
  revoked: boolean;
4049
4130
  message?: string;
4050
4131
  };
4132
+ /** Sign out of Claude Code's login on this machine: AgentRun's own login removed, the mode off (POST /settings/claude-login/sign-out). */
4133
+ export type SignOutClaudeLoginResponse = {
4134
+ confirmed: boolean;
4135
+ message?: string;
4136
+ login: {
4137
+ state: "off" | "other_machine" | "refused" | "signed_in" | "signed_out" | "no_cli" | "unknown";
4138
+ place: "agentrun" | "machine";
4139
+ command: string;
4140
+ can_start: boolean;
4141
+ refused?: string;
4142
+ account?: {
4143
+ method?: string;
4144
+ email?: string;
4145
+ organization?: string;
4146
+ plan?: string;
4147
+ };
4148
+ folder: string;
4149
+ machine: {
4150
+ folder: string;
4151
+ source: "CLAUDE_CONFIG_DIR" | "default";
4152
+ credentials?: string;
4153
+ };
4154
+ sign_in?: {
4155
+ state: "waiting" | "signed_in" | "timed_out" | "failed" | "not_started";
4156
+ started_at: string;
4157
+ ended_at?: string;
4158
+ limit_ms: number;
4159
+ exit_code?: number;
4160
+ signal?: string;
4161
+ error?: string;
4162
+ };
4163
+ };
4164
+ };
4051
4165
  /** Start signing in with ChatGPT: the link to open (POST /settings/chatgpt/sign-in). */
4052
4166
  export type StartChatGPTSignInResponse = {
4053
4167
  authorize_url: string;
@@ -4821,7 +4935,7 @@ export type HandBackRunComputerResponse = {
4821
4935
  export type GetRunLearningResponse = {
4822
4936
  run: string;
4823
4937
  state: "seeded" | "reflecting" | "merged" | "dropped";
4824
- reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | "reset" | null;
4938
+ reason: "seed_failed" | "no_budget" | "unknown_cost" | "cancelled" | "crashed" | "reflect_failed" | "empty" | "checker" | "use" | "reset" | "purged_since_seed" | null;
4825
4939
  detail: string | null;
4826
4940
  at: string;
4827
4941
  seed: string | null;
@@ -4884,6 +4998,7 @@ export interface ListAllRunsParams {
4884
4998
  agent?: string;
4885
4999
  revision?: string;
4886
5000
  status?: "queued" | "working" | "paused" | "input_required" | "completed" | "failed" | "cancelled";
5001
+ scope?: "active" | "review";
4887
5002
  archived?: boolean;
4888
5003
  label?: string;
4889
5004
  source?: string;
@@ -5601,6 +5716,10 @@ export type GetTemplateResponse = {
5601
5716
  pin?: Record<string, string | number | boolean | null | Array<string | number | boolean | null> | {
5602
5717
  keys: Array<string>;
5603
5718
  }>;
5719
+ file?: {
5720
+ folder: string;
5721
+ show: Array<string>;
5722
+ };
5604
5723
  }>;
5605
5724
  }>;
5606
5725
  parameters: Record<string, unknown>;
@@ -5702,6 +5821,10 @@ export type ImportTemplateResponse = {
5702
5821
  pin?: Record<string, string | number | boolean | null | Array<string | number | boolean | null> | {
5703
5822
  keys: Array<string>;
5704
5823
  }>;
5824
+ file?: {
5825
+ folder: string;
5826
+ show: Array<string>;
5827
+ };
5705
5828
  }>;
5706
5829
  }>;
5707
5830
  parameters: Record<string, unknown>;
@@ -5796,6 +5919,10 @@ export type ListTemplatesResponse = {
5796
5919
  pin?: Record<string, string | number | boolean | null | Array<string | number | boolean | null> | {
5797
5920
  keys: Array<string>;
5798
5921
  }>;
5922
+ file?: {
5923
+ folder: string;
5924
+ show: Array<string>;
5925
+ };
5799
5926
  }>;
5800
5927
  }>;
5801
5928
  parameters: Record<string, unknown>;
@@ -7445,6 +7572,8 @@ export declare function resources(call: Call): {
7445
7572
  scanForSuggestions: (body: ScanForSuggestionsBody, options?: RequestOptions) => Promise<ScanForSuggestionsResponse>;
7446
7573
  /** Sign out of ChatGPT: the session revoked at OpenAI, then forgotten here (DELETE /settings/chatgpt). */
7447
7574
  signOutChatGpt: (options?: RequestOptions) => Promise<SignOutChatGPTResponse>;
7575
+ /** Sign out of Claude Code's login on this machine: AgentRun's own login removed, the mode off (POST /settings/claude-login/sign-out). */
7576
+ signOutClaudeLogin: (options?: RequestOptions) => Promise<SignOutClaudeLoginResponse>;
7448
7577
  /** Start signing in with ChatGPT: the link to open (POST /settings/chatgpt/sign-in). */
7449
7578
  startChatGptsignIn: (options?: RequestOptions) => Promise<StartChatGPTSignInResponse>;
7450
7579
  /** Start the Claude Code CLI's own sign-in on this machine (POST /settings/claude-login/login). */
@@ -21,7 +21,7 @@ export const OPERATIONS = {
21
21
  getAgentPackage: { "method": "GET", "path": "/agents/{agent_id}/package", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
22
22
  resolveSourceSync: { "method": "POST", "path": "/agents/{agent_id}/source/resolve", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
23
23
  reviewSourceProject: { "method": "POST", "path": "/agents/{agent_id}/source/project-review", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
24
- listRuns: { "method": "GET", "path": "/agents/{agent_id}/runs", "pathParams": ["agent_id"], "multiSegment": [], "query": ["limit", "cursor", "status", "label"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
24
+ listRuns: { "method": "GET", "path": "/agents/{agent_id}/runs", "pathParams": ["agent_id"], "multiSegment": [], "query": ["limit", "cursor", "status", "scope", "label"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
25
25
  setSourceSync: { "method": "PATCH", "path": "/agents/{agent_id}/source", "pathParams": ["agent_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
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 },
@@ -115,6 +115,7 @@ export const OPERATIONS = {
115
115
  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 },
116
116
  scanForSuggestions: { "method": "POST", "path": "/suggestions/scans", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
117
117
  signOutChatGPT: { "method": "DELETE", "path": "/settings/chatgpt", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
118
+ signOutClaudeLogin: { "method": "POST", "path": "/settings/claude-login/sign-out", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
118
119
  startChatGPTSignIn: { "method": "POST", "path": "/settings/chatgpt/sign-in", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
119
120
  startClaudeLogin: { "method": "POST", "path": "/settings/claude-login/login", "pathParams": [], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
120
121
  startMcpOAuth: { "method": "POST", "path": "/settings/mcp-servers/{name}/oauth/start", "pathParams": ["name"], "multiSegment": [], "query": [], "headers": [], "body": { "required": true, "types": ["application/json"] }, "answer": "json", "secret": true, "publicFields": ["url", "scopes.[]", "client_id"], "tagged": false },
@@ -152,7 +153,7 @@ export const OPERATIONS = {
152
153
  handBackRunComputer: { "method": "POST", "path": "/runs/{run_id}/computer/hand-back", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": { "required": false, "types": ["application/json"] }, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
153
154
  getRunLearning: { "method": "GET", "path": "/runs/{run_id}/learning", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
154
155
  getRunLearningDiff: { "method": "GET", "path": "/runs/{run_id}/learning/diff", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
155
- listAllRuns: { "method": "GET", "path": "/runs", "pathParams": [], "multiSegment": [], "query": ["limit", "cursor", "agent", "revision", "status", "archived", "label", "source", "from", "to", "model"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
156
+ listAllRuns: { "method": "GET", "path": "/runs", "pathParams": [], "multiSegment": [], "query": ["limit", "cursor", "agent", "revision", "status", "scope", "archived", "label", "source", "from", "to", "model"], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
156
157
  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 },
157
158
  pauseRun: { "method": "POST", "path": "/runs/{run_id}/pause", "pathParams": ["run_id"], "multiSegment": [], "query": [], "headers": [], "body": null, "answer": "json", "secret": false, "publicFields": [], "tagged": false },
158
159
  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 },
@@ -457,6 +458,8 @@ export function resources(call) {
457
458
  scanForSuggestions: (body, options) => call("scanForSuggestions", [], body, undefined, options),
458
459
  /** Sign out of ChatGPT: the session revoked at OpenAI, then forgotten here (DELETE /settings/chatgpt). */
459
460
  signOutChatGpt: (options) => call("signOutChatGPT", [], undefined, undefined, options),
461
+ /** Sign out of Claude Code's login on this machine: AgentRun's own login removed, the mode off (POST /settings/claude-login/sign-out). */
462
+ signOutClaudeLogin: (options) => call("signOutClaudeLogin", [], undefined, undefined, options),
460
463
  /** Start signing in with ChatGPT: the link to open (POST /settings/chatgpt/sign-in). */
461
464
  startChatGptsignIn: (options) => call("startChatGPTSignIn", [], undefined, undefined, options),
462
465
  /** Start the Claude Code CLI's own sign-in on this machine (POST /settings/claude-login/login). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/agentrun-client",
3
- "version": "0.1.0-beta.59",
3
+ "version": "0.1.0-beta.60",
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.59"
86
+ "@parcha/agentrun-dsl": "0.1.0-beta.60"
87
87
  }
88
88
  }