okami.mom/albedo

git clone https://git.nkp.pet/okami.mom/albedo

dawnquota: filter history to one limit and drop recovered failures from the latest readings711d48a

main
331.1 KiB10992 linesraw
1# Daemon protocol 3. See http-api-design.md for behavioral semantics.
2openapi: 3.2.1
3info:
4  title: Albedo daemon API
5  version: 3.0.0
6  summary: 'Protocol 3: typed HTTP resources and SSE.'
7  description: This file owns daemon request and response shapes.
8    http-api-design.md owns ordering, atomicity, retry and recovery behavior. Server and clients switch
9    together; there are no legacy route aliases. Unknown request fields and duplicate JSON keys are errors.
10    Unknown response fields may be ignored by clients. No operation starts or replaces a daemon. JSON
11    and SSE frames are at most 1 MiB unless an extension explicitly overrides that limit. Ordinary request
12    bodies are at most 64 KiB, input bodies 72,200,000 bytes and proxy bodies 32,000,000 bytes. UTF-8 and
13    encoded-byte limits are described with x-max-utf8-bytes/x-max-encoded-bytes; standard schema validation
14    alone does not assert them. Examples use synthetic secrets only. JSON and text responses of at least
15    1 KiB, and session event streams, use Content-Encoding zstd when Accept-Encoding admits it; limits
16    and ETags apply to the decoded representation. When capabilities include zstd_requests, a request
17    body may use Content-Encoding zstd as one frame that declares its decoded size.
18jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
19externalDocs:
20  description: Behavior, ownership, feature coverage and verification.
21  url: http-api-design.md
22security:
23- DaemonBearer: []
24tags:
25- name: server
26- name: settings
27- name: storage
28- name: sessions
29- name: models
30- name: workspaces
31- name: hosts
32- name: auth
33- name: work
34- name: paperclips
35- name: web-search
36- name: schedule
37- name: links
38- name: webhooks
39- name: proxy
40paths:
41  /server:
42    get:
43      operationId: getServer
44      summary: Read daemon identity and capabilities
45      tags:
46      - server
47      responses:
48        '200':
49          description: Successful result.
50          content:
51            application/json:
52              schema:
53                $ref: '#/components/schemas/Server'
54              examples:
55                Server:
56                  value:
57                    instance_id: instance-1
58                    protocol: 3
59                    state: ready
60                    capabilities:
61                      durable_inputs: 1
62                      session_replay: 1
63                      collection_invalidation: 1
64                      tool_progress: 1
65                      storage_report: 1
66                    build: example-build
67                    digest: null
68                    extensions:
69                    - name: work
70                      version: 1
71                    quota: null
72                    notices: []
73        '400':
74          $ref: '#/components/responses/Problem400'
75        '401':
76          $ref: '#/components/responses/Problem401'
77        '403':
78          $ref: '#/components/responses/Problem403'
79        '405':
80          $ref: '#/components/responses/Problem405'
81        '406':
82          $ref: '#/components/responses/Problem406'
83        '503':
84          $ref: '#/components/responses/Problem503'
85      description: No startup or replacement. Authentication and protocol failures remain actionable errors.
86        Pagination is valid only with include=quota_history.
87      parameters:
88      - name: include
89        in: query
90        required: false
91        schema:
92          type: string
93          enum: [quota_history]
94      - $ref: '#/components/parameters/Limit'
95      - $ref: '#/components/parameters/Next'
96      - name: quota_provider
97        in: query
98        required: false
99        description: Exact provider ID to filter quota history. Requires include=quota_history, quota_account, and quota_limit.
100        schema:
101          type: string
102      - name: quota_account
103        in: query
104        required: false
105        description: Exact account label to filter quota history. Requires include=quota_history, quota_provider, and quota_limit.
106        schema:
107          type: string
108      - name: quota_limit
109        in: query
110        required: false
111        description: Exact limit ID to filter quota history. Requires include=quota_history, quota_provider, and quota_account.
112        schema:
113          type: string
114      - name: quota_since
115        in: query
116        required: false
117        description: Filter quota history to observations at or after this RFC 3339 UTC timestamp. Requires include=quota_history and the limit filter trio.
118        schema:
119          $ref: '#/components/schemas/Timestamp'
120  /server/shutdown:
121    post:
122      operationId: shutdownServer
123      summary: Drain the identified daemon
124      tags:
125      - server
126      responses:
127        '202':
128          description: Successful result.
129          content:
130            application/json:
131              schema:
132                $ref: '#/components/schemas/Shutdown'
133        '400':
134          $ref: '#/components/responses/Problem400'
135        '401':
136          $ref: '#/components/responses/Problem401'
137        '403':
138          $ref: '#/components/responses/Problem403'
139        '405':
140          $ref: '#/components/responses/Problem405'
141        '406':
142          $ref: '#/components/responses/Problem406'
143        '503':
144          $ref: '#/components/responses/Problem503'
145        '413':
146          $ref: '#/components/responses/Problem413'
147        '415':
148          $ref: '#/components/responses/Problem415'
149        '409':
150          $ref: '#/components/responses/Problem409'
151      description: No automatic recovery or replay. The local launcher alone may offer replacement.
152      requestBody:
153        required: true
154        content:
155          application/json:
156            schema:
157              $ref: '#/components/schemas/ShutdownRequest'
158        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
159  /settings:
160    get:
161      operationId: getSettings
162      summary: Read shared settings or one canonical group
163      tags:
164      - settings
165      responses:
166        '200':
167          description: Successful result.
168          headers:
169            ETag:
170              $ref: '#/components/headers/ETag'
171          content:
172            application/json:
173              schema:
174                $ref: '#/components/schemas/SettingsRead'
175        '400':
176          $ref: '#/components/responses/Problem400'
177        '401':
178          $ref: '#/components/responses/Problem401'
179        '403':
180          $ref: '#/components/responses/Problem403'
181        '405':
182          $ref: '#/components/responses/Problem405'
183        '406':
184          $ref: '#/components/responses/Problem406'
185        '503':
186          $ref: '#/components/responses/Problem503'
187      description: Without group, return Settings and observed group validators. With group, return that
188        group only; the ETag covers that representation.
189      parameters:
190      - name: group
191        in: query
192        required: false
193        schema:
194          type: string
195          enum: [providers, mcp, extensions, capabilities, models, ui]
196    patch:
197      operationId: patchSettings
198      summary: Atomically edit one settings group
199      tags:
200      - settings
201      responses:
202        '200':
203          description: Successful result.
204          content:
205            application/json:
206              schema:
207                $ref: '#/components/schemas/SettingsChange'
208        '400':
209          $ref: '#/components/responses/Problem400'
210        '401':
211          $ref: '#/components/responses/Problem401'
212        '403':
213          $ref: '#/components/responses/Problem403'
214        '405':
215          $ref: '#/components/responses/Problem405'
216        '406':
217          $ref: '#/components/responses/Problem406'
218        '503':
219          $ref: '#/components/responses/Problem503'
220        '413':
221          $ref: '#/components/responses/Problem413'
222        '415':
223          $ref: '#/components/responses/Problem415'
224        '409':
225          $ref: '#/components/responses/Problem409'
226        '412':
227          $ref: '#/components/responses/Problem412'
228        '428':
229          $ref: '#/components/responses/Problem428'
230      description: Query group selects its corresponding schema. Omitted fields keep values. Null removes
231        only nullable fields or map entries. Candidate validation precedes the complete group commit.
232        No lost-response retry.
233      parameters:
234      - name: group
235        in: query
236        required: true
237        schema:
238          type: string
239          enum: [providers, mcp, extensions, capabilities, models, ui]
240      - $ref: '#/components/parameters/IfMatch'
241      requestBody:
242        required: true
243        content:
244          application/merge-patch+json:
245            schema:
246              $ref: '#/components/schemas/SettingsPatch'
247            examples:
248              ProviderSettingsPatch:
249                value:
250                  default_profile: personal
251                  profiles:
252                    personal:
253                      extension: openai
254                      endpoint: https://provider.example/v1
255                      protocol: responses
256                      model: example-model
257                      effort: null
258                      image_edge: null
259                      account_id: null
260                      project: null
261                      location: null
262                      api_key: synthetic-example-key
263        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
264  /storage:
265    get:
266      operationId: getStorage
267      summary: Read storage accounting
268      tags:
269      - storage
270      responses:
271        '200':
272          description: Successful result.
273          content:
274            application/json:
275              schema:
276                $ref: '#/components/schemas/StorageReport'
277              examples:
278                StorageReport:
279                  value:
280                    database:
281                      main_file_bytes: 8192
282                      wal_bytes: 0
283                      page_size_bytes: 4096
284                      page_count: 2
285                      free_page_count: 0
286                      used_bytes: 8192
287                    sessions:
288                      items: []
289                      next: null
290                      total_count: 0
291                      total_estimated_content_bytes: 0
292                    images:
293                      count: 0
294                      bytes: 0
295                    files:
296                      items: []
297                      next: null
298                      totals:
299                        kernel_bytes: 0
300                        backup_bytes: 0
301                        other_bytes: 0
302                        recent_backup_bytes: 0
303                        recent_backup_count: 0
304                    measured_at: '2026-10-02T14:00:00Z'
305        '400':
306          $ref: '#/components/responses/Problem400'
307        '401':
308          $ref: '#/components/responses/Problem401'
309        '403':
310          $ref: '#/components/responses/Problem403'
311        '405':
312          $ref: '#/components/responses/Problem405'
313        '406':
314          $ref: '#/components/responses/Problem406'
315        '503':
316          $ref: '#/components/responses/Problem503'
317      description: 'Each section has its own continuation. Totals cover complete storage. Paths never
318        authorize local mutation. Requires capability `storage_report: 1`.'
319      parameters:
320      - name: sessions_next
321        in: query
322        required: false
323        schema:
324          $ref: '#/components/schemas/PageToken'
325      - name: files_next
326        in: query
327        required: false
328        schema:
329          $ref: '#/components/schemas/PageToken'
330      - $ref: '#/components/parameters/Limit'
331  /sessions:
332    get:
333      operationId: listSessions
334      summary: Browse sessions or watch collection changes
335      tags:
336      - sessions
337      responses:
338        '200':
339          description: Successful result.
340          content:
341            application/json:
342              schema:
343                $ref: '#/components/schemas/SessionPage'
344              examples:
345                SessionPage:
346                  value:
347                    items:
348                    - id: 01a0fcea-2b00-7000-8000-000000000001
349                      name: New session
350                      automatic_name: New session
351                      workspace: /workspace/project
352                      location:
353                        host: null
354                        user: null
355                        path: /workspace/project
356                        label: null
357                      parent_id: null
358                      root_id: 01a0fcea-2b00-7000-8000-000000000001
359                      address: null
360                      depth: 0
361                      closed: false
362                      created_at: '2026-10-02T14:00:00Z'
363                      activity_at: '2026-10-02T14:00:00Z'
364                      provider_profile: personal
365                      model: example-model
366                      effort: null
367                      status:
368                        phase: idle
369                        run_id: null
370                        interrupt_requested: false
371                        blocking_reason: null
372                      preview:
373                        text: ''
374                        transcript_count: 0
375                        truncated: false
376                      preferences:
377                        pinned: false
378                        pin_order: null
379                        archived: false
380                        opens: 0
381                      current_progress: []
382                      active_output: []
383                      activity:
384                        lines: []
385                        output_scalars: 0
386                        output_utf8_bytes: 0
387                        observed_at: '2026-10-02T14:00:00Z'
388                        latest_input: null
389                        latest_answer: null
390                      cursor:
391                        generation: J6kYj6IGcXyP3eMIp-WL3A
392                        sequence: 0
393                    next: null
394            text/event-stream:
395              itemSchema:
396                $ref: '#/components/schemas/CollectionSSE'
397          headers:
398            Vary:
399              $ref: '#/components/headers/Vary'
400        '400':
401          $ref: '#/components/responses/Problem400'
402        '401':
403          $ref: '#/components/responses/Problem401'
404        '403':
405          $ref: '#/components/responses/Problem403'
406        '405':
407          $ref: '#/components/responses/Problem405'
408        '406':
409          $ref: '#/components/responses/Problem406'
410        '503':
411          $ref: '#/components/responses/Problem503'
412        '404':
413          $ref: '#/components/responses/Problem404'
414      description: JSON defaults to roots, or all with parent/family. Parent and family are exclusive.
415        Explicit roots with either is invalid. SSE accepts the same scope filters, excluding sort/limit/next;
416        no cursor or replay. Subscribe, wait for ready, then read pages. Closure or overflow repeats this
417        flow.
418      parameters:
419      - name: scope
420        in: query
421        required: false
422        schema:
423          type: string
424          enum: [roots, all]
425      - name: parent_id
426        in: query
427        required: false
428        schema:
429          $ref: '#/components/schemas/ID'
430      - name: family_id
431        in: query
432        required: false
433        schema:
434          $ref: '#/components/schemas/ID'
435      - name: workspace
436        in: query
437        required: false
438        schema:
439          $ref: '#/components/schemas/Workspace'
440      - name: search
441        in: query
442        required: false
443        schema:
444          type: string
445          maxLength: 256
446      - name: archived
447        in: query
448        required: false
449        schema:
450          type: boolean
451      - name: needs_reload
452        in: query
453        required: false
454        schema:
455          type: boolean
456      - name: sort
457        in: query
458        required: false
459        schema:
460          type: string
461          enum: [activity, frequent]
462          default: activity
463      - $ref: '#/components/parameters/Limit'
464      - $ref: '#/components/parameters/Next'
465  /sessions/{session_id}:
466    get:
467      operationId: getSession
468      summary: Read or watch one session
469      tags:
470      - sessions
471      responses:
472        '200':
473          description: Successful result.
474          headers:
475            ETag:
476              $ref: '#/components/headers/ETag'
477            Vary:
478              $ref: '#/components/headers/Vary'
479          content:
480            application/json:
481              schema:
482                $ref: '#/components/schemas/SessionRead'
483              examples:
484                Session:
485                  value:
486                    id: 01a0fcea-2b00-7000-8000-000000000001
487                    name: New session
488                    automatic_name: New session
489                    workspace: /workspace/project
490                    location:
491                      host: null
492                      user: null
493                      path: /workspace/project
494                      label: null
495                    parent_id: null
496                    root_id: 01a0fcea-2b00-7000-8000-000000000001
497                    address: null
498                    depth: 0
499                    closed: false
500                    created_at: '2026-10-02T14:00:00Z'
501                    activity_at: '2026-10-02T14:00:00Z'
502                    provider_profile: personal
503                    model: example-model
504                    effort: null
505                    status:
506                      phase: idle
507                      run_id: null
508                      interrupt_requested: false
509                      blocking_reason: null
510                    preview:
511                      text: ''
512                      transcript_count: 0
513                      truncated: false
514                    preferences:
515                      pinned: false
516                      pin_order: null
517                      archived: false
518                      opens: 0
519                    current_progress: []
520                    active_output: []
521                    activity:
522                      lines: []
523                      output_scalars: 0
524                      output_utf8_bytes: 0
525                      observed_at: '2026-10-02T14:00:00Z'
526                      latest_input: null
527                      latest_answer: null
528                    cursor:
529                      generation: J6kYj6IGcXyP3eMIp-WL3A
530                      sequence: 0
531                    creation:
532                      submitted:
533                        kind: new
534                        workspace: /workspace/project
535                        name: null
536                        provider_profile: null
537                        model: null
538                        effort: null
539                      resolved:
540                        workspace: /workspace/project
541                        provider_profile: personal
542                        model: example-model
543                        effort: null
544                    revision: config-1
545                    family_revision: family-1
546                    configuration_resource:
547                      url: /sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration
548                      etag: '"session-config-1"'
549                      value:
550                        id: 01a0fcea-2b00-7000-8000-000000000001
551                        name: New session
552                        workspace: /workspace/project
553                        provider_profile: personal
554                        model: example-model
555                        effort: null
556                        preferences:
557                          pinned: false
558                          pin_order: null
559                          archived: false
560                        selection:
561                          extensions: {}
562                          skills: {}
563                          instructions: {}
564                          mcp: {}
565                        revision: config-1
566                        family_revision: family-1
567                    workspace_change: null
568                    selection:
569                      overrides:
570                        extensions: {}
571                        skills: {}
572                        instructions: {}
573                        mcp: {}
574                      effective:
575                        extensions: {}
576                        skills: {}
577                        instructions: {}
578                        mcp: {}
579                    composition:
580                      desired_revision: composition-1
581                      loaded_revision: null
582                      needs_reload: true
583                      dependencies: {}
584                      quarantine: []
585                      availability: {}
586                    kernel:
587                      instance_id: null
588                      state: none
589                      stage: null
590                      build: null
591                      stale: false
592                      staleness_reasons: []
593                      live_job_count: 0
594                      running_jobs: []
595                    pending_inputs: []
596                    input_order: 0
597                    usage:
598                      model: null
599                      observed_at: null
600                      prompt_tokens: null
601                      cached_prompt_tokens: null
602                      cache_write_tokens: null
603                      completion_tokens: null
604                      total_tokens: null
605                      elapsed_ms: null
606                      tokens_per_second: null
607                      context_window_tokens: null
608                      cache_ttl_seconds: null
609                      cache_fade: []
610                    history:
611                      items: []
612                      older: null
613                      newer: null
614                      high_water: 0
615                    glances: []
616            text/event-stream:
617              itemSchema:
618                $ref: '#/components/schemas/SessionSSE'
619        '400':
620          $ref: '#/components/responses/Problem400'
621        '401':
622          $ref: '#/components/responses/Problem401'
623        '403':
624          $ref: '#/components/responses/Problem403'
625        '405':
626          $ref: '#/components/responses/Problem405'
627        '406':
628          $ref: '#/components/responses/Problem406'
629        '503':
630          $ref: '#/components/responses/Problem503'
631        '404':
632          $ref: '#/components/responses/Problem404'
633        '410':
634          $ref: '#/components/responses/Problem410'
635      description: JSON defaults to complete Session. Configuration JSON excludes tail and replay parameters.
636        SSE accepts tail and after_generation/after_seq, without view. Initial subscription omits both
637        cursors; reconnect keeps the fully consumed pair. A missing generation requests reset. after_generation
638        without after_seq is invalid. Neither auth failure nor closure starts a daemon.
639      parameters:
640      - name: session_id
641        in: path
642        required: true
643        schema:
644          $ref: '#/components/schemas/ID'
645      - name: view
646        in: query
647        required: false
648        schema:
649          type: string
650          enum: [configuration]
651      - name: tail
652        in: query
653        required: false
654        schema:
655          type: integer
656          minimum: 0
657          maximum: 200
658          default: 100
659      - name: after_generation
660        in: query
661        required: false
662        schema:
663          $ref: '#/components/schemas/Generation'
664      - name: after_seq
665        in: query
666        required: false
667        schema:
668          $ref: '#/components/schemas/Counter'
669    put:
670      operationId: createSession
671      summary: Create a new, forked or child session
672      tags:
673      - sessions
674      responses:
675        '201':
676          description: Successful result.
677          headers:
678            Location:
679              $ref: '#/components/headers/Location'
680            ETag:
681              $ref: '#/components/headers/ETag'
682          content:
683            application/json:
684              schema:
685                $ref: '#/components/schemas/Session'
686              examples:
687                Session:
688                  value:
689                    id: 01a0fcea-2b00-7000-8000-000000000001
690                    name: New session
691                    automatic_name: New session
692                    workspace: /workspace/project
693                    location:
694                      host: null
695                      user: null
696                      path: /workspace/project
697                      label: null
698                    parent_id: null
699                    root_id: 01a0fcea-2b00-7000-8000-000000000001
700                    address: null
701                    depth: 0
702                    closed: false
703                    created_at: '2026-10-02T14:00:00Z'
704                    activity_at: '2026-10-02T14:00:00Z'
705                    provider_profile: personal
706                    model: example-model
707                    effort: null
708                    status:
709                      phase: idle
710                      run_id: null
711                      interrupt_requested: false
712                      blocking_reason: null
713                    preview:
714                      text: ''
715                      transcript_count: 0
716                      truncated: false
717                    preferences:
718                      pinned: false
719                      pin_order: null
720                      archived: false
721                      opens: 0
722                    current_progress: []
723                    active_output: []
724                    activity:
725                      lines: []
726                      output_scalars: 0
727                      output_utf8_bytes: 0
728                      observed_at: '2026-10-02T14:00:00Z'
729                      latest_input: null
730                      latest_answer: null
731                    cursor:
732                      generation: J6kYj6IGcXyP3eMIp-WL3A
733                      sequence: 0
734                    creation:
735                      submitted:
736                        kind: new
737                        workspace: /workspace/project
738                        name: null
739                        provider_profile: null
740                        model: null
741                        effort: null
742                      resolved:
743                        workspace: /workspace/project
744                        provider_profile: personal
745                        model: example-model
746                        effort: null
747                    revision: config-1
748                    family_revision: family-1
749                    configuration_resource:
750                      url: /sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration
751                      etag: '"session-config-1"'
752                      value:
753                        id: 01a0fcea-2b00-7000-8000-000000000001
754                        name: New session
755                        workspace: /workspace/project
756                        provider_profile: personal
757                        model: example-model
758                        effort: null
759                        preferences:
760                          pinned: false
761                          pin_order: null
762                          archived: false
763                        selection:
764                          extensions: {}
765                          skills: {}
766                          instructions: {}
767                          mcp: {}
768                        revision: config-1
769                        family_revision: family-1
770                    workspace_change: null
771                    selection:
772                      overrides:
773                        extensions: {}
774                        skills: {}
775                        instructions: {}
776                        mcp: {}
777                      effective:
778                        extensions: {}
779                        skills: {}
780                        instructions: {}
781                        mcp: {}
782                    composition:
783                      desired_revision: composition-1
784                      loaded_revision: null
785                      needs_reload: true
786                      dependencies: {}
787                      quarantine: []
788                      availability: {}
789                    kernel:
790                      instance_id: null
791                      state: none
792                      stage: null
793                      build: null
794                      stale: false
795                      staleness_reasons: []
796                      live_job_count: 0
797                      running_jobs: []
798                    pending_inputs: []
799                    input_order: 0
800                    usage:
801                      model: null
802                      observed_at: null
803                      prompt_tokens: null
804                      cached_prompt_tokens: null
805                      cache_write_tokens: null
806                      completion_tokens: null
807                      total_tokens: null
808                      elapsed_ms: null
809                      tokens_per_second: null
810                      context_window_tokens: null
811                      cache_ttl_seconds: null
812                      cache_fade: []
813                    history:
814                      items: []
815                      older: null
816                      newer: null
817                      high_water: 0
818                    glances: []
819        '400':
820          $ref: '#/components/responses/Problem400'
821        '401':
822          $ref: '#/components/responses/Problem401'
823        '403':
824          $ref: '#/components/responses/Problem403'
825        '405':
826          $ref: '#/components/responses/Problem405'
827        '406':
828          $ref: '#/components/responses/Problem406'
829        '503':
830          $ref: '#/components/responses/Problem503'
831        '413':
832          $ref: '#/components/responses/Problem413'
833        '415':
834          $ref: '#/components/responses/Problem415'
835        '409':
836          $ref: '#/components/responses/Problem409'
837        '410':
838          $ref: '#/components/responses/Problem410'
839        '412':
840          $ref: '#/components/responses/Problem412'
841        '428':
842          $ref: '#/components/responses/Problem428'
843        '429':
844          $ref: '#/components/responses/Problem429'
845      description: Session ID must be UUIDv7. If-None-Match:* is required. Retain the identity and submitted
846        intent after response loss. An existing resource returns 412; GET creation.submitted proves original
847        intent. Child membership and task admission commit together.
848      parameters:
849      - name: session_id
850        in: path
851        required: true
852        schema:
853          $ref: '#/components/schemas/UUIDv7'
854      - $ref: '#/components/parameters/IfNoneMatch'
855      requestBody:
856        required: true
857        content:
858          application/json:
859            schema:
860              $ref: '#/components/schemas/SessionCreationRequest'
861            examples:
862              NewSessionRequest:
863                value:
864                  kind: new
865                  workspace: /workspace/project
866        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
867    patch:
868      operationId: patchSession
869      summary: Edit configuration or move workspace
870      tags:
871      - sessions
872      responses:
873        '200':
874          description: Successful result.
875          content:
876            application/json:
877              schema:
878                $ref: '#/components/schemas/SessionChange'
879        '400':
880          $ref: '#/components/responses/Problem400'
881        '401':
882          $ref: '#/components/responses/Problem401'
883        '403':
884          $ref: '#/components/responses/Problem403'
885        '405':
886          $ref: '#/components/responses/Problem405'
887        '406':
888          $ref: '#/components/responses/Problem406'
889        '503':
890          $ref: '#/components/responses/Problem503'
891        '413':
892          $ref: '#/components/responses/Problem413'
893        '415':
894          $ref: '#/components/responses/Problem415'
895        '404':
896          $ref: '#/components/responses/Problem404'
897        '409':
898          $ref: '#/components/responses/Problem409'
899        '412':
900          $ref: '#/components/responses/Problem412'
901        '428':
902          $ref: '#/components/responses/Problem428'
903      description: Use the observed configuration URL and validator. Workspace is a standalone change
904        with family_revision. Busy target fails before commit; busy descendants follow a committed parent
905        move at idle. Other configuration fields commit together. No automatic lost-response retry.
906      parameters:
907      - name: session_id
908        in: path
909        required: true
910        schema:
911          $ref: '#/components/schemas/ID'
912      - name: view
913        in: query
914        required: true
915        schema:
916          const: configuration
917      - $ref: '#/components/parameters/IfMatch'
918      requestBody:
919        required: true
920        content:
921          application/merge-patch+json:
922            schema:
923              $ref: '#/components/schemas/SessionChangeRequest'
924            examples:
925              SessionPatch:
926                value:
927                  selection:
928                    extensions:
929                      browser: null
930                    skills:
931                      candidate-1: false
932                  catalog_revision: discovery-1
933        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
934    delete:
935      operationId: deleteSession
936      summary: Delete a leaf or captured subtree
937      tags:
938      - sessions
939      responses:
940        '200':
941          description: Successful result.
942          content:
943            application/json:
944              schema:
945                $ref: '#/components/schemas/SessionDeletion'
946        '400':
947          $ref: '#/components/responses/Problem400'
948        '401':
949          $ref: '#/components/responses/Problem401'
950        '403':
951          $ref: '#/components/responses/Problem403'
952        '405':
953          $ref: '#/components/responses/Problem405'
954        '406':
955          $ref: '#/components/responses/Problem406'
956        '503':
957          $ref: '#/components/responses/Problem503'
958        '413':
959          $ref: '#/components/responses/Problem413'
960        '415':
961          $ref: '#/components/responses/Problem415'
962        '404':
963          $ref: '#/components/responses/Problem404'
964        '409':
965          $ref: '#/components/responses/Problem409'
966        '412':
967          $ref: '#/components/responses/Problem412'
968        '428':
969          $ref: '#/components/responses/Problem428'
970      description: Leaf requires idle and no children. Subtree requires family_revision, gates new children,
971        interrupts captured members and deletes deepest first. Partial outcomes are explicit. Refresh
972        before confirming a new attempt; never automatically replay after transport loss.
973      parameters:
974      - name: session_id
975        in: path
976        required: true
977        schema:
978          $ref: '#/components/schemas/ID'
979      - name: view
980        in: query
981        required: true
982        schema:
983          const: configuration
984      - $ref: '#/components/parameters/IfMatch'
985      - name: scope
986        in: query
987        required: false
988        schema:
989          type: string
990          enum: [leaf, subtree]
991          default: leaf
992      - name: family_revision
993        in: query
994        required: false
995        schema:
996          $ref: '#/components/schemas/ID'
997  /sessions/{session_id}/visits/{visit_id}:
998    put:
999      operationId: recordVisit
1000      summary: Count one deliberate opening
1001      tags:
1002      - sessions
1003      responses:
1004        '200':
1005          description: Successful result.
1006          content:
1007            application/json:
1008              schema:
1009                $ref: '#/components/schemas/Visit'
1010        '400':
1011          $ref: '#/components/responses/Problem400'
1012        '401':
1013          $ref: '#/components/responses/Problem401'
1014        '403':
1015          $ref: '#/components/responses/Problem403'
1016        '405':
1017          $ref: '#/components/responses/Problem405'
1018        '406':
1019          $ref: '#/components/responses/Problem406'
1020        '503':
1021          $ref: '#/components/responses/Problem503'
1022        '413':
1023          $ref: '#/components/responses/Problem413'
1024        '415':
1025          $ref: '#/components/responses/Problem415'
1026        '404':
1027          $ref: '#/components/responses/Problem404'
1028        '410':
1029          $ref: '#/components/responses/Problem410'
1030      description: Visit ID is UUIDv7. Same identity increments once; reads and refreshes never count.
1031      parameters:
1032      - name: visit_id
1033        in: path
1034        required: true
1035        schema:
1036          $ref: '#/components/schemas/UUIDv7'
1037      - name: session_id
1038        in: path
1039        required: true
1040        schema:
1041          $ref: '#/components/schemas/ID'
1042      requestBody:
1043        required: true
1044        content:
1045          application/json:
1046            schema:
1047              $ref: '#/components/schemas/EmptyRequest'
1048        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
1049  /sessions/{session_id}/inputs/{input_id}:
1050    put:
1051      operationId: putInput
1052      summary: Admit immutable identified input
1053      tags:
1054      - sessions
1055      responses:
1056        '202':
1057          description: Successful result.
1058          content:
1059            application/json:
1060              schema:
1061                $ref: '#/components/schemas/Input'
1062              examples:
1063                Input:
1064                  value:
1065                    id: 01a0fcea-2b00-7000-8000-000000000002
1066                    session_id: 01a0fcea-2b00-7000-8000-000000000001
1067                    kind: message
1068                    admission: accepted
1069                    http_status: 202
1070                    problem: null
1071                    accepted_at: '2026-10-02T14:00:00Z'
1072                    acceptance_order: 1
1073                    delivery: pending
1074                    blocking_reason: null
1075                    transcript_position: null
1076                    turn: null
1077                    client_id: draft-1
1078        '400':
1079          $ref: '#/components/responses/Problem400'
1080        '401':
1081          $ref: '#/components/responses/Problem401'
1082        '403':
1083          $ref: '#/components/responses/Problem403'
1084        '405':
1085          $ref: '#/components/responses/Problem405'
1086        '406':
1087          $ref: '#/components/responses/Problem406'
1088        '503':
1089          $ref: '#/components/responses/Problem503'
1090        '413':
1091          $ref: '#/components/responses/Problem413'
1092        '415':
1093          $ref: '#/components/responses/Problem415'
1094        '404':
1095          $ref: '#/components/responses/Problem404'
1096        '409':
1097          $ref: '#/components/responses/Problem409'
1098        '410':
1099          $ref: '#/components/responses/Problem410'
1100        '429':
1101          description: Retained rejection, even if capacity later clears.
1102          content:
1103            application/problem+json:
1104              schema:
1105                $ref: '#/components/schemas/Problem'
1106              examples:
1107                queue_full:
1108                  value:
1109                    type: about:blank
1110                    title: Queue full
1111                    status: 429
1112                    detail: This session already has 32 waiting inputs.
1113                    code: queue_full
1114                    decision:
1115                      kind: input
1116                      input:
1117                        id: 01a0fcea-2b00-7000-8000-000000000002
1118                        session_id: 01a0fcea-2b00-7000-8000-000000000001
1119                        kind: message
1120                        admission: rejected
1121                        http_status: 429
1122                        problem:
1123                          type: about:blank
1124                          title: Queue full
1125                          status: 429
1126                          detail: This session already has 32 waiting inputs.
1127                          code: queue_full
1128                        accepted_at: null
1129                        acceptance_order: null
1130                        delivery: null
1131                        blocking_reason: null
1132                        transcript_position: null
1133                        turn: null
1134                        client_id: draft-1
1135          headers:
1136            Retry-After:
1137              $ref: '#/components/headers/RetryAfter'
1138      description: Input ID is UUIDv7. Duplicate lookup precedes mutable validation and returns the original
1139        admission status with current delivery. Queue-full rejection remains rejected. No If-None-Match.
1140        Preserve the exact intent and identity while recovering an uncertain response.
1141      parameters:
1142      - name: input_id
1143        in: path
1144        required: true
1145        schema:
1146          $ref: '#/components/schemas/UUIDv7'
1147      - name: session_id
1148        in: path
1149        required: true
1150        schema:
1151          $ref: '#/components/schemas/ID'
1152      requestBody:
1153        required: true
1154        content:
1155          application/json:
1156            schema:
1157              $ref: '#/components/schemas/InputRequest'
1158            examples:
1159              MessageInputRequest:
1160                value:
1161                  kind: message
1162                  text: Fix the parser.
1163                  client_id: draft-1
1164        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
1165    get:
1166      operationId: getInput
1167      summary: Read a durable input outcome
1168      tags:
1169      - sessions
1170      responses:
1171        '200':
1172          description: Successful result.
1173          content:
1174            application/json:
1175              schema:
1176                $ref: '#/components/schemas/Input'
1177        '400':
1178          $ref: '#/components/responses/Problem400'
1179        '401':
1180          $ref: '#/components/responses/Problem401'
1181        '403':
1182          $ref: '#/components/responses/Problem403'
1183        '405':
1184          $ref: '#/components/responses/Problem405'
1185        '406':
1186          $ref: '#/components/responses/Problem406'
1187        '503':
1188          $ref: '#/components/responses/Problem503'
1189        '404':
1190          $ref: '#/components/responses/Problem404'
1191        '410':
1192          $ref: '#/components/responses/Problem410'
1193      description: Available after session deletion. Accepted is not consumed or answered. Retain pending
1194        and unfinished-turn identities; terminal decisions last seven days. Unknown old UUIDv7 returns
1195        410, never a fresh admission.
1196      parameters:
1197      - name: input_id
1198        in: path
1199        required: true
1200        schema:
1201          $ref: '#/components/schemas/ID'
1202      - name: session_id
1203        in: path
1204        required: true
1205        schema:
1206          $ref: '#/components/schemas/ID'
1207  /sessions/{session_id}/inputs/{input_id}/cancel:
1208    post:
1209      operationId: cancelInput
1210      summary: Cancel or interrupt only this input
1211      tags:
1212      - sessions
1213      responses:
1214        '200':
1215          description: Successful result.
1216          content:
1217            application/json:
1218              schema:
1219                $ref: '#/components/schemas/InputCancellation'
1220        '400':
1221          $ref: '#/components/responses/Problem400'
1222        '401':
1223          $ref: '#/components/responses/Problem401'
1224        '403':
1225          $ref: '#/components/responses/Problem403'
1226        '405':
1227          $ref: '#/components/responses/Problem405'
1228        '406':
1229          $ref: '#/components/responses/Problem406'
1230        '503':
1231          $ref: '#/components/responses/Problem503'
1232        '413':
1233          $ref: '#/components/responses/Problem413'
1234        '415':
1235          $ref: '#/components/responses/Problem415'
1236        '404':
1237          $ref: '#/components/responses/Problem404'
1238        '410':
1239          $ref: '#/components/responses/Problem410'
1240      description: Never interrupts a later unrelated turn. shared_running leaves a shared turn running;
1241        retry only inspects or acts on this same input.
1242      parameters:
1243      - name: input_id
1244        in: path
1245        required: true
1246        schema:
1247          $ref: '#/components/schemas/ID'
1248      - name: session_id
1249        in: path
1250        required: true
1251        schema:
1252          $ref: '#/components/schemas/ID'
1253      requestBody:
1254        required: true
1255        content:
1256          application/json:
1257            schema:
1258              $ref: '#/components/schemas/EmptyRequest'
1259        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
1260  /sessions/{session_id}/interrupt:
1261    post:
1262      operationId: interruptSession
1263      summary: Interrupt a captured run and waiting prefix
1264      tags:
1265      - sessions
1266      responses:
1267        '200':
1268          description: Successful result.
1269          content:
1270            application/json:
1271              schema:
1272                $ref: '#/components/schemas/Interruption'
1273        '400':
1274          $ref: '#/components/responses/Problem400'
1275        '401':
1276          $ref: '#/components/responses/Problem401'
1277        '403':
1278          $ref: '#/components/responses/Problem403'
1279        '405':
1280          $ref: '#/components/responses/Problem405'
1281        '406':
1282          $ref: '#/components/responses/Problem406'
1283        '503':
1284          $ref: '#/components/responses/Problem503'
1285        '413':
1286          $ref: '#/components/responses/Problem413'
1287        '415':
1288          $ref: '#/components/responses/Problem415'
1289        '404':
1290          $ref: '#/components/responses/Problem404'
1291      description: Capture run_id and through_input_order from the installed session. Retry cannot interrupt
1292        a later run or cancel newer inputs.
1293      parameters:
1294      - name: session_id
1295        in: path
1296        required: true
1297        schema:
1298          $ref: '#/components/schemas/ID'
1299      requestBody:
1300        required: true
1301        content:
1302          application/json:
1303            schema:
1304              $ref: '#/components/schemas/InterruptRequest'
1305        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
1306  /sessions/{session_id}/active-output/{content_id}:
1307    get:
1308      operationId: getActiveOutputContent
1309      summary: Read unfinished output at a captured snapshot cutoff
1310      tags:
1311      - sessions
1312      description: Pages contain at most 262144 UTF-8 bytes and remain within the captured cutoff. Preserve the required snapshot query when following next.
1313      parameters:
1314      - name: session_id
1315        in: path
1316        required: true
1317        schema:
1318          $ref: '#/components/schemas/ID'
1319      - name: content_id
1320        in: path
1321        required: true
1322        schema:
1323          $ref: '#/components/schemas/ID'
1324      - name: snapshot
1325        in: query
1326        required: true
1327        schema:
1328          $ref: '#/components/schemas/PageToken'
1329      - name: next
1330        in: query
1331        schema:
1332          $ref: '#/components/schemas/PageToken'
1333      responses:
1334        '200':
1335          description: Bounded UTF-8 content page at the signed snapshot cutoff
1336          content:
1337            application/json:
1338              schema:
1339                $ref: '#/components/schemas/EntryContentPage'
1340        '400':
1341          $ref: '#/components/responses/Problem400'
1342        '403':
1343          $ref: '#/components/responses/Problem403'
1344        '410':
1345          $ref: '#/components/responses/Problem410'
1346        '503':
1347          $ref: '#/components/responses/Problem503'
1348  /sessions/{session_id}/history:
1349    get:
1350      operationId: getHistory
1351      summary: Page history or fork checkpoints
1352      tags:
1353      - sessions
1354      responses:
1355        '200':
1356          description: Successful result.
1357          content:
1358            application/json:
1359              schema:
1360                $ref: '#/components/schemas/HistoryRead'
1361        '400':
1362          $ref: '#/components/responses/Problem400'
1363        '401':
1364          $ref: '#/components/responses/Problem401'
1365        '403':
1366          $ref: '#/components/responses/Problem403'
1367        '405':
1368          $ref: '#/components/responses/Problem405'
1369        '406':
1370          $ref: '#/components/responses/Problem406'
1371        '503':
1372          $ref: '#/components/responses/Problem503'
1373        '404':
1374          $ref: '#/components/responses/Problem404'
1375      description: Use only one of before/after/next. Durable positions are independent of actor replay.
1376        Pages are ascending and preserve complete display groups where bounded.
1377      parameters:
1378      - name: session_id
1379        in: path
1380        required: true
1381        schema:
1382          $ref: '#/components/schemas/ID'
1383      - name: view
1384        in: query
1385        required: false
1386        schema:
1387          type: string
1388          enum: [entries, checkpoints]
1389          default: entries
1390      - name: before
1391        in: query
1392        required: false
1393        schema:
1394          $ref: '#/components/schemas/Counter'
1395      - name: after
1396        in: query
1397        required: false
1398        schema:
1399          $ref: '#/components/schemas/Counter'
1400      - $ref: '#/components/parameters/Next'
1401      - name: limit
1402        in: query
1403        required: false
1404        schema:
1405          type: integer
1406          minimum: 1
1407          maximum: 200
1408          default: 100
1409  /sessions/{session_id}/history/{entry_id}:
1410    get:
1411      operationId: getHistoryContent
1412      summary: Read full content in bounded pieces
1413      tags:
1414      - sessions
1415      responses:
1416        '200':
1417          description: Successful result.
1418          content:
1419            application/json:
1420              schema:
1421                $ref: '#/components/schemas/EntryContentPage'
1422        '400':
1423          $ref: '#/components/responses/Problem400'
1424        '401':
1425          $ref: '#/components/responses/Problem401'
1426        '403':
1427          $ref: '#/components/responses/Problem403'
1428        '405':
1429          $ref: '#/components/responses/Problem405'
1430        '406':
1431          $ref: '#/components/responses/Problem406'
1432        '503':
1433          $ref: '#/components/responses/Problem503'
1434        '404':
1435          $ref: '#/components/responses/Problem404'
1436      description: Follow next until null. UTF-8 pieces end at character boundaries. Reconstruct stored
1437        content, not shortened previews. Image fields are not paged here; their references name the
1438        image resource.
1439      parameters:
1440      - name: entry_id
1441        in: path
1442        required: true
1443        schema:
1444          $ref: '#/components/schemas/ID'
1445      - name: session_id
1446        in: path
1447        required: true
1448        schema:
1449          $ref: '#/components/schemas/ID'
1450      - $ref: '#/components/parameters/Next'
1451  /sessions/{session_id}/history/{entry_id}/{field}:
1452    get:
1453      operationId: getHistoryImage
1454      summary: Read one image field as its own bytes
1455      tags:
1456      - sessions
1457      responses:
1458        '200':
1459          description: The decoded image, typed by its MIME type.
1460          content:
1461            image/png:
1462              schema:
1463                type: string
1464                contentMediaType: image/png
1465            image/jpeg:
1466              schema:
1467                type: string
1468                contentMediaType: image/jpeg
1469            image/webp:
1470              schema:
1471                type: string
1472                contentMediaType: image/webp
1473        '400':
1474          $ref: '#/components/responses/Problem400'
1475        '401':
1476          $ref: '#/components/responses/Problem401'
1477        '403':
1478          $ref: '#/components/responses/Problem403'
1479        '405':
1480          $ref: '#/components/responses/Problem405'
1481        '503':
1482          $ref: '#/components/responses/Problem503'
1483        '404':
1484          $ref: '#/components/responses/Problem404'
1485      description: Image references in history point here. The body is the stored image itself,
1486        not base64, and is never content-coded.
1487      parameters:
1488      - name: session_id
1489        in: path
1490        required: true
1491        schema:
1492          $ref: '#/components/schemas/ID'
1493      - name: entry_id
1494        in: path
1495        required: true
1496        schema:
1497          $ref: '#/components/schemas/ID'
1498      - name: field
1499        in: path
1500        required: true
1501        schema:
1502          type: string
1503          minLength: 1
1504          maxLength: 256
1505  /sessions/{session_id}/context:
1506    get:
1507      operationId: getContext
1508      summary: Inspect prepared context or request records
1509      tags:
1510      - sessions
1511      responses:
1512        '200':
1513          description: Successful result.
1514          content:
1515            application/json:
1516              schema:
1517                $ref: '#/components/schemas/ContextRead'
1518        '400':
1519          $ref: '#/components/responses/Problem400'
1520        '401':
1521          $ref: '#/components/responses/Problem401'
1522        '403':
1523          $ref: '#/components/responses/Problem403'
1524        '405':
1525          $ref: '#/components/responses/Problem405'
1526        '406':
1527          $ref: '#/components/responses/Problem406'
1528        '503':
1529          $ref: '#/components/responses/Problem503'
1530        '404':
1531          $ref: '#/components/responses/Problem404'
1532        '410':
1533          $ref: '#/components/responses/Problem410'
1534      description: 'Summary never prepares a request. Section requires snapshot_id, section_id, page and
1535        forbids request-pagination fields. Requests accepts after/limit/next. Stale snapshot is 410 context_changed,
1536        never another section. Requires capability `context: 1`.'
1537      parameters:
1538      - name: session_id
1539        in: path
1540        required: true
1541        schema:
1542          $ref: '#/components/schemas/ID'
1543      - name: view
1544        in: query
1545        required: false
1546        schema:
1547          type: string
1548          enum: [summary, section, requests]
1549          default: summary
1550      - name: snapshot_id
1551        in: query
1552        required: false
1553        schema:
1554          $ref: '#/components/schemas/ID'
1555      - name: section_id
1556        in: query
1557        required: false
1558        schema:
1559          $ref: '#/components/schemas/ID'
1560      - name: page
1561        in: query
1562        required: false
1563        schema:
1564          $ref: '#/components/schemas/Counter'
1565      - name: after
1566        in: query
1567        required: false
1568        schema:
1569          $ref: '#/components/schemas/Counter'
1570      - $ref: '#/components/parameters/Limit'
1571      - $ref: '#/components/parameters/Next'
1572  /sessions/{session_id}/catalog:
1573    get:
1574      operationId: getCatalog
1575      summary: Discover candidates, loaded commands and pages
1576      tags:
1577      - sessions
1578      responses:
1579        '200':
1580          description: Successful result.
1581          content:
1582            application/json:
1583              schema:
1584                $ref: '#/components/schemas/Catalog'
1585        '400':
1586          $ref: '#/components/responses/Problem400'
1587        '401':
1588          $ref: '#/components/responses/Problem401'
1589        '403':
1590          $ref: '#/components/responses/Problem403'
1591        '405':
1592          $ref: '#/components/responses/Problem405'
1593        '406':
1594          $ref: '#/components/responses/Problem406'
1595        '503':
1596          $ref: '#/components/responses/Problem503'
1597        '404':
1598          $ref: '#/components/responses/Problem404'
1599      description: 'Discovery and loaded composition are separate. Reads do not reload. Continuation identifies
1600        its section; candidate revision guards discovery-based selection. Requires capability `catalog:
1601        1`.'
1602      parameters:
1603      - name: session_id
1604        in: path
1605        required: true
1606        schema:
1607          $ref: '#/components/schemas/ID'
1608      - name: kind
1609        in: query
1610        required: false
1611        schema:
1612          type: string
1613          enum: [extensions, skills, instructions, mcp, commands]
1614      - $ref: '#/components/parameters/Limit'
1615      - $ref: '#/components/parameters/Next'
1616  /sessions/{session_id}/reload:
1617    post:
1618      operationId: reloadSession
1619      summary: Reload composition, models or both
1620      tags:
1621      - sessions
1622      responses:
1623        '200':
1624          description: Successful result.
1625          content:
1626            application/json:
1627              schema:
1628                $ref: '#/components/schemas/ReloadResult'
1629        '400':
1630          $ref: '#/components/responses/Problem400'
1631        '401':
1632          $ref: '#/components/responses/Problem401'
1633        '403':
1634          $ref: '#/components/responses/Problem403'
1635        '405':
1636          $ref: '#/components/responses/Problem405'
1637        '406':
1638          $ref: '#/components/responses/Problem406'
1639        '503':
1640          $ref: '#/components/responses/Problem503'
1641        '413':
1642          $ref: '#/components/responses/Problem413'
1643        '415':
1644          $ref: '#/components/responses/Problem415'
1645        '404':
1646          $ref: '#/components/responses/Problem404'
1647        '409':
1648          $ref: '#/components/responses/Problem409'
1649      description: Session reload requires idle. Both targets return separate outcomes, preserving confirmed
1650        success when the other fails. Lost-response replay is not automatic.
1651      parameters:
1652      - name: session_id
1653        in: path
1654        required: true
1655        schema:
1656          $ref: '#/components/schemas/ID'
1657      requestBody:
1658        required: true
1659        content:
1660          application/json:
1661            schema:
1662              $ref: '#/components/schemas/ReloadRequest'
1663        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
1664  /sessions/{session_id}/kernel/upgrade:
1665    post:
1666      operationId: upgradeKernel
1667      summary: Explicitly upgrade an idle kernel
1668      tags:
1669      - sessions
1670      responses:
1671        '200':
1672          description: Successful result.
1673          content:
1674            application/json:
1675              schema:
1676                $ref: '#/components/schemas/KernelUpgradeResult'
1677        '400':
1678          $ref: '#/components/responses/Problem400'
1679        '401':
1680          $ref: '#/components/responses/Problem401'
1681        '403':
1682          $ref: '#/components/responses/Problem403'
1683        '405':
1684          $ref: '#/components/responses/Problem405'
1685        '406':
1686          $ref: '#/components/responses/Problem406'
1687        '503':
1688          $ref: '#/components/responses/Problem503'
1689        '413':
1690          $ref: '#/components/responses/Problem413'
1691        '415':
1692          $ref: '#/components/responses/Problem415'
1693        '404':
1694          $ref: '#/components/responses/Problem404'
1695        '409':
1696          $ref: '#/components/responses/Problem409'
1697      description: Stage and validate before swap. Report external jobs stopped during an unsuccessful
1698        upgrade; do not claim them restored. No automatic retry.
1699      parameters:
1700      - name: session_id
1701        in: path
1702        required: true
1703        schema:
1704          $ref: '#/components/schemas/ID'
1705      requestBody:
1706        required: true
1707        content:
1708          application/json:
1709            schema:
1710              $ref: '#/components/schemas/EmptyRequest'
1711        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
1712  /sessions/{session_id}/compaction:
1713    post:
1714      operationId: compactSession
1715      summary: Compact model context while retaining history
1716      tags:
1717      - sessions
1718      responses:
1719        '200':
1720          description: Successful result.
1721          content:
1722            application/json:
1723              schema:
1724                $ref: '#/components/schemas/CompactionResult'
1725        '400':
1726          $ref: '#/components/responses/Problem400'
1727        '401':
1728          $ref: '#/components/responses/Problem401'
1729        '403':
1730          $ref: '#/components/responses/Problem403'
1731        '405':
1732          $ref: '#/components/responses/Problem405'
1733        '406':
1734          $ref: '#/components/responses/Problem406'
1735        '503':
1736          $ref: '#/components/responses/Problem503'
1737        '413':
1738          $ref: '#/components/responses/Problem413'
1739        '415':
1740          $ref: '#/components/responses/Problem415'
1741        '404':
1742          $ref: '#/components/responses/Problem404'
1743        '409':
1744          $ref: '#/components/responses/Problem409'
1745      description: Idle required. Selecting a strategy can succeed even if compaction later fails; report
1746        both. Full durable history stays intact. No automatic retry.
1747      parameters:
1748      - name: session_id
1749        in: path
1750        required: true
1751        schema:
1752          $ref: '#/components/schemas/ID'
1753      requestBody:
1754        required: true
1755        content:
1756          application/json:
1757            schema:
1758              $ref: '#/components/schemas/CompactionRequest'
1759        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
1760  /models:
1761    get:
1762      operationId: listModels
1763      summary: Read provider model metadata
1764      tags:
1765      - models
1766      responses:
1767        '200':
1768          description: Successful result.
1769          content:
1770            application/json:
1771              schema:
1772                $ref: '#/components/schemas/ModelRead'
1773        '400':
1774          $ref: '#/components/responses/Problem400'
1775        '401':
1776          $ref: '#/components/responses/Problem401'
1777        '403':
1778          $ref: '#/components/responses/Problem403'
1779        '405':
1780          $ref: '#/components/responses/Problem405'
1781        '406':
1782          $ref: '#/components/responses/Problem406'
1783        '503':
1784          $ref: '#/components/responses/Problem503'
1785      description: In catalogue view, exactly one of provider_profile/provider is required. Endpoint is allowed only with
1786        provider. Unknown facts are null. A manual unlisted ID remains usable. Optional model returns
1787        one metadata row, including cap_key, for an unlisted manual ID; unknown facts stay null.
1788      parameters:
1789      - name: view
1790        in: query
1791        required: false
1792        schema:
1793          type: string
1794          enum: [catalogue, cache-policy]
1795          default: catalogue
1796      - name: extension
1797        in: query
1798        required: false
1799        description: Cache-policy matching only; defaults to the empty selector.
1800        schema:
1801          type: string
1802          maxLength: 256
1803      - name: host
1804        in: query
1805        required: false
1806        description: Cache-policy matching only; defaults to the empty selector.
1807        schema:
1808          type: string
1809          maxLength: 4096
1810      - name: model
1811        in: query
1812        required: false
1813        schema:
1814          $ref: '#/components/schemas/ID'
1815      - name: provider_profile
1816        in: query
1817        required: false
1818        schema:
1819          $ref: '#/components/schemas/ID'
1820      - name: provider
1821        in: query
1822        required: false
1823        schema:
1824          $ref: '#/components/schemas/ID'
1825      - name: endpoint
1826        in: query
1827        required: false
1828        schema:
1829          type: string
1830          format: uri
1831          maxLength: 4096
1832      - $ref: '#/components/parameters/Limit'
1833      - $ref: '#/components/parameters/Next'
1834  /workspaces:
1835    get:
1836      operationId: getWorkspaces
1837      summary: Browse recent locations or a directory
1838      tags:
1839      - workspaces
1840      responses:
1841        '200':
1842          description: Successful result.
1843          content:
1844            application/json:
1845              schema:
1846                $ref: '#/components/schemas/WorkspaceRead'
1847        '400':
1848          $ref: '#/components/responses/Problem400'
1849        '401':
1850          $ref: '#/components/responses/Problem401'
1851        '403':
1852          $ref: '#/components/responses/Problem403'
1853        '405':
1854          $ref: '#/components/responses/Problem405'
1855        '406':
1856          $ref: '#/components/responses/Problem406'
1857        '503':
1858          $ref: '#/components/responses/Problem503'
1859        '404':
1860          $ref: '#/components/responses/Problem404'
1861        '409':
1862          $ref: '#/components/responses/Problem409'
1863      description: 'Without location return recent workspaces. include=preview requires location. Paths
1864        resolve on the daemon host; cached host state does not perform SSH sign-in. Requires capability
1865        `workspace_browsing: 1`.'
1866      parameters:
1867      - name: location
1868        in: query
1869        required: false
1870        schema:
1871          $ref: '#/components/schemas/Workspace'
1872      - name: include
1873        in: query
1874        required: false
1875        schema:
1876          type: string
1877          enum: [preview]
1878      - $ref: '#/components/parameters/Limit'
1879      - $ref: '#/components/parameters/Next'
1880  /hosts:
1881    get:
1882      operationId: listHosts
1883      summary: Read known SSH hosts and cached state
1884      tags:
1885      - hosts
1886      responses:
1887        '200':
1888          description: Successful result.
1889          content:
1890            application/json:
1891              schema:
1892                $ref: '#/components/schemas/HostPage'
1893        '400':
1894          $ref: '#/components/responses/Problem400'
1895        '401':
1896          $ref: '#/components/responses/Problem401'
1897        '403':
1898          $ref: '#/components/responses/Problem403'
1899        '405':
1900          $ref: '#/components/responses/Problem405'
1901        '406':
1902          $ref: '#/components/responses/Problem406'
1903        '503':
1904          $ref: '#/components/responses/Problem503'
1905      parameters:
1906      - name: target
1907        in: query
1908        required: false
1909        schema:
1910          $ref: '#/components/schemas/ID'
1911      - $ref: '#/components/parameters/Limit'
1912      - $ref: '#/components/parameters/Next'
1913      description: 'Requires capability `host_probes: 1`.'
1914  /hosts/{host}/probe:
1915    post:
1916      operationId: probeHost
1917      summary: Start or join a host probe
1918      tags:
1919      - hosts
1920      responses:
1921        '202':
1922          description: Successful result.
1923          content:
1924            application/json:
1925              schema:
1926                $ref: '#/components/schemas/Host'
1927        '400':
1928          $ref: '#/components/responses/Problem400'
1929        '401':
1930          $ref: '#/components/responses/Problem401'
1931        '403':
1932          $ref: '#/components/responses/Problem403'
1933        '405':
1934          $ref: '#/components/responses/Problem405'
1935        '406':
1936          $ref: '#/components/responses/Problem406'
1937        '503':
1938          $ref: '#/components/responses/Problem503'
1939        '413':
1940          $ref: '#/components/responses/Problem413'
1941        '415':
1942          $ref: '#/components/responses/Problem415'
1943      description: 'Coalesce repeated probes. Authentication remains an explicit operator handoff; no
1944        background SSH sign-in. Requires capability `host_probes: 1`.'
1945      parameters:
1946      - name: host
1947        in: path
1948        required: true
1949        schema:
1950          $ref: '#/components/schemas/ID'
1951      requestBody:
1952        required: true
1953        content:
1954          application/json:
1955            schema:
1956              $ref: '#/components/schemas/EmptyRequest'
1957        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
1958  /auth:
1959    get:
1960      operationId: getAuth
1961      summary: Read login choices and redacted accounts
1962      tags:
1963      - auth
1964      responses:
1965        '200':
1966          description: Successful result.
1967          content:
1968            application/json:
1969              schema:
1970                $ref: '#/components/schemas/Auth'
1971        '400':
1972          $ref: '#/components/responses/Problem400'
1973        '401':
1974          $ref: '#/components/responses/Problem401'
1975        '403':
1976          $ref: '#/components/responses/Problem403'
1977        '405':
1978          $ref: '#/components/responses/Problem405'
1979        '406':
1980          $ref: '#/components/responses/Problem406'
1981        '503':
1982          $ref: '#/components/responses/Problem503'
1983      description: 'Requires capability `provider_auth: 1`.'
1984  /auth/logins/{login_id}:
1985    put:
1986      operationId: createLogin
1987      summary: Start or recover an identified provider login
1988      tags:
1989      - auth
1990      responses:
1991        '201':
1992          description: Successful result.
1993          headers:
1994            Location:
1995              $ref: '#/components/headers/Location'
1996            ETag:
1997              $ref: '#/components/headers/ETag'
1998          content:
1999            application/json:
2000              schema:
2001                $ref: '#/components/schemas/Login'
2002              examples:
2003                Login:
2004                  value:
2005                    id: 01a0fcea-2b00-7000-8000-000000000003
2006                    provider: example-provider
2007                    url: https://provider.example/authorize?state=synthetic-state
2008                    expires_at: '2026-10-02T14:15:00Z'
2009                    state: waiting
2010                    instructions: Paste the callback URL if the browser cannot reach the daemon.
2011                    progress: Waiting for authorization.
2012                    accounts: []
2013                    failure: null
2014        '400':
2015          $ref: '#/components/responses/Problem400'
2016        '401':
2017          $ref: '#/components/responses/Problem401'
2018        '403':
2019          $ref: '#/components/responses/Problem403'
2020        '405':
2021          $ref: '#/components/responses/Problem405'
2022        '406':
2023          $ref: '#/components/responses/Problem406'
2024        '503':
2025          $ref: '#/components/responses/Problem503'
2026        '413':
2027          $ref: '#/components/responses/Problem413'
2028        '415':
2029          $ref: '#/components/responses/Problem415'
2030        '409':
2031          $ref: '#/components/responses/Problem409'
2032        '410':
2033          $ref: '#/components/responses/Problem410'
2034        '429':
2035          $ref: '#/components/responses/Problem429'
2036        '200':
2037          description: Existing identified flow.
2038          headers:
2039            ETag:
2040              $ref: '#/components/headers/ETag'
2041          content:
2042            application/json:
2043              schema:
2044                $ref: '#/components/schemas/Login'
2045      description: 'UUIDv7 identity. Compare immutable private intent inside the daemon. Duplicate returns
2046        existing flow, never another browser/exchange. Restart turns unfinished flows into retained daemon_restarted
2047        failures; a new flow needs a new ID. Requires capability `provider_auth: 1`.'
2048      parameters:
2049      - name: login_id
2050        in: path
2051        required: true
2052        schema:
2053          $ref: '#/components/schemas/UUIDv7'
2054      requestBody:
2055        required: true
2056        content:
2057          application/json:
2058            schema:
2059              $ref: '#/components/schemas/LoginRequest'
2060        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2061    get:
2062      operationId: getLogin
2063      summary: Inspect a provider login
2064      tags:
2065      - auth
2066      responses:
2067        '200':
2068          description: Successful result.
2069          headers:
2070            ETag:
2071              $ref: '#/components/headers/ETag'
2072          content:
2073            application/json:
2074              schema:
2075                $ref: '#/components/schemas/Login'
2076        '400':
2077          $ref: '#/components/responses/Problem400'
2078        '401':
2079          $ref: '#/components/responses/Problem401'
2080        '403':
2081          $ref: '#/components/responses/Problem403'
2082        '405':
2083          $ref: '#/components/responses/Problem405'
2084        '406':
2085          $ref: '#/components/responses/Problem406'
2086        '503':
2087          $ref: '#/components/responses/Problem503'
2088        '404':
2089          $ref: '#/components/responses/Problem404'
2090        '410':
2091          $ref: '#/components/responses/Problem410'
2092      description: 'No credential or submitted form echo. Terminal records remain fifteen minutes; unfinished
2093        flows expire at their provider deadline. Requires capability `provider_auth: 1`.'
2094      parameters:
2095      - name: login_id
2096        in: path
2097        required: true
2098        schema:
2099          $ref: '#/components/schemas/ID'
2100    patch:
2101      operationId: answerLogin
2102      summary: Supply manual callback or code
2103      tags:
2104      - auth
2105      responses:
2106        '200':
2107          description: Successful result.
2108          headers:
2109            ETag:
2110              $ref: '#/components/headers/ETag'
2111          content:
2112            application/json:
2113              schema:
2114                $ref: '#/components/schemas/Login'
2115        '400':
2116          $ref: '#/components/responses/Problem400'
2117        '401':
2118          $ref: '#/components/responses/Problem401'
2119        '403':
2120          $ref: '#/components/responses/Problem403'
2121        '405':
2122          $ref: '#/components/responses/Problem405'
2123        '406':
2124          $ref: '#/components/responses/Problem406'
2125        '503':
2126          $ref: '#/components/responses/Problem503'
2127        '413':
2128          $ref: '#/components/responses/Problem413'
2129        '415':
2130          $ref: '#/components/responses/Problem415'
2131        '404':
2132          $ref: '#/components/responses/Problem404'
2133        '409':
2134          $ref: '#/components/responses/Problem409'
2135        '410':
2136          $ref: '#/components/responses/Problem410'
2137        '412':
2138          $ref: '#/components/responses/Problem412'
2139        '428':
2140          $ref: '#/components/responses/Problem428'
2141      parameters:
2142      - name: login_id
2143        in: path
2144        required: true
2145        schema:
2146          $ref: '#/components/schemas/ID'
2147      - $ref: '#/components/parameters/IfMatch'
2148      requestBody:
2149        required: true
2150        content:
2151          application/merge-patch+json:
2152            schema:
2153              $ref: '#/components/schemas/LoginPatch'
2154        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2155      description: 'Requires capability `provider_auth: 1`.'
2156    delete:
2157      operationId: cancelLogin
2158      summary: Cancel a login idempotently
2159      tags:
2160      - auth
2161      responses:
2162        '204':
2163          description: Successful result.
2164        '400':
2165          $ref: '#/components/responses/Problem400'
2166        '401':
2167          $ref: '#/components/responses/Problem401'
2168        '403':
2169          $ref: '#/components/responses/Problem403'
2170        '405':
2171          $ref: '#/components/responses/Problem405'
2172        '406':
2173          $ref: '#/components/responses/Problem406'
2174        '503':
2175          $ref: '#/components/responses/Problem503'
2176        '413':
2177          $ref: '#/components/responses/Problem413'
2178        '415':
2179          $ref: '#/components/responses/Problem415'
2180        '404':
2181          $ref: '#/components/responses/Problem404'
2182        '410':
2183          $ref: '#/components/responses/Problem410'
2184      description: 'Cancellation stops only this flow; completed accounts remain saved. No If-Match is
2185        needed for identity-scoped cancellation. Requires capability `provider_auth: 1`.'
2186      parameters:
2187      - name: login_id
2188        in: path
2189        required: true
2190        schema:
2191          $ref: '#/components/schemas/ID'
2192  /auth/accounts/{account_id}:
2193    delete:
2194      operationId: deleteAccount
2195      summary: Remove an unreferenced provider account
2196      tags:
2197      - auth
2198      responses:
2199        '204':
2200          description: Successful result.
2201        '400':
2202          $ref: '#/components/responses/Problem400'
2203        '401':
2204          $ref: '#/components/responses/Problem401'
2205        '403':
2206          $ref: '#/components/responses/Problem403'
2207        '405':
2208          $ref: '#/components/responses/Problem405'
2209        '406':
2210          $ref: '#/components/responses/Problem406'
2211        '503':
2212          $ref: '#/components/responses/Problem503'
2213        '413':
2214          $ref: '#/components/responses/Problem413'
2215        '415':
2216          $ref: '#/components/responses/Problem415'
2217        '404':
2218          $ref: '#/components/responses/Problem404'
2219        '409':
2220          $ref: '#/components/responses/Problem409'
2221      description: 'Reject if a saved provider profile references it. Does not interrupt captured credentials
2222        in an active request. Account IDs are never reused. Requires capability `provider_auth: 1`.'
2223      parameters:
2224      - name: account_id
2225        in: path
2226        required: true
2227        schema:
2228          $ref: '#/components/schemas/ID'
2229  /extensions/work/items:
2230    get:
2231      operationId: listWork
2232      summary: List work resources
2233      tags:
2234      - work
2235      responses:
2236        '200':
2237          description: Successful result.
2238          content:
2239            application/json:
2240              schema:
2241                $ref: '#/components/schemas/WorkPage'
2242        '400':
2243          $ref: '#/components/responses/Problem400'
2244        '401':
2245          $ref: '#/components/responses/Problem401'
2246        '403':
2247          $ref: '#/components/responses/Problem403'
2248        '405':
2249          $ref: '#/components/responses/Problem405'
2250        '406':
2251          $ref: '#/components/responses/Problem406'
2252        '503':
2253          $ref: '#/components/responses/Problem503'
2254      description: Requires enabled extension work. Lists may include bounded page descriptors and glances.
2255      parameters:
2256      - name: workspace
2257        in: query
2258        required: true
2259        schema:
2260          $ref: '#/components/schemas/Workspace'
2261      - $ref: '#/components/parameters/Limit'
2262      - $ref: '#/components/parameters/Next'
2263    post:
2264      operationId: createWork
2265      summary: Create a work resource
2266      tags:
2267      - work
2268      responses:
2269        '201':
2270          description: Successful result.
2271          headers:
2272            Location:
2273              $ref: '#/components/headers/Location'
2274          content:
2275            application/json:
2276              schema:
2277                $ref: '#/components/schemas/WorkChange'
2278              examples:
2279                WorkChange:
2280                  value:
2281                    resource:
2282                      url: /extensions/work/items/work-1?workspace=%2Fworkspace%2Fproject
2283                      etag: '"work-revision-1"'
2284                      value:
2285                        id: work-1
2286                        workspace: /workspace/project
2287                        title: Fix the parser
2288                        notes: ''
2289                        parent_id: null
2290                        session_id: null
2291                        run_id: null
2292                        status: open
2293                        revision: work-revision-1
2294                        created_at: '2026-10-02T14:00:00Z'
2295                        updated_at: '2026-10-02T14:00:00Z'
2296                    notification:
2297                      state: not_requested
2298                      code: null
2299                      detail: null
2300        '400':
2301          $ref: '#/components/responses/Problem400'
2302        '401':
2303          $ref: '#/components/responses/Problem401'
2304        '403':
2305          $ref: '#/components/responses/Problem403'
2306        '405':
2307          $ref: '#/components/responses/Problem405'
2308        '406':
2309          $ref: '#/components/responses/Problem406'
2310        '503':
2311          $ref: '#/components/responses/Problem503'
2312        '413':
2313          $ref: '#/components/responses/Problem413'
2314        '415':
2315          $ref: '#/components/responses/Problem415'
2316        '404':
2317          $ref: '#/components/responses/Problem404'
2318        '409':
2319          $ref: '#/components/responses/Problem409'
2320      description: No automatic lost-response retry. Notification outcome does not undo a committed domain
2321        edit.
2322      parameters:
2323      - name: workspace
2324        in: query
2325        required: true
2326        schema:
2327          $ref: '#/components/schemas/Workspace'
2328      requestBody:
2329        required: true
2330        content:
2331          application/json:
2332            schema:
2333              $ref: '#/components/schemas/WorkCreate'
2334            examples:
2335              WorkCreate:
2336                value:
2337                  title: Fix the parser
2338        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2339  /extensions/work/items/{item_id}:
2340    get:
2341      operationId: getWork
2342      summary: Read one work resource
2343      tags:
2344      - work
2345      responses:
2346        '200':
2347          description: Successful result.
2348          headers:
2349            ETag:
2350              $ref: '#/components/headers/ETag'
2351          content:
2352            application/json:
2353              schema:
2354                $ref: '#/components/schemas/WorkItem'
2355        '400':
2356          $ref: '#/components/responses/Problem400'
2357        '401':
2358          $ref: '#/components/responses/Problem401'
2359        '403':
2360          $ref: '#/components/responses/Problem403'
2361        '405':
2362          $ref: '#/components/responses/Problem405'
2363        '406':
2364          $ref: '#/components/responses/Problem406'
2365        '503':
2366          $ref: '#/components/responses/Problem503'
2367        '404':
2368          $ref: '#/components/responses/Problem404'
2369      parameters:
2370      - name: item_id
2371        in: path
2372        required: true
2373        schema:
2374          $ref: '#/components/schemas/ID'
2375      - name: workspace
2376        in: query
2377        required: true
2378        schema:
2379          $ref: '#/components/schemas/Workspace'
2380    patch:
2381      operationId: patchWork
2382      summary: Edit a work resource
2383      tags:
2384      - work
2385      responses:
2386        '200':
2387          description: Successful result.
2388          content:
2389            application/json:
2390              schema:
2391                $ref: '#/components/schemas/WorkChange'
2392        '400':
2393          $ref: '#/components/responses/Problem400'
2394        '401':
2395          $ref: '#/components/responses/Problem401'
2396        '403':
2397          $ref: '#/components/responses/Problem403'
2398        '405':
2399          $ref: '#/components/responses/Problem405'
2400        '406':
2401          $ref: '#/components/responses/Problem406'
2402        '503':
2403          $ref: '#/components/responses/Problem503'
2404        '413':
2405          $ref: '#/components/responses/Problem413'
2406        '415':
2407          $ref: '#/components/responses/Problem415'
2408        '404':
2409          $ref: '#/components/responses/Problem404'
2410        '409':
2411          $ref: '#/components/responses/Problem409'
2412        '412':
2413          $ref: '#/components/responses/Problem412'
2414        '428':
2415          $ref: '#/components/responses/Problem428'
2416      description: Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response
2417        retry.
2418      parameters:
2419      - name: item_id
2420        in: path
2421        required: true
2422        schema:
2423          $ref: '#/components/schemas/ID'
2424      - name: workspace
2425        in: query
2426        required: true
2427        schema:
2428          $ref: '#/components/schemas/Workspace'
2429      - $ref: '#/components/parameters/IfMatch'
2430      requestBody:
2431        required: true
2432        content:
2433          application/merge-patch+json:
2434            schema:
2435              $ref: '#/components/schemas/WorkPatch'
2436        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2437    delete:
2438      operationId: deleteWork
2439      summary: Delete a work resource
2440      tags:
2441      - work
2442      responses:
2443        '200':
2444          description: Successful result.
2445          content:
2446            application/json:
2447              schema:
2448                $ref: '#/components/schemas/ExtensionDeletion'
2449        '400':
2450          $ref: '#/components/responses/Problem400'
2451        '401':
2452          $ref: '#/components/responses/Problem401'
2453        '403':
2454          $ref: '#/components/responses/Problem403'
2455        '405':
2456          $ref: '#/components/responses/Problem405'
2457        '406':
2458          $ref: '#/components/responses/Problem406'
2459        '503':
2460          $ref: '#/components/responses/Problem503'
2461        '413':
2462          $ref: '#/components/responses/Problem413'
2463        '415':
2464          $ref: '#/components/responses/Problem415'
2465        '404':
2466          $ref: '#/components/responses/Problem404'
2467        '409':
2468          $ref: '#/components/responses/Problem409'
2469        '412':
2470          $ref: '#/components/responses/Problem412'
2471        '428':
2472          $ref: '#/components/responses/Problem428'
2473      description: Committed deletion remains successful if notification fails. Work items with children
2474        cannot be deleted.
2475      parameters:
2476      - name: item_id
2477        in: path
2478        required: true
2479        schema:
2480          $ref: '#/components/schemas/ID'
2481      - name: workspace
2482        in: query
2483        required: true
2484        schema:
2485          $ref: '#/components/schemas/Workspace'
2486      - name: notify_session_id
2487        in: query
2488        required: false
2489        schema:
2490          $ref: '#/components/schemas/ID'
2491        description: Queue the deletion note for this session after the durable edit.
2492      - $ref: '#/components/parameters/IfMatch'
2493  /extensions/paperclips/items:
2494    get:
2495      operationId: listPaperclips
2496      summary: List paperclips resources
2497      tags:
2498      - paperclips
2499      responses:
2500        '200':
2501          description: Successful result.
2502          content:
2503            application/json:
2504              schema:
2505                $ref: '#/components/schemas/PaperclipPage'
2506        '400':
2507          $ref: '#/components/responses/Problem400'
2508        '401':
2509          $ref: '#/components/responses/Problem401'
2510        '403':
2511          $ref: '#/components/responses/Problem403'
2512        '405':
2513          $ref: '#/components/responses/Problem405'
2514        '406':
2515          $ref: '#/components/responses/Problem406'
2516        '503':
2517          $ref: '#/components/responses/Problem503'
2518      description: Requires enabled extension paperclips. Lists may include bounded page descriptors and
2519        glances.
2520      parameters:
2521      - $ref: '#/components/parameters/Limit'
2522      - $ref: '#/components/parameters/Next'
2523    post:
2524      operationId: createPaperclips
2525      summary: Create a paperclips resource
2526      tags:
2527      - paperclips
2528      responses:
2529        '201':
2530          description: Successful result.
2531          headers:
2532            Location:
2533              $ref: '#/components/headers/Location'
2534          content:
2535            application/json:
2536              schema:
2537                $ref: '#/components/schemas/PaperclipChange'
2538        '400':
2539          $ref: '#/components/responses/Problem400'
2540        '401':
2541          $ref: '#/components/responses/Problem401'
2542        '403':
2543          $ref: '#/components/responses/Problem403'
2544        '405':
2545          $ref: '#/components/responses/Problem405'
2546        '406':
2547          $ref: '#/components/responses/Problem406'
2548        '503':
2549          $ref: '#/components/responses/Problem503'
2550        '413':
2551          $ref: '#/components/responses/Problem413'
2552        '415':
2553          $ref: '#/components/responses/Problem415'
2554        '404':
2555          $ref: '#/components/responses/Problem404'
2556        '409':
2557          $ref: '#/components/responses/Problem409'
2558      description: No automatic lost-response retry. Notification outcome does not undo a committed domain
2559        edit.
2560      requestBody:
2561        required: true
2562        content:
2563          application/json:
2564            schema:
2565              $ref: '#/components/schemas/PaperclipCreate'
2566        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2567  /extensions/paperclips/items/{item_id}:
2568    get:
2569      operationId: getPaperclips
2570      summary: Read one paperclips resource
2571      tags:
2572      - paperclips
2573      responses:
2574        '200':
2575          description: Successful result.
2576          headers:
2577            ETag:
2578              $ref: '#/components/headers/ETag'
2579          content:
2580            application/json:
2581              schema:
2582                $ref: '#/components/schemas/Paperclip'
2583        '400':
2584          $ref: '#/components/responses/Problem400'
2585        '401':
2586          $ref: '#/components/responses/Problem401'
2587        '403':
2588          $ref: '#/components/responses/Problem403'
2589        '405':
2590          $ref: '#/components/responses/Problem405'
2591        '406':
2592          $ref: '#/components/responses/Problem406'
2593        '503':
2594          $ref: '#/components/responses/Problem503'
2595        '404':
2596          $ref: '#/components/responses/Problem404'
2597      parameters:
2598      - name: item_id
2599        in: path
2600        required: true
2601        schema:
2602          $ref: '#/components/schemas/ID'
2603    patch:
2604      operationId: patchPaperclips
2605      summary: Edit a paperclips resource
2606      tags:
2607      - paperclips
2608      responses:
2609        '200':
2610          description: Successful result.
2611          content:
2612            application/json:
2613              schema:
2614                $ref: '#/components/schemas/PaperclipChange'
2615        '400':
2616          $ref: '#/components/responses/Problem400'
2617        '401':
2618          $ref: '#/components/responses/Problem401'
2619        '403':
2620          $ref: '#/components/responses/Problem403'
2621        '405':
2622          $ref: '#/components/responses/Problem405'
2623        '406':
2624          $ref: '#/components/responses/Problem406'
2625        '503':
2626          $ref: '#/components/responses/Problem503'
2627        '413':
2628          $ref: '#/components/responses/Problem413'
2629        '415':
2630          $ref: '#/components/responses/Problem415'
2631        '404':
2632          $ref: '#/components/responses/Problem404'
2633        '409':
2634          $ref: '#/components/responses/Problem409'
2635        '412':
2636          $ref: '#/components/responses/Problem412'
2637        '428':
2638          $ref: '#/components/responses/Problem428'
2639      description: Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response
2640        retry.
2641      parameters:
2642      - name: item_id
2643        in: path
2644        required: true
2645        schema:
2646          $ref: '#/components/schemas/ID'
2647      - $ref: '#/components/parameters/IfMatch'
2648      requestBody:
2649        required: true
2650        content:
2651          application/merge-patch+json:
2652            schema:
2653              $ref: '#/components/schemas/PaperclipPatch'
2654        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2655    delete:
2656      operationId: deletePaperclips
2657      summary: Delete a paperclips resource
2658      tags:
2659      - paperclips
2660      responses:
2661        '200':
2662          description: Successful result.
2663          content:
2664            application/json:
2665              schema:
2666                $ref: '#/components/schemas/ExtensionDeletion'
2667        '400':
2668          $ref: '#/components/responses/Problem400'
2669        '401':
2670          $ref: '#/components/responses/Problem401'
2671        '403':
2672          $ref: '#/components/responses/Problem403'
2673        '405':
2674          $ref: '#/components/responses/Problem405'
2675        '406':
2676          $ref: '#/components/responses/Problem406'
2677        '503':
2678          $ref: '#/components/responses/Problem503'
2679        '413':
2680          $ref: '#/components/responses/Problem413'
2681        '415':
2682          $ref: '#/components/responses/Problem415'
2683        '404':
2684          $ref: '#/components/responses/Problem404'
2685        '409':
2686          $ref: '#/components/responses/Problem409'
2687        '412':
2688          $ref: '#/components/responses/Problem412'
2689        '428':
2690          $ref: '#/components/responses/Problem428'
2691      description: Committed deletion remains successful if notification fails. Work items with children
2692        cannot be deleted.
2693      parameters:
2694      - name: item_id
2695        in: path
2696        required: true
2697        schema:
2698          $ref: '#/components/schemas/ID'
2699      - $ref: '#/components/parameters/IfMatch'
2700  /extensions/web-search/providers:
2701    get:
2702      operationId: listWebSearchProviders
2703      summary: List web search providers in the order a search tries them
2704      tags:
2705      - web-search
2706      responses:
2707        '200':
2708          description: Successful result.
2709          content:
2710            application/json:
2711              schema:
2712                $ref: '#/components/schemas/WebSearchProviderPage'
2713        '401':
2714          $ref: '#/components/responses/Problem401'
2715        '403':
2716          $ref: '#/components/responses/Problem403'
2717        '405':
2718          $ref: '#/components/responses/Problem405'
2719        '503':
2720          $ref: '#/components/responses/Problem503'
2721      description: Requires enabled extension web-search. The global order lives in extensions.json.
2722  /extensions/web-search/providers/{name}:
2723    post:
2724      operationId: changeWebSearchProvider
2725      summary: Move a web search provider up or down, or turn it on or off
2726      tags:
2727      - web-search
2728      responses:
2729        '200':
2730          description: Successful result.
2731          content:
2732            application/json:
2733              schema:
2734                $ref: '#/components/schemas/WebSearchProviderChange'
2735        '400':
2736          $ref: '#/components/responses/Problem400'
2737        '401':
2738          $ref: '#/components/responses/Problem401'
2739        '403':
2740          $ref: '#/components/responses/Problem403'
2741        '404':
2742          $ref: '#/components/responses/Problem404'
2743        '405':
2744          $ref: '#/components/responses/Problem405'
2745        '413':
2746          $ref: '#/components/responses/Problem413'
2747        '415':
2748          $ref: '#/components/responses/Problem415'
2749        '503':
2750          $ref: '#/components/responses/Problem503'
2751      description: A move past either end leaves the order as it was.
2752      parameters:
2753      - name: name
2754        in: path
2755        required: true
2756        schema:
2757          $ref: '#/components/schemas/ID'
2758      requestBody:
2759        required: true
2760        content:
2761          application/json:
2762            schema:
2763              $ref: '#/components/schemas/WebSearchProviderChangeRequest'
2764        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2765  /extensions/schedule/jobs:
2766    get:
2767      operationId: listSchedule
2768      summary: List schedule resources
2769      tags:
2770      - schedule
2771      responses:
2772        '200':
2773          description: Successful result.
2774          content:
2775            application/json:
2776              schema:
2777                $ref: '#/components/schemas/SchedulePage'
2778        '400':
2779          $ref: '#/components/responses/Problem400'
2780        '401':
2781          $ref: '#/components/responses/Problem401'
2782        '403':
2783          $ref: '#/components/responses/Problem403'
2784        '405':
2785          $ref: '#/components/responses/Problem405'
2786        '406':
2787          $ref: '#/components/responses/Problem406'
2788        '503':
2789          $ref: '#/components/responses/Problem503'
2790      description: Requires enabled extension schedule. Lists may include bounded page descriptors and
2791        glances.
2792      parameters:
2793      - name: session_id
2794        in: query
2795        required: true
2796        schema:
2797          $ref: '#/components/schemas/ID'
2798      - $ref: '#/components/parameters/Limit'
2799      - $ref: '#/components/parameters/Next'
2800    post:
2801      operationId: createSchedule
2802      summary: Create a schedule resource
2803      tags:
2804      - schedule
2805      responses:
2806        '201':
2807          description: Successful result.
2808          headers:
2809            Location:
2810              $ref: '#/components/headers/Location'
2811          content:
2812            application/json:
2813              schema:
2814                $ref: '#/components/schemas/ScheduleChange'
2815        '400':
2816          $ref: '#/components/responses/Problem400'
2817        '401':
2818          $ref: '#/components/responses/Problem401'
2819        '403':
2820          $ref: '#/components/responses/Problem403'
2821        '405':
2822          $ref: '#/components/responses/Problem405'
2823        '406':
2824          $ref: '#/components/responses/Problem406'
2825        '503':
2826          $ref: '#/components/responses/Problem503'
2827        '413':
2828          $ref: '#/components/responses/Problem413'
2829        '415':
2830          $ref: '#/components/responses/Problem415'
2831        '404':
2832          $ref: '#/components/responses/Problem404'
2833        '409':
2834          $ref: '#/components/responses/Problem409'
2835      description: No automatic lost-response retry. Notification outcome does not undo a committed domain
2836        edit.
2837      requestBody:
2838        required: true
2839        content:
2840          application/json:
2841            schema:
2842              $ref: '#/components/schemas/ScheduleCreate'
2843        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2844  /extensions/schedule/jobs/{job_id}:
2845    get:
2846      operationId: getSchedule
2847      summary: Read one schedule resource
2848      tags:
2849      - schedule
2850      responses:
2851        '200':
2852          description: Successful result.
2853          headers:
2854            ETag:
2855              $ref: '#/components/headers/ETag'
2856          content:
2857            application/json:
2858              schema:
2859                $ref: '#/components/schemas/ScheduleJob'
2860        '400':
2861          $ref: '#/components/responses/Problem400'
2862        '401':
2863          $ref: '#/components/responses/Problem401'
2864        '403':
2865          $ref: '#/components/responses/Problem403'
2866        '405':
2867          $ref: '#/components/responses/Problem405'
2868        '406':
2869          $ref: '#/components/responses/Problem406'
2870        '503':
2871          $ref: '#/components/responses/Problem503'
2872        '404':
2873          $ref: '#/components/responses/Problem404'
2874      parameters:
2875      - name: job_id
2876        in: path
2877        required: true
2878        schema:
2879          $ref: '#/components/schemas/ID'
2880    patch:
2881      operationId: patchSchedule
2882      summary: Edit a schedule resource
2883      tags:
2884      - schedule
2885      responses:
2886        '200':
2887          description: Successful result.
2888          content:
2889            application/json:
2890              schema:
2891                $ref: '#/components/schemas/ScheduleChange'
2892        '400':
2893          $ref: '#/components/responses/Problem400'
2894        '401':
2895          $ref: '#/components/responses/Problem401'
2896        '403':
2897          $ref: '#/components/responses/Problem403'
2898        '405':
2899          $ref: '#/components/responses/Problem405'
2900        '406':
2901          $ref: '#/components/responses/Problem406'
2902        '503':
2903          $ref: '#/components/responses/Problem503'
2904        '413':
2905          $ref: '#/components/responses/Problem413'
2906        '415':
2907          $ref: '#/components/responses/Problem415'
2908        '404':
2909          $ref: '#/components/responses/Problem404'
2910        '409':
2911          $ref: '#/components/responses/Problem409'
2912        '412':
2913          $ref: '#/components/responses/Problem412'
2914        '428':
2915          $ref: '#/components/responses/Problem428'
2916      description: Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response
2917        retry.
2918      parameters:
2919      - name: job_id
2920        in: path
2921        required: true
2922        schema:
2923          $ref: '#/components/schemas/ID'
2924      - $ref: '#/components/parameters/IfMatch'
2925      requestBody:
2926        required: true
2927        content:
2928          application/merge-patch+json:
2929            schema:
2930              $ref: '#/components/schemas/SchedulePatch'
2931        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
2932    delete:
2933      operationId: deleteSchedule
2934      summary: Delete a schedule resource
2935      tags:
2936      - schedule
2937      responses:
2938        '200':
2939          description: Successful result.
2940          content:
2941            application/json:
2942              schema:
2943                $ref: '#/components/schemas/ExtensionDeletion'
2944        '400':
2945          $ref: '#/components/responses/Problem400'
2946        '401':
2947          $ref: '#/components/responses/Problem401'
2948        '403':
2949          $ref: '#/components/responses/Problem403'
2950        '405':
2951          $ref: '#/components/responses/Problem405'
2952        '406':
2953          $ref: '#/components/responses/Problem406'
2954        '503':
2955          $ref: '#/components/responses/Problem503'
2956        '413':
2957          $ref: '#/components/responses/Problem413'
2958        '415':
2959          $ref: '#/components/responses/Problem415'
2960        '404':
2961          $ref: '#/components/responses/Problem404'
2962        '409':
2963          $ref: '#/components/responses/Problem409'
2964        '412':
2965          $ref: '#/components/responses/Problem412'
2966        '428':
2967          $ref: '#/components/responses/Problem428'
2968      description: Committed deletion remains successful if notification fails. Work items with children
2969        cannot be deleted.
2970      parameters:
2971      - name: job_id
2972        in: path
2973        required: true
2974        schema:
2975          $ref: '#/components/schemas/ID'
2976      - $ref: '#/components/parameters/IfMatch'
2977  /extensions/links/groups:
2978    get:
2979      operationId: getLinkGroup
2980      summary: Read linked membership and presence
2981      tags:
2982      - links
2983      responses:
2984        '200':
2985          description: Successful result.
2986          headers:
2987            ETag:
2988              $ref: '#/components/headers/ETag'
2989          content:
2990            application/json:
2991              schema:
2992                oneOf:
2993                - $ref: '#/components/schemas/LinkGroup'
2994                - $ref: '#/components/schemas/LinkConfiguration'
2995        '400':
2996          $ref: '#/components/responses/Problem400'
2997        '401':
2998          $ref: '#/components/responses/Problem401'
2999        '403':
3000          $ref: '#/components/responses/Problem403'
3001        '405':
3002          $ref: '#/components/responses/Problem405'
3003        '406':
3004          $ref: '#/components/responses/Problem406'
3005        '503':
3006          $ref: '#/components/responses/Problem503'
3007      description: Only configuration view has the canonical membership ETag. Presence does not change
3008        that validator.
3009      parameters:
3010      - name: workspace
3011        in: query
3012        required: true
3013        schema:
3014          $ref: '#/components/schemas/Workspace'
3015      - name: view
3016        in: query
3017        required: false
3018        schema:
3019          type: string
3020          enum: [configuration]
3021      - $ref: '#/components/parameters/Limit'
3022      - $ref: '#/components/parameters/Next'
3023    post:
3024      operationId: mergeLinkGroups
3025      summary: Merge two observed workspace groups
3026      tags:
3027      - links
3028      responses:
3029        '200':
3030          description: Successful result.
3031          content:
3032            application/json:
3033              schema:
3034                $ref: '#/components/schemas/LinkChange'
3035        '400':
3036          $ref: '#/components/responses/Problem400'
3037        '401':
3038          $ref: '#/components/responses/Problem401'
3039        '403':
3040          $ref: '#/components/responses/Problem403'
3041        '405':
3042          $ref: '#/components/responses/Problem405'
3043        '406':
3044          $ref: '#/components/responses/Problem406'
3045        '503':
3046          $ref: '#/components/responses/Problem503'
3047        '413':
3048          $ref: '#/components/responses/Problem413'
3049        '415':
3050          $ref: '#/components/responses/Problem415'
3051        '409':
3052          $ref: '#/components/responses/Problem409'
3053        '412':
3054          $ref: '#/components/responses/Problem412'
3055        '428':
3056          $ref: '#/components/responses/Problem428'
3057      description: Check both observed validators in one owner commit. Human-only; domain commit and notifications
3058        are separate. No automatic lost-response retry.
3059      parameters:
3060      - name: workspace
3061        in: query
3062        required: true
3063        schema:
3064          $ref: '#/components/schemas/Workspace'
3065      - name: view
3066        in: query
3067        required: true
3068        schema:
3069          const: configuration
3070      - $ref: '#/components/parameters/IfMatch'
3071      requestBody:
3072        required: true
3073        content:
3074          application/json:
3075            schema:
3076              $ref: '#/components/schemas/LinkMerge'
3077        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
3078    delete:
3079      operationId: unlinkWorkspace
3080      summary: Remove a member from the observed group
3081      tags:
3082      - links
3083      responses:
3084        '200':
3085          description: Successful result.
3086          content:
3087            application/json:
3088              schema:
3089                $ref: '#/components/schemas/LinkChange'
3090        '400':
3091          $ref: '#/components/responses/Problem400'
3092        '401':
3093          $ref: '#/components/responses/Problem401'
3094        '403':
3095          $ref: '#/components/responses/Problem403'
3096        '405':
3097          $ref: '#/components/responses/Problem405'
3098        '406':
3099          $ref: '#/components/responses/Problem406'
3100        '503':
3101          $ref: '#/components/responses/Problem503'
3102        '413':
3103          $ref: '#/components/responses/Problem413'
3104        '415':
3105          $ref: '#/components/responses/Problem415'
3106        '404':
3107          $ref: '#/components/responses/Problem404'
3108        '409':
3109          $ref: '#/components/responses/Problem409'
3110        '412':
3111          $ref: '#/components/responses/Problem412'
3112        '428':
3113          $ref: '#/components/responses/Problem428'
3114      description: Check membership at commit. Creates a singleton group; deletes no work or memory. Human-only.
3115      parameters:
3116      - name: workspace
3117        in: query
3118        required: true
3119        schema:
3120          $ref: '#/components/schemas/Workspace'
3121      - name: member
3122        in: query
3123        required: true
3124        schema:
3125          $ref: '#/components/schemas/Workspace'
3126      - name: view
3127        in: query
3128        required: true
3129        schema:
3130          const: configuration
3131      - $ref: '#/components/parameters/IfMatch'
3132  /extensions/webhooks/hooks:
3133    get:
3134      operationId: listHooks
3135      summary: List hooks without secrets
3136      tags:
3137      - webhooks
3138      responses:
3139        '200':
3140          description: Successful result.
3141          content:
3142            application/json:
3143              schema:
3144                $ref: '#/components/schemas/HookPage'
3145        '400':
3146          $ref: '#/components/responses/Problem400'
3147        '401':
3148          $ref: '#/components/responses/Problem401'
3149        '403':
3150          $ref: '#/components/responses/Problem403'
3151        '405':
3152          $ref: '#/components/responses/Problem405'
3153        '406':
3154          $ref: '#/components/responses/Problem406'
3155        '503':
3156          $ref: '#/components/responses/Problem503'
3157      parameters:
3158      - name: session_id
3159        in: query
3160        required: false
3161        schema:
3162          $ref: '#/components/schemas/ID'
3163      - $ref: '#/components/parameters/Limit'
3164      - $ref: '#/components/parameters/Next'
3165    post:
3166      operationId: createHook
3167      summary: Create a hook and disclose its secret once
3168      tags:
3169      - webhooks
3170      responses:
3171        '201':
3172          description: Successful result.
3173          headers:
3174            Location:
3175              $ref: '#/components/headers/Location'
3176          content:
3177            application/json:
3178              schema:
3179                $ref: '#/components/schemas/HookChange'
3180              examples:
3181                HookChange:
3182                  value:
3183                    resource:
3184                      url: /extensions/webhooks/hooks/hook-1?view=configuration
3185                      etag: '"hook-revision-1"'
3186                      value:
3187                        id: hook-1
3188                        name: ci
3189                        session_id: 01a0fcea-2b00-7000-8000-000000000001
3190                        enabled: true
3191                        signature_header: X-Albedo-Signature
3192                        signature_prefix: sha256=
3193                        revision: hook-revision-1
3194                    notification:
3195                      state: not_requested
3196                      code: null
3197                      detail: null
3198                    secret: synthetic-example-hook-secret
3199        '400':
3200          $ref: '#/components/responses/Problem400'
3201        '401':
3202          $ref: '#/components/responses/Problem401'
3203        '403':
3204          $ref: '#/components/responses/Problem403'
3205        '405':
3206          $ref: '#/components/responses/Problem405'
3207        '406':
3208          $ref: '#/components/responses/Problem406'
3209        '503':
3210          $ref: '#/components/responses/Problem503'
3211        '413':
3212          $ref: '#/components/responses/Problem413'
3213        '415':
3214          $ref: '#/components/responses/Problem415'
3215        '404':
3216          $ref: '#/components/responses/Problem404'
3217        '409':
3218          $ref: '#/components/responses/Problem409'
3219      description: Default enabled=true, signature_header=X-Albedo-Signature and signature_prefix=sha256=.
3220        Missing secret generates one. Lost secret requires explicit rotation; never retry creation automatically.
3221      requestBody:
3222        required: true
3223        content:
3224          application/json:
3225            schema:
3226              $ref: '#/components/schemas/HookCreate'
3227            examples:
3228              HookCreate:
3229                value:
3230                  session_id: 01a0fcea-2b00-7000-8000-000000000001
3231                  name: ci
3232        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
3233  /extensions/webhooks/hooks/{hook_id}:
3234    get:
3235      operationId: getHook
3236      summary: Read hook state or canonical configuration
3237      tags:
3238      - webhooks
3239      responses:
3240        '200':
3241          description: Successful result.
3242          headers:
3243            ETag:
3244              $ref: '#/components/headers/ETag'
3245          content:
3246            application/json:
3247              schema:
3248                oneOf:
3249                - $ref: '#/components/schemas/Hook'
3250                - $ref: '#/components/schemas/HookConfiguration'
3251        '400':
3252          $ref: '#/components/responses/Problem400'
3253        '401':
3254          $ref: '#/components/responses/Problem401'
3255        '403':
3256          $ref: '#/components/responses/Problem403'
3257        '405':
3258          $ref: '#/components/responses/Problem405'
3259        '406':
3260          $ref: '#/components/responses/Problem406'
3261        '503':
3262          $ref: '#/components/responses/Problem503'
3263        '404':
3264          $ref: '#/components/responses/Problem404'
3265      description: ETag is present only on configuration view. Ordinary read exposes the configuration
3266        resource and validator plus runtime observations.
3267      parameters:
3268      - name: hook_id
3269        in: path
3270        required: true
3271        schema:
3272          $ref: '#/components/schemas/ID'
3273      - name: view
3274        in: query
3275        required: false
3276        schema:
3277          type: string
3278          enum: [configuration]
3279    patch:
3280      operationId: patchHook
3281      summary: Edit the observed hook configuration
3282      tags:
3283      - webhooks
3284      responses:
3285        '200':
3286          description: Successful result.
3287          content:
3288            application/json:
3289              schema:
3290                $ref: '#/components/schemas/HookChange'
3291        '400':
3292          $ref: '#/components/responses/Problem400'
3293        '401':
3294          $ref: '#/components/responses/Problem401'
3295        '403':
3296          $ref: '#/components/responses/Problem403'
3297        '405':
3298          $ref: '#/components/responses/Problem405'
3299        '406':
3300          $ref: '#/components/responses/Problem406'
3301        '503':
3302          $ref: '#/components/responses/Problem503'
3303        '413':
3304          $ref: '#/components/responses/Problem413'
3305        '415':
3306          $ref: '#/components/responses/Problem415'
3307        '404':
3308          $ref: '#/components/responses/Problem404'
3309        '409':
3310          $ref: '#/components/responses/Problem409'
3311        '412':
3312          $ref: '#/components/responses/Problem412'
3313        '428':
3314          $ref: '#/components/responses/Problem428'
3315      description: Target session and secret are not writable. Agent callers need that session permission;
3316        HTTP bearer clients are operators.
3317      parameters:
3318      - name: hook_id
3319        in: path
3320        required: true
3321        schema:
3322          $ref: '#/components/schemas/ID'
3323      - name: view
3324        in: query
3325        required: true
3326        schema:
3327          const: configuration
3328      - $ref: '#/components/parameters/IfMatch'
3329      requestBody:
3330        required: true
3331        content:
3332          application/merge-patch+json:
3333            schema:
3334              $ref: '#/components/schemas/HookPatch'
3335        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
3336    delete:
3337      operationId: deleteHook
3338      summary: Delete a hook while retaining accepted deliveries
3339      tags:
3340      - webhooks
3341      responses:
3342        '200':
3343          description: Successful result.
3344          content:
3345            application/json:
3346              schema:
3347                $ref: '#/components/schemas/ExtensionDeletion'
3348        '400':
3349          $ref: '#/components/responses/Problem400'
3350        '401':
3351          $ref: '#/components/responses/Problem401'
3352        '403':
3353          $ref: '#/components/responses/Problem403'
3354        '405':
3355          $ref: '#/components/responses/Problem405'
3356        '406':
3357          $ref: '#/components/responses/Problem406'
3358        '503':
3359          $ref: '#/components/responses/Problem503'
3360        '413':
3361          $ref: '#/components/responses/Problem413'
3362        '415':
3363          $ref: '#/components/responses/Problem415'
3364        '404':
3365          $ref: '#/components/responses/Problem404'
3366        '412':
3367          $ref: '#/components/responses/Problem412'
3368        '428':
3369          $ref: '#/components/responses/Problem428'
3370      parameters:
3371      - name: hook_id
3372        in: path
3373        required: true
3374        schema:
3375          $ref: '#/components/schemas/ID'
3376      - name: view
3377        in: query
3378        required: true
3379        schema:
3380          const: configuration
3381      - $ref: '#/components/parameters/IfMatch'
3382  /extensions/webhooks/hooks/{hook_id}/secret:
3383    post:
3384      operationId: rotateHookSecret
3385      summary: Rotate and disclose the hook secret once
3386      tags:
3387      - webhooks
3388      responses:
3389        '200':
3390          description: Successful result.
3391          content:
3392            application/json:
3393              schema:
3394                $ref: '#/components/schemas/HookChange'
3395        '400':
3396          $ref: '#/components/responses/Problem400'
3397        '401':
3398          $ref: '#/components/responses/Problem401'
3399        '403':
3400          $ref: '#/components/responses/Problem403'
3401        '405':
3402          $ref: '#/components/responses/Problem405'
3403        '406':
3404          $ref: '#/components/responses/Problem406'
3405        '503':
3406          $ref: '#/components/responses/Problem503'
3407        '413':
3408          $ref: '#/components/responses/Problem413'
3409        '415':
3410          $ref: '#/components/responses/Problem415'
3411        '404':
3412          $ref: '#/components/responses/Problem404'
3413        '412':
3414          $ref: '#/components/responses/Problem412'
3415        '428':
3416          $ref: '#/components/responses/Problem428'
3417      description: If-Match is the observed hook configuration validator. Missing secret generates one.
3418        No automatic retry after a lost response.
3419      parameters:
3420      - name: hook_id
3421        in: path
3422        required: true
3423        schema:
3424          $ref: '#/components/schemas/ID'
3425      - $ref: '#/components/parameters/IfMatch'
3426      requestBody:
3427        required: true
3428        content:
3429          application/json:
3430            schema:
3431              $ref: '#/components/schemas/HookSecretRequest'
3432        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
3433  /extensions/webhooks/hooks/{hook_id}/deliveries:
3434    get:
3435      operationId: listHookDeliveries
3436      summary: Read accepted hook delivery metadata
3437      tags:
3438      - webhooks
3439      responses:
3440        '200':
3441          description: Successful result.
3442          content:
3443            application/json:
3444              schema:
3445                $ref: '#/components/schemas/DeliveryPage'
3446        '400':
3447          $ref: '#/components/responses/Problem400'
3448        '401':
3449          $ref: '#/components/responses/Problem401'
3450        '403':
3451          $ref: '#/components/responses/Problem403'
3452        '405':
3453          $ref: '#/components/responses/Problem405'
3454        '406':
3455          $ref: '#/components/responses/Problem406'
3456        '503':
3457          $ref: '#/components/responses/Problem503'
3458        '404':
3459          $ref: '#/components/responses/Problem404'
3460      description: Historical reads remain available after hook deletion while retained deliveries exist.
3461      parameters:
3462      - name: hook_id
3463        in: path
3464        required: true
3465        schema:
3466          $ref: '#/components/schemas/ID'
3467      - name: state
3468        in: query
3469        required: false
3470        schema:
3471          type: string
3472          enum: [pending, delivered, all]
3473          default: all
3474      - $ref: '#/components/parameters/Limit'
3475      - $ref: '#/components/parameters/Next'
3476    post:
3477      operationId: deliverWebhook
3478      summary: Accept signed external data durably
3479      tags:
3480      - webhooks
3481      responses:
3482        '202':
3483          description: Successful result.
3484          content:
3485            application/json:
3486              schema:
3487                type: object
3488                properties:
3489                  delivery_id:
3490                    $ref: '#/components/schemas/ID'
3491                required: [delivery_id]
3492                additionalProperties: false
3493        '400':
3494          $ref: '#/components/responses/Problem400'
3495        '403':
3496          description: Missing or invalid hook signature.
3497          content:
3498            application/problem+json:
3499              schema:
3500                $ref: '#/components/schemas/Problem'
3501        '405':
3502          $ref: '#/components/responses/Problem405'
3503        '406':
3504          $ref: '#/components/responses/Problem406'
3505        '503':
3506          $ref: '#/components/responses/Problem503'
3507        '413':
3508          $ref: '#/components/responses/Problem413'
3509        '415':
3510          $ref: '#/components/responses/Problem415'
3511        '404':
3512          $ref: '#/components/responses/Problem404'
3513        '409':
3514          $ref: '#/components/responses/Problem409'
3515        '429':
3516          $ref: '#/components/responses/Problem429'
3517      description: Authenticate configured HMAC-SHA256 over the exact raw body. A daemon bearer is not
3518        a substitute. Signature header name and prefix come from hook configuration. Same event ID and
3519        body returns original admission; changed body conflicts. Pending inbox limit 1000. Raw body maximum
3520        65536 bytes.
3521      parameters:
3522      - name: hook_id
3523        in: path
3524        required: true
3525        schema:
3526          $ref: '#/components/schemas/ID'
3527      - name: X-Albedo-Event-Id
3528        in: header
3529        required: false
3530        schema:
3531          type: string
3532          pattern: ^[^\r\n]+$
3533          maxLength: 128
3534        description: Optional sender identity scoped to hook and exact body hash.
3535      security:
3536      - WebhookSignature: []
3537      requestBody:
3538        required: true
3539        content:
3540          '*/*':
3541            schema:
3542              type: string
3543              format: binary
3544              maxLength: 65536
3545        description: Raw bytes, not a parsed JSON requirement. Verify signature before admission.
3546  /extensions/webhooks/deliveries/{delivery_id}:
3547    get:
3548      operationId: getDelivery
3549      summary: Read an accepted delivery payload
3550      tags:
3551      - webhooks
3552      responses:
3553        '200':
3554          description: Successful result.
3555          content:
3556            application/json:
3557              schema:
3558                $ref: '#/components/schemas/DeliveryDetail'
3559        '400':
3560          $ref: '#/components/responses/Problem400'
3561        '401':
3562          $ref: '#/components/responses/Problem401'
3563        '403':
3564          $ref: '#/components/responses/Problem403'
3565        '405':
3566          $ref: '#/components/responses/Problem405'
3567        '406':
3568          $ref: '#/components/responses/Problem406'
3569        '503':
3570          $ref: '#/components/responses/Problem503'
3571        '404':
3572          $ref: '#/components/responses/Problem404'
3573      parameters:
3574      - name: delivery_id
3575        in: path
3576        required: true
3577        schema:
3578          $ref: '#/components/schemas/ID'
3579  /extensions/webhooks/permissions/{session_id}:
3580    get:
3581      operationId: getHookPermission
3582      summary: Read agent hook-management permission
3583      tags:
3584      - webhooks
3585      responses:
3586        '200':
3587          description: Successful result.
3588          headers:
3589            ETag:
3590              $ref: '#/components/headers/ETag'
3591          content:
3592            application/json:
3593              schema:
3594                $ref: '#/components/schemas/HookPermission'
3595        '400':
3596          $ref: '#/components/responses/Problem400'
3597        '401':
3598          $ref: '#/components/responses/Problem401'
3599        '403':
3600          $ref: '#/components/responses/Problem403'
3601        '405':
3602          $ref: '#/components/responses/Problem405'
3603        '406':
3604          $ref: '#/components/responses/Problem406'
3605        '503':
3606          $ref: '#/components/responses/Problem503'
3607        '404':
3608          $ref: '#/components/responses/Problem404'
3609      description: Absent stored permission reads false with its initial canonical validator.
3610      parameters:
3611      - name: session_id
3612        in: path
3613        required: true
3614        schema:
3615          $ref: '#/components/schemas/ID'
3616    patch:
3617      operationId: patchHookPermission
3618      summary: Set agent hook-management permission
3619      tags:
3620      - webhooks
3621      responses:
3622        '200':
3623          description: Successful result.
3624          content:
3625            application/json:
3626              schema:
3627                $ref: '#/components/schemas/HookPermissionChange'
3628        '400':
3629          $ref: '#/components/responses/Problem400'
3630        '401':
3631          $ref: '#/components/responses/Problem401'
3632        '403':
3633          $ref: '#/components/responses/Problem403'
3634        '405':
3635          $ref: '#/components/responses/Problem405'
3636        '406':
3637          $ref: '#/components/responses/Problem406'
3638        '503':
3639          $ref: '#/components/responses/Problem503'
3640        '413':
3641          $ref: '#/components/responses/Problem413'
3642        '415':
3643          $ref: '#/components/responses/Problem415'
3644        '404':
3645          $ref: '#/components/responses/Problem404'
3646        '412':
3647          $ref: '#/components/responses/Problem412'
3648        '428':
3649          $ref: '#/components/responses/Problem428'
3650      description: Only operator callers can grant permission. Omission retains it; turning off management
3651        keeps existing hooks enabled.
3652      parameters:
3653      - name: session_id
3654        in: path
3655        required: true
3656        schema:
3657          $ref: '#/components/schemas/ID'
3658      - $ref: '#/components/parameters/IfMatch'
3659      requestBody:
3660        required: true
3661        content:
3662          application/merge-patch+json:
3663            schema:
3664              $ref: '#/components/schemas/HookPermissionPatch'
3665        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
3666  /extensions/proxy/v1/models:
3667    get:
3668      operationId: listProxyModels
3669      summary: List saved-profile OpenAI model IDs
3670      tags:
3671      - proxy
3672      responses:
3673        '200':
3674          description: Successful result.
3675          content:
3676            application/json:
3677              schema:
3678                $ref: '#/components/schemas/ProxyModels'
3679        '400':
3680          description: OpenAI proxy error.
3681          content:
3682            application/json:
3683              schema:
3684                $ref: '#/components/schemas/ProxyError'
3685        '401':
3686          description: OpenAI proxy error.
3687          content:
3688            application/json:
3689              schema:
3690                $ref: '#/components/schemas/ProxyError'
3691        '403':
3692          description: OpenAI proxy error.
3693          content:
3694            application/json:
3695              schema:
3696                $ref: '#/components/schemas/ProxyError'
3697        '405':
3698          description: OpenAI proxy error.
3699          content:
3700            application/json:
3701              schema:
3702                $ref: '#/components/schemas/ProxyError'
3703        '406':
3704          description: OpenAI proxy error.
3705          content:
3706            application/json:
3707              schema:
3708                $ref: '#/components/schemas/ProxyError'
3709        '503':
3710          description: OpenAI proxy error.
3711          content:
3712            application/json:
3713              schema:
3714                $ref: '#/components/schemas/ProxyError'
3715      description: External OpenAI envelope. Bearer required unless operator explicitly configured anonymous
3716        loopback access.
3717  /extensions/proxy/v1/chat/completions:
3718    post:
3719      operationId: createProxyCompletion
3720      summary: Run a stateless OpenAI chat completion
3721      tags:
3722      - proxy
3723      responses:
3724        '200':
3725          description: Successful result.
3726          content:
3727            application/json:
3728              schema:
3729                $ref: '#/components/schemas/ProxyCompletion'
3730              examples:
3731                ProxyCompletion:
3732                  value:
3733                    id: completion-1
3734                    object: chat.completion
3735                    created: 1790949600
3736                    model: personal/example-model
3737                    choices:
3738                    - index: 0
3739                      message:
3740                        role: assistant
3741                        content: Hello
3742                      finish_reason: stop
3743                    usage:
3744                      prompt_tokens: 1
3745                      completion_tokens: 1
3746                      total_tokens: 2
3747            text/event-stream:
3748              itemSchema:
3749                $ref: '#/components/schemas/ProxySSE'
3750        '400':
3751          description: OpenAI proxy error.
3752          content:
3753            application/json:
3754              schema:
3755                $ref: '#/components/schemas/ProxyError'
3756        '401':
3757          description: OpenAI proxy error.
3758          content:
3759            application/json:
3760              schema:
3761                $ref: '#/components/schemas/ProxyError'
3762        '403':
3763          description: OpenAI proxy error.
3764          content:
3765            application/json:
3766              schema:
3767                $ref: '#/components/schemas/ProxyError'
3768        '405':
3769          description: OpenAI proxy error.
3770          content:
3771            application/json:
3772              schema:
3773                $ref: '#/components/schemas/ProxyError'
3774        '406':
3775          description: OpenAI proxy error.
3776          content:
3777            application/json:
3778              schema:
3779                $ref: '#/components/schemas/ProxyError'
3780        '503':
3781          description: OpenAI proxy error.
3782          content:
3783            application/json:
3784              schema:
3785                $ref: '#/components/schemas/ProxyError'
3786        '413':
3787          description: OpenAI proxy error.
3788          content:
3789            application/json:
3790              schema:
3791                $ref: '#/components/schemas/ProxyError'
3792        '415':
3793          description: OpenAI proxy error.
3794          content:
3795            application/json:
3796              schema:
3797                $ref: '#/components/schemas/ProxyError'
3798      description: Caller supplies full history. Tool IDs carry opaque provider state and must be echoed
3799        exactly. Bearer required unless anonymous loopback policy explicitly enabled. Providers apply
3800        only representable generation options; proxy transport documentation defines these differences.
3801        No automatic replay after request admission.
3802      requestBody:
3803        required: true
3804        content:
3805          application/json:
3806            schema:
3807              $ref: '#/components/schemas/ProxyCompletionRequest'
3808            examples:
3809              ProxyCompletionRequest:
3810                value:
3811                  model: personal/example-model
3812                  messages:
3813                  - role: user
3814                    content: Hello
3815                  stream: true
3816        description: UTF-8 JSON; duplicate keys and unknown fields are rejected.
3817  /extensions/run/sessions/{session_id}/jobs:
3818    get:
3819      operationId: listJobs
3820      summary: Read bounded live job observations and the jobs page
3821      parameters:
3822      - name: session_id
3823        in: path
3824        required: true
3825        schema:
3826          $ref: '#/components/schemas/ID'
3827      responses:
3828        '200':
3829          description: Known live jobs, with up to 100 summaries ordered by ID.
3830          content:
3831            application/json:
3832              schema:
3833                $ref: '#/components/schemas/JobCollection'
3834        '400':
3835          $ref: '#/components/responses/Problem400'
3836        '401':
3837          $ref: '#/components/responses/Problem401'
3838        '404':
3839          $ref: '#/components/responses/Problem404'
3840        '405':
3841          $ref: '#/components/responses/Problem405'
3842        '406':
3843          $ref: '#/components/responses/Problem406'
3844        '503':
3845          $ref: '#/components/responses/Problem503'
3846  /extensions/run/sessions/{session_id}/jobs/{job_id}/stop:
3847    post:
3848      operationId: stopJob
3849      summary: Explicitly stop one observed process group
3850      description: No automatic retry after response loss. Read the job collection before confirming another attempt. A successful response confirms the supervisor verdict, not just signal delivery.
3851      parameters:
3852      - name: session_id
3853        in: path
3854        required: true
3855        schema:
3856          $ref: '#/components/schemas/ID'
3857      - name: job_id
3858        in: path
3859        required: true
3860        schema:
3861          $ref: '#/components/schemas/ID'
3862      responses:
3863        '200':
3864          description: The observed job's process group was stopped.
3865          content:
3866            application/json:
3867              schema:
3868                $ref: '#/components/schemas/JobStop'
3869        '400':
3870          $ref: '#/components/responses/Problem400'
3871        '401':
3872          $ref: '#/components/responses/Problem401'
3873        '404':
3874          $ref: '#/components/responses/Problem404'
3875        '405':
3876          $ref: '#/components/responses/Problem405'
3877        '406':
3878          $ref: '#/components/responses/Problem406'
3879        '413':
3880          $ref: '#/components/responses/Problem413'
3881        '415':
3882          $ref: '#/components/responses/Problem415'
3883        '503':
3884          $ref: '#/components/responses/Problem503'
3885      requestBody:
3886        required: false
3887        content:
3888          application/json:
3889            schema:
3890              type: object
3891              additionalProperties: false
3892components:
3893  securitySchemes:
3894    DaemonBearer:
3895      type: http
3896      scheme: bearer
3897      description: Daemon operator token, supplied out of band. Browser clients use fetch for authenticated
3898        JSON and SSE. No query tokens or authentication cookies.
3899    WebhookSignature:
3900      type: apiKey
3901      in: header
3902      name: X-Albedo-Signature
3903      description: Default header only. Each hook may configure another header and prefix. HMAC-SHA256
3904        over exact raw bytes; bearer is not an alternative.
3905  parameters:
3906    IfMatch:
3907      name: If-Match
3908      in: header
3909      required: true
3910      schema:
3911        $ref: '#/components/schemas/ETag'
3912      description: Observed canonical representation validator. Wildcards and weak validators are not
3913        accepted.
3914    IfNoneMatch:
3915      name: If-None-Match
3916      in: header
3917      required: true
3918      schema:
3919        const: '*'
3920      description: Conditional creation only.
3921    Limit:
3922      name: limit
3923      in: query
3924      required: false
3925      schema:
3926        type: integer
3927        minimum: 1
3928        maximum: 200
3929        default: 50
3930    Next:
3931      name: next
3932      in: query
3933      required: false
3934      schema:
3935        $ref: '#/components/schemas/PageToken'
3936  headers:
3937    ETag:
3938      description: Opaque strong validator for the complete canonical JSON representation. Mutation envelopes
3939        carry their resource validator inside the body.
3940      schema:
3941        $ref: '#/components/schemas/ETag'
3942    Location:
3943      description: URL of the created resource.
3944      schema:
3945        $ref: '#/components/schemas/ResourceURL'
3946      required: true
3947    Vary:
3948      description: Includes Accept; browser responses also include Origin.
3949      schema:
3950        type: string
3951    RetryAfter:
3952      description: Seconds until a later new admission may succeed. Never retries an already rejected
3953        identified input.
3954      schema:
3955        type: integer
3956        minimum: 0
3957        maximum: 3600
3958    WWWAuthenticate:
3959      description: Bearer challenge.
3960      schema:
3961        type: string
3962        pattern: ^Bearer
3963    Allow:
3964      description: Allowed methods for a known path.
3965      schema:
3966        type: string
3967  responses:
3968    Problem400:
3969      description: Invalid request
3970      content:
3971        application/problem+json:
3972          schema:
3973            $ref: '#/components/schemas/Problem'
3974    Problem401:
3975      description: Missing or invalid daemon token
3976      headers:
3977        WWWAuthenticate:
3978          $ref: '#/components/headers/WWWAuthenticate'
3979      content:
3980        application/problem+json:
3981          schema:
3982            $ref: '#/components/schemas/Problem'
3983    Problem403:
3984      description: Disallowed origin or caller
3985      content:
3986        application/problem+json:
3987          schema:
3988            $ref: '#/components/schemas/Problem'
3989    Problem404:
3990      description: Unknown resource or disabled service
3991      content:
3992        application/problem+json:
3993          schema:
3994            $ref: '#/components/schemas/Problem'
3995    Problem405:
3996      description: Method not allowed
3997      headers:
3998        Allow:
3999          $ref: '#/components/headers/Allow'
4000      content:
4001        application/problem+json:
4002          schema:
4003            $ref: '#/components/schemas/Problem'
4004    Problem406:
4005      description: Unsupported response media type
4006      content:
4007        application/problem+json:
4008          schema:
4009            $ref: '#/components/schemas/Problem'
4010    Problem409:
4011      description: Conflicting intent, busy state or stale catalog
4012      content:
4013        application/problem+json:
4014          schema:
4015            $ref: '#/components/schemas/Problem'
4016    Problem410:
4017      description: Expired identity, deletion tombstone or obsolete context
4018      content:
4019        application/problem+json:
4020          schema:
4021            $ref: '#/components/schemas/Problem'
4022    Problem412:
4023      description: Stale representation or failed creation condition
4024      content:
4025        application/problem+json:
4026          schema:
4027            $ref: '#/components/schemas/Problem'
4028    Problem413:
4029      description: Body too large
4030      content:
4031        application/problem+json:
4032          schema:
4033            $ref: '#/components/schemas/Problem'
4034    Problem415:
4035      description: Unsupported request media type
4036      content:
4037        application/problem+json:
4038          schema:
4039            $ref: '#/components/schemas/Problem'
4040    Problem428:
4041      description: Required precondition missing
4042      content:
4043        application/problem+json:
4044          schema:
4045            $ref: '#/components/schemas/Problem'
4046    Problem429:
4047      description: Admission limit
4048      headers:
4049        RetryAfter:
4050          $ref: '#/components/headers/RetryAfter'
4051      content:
4052        application/problem+json:
4053          schema:
4054            $ref: '#/components/schemas/Problem'
4055    Problem503:
4056      description: Unavailable owner, storage or upstream preparation
4057      content:
4058        application/problem+json:
4059          schema:
4060            $ref: '#/components/schemas/Problem'
4061  schemas:
4062    ID:
4063      type: string
4064      minLength: 1
4065      description: Opaque identity. Never infer a resource type or route from its contents.
4066      maxLength: 512
4067    UUIDv7:
4068      type: string
4069      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
4070      format: uuid
4071      description: Client-generated lowercase UUIDv7. Retained decisions are checked before timestamp
4072        expiry.
4073    Generation:
4074      type: string
4075      pattern: ^[A-Za-z0-9_-]{21}[AQgw]$
4076      description: 128 random bits encoded as unpadded base64url; new for each session actor lifetime.
4077    Counter:
4078      type: integer
4079      minimum: 0
4080      maximum: 9007199254740991
4081    Timestamp:
4082      type: string
4083      format: date-time
4084      pattern: Z$
4085      description: UTC RFC 3339.
4086    PageToken:
4087      type: string
4088      minLength: 1
4089      description: Opaque continuation, tied to the query and representation; never authority.
4090      maxLength: 4096
4091    ETag:
4092      type: string
4093      pattern: ^"[^"\r\n]+"$
4094      description: Strong opaque validator for the complete canonical representation.
4095      maxLength: 512
4096    ResourceURL:
4097      type: string
4098      pattern: ^/([^/#][^#]*)?$
4099      description: Daemon-relative URL, including any representation query. No foreign origin or fragment.
4100      maxLength: 16384
4101    Workspace:
4102      type: string
4103      minLength: 1
4104      description: Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
4105      maxLength: 4096
4106    SafeReason:
4107      type: object
4108      properties:
4109        code:
4110          type: string
4111          minLength: 1
4112          maxLength: 100
4113        detail:
4114          type: string
4115          maxLength: 4096
4116      required: [code, detail]
4117      additionalProperties: false
4118    Warnings:
4119      type: array
4120      items:
4121        $ref: '#/components/schemas/SafeReason'
4122      maxItems: 100
4123    DynamicJSON:
4124      description: 'Explicit domain payload: tool arguments, tool results, provider-private state, or
4125        extension data. JSON values of any type are allowed; no core resource uses this as its envelope.'
4126    Problem:
4127      type: object
4128      properties:
4129        type:
4130          const: about:blank
4131        title:
4132          type: string
4133          maxLength: 256
4134        status:
4135          type: integer
4136          minimum: 400
4137          maximum: 599
4138        detail:
4139          type: string
4140          maxLength: 4096
4141        code:
4142          type: string
4143          minLength: 1
4144          maxLength: 100
4145        fields:
4146          type: array
4147          items:
4148            type: object
4149            properties:
4150              pointer:
4151                type: string
4152                maxLength: 4096
4153              detail:
4154                type: string
4155                maxLength: 4096
4156            required: [pointer, detail]
4157            additionalProperties: false
4158          maxItems: 100
4159        decision:
4160          oneOf:
4161          - $ref: '#/components/schemas/CreationDecision'
4162          - $ref: '#/components/schemas/InputDecision'
4163      required: [type, title, status, detail, code]
4164      additionalProperties: false
4165      examples:
4166      - type: about:blank
4167        title: Queue full
4168        status: 429
4169        detail: This session already has 32 waiting inputs.
4170        code: queue_full
4171        decision:
4172          kind: input
4173          input:
4174            id: 01a0fcea-2b00-7000-8000-000000000002
4175            session_id: 01a0fcea-2b00-7000-8000-000000000001
4176            kind: message
4177            admission: rejected
4178            http_status: 429
4179            problem:
4180              type: about:blank
4181              title: Queue full
4182              status: 429
4183              detail: This session already has 32 waiting inputs.
4184              code: queue_full
4185            accepted_at: null
4186            acceptance_order: null
4187            delivery: null
4188            blocking_reason: null
4189            transcript_position: null
4190            turn: null
4191            client_id: draft-1
4192    EmptyRequest:
4193      type: object
4194      properties: {}
4195      additionalProperties: false
4196    Cursor:
4197      type: object
4198      properties:
4199        generation:
4200          $ref: '#/components/schemas/Generation'
4201        sequence:
4202          $ref: '#/components/schemas/Counter'
4203      required: [generation, sequence]
4204      additionalProperties: false
4205    ResourceValidator:
4206      type: object
4207      properties:
4208        url:
4209          $ref: '#/components/schemas/ResourceURL'
4210        etag:
4211          $ref: '#/components/schemas/ETag'
4212      required: [url, etag]
4213      additionalProperties: false
4214    Notification:
4215      type: object
4216      properties:
4217        state:
4218          type: string
4219          enum: [not_requested, queued, failed]
4220        code:
4221          anyOf:
4222          - type: string
4223            maxLength: 100
4224          - type: 'null'
4225        detail:
4226          anyOf:
4227          - type: string
4228            maxLength: 4096
4229          - type: 'null'
4230      required: [state, code, detail]
4231      additionalProperties: false
4232    TargetNotification:
4233      type: object
4234      properties:
4235        session_id:
4236          $ref: '#/components/schemas/ID'
4237        notification:
4238          $ref: '#/components/schemas/Notification'
4239      required: [session_id, notification]
4240      additionalProperties: false
4241    QuotaObservation:
4242      type: object
4243      properties:
4244        sequence:
4245          $ref: '#/components/schemas/Counter'
4246        provider:
4247          $ref: '#/components/schemas/ID'
4248        account_id:
4249          $ref: '#/components/schemas/ID'
4250        limit_id:
4251          type: string
4252          maxLength: 256
4253        label:
4254          type: string
4255          maxLength: 4096
4256        plan:
4257          anyOf:
4258          - type: string
4259            maxLength: 256
4260          - type: 'null'
4261        used_percent:
4262          anyOf:
4263          - type: number
4264          - type: 'null'
4265        window_label:
4266          anyOf:
4267          - type: string
4268            maxLength: 4096
4269          - type: 'null'
4270        window_seconds:
4271          anyOf:
4272          - $ref: '#/components/schemas/Counter'
4273          - type: 'null'
4274        resets_at:
4275          anyOf:
4276          - $ref: '#/components/schemas/Timestamp'
4277          - type: 'null'
4278        scope:
4279          anyOf:
4280          - type: string
4281            maxLength: 256
4282          - type: 'null'
4283        status:
4284          type: string
4285          maxLength: 256
4286        source:
4287          type: string
4288          maxLength: 256
4289        error:
4290          anyOf:
4291          - $ref: '#/components/schemas/SafeReason'
4292          - type: 'null'
4293        observed_at:
4294          $ref: '#/components/schemas/Timestamp'
4295      required:
4296      - sequence
4297      - provider
4298      - account_id
4299      - limit_id
4300      - label
4301      - plan
4302      - used_percent
4303      - window_label
4304      - window_seconds
4305      - resets_at
4306      - scope
4307      - status
4308      - source
4309      - error
4310      - observed_at
4311      additionalProperties: false
4312    QuotaPage:
4313      type: object
4314      properties:
4315        items:
4316          type: array
4317          items:
4318            $ref: '#/components/schemas/QuotaObservation'
4319          maxItems: 200
4320        next:
4321          anyOf:
4322          - $ref: '#/components/schemas/PageToken'
4323          - type: 'null'
4324      required: [items, next]
4325      additionalProperties: false
4326    Server:
4327      type: object
4328      properties:
4329        instance_id:
4330          $ref: '#/components/schemas/ID'
4331        protocol:
4332          const: 3
4333        state:
4334          type: string
4335          enum: [ready, draining]
4336        capabilities:
4337          type: object
4338          additionalProperties:
4339            type: integer
4340            minimum: 1
4341            maximum: 9007199254740991
4342        build:
4343          anyOf:
4344          - type: string
4345            maxLength: 512
4346          - type: 'null'
4347        digest:
4348          type: [string, 'null']
4349          pattern: ^[0-9a-f]{64}$
4350          description: Content digest of the running code tree; update information, not attachment compatibility.
4351        extensions:
4352          type: array
4353          items:
4354            type: object
4355            properties:
4356              name:
4357                $ref: '#/components/schemas/ID'
4358              version:
4359                type: integer
4360                minimum: 1
4361                maximum: 9007199254740991
4362            required: [name, version]
4363            additionalProperties: false
4364          maxItems: 200
4365        quota:
4366          anyOf:
4367          - type: array
4368            items:
4369              $ref: '#/components/schemas/QuotaObservation'
4370            maxItems: 200
4371          - type: 'null'
4372        notices:
4373          type: array
4374          items:
4375            type: object
4376            properties:
4377              id:
4378                $ref: '#/components/schemas/ID'
4379              kind:
4380                type: string
4381                enum: [info, warning, migration]
4382              message:
4383                type: string
4384                maxLength: 4096
4385            required: [id, kind, message]
4386            additionalProperties: false
4387          maxItems: 100
4388        quota_history:
4389          $ref: '#/components/schemas/QuotaPage'
4390      required: [instance_id, protocol, state, capabilities, build, digest, extensions, quota, notices]
4391      additionalProperties: false
4392      examples:
4393      - instance_id: instance-1
4394        protocol: 3
4395        state: ready
4396        capabilities:
4397          durable_inputs: 1
4398          session_replay: 1
4399          collection_invalidation: 1
4400          tool_progress: 1
4401          storage_report: 1
4402        build: example-build
4403        digest: null
4404        extensions:
4405        - name: work
4406          version: 1
4407        quota: null
4408        notices: []
4409    ShutdownRequest:
4410      type: object
4411      properties:
4412        instance_id:
4413          $ref: '#/components/schemas/ID'
4414        timeout_ms:
4415          type: integer
4416          minimum: 1
4417          maximum: 30000
4418          default: 5000
4419      required: [instance_id]
4420      additionalProperties: false
4421    Shutdown:
4422      type: object
4423      properties:
4424        instance_id:
4425          $ref: '#/components/schemas/ID'
4426        state:
4427          const: draining
4428      required: [instance_id, state]
4429      additionalProperties: false
4430    ProviderProfile:
4431      type: object
4432      properties:
4433        extension:
4434          $ref: '#/components/schemas/ID'
4435        endpoint:
4436          anyOf:
4437          - type: string
4438            format: uri
4439            maxLength: 4096
4440          - type: 'null'
4441        protocol:
4442          type: string
4443          enum: [responses, chat_completions]
4444        model:
4445          $ref: '#/components/schemas/ID'
4446        effort:
4447          anyOf:
4448          - type: string
4449            maxLength: 100
4450          - type: 'null'
4451        image_edge:
4452          anyOf:
4453          - type: integer
4454            minimum: 1
4455            maximum: 65536
4456          - type: 'null'
4457        account_id:
4458          anyOf:
4459          - $ref: '#/components/schemas/ID'
4460          - type: 'null'
4461        project:
4462          anyOf:
4463          - type: string
4464            maxLength: 256
4465          - type: 'null'
4466        location:
4467          anyOf:
4468          - type: string
4469            maxLength: 256
4470          - type: 'null'
4471        has_key:
4472          type: boolean
4473      required: [extension, endpoint, protocol, model, effort, image_edge, account_id, project, location, has_key]
4474      additionalProperties: false
4475    ProviderProfilePatch:
4476      type: object
4477      properties:
4478        extension:
4479          $ref: '#/components/schemas/ID'
4480        endpoint:
4481          anyOf:
4482          - type: string
4483            format: uri
4484            maxLength: 4096
4485          - type: 'null'
4486        protocol:
4487          type: string
4488          enum: [responses, chat_completions]
4489        model:
4490          $ref: '#/components/schemas/ID'
4491        effort:
4492          anyOf:
4493          - type: string
4494            maxLength: 100
4495          - type: 'null'
4496        image_edge:
4497          anyOf:
4498          - type: integer
4499            minimum: 1
4500            maximum: 65536
4501          - type: 'null'
4502        account_id:
4503          anyOf:
4504          - $ref: '#/components/schemas/ID'
4505          - type: 'null'
4506        project:
4507          anyOf:
4508          - type: string
4509            maxLength: 256
4510          - type: 'null'
4511        location:
4512          anyOf:
4513          - type: string
4514            maxLength: 256
4515          - type: 'null'
4516        api_key:
4517          anyOf:
4518          - type: string
4519            minLength: 1
4520            writeOnly: true
4521            maxLength: 16384
4522          - type: 'null'
4523      description: Partial existing profile; extension and model required when creating a new map entry.
4524      additionalProperties: false
4525    ProviderSettings:
4526      type: object
4527      properties:
4528        default_profile:
4529          anyOf:
4530          - $ref: '#/components/schemas/ID'
4531          - type: 'null'
4532        profiles:
4533          type: object
4534          additionalProperties:
4535            $ref: '#/components/schemas/ProviderProfile'
4536      required: [default_profile, profiles]
4537      additionalProperties: false
4538    ProviderSettingsPatch:
4539      type: object
4540      properties:
4541        default_profile:
4542          anyOf:
4543          - $ref: '#/components/schemas/ID'
4544          - type: 'null'
4545        profiles:
4546          type: object
4547          additionalProperties:
4548            anyOf:
4549            - $ref: '#/components/schemas/ProviderProfilePatch'
4550            - type: 'null'
4551      description: Removing the selected profile requires replacing or clearing default_profile in this
4552        same patch.
4553      additionalProperties: false
4554      examples:
4555      - default_profile: personal
4556        profiles:
4557          personal:
4558            extension: openai
4559            endpoint: https://provider.example/v1
4560            protocol: responses
4561            model: example-model
4562            effort: null
4563            image_edge: null
4564            account_id: null
4565            project: null
4566            location: null
4567            api_key: synthetic-example-key
4568    ValueSource:
4569      type: object
4570      properties:
4571        source:
4572          type: string
4573          enum: [literal, env]
4574        value:
4575          type: string
4576          maxLength: 16384
4577      description: For env, value is a daemon-host environment variable name.
4578      required: [source, value]
4579      additionalProperties: false
4580    SecretPresence:
4581      type: object
4582      properties:
4583        bearer_token:
4584          type: boolean
4585        environment:
4586          type: array
4587          items:
4588            type: string
4589            maxLength: 256
4590          maxItems: 200
4591        headers:
4592          type: array
4593          items:
4594            type: string
4595            maxLength: 256
4596          maxItems: 200
4597      required: [bearer_token, environment, headers]
4598      additionalProperties: false
4599    MCPDefinition:
4600      type: object
4601      properties:
4602        enabled:
4603          type: boolean
4604        transport:
4605          type: string
4606          enum: [stdio, http]
4607        command:
4608          anyOf:
4609          - type: string
4610            maxLength: 4096
4611          - type: 'null'
4612        arguments:
4613          type: array
4614          items:
4615            type: string
4616            maxLength: 4096
4617          maxItems: 200
4618        cwd:
4619          anyOf:
4620          - $ref: '#/components/schemas/Workspace'
4621          - type: 'null'
4622        url:
4623          anyOf:
4624          - type: string
4625            format: uri
4626            maxLength: 4096
4627          - type: 'null'
4628        environment:
4629          type: object
4630          additionalProperties:
4631            $ref: '#/components/schemas/ValueSource'
4632        headers:
4633          type: object
4634          additionalProperties:
4635            $ref: '#/components/schemas/ValueSource'
4636        bearer_token_env_var:
4637          anyOf:
4638          - type: string
4639            maxLength: 256
4640          - type: 'null'
4641        enabled_tools:
4642          anyOf:
4643          - type: array
4644            items:
4645              type: string
4646              maxLength: 256
4647            maxItems: 1000
4648          - type: 'null'
4649        disabled_tools:
4650          type: array
4651          items:
4652            type: string
4653            maxLength: 256
4654          maxItems: 1000
4655        startup_timeout_ms:
4656          type: integer
4657          minimum: 1
4658          maximum: 300000
4659        call_timeout_ms:
4660          type: integer
4661          minimum: 1
4662          maximum: 3600000
4663        secret_presence:
4664          $ref: '#/components/schemas/SecretPresence'
4665      required: [enabled, transport, command, arguments, cwd, url, environment, headers, bearer_token_env_var,
4666        enabled_tools, disabled_tools, startup_timeout_ms, call_timeout_ms, secret_presence]
4667      additionalProperties: false
4668    MCPSecretsPatch:
4669      type: object
4670      properties:
4671        bearer_token:
4672          anyOf:
4673          - type: string
4674            minLength: 1
4675            writeOnly: true
4676            maxLength: 16384
4677          - type: 'null'
4678        environment:
4679          type: object
4680          additionalProperties:
4681            anyOf:
4682            - type: string
4683              writeOnly: true
4684              maxLength: 16384
4685            - type: 'null'
4686        headers:
4687          type: object
4688          additionalProperties:
4689            anyOf:
4690            - type: string
4691              writeOnly: true
4692              maxLength: 16384
4693            - type: 'null'
4694      writeOnly: true
4695      additionalProperties: false
4696    MCPDefinitionPatch:
4697      type: object
4698      properties:
4699        enabled:
4700          type: boolean
4701        transport:
4702          type: string
4703          enum: [stdio, http]
4704        command:
4705          anyOf:
4706          - type: string
4707            maxLength: 4096
4708          - type: 'null'
4709        arguments:
4710          type: array
4711          items:
4712            type: string
4713            maxLength: 4096
4714          maxItems: 200
4715        cwd:
4716          anyOf:
4717          - $ref: '#/components/schemas/Workspace'
4718          - type: 'null'
4719        url:
4720          anyOf:
4721          - type: string
4722            format: uri
4723            maxLength: 4096
4724          - type: 'null'
4725        environment:
4726          anyOf:
4727          - type: object
4728            additionalProperties:
4729              anyOf:
4730              - $ref: '#/components/schemas/ValueSource'
4731              - type: 'null'
4732          - type: 'null'
4733        headers:
4734          anyOf:
4735          - type: object
4736            additionalProperties:
4737              anyOf:
4738              - $ref: '#/components/schemas/ValueSource'
4739              - type: 'null'
4740          - type: 'null'
4741        bearer_token_env_var:
4742          anyOf:
4743          - type: string
4744            maxLength: 256
4745          - type: 'null'
4746        enabled_tools:
4747          anyOf:
4748          - type: array
4749            items:
4750              type: string
4751              maxLength: 256
4752            maxItems: 1000
4753          - type: 'null'
4754        disabled_tools:
4755          type: array
4756          items:
4757            type: string
4758            maxLength: 256
4759          maxItems: 1000
4760        startup_timeout_ms:
4761          type: integer
4762          minimum: 1
4763          maximum: 300000
4764        call_timeout_ms:
4765          type: integer
4766          minimum: 1
4767          maximum: 3600000
4768        secrets:
4769          $ref: '#/components/schemas/MCPSecretsPatch'
4770      description: Partial merge patch. Public and secret sources cannot overlap. HTTP and stdio fields
4771        are validated against transport on the complete candidate. Public environment/header entries accept
4772        null removal; a null whole map clears it. Switching credential sources removes the former source
4773        in the same patch.
4774      additionalProperties: false
4775    MCPSettings:
4776      type: object
4777      properties:
4778        definitions:
4779          type: object
4780          additionalProperties:
4781            $ref: '#/components/schemas/MCPDefinition'
4782      required: [definitions]
4783      additionalProperties: false
4784    MCPSettingsPatch:
4785      type: object
4786      properties:
4787        definitions:
4788          type: object
4789          additionalProperties:
4790            anyOf:
4791            - $ref: '#/components/schemas/MCPDefinitionPatch'
4792            - type: 'null'
4793        validate_connection:
4794          type: boolean
4795          default: true
4796          writeOnly: true
4797      description: Validate candidate connections before atomic commit unless explicitly disabled.
4798      additionalProperties: false
4799      examples:
4800      - validate_connection: true
4801        definitions:
4802          example:
4803            enabled: true
4804            transport: http
4805            url: https://tools.example/mcp
4806            secrets:
4807              bearer_token: synthetic-example-token
4808    ExtensionSettings:
4809      type: object
4810      properties:
4811        defaults:
4812          type: object
4813          additionalProperties:
4814            type: boolean
4815      required: [defaults]
4816      additionalProperties: false
4817    ExtensionSettingsPatch:
4818      type: object
4819      properties:
4820        defaults:
4821          type: object
4822          additionalProperties:
4823            anyOf:
4824            - type: boolean
4825            - type: 'null'
4826      additionalProperties: false
4827    CapabilitySettings:
4828      type: object
4829      properties:
4830        preferences:
4831          type: object
4832          additionalProperties:
4833            type: boolean
4834      required: [preferences]
4835      additionalProperties: false
4836    CapabilitySettingsPatch:
4837      type: object
4838      properties:
4839        catalog_session_id:
4840          $ref: '#/components/schemas/ID'
4841        catalog_revision:
4842          $ref: '#/components/schemas/ID'
4843        choices:
4844          type: object
4845          additionalProperties:
4846            anyOf:
4847            - type: boolean
4848            - type: 'null'
4849      description: Resolve candidate IDs to stable preference keys under the observed catalog revision.
4850      required: [catalog_session_id, catalog_revision, choices]
4851      additionalProperties: false
4852    CachePrior:
4853      type: object
4854      properties:
4855        provider:
4856          $ref: '#/components/schemas/ID'
4857        model:
4858          anyOf:
4859          - $ref: '#/components/schemas/ID'
4860          - type: 'null'
4861        ttl_seconds:
4862          anyOf:
4863          - type: integer
4864            minimum: 0
4865            maximum: 9007199254740991
4866          - type: 'null'
4867        source:
4868          type: string
4869          maxLength: 256
4870      required: [provider, model, ttl_seconds, source]
4871      additionalProperties: false
4872    ModelSettings:
4873      type: object
4874      properties:
4875        raised_caps:
4876          type: object
4877          additionalProperties:
4878            type: boolean
4879        cache_ttl_priors:
4880          type: array
4881          items:
4882            $ref: '#/components/schemas/CachePrior'
4883          maxItems: 200
4884      required: [raised_caps, cache_ttl_priors]
4885      additionalProperties: false
4886    ModelSettingsPatch:
4887      type: object
4888      properties:
4889        raised_caps:
4890          type: object
4891          additionalProperties:
4892            anyOf:
4893            - type: boolean
4894            - type: 'null'
4895      description: Keys are cap_key values from model metadata. True raises to the advertised maximum;
4896        false uses the ordinary limit; null clears the choice. A missing choice defaults to false. Only
4897        raised_caps is writable.
4898      additionalProperties: false
4899    UISettings:
4900      type: object
4901      properties:
4902        thinking:
4903          type: boolean
4904        tools:
4905          type: boolean
4906        dismissed_notices:
4907          type: array
4908          items:
4909            $ref: '#/components/schemas/ID'
4910          maxItems: 1000
4911      required: [thinking, tools, dismissed_notices]
4912      additionalProperties: false
4913    UISettingsPatch:
4914      type: object
4915      properties:
4916        thinking:
4917          type: boolean
4918        tools:
4919          type: boolean
4920        dismissed_notices:
4921          type: array
4922          items:
4923            $ref: '#/components/schemas/ID'
4924          maxItems: 1000
4925      additionalProperties: false
4926    ProviderSettingsResource:
4927      type: object
4928      properties:
4929        url:
4930          $ref: '#/components/schemas/ResourceURL'
4931        etag:
4932          $ref: '#/components/schemas/ETag'
4933        value:
4934          $ref: '#/components/schemas/ProviderSettings'
4935      required: [url, etag, value]
4936      additionalProperties: false
4937    MCPSettingsResource:
4938      type: object
4939      properties:
4940        url:
4941          $ref: '#/components/schemas/ResourceURL'
4942        etag:
4943          $ref: '#/components/schemas/ETag'
4944        value:
4945          $ref: '#/components/schemas/MCPSettings'
4946      required: [url, etag, value]
4947      additionalProperties: false
4948    ExtensionSettingsResource:
4949      type: object
4950      properties:
4951        url:
4952          $ref: '#/components/schemas/ResourceURL'
4953        etag:
4954          $ref: '#/components/schemas/ETag'
4955        value:
4956          $ref: '#/components/schemas/ExtensionSettings'
4957      required: [url, etag, value]
4958      additionalProperties: false
4959    CapabilitySettingsResource:
4960      type: object
4961      properties:
4962        url:
4963          $ref: '#/components/schemas/ResourceURL'
4964        etag:
4965          $ref: '#/components/schemas/ETag'
4966        value:
4967          $ref: '#/components/schemas/CapabilitySettings'
4968      required: [url, etag, value]
4969      additionalProperties: false
4970    ModelSettingsResource:
4971      type: object
4972      properties:
4973        url:
4974          $ref: '#/components/schemas/ResourceURL'
4975        etag:
4976          $ref: '#/components/schemas/ETag'
4977        value:
4978          $ref: '#/components/schemas/ModelSettings'
4979      required: [url, etag, value]
4980      additionalProperties: false
4981    UISettingsResource:
4982      type: object
4983      properties:
4984        url:
4985          $ref: '#/components/schemas/ResourceURL'
4986        etag:
4987          $ref: '#/components/schemas/ETag'
4988        value:
4989          $ref: '#/components/schemas/UISettings'
4990      required: [url, etag, value]
4991      additionalProperties: false
4992    Settings:
4993      type: object
4994      properties:
4995        providers:
4996          $ref: '#/components/schemas/ProviderSettings'
4997        mcp:
4998          $ref: '#/components/schemas/MCPSettings'
4999        extensions:
5000          $ref: '#/components/schemas/ExtensionSettings'
5001        capabilities:
5002          $ref: '#/components/schemas/CapabilitySettings'
5003        models:
5004          $ref: '#/components/schemas/ModelSettings'
5005        ui:
5006          $ref: '#/components/schemas/UISettings'
5007        group_resources:
5008          type: object
5009          properties:
5010            providers:
5011              $ref: '#/components/schemas/ResourceValidator'
5012            mcp:
5013              $ref: '#/components/schemas/ResourceValidator'
5014            extensions:
5015              $ref: '#/components/schemas/ResourceValidator'
5016            capabilities:
5017              $ref: '#/components/schemas/ResourceValidator'
5018            models:
5019              $ref: '#/components/schemas/ResourceValidator'
5020            ui:
5021              $ref: '#/components/schemas/ResourceValidator'
5022          required: [providers, mcp, extensions, capabilities, models, ui]
5023          additionalProperties: false
5024      required: [providers, mcp, extensions, capabilities, models, ui, group_resources]
5025      additionalProperties: false
5026    SettingsRead:
5027      oneOf:
5028      - $ref: '#/components/schemas/Settings'
5029      - $ref: '#/components/schemas/ProviderSettings'
5030      - $ref: '#/components/schemas/MCPSettings'
5031      - $ref: '#/components/schemas/ExtensionSettings'
5032      - $ref: '#/components/schemas/CapabilitySettings'
5033      - $ref: '#/components/schemas/ModelSettings'
5034      - $ref: '#/components/schemas/UISettings'
5035    SettingsPatch:
5036      anyOf:
5037      - $ref: '#/components/schemas/ProviderSettingsPatch'
5038      - $ref: '#/components/schemas/MCPSettingsPatch'
5039      - $ref: '#/components/schemas/ExtensionSettingsPatch'
5040      - $ref: '#/components/schemas/CapabilitySettingsPatch'
5041      - $ref: '#/components/schemas/ModelSettingsPatch'
5042      - $ref: '#/components/schemas/UISettingsPatch'
5043      description: The group query selects the one applicable patch schema. It is an error to send fields
5044        for another group.
5045    SettingsApplication:
5046      type: object
5047      properties:
5048        desired_revision:
5049          $ref: '#/components/schemas/ID'
5050        active_service_revision:
5051          anyOf:
5052          - $ref: '#/components/schemas/ID'
5053          - type: 'null'
5054        composition_changed:
5055          type: boolean
5056          description: Whether this save changed the desired composition, so loaded sessions need a
5057            reload to apply it. Always false for providers, models and ui. A concurrent save to another
5058            composition group can make it true. GET /sessions?needs_reload=true lists the sessions.
5059        validation:
5060          type: string
5061          enum: [passed, skipped, not_applicable]
5062        warnings:
5063          $ref: '#/components/schemas/Warnings'
5064      required: [desired_revision, active_service_revision, composition_changed, validation, warnings]
5065      additionalProperties: false
5066    ProviderSettingsChange:
5067      type: object
5068      properties:
5069        group:
5070          const: providers
5071        resource:
5072          $ref: '#/components/schemas/ProviderSettingsResource'
5073        application:
5074          $ref: '#/components/schemas/SettingsApplication'
5075      required: [group, resource, application]
5076      additionalProperties: false
5077    MCPSettingsChange:
5078      type: object
5079      properties:
5080        group:
5081          const: mcp
5082        resource:
5083          $ref: '#/components/schemas/MCPSettingsResource'
5084        application:
5085          $ref: '#/components/schemas/SettingsApplication'
5086      required: [group, resource, application]
5087      additionalProperties: false
5088    ExtensionSettingsChange:
5089      type: object
5090      properties:
5091        group:
5092          const: extensions
5093        resource:
5094          $ref: '#/components/schemas/ExtensionSettingsResource'
5095        application:
5096          $ref: '#/components/schemas/SettingsApplication'
5097      required: [group, resource, application]
5098      additionalProperties: false
5099    CapabilitySettingsChange:
5100      type: object
5101      properties:
5102        group:
5103          const: capabilities
5104        resource:
5105          $ref: '#/components/schemas/CapabilitySettingsResource'
5106        application:
5107          $ref: '#/components/schemas/SettingsApplication'
5108      required: [group, resource, application]
5109      additionalProperties: false
5110    ModelSettingsChange:
5111      type: object
5112      properties:
5113        group:
5114          const: models
5115        resource:
5116          $ref: '#/components/schemas/ModelSettingsResource'
5117        application:
5118          $ref: '#/components/schemas/SettingsApplication'
5119      required: [group, resource, application]
5120      additionalProperties: false
5121    UISettingsChange:
5122      type: object
5123      properties:
5124        group:
5125          const: ui
5126        resource:
5127          $ref: '#/components/schemas/UISettingsResource'
5128        application:
5129          $ref: '#/components/schemas/SettingsApplication'
5130      required: [group, resource, application]
5131      additionalProperties: false
5132    SettingsChange:
5133      oneOf:
5134      - $ref: '#/components/schemas/ProviderSettingsChange'
5135      - $ref: '#/components/schemas/MCPSettingsChange'
5136      - $ref: '#/components/schemas/ExtensionSettingsChange'
5137      - $ref: '#/components/schemas/CapabilitySettingsChange'
5138      - $ref: '#/components/schemas/ModelSettingsChange'
5139      - $ref: '#/components/schemas/UISettingsChange'
5140    StorageSession:
5141      type: object
5142      properties:
5143        id:
5144          $ref: '#/components/schemas/ID'
5145        title:
5146          type: string
5147          maxLength: 4096
5148        workspace:
5149          $ref: '#/components/schemas/Workspace'
5150        created_at:
5151          anyOf:
5152          - $ref: '#/components/schemas/Timestamp'
5153          - type: 'null'
5154        activity_at:
5155          anyOf:
5156          - $ref: '#/components/schemas/Timestamp'
5157          - type: 'null'
5158        estimated_content_bytes:
5159          $ref: '#/components/schemas/Counter'
5160      required: [id, title, workspace, created_at, activity_at, estimated_content_bytes]
5161      additionalProperties: false
5162    StorageFile:
5163      type: object
5164      properties:
5165        path:
5166          type: string
5167          maxLength: 4096
5168        category:
5169          type: string
5170          enum: [kernel, backup, other]
5171        bytes:
5172          $ref: '#/components/schemas/Counter'
5173        modified_at:
5174          anyOf:
5175          - $ref: '#/components/schemas/Timestamp'
5176          - type: 'null'
5177        cleanup_candidate:
5178          type: boolean
5179        cleanup_reason:
5180          anyOf:
5181          - type: string
5182            maxLength: 100
5183          - type: 'null'
5184      required: [path, category, bytes, modified_at, cleanup_candidate, cleanup_reason]
5185      additionalProperties: false
5186    StorageSessionPage:
5187      type: object
5188      properties:
5189        items:
5190          type: array
5191          items:
5192            $ref: '#/components/schemas/StorageSession'
5193          maxItems: 200
5194        next:
5195          anyOf:
5196          - $ref: '#/components/schemas/PageToken'
5197          - type: 'null'
5198        total_count:
5199          $ref: '#/components/schemas/Counter'
5200        total_estimated_content_bytes:
5201          $ref: '#/components/schemas/Counter'
5202      required: [items, next, total_count, total_estimated_content_bytes]
5203      additionalProperties: false
5204    StorageFilePage:
5205      type: object
5206      properties:
5207        items:
5208          type: array
5209          items:
5210            $ref: '#/components/schemas/StorageFile'
5211          maxItems: 200
5212        next:
5213          anyOf:
5214          - $ref: '#/components/schemas/PageToken'
5215          - type: 'null'
5216        totals:
5217          type: object
5218          properties:
5219            kernel_bytes:
5220              $ref: '#/components/schemas/Counter'
5221            backup_bytes:
5222              $ref: '#/components/schemas/Counter'
5223            other_bytes:
5224              $ref: '#/components/schemas/Counter'
5225            recent_backup_bytes:
5226              $ref: '#/components/schemas/Counter'
5227            recent_backup_count:
5228              $ref: '#/components/schemas/Counter'
5229          required: [kernel_bytes, backup_bytes, other_bytes, recent_backup_bytes, recent_backup_count]
5230          additionalProperties: false
5231      required: [items, next, totals]
5232      additionalProperties: false
5233    StorageReport:
5234      type: object
5235      properties:
5236        database:
5237          type: object
5238          properties:
5239            main_file_bytes:
5240              $ref: '#/components/schemas/Counter'
5241            wal_bytes:
5242              $ref: '#/components/schemas/Counter'
5243            page_size_bytes:
5244              $ref: '#/components/schemas/Counter'
5245            page_count:
5246              $ref: '#/components/schemas/Counter'
5247            free_page_count:
5248              $ref: '#/components/schemas/Counter'
5249            used_bytes:
5250              $ref: '#/components/schemas/Counter'
5251          required: [main_file_bytes, wal_bytes, page_size_bytes, page_count, free_page_count, used_bytes]
5252          additionalProperties: false
5253        sessions:
5254          $ref: '#/components/schemas/StorageSessionPage'
5255        images:
5256          type: object
5257          properties:
5258            count:
5259              $ref: '#/components/schemas/Counter'
5260            bytes:
5261              $ref: '#/components/schemas/Counter'
5262          required: [count, bytes]
5263          additionalProperties: false
5264        files:
5265          $ref: '#/components/schemas/StorageFilePage'
5266        measured_at:
5267          $ref: '#/components/schemas/Timestamp'
5268      required: [database, sessions, images, files, measured_at]
5269      additionalProperties: false
5270      examples:
5271      - database:
5272          main_file_bytes: 8192
5273          wal_bytes: 0
5274          page_size_bytes: 4096
5275          page_count: 2
5276          free_page_count: 0
5277          used_bytes: 8192
5278        sessions:
5279          items: []
5280          next: null
5281          total_count: 0
5282          total_estimated_content_bytes: 0
5283        images:
5284          count: 0
5285          bytes: 0
5286        files:
5287          items: []
5288          next: null
5289          totals:
5290            kernel_bytes: 0
5291            backup_bytes: 0
5292            other_bytes: 0
5293            recent_backup_bytes: 0
5294            recent_backup_count: 0
5295        measured_at: '2026-10-02T14:00:00Z'
5296    SessionStatus:
5297      type: object
5298      properties:
5299        phase:
5300          type: string
5301          enum: [idle, preparing, generating, running, interrupting, compacting]
5302        run_id:
5303          anyOf:
5304          - $ref: '#/components/schemas/ID'
5305          - type: 'null'
5306        interrupt_requested:
5307          type: boolean
5308        blocking_reason:
5309          anyOf:
5310          - $ref: '#/components/schemas/SafeReason'
5311          - type: 'null'
5312      required: [phase, run_id, interrupt_requested, blocking_reason]
5313      additionalProperties: false
5314    Preview:
5315      type: object
5316      properties:
5317        text:
5318          type: string
5319          x-max-utf8-bytes: 1024
5320          maxLength: 256
5321        transcript_count:
5322          $ref: '#/components/schemas/Counter'
5323        truncated:
5324          type: boolean
5325      required: [text, transcript_count, truncated]
5326      additionalProperties: false
5327    SessionPreferences:
5328      type: object
5329      properties:
5330        pinned:
5331          type: boolean
5332        pin_order:
5333          anyOf:
5334          - $ref: '#/components/schemas/Counter'
5335          - type: 'null'
5336        archived:
5337          type: boolean
5338        opens:
5339          $ref: '#/components/schemas/Counter'
5340      required: [pinned, pin_order, archived, opens]
5341      additionalProperties: false
5342    PreferencePatch:
5343      type: object
5344      properties:
5345        pinned:
5346          type: boolean
5347        archived:
5348          type: boolean
5349      additionalProperties: false
5350    ProgressPreview:
5351      type: object
5352      properties:
5353        offset_scalars:
5354          $ref: '#/components/schemas/Counter'
5355        text:
5356          type: string
5357          x-max-utf8-bytes: 2048
5358          maxLength: 512
5359      required: [offset_scalars, text]
5360      additionalProperties: false
5361    ToolProgress:
5362      type: object
5363      properties:
5364        call_id:
5365          $ref: '#/components/schemas/ID'
5366        tool_call_id:
5367          anyOf:
5368          - type: string
5369            minLength: 1
5370            x-max-utf8-bytes: 200
5371            maxLength: 200
5372          - type: 'null'
5373        name:
5374          type: string
5375          minLength: 1
5376          x-max-utf8-bytes: 100
5377          maxLength: 100
5378        phase:
5379          type: string
5380          enum: [generating, running]
5381        intent:
5382          type: string
5383          enum: [read, search, list, run, unknown]
5384        preview:
5385          $ref: '#/components/schemas/ProgressPreview'
5386      x-max-encoded-bytes: 8192
5387      required: [call_id, tool_call_id, name, phase, intent]
5388      additionalProperties: false
5389      examples:
5390      - call_id: progress-1
5391        tool_call_id: null
5392        name: python
5393        phase: generating
5394        intent: unknown
5395        preview:
5396          offset_scalars: 0
5397          text: print("hello")
5398    AgentRequest:
5399      type: object
5400      properties:
5401        input_id:
5402          $ref: '#/components/schemas/ID'
5403        text:
5404          type: string
5405          maxLength: 512
5406      required: [input_id, text]
5407      additionalProperties: false
5408    Activity:
5409      type: object
5410      properties:
5411        lines:
5412          type: array
5413          items:
5414            type: object
5415            properties:
5416              kind:
5417                type: string
5418                enum: [assistant, thinking, tool, input, note, error]
5419              text:
5420                type: string
5421                x-max-utf8-bytes: 1024
5422                maxLength: 256
5423            required: [kind, text]
5424            additionalProperties: false
5425          maxItems: 12
5426        output_scalars:
5427          $ref: '#/components/schemas/Counter'
5428        output_utf8_bytes:
5429          $ref: '#/components/schemas/Counter'
5430        observed_at:
5431          $ref: '#/components/schemas/Timestamp'
5432        latest_input:
5433          anyOf:
5434          - type: object
5435            properties:
5436              input_id:
5437                $ref: '#/components/schemas/ID'
5438              source:
5439                type: string
5440                enum: [chat, agent, system]
5441              bytes:
5442                $ref: '#/components/schemas/Counter'
5443            required: [input_id, source, bytes]
5444            additionalProperties: false
5445          - type: 'null'
5446        current_request:
5447          anyOf:
5448          - $ref: '#/components/schemas/AgentRequest'
5449          - type: 'null'
5450        latest_progress:
5451          anyOf:
5452          - type: string
5453            maxLength: 512
5454          - type: 'null'
5455        latest_answer:
5456          anyOf:
5457          - type: object
5458            properties:
5459              message_id:
5460                $ref: '#/components/schemas/ID'
5461              bytes:
5462                $ref: '#/components/schemas/Counter'
5463            required: [message_id, bytes]
5464            additionalProperties: false
5465          - type: 'null'
5466      x-max-encoded-bytes: 16384
5467      required: [lines, output_scalars, output_utf8_bytes, observed_at, latest_input, latest_answer]
5468      additionalProperties: false
5469    SessionLocation:
5470      type: object
5471      description: Parsed workspace and daemon-resolved display label. Reading this metadata does not connect to the remote host.
5472      properties:
5473        host:
5474          anyOf:
5475          - type: string
5476            maxLength: 4096
5477          - type: 'null'
5478        user:
5479          anyOf:
5480          - type: string
5481            maxLength: 4096
5482          - type: 'null'
5483        path:
5484          type: string
5485          maxLength: 16384
5486        label:
5487          anyOf:
5488          - type: string
5489            maxLength: 8192
5490          - type: 'null'
5491      required: [host, user, path, label]
5492      additionalProperties: false
5493    SessionSummary:
5494      type: object
5495      properties:
5496        id:
5497          $ref: '#/components/schemas/ID'
5498        name:
5499          type: string
5500          maxLength: 4096
5501        automatic_name:
5502          type: string
5503          maxLength: 4096
5504        location:
5505          $ref: '#/components/schemas/SessionLocation'
5506        workspace:
5507          $ref: '#/components/schemas/Workspace'
5508        parent_id:
5509          anyOf:
5510          - $ref: '#/components/schemas/ID'
5511          - type: 'null'
5512        root_id:
5513          $ref: '#/components/schemas/ID'
5514        address:
5515          anyOf:
5516          - type: string
5517            maxLength: 512
5518          - type: 'null'
5519        depth:
5520          type: integer
5521          minimum: 0
5522          maximum: 1000
5523        closed:
5524          type: boolean
5525        created_at:
5526          anyOf:
5527          - $ref: '#/components/schemas/Timestamp'
5528          - type: 'null'
5529        activity_at:
5530          anyOf:
5531          - $ref: '#/components/schemas/Timestamp'
5532          - type: 'null'
5533        provider_profile:
5534          anyOf:
5535          - $ref: '#/components/schemas/ID'
5536          - type: 'null'
5537        model:
5538          anyOf:
5539          - $ref: '#/components/schemas/ID'
5540          - type: 'null'
5541        effort:
5542          anyOf:
5543          - type: string
5544            maxLength: 100
5545          - type: 'null'
5546        status:
5547          $ref: '#/components/schemas/SessionStatus'
5548        preview:
5549          $ref: '#/components/schemas/Preview'
5550        preferences:
5551          $ref: '#/components/schemas/SessionPreferences'
5552        current_progress:
5553          type: array
5554          items:
5555            $ref: '#/components/schemas/ToolProgress'
5556          maxItems: 32
5557        activity:
5558          $ref: '#/components/schemas/Activity'
5559        cursor:
5560          anyOf:
5561          - $ref: '#/components/schemas/Cursor'
5562          - type: 'null'
5563      description: Live fields and cursor are captured together. Extra response fields may be ignored.
5564      required: [id, name, automatic_name, workspace, location, parent_id, root_id, address, depth, closed, created_at,
5565        activity_at, provider_profile, model, effort, status, preview, preferences, current_progress,
5566        activity, cursor]
5567    SessionPage:
5568      type: object
5569      properties:
5570        items:
5571          type: array
5572          items:
5573            $ref: '#/components/schemas/SessionSummary'
5574          maxItems: 200
5575        next:
5576          anyOf:
5577          - $ref: '#/components/schemas/PageToken'
5578          - type: 'null'
5579        family:
5580          type: object
5581          properties:
5582            root_id:
5583              $ref: '#/components/schemas/ID'
5584            revision:
5585              $ref: '#/components/schemas/ID'
5586          required: [root_id, revision]
5587          additionalProperties: false
5588      required: [items, next]
5589      additionalProperties: false
5590      examples:
5591      - items:
5592        - id: 01a0fcea-2b00-7000-8000-000000000001
5593          name: New session
5594          automatic_name: New session
5595          workspace: /workspace/project
5596          location:
5597            host: null
5598            user: null
5599            path: /workspace/project
5600            label: null
5601          parent_id: null
5602          root_id: 01a0fcea-2b00-7000-8000-000000000001
5603          address: null
5604          depth: 0
5605          closed: false
5606          created_at: '2026-10-02T14:00:00Z'
5607          activity_at: '2026-10-02T14:00:00Z'
5608          provider_profile: personal
5609          model: example-model
5610          effort: null
5611          status:
5612            phase: idle
5613            run_id: null
5614            interrupt_requested: false
5615            blocking_reason: null
5616          preview:
5617            text: ''
5618            transcript_count: 0
5619            truncated: false
5620          preferences:
5621            pinned: false
5622            pin_order: null
5623            archived: false
5624            opens: 0
5625          current_progress: []
5626          active_output: []
5627          activity:
5628            lines: []
5629            output_scalars: 0
5630            output_utf8_bytes: 0
5631            observed_at: '2026-10-02T14:00:00Z'
5632            latest_input: null
5633            latest_answer: null
5634          cursor:
5635            generation: J6kYj6IGcXyP3eMIp-WL3A
5636            sequence: 0
5637        next: null
5638    SelectionOverrides:
5639      type: object
5640      properties:
5641        extensions:
5642          type: object
5643          additionalProperties:
5644            anyOf:
5645            - type: boolean
5646            - type: 'null'
5647        skills:
5648          type: object
5649          additionalProperties:
5650            anyOf:
5651            - type: boolean
5652            - type: 'null'
5653        instructions:
5654          type: object
5655          additionalProperties:
5656            anyOf:
5657            - type: boolean
5658            - type: 'null'
5659        mcp:
5660          type: object
5661          additionalProperties:
5662            anyOf:
5663            - type: boolean
5664            - type: 'null'
5665      required: [extensions, skills, instructions, mcp]
5666      additionalProperties: false
5667    SelectionPatch:
5668      type: object
5669      properties:
5670        extensions:
5671          anyOf:
5672          - type: object
5673            additionalProperties:
5674              anyOf:
5675              - type: boolean
5676              - type: 'null'
5677          - type: 'null'
5678        skills:
5679          anyOf:
5680          - type: object
5681            additionalProperties:
5682              anyOf:
5683              - type: boolean
5684              - type: 'null'
5685          - type: 'null'
5686        instructions:
5687          anyOf:
5688          - type: object
5689            additionalProperties:
5690              anyOf:
5691              - type: boolean
5692              - type: 'null'
5693          - type: 'null'
5694        mcp:
5695          anyOf:
5696          - type: object
5697            additionalProperties:
5698              anyOf:
5699              - type: boolean
5700              - type: 'null'
5701          - type: 'null'
5702      description: Null map entry clears that override. Null entire map clears all overrides of that kind.
5703      additionalProperties: false
5704    SessionSelection:
5705      type: object
5706      properties:
5707        overrides:
5708          $ref: '#/components/schemas/SelectionOverrides'
5709        effective:
5710          type: object
5711          properties:
5712            extensions:
5713              type: object
5714              additionalProperties:
5715                type: boolean
5716            skills:
5717              type: object
5718              additionalProperties:
5719                type: boolean
5720            instructions:
5721              type: object
5722              additionalProperties:
5723                type: boolean
5724            mcp:
5725              type: object
5726              additionalProperties:
5727                type: boolean
5728          required: [extensions, skills, instructions, mcp]
5729          additionalProperties: false
5730      required: [overrides, effective]
5731      additionalProperties: false
5732    SessionConfiguration:
5733      type: object
5734      properties:
5735        id:
5736          $ref: '#/components/schemas/ID'
5737        name:
5738          description: Explicit name. Null shows the automatic title for a root, or the family name for a child; the session representation carries the displayed name.
5739          anyOf:
5740          - type: string
5741            maxLength: 4096
5742          - type: 'null'
5743        workspace:
5744          $ref: '#/components/schemas/Workspace'
5745        provider_profile:
5746          anyOf:
5747          - $ref: '#/components/schemas/ID'
5748          - type: 'null'
5749        model:
5750          anyOf:
5751          - $ref: '#/components/schemas/ID'
5752          - type: 'null'
5753        effort:
5754          anyOf:
5755          - type: string
5756            maxLength: 100
5757          - type: 'null'
5758        preferences:
5759          type: object
5760          properties:
5761            pinned:
5762              type: boolean
5763            pin_order:
5764              anyOf:
5765              - $ref: '#/components/schemas/Counter'
5766              - type: 'null'
5767            archived:
5768              type: boolean
5769          required: [pinned, pin_order, archived]
5770          additionalProperties: false
5771        selection:
5772          $ref: '#/components/schemas/SelectionOverrides'
5773        revision:
5774          $ref: '#/components/schemas/ID'
5775        family_revision:
5776          $ref: '#/components/schemas/ID'
5777      required: [id, name, workspace, provider_profile, model, effort, preferences, selection, revision,
5778        family_revision]
5779      additionalProperties: false
5780      examples:
5781      - id: 01a0fcea-2b00-7000-8000-000000000001
5782        name: null
5783        workspace: /workspace/project
5784        provider_profile: personal
5785        model: example-model
5786        effort: null
5787        preferences:
5788          pinned: false
5789          pin_order: null
5790          archived: false
5791        selection:
5792          extensions: {}
5793          skills: {}
5794          instructions: {}
5795          mcp: {}
5796        revision: config-1
5797        family_revision: family-1
5798    SessionConfigurationResource:
5799      type: object
5800      properties:
5801        url:
5802          $ref: '#/components/schemas/ResourceURL'
5803        etag:
5804          $ref: '#/components/schemas/ETag'
5805        value:
5806          $ref: '#/components/schemas/SessionConfiguration'
5807      required: [url, etag, value]
5808      additionalProperties: false
5809    SessionPatch:
5810      type: object
5811      properties:
5812        name:
5813          anyOf:
5814          - type: string
5815            maxLength: 4096
5816          - type: 'null'
5817        provider_profile:
5818          $ref: '#/components/schemas/ID'
5819        model:
5820          $ref: '#/components/schemas/ID'
5821        effort:
5822          anyOf:
5823          - type: string
5824            maxLength: 100
5825          - type: 'null'
5826        preferences:
5827          $ref: '#/components/schemas/PreferencePatch'
5828        selection:
5829          $ref: '#/components/schemas/SelectionPatch'
5830        catalog_revision:
5831          $ref: '#/components/schemas/ID'
5832      description: Skill and instruction changes require catalog_revision. All fields validate and commit
5833        together.
5834      additionalProperties: false
5835      examples:
5836      - selection:
5837          extensions:
5838            browser: null
5839          skills:
5840            candidate-1: false
5841        catalog_revision: discovery-1
5842    WorkspaceMoveRequest:
5843      type: object
5844      properties:
5845        workspace:
5846          $ref: '#/components/schemas/Workspace'
5847        family_revision:
5848          $ref: '#/components/schemas/ID'
5849      required: [workspace, family_revision]
5850      additionalProperties: false
5851      examples:
5852      - workspace: /workspace/other-project
5853        family_revision: family-1
5854    SessionChangeRequest:
5855      oneOf:
5856      - $ref: '#/components/schemas/SessionPatch'
5857      - $ref: '#/components/schemas/WorkspaceMoveRequest'
5858    NewSessionRequest:
5859      type: object
5860      properties:
5861        kind:
5862          const: new
5863        workspace:
5864          $ref: '#/components/schemas/Workspace'
5865        name:
5866          anyOf:
5867          - type: string
5868            maxLength: 4096
5869          - type: 'null'
5870        provider_profile:
5871          anyOf:
5872          - $ref: '#/components/schemas/ID'
5873          - type: 'null'
5874        model:
5875          anyOf:
5876          - $ref: '#/components/schemas/ID'
5877          - type: 'null'
5878        effort:
5879          anyOf:
5880          - type: string
5881            maxLength: 100
5882          - type: 'null'
5883      required: [kind, workspace]
5884      additionalProperties: false
5885      examples:
5886      - kind: new
5887        workspace: /workspace/project
5888    NewSessionIntent:
5889      type: object
5890      properties:
5891        kind:
5892          const: new
5893        workspace:
5894          $ref: '#/components/schemas/Workspace'
5895        name:
5896          anyOf:
5897          - type: string
5898            maxLength: 4096
5899          - type: 'null'
5900        provider_profile:
5901          anyOf:
5902          - $ref: '#/components/schemas/ID'
5903          - type: 'null'
5904        model:
5905          anyOf:
5906          - $ref: '#/components/schemas/ID'
5907          - type: 'null'
5908        effort:
5909          anyOf:
5910          - type: string
5911            maxLength: 100
5912          - type: 'null'
5913      required: [kind, workspace, name, provider_profile, model, effort]
5914      additionalProperties: false
5915    ForkSessionRequest:
5916      type: object
5917      properties:
5918        kind:
5919          const: fork
5920        source_session_id:
5921          $ref: '#/components/schemas/ID'
5922        checkpoint_id:
5923          $ref: '#/components/schemas/ID'
5924        name:
5925          anyOf:
5926          - type: string
5927            maxLength: 4096
5928          - type: 'null'
5929      required: [kind, source_session_id, checkpoint_id]
5930      additionalProperties: false
5931    ForkSessionIntent:
5932      type: object
5933      properties:
5934        kind:
5935          const: fork
5936        source_session_id:
5937          $ref: '#/components/schemas/ID'
5938        checkpoint_id:
5939          $ref: '#/components/schemas/ID'
5940        name:
5941          anyOf:
5942          - type: string
5943            maxLength: 4096
5944          - type: 'null'
5945      required: [kind, source_session_id, checkpoint_id, name]
5946      additionalProperties: false
5947    ChildSessionRequest:
5948      type: object
5949      properties:
5950        kind:
5951          const: child
5952        parent_id:
5953          $ref: '#/components/schemas/ID'
5954        address:
5955          type: string
5956          minLength: 1
5957          maxLength: 512
5958        name:
5959          type: string
5960          minLength: 1
5961          maxLength: 4096
5962        initial_input_id:
5963          $ref: '#/components/schemas/UUIDv7'
5964        task:
5965          type: string
5966          minLength: 1
5967          maxLength: 32768
5968        model:
5969          anyOf:
5970          - $ref: '#/components/schemas/ID'
5971          - type: 'null'
5972        effort:
5973          anyOf:
5974          - type: string
5975            maxLength: 100
5976          - type: 'null'
5977      required: [kind, parent_id, address, name, initial_input_id, task]
5978      additionalProperties: false
5979    ChildSessionIntent:
5980      type: object
5981      properties:
5982        kind:
5983          const: child
5984        parent_id:
5985          $ref: '#/components/schemas/ID'
5986        address:
5987          type: string
5988          minLength: 1
5989          maxLength: 512
5990        name:
5991          type: string
5992          minLength: 1
5993          maxLength: 4096
5994        initial_input_id:
5995          $ref: '#/components/schemas/UUIDv7'
5996        task:
5997          type: string
5998          minLength: 1
5999          maxLength: 32768
6000        model:
6001          anyOf:
6002          - $ref: '#/components/schemas/ID'
6003          - type: 'null'
6004        effort:
6005          anyOf:
6006          - type: string
6007            maxLength: 100
6008          - type: 'null'
6009      required: [kind, parent_id, address, name, initial_input_id, task, model, effort]
6010      additionalProperties: false
6011    SessionCreationRequest:
6012      oneOf:
6013      - $ref: '#/components/schemas/NewSessionRequest'
6014      - $ref: '#/components/schemas/ForkSessionRequest'
6015      - $ref: '#/components/schemas/ChildSessionRequest'
6016    Creation:
6017      type: object
6018      properties:
6019        submitted:
6020          oneOf:
6021          - $ref: '#/components/schemas/NewSessionIntent'
6022          - $ref: '#/components/schemas/ForkSessionIntent'
6023          - $ref: '#/components/schemas/ChildSessionIntent'
6024        resolved:
6025          type: object
6026          properties:
6027            workspace:
6028              $ref: '#/components/schemas/Workspace'
6029            provider_profile:
6030              anyOf:
6031              - $ref: '#/components/schemas/ID'
6032              - type: 'null'
6033            model:
6034              anyOf:
6035              - $ref: '#/components/schemas/ID'
6036              - type: 'null'
6037            effort:
6038              anyOf:
6039              - type: string
6040                maxLength: 100
6041              - type: 'null'
6042          required: [workspace, provider_profile, model, effort]
6043          additionalProperties: false
6044      required: [submitted, resolved]
6045      additionalProperties: false
6046    CreationDecision:
6047      type: object
6048      properties:
6049        kind:
6050          const: creation
6051        session_id:
6052          $ref: '#/components/schemas/ID'
6053        admission:
6054          type: string
6055          enum: [accepted, rejected]
6056        http_status:
6057          type: integer
6058          minimum: 200
6059          maximum: 599
6060        creation:
6061          anyOf:
6062          - $ref: '#/components/schemas/Creation'
6063          - type: 'null'
6064        decided_at:
6065          anyOf:
6066          - $ref: '#/components/schemas/Timestamp'
6067          - type: 'null'
6068        deleted_at:
6069          anyOf:
6070          - $ref: '#/components/schemas/Timestamp'
6071          - type: 'null'
6072      required: [kind, session_id, admission, http_status, creation, decided_at, deleted_at]
6073      additionalProperties: false
6074    WorkspaceChange:
6075      type: object
6076      properties:
6077        desired:
6078          $ref: '#/components/schemas/Workspace'
6079        active:
6080          $ref: '#/components/schemas/Workspace'
6081        state:
6082          type: string
6083          enum: [deferred, applying]
6084        revision:
6085          $ref: '#/components/schemas/ID'
6086      required: [desired, active, state, revision]
6087      additionalProperties: false
6088    QuarantineDiagnostic:
6089      type: object
6090      properties:
6091        id:
6092          $ref: '#/components/schemas/ID'
6093        reason:
6094          $ref: '#/components/schemas/SafeReason'
6095      required: [id, reason]
6096      additionalProperties: false
6097    Composition:
6098      type: object
6099      properties:
6100        desired_revision:
6101          $ref: '#/components/schemas/ID'
6102        loaded_revision:
6103          anyOf:
6104          - $ref: '#/components/schemas/ID'
6105          - type: 'null'
6106        needs_reload:
6107          type: boolean
6108        dependencies:
6109          type: object
6110          additionalProperties:
6111            type: array
6112            items:
6113              $ref: '#/components/schemas/ID'
6114            maxItems: 200
6115        quarantine:
6116          type: array
6117          items:
6118            $ref: '#/components/schemas/QuarantineDiagnostic'
6119          maxItems: 200
6120        availability:
6121          type: object
6122          additionalProperties:
6123            type: boolean
6124      required: [desired_revision, loaded_revision, needs_reload, dependencies, quarantine, availability]
6125      additionalProperties: false
6126    JobCollection:
6127      type: object
6128      properties:
6129        items:
6130          type: array
6131          items:
6132            $ref: '#/components/schemas/KernelJob'
6133          maxItems: 100
6134        live_job_count:
6135          $ref: '#/components/schemas/Counter'
6136        page:
6137          $ref: '#/components/schemas/PageDescriptor'
6138      required: [items, live_job_count, page]
6139      additionalProperties: false
6140      examples:
6141      - items: []
6142        live_job_count: 0
6143        page:
6144          title: jobs
6145          empty_state: no background jobs running
6146          rows: []
6147          glance: null
6148          actions: []
6149          summary: 0 background jobs running
6150    JobStop:
6151      type: object
6152      properties:
6153        stopped:
6154          $ref: '#/components/schemas/ID'
6155      required: [stopped]
6156      additionalProperties: false
6157      examples:
6158      - stopped: job-1
6159    KernelJob:
6160      type: object
6161      properties:
6162        id:
6163          $ref: '#/components/schemas/ID'
6164        pid:
6165          anyOf:
6166          - $ref: '#/components/schemas/Counter'
6167          - type: 'null'
6168        command:
6169          type: string
6170          maxLength: 4096
6171        started_at:
6172          $ref: '#/components/schemas/Counter'
6173          description: Wall-clock milliseconds since the epoch when the owner recorded the
6174            job. Zero when unknown, which clients treat as settled work.
6175      required: [id, pid, command, started_at]
6176      additionalProperties: false
6177    Kernel:
6178      type: object
6179      properties:
6180        state:
6181          type: string
6182          enum: [none, booting, attached, reattaching, lost]
6183        stage:
6184          anyOf:
6185          - type: string
6186            enum: [staging, starting]
6187          - type: 'null'
6188        build:
6189          anyOf:
6190          - type: string
6191            maxLength: 512
6192          - type: 'null'
6193        stale:
6194          type: boolean
6195        staleness_reasons:
6196          type: array
6197          items:
6198            $ref: '#/components/schemas/SafeReason'
6199          maxItems: 100
6200        running_jobs:
6201          description: Up to 100 observed live jobs, ordered by ID. Null when the kernel owner is unavailable. The count may exceed this list.
6202          anyOf:
6203          - type: array
6204            items:
6205              $ref: '#/components/schemas/KernelJob'
6206            maxItems: 100
6207          - type: 'null'
6208        live_job_count:
6209          description: Observed owned jobs. Null while booting or when the kernel owner is lost.
6210          anyOf:
6211          - $ref: '#/components/schemas/Counter'
6212          - type: 'null'
6213        instance_id:
6214          anyOf:
6215          - $ref: '#/components/schemas/ID'
6216          - type: 'null'
6217      required: [state, stage, build, stale, staleness_reasons, live_job_count, running_jobs, instance_id]
6218      additionalProperties: false
6219    Usage:
6220      type: object
6221      properties:
6222        model:
6223          anyOf:
6224          - $ref: '#/components/schemas/ID'
6225          - type: 'null'
6226        observed_at:
6227          anyOf:
6228          - $ref: '#/components/schemas/Timestamp'
6229          - type: 'null'
6230        prompt_tokens:
6231          anyOf:
6232          - $ref: '#/components/schemas/Counter'
6233          - type: 'null'
6234        cached_prompt_tokens:
6235          anyOf:
6236          - $ref: '#/components/schemas/Counter'
6237          - type: 'null'
6238        cache_write_tokens:
6239          anyOf:
6240          - $ref: '#/components/schemas/Counter'
6241          - type: 'null'
6242        completion_tokens:
6243          anyOf:
6244          - $ref: '#/components/schemas/Counter'
6245          - type: 'null'
6246        total_tokens:
6247          anyOf:
6248          - $ref: '#/components/schemas/Counter'
6249          - type: 'null'
6250        elapsed_ms:
6251          anyOf:
6252          - type: number
6253            minimum: 0
6254          - type: 'null'
6255        tokens_per_second:
6256          anyOf:
6257          - type: number
6258            minimum: 0
6259          - type: 'null'
6260        context_window_tokens:
6261          anyOf:
6262          - $ref: '#/components/schemas/Counter'
6263          - type: 'null'
6264        cache_ttl_seconds:
6265          anyOf:
6266          - $ref: '#/components/schemas/Counter'
6267          - type: 'null'
6268        cache_fade:
6269          type: array
6270          items:
6271            type: object
6272            properties:
6273              at:
6274                $ref: '#/components/schemas/Timestamp'
6275              cached_tokens:
6276                anyOf:
6277                - $ref: '#/components/schemas/Counter'
6278                - type: 'null'
6279            required: [at, cached_tokens]
6280            additionalProperties: false
6281          maxItems: 200
6282      required: [model, observed_at, prompt_tokens, cached_prompt_tokens, cache_write_tokens, completion_tokens,
6283        total_tokens, elapsed_ms, tokens_per_second, context_window_tokens, cache_ttl_seconds, cache_fade]
6284      additionalProperties: false
6285    PendingInput:
6286      type: object
6287      properties:
6288        id:
6289          $ref: '#/components/schemas/ID'
6290        kind:
6291          type: string
6292          enum: [message, continue, skill, command]
6293        preview:
6294          $ref: '#/components/schemas/Preview'
6295        accepted_at:
6296          $ref: '#/components/schemas/Timestamp'
6297        acceptance_order:
6298          $ref: '#/components/schemas/Counter'
6299        delivery:
6300          const: pending
6301        blocking_reason:
6302          anyOf:
6303          - $ref: '#/components/schemas/SafeReason'
6304          - type: 'null'
6305      required: [id, kind, preview, accepted_at, acceptance_order, delivery, blocking_reason]
6306      additionalProperties: false
6307    Glance:
6308      type: object
6309      properties:
6310        extension:
6311          $ref: '#/components/schemas/ID'
6312        title:
6313          type: string
6314          maxLength: 256
6315        rows:
6316          type: array
6317          items:
6318            $ref: '#/components/schemas/PageRow'
6319          maxItems: 12
6320        url:
6321          $ref: '#/components/schemas/ResourceURL'
6322        data:
6323          $ref: '#/components/schemas/DynamicJSON'
6324      x-max-encoded-bytes: 8192
6325      required: [extension, title, rows, url]
6326      additionalProperties: false
6327    Session:
6328      allOf:
6329      - $ref: '#/components/schemas/SessionSummary'
6330      - type: object
6331        properties:
6332          creation:
6333            description: Null only for stored sessions that predate immutable creation provenance. All newly admitted creations have provenance.
6334            anyOf:
6335            - $ref: '#/components/schemas/Creation'
6336            - type: 'null'
6337          revision:
6338            $ref: '#/components/schemas/ID'
6339          family_revision:
6340            $ref: '#/components/schemas/ID'
6341          configuration_resource:
6342            $ref: '#/components/schemas/SessionConfigurationResource'
6343          workspace_change:
6344            anyOf:
6345            - $ref: '#/components/schemas/WorkspaceChange'
6346            - type: 'null'
6347          selection:
6348            $ref: '#/components/schemas/SessionSelection'
6349          composition:
6350            $ref: '#/components/schemas/Composition'
6351          kernel:
6352            $ref: '#/components/schemas/Kernel'
6353          pending_inputs:
6354            type: array
6355            items:
6356              $ref: '#/components/schemas/PendingInput'
6357            maxItems: 32
6358          input_order:
6359            $ref: '#/components/schemas/Counter'
6360          usage:
6361            $ref: '#/components/schemas/Usage'
6362          active_output:
6363            type: array
6364            items:
6365              $ref: '#/components/schemas/ActiveOutput'
6366            maxItems: 256
6367          history:
6368            $ref: '#/components/schemas/HistoryPage'
6369          glances:
6370            type: array
6371            items:
6372              $ref: '#/components/schemas/Glance'
6373            maxItems: 16
6374        required: [creation, revision, family_revision, configuration_resource, workspace_change, selection,
6375          composition, kernel, pending_inputs, input_order, usage, history, glances, active_output]
6376      unevaluatedProperties: false
6377      x-max-encoded-bytes: 1048576
6378      examples:
6379      - id: 01a0fcea-2b00-7000-8000-000000000001
6380        name: New session
6381        automatic_name: New session
6382        workspace: /workspace/project
6383        location:
6384          host: null
6385          user: null
6386          path: /workspace/project
6387          label: null
6388        parent_id: null
6389        root_id: 01a0fcea-2b00-7000-8000-000000000001
6390        address: null
6391        depth: 0
6392        closed: false
6393        created_at: '2026-10-02T14:00:00Z'
6394        activity_at: '2026-10-02T14:00:00Z'
6395        provider_profile: personal
6396        model: example-model
6397        effort: null
6398        status:
6399          phase: idle
6400          run_id: null
6401          interrupt_requested: false
6402          blocking_reason: null
6403        preview:
6404          text: ''
6405          transcript_count: 0
6406          truncated: false
6407        preferences:
6408          pinned: false
6409          pin_order: null
6410          archived: false
6411          opens: 0
6412        current_progress: []
6413        active_output: []
6414        activity:
6415          lines: []
6416          output_scalars: 0
6417          output_utf8_bytes: 0
6418          observed_at: '2026-10-02T14:00:00Z'
6419          latest_input: null
6420          latest_answer: null
6421        cursor:
6422          generation: J6kYj6IGcXyP3eMIp-WL3A
6423          sequence: 0
6424        creation:
6425          submitted:
6426            kind: new
6427            workspace: /workspace/project
6428            name: null
6429            provider_profile: null
6430            model: null
6431            effort: null
6432          resolved:
6433            workspace: /workspace/project
6434            provider_profile: personal
6435            model: example-model
6436            effort: null
6437        revision: config-1
6438        family_revision: family-1
6439        configuration_resource:
6440          url: /sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration
6441          etag: '"session-config-1"'
6442          value:
6443            id: 01a0fcea-2b00-7000-8000-000000000001
6444            name: New session
6445            workspace: /workspace/project
6446            provider_profile: personal
6447            model: example-model
6448            effort: null
6449            preferences:
6450              pinned: false
6451              pin_order: null
6452              archived: false
6453            selection:
6454              extensions: {}
6455              skills: {}
6456              instructions: {}
6457              mcp: {}
6458            revision: config-1
6459            family_revision: family-1
6460        workspace_change: null
6461        selection:
6462          overrides:
6463            extensions: {}
6464            skills: {}
6465            instructions: {}
6466            mcp: {}
6467          effective:
6468            extensions: {}
6469            skills: {}
6470            instructions: {}
6471            mcp: {}
6472        composition:
6473          desired_revision: composition-1
6474          loaded_revision: null
6475          needs_reload: true
6476          dependencies: {}
6477          quarantine: []
6478          availability: {}
6479        kernel:
6480          instance_id: null
6481          state: none
6482          stage: null
6483          build: null
6484          stale: false
6485          staleness_reasons: []
6486          live_job_count: 0
6487          running_jobs: []
6488        pending_inputs: []
6489        input_order: 0
6490        usage:
6491          model: null
6492          observed_at: null
6493          prompt_tokens: null
6494          cached_prompt_tokens: null
6495          cache_write_tokens: null
6496          completion_tokens: null
6497          total_tokens: null
6498          elapsed_ms: null
6499          tokens_per_second: null
6500          context_window_tokens: null
6501          cache_ttl_seconds: null
6502          cache_fade: []
6503        history:
6504          items: []
6505          older: null
6506          newer: null
6507          high_water: 0
6508        glances: []
6509    SessionRead:
6510      oneOf:
6511      - $ref: '#/components/schemas/Session'
6512      - $ref: '#/components/schemas/SessionConfiguration'
6513    SessionChange:
6514      type: object
6515      properties:
6516        resource:
6517          $ref: '#/components/schemas/SessionConfigurationResource'
6518        session:
6519          $ref: '#/components/schemas/Session'
6520        move:
6521          anyOf:
6522          - type: object
6523            properties:
6524              applied_count:
6525                $ref: '#/components/schemas/Counter'
6526              deferred_count:
6527                $ref: '#/components/schemas/Counter'
6528              applied_ids:
6529                type: array
6530                items:
6531                  $ref: '#/components/schemas/ID'
6532                maxItems: 200
6533              deferred_ids:
6534                type: array
6535                items:
6536                  $ref: '#/components/schemas/ID'
6537                maxItems: 200
6538              truncated:
6539                type: boolean
6540              warnings:
6541                $ref: '#/components/schemas/Warnings'
6542            required: [applied_count, deferred_count, applied_ids, deferred_ids, truncated, warnings]
6543            additionalProperties: false
6544          - type: 'null'
6545      required: [resource, session, move]
6546      additionalProperties: false
6547    Visit:
6548      type: object
6549      properties:
6550        visit_id:
6551          $ref: '#/components/schemas/ID'
6552        session_id:
6553          $ref: '#/components/schemas/ID'
6554        opens:
6555          $ref: '#/components/schemas/Counter'
6556      required: [visit_id, session_id, opens]
6557      additionalProperties: false
6558    SessionDeletion:
6559      type: object
6560      properties:
6561        state:
6562          type: string
6563          enum: [complete, partial]
6564        deleted_count:
6565          $ref: '#/components/schemas/Counter'
6566        remaining_count:
6567          $ref: '#/components/schemas/Counter'
6568        deleted_ids:
6569          type: array
6570          items:
6571            $ref: '#/components/schemas/ID'
6572          maxItems: 200
6573        remaining:
6574          type: array
6575          items:
6576            type: object
6577            properties:
6578              id:
6579                $ref: '#/components/schemas/ID'
6580              reason:
6581                $ref: '#/components/schemas/SafeReason'
6582            required: [id, reason]
6583            additionalProperties: false
6584          maxItems: 200
6585        truncated:
6586          type: boolean
6587      description: Counts cover the complete captured operation. ID lists are bounded summaries, never
6588        false completion. Refresh the authoritative family or known tombstones if truncated; deletion
6589        is never repeated to page a result.
6590      required: [state, deleted_count, remaining_count, deleted_ids, remaining, truncated]
6591      additionalProperties: false
6592    ImageUpload:
6593      type: object
6594      properties:
6595        mime_type:
6596          type: string
6597          enum: [image/png, image/jpeg, image/gif, image/webp]
6598        data:
6599          type: string
6600          contentEncoding: base64
6601      description: Strict base64; decoded dimensions and provider constraints are validated before admission.
6602      required: [mime_type, data]
6603      additionalProperties: false
6604    MessageInputRequest:
6605      type: object
6606      properties:
6607        kind:
6608          const: message
6609        text:
6610          type: string
6611          maxLength: 1048576
6612        images:
6613          type: array
6614          description: Attached in order; the text's numbered image markers say where each was attached.
6615          items:
6616            $ref: '#/components/schemas/ImageUpload'
6617          maxItems: 10
6618        pastes:
6619          type: array
6620          description: Pasted text the text marks by number; a long one is saved to a file the model reads.
6621          items:
6622            type: string
6623          maxItems: 20
6624        client_id:
6625          type: string
6626          maxLength: 512
6627      required: [kind, text]
6628      additionalProperties: false
6629      anyOf:
6630      - properties:
6631          text:
6632            pattern: \S
6633      - required: [images]
6634        properties:
6635          images:
6636            minItems: 1
6637      examples:
6638      - kind: message
6639        text: Fix the parser.
6640        client_id: draft-1
6641    ContinueInputRequest:
6642      type: object
6643      properties:
6644        kind:
6645          const: continue
6646        client_id:
6647          type: string
6648          maxLength: 512
6649      required: [kind]
6650      additionalProperties: false
6651    SkillInputRequest:
6652      type: object
6653      properties:
6654        kind:
6655          const: skill
6656        candidate_id:
6657          $ref: '#/components/schemas/ID'
6658        catalog_revision:
6659          $ref: '#/components/schemas/ID'
6660        arguments:
6661          type: string
6662          maxLength: 1048576
6663        client_id:
6664          type: string
6665          maxLength: 512
6666      required: [kind, candidate_id, catalog_revision, arguments]
6667      additionalProperties: false
6668    CommandInputRequest:
6669      type: object
6670      properties:
6671        kind:
6672          const: command
6673        command_id:
6674          $ref: '#/components/schemas/ID'
6675        arguments:
6676          $ref: '#/components/schemas/DynamicJSON'
6677        client_id:
6678          type: string
6679          maxLength: 512
6680      required: [kind, command_id, arguments]
6681      additionalProperties: false
6682    InputRequest:
6683      oneOf:
6684      - $ref: '#/components/schemas/MessageInputRequest'
6685      - $ref: '#/components/schemas/ContinueInputRequest'
6686      - $ref: '#/components/schemas/SkillInputRequest'
6687      - $ref: '#/components/schemas/CommandInputRequest'
6688      x-max-encoded-bytes: 72200000
6689    Turn:
6690      type: object
6691      properties:
6692        id:
6693          $ref: '#/components/schemas/ID'
6694        state:
6695          type: string
6696          enum: [running, completed, interrupted, failed, abandoned]
6697        started_at:
6698          $ref: '#/components/schemas/Timestamp'
6699        ended_at:
6700          anyOf:
6701          - $ref: '#/components/schemas/Timestamp'
6702          - type: 'null'
6703        outcome:
6704          anyOf:
6705          - $ref: '#/components/schemas/SafeReason'
6706          - type: 'null'
6707      required: [id, state, started_at, ended_at, outcome]
6708      additionalProperties: false
6709    Input:
6710      type: object
6711      properties:
6712        id:
6713          $ref: '#/components/schemas/ID'
6714        session_id:
6715          $ref: '#/components/schemas/ID'
6716        kind:
6717          type: string
6718          enum: [message, continue, skill, command]
6719        admission:
6720          type: string
6721          enum: [accepted, rejected]
6722        http_status:
6723          type: integer
6724          minimum: 200
6725          maximum: 599
6726        problem:
6727          anyOf:
6728          - $ref: '#/components/schemas/AdmissionProblem'
6729          - type: 'null'
6730        accepted_at:
6731          anyOf:
6732          - $ref: '#/components/schemas/Timestamp'
6733          - type: 'null'
6734        acceptance_order:
6735          anyOf:
6736          - $ref: '#/components/schemas/Counter'
6737          - type: 'null'
6738        delivery:
6739          anyOf:
6740          - type: string
6741            enum: [pending, committed, cancelled]
6742          - type: 'null'
6743        blocking_reason:
6744          anyOf:
6745          - $ref: '#/components/schemas/SafeReason'
6746          - type: 'null'
6747        transcript_position:
6748          anyOf:
6749          - $ref: '#/components/schemas/Counter'
6750          - type: 'null'
6751        turn:
6752          anyOf:
6753          - $ref: '#/components/schemas/Turn'
6754          - type: 'null'
6755        client_id:
6756          anyOf:
6757          - type: string
6758            maxLength: 512
6759          - type: 'null'
6760      required: [id, session_id, kind, admission, http_status, problem, accepted_at, acceptance_order,
6761        delivery, blocking_reason, transcript_position, turn, client_id]
6762      additionalProperties: false
6763      allOf:
6764      - if:
6765          properties:
6766            admission:
6767              const: rejected
6768        then:
6769          properties:
6770            delivery:
6771              type: 'null'
6772            accepted_at:
6773              type: 'null'
6774            acceptance_order:
6775              type: 'null'
6776            turn:
6777              type: 'null'
6778            http_status:
6779              type: integer
6780              minimum: 400
6781              maximum: 599
6782            problem:
6783              $ref: '#/components/schemas/AdmissionProblem'
6784        else:
6785          properties:
6786            delivery:
6787              type: string
6788              enum: [pending, committed, cancelled]
6789            accepted_at:
6790              $ref: '#/components/schemas/Timestamp'
6791            acceptance_order:
6792              type: integer
6793              minimum: 1
6794              maximum: 9007199254740991
6795            http_status:
6796              const: 202
6797            problem:
6798              type: 'null'
6799      examples:
6800      - id: 01a0fcea-2b00-7000-8000-000000000002
6801        session_id: 01a0fcea-2b00-7000-8000-000000000001
6802        kind: message
6803        admission: accepted
6804        http_status: 202
6805        problem: null
6806        accepted_at: '2026-10-02T14:00:00Z'
6807        acceptance_order: 1
6808        delivery: pending
6809        blocking_reason: null
6810        transcript_position: null
6811        turn: null
6812        client_id: draft-1
6813    InputDecision:
6814      type: object
6815      properties:
6816        kind:
6817          const: input
6818        input:
6819          $ref: '#/components/schemas/Input'
6820      required: [kind, input]
6821      additionalProperties: false
6822    InputCancellation:
6823      type: object
6824      properties:
6825        input:
6826          $ref: '#/components/schemas/Input'
6827        result:
6828          type: string
6829          enum: [cancelled, interrupt_requested, shared_running, not_pending]
6830      required: [input, result]
6831      additionalProperties: false
6832    InterruptRequest:
6833      type: object
6834      properties:
6835        run_id:
6836          anyOf:
6837          - $ref: '#/components/schemas/ID'
6838          - type: 'null'
6839        through_input_order:
6840          $ref: '#/components/schemas/Counter'
6841      required: [run_id, through_input_order]
6842      additionalProperties: false
6843    Interruption:
6844      type: object
6845      properties:
6846        run_id:
6847          anyOf:
6848          - $ref: '#/components/schemas/ID'
6849          - type: 'null'
6850        state:
6851          type: string
6852          enum: [requested, already_ended]
6853        cancelled_input_ids:
6854          type: array
6855          items:
6856            $ref: '#/components/schemas/ID'
6857          maxItems: 32
6858        warnings:
6859          $ref: '#/components/schemas/Warnings'
6860      required: [run_id, state, cancelled_input_ids, warnings]
6861      additionalProperties: false
6862    ToolActivity:
6863      type: object
6864      properties:
6865        kind:
6866          type: string
6867          enum: [read, search, list, run, web]
6868        target:
6869          type: string
6870          maxLength: 1000
6871        detail:
6872          type: string
6873          maxLength: 16000
6874          description: What the person watching sees of the result, as markdown; a web search's answer and sources.
6875      required: [kind, target]
6876      additionalProperties: false
6877    FileDiff:
6878      type: object
6879      properties:
6880        path:
6881          type: string
6882          maxLength: 1000
6883        kind:
6884          const: diff
6885        diff:
6886          type: string
6887          maxLength: 16000
6888        added:
6889          $ref: '#/components/schemas/Counter'
6890        removed:
6891          $ref: '#/components/schemas/Counter'
6892      required: [path, kind, diff, added, removed]
6893      additionalProperties: false
6894    FileUnavailable:
6895      type: object
6896      properties:
6897        path:
6898          type: string
6899          maxLength: 1000
6900        kind:
6901          const: unavailable
6902        reason:
6903          type: string
6904          maxLength: 1000
6905      required: [path, kind, reason]
6906      additionalProperties: false
6907    ToolTrace:
6908      type: object
6909      properties:
6910        activities:
6911          type: array
6912          items:
6913            $ref: '#/components/schemas/ToolActivity'
6914          maxItems: 64
6915        changes:
6916          type: array
6917          items:
6918            oneOf:
6919            - $ref: '#/components/schemas/FileDiff'
6920            - $ref: '#/components/schemas/FileUnavailable'
6921          maxItems: 16
6922        truncated:
6923          type: boolean
6924      required: [activities, changes, truncated]
6925      additionalProperties: false
6926    ActiveOutput:
6927      type: object
6928      properties:
6929        message_id:
6930          $ref: '#/components/schemas/ID'
6931        run_id:
6932          $ref: '#/components/schemas/ID'
6933        kind:
6934          type: string
6935          enum: [text, thinking]
6936        bytes:
6937          $ref: '#/components/schemas/Counter'
6938        elapsed_ms:
6939          type: [integer, 'null']
6940          minimum: 0
6941        text:
6942          type: [string, 'null']
6943        reference:
6944          anyOf:
6945          - $ref: '#/components/schemas/ContentReference'
6946          - type: 'null'
6947      required: [message_id, run_id, kind, bytes, elapsed_ms, text, reference]
6948      additionalProperties: false
6949      description: Ordered unfinished output captured with the session cursor. Exactly one of text or reference is non-null. References retain a fixed byte cutoff through their short snapshot lease. A run retains at most 64 MiB of unfinished output across at most 256 descriptors. Inline output is limited to 64 KiB encoded; larger content uses references.
6950    ContentReference:
6951      type: object
6952      properties:
6953        url:
6954          $ref: '#/components/schemas/ResourceURL'
6955        field:
6956          type: string
6957          minLength: 1
6958          maxLength: 256
6959        bytes:
6960          $ref: '#/components/schemas/Counter'
6961      required: [url, field, bytes]
6962      additionalProperties: false
6963    ImageMetadata:
6964      type: object
6965      properties:
6966        mime_type:
6967          type: string
6968          maxLength: 100
6969        width:
6970          type: integer
6971          minimum: 1
6972          maximum: 9007199254740991
6973        height:
6974          type: integer
6975          minimum: 1
6976          maximum: 9007199254740991
6977        original_bytes:
6978          $ref: '#/components/schemas/Counter'
6979        reference:
6980          $ref: '#/components/schemas/ContentReference'
6981          description: Its url is the image resource, which serves the decoded bytes.
6982      required: [mime_type, width, height, original_bytes, reference]
6983      additionalProperties: false
6984    TextContent:
6985      type: object
6986      properties:
6987        kind:
6988          const: text
6989        text:
6990          type: string
6991          maxLength: 262144
6992      required: [kind, text]
6993      additionalProperties: false
6994    JSONContent:
6995      type: object
6996      properties:
6997        kind:
6998          const: json
6999        field:
7000          type: string
7001          maxLength: 256
7002        value:
7003          $ref: '#/components/schemas/DynamicJSON'
7004      required: [kind, field, value]
7005      additionalProperties: false
7006    ImageContent:
7007      type: object
7008      properties:
7009        kind:
7010          const: image
7011        image:
7012          $ref: '#/components/schemas/ImageMetadata'
7013      required: [kind, image]
7014      additionalProperties: false
7015    TraceContent:
7016      type: object
7017      properties:
7018        kind:
7019          const: trace
7020        trace:
7021          $ref: '#/components/schemas/ToolTrace'
7022      required: [kind, trace]
7023      additionalProperties: false
7024    ReferenceContent:
7025      type: object
7026      properties:
7027        kind:
7028          const: reference
7029        reference:
7030          $ref: '#/components/schemas/ContentReference'
7031      required: [kind, reference]
7032      additionalProperties: false
7033    HistoryMail:
7034      type: object
7035      properties:
7036        mail_id:
7037          $ref: '#/components/schemas/ID'
7038        sender_session_id:
7039          anyOf:
7040          - $ref: '#/components/schemas/ID'
7041          - type: 'null'
7042        sender_label:
7043          type: string
7044        kind:
7045          type: string
7046          enum: [task, message, result, unreviewed, webhook]
7047      required: [mail_id, sender_session_id, sender_label, kind]
7048      additionalProperties: false
7049    HistoryEntry:
7050      type: object
7051      properties:
7052        id:
7053          $ref: '#/components/schemas/ID'
7054        position:
7055          $ref: '#/components/schemas/Counter'
7056        kind:
7057          type: string
7058          enum: [user, assistant, thinking, tool_call, tool_result, note, continuation, compaction, image_fit]
7059        turn_type:
7060          type: string
7061          enum: [user, agent, webhook, scheduled, continue]
7062        mail:
7063          anyOf:
7064          - $ref: '#/components/schemas/HistoryMail'
7065          - type: 'null'
7066        turn_id:
7067          anyOf:
7068          - $ref: '#/components/schemas/ID'
7069          - type: 'null'
7070        input_id:
7071          anyOf:
7072          - $ref: '#/components/schemas/ID'
7073          - type: 'null'
7074        created_at:
7075          anyOf:
7076          - $ref: '#/components/schemas/Timestamp'
7077          - type: 'null'
7078        content:
7079          type: array
7080          items:
7081            oneOf:
7082            - $ref: '#/components/schemas/TextContent'
7083            - $ref: '#/components/schemas/JSONContent'
7084            - $ref: '#/components/schemas/ImageContent'
7085            - $ref: '#/components/schemas/TraceContent'
7086            - $ref: '#/components/schemas/ReferenceContent'
7087          maxItems: 200
7088        checkpoint_id:
7089          anyOf:
7090          - $ref: '#/components/schemas/ID'
7091          - type: 'null'
7092        content_complete:
7093          type: boolean
7094        tool:
7095          anyOf:
7096          - type: object
7097            properties:
7098              name:
7099                type: string
7100                maxLength: 100
7101              tool_call_id:
7102                $ref: '#/components/schemas/ID'
7103              progress_call_id:
7104                anyOf:
7105                - $ref: '#/components/schemas/ID'
7106                - type: 'null'
7107            required: [name, tool_call_id, progress_call_id]
7108            additionalProperties: false
7109          - type: 'null'
7110        thinking_duration_ms:
7111          description: Observed thinking duration, when recorded.
7112          anyOf:
7113          - $ref: '#/components/schemas/Counter'
7114          - type: 'null'
7115      required: [id, position, kind, turn_id, input_id, created_at, content, checkpoint_id, content_complete,
7116        tool]
7117      additionalProperties: false
7118    HistoryPage:
7119      type: object
7120      properties:
7121        items:
7122          type: array
7123          items:
7124            $ref: '#/components/schemas/HistoryEntry'
7125          maxItems: 200
7126        older:
7127          anyOf:
7128          - $ref: '#/components/schemas/PageToken'
7129          - type: 'null'
7130        newer:
7131          anyOf:
7132          - $ref: '#/components/schemas/PageToken'
7133          - type: 'null'
7134        high_water:
7135          $ref: '#/components/schemas/Counter'
7136      x-max-content-bytes: 262144
7137      required: [items, older, newer, high_water]
7138      additionalProperties: false
7139      examples:
7140      - items: []
7141        older: null
7142        newer: null
7143        high_water: 0
7144    Checkpoint:
7145      type: object
7146      properties:
7147        position:
7148          $ref: '#/components/schemas/Counter'
7149        checkpoint_id:
7150          $ref: '#/components/schemas/ID'
7151        title:
7152          type: string
7153          maxLength: 4096
7154        turn_type:
7155          type: string
7156          enum: [user, continue, agent, scheduled, webhook]
7157        preview:
7158          $ref: '#/components/schemas/Preview'
7159      required: [position, checkpoint_id, title, turn_type, preview]
7160      additionalProperties: false
7161    CheckpointPage:
7162      type: object
7163      properties:
7164        items:
7165          type: array
7166          items:
7167            $ref: '#/components/schemas/Checkpoint'
7168          maxItems: 200
7169        older:
7170          anyOf:
7171          - $ref: '#/components/schemas/PageToken'
7172          - type: 'null'
7173        newer:
7174          anyOf:
7175          - $ref: '#/components/schemas/PageToken'
7176          - type: 'null'
7177        high_water:
7178          $ref: '#/components/schemas/Counter'
7179      required: [items, older, newer, high_water]
7180      additionalProperties: false
7181    HistoryRead:
7182      anyOf:
7183      - $ref: '#/components/schemas/HistoryPage'
7184      - $ref: '#/components/schemas/CheckpointPage'
7185      description: The requested view determines the item type. Empty pages are valid for either view.
7186    ContentPart:
7187      type: object
7188      properties:
7189        field:
7190          type: string
7191          maxLength: 256
7192        offset_bytes:
7193          $ref: '#/components/schemas/Counter'
7194        encoding:
7195          type: string
7196          enum: [utf8]
7197        text:
7198          type: string
7199          maxLength: 1048576
7200        complete:
7201          type: boolean
7202      description: Offsets count exact stored UTF-8 bytes.
7203      required: [field, offset_bytes, encoding, text, complete]
7204      additionalProperties: false
7205    EntryContentPage:
7206      type: object
7207      properties:
7208        entry_id:
7209          $ref: '#/components/schemas/ID'
7210        parts:
7211          type: array
7212          items:
7213            $ref: '#/components/schemas/ContentPart'
7214          maxItems: 200
7215        next:
7216          anyOf:
7217          - $ref: '#/components/schemas/PageToken'
7218          - type: 'null'
7219      x-max-decoded-content-bytes: 262144
7220      required: [entry_id, parts, next]
7221      additionalProperties: false
7222    ContextSection:
7223      type: object
7224      properties:
7225        id:
7226          $ref: '#/components/schemas/ID'
7227        label:
7228          type: string
7229          maxLength: 256
7230        kind:
7231          type: string
7232          enum: [instructions, extension_context, history, tools, other]
7233        source:
7234          anyOf:
7235          - type: string
7236            maxLength: 4096
7237          - type: 'null'
7238        item_count:
7239          $ref: '#/components/schemas/Counter'
7240        utf8_bytes:
7241          $ref: '#/components/schemas/Counter'
7242        page_count:
7243          $ref: '#/components/schemas/Counter'
7244        preview:
7245          $ref: '#/components/schemas/Preview'
7246      required: [id, label, kind, source, item_count, utf8_bytes, page_count, preview]
7247      additionalProperties: false
7248    ContextSummary:
7249      type: object
7250      properties:
7251        state:
7252          type: string
7253          enum: [pending, ready]
7254        snapshot_id:
7255          anyOf:
7256          - $ref: '#/components/schemas/ID'
7257          - type: 'null'
7258        captured_at:
7259          anyOf:
7260          - $ref: '#/components/schemas/Timestamp'
7261          - type: 'null'
7262        provider:
7263          anyOf:
7264          - $ref: '#/components/schemas/ID'
7265          - type: 'null'
7266        model:
7267          anyOf:
7268          - $ref: '#/components/schemas/ID'
7269          - type: 'null'
7270        protocol:
7271          anyOf:
7272          - type: string
7273            enum: [responses, chat_completions]
7274          - type: 'null'
7275        context_window_tokens:
7276          anyOf:
7277          - $ref: '#/components/schemas/Counter'
7278          - type: 'null'
7279        compaction:
7280          $ref: '#/components/schemas/ContextCompaction'
7281        sections:
7282          type: array
7283          items:
7284            $ref: '#/components/schemas/ContextSection'
7285          maxItems: 1000
7286        reason:
7287          anyOf:
7288          - $ref: '#/components/schemas/SafeReason'
7289          - type: 'null'
7290      required: [state, snapshot_id, captured_at, provider, model, protocol, context_window_tokens, compaction,
7291        sections, reason]
7292      additionalProperties: false
7293      allOf:
7294      - if:
7295          properties:
7296            state:
7297              const: ready
7298        then:
7299          properties:
7300            snapshot_id:
7301              $ref: '#/components/schemas/ID'
7302            captured_at:
7303              $ref: '#/components/schemas/Timestamp'
7304            reason:
7305              type: 'null'
7306        else:
7307          properties:
7308            snapshot_id:
7309              type: 'null'
7310            reason:
7311              $ref: '#/components/schemas/SafeReason'
7312    ContextSectionPage:
7313      type: object
7314      properties:
7315        snapshot_id:
7316          $ref: '#/components/schemas/ID'
7317        section_id:
7318          $ref: '#/components/schemas/ID'
7319        text:
7320          type: string
7321          x-max-utf8-bytes: 32768
7322          maxLength: 32768
7323        omitted:
7324          anyOf:
7325          - type: string
7326            maxLength: 4096
7327          - type: 'null'
7328        page:
7329          $ref: '#/components/schemas/Counter'
7330        page_count:
7331          $ref: '#/components/schemas/Counter'
7332      required: [snapshot_id, section_id, text, omitted, page, page_count]
7333      additionalProperties: false
7334    TokenObservation:
7335      type: object
7336      properties:
7337        estimated:
7338          anyOf:
7339          - $ref: '#/components/schemas/Counter'
7340          - type: 'null'
7341        observed:
7342          anyOf:
7343          - $ref: '#/components/schemas/Counter'
7344          - type: 'null'
7345        source:
7346          anyOf:
7347          - type: string
7348            maxLength: 100
7349          - type: 'null'
7350      required: [estimated, observed, source]
7351      additionalProperties: false
7352    ProviderRequestRecord:
7353      type: object
7354      properties:
7355        sequence:
7356          $ref: '#/components/schemas/Counter'
7357        provider:
7358          $ref: '#/components/schemas/ID'
7359        model:
7360          $ref: '#/components/schemas/ID'
7361        run_id:
7362          anyOf:
7363          - $ref: '#/components/schemas/ID'
7364          - type: 'null'
7365        started_at:
7366          $ref: '#/components/schemas/Timestamp'
7367        ended_at:
7368          anyOf:
7369          - $ref: '#/components/schemas/Timestamp'
7370          - type: 'null'
7371        prompt_tokens:
7372          $ref: '#/components/schemas/TokenObservation'
7373        completion_tokens:
7374          $ref: '#/components/schemas/TokenObservation'
7375        cached_tokens:
7376          $ref: '#/components/schemas/TokenObservation'
7377        failure:
7378          anyOf:
7379          - $ref: '#/components/schemas/SafeReason'
7380          - type: 'null'
7381        kind:
7382          type: string
7383          enum: [turn, summarizer, background]
7384        provider_profile:
7385          $ref: '#/components/schemas/ID'
7386        account_id:
7387          anyOf:
7388          - $ref: '#/components/schemas/ID'
7389          - type: 'null'
7390        outcome:
7391          type: string
7392          enum: [completed, failed]
7393        http_status:
7394          anyOf:
7395          - type: integer
7396            minimum: 100
7397            maximum: 599
7398          - type: 'null'
7399        cache_creation_tokens:
7400          $ref: '#/components/schemas/TokenObservation'
7401        cache_write_5m_tokens:
7402          $ref: '#/components/schemas/TokenObservation'
7403        cache_write_1h_tokens:
7404          $ref: '#/components/schemas/TokenObservation'
7405        reasoning_tokens:
7406          $ref: '#/components/schemas/TokenObservation'
7407        head_hash:
7408          type: string
7409          maxLength: 128
7410        input_count:
7411          $ref: '#/components/schemas/Counter'
7412        replaced_input_count:
7413          anyOf:
7414          - $ref: '#/components/schemas/Counter'
7415          - type: 'null'
7416        projection_hash:
7417          anyOf:
7418          - type: string
7419            maxLength: 128
7420          - type: 'null'
7421        strategy:
7422          anyOf:
7423          - type: string
7424            maxLength: 256
7425          - type: 'null'
7426        cache_marks:
7427          type: array
7428          maxItems: 200
7429          items:
7430            type: object
7431            properties:
7432              through:
7433                type: string
7434                enum: [tools, system, input]
7435              index:
7436                anyOf:
7437                - $ref: '#/components/schemas/Counter'
7438                - type: 'null'
7439              ttl_seconds:
7440                $ref: '#/components/schemas/Counter'
7441            required: [through, index, ttl_seconds]
7442            additionalProperties: false
7443        transcript_positions:
7444          type: array
7445          items:
7446            $ref: '#/components/schemas/Counter'
7447          maxItems: 200
7448      required: [sequence, provider, model, run_id, started_at, ended_at, prompt_tokens, completion_tokens,
7449        cached_tokens, failure, transcript_positions, kind, provider_profile, account_id, outcome,
7450        http_status, cache_creation_tokens, cache_write_5m_tokens, cache_write_1h_tokens, reasoning_tokens,
7451        head_hash, input_count, replaced_input_count, projection_hash, strategy, cache_marks]
7452      additionalProperties: false
7453    RequestRecordPage:
7454      type: object
7455      properties:
7456        items:
7457          type: array
7458          items:
7459            $ref: '#/components/schemas/ProviderRequestRecord'
7460          maxItems: 200
7461        next:
7462          anyOf:
7463          - $ref: '#/components/schemas/PageToken'
7464          - type: 'null'
7465      required: [items, next]
7466      additionalProperties: false
7467    ContextRead:
7468      oneOf:
7469      - $ref: '#/components/schemas/ContextSummary'
7470      - $ref: '#/components/schemas/ContextSectionPage'
7471      - $ref: '#/components/schemas/RequestRecordPage'
7472    FormField:
7473      type: object
7474      properties:
7475        name:
7476          type: string
7477          minLength: 1
7478          maxLength: 256
7479        label:
7480          type: string
7481          maxLength: 256
7482        type:
7483          type: string
7484          enum: [text, secret, boolean, choice, integer, hidden]
7485        required:
7486          type: boolean
7487        default:
7488          $ref: '#/components/schemas/DynamicJSON'
7489        default_binding:
7490          description: Prefill from the selected row or installed session, before showing the form.
7491          type: object
7492          properties:
7493            source:
7494              type: string
7495              enum: [row, session]
7496            pointer:
7497              type: string
7498              pattern: ^(|/.*)$
7499              maxLength: 4096
7500          required: [source, pointer]
7501          additionalProperties: false
7502        choices:
7503          type: array
7504          items:
7505            type: object
7506            properties:
7507              value:
7508                $ref: '#/components/schemas/DynamicJSON'
7509              label:
7510                type: string
7511                maxLength: 256
7512            required: [value, label]
7513            additionalProperties: false
7514          maxItems: 200
7515        minimum:
7516          anyOf:
7517          - type: number
7518          - type: 'null'
7519        maximum:
7520          anyOf:
7521          - type: number
7522          - type: 'null'
7523        description:
7524          type: string
7525          maxLength: 4096
7526      required: [name, label, type, required, default, choices, minimum, maximum, description]
7527      additionalProperties: false
7528    Binding:
7529      oneOf:
7530      - type: object
7531        properties:
7532          source:
7533            const: literal
7534          value:
7535            $ref: '#/components/schemas/DynamicJSON'
7536        required: [source, value]
7537        additionalProperties: false
7538      - type: object
7539        properties:
7540          source:
7541            type: string
7542            enum: [row, form, session]
7543          pointer:
7544            type: string
7545            pattern: ^(|/.*)$
7546            maxLength: 4096
7547        required: [source, pointer]
7548        additionalProperties: false
7549      description: JSON pointer resolves against the selected row, submitted form, or installed session
7550        snapshot. No expression language.
7551    ActionOperation:
7552      type: object
7553      properties:
7554        operation_id:
7555          type: string
7556          minLength: 1
7557          maxLength: 256
7558        method:
7559          type: string
7560          enum: [GET, PUT, POST, PATCH, DELETE]
7561        path_template:
7562          $ref: '#/components/schemas/ResourceURL'
7563        path:
7564          type: object
7565          additionalProperties:
7566            $ref: '#/components/schemas/Binding'
7567        query:
7568          type: object
7569          additionalProperties:
7570            $ref: '#/components/schemas/Binding'
7571        headers:
7572          type: object
7573          additionalProperties:
7574            $ref: '#/components/schemas/Binding'
7575        body:
7576          type: object
7577          additionalProperties:
7578            $ref: '#/components/schemas/Binding'
7579          propertyNames:
7580            type: string
7581            format: json-pointer
7582            pattern: ^/
7583        success_status:
7584          type: integer
7585          enum: [200, 201]
7586          description: Expected synchronous JSON success status. Omitted operations accept 200 or 201 for mutations and 200 for reads.
7587        result_schema:
7588          $ref: '#/components/schemas/DynamicJSON'
7589      description: Operation must be declared in this contract, or the installed extension contract version.
7590        Bind If-Match from the displayed resource, never from a fresh read. Path, query and header map
7591        keys name declared parameters; body map keys are JSON pointers into the request object. Missing
7592        optional form values omit their bindings. result_schema is a JSON Schema 2020-12 fragment, with
7593        no remote schema retrieval.
7594      required: [operation_id, method, path_template, path, query, headers, body, result_schema]
7595      additionalProperties: false
7596    PageAction:
7597      type: object
7598      properties:
7599        id:
7600          $ref: '#/components/schemas/ID'
7601        label:
7602          type: string
7603          maxLength: 256
7604        keyboard_hint:
7605          anyOf:
7606          - type: string
7607            maxLength: 100
7608          - type: 'null'
7609        confirmation:
7610          anyOf:
7611          - type: string
7612            maxLength: 4096
7613          - type: 'null'
7614        fields:
7615          type: array
7616          items:
7617            $ref: '#/components/schemas/FormField'
7618          maxItems: 100
7619        operation:
7620          $ref: '#/components/schemas/ActionOperation'
7621      required: [id, label, keyboard_hint, confirmation, fields, operation]
7622      additionalProperties: false
7623    PageRow:
7624      type: object
7625      properties:
7626        id:
7627          $ref: '#/components/schemas/ID'
7628        text:
7629          type: string
7630          maxLength: 4096
7631        badge:
7632          anyOf:
7633          - type: string
7634            maxLength: 256
7635          - type: 'null'
7636        tone:
7637          type: string
7638          enum: [plain, active, muted, success, warning, error]
7639        detail:
7640          anyOf:
7641          - type: string
7642            maxLength: 16384
7643          - type: 'null'
7644        resource:
7645          anyOf:
7646          - type: object
7647            properties:
7648              url:
7649                $ref: '#/components/schemas/ResourceURL'
7650              etag:
7651                $ref: '#/components/schemas/ETag'
7652              value:
7653                $ref: '#/components/schemas/DynamicJSON'
7654            required: [url, etag, value]
7655            additionalProperties: false
7656          - type: 'null'
7657      required: [id, text, badge, tone, detail, resource]
7658      additionalProperties: false
7659    PageDescriptor:
7660      type: object
7661      properties:
7662        title:
7663          type: string
7664          maxLength: 256
7665        empty_state:
7666          type: string
7667          maxLength: 4096
7668        rows:
7669          type: array
7670          items:
7671            $ref: '#/components/schemas/PageRow'
7672          maxItems: 200
7673        glance:
7674          anyOf:
7675          - $ref: '#/components/schemas/Glance'
7676          - type: 'null'
7677        actions:
7678          type: array
7679          items:
7680            $ref: '#/components/schemas/PageAction'
7681          maxItems: 100
7682        summary:
7683          type: string
7684          maxLength: 4096
7685      required: [title, empty_state, rows, glance, actions, summary]
7686      additionalProperties: false
7687    CatalogCandidate:
7688      type: object
7689      properties:
7690        id:
7691          $ref: '#/components/schemas/ID'
7692        kind:
7693          type: string
7694          enum: [extension, skill, instruction, mcp]
7695        title:
7696          type: string
7697          maxLength: 256
7698        description:
7699          type: string
7700          maxLength: 4096
7701        source:
7702          type: string
7703          maxLength: 4096
7704        resolved_source:
7705          anyOf:
7706          - type: string
7707            maxLength: 4096
7708          - type: 'null'
7709        preference_key:
7710          anyOf:
7711          - $ref: '#/components/schemas/ID'
7712          - type: 'null'
7713        valid:
7714          type: boolean
7715        eligible:
7716          type: boolean
7717        effective_enabled:
7718          type: boolean
7719        global_preference:
7720          anyOf:
7721          - type: boolean
7722          - type: 'null'
7723        session_override:
7724          anyOf:
7725          - type: boolean
7726          - type: 'null'
7727        shadowed_by:
7728          anyOf:
7729          - $ref: '#/components/schemas/ID'
7730          - type: 'null'
7731        dependencies:
7732          type: array
7733          items:
7734            $ref: '#/components/schemas/ID'
7735          maxItems: 200
7736        quarantined:
7737          type: boolean
7738        diagnostic:
7739          anyOf:
7740          - $ref: '#/components/schemas/SafeReason'
7741          - type: 'null'
7742        extension:
7743          description: Installed extension metadata for the inspector. Null for other candidate kinds.
7744          anyOf:
7745          - $ref: '#/components/schemas/ExtensionMetadata'
7746          - type: 'null'
7747      x-max-encoded-bytes: 65536
7748      required: [id, kind, title, description, source, resolved_source, preference_key, valid, eligible,
7749        effective_enabled, global_preference, session_override, shadowed_by, dependencies, quarantined,
7750        diagnostic, extension]
7751      additionalProperties: false
7752    ExtensionMetadata:
7753      type: object
7754      properties:
7755        context:
7756          type: boolean
7757        tools:
7758          type: array
7759          maxItems: 200
7760          items:
7761            $ref: '#/components/schemas/ID'
7762        python_modules:
7763          type: array
7764          maxItems: 200
7765          items:
7766            $ref: '#/components/schemas/ID'
7767        plugins:
7768          type: array
7769          maxItems: 200
7770          items:
7771            $ref: '#/components/schemas/ID'
7772      required: [context, tools, python_modules, plugins]
7773      additionalProperties: false
7774    HTTPCommand:
7775      type: object
7776      properties:
7777        id:
7778          $ref: '#/components/schemas/ID'
7779        slash_name:
7780          type: string
7781          maxLength: 256
7782        description:
7783          type: string
7784          maxLength: 4096
7785        arguments:
7786          type: array
7787          items:
7788            $ref: '#/components/schemas/FormField'
7789          maxItems: 100
7790        caller_permissions:
7791          type: array
7792          items:
7793            type: string
7794            enum: [human, model]
7795          maxItems: 2
7796        delivery:
7797          type: string
7798          enum: [read, mutation]
7799        operation:
7800          $ref: '#/components/schemas/ActionOperation'
7801      required: [id, slash_name, description, arguments, caller_permissions, delivery, operation]
7802      additionalProperties: false
7803    InputCommand:
7804      type: object
7805      properties:
7806        id:
7807          $ref: '#/components/schemas/ID'
7808        slash_name:
7809          type: string
7810          maxLength: 256
7811        description:
7812          type: string
7813          maxLength: 4096
7814        arguments:
7815          type: array
7816          items:
7817            $ref: '#/components/schemas/FormField'
7818          maxItems: 100
7819        caller_permissions:
7820          type: array
7821          items:
7822            type: string
7823            enum: [human, model]
7824          maxItems: 2
7825        delivery:
7826          const: input
7827        command_id:
7828          $ref: '#/components/schemas/ID'
7829      required: [id, slash_name, description, arguments, caller_permissions, delivery, command_id]
7830      additionalProperties: false
7831    Catalog:
7832      type: object
7833      properties:
7834        native_commands:
7835          type: array
7836          items:
7837            $ref: '#/components/schemas/HTTPCommand'
7838          maxItems: 200
7839          description: Static HTTP declarations for selected extensions when no composition has
7840            been loaded. Reading these declarations does not prepare extensions or start a kernel.
7841        discovery:
7842          type: [object, 'null']
7843          properties:
7844            revision:
7845              $ref: '#/components/schemas/ID'
7846            workspace:
7847              $ref: '#/components/schemas/Workspace'
7848            candidates:
7849              type: array
7850              items:
7851                $ref: '#/components/schemas/CatalogCandidate'
7852              maxItems: 200
7853            diagnostics:
7854              type: array
7855              items:
7856                $ref: '#/components/schemas/SafeReason'
7857              maxItems: 200
7858            next:
7859              anyOf:
7860              - $ref: '#/components/schemas/PageToken'
7861              - type: 'null'
7862          required: [revision, workspace, candidates, diagnostics, next]
7863          additionalProperties: false
7864        discovery_failure:
7865          anyOf:
7866          - $ref: '#/components/schemas/SafeReason'
7867          - type: 'null'
7868        loaded:
7869          type: object
7870          properties:
7871            revision:
7872              anyOf:
7873              - $ref: '#/components/schemas/ID'
7874              - type: 'null'
7875            commands:
7876              type: array
7877              items:
7878                oneOf:
7879                - $ref: '#/components/schemas/HTTPCommand'
7880                - $ref: '#/components/schemas/InputCommand'
7881              maxItems: 200
7882            next:
7883              anyOf:
7884              - $ref: '#/components/schemas/PageToken'
7885              - type: 'null'
7886          required: [revision, commands, next]
7887          additionalProperties: false
7888        pages:
7889          type: array
7890          items:
7891            $ref: '#/components/schemas/PageDescriptor'
7892          maxItems: 16
7893      description: Pagination is independent for discovered candidates and loaded commands; next tokens
7894        identify their section.
7895      required: [discovery, discovery_failure, loaded]
7896      additionalProperties: false
7897    SessionReloadOutcome:
7898      type: object
7899      properties:
7900        state:
7901          type: string
7902          enum: [applied, failed, skipped]
7903        loaded_revision:
7904          anyOf:
7905          - $ref: '#/components/schemas/ID'
7906          - type: 'null'
7907        restart_required:
7908          type: boolean
7909        warnings:
7910          $ref: '#/components/schemas/Warnings'
7911        failure:
7912          anyOf:
7913          - $ref: '#/components/schemas/SafeReason'
7914          - type: 'null'
7915      required: [state, loaded_revision, restart_required, warnings, failure]
7916      additionalProperties: false
7917    ModelReloadOutcome:
7918      type: object
7919      properties:
7920        provider:
7921          $ref: '#/components/schemas/ID'
7922        state:
7923          type: string
7924          enum: [refreshed, failed, skipped]
7925        observed_at:
7926          anyOf:
7927          - $ref: '#/components/schemas/Timestamp'
7928          - type: 'null'
7929        failure:
7930          anyOf:
7931          - $ref: '#/components/schemas/SafeReason'
7932          - type: 'null'
7933      required: [provider, state, observed_at, failure]
7934      additionalProperties: false
7935    CachePolicyReloadOutcome:
7936      type: object
7937      properties:
7938        state:
7939          type: string
7940          enum: [refreshed, failed]
7941        failure:
7942          anyOf:
7943          - $ref: '#/components/schemas/SafeReason'
7944          - type: 'null'
7945      required: [state, failure]
7946      additionalProperties: false
7947    ReloadRequest:
7948      type: object
7949      properties:
7950        target:
7951          type: string
7952          enum: [session, models, both]
7953          default: both
7954      additionalProperties: false
7955    ReloadResult:
7956      type: object
7957      properties:
7958        cache_policy:
7959          anyOf:
7960          - $ref: '#/components/schemas/CachePolicyReloadOutcome'
7961          - type: 'null'
7962        session:
7963          anyOf:
7964          - $ref: '#/components/schemas/SessionReloadOutcome'
7965          - type: 'null'
7966        models:
7967          type: array
7968          items:
7969            $ref: '#/components/schemas/ModelReloadOutcome'
7970          maxItems: 200
7971      required: [session, models, cache_policy]
7972      additionalProperties: false
7973    KernelUpgradeResult:
7974      type: object
7975      properties:
7976        old_build:
7977          anyOf:
7978          - type: string
7979            maxLength: 512
7980          - type: 'null'
7981        new_build:
7982          anyOf:
7983          - type: string
7984            maxLength: 512
7985          - type: 'null'
7986        state:
7987          type: string
7988          enum: [upgraded, unchanged, failed]
7989        stopped_jobs:
7990          type: array
7991          items:
7992            type: object
7993            properties:
7994              id:
7995                $ref: '#/components/schemas/ID'
7996              reason:
7997                $ref: '#/components/schemas/SafeReason'
7998            required: [id, reason]
7999            additionalProperties: false
8000          maxItems: 200
8001        warnings:
8002          $ref: '#/components/schemas/Warnings'
8003        failure:
8004          anyOf:
8005          - $ref: '#/components/schemas/SafeReason'
8006          - type: 'null'
8007        old_kernel_id:
8008          anyOf:
8009          - $ref: '#/components/schemas/ID'
8010          - type: 'null'
8011        new_kernel_id:
8012          anyOf:
8013          - $ref: '#/components/schemas/ID'
8014          - type: 'null'
8015      required: [old_build, new_build, state, stopped_jobs, warnings, failure, old_kernel_id, new_kernel_id]
8016      additionalProperties: false
8017    CompactionRequest:
8018      type: object
8019      properties:
8020        strategy:
8021          $ref: '#/components/schemas/ID'
8022      additionalProperties: false
8023    CompactionObservation:
8024      type: object
8025      properties:
8026        strategy:
8027          anyOf:
8028          - $ref: '#/components/schemas/ID'
8029          - type: 'null'
8030        before_tokens:
8031          anyOf:
8032          - $ref: '#/components/schemas/Counter'
8033          - type: 'null'
8034        after_tokens:
8035          anyOf:
8036          - $ref: '#/components/schemas/Counter'
8037          - type: 'null'
8038        evicted_entries:
8039          $ref: '#/components/schemas/Counter'
8040        summary:
8041          type: string
8042          maxLength: 32768
8043      required: [strategy, before_tokens, after_tokens, evicted_entries, summary]
8044      additionalProperties: false
8045    CompactionResult:
8046      type: object
8047      properties:
8048        selection_applied:
8049          type: boolean
8050        effective_strategy:
8051          anyOf:
8052          - $ref: '#/components/schemas/ID'
8053          - type: 'null'
8054        state:
8055          type: string
8056          enum: [compacted, unchanged, failed]
8057        observation:
8058          anyOf:
8059          - $ref: '#/components/schemas/CompactionObservation'
8060          - type: 'null'
8061        failure:
8062          anyOf:
8063          - $ref: '#/components/schemas/SafeReason'
8064          - type: 'null'
8065      required: [selection_applied, effective_strategy, state, observation, failure]
8066      additionalProperties: false
8067    Model:
8068      type: object
8069      properties:
8070        id:
8071          $ref: '#/components/schemas/ID'
8072        label:
8073          type: string
8074          maxLength: 256
8075        efforts:
8076          type: array
8077          items:
8078            type: object
8079            properties:
8080              id:
8081                type: string
8082                maxLength: 100
8083              label:
8084                type: string
8085                maxLength: 256
8086            required: [id, label]
8087            additionalProperties: false
8088          maxItems: 100
8089        default_context_tokens:
8090          anyOf:
8091          - $ref: '#/components/schemas/Counter'
8092          - type: 'null'
8093        effective_context_tokens:
8094          anyOf:
8095          - $ref: '#/components/schemas/Counter'
8096          - type: 'null'
8097        max_context_tokens:
8098          anyOf:
8099          - $ref: '#/components/schemas/Counter'
8100          - type: 'null'
8101        max_output_tokens:
8102          anyOf:
8103          - $ref: '#/components/schemas/Counter'
8104          - type: 'null'
8105        input_modalities:
8106          type: array
8107          items:
8108            type: string
8109            minLength: 1
8110            maxLength: 100
8111          maxItems: 32
8112        image_edge:
8113          anyOf:
8114          - type: integer
8115            minimum: 1
8116            maximum: 65536
8117          - type: 'null'
8118        raised:
8119          type: boolean
8120        cap_key:
8121          $ref: '#/components/schemas/ID'
8122        cache_policy:
8123          type: object
8124          properties:
8125            ttl_seconds:
8126              anyOf:
8127              - $ref: '#/components/schemas/Counter'
8128              - type: 'null'
8129            source:
8130              anyOf:
8131              - type: string
8132                maxLength: 256
8133              - type: 'null'
8134          required: [ttl_seconds, source]
8135          additionalProperties: false
8136        source:
8137          type: string
8138          maxLength: 256
8139        observed_at:
8140          anyOf:
8141          - $ref: '#/components/schemas/Timestamp'
8142          - type: 'null'
8143      required: [id, label, efforts, default_context_tokens, effective_context_tokens, max_context_tokens,
8144        max_output_tokens, input_modalities, image_edge, raised, cap_key, cache_policy, source, observed_at]
8145      additionalProperties: false
8146    CachePolicyEntry:
8147      type: object
8148      properties:
8149        id:
8150          $ref: '#/components/schemas/ID'
8151        layer:
8152          type: string
8153          enum:
8154          - default
8155          - remote
8156          - local
8157        match:
8158          type: object
8159          properties:
8160            extension:
8161              anyOf:
8162              - type: array
8163                items:
8164                  type: string
8165                  maxLength: 4096
8166                maxItems: 100
8167              - type: 'null'
8168            host:
8169              anyOf:
8170              - type: array
8171                items:
8172                  type: string
8173                  maxLength: 4096
8174                maxItems: 100
8175              - type: 'null'
8176            model:
8177              anyOf:
8178              - type: array
8179                items:
8180                  type: string
8181                  maxLength: 4096
8182                maxItems: 100
8183              - type: 'null'
8184          required:
8185          - extension
8186          - host
8187          - model
8188          additionalProperties: false
8189        policy:
8190          type: string
8191          enum:
8192          - refresh
8193          - fixed
8194          - evict
8195          - unknown
8196        clock:
8197          type: string
8198          enum:
8199          - request
8200          - response
8201        tiers:
8202          anyOf:
8203          - type: array
8204            maxItems: 32
8205            items:
8206              type: object
8207              properties:
8208                seconds:
8209                  $ref: '#/components/schemas/Counter'
8210                write:
8211                  anyOf:
8212                  - type: number
8213                    minimum: 0
8214                  - type: 'null'
8215              required:
8216              - seconds
8217              - write
8218              additionalProperties: false
8219          - type: 'null'
8220        read:
8221          anyOf:
8222          - type: number
8223            minimum: 0
8224          - type: 'null'
8225        survival:
8226          anyOf:
8227          - type: object
8228            properties:
8229              typical:
8230                $ref: '#/components/schemas/Counter'
8231              max:
8232                anyOf:
8233                - $ref: '#/components/schemas/Counter'
8234                - type: 'null'
8235            required:
8236            - typical
8237            - max
8238            additionalProperties: false
8239          - type: 'null'
8240        evidence:
8241          type: string
8242          enum:
8243          - documented
8244          - measured
8245          - implemented
8246          - folklore
8247          - unknown
8248        source:
8249          type: string
8250          maxLength: 4096
8251        checked:
8252          type: string
8253          maxLength: 100
8254        note:
8255          type: string
8256          maxLength: 16384
8257      required:
8258      - id
8259      - layer
8260      - match
8261      - policy
8262      - clock
8263      - tiers
8264      - read
8265      - survival
8266      - evidence
8267      - source
8268      - checked
8269      - note
8270      additionalProperties: false
8271    CachePolicyLayer:
8272      type: object
8273      properties:
8274        name:
8275          type: string
8276          enum:
8277          - default
8278          - remote
8279          - local
8280        path:
8281          type: string
8282          maxLength: 16384
8283        loaded:
8284          type: boolean
8285        error:
8286          anyOf:
8287          - $ref: '#/components/schemas/SafeReason'
8288          - type: 'null'
8289      required:
8290      - name
8291      - path
8292      - loaded
8293      - error
8294      additionalProperties: false
8295    CachePolicyPage:
8296      type: object
8297      properties:
8298        entries:
8299          type: array
8300          items:
8301            $ref: '#/components/schemas/CachePolicyEntry'
8302          maxItems: 200
8303        layers:
8304          type: array
8305          items:
8306            $ref: '#/components/schemas/CachePolicyLayer'
8307          maxItems: 3
8308        matched:
8309          anyOf:
8310          - $ref: '#/components/schemas/CachePolicyEntry'
8311          - type: 'null'
8312        next:
8313          anyOf:
8314          - $ref: '#/components/schemas/PageToken'
8315          - type: 'null'
8316      required:
8317      - entries
8318      - layers
8319      - matched
8320      - next
8321      additionalProperties: false
8322    ModelRead:
8323      oneOf:
8324      - $ref: '#/components/schemas/ModelPage'
8325      - $ref: '#/components/schemas/CachePolicyPage'
8326    ModelPage:
8327      type: object
8328      properties:
8329        items:
8330          type: array
8331          items:
8332            $ref: '#/components/schemas/Model'
8333          maxItems: 200
8334        next:
8335          anyOf:
8336          - $ref: '#/components/schemas/PageToken'
8337          - type: 'null'
8338      required: [items, next]
8339      additionalProperties: false
8340    Host:
8341      type: object
8342      properties:
8343        step:
8344          description: Current probe progress. Null when connecting or when no probe is running.
8345          anyOf:
8346          - type: string
8347            enum: [staging]
8348          - type: 'null'
8349        target:
8350          $ref: '#/components/schemas/ID'
8351        state:
8352          type: string
8353          enum: [unknown, probing, ready, needs_auth, unreachable, unsupported]
8354        detail:
8355          anyOf:
8356          - $ref: '#/components/schemas/SafeReason'
8357          - type: 'null'
8358        observed_at:
8359          anyOf:
8360          - $ref: '#/components/schemas/Timestamp'
8361          - type: 'null'
8362        os:
8363          anyOf:
8364          - type: string
8365            maxLength: 256
8366          - type: 'null'
8367        architecture:
8368          anyOf:
8369          - type: string
8370            maxLength: 256
8371          - type: 'null'
8372        home:
8373          anyOf:
8374          - $ref: '#/components/schemas/Workspace'
8375          - type: 'null'
8376        authentication:
8377          anyOf:
8378          - type: object
8379            properties:
8380              instructions:
8381                type: string
8382                maxLength: 4096
8383              ssh_target:
8384                type: string
8385                maxLength: 4096
8386              control_path:
8387                anyOf:
8388                - type: string
8389                  maxLength: 4096
8390                - type: 'null'
8391            required: [instructions, ssh_target, control_path]
8392            additionalProperties: false
8393          - type: 'null'
8394      required: [target, state, detail, observed_at, os, architecture, home, authentication]
8395      additionalProperties: false
8396    HostPage:
8397      type: object
8398      properties:
8399        items:
8400          type: array
8401          items:
8402            $ref: '#/components/schemas/Host'
8403          maxItems: 200
8404        next:
8405          anyOf:
8406          - $ref: '#/components/schemas/PageToken'
8407          - type: 'null'
8408      required: [items, next]
8409      additionalProperties: false
8410    RecentWorkspace:
8411      type: object
8412      properties:
8413        location:
8414          $ref: '#/components/schemas/Workspace'
8415        use_count:
8416          $ref: '#/components/schemas/Counter'
8417        activity_at:
8418          anyOf:
8419          - $ref: '#/components/schemas/Timestamp'
8420          - type: 'null'
8421      required: [location, use_count, activity_at]
8422      additionalProperties: false
8423    RecentWorkspacePage:
8424      type: object
8425      properties:
8426        items:
8427          type: array
8428          items:
8429            $ref: '#/components/schemas/RecentWorkspace'
8430          maxItems: 200
8431        next:
8432          anyOf:
8433          - $ref: '#/components/schemas/PageToken'
8434          - type: 'null'
8435      required: [items, next]
8436      additionalProperties: false
8437    TreeChild:
8438      type: object
8439      properties:
8440        name:
8441          type: string
8442          maxLength: 4096
8443        kind:
8444          type: string
8445          enum: [file, directory, symlink]
8446        location:
8447          $ref: '#/components/schemas/Workspace'
8448        language:
8449          anyOf:
8450          - type: string
8451            maxLength: 256
8452          - type: 'null'
8453        changed:
8454          $ref: '#/components/schemas/Counter'
8455      required: [name, kind, location, language, changed]
8456      additionalProperties: false
8457    TreeEntry:
8458      type: object
8459      properties:
8460        name:
8461          type: string
8462          maxLength: 4096
8463        kind:
8464          type: string
8465          enum: [file, directory, symlink]
8466        location:
8467          $ref: '#/components/schemas/Workspace'
8468        children:
8469          type: array
8470          items:
8471            $ref: '#/components/schemas/TreeChild'
8472          maxItems: 4
8473        more:
8474          $ref: '#/components/schemas/Counter'
8475        language:
8476          anyOf:
8477          - type: string
8478            maxLength: 256
8479          - type: 'null'
8480        changed:
8481          $ref: '#/components/schemas/Counter'
8482      required: [name, kind, location, children, more, language, changed]
8483      additionalProperties: false
8484    GitFacts:
8485      type: object
8486      properties:
8487        kind:
8488          const: git
8489        branch:
8490          anyOf:
8491          - type: string
8492            maxLength: 4096
8493          - type: 'null'
8494        revision:
8495          anyOf:
8496          - type: string
8497            maxLength: 256
8498          - type: 'null'
8499        dirty:
8500          anyOf:
8501          - type: boolean
8502          - type: 'null'
8503        added:
8504          anyOf:
8505          - $ref: '#/components/schemas/Counter'
8506          - type: 'null'
8507        modified:
8508          anyOf:
8509          - $ref: '#/components/schemas/Counter'
8510          - type: 'null'
8511        removed:
8512          anyOf:
8513          - $ref: '#/components/schemas/Counter'
8514          - type: 'null'
8515        root:
8516          $ref: '#/components/schemas/Workspace'
8517        changed:
8518          anyOf:
8519          - $ref: '#/components/schemas/Counter'
8520          - type: 'null'
8521        touched_at:
8522          anyOf:
8523          - $ref: '#/components/schemas/Timestamp'
8524          - type: 'null'
8525      required: [kind, branch, revision, dirty, added, modified, removed, root, changed, touched_at]
8526      additionalProperties: false
8527    JJFacts:
8528      type: object
8529      properties:
8530        kind:
8531          const: jj
8532        change_id:
8533          anyOf:
8534          - type: string
8535            maxLength: 256
8536          - type: 'null'
8537        revision:
8538          anyOf:
8539          - type: string
8540            maxLength: 256
8541          - type: 'null'
8542        description:
8543          anyOf:
8544          - type: string
8545            maxLength: 4096
8546          - type: 'null'
8547        dirty:
8548          anyOf:
8549          - type: boolean
8550          - type: 'null'
8551        conflicts:
8552          anyOf:
8553          - type: boolean
8554          - type: 'null'
8555        root:
8556          $ref: '#/components/schemas/Workspace'
8557        changed:
8558          anyOf:
8559          - $ref: '#/components/schemas/Counter'
8560          - type: 'null'
8561        touched_at:
8562          anyOf:
8563          - $ref: '#/components/schemas/Timestamp'
8564          - type: 'null'
8565        bookmark:
8566          anyOf:
8567          - type: object
8568            properties:
8569              name:
8570                type: string
8571                maxLength: 4096
8572              ahead:
8573                $ref: '#/components/schemas/Counter'
8574            required: [name, ahead]
8575            additionalProperties: false
8576          - type: 'null'
8577      required: [kind, change_id, revision, description, dirty, conflicts, root, changed, touched_at,
8578        bookmark]
8579      additionalProperties: false
8580    WorkspacePreview:
8581      type: object
8582      properties:
8583        repository:
8584          anyOf:
8585          - oneOf:
8586            - $ref: '#/components/schemas/GitFacts'
8587            - $ref: '#/components/schemas/JJFacts'
8588          - type: 'null'
8589        repository_diagnostic:
8590          anyOf:
8591          - $ref: '#/components/schemas/SafeReason'
8592          - type: 'null'
8593        languages:
8594          type: array
8595          items:
8596            type: object
8597            properties:
8598              name:
8599                type: string
8600                maxLength: 256
8601              bytes:
8602                $ref: '#/components/schemas/Counter'
8603              share:
8604                type: number
8605                minimum: 0
8606                maximum: 1
8607              color:
8608                anyOf:
8609                - type: string
8610                  pattern: ^#[0-9a-fA-F]{6}$
8611                - type: 'null'
8612            required: [name, bytes, share, color]
8613            additionalProperties: false
8614          maxItems: 100
8615        tree:
8616          type: array
8617          items:
8618            $ref: '#/components/schemas/TreeEntry'
8619          maxItems: 12
8620        more:
8621          $ref: '#/components/schemas/Counter'
8622      required: [repository, repository_diagnostic, languages, tree, more]
8623      additionalProperties: false
8624    WorkspaceDirectory:
8625      type: object
8626      properties:
8627        directory:
8628          $ref: '#/components/schemas/Workspace'
8629        parent:
8630          anyOf:
8631          - $ref: '#/components/schemas/Workspace'
8632          - type: 'null'
8633        home:
8634          anyOf:
8635          - $ref: '#/components/schemas/Workspace'
8636          - type: 'null'
8637        host:
8638          anyOf:
8639          - $ref: '#/components/schemas/Host'
8640          - type: 'null'
8641        items:
8642          type: array
8643          items:
8644            type: object
8645            properties:
8646              name:
8647                type: string
8648                maxLength: 4096
8649              location:
8650                $ref: '#/components/schemas/Workspace'
8651              vcs:
8652                anyOf:
8653                - type: string
8654                  enum: [git, jj]
8655                - type: 'null'
8656              modified_at:
8657                anyOf:
8658                - $ref: '#/components/schemas/Timestamp'
8659                - type: 'null'
8660              hidden:
8661                type: boolean
8662            required: [name, location, vcs, modified_at, hidden]
8663            additionalProperties: false
8664          maxItems: 200
8665        next:
8666          anyOf:
8667          - $ref: '#/components/schemas/PageToken'
8668          - type: 'null'
8669        preview:
8670          $ref: '#/components/schemas/WorkspacePreview'
8671      required: [directory, parent, home, host, items, next]
8672      additionalProperties: false
8673    WorkspaceRead:
8674      oneOf:
8675      - $ref: '#/components/schemas/RecentWorkspacePage'
8676      - $ref: '#/components/schemas/WorkspaceDirectory'
8677    Account:
8678      type: object
8679      properties:
8680        id:
8681          $ref: '#/components/schemas/ID'
8682        provider:
8683          $ref: '#/components/schemas/ID'
8684        label:
8685          type: string
8686          maxLength: 256
8687        detail:
8688          type: string
8689          maxLength: 4096
8690        kind:
8691          type: string
8692          enum: [model, service]
8693          default: model
8694        selected_by_profiles:
8695          type: array
8696          items:
8697            $ref: '#/components/schemas/ID'
8698          maxItems: 200
8699      required: [id, provider, label, detail, kind, selected_by_profiles]
8700      additionalProperties: false
8701    LoginProvider:
8702      type: object
8703      properties:
8704        id:
8705          $ref: '#/components/schemas/ID'
8706        label:
8707          type: string
8708          maxLength: 256
8709        detail:
8710          type: string
8711          maxLength: 4096
8712        kind:
8713          type: string
8714          enum: [model, service]
8715          default: model
8716        flows:
8717          type: array
8718          items:
8719            type: string
8720            enum: [browser, manual, device, form]
8721          maxItems: 4
8722        fields:
8723          type: array
8724          items:
8725            $ref: '#/components/schemas/FormField'
8726          maxItems: 100
8727      required: [id, label, detail, kind, flows, fields]
8728      additionalProperties: false
8729    Auth:
8730      type: object
8731      properties:
8732        providers:
8733          type: array
8734          items:
8735            $ref: '#/components/schemas/LoginProvider'
8736          maxItems: 200
8737        accounts:
8738          type: array
8739          items:
8740            $ref: '#/components/schemas/Account'
8741          maxItems: 200
8742      required: [providers, accounts]
8743      additionalProperties: false
8744    LoginRequest:
8745      type: object
8746      properties:
8747        provider:
8748          $ref: '#/components/schemas/ID'
8749        flow:
8750          type: string
8751          enum: [browser, manual, device, form]
8752        values:
8753          type: object
8754          additionalProperties:
8755            type: [string, boolean, integer]
8756      description: Flow defaults to the provider preferred flow. Form names, types and required values
8757        are checked against that provider declaration. Values are write-only.
8758      required: [provider, values]
8759      additionalProperties: false
8760    LoginPatch:
8761      type: object
8762      properties:
8763        response:
8764          type: string
8765          minLength: 1
8766          writeOnly: true
8767          maxLength: 16384
8768      required: [response]
8769      additionalProperties: false
8770    Login:
8771      type: object
8772      properties:
8773        id:
8774          $ref: '#/components/schemas/ID'
8775        provider:
8776          $ref: '#/components/schemas/ID'
8777        url:
8778          anyOf:
8779          - type: string
8780            format: uri
8781            maxLength: 4096
8782          - type: 'null'
8783        expires_at:
8784          $ref: '#/components/schemas/Timestamp'
8785        state:
8786          type: string
8787          enum: [waiting, exchanging, complete, failed, cancelled, expired]
8788        instructions:
8789          anyOf:
8790          - type: string
8791            maxLength: 4096
8792          - type: 'null'
8793        progress:
8794          type: string
8795          maxLength: 4096
8796        accounts:
8797          type: array
8798          items:
8799            $ref: '#/components/schemas/Account'
8800          maxItems: 200
8801        failure:
8802          anyOf:
8803          - $ref: '#/components/schemas/SafeReason'
8804          - type: 'null'
8805      required: [id, provider, url, expires_at, state, instructions, progress, accounts, failure]
8806      additionalProperties: false
8807      examples:
8808      - id: 01a0fcea-2b00-7000-8000-000000000003
8809        provider: example-provider
8810        url: https://provider.example/authorize?state=synthetic-state
8811        expires_at: '2026-10-02T14:15:00Z'
8812        state: waiting
8813        instructions: Paste the callback URL if the browser cannot reach the daemon.
8814        progress: Waiting for authorization.
8815        accounts: []
8816        failure: null
8817    MailMetadata:
8818      type: object
8819      properties:
8820        mail_id:
8821          $ref: '#/components/schemas/ID'
8822        sender_session_id:
8823          anyOf:
8824          - $ref: '#/components/schemas/ID'
8825          - type: 'null'
8826        receiver_session_id:
8827          $ref: '#/components/schemas/ID'
8828        kind:
8829          type: string
8830          enum: [task, message, result, unreviewed, webhook]
8831        bytes:
8832          $ref: '#/components/schemas/Counter'
8833        sender_label:
8834          anyOf:
8835          - type: string
8836            x-max-utf8-bytes: 400
8837            maxLength: 100
8838          - type: 'null'
8839      required: [mail_id, sender_session_id, receiver_session_id, kind, bytes, sender_label]
8840      additionalProperties: false
8841    SessionStatusEvent:
8842      type: object
8843      properties:
8844        type:
8845          const: status
8846        sequence:
8847          $ref: '#/components/schemas/Counter'
8848        data:
8849          $ref: '#/components/schemas/SessionStatus'
8850      required: [type, sequence, data]
8851      additionalProperties: false
8852    SessionInputEvent:
8853      type: object
8854      properties:
8855        type:
8856          const: input
8857        sequence:
8858          $ref: '#/components/schemas/Counter'
8859        data:
8860          type: object
8861          properties:
8862            input:
8863              $ref: '#/components/schemas/Input'
8864          required: [input]
8865          additionalProperties: false
8866      required: [type, sequence, data]
8867      additionalProperties: false
8868    SessionTextEvent:
8869      type: object
8870      properties:
8871        type:
8872          const: text
8873        sequence:
8874          $ref: '#/components/schemas/Counter'
8875        data:
8876          type: object
8877          properties:
8878            run_id:
8879              $ref: '#/components/schemas/ID'
8880            message_id:
8881              $ref: '#/components/schemas/ID'
8882            text:
8883              type: string
8884              maxLength: 262144
8885          required: [run_id, message_id, text]
8886          additionalProperties: false
8887      required: [type, sequence, data]
8888      additionalProperties: false
8889    SessionThinkingEvent:
8890      type: object
8891      properties:
8892        type:
8893          const: thinking
8894        sequence:
8895          $ref: '#/components/schemas/Counter'
8896        data:
8897          type: object
8898          properties:
8899            run_id:
8900              $ref: '#/components/schemas/ID'
8901            message_id:
8902              $ref: '#/components/schemas/ID'
8903            text:
8904              type: string
8905              maxLength: 262144
8906            elapsed_ms:
8907              description: Completed thinking duration, when observed.
8908              $ref: '#/components/schemas/Counter'
8909          required: [run_id, message_id, text]
8910          additionalProperties: false
8911      required: [type, sequence, data]
8912      additionalProperties: false
8913    SessionMessageEvent:
8914      type: object
8915      properties:
8916        type:
8917          const: message
8918        sequence:
8919          $ref: '#/components/schemas/Counter'
8920        data:
8921          type: object
8922          properties:
8923            entry:
8924              $ref: '#/components/schemas/HistoryEntry'
8925          required: [entry]
8926          additionalProperties: false
8927      required: [type, sequence, data]
8928      additionalProperties: false
8929    SessionToolProgressEvent:
8930      type: object
8931      properties:
8932        type:
8933          const: tool_progress
8934        sequence:
8935          $ref: '#/components/schemas/Counter'
8936        data:
8937          type: object
8938          properties:
8939            progress:
8940              anyOf:
8941              - $ref: '#/components/schemas/ToolProgress'
8942              - type: 'null'
8943          required: [progress]
8944          additionalProperties: false
8945      x-max-encoded-bytes: 8192
8946      required: [type, sequence, data]
8947      additionalProperties: false
8948    SessionToolEvent:
8949      type: object
8950      properties:
8951        type:
8952          const: tool
8953        sequence:
8954          $ref: '#/components/schemas/Counter'
8955        data:
8956          type: object
8957          properties:
8958            tool_call_id:
8959              $ref: '#/components/schemas/ID'
8960            progress_call_id:
8961              $ref: '#/components/schemas/ID'
8962            name:
8963              type: string
8964              maxLength: 100
8965            arguments:
8966              $ref: '#/components/schemas/DynamicJSON'
8967            result:
8968              $ref: '#/components/schemas/DynamicJSON'
8969            trace:
8970              anyOf:
8971              - $ref: '#/components/schemas/ToolTrace'
8972              - type: 'null'
8973            content_complete:
8974              type: boolean
8975            reference:
8976              anyOf:
8977              - $ref: '#/components/schemas/ContentReference'
8978              - type: 'null'
8979          required: [tool_call_id, progress_call_id, name, arguments, result, trace, content_complete,
8980            reference]
8981          additionalProperties: false
8982      required: [type, sequence, data]
8983      additionalProperties: false
8984    SessionNoteEvent:
8985      type: object
8986      properties:
8987        type:
8988          const: note
8989        sequence:
8990          $ref: '#/components/schemas/Counter'
8991        data:
8992          type: object
8993          properties:
8994            entry_id:
8995              $ref: '#/components/schemas/ID'
8996            origin:
8997              type: string
8998              maxLength: 256
8999            text:
9000              type: string
9001              maxLength: 262144
9002            mail:
9003              anyOf:
9004              - $ref: '#/components/schemas/MailMetadata'
9005              - type: 'null'
9006          required: [entry_id, origin, text, mail]
9007          additionalProperties: false
9008      required: [type, sequence, data]
9009      additionalProperties: false
9010    SessionRetryEvent:
9011      type: object
9012      properties:
9013        type:
9014          const: retry
9015        sequence:
9016          $ref: '#/components/schemas/Counter'
9017        data:
9018          type: object
9019          properties:
9020            run_id:
9021              $ref: '#/components/schemas/ID'
9022            attempt:
9023              type: integer
9024              minimum: 1
9025              maximum: 9007199254740991
9026            reason:
9027              $ref: '#/components/schemas/SafeReason'
9028            delay_ms:
9029              $ref: '#/components/schemas/Counter'
9030          required: [run_id, attempt, reason, delay_ms]
9031          additionalProperties: false
9032      required: [type, sequence, data]
9033      additionalProperties: false
9034    SessionUsageEvent:
9035      type: object
9036      properties:
9037        type:
9038          const: usage
9039        sequence:
9040          $ref: '#/components/schemas/Counter'
9041        data:
9042          $ref: '#/components/schemas/Usage'
9043      required: [type, sequence, data]
9044      additionalProperties: false
9045    SessionCommittedEvent:
9046      type: object
9047      properties:
9048        type:
9049          const: committed
9050        sequence:
9051          $ref: '#/components/schemas/Counter'
9052        data:
9053          type: object
9054          properties:
9055            high_water:
9056              $ref: '#/components/schemas/Counter'
9057            replaces_all_live:
9058              type: boolean
9059              description: Retire all provisional output for a model commit.
9060            replaces_live_ids:
9061              type: array
9062              items:
9063                $ref: '#/components/schemas/ID'
9064              maxItems: 256
9065          required: [high_water, replaces_live_ids, replaces_all_live]
9066          additionalProperties: false
9067      required: [type, sequence, data]
9068      additionalProperties: false
9069    SessionTurnCompletedEvent:
9070      type: object
9071      properties:
9072        type:
9073          const: turn_completed
9074        sequence:
9075          $ref: '#/components/schemas/Counter'
9076        data:
9077          type: object
9078          properties:
9079            run_id:
9080              $ref: '#/components/schemas/ID'
9081            state:
9082              type: string
9083              enum: [completed, interrupted, failed, abandoned]
9084            input_ids:
9085              type: array
9086              items:
9087                $ref: '#/components/schemas/ID'
9088              maxItems: 200
9089            input_count:
9090              $ref: '#/components/schemas/Counter'
9091            truncated:
9092              type: boolean
9093          required: [run_id, state, input_ids, input_count, truncated]
9094          additionalProperties: false
9095      required: [type, sequence, data]
9096      additionalProperties: false
9097    SessionCompactedEvent:
9098      type: object
9099      properties:
9100        type:
9101          const: compacted
9102        sequence:
9103          $ref: '#/components/schemas/Counter'
9104        data:
9105          $ref: '#/components/schemas/CompactionObservation'
9106      required: [type, sequence, data]
9107      additionalProperties: false
9108    SessionErrorEvent:
9109      type: object
9110      properties:
9111        type:
9112          const: error
9113        sequence:
9114          $ref: '#/components/schemas/Counter'
9115        data:
9116          type: object
9117          properties:
9118            run_id:
9119              anyOf:
9120              - $ref: '#/components/schemas/ID'
9121              - type: 'null'
9122            code:
9123              type: string
9124              maxLength: 100
9125            message:
9126              type: string
9127              maxLength: 4096
9128          required: [run_id, code, message]
9129          additionalProperties: false
9130      required: [type, sequence, data]
9131      additionalProperties: false
9132    SessionInvalidateEvent:
9133      type: object
9134      properties:
9135        type:
9136          const: invalidate
9137        sequence:
9138          $ref: '#/components/schemas/Counter'
9139        data:
9140          type: object
9141          properties:
9142            kind:
9143              type: string
9144              enum: [session, settings, catalog, context, extension]
9145            url:
9146              $ref: '#/components/schemas/ResourceURL'
9147          required: [kind, url]
9148          additionalProperties: false
9149      required: [type, sequence, data]
9150      additionalProperties: false
9151    SessionEvent:
9152      oneOf:
9153      - $ref: '#/components/schemas/SessionStatusEvent'
9154      - $ref: '#/components/schemas/SessionInputEvent'
9155      - $ref: '#/components/schemas/SessionTextEvent'
9156      - $ref: '#/components/schemas/SessionThinkingEvent'
9157      - $ref: '#/components/schemas/SessionMessageEvent'
9158      - $ref: '#/components/schemas/SessionToolProgressEvent'
9159      - $ref: '#/components/schemas/SessionToolEvent'
9160      - $ref: '#/components/schemas/SessionNoteEvent'
9161      - $ref: '#/components/schemas/SessionRetryEvent'
9162      - $ref: '#/components/schemas/SessionUsageEvent'
9163      - $ref: '#/components/schemas/SessionCommittedEvent'
9164      - $ref: '#/components/schemas/SessionTurnCompletedEvent'
9165      - $ref: '#/components/schemas/SessionCompactedEvent'
9166      - $ref: '#/components/schemas/SessionErrorEvent'
9167      - $ref: '#/components/schemas/SessionInvalidateEvent'
9168    ResetEvent:
9169      type: object
9170      properties:
9171        type:
9172          const: reset
9173        data:
9174          type: object
9175          properties:
9176            reason:
9177              type: string
9178              enum: [initial, generation_changed, replay_unavailable, recovery]
9179          required: [reason]
9180          additionalProperties: false
9181      required: [type, data]
9182      additionalProperties: false
9183    FailureEvent:
9184      type: object
9185      properties:
9186        type:
9187          const: failure
9188        data:
9189          $ref: '#/components/schemas/SafeReason'
9190      required: [type, data]
9191      additionalProperties: false
9192    ReplayBatch:
9193      type: object
9194      properties:
9195        generation:
9196          $ref: '#/components/schemas/Generation'
9197        cursor:
9198          $ref: '#/components/schemas/Counter'
9199        events:
9200          type: array
9201          items:
9202            $ref: '#/components/schemas/SessionEvent'
9203          maxItems: 256
9204      description: Empty keepalive keeps the last sequence. Nonempty event sequences are contiguous from
9205        the requested cursor.
9206      required: [generation, cursor, events]
9207      additionalProperties: false
9208      examples:
9209      - generation: J6kYj6IGcXyP3eMIp-WL3A
9210        cursor: 1
9211        events:
9212        - type: input
9213          sequence: 1
9214          data:
9215            input:
9216              id: 01a0fcea-2b00-7000-8000-000000000002
9217              session_id: 01a0fcea-2b00-7000-8000-000000000001
9218              kind: message
9219              admission: accepted
9220              http_status: 202
9221              problem: null
9222              accepted_at: '2026-10-02T14:00:00Z'
9223              acceptance_order: 1
9224              delivery: pending
9225              blocking_reason: null
9226              transcript_position: null
9227              turn: null
9228              client_id: draft-1
9229    ResetBatch:
9230      type: object
9231      properties:
9232        generation:
9233          $ref: '#/components/schemas/Generation'
9234        cursor:
9235          $ref: '#/components/schemas/Counter'
9236        events:
9237          type: array
9238          prefixItems:
9239          - $ref: '#/components/schemas/ResetEvent'
9240          items:
9241            $ref: '#/components/schemas/SessionEvent'
9242          minItems: 1
9243          maxItems: 256
9244        snapshot:
9245          $ref: '#/components/schemas/Session'
9246      description: Leading reset and complete snapshot. Later events, if any, follow the snapshot cursor.
9247        Envelope cursor advances through every delivered event.
9248      required: [generation, cursor, events, snapshot]
9249      additionalProperties: false
9250      examples:
9251      - generation: J6kYj6IGcXyP3eMIp-WL3A
9252        cursor: 0
9253        events:
9254        - type: reset
9255          data:
9256            reason: initial
9257        snapshot:
9258          id: 01a0fcea-2b00-7000-8000-000000000001
9259          name: New session
9260          automatic_name: New session
9261          workspace: /workspace/project
9262          location:
9263            host: null
9264            user: null
9265            path: /workspace/project
9266            label: null
9267          parent_id: null
9268          root_id: 01a0fcea-2b00-7000-8000-000000000001
9269          address: null
9270          depth: 0
9271          closed: false
9272          created_at: '2026-10-02T14:00:00Z'
9273          activity_at: '2026-10-02T14:00:00Z'
9274          provider_profile: personal
9275          model: example-model
9276          effort: null
9277          status:
9278            phase: idle
9279            run_id: null
9280            interrupt_requested: false
9281            blocking_reason: null
9282          preview:
9283            text: ''
9284            transcript_count: 0
9285            truncated: false
9286          preferences:
9287            pinned: false
9288            pin_order: null
9289            archived: false
9290            opens: 0
9291          current_progress: []
9292          active_output: []
9293          activity:
9294            lines: []
9295            output_scalars: 0
9296            output_utf8_bytes: 0
9297            observed_at: '2026-10-02T14:00:00Z'
9298            latest_input: null
9299            latest_answer: null
9300          cursor:
9301            generation: J6kYj6IGcXyP3eMIp-WL3A
9302            sequence: 0
9303          creation:
9304            submitted:
9305              kind: new
9306              workspace: /workspace/project
9307              name: null
9308              provider_profile: null
9309              model: null
9310              effort: null
9311            resolved:
9312              workspace: /workspace/project
9313              provider_profile: personal
9314              model: example-model
9315              effort: null
9316          revision: config-1
9317          family_revision: family-1
9318          configuration_resource:
9319            url: /sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration
9320            etag: '"session-config-1"'
9321            value:
9322              id: 01a0fcea-2b00-7000-8000-000000000001
9323              name: New session
9324              workspace: /workspace/project
9325              provider_profile: personal
9326              model: example-model
9327              effort: null
9328              preferences:
9329                pinned: false
9330                pin_order: null
9331                archived: false
9332              selection:
9333                extensions: {}
9334                skills: {}
9335                instructions: {}
9336                mcp: {}
9337              revision: config-1
9338              family_revision: family-1
9339          workspace_change: null
9340          selection:
9341            overrides:
9342              extensions: {}
9343              skills: {}
9344              instructions: {}
9345              mcp: {}
9346            effective:
9347              extensions: {}
9348              skills: {}
9349              instructions: {}
9350              mcp: {}
9351          composition:
9352            desired_revision: composition-1
9353            loaded_revision: null
9354            needs_reload: true
9355            dependencies: {}
9356            quarantine: []
9357            availability: {}
9358          kernel:
9359            instance_id: null
9360            state: none
9361            stage: null
9362            build: null
9363            stale: false
9364            staleness_reasons: []
9365            live_job_count: 0
9366            running_jobs: []
9367          pending_inputs: []
9368          input_order: 0
9369          usage:
9370            model: null
9371            observed_at: null
9372            prompt_tokens: null
9373            cached_prompt_tokens: null
9374            cache_write_tokens: null
9375            completion_tokens: null
9376            total_tokens: null
9377            elapsed_ms: null
9378            tokens_per_second: null
9379            context_window_tokens: null
9380            cache_ttl_seconds: null
9381            cache_fade: []
9382          history:
9383            items: []
9384            older: null
9385            newer: null
9386            high_water: 0
9387          glances: []
9388    FailureBatch:
9389      type: object
9390      properties:
9391        generation:
9392          $ref: '#/components/schemas/Generation'
9393        cursor:
9394          $ref: '#/components/schemas/Counter'
9395        events:
9396          type: array
9397          items:
9398            $ref: '#/components/schemas/FailureEvent'
9399          minItems: 1
9400          maxItems: 1
9401      description: Terminal failure, alone with no snapshot. It does not commit a replacement cursor.
9402      required: [generation, cursor, events]
9403      additionalProperties: false
9404      examples:
9405      - generation: J6kYj6IGcXyP3eMIp-WL3A
9406        cursor: 0
9407        events:
9408        - type: failure
9409          data:
9410            code: history_unavailable
9411            detail: Durable history could not be loaded.
9412    SessionBatch:
9413      oneOf:
9414      - $ref: '#/components/schemas/ReplayBatch'
9415      - $ref: '#/components/schemas/ResetBatch'
9416      - $ref: '#/components/schemas/FailureBatch'
9417      x-max-encoded-bytes: 1048576
9418    ActivityEvent:
9419      type: object
9420      properties:
9421        type:
9422          const: activity
9423        data:
9424          type: object
9425          properties:
9426            session_id:
9427              $ref: '#/components/schemas/ID'
9428            cursor:
9429              $ref: '#/components/schemas/Cursor'
9430            status:
9431              $ref: '#/components/schemas/SessionStatus'
9432            current_progress:
9433              type: array
9434              items:
9435                $ref: '#/components/schemas/ToolProgress'
9436              maxItems: 32
9437            activity:
9438              $ref: '#/components/schemas/Activity'
9439          required: [session_id, cursor, status, current_progress, activity]
9440          additionalProperties: false
9441      required: [type, data]
9442      additionalProperties: false
9443    CollectionInvalidateEvent:
9444      type: object
9445      properties:
9446        type:
9447          const: invalidate
9448        data:
9449          type: object
9450          properties:
9451            urls:
9452              type: array
9453              items:
9454                $ref: '#/components/schemas/ResourceURL'
9455              maxItems: 200
9456            session_ids:
9457              type: array
9458              items:
9459                $ref: '#/components/schemas/ID'
9460              maxItems: 200
9461            scope_dirty:
9462              type: boolean
9463          required: [urls, session_ids, scope_dirty]
9464          additionalProperties: false
9465      required: [type, data]
9466      additionalProperties: false
9467    CollectionMailEvent:
9468      type: object
9469      properties:
9470        type:
9471          const: mail
9472        data:
9473          $ref: '#/components/schemas/MailMetadata'
9474      required: [type, data]
9475      additionalProperties: false
9476    CollectionReadyEvent:
9477      type: object
9478      properties:
9479        type:
9480          const: ready
9481        data:
9482          $ref: '#/components/schemas/EmptyRequest'
9483      required: [type, data]
9484      additionalProperties: false
9485    CollectionResetEvent:
9486      type: object
9487      properties:
9488        type:
9489          const: reset
9490        data:
9491          type: object
9492          properties:
9493            reason:
9494              const: initial
9495          required: [reason]
9496          additionalProperties: false
9497      required: [type, data]
9498      additionalProperties: false
9499    CollectionOverflowEvent:
9500      type: object
9501      properties:
9502        type:
9503          const: overflow
9504        data:
9505          $ref: '#/components/schemas/EmptyRequest'
9506      required: [type, data]
9507      additionalProperties: false
9508    CollectionReadyBatch:
9509      type: object
9510      properties:
9511        events:
9512          type: array
9513          prefixItems:
9514          - $ref: '#/components/schemas/CollectionReadyEvent'
9515          - $ref: '#/components/schemas/CollectionResetEvent'
9516          items: false
9517          minItems: 2
9518          maxItems: 2
9519      required: [events]
9520      additionalProperties: false
9521      examples:
9522      - events:
9523        - type: ready
9524          data: {}
9525        - type: reset
9526          data:
9527            reason: initial
9528    CollectionBatch:
9529      oneOf:
9530      - $ref: '#/components/schemas/CollectionReadyBatch'
9531      - type: object
9532        properties:
9533          events:
9534            type: array
9535            items:
9536              oneOf:
9537              - $ref: '#/components/schemas/ActivityEvent'
9538              - $ref: '#/components/schemas/CollectionInvalidateEvent'
9539              - $ref: '#/components/schemas/CollectionMailEvent'
9540            maxItems: 256
9541        required: [events]
9542        additionalProperties: false
9543      - type: object
9544        properties:
9545          events:
9546            type: array
9547            items:
9548              $ref: '#/components/schemas/CollectionOverflowEvent'
9549            minItems: 1
9550            maxItems: 1
9551        required: [events]
9552        additionalProperties: false
9553      x-max-encoded-bytes: 1048576
9554      examples:
9555      - events:
9556        - type: activity
9557          data:
9558            session_id: 01a0fcea-2b00-7000-8000-000000000001
9559            cursor:
9560              generation: J6kYj6IGcXyP3eMIp-WL3A
9561              sequence: 0
9562            status:
9563              phase: idle
9564              run_id: null
9565              interrupt_requested: false
9566              blocking_reason: null
9567            current_progress: []
9568            active_output: []
9569            activity:
9570              lines: []
9571              output_scalars: 0
9572              output_utf8_bytes: 0
9573              observed_at: '2026-10-02T14:00:00Z'
9574              latest_input: null
9575              latest_answer: null
9576    SessionSSE:
9577      type: object
9578      properties:
9579        data:
9580          type: string
9581          contentMediaType: application/json
9582          contentSchema:
9583            $ref: '#/components/schemas/SessionBatch'
9584      description: One parsed SSE event. Decode data as JSON and validate SessionBatch separately; contentSchema
9585        is not asserted by ordinary JSON Schema validation. No event, id or retry fields are emitted.
9586      required: [data]
9587      additionalProperties: false
9588      examples:
9589      - data: '{"generation":"J6kYj6IGcXyP3eMIp-WL3A","cursor":0,"events":[{"type":"reset","data":{"reason":"initial"}}],"snapshot":{"id":"01a0fcea-2b00-7000-8000-000000000001","name":"New
9590          session","automatic_name":"New session","workspace":"/workspace/project","location":{"host":null,"user":null,"path":"/workspace/project","label":null},"parent_id":null,"root_id":"01a0fcea-2b00-7000-8000-000000000001","address":null,"depth":0,"closed":false,"created_at":"2026-10-02T14:00:00Z","activity_at":"2026-10-02T14:00:00Z","provider_profile":"personal","model":"example-model","effort":null,"status":{"phase":"idle","run_id":null,"interrupt_requested":false,"blocking_reason":null},"preview":{"text":"","transcript_count":0,"truncated":false},"preferences":{"pinned":false,"pin_order":null,"archived":false,"opens":0},"current_progress":[],"activity":{"lines":[],"output_scalars":0,"output_utf8_bytes":0,"observed_at":"2026-10-02T14:00:00Z","latest_input":null,"latest_answer":null},"cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"creation":{"submitted":{"kind":"new","workspace":"/workspace/project","name":null,"provider_profile":null,"model":null,"effort":null},"resolved":{"workspace":"/workspace/project","provider_profile":"personal","model":"example-model","effort":null}},"revision":"config-1","family_revision":"family-1","configuration_resource":{"url":"/sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration","etag":"\"session-config-1\"","value":{"id":"01a0fcea-2b00-7000-8000-000000000001","name":"New
9591          session","workspace":"/workspace/project","provider_profile":"personal","model":"example-model","effort":null,"preferences":{"pinned":false,"pin_order":null,"archived":false},"selection":{"extensions":{},"skills":{},"instructions":{},"mcp":{}},"revision":"config-1","family_revision":"family-1"}},"workspace_change":null,"selection":{"overrides":{"extensions":{},"skills":{},"instructions":{},"mcp":{}},"effective":{"extensions":{},"skills":{},"instructions":{},"mcp":{}}},"composition":{"desired_revision":"composition-1","loaded_revision":null,"needs_reload":true,"dependencies":{},"quarantine":[],"availability":{}},"kernel":{"instance_id":null,"state":"none","stage":null,"build":null,"stale":false,"staleness_reasons":[],"live_job_count":0,"running_jobs":[]},"pending_inputs":[],"input_order":0,"usage":{"model":null,"observed_at":null,"prompt_tokens":null,"cached_prompt_tokens":null,"cache_write_tokens":null,"completion_tokens":null,"total_tokens":null,"elapsed_ms":null,"tokens_per_second":null,"context_window_tokens":null,"cache_ttl_seconds":null,"cache_fade":[]},"history":{"items":[],"older":null,"newer":null,"high_water":0},"glances":[]}}'
9592      - data: '{"generation":"J6kYj6IGcXyP3eMIp-WL3A","cursor":1,"events":[{"type":"input","sequence":1,"data":{"input":{"id":"01a0fcea-2b00-7000-8000-000000000002","session_id":"01a0fcea-2b00-7000-8000-000000000001","kind":"message","admission":"accepted","http_status":202,"problem":null,"accepted_at":"2026-10-02T14:00:00Z","acceptance_order":1,"delivery":"pending","blocking_reason":null,"transcript_position":null,"turn":null,"client_id":"draft-1"}}}]}'
9593    CollectionSSE:
9594      type: object
9595      properties:
9596        data:
9597          type: string
9598          contentMediaType: application/json
9599          contentSchema:
9600            $ref: '#/components/schemas/CollectionBatch'
9601      description: One parsed SSE event. Decode data as JSON and validate CollectionBatch separately;
9602        contentSchema is not asserted by ordinary JSON Schema validation. No event, id or retry fields
9603        are emitted.
9604      required: [data]
9605      additionalProperties: false
9606      examples:
9607      - data: '{"events":[{"type":"ready","data":{}},{"type":"reset","data":{"reason":"initial"}}]}'
9608      - data: '{"events":[{"type":"activity","data":{"session_id":"01a0fcea-2b00-7000-8000-000000000001","cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"status":{"phase":"idle","run_id":null,"interrupt_requested":false,"blocking_reason":null},"current_progress":[],"activity":{"lines":[],"output_scalars":0,"output_utf8_bytes":0,"observed_at":"2026-10-02T14:00:00Z","latest_input":null,"latest_answer":null}}}]}'
9609    WorkItem:
9610      type: object
9611      properties:
9612        id:
9613          $ref: '#/components/schemas/ID'
9614        workspace:
9615          $ref: '#/components/schemas/Workspace'
9616        title:
9617          type: string
9618          x-max-utf8-bytes: 4096
9619          maxLength: 4096
9620        notes:
9621          type: string
9622          x-max-utf8-bytes: 32768
9623          maxLength: 32768
9624        parent_id:
9625          anyOf:
9626          - $ref: '#/components/schemas/ID'
9627          - type: 'null'
9628        session_id:
9629          anyOf:
9630          - $ref: '#/components/schemas/ID'
9631          - type: 'null'
9632        run_id:
9633          anyOf:
9634          - $ref: '#/components/schemas/ID'
9635          - type: 'null'
9636        status:
9637          type: string
9638          enum: [open, active, blocked, done, cancelled]
9639        revision:
9640          $ref: '#/components/schemas/ID'
9641        created_at:
9642          $ref: '#/components/schemas/Timestamp'
9643        updated_at:
9644          $ref: '#/components/schemas/Timestamp'
9645      required: [id, workspace, title, notes, parent_id, session_id, run_id, status, revision, created_at,
9646        updated_at]
9647      additionalProperties: false
9648    WorkCreate:
9649      type: object
9650      properties:
9651        title:
9652          type: string
9653          x-max-utf8-bytes: 4096
9654          maxLength: 4096
9655        notes:
9656          type: string
9657          x-max-utf8-bytes: 32768
9658          maxLength: 32768
9659        parent_id:
9660          anyOf:
9661          - $ref: '#/components/schemas/ID'
9662          - type: 'null'
9663        session_id:
9664          anyOf:
9665          - $ref: '#/components/schemas/ID'
9666          - type: 'null'
9667        run_id:
9668          anyOf:
9669          - $ref: '#/components/schemas/ID'
9670          - type: 'null'
9671        notify_session_id:
9672          $ref: '#/components/schemas/ID'
9673      required: [title]
9674      additionalProperties: false
9675      examples:
9676      - title: Fix the parser
9677    WorkPatch:
9678      type: object
9679      properties:
9680        title:
9681          type: string
9682          x-max-utf8-bytes: 4096
9683          maxLength: 4096
9684        notes:
9685          type: string
9686          x-max-utf8-bytes: 32768
9687          maxLength: 32768
9688        session_id:
9689          anyOf:
9690          - $ref: '#/components/schemas/ID'
9691          - type: 'null'
9692        run_id:
9693          anyOf:
9694          - $ref: '#/components/schemas/ID'
9695          - type: 'null'
9696        status:
9697          type: string
9698          enum: [open, active, blocked, done, cancelled]
9699        notify_session_id:
9700          $ref: '#/components/schemas/ID'
9701      additionalProperties: false
9702    Paperclip:
9703      type: object
9704      properties:
9705        id:
9706          $ref: '#/components/schemas/ID'
9707        topic:
9708          type: string
9709          enum: [harness, workflow, bug, user, other]
9710        title:
9711          type: string
9712          x-max-utf8-bytes: 4096
9713          maxLength: 4096
9714        message:
9715          type: string
9716          minLength: 1
9717          pattern: \S
9718          x-max-utf8-bytes: 32768
9719          maxLength: 32768
9720        suggestion:
9721          type: string
9722          x-max-utf8-bytes: 16384
9723          maxLength: 16384
9724        reply:
9725          type: string
9726          x-max-utf8-bytes: 16384
9727          maxLength: 16384
9728        status:
9729          type: string
9730          enum: [open, acknowledged, resolved, dismissed]
9731        session_id:
9732          anyOf:
9733          - $ref: '#/components/schemas/ID'
9734          - type: 'null'
9735        workspace:
9736          anyOf:
9737          - $ref: '#/components/schemas/Workspace'
9738          - type: 'null'
9739        created_at:
9740          $ref: '#/components/schemas/Timestamp'
9741        updated_at:
9742          $ref: '#/components/schemas/Timestamp'
9743        resolution:
9744          type: string
9745          x-max-utf8-bytes: 16384
9746          maxLength: 16384
9747        resolving_session_id:
9748          anyOf:
9749          - $ref: '#/components/schemas/ID'
9750          - type: 'null'
9751        revision:
9752          $ref: '#/components/schemas/ID'
9753      required: [id, topic, title, message, suggestion, reply, status, session_id, workspace, created_at,
9754        updated_at, resolution, resolving_session_id, revision]
9755      additionalProperties: false
9756    PaperclipCreate:
9757      type: object
9758      properties:
9759        topic:
9760          type: string
9761          enum: [harness, workflow, bug, user, other]
9762        title:
9763          type: string
9764          x-max-utf8-bytes: 4096
9765          maxLength: 4096
9766        message:
9767          type: string
9768          minLength: 1
9769          pattern: \S
9770          x-max-utf8-bytes: 32768
9771          maxLength: 32768
9772        suggestion:
9773          type: string
9774          x-max-utf8-bytes: 16384
9775          maxLength: 16384
9776        session_id:
9777          anyOf:
9778          - $ref: '#/components/schemas/ID'
9779          - type: 'null'
9780        workspace:
9781          anyOf:
9782          - $ref: '#/components/schemas/Workspace'
9783          - type: 'null'
9784      required: [message]
9785      additionalProperties: false
9786    PaperclipPatch:
9787      type: object
9788      properties:
9789        status:
9790          type: string
9791          enum: [acknowledged, resolved, dismissed]
9792        reply:
9793          type: string
9794          x-max-utf8-bytes: 16384
9795          maxLength: 16384
9796        resolution:
9797          type: string
9798          x-max-utf8-bytes: 16384
9799          maxLength: 16384
9800      description: Reply cannot accompany resolved or dismissed status. It acknowledges the item.
9801      additionalProperties: false
9802    ScheduleJob:
9803      type: object
9804      properties:
9805        id:
9806          $ref: '#/components/schemas/ID'
9807        session_id:
9808          $ref: '#/components/schemas/ID'
9809        kind:
9810          type: string
9811          enum: [once, recurring, heartbeat]
9812        prompt:
9813          type: string
9814          minLength: 1
9815          x-max-utf8-bytes: 4096
9816          maxLength: 4096
9817        next_at:
9818          $ref: '#/components/schemas/Timestamp'
9819        every_seconds:
9820          anyOf:
9821          - type: integer
9822            minimum: 60
9823            maximum: 31536000
9824          - type: 'null'
9825        revision:
9826          $ref: '#/components/schemas/ID'
9827        created_at:
9828          description: Null for historical schedules that did not record creation time.
9829          anyOf:
9830          - $ref: '#/components/schemas/Timestamp'
9831          - type: 'null'
9832        updated_at:
9833          description: Null until a historical schedule records a new update.
9834          anyOf:
9835          - $ref: '#/components/schemas/Timestamp'
9836          - type: 'null'
9837      required: [id, session_id, kind, prompt, next_at, every_seconds, revision, created_at, updated_at]
9838      additionalProperties: false
9839    ScheduleCreate:
9840      type: object
9841      properties:
9842        session_id:
9843          $ref: '#/components/schemas/ID'
9844        kind:
9845          type: string
9846          enum: [once, recurring, heartbeat]
9847        prompt:
9848          type: string
9849          minLength: 1
9850          x-max-utf8-bytes: 4096
9851          maxLength: 4096
9852        delay_seconds:
9853          type: integer
9854          minimum: 0
9855          maximum: 31536000
9856          default: 0
9857        every_seconds:
9858          type: integer
9859          minimum: 60
9860          maximum: 31536000
9861      required: [session_id, kind, prompt]
9862      additionalProperties: false
9863      allOf:
9864      - if:
9865          properties:
9866            kind:
9867              const: once
9868        then:
9869          not:
9870            required: [every_seconds]
9871        else:
9872          required: [every_seconds]
9873    SchedulePatch:
9874      type: object
9875      properties:
9876        kind:
9877          type: string
9878          enum: [once, recurring, heartbeat]
9879        prompt:
9880          type: string
9881          minLength: 1
9882          x-max-utf8-bytes: 4096
9883          maxLength: 4096
9884        delay_seconds:
9885          type: integer
9886          minimum: 0
9887          maximum: 31536000
9888        every_seconds:
9889          anyOf:
9890          - type: integer
9891            minimum: 60
9892            maximum: 31536000
9893          - type: 'null'
9894      description: 'Validate complete candidate: once has null repetition; recurring and heartbeat require
9895        every_seconds.'
9896      additionalProperties: false
9897    LinkConfiguration:
9898      type: object
9899      properties:
9900        workspace:
9901          $ref: '#/components/schemas/Workspace'
9902        group_id:
9903          $ref: '#/components/schemas/ID'
9904        members:
9905          type: array
9906          items:
9907            $ref: '#/components/schemas/Workspace'
9908          maxItems: 200
9909        revision:
9910          $ref: '#/components/schemas/ID'
9911        next:
9912          anyOf:
9913          - $ref: '#/components/schemas/PageToken'
9914          - type: 'null'
9915      required: [workspace, group_id, members, revision, next]
9916      additionalProperties: false
9917    LinkConfigurationResource:
9918      type: object
9919      properties:
9920        url:
9921          $ref: '#/components/schemas/ResourceURL'
9922        etag:
9923          $ref: '#/components/schemas/ETag'
9924        value:
9925          $ref: '#/components/schemas/LinkConfiguration'
9926      required: [url, etag, value]
9927      additionalProperties: false
9928    LinkGroup:
9929      type: object
9930      properties:
9931        page:
9932          $ref: '#/components/schemas/PageDescriptor'
9933        configuration_resource:
9934          $ref: '#/components/schemas/LinkConfigurationResource'
9935        presence:
9936          type: array
9937          items:
9938            type: object
9939            properties:
9940              workspace:
9941                $ref: '#/components/schemas/Workspace'
9942              exists:
9943                description: Observed directory presence. Null for an uninspected or unreachable location.
9944                anyOf:
9945                - type: boolean
9946                - type: 'null'
9947              session_count:
9948                $ref: '#/components/schemas/Counter'
9949              host:
9950                anyOf:
9951                - $ref: '#/components/schemas/Host'
9952                - type: 'null'
9953            required: [workspace, session_count, host, exists]
9954            additionalProperties: false
9955          maxItems: 200
9956        next:
9957          anyOf:
9958          - $ref: '#/components/schemas/PageToken'
9959          - type: 'null'
9960      required: [configuration_resource, presence, next]
9961      additionalProperties: false
9962    LinkMerge:
9963      type: object
9964      properties:
9965        other_workspace:
9966          $ref: '#/components/schemas/Workspace'
9967        other_etag:
9968          $ref: '#/components/schemas/ETag'
9969      required: [other_workspace, other_etag]
9970      additionalProperties: false
9971    LinkChange:
9972      type: object
9973      properties:
9974        resource:
9975          $ref: '#/components/schemas/LinkConfigurationResource'
9976        notifications:
9977          type: array
9978          items:
9979            $ref: '#/components/schemas/TargetNotification'
9980          maxItems: 200
9981        notification_count:
9982          $ref: '#/components/schemas/Counter'
9983        truncated:
9984          type: boolean
9985      required: [resource, notifications, notification_count, truncated]
9986      additionalProperties: false
9987    HookConfiguration:
9988      type: object
9989      properties:
9990        id:
9991          $ref: '#/components/schemas/ID'
9992        name:
9993          type: string
9994          pattern: ^[A-Za-z0-9_-]{1,64}$
9995          maxLength: 64
9996        session_id:
9997          $ref: '#/components/schemas/ID'
9998        enabled:
9999          type: boolean
10000        signature_header:
10001          type: string
10002          pattern: ^[A-Za-z0-9-]{1,64}$
10003          maxLength: 64
10004        signature_prefix:
10005          type: string
10006          pattern: ^[^\r\n]*$
10007          x-max-utf8-bytes: 32
10008          maxLength: 32
10009        revision:
10010          $ref: '#/components/schemas/ID'
10011      required: [id, name, session_id, enabled, signature_header, signature_prefix, revision]
10012      additionalProperties: false
10013    HookConfigurationResource:
10014      type: object
10015      properties:
10016        url:
10017          $ref: '#/components/schemas/ResourceURL'
10018        etag:
10019          $ref: '#/components/schemas/ETag'
10020        value:
10021          $ref: '#/components/schemas/HookConfiguration'
10022      required: [url, etag, value]
10023      additionalProperties: false
10024    Hook:
10025      type: object
10026      properties:
10027        configuration_resource:
10028          $ref: '#/components/schemas/HookConfigurationResource'
10029        delivery_url:
10030          type: string
10031          format: uri
10032          maxLength: 4096
10033        pending_count:
10034          $ref: '#/components/schemas/Counter'
10035        deferral_reason:
10036          anyOf:
10037          - $ref: '#/components/schemas/SafeReason'
10038          - type: 'null'
10039      required: [configuration_resource, delivery_url, pending_count, deferral_reason]
10040      additionalProperties: false
10041    HookCreate:
10042      type: object
10043      properties:
10044        name:
10045          type: string
10046          pattern: ^[A-Za-z0-9_-]{1,64}$
10047          maxLength: 64
10048        session_id:
10049          $ref: '#/components/schemas/ID'
10050        enabled:
10051          type: boolean
10052        signature_header:
10053          type: string
10054          pattern: ^[A-Za-z0-9-]{1,64}$
10055          maxLength: 64
10056        signature_prefix:
10057          type: string
10058          pattern: ^[^\r\n]*$
10059          x-max-utf8-bytes: 32
10060          maxLength: 32
10061        secret:
10062          type: string
10063          minLength: 1
10064          writeOnly: true
10065          x-min-utf8-bytes: 16
10066          x-max-utf8-bytes: 4096
10067          maxLength: 4096
10068      required: [name, session_id]
10069      additionalProperties: false
10070      examples:
10071      - session_id: 01a0fcea-2b00-7000-8000-000000000001
10072        name: ci
10073    HookPatch:
10074      type: object
10075      properties:
10076        name:
10077          type: string
10078          pattern: ^[A-Za-z0-9_-]{1,64}$
10079          maxLength: 64
10080        enabled:
10081          type: boolean
10082        signature_header:
10083          type: string
10084          pattern: ^[A-Za-z0-9-]{1,64}$
10085          maxLength: 64
10086        signature_prefix:
10087          type: string
10088          pattern: ^[^\r\n]*$
10089          x-max-utf8-bytes: 32
10090          maxLength: 32
10091      additionalProperties: false
10092    HookSecretRequest:
10093      type: object
10094      properties:
10095        secret:
10096          type: string
10097          minLength: 1
10098          writeOnly: true
10099          x-min-utf8-bytes: 16
10100          x-max-utf8-bytes: 4096
10101          maxLength: 4096
10102      additionalProperties: false
10103    HookChange:
10104      type: object
10105      properties:
10106        resource:
10107          $ref: '#/components/schemas/HookConfigurationResource'
10108        notification:
10109          $ref: '#/components/schemas/Notification'
10110        secret:
10111          type: string
10112          minLength: 1
10113          x-min-utf8-bytes: 16
10114          x-max-utf8-bytes: 4096
10115          maxLength: 4096
10116      description: Secret appears only on creation and explicit rotation, including a generated secret.
10117        Never present on PATCH or reads.
10118      required: [resource, notification]
10119      additionalProperties: false
10120      examples:
10121      - resource:
10122          url: /extensions/webhooks/hooks/hook-1?view=configuration
10123          etag: '"hook-revision-1"'
10124          value:
10125            id: hook-1
10126            name: ci
10127            session_id: 01a0fcea-2b00-7000-8000-000000000001
10128            enabled: true
10129            signature_header: X-Albedo-Signature
10130            signature_prefix: sha256=
10131            revision: hook-revision-1
10132        notification:
10133          state: not_requested
10134          code: null
10135          detail: null
10136        secret: synthetic-example-hook-secret
10137    HookPermission:
10138      type: object
10139      properties:
10140        session_id:
10141          $ref: '#/components/schemas/ID'
10142        agent_manage:
10143          type: boolean
10144        revision:
10145          $ref: '#/components/schemas/ID'
10146      required: [session_id, agent_manage, revision]
10147      additionalProperties: false
10148    HookPermissionPatch:
10149      type: object
10150      properties:
10151        agent_manage:
10152          type: boolean
10153      additionalProperties: false
10154    HookPermissionResource:
10155      type: object
10156      properties:
10157        url:
10158          $ref: '#/components/schemas/ResourceURL'
10159        etag:
10160          $ref: '#/components/schemas/ETag'
10161        value:
10162          $ref: '#/components/schemas/HookPermission'
10163      required: [url, etag, value]
10164      additionalProperties: false
10165    HookPermissionChange:
10166      type: object
10167      properties:
10168        resource:
10169          $ref: '#/components/schemas/HookPermissionResource'
10170        notification:
10171          $ref: '#/components/schemas/Notification'
10172      required: [resource, notification]
10173      additionalProperties: false
10174    Delivery:
10175      type: object
10176      properties:
10177        id:
10178          $ref: '#/components/schemas/ID'
10179        hook_id:
10180          $ref: '#/components/schemas/ID'
10181        session_id:
10182          $ref: '#/components/schemas/ID'
10183        received_at:
10184          $ref: '#/components/schemas/Timestamp'
10185        delivered_at:
10186          anyOf:
10187          - $ref: '#/components/schemas/Timestamp'
10188          - type: 'null'
10189        attempts:
10190          $ref: '#/components/schemas/Counter'
10191        deferral_reason:
10192          anyOf:
10193          - $ref: '#/components/schemas/SafeReason'
10194          - type: 'null'
10195      required: [id, hook_id, session_id, received_at, delivered_at, attempts, deferral_reason]
10196    DeliveryDetail:
10197      allOf:
10198      - $ref: '#/components/schemas/Delivery'
10199      - type: object
10200        properties:
10201          payload:
10202            type: object
10203            properties:
10204              encoding:
10205                type: string
10206                enum: [utf8, base64]
10207              data:
10208                type: string
10209                maxLength: 90000
10210            required: [encoding, data]
10211            additionalProperties: false
10212        required: [payload]
10213    WorkResource:
10214      type: object
10215      properties:
10216        url:
10217          $ref: '#/components/schemas/ResourceURL'
10218        etag:
10219          $ref: '#/components/schemas/ETag'
10220        value:
10221          $ref: '#/components/schemas/WorkItem'
10222      required: [url, etag, value]
10223      additionalProperties: false
10224    WorkChange:
10225      type: object
10226      properties:
10227        resource:
10228          $ref: '#/components/schemas/WorkResource'
10229        notification:
10230          $ref: '#/components/schemas/Notification'
10231      required: [resource, notification]
10232      additionalProperties: false
10233      examples:
10234      - resource:
10235          url: /extensions/work/items/work-1?workspace=%2Fworkspace%2Fproject
10236          etag: '"work-revision-1"'
10237          value:
10238            id: work-1
10239            workspace: /workspace/project
10240            title: Fix the parser
10241            notes: ''
10242            parent_id: null
10243            session_id: null
10244            run_id: null
10245            status: open
10246            revision: work-revision-1
10247            created_at: '2026-10-02T14:00:00Z'
10248            updated_at: '2026-10-02T14:00:00Z'
10249        notification:
10250          state: not_requested
10251          code: null
10252          detail: null
10253    WorkPage:
10254      type: object
10255      properties:
10256        items:
10257          type: array
10258          items:
10259            $ref: '#/components/schemas/WorkResource'
10260          maxItems: 200
10261        next:
10262          anyOf:
10263          - $ref: '#/components/schemas/PageToken'
10264          - type: 'null'
10265        page:
10266          $ref: '#/components/schemas/PageDescriptor'
10267        glance:
10268          $ref: '#/components/schemas/Glance'
10269      required: [items, next]
10270      additionalProperties: false
10271    PaperclipResource:
10272      type: object
10273      properties:
10274        url:
10275          $ref: '#/components/schemas/ResourceURL'
10276        etag:
10277          $ref: '#/components/schemas/ETag'
10278        value:
10279          $ref: '#/components/schemas/Paperclip'
10280      required: [url, etag, value]
10281      additionalProperties: false
10282    PaperclipChange:
10283      type: object
10284      properties:
10285        resource:
10286          $ref: '#/components/schemas/PaperclipResource'
10287        notification:
10288          $ref: '#/components/schemas/Notification'
10289      required: [resource, notification]
10290      additionalProperties: false
10291    PaperclipPage:
10292      type: object
10293      properties:
10294        items:
10295          type: array
10296          items:
10297            $ref: '#/components/schemas/PaperclipResource'
10298          maxItems: 200
10299        next:
10300          anyOf:
10301          - $ref: '#/components/schemas/PageToken'
10302          - type: 'null'
10303        page:
10304          $ref: '#/components/schemas/PageDescriptor'
10305        glance:
10306          $ref: '#/components/schemas/Glance'
10307      required: [items, next]
10308      additionalProperties: false
10309    WebSearchProvider:
10310      type: object
10311      properties:
10312        name:
10313          $ref: '#/components/schemas/ID'
10314        label:
10315          type: string
10316          maxLength: 256
10317        position:
10318          type: integer
10319          minimum: 1
10320        enabled:
10321          type: boolean
10322      required: [name, label, position, enabled]
10323      additionalProperties: false
10324    WebSearchProviderResource:
10325      type: object
10326      properties:
10327        url:
10328          $ref: '#/components/schemas/ResourceURL'
10329        etag:
10330          $ref: '#/components/schemas/ETag'
10331        value:
10332          $ref: '#/components/schemas/WebSearchProvider'
10333      required: [url, etag, value]
10334      additionalProperties: false
10335    WebSearchProviderPage:
10336      type: object
10337      properties:
10338        items:
10339          type: array
10340          items:
10341            $ref: '#/components/schemas/WebSearchProviderResource'
10342          maxItems: 200
10343        next:
10344          type: 'null'
10345        page:
10346          $ref: '#/components/schemas/PageDescriptor'
10347      required: [items, next, page]
10348      additionalProperties: false
10349    WebSearchProviderChangeRequest:
10350      type: object
10351      properties:
10352        change:
10353          type: string
10354          enum: [up, down, toggle]
10355      required: [change]
10356      additionalProperties: false
10357    WebSearchProviderChange:
10358      type: object
10359      properties:
10360        resource:
10361          $ref: '#/components/schemas/WebSearchProviderResource'
10362      required: [resource]
10363      additionalProperties: false
10364    ScheduleResource:
10365      type: object
10366      properties:
10367        url:
10368          $ref: '#/components/schemas/ResourceURL'
10369        etag:
10370          $ref: '#/components/schemas/ETag'
10371        value:
10372          $ref: '#/components/schemas/ScheduleJob'
10373      required: [url, etag, value]
10374      additionalProperties: false
10375    ScheduleChange:
10376      type: object
10377      properties:
10378        resource:
10379          $ref: '#/components/schemas/ScheduleResource'
10380        notification:
10381          $ref: '#/components/schemas/Notification'
10382      required: [resource, notification]
10383      additionalProperties: false
10384    SchedulePage:
10385      type: object
10386      properties:
10387        items:
10388          type: array
10389          items:
10390            $ref: '#/components/schemas/ScheduleResource'
10391          maxItems: 200
10392        next:
10393          anyOf:
10394          - $ref: '#/components/schemas/PageToken'
10395          - type: 'null'
10396        page:
10397          $ref: '#/components/schemas/PageDescriptor'
10398        glance:
10399          $ref: '#/components/schemas/Glance'
10400      required: [items, next]
10401      additionalProperties: false
10402    HookPage:
10403      type: object
10404      properties:
10405        items:
10406          type: array
10407          items:
10408            $ref: '#/components/schemas/Hook'
10409          maxItems: 200
10410        next:
10411          anyOf:
10412          - $ref: '#/components/schemas/PageToken'
10413          - type: 'null'
10414      required: [items, next]
10415      additionalProperties: false
10416    DeliveryPage:
10417      type: object
10418      properties:
10419        items:
10420          type: array
10421          items:
10422            $ref: '#/components/schemas/Delivery'
10423          maxItems: 200
10424        next:
10425          anyOf:
10426          - $ref: '#/components/schemas/PageToken'
10427          - type: 'null'
10428      required: [items, next]
10429      additionalProperties: false
10430    ExtensionDeletion:
10431      type: object
10432      properties:
10433        id:
10434          $ref: '#/components/schemas/ID'
10435        notification:
10436          $ref: '#/components/schemas/Notification'
10437      required: [id, notification]
10438      additionalProperties: false
10439    ProxyTextPart:
10440      type: object
10441      properties:
10442        type:
10443          const: text
10444        text:
10445          type: string
10446      required: [type, text]
10447      additionalProperties: false
10448    ProxyImagePart:
10449      type: object
10450      properties:
10451        type:
10452          const: image_url
10453        image_url:
10454          type: object
10455          properties:
10456            url:
10457              type: string
10458              pattern: ^data:image/(png|jpeg|gif|webp);base64,
10459            detail:
10460              type: string
10461              enum: [auto, low, high]
10462          required: [url]
10463          additionalProperties: false
10464      required: [type, image_url]
10465      additionalProperties: false
10466    ProxyToolCall:
10467      type: object
10468      properties:
10469        id:
10470          type: string
10471          minLength: 1
10472          maxLength: 270000
10473        type:
10474          const: function
10475        function:
10476          type: object
10477          properties:
10478            name:
10479              type: string
10480              minLength: 1
10481              maxLength: 256
10482            arguments:
10483              type: string
10484          required: [name, arguments]
10485          additionalProperties: false
10486      required: [id, type, function]
10487      additionalProperties: false
10488    ProxyMessage:
10489      type: object
10490      properties:
10491        role:
10492          type: string
10493          enum: [system, developer, user, assistant, tool]
10494        content:
10495          anyOf:
10496          - oneOf:
10497            - type: string
10498            - type: array
10499              items:
10500                oneOf:
10501                - $ref: '#/components/schemas/ProxyTextPart'
10502                - $ref: '#/components/schemas/ProxyImagePart'
10503          - type: 'null'
10504        name:
10505          type: string
10506          maxLength: 256
10507        tool_call_id:
10508          type: string
10509          minLength: 1
10510          maxLength: 270000
10511        tool_calls:
10512          type: array
10513          items:
10514            $ref: '#/components/schemas/ProxyToolCall'
10515          maxItems: 200
10516        reasoning_content:
10517          anyOf:
10518          - type: string
10519          - type: 'null'
10520      description: Tool messages require tool_call_id. Only assistant messages carry tool_calls. Images
10521        are accepted only as user data URLs.
10522      required: [role]
10523      additionalProperties: false
10524    ProxyToolDefinition:
10525      type: object
10526      properties:
10527        type:
10528          const: function
10529        function:
10530          type: object
10531          properties:
10532            name:
10533              type: string
10534              minLength: 1
10535              maxLength: 256
10536            description:
10537              type: string
10538            parameters:
10539              $ref: '#/components/schemas/DynamicJSON'
10540            strict:
10541              type: boolean
10542          required: [name]
10543          additionalProperties: false
10544      required: [type, function]
10545      additionalProperties: false
10546    ProxyCompletionRequest:
10547      type: object
10548      properties:
10549        model:
10550          type: string
10551          minLength: 1
10552          maxLength: 577
10553        messages:
10554          type: array
10555          items:
10556            $ref: '#/components/schemas/ProxyMessage'
10557        tools:
10558          type: array
10559          items:
10560            $ref: '#/components/schemas/ProxyToolDefinition'
10561          maxItems: 200
10562        max_tokens:
10563          type: integer
10564          minimum: 1
10565          maximum: 9007199254740991
10566        max_completion_tokens:
10567          type: integer
10568          minimum: 1
10569          maximum: 9007199254740991
10570        temperature:
10571          type: number
10572          minimum: 0
10573          maximum: 2
10574        top_p:
10575          type: number
10576          minimum: 0
10577          maximum: 1
10578        stop:
10579          oneOf:
10580          - type: string
10581          - type: array
10582            items:
10583              type: string
10584            maxItems: 4
10585        tool_choice:
10586          oneOf:
10587          - type: string
10588            enum: [none, auto, required]
10589          - type: object
10590            properties:
10591              type:
10592                const: function
10593              function:
10594                type: object
10595                properties:
10596                  name:
10597                    type: string
10598                    minLength: 1
10599                    maxLength: 256
10600                required: [name]
10601                additionalProperties: false
10602            required: [type, function]
10603            additionalProperties: false
10604        parallel_tool_calls:
10605          type: boolean
10606        reasoning_effort:
10607          type: string
10608          maxLength: 100
10609        reasoning:
10610          type: object
10611          properties:
10612            effort:
10613              type: string
10614              maxLength: 100
10615          required: [effort]
10616          additionalProperties: false
10617        response_format:
10618          oneOf:
10619          - type: object
10620            properties:
10621              type:
10622                const: json_object
10623            required: [type]
10624            additionalProperties: false
10625          - type: object
10626            properties:
10627              type:
10628                const: json_schema
10629              json_schema:
10630                type: object
10631                properties:
10632                  name:
10633                    type: string
10634                    maxLength: 256
10635                  description:
10636                    type: string
10637                  schema:
10638                    $ref: '#/components/schemas/DynamicJSON'
10639                  strict:
10640                    type: boolean
10641                required: [name, schema]
10642                additionalProperties: false
10643            required: [type, json_schema]
10644            additionalProperties: false
10645        stream:
10646          type: boolean
10647          default: false
10648        stream_options:
10649          type: object
10650          properties:
10651            include_usage:
10652              type: boolean
10653          additionalProperties: false
10654      x-max-encoded-bytes: 32000000
10655      required: [model, messages]
10656      additionalProperties: false
10657      examples:
10658      - model: personal/example-model
10659        messages:
10660        - role: user
10661          content: Hello
10662        stream: true
10663    ProxyUsage:
10664      type: object
10665      properties:
10666        prompt_tokens_details:
10667          type: object
10668          properties:
10669            cached_tokens:
10670              $ref: '#/components/schemas/Counter'
10671          required: [cached_tokens]
10672          additionalProperties: false
10673        completion_tokens_details:
10674          type: object
10675          properties:
10676            reasoning_tokens:
10677              $ref: '#/components/schemas/Counter'
10678          required: [reasoning_tokens]
10679          additionalProperties: false
10680        prompt_tokens:
10681          $ref: '#/components/schemas/Counter'
10682        completion_tokens:
10683          $ref: '#/components/schemas/Counter'
10684        total_tokens:
10685          $ref: '#/components/schemas/Counter'
10686      required: [prompt_tokens, completion_tokens, total_tokens]
10687      additionalProperties: false
10688    ProxyError:
10689      type: object
10690      properties:
10691        error:
10692          type: object
10693          properties:
10694            message:
10695              type: string
10696              maxLength: 4096
10697            type:
10698              type: string
10699              maxLength: 100
10700            code:
10701              anyOf:
10702              - type: string
10703                maxLength: 100
10704              - type: 'null'
10705            param:
10706              anyOf:
10707              - type: string
10708                maxLength: 256
10709              - type: 'null'
10710          required: [message, type, code, param]
10711          additionalProperties: false
10712      required: [error]
10713      additionalProperties: false
10714    ProxyCompletion:
10715      type: object
10716      properties:
10717        id:
10718          $ref: '#/components/schemas/ID'
10719        object:
10720          const: chat.completion
10721        created:
10722          $ref: '#/components/schemas/Counter'
10723        model:
10724          type: string
10725          maxLength: 577
10726        choices:
10727          type: array
10728          items:
10729            type: object
10730            properties:
10731              index:
10732                $ref: '#/components/schemas/Counter'
10733              message:
10734                type: object
10735                properties:
10736                  role:
10737                    const: assistant
10738                  content:
10739                    anyOf:
10740                    - type: string
10741                    - type: 'null'
10742                  reasoning_content:
10743                    anyOf:
10744                    - type: string
10745                    - type: 'null'
10746                  tool_calls:
10747                    type: array
10748                    items:
10749                      $ref: '#/components/schemas/ProxyToolCall'
10750                    maxItems: 200
10751                required: [role, content]
10752                additionalProperties: false
10753              finish_reason:
10754                type: string
10755                enum: [stop, length, tool_calls, content_filter]
10756            required: [index, message, finish_reason]
10757            additionalProperties: false
10758          minItems: 1
10759          maxItems: 1
10760        usage:
10761          anyOf:
10762          - $ref: '#/components/schemas/ProxyUsage'
10763          - type: 'null'
10764      required: [id, object, created, model, choices, usage]
10765      additionalProperties: false
10766      examples:
10767      - id: completion-1
10768        object: chat.completion
10769        created: 1790949600
10770        model: personal/example-model
10771        choices:
10772        - index: 0
10773          message:
10774            role: assistant
10775            content: Hello
10776          finish_reason: stop
10777        usage:
10778          prompt_tokens: 1
10779          completion_tokens: 1
10780          total_tokens: 2
10781    ProxyToolDelta:
10782      type: object
10783      properties:
10784        index:
10785          $ref: '#/components/schemas/Counter'
10786        id:
10787          type: string
10788          minLength: 1
10789          maxLength: 270000
10790        type:
10791          const: function
10792        function:
10793          type: object
10794          properties:
10795            name:
10796              type: string
10797              maxLength: 256
10798            arguments:
10799              type: string
10800          required: [name, arguments]
10801          additionalProperties: false
10802      required: [index]
10803      additionalProperties: false
10804    ProxyChunk:
10805      type: object
10806      properties:
10807        id:
10808          $ref: '#/components/schemas/ID'
10809        object:
10810          const: chat.completion.chunk
10811        created:
10812          $ref: '#/components/schemas/Counter'
10813        model:
10814          type: string
10815          maxLength: 577
10816        choices:
10817          type: array
10818          items:
10819            type: object
10820            properties:
10821              index:
10822                $ref: '#/components/schemas/Counter'
10823              delta:
10824                type: object
10825                properties:
10826                  role:
10827                    const: assistant
10828                  content:
10829                    type: string
10830                  reasoning_content:
10831                    type: string
10832                  tool_calls:
10833                    type: array
10834                    items:
10835                      $ref: '#/components/schemas/ProxyToolDelta'
10836                    maxItems: 200
10837                additionalProperties: false
10838              finish_reason:
10839                anyOf:
10840                - type: string
10841                  enum: [stop, length, tool_calls, content_filter]
10842                - type: 'null'
10843            required: [index, delta, finish_reason]
10844            additionalProperties: false
10845          maxItems: 1
10846        usage:
10847          anyOf:
10848          - $ref: '#/components/schemas/ProxyUsage'
10849          - type: 'null'
10850      required: [id, object, created, model, choices]
10851      additionalProperties: false
10852    ProxySSE:
10853      type: object
10854      properties:
10855        data:
10856          anyOf:
10857          - const: '[DONE]'
10858          - type: string
10859            contentMediaType: application/json
10860            contentSchema:
10861              oneOf:
10862              - $ref: '#/components/schemas/ProxyChunk'
10863              - $ref: '#/components/schemas/ProxyError'
10864      description: Data is a JSON chunk or error, followed by literal [DONE]. Validate decoded JSON explicitly.
10865      required: [data]
10866      additionalProperties: false
10867    ProxyModels:
10868      type: object
10869      properties:
10870        object:
10871          const: list
10872        data:
10873          type: array
10874          items:
10875            type: object
10876            properties:
10877              id:
10878                type: string
10879                minLength: 1
10880                maxLength: 577
10881              object:
10882                const: model
10883              created:
10884                $ref: '#/components/schemas/Counter'
10885              owned_by:
10886                type: string
10887                maxLength: 256
10888            required: [id, object, created, owned_by]
10889            additionalProperties: false
10890        errors:
10891          type: array
10892          items:
10893            type: object
10894            properties:
10895              profile:
10896                $ref: '#/components/schemas/ID'
10897              message:
10898                type: string
10899                maxLength: 4096
10900            required: [profile, message]
10901            additionalProperties: false
10902          maxItems: 200
10903      required: [object, data]
10904      additionalProperties: false
10905    AdmissionProblem:
10906      type: object
10907      properties:
10908        type:
10909          const: about:blank
10910        title:
10911          type: string
10912          maxLength: 256
10913        status:
10914          type: integer
10915          minimum: 400
10916          maximum: 599
10917        detail:
10918          type: string
10919          maxLength: 4096
10920        code:
10921          type: string
10922          minLength: 1
10923          maxLength: 100
10924        fields:
10925          type: array
10926          items:
10927            type: object
10928            properties:
10929              pointer:
10930                type: string
10931                maxLength: 4096
10932              detail:
10933                type: string
10934                maxLength: 4096
10935            required: [pointer, detail]
10936            additionalProperties: false
10937          maxItems: 100
10938      required: [type, title, status, detail, code]
10939      additionalProperties: false
10940    ContextCompaction:
10941      type: object
10942      properties:
10943        status:
10944          type: string
10945          enum: [not_configured, not_needed, compacted, unknown]
10946        strategy:
10947          anyOf:
10948          - $ref: '#/components/schemas/ID'
10949          - type: 'null'
10950        trigger_free_percent:
10951          anyOf:
10952          - type: number
10953            minimum: 0
10954            maximum: 100
10955          - type: 'null'
10956        input_limit_tokens:
10957          anyOf:
10958          - $ref: '#/components/schemas/Counter'
10959          - type: 'null'
10960        estimated_input_tokens:
10961          anyOf:
10962          - $ref: '#/components/schemas/Counter'
10963          - type: 'null'
10964        provider_input_tokens:
10965          anyOf:
10966          - $ref: '#/components/schemas/Counter'
10967          - type: 'null'
10968        provider_cached_input_tokens:
10969          anyOf:
10970          - $ref: '#/components/schemas/Counter'
10971          - type: 'null'
10972        before_items:
10973          anyOf:
10974          - $ref: '#/components/schemas/Counter'
10975          - type: 'null'
10976        after_items:
10977          anyOf:
10978          - $ref: '#/components/schemas/Counter'
10979          - type: 'null'
10980        source:
10981          anyOf:
10982          - type: string
10983            maxLength: 512
10984          - type: 'null'
10985        estimate_method:
10986          anyOf:
10987          - type: string
10988            maxLength: 512
10989          - type: 'null'
10990      required: [status, strategy, trigger_free_percent, input_limit_tokens, estimated_input_tokens, provider_input_tokens,
10991        provider_cached_input_tokens, before_items, after_items, source, estimate_method]
10992      additionalProperties: false