-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpipelex-api.openapi.yaml
More file actions
4013 lines (3819 loc) · 117 KB
/
Copy pathpipelex-api.openapi.yaml
File metadata and controls
4013 lines (3819 loc) · 117 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# GENERATED FILE — do not edit by hand. Regenerate with `make openapi-export`.
openapi: 3.1.0
info:
title: Pipelex API
summary: The open-source Pipelex runner — implements MTHDS Protocol v0.6.0.
description: 'This server implements the [MTHDS Protocol](https://mthds.ai) v0.6.0 (`POST /execute`, `POST /start`, `POST
/validate`, `GET /models`, `GET /version` — marked `x-mthds-protocol: true`) plus the Pipelex build tooling extensions
(`/build/*`) and editor tooling extensions (`/lint`, `/format`). Contract layering: MTHDS Protocol ⊂ Pipelex API (this
server) ⊂ Pipelex hosted API. Routes not in the published contract (`/upload`, `/resolve-storage-url`) are documented
as non-contract in their descriptions. All endpoints are served under the `/v1` base path; errors are RFC 7807 `application/problem+json`.'
license:
name: MIT
identifier: MIT
version: 0.8.0
paths:
/health:
get:
tags:
- health
summary: Get Health
operationId: get_health_health_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Get Health Health Get
/v1/version:
get:
tags:
- discovery
summary: Get Version
description: 'Protocol and implementation versions (MTHDS Protocol `GET /version`).
The handshake clients use for feature detection: `implementation`
identifies this runner, `implementation_version` is this server package''s
version, and `runtime_version` is the underlying pipelex runtime version.'
operationId: get_version_v1_version_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PipelexVersionInfo'
x-mthds-protocol: true
/v1/build/inputs:
post:
tags:
- build
summary: Build Inputs
description: 'Generate example input JSON for a pipe.
`validate_bundle` opens a single library, loads the bundle, and on success leaves it loaded +
current (the D6 loaded-on-success contract); on failure it tears that library down itself. So
this route reuses the already-current library directly — no second `open_library` /
`load_from_blueprints` — and owns the teardown only on the success path it reaches. Scoping the
sweep to the requested pipe (`dry_run_pipe_codes`) avoids dry-running unrelated sibling pipes.
Pipelex domain failures propagate untouched: the global `PipelexError` handler in
`api.exception_handlers` turns them into an RFC 7807 problem response.'
operationId: build_inputs_v1_build_inputs_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BuildInputsRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
title: Response Build Inputs V1 Build Inputs Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/build/output:
post:
tags:
- build
summary: Build Output
description: 'Generate example output JSON for a pipe.
`validate_bundle` opens a single library, loads the bundle, and on success leaves it loaded +
current (the D6 loaded-on-success contract); on failure it tears that library down itself. So
this route reuses the already-current library directly — no second `open_library` /
`load_from_blueprints` — and owns the teardown only on the success path it reaches. Scoping the
sweep to the requested pipe (`dry_run_pipe_codes`) avoids dry-running unrelated sibling pipes.
Pipelex domain failures propagate untouched: the global `PipelexError` handler in
`api.exception_handlers` turns them into an RFC 7807 problem response.'
operationId: build_output_v1_build_output_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BuildOutputRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
title: Response Build Output V1 Build Output Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/build/runner:
post:
tags:
- build
summary: Build Runner
description: 'Generate Python runner code for a pipe from MTHDS content.
Pipelex domain failures propagate untouched: the global `PipelexError`
handler in `api.exception_handlers` turns them into an RFC 7807 problem response. The
`try`/`finally` guarantees the library is torn down on every path that
actually opened one — `library_id` stays `None` until `open_library`
returns, so a failure before that point is a no-op for teardown rather
than a leak. Matches the pattern in `build/inputs.py` and `build/output.py`.'
operationId: build_runner_v1_build_runner_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BuildRunnerRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BuildRunnerResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/execute:
post:
tags:
- run
summary: Execute
description: 'Execute a method synchronously and return its full output (MTHDS Protocol `POST /execute`).
The backend is selected by the resolved `orchestration_mode` (deployment default + optional
policy-gated per-request override via the `orchestration_mode` extra), symmetric with `/start` —
not by `boot_orchestrator`. `/execute` is synchronous, so it dispatches with `BLOCKING` delivery
regardless of backend (wait-semantics is endpoint-set, never requestable). Pipelex domain
failures propagate untouched: the global `PipelexError` handler in `api.exception_handlers`
turns them into an RFC 7807 problem response.'
operationId: execute_v1_execute_post
requestBody:
content:
application/json:
schema:
$defs:
StuffContentAbstract:
properties: {}
type: object
title: StuffContentAbstract
WorkingMemoryAbstract_Any_:
properties:
root:
additionalProperties: true
type: object
title: Root
aliases:
additionalProperties:
type: string
type: object
title: Aliases
additionalProperties: false
type: object
title: WorkingMemoryAbstract[Any]
properties:
pipe_code:
anyOf:
- type: string
- type: 'null'
title: Pipe Code
mthds_contents:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Mthds Contents
inputs:
anyOf:
- additionalProperties:
anyOf:
- type: string
- items:
type: string
type: array
- $ref: '#/$defs/StuffContentAbstract'
- items:
$ref: '#/$defs/StuffContentAbstract'
type: array
- additionalProperties: true
type: object
type: object
- $ref: '#/$defs/WorkingMemoryAbstract_Any_'
- type: 'null'
title: Inputs
output_name:
anyOf:
- type: string
- type: 'null'
title: Output Name
output_multiplicity:
anyOf:
- type: boolean
- type: integer
- type: 'null'
title: Output Multiplicity
dynamic_output_concept_ref:
anyOf:
- type: string
- type: 'null'
title: Dynamic Output Concept Ref
orchestration_mode:
anyOf:
- type: string
- type: 'null'
title: Orchestration Mode
description: 'PIPELEX-API EXTENSION (not part of the MTHDS Protocol) — request the orchestration mode (the
backend) for this run. An OPEN string token: `direct` (in-process, the base default), `temporal`, and
any other plugin-provided token are accepted; an unregistered token is refused at dispatch. The delivery
axis (blocking vs fire-and-forget) is endpoint-set, never requestable. Honored ONLY when the deployment
sets `allow_request_orchestration_mode_override = true` in its `api.toml`; otherwise a token that differs
from the deployment default is refused with a 403. Omit it to use the deployment default.'
additionalProperties: true
type: object
title: PipelexApiExecuteRequest
description: 'Documented body of `POST /execute` — the protocol''s `RunRequest` plus THIS server''s `orchestration_mode`
extension.
Used only to publish the OpenAPI request schema: `/execute` reads the body through the raw
`Request` (kajson decoding), so FastAPI cannot infer the body type; this model documents the
per-request `orchestration_mode` override the route actually honors (parsed by `PipelineApiExtras`).'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PipelexRunResultExecute'
x-mthds-protocol: true
/v1/start:
post:
tags:
- run
summary: Start
description: 'Start a method run and return its pipeline_run_id with a 202 ack (MTHDS Protocol `POST /start`).
Answers `202 Accepted` with a `StartAck`. A client-supplied `pipeline_run_id` is
honored (protocol D11: this runner accepts it; `StartAck.pipeline_run_id` is always
authoritative). Pipelex domain failures propagate untouched: the global
`PipelexError` handler in `api.exception_handlers` turns them into an
RFC 7807 problem response.
Fire-and-forget is a property of THIS endpoint (its delivery axis), honored only by an
async-capable backend. A deployment configures the backend (`orchestration_mode`) once; `/start`
sets `FIRE_AND_FORGET` delivery and checks the resolved orchestrator can honor it. A Temporal
deployment (`orchestration_mode = "temporal"`) enqueues the run and returns immediately with a
`workflow_id`. On the orchestrator-agnostic base (`orchestration_mode = "direct"`, the default)
the in-process orchestrator is blocking-only, so `/start` is HONEST: it refuses with a `400`
(`StartRequiresAsyncOrchestration`) — use `/execute` — rather than silently blocking and acking.
The completion callback (`callback_urls` / storage delivery) fires on the async path.'
operationId: start_v1_start_post
requestBody:
content:
application/json:
schema:
$defs:
StuffContentAbstract:
properties: {}
type: object
title: StuffContentAbstract
WorkingMemoryAbstract_Any_:
properties:
root:
additionalProperties: true
type: object
title: Root
aliases:
additionalProperties:
type: string
type: object
title: Aliases
additionalProperties: false
type: object
title: WorkingMemoryAbstract[Any]
properties:
pipe_code:
anyOf:
- type: string
- type: 'null'
title: Pipe Code
mthds_contents:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Mthds Contents
inputs:
anyOf:
- additionalProperties:
anyOf:
- type: string
- items:
type: string
type: array
- $ref: '#/$defs/StuffContentAbstract'
- items:
$ref: '#/$defs/StuffContentAbstract'
type: array
- additionalProperties: true
type: object
type: object
- $ref: '#/$defs/WorkingMemoryAbstract_Any_'
- type: 'null'
title: Inputs
output_name:
anyOf:
- type: string
- type: 'null'
title: Output Name
output_multiplicity:
anyOf:
- type: boolean
- type: integer
- type: 'null'
title: Output Multiplicity
dynamic_output_concept_ref:
anyOf:
- type: string
- type: 'null'
title: Dynamic Output Concept Ref
pipeline_run_id:
anyOf:
- type: string
maxLength: 128
- type: 'null'
title: Pipeline Run Id
callback_urls:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Callback Urls
description: PIPELEX-API EXTENSION (not part of the MTHDS Protocol) — completion webhooks. When the run
finishes, the runner POSTs the RunResult to each URL, HMAC-SHA256-signed via the X-Completion-Signature
header. http/https only; private, loopback, link-local and cloud-metadata hosts are rejected.
orchestration_mode:
anyOf:
- type: string
- type: 'null'
title: Orchestration Mode
description: 'PIPELEX-API EXTENSION (not part of the MTHDS Protocol) — request the orchestration mode (the
backend) for this run. An OPEN string token: `direct` (in-process, the base default), `temporal`, and
any other plugin-provided token are accepted; an unregistered token is refused at dispatch. The delivery
axis (blocking vs fire-and-forget) is endpoint-set, never requestable. Honored ONLY when the deployment
sets `allow_request_orchestration_mode_override = true` in its `api.toml`; otherwise a token that differs
from the deployment default is refused with a 403. Omit it to use the deployment default.'
additionalProperties: true
type: object
title: PipelexApiStartRequest
description: 'Documented body of `POST /start` — the protocol''s `StartRequest` plus THIS server''s extensions.
Used only to publish the OpenAPI request schema: the protocol model no
longer advertises implementation extensions, so this server documents the
ones it implements itself. Wire validation happens in `PipelineApiExtras`.'
required: true
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PipelexRunResultStart'
x-mthds-protocol: true
/v1/validate:
post:
tags:
- validate
summary: Validate Mthds
description: "Validate MTHDS content by parsing, loading, and dry-running pipes (MTHDS Protocol `POST /validate`).\n\
\n`/validate` is a **diagnostic endpoint**: any verdict the validator can produce — valid,\ninvalid, or valid-but-not-runnable\
\ — rides a **200** discriminated in the body on `is_valid`.\nNon-2xx is reserved for the cases where *no verdict\
\ could be produced*.\n\nResponse contract:\n\n- **Valid verdict (200, `is_valid: true`):** the `ValidReport` arm\
\ — the canonical report\n (primary `bundle_blueprint`, `pipe_io_contracts` keyed by namespaced `pipe_ref`, per-pipe\n\
\ `validated_pipes` sweep outcomes, `pending_signatures` + `is_runnable` runnability verdict,\n best-effort `graph_spec`)\
\ plus the wire extras (`mthds_contents` echo, `message`). A bundle\n that declares no `main_pipe` validates fine\
\ and carries `graph_spec=null`. Pending\n signatures are reported as `pending_signatures` + `is_runnable: false`,\
\ never as an error.\n- **Invalid verdict (200, `is_valid: false`):** the `InvalidReport` arm — `validation_errors[]`\n\
\ (the structured per-error diagnostics, built by pipelex's one shared builder, incl. the\n `dry_run` residual item)\
\ + `message`, with the structural artifacts absent. The runner\n returns this as a value (`ErrorReport` with `validation_errors`)\
\ regardless of backend — the\n in-process arm from the bundle's `ValidateBundleError`, the dispatched arm recovered\
\ from the\n worker — so the route maps it to a 200 by matching validation diagnostics, never by catching an\n exception.\
\ Returned `ErrorReport`s without validation diagnostics are backend/config/runtime\n faults and keep the global\
\ RFC 7807 problem response path.\n- **No verdict (non-2xx):** a malformed request body or an `mthds_sources` length\
\ mismatch is a\n request-shape **422**; a forbidden `orchestration_mode` override is a **403**; a host-wiring\n\
\ programmer error or a genuine orchestrator fault is a **5xx**; auth is **401/403**. All are\n RFC 7807 `application/problem+json`\
\ rendered by the global handler in\n `api.exception_handlers` — routes never shape them."
operationId: validate_mthds_v1_validate_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ValidateRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ValidReport'
- $ref: '#/components/schemas/InvalidReport'
title: Response Validate Mthds V1 Validate Post
discriminator:
propertyName: is_valid
mapping:
'True': '#/components/schemas/ValidReport'
'False': '#/components/schemas/InvalidReport'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
x-mthds-protocol: true
/v1/lint:
post:
tags:
- tools
summary: Lint Mthds
description: 'Lint one .mthds file with the embedded MTHDS schema.
Malformed .mthds content is a produced diagnostic verdict and returns 200.
Request-shape problems remain RFC 7807 422 responses through the global handlers.'
operationId: lint_mthds_v1_lint_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LintRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/LintResponse'
'422':
description: Validation Error
content:
application/problem+json:
schema:
additionalProperties: true
type: object
/v1/format:
post:
tags:
- tools
summary: Format Mthds
description: 'Format one .mthds file with the canonical MTHDS formatter.
Syntax errors return 200 with diagnostics and unchanged content. Malformed
formatter options are caller input errors and return RFC 7807 422.'
operationId: format_mthds_v1_format_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FormatRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/FormatResponse'
'422':
description: Validation Error
content:
application/problem+json:
schema:
additionalProperties: true
type: object
/v1/models:
get:
tags:
- agent
summary: Get Models
description: 'List the model deck this runner can route to (MTHDS Protocol `GET /models`).
Answers the protocol `ModelDeck` as produced by `PipelexMTHDSProtocol.models` —
the flat `models` list (`{name, type}` entries) plus this implementation''s
category-keyed routing extensions (`aliases`, `waterfalls`). The `type` query
param is a SINGLE protocol `ModelCategory` value: repeated `?type=` values
(arity, `ValidationError`) and unknown categories (`InvalidModelCategory`) are
both 422s (RFC 7807).'
operationId: get_models_v1_models_get
parameters:
- name: type
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'Filter by model category: llm, extract, img_gen, search. Single value (protocol arity).'
title: Type
description: 'Filter by model category: llm, extract, img_gen, search. Single value (protocol arity).'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PipelexModelDeck'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
x-mthds-protocol: true
/v1/build/concept:
post:
tags:
- agent
summary: Build Concept
description: 'Convert a JSON concept spec to TOML format.
A malformed spec surfaces as a Pydantic `ValidationError` — an API-owned
422. Pipelex domain failures propagate untouched to the global
`PipelexError` handler in `api.exception_handlers`.
Known gap (tracked as `pipelex-changes.md` item #11): a non-dict `structure`
(`{"structure": "string"}`) or a `structure` field that is neither a string
nor a dict (`{"structure": {"f": 42}}`) makes `parse_concept_spec` leak a
bare `AttributeError`/`TypeError` instead of a typed error, so the request
surfaces as an opaque 500. We deliberately don''t catch those here — they
are also the signal of a real pipelex programming bug, and a broad route
catch would mask both. The fix is upstream shape validation in
`parse_concept_spec`.'
operationId: build_concept_v1_build_concept_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BuildConceptRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BuildConceptResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/build/pipe-spec:
post:
tags:
- agent
summary: Build Pipe Spec
description: 'Convert a JSON pipe spec to TOML format.
Two caller-mistake paths surface as a 422 here: a `ValidationError` from
Pydantic when the spec shape doesn''t match the chosen pipe type, and a
`ValueError` from `parse_pipe_spec` when `pipe_type` is not one of the
known pipe types (documented in `parse_pipe_spec`''s docstring; raised at
exactly one site). Pipelex domain failures propagate untouched to the
global `PipelexError` handler in `api.exception_handlers`.'
operationId: build_pipe_spec_v1_build_pipe_spec_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BuildPipeSpecRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BuildPipeSpecResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/upload:
post:
tags:
- uploader
summary: Upload File
description: 'Upload a file to pipelex storage, scoped by user.
NON-CONTRACT: this route is NOT part of the published Pipelex API contract
(neither the MTHDS Protocol nor the build extensions). It is a deployment
convenience slated for replacement by the storage redesign — do not build
new integrations on it.
Accepts base64-encoded file data, stores it via the configured storage provider,
and returns the pipelex-storage:// URI that pipelex resolves at runtime.'
operationId: upload_file_v1_upload_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UploadRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UploadResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/resolve-storage-url:
post:
tags:
- storage
summary: Resolve Storage Url
description: "Resolve a pipelex-storage:// URI to a short-lived presigned URL.\n\nNON-CONTRACT: this route is NOT part\
\ of the published Pipelex API contract\n(neither the MTHDS Protocol nor the build extensions). It is a deployment\n\
convenience slated for replacement by the storage redesign — do not build\nnew integrations on it.\n\nSecurity:\n\
\ 1. Requires authenticated user (user_id != \"anonymous\").\n 2. URI format is validated to block path traversal\
\ and malformed segments.\n 3. The URI's first path segment must equal the requester's user_id (ownership check).\n\
\ 4. Fails loud if the storage provider falls back to a non-presigned URL."
operationId: resolve_storage_url_v1_resolve_storage_url_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ResolveStorageUrlRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ResolveStorageUrlResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/:
get:
summary: Root
operationId: root__get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties:
type: string
type: object
title: Response Root Get
components:
schemas:
AbsenceKind:
type: string
enum:
- declared_absent
- skipped
- not_provided
title: AbsenceKind
description: "How a slot came to hold no value.\n\n- DECLARED_ABSENT: a producer with an optional (`?`) output declared\
\ it produced nothing\n (e.g. a PipeCondition `continue` outcome, or — phase 2 — an LLM maybe-wrapper).\n- SKIPPED:\
\ the producing pipe was lifted (skipped) because one of its plain inputs was absent.\n- NOT_PROVIDED: the caller\
\ omitted an optional method input from the pipeline inputs."
AbsenceRecord:
properties:
variable_name:
type: string
title: Variable Name
kind:
$ref: '#/components/schemas/AbsenceKind'
reason:
type: string
title: Reason
producing_pipe:
anyOf:
- type: string
- type: 'null'
title: Producing Pipe
upstream:
anyOf:
- $ref: '#/components/schemas/AbsenceRecord'
- type: 'null'
additionalProperties: false
type: object
required:
- variable_name
- kind
- reason
title: AbsenceRecord
description: 'A recorded fact that a named slot holds no value, with provenance (D2).
Absence stays what it mechanically is — no Stuff under the name — but becomes a recorded
fact: who produced it, why, and which upstream absence it chains to. Provenance is captured
at the moment absence is produced, not reconstructed at failure time.'
AspectRatio:
type: string
enum:
- square
- landscape_4_3
- landscape_3_2
- landscape_16_9
- landscape_21_9
- landscape_4_1
- landscape_8_1
- portrait_3_4
- portrait_2_3
- portrait_9_16
- portrait_9_21
- portrait_1_4
- portrait_1_8
title: AspectRatio
Background:
type: string
enum:
- transparent
- opaque
- auto
title: Background
BuildConceptRequest:
properties:
spec:
additionalProperties: true
type: object
title: Spec
description: JSON concept specification.
type: object
required:
- spec
title: BuildConceptRequest
BuildConceptResponse:
properties:
success:
type: boolean
title: Success
description: Whether the operation was successful
default: true
concept_code:
type: string
title: Concept Code
description: The concept code that was generated
toml:
type: string
title: Toml
description: Generated TOML content for the concept
type: object
required:
- concept_code
- toml
title: BuildConceptResponse
BuildInputsRequest:
properties:
mthds_contents:
items:
type: string
type: array
maxItems: 16
minItems: 1
title: Mthds Contents
description: MTHDS contents to load (always an array, even for a single file).
allow_signatures:
type: boolean
title: Allow Signatures
description: When true, the validation sweep tolerates unimplemented pipe signatures instead of rejecting the bundle
(signatures dry-run trivially by minting a mock). Defaults to false (strict).
default: false
pipe_code:
type: string
maxLength: 256
minLength: 1
title: Pipe Code
description: Pipe code to generate inputs JSON for.
type: object
required:
- mthds_contents
- pipe_code
title: BuildInputsRequest
BuildOutputRequest:
properties:
mthds_contents:
items:
type: string
type: array
maxItems: 16
minItems: 1
title: Mthds Contents
description: MTHDS contents to load (always an array, even for a single file).
allow_signatures:
type: boolean
title: Allow Signatures
description: When true, the validation sweep tolerates unimplemented pipe signatures instead of rejecting the bundle
(signatures dry-run trivially by minting a mock). Defaults to false (strict).
default: false
pipe_code:
type: string
maxLength: 256
minLength: 1
title: Pipe Code
description: Pipe code to generate output JSON for.
format:
$ref: '#/components/schemas/ConceptRepresentationFormat'
description: Format to generate output in.
default: schema
type: object
required:
- mthds_contents
- pipe_code
title: BuildOutputRequest
BuildPipeSpecRequest:
properties:
pipe_type:
type: string
maxLength: 128
minLength: 1
title: Pipe Type
description: The pipe type (e.g. PipeLLM, PipeSequence, etc.).
spec:
additionalProperties: true
type: object
title: Spec
description: JSON pipe specification.
type: object
required:
- pipe_type
- spec
title: BuildPipeSpecRequest
BuildPipeSpecResponse:
properties:
success:
type: boolean
title: Success
description: Whether the operation was successful
default: true
pipe_code:
type: string
title: Pipe Code
description: The pipe code that was generated
pipe_type:
type: string
title: Pipe Type
description: The pipe type
toml:
type: string
title: Toml
description: Generated TOML content for the pipe
type: object
required:
- pipe_code
- pipe_type
- toml
title: BuildPipeSpecResponse
BuildRunnerRequest:
properties:
mthds_contents:
items:
type: string
type: array
maxItems: 16
minItems: 1
title: Mthds Contents
description: MTHDS contents to load (always an array, even for a single file).
allow_signatures:
type: boolean
title: Allow Signatures