current-cli 0.1.0__tar.gz → 0.1.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: current-cli
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Command line interface for the Current API, generated from its OpenAPI schema at runtime
5
5
  Author-email: Orin <your-email@example.com>
6
6
  License-Expression: MIT
@@ -32,7 +32,6 @@ cd cli && uv sync
32
32
  ## Usage
33
33
 
34
34
  ```bash
35
- current config set base_url https://your-api.example.com
36
35
  current login you@example.com
37
36
  current config set default_workspace <workspace-uuid>
38
37
 
@@ -42,6 +41,9 @@ current tasks create --data '{"name": "Order beams", "workspace": "..."}'
42
41
  current workspaces members list <workspace_id>
43
42
  ```
44
43
 
44
+ The CLI points at `https://api.current.orinlabs.ai` by default. For local
45
+ development, run `current config set base_url http://localhost:8000`.
46
+
45
47
  Run `current --help` (or `--help` on any subcommand) to see everything the
46
48
  API exposes. `current docs` prints a markdown reference of every command;
47
49
  the committed copy lives at [llms.txt](llms.txt) — hand it to an LLM that
@@ -19,7 +19,6 @@ cd cli && uv sync
19
19
  ## Usage
20
20
 
21
21
  ```bash
22
- current config set base_url https://your-api.example.com
23
22
  current login you@example.com
24
23
  current config set default_workspace <workspace-uuid>
25
24
 
@@ -29,6 +28,9 @@ current tasks create --data '{"name": "Order beams", "workspace": "..."}'
29
28
  current workspaces members list <workspace_id>
30
29
  ```
31
30
 
31
+ The CLI points at `https://api.current.orinlabs.ai` by default. For local
32
+ development, run `current config set base_url http://localhost:8000`.
33
+
32
34
  Run `current --help` (or `--help` on any subcommand) to see everything the
33
35
  API exposes. `current docs` prints a markdown reference of every command;
34
36
  the committed copy lives at [llms.txt](llms.txt) — hand it to an LLM that
@@ -6,7 +6,7 @@ import json
6
6
  import os
7
7
  from pathlib import Path
8
8
 
9
- DEFAULT_BASE_URL = "http://localhost:8000"
9
+ DEFAULT_BASE_URL = "https://api.current.orinlabs.ai"
10
10
  KNOWN_KEYS = ("base_url", "token", "email", "default_workspace")
11
11
 
12
12
 
@@ -20,11 +20,14 @@ generated from the API's OpenAPI schema, so every API operation is available.
20
20
 
21
21
  ```bash
22
22
  pip install current-cli
23
- current config set base_url https://your-api.example.com # default: http://localhost:8000
24
- current login you@example.com # magic-link sign in, stores the token
25
- current config set default_workspace <workspace-uuid> # used when --workspace is omitted
23
+ current login you@example.com # magic-link sign in, stores the token
24
+ current config set default_workspace <workspace-uuid> # used when --workspace is omitted
26
25
  ```
27
26
 
27
+ The CLI speaks to `https://api.current.orinlabs.ai` by default. For another
28
+ server (for example local development), set
29
+ `current config set base_url http://localhost:8000`.
30
+
28
31
  The auth token is stored in `~/.config/current-cli/config.json` and sent as
29
32
  `Authorization: Token <token>`. `CURRENT_API_URL` overrides the base URL.
30
33
 
@@ -88,6 +88,216 @@ paths:
88
88
  schema:
89
89
  $ref: '#/components/schemas/VerifyMagicLinkResponse'
90
90
  description: ''
91
+ /api/contacts/contacts/:
92
+ get:
93
+ operationId: contacts_contacts_list
94
+ tags:
95
+ - contacts
96
+ security:
97
+ - tokenAuth: []
98
+ responses:
99
+ '200':
100
+ content:
101
+ application/json:
102
+ schema:
103
+ type: array
104
+ items:
105
+ $ref: '#/components/schemas/Contact'
106
+ description: ''
107
+ post:
108
+ operationId: contacts_contacts_create
109
+ tags:
110
+ - contacts
111
+ requestBody:
112
+ content:
113
+ application/json:
114
+ schema:
115
+ $ref: '#/components/schemas/ContactRequest'
116
+ application/x-www-form-urlencoded:
117
+ schema:
118
+ $ref: '#/components/schemas/ContactRequest'
119
+ multipart/form-data:
120
+ schema:
121
+ $ref: '#/components/schemas/ContactRequest'
122
+ required: true
123
+ security:
124
+ - tokenAuth: []
125
+ responses:
126
+ '201':
127
+ content:
128
+ application/json:
129
+ schema:
130
+ $ref: '#/components/schemas/Contact'
131
+ description: ''
132
+ /api/contacts/contacts/{id}/:
133
+ get:
134
+ operationId: contacts_contacts_retrieve
135
+ parameters:
136
+ - in: path
137
+ name: id
138
+ schema:
139
+ type: string
140
+ format: uuid
141
+ description: A UUID string identifying this contact.
142
+ required: true
143
+ tags:
144
+ - contacts
145
+ security:
146
+ - tokenAuth: []
147
+ responses:
148
+ '200':
149
+ content:
150
+ application/json:
151
+ schema:
152
+ $ref: '#/components/schemas/Contact'
153
+ description: ''
154
+ put:
155
+ operationId: contacts_contacts_update
156
+ parameters:
157
+ - in: path
158
+ name: id
159
+ schema:
160
+ type: string
161
+ format: uuid
162
+ description: A UUID string identifying this contact.
163
+ required: true
164
+ tags:
165
+ - contacts
166
+ requestBody:
167
+ content:
168
+ application/json:
169
+ schema:
170
+ $ref: '#/components/schemas/ContactRequest'
171
+ application/x-www-form-urlencoded:
172
+ schema:
173
+ $ref: '#/components/schemas/ContactRequest'
174
+ multipart/form-data:
175
+ schema:
176
+ $ref: '#/components/schemas/ContactRequest'
177
+ required: true
178
+ security:
179
+ - tokenAuth: []
180
+ responses:
181
+ '200':
182
+ content:
183
+ application/json:
184
+ schema:
185
+ $ref: '#/components/schemas/Contact'
186
+ description: ''
187
+ patch:
188
+ operationId: contacts_contacts_partial_update
189
+ parameters:
190
+ - in: path
191
+ name: id
192
+ schema:
193
+ type: string
194
+ format: uuid
195
+ description: A UUID string identifying this contact.
196
+ required: true
197
+ tags:
198
+ - contacts
199
+ requestBody:
200
+ content:
201
+ application/json:
202
+ schema:
203
+ $ref: '#/components/schemas/PatchedContactRequest'
204
+ application/x-www-form-urlencoded:
205
+ schema:
206
+ $ref: '#/components/schemas/PatchedContactRequest'
207
+ multipart/form-data:
208
+ schema:
209
+ $ref: '#/components/schemas/PatchedContactRequest'
210
+ security:
211
+ - tokenAuth: []
212
+ responses:
213
+ '200':
214
+ content:
215
+ application/json:
216
+ schema:
217
+ $ref: '#/components/schemas/Contact'
218
+ description: ''
219
+ delete:
220
+ operationId: contacts_contacts_destroy
221
+ parameters:
222
+ - in: path
223
+ name: id
224
+ schema:
225
+ type: string
226
+ format: uuid
227
+ description: A UUID string identifying this contact.
228
+ required: true
229
+ tags:
230
+ - contacts
231
+ security:
232
+ - tokenAuth: []
233
+ responses:
234
+ '204':
235
+ description: No response body
236
+ /api/contacts/contacts/{id}/add_address/:
237
+ post:
238
+ operationId: contacts_contacts_add_address_create
239
+ parameters:
240
+ - in: path
241
+ name: id
242
+ schema:
243
+ type: string
244
+ format: uuid
245
+ description: A UUID string identifying this contact.
246
+ required: true
247
+ tags:
248
+ - contacts
249
+ requestBody:
250
+ content:
251
+ application/json:
252
+ schema:
253
+ $ref: '#/components/schemas/ContactAddressCreateRequest'
254
+ application/x-www-form-urlencoded:
255
+ schema:
256
+ $ref: '#/components/schemas/ContactAddressCreateRequest'
257
+ multipart/form-data:
258
+ schema:
259
+ $ref: '#/components/schemas/ContactAddressCreateRequest'
260
+ required: true
261
+ security:
262
+ - tokenAuth: []
263
+ responses:
264
+ '201':
265
+ content:
266
+ application/json:
267
+ schema:
268
+ $ref: '#/components/schemas/ContactAddress'
269
+ description: ''
270
+ /api/contacts/contacts/{id}/addresses/{address_id}/verify/:
271
+ post:
272
+ operationId: contacts_contacts_addresses_verify_create
273
+ description: |-
274
+ Admin-only: mark an address as platform-verified. Verification is
275
+ what makes a membership-linked address approval-capable.
276
+ parameters:
277
+ - in: path
278
+ name: address_id
279
+ schema:
280
+ type: string
281
+ pattern: ^[^/]+$
282
+ required: true
283
+ - in: path
284
+ name: id
285
+ schema:
286
+ type: string
287
+ format: uuid
288
+ description: A UUID string identifying this contact.
289
+ required: true
290
+ tags:
291
+ - contacts
292
+ security:
293
+ - tokenAuth: []
294
+ responses:
295
+ '200':
296
+ content:
297
+ application/json:
298
+ schema:
299
+ $ref: '#/components/schemas/ContactAddress'
300
+ description: ''
91
301
  /api/inbox/inbox/:
92
302
  get:
93
303
  operationId: inbox_retrieve
@@ -1030,6 +1240,62 @@ paths:
1030
1240
  responses:
1031
1241
  '204':
1032
1242
  description: No response body
1243
+ /api/workflows/approvals/{token}/:
1244
+ get:
1245
+ operationId: workflows_approvals_retrieve
1246
+ description: |-
1247
+ GET: the proposal as the approver must see it — summary plus the
1248
+ exact payload that will execute on approval.
1249
+ parameters:
1250
+ - in: path
1251
+ name: token
1252
+ schema:
1253
+ type: string
1254
+ required: true
1255
+ tags:
1256
+ - workflows
1257
+ security:
1258
+ - {}
1259
+ responses:
1260
+ '200':
1261
+ content:
1262
+ application/json:
1263
+ schema:
1264
+ $ref: '#/components/schemas/ApprovalGrantResponse'
1265
+ description: ''
1266
+ /api/workflows/approvals/{token}/decide/:
1267
+ post:
1268
+ operationId: workflows_approvals_decide_create
1269
+ description: 'POST {state, note?}: decide via the capability link.'
1270
+ parameters:
1271
+ - in: path
1272
+ name: token
1273
+ schema:
1274
+ type: string
1275
+ required: true
1276
+ tags:
1277
+ - workflows
1278
+ requestBody:
1279
+ content:
1280
+ application/json:
1281
+ schema:
1282
+ $ref: '#/components/schemas/ApprovalDecideRequestRequest'
1283
+ application/x-www-form-urlencoded:
1284
+ schema:
1285
+ $ref: '#/components/schemas/ApprovalDecideRequestRequest'
1286
+ multipart/form-data:
1287
+ schema:
1288
+ $ref: '#/components/schemas/ApprovalDecideRequestRequest'
1289
+ required: true
1290
+ security:
1291
+ - {}
1292
+ responses:
1293
+ '201':
1294
+ content:
1295
+ application/json:
1296
+ schema:
1297
+ $ref: '#/components/schemas/ApprovalDecideResponse'
1298
+ description: ''
1033
1299
  /api/workflows/definitions/apply/:
1034
1300
  post:
1035
1301
  operationId: workflows_definitions_apply_create
@@ -1060,13 +1326,13 @@ paths:
1060
1326
  schema:
1061
1327
  $ref: '#/components/schemas/WorkflowDefinition'
1062
1328
  description: ''
1063
- /api/workflows/proposals/{record_id}/decision/:
1329
+ /api/workflows/proposals/{record_id}/approval/:
1064
1330
  post:
1065
- operationId: workflows_proposals_decision_create
1331
+ operationId: workflows_proposals_approval_create
1066
1332
  description: |-
1067
1333
  Approve or reject an agent_proposal record. Creates an
1068
- approval_decision record and re-dispatches the run if it was parked on
1069
- the gate. One decision per proposal — 409 on the second.
1334
+ approval record and re-dispatches the run if it was parked on
1335
+ the gate. One approval per proposal — 409 on the second.
1070
1336
  parameters:
1071
1337
  - in: path
1072
1338
  name: record_id
@@ -1080,13 +1346,13 @@ paths:
1080
1346
  content:
1081
1347
  application/json:
1082
1348
  schema:
1083
- $ref: '#/components/schemas/ProposalDecisionRequest'
1349
+ $ref: '#/components/schemas/ProposalApprovalRequest'
1084
1350
  application/x-www-form-urlencoded:
1085
1351
  schema:
1086
- $ref: '#/components/schemas/ProposalDecisionRequest'
1352
+ $ref: '#/components/schemas/ProposalApprovalRequest'
1087
1353
  multipart/form-data:
1088
1354
  schema:
1089
- $ref: '#/components/schemas/ProposalDecisionRequest'
1355
+ $ref: '#/components/schemas/ProposalApprovalRequest'
1090
1356
  required: true
1091
1357
  security:
1092
1358
  - tokenAuth: []
@@ -1261,7 +1527,7 @@ paths:
1261
1527
  description: |-
1262
1528
  Machine endpoint: the harness fetches its work order — the rendered
1263
1529
  definition plus the journal state it needs to resume (step states and
1264
- gate decisions).
1530
+ gate approvals).
1265
1531
  parameters:
1266
1532
  - in: path
1267
1533
  name: run_id
@@ -1317,6 +1583,43 @@ paths:
1317
1583
  schema:
1318
1584
  $ref: '#/components/schemas/RecordCreatedResponse'
1319
1585
  description: ''
1586
+ /api/workflows/runs/{run_id}/tools/{tool_name}/invoke/:
1587
+ post:
1588
+ operationId: workflows_runs_tools_invoke_create
1589
+ parameters:
1590
+ - in: path
1591
+ name: run_id
1592
+ schema:
1593
+ type: string
1594
+ format: uuid
1595
+ required: true
1596
+ - in: path
1597
+ name: tool_name
1598
+ schema:
1599
+ type: string
1600
+ required: true
1601
+ tags:
1602
+ - workflows
1603
+ requestBody:
1604
+ content:
1605
+ application/json:
1606
+ schema:
1607
+ $ref: '#/components/schemas/ToolInvokeRequestRequest'
1608
+ application/x-www-form-urlencoded:
1609
+ schema:
1610
+ $ref: '#/components/schemas/ToolInvokeRequestRequest'
1611
+ multipart/form-data:
1612
+ schema:
1613
+ $ref: '#/components/schemas/ToolInvokeRequestRequest'
1614
+ security:
1615
+ - RunTokenAuth: []
1616
+ responses:
1617
+ '200':
1618
+ content:
1619
+ application/json:
1620
+ schema:
1621
+ $ref: '#/components/schemas/ToolInvokeResponse'
1622
+ description: ''
1320
1623
  /api/workflows/runs/{run_id}/transitions/:
1321
1624
  post:
1322
1625
  operationId: workflows_runs_transitions_create
@@ -1983,6 +2286,43 @@ components:
1983
2286
  - role
1984
2287
  - workspace_id
1985
2288
  - workspace_name
2289
+ ApprovalDecideRequestRequest:
2290
+ type: object
2291
+ properties:
2292
+ state:
2293
+ $ref: '#/components/schemas/StateEnum'
2294
+ note:
2295
+ type: string
2296
+ required:
2297
+ - state
2298
+ ApprovalDecideResponse:
2299
+ type: object
2300
+ properties:
2301
+ state:
2302
+ type: string
2303
+ required:
2304
+ - state
2305
+ ApprovalGrantResponse:
2306
+ type: object
2307
+ properties:
2308
+ proposal:
2309
+ type: object
2310
+ additionalProperties: {}
2311
+ workflow:
2312
+ type: string
2313
+ approver:
2314
+ type: string
2315
+ decided:
2316
+ type: boolean
2317
+ decision_state:
2318
+ type: string
2319
+ nullable: true
2320
+ required:
2321
+ - approver
2322
+ - decided
2323
+ - decision_state
2324
+ - proposal
2325
+ - workflow
1986
2326
  AuthorizeRequestRequest:
1987
2327
  type: object
1988
2328
  properties:
@@ -2002,6 +2342,129 @@ components:
2002
2342
  format: uri
2003
2343
  required:
2004
2344
  - authorize_url
2345
+ Contact:
2346
+ type: object
2347
+ properties:
2348
+ id:
2349
+ type: string
2350
+ format: uuid
2351
+ readOnly: true
2352
+ workspace:
2353
+ type: string
2354
+ format: uuid
2355
+ name:
2356
+ type: string
2357
+ maxLength: 255
2358
+ company:
2359
+ type: string
2360
+ maxLength: 255
2361
+ membership:
2362
+ type: string
2363
+ format: uuid
2364
+ readOnly: true
2365
+ nullable: true
2366
+ is_internal:
2367
+ type: boolean
2368
+ readOnly: true
2369
+ source:
2370
+ allOf:
2371
+ - $ref: '#/components/schemas/SourceEnum'
2372
+ readOnly: true
2373
+ addresses:
2374
+ type: array
2375
+ items:
2376
+ $ref: '#/components/schemas/ContactAddress'
2377
+ readOnly: true
2378
+ created_at:
2379
+ type: string
2380
+ format: date-time
2381
+ readOnly: true
2382
+ updated_at:
2383
+ type: string
2384
+ format: date-time
2385
+ readOnly: true
2386
+ required:
2387
+ - addresses
2388
+ - created_at
2389
+ - id
2390
+ - is_internal
2391
+ - membership
2392
+ - name
2393
+ - source
2394
+ - updated_at
2395
+ - workspace
2396
+ ContactAddress:
2397
+ type: object
2398
+ properties:
2399
+ id:
2400
+ type: string
2401
+ format: uuid
2402
+ readOnly: true
2403
+ kind:
2404
+ $ref: '#/components/schemas/KindEnum'
2405
+ value:
2406
+ type: string
2407
+ maxLength: 255
2408
+ verified_at:
2409
+ type: string
2410
+ format: date-time
2411
+ readOnly: true
2412
+ nullable: true
2413
+ source:
2414
+ allOf:
2415
+ - $ref: '#/components/schemas/SourceEnum'
2416
+ readOnly: true
2417
+ created_at:
2418
+ type: string
2419
+ format: date-time
2420
+ readOnly: true
2421
+ required:
2422
+ - created_at
2423
+ - id
2424
+ - kind
2425
+ - source
2426
+ - value
2427
+ - verified_at
2428
+ ContactAddressCreateRequest:
2429
+ type: object
2430
+ properties:
2431
+ kind:
2432
+ $ref: '#/components/schemas/KindEnum'
2433
+ value:
2434
+ type: string
2435
+ minLength: 1
2436
+ maxLength: 255
2437
+ required:
2438
+ - kind
2439
+ - value
2440
+ ContactAddressRequest:
2441
+ type: object
2442
+ properties:
2443
+ kind:
2444
+ $ref: '#/components/schemas/KindEnum'
2445
+ value:
2446
+ type: string
2447
+ minLength: 1
2448
+ maxLength: 255
2449
+ required:
2450
+ - kind
2451
+ - value
2452
+ ContactRequest:
2453
+ type: object
2454
+ properties:
2455
+ workspace:
2456
+ type: string
2457
+ format: uuid
2458
+ name:
2459
+ type: string
2460
+ minLength: 1
2461
+ maxLength: 255
2462
+ company:
2463
+ type: string
2464
+ maxLength: 255
2465
+ required:
2466
+ - name
2467
+ - workspace
2005
2468
  DataTypeEnum:
2006
2469
  enum:
2007
2470
  - text
@@ -2211,6 +2674,18 @@ components:
2211
2674
  - invited_by_email
2212
2675
  - role
2213
2676
  - workspace_name
2677
+ KindEnum:
2678
+ enum:
2679
+ - email
2680
+ - slack
2681
+ - phone
2682
+ - teams
2683
+ type: string
2684
+ description: |-
2685
+ * `email` - Email
2686
+ * `slack` - Slack
2687
+ * `phone` - Phone
2688
+ * `teams` - Teams
2214
2689
  LogoutResponse:
2215
2690
  type: object
2216
2691
  properties:
@@ -2326,6 +2801,19 @@ components:
2326
2801
  description: |-
2327
2802
  * `pending` - Pending
2328
2803
  * `ingested` - Ingested
2804
+ PatchedContactRequest:
2805
+ type: object
2806
+ properties:
2807
+ workspace:
2808
+ type: string
2809
+ format: uuid
2810
+ name:
2811
+ type: string
2812
+ minLength: 1
2813
+ maxLength: 255
2814
+ company:
2815
+ type: string
2816
+ maxLength: 255
2329
2817
  PatchedProjectFieldDefinitionRequest:
2330
2818
  type: object
2331
2819
  properties:
@@ -2430,6 +2918,11 @@ components:
2430
2918
  type: boolean
2431
2919
  trigger:
2432
2920
  $ref: '#/components/schemas/TriggerEnum'
2921
+ trigger_config: {}
2922
+ definition:
2923
+ type: string
2924
+ format: uuid
2925
+ nullable: true
2433
2926
  PatchedWorkspaceMembershipRequest:
2434
2927
  type: object
2435
2928
  properties:
@@ -2554,7 +3047,7 @@ components:
2554
3047
  fields: {}
2555
3048
  required:
2556
3049
  - workspace
2557
- ProposalDecisionRequest:
3050
+ ProposalApprovalRequest:
2558
3051
  type: object
2559
3052
  properties:
2560
3053
  state:
@@ -2670,6 +3163,12 @@ components:
2670
3163
  description: |-
2671
3164
  Body of the machine records endpoint. Schema validation of ``data``
2672
3165
  happens in the view against the workspace RecordType.
3166
+
3167
+ ``step_id`` accepts an explicit JSON null and normalizes it to "":
3168
+ older harness clients sent ``"step_id": null`` for the terminal
3169
+ run_report record, which isn't tied to one step (newer ones omit the
3170
+ key) — the model field is a plain non-nullable CharField, so null
3171
+ folds to "" instead of a 400.
2673
3172
  properties:
2674
3173
  record_type:
2675
3174
  type: string
@@ -2681,6 +3180,7 @@ components:
2681
3180
  nullable: true
2682
3181
  step_id:
2683
3182
  type: string
3183
+ nullable: true
2684
3184
  default: ''
2685
3185
  maxLength: 128
2686
3186
  data: {}
@@ -2734,7 +3234,7 @@ components:
2734
3234
  description: |-
2735
3235
  * `admin` - Admin
2736
3236
  * `member` - Member
2737
- RunDecision:
3237
+ RunApproval:
2738
3238
  type: object
2739
3239
  properties:
2740
3240
  gate_step_id:
@@ -2743,6 +3243,7 @@ components:
2743
3243
  type: string
2744
3244
  state:
2745
3245
  type: string
3246
+ proposal: {}
2746
3247
  required:
2747
3248
  - gate_step_id
2748
3249
  - proposal_record_id
@@ -2766,16 +3267,19 @@ components:
2766
3267
  type: array
2767
3268
  items:
2768
3269
  $ref: '#/components/schemas/StepState'
2769
- decisions:
3270
+ approvals:
2770
3271
  type: array
2771
3272
  items:
2772
- $ref: '#/components/schemas/RunDecision'
3273
+ $ref: '#/components/schemas/RunApproval'
3274
+ trigger:
3275
+ nullable: true
2773
3276
  required:
2774
- - decisions
3277
+ - approvals
2775
3278
  - definition
2776
3279
  - project
2777
3280
  - run_id
2778
3281
  - steps_state
3282
+ - trigger
2779
3283
  - workspace
2780
3284
  SlackChannel:
2781
3285
  type: object
@@ -2787,6 +3291,16 @@ components:
2787
3291
  required:
2788
3292
  - id
2789
3293
  - name
3294
+ SourceEnum:
3295
+ enum:
3296
+ - ui
3297
+ - agent
3298
+ - system
3299
+ type: string
3300
+ description: |-
3301
+ * `ui` - UI
3302
+ * `agent` - Agent
3303
+ * `system` - System
2790
3304
  StateEnum:
2791
3305
  enum:
2792
3306
  - approved
@@ -2847,7 +3361,12 @@ components:
2847
3361
  - step_id
2848
3362
  StepTransitionCreateRequest:
2849
3363
  type: object
2850
- description: Body of the machine transitions endpoint.
3364
+ description: |-
3365
+ Body of the machine transitions endpoint. ``error`` accepts an
3366
+ explicit JSON null and normalizes it to "": older harness clients sent
3367
+ ``"error": null`` for non-error transitions (newer ones omit the key),
3368
+ and rejecting null with a 400 stranded live runs — the model field is
3369
+ a plain non-nullable TextField, so null folds to "" instead.
2851
3370
  properties:
2852
3371
  step_id:
2853
3372
  type: string
@@ -2861,6 +3380,8 @@ components:
2861
3380
  default: 1
2862
3381
  error:
2863
3382
  type: string
3383
+ nullable: true
3384
+ default: ''
2864
3385
  required:
2865
3386
  - status
2866
3387
  - step_id
@@ -2930,18 +3451,43 @@ components:
2930
3451
  nullable: true
2931
3452
  required:
2932
3453
  - title
3454
+ ToolInvokeRequestRequest:
3455
+ type: object
3456
+ properties:
3457
+ args:
3458
+ type: object
3459
+ additionalProperties: {}
3460
+ agent_id:
3461
+ type: string
3462
+ minLength: 1
3463
+ run_id:
3464
+ type: string
3465
+ minLength: 1
3466
+ ToolInvokeResponse:
3467
+ type: object
3468
+ properties:
3469
+ text:
3470
+ type: string
3471
+ required:
3472
+ - text
2933
3473
  TriggerEnum:
2934
3474
  enum:
2935
3475
  - manual
2936
3476
  - schedule
2937
3477
  - project_created
2938
3478
  - project_status_changed
3479
+ - slack_message
3480
+ - teams_message
3481
+ - email_received
2939
3482
  type: string
2940
3483
  description: |-
2941
3484
  * `manual` - Manual
2942
3485
  * `schedule` - Schedule
2943
3486
  * `project_created` - Project created
2944
3487
  * `project_status_changed` - Project status changed
3488
+ * `slack_message` - Slack message
3489
+ * `teams_message` - Teams message
3490
+ * `email_received` - Email received
2945
3491
  User:
2946
3492
  type: object
2947
3493
  properties:
@@ -3114,6 +3660,11 @@ components:
3114
3660
  type: boolean
3115
3661
  trigger:
3116
3662
  $ref: '#/components/schemas/TriggerEnum'
3663
+ trigger_config: {}
3664
+ definition:
3665
+ type: string
3666
+ format: uuid
3667
+ nullable: true
3117
3668
  last_run:
3118
3669
  allOf:
3119
3670
  - $ref: '#/components/schemas/WorkflowRun'
@@ -3187,6 +3738,11 @@ components:
3187
3738
  type: boolean
3188
3739
  trigger:
3189
3740
  $ref: '#/components/schemas/TriggerEnum'
3741
+ trigger_config: {}
3742
+ definition:
3743
+ type: string
3744
+ format: uuid
3745
+ nullable: true
3190
3746
  required:
3191
3747
  - name
3192
3748
  - trigger
@@ -7,11 +7,14 @@ generated from the API's OpenAPI schema, so every API operation is available.
7
7
 
8
8
  ```bash
9
9
  pip install current-cli
10
- current config set base_url https://your-api.example.com # default: http://localhost:8000
11
- current login you@example.com # magic-link sign in, stores the token
12
- current config set default_workspace <workspace-uuid> # used when --workspace is omitted
10
+ current login you@example.com # magic-link sign in, stores the token
11
+ current config set default_workspace <workspace-uuid> # used when --workspace is omitted
13
12
  ```
14
13
 
14
+ The CLI speaks to `https://api.current.orinlabs.ai` by default. For another
15
+ server (for example local development), set
16
+ `current config set base_url http://localhost:8000`.
17
+
15
18
  The auth token is stored in `~/.config/current-cli/config.json` and sent as
16
19
  `Authorization: Token <token>`. `CURRENT_API_URL` overrides the base URL.
17
20
 
@@ -74,6 +77,53 @@ Set one configuration value.
74
77
 
75
78
  Remove one configuration value.
76
79
 
80
+ ### current contacts add_address create <id>
81
+
82
+ POST /api/contacts/contacts/{id}/add_address/
83
+
84
+ Options:
85
+ - `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
86
+
87
+ ### current contacts addresses verify create <id> <address_id>
88
+
89
+ Admin-only: mark an address as platform-verified. Verification is
90
+ what makes a membership-linked address approval-capable.
91
+
92
+ POST /api/contacts/contacts/{id}/addresses/{address_id}/verify/
93
+
94
+ ### current contacts create
95
+
96
+ POST /api/contacts/contacts/
97
+
98
+ Options:
99
+ - `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
100
+
101
+ ### current contacts destroy <id>
102
+
103
+ DELETE /api/contacts/contacts/{id}/
104
+
105
+ ### current contacts list
106
+
107
+ GET /api/contacts/contacts/
108
+
109
+ ### current contacts partial-update <id>
110
+
111
+ PATCH /api/contacts/contacts/{id}/
112
+
113
+ Options:
114
+ - `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
115
+
116
+ ### current contacts retrieve <id>
117
+
118
+ GET /api/contacts/contacts/{id}/
119
+
120
+ ### current contacts update <id>
121
+
122
+ PUT /api/contacts/contacts/{id}/
123
+
124
+ Options:
125
+ - `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
126
+
77
127
  ### current docs
78
128
 
79
129
  Print a markdown reference of every command, for LLMs and humans.
@@ -378,6 +428,22 @@ Options:
378
428
 
379
429
  Show the current user and workspace memberships.
380
430
 
431
+ ### current workflows approvals decide create <token>
432
+
433
+ POST {state, note?}: decide via the capability link.
434
+
435
+ POST /api/workflows/approvals/{token}/decide/
436
+
437
+ Options:
438
+ - `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
439
+
440
+ ### current workflows approvals retrieve <token>
441
+
442
+ GET: the proposal as the approver must see it — summary plus the
443
+ exact payload that will execute on approval.
444
+
445
+ GET /api/workflows/approvals/{token}/
446
+
381
447
  ### current workflows create
382
448
 
383
449
  Workflows across the caller's workspaces. Any member can create and edit.
@@ -422,13 +488,13 @@ PATCH /api/workflows/workflows/{id}/
422
488
  Options:
423
489
  - `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
424
490
 
425
- ### current workflows proposals decision create <record_id>
491
+ ### current workflows proposals approval create <record_id>
426
492
 
427
493
  Approve or reject an agent_proposal record. Creates an
428
- approval_decision record and re-dispatches the run if it was parked on
429
- the gate. One decision per proposal — 409 on the second.
494
+ approval record and re-dispatches the run if it was parked on
495
+ the gate. One approval per proposal — 409 on the second.
430
496
 
431
- POST /api/workflows/proposals/{record_id}/decision/
497
+ POST /api/workflows/proposals/{record_id}/approval/
432
498
 
433
499
  Options:
434
500
  - `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
@@ -476,7 +542,7 @@ Options:
476
542
 
477
543
  Machine endpoint: the harness fetches its work order — the rendered
478
544
  definition plus the journal state it needs to resume (step states and
479
- gate decisions).
545
+ gate approvals).
480
546
 
481
547
  GET /api/workflows/runs/{run_id}/definition/
482
548
 
@@ -512,6 +578,13 @@ dispatches it (or queues it behind the per-project write queue).
512
578
 
513
579
  GET /api/workflows/runs/{id}/
514
580
 
581
+ ### current workflows runs tools invoke create <run_id> <tool_name>
582
+
583
+ POST /api/workflows/runs/{run_id}/tools/{tool_name}/invoke/
584
+
585
+ Options:
586
+ - `--data` (required) - Request body as JSON: inline, @file.json, or - for stdin.
587
+
515
588
  ### current workflows runs transitions create <run_id>
516
589
 
517
590
  Machine endpoint: the harness journals step state changes. Idempotent —
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "current-cli"
3
- version = "0.1.0"
3
+ version = "0.1.2"
4
4
  description = "Command line interface for the Current API, generated from its OpenAPI schema at runtime"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env python3
2
+ """Write a bumped patch version into pyproject.toml and print it.
3
+
4
+ Usage: bump_version.py [pyproject-path] [version-to-bump-from]
5
+
6
+ Bumps the patch of the given version (default: the version in the file) and
7
+ rewrites the file's version. Used by publish-cli.yml to publish the next
8
+ patch after the latest release on PyPI, without committing to the repo.
9
+ """
10
+
11
+ import sys
12
+ from pathlib import Path
13
+
14
+ import tomllib
15
+
16
+
17
+ def bump(path: Path, from_version: str | None = None) -> str:
18
+ current = tomllib.loads(path.read_text())["project"]["version"]
19
+ major, minor, patch = (from_version or current).split(".")
20
+ new_version = f"{major}.{minor}.{int(patch) + 1}"
21
+
22
+ text = path.read_text()
23
+ new_text = text.replace(f'version = "{current}"', f'version = "{new_version}"', 1)
24
+ if new_text == text:
25
+ raise SystemExit(f'could not find version = "{current}" in {path}')
26
+ path.write_text(new_text)
27
+ return new_version
28
+
29
+
30
+ if __name__ == "__main__":
31
+ target = Path(sys.argv[1]) if len(sys.argv) > 1 else Path("pyproject.toml")
32
+ base = sys.argv[2] if len(sys.argv) > 2 else None
33
+ print(bump(target, base))
@@ -0,0 +1,51 @@
1
+ """The release pipeline's version bump must produce a valid, incremented version."""
2
+
3
+ import subprocess
4
+ import sys
5
+
6
+ import tomllib
7
+
8
+ from .conftest import REPO_ROOT
9
+
10
+ SCRIPT = REPO_ROOT / "cli" / "scripts" / "bump_version.py"
11
+ PYPROJECT = REPO_ROOT / "cli" / "pyproject.toml"
12
+
13
+
14
+ def run_script(*args):
15
+ result = subprocess.run(
16
+ [sys.executable, str(SCRIPT), *args],
17
+ capture_output=True,
18
+ text=True,
19
+ check=True,
20
+ )
21
+ return result.stdout.strip()
22
+
23
+
24
+ def test_bump_patch_of_file_version(tmp_path):
25
+ target = tmp_path / "pyproject.toml"
26
+ target.write_text(PYPROJECT.read_text())
27
+ old = tomllib.loads(target.read_text())["project"]["version"]
28
+
29
+ printed = run_script(str(target))
30
+
31
+ major, minor, patch = old.split(".")
32
+ assert printed == f"{major}.{minor}.{int(patch) + 1}"
33
+ assert tomllib.loads(target.read_text())["project"]["version"] == printed
34
+
35
+
36
+ def test_bump_patch_of_pypi_version(tmp_path):
37
+ """CI passes the latest PyPI version; the file version is replaced with its successor."""
38
+ target = tmp_path / "pyproject.toml"
39
+ target.write_text(PYPROJECT.read_text())
40
+
41
+ printed = run_script(str(target), "0.1.7")
42
+
43
+ assert printed == "0.1.8"
44
+ assert tomllib.loads(target.read_text())["project"]["version"] == "0.1.8"
45
+
46
+
47
+ def test_real_pyproject_version_is_bumpable():
48
+ """The committed version must be plain X.Y.Z or the auto-bump breaks."""
49
+ version = tomllib.loads(PYPROJECT.read_text())["project"]["version"]
50
+ assert all(part.isdigit() for part in version.split("."))
51
+ assert len(version.split(".")) == 3
@@ -23,7 +23,7 @@ def test_list_with_workspace_option(cli, runner, transport_factory):
23
23
  assert result.exit_code == 0, result.output
24
24
  request = transport.requests[0]
25
25
  assert request.method == "GET"
26
- assert request.url == "http://localhost:8000/api/projects/projects/?workspace=ws-uuid"
26
+ assert request.url == "https://api.current.orinlabs.ai/api/projects/projects/?workspace=ws-uuid"
27
27
  assert request.headers["Authorization"] == "Token tok123"
28
28
 
29
29
 
File without changes