@parcha/agentrun 0.4.19 → 0.4.21

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.
@@ -22,6 +22,43 @@ export const COMMANDS = [
22
22
  "raw": false,
23
23
  "summary": "Archive the agent: hidden from the lists, kept with its history"
24
24
  },
25
+ {
26
+ "command": [
27
+ "agents",
28
+ "bind-source-tool"
29
+ ],
30
+ "operationId": "bindSourceTool",
31
+ "method": "POST",
32
+ "path": "/agents/{agent_id}/source/tools",
33
+ "pathParams": [
34
+ "agent_id"
35
+ ],
36
+ "multiSegment": [],
37
+ "query": [],
38
+ "headers": [],
39
+ "bodyFlags": [
40
+ {
41
+ "name": "tool",
42
+ "type": "string",
43
+ "required": true,
44
+ "description": ""
45
+ },
46
+ {
47
+ "name": "server",
48
+ "type": "string",
49
+ "required": true,
50
+ "description": ""
51
+ }
52
+ ],
53
+ "hasBody": true,
54
+ "bodyRequired": true,
55
+ "bodyTypes": [
56
+ "application/json"
57
+ ],
58
+ "secretBody": false,
59
+ "raw": false,
60
+ "summary": "Choose the existing destination account for a required source tool"
61
+ },
25
62
  {
26
63
  "command": [
27
64
  "agents",
@@ -324,6 +361,28 @@ export const COMMANDS = [
324
361
  "raw": false,
325
362
  "summary": "Read a native connection"
326
363
  },
364
+ {
365
+ "command": [
366
+ "agents",
367
+ "get-source-sync"
368
+ ],
369
+ "operationId": "getSourceSync",
370
+ "method": "GET",
371
+ "path": "/agents/{agent_id}/source",
372
+ "pathParams": [
373
+ "agent_id"
374
+ ],
375
+ "multiSegment": [],
376
+ "query": [],
377
+ "headers": [],
378
+ "bodyFlags": [],
379
+ "hasBody": false,
380
+ "bodyRequired": false,
381
+ "bodyTypes": [],
382
+ "secretBody": false,
383
+ "raw": false,
384
+ "summary": "Read source sync and managed Move readiness"
385
+ },
327
386
  {
328
387
  "command": [
329
388
  "agents",
@@ -407,6 +466,113 @@ export const COMMANDS = [
407
466
  "raw": false,
408
467
  "summary": "Each learned workflow revision's promotion: its replay's numbers and whether it serves"
409
468
  },
469
+ {
470
+ "command": [
471
+ "agents",
472
+ "move-source-agent"
473
+ ],
474
+ "operationId": "moveSourceAgent",
475
+ "method": "POST",
476
+ "path": "/agents/{agent_id}/source/move",
477
+ "pathParams": [
478
+ "agent_id"
479
+ ],
480
+ "multiSegment": [],
481
+ "query": [],
482
+ "headers": [],
483
+ "bodyFlags": [],
484
+ "hasBody": true,
485
+ "bodyRequired": true,
486
+ "bodyTypes": [
487
+ "application/json"
488
+ ],
489
+ "secretBody": false,
490
+ "raw": false,
491
+ "summary": "Move the same agent to server-managed execution from its complete synchronized setup"
492
+ },
493
+ {
494
+ "command": [
495
+ "agents",
496
+ "package"
497
+ ],
498
+ "operationId": "getAgentPackage",
499
+ "method": "GET",
500
+ "path": "/agents/{agent_id}/package",
501
+ "pathParams": [
502
+ "agent_id"
503
+ ],
504
+ "multiSegment": [],
505
+ "query": [],
506
+ "headers": [],
507
+ "bodyFlags": [],
508
+ "hasBody": false,
509
+ "bodyRequired": false,
510
+ "bodyTypes": [],
511
+ "secretBody": false,
512
+ "raw": false,
513
+ "summary": "The agent's current revision as a template package"
514
+ },
515
+ {
516
+ "command": [
517
+ "agents",
518
+ "resolve-source-sync"
519
+ ],
520
+ "operationId": "resolveSourceSync",
521
+ "method": "POST",
522
+ "path": "/agents/{agent_id}/source/resolve",
523
+ "pathParams": [
524
+ "agent_id"
525
+ ],
526
+ "multiSegment": [],
527
+ "query": [],
528
+ "headers": [],
529
+ "bodyFlags": [
530
+ {
531
+ "name": "revision",
532
+ "type": "string",
533
+ "required": true,
534
+ "description": ""
535
+ },
536
+ {
537
+ "name": "snapshot",
538
+ "type": "string",
539
+ "required": true,
540
+ "description": ""
541
+ }
542
+ ],
543
+ "hasBody": true,
544
+ "bodyRequired": true,
545
+ "bodyTypes": [
546
+ "application/json"
547
+ ],
548
+ "secretBody": false,
549
+ "raw": false,
550
+ "summary": "Use an explicitly reviewed source snapshot while retaining the prior managed revision in history"
551
+ },
552
+ {
553
+ "command": [
554
+ "agents",
555
+ "review-source-project"
556
+ ],
557
+ "operationId": "reviewSourceProject",
558
+ "method": "POST",
559
+ "path": "/agents/{agent_id}/source/project-review",
560
+ "pathParams": [
561
+ "agent_id"
562
+ ],
563
+ "multiSegment": [],
564
+ "query": [],
565
+ "headers": [],
566
+ "bodyFlags": [],
567
+ "hasBody": true,
568
+ "bodyRequired": true,
569
+ "bodyTypes": [
570
+ "application/json"
571
+ ],
572
+ "secretBody": false,
573
+ "raw": false,
574
+ "summary": "Acknowledge exact unresolved run receipts and allow later runs to use the saved project"
575
+ },
410
576
  {
411
577
  "command": [
412
578
  "agents",
@@ -463,6 +629,37 @@ export const COMMANDS = [
463
629
  "raw": false,
464
630
  "summary": "The agent's runs index"
465
631
  },
632
+ {
633
+ "command": [
634
+ "agents",
635
+ "set-source-sync"
636
+ ],
637
+ "operationId": "setSourceSync",
638
+ "method": "PATCH",
639
+ "path": "/agents/{agent_id}/source",
640
+ "pathParams": [
641
+ "agent_id"
642
+ ],
643
+ "multiSegment": [],
644
+ "query": [],
645
+ "headers": [],
646
+ "bodyFlags": [
647
+ {
648
+ "name": "enabled",
649
+ "type": "boolean",
650
+ "required": true,
651
+ "description": ""
652
+ }
653
+ ],
654
+ "hasBody": true,
655
+ "bodyRequired": true,
656
+ "bodyTypes": [
657
+ "application/json"
658
+ ],
659
+ "secretBody": false,
660
+ "raw": false,
661
+ "summary": "Enable or pause this agent’s source sync"
662
+ },
466
663
  {
467
664
  "command": [
468
665
  "agents",
@@ -921,6 +1118,12 @@ export const COMMANDS = [
921
1118
  "type": "string",
922
1119
  "required": false,
923
1120
  "description": ""
1121
+ },
1122
+ {
1123
+ "name": "connector_id",
1124
+ "type": "string",
1125
+ "required": false,
1126
+ "description": ""
924
1127
  }
925
1128
  ],
926
1129
  "hasBody": true,
@@ -932,6 +1135,31 @@ export const COMMANDS = [
932
1135
  "raw": false,
933
1136
  "summary": "Create a ten-minute one-use connection code"
934
1137
  },
1138
+ {
1139
+ "command": [
1140
+ "connectors",
1141
+ "grant-source-sync"
1142
+ ],
1143
+ "operationId": "grantSourceSync",
1144
+ "method": "POST",
1145
+ "path": "/connectors/{connector_id}/targets/{target_id}/sync/grant",
1146
+ "pathParams": [
1147
+ "connector_id",
1148
+ "target_id"
1149
+ ],
1150
+ "multiSegment": [],
1151
+ "query": [],
1152
+ "headers": [],
1153
+ "bodyFlags": [],
1154
+ "hasBody": true,
1155
+ "bodyRequired": true,
1156
+ "bodyTypes": [
1157
+ "application/json"
1158
+ ],
1159
+ "secretBody": false,
1160
+ "raw": false,
1161
+ "summary": "Read or establish this explicitly authorized source sync grant without re-enabling a paused grant"
1162
+ },
935
1163
  {
936
1164
  "command": [
937
1165
  "connectors",
@@ -1051,6 +1279,44 @@ export const COMMANDS = [
1051
1279
  "raw": false,
1052
1280
  "summary": "Renew active source leases and claim one command without replay"
1053
1281
  },
1282
+ {
1283
+ "command": [
1284
+ "connectors",
1285
+ "publish-source-sync"
1286
+ ],
1287
+ "operationId": "publishSourceSync",
1288
+ "method": "POST",
1289
+ "path": "/connectors/{connector_id}/targets/{target_id}/sync",
1290
+ "pathParams": [
1291
+ "connector_id",
1292
+ "target_id"
1293
+ ],
1294
+ "multiSegment": [],
1295
+ "query": [],
1296
+ "headers": [],
1297
+ "bodyFlags": [
1298
+ {
1299
+ "name": "generation",
1300
+ "type": "string",
1301
+ "required": true,
1302
+ "description": ""
1303
+ },
1304
+ {
1305
+ "name": "sequence",
1306
+ "type": "integer",
1307
+ "required": true,
1308
+ "description": ""
1309
+ }
1310
+ ],
1311
+ "hasBody": true,
1312
+ "bodyRequired": true,
1313
+ "bodyTypes": [
1314
+ "application/json"
1315
+ ],
1316
+ "secretBody": false,
1317
+ "raw": false,
1318
+ "summary": "Publish a bounded source snapshot under its grant and sequence"
1319
+ },
1054
1320
  {
1055
1321
  "command": [
1056
1322
  "connectors",
@@ -1152,6 +1418,56 @@ export const COMMANDS = [
1152
1418
  "raw": false,
1153
1419
  "summary": "Revoke a source connector and stop its outstanding commands"
1154
1420
  },
1421
+ {
1422
+ "command": [
1423
+ "connectors",
1424
+ "source-sync-failure"
1425
+ ],
1426
+ "operationId": "sourceSyncFailure",
1427
+ "method": "POST",
1428
+ "path": "/connectors/{connector_id}/targets/{target_id}/sync/status",
1429
+ "pathParams": [
1430
+ "connector_id",
1431
+ "target_id"
1432
+ ],
1433
+ "multiSegment": [],
1434
+ "query": [],
1435
+ "headers": [],
1436
+ "bodyFlags": [
1437
+ {
1438
+ "name": "generation",
1439
+ "type": "string",
1440
+ "required": true,
1441
+ "description": ""
1442
+ },
1443
+ {
1444
+ "name": "sequence",
1445
+ "type": "integer",
1446
+ "required": true,
1447
+ "description": ""
1448
+ },
1449
+ {
1450
+ "name": "code",
1451
+ "type": "string",
1452
+ "enum": [
1453
+ "unsupported_platform",
1454
+ "source_changed",
1455
+ "source_unavailable",
1456
+ "snapshot_too_large"
1457
+ ],
1458
+ "required": true,
1459
+ "description": ""
1460
+ }
1461
+ ],
1462
+ "hasBody": true,
1463
+ "bodyRequired": true,
1464
+ "bodyTypes": [
1465
+ "application/json"
1466
+ ],
1467
+ "secretBody": false,
1468
+ "raw": false,
1469
+ "summary": "Record a fixed source failure while preserving its last complete snapshot"
1470
+ },
1155
1471
  {
1156
1472
  "command": [
1157
1473
  "files",
@@ -1583,6 +1899,28 @@ export const COMMANDS = [
1583
1899
  "raw": false,
1584
1900
  "summary": "Read a replay's result: running, done or failed, its counts and its score (start one from the console's Learning tab)"
1585
1901
  },
1902
+ {
1903
+ "command": [
1904
+ "learning",
1905
+ "reset"
1906
+ ],
1907
+ "operationId": "deleteAgentLearning",
1908
+ "method": "DELETE",
1909
+ "path": "/agents/{agent_id}/learning",
1910
+ "pathParams": [
1911
+ "agent_id"
1912
+ ],
1913
+ "multiSegment": [],
1914
+ "query": [],
1915
+ "headers": [],
1916
+ "bodyFlags": [],
1917
+ "hasBody": false,
1918
+ "bodyRequired": false,
1919
+ "bodyTypes": [],
1920
+ "secretBody": false,
1921
+ "raw": false,
1922
+ "summary": "Reset the agent's learning: everything it learned deleted, the agent and its runs kept"
1923
+ },
1586
1924
  {
1587
1925
  "command": [
1588
1926
  "learning",
@@ -1933,6 +2271,26 @@ export const COMMANDS = [
1933
2271
  "raw": false,
1934
2272
  "summary": "Settings → Computers: the kinds of computer this server offers, each provider and whether its keys are saved"
1935
2273
  },
2274
+ {
2275
+ "command": [
2276
+ "local",
2277
+ "list-mcp-server-names"
2278
+ ],
2279
+ "operationId": "listMcpServerNames",
2280
+ "method": "GET",
2281
+ "path": "/settings/mcp-server-names",
2282
+ "pathParams": [],
2283
+ "multiSegment": [],
2284
+ "query": [],
2285
+ "headers": [],
2286
+ "bodyFlags": [],
2287
+ "hasBody": false,
2288
+ "bodyRequired": false,
2289
+ "bodyTypes": [],
2290
+ "secretBody": false,
2291
+ "raw": false,
2292
+ "summary": "The names of the MCP servers saved here, and nothing else of them"
2293
+ },
1936
2294
  {
1937
2295
  "command": [
1938
2296
  "local",
@@ -2435,7 +2793,7 @@ export const COMMANDS = [
2435
2793
  "name": "model_key",
2436
2794
  "type": "string",
2437
2795
  "required": false,
2438
- "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call."
2796
+ "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call."
2439
2797
  },
2440
2798
  {
2441
2799
  "name": "workflow_first",
@@ -2842,7 +3200,7 @@ export const COMMANDS = [
2842
3200
  "name": "model_key",
2843
3201
  "type": "string",
2844
3202
  "required": false,
2845
- "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call. On a message it replaces the run's key from the run's next model request on, a turn still going included, and it is the first key of a run that started on the server's (mint one per turn); a message without one keeps the key the run holds, which is none once its last turn ended: then, where the server holds no key for the run's model, the message is 422 `model_key_required` and nothing is written."
3203
+ "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call. On a message it replaces the run's key from the run's next model request on, a turn still going included, and it is the first key of a run that started on the server's (mint one per turn); a message without one keeps the key the run holds, which is none once its last turn ended: then, where the server holds no key for the run's model, the message is 422 `model_key_required` and nothing is written."
2846
3204
  }
2847
3205
  ],
2848
3206
  "hasBody": true,
@@ -3017,7 +3375,7 @@ export const COMMANDS = [
3017
3375
  "name": "model_key",
3018
3376
  "type": "string",
3019
3377
  "required": false,
3020
- "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call."
3378
+ "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call."
3021
3379
  },
3022
3380
  {
3023
3381
  "name": "workflow_first",
@@ -3446,6 +3804,18 @@ export const COMMANDS = [
3446
3804
  "required": false,
3447
3805
  "description": ""
3448
3806
  },
3807
+ {
3808
+ "name": "started_at",
3809
+ "type": "string",
3810
+ "required": false,
3811
+ "description": "When the backend began the task, as an RFC 3339 date-time: the run's created_at. At most 60 seconds ahead of the server's clock and at most 7 days behind it. Absent: now. The evidence deadline is still counted from this request."
3812
+ },
3813
+ {
3814
+ "name": "title",
3815
+ "type": "string",
3816
+ "required": false,
3817
+ "description": "The run's title, trimmed and with whitespace collapsed. Absent: the first 80 characters of input."
3818
+ },
3449
3819
  {
3450
3820
  "name": "platform",
3451
3821
  "type": "string",
@@ -3697,11 +4067,29 @@ export const COMMANDS = [
3697
4067
  }
3698
4068
  ],
3699
4069
  "bodyFlags": [
4070
+ {
4071
+ "name": "dry_run",
4072
+ "type": "boolean",
4073
+ "required": false,
4074
+ "description": "True: answer the apply's plan (200 `{plan}`) from the same reads and checks, writing nothing and keeping no Idempotency-Key record. Missing keys and MCP servers are listed in the plan where the apply would be 409; any other refusal is the apply's own."
4075
+ },
3700
4076
  {
3701
4077
  "name": "agent_id",
3702
4078
  "type": "string",
3703
4079
  "required": false,
3704
4080
  "description": "An agent this package made here (GET /agents `template.id` is the package's id): the apply writes a new revision of it in place of making another, answered 200 with the same id. Its runs and its learning (corrections and workflows) stay. The parameters and grants are checked as a fresh apply checks them. Its triggers are reconciled by name: one of a name it has is changed in place (its id, a feed trigger's seen items, a webhook trigger's secret and whether it is on are kept; a `catchup_window_s` or `max_active_runs` the package leaves out goes back to its default, as a fresh apply makes it; a source the package leaves as it was is not rewritten, so a schedule keeps its next time, and an `every_s` one with no `start_at` the grid its first apply set), a new name is made, and one this package's apply made or kept that the package no longer lists is removed (a feed trigger whose feeds are left empty is not listed). Which triggers are the package's is kept on each trigger, never in an API body: one the owner made, one moved to the agent from another (or away and back), and one made before this was kept are never removed. A Composio trigger it removes (the package dropped it, or makes it again) goes at Composio first: one whose instance Composio does not delete is kept here as it was (on or off, the package's, its config sealed), and the next apply removes it; a dropped one is said in `warnings` under `triggers`, naming it and what is left at Composio. Such an unmarked trigger with a package trigger's name is adopted only when it can be changed in place (the same kind, and for a Composio trigger the same server, event and config), and is the package's from then on; one that would have to be made again, or one another package made, is 409 name_taken under `triggers.<i>.name` before anything is written: rename or delete it, then apply again. A trigger moved to another agent while the update runs is neither changed nor removed; its name is made anew. A Composio trigger it keeps keeps its sealed config when the package sends the same values; one whose server, event or config the package changes (another key too) is made again, as one whose source kind changed is: the old trigger and its Composio instance are removed first, and the new one is off where the owner turned the old one off. When Composio does not delete the old instance, the new one is not made, and the apply is 424 upstream_failed with the new revision standing and the old trigger kept as it was (remove the instance at Composio, or wait, and apply again: the old trigger's off carries to the new one). What the package owns and its new version leaves out (an input or answer schema, a checkout, a default cap, learning) is gone from the agent; what the host set (its harness, computer, sdk and native references) is kept. Updates of one agent run one after the other on a server, and each writes only onto the revision it read: one whose read went stale meanwhile (an edit, or an update elsewhere) is 412 precondition_failed, with nothing changed. An agent made otherwise, or from another package, is 422 under `agent_id`, saying which; an unknown id is 404; an archived agent is 409 agent_archived."
4081
+ },
4082
+ {
4083
+ "name": "revision",
4084
+ "type": "string",
4085
+ "required": false,
4086
+ "description": "With `agent_id`: the agent's revision as you read it (GET /agents/{agent_id} `revision`, or a plan's `current_revision_id`). The apply, or its plan, writes only while it is the agent's current one: another is 412 precondition_failed, nothing changed. Without `agent_id` it is 422."
4087
+ },
4088
+ {
4089
+ "name": "sha",
4090
+ "type": "string",
4091
+ "required": false,
4092
+ "description": "The package's sha as you read it (GET /templates `sha`, or an import's answer): the apply, or its plan, is 412 precondition_failed when the package stored under this id is another (an upload of the same name replaced it), nothing changed."
3705
4093
  }
3706
4094
  ],
3707
4095
  "hasBody": true,
@@ -3735,6 +4123,28 @@ export const COMMANDS = [
3735
4123
  "raw": false,
3736
4124
  "summary": "Remove an imported template package"
3737
4125
  },
4126
+ {
4127
+ "command": [
4128
+ "template",
4129
+ "get"
4130
+ ],
4131
+ "operationId": "getTemplate",
4132
+ "method": "GET",
4133
+ "path": "/templates/{template}",
4134
+ "pathParams": [
4135
+ "template"
4136
+ ],
4137
+ "multiSegment": [],
4138
+ "query": [],
4139
+ "headers": [],
4140
+ "bodyFlags": [],
4141
+ "hasBody": false,
4142
+ "bodyRequired": false,
4143
+ "bodyTypes": [],
4144
+ "secretBody": false,
4145
+ "raw": false,
4146
+ "summary": "One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent"
4147
+ },
3738
4148
  {
3739
4149
  "command": [
3740
4150
  "template",
@@ -3751,8 +4161,8 @@ export const COMMANDS = [
3751
4161
  {
3752
4162
  "name": "source",
3753
4163
  "type": "string",
3754
- "required": true,
3755
- "description": "Where the package is: `github:<owner>/<repo>[/<path>][@<ref>]` (the ref, a branch, tag or commit, defaults to the default branch), or the folder's https://github.com/<owner>/<repo>/tree/<ref>/<path> URL. A public repository on github.com alone."
4164
+ "required": false,
4165
+ "description": "Where the package is: `github:<owner>/<repo>[/<path>][@<ref>]` (the ref, a branch, tag or commit, defaults to the default branch), or the folder's https://github.com/<owner>/<repo>/tree/<ref>/<path> URL. A public repository on github.com alone. Not with `files`; refused on a server that serves the API alone."
3756
4166
  },
3757
4167
  {
3758
4168
  "name": "dry_run",
@@ -3774,7 +4184,7 @@ export const COMMANDS = [
3774
4184
  ],
3775
4185
  "secretBody": false,
3776
4186
  "raw": false,
3777
- "summary": "Import a template package from a public GitHub repository, or preview it (dry_run)"
4187
+ "summary": "Import a template package from a public GitHub repository or upload it whole, or preview it (dry_run)"
3778
4188
  },
3779
4189
  {
3780
4190
  "command": [