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
412.2 KiB10492 linesraw
1// Package protocol provides primitives to interact with the openapi HTTP API.
2//
3// Code generated by albedo/apigen version v2.8.0 DO NOT EDIT.
4package protocol
5
6import (
7	"bytes"
8	"context"
9	"encoding/json"
10	"fmt"
11	"io"
12	"net/http"
13	"net/url"
14	"strings"
15
16	"github.com/oapi-codegen/runtime"
17)
18
19// Account defines model for Account.
20type Account struct {
21	Detail string `json:"detail"`
22
23	// ID Opaque identity. Never infer a resource type or route from its contents.
24	ID    ID     `json:"id"`
25	Kind  string `json:"kind"`
26	Label string `json:"label"`
27
28	// Provider Opaque identity. Never infer a resource type or route from its contents.
29	Provider           ID   `json:"provider"`
30	SelectedByProfiles []ID `json:"selected_by_profiles"`
31}
32
33// ActionOperation Operation must be declared in this contract, or the installed extension contract version. Bind If-Match from the displayed resource, never from a fresh read. Path, query and header map keys name declared parameters; body map keys are JSON pointers into the request object. Missing optional form values omit their bindings. result_schema is a JSON Schema 2020-12 fragment, with no remote schema retrieval.
34type ActionOperation struct {
35	Body        map[string]Binding `json:"body"`
36	Headers     map[string]Binding `json:"headers"`
37	Method      string             `json:"method"`
38	OperationID string             `json:"operation_id"`
39	Path        map[string]Binding `json:"path"`
40
41	// PathTemplate Daemon-relative URL, including any representation query. No foreign origin or fragment.
42	PathTemplate ResourceURL        `json:"path_template"`
43	Query        map[string]Binding `json:"query"`
44
45	// ResultSchema Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
46	ResultSchema DynamicJSON `json:"result_schema"`
47
48	// SuccessStatus Expected synchronous JSON success status. Omitted operations accept 200 or 201 for mutations and 200 for reads.
49	SuccessStatus *int64 `json:"success_status,omitempty"`
50}
51
52// ActiveOutput 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.
53type ActiveOutput struct {
54	Bytes     Counter `json:"bytes"`
55	ElapsedMs *int64  `json:"elapsed_ms" nullable:"true"`
56	Kind      string  `json:"kind"`
57
58	// MessageID Opaque identity. Never infer a resource type or route from its contents.
59	MessageID ID                `json:"message_id"`
60	Reference *ContentReference `json:"reference" nullable:"true"`
61
62	// RunID Opaque identity. Never infer a resource type or route from its contents.
63	RunID ID      `json:"run_id"`
64	Text  *string `json:"text" nullable:"true"`
65}
66
67// Activity defines model for Activity.
68type Activity struct {
69	CurrentRequest *AgentRequest `json:"current_request,omitempty" nullable:"true"`
70	LatestAnswer   *struct {
71		Bytes Counter `json:"bytes"`
72
73		// MessageID Opaque identity. Never infer a resource type or route from its contents.
74		MessageID ID `json:"message_id"`
75	} `json:"latest_answer" nullable:"true"`
76	LatestInput *struct {
77		Bytes Counter `json:"bytes"`
78
79		// InputID Opaque identity. Never infer a resource type or route from its contents.
80		InputID ID     `json:"input_id"`
81		Source  string `json:"source"`
82	} `json:"latest_input" nullable:"true"`
83	LatestProgress *string `json:"latest_progress,omitempty" nullable:"true"`
84	Lines          []struct {
85		Kind string `json:"kind"`
86		Text string `json:"text"`
87	} `json:"lines"`
88
89	// ObservedAt UTC RFC 3339.
90	ObservedAt      Timestamp `json:"observed_at"`
91	OutputScalars   Counter   `json:"output_scalars"`
92	OutputUTF8Bytes Counter   `json:"output_utf8_bytes"`
93}
94
95// ActivityEvent defines model for ActivityEvent.
96type ActivityEvent struct {
97	Data struct {
98		Activity        Activity       `json:"activity"`
99		CurrentProgress []ToolProgress `json:"current_progress"`
100		Cursor          Cursor         `json:"cursor"`
101
102		// SessionID Opaque identity. Never infer a resource type or route from its contents.
103		SessionID ID            `json:"session_id"`
104		Status    SessionStatus `json:"status"`
105	} `json:"data"`
106	Type string `json:"type"`
107}
108
109// AdmissionProblem defines model for AdmissionProblem.
110type AdmissionProblem struct {
111	Code   string `json:"code"`
112	Detail string `json:"detail"`
113	Fields []struct {
114		Detail  string `json:"detail"`
115		Pointer string `json:"pointer"`
116	} `json:"fields,omitempty"`
117	Status int64  `json:"status"`
118	Title  string `json:"title"`
119	Type   string `json:"type"`
120}
121
122// AgentRequest defines model for AgentRequest.
123type AgentRequest struct {
124	// InputID Opaque identity. Never infer a resource type or route from its contents.
125	InputID ID     `json:"input_id"`
126	Text    string `json:"text"`
127}
128
129// Auth defines model for Auth.
130type Auth struct {
131	Accounts  []Account       `json:"accounts"`
132	Providers []LoginProvider `json:"providers"`
133}
134
135// Binding JSON pointer resolves against the selected row, submitted form, or installed session snapshot. No expression language.
136type Binding = json.RawMessage
137
138// CachePolicyEntry defines model for CachePolicyEntry.
139type CachePolicyEntry struct {
140	Checked  string `json:"checked"`
141	Clock    string `json:"clock"`
142	Evidence string `json:"evidence"`
143
144	// ID Opaque identity. Never infer a resource type or route from its contents.
145	ID    ID     `json:"id"`
146	Layer string `json:"layer"`
147	Match struct {
148		Extension []string `json:"extension" nullable:"true"`
149		Host      []string `json:"host" nullable:"true"`
150		Model     []string `json:"model" nullable:"true"`
151	} `json:"match"`
152	Note     string   `json:"note"`
153	Policy   string   `json:"policy"`
154	Read     *float64 `json:"read" nullable:"true"`
155	Source   string   `json:"source"`
156	Survival *struct {
157		Max     *Counter `json:"max" nullable:"true"`
158		Typical Counter  `json:"typical"`
159	} `json:"survival" nullable:"true"`
160	Tiers []struct {
161		Seconds Counter  `json:"seconds"`
162		Write   *float64 `json:"write" nullable:"true"`
163	} `json:"tiers" nullable:"true"`
164}
165
166// CachePolicyLayer defines model for CachePolicyLayer.
167type CachePolicyLayer struct {
168	Error  *SafeReason `json:"error" nullable:"true"`
169	Loaded bool        `json:"loaded"`
170	Name   string      `json:"name"`
171	Path   string      `json:"path"`
172}
173
174// CachePolicyPage defines model for CachePolicyPage.
175type CachePolicyPage struct {
176	Entries []CachePolicyEntry `json:"entries"`
177	Layers  []CachePolicyLayer `json:"layers"`
178	Matched *CachePolicyEntry  `json:"matched" nullable:"true"`
179	Next    *PageToken         `json:"next" nullable:"true"`
180}
181
182// CachePolicyReloadOutcome defines model for CachePolicyReloadOutcome.
183type CachePolicyReloadOutcome struct {
184	Failure *SafeReason `json:"failure" nullable:"true"`
185	State   string      `json:"state"`
186}
187
188// CachePrior defines model for CachePrior.
189type CachePrior struct {
190	Model *ID `json:"model" nullable:"true"`
191
192	// Provider Opaque identity. Never infer a resource type or route from its contents.
193	Provider   ID     `json:"provider"`
194	Source     string `json:"source"`
195	TTLSeconds *int64 `json:"ttl_seconds" nullable:"true"`
196}
197
198// CapabilitySettings defines model for CapabilitySettings.
199type CapabilitySettings struct {
200	Preferences map[string]bool `json:"preferences"`
201}
202
203// CapabilitySettingsChange defines model for CapabilitySettingsChange.
204type CapabilitySettingsChange struct {
205	Application SettingsApplication        `json:"application"`
206	Group       string                     `json:"group"`
207	Resource    CapabilitySettingsResource `json:"resource"`
208}
209
210// CapabilitySettingsPatch Resolve candidate IDs to stable preference keys under the observed catalog revision.
211type CapabilitySettingsPatch struct {
212	// CatalogRevision Opaque identity. Never infer a resource type or route from its contents.
213	CatalogRevision ID `json:"catalog_revision"`
214
215	// CatalogSessionID Opaque identity. Never infer a resource type or route from its contents.
216	CatalogSessionID ID               `json:"catalog_session_id"`
217	Choices          map[string]*bool `json:"choices"`
218}
219
220// CapabilitySettingsResource defines model for CapabilitySettingsResource.
221type CapabilitySettingsResource struct {
222	// ETag Strong opaque validator for the complete canonical representation.
223	ETag ETag `json:"etag"`
224
225	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
226	URL   ResourceURL        `json:"url"`
227	Value CapabilitySettings `json:"value"`
228}
229
230// Catalog Pagination is independent for discovered candidates and loaded commands; next tokens identify their section.
231type Catalog struct {
232	Discovery *struct {
233		Candidates  []CatalogCandidate `json:"candidates"`
234		Diagnostics []SafeReason       `json:"diagnostics"`
235		Next        *PageToken         `json:"next" nullable:"true"`
236
237		// Revision Opaque identity. Never infer a resource type or route from its contents.
238		Revision ID `json:"revision"`
239
240		// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
241		Workspace Workspace `json:"workspace"`
242	} `json:"discovery" nullable:"true"`
243	DiscoveryFailure *SafeReason `json:"discovery_failure" nullable:"true"`
244	Loaded           struct {
245		Commands []json.RawMessage `json:"commands"`
246		Next     *PageToken        `json:"next" nullable:"true"`
247		Revision *ID               `json:"revision" nullable:"true"`
248	} `json:"loaded"`
249
250	// NativeCommands Static HTTP declarations for selected extensions when no composition has been loaded. Reading these declarations does not prepare extensions or start a kernel.
251	NativeCommands []HTTPCommand    `json:"native_commands,omitempty"`
252	Pages          []PageDescriptor `json:"pages,omitempty"`
253}
254
255// CatalogCandidate defines model for CatalogCandidate.
256type CatalogCandidate struct {
257	Dependencies     []ID        `json:"dependencies"`
258	Description      string      `json:"description"`
259	Diagnostic       *SafeReason `json:"diagnostic" nullable:"true"`
260	EffectiveEnabled bool        `json:"effective_enabled"`
261	Eligible         bool        `json:"eligible"`
262
263	// Extension Installed extension metadata for the inspector. Null for other candidate kinds.
264	Extension        *ExtensionMetadata `json:"extension" nullable:"true"`
265	GlobalPreference *bool              `json:"global_preference" nullable:"true"`
266
267	// ID Opaque identity. Never infer a resource type or route from its contents.
268	ID              ID      `json:"id"`
269	Kind            string  `json:"kind"`
270	PreferenceKey   *ID     `json:"preference_key" nullable:"true"`
271	Quarantined     bool    `json:"quarantined"`
272	ResolvedSource  *string `json:"resolved_source" nullable:"true"`
273	SessionOverride *bool   `json:"session_override" nullable:"true"`
274	ShadowedBy      *ID     `json:"shadowed_by" nullable:"true"`
275	Source          string  `json:"source"`
276	Title           string  `json:"title"`
277	Valid           bool    `json:"valid"`
278}
279
280// Checkpoint defines model for Checkpoint.
281type Checkpoint struct {
282	// CheckpointID Opaque identity. Never infer a resource type or route from its contents.
283	CheckpointID ID      `json:"checkpoint_id"`
284	Position     Counter `json:"position"`
285	Preview      Preview `json:"preview"`
286	Title        string  `json:"title"`
287	TurnType     string  `json:"turn_type"`
288}
289
290// CheckpointPage defines model for CheckpointPage.
291type CheckpointPage struct {
292	HighWater Counter      `json:"high_water"`
293	Items     []Checkpoint `json:"items"`
294	Newer     *PageToken   `json:"newer" nullable:"true"`
295	Older     *PageToken   `json:"older" nullable:"true"`
296}
297
298// ChildSessionIntent defines model for ChildSessionIntent.
299type ChildSessionIntent struct {
300	Address string  `json:"address"`
301	Effort  *string `json:"effort" nullable:"true"`
302
303	// InitialInputID Client-generated lowercase UUIDv7. Retained decisions are checked before timestamp expiry.
304	InitialInputID UUIDv7 `json:"initial_input_id"`
305	Kind           string `json:"kind"`
306	Model          *ID    `json:"model" nullable:"true"`
307	Name           string `json:"name"`
308
309	// ParentID Opaque identity. Never infer a resource type or route from its contents.
310	ParentID ID     `json:"parent_id"`
311	Task     string `json:"task"`
312}
313
314// ChildSessionRequest defines model for ChildSessionRequest.
315type ChildSessionRequest struct {
316	Address string  `json:"address"`
317	Effort  *string `json:"effort,omitempty" nullable:"true"`
318
319	// InitialInputID Client-generated lowercase UUIDv7. Retained decisions are checked before timestamp expiry.
320	InitialInputID UUIDv7 `json:"initial_input_id"`
321	Kind           string `json:"kind"`
322	Model          *ID    `json:"model,omitempty" nullable:"true"`
323	Name           string `json:"name"`
324
325	// ParentID Opaque identity. Never infer a resource type or route from its contents.
326	ParentID ID     `json:"parent_id"`
327	Task     string `json:"task"`
328}
329
330// CollectionBatch Examples: {"events":[{"data":{"active_output":[],"activity":{"latest_answer":null,"latest_input":null,"lines":[],"observed_at":"2026-10-02T14:00:00Z","output_scalars":0,"output_utf8_bytes":0},"current_progress":[],"cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"session_id":"01a0fcea-2b00-7000-8000-000000000001","status":{"blocking_reason":null,"interrupt_requested":false,"phase":"idle","run_id":null}},"type":"activity"}]}
331type CollectionBatch = json.RawMessage
332
333// CollectionInvalidateEvent defines model for CollectionInvalidateEvent.
334type CollectionInvalidateEvent struct {
335	Data struct {
336		ScopeDirty bool          `json:"scope_dirty"`
337		SessionIDs []ID          `json:"session_ids"`
338		Urls       []ResourceURL `json:"urls"`
339	} `json:"data"`
340	Type string `json:"type"`
341}
342
343// CollectionMailEvent defines model for CollectionMailEvent.
344type CollectionMailEvent struct {
345	Data MailMetadata `json:"data"`
346	Type string       `json:"type"`
347}
348
349// CollectionOverflowEvent defines model for CollectionOverflowEvent.
350type CollectionOverflowEvent struct {
351	Data EmptyRequest `json:"data"`
352	Type string       `json:"type"`
353}
354
355// CollectionReadyBatch Examples: {"events":[{"data":{},"type":"ready"},{"data":{"reason":"initial"},"type":"reset"}]}
356type CollectionReadyBatch struct {
357	Events []interface{} `json:"events"`
358}
359
360// CollectionReadyEvent defines model for CollectionReadyEvent.
361type CollectionReadyEvent struct {
362	Data EmptyRequest `json:"data"`
363	Type string       `json:"type"`
364}
365
366// CollectionResetEvent defines model for CollectionResetEvent.
367type CollectionResetEvent struct {
368	Data struct {
369		Reason string `json:"reason"`
370	} `json:"data"`
371	Type string `json:"type"`
372}
373
374// CollectionSSE One parsed SSE event. Decode data as JSON and validate CollectionBatch separately; contentSchema is not asserted by ordinary JSON Schema validation. No event, id or retry fields are emitted.
375//
376// Examples: {"data":"{\"events\":[{\"type\":\"ready\",\"data\":{}},{\"type\":\"reset\",\"data\":{\"reason\":\"initial\"}}]}"}, {"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}}}]}"}
377type CollectionSSE struct {
378	Data string `json:"data"`
379}
380
381// CommandInputRequest defines model for CommandInputRequest.
382type CommandInputRequest struct {
383	// Arguments Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
384	Arguments DynamicJSON `json:"arguments"`
385	ClientID  *string     `json:"client_id,omitempty"`
386
387	// CommandID Opaque identity. Never infer a resource type or route from its contents.
388	CommandID ID     `json:"command_id"`
389	Kind      string `json:"kind"`
390}
391
392// CompactionObservation defines model for CompactionObservation.
393type CompactionObservation struct {
394	AfterTokens    *Counter `json:"after_tokens" nullable:"true"`
395	BeforeTokens   *Counter `json:"before_tokens" nullable:"true"`
396	EvictedEntries Counter  `json:"evicted_entries"`
397	Strategy       *ID      `json:"strategy" nullable:"true"`
398	Summary        string   `json:"summary"`
399}
400
401// CompactionRequest defines model for CompactionRequest.
402type CompactionRequest struct {
403	// Strategy Opaque identity. Never infer a resource type or route from its contents.
404	Strategy *ID `json:"strategy,omitempty"`
405}
406
407// CompactionResult defines model for CompactionResult.
408type CompactionResult struct {
409	EffectiveStrategy *ID                    `json:"effective_strategy" nullable:"true"`
410	Failure           *SafeReason            `json:"failure" nullable:"true"`
411	Observation       *CompactionObservation `json:"observation" nullable:"true"`
412	SelectionApplied  bool                   `json:"selection_applied"`
413	State             string                 `json:"state"`
414}
415
416// Composition defines model for Composition.
417type Composition struct {
418	Availability map[string]bool `json:"availability"`
419	Dependencies map[string][]ID `json:"dependencies"`
420
421	// DesiredRevision Opaque identity. Never infer a resource type or route from its contents.
422	DesiredRevision ID                     `json:"desired_revision"`
423	LoadedRevision  *ID                    `json:"loaded_revision" nullable:"true"`
424	NeedsReload     bool                   `json:"needs_reload"`
425	Quarantine      []QuarantineDiagnostic `json:"quarantine"`
426}
427
428// ContentPart Offsets count exact stored UTF-8 bytes.
429type ContentPart struct {
430	Complete    bool    `json:"complete"`
431	Encoding    string  `json:"encoding"`
432	Field       string  `json:"field"`
433	OffsetBytes Counter `json:"offset_bytes"`
434	Text        string  `json:"text"`
435}
436
437// ContentReference defines model for ContentReference.
438type ContentReference struct {
439	Bytes Counter `json:"bytes"`
440	Field string  `json:"field"`
441
442	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
443	URL ResourceURL `json:"url"`
444}
445
446// ContextCompaction defines model for ContextCompaction.
447type ContextCompaction struct {
448	AfterItems                *Counter `json:"after_items" nullable:"true"`
449	BeforeItems               *Counter `json:"before_items" nullable:"true"`
450	EstimateMethod            *string  `json:"estimate_method" nullable:"true"`
451	EstimatedInputTokens      *Counter `json:"estimated_input_tokens" nullable:"true"`
452	InputLimitTokens          *Counter `json:"input_limit_tokens" nullable:"true"`
453	ProviderCachedInputTokens *Counter `json:"provider_cached_input_tokens" nullable:"true"`
454	ProviderInputTokens       *Counter `json:"provider_input_tokens" nullable:"true"`
455	Source                    *string  `json:"source" nullable:"true"`
456	Status                    string   `json:"status"`
457	Strategy                  *ID      `json:"strategy" nullable:"true"`
458	TriggerFreePercent        *float64 `json:"trigger_free_percent" nullable:"true"`
459}
460
461// ContextRead defines model for ContextRead.
462type ContextRead = json.RawMessage
463
464// ContextSection defines model for ContextSection.
465type ContextSection struct {
466	// ID Opaque identity. Never infer a resource type or route from its contents.
467	ID        ID      `json:"id"`
468	ItemCount Counter `json:"item_count"`
469	Kind      string  `json:"kind"`
470	Label     string  `json:"label"`
471	PageCount Counter `json:"page_count"`
472	Preview   Preview `json:"preview"`
473	Source    *string `json:"source" nullable:"true"`
474	UTF8Bytes Counter `json:"utf8_bytes"`
475}
476
477// ContextSectionPage defines model for ContextSectionPage.
478type ContextSectionPage struct {
479	Omitted   *string `json:"omitted" nullable:"true"`
480	Page      Counter `json:"page"`
481	PageCount Counter `json:"page_count"`
482
483	// SectionID Opaque identity. Never infer a resource type or route from its contents.
484	SectionID ID `json:"section_id"`
485
486	// SnapshotID Opaque identity. Never infer a resource type or route from its contents.
487	SnapshotID ID     `json:"snapshot_id"`
488	Text       string `json:"text"`
489}
490
491// ContextSummary defines model for ContextSummary.
492type ContextSummary struct {
493	CapturedAt          *Timestamp        `json:"captured_at" nullable:"true"`
494	Compaction          ContextCompaction `json:"compaction"`
495	ContextWindowTokens *Counter          `json:"context_window_tokens" nullable:"true"`
496	Model               *ID               `json:"model" nullable:"true"`
497	Protocol            *string           `json:"protocol" nullable:"true"`
498	Provider            *ID               `json:"provider" nullable:"true"`
499	Reason              *SafeReason       `json:"reason" nullable:"true"`
500	Sections            []ContextSection  `json:"sections"`
501	SnapshotID          *ID               `json:"snapshot_id" nullable:"true"`
502	State               string            `json:"state"`
503}
504
505// ContinueInputRequest defines model for ContinueInputRequest.
506type ContinueInputRequest struct {
507	ClientID *string `json:"client_id,omitempty"`
508	Kind     string  `json:"kind"`
509}
510
511// Counter defines model for Counter.
512type Counter = int64
513
514// Creation defines model for Creation.
515type Creation struct {
516	Resolved struct {
517		Effort          *string `json:"effort" nullable:"true"`
518		Model           *ID     `json:"model" nullable:"true"`
519		ProviderProfile *ID     `json:"provider_profile" nullable:"true"`
520
521		// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
522		Workspace Workspace `json:"workspace"`
523	} `json:"resolved"`
524	Submitted json.RawMessage `json:"submitted"`
525}
526
527// CreationDecision defines model for CreationDecision.
528type CreationDecision struct {
529	Admission  string     `json:"admission"`
530	Creation   *Creation  `json:"creation" nullable:"true"`
531	DecidedAt  *Timestamp `json:"decided_at" nullable:"true"`
532	DeletedAt  *Timestamp `json:"deleted_at" nullable:"true"`
533	HTTPStatus int64      `json:"http_status"`
534	Kind       string     `json:"kind"`
535
536	// SessionID Opaque identity. Never infer a resource type or route from its contents.
537	SessionID ID `json:"session_id"`
538}
539
540// Cursor defines model for Cursor.
541type Cursor struct {
542	// Generation 128 random bits encoded as unpadded base64url; new for each session actor lifetime.
543	Generation Generation `json:"generation"`
544	Sequence   Counter    `json:"sequence"`
545}
546
547// Delivery defines model for Delivery.
548type Delivery struct {
549	Attempts       Counter     `json:"attempts"`
550	DeferralReason *SafeReason `json:"deferral_reason" nullable:"true"`
551	DeliveredAt    *Timestamp  `json:"delivered_at" nullable:"true"`
552
553	// HookID Opaque identity. Never infer a resource type or route from its contents.
554	HookID ID `json:"hook_id"`
555
556	// ID Opaque identity. Never infer a resource type or route from its contents.
557	ID ID `json:"id"`
558
559	// ReceivedAt UTC RFC 3339.
560	ReceivedAt Timestamp `json:"received_at"`
561
562	// SessionID Opaque identity. Never infer a resource type or route from its contents.
563	SessionID ID `json:"session_id"`
564}
565
566// DeliveryDetail defines model for DeliveryDetail.
567type DeliveryDetail struct {
568	Attempts       Counter     `json:"attempts"`
569	DeferralReason *SafeReason `json:"deferral_reason" nullable:"true"`
570	DeliveredAt    *Timestamp  `json:"delivered_at" nullable:"true"`
571
572	// HookID Opaque identity. Never infer a resource type or route from its contents.
573	HookID ID `json:"hook_id"`
574
575	// ID Opaque identity. Never infer a resource type or route from its contents.
576	ID      ID `json:"id"`
577	Payload struct {
578		Data     string `json:"data"`
579		Encoding string `json:"encoding"`
580	} `json:"payload"`
581
582	// ReceivedAt UTC RFC 3339.
583	ReceivedAt Timestamp `json:"received_at"`
584
585	// SessionID Opaque identity. Never infer a resource type or route from its contents.
586	SessionID ID `json:"session_id"`
587}
588
589// DeliveryPage defines model for DeliveryPage.
590type DeliveryPage struct {
591	Items []Delivery `json:"items"`
592	Next  *PageToken `json:"next" nullable:"true"`
593}
594
595// DynamicJSON Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
596type DynamicJSON = json.RawMessage
597
598// ETag Strong opaque validator for the complete canonical representation.
599type ETag = string
600
601// EmptyRequest defines model for EmptyRequest.
602type EmptyRequest = map[string]interface{}
603
604// EntryContentPage defines model for EntryContentPage.
605type EntryContentPage struct {
606	// EntryID Opaque identity. Never infer a resource type or route from its contents.
607	EntryID ID            `json:"entry_id"`
608	Next    *PageToken    `json:"next" nullable:"true"`
609	Parts   []ContentPart `json:"parts"`
610}
611
612// ExtensionDeletion defines model for ExtensionDeletion.
613type ExtensionDeletion struct {
614	// ID Opaque identity. Never infer a resource type or route from its contents.
615	ID           ID           `json:"id"`
616	Notification Notification `json:"notification"`
617}
618
619// ExtensionMetadata defines model for ExtensionMetadata.
620type ExtensionMetadata struct {
621	Context       bool `json:"context"`
622	Plugins       []ID `json:"plugins"`
623	PythonModules []ID `json:"python_modules"`
624	Tools         []ID `json:"tools"`
625}
626
627// ExtensionSettings defines model for ExtensionSettings.
628type ExtensionSettings struct {
629	Defaults map[string]bool `json:"defaults"`
630}
631
632// ExtensionSettingsChange defines model for ExtensionSettingsChange.
633type ExtensionSettingsChange struct {
634	Application SettingsApplication       `json:"application"`
635	Group       string                    `json:"group"`
636	Resource    ExtensionSettingsResource `json:"resource"`
637}
638
639// ExtensionSettingsPatch defines model for ExtensionSettingsPatch.
640type ExtensionSettingsPatch struct {
641	Defaults map[string]*bool `json:"defaults,omitempty"`
642}
643
644// ExtensionSettingsResource defines model for ExtensionSettingsResource.
645type ExtensionSettingsResource struct {
646	// ETag Strong opaque validator for the complete canonical representation.
647	ETag ETag `json:"etag"`
648
649	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
650	URL   ResourceURL       `json:"url"`
651	Value ExtensionSettings `json:"value"`
652}
653
654// FailureBatch Terminal failure, alone with no snapshot. It does not commit a replacement cursor.
655//
656// Examples: {"cursor":0,"events":[{"data":{"code":"history_unavailable","detail":"Durable history could not be loaded."},"type":"failure"}],"generation":"J6kYj6IGcXyP3eMIp-WL3A"}
657type FailureBatch struct {
658	Cursor Counter        `json:"cursor"`
659	Events []FailureEvent `json:"events"`
660
661	// Generation 128 random bits encoded as unpadded base64url; new for each session actor lifetime.
662	Generation Generation `json:"generation"`
663}
664
665// FailureEvent defines model for FailureEvent.
666type FailureEvent struct {
667	Data SafeReason `json:"data"`
668	Type string     `json:"type"`
669}
670
671// FileDiff defines model for FileDiff.
672type FileDiff struct {
673	Added   Counter `json:"added"`
674	Diff    string  `json:"diff"`
675	Kind    string  `json:"kind"`
676	Path    string  `json:"path"`
677	Removed Counter `json:"removed"`
678}
679
680// FileUnavailable defines model for FileUnavailable.
681type FileUnavailable struct {
682	Kind   string `json:"kind"`
683	Path   string `json:"path"`
684	Reason string `json:"reason"`
685}
686
687// ForkSessionIntent defines model for ForkSessionIntent.
688type ForkSessionIntent struct {
689	// CheckpointID Opaque identity. Never infer a resource type or route from its contents.
690	CheckpointID ID      `json:"checkpoint_id"`
691	Kind         string  `json:"kind"`
692	Name         *string `json:"name" nullable:"true"`
693
694	// SourceSessionID Opaque identity. Never infer a resource type or route from its contents.
695	SourceSessionID ID `json:"source_session_id"`
696}
697
698// ForkSessionRequest defines model for ForkSessionRequest.
699type ForkSessionRequest struct {
700	// CheckpointID Opaque identity. Never infer a resource type or route from its contents.
701	CheckpointID ID      `json:"checkpoint_id"`
702	Kind         string  `json:"kind"`
703	Name         *string `json:"name,omitempty" nullable:"true"`
704
705	// SourceSessionID Opaque identity. Never infer a resource type or route from its contents.
706	SourceSessionID ID `json:"source_session_id"`
707}
708
709// FormField defines model for FormField.
710type FormField struct {
711	Choices []struct {
712		Label string `json:"label"`
713
714		// Value Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
715		Value DynamicJSON `json:"value"`
716	} `json:"choices"`
717
718	// Default Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
719	Default DynamicJSON `json:"default"`
720
721	// DefaultBinding Prefill from the selected row or installed session, before showing the form.
722	DefaultBinding *struct {
723		Pointer string `json:"pointer"`
724		Source  string `json:"source"`
725	} `json:"default_binding,omitempty"`
726	Description string   `json:"description"`
727	Label       string   `json:"label"`
728	Maximum     *float64 `json:"maximum" nullable:"true"`
729	Minimum     *float64 `json:"minimum" nullable:"true"`
730	Name        string   `json:"name"`
731	Required    bool     `json:"required"`
732	Type        string   `json:"type"`
733}
734
735// Generation 128 random bits encoded as unpadded base64url; new for each session actor lifetime.
736type Generation = string
737
738// GitFacts defines model for GitFacts.
739type GitFacts struct {
740	Added    *Counter `json:"added" nullable:"true"`
741	Branch   *string  `json:"branch" nullable:"true"`
742	Changed  *Counter `json:"changed" nullable:"true"`
743	Dirty    *bool    `json:"dirty" nullable:"true"`
744	Kind     string   `json:"kind"`
745	Modified *Counter `json:"modified" nullable:"true"`
746	Removed  *Counter `json:"removed" nullable:"true"`
747	Revision *string  `json:"revision" nullable:"true"`
748
749	// Root Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
750	Root      Workspace  `json:"root"`
751	TouchedAt *Timestamp `json:"touched_at" nullable:"true"`
752}
753
754// Glance defines model for Glance.
755type Glance struct {
756	// Data Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
757	Data *DynamicJSON `json:"data,omitempty"`
758
759	// Extension Opaque identity. Never infer a resource type or route from its contents.
760	Extension ID        `json:"extension"`
761	Rows      []PageRow `json:"rows"`
762	Title     string    `json:"title"`
763
764	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
765	URL ResourceURL `json:"url"`
766}
767
768// HTTPCommand defines model for HTTPCommand.
769type HTTPCommand struct {
770	Arguments         []FormField `json:"arguments"`
771	CallerPermissions []string    `json:"caller_permissions"`
772	Delivery          string      `json:"delivery"`
773	Description       string      `json:"description"`
774
775	// ID Opaque identity. Never infer a resource type or route from its contents.
776	ID ID `json:"id"`
777
778	// Operation Operation must be declared in this contract, or the installed extension contract version. Bind If-Match from the displayed resource, never from a fresh read. Path, query and header map keys name declared parameters; body map keys are JSON pointers into the request object. Missing optional form values omit their bindings. result_schema is a JSON Schema 2020-12 fragment, with no remote schema retrieval.
779	Operation ActionOperation `json:"operation"`
780	SlashName string          `json:"slash_name"`
781}
782
783// HistoryEntry defines model for HistoryEntry.
784type HistoryEntry struct {
785	CheckpointID    *ID               `json:"checkpoint_id" nullable:"true"`
786	Content         []json.RawMessage `json:"content"`
787	ContentComplete bool              `json:"content_complete"`
788	CreatedAt       *Timestamp        `json:"created_at" nullable:"true"`
789
790	// ID Opaque identity. Never infer a resource type or route from its contents.
791	ID       ID           `json:"id"`
792	InputID  *ID          `json:"input_id" nullable:"true"`
793	Kind     string       `json:"kind"`
794	Mail     *HistoryMail `json:"mail,omitempty" nullable:"true"`
795	Position Counter      `json:"position"`
796
797	// ThinkingDurationMs Observed thinking duration, when recorded.
798	ThinkingDurationMs *Counter `json:"thinking_duration_ms,omitempty" nullable:"true"`
799	Tool               *struct {
800		Name           string `json:"name"`
801		ProgressCallID *ID    `json:"progress_call_id" nullable:"true"`
802
803		// ToolCallID Opaque identity. Never infer a resource type or route from its contents.
804		ToolCallID ID `json:"tool_call_id"`
805	} `json:"tool" nullable:"true"`
806	TurnID   *ID     `json:"turn_id" nullable:"true"`
807	TurnType *string `json:"turn_type,omitempty"`
808}
809
810// HistoryMail defines model for HistoryMail.
811type HistoryMail struct {
812	Kind string `json:"kind"`
813
814	// MailID Opaque identity. Never infer a resource type or route from its contents.
815	MailID          ID     `json:"mail_id"`
816	SenderLabel     string `json:"sender_label"`
817	SenderSessionID *ID    `json:"sender_session_id" nullable:"true"`
818}
819
820// HistoryPage Examples: {"high_water":0,"items":[],"newer":null,"older":null}
821type HistoryPage struct {
822	HighWater Counter        `json:"high_water"`
823	Items     []HistoryEntry `json:"items"`
824	Newer     *PageToken     `json:"newer" nullable:"true"`
825	Older     *PageToken     `json:"older" nullable:"true"`
826}
827
828// HistoryRead The requested view determines the item type. Empty pages are valid for either view.
829type HistoryRead = json.RawMessage
830
831// Hook defines model for Hook.
832type Hook struct {
833	ConfigurationResource HookConfigurationResource `json:"configuration_resource"`
834	DeferralReason        *SafeReason               `json:"deferral_reason" nullable:"true"`
835	DeliveryURL           string                    `json:"delivery_url"`
836	PendingCount          Counter                   `json:"pending_count"`
837}
838
839// HookChange Secret appears only on creation and explicit rotation, including a generated secret. Never present on PATCH or reads.
840//
841// Examples: {"notification":{"code":null,"detail":null,"state":"not_requested"},"resource":{"etag":"\"hook-revision-1\"","url":"/extensions/webhooks/hooks/hook-1?view=configuration","value":{"enabled":true,"id":"hook-1","name":"ci","revision":"hook-revision-1","session_id":"01a0fcea-2b00-7000-8000-000000000001","signature_header":"X-Albedo-Signature","signature_prefix":"sha256="}},"secret":"synthetic-example-hook-secret"}
842type HookChange struct {
843	Notification Notification              `json:"notification"`
844	Resource     HookConfigurationResource `json:"resource"`
845	Secret       *string                   `json:"secret,omitempty"`
846}
847
848// HookConfiguration defines model for HookConfiguration.
849type HookConfiguration struct {
850	Enabled bool `json:"enabled"`
851
852	// ID Opaque identity. Never infer a resource type or route from its contents.
853	ID   ID     `json:"id"`
854	Name string `json:"name"`
855
856	// Revision Opaque identity. Never infer a resource type or route from its contents.
857	Revision ID `json:"revision"`
858
859	// SessionID Opaque identity. Never infer a resource type or route from its contents.
860	SessionID       ID     `json:"session_id"`
861	SignatureHeader string `json:"signature_header"`
862	SignaturePrefix string `json:"signature_prefix"`
863}
864
865// HookConfigurationResource defines model for HookConfigurationResource.
866type HookConfigurationResource struct {
867	// ETag Strong opaque validator for the complete canonical representation.
868	ETag ETag `json:"etag"`
869
870	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
871	URL   ResourceURL       `json:"url"`
872	Value HookConfiguration `json:"value"`
873}
874
875// HookCreate Examples: {"name":"ci","session_id":"01a0fcea-2b00-7000-8000-000000000001"}
876type HookCreate struct {
877	Enabled *bool   `json:"enabled,omitempty"`
878	Name    string  `json:"name"`
879	Secret  *string `json:"secret,omitempty"`
880
881	// SessionID Opaque identity. Never infer a resource type or route from its contents.
882	SessionID       ID      `json:"session_id"`
883	SignatureHeader *string `json:"signature_header,omitempty"`
884	SignaturePrefix *string `json:"signature_prefix,omitempty"`
885}
886
887// HookPage defines model for HookPage.
888type HookPage struct {
889	Items []Hook     `json:"items"`
890	Next  *PageToken `json:"next" nullable:"true"`
891}
892
893// HookPatch defines model for HookPatch.
894type HookPatch struct {
895	Enabled         *bool   `json:"enabled,omitempty"`
896	Name            *string `json:"name,omitempty"`
897	SignatureHeader *string `json:"signature_header,omitempty"`
898	SignaturePrefix *string `json:"signature_prefix,omitempty"`
899}
900
901// HookPermission defines model for HookPermission.
902type HookPermission struct {
903	AgentManage bool `json:"agent_manage"`
904
905	// Revision Opaque identity. Never infer a resource type or route from its contents.
906	Revision ID `json:"revision"`
907
908	// SessionID Opaque identity. Never infer a resource type or route from its contents.
909	SessionID ID `json:"session_id"`
910}
911
912// HookPermissionChange defines model for HookPermissionChange.
913type HookPermissionChange struct {
914	Notification Notification           `json:"notification"`
915	Resource     HookPermissionResource `json:"resource"`
916}
917
918// HookPermissionPatch defines model for HookPermissionPatch.
919type HookPermissionPatch struct {
920	AgentManage *bool `json:"agent_manage,omitempty"`
921}
922
923// HookPermissionResource defines model for HookPermissionResource.
924type HookPermissionResource struct {
925	// ETag Strong opaque validator for the complete canonical representation.
926	ETag ETag `json:"etag"`
927
928	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
929	URL   ResourceURL    `json:"url"`
930	Value HookPermission `json:"value"`
931}
932
933// HookSecretRequest defines model for HookSecretRequest.
934type HookSecretRequest struct {
935	Secret *string `json:"secret,omitempty"`
936}
937
938// Host defines model for Host.
939type Host struct {
940	Architecture   *string `json:"architecture" nullable:"true"`
941	Authentication *struct {
942		ControlPath  *string `json:"control_path" nullable:"true"`
943		Instructions string  `json:"instructions"`
944		SSHTarget    string  `json:"ssh_target"`
945	} `json:"authentication" nullable:"true"`
946	Detail     *SafeReason `json:"detail" nullable:"true"`
947	Home       *Workspace  `json:"home" nullable:"true"`
948	ObservedAt *Timestamp  `json:"observed_at" nullable:"true"`
949	Os         *string     `json:"os" nullable:"true"`
950	State      string      `json:"state"`
951
952	// Step Current probe progress. Null when connecting or when no probe is running.
953	Step *string `json:"step,omitempty" nullable:"true"`
954
955	// Target Opaque identity. Never infer a resource type or route from its contents.
956	Target ID `json:"target"`
957}
958
959// HostPage defines model for HostPage.
960type HostPage struct {
961	Items []Host     `json:"items"`
962	Next  *PageToken `json:"next" nullable:"true"`
963}
964
965// ID Opaque identity. Never infer a resource type or route from its contents.
966type ID = string
967
968// ImageContent defines model for ImageContent.
969type ImageContent struct {
970	Image ImageMetadata `json:"image"`
971	Kind  string        `json:"kind"`
972}
973
974// ImageMetadata defines model for ImageMetadata.
975type ImageMetadata struct {
976	Height        int64   `json:"height"`
977	MimeType      string  `json:"mime_type"`
978	OriginalBytes Counter `json:"original_bytes"`
979
980	// Reference Its url is the image resource, which serves the decoded bytes.
981	Reference ContentReference `json:"reference"`
982	Width     int64            `json:"width"`
983}
984
985// ImageUpload Strict base64; decoded dimensions and provider constraints are validated before admission.
986type ImageUpload struct {
987	Data     string `json:"data"`
988	MimeType string `json:"mime_type"`
989}
990
991// Input defines model for Input.
992type Input struct {
993	AcceptanceOrder *Counter    `json:"acceptance_order" nullable:"true"`
994	AcceptedAt      *Timestamp  `json:"accepted_at" nullable:"true"`
995	Admission       string      `json:"admission"`
996	BlockingReason  *SafeReason `json:"blocking_reason" nullable:"true"`
997	ClientID        *string     `json:"client_id" nullable:"true"`
998	Delivery        *string     `json:"delivery" nullable:"true"`
999	HTTPStatus      int64       `json:"http_status"`
1000
1001	// ID Opaque identity. Never infer a resource type or route from its contents.
1002	ID      ID                `json:"id"`
1003	Kind    string            `json:"kind"`
1004	Problem *AdmissionProblem `json:"problem" nullable:"true"`
1005
1006	// SessionID Opaque identity. Never infer a resource type or route from its contents.
1007	SessionID          ID       `json:"session_id"`
1008	TranscriptPosition *Counter `json:"transcript_position" nullable:"true"`
1009	Turn               *Turn    `json:"turn" nullable:"true"`
1010}
1011
1012// InputCancellation defines model for InputCancellation.
1013type InputCancellation struct {
1014	// Input Examples: {"acceptance_order":1,"accepted_at":"2026-10-02T14:00:00Z","admission":"accepted","blocking_reason":null,"client_id":"draft-1","delivery":"pending","http_status":202,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":null,"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null}
1015	Input  Input  `json:"input"`
1016	Result string `json:"result"`
1017}
1018
1019// InputCommand defines model for InputCommand.
1020type InputCommand struct {
1021	Arguments         []FormField `json:"arguments"`
1022	CallerPermissions []string    `json:"caller_permissions"`
1023
1024	// CommandID Opaque identity. Never infer a resource type or route from its contents.
1025	CommandID   ID     `json:"command_id"`
1026	Delivery    string `json:"delivery"`
1027	Description string `json:"description"`
1028
1029	// ID Opaque identity. Never infer a resource type or route from its contents.
1030	ID        ID     `json:"id"`
1031	SlashName string `json:"slash_name"`
1032}
1033
1034// InputDecision defines model for InputDecision.
1035type InputDecision struct {
1036	// Input Examples: {"acceptance_order":1,"accepted_at":"2026-10-02T14:00:00Z","admission":"accepted","blocking_reason":null,"client_id":"draft-1","delivery":"pending","http_status":202,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":null,"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null}
1037	Input Input  `json:"input"`
1038	Kind  string `json:"kind"`
1039}
1040
1041// InputRequest defines model for InputRequest.
1042type InputRequest = json.RawMessage
1043
1044// InterruptRequest defines model for InterruptRequest.
1045type InterruptRequest struct {
1046	RunID             *ID     `json:"run_id" nullable:"true"`
1047	ThroughInputOrder Counter `json:"through_input_order"`
1048}
1049
1050// Interruption defines model for Interruption.
1051type Interruption struct {
1052	CancelledInputIDs []ID     `json:"cancelled_input_ids"`
1053	RunID             *ID      `json:"run_id" nullable:"true"`
1054	State             string   `json:"state"`
1055	Warnings          Warnings `json:"warnings"`
1056}
1057
1058// JJFacts defines model for JJFacts.
1059type JJFacts struct {
1060	Bookmark *struct {
1061		Ahead Counter `json:"ahead"`
1062		Name  string  `json:"name"`
1063	} `json:"bookmark" nullable:"true"`
1064	ChangeID    *string  `json:"change_id" nullable:"true"`
1065	Changed     *Counter `json:"changed" nullable:"true"`
1066	Conflicts   *bool    `json:"conflicts" nullable:"true"`
1067	Description *string  `json:"description" nullable:"true"`
1068	Dirty       *bool    `json:"dirty" nullable:"true"`
1069	Kind        string   `json:"kind"`
1070	Revision    *string  `json:"revision" nullable:"true"`
1071
1072	// Root Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
1073	Root      Workspace  `json:"root"`
1074	TouchedAt *Timestamp `json:"touched_at" nullable:"true"`
1075}
1076
1077// JSONContent defines model for JSONContent.
1078type JSONContent struct {
1079	Field string `json:"field"`
1080	Kind  string `json:"kind"`
1081
1082	// Value Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
1083	Value DynamicJSON `json:"value"`
1084}
1085
1086// JobCollection Examples: {"items":[],"live_job_count":0,"page":{"actions":[],"empty_state":"no background jobs running","glance":null,"rows":[],"summary":"0 background jobs running","title":"jobs"}}
1087type JobCollection struct {
1088	Items        []KernelJob    `json:"items"`
1089	LiveJobCount Counter        `json:"live_job_count"`
1090	Page         PageDescriptor `json:"page"`
1091}
1092
1093// JobStop Examples: {"stopped":"job-1"}
1094type JobStop struct {
1095	// Stopped Opaque identity. Never infer a resource type or route from its contents.
1096	Stopped ID `json:"stopped"`
1097}
1098
1099// Kernel defines model for Kernel.
1100type Kernel struct {
1101	Build      *string `json:"build" nullable:"true"`
1102	InstanceID *ID     `json:"instance_id" nullable:"true"`
1103
1104	// LiveJobCount Observed owned jobs. Null while booting or when the kernel owner is lost.
1105	LiveJobCount *Counter `json:"live_job_count" nullable:"true"`
1106
1107	// RunningJobs Up to 100 observed live jobs, ordered by ID. Null when the kernel owner is unavailable. The count may exceed this list.
1108	RunningJobs      []KernelJob  `json:"running_jobs" nullable:"true"`
1109	Stage            *string      `json:"stage" nullable:"true"`
1110	Stale            bool         `json:"stale"`
1111	StalenessReasons []SafeReason `json:"staleness_reasons"`
1112	State            string       `json:"state"`
1113}
1114
1115// KernelJob defines model for KernelJob.
1116type KernelJob struct {
1117	Command string `json:"command"`
1118
1119	// ID Opaque identity. Never infer a resource type or route from its contents.
1120	ID  ID       `json:"id"`
1121	Pid *Counter `json:"pid" nullable:"true"`
1122
1123	// StartedAt Wall-clock milliseconds since the epoch when the owner recorded the job. Zero when unknown, which clients treat as settled work.
1124	StartedAt Counter `json:"started_at"`
1125}
1126
1127// KernelUpgradeResult defines model for KernelUpgradeResult.
1128type KernelUpgradeResult struct {
1129	Failure     *SafeReason `json:"failure" nullable:"true"`
1130	NewBuild    *string     `json:"new_build" nullable:"true"`
1131	NewKernelID *ID         `json:"new_kernel_id" nullable:"true"`
1132	OldBuild    *string     `json:"old_build" nullable:"true"`
1133	OldKernelID *ID         `json:"old_kernel_id" nullable:"true"`
1134	State       string      `json:"state"`
1135	StoppedJobs []struct {
1136		// ID Opaque identity. Never infer a resource type or route from its contents.
1137		ID     ID         `json:"id"`
1138		Reason SafeReason `json:"reason"`
1139	} `json:"stopped_jobs"`
1140	Warnings Warnings `json:"warnings"`
1141}
1142
1143// LinkChange defines model for LinkChange.
1144type LinkChange struct {
1145	NotificationCount Counter                   `json:"notification_count"`
1146	Notifications     []TargetNotification      `json:"notifications"`
1147	Resource          LinkConfigurationResource `json:"resource"`
1148	Truncated         bool                      `json:"truncated"`
1149}
1150
1151// LinkConfiguration defines model for LinkConfiguration.
1152type LinkConfiguration struct {
1153	// GroupID Opaque identity. Never infer a resource type or route from its contents.
1154	GroupID ID          `json:"group_id"`
1155	Members []Workspace `json:"members"`
1156	Next    *PageToken  `json:"next" nullable:"true"`
1157
1158	// Revision Opaque identity. Never infer a resource type or route from its contents.
1159	Revision ID `json:"revision"`
1160
1161	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
1162	Workspace Workspace `json:"workspace"`
1163}
1164
1165// LinkConfigurationResource defines model for LinkConfigurationResource.
1166type LinkConfigurationResource struct {
1167	// ETag Strong opaque validator for the complete canonical representation.
1168	ETag ETag `json:"etag"`
1169
1170	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
1171	URL   ResourceURL       `json:"url"`
1172	Value LinkConfiguration `json:"value"`
1173}
1174
1175// LinkGroup defines model for LinkGroup.
1176type LinkGroup struct {
1177	ConfigurationResource LinkConfigurationResource `json:"configuration_resource"`
1178	Next                  *PageToken                `json:"next" nullable:"true"`
1179	Page                  *PageDescriptor           `json:"page,omitempty"`
1180	Presence              []struct {
1181		// Exists Observed directory presence. Null for an uninspected or unreachable location.
1182		Exists       *bool   `json:"exists" nullable:"true"`
1183		Host         *Host   `json:"host" nullable:"true"`
1184		SessionCount Counter `json:"session_count"`
1185
1186		// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
1187		Workspace Workspace `json:"workspace"`
1188	} `json:"presence"`
1189}
1190
1191// LinkMerge defines model for LinkMerge.
1192type LinkMerge struct {
1193	// OtherEtag Strong opaque validator for the complete canonical representation.
1194	OtherEtag ETag `json:"other_etag"`
1195
1196	// OtherWorkspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
1197	OtherWorkspace Workspace `json:"other_workspace"`
1198}
1199
1200// Login Examples: {"accounts":[],"expires_at":"2026-10-02T14:15:00Z","failure":null,"id":"01a0fcea-2b00-7000-8000-000000000003","instructions":"Paste the callback URL if the browser cannot reach the daemon.","progress":"Waiting for authorization.","provider":"example-provider","state":"waiting","url":"https://provider.example/authorize?state=synthetic-state"}
1201type Login struct {
1202	Accounts []Account `json:"accounts"`
1203
1204	// ExpiresAt UTC RFC 3339.
1205	ExpiresAt Timestamp   `json:"expires_at"`
1206	Failure   *SafeReason `json:"failure" nullable:"true"`
1207
1208	// ID Opaque identity. Never infer a resource type or route from its contents.
1209	ID           ID      `json:"id"`
1210	Instructions *string `json:"instructions" nullable:"true"`
1211	Progress     string  `json:"progress"`
1212
1213	// Provider Opaque identity. Never infer a resource type or route from its contents.
1214	Provider ID      `json:"provider"`
1215	State    string  `json:"state"`
1216	URL      *string `json:"url" nullable:"true"`
1217}
1218
1219// LoginPatch defines model for LoginPatch.
1220type LoginPatch struct {
1221	Response *string `json:"response,omitempty"`
1222}
1223
1224// LoginProvider defines model for LoginProvider.
1225type LoginProvider struct {
1226	Detail string      `json:"detail"`
1227	Fields []FormField `json:"fields"`
1228	Flows  []string    `json:"flows"`
1229
1230	// ID Opaque identity. Never infer a resource type or route from its contents.
1231	ID    ID     `json:"id"`
1232	Kind  string `json:"kind"`
1233	Label string `json:"label"`
1234}
1235
1236// LoginRequest Flow defaults to the provider preferred flow. Form names, types and required values are checked against that provider declaration. Values are write-only.
1237type LoginRequest struct {
1238	Flow *string `json:"flow,omitempty"`
1239
1240	// Provider Opaque identity. Never infer a resource type or route from its contents.
1241	Provider ID                         `json:"provider"`
1242	Values   map[string]json.RawMessage `json:"values"`
1243}
1244
1245// MCPDefinition defines model for MCPDefinition.
1246type MCPDefinition struct {
1247	Arguments         []string               `json:"arguments"`
1248	BearerTokenEnvVar *string                `json:"bearer_token_env_var" nullable:"true"`
1249	CallTimeoutMs     int64                  `json:"call_timeout_ms"`
1250	Command           *string                `json:"command" nullable:"true"`
1251	Cwd               *Workspace             `json:"cwd" nullable:"true"`
1252	DisabledTools     []string               `json:"disabled_tools"`
1253	Enabled           bool                   `json:"enabled"`
1254	EnabledTools      []string               `json:"enabled_tools" nullable:"true"`
1255	Environment       map[string]ValueSource `json:"environment"`
1256	Headers           map[string]ValueSource `json:"headers"`
1257	SecretPresence    SecretPresence         `json:"secret_presence"`
1258	StartupTimeoutMs  int64                  `json:"startup_timeout_ms"`
1259	Transport         string                 `json:"transport"`
1260	URL               *string                `json:"url" nullable:"true"`
1261}
1262
1263// MCPDefinitionPatch Partial merge patch. Public and secret sources cannot overlap. HTTP and stdio fields are validated against transport on the complete candidate. Public environment/header entries accept null removal; a null whole map clears it. Switching credential sources removes the former source in the same patch.
1264type MCPDefinitionPatch struct {
1265	Arguments         []string                 `json:"arguments,omitempty"`
1266	BearerTokenEnvVar *string                  `json:"bearer_token_env_var,omitempty" nullable:"true"`
1267	CallTimeoutMs     *int64                   `json:"call_timeout_ms,omitempty"`
1268	Command           *string                  `json:"command,omitempty" nullable:"true"`
1269	Cwd               *Workspace               `json:"cwd,omitempty" nullable:"true"`
1270	DisabledTools     []string                 `json:"disabled_tools,omitempty"`
1271	Enabled           *bool                    `json:"enabled,omitempty"`
1272	EnabledTools      []string                 `json:"enabled_tools,omitempty" nullable:"true"`
1273	Environment       *map[string]*ValueSource `json:"environment,omitempty" nullable:"true"`
1274	Headers           *map[string]*ValueSource `json:"headers,omitempty" nullable:"true"`
1275	Secrets           *MCPSecretsPatch         `json:"secrets,omitempty"`
1276	StartupTimeoutMs  *int64                   `json:"startup_timeout_ms,omitempty"`
1277	Transport         *string                  `json:"transport,omitempty"`
1278	URL               *string                  `json:"url,omitempty" nullable:"true"`
1279}
1280
1281// MCPSecretsPatch defines model for MCPSecretsPatch.
1282type MCPSecretsPatch struct {
1283	BearerToken *string            `json:"bearer_token,omitempty" nullable:"true"`
1284	Environment map[string]*string `json:"environment,omitempty"`
1285	Headers     map[string]*string `json:"headers,omitempty"`
1286}
1287
1288// MCPSettings defines model for MCPSettings.
1289type MCPSettings struct {
1290	Definitions map[string]MCPDefinition `json:"definitions"`
1291}
1292
1293// MCPSettingsChange defines model for MCPSettingsChange.
1294type MCPSettingsChange struct {
1295	Application SettingsApplication `json:"application"`
1296	Group       string              `json:"group"`
1297	Resource    MCPSettingsResource `json:"resource"`
1298}
1299
1300// MCPSettingsPatch Validate candidate connections before atomic commit unless explicitly disabled.
1301//
1302// Examples: {"definitions":{"example":{"enabled":true,"secrets":{"bearer_token":"synthetic-example-token"},"transport":"http","url":"https://tools.example/mcp"}},"validate_connection":true}
1303type MCPSettingsPatch struct {
1304	Definitions        map[string]*MCPDefinitionPatch `json:"definitions,omitempty"`
1305	ValidateConnection *bool                          `json:"validate_connection,omitempty"`
1306}
1307
1308// MCPSettingsResource defines model for MCPSettingsResource.
1309type MCPSettingsResource struct {
1310	// ETag Strong opaque validator for the complete canonical representation.
1311	ETag ETag `json:"etag"`
1312
1313	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
1314	URL   ResourceURL `json:"url"`
1315	Value MCPSettings `json:"value"`
1316}
1317
1318// MailMetadata defines model for MailMetadata.
1319type MailMetadata struct {
1320	Bytes Counter `json:"bytes"`
1321	Kind  string  `json:"kind"`
1322
1323	// MailID Opaque identity. Never infer a resource type or route from its contents.
1324	MailID ID `json:"mail_id"`
1325
1326	// ReceiverSessionID Opaque identity. Never infer a resource type or route from its contents.
1327	ReceiverSessionID ID      `json:"receiver_session_id"`
1328	SenderLabel       *string `json:"sender_label" nullable:"true"`
1329	SenderSessionID   *ID     `json:"sender_session_id" nullable:"true"`
1330}
1331
1332// MessageInputRequest Examples: {"client_id":"draft-1","kind":"message","text":"Fix the parser."}
1333type MessageInputRequest struct {
1334	ClientID *string `json:"client_id,omitempty"`
1335
1336	// Images Attached in order; the text's numbered image markers say where each was attached.
1337	Images []ImageUpload `json:"images,omitempty"`
1338	Kind   string        `json:"kind"`
1339
1340	// Pastes Pasted text the text marks by number; a long one is saved to a file the model reads.
1341	Pastes []string `json:"pastes,omitempty"`
1342	Text   string   `json:"text"`
1343}
1344
1345// Model defines model for Model.
1346type Model struct {
1347	CachePolicy struct {
1348		Source     *string  `json:"source" nullable:"true"`
1349		TTLSeconds *Counter `json:"ttl_seconds" nullable:"true"`
1350	} `json:"cache_policy"`
1351
1352	// CapKey Opaque identity. Never infer a resource type or route from its contents.
1353	CapKey                 ID       `json:"cap_key"`
1354	DefaultContextTokens   *Counter `json:"default_context_tokens" nullable:"true"`
1355	EffectiveContextTokens *Counter `json:"effective_context_tokens" nullable:"true"`
1356	Efforts                []struct {
1357		ID    string `json:"id"`
1358		Label string `json:"label"`
1359	} `json:"efforts"`
1360
1361	// ID Opaque identity. Never infer a resource type or route from its contents.
1362	ID               ID         `json:"id"`
1363	ImageEdge        *int64     `json:"image_edge" nullable:"true"`
1364	InputModalities  []string   `json:"input_modalities"`
1365	Label            string     `json:"label"`
1366	MaxContextTokens *Counter   `json:"max_context_tokens" nullable:"true"`
1367	MaxOutputTokens  *Counter   `json:"max_output_tokens" nullable:"true"`
1368	ObservedAt       *Timestamp `json:"observed_at" nullable:"true"`
1369	Raised           bool       `json:"raised"`
1370	Source           string     `json:"source"`
1371}
1372
1373// ModelPage defines model for ModelPage.
1374type ModelPage struct {
1375	Items []Model    `json:"items"`
1376	Next  *PageToken `json:"next" nullable:"true"`
1377}
1378
1379// ModelRead defines model for ModelRead.
1380type ModelRead = json.RawMessage
1381
1382// ModelReloadOutcome defines model for ModelReloadOutcome.
1383type ModelReloadOutcome struct {
1384	Failure    *SafeReason `json:"failure" nullable:"true"`
1385	ObservedAt *Timestamp  `json:"observed_at" nullable:"true"`
1386
1387	// Provider Opaque identity. Never infer a resource type or route from its contents.
1388	Provider ID     `json:"provider"`
1389	State    string `json:"state"`
1390}
1391
1392// ModelSettings defines model for ModelSettings.
1393type ModelSettings struct {
1394	CacheTTLPriors []CachePrior    `json:"cache_ttl_priors"`
1395	RaisedCaps     map[string]bool `json:"raised_caps"`
1396}
1397
1398// ModelSettingsChange defines model for ModelSettingsChange.
1399type ModelSettingsChange struct {
1400	Application SettingsApplication   `json:"application"`
1401	Group       string                `json:"group"`
1402	Resource    ModelSettingsResource `json:"resource"`
1403}
1404
1405// ModelSettingsPatch Keys are cap_key values from model metadata. True raises to the advertised maximum; false uses the ordinary limit; null clears the choice. A missing choice defaults to false. Only raised_caps is writable.
1406type ModelSettingsPatch struct {
1407	RaisedCaps map[string]*bool `json:"raised_caps,omitempty"`
1408}
1409
1410// ModelSettingsResource defines model for ModelSettingsResource.
1411type ModelSettingsResource struct {
1412	// ETag Strong opaque validator for the complete canonical representation.
1413	ETag ETag `json:"etag"`
1414
1415	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
1416	URL   ResourceURL   `json:"url"`
1417	Value ModelSettings `json:"value"`
1418}
1419
1420// NewSessionIntent defines model for NewSessionIntent.
1421type NewSessionIntent struct {
1422	Effort          *string `json:"effort" nullable:"true"`
1423	Kind            string  `json:"kind"`
1424	Model           *ID     `json:"model" nullable:"true"`
1425	Name            *string `json:"name" nullable:"true"`
1426	ProviderProfile *ID     `json:"provider_profile" nullable:"true"`
1427
1428	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
1429	Workspace Workspace `json:"workspace"`
1430}
1431
1432// NewSessionRequest Examples: {"kind":"new","workspace":"/workspace/project"}
1433type NewSessionRequest struct {
1434	Effort          *string `json:"effort,omitempty" nullable:"true"`
1435	Kind            string  `json:"kind"`
1436	Model           *ID     `json:"model,omitempty" nullable:"true"`
1437	Name            *string `json:"name,omitempty" nullable:"true"`
1438	ProviderProfile *ID     `json:"provider_profile,omitempty" nullable:"true"`
1439
1440	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
1441	Workspace Workspace `json:"workspace"`
1442}
1443
1444// Notification defines model for Notification.
1445type Notification struct {
1446	Code   *string `json:"code" nullable:"true"`
1447	Detail *string `json:"detail" nullable:"true"`
1448	State  string  `json:"state"`
1449}
1450
1451// PageAction defines model for PageAction.
1452type PageAction struct {
1453	Confirmation *string     `json:"confirmation" nullable:"true"`
1454	Fields       []FormField `json:"fields"`
1455
1456	// ID Opaque identity. Never infer a resource type or route from its contents.
1457	ID           ID      `json:"id"`
1458	KeyboardHint *string `json:"keyboard_hint" nullable:"true"`
1459	Label        string  `json:"label"`
1460
1461	// Operation Operation must be declared in this contract, or the installed extension contract version. Bind If-Match from the displayed resource, never from a fresh read. Path, query and header map keys name declared parameters; body map keys are JSON pointers into the request object. Missing optional form values omit their bindings. result_schema is a JSON Schema 2020-12 fragment, with no remote schema retrieval.
1462	Operation ActionOperation `json:"operation"`
1463}
1464
1465// PageDescriptor defines model for PageDescriptor.
1466type PageDescriptor struct {
1467	Actions    []PageAction `json:"actions"`
1468	EmptyState string       `json:"empty_state"`
1469	Glance     *Glance      `json:"glance" nullable:"true"`
1470	Rows       []PageRow    `json:"rows"`
1471	Summary    string       `json:"summary"`
1472	Title      string       `json:"title"`
1473}
1474
1475// PageRow defines model for PageRow.
1476type PageRow struct {
1477	Badge  *string `json:"badge" nullable:"true"`
1478	Detail *string `json:"detail" nullable:"true"`
1479
1480	// ID Opaque identity. Never infer a resource type or route from its contents.
1481	ID       ID `json:"id"`
1482	Resource *struct {
1483		// ETag Strong opaque validator for the complete canonical representation.
1484		ETag ETag `json:"etag"`
1485
1486		// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
1487		URL ResourceURL `json:"url"`
1488
1489		// Value Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
1490		Value DynamicJSON `json:"value"`
1491	} `json:"resource" nullable:"true"`
1492	Text string `json:"text"`
1493	Tone string `json:"tone"`
1494}
1495
1496// PageToken Opaque continuation, tied to the query and representation; never authority.
1497type PageToken = string
1498
1499// Paperclip defines model for Paperclip.
1500type Paperclip struct {
1501	// CreatedAt UTC RFC 3339.
1502	CreatedAt Timestamp `json:"created_at"`
1503
1504	// ID Opaque identity. Never infer a resource type or route from its contents.
1505	ID                 ID     `json:"id"`
1506	Message            string `json:"message"`
1507	Reply              string `json:"reply"`
1508	Resolution         string `json:"resolution"`
1509	ResolvingSessionID *ID    `json:"resolving_session_id" nullable:"true"`
1510
1511	// Revision Opaque identity. Never infer a resource type or route from its contents.
1512	Revision   ID     `json:"revision"`
1513	SessionID  *ID    `json:"session_id" nullable:"true"`
1514	Status     string `json:"status"`
1515	Suggestion string `json:"suggestion"`
1516	Title      string `json:"title"`
1517	Topic      string `json:"topic"`
1518
1519	// UpdatedAt UTC RFC 3339.
1520	UpdatedAt Timestamp  `json:"updated_at"`
1521	Workspace *Workspace `json:"workspace" nullable:"true"`
1522}
1523
1524// PaperclipChange defines model for PaperclipChange.
1525type PaperclipChange struct {
1526	Notification Notification      `json:"notification"`
1527	Resource     PaperclipResource `json:"resource"`
1528}
1529
1530// PaperclipCreate defines model for PaperclipCreate.
1531type PaperclipCreate struct {
1532	Message    string     `json:"message"`
1533	SessionID  *ID        `json:"session_id,omitempty" nullable:"true"`
1534	Suggestion *string    `json:"suggestion,omitempty"`
1535	Title      *string    `json:"title,omitempty"`
1536	Topic      *string    `json:"topic,omitempty"`
1537	Workspace  *Workspace `json:"workspace,omitempty" nullable:"true"`
1538}
1539
1540// PaperclipPage defines model for PaperclipPage.
1541type PaperclipPage struct {
1542	Glance *Glance             `json:"glance,omitempty"`
1543	Items  []PaperclipResource `json:"items"`
1544	Next   *PageToken          `json:"next" nullable:"true"`
1545	Page   *PageDescriptor     `json:"page,omitempty"`
1546}
1547
1548// PaperclipPatch Reply cannot accompany resolved or dismissed status. It acknowledges the item.
1549type PaperclipPatch struct {
1550	Reply      *string `json:"reply,omitempty"`
1551	Resolution *string `json:"resolution,omitempty"`
1552	Status     *string `json:"status,omitempty"`
1553}
1554
1555// PaperclipResource defines model for PaperclipResource.
1556type PaperclipResource struct {
1557	// ETag Strong opaque validator for the complete canonical representation.
1558	ETag ETag `json:"etag"`
1559
1560	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
1561	URL   ResourceURL `json:"url"`
1562	Value Paperclip   `json:"value"`
1563}
1564
1565// PendingInput defines model for PendingInput.
1566type PendingInput struct {
1567	AcceptanceOrder Counter `json:"acceptance_order"`
1568
1569	// AcceptedAt UTC RFC 3339.
1570	AcceptedAt     Timestamp   `json:"accepted_at"`
1571	BlockingReason *SafeReason `json:"blocking_reason" nullable:"true"`
1572	Delivery       string      `json:"delivery"`
1573
1574	// ID Opaque identity. Never infer a resource type or route from its contents.
1575	ID      ID      `json:"id"`
1576	Kind    string  `json:"kind"`
1577	Preview Preview `json:"preview"`
1578}
1579
1580// PreferencePatch defines model for PreferencePatch.
1581type PreferencePatch struct {
1582	Archived *bool `json:"archived,omitempty"`
1583	Pinned   *bool `json:"pinned,omitempty"`
1584}
1585
1586// Preview defines model for Preview.
1587type Preview struct {
1588	Text            string  `json:"text"`
1589	TranscriptCount Counter `json:"transcript_count"`
1590	Truncated       bool    `json:"truncated"`
1591}
1592
1593// Problem Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
1594type Problem struct {
1595	Code     string          `json:"code"`
1596	Decision json.RawMessage `json:"decision,omitempty"`
1597	Detail   string          `json:"detail"`
1598	Fields   []struct {
1599		Detail  string `json:"detail"`
1600		Pointer string `json:"pointer"`
1601	} `json:"fields,omitempty"`
1602	Status int64  `json:"status"`
1603	Title  string `json:"title"`
1604	Type   string `json:"type"`
1605}
1606
1607// ProgressPreview defines model for ProgressPreview.
1608type ProgressPreview struct {
1609	OffsetScalars Counter `json:"offset_scalars"`
1610	Text          string  `json:"text"`
1611}
1612
1613// ProviderProfile defines model for ProviderProfile.
1614type ProviderProfile struct {
1615	AccountID *ID     `json:"account_id" nullable:"true"`
1616	Effort    *string `json:"effort" nullable:"true"`
1617	Endpoint  *string `json:"endpoint" nullable:"true"`
1618
1619	// Extension Opaque identity. Never infer a resource type or route from its contents.
1620	Extension ID      `json:"extension"`
1621	HasKey    bool    `json:"has_key"`
1622	ImageEdge *int64  `json:"image_edge" nullable:"true"`
1623	Location  *string `json:"location" nullable:"true"`
1624
1625	// Model Opaque identity. Never infer a resource type or route from its contents.
1626	Model    ID      `json:"model"`
1627	Project  *string `json:"project" nullable:"true"`
1628	Protocol string  `json:"protocol"`
1629}
1630
1631// ProviderProfilePatch Partial existing profile; extension and model required when creating a new map entry.
1632type ProviderProfilePatch struct {
1633	AccountID *ID     `json:"account_id,omitempty" nullable:"true"`
1634	APIKey    *string `json:"api_key,omitempty" nullable:"true"`
1635	Effort    *string `json:"effort,omitempty" nullable:"true"`
1636	Endpoint  *string `json:"endpoint,omitempty" nullable:"true"`
1637
1638	// Extension Opaque identity. Never infer a resource type or route from its contents.
1639	Extension *ID     `json:"extension,omitempty"`
1640	ImageEdge *int64  `json:"image_edge,omitempty" nullable:"true"`
1641	Location  *string `json:"location,omitempty" nullable:"true"`
1642
1643	// Model Opaque identity. Never infer a resource type or route from its contents.
1644	Model    *ID     `json:"model,omitempty"`
1645	Project  *string `json:"project,omitempty" nullable:"true"`
1646	Protocol *string `json:"protocol,omitempty"`
1647}
1648
1649// ProviderRequestRecord defines model for ProviderRequestRecord.
1650type ProviderRequestRecord struct {
1651	AccountID           *ID              `json:"account_id" nullable:"true"`
1652	CacheCreationTokens TokenObservation `json:"cache_creation_tokens"`
1653	CacheMarks          []struct {
1654		Index      *Counter `json:"index" nullable:"true"`
1655		Through    string   `json:"through"`
1656		TTLSeconds Counter  `json:"ttl_seconds"`
1657	} `json:"cache_marks"`
1658	CacheWrite1HTokens TokenObservation `json:"cache_write_1h_tokens"`
1659	CacheWrite5MTokens TokenObservation `json:"cache_write_5m_tokens"`
1660	CachedTokens       TokenObservation `json:"cached_tokens"`
1661	CompletionTokens   TokenObservation `json:"completion_tokens"`
1662	EndedAt            *Timestamp       `json:"ended_at" nullable:"true"`
1663	Failure            *SafeReason      `json:"failure" nullable:"true"`
1664	HeadHash           string           `json:"head_hash"`
1665	HTTPStatus         *int64           `json:"http_status" nullable:"true"`
1666	InputCount         Counter          `json:"input_count"`
1667	Kind               string           `json:"kind"`
1668
1669	// Model Opaque identity. Never infer a resource type or route from its contents.
1670	Model          ID               `json:"model"`
1671	Outcome        string           `json:"outcome"`
1672	ProjectionHash *string          `json:"projection_hash" nullable:"true"`
1673	PromptTokens   TokenObservation `json:"prompt_tokens"`
1674
1675	// Provider Opaque identity. Never infer a resource type or route from its contents.
1676	Provider ID `json:"provider"`
1677
1678	// ProviderProfile Opaque identity. Never infer a resource type or route from its contents.
1679	ProviderProfile    ID               `json:"provider_profile"`
1680	ReasoningTokens    TokenObservation `json:"reasoning_tokens"`
1681	ReplacedInputCount *Counter         `json:"replaced_input_count" nullable:"true"`
1682	RunID              *ID              `json:"run_id" nullable:"true"`
1683	Sequence           Counter          `json:"sequence"`
1684
1685	// StartedAt UTC RFC 3339.
1686	StartedAt           Timestamp `json:"started_at"`
1687	Strategy            *string   `json:"strategy" nullable:"true"`
1688	TranscriptPositions []Counter `json:"transcript_positions"`
1689}
1690
1691// ProviderSettings defines model for ProviderSettings.
1692type ProviderSettings struct {
1693	DefaultProfile *ID                        `json:"default_profile" nullable:"true"`
1694	Profiles       map[string]ProviderProfile `json:"profiles"`
1695}
1696
1697// ProviderSettingsChange defines model for ProviderSettingsChange.
1698type ProviderSettingsChange struct {
1699	Application SettingsApplication      `json:"application"`
1700	Group       string                   `json:"group"`
1701	Resource    ProviderSettingsResource `json:"resource"`
1702}
1703
1704// ProviderSettingsPatch Removing the selected profile requires replacing or clearing default_profile in this same patch.
1705//
1706// Examples: {"default_profile":"personal","profiles":{"personal":{"account_id":null,"api_key":"synthetic-example-key","effort":null,"endpoint":"https://provider.example/v1","extension":"openai","image_edge":null,"location":null,"model":"example-model","project":null,"protocol":"responses"}}}
1707type ProviderSettingsPatch struct {
1708	DefaultProfile *ID                              `json:"default_profile,omitempty" nullable:"true"`
1709	Profiles       map[string]*ProviderProfilePatch `json:"profiles,omitempty"`
1710}
1711
1712// ProviderSettingsResource defines model for ProviderSettingsResource.
1713type ProviderSettingsResource struct {
1714	// ETag Strong opaque validator for the complete canonical representation.
1715	ETag ETag `json:"etag"`
1716
1717	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
1718	URL   ResourceURL      `json:"url"`
1719	Value ProviderSettings `json:"value"`
1720}
1721
1722// ProxyChunk defines model for ProxyChunk.
1723type ProxyChunk struct {
1724	Choices []struct {
1725		Delta struct {
1726			Content          *string          `json:"content,omitempty"`
1727			ReasoningContent *string          `json:"reasoning_content,omitempty"`
1728			Role             *string          `json:"role,omitempty"`
1729			ToolCalls        []ProxyToolDelta `json:"tool_calls,omitempty"`
1730		} `json:"delta"`
1731		FinishReason *string `json:"finish_reason" nullable:"true"`
1732		Index        Counter `json:"index"`
1733	} `json:"choices"`
1734	Created Counter `json:"created"`
1735
1736	// ID Opaque identity. Never infer a resource type or route from its contents.
1737	ID     ID          `json:"id"`
1738	Model  string      `json:"model"`
1739	Object string      `json:"object"`
1740	Usage  *ProxyUsage `json:"usage,omitempty" nullable:"true"`
1741}
1742
1743// ProxyCompletion Examples: {"choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hello","role":"assistant"}}],"created":1790949600,"id":"completion-1","model":"personal/example-model","object":"chat.completion","usage":{"completion_tokens":1,"prompt_tokens":1,"total_tokens":2}}
1744type ProxyCompletion struct {
1745	Choices []struct {
1746		FinishReason string  `json:"finish_reason"`
1747		Index        Counter `json:"index"`
1748		Message      struct {
1749			Content          *string         `json:"content" nullable:"true"`
1750			ReasoningContent *string         `json:"reasoning_content,omitempty" nullable:"true"`
1751			Role             string          `json:"role"`
1752			ToolCalls        []ProxyToolCall `json:"tool_calls,omitempty"`
1753		} `json:"message"`
1754	} `json:"choices"`
1755	Created Counter `json:"created"`
1756
1757	// ID Opaque identity. Never infer a resource type or route from its contents.
1758	ID     ID          `json:"id"`
1759	Model  string      `json:"model"`
1760	Object string      `json:"object"`
1761	Usage  *ProxyUsage `json:"usage" nullable:"true"`
1762}
1763
1764// ProxyCompletionRequest Examples: {"messages":[{"content":"Hello","role":"user"}],"model":"personal/example-model","stream":true}
1765type ProxyCompletionRequest struct {
1766	MaxCompletionTokens *int64         `json:"max_completion_tokens,omitempty"`
1767	MaxTokens           *int64         `json:"max_tokens,omitempty"`
1768	Messages            []ProxyMessage `json:"messages"`
1769	Model               string         `json:"model"`
1770	ParallelToolCalls   *bool          `json:"parallel_tool_calls,omitempty"`
1771	Reasoning           *struct {
1772		Effort string `json:"effort"`
1773	} `json:"reasoning,omitempty"`
1774	ReasoningEffort *string         `json:"reasoning_effort,omitempty"`
1775	ResponseFormat  json.RawMessage `json:"response_format,omitempty"`
1776	Stop            json.RawMessage `json:"stop,omitempty"`
1777	Stream          *bool           `json:"stream,omitempty"`
1778	StreamOptions   *struct {
1779		IncludeUsage *bool `json:"include_usage,omitempty"`
1780	} `json:"stream_options,omitempty"`
1781	Temperature *float64              `json:"temperature,omitempty"`
1782	ToolChoice  json.RawMessage       `json:"tool_choice,omitempty"`
1783	Tools       []ProxyToolDefinition `json:"tools,omitempty"`
1784	TopP        *float64              `json:"top_p,omitempty"`
1785}
1786
1787// ProxyError defines model for ProxyError.
1788type ProxyError struct {
1789	Error struct {
1790		Code    *string `json:"code" nullable:"true"`
1791		Message string  `json:"message"`
1792		Param   *string `json:"param" nullable:"true"`
1793		Type    string  `json:"type"`
1794	} `json:"error"`
1795}
1796
1797// ProxyImagePart defines model for ProxyImagePart.
1798type ProxyImagePart struct {
1799	ImageURL struct {
1800		Detail *string `json:"detail,omitempty"`
1801		URL    string  `json:"url"`
1802	} `json:"image_url"`
1803	Type string `json:"type"`
1804}
1805
1806// ProxyMessage Tool messages require tool_call_id. Only assistant messages carry tool_calls. Images are accepted only as user data URLs.
1807type ProxyMessage struct {
1808	Content          json.RawMessage `json:"content,omitempty" nullable:"true"`
1809	Name             *string         `json:"name,omitempty"`
1810	ReasoningContent *string         `json:"reasoning_content,omitempty" nullable:"true"`
1811	Role             string          `json:"role"`
1812	ToolCallID       *string         `json:"tool_call_id,omitempty"`
1813	ToolCalls        []ProxyToolCall `json:"tool_calls,omitempty"`
1814}
1815
1816// ProxyModels defines model for ProxyModels.
1817type ProxyModels struct {
1818	Data []struct {
1819		Created Counter `json:"created"`
1820		ID      string  `json:"id"`
1821		Object  string  `json:"object"`
1822		OwnedBy string  `json:"owned_by"`
1823	} `json:"data"`
1824	Errors []struct {
1825		Message string `json:"message"`
1826
1827		// Profile Opaque identity. Never infer a resource type or route from its contents.
1828		Profile ID `json:"profile"`
1829	} `json:"errors,omitempty"`
1830	Object string `json:"object"`
1831}
1832
1833// ProxySSE Data is a JSON chunk or error, followed by literal [DONE]. Validate decoded JSON explicitly.
1834type ProxySSE struct {
1835	Data json.RawMessage `json:"data"`
1836}
1837
1838// ProxyTextPart defines model for ProxyTextPart.
1839type ProxyTextPart struct {
1840	Text string `json:"text"`
1841	Type string `json:"type"`
1842}
1843
1844// ProxyToolCall defines model for ProxyToolCall.
1845type ProxyToolCall struct {
1846	Function struct {
1847		Arguments string `json:"arguments"`
1848		Name      string `json:"name"`
1849	} `json:"function"`
1850	ID   string `json:"id"`
1851	Type string `json:"type"`
1852}
1853
1854// ProxyToolDefinition defines model for ProxyToolDefinition.
1855type ProxyToolDefinition struct {
1856	Function struct {
1857		Description *string `json:"description,omitempty"`
1858		Name        string  `json:"name"`
1859
1860		// Parameters Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
1861		Parameters *DynamicJSON `json:"parameters,omitempty"`
1862		Strict     *bool        `json:"strict,omitempty"`
1863	} `json:"function"`
1864	Type string `json:"type"`
1865}
1866
1867// ProxyToolDelta defines model for ProxyToolDelta.
1868type ProxyToolDelta struct {
1869	Function *struct {
1870		Arguments string `json:"arguments"`
1871		Name      string `json:"name"`
1872	} `json:"function,omitempty"`
1873	ID    *string `json:"id,omitempty"`
1874	Index Counter `json:"index"`
1875	Type  *string `json:"type,omitempty"`
1876}
1877
1878// ProxyUsage defines model for ProxyUsage.
1879type ProxyUsage struct {
1880	CompletionTokens        Counter `json:"completion_tokens"`
1881	CompletionTokensDetails *struct {
1882		ReasoningTokens Counter `json:"reasoning_tokens"`
1883	} `json:"completion_tokens_details,omitempty"`
1884	PromptTokens        Counter `json:"prompt_tokens"`
1885	PromptTokensDetails *struct {
1886		CachedTokens Counter `json:"cached_tokens"`
1887	} `json:"prompt_tokens_details,omitempty"`
1888	TotalTokens Counter `json:"total_tokens"`
1889}
1890
1891// QuarantineDiagnostic defines model for QuarantineDiagnostic.
1892type QuarantineDiagnostic struct {
1893	// ID Opaque identity. Never infer a resource type or route from its contents.
1894	ID     ID         `json:"id"`
1895	Reason SafeReason `json:"reason"`
1896}
1897
1898// QuotaObservation defines model for QuotaObservation.
1899type QuotaObservation struct {
1900	// AccountID Opaque identity. Never infer a resource type or route from its contents.
1901	AccountID ID          `json:"account_id"`
1902	Error     *SafeReason `json:"error" nullable:"true"`
1903	Label     string      `json:"label"`
1904	LimitID   string      `json:"limit_id"`
1905
1906	// ObservedAt UTC RFC 3339.
1907	ObservedAt Timestamp `json:"observed_at"`
1908	Plan       *string   `json:"plan" nullable:"true"`
1909
1910	// Provider Opaque identity. Never infer a resource type or route from its contents.
1911	Provider      ID         `json:"provider"`
1912	ResetsAt      *Timestamp `json:"resets_at" nullable:"true"`
1913	Scope         *string    `json:"scope" nullable:"true"`
1914	Sequence      Counter    `json:"sequence"`
1915	Source        string     `json:"source"`
1916	Status        string     `json:"status"`
1917	UsedPercent   *float64   `json:"used_percent" nullable:"true"`
1918	WindowLabel   *string    `json:"window_label" nullable:"true"`
1919	WindowSeconds *Counter   `json:"window_seconds" nullable:"true"`
1920}
1921
1922// QuotaPage defines model for QuotaPage.
1923type QuotaPage struct {
1924	Items []QuotaObservation `json:"items"`
1925	Next  *PageToken         `json:"next" nullable:"true"`
1926}
1927
1928// RecentWorkspace defines model for RecentWorkspace.
1929type RecentWorkspace struct {
1930	ActivityAt *Timestamp `json:"activity_at" nullable:"true"`
1931
1932	// Location Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
1933	Location Workspace `json:"location"`
1934	UseCount Counter   `json:"use_count"`
1935}
1936
1937// RecentWorkspacePage defines model for RecentWorkspacePage.
1938type RecentWorkspacePage struct {
1939	Items []RecentWorkspace `json:"items"`
1940	Next  *PageToken        `json:"next" nullable:"true"`
1941}
1942
1943// ReferenceContent defines model for ReferenceContent.
1944type ReferenceContent struct {
1945	Kind      string           `json:"kind"`
1946	Reference ContentReference `json:"reference"`
1947}
1948
1949// ReloadRequest defines model for ReloadRequest.
1950type ReloadRequest struct {
1951	Target *string `json:"target,omitempty"`
1952}
1953
1954// ReloadResult defines model for ReloadResult.
1955type ReloadResult struct {
1956	CachePolicy *CachePolicyReloadOutcome `json:"cache_policy" nullable:"true"`
1957	Models      []ModelReloadOutcome      `json:"models"`
1958	Session     *SessionReloadOutcome     `json:"session" nullable:"true"`
1959}
1960
1961// ReplayBatch Empty keepalive keeps the last sequence. Nonempty event sequences are contiguous from the requested cursor.
1962//
1963// Examples: {"cursor":1,"events":[{"data":{"input":{"acceptance_order":1,"accepted_at":"2026-10-02T14:00:00Z","admission":"accepted","blocking_reason":null,"client_id":"draft-1","delivery":"pending","http_status":202,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":null,"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null}},"sequence":1,"type":"input"}],"generation":"J6kYj6IGcXyP3eMIp-WL3A"}
1964type ReplayBatch struct {
1965	Cursor Counter        `json:"cursor"`
1966	Events []SessionEvent `json:"events"`
1967
1968	// Generation 128 random bits encoded as unpadded base64url; new for each session actor lifetime.
1969	Generation Generation `json:"generation"`
1970}
1971
1972// RequestRecordPage defines model for RequestRecordPage.
1973type RequestRecordPage struct {
1974	Items []ProviderRequestRecord `json:"items"`
1975	Next  *PageToken              `json:"next" nullable:"true"`
1976}
1977
1978// ResetBatch Leading reset and complete snapshot. Later events, if any, follow the snapshot cursor. Envelope cursor advances through every delivered event.
1979//
1980// Examples: {"cursor":0,"events":[{"data":{"reason":"initial"},"type":"reset"}],"generation":"J6kYj6IGcXyP3eMIp-WL3A","snapshot":{"active_output":[],"activity":{"latest_answer":null,"latest_input":null,"lines":[],"observed_at":"2026-10-02T14:00:00Z","output_scalars":0,"output_utf8_bytes":0},"activity_at":"2026-10-02T14:00:00Z","address":null,"automatic_name":"New session","closed":false,"composition":{"availability":{},"dependencies":{},"desired_revision":"composition-1","loaded_revision":null,"needs_reload":true,"quarantine":[]},"configuration_resource":{"etag":"\"session-config-1\"","url":"/sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration","value":{"effort":null,"family_revision":"family-1","id":"01a0fcea-2b00-7000-8000-000000000001","model":"example-model","name":"New session","preferences":{"archived":false,"pin_order":null,"pinned":false},"provider_profile":"personal","revision":"config-1","selection":{"extensions":{},"instructions":{},"mcp":{},"skills":{}},"workspace":"/workspace/project"}},"created_at":"2026-10-02T14:00:00Z","creation":{"resolved":{"effort":null,"model":"example-model","provider_profile":"personal","workspace":"/workspace/project"},"submitted":{"effort":null,"kind":"new","model":null,"name":null,"provider_profile":null,"workspace":"/workspace/project"}},"current_progress":[],"cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"depth":0,"effort":null,"family_revision":"family-1","glances":[],"history":{"high_water":0,"items":[],"newer":null,"older":null},"id":"01a0fcea-2b00-7000-8000-000000000001","input_order":0,"kernel":{"build":null,"instance_id":null,"live_job_count":0,"running_jobs":[],"stage":null,"stale":false,"staleness_reasons":[],"state":"none"},"location":{"host":null,"label":null,"path":"/workspace/project","user":null},"model":"example-model","name":"New session","parent_id":null,"pending_inputs":[],"preferences":{"archived":false,"opens":0,"pin_order":null,"pinned":false},"preview":{"text":"","transcript_count":0,"truncated":false},"provider_profile":"personal","revision":"config-1","root_id":"01a0fcea-2b00-7000-8000-000000000001","selection":{"effective":{"extensions":{},"instructions":{},"mcp":{},"skills":{}},"overrides":{"extensions":{},"instructions":{},"mcp":{},"skills":{}}},"status":{"blocking_reason":null,"interrupt_requested":false,"phase":"idle","run_id":null},"usage":{"cache_fade":[],"cache_ttl_seconds":null,"cache_write_tokens":null,"cached_prompt_tokens":null,"completion_tokens":null,"context_window_tokens":null,"elapsed_ms":null,"model":null,"observed_at":null,"prompt_tokens":null,"tokens_per_second":null,"total_tokens":null},"workspace":"/workspace/project","workspace_change":null}}
1981type ResetBatch struct {
1982	Cursor Counter        `json:"cursor"`
1983	Events []SessionEvent `json:"events"`
1984
1985	// Generation 128 random bits encoded as unpadded base64url; new for each session actor lifetime.
1986	Generation Generation `json:"generation"`
1987
1988	// Snapshot Examples: {"active_output":[],"activity":{"latest_answer":null,"latest_input":null,"lines":[],"observed_at":"2026-10-02T14:00:00Z","output_scalars":0,"output_utf8_bytes":0},"activity_at":"2026-10-02T14:00:00Z","address":null,"automatic_name":"New session","closed":false,"composition":{"availability":{},"dependencies":{},"desired_revision":"composition-1","loaded_revision":null,"needs_reload":true,"quarantine":[]},"configuration_resource":{"etag":"\"session-config-1\"","url":"/sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration","value":{"effort":null,"family_revision":"family-1","id":"01a0fcea-2b00-7000-8000-000000000001","model":"example-model","name":"New session","preferences":{"archived":false,"pin_order":null,"pinned":false},"provider_profile":"personal","revision":"config-1","selection":{"extensions":{},"instructions":{},"mcp":{},"skills":{}},"workspace":"/workspace/project"}},"created_at":"2026-10-02T14:00:00Z","creation":{"resolved":{"effort":null,"model":"example-model","provider_profile":"personal","workspace":"/workspace/project"},"submitted":{"effort":null,"kind":"new","model":null,"name":null,"provider_profile":null,"workspace":"/workspace/project"}},"current_progress":[],"cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"depth":0,"effort":null,"family_revision":"family-1","glances":[],"history":{"high_water":0,"items":[],"newer":null,"older":null},"id":"01a0fcea-2b00-7000-8000-000000000001","input_order":0,"kernel":{"build":null,"instance_id":null,"live_job_count":0,"running_jobs":[],"stage":null,"stale":false,"staleness_reasons":[],"state":"none"},"location":{"host":null,"label":null,"path":"/workspace/project","user":null},"model":"example-model","name":"New session","parent_id":null,"pending_inputs":[],"preferences":{"archived":false,"opens":0,"pin_order":null,"pinned":false},"preview":{"text":"","transcript_count":0,"truncated":false},"provider_profile":"personal","revision":"config-1","root_id":"01a0fcea-2b00-7000-8000-000000000001","selection":{"effective":{"extensions":{},"instructions":{},"mcp":{},"skills":{}},"overrides":{"extensions":{},"instructions":{},"mcp":{},"skills":{}}},"status":{"blocking_reason":null,"interrupt_requested":false,"phase":"idle","run_id":null},"usage":{"cache_fade":[],"cache_ttl_seconds":null,"cache_write_tokens":null,"cached_prompt_tokens":null,"completion_tokens":null,"context_window_tokens":null,"elapsed_ms":null,"model":null,"observed_at":null,"prompt_tokens":null,"tokens_per_second":null,"total_tokens":null},"workspace":"/workspace/project","workspace_change":null}
1989	Snapshot Session `json:"snapshot"`
1990}
1991
1992// ResetEvent defines model for ResetEvent.
1993type ResetEvent struct {
1994	Data struct {
1995		Reason string `json:"reason"`
1996	} `json:"data"`
1997	Type string `json:"type"`
1998}
1999
2000// ResourceURL Daemon-relative URL, including any representation query. No foreign origin or fragment.
2001type ResourceURL = string
2002
2003// ResourceValidator defines model for ResourceValidator.
2004type ResourceValidator struct {
2005	// ETag Strong opaque validator for the complete canonical representation.
2006	ETag ETag `json:"etag"`
2007
2008	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
2009	URL ResourceURL `json:"url"`
2010}
2011
2012// SafeReason defines model for SafeReason.
2013type SafeReason struct {
2014	Code   string `json:"code"`
2015	Detail string `json:"detail"`
2016}
2017
2018// ScheduleChange defines model for ScheduleChange.
2019type ScheduleChange struct {
2020	Notification Notification     `json:"notification"`
2021	Resource     ScheduleResource `json:"resource"`
2022}
2023
2024// ScheduleCreate defines model for ScheduleCreate.
2025type ScheduleCreate struct {
2026	DelaySeconds *int64 `json:"delay_seconds,omitempty"`
2027	EverySeconds *int64 `json:"every_seconds,omitempty"`
2028	Kind         string `json:"kind"`
2029	Prompt       string `json:"prompt"`
2030
2031	// SessionID Opaque identity. Never infer a resource type or route from its contents.
2032	SessionID ID `json:"session_id"`
2033}
2034
2035// ScheduleJob defines model for ScheduleJob.
2036type ScheduleJob struct {
2037	// CreatedAt Null for historical schedules that did not record creation time.
2038	CreatedAt    *Timestamp `json:"created_at" nullable:"true"`
2039	EverySeconds *int64     `json:"every_seconds" nullable:"true"`
2040
2041	// ID Opaque identity. Never infer a resource type or route from its contents.
2042	ID   ID     `json:"id"`
2043	Kind string `json:"kind"`
2044
2045	// NextAt UTC RFC 3339.
2046	NextAt Timestamp `json:"next_at"`
2047	Prompt string    `json:"prompt"`
2048
2049	// Revision Opaque identity. Never infer a resource type or route from its contents.
2050	Revision ID `json:"revision"`
2051
2052	// SessionID Opaque identity. Never infer a resource type or route from its contents.
2053	SessionID ID `json:"session_id"`
2054
2055	// UpdatedAt Null until a historical schedule records a new update.
2056	UpdatedAt *Timestamp `json:"updated_at" nullable:"true"`
2057}
2058
2059// SchedulePage defines model for SchedulePage.
2060type SchedulePage struct {
2061	Glance *Glance            `json:"glance,omitempty"`
2062	Items  []ScheduleResource `json:"items"`
2063	Next   *PageToken         `json:"next" nullable:"true"`
2064	Page   *PageDescriptor    `json:"page,omitempty"`
2065}
2066
2067// SchedulePatch Validate complete candidate: once has null repetition; recurring and heartbeat require every_seconds.
2068type SchedulePatch struct {
2069	DelaySeconds *int64  `json:"delay_seconds,omitempty"`
2070	EverySeconds *int64  `json:"every_seconds,omitempty" nullable:"true"`
2071	Kind         *string `json:"kind,omitempty"`
2072	Prompt       *string `json:"prompt,omitempty"`
2073}
2074
2075// ScheduleResource defines model for ScheduleResource.
2076type ScheduleResource struct {
2077	// ETag Strong opaque validator for the complete canonical representation.
2078	ETag ETag `json:"etag"`
2079
2080	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
2081	URL   ResourceURL `json:"url"`
2082	Value ScheduleJob `json:"value"`
2083}
2084
2085// SecretPresence defines model for SecretPresence.
2086type SecretPresence struct {
2087	BearerToken bool     `json:"bearer_token"`
2088	Environment []string `json:"environment"`
2089	Headers     []string `json:"headers"`
2090}
2091
2092// SelectionOverrides defines model for SelectionOverrides.
2093type SelectionOverrides struct {
2094	Extensions   map[string]*bool `json:"extensions"`
2095	Instructions map[string]*bool `json:"instructions"`
2096	MCP          map[string]*bool `json:"mcp"`
2097	Skills       map[string]*bool `json:"skills"`
2098}
2099
2100// SelectionPatch Null map entry clears that override. Null entire map clears all overrides of that kind.
2101type SelectionPatch struct {
2102	Extensions   *map[string]*bool `json:"extensions,omitempty" nullable:"true"`
2103	Instructions *map[string]*bool `json:"instructions,omitempty" nullable:"true"`
2104	MCP          *map[string]*bool `json:"mcp,omitempty" nullable:"true"`
2105	Skills       *map[string]*bool `json:"skills,omitempty" nullable:"true"`
2106}
2107
2108// Server Examples: {"build":"example-build","capabilities":{"collection_invalidation":1,"durable_inputs":1,"session_replay":1,"storage_report":1,"tool_progress":1},"digest":null,"extensions":[{"name":"work","version":1}],"instance_id":"instance-1","notices":[],"protocol":3,"quota":null,"state":"ready"}
2109type Server struct {
2110	Build        *string          `json:"build" nullable:"true"`
2111	Capabilities map[string]int64 `json:"capabilities"`
2112
2113	// Digest Content digest of the running code tree; update information, not attachment compatibility.
2114	Digest     *string `json:"digest" nullable:"true"`
2115	Extensions []struct {
2116		// Name Opaque identity. Never infer a resource type or route from its contents.
2117		Name    ID    `json:"name"`
2118		Version int64 `json:"version"`
2119	} `json:"extensions"`
2120
2121	// InstanceID Opaque identity. Never infer a resource type or route from its contents.
2122	InstanceID ID `json:"instance_id"`
2123	Notices    []struct {
2124		// ID Opaque identity. Never infer a resource type or route from its contents.
2125		ID      ID     `json:"id"`
2126		Kind    string `json:"kind"`
2127		Message string `json:"message"`
2128	} `json:"notices"`
2129	Protocol     int64              `json:"protocol"`
2130	Quota        []QuotaObservation `json:"quota" nullable:"true"`
2131	QuotaHistory *QuotaPage         `json:"quota_history,omitempty"`
2132	State        string             `json:"state"`
2133}
2134
2135// Session defines model for Session.
2136type Session struct {
2137	ActiveOutput          []ActiveOutput               `json:"active_output"`
2138	Activity              Activity                     `json:"activity"`
2139	ActivityAt            *Timestamp                   `json:"activity_at" nullable:"true"`
2140	Address               *string                      `json:"address" nullable:"true"`
2141	AutomaticName         string                       `json:"automatic_name"`
2142	Closed                bool                         `json:"closed"`
2143	Composition           Composition                  `json:"composition"`
2144	ConfigurationResource SessionConfigurationResource `json:"configuration_resource"`
2145	CreatedAt             *Timestamp                   `json:"created_at" nullable:"true"`
2146
2147	// Creation Null only for stored sessions that predate immutable creation provenance. All newly admitted creations have provenance.
2148	Creation        *Creation      `json:"creation" nullable:"true"`
2149	CurrentProgress []ToolProgress `json:"current_progress"`
2150	Cursor          *Cursor        `json:"cursor" nullable:"true"`
2151	Depth           int64          `json:"depth"`
2152	Effort          *string        `json:"effort" nullable:"true"`
2153
2154	// FamilyRevision Opaque identity. Never infer a resource type or route from its contents.
2155	FamilyRevision ID       `json:"family_revision"`
2156	Glances        []Glance `json:"glances"`
2157
2158	// History Examples: {"high_water":0,"items":[],"newer":null,"older":null}
2159	History HistoryPage `json:"history"`
2160
2161	// ID Opaque identity. Never infer a resource type or route from its contents.
2162	ID         ID      `json:"id"`
2163	InputOrder Counter `json:"input_order"`
2164	Kernel     Kernel  `json:"kernel"`
2165
2166	// Location Parsed workspace and daemon-resolved display label. Reading this metadata does not connect to the remote host.
2167	Location        SessionLocation    `json:"location"`
2168	Model           *ID                `json:"model" nullable:"true"`
2169	Name            string             `json:"name"`
2170	ParentID        *ID                `json:"parent_id" nullable:"true"`
2171	PendingInputs   []PendingInput     `json:"pending_inputs"`
2172	Preferences     SessionPreferences `json:"preferences"`
2173	Preview         Preview            `json:"preview"`
2174	ProviderProfile *ID                `json:"provider_profile" nullable:"true"`
2175
2176	// Revision Opaque identity. Never infer a resource type or route from its contents.
2177	Revision ID `json:"revision"`
2178
2179	// RootID Opaque identity. Never infer a resource type or route from its contents.
2180	RootID    ID               `json:"root_id"`
2181	Selection SessionSelection `json:"selection"`
2182	Status    SessionStatus    `json:"status"`
2183	Usage     Usage            `json:"usage"`
2184
2185	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2186	Workspace       Workspace        `json:"workspace"`
2187	WorkspaceChange *WorkspaceChange `json:"workspace_change" nullable:"true"`
2188}
2189
2190// SessionBatch defines model for SessionBatch.
2191type SessionBatch = json.RawMessage
2192
2193// SessionChange defines model for SessionChange.
2194type SessionChange struct {
2195	Move *struct {
2196		AppliedCount  Counter  `json:"applied_count"`
2197		AppliedIDs    []ID     `json:"applied_ids"`
2198		DeferredCount Counter  `json:"deferred_count"`
2199		DeferredIDs   []ID     `json:"deferred_ids"`
2200		Truncated     bool     `json:"truncated"`
2201		Warnings      Warnings `json:"warnings"`
2202	} `json:"move" nullable:"true"`
2203	Resource SessionConfigurationResource `json:"resource"`
2204
2205	// Session Examples: {"active_output":[],"activity":{"latest_answer":null,"latest_input":null,"lines":[],"observed_at":"2026-10-02T14:00:00Z","output_scalars":0,"output_utf8_bytes":0},"activity_at":"2026-10-02T14:00:00Z","address":null,"automatic_name":"New session","closed":false,"composition":{"availability":{},"dependencies":{},"desired_revision":"composition-1","loaded_revision":null,"needs_reload":true,"quarantine":[]},"configuration_resource":{"etag":"\"session-config-1\"","url":"/sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration","value":{"effort":null,"family_revision":"family-1","id":"01a0fcea-2b00-7000-8000-000000000001","model":"example-model","name":"New session","preferences":{"archived":false,"pin_order":null,"pinned":false},"provider_profile":"personal","revision":"config-1","selection":{"extensions":{},"instructions":{},"mcp":{},"skills":{}},"workspace":"/workspace/project"}},"created_at":"2026-10-02T14:00:00Z","creation":{"resolved":{"effort":null,"model":"example-model","provider_profile":"personal","workspace":"/workspace/project"},"submitted":{"effort":null,"kind":"new","model":null,"name":null,"provider_profile":null,"workspace":"/workspace/project"}},"current_progress":[],"cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"depth":0,"effort":null,"family_revision":"family-1","glances":[],"history":{"high_water":0,"items":[],"newer":null,"older":null},"id":"01a0fcea-2b00-7000-8000-000000000001","input_order":0,"kernel":{"build":null,"instance_id":null,"live_job_count":0,"running_jobs":[],"stage":null,"stale":false,"staleness_reasons":[],"state":"none"},"location":{"host":null,"label":null,"path":"/workspace/project","user":null},"model":"example-model","name":"New session","parent_id":null,"pending_inputs":[],"preferences":{"archived":false,"opens":0,"pin_order":null,"pinned":false},"preview":{"text":"","transcript_count":0,"truncated":false},"provider_profile":"personal","revision":"config-1","root_id":"01a0fcea-2b00-7000-8000-000000000001","selection":{"effective":{"extensions":{},"instructions":{},"mcp":{},"skills":{}},"overrides":{"extensions":{},"instructions":{},"mcp":{},"skills":{}}},"status":{"blocking_reason":null,"interrupt_requested":false,"phase":"idle","run_id":null},"usage":{"cache_fade":[],"cache_ttl_seconds":null,"cache_write_tokens":null,"cached_prompt_tokens":null,"completion_tokens":null,"context_window_tokens":null,"elapsed_ms":null,"model":null,"observed_at":null,"prompt_tokens":null,"tokens_per_second":null,"total_tokens":null},"workspace":"/workspace/project","workspace_change":null}
2206	Session Session `json:"session"`
2207}
2208
2209// SessionChangeRequest defines model for SessionChangeRequest.
2210type SessionChangeRequest = json.RawMessage
2211
2212// SessionCommittedEvent defines model for SessionCommittedEvent.
2213type SessionCommittedEvent struct {
2214	Data struct {
2215		HighWater Counter `json:"high_water"`
2216
2217		// ReplacesAllLive Retire all provisional output for a model commit.
2218		ReplacesAllLive bool `json:"replaces_all_live"`
2219		ReplacesLiveIDs []ID `json:"replaces_live_ids"`
2220	} `json:"data"`
2221	Sequence Counter `json:"sequence"`
2222	Type     string  `json:"type"`
2223}
2224
2225// SessionCompactedEvent defines model for SessionCompactedEvent.
2226type SessionCompactedEvent struct {
2227	Data     CompactionObservation `json:"data"`
2228	Sequence Counter               `json:"sequence"`
2229	Type     string                `json:"type"`
2230}
2231
2232// SessionConfiguration Examples: {"effort":null,"family_revision":"family-1","id":"01a0fcea-2b00-7000-8000-000000000001","model":"example-model","name":null,"preferences":{"archived":false,"pin_order":null,"pinned":false},"provider_profile":"personal","revision":"config-1","selection":{"extensions":{},"instructions":{},"mcp":{},"skills":{}},"workspace":"/workspace/project"}
2233type SessionConfiguration struct {
2234	Effort *string `json:"effort" nullable:"true"`
2235
2236	// FamilyRevision Opaque identity. Never infer a resource type or route from its contents.
2237	FamilyRevision ID `json:"family_revision"`
2238
2239	// ID Opaque identity. Never infer a resource type or route from its contents.
2240	ID    ID  `json:"id"`
2241	Model *ID `json:"model" nullable:"true"`
2242
2243	// Name Explicit name. Null shows the automatic title for a root, or the family name for a child; the session representation carries the displayed name.
2244	Name        *string `json:"name" nullable:"true"`
2245	Preferences struct {
2246		Archived bool     `json:"archived"`
2247		PinOrder *Counter `json:"pin_order" nullable:"true"`
2248		Pinned   bool     `json:"pinned"`
2249	} `json:"preferences"`
2250	ProviderProfile *ID `json:"provider_profile" nullable:"true"`
2251
2252	// Revision Opaque identity. Never infer a resource type or route from its contents.
2253	Revision  ID                 `json:"revision"`
2254	Selection SelectionOverrides `json:"selection"`
2255
2256	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2257	Workspace Workspace `json:"workspace"`
2258}
2259
2260// SessionConfigurationResource defines model for SessionConfigurationResource.
2261type SessionConfigurationResource struct {
2262	// ETag Strong opaque validator for the complete canonical representation.
2263	ETag ETag `json:"etag"`
2264
2265	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
2266	URL ResourceURL `json:"url"`
2267
2268	// Value Examples: {"effort":null,"family_revision":"family-1","id":"01a0fcea-2b00-7000-8000-000000000001","model":"example-model","name":null,"preferences":{"archived":false,"pin_order":null,"pinned":false},"provider_profile":"personal","revision":"config-1","selection":{"extensions":{},"instructions":{},"mcp":{},"skills":{}},"workspace":"/workspace/project"}
2269	Value SessionConfiguration `json:"value"`
2270}
2271
2272// SessionCreationRequest defines model for SessionCreationRequest.
2273type SessionCreationRequest = json.RawMessage
2274
2275// SessionDeletion Counts cover the complete captured operation. ID lists are bounded summaries, never false completion. Refresh the authoritative family or known tombstones if truncated; deletion is never repeated to page a result.
2276type SessionDeletion struct {
2277	DeletedCount Counter `json:"deleted_count"`
2278	DeletedIDs   []ID    `json:"deleted_ids"`
2279	Remaining    []struct {
2280		// ID Opaque identity. Never infer a resource type or route from its contents.
2281		ID     ID         `json:"id"`
2282		Reason SafeReason `json:"reason"`
2283	} `json:"remaining"`
2284	RemainingCount Counter `json:"remaining_count"`
2285	State          string  `json:"state"`
2286	Truncated      bool    `json:"truncated"`
2287}
2288
2289// SessionErrorEvent defines model for SessionErrorEvent.
2290type SessionErrorEvent struct {
2291	Data struct {
2292		Code    string `json:"code"`
2293		Message string `json:"message"`
2294		RunID   *ID    `json:"run_id" nullable:"true"`
2295	} `json:"data"`
2296	Sequence Counter `json:"sequence"`
2297	Type     string  `json:"type"`
2298}
2299
2300// SessionEvent defines model for SessionEvent.
2301type SessionEvent = json.RawMessage
2302
2303// SessionInputEvent defines model for SessionInputEvent.
2304type SessionInputEvent struct {
2305	Data struct {
2306		// Input Examples: {"acceptance_order":1,"accepted_at":"2026-10-02T14:00:00Z","admission":"accepted","blocking_reason":null,"client_id":"draft-1","delivery":"pending","http_status":202,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":null,"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null}
2307		Input Input `json:"input"`
2308	} `json:"data"`
2309	Sequence Counter `json:"sequence"`
2310	Type     string  `json:"type"`
2311}
2312
2313// SessionInvalidateEvent defines model for SessionInvalidateEvent.
2314type SessionInvalidateEvent struct {
2315	Data struct {
2316		Kind string `json:"kind"`
2317
2318		// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
2319		URL ResourceURL `json:"url"`
2320	} `json:"data"`
2321	Sequence Counter `json:"sequence"`
2322	Type     string  `json:"type"`
2323}
2324
2325// SessionLocation Parsed workspace and daemon-resolved display label. Reading this metadata does not connect to the remote host.
2326type SessionLocation struct {
2327	Host  *string `json:"host" nullable:"true"`
2328	Label *string `json:"label" nullable:"true"`
2329	Path  string  `json:"path"`
2330	User  *string `json:"user" nullable:"true"`
2331}
2332
2333// SessionMessageEvent defines model for SessionMessageEvent.
2334type SessionMessageEvent struct {
2335	Data struct {
2336		Entry HistoryEntry `json:"entry"`
2337	} `json:"data"`
2338	Sequence Counter `json:"sequence"`
2339	Type     string  `json:"type"`
2340}
2341
2342// SessionNoteEvent defines model for SessionNoteEvent.
2343type SessionNoteEvent struct {
2344	Data struct {
2345		// EntryID Opaque identity. Never infer a resource type or route from its contents.
2346		EntryID ID            `json:"entry_id"`
2347		Mail    *MailMetadata `json:"mail" nullable:"true"`
2348		Origin  string        `json:"origin"`
2349		Text    string        `json:"text"`
2350	} `json:"data"`
2351	Sequence Counter `json:"sequence"`
2352	Type     string  `json:"type"`
2353}
2354
2355// SessionPage Examples: {"items":[{"active_output":[],"activity":{"latest_answer":null,"latest_input":null,"lines":[],"observed_at":"2026-10-02T14:00:00Z","output_scalars":0,"output_utf8_bytes":0},"activity_at":"2026-10-02T14:00:00Z","address":null,"automatic_name":"New session","closed":false,"created_at":"2026-10-02T14:00:00Z","current_progress":[],"cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"depth":0,"effort":null,"id":"01a0fcea-2b00-7000-8000-000000000001","location":{"host":null,"label":null,"path":"/workspace/project","user":null},"model":"example-model","name":"New session","parent_id":null,"preferences":{"archived":false,"opens":0,"pin_order":null,"pinned":false},"preview":{"text":"","transcript_count":0,"truncated":false},"provider_profile":"personal","root_id":"01a0fcea-2b00-7000-8000-000000000001","status":{"blocking_reason":null,"interrupt_requested":false,"phase":"idle","run_id":null},"workspace":"/workspace/project"}],"next":null}
2356type SessionPage struct {
2357	Family *struct {
2358		// Revision Opaque identity. Never infer a resource type or route from its contents.
2359		Revision ID `json:"revision"`
2360
2361		// RootID Opaque identity. Never infer a resource type or route from its contents.
2362		RootID ID `json:"root_id"`
2363	} `json:"family,omitempty"`
2364	Items []SessionSummary `json:"items"`
2365	Next  *PageToken       `json:"next" nullable:"true"`
2366}
2367
2368// SessionPatch Skill and instruction changes require catalog_revision. All fields validate and commit together.
2369//
2370// Examples: {"catalog_revision":"discovery-1","selection":{"extensions":{"browser":null},"skills":{"candidate-1":false}}}
2371type SessionPatch struct {
2372	// CatalogRevision Opaque identity. Never infer a resource type or route from its contents.
2373	CatalogRevision *ID     `json:"catalog_revision,omitempty"`
2374	Effort          *string `json:"effort,omitempty" nullable:"true"`
2375
2376	// Model Opaque identity. Never infer a resource type or route from its contents.
2377	Model       *ID              `json:"model,omitempty"`
2378	Name        *string          `json:"name,omitempty" nullable:"true"`
2379	Preferences *PreferencePatch `json:"preferences,omitempty"`
2380
2381	// ProviderProfile Opaque identity. Never infer a resource type or route from its contents.
2382	ProviderProfile *ID `json:"provider_profile,omitempty"`
2383
2384	// Selection Null map entry clears that override. Null entire map clears all overrides of that kind.
2385	Selection *SelectionPatch `json:"selection,omitempty"`
2386}
2387
2388// SessionPreferences defines model for SessionPreferences.
2389type SessionPreferences struct {
2390	Archived bool     `json:"archived"`
2391	Opens    Counter  `json:"opens"`
2392	PinOrder *Counter `json:"pin_order" nullable:"true"`
2393	Pinned   bool     `json:"pinned"`
2394}
2395
2396// SessionRead defines model for SessionRead.
2397type SessionRead = json.RawMessage
2398
2399// SessionReloadOutcome defines model for SessionReloadOutcome.
2400type SessionReloadOutcome struct {
2401	Failure         *SafeReason `json:"failure" nullable:"true"`
2402	LoadedRevision  *ID         `json:"loaded_revision" nullable:"true"`
2403	RestartRequired bool        `json:"restart_required"`
2404	State           string      `json:"state"`
2405	Warnings        Warnings    `json:"warnings"`
2406}
2407
2408// SessionRetryEvent defines model for SessionRetryEvent.
2409type SessionRetryEvent struct {
2410	Data struct {
2411		Attempt int64      `json:"attempt"`
2412		DelayMs Counter    `json:"delay_ms"`
2413		Reason  SafeReason `json:"reason"`
2414
2415		// RunID Opaque identity. Never infer a resource type or route from its contents.
2416		RunID ID `json:"run_id"`
2417	} `json:"data"`
2418	Sequence Counter `json:"sequence"`
2419	Type     string  `json:"type"`
2420}
2421
2422// SessionSSE One parsed SSE event. Decode data as JSON and validate SessionBatch separately; contentSchema is not asserted by ordinary JSON Schema validation. No event, id or retry fields are emitted.
2423//
2424// Examples: {"data":"{\"generation\":\"J6kYj6IGcXyP3eMIp-WL3A\",\"cursor\":0,\"events\":[{\"type\":\"reset\",\"data\":{\"reason\":\"initial\"}}],\"snapshot\":{\"id\":\"01a0fcea-2b00-7000-8000-000000000001\",\"name\":\"New 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 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\":[]}}"}, {"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\"}}}]}"}
2425type SessionSSE struct {
2426	Data string `json:"data"`
2427}
2428
2429// SessionSelection defines model for SessionSelection.
2430type SessionSelection struct {
2431	Effective struct {
2432		Extensions   map[string]bool `json:"extensions"`
2433		Instructions map[string]bool `json:"instructions"`
2434		MCP          map[string]bool `json:"mcp"`
2435		Skills       map[string]bool `json:"skills"`
2436	} `json:"effective"`
2437	Overrides SelectionOverrides `json:"overrides"`
2438}
2439
2440// SessionStatus defines model for SessionStatus.
2441type SessionStatus struct {
2442	BlockingReason     *SafeReason `json:"blocking_reason" nullable:"true"`
2443	InterruptRequested bool        `json:"interrupt_requested"`
2444	Phase              string      `json:"phase"`
2445	RunID              *ID         `json:"run_id" nullable:"true"`
2446}
2447
2448// SessionStatusEvent defines model for SessionStatusEvent.
2449type SessionStatusEvent struct {
2450	Data     SessionStatus `json:"data"`
2451	Sequence Counter       `json:"sequence"`
2452	Type     string        `json:"type"`
2453}
2454
2455// SessionSummary Live fields and cursor are captured together. Extra response fields may be ignored.
2456type SessionSummary struct {
2457	Activity        Activity       `json:"activity"`
2458	ActivityAt      *Timestamp     `json:"activity_at" nullable:"true"`
2459	Address         *string        `json:"address" nullable:"true"`
2460	AutomaticName   string         `json:"automatic_name"`
2461	Closed          bool           `json:"closed"`
2462	CreatedAt       *Timestamp     `json:"created_at" nullable:"true"`
2463	CurrentProgress []ToolProgress `json:"current_progress"`
2464	Cursor          *Cursor        `json:"cursor" nullable:"true"`
2465	Depth           int64          `json:"depth"`
2466	Effort          *string        `json:"effort" nullable:"true"`
2467
2468	// ID Opaque identity. Never infer a resource type or route from its contents.
2469	ID ID `json:"id"`
2470
2471	// Location Parsed workspace and daemon-resolved display label. Reading this metadata does not connect to the remote host.
2472	Location        SessionLocation    `json:"location"`
2473	Model           *ID                `json:"model" nullable:"true"`
2474	Name            string             `json:"name"`
2475	ParentID        *ID                `json:"parent_id" nullable:"true"`
2476	Preferences     SessionPreferences `json:"preferences"`
2477	Preview         Preview            `json:"preview"`
2478	ProviderProfile *ID                `json:"provider_profile" nullable:"true"`
2479
2480	// RootID Opaque identity. Never infer a resource type or route from its contents.
2481	RootID ID            `json:"root_id"`
2482	Status SessionStatus `json:"status"`
2483
2484	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2485	Workspace Workspace `json:"workspace"`
2486}
2487
2488// SessionTextEvent defines model for SessionTextEvent.
2489type SessionTextEvent struct {
2490	Data struct {
2491		// MessageID Opaque identity. Never infer a resource type or route from its contents.
2492		MessageID ID `json:"message_id"`
2493
2494		// RunID Opaque identity. Never infer a resource type or route from its contents.
2495		RunID ID     `json:"run_id"`
2496		Text  string `json:"text"`
2497	} `json:"data"`
2498	Sequence Counter `json:"sequence"`
2499	Type     string  `json:"type"`
2500}
2501
2502// SessionThinkingEvent defines model for SessionThinkingEvent.
2503type SessionThinkingEvent struct {
2504	Data struct {
2505		// ElapsedMs Completed thinking duration, when observed.
2506		ElapsedMs *Counter `json:"elapsed_ms,omitempty"`
2507
2508		// MessageID Opaque identity. Never infer a resource type or route from its contents.
2509		MessageID ID `json:"message_id"`
2510
2511		// RunID Opaque identity. Never infer a resource type or route from its contents.
2512		RunID ID     `json:"run_id"`
2513		Text  string `json:"text"`
2514	} `json:"data"`
2515	Sequence Counter `json:"sequence"`
2516	Type     string  `json:"type"`
2517}
2518
2519// SessionToolEvent defines model for SessionToolEvent.
2520type SessionToolEvent struct {
2521	Data struct {
2522		// Arguments Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
2523		Arguments       DynamicJSON `json:"arguments"`
2524		ContentComplete bool        `json:"content_complete"`
2525		Name            string      `json:"name"`
2526
2527		// ProgressCallID Opaque identity. Never infer a resource type or route from its contents.
2528		ProgressCallID ID                `json:"progress_call_id"`
2529		Reference      *ContentReference `json:"reference" nullable:"true"`
2530
2531		// Result Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.
2532		Result DynamicJSON `json:"result"`
2533
2534		// ToolCallID Opaque identity. Never infer a resource type or route from its contents.
2535		ToolCallID ID         `json:"tool_call_id"`
2536		Trace      *ToolTrace `json:"trace" nullable:"true"`
2537	} `json:"data"`
2538	Sequence Counter `json:"sequence"`
2539	Type     string  `json:"type"`
2540}
2541
2542// SessionToolProgressEvent defines model for SessionToolProgressEvent.
2543type SessionToolProgressEvent struct {
2544	Data struct {
2545		Progress *ToolProgress `json:"progress" nullable:"true"`
2546	} `json:"data"`
2547	Sequence Counter `json:"sequence"`
2548	Type     string  `json:"type"`
2549}
2550
2551// SessionTurnCompletedEvent defines model for SessionTurnCompletedEvent.
2552type SessionTurnCompletedEvent struct {
2553	Data struct {
2554		InputCount Counter `json:"input_count"`
2555		InputIDs   []ID    `json:"input_ids"`
2556
2557		// RunID Opaque identity. Never infer a resource type or route from its contents.
2558		RunID     ID     `json:"run_id"`
2559		State     string `json:"state"`
2560		Truncated bool   `json:"truncated"`
2561	} `json:"data"`
2562	Sequence Counter `json:"sequence"`
2563	Type     string  `json:"type"`
2564}
2565
2566// SessionUsageEvent defines model for SessionUsageEvent.
2567type SessionUsageEvent struct {
2568	Data     Usage   `json:"data"`
2569	Sequence Counter `json:"sequence"`
2570	Type     string  `json:"type"`
2571}
2572
2573// Settings defines model for Settings.
2574type Settings struct {
2575	Capabilities   CapabilitySettings `json:"capabilities"`
2576	Extensions     ExtensionSettings  `json:"extensions"`
2577	GroupResources struct {
2578		Capabilities ResourceValidator `json:"capabilities"`
2579		Extensions   ResourceValidator `json:"extensions"`
2580		MCP          ResourceValidator `json:"mcp"`
2581		Models       ResourceValidator `json:"models"`
2582		Providers    ResourceValidator `json:"providers"`
2583		UI           ResourceValidator `json:"ui"`
2584	} `json:"group_resources"`
2585	MCP       MCPSettings      `json:"mcp"`
2586	Models    ModelSettings    `json:"models"`
2587	Providers ProviderSettings `json:"providers"`
2588	UI        UISettings       `json:"ui"`
2589}
2590
2591// SettingsApplication defines model for SettingsApplication.
2592type SettingsApplication struct {
2593	ActiveServiceRevision *ID `json:"active_service_revision" nullable:"true"`
2594
2595	// CompositionChanged Whether this save changed the desired composition, so loaded sessions need a reload to apply it. Always false for providers, models and ui. A concurrent save to another composition group can make it true. GET /sessions?needs_reload=true lists the sessions.
2596	CompositionChanged bool `json:"composition_changed"`
2597
2598	// DesiredRevision Opaque identity. Never infer a resource type or route from its contents.
2599	DesiredRevision ID       `json:"desired_revision"`
2600	Validation      string   `json:"validation"`
2601	Warnings        Warnings `json:"warnings"`
2602}
2603
2604// SettingsChange defines model for SettingsChange.
2605type SettingsChange = json.RawMessage
2606
2607// SettingsPatch The group query selects the one applicable patch schema. It is an error to send fields for another group.
2608type SettingsPatch = json.RawMessage
2609
2610// SettingsRead defines model for SettingsRead.
2611type SettingsRead = json.RawMessage
2612
2613// Shutdown defines model for Shutdown.
2614type Shutdown struct {
2615	// InstanceID Opaque identity. Never infer a resource type or route from its contents.
2616	InstanceID ID     `json:"instance_id"`
2617	State      string `json:"state"`
2618}
2619
2620// ShutdownRequest defines model for ShutdownRequest.
2621type ShutdownRequest struct {
2622	// InstanceID Opaque identity. Never infer a resource type or route from its contents.
2623	InstanceID ID     `json:"instance_id"`
2624	TimeoutMs  *int64 `json:"timeout_ms,omitempty"`
2625}
2626
2627// SkillInputRequest defines model for SkillInputRequest.
2628type SkillInputRequest struct {
2629	Arguments string `json:"arguments"`
2630
2631	// CandidateID Opaque identity. Never infer a resource type or route from its contents.
2632	CandidateID ID `json:"candidate_id"`
2633
2634	// CatalogRevision Opaque identity. Never infer a resource type or route from its contents.
2635	CatalogRevision ID      `json:"catalog_revision"`
2636	ClientID        *string `json:"client_id,omitempty"`
2637	Kind            string  `json:"kind"`
2638}
2639
2640// StorageFile defines model for StorageFile.
2641type StorageFile struct {
2642	Bytes            Counter    `json:"bytes"`
2643	Category         string     `json:"category"`
2644	CleanupCandidate bool       `json:"cleanup_candidate"`
2645	CleanupReason    *string    `json:"cleanup_reason" nullable:"true"`
2646	ModifiedAt       *Timestamp `json:"modified_at" nullable:"true"`
2647	Path             string     `json:"path"`
2648}
2649
2650// StorageFilePage defines model for StorageFilePage.
2651type StorageFilePage struct {
2652	Items  []StorageFile `json:"items"`
2653	Next   *PageToken    `json:"next" nullable:"true"`
2654	Totals struct {
2655		BackupBytes       Counter `json:"backup_bytes"`
2656		KernelBytes       Counter `json:"kernel_bytes"`
2657		OtherBytes        Counter `json:"other_bytes"`
2658		RecentBackupBytes Counter `json:"recent_backup_bytes"`
2659		RecentBackupCount Counter `json:"recent_backup_count"`
2660	} `json:"totals"`
2661}
2662
2663// StorageReport Examples: {"database":{"free_page_count":0,"main_file_bytes":8192,"page_count":2,"page_size_bytes":4096,"used_bytes":8192,"wal_bytes":0},"files":{"items":[],"next":null,"totals":{"backup_bytes":0,"kernel_bytes":0,"other_bytes":0,"recent_backup_bytes":0,"recent_backup_count":0}},"images":{"bytes":0,"count":0},"measured_at":"2026-10-02T14:00:00Z","sessions":{"items":[],"next":null,"total_count":0,"total_estimated_content_bytes":0}}
2664type StorageReport struct {
2665	Database struct {
2666		FreePageCount Counter `json:"free_page_count"`
2667		MainFileBytes Counter `json:"main_file_bytes"`
2668		PageCount     Counter `json:"page_count"`
2669		PageSizeBytes Counter `json:"page_size_bytes"`
2670		UsedBytes     Counter `json:"used_bytes"`
2671		WalBytes      Counter `json:"wal_bytes"`
2672	} `json:"database"`
2673	Files  StorageFilePage `json:"files"`
2674	Images struct {
2675		Bytes Counter `json:"bytes"`
2676		Count Counter `json:"count"`
2677	} `json:"images"`
2678
2679	// MeasuredAt UTC RFC 3339.
2680	MeasuredAt Timestamp          `json:"measured_at"`
2681	Sessions   StorageSessionPage `json:"sessions"`
2682}
2683
2684// StorageSession defines model for StorageSession.
2685type StorageSession struct {
2686	ActivityAt            *Timestamp `json:"activity_at" nullable:"true"`
2687	CreatedAt             *Timestamp `json:"created_at" nullable:"true"`
2688	EstimatedContentBytes Counter    `json:"estimated_content_bytes"`
2689
2690	// ID Opaque identity. Never infer a resource type or route from its contents.
2691	ID    ID     `json:"id"`
2692	Title string `json:"title"`
2693
2694	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2695	Workspace Workspace `json:"workspace"`
2696}
2697
2698// StorageSessionPage defines model for StorageSessionPage.
2699type StorageSessionPage struct {
2700	Items                      []StorageSession `json:"items"`
2701	Next                       *PageToken       `json:"next" nullable:"true"`
2702	TotalCount                 Counter          `json:"total_count"`
2703	TotalEstimatedContentBytes Counter          `json:"total_estimated_content_bytes"`
2704}
2705
2706// TargetNotification defines model for TargetNotification.
2707type TargetNotification struct {
2708	Notification Notification `json:"notification"`
2709
2710	// SessionID Opaque identity. Never infer a resource type or route from its contents.
2711	SessionID ID `json:"session_id"`
2712}
2713
2714// TextContent defines model for TextContent.
2715type TextContent struct {
2716	Kind string `json:"kind"`
2717	Text string `json:"text"`
2718}
2719
2720// Timestamp UTC RFC 3339.
2721type Timestamp = string
2722
2723// TokenObservation defines model for TokenObservation.
2724type TokenObservation struct {
2725	Estimated *Counter `json:"estimated" nullable:"true"`
2726	Observed  *Counter `json:"observed" nullable:"true"`
2727	Source    *string  `json:"source" nullable:"true"`
2728}
2729
2730// ToolActivity defines model for ToolActivity.
2731type ToolActivity struct {
2732	// Detail What the person watching sees of the result, as markdown; a web search's answer and sources.
2733	Detail *string `json:"detail,omitempty"`
2734	Kind   string  `json:"kind"`
2735	Target string  `json:"target"`
2736}
2737
2738// ToolProgress Examples: {"call_id":"progress-1","intent":"unknown","name":"python","phase":"generating","preview":{"offset_scalars":0,"text":"print(\"hello\")"},"tool_call_id":null}
2739type ToolProgress struct {
2740	// CallID Opaque identity. Never infer a resource type or route from its contents.
2741	CallID     ID               `json:"call_id"`
2742	Intent     string           `json:"intent"`
2743	Name       string           `json:"name"`
2744	Phase      string           `json:"phase"`
2745	Preview    *ProgressPreview `json:"preview,omitempty"`
2746	ToolCallID *string          `json:"tool_call_id" nullable:"true"`
2747}
2748
2749// ToolTrace defines model for ToolTrace.
2750type ToolTrace struct {
2751	Activities []ToolActivity    `json:"activities"`
2752	Changes    []json.RawMessage `json:"changes"`
2753	Truncated  bool              `json:"truncated"`
2754}
2755
2756// TraceContent defines model for TraceContent.
2757type TraceContent struct {
2758	Kind  string    `json:"kind"`
2759	Trace ToolTrace `json:"trace"`
2760}
2761
2762// TreeChild defines model for TreeChild.
2763type TreeChild struct {
2764	Changed  Counter `json:"changed"`
2765	Kind     string  `json:"kind"`
2766	Language *string `json:"language" nullable:"true"`
2767
2768	// Location Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2769	Location Workspace `json:"location"`
2770	Name     string    `json:"name"`
2771}
2772
2773// TreeEntry defines model for TreeEntry.
2774type TreeEntry struct {
2775	Changed  Counter     `json:"changed"`
2776	Children []TreeChild `json:"children"`
2777	Kind     string      `json:"kind"`
2778	Language *string     `json:"language" nullable:"true"`
2779
2780	// Location Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2781	Location Workspace `json:"location"`
2782	More     Counter   `json:"more"`
2783	Name     string    `json:"name"`
2784}
2785
2786// Turn defines model for Turn.
2787type Turn struct {
2788	EndedAt *Timestamp `json:"ended_at" nullable:"true"`
2789
2790	// ID Opaque identity. Never infer a resource type or route from its contents.
2791	ID      ID          `json:"id"`
2792	Outcome *SafeReason `json:"outcome" nullable:"true"`
2793
2794	// StartedAt UTC RFC 3339.
2795	StartedAt Timestamp `json:"started_at"`
2796	State     string    `json:"state"`
2797}
2798
2799// UISettings defines model for UISettings.
2800type UISettings struct {
2801	DismissedNotices []ID `json:"dismissed_notices"`
2802	Thinking         bool `json:"thinking"`
2803	Tools            bool `json:"tools"`
2804}
2805
2806// UISettingsChange defines model for UISettingsChange.
2807type UISettingsChange struct {
2808	Application SettingsApplication `json:"application"`
2809	Group       string              `json:"group"`
2810	Resource    UISettingsResource  `json:"resource"`
2811}
2812
2813// UISettingsPatch defines model for UISettingsPatch.
2814type UISettingsPatch struct {
2815	DismissedNotices []ID  `json:"dismissed_notices,omitempty"`
2816	Thinking         *bool `json:"thinking,omitempty"`
2817	Tools            *bool `json:"tools,omitempty"`
2818}
2819
2820// UISettingsResource defines model for UISettingsResource.
2821type UISettingsResource struct {
2822	// ETag Strong opaque validator for the complete canonical representation.
2823	ETag ETag `json:"etag"`
2824
2825	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
2826	URL   ResourceURL `json:"url"`
2827	Value UISettings  `json:"value"`
2828}
2829
2830// UUIDv7 Client-generated lowercase UUIDv7. Retained decisions are checked before timestamp expiry.
2831type UUIDv7 = string
2832
2833// Usage defines model for Usage.
2834type Usage struct {
2835	CacheFade []struct {
2836		// At UTC RFC 3339.
2837		At           Timestamp `json:"at"`
2838		CachedTokens *Counter  `json:"cached_tokens" nullable:"true"`
2839	} `json:"cache_fade"`
2840	CacheTTLSeconds     *Counter   `json:"cache_ttl_seconds" nullable:"true"`
2841	CacheWriteTokens    *Counter   `json:"cache_write_tokens" nullable:"true"`
2842	CachedPromptTokens  *Counter   `json:"cached_prompt_tokens" nullable:"true"`
2843	CompletionTokens    *Counter   `json:"completion_tokens" nullable:"true"`
2844	ContextWindowTokens *Counter   `json:"context_window_tokens" nullable:"true"`
2845	ElapsedMs           *float64   `json:"elapsed_ms" nullable:"true"`
2846	Model               *ID        `json:"model" nullable:"true"`
2847	ObservedAt          *Timestamp `json:"observed_at" nullable:"true"`
2848	PromptTokens        *Counter   `json:"prompt_tokens" nullable:"true"`
2849	TokensPerSecond     *float64   `json:"tokens_per_second" nullable:"true"`
2850	TotalTokens         *Counter   `json:"total_tokens" nullable:"true"`
2851}
2852
2853// ValueSource For env, value is a daemon-host environment variable name.
2854type ValueSource struct {
2855	Source string `json:"source"`
2856	Value  string `json:"value"`
2857}
2858
2859// Visit defines model for Visit.
2860type Visit struct {
2861	Opens Counter `json:"opens"`
2862
2863	// SessionID Opaque identity. Never infer a resource type or route from its contents.
2864	SessionID ID `json:"session_id"`
2865
2866	// VisitID Opaque identity. Never infer a resource type or route from its contents.
2867	VisitID ID `json:"visit_id"`
2868}
2869
2870// Warnings defines model for Warnings.
2871type Warnings = []SafeReason
2872
2873// WebSearchProvider defines model for WebSearchProvider.
2874type WebSearchProvider struct {
2875	Enabled bool   `json:"enabled"`
2876	Label   string `json:"label"`
2877
2878	// Name Opaque identity. Never infer a resource type or route from its contents.
2879	Name     ID    `json:"name"`
2880	Position int64 `json:"position"`
2881}
2882
2883// WebSearchProviderChange defines model for WebSearchProviderChange.
2884type WebSearchProviderChange struct {
2885	Resource WebSearchProviderResource `json:"resource"`
2886}
2887
2888// WebSearchProviderChangeRequest defines model for WebSearchProviderChangeRequest.
2889type WebSearchProviderChangeRequest struct {
2890	Change string `json:"change"`
2891}
2892
2893// WebSearchProviderPage defines model for WebSearchProviderPage.
2894type WebSearchProviderPage struct {
2895	Items []WebSearchProviderResource `json:"items"`
2896	Next  any                         `json:"next" nullable:"true"`
2897	Page  PageDescriptor              `json:"page"`
2898}
2899
2900// WebSearchProviderResource defines model for WebSearchProviderResource.
2901type WebSearchProviderResource struct {
2902	// ETag Strong opaque validator for the complete canonical representation.
2903	ETag ETag `json:"etag"`
2904
2905	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
2906	URL   ResourceURL       `json:"url"`
2907	Value WebSearchProvider `json:"value"`
2908}
2909
2910// WorkChange Examples: {"notification":{"code":null,"detail":null,"state":"not_requested"},"resource":{"etag":"\"work-revision-1\"","url":"/extensions/work/items/work-1?workspace=%2Fworkspace%2Fproject","value":{"created_at":"2026-10-02T14:00:00Z","id":"work-1","notes":"","parent_id":null,"revision":"work-revision-1","run_id":null,"session_id":null,"status":"open","title":"Fix the parser","updated_at":"2026-10-02T14:00:00Z","workspace":"/workspace/project"}}}
2911type WorkChange struct {
2912	Notification Notification `json:"notification"`
2913	Resource     WorkResource `json:"resource"`
2914}
2915
2916// WorkCreate Examples: {"title":"Fix the parser"}
2917type WorkCreate struct {
2918	Notes *string `json:"notes,omitempty"`
2919
2920	// NotifySessionID Opaque identity. Never infer a resource type or route from its contents.
2921	NotifySessionID *ID    `json:"notify_session_id,omitempty"`
2922	ParentID        *ID    `json:"parent_id,omitempty" nullable:"true"`
2923	RunID           *ID    `json:"run_id,omitempty" nullable:"true"`
2924	SessionID       *ID    `json:"session_id,omitempty" nullable:"true"`
2925	Title           string `json:"title"`
2926}
2927
2928// WorkItem defines model for WorkItem.
2929type WorkItem struct {
2930	// CreatedAt UTC RFC 3339.
2931	CreatedAt Timestamp `json:"created_at"`
2932
2933	// ID Opaque identity. Never infer a resource type or route from its contents.
2934	ID       ID     `json:"id"`
2935	Notes    string `json:"notes"`
2936	ParentID *ID    `json:"parent_id" nullable:"true"`
2937
2938	// Revision Opaque identity. Never infer a resource type or route from its contents.
2939	Revision  ID     `json:"revision"`
2940	RunID     *ID    `json:"run_id" nullable:"true"`
2941	SessionID *ID    `json:"session_id" nullable:"true"`
2942	Status    string `json:"status"`
2943	Title     string `json:"title"`
2944
2945	// UpdatedAt UTC RFC 3339.
2946	UpdatedAt Timestamp `json:"updated_at"`
2947
2948	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2949	Workspace Workspace `json:"workspace"`
2950}
2951
2952// WorkPage defines model for WorkPage.
2953type WorkPage struct {
2954	Glance *Glance         `json:"glance,omitempty"`
2955	Items  []WorkResource  `json:"items"`
2956	Next   *PageToken      `json:"next" nullable:"true"`
2957	Page   *PageDescriptor `json:"page,omitempty"`
2958}
2959
2960// WorkPatch defines model for WorkPatch.
2961type WorkPatch struct {
2962	Notes *string `json:"notes,omitempty"`
2963
2964	// NotifySessionID Opaque identity. Never infer a resource type or route from its contents.
2965	NotifySessionID *ID     `json:"notify_session_id,omitempty"`
2966	RunID           *ID     `json:"run_id,omitempty" nullable:"true"`
2967	SessionID       *ID     `json:"session_id,omitempty" nullable:"true"`
2968	Status          *string `json:"status,omitempty"`
2969	Title           *string `json:"title,omitempty"`
2970}
2971
2972// WorkResource defines model for WorkResource.
2973type WorkResource struct {
2974	// ETag Strong opaque validator for the complete canonical representation.
2975	ETag ETag `json:"etag"`
2976
2977	// URL Daemon-relative URL, including any representation query. No foreign origin or fragment.
2978	URL   ResourceURL `json:"url"`
2979	Value WorkItem    `json:"value"`
2980}
2981
2982// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2983type Workspace = string
2984
2985// WorkspaceChange defines model for WorkspaceChange.
2986type WorkspaceChange struct {
2987	// Active Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2988	Active Workspace `json:"active"`
2989
2990	// Desired Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
2991	Desired Workspace `json:"desired"`
2992
2993	// Revision Opaque identity. Never infer a resource type or route from its contents.
2994	Revision ID     `json:"revision"`
2995	State    string `json:"state"`
2996}
2997
2998// WorkspaceDirectory defines model for WorkspaceDirectory.
2999type WorkspaceDirectory struct {
3000	// Directory Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
3001	Directory Workspace  `json:"directory"`
3002	Home      *Workspace `json:"home" nullable:"true"`
3003	Host      *Host      `json:"host" nullable:"true"`
3004	Items     []struct {
3005		Hidden bool `json:"hidden"`
3006
3007		// Location Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
3008		Location   Workspace  `json:"location"`
3009		ModifiedAt *Timestamp `json:"modified_at" nullable:"true"`
3010		Name       string     `json:"name"`
3011		Vcs        *string    `json:"vcs" nullable:"true"`
3012	} `json:"items"`
3013	Next    *PageToken        `json:"next" nullable:"true"`
3014	Parent  *Workspace        `json:"parent" nullable:"true"`
3015	Preview *WorkspacePreview `json:"preview,omitempty"`
3016}
3017
3018// WorkspaceMoveRequest Examples: {"family_revision":"family-1","workspace":"/workspace/other-project"}
3019type WorkspaceMoveRequest struct {
3020	// FamilyRevision Opaque identity. Never infer a resource type or route from its contents.
3021	FamilyRevision ID `json:"family_revision"`
3022
3023	// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally.
3024	Workspace Workspace `json:"workspace"`
3025}
3026
3027// WorkspacePreview defines model for WorkspacePreview.
3028type WorkspacePreview struct {
3029	Languages []struct {
3030		Bytes Counter `json:"bytes"`
3031		Color *string `json:"color" nullable:"true"`
3032		Name  string  `json:"name"`
3033		Share float64 `json:"share"`
3034	} `json:"languages"`
3035	More                 Counter         `json:"more"`
3036	Repository           json.RawMessage `json:"repository" nullable:"true"`
3037	RepositoryDiagnostic *SafeReason     `json:"repository_diagnostic" nullable:"true"`
3038	Tree                 []TreeEntry     `json:"tree"`
3039}
3040
3041// WorkspaceRead defines model for WorkspaceRead.
3042type WorkspaceRead = json.RawMessage
3043
3044// IfMatch Strong opaque validator for the complete canonical representation.
3045type IfMatch = ETag
3046
3047// IfNoneMatch defines model for IfNoneMatch.
3048type IfNoneMatch = string
3049
3050// Limit defines model for Limit.
3051type Limit = int64
3052
3053// Next Opaque continuation, tied to the query and representation; never authority.
3054type Next = PageToken
3055
3056// Problem400 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3057type Problem400 = Problem
3058
3059// Problem401 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3060type Problem401 = Problem
3061
3062// Problem403 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3063type Problem403 = Problem
3064
3065// Problem404 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3066type Problem404 = Problem
3067
3068// Problem405 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3069type Problem405 = Problem
3070
3071// Problem406 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3072type Problem406 = Problem
3073
3074// Problem409 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3075type Problem409 = Problem
3076
3077// Problem410 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3078type Problem410 = Problem
3079
3080// Problem412 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3081type Problem412 = Problem
3082
3083// Problem413 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3084type Problem413 = Problem
3085
3086// Problem415 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3087type Problem415 = Problem
3088
3089// Problem428 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3090type Problem428 = Problem
3091
3092// Problem429 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3093type Problem429 = Problem
3094
3095// Problem503 Examples: {"code":"queue_full","decision":{"input":{"acceptance_order":null,"accepted_at":null,"admission":"rejected","blocking_reason":null,"client_id":"draft-1","delivery":null,"http_status":429,"id":"01a0fcea-2b00-7000-8000-000000000002","kind":"message","problem":{"code":"queue_full","detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"},"session_id":"01a0fcea-2b00-7000-8000-000000000001","transcript_position":null,"turn":null},"kind":"input"},"detail":"This session already has 32 waiting inputs.","status":429,"title":"Queue full","type":"about:blank"}
3096type Problem503 = Problem
3097
3098// AnswerLoginParams defines parameters for AnswerLogin.
3099type AnswerLoginParams struct {
3100	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3101	IfMatch IfMatch `json:"If-Match"`
3102}
3103
3104// UnlinkWorkspaceParams defines parameters for UnlinkWorkspace.
3105type UnlinkWorkspaceParams struct {
3106	Workspace Workspace `form:"workspace" json:"workspace"`
3107	Member    Workspace `form:"member" json:"member"`
3108	View      string    `form:"view" json:"view"`
3109
3110	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3111	IfMatch IfMatch `json:"If-Match"`
3112}
3113
3114// GetLinkGroupParams defines parameters for GetLinkGroup.
3115type GetLinkGroupParams struct {
3116	Workspace Workspace `form:"workspace" json:"workspace"`
3117	View      *string   `form:"view,omitempty" json:"view,omitempty"`
3118	Limit     *Limit    `form:"limit,omitempty" json:"limit,omitempty"`
3119	Next      *Next     `form:"next,omitempty" json:"next,omitempty"`
3120}
3121
3122// MergeLinkGroupsParams defines parameters for MergeLinkGroups.
3123type MergeLinkGroupsParams struct {
3124	Workspace Workspace `form:"workspace" json:"workspace"`
3125	View      string    `form:"view" json:"view"`
3126
3127	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3128	IfMatch IfMatch `json:"If-Match"`
3129}
3130
3131// ListPaperclipsParams defines parameters for ListPaperclips.
3132type ListPaperclipsParams struct {
3133	Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
3134	Next  *Next  `form:"next,omitempty" json:"next,omitempty"`
3135}
3136
3137// DeletePaperclipsParams defines parameters for DeletePaperclips.
3138type DeletePaperclipsParams struct {
3139	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3140	IfMatch IfMatch `json:"If-Match"`
3141}
3142
3143// PatchPaperclipsParams defines parameters for PatchPaperclips.
3144type PatchPaperclipsParams struct {
3145	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3146	IfMatch IfMatch `json:"If-Match"`
3147}
3148
3149// StopJobJSONBody defines parameters for StopJob.
3150type StopJobJSONBody = map[string]interface{}
3151
3152// ListScheduleParams defines parameters for ListSchedule.
3153type ListScheduleParams struct {
3154	SessionID ID     `form:"session_id" json:"session_id"`
3155	Limit     *Limit `form:"limit,omitempty" json:"limit,omitempty"`
3156	Next      *Next  `form:"next,omitempty" json:"next,omitempty"`
3157}
3158
3159// DeleteScheduleParams defines parameters for DeleteSchedule.
3160type DeleteScheduleParams struct {
3161	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3162	IfMatch IfMatch `json:"If-Match"`
3163}
3164
3165// PatchScheduleParams defines parameters for PatchSchedule.
3166type PatchScheduleParams struct {
3167	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3168	IfMatch IfMatch `json:"If-Match"`
3169}
3170
3171// ListHooksParams defines parameters for ListHooks.
3172type ListHooksParams struct {
3173	SessionID *ID    `form:"session_id,omitempty" json:"session_id,omitempty"`
3174	Limit     *Limit `form:"limit,omitempty" json:"limit,omitempty"`
3175	Next      *Next  `form:"next,omitempty" json:"next,omitempty"`
3176}
3177
3178// DeleteHookParams defines parameters for DeleteHook.
3179type DeleteHookParams struct {
3180	View string `form:"view" json:"view"`
3181
3182	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3183	IfMatch IfMatch `json:"If-Match"`
3184}
3185
3186// GetHookParams defines parameters for GetHook.
3187type GetHookParams struct {
3188	View *string `form:"view,omitempty" json:"view,omitempty"`
3189}
3190
3191// PatchHookParams defines parameters for PatchHook.
3192type PatchHookParams struct {
3193	View string `form:"view" json:"view"`
3194
3195	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3196	IfMatch IfMatch `json:"If-Match"`
3197}
3198
3199// ListHookDeliveriesParams defines parameters for ListHookDeliveries.
3200type ListHookDeliveriesParams struct {
3201	State *string `form:"state,omitempty" json:"state,omitempty"`
3202	Limit *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
3203	Next  *Next   `form:"next,omitempty" json:"next,omitempty"`
3204}
3205
3206// DeliverWebhookParams defines parameters for DeliverWebhook.
3207type DeliverWebhookParams struct {
3208	// XAlbedoEventID Optional sender identity scoped to hook and exact body hash.
3209	XAlbedoEventID *string `json:"X-Albedo-Event-Id,omitempty"`
3210}
3211
3212// RotateHookSecretParams defines parameters for RotateHookSecret.
3213type RotateHookSecretParams struct {
3214	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3215	IfMatch IfMatch `json:"If-Match"`
3216}
3217
3218// PatchHookPermissionParams defines parameters for PatchHookPermission.
3219type PatchHookPermissionParams struct {
3220	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3221	IfMatch IfMatch `json:"If-Match"`
3222}
3223
3224// ListWorkParams defines parameters for ListWork.
3225type ListWorkParams struct {
3226	Workspace Workspace `form:"workspace" json:"workspace"`
3227	Limit     *Limit    `form:"limit,omitempty" json:"limit,omitempty"`
3228	Next      *Next     `form:"next,omitempty" json:"next,omitempty"`
3229}
3230
3231// CreateWorkParams defines parameters for CreateWork.
3232type CreateWorkParams struct {
3233	Workspace Workspace `form:"workspace" json:"workspace"`
3234}
3235
3236// DeleteWorkParams defines parameters for DeleteWork.
3237type DeleteWorkParams struct {
3238	Workspace Workspace `form:"workspace" json:"workspace"`
3239
3240	// NotifySessionID Queue the deletion note for this session after the durable edit.
3241	NotifySessionID *ID `form:"notify_session_id,omitempty" json:"notify_session_id,omitempty"`
3242
3243	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3244	IfMatch IfMatch `json:"If-Match"`
3245}
3246
3247// GetWorkParams defines parameters for GetWork.
3248type GetWorkParams struct {
3249	Workspace Workspace `form:"workspace" json:"workspace"`
3250}
3251
3252// PatchWorkParams defines parameters for PatchWork.
3253type PatchWorkParams struct {
3254	Workspace Workspace `form:"workspace" json:"workspace"`
3255
3256	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3257	IfMatch IfMatch `json:"If-Match"`
3258}
3259
3260// ListHostsParams defines parameters for ListHosts.
3261type ListHostsParams struct {
3262	Target *ID    `form:"target,omitempty" json:"target,omitempty"`
3263	Limit  *Limit `form:"limit,omitempty" json:"limit,omitempty"`
3264	Next   *Next  `form:"next,omitempty" json:"next,omitempty"`
3265}
3266
3267// ListModelsParams defines parameters for ListModels.
3268type ListModelsParams struct {
3269	View *string `form:"view,omitempty" json:"view,omitempty"`
3270
3271	// Extension Cache-policy matching only; defaults to the empty selector.
3272	Extension *string `form:"extension,omitempty" json:"extension,omitempty"`
3273
3274	// Host Cache-policy matching only; defaults to the empty selector.
3275	Host            *string `form:"host,omitempty" json:"host,omitempty"`
3276	Model           *ID     `form:"model,omitempty" json:"model,omitempty"`
3277	ProviderProfile *ID     `form:"provider_profile,omitempty" json:"provider_profile,omitempty"`
3278	Provider        *ID     `form:"provider,omitempty" json:"provider,omitempty"`
3279	Endpoint        *string `form:"endpoint,omitempty" json:"endpoint,omitempty"`
3280	Limit           *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
3281	Next            *Next   `form:"next,omitempty" json:"next,omitempty"`
3282}
3283
3284// GetServerParams defines parameters for GetServer.
3285type GetServerParams struct {
3286	Include *string `form:"include,omitempty" json:"include,omitempty"`
3287	Limit   *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
3288	Next    *Next   `form:"next,omitempty" json:"next,omitempty"`
3289
3290	// QuotaProvider Exact provider ID to filter quota history. Requires include=quota_history, quota_account, and quota_limit.
3291	QuotaProvider *string `form:"quota_provider,omitempty" json:"quota_provider,omitempty"`
3292
3293	// QuotaAccount Exact account label to filter quota history. Requires include=quota_history, quota_provider, and quota_limit.
3294	QuotaAccount *string `form:"quota_account,omitempty" json:"quota_account,omitempty"`
3295
3296	// QuotaLimit Exact limit ID to filter quota history. Requires include=quota_history, quota_provider, and quota_account.
3297	QuotaLimit *string `form:"quota_limit,omitempty" json:"quota_limit,omitempty"`
3298
3299	// QuotaSince Filter quota history to observations at or after this RFC 3339 UTC timestamp. Requires include=quota_history and the limit filter trio.
3300	QuotaSince *Timestamp `form:"quota_since,omitempty" json:"quota_since,omitempty"`
3301}
3302
3303// ListSessionsParams defines parameters for ListSessions.
3304type ListSessionsParams struct {
3305	Scope       *string    `form:"scope,omitempty" json:"scope,omitempty"`
3306	ParentID    *ID        `form:"parent_id,omitempty" json:"parent_id,omitempty"`
3307	FamilyID    *ID        `form:"family_id,omitempty" json:"family_id,omitempty"`
3308	Workspace   *Workspace `form:"workspace,omitempty" json:"workspace,omitempty"`
3309	Search      *string    `form:"search,omitempty" json:"search,omitempty"`
3310	Archived    *bool      `form:"archived,omitempty" json:"archived,omitempty"`
3311	NeedsReload *bool      `form:"needs_reload,omitempty" json:"needs_reload,omitempty"`
3312	Sort        *string    `form:"sort,omitempty" json:"sort,omitempty"`
3313	Limit       *Limit     `form:"limit,omitempty" json:"limit,omitempty"`
3314	Next        *Next      `form:"next,omitempty" json:"next,omitempty"`
3315}
3316
3317// DeleteSessionParams defines parameters for DeleteSession.
3318type DeleteSessionParams struct {
3319	View           string  `form:"view" json:"view"`
3320	Scope          *string `form:"scope,omitempty" json:"scope,omitempty"`
3321	FamilyRevision *ID     `form:"family_revision,omitempty" json:"family_revision,omitempty"`
3322
3323	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3324	IfMatch IfMatch `json:"If-Match"`
3325}
3326
3327// GetSessionParams defines parameters for GetSession.
3328type GetSessionParams struct {
3329	View            *string     `form:"view,omitempty" json:"view,omitempty"`
3330	Tail            *int64      `form:"tail,omitempty" json:"tail,omitempty"`
3331	AfterGeneration *Generation `form:"after_generation,omitempty" json:"after_generation,omitempty"`
3332	AfterSeq        *Counter    `form:"after_seq,omitempty" json:"after_seq,omitempty"`
3333}
3334
3335// PatchSessionParams defines parameters for PatchSession.
3336type PatchSessionParams struct {
3337	View string `form:"view" json:"view"`
3338
3339	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3340	IfMatch IfMatch `json:"If-Match"`
3341}
3342
3343// CreateSessionParams defines parameters for CreateSession.
3344type CreateSessionParams struct {
3345	// IfNoneMatch Conditional creation only.
3346	IfNoneMatch IfNoneMatch `json:"If-None-Match"`
3347}
3348
3349// GetActiveOutputContentParams defines parameters for GetActiveOutputContent.
3350type GetActiveOutputContentParams struct {
3351	Snapshot PageToken  `form:"snapshot" json:"snapshot"`
3352	Next     *PageToken `form:"next,omitempty" json:"next,omitempty"`
3353}
3354
3355// GetCatalogParams defines parameters for GetCatalog.
3356type GetCatalogParams struct {
3357	Kind  *string `form:"kind,omitempty" json:"kind,omitempty"`
3358	Limit *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
3359	Next  *Next   `form:"next,omitempty" json:"next,omitempty"`
3360}
3361
3362// GetContextParams defines parameters for GetContext.
3363type GetContextParams struct {
3364	View       *string  `form:"view,omitempty" json:"view,omitempty"`
3365	SnapshotID *ID      `form:"snapshot_id,omitempty" json:"snapshot_id,omitempty"`
3366	SectionID  *ID      `form:"section_id,omitempty" json:"section_id,omitempty"`
3367	Page       *Counter `form:"page,omitempty" json:"page,omitempty"`
3368	After      *Counter `form:"after,omitempty" json:"after,omitempty"`
3369	Limit      *Limit   `form:"limit,omitempty" json:"limit,omitempty"`
3370	Next       *Next    `form:"next,omitempty" json:"next,omitempty"`
3371}
3372
3373// GetHistoryParams defines parameters for GetHistory.
3374type GetHistoryParams struct {
3375	View   *string  `form:"view,omitempty" json:"view,omitempty"`
3376	Before *Counter `form:"before,omitempty" json:"before,omitempty"`
3377	After  *Counter `form:"after,omitempty" json:"after,omitempty"`
3378	Next   *Next    `form:"next,omitempty" json:"next,omitempty"`
3379	Limit  *int64   `form:"limit,omitempty" json:"limit,omitempty"`
3380}
3381
3382// GetHistoryContentParams defines parameters for GetHistoryContent.
3383type GetHistoryContentParams struct {
3384	Next *Next `form:"next,omitempty" json:"next,omitempty"`
3385}
3386
3387// GetSettingsParams defines parameters for GetSettings.
3388type GetSettingsParams struct {
3389	Group *string `form:"group,omitempty" json:"group,omitempty"`
3390}
3391
3392// PatchSettingsParams defines parameters for PatchSettings.
3393type PatchSettingsParams struct {
3394	Group string `form:"group" json:"group"`
3395
3396	// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted.
3397	IfMatch IfMatch `json:"If-Match"`
3398}
3399
3400// GetStorageParams defines parameters for GetStorage.
3401type GetStorageParams struct {
3402	SessionsNext *PageToken `form:"sessions_next,omitempty" json:"sessions_next,omitempty"`
3403	FilesNext    *PageToken `form:"files_next,omitempty" json:"files_next,omitempty"`
3404	Limit        *Limit     `form:"limit,omitempty" json:"limit,omitempty"`
3405}
3406
3407// GetWorkspacesParams defines parameters for GetWorkspaces.
3408type GetWorkspacesParams struct {
3409	Location *Workspace `form:"location,omitempty" json:"location,omitempty"`
3410	Include  *string    `form:"include,omitempty" json:"include,omitempty"`
3411	Limit    *Limit     `form:"limit,omitempty" json:"limit,omitempty"`
3412	Next     *Next      `form:"next,omitempty" json:"next,omitempty"`
3413}
3414
3415// AnswerLoginApplicationMergePatchPlusJSONRequestBody defines body for AnswerLogin for application/merge-patch+json ContentType.
3416type AnswerLoginApplicationMergePatchPlusJSONRequestBody = LoginPatch
3417
3418// CreateLoginJSONRequestBody defines body for CreateLogin for application/json ContentType.
3419type CreateLoginJSONRequestBody = LoginRequest
3420
3421// MergeLinkGroupsJSONRequestBody defines body for MergeLinkGroups for application/json ContentType.
3422type MergeLinkGroupsJSONRequestBody = LinkMerge
3423
3424// CreatePaperclipsJSONRequestBody defines body for CreatePaperclips for application/json ContentType.
3425type CreatePaperclipsJSONRequestBody = PaperclipCreate
3426
3427// PatchPaperclipsApplicationMergePatchPlusJSONRequestBody defines body for PatchPaperclips for application/merge-patch+json ContentType.
3428type PatchPaperclipsApplicationMergePatchPlusJSONRequestBody = PaperclipPatch
3429
3430// CreateProxyCompletionJSONRequestBody defines body for CreateProxyCompletion for application/json ContentType.
3431type CreateProxyCompletionJSONRequestBody = ProxyCompletionRequest
3432
3433// StopJobJSONRequestBody defines body for StopJob for application/json ContentType.
3434type StopJobJSONRequestBody = StopJobJSONBody
3435
3436// CreateScheduleJSONRequestBody defines body for CreateSchedule for application/json ContentType.
3437type CreateScheduleJSONRequestBody = ScheduleCreate
3438
3439// PatchScheduleApplicationMergePatchPlusJSONRequestBody defines body for PatchSchedule for application/merge-patch+json ContentType.
3440type PatchScheduleApplicationMergePatchPlusJSONRequestBody = SchedulePatch
3441
3442// ChangeWebSearchProviderJSONRequestBody defines body for ChangeWebSearchProvider for application/json ContentType.
3443type ChangeWebSearchProviderJSONRequestBody = WebSearchProviderChangeRequest
3444
3445// CreateHookJSONRequestBody defines body for CreateHook for application/json ContentType.
3446type CreateHookJSONRequestBody = HookCreate
3447
3448// PatchHookApplicationMergePatchPlusJSONRequestBody defines body for PatchHook for application/merge-patch+json ContentType.
3449type PatchHookApplicationMergePatchPlusJSONRequestBody = HookPatch
3450
3451// RotateHookSecretJSONRequestBody defines body for RotateHookSecret for application/json ContentType.
3452type RotateHookSecretJSONRequestBody = HookSecretRequest
3453
3454// PatchHookPermissionApplicationMergePatchPlusJSONRequestBody defines body for PatchHookPermission for application/merge-patch+json ContentType.
3455type PatchHookPermissionApplicationMergePatchPlusJSONRequestBody = HookPermissionPatch
3456
3457// CreateWorkJSONRequestBody defines body for CreateWork for application/json ContentType.
3458type CreateWorkJSONRequestBody = WorkCreate
3459
3460// PatchWorkApplicationMergePatchPlusJSONRequestBody defines body for PatchWork for application/merge-patch+json ContentType.
3461type PatchWorkApplicationMergePatchPlusJSONRequestBody = WorkPatch
3462
3463// ProbeHostJSONRequestBody defines body for ProbeHost for application/json ContentType.
3464type ProbeHostJSONRequestBody = EmptyRequest
3465
3466// ShutdownServerJSONRequestBody defines body for ShutdownServer for application/json ContentType.
3467type ShutdownServerJSONRequestBody = ShutdownRequest
3468
3469// PatchSessionApplicationMergePatchPlusJSONRequestBody defines body for PatchSession for application/merge-patch+json ContentType.
3470type PatchSessionApplicationMergePatchPlusJSONRequestBody = SessionChangeRequest
3471
3472// CreateSessionJSONRequestBody defines body for CreateSession for application/json ContentType.
3473type CreateSessionJSONRequestBody = SessionCreationRequest
3474
3475// CompactSessionJSONRequestBody defines body for CompactSession for application/json ContentType.
3476type CompactSessionJSONRequestBody = CompactionRequest
3477
3478// PutInputJSONRequestBody defines body for PutInput for application/json ContentType.
3479type PutInputJSONRequestBody = InputRequest
3480
3481// CancelInputJSONRequestBody defines body for CancelInput for application/json ContentType.
3482type CancelInputJSONRequestBody = EmptyRequest
3483
3484// InterruptSessionJSONRequestBody defines body for InterruptSession for application/json ContentType.
3485type InterruptSessionJSONRequestBody = InterruptRequest
3486
3487// UpgradeKernelJSONRequestBody defines body for UpgradeKernel for application/json ContentType.
3488type UpgradeKernelJSONRequestBody = EmptyRequest
3489
3490// ReloadSessionJSONRequestBody defines body for ReloadSession for application/json ContentType.
3491type ReloadSessionJSONRequestBody = ReloadRequest
3492
3493// RecordVisitJSONRequestBody defines body for RecordVisit for application/json ContentType.
3494type RecordVisitJSONRequestBody = EmptyRequest
3495
3496// PatchSettingsApplicationMergePatchPlusJSONRequestBody defines body for PatchSettings for application/merge-patch+json ContentType.
3497type PatchSettingsApplicationMergePatchPlusJSONRequestBody = SettingsPatch
3498
3499// RequestEditorFn is the function signature for the RequestEditor callback function
3500type RequestEditorFn func(ctx context.Context, req *http.Request) error
3501
3502// Doer performs HTTP requests.
3503//
3504// The standard http.Client implements this interface.
3505type HttpRequestDoer interface {
3506	Do(req *http.Request) (*http.Response, error)
3507}
3508
3509// Client which conforms to the OpenAPI3 specification for this service.
3510type Client struct {
3511	// The endpoint of the server conforming to this interface, with scheme,
3512	// https://api.deepmap.com for example. This can contain a path relative
3513	// to the server, such as https://api.deepmap.com/dev-test, and all the
3514	// paths in the swagger spec will be appended to the server.
3515	Server string
3516
3517	// Doer for performing requests, typically a *http.Client with any
3518	// customized settings, such as certificate chains.
3519	Client HttpRequestDoer
3520
3521	// A list of callbacks for modifying requests which are generated before sending over
3522	// the network.
3523	RequestEditors []RequestEditorFn
3524}
3525
3526// ClientOption allows setting custom parameters during construction
3527type ClientOption func(*Client) error
3528
3529// Creates a new Client, with reasonable defaults
3530func NewClient(server string, opts ...ClientOption) (*Client, error) {
3531	// create a client with sane default values
3532	client := Client{
3533		Server: server,
3534	}
3535	// mutate client and add all optional params
3536	for _, o := range opts {
3537		if err := o(&client); err != nil {
3538			return nil, err
3539		}
3540	}
3541	// ensure the server URL always has a trailing slash
3542	if !strings.HasSuffix(client.Server, "/") {
3543		client.Server += "/"
3544	}
3545	// create httpClient, if not already present
3546	if client.Client == nil {
3547		client.Client = &http.Client{}
3548	}
3549	return &client, nil
3550}
3551
3552// WithHTTPClient allows overriding the default Doer, which is
3553// automatically created using http.Client. This is useful for tests.
3554func WithHTTPClient(doer HttpRequestDoer) ClientOption {
3555	return func(c *Client) error {
3556		c.Client = doer
3557		return nil
3558	}
3559}
3560
3561// WithRequestEditorFn allows setting up a callback function, which will be
3562// called right before sending the request. This can be used to mutate the request.
3563func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
3564	return func(c *Client) error {
3565		c.RequestEditors = append(c.RequestEditors, fn)
3566		return nil
3567	}
3568}
3569
3570// The interface specification for the client above.
3571type ClientInterface interface {
3572
3573	// GetAuth Read login choices and redacted accounts
3574	//
3575	// Requires capability `provider_auth: 1`.
3576	//
3577	// Corresponds with GET /auth (the `GetAuth` operationId).
3578	GetAuth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
3579
3580	// DeleteAccount Remove an unreferenced provider account
3581	//
3582	// Reject if a saved provider profile references it. Does not interrupt captured credentials in an active request. Account IDs are never reused. Requires capability `provider_auth: 1`.
3583	//
3584	// Corresponds with DELETE /auth/accounts/{account_id} (the `DeleteAccount` operationId).
3585	DeleteAccount(ctx context.Context, accountID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
3586
3587	// CancelLogin Cancel a login idempotently
3588	//
3589	// Cancellation stops only this flow; completed accounts remain saved. No If-Match is needed for identity-scoped cancellation. Requires capability `provider_auth: 1`.
3590	//
3591	// Corresponds with DELETE /auth/logins/{login_id} (the `CancelLogin` operationId).
3592	CancelLogin(ctx context.Context, loginID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
3593
3594	// GetLogin Inspect a provider login
3595	//
3596	// No credential or submitted form echo. Terminal records remain fifteen minutes; unfinished flows expire at their provider deadline. Requires capability `provider_auth: 1`.
3597	//
3598	// Corresponds with GET /auth/logins/{login_id} (the `GetLogin` operationId).
3599	GetLogin(ctx context.Context, loginID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
3600
3601	// AnswerLoginWithBody Supply manual callback or code
3602	//
3603	// Requires capability `provider_auth: 1`.
3604	//
3605	// Takes any type of body and a specified content type.
3606	//
3607	// Corresponds with PATCH /auth/logins/{login_id} (the `AnswerLogin` operationId).
3608	AnswerLoginWithBody(ctx context.Context, loginID ID, params *AnswerLoginParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3609
3610	// AnswerLoginWithApplicationMergePatchPlusJSONBody Supply manual callback or code
3611	//
3612	// Requires capability `provider_auth: 1`.
3613	//
3614	// Takes a body of the `application/merge-patch+json` content type.
3615	//
3616	// Corresponds with PATCH /auth/logins/{login_id} (the `AnswerLogin` operationId).
3617	AnswerLoginWithApplicationMergePatchPlusJSONBody(ctx context.Context, loginID ID, params *AnswerLoginParams, body AnswerLoginApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3618
3619	// CreateLoginWithBody Start or recover an identified provider login
3620	//
3621	// UUIDv7 identity. Compare immutable private intent inside the daemon. Duplicate returns existing flow, never another browser/exchange. Restart turns unfinished flows into retained daemon_restarted failures; a new flow needs a new ID. Requires capability `provider_auth: 1`.
3622	//
3623	// Takes any type of body and a specified content type.
3624	//
3625	// Corresponds with PUT /auth/logins/{login_id} (the `CreateLogin` operationId).
3626	CreateLoginWithBody(ctx context.Context, loginID UUIDv7, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3627
3628	// CreateLogin Start or recover an identified provider login
3629	//
3630	// UUIDv7 identity. Compare immutable private intent inside the daemon. Duplicate returns existing flow, never another browser/exchange. Restart turns unfinished flows into retained daemon_restarted failures; a new flow needs a new ID. Requires capability `provider_auth: 1`.
3631	//
3632	// Takes a body of the `application/json` content type.
3633	//
3634	// Corresponds with PUT /auth/logins/{login_id} (the `CreateLogin` operationId).
3635	CreateLogin(ctx context.Context, loginID UUIDv7, body CreateLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3636
3637	// UnlinkWorkspace Remove a member from the observed group
3638	//
3639	// Check membership at commit. Creates a singleton group; deletes no work or memory. Human-only.
3640	//
3641	// Corresponds with DELETE /extensions/links/groups (the `UnlinkWorkspace` operationId).
3642	UnlinkWorkspace(ctx context.Context, params *UnlinkWorkspaceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3643
3644	// GetLinkGroup Read linked membership and presence
3645	//
3646	// Only configuration view has the canonical membership ETag. Presence does not change that validator.
3647	//
3648	// Corresponds with GET /extensions/links/groups (the `GetLinkGroup` operationId).
3649	GetLinkGroup(ctx context.Context, params *GetLinkGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3650
3651	// MergeLinkGroupsWithBody Merge two observed workspace groups
3652	//
3653	// Check both observed validators in one owner commit. Human-only; domain commit and notifications are separate. No automatic lost-response retry.
3654	//
3655	// Takes any type of body and a specified content type.
3656	//
3657	// Corresponds with POST /extensions/links/groups (the `MergeLinkGroups` operationId).
3658	MergeLinkGroupsWithBody(ctx context.Context, params *MergeLinkGroupsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3659
3660	// MergeLinkGroups Merge two observed workspace groups
3661	//
3662	// Check both observed validators in one owner commit. Human-only; domain commit and notifications are separate. No automatic lost-response retry.
3663	//
3664	// Takes a body of the `application/json` content type.
3665	//
3666	// Corresponds with POST /extensions/links/groups (the `MergeLinkGroups` operationId).
3667	MergeLinkGroups(ctx context.Context, params *MergeLinkGroupsParams, body MergeLinkGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3668
3669	// ListPaperclips List paperclips resources
3670	//
3671	// Requires enabled extension paperclips. Lists may include bounded page descriptors and glances.
3672	//
3673	// Corresponds with GET /extensions/paperclips/items (the `ListPaperclips` operationId).
3674	ListPaperclips(ctx context.Context, params *ListPaperclipsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3675
3676	// CreatePaperclipsWithBody Create a paperclips resource
3677	//
3678	// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
3679	//
3680	// Takes any type of body and a specified content type.
3681	//
3682	// Corresponds with POST /extensions/paperclips/items (the `CreatePaperclips` operationId).
3683	CreatePaperclipsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3684
3685	// CreatePaperclips Create a paperclips resource
3686	//
3687	// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
3688	//
3689	// Takes a body of the `application/json` content type.
3690	//
3691	// Corresponds with POST /extensions/paperclips/items (the `CreatePaperclips` operationId).
3692	CreatePaperclips(ctx context.Context, body CreatePaperclipsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3693
3694	// DeletePaperclips Delete a paperclips resource
3695	//
3696	// Committed deletion remains successful if notification fails. Work items with children cannot be deleted.
3697	//
3698	// Corresponds with DELETE /extensions/paperclips/items/{item_id} (the `DeletePaperclips` operationId).
3699	DeletePaperclips(ctx context.Context, itemID ID, params *DeletePaperclipsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3700
3701	// GetPaperclips Read one paperclips resource
3702	//
3703	// Corresponds with GET /extensions/paperclips/items/{item_id} (the `GetPaperclips` operationId).
3704	GetPaperclips(ctx context.Context, itemID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
3705
3706	// PatchPaperclipsWithBody Edit a paperclips resource
3707	//
3708	// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
3709	//
3710	// Takes any type of body and a specified content type.
3711	//
3712	// Corresponds with PATCH /extensions/paperclips/items/{item_id} (the `PatchPaperclips` operationId).
3713	PatchPaperclipsWithBody(ctx context.Context, itemID ID, params *PatchPaperclipsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3714
3715	// PatchPaperclipsWithApplicationMergePatchPlusJSONBody Edit a paperclips resource
3716	//
3717	// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
3718	//
3719	// Takes a body of the `application/merge-patch+json` content type.
3720	//
3721	// Corresponds with PATCH /extensions/paperclips/items/{item_id} (the `PatchPaperclips` operationId).
3722	PatchPaperclipsWithApplicationMergePatchPlusJSONBody(ctx context.Context, itemID ID, params *PatchPaperclipsParams, body PatchPaperclipsApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3723
3724	// CreateProxyCompletionWithBody Run a stateless OpenAI chat completion
3725	//
3726	// Caller supplies full history. Tool IDs carry opaque provider state and must be echoed exactly. Bearer required unless anonymous loopback policy explicitly enabled. Providers apply only representable generation options; proxy transport documentation defines these differences. No automatic replay after request admission.
3727	//
3728	// Takes any type of body and a specified content type.
3729	//
3730	// Corresponds with POST /extensions/proxy/v1/chat/completions (the `CreateProxyCompletion` operationId).
3731	CreateProxyCompletionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3732
3733	// CreateProxyCompletion Run a stateless OpenAI chat completion
3734	//
3735	// Caller supplies full history. Tool IDs carry opaque provider state and must be echoed exactly. Bearer required unless anonymous loopback policy explicitly enabled. Providers apply only representable generation options; proxy transport documentation defines these differences. No automatic replay after request admission.
3736	//
3737	// Takes a body of the `application/json` content type.
3738	//
3739	// Corresponds with POST /extensions/proxy/v1/chat/completions (the `CreateProxyCompletion` operationId).
3740	CreateProxyCompletion(ctx context.Context, body CreateProxyCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3741
3742	// ListProxyModels List saved-profile OpenAI model IDs
3743	//
3744	// External OpenAI envelope. Bearer required unless operator explicitly configured anonymous loopback access.
3745	//
3746	// Corresponds with GET /extensions/proxy/v1/models (the `ListProxyModels` operationId).
3747	ListProxyModels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
3748
3749	// ListJobs Read bounded live job observations and the jobs page
3750	//
3751	// Corresponds with GET /extensions/run/sessions/{session_id}/jobs (the `ListJobs` operationId).
3752	ListJobs(ctx context.Context, sessionID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
3753
3754	// StopJobWithBody Explicitly stop one observed process group
3755	//
3756	// 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.
3757	//
3758	// Takes any type of body and a specified content type.
3759	//
3760	// Corresponds with POST /extensions/run/sessions/{session_id}/jobs/{job_id}/stop (the `StopJob` operationId).
3761	StopJobWithBody(ctx context.Context, sessionID ID, jobID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3762
3763	// StopJob Explicitly stop one observed process group
3764	//
3765	// 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.
3766	//
3767	// Takes a body of the `application/json` content type.
3768	//
3769	// Corresponds with POST /extensions/run/sessions/{session_id}/jobs/{job_id}/stop (the `StopJob` operationId).
3770	StopJob(ctx context.Context, sessionID ID, jobID ID, body StopJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3771
3772	// ListSchedule List schedule resources
3773	//
3774	// Requires enabled extension schedule. Lists may include bounded page descriptors and glances.
3775	//
3776	// Corresponds with GET /extensions/schedule/jobs (the `ListSchedule` operationId).
3777	ListSchedule(ctx context.Context, params *ListScheduleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3778
3779	// CreateScheduleWithBody Create a schedule resource
3780	//
3781	// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
3782	//
3783	// Takes any type of body and a specified content type.
3784	//
3785	// Corresponds with POST /extensions/schedule/jobs (the `CreateSchedule` operationId).
3786	CreateScheduleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3787
3788	// CreateSchedule Create a schedule resource
3789	//
3790	// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
3791	//
3792	// Takes a body of the `application/json` content type.
3793	//
3794	// Corresponds with POST /extensions/schedule/jobs (the `CreateSchedule` operationId).
3795	CreateSchedule(ctx context.Context, body CreateScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3796
3797	// DeleteSchedule Delete a schedule resource
3798	//
3799	// Committed deletion remains successful if notification fails. Work items with children cannot be deleted.
3800	//
3801	// Corresponds with DELETE /extensions/schedule/jobs/{job_id} (the `DeleteSchedule` operationId).
3802	DeleteSchedule(ctx context.Context, jobID ID, params *DeleteScheduleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3803
3804	// GetSchedule Read one schedule resource
3805	//
3806	// Corresponds with GET /extensions/schedule/jobs/{job_id} (the `GetSchedule` operationId).
3807	GetSchedule(ctx context.Context, jobID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
3808
3809	// PatchScheduleWithBody Edit a schedule resource
3810	//
3811	// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
3812	//
3813	// Takes any type of body and a specified content type.
3814	//
3815	// Corresponds with PATCH /extensions/schedule/jobs/{job_id} (the `PatchSchedule` operationId).
3816	PatchScheduleWithBody(ctx context.Context, jobID ID, params *PatchScheduleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3817
3818	// PatchScheduleWithApplicationMergePatchPlusJSONBody Edit a schedule resource
3819	//
3820	// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
3821	//
3822	// Takes a body of the `application/merge-patch+json` content type.
3823	//
3824	// Corresponds with PATCH /extensions/schedule/jobs/{job_id} (the `PatchSchedule` operationId).
3825	PatchScheduleWithApplicationMergePatchPlusJSONBody(ctx context.Context, jobID ID, params *PatchScheduleParams, body PatchScheduleApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3826
3827	// ListWebSearchProviders List web search providers in the order a search tries them
3828	//
3829	// Requires enabled extension web-search. The global order lives in extensions.json.
3830	//
3831	// Corresponds with GET /extensions/web-search/providers (the `ListWebSearchProviders` operationId).
3832	ListWebSearchProviders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
3833
3834	// ChangeWebSearchProviderWithBody Move a web search provider up or down, or turn it on or off
3835	//
3836	// A move past either end leaves the order as it was.
3837	//
3838	// Takes any type of body and a specified content type.
3839	//
3840	// Corresponds with POST /extensions/web-search/providers/{name} (the `ChangeWebSearchProvider` operationId).
3841	ChangeWebSearchProviderWithBody(ctx context.Context, name ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3842
3843	// ChangeWebSearchProvider Move a web search provider up or down, or turn it on or off
3844	//
3845	// A move past either end leaves the order as it was.
3846	//
3847	// Takes a body of the `application/json` content type.
3848	//
3849	// Corresponds with POST /extensions/web-search/providers/{name} (the `ChangeWebSearchProvider` operationId).
3850	ChangeWebSearchProvider(ctx context.Context, name ID, body ChangeWebSearchProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3851
3852	// GetDelivery Read an accepted delivery payload
3853	//
3854	// Corresponds with GET /extensions/webhooks/deliveries/{delivery_id} (the `GetDelivery` operationId).
3855	GetDelivery(ctx context.Context, deliveryID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
3856
3857	// ListHooks List hooks without secrets
3858	//
3859	// Corresponds with GET /extensions/webhooks/hooks (the `ListHooks` operationId).
3860	ListHooks(ctx context.Context, params *ListHooksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3861
3862	// CreateHookWithBody Create a hook and disclose its secret once
3863	//
3864	// Default enabled=true, signature_header=X-Albedo-Signature and signature_prefix=sha256=. Missing secret generates one. Lost secret requires explicit rotation; never retry creation automatically.
3865	//
3866	// Takes any type of body and a specified content type.
3867	//
3868	// Corresponds with POST /extensions/webhooks/hooks (the `CreateHook` operationId).
3869	CreateHookWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3870
3871	// CreateHook Create a hook and disclose its secret once
3872	//
3873	// Default enabled=true, signature_header=X-Albedo-Signature and signature_prefix=sha256=. Missing secret generates one. Lost secret requires explicit rotation; never retry creation automatically.
3874	//
3875	// Takes a body of the `application/json` content type.
3876	//
3877	// Corresponds with POST /extensions/webhooks/hooks (the `CreateHook` operationId).
3878	CreateHook(ctx context.Context, body CreateHookJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3879
3880	// DeleteHook Delete a hook while retaining accepted deliveries
3881	//
3882	// Corresponds with DELETE /extensions/webhooks/hooks/{hook_id} (the `DeleteHook` operationId).
3883	DeleteHook(ctx context.Context, hookID ID, params *DeleteHookParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3884
3885	// GetHook Read hook state or canonical configuration
3886	//
3887	// ETag is present only on configuration view. Ordinary read exposes the configuration resource and validator plus runtime observations.
3888	//
3889	// Corresponds with GET /extensions/webhooks/hooks/{hook_id} (the `GetHook` operationId).
3890	GetHook(ctx context.Context, hookID ID, params *GetHookParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3891
3892	// PatchHookWithBody Edit the observed hook configuration
3893	//
3894	// Target session and secret are not writable. Agent callers need that session permission; HTTP bearer clients are operators.
3895	//
3896	// Takes any type of body and a specified content type.
3897	//
3898	// Corresponds with PATCH /extensions/webhooks/hooks/{hook_id} (the `PatchHook` operationId).
3899	PatchHookWithBody(ctx context.Context, hookID ID, params *PatchHookParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3900
3901	// PatchHookWithApplicationMergePatchPlusJSONBody Edit the observed hook configuration
3902	//
3903	// Target session and secret are not writable. Agent callers need that session permission; HTTP bearer clients are operators.
3904	//
3905	// Takes a body of the `application/merge-patch+json` content type.
3906	//
3907	// Corresponds with PATCH /extensions/webhooks/hooks/{hook_id} (the `PatchHook` operationId).
3908	PatchHookWithApplicationMergePatchPlusJSONBody(ctx context.Context, hookID ID, params *PatchHookParams, body PatchHookApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3909
3910	// ListHookDeliveries Read accepted hook delivery metadata
3911	//
3912	// Historical reads remain available after hook deletion while retained deliveries exist.
3913	//
3914	// Corresponds with GET /extensions/webhooks/hooks/{hook_id}/deliveries (the `ListHookDeliveries` operationId).
3915	ListHookDeliveries(ctx context.Context, hookID ID, params *ListHookDeliveriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3916
3917	// DeliverWebhookWithBody Accept signed external data durably
3918	//
3919	// Authenticate configured HMAC-SHA256 over the exact raw body. A daemon bearer is not a substitute. Signature header name and prefix come from hook configuration. Same event ID and body returns original admission; changed body conflicts. Pending inbox limit 1000. Raw body maximum 65536 bytes.
3920	//
3921	// Takes any type of body and a specified content type.
3922	//
3923	// Corresponds with POST /extensions/webhooks/hooks/{hook_id}/deliveries (the `DeliverWebhook` operationId).
3924	DeliverWebhookWithBody(ctx context.Context, hookID ID, params *DeliverWebhookParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3925
3926	// RotateHookSecretWithBody Rotate and disclose the hook secret once
3927	//
3928	// If-Match is the observed hook configuration validator. Missing secret generates one. No automatic retry after a lost response.
3929	//
3930	// Takes any type of body and a specified content type.
3931	//
3932	// Corresponds with POST /extensions/webhooks/hooks/{hook_id}/secret (the `RotateHookSecret` operationId).
3933	RotateHookSecretWithBody(ctx context.Context, hookID ID, params *RotateHookSecretParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3934
3935	// RotateHookSecret Rotate and disclose the hook secret once
3936	//
3937	// If-Match is the observed hook configuration validator. Missing secret generates one. No automatic retry after a lost response.
3938	//
3939	// Takes a body of the `application/json` content type.
3940	//
3941	// Corresponds with POST /extensions/webhooks/hooks/{hook_id}/secret (the `RotateHookSecret` operationId).
3942	RotateHookSecret(ctx context.Context, hookID ID, params *RotateHookSecretParams, body RotateHookSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3943
3944	// GetHookPermission Read agent hook-management permission
3945	//
3946	// Absent stored permission reads false with its initial canonical validator.
3947	//
3948	// Corresponds with GET /extensions/webhooks/permissions/{session_id} (the `GetHookPermission` operationId).
3949	GetHookPermission(ctx context.Context, sessionID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
3950
3951	// PatchHookPermissionWithBody Set agent hook-management permission
3952	//
3953	// Only operator callers can grant permission. Omission retains it; turning off management keeps existing hooks enabled.
3954	//
3955	// Takes any type of body and a specified content type.
3956	//
3957	// Corresponds with PATCH /extensions/webhooks/permissions/{session_id} (the `PatchHookPermission` operationId).
3958	PatchHookPermissionWithBody(ctx context.Context, sessionID ID, params *PatchHookPermissionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3959
3960	// PatchHookPermissionWithApplicationMergePatchPlusJSONBody Set agent hook-management permission
3961	//
3962	// Only operator callers can grant permission. Omission retains it; turning off management keeps existing hooks enabled.
3963	//
3964	// Takes a body of the `application/merge-patch+json` content type.
3965	//
3966	// Corresponds with PATCH /extensions/webhooks/permissions/{session_id} (the `PatchHookPermission` operationId).
3967	PatchHookPermissionWithApplicationMergePatchPlusJSONBody(ctx context.Context, sessionID ID, params *PatchHookPermissionParams, body PatchHookPermissionApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3968
3969	// ListWork List work resources
3970	//
3971	// Requires enabled extension work. Lists may include bounded page descriptors and glances.
3972	//
3973	// Corresponds with GET /extensions/work/items (the `ListWork` operationId).
3974	ListWork(ctx context.Context, params *ListWorkParams, reqEditors ...RequestEditorFn) (*http.Response, error)
3975
3976	// CreateWorkWithBody Create a work resource
3977	//
3978	// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
3979	//
3980	// Takes any type of body and a specified content type.
3981	//
3982	// Corresponds with POST /extensions/work/items (the `CreateWork` operationId).
3983	CreateWorkWithBody(ctx context.Context, params *CreateWorkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
3984
3985	// CreateWork Create a work resource
3986	//
3987	// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
3988	//
3989	// Takes a body of the `application/json` content type.
3990	//
3991	// Corresponds with POST /extensions/work/items (the `CreateWork` operationId).
3992	CreateWork(ctx context.Context, params *CreateWorkParams, body CreateWorkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
3993
3994	// DeleteWork Delete a work resource
3995	//
3996	// Committed deletion remains successful if notification fails. Work items with children cannot be deleted.
3997	//
3998	// Corresponds with DELETE /extensions/work/items/{item_id} (the `DeleteWork` operationId).
3999	DeleteWork(ctx context.Context, itemID ID, params *DeleteWorkParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4000
4001	// GetWork Read one work resource
4002	//
4003	// Corresponds with GET /extensions/work/items/{item_id} (the `GetWork` operationId).
4004	GetWork(ctx context.Context, itemID ID, params *GetWorkParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4005
4006	// PatchWorkWithBody Edit a work resource
4007	//
4008	// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
4009	//
4010	// Takes any type of body and a specified content type.
4011	//
4012	// Corresponds with PATCH /extensions/work/items/{item_id} (the `PatchWork` operationId).
4013	PatchWorkWithBody(ctx context.Context, itemID ID, params *PatchWorkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4014
4015	// PatchWorkWithApplicationMergePatchPlusJSONBody Edit a work resource
4016	//
4017	// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
4018	//
4019	// Takes a body of the `application/merge-patch+json` content type.
4020	//
4021	// Corresponds with PATCH /extensions/work/items/{item_id} (the `PatchWork` operationId).
4022	PatchWorkWithApplicationMergePatchPlusJSONBody(ctx context.Context, itemID ID, params *PatchWorkParams, body PatchWorkApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4023
4024	// ListHosts Read known SSH hosts and cached state
4025	//
4026	// Requires capability `host_probes: 1`.
4027	//
4028	// Corresponds with GET /hosts (the `ListHosts` operationId).
4029	ListHosts(ctx context.Context, params *ListHostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4030
4031	// ProbeHostWithBody Start or join a host probe
4032	//
4033	// Coalesce repeated probes. Authentication remains an explicit operator handoff; no background SSH sign-in. Requires capability `host_probes: 1`.
4034	//
4035	// Takes any type of body and a specified content type.
4036	//
4037	// Corresponds with POST /hosts/{host}/probe (the `ProbeHost` operationId).
4038	ProbeHostWithBody(ctx context.Context, host ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4039
4040	// ProbeHost Start or join a host probe
4041	//
4042	// Coalesce repeated probes. Authentication remains an explicit operator handoff; no background SSH sign-in. Requires capability `host_probes: 1`.
4043	//
4044	// Takes a body of the `application/json` content type.
4045	//
4046	// Corresponds with POST /hosts/{host}/probe (the `ProbeHost` operationId).
4047	ProbeHost(ctx context.Context, host ID, body ProbeHostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4048
4049	// ListModels Read provider model metadata
4050	//
4051	// In catalogue view, exactly one of provider_profile/provider is required. Endpoint is allowed only with provider. Unknown facts are null. A manual unlisted ID remains usable. Optional model returns one metadata row, including cap_key, for an unlisted manual ID; unknown facts stay null.
4052	//
4053	// Corresponds with GET /models (the `ListModels` operationId).
4054	ListModels(ctx context.Context, params *ListModelsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4055
4056	// GetServer Read daemon identity and capabilities
4057	//
4058	// No startup or replacement. Authentication and protocol failures remain actionable errors. Pagination is valid only with include=quota_history.
4059	//
4060	// Corresponds with GET /server (the `GetServer` operationId).
4061	GetServer(ctx context.Context, params *GetServerParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4062
4063	// ShutdownServerWithBody Drain the identified daemon
4064	//
4065	// No automatic recovery or replay. The local launcher alone may offer replacement.
4066	//
4067	// Takes any type of body and a specified content type.
4068	//
4069	// Corresponds with POST /server/shutdown (the `ShutdownServer` operationId).
4070	ShutdownServerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4071
4072	// ShutdownServer Drain the identified daemon
4073	//
4074	// No automatic recovery or replay. The local launcher alone may offer replacement.
4075	//
4076	// Takes a body of the `application/json` content type.
4077	//
4078	// Corresponds with POST /server/shutdown (the `ShutdownServer` operationId).
4079	ShutdownServer(ctx context.Context, body ShutdownServerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4080
4081	// ListSessions Browse sessions or watch collection changes
4082	//
4083	// JSON defaults to roots, or all with parent/family. Parent and family are exclusive. Explicit roots with either is invalid. SSE accepts the same scope filters, excluding sort/limit/next; no cursor or replay. Subscribe, wait for ready, then read pages. Closure or overflow repeats this flow.
4084	//
4085	// Corresponds with GET /sessions (the `ListSessions` operationId).
4086	ListSessions(ctx context.Context, params *ListSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4087
4088	// DeleteSession Delete a leaf or captured subtree
4089	//
4090	// Leaf requires idle and no children. Subtree requires family_revision, gates new children, interrupts captured members and deletes deepest first. Partial outcomes are explicit. Refresh before confirming a new attempt; never automatically replay after transport loss.
4091	//
4092	// Corresponds with DELETE /sessions/{session_id} (the `DeleteSession` operationId).
4093	DeleteSession(ctx context.Context, sessionID ID, params *DeleteSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4094
4095	// GetSession Read or watch one session
4096	//
4097	// JSON defaults to complete Session. Configuration JSON excludes tail and replay parameters. SSE accepts tail and after_generation/after_seq, without view. Initial subscription omits both cursors; reconnect keeps the fully consumed pair. A missing generation requests reset. after_generation without after_seq is invalid. Neither auth failure nor closure starts a daemon.
4098	//
4099	// Corresponds with GET /sessions/{session_id} (the `GetSession` operationId).
4100	GetSession(ctx context.Context, sessionID ID, params *GetSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4101
4102	// PatchSessionWithBody Edit configuration or move workspace
4103	//
4104	// Use the observed configuration URL and validator. Workspace is a standalone change with family_revision. Busy target fails before commit; busy descendants follow a committed parent move at idle. Other configuration fields commit together. No automatic lost-response retry.
4105	//
4106	// Takes any type of body and a specified content type.
4107	//
4108	// Corresponds with PATCH /sessions/{session_id} (the `PatchSession` operationId).
4109	PatchSessionWithBody(ctx context.Context, sessionID ID, params *PatchSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4110
4111	// PatchSessionWithApplicationMergePatchPlusJSONBody Edit configuration or move workspace
4112	//
4113	// Use the observed configuration URL and validator. Workspace is a standalone change with family_revision. Busy target fails before commit; busy descendants follow a committed parent move at idle. Other configuration fields commit together. No automatic lost-response retry.
4114	//
4115	// Takes a body of the `application/merge-patch+json` content type.
4116	//
4117	// Corresponds with PATCH /sessions/{session_id} (the `PatchSession` operationId).
4118	PatchSessionWithApplicationMergePatchPlusJSONBody(ctx context.Context, sessionID ID, params *PatchSessionParams, body PatchSessionApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4119
4120	// CreateSessionWithBody Create a new, forked or child session
4121	//
4122	// Session ID must be UUIDv7. If-None-Match:* is required. Retain the identity and submitted intent after response loss. An existing resource returns 412; GET creation.submitted proves original intent. Child membership and task admission commit together.
4123	//
4124	// Takes any type of body and a specified content type.
4125	//
4126	// Corresponds with PUT /sessions/{session_id} (the `CreateSession` operationId).
4127	CreateSessionWithBody(ctx context.Context, sessionID UUIDv7, params *CreateSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4128
4129	// CreateSession Create a new, forked or child session
4130	//
4131	// Session ID must be UUIDv7. If-None-Match:* is required. Retain the identity and submitted intent after response loss. An existing resource returns 412; GET creation.submitted proves original intent. Child membership and task admission commit together.
4132	//
4133	// Takes a body of the `application/json` content type.
4134	//
4135	// Corresponds with PUT /sessions/{session_id} (the `CreateSession` operationId).
4136	CreateSession(ctx context.Context, sessionID UUIDv7, params *CreateSessionParams, body CreateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4137
4138	// GetActiveOutputContent Read unfinished output at a captured snapshot cutoff
4139	//
4140	// Pages contain at most 262144 UTF-8 bytes and remain within the captured cutoff. Preserve the required snapshot query when following next.
4141	//
4142	// Corresponds with GET /sessions/{session_id}/active-output/{content_id} (the `GetActiveOutputContent` operationId).
4143	GetActiveOutputContent(ctx context.Context, sessionID ID, contentID ID, params *GetActiveOutputContentParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4144
4145	// GetCatalog Discover candidates, loaded commands and pages
4146	//
4147	// Discovery and loaded composition are separate. Reads do not reload. Continuation identifies its section; candidate revision guards discovery-based selection. Requires capability `catalog: 1`.
4148	//
4149	// Corresponds with GET /sessions/{session_id}/catalog (the `GetCatalog` operationId).
4150	GetCatalog(ctx context.Context, sessionID ID, params *GetCatalogParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4151
4152	// CompactSessionWithBody Compact model context while retaining history
4153	//
4154	// Idle required. Selecting a strategy can succeed even if compaction later fails; report both. Full durable history stays intact. No automatic retry.
4155	//
4156	// Takes any type of body and a specified content type.
4157	//
4158	// Corresponds with POST /sessions/{session_id}/compaction (the `CompactSession` operationId).
4159	CompactSessionWithBody(ctx context.Context, sessionID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4160
4161	// CompactSession Compact model context while retaining history
4162	//
4163	// Idle required. Selecting a strategy can succeed even if compaction later fails; report both. Full durable history stays intact. No automatic retry.
4164	//
4165	// Takes a body of the `application/json` content type.
4166	//
4167	// Corresponds with POST /sessions/{session_id}/compaction (the `CompactSession` operationId).
4168	CompactSession(ctx context.Context, sessionID ID, body CompactSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4169
4170	// GetContext Inspect prepared context or request records
4171	//
4172	// Summary never prepares a request. Section requires snapshot_id, section_id, page and forbids request-pagination fields. Requests accepts after/limit/next. Stale snapshot is 410 context_changed, never another section. Requires capability `context: 1`.
4173	//
4174	// Corresponds with GET /sessions/{session_id}/context (the `GetContext` operationId).
4175	GetContext(ctx context.Context, sessionID ID, params *GetContextParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4176
4177	// GetHistory Page history or fork checkpoints
4178	//
4179	// Use only one of before/after/next. Durable positions are independent of actor replay. Pages are ascending and preserve complete display groups where bounded.
4180	//
4181	// Corresponds with GET /sessions/{session_id}/history (the `GetHistory` operationId).
4182	GetHistory(ctx context.Context, sessionID ID, params *GetHistoryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4183
4184	// GetHistoryContent Read full content in bounded pieces
4185	//
4186	// Follow next until null. UTF-8 pieces end at character boundaries. Reconstruct stored content, not shortened previews. Image fields are not paged here; their references name the image resource.
4187	//
4188	// Corresponds with GET /sessions/{session_id}/history/{entry_id} (the `GetHistoryContent` operationId).
4189	GetHistoryContent(ctx context.Context, sessionID ID, entryID ID, params *GetHistoryContentParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4190
4191	// GetHistoryImage Read one image field as its own bytes
4192	//
4193	// Image references in history point here. The body is the stored image itself, not base64, and is never content-coded.
4194	//
4195	// Corresponds with GET /sessions/{session_id}/history/{entry_id}/{field} (the `GetHistoryImage` operationId).
4196	GetHistoryImage(ctx context.Context, sessionID ID, entryID ID, field string, reqEditors ...RequestEditorFn) (*http.Response, error)
4197
4198	// GetInput Read a durable input outcome
4199	//
4200	// Available after session deletion. Accepted is not consumed or answered. Retain pending and unfinished-turn identities; terminal decisions last seven days. Unknown old UUIDv7 returns 410, never a fresh admission.
4201	//
4202	// Corresponds with GET /sessions/{session_id}/inputs/{input_id} (the `GetInput` operationId).
4203	GetInput(ctx context.Context, sessionID ID, inputID ID, reqEditors ...RequestEditorFn) (*http.Response, error)
4204
4205	// PutInputWithBody Admit immutable identified input
4206	//
4207	// Input ID is UUIDv7. Duplicate lookup precedes mutable validation and returns the original admission status with current delivery. Queue-full rejection remains rejected. No If-None-Match. Preserve the exact intent and identity while recovering an uncertain response.
4208	//
4209	// Takes any type of body and a specified content type.
4210	//
4211	// Corresponds with PUT /sessions/{session_id}/inputs/{input_id} (the `PutInput` operationId).
4212	PutInputWithBody(ctx context.Context, sessionID ID, inputID UUIDv7, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4213
4214	// PutInput Admit immutable identified input
4215	//
4216	// Input ID is UUIDv7. Duplicate lookup precedes mutable validation and returns the original admission status with current delivery. Queue-full rejection remains rejected. No If-None-Match. Preserve the exact intent and identity while recovering an uncertain response.
4217	//
4218	// Takes a body of the `application/json` content type.
4219	//
4220	// Corresponds with PUT /sessions/{session_id}/inputs/{input_id} (the `PutInput` operationId).
4221	PutInput(ctx context.Context, sessionID ID, inputID UUIDv7, body PutInputJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4222
4223	// CancelInputWithBody Cancel or interrupt only this input
4224	//
4225	// Never interrupts a later unrelated turn. shared_running leaves a shared turn running; retry only inspects or acts on this same input.
4226	//
4227	// Takes any type of body and a specified content type.
4228	//
4229	// Corresponds with POST /sessions/{session_id}/inputs/{input_id}/cancel (the `CancelInput` operationId).
4230	CancelInputWithBody(ctx context.Context, sessionID ID, inputID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4231
4232	// CancelInput Cancel or interrupt only this input
4233	//
4234	// Never interrupts a later unrelated turn. shared_running leaves a shared turn running; retry only inspects or acts on this same input.
4235	//
4236	// Takes a body of the `application/json` content type.
4237	//
4238	// Corresponds with POST /sessions/{session_id}/inputs/{input_id}/cancel (the `CancelInput` operationId).
4239	CancelInput(ctx context.Context, sessionID ID, inputID ID, body CancelInputJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4240
4241	// InterruptSessionWithBody Interrupt a captured run and waiting prefix
4242	//
4243	// Capture run_id and through_input_order from the installed session. Retry cannot interrupt a later run or cancel newer inputs.
4244	//
4245	// Takes any type of body and a specified content type.
4246	//
4247	// Corresponds with POST /sessions/{session_id}/interrupt (the `InterruptSession` operationId).
4248	InterruptSessionWithBody(ctx context.Context, sessionID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4249
4250	// InterruptSession Interrupt a captured run and waiting prefix
4251	//
4252	// Capture run_id and through_input_order from the installed session. Retry cannot interrupt a later run or cancel newer inputs.
4253	//
4254	// Takes a body of the `application/json` content type.
4255	//
4256	// Corresponds with POST /sessions/{session_id}/interrupt (the `InterruptSession` operationId).
4257	InterruptSession(ctx context.Context, sessionID ID, body InterruptSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4258
4259	// UpgradeKernelWithBody Explicitly upgrade an idle kernel
4260	//
4261	// Stage and validate before swap. Report external jobs stopped during an unsuccessful upgrade; do not claim them restored. No automatic retry.
4262	//
4263	// Takes any type of body and a specified content type.
4264	//
4265	// Corresponds with POST /sessions/{session_id}/kernel/upgrade (the `UpgradeKernel` operationId).
4266	UpgradeKernelWithBody(ctx context.Context, sessionID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4267
4268	// UpgradeKernel Explicitly upgrade an idle kernel
4269	//
4270	// Stage and validate before swap. Report external jobs stopped during an unsuccessful upgrade; do not claim them restored. No automatic retry.
4271	//
4272	// Takes a body of the `application/json` content type.
4273	//
4274	// Corresponds with POST /sessions/{session_id}/kernel/upgrade (the `UpgradeKernel` operationId).
4275	UpgradeKernel(ctx context.Context, sessionID ID, body UpgradeKernelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4276
4277	// ReloadSessionWithBody Reload composition, models or both
4278	//
4279	// Session reload requires idle. Both targets return separate outcomes, preserving confirmed success when the other fails. Lost-response replay is not automatic.
4280	//
4281	// Takes any type of body and a specified content type.
4282	//
4283	// Corresponds with POST /sessions/{session_id}/reload (the `ReloadSession` operationId).
4284	ReloadSessionWithBody(ctx context.Context, sessionID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4285
4286	// ReloadSession Reload composition, models or both
4287	//
4288	// Session reload requires idle. Both targets return separate outcomes, preserving confirmed success when the other fails. Lost-response replay is not automatic.
4289	//
4290	// Takes a body of the `application/json` content type.
4291	//
4292	// Corresponds with POST /sessions/{session_id}/reload (the `ReloadSession` operationId).
4293	ReloadSession(ctx context.Context, sessionID ID, body ReloadSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4294
4295	// RecordVisitWithBody Count one deliberate opening
4296	//
4297	// Visit ID is UUIDv7. Same identity increments once; reads and refreshes never count.
4298	//
4299	// Takes any type of body and a specified content type.
4300	//
4301	// Corresponds with PUT /sessions/{session_id}/visits/{visit_id} (the `RecordVisit` operationId).
4302	RecordVisitWithBody(ctx context.Context, sessionID ID, visitID UUIDv7, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4303
4304	// RecordVisit Count one deliberate opening
4305	//
4306	// Visit ID is UUIDv7. Same identity increments once; reads and refreshes never count.
4307	//
4308	// Takes a body of the `application/json` content type.
4309	//
4310	// Corresponds with PUT /sessions/{session_id}/visits/{visit_id} (the `RecordVisit` operationId).
4311	RecordVisit(ctx context.Context, sessionID ID, visitID UUIDv7, body RecordVisitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4312
4313	// GetSettings Read shared settings or one canonical group
4314	//
4315	// Without group, return Settings and observed group validators. With group, return that group only; the ETag covers that representation.
4316	//
4317	// Corresponds with GET /settings (the `GetSettings` operationId).
4318	GetSettings(ctx context.Context, params *GetSettingsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4319
4320	// PatchSettingsWithBody Atomically edit one settings group
4321	//
4322	// Query group selects its corresponding schema. Omitted fields keep values. Null removes only nullable fields or map entries. Candidate validation precedes the complete group commit. No lost-response retry.
4323	//
4324	// Takes any type of body and a specified content type.
4325	//
4326	// Corresponds with PATCH /settings (the `PatchSettings` operationId).
4327	PatchSettingsWithBody(ctx context.Context, params *PatchSettingsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
4328
4329	// PatchSettingsWithApplicationMergePatchPlusJSONBody Atomically edit one settings group
4330	//
4331	// Query group selects its corresponding schema. Omitted fields keep values. Null removes only nullable fields or map entries. Candidate validation precedes the complete group commit. No lost-response retry.
4332	//
4333	// Takes a body of the `application/merge-patch+json` content type.
4334	//
4335	// Corresponds with PATCH /settings (the `PatchSettings` operationId).
4336	PatchSettingsWithApplicationMergePatchPlusJSONBody(ctx context.Context, params *PatchSettingsParams, body PatchSettingsApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
4337
4338	// GetStorage Read storage accounting
4339	//
4340	// Each section has its own continuation. Totals cover complete storage. Paths never authorize local mutation. Requires capability `storage_report: 1`.
4341	//
4342	// Corresponds with GET /storage (the `GetStorage` operationId).
4343	GetStorage(ctx context.Context, params *GetStorageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4344
4345	// GetWorkspaces Browse recent locations or a directory
4346	//
4347	// Without location return recent workspaces. include=preview requires location. Paths resolve on the daemon host; cached host state does not perform SSH sign-in. Requires capability `workspace_browsing: 1`.
4348	//
4349	// Corresponds with GET /workspaces (the `GetWorkspaces` operationId).
4350	GetWorkspaces(ctx context.Context, params *GetWorkspacesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
4351}
4352
4353// GetAuth Read login choices and redacted accounts
4354//
4355// Requires capability `provider_auth: 1`.
4356//
4357// Corresponds with GET /auth (the `GetAuth` operationId).
4358func (c *Client) GetAuth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
4359	req, err := NewGetAuthRequest(c.Server)
4360	if err != nil {
4361		return nil, err
4362	}
4363	req = req.WithContext(ctx)
4364	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4365		return nil, err
4366	}
4367	return c.Client.Do(req)
4368}
4369
4370// DeleteAccount Remove an unreferenced provider account
4371//
4372// Reject if a saved provider profile references it. Does not interrupt captured credentials in an active request. Account IDs are never reused. Requires capability `provider_auth: 1`.
4373//
4374// Corresponds with DELETE /auth/accounts/{account_id} (the `DeleteAccount` operationId).
4375func (c *Client) DeleteAccount(ctx context.Context, accountID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
4376	req, err := NewDeleteAccountRequest(c.Server, accountID)
4377	if err != nil {
4378		return nil, err
4379	}
4380	req = req.WithContext(ctx)
4381	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4382		return nil, err
4383	}
4384	return c.Client.Do(req)
4385}
4386
4387// CancelLogin Cancel a login idempotently
4388//
4389// Cancellation stops only this flow; completed accounts remain saved. No If-Match is needed for identity-scoped cancellation. Requires capability `provider_auth: 1`.
4390//
4391// Corresponds with DELETE /auth/logins/{login_id} (the `CancelLogin` operationId).
4392func (c *Client) CancelLogin(ctx context.Context, loginID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
4393	req, err := NewCancelLoginRequest(c.Server, loginID)
4394	if err != nil {
4395		return nil, err
4396	}
4397	req = req.WithContext(ctx)
4398	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4399		return nil, err
4400	}
4401	return c.Client.Do(req)
4402}
4403
4404// GetLogin Inspect a provider login
4405//
4406// No credential or submitted form echo. Terminal records remain fifteen minutes; unfinished flows expire at their provider deadline. Requires capability `provider_auth: 1`.
4407//
4408// Corresponds with GET /auth/logins/{login_id} (the `GetLogin` operationId).
4409func (c *Client) GetLogin(ctx context.Context, loginID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
4410	req, err := NewGetLoginRequest(c.Server, loginID)
4411	if err != nil {
4412		return nil, err
4413	}
4414	req = req.WithContext(ctx)
4415	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4416		return nil, err
4417	}
4418	return c.Client.Do(req)
4419}
4420
4421// AnswerLoginWithBody Supply manual callback or code
4422//
4423// Requires capability `provider_auth: 1`.
4424//
4425// Takes any type of body and a specified content type.
4426//
4427// Corresponds with PATCH /auth/logins/{login_id} (the `AnswerLogin` operationId).
4428func (c *Client) AnswerLoginWithBody(ctx context.Context, loginID ID, params *AnswerLoginParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4429	req, err := NewAnswerLoginRequestWithBody(c.Server, loginID, params, contentType, body)
4430	if err != nil {
4431		return nil, err
4432	}
4433	req = req.WithContext(ctx)
4434	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4435		return nil, err
4436	}
4437	return c.Client.Do(req)
4438}
4439
4440// AnswerLoginWithApplicationMergePatchPlusJSONBody Supply manual callback or code
4441//
4442// Requires capability `provider_auth: 1`.
4443//
4444// Takes a body of the `application/merge-patch+json` content type.
4445//
4446// Corresponds with PATCH /auth/logins/{login_id} (the `AnswerLogin` operationId).
4447func (c *Client) AnswerLoginWithApplicationMergePatchPlusJSONBody(ctx context.Context, loginID ID, params *AnswerLoginParams, body AnswerLoginApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4448	req, err := NewAnswerLoginRequestWithApplicationMergePatchPlusJSONBody(c.Server, loginID, params, body)
4449	if err != nil {
4450		return nil, err
4451	}
4452	req = req.WithContext(ctx)
4453	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4454		return nil, err
4455	}
4456	return c.Client.Do(req)
4457}
4458
4459// CreateLoginWithBody Start or recover an identified provider login
4460//
4461// UUIDv7 identity. Compare immutable private intent inside the daemon. Duplicate returns existing flow, never another browser/exchange. Restart turns unfinished flows into retained daemon_restarted failures; a new flow needs a new ID. Requires capability `provider_auth: 1`.
4462//
4463// Takes any type of body and a specified content type.
4464//
4465// Corresponds with PUT /auth/logins/{login_id} (the `CreateLogin` operationId).
4466func (c *Client) CreateLoginWithBody(ctx context.Context, loginID UUIDv7, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4467	req, err := NewCreateLoginRequestWithBody(c.Server, loginID, contentType, body)
4468	if err != nil {
4469		return nil, err
4470	}
4471	req = req.WithContext(ctx)
4472	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4473		return nil, err
4474	}
4475	return c.Client.Do(req)
4476}
4477
4478// CreateLogin Start or recover an identified provider login
4479//
4480// UUIDv7 identity. Compare immutable private intent inside the daemon. Duplicate returns existing flow, never another browser/exchange. Restart turns unfinished flows into retained daemon_restarted failures; a new flow needs a new ID. Requires capability `provider_auth: 1`.
4481//
4482// Takes a body of the `application/json` content type.
4483//
4484// Corresponds with PUT /auth/logins/{login_id} (the `CreateLogin` operationId).
4485func (c *Client) CreateLogin(ctx context.Context, loginID UUIDv7, body CreateLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4486	req, err := NewCreateLoginRequest(c.Server, loginID, body)
4487	if err != nil {
4488		return nil, err
4489	}
4490	req = req.WithContext(ctx)
4491	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4492		return nil, err
4493	}
4494	return c.Client.Do(req)
4495}
4496
4497// UnlinkWorkspace Remove a member from the observed group
4498//
4499// Check membership at commit. Creates a singleton group; deletes no work or memory. Human-only.
4500//
4501// Corresponds with DELETE /extensions/links/groups (the `UnlinkWorkspace` operationId).
4502func (c *Client) UnlinkWorkspace(ctx context.Context, params *UnlinkWorkspaceParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
4503	req, err := NewUnlinkWorkspaceRequest(c.Server, params)
4504	if err != nil {
4505		return nil, err
4506	}
4507	req = req.WithContext(ctx)
4508	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4509		return nil, err
4510	}
4511	return c.Client.Do(req)
4512}
4513
4514// GetLinkGroup Read linked membership and presence
4515//
4516// Only configuration view has the canonical membership ETag. Presence does not change that validator.
4517//
4518// Corresponds with GET /extensions/links/groups (the `GetLinkGroup` operationId).
4519func (c *Client) GetLinkGroup(ctx context.Context, params *GetLinkGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
4520	req, err := NewGetLinkGroupRequest(c.Server, params)
4521	if err != nil {
4522		return nil, err
4523	}
4524	req = req.WithContext(ctx)
4525	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4526		return nil, err
4527	}
4528	return c.Client.Do(req)
4529}
4530
4531// MergeLinkGroupsWithBody Merge two observed workspace groups
4532//
4533// Check both observed validators in one owner commit. Human-only; domain commit and notifications are separate. No automatic lost-response retry.
4534//
4535// Takes any type of body and a specified content type.
4536//
4537// Corresponds with POST /extensions/links/groups (the `MergeLinkGroups` operationId).
4538func (c *Client) MergeLinkGroupsWithBody(ctx context.Context, params *MergeLinkGroupsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4539	req, err := NewMergeLinkGroupsRequestWithBody(c.Server, params, contentType, body)
4540	if err != nil {
4541		return nil, err
4542	}
4543	req = req.WithContext(ctx)
4544	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4545		return nil, err
4546	}
4547	return c.Client.Do(req)
4548}
4549
4550// MergeLinkGroups Merge two observed workspace groups
4551//
4552// Check both observed validators in one owner commit. Human-only; domain commit and notifications are separate. No automatic lost-response retry.
4553//
4554// Takes a body of the `application/json` content type.
4555//
4556// Corresponds with POST /extensions/links/groups (the `MergeLinkGroups` operationId).
4557func (c *Client) MergeLinkGroups(ctx context.Context, params *MergeLinkGroupsParams, body MergeLinkGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4558	req, err := NewMergeLinkGroupsRequest(c.Server, params, body)
4559	if err != nil {
4560		return nil, err
4561	}
4562	req = req.WithContext(ctx)
4563	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4564		return nil, err
4565	}
4566	return c.Client.Do(req)
4567}
4568
4569// ListPaperclips List paperclips resources
4570//
4571// Requires enabled extension paperclips. Lists may include bounded page descriptors and glances.
4572//
4573// Corresponds with GET /extensions/paperclips/items (the `ListPaperclips` operationId).
4574func (c *Client) ListPaperclips(ctx context.Context, params *ListPaperclipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
4575	req, err := NewListPaperclipsRequest(c.Server, params)
4576	if err != nil {
4577		return nil, err
4578	}
4579	req = req.WithContext(ctx)
4580	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4581		return nil, err
4582	}
4583	return c.Client.Do(req)
4584}
4585
4586// CreatePaperclipsWithBody Create a paperclips resource
4587//
4588// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
4589//
4590// Takes any type of body and a specified content type.
4591//
4592// Corresponds with POST /extensions/paperclips/items (the `CreatePaperclips` operationId).
4593func (c *Client) CreatePaperclipsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4594	req, err := NewCreatePaperclipsRequestWithBody(c.Server, contentType, body)
4595	if err != nil {
4596		return nil, err
4597	}
4598	req = req.WithContext(ctx)
4599	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4600		return nil, err
4601	}
4602	return c.Client.Do(req)
4603}
4604
4605// CreatePaperclips Create a paperclips resource
4606//
4607// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
4608//
4609// Takes a body of the `application/json` content type.
4610//
4611// Corresponds with POST /extensions/paperclips/items (the `CreatePaperclips` operationId).
4612func (c *Client) CreatePaperclips(ctx context.Context, body CreatePaperclipsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4613	req, err := NewCreatePaperclipsRequest(c.Server, body)
4614	if err != nil {
4615		return nil, err
4616	}
4617	req = req.WithContext(ctx)
4618	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4619		return nil, err
4620	}
4621	return c.Client.Do(req)
4622}
4623
4624// DeletePaperclips Delete a paperclips resource
4625//
4626// Committed deletion remains successful if notification fails. Work items with children cannot be deleted.
4627//
4628// Corresponds with DELETE /extensions/paperclips/items/{item_id} (the `DeletePaperclips` operationId).
4629func (c *Client) DeletePaperclips(ctx context.Context, itemID ID, params *DeletePaperclipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
4630	req, err := NewDeletePaperclipsRequest(c.Server, itemID, params)
4631	if err != nil {
4632		return nil, err
4633	}
4634	req = req.WithContext(ctx)
4635	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4636		return nil, err
4637	}
4638	return c.Client.Do(req)
4639}
4640
4641// GetPaperclips Read one paperclips resource
4642//
4643// Corresponds with GET /extensions/paperclips/items/{item_id} (the `GetPaperclips` operationId).
4644func (c *Client) GetPaperclips(ctx context.Context, itemID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
4645	req, err := NewGetPaperclipsRequest(c.Server, itemID)
4646	if err != nil {
4647		return nil, err
4648	}
4649	req = req.WithContext(ctx)
4650	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4651		return nil, err
4652	}
4653	return c.Client.Do(req)
4654}
4655
4656// PatchPaperclipsWithBody Edit a paperclips resource
4657//
4658// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
4659//
4660// Takes any type of body and a specified content type.
4661//
4662// Corresponds with PATCH /extensions/paperclips/items/{item_id} (the `PatchPaperclips` operationId).
4663func (c *Client) PatchPaperclipsWithBody(ctx context.Context, itemID ID, params *PatchPaperclipsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4664	req, err := NewPatchPaperclipsRequestWithBody(c.Server, itemID, params, contentType, body)
4665	if err != nil {
4666		return nil, err
4667	}
4668	req = req.WithContext(ctx)
4669	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4670		return nil, err
4671	}
4672	return c.Client.Do(req)
4673}
4674
4675// PatchPaperclipsWithApplicationMergePatchPlusJSONBody Edit a paperclips resource
4676//
4677// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
4678//
4679// Takes a body of the `application/merge-patch+json` content type.
4680//
4681// Corresponds with PATCH /extensions/paperclips/items/{item_id} (the `PatchPaperclips` operationId).
4682func (c *Client) PatchPaperclipsWithApplicationMergePatchPlusJSONBody(ctx context.Context, itemID ID, params *PatchPaperclipsParams, body PatchPaperclipsApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4683	req, err := NewPatchPaperclipsRequestWithApplicationMergePatchPlusJSONBody(c.Server, itemID, params, body)
4684	if err != nil {
4685		return nil, err
4686	}
4687	req = req.WithContext(ctx)
4688	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4689		return nil, err
4690	}
4691	return c.Client.Do(req)
4692}
4693
4694// CreateProxyCompletionWithBody Run a stateless OpenAI chat completion
4695//
4696// Caller supplies full history. Tool IDs carry opaque provider state and must be echoed exactly. Bearer required unless anonymous loopback policy explicitly enabled. Providers apply only representable generation options; proxy transport documentation defines these differences. No automatic replay after request admission.
4697//
4698// Takes any type of body and a specified content type.
4699//
4700// Corresponds with POST /extensions/proxy/v1/chat/completions (the `CreateProxyCompletion` operationId).
4701func (c *Client) CreateProxyCompletionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4702	req, err := NewCreateProxyCompletionRequestWithBody(c.Server, contentType, body)
4703	if err != nil {
4704		return nil, err
4705	}
4706	req = req.WithContext(ctx)
4707	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4708		return nil, err
4709	}
4710	return c.Client.Do(req)
4711}
4712
4713// CreateProxyCompletion Run a stateless OpenAI chat completion
4714//
4715// Caller supplies full history. Tool IDs carry opaque provider state and must be echoed exactly. Bearer required unless anonymous loopback policy explicitly enabled. Providers apply only representable generation options; proxy transport documentation defines these differences. No automatic replay after request admission.
4716//
4717// Takes a body of the `application/json` content type.
4718//
4719// Corresponds with POST /extensions/proxy/v1/chat/completions (the `CreateProxyCompletion` operationId).
4720func (c *Client) CreateProxyCompletion(ctx context.Context, body CreateProxyCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4721	req, err := NewCreateProxyCompletionRequest(c.Server, body)
4722	if err != nil {
4723		return nil, err
4724	}
4725	req = req.WithContext(ctx)
4726	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4727		return nil, err
4728	}
4729	return c.Client.Do(req)
4730}
4731
4732// ListProxyModels List saved-profile OpenAI model IDs
4733//
4734// External OpenAI envelope. Bearer required unless operator explicitly configured anonymous loopback access.
4735//
4736// Corresponds with GET /extensions/proxy/v1/models (the `ListProxyModels` operationId).
4737func (c *Client) ListProxyModels(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
4738	req, err := NewListProxyModelsRequest(c.Server)
4739	if err != nil {
4740		return nil, err
4741	}
4742	req = req.WithContext(ctx)
4743	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4744		return nil, err
4745	}
4746	return c.Client.Do(req)
4747}
4748
4749// ListJobs Read bounded live job observations and the jobs page
4750//
4751// Corresponds with GET /extensions/run/sessions/{session_id}/jobs (the `ListJobs` operationId).
4752func (c *Client) ListJobs(ctx context.Context, sessionID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
4753	req, err := NewListJobsRequest(c.Server, sessionID)
4754	if err != nil {
4755		return nil, err
4756	}
4757	req = req.WithContext(ctx)
4758	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4759		return nil, err
4760	}
4761	return c.Client.Do(req)
4762}
4763
4764// StopJobWithBody Explicitly stop one observed process group
4765//
4766// 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.
4767//
4768// Takes any type of body and a specified content type.
4769//
4770// Corresponds with POST /extensions/run/sessions/{session_id}/jobs/{job_id}/stop (the `StopJob` operationId).
4771func (c *Client) StopJobWithBody(ctx context.Context, sessionID ID, jobID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4772	req, err := NewStopJobRequestWithBody(c.Server, sessionID, jobID, contentType, body)
4773	if err != nil {
4774		return nil, err
4775	}
4776	req = req.WithContext(ctx)
4777	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4778		return nil, err
4779	}
4780	return c.Client.Do(req)
4781}
4782
4783// StopJob Explicitly stop one observed process group
4784//
4785// 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.
4786//
4787// Takes a body of the `application/json` content type.
4788//
4789// Corresponds with POST /extensions/run/sessions/{session_id}/jobs/{job_id}/stop (the `StopJob` operationId).
4790func (c *Client) StopJob(ctx context.Context, sessionID ID, jobID ID, body StopJobJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4791	req, err := NewStopJobRequest(c.Server, sessionID, jobID, body)
4792	if err != nil {
4793		return nil, err
4794	}
4795	req = req.WithContext(ctx)
4796	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4797		return nil, err
4798	}
4799	return c.Client.Do(req)
4800}
4801
4802// ListSchedule List schedule resources
4803//
4804// Requires enabled extension schedule. Lists may include bounded page descriptors and glances.
4805//
4806// Corresponds with GET /extensions/schedule/jobs (the `ListSchedule` operationId).
4807func (c *Client) ListSchedule(ctx context.Context, params *ListScheduleParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
4808	req, err := NewListScheduleRequest(c.Server, params)
4809	if err != nil {
4810		return nil, err
4811	}
4812	req = req.WithContext(ctx)
4813	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4814		return nil, err
4815	}
4816	return c.Client.Do(req)
4817}
4818
4819// CreateScheduleWithBody Create a schedule resource
4820//
4821// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
4822//
4823// Takes any type of body and a specified content type.
4824//
4825// Corresponds with POST /extensions/schedule/jobs (the `CreateSchedule` operationId).
4826func (c *Client) CreateScheduleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4827	req, err := NewCreateScheduleRequestWithBody(c.Server, contentType, body)
4828	if err != nil {
4829		return nil, err
4830	}
4831	req = req.WithContext(ctx)
4832	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4833		return nil, err
4834	}
4835	return c.Client.Do(req)
4836}
4837
4838// CreateSchedule Create a schedule resource
4839//
4840// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
4841//
4842// Takes a body of the `application/json` content type.
4843//
4844// Corresponds with POST /extensions/schedule/jobs (the `CreateSchedule` operationId).
4845func (c *Client) CreateSchedule(ctx context.Context, body CreateScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4846	req, err := NewCreateScheduleRequest(c.Server, body)
4847	if err != nil {
4848		return nil, err
4849	}
4850	req = req.WithContext(ctx)
4851	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4852		return nil, err
4853	}
4854	return c.Client.Do(req)
4855}
4856
4857// DeleteSchedule Delete a schedule resource
4858//
4859// Committed deletion remains successful if notification fails. Work items with children cannot be deleted.
4860//
4861// Corresponds with DELETE /extensions/schedule/jobs/{job_id} (the `DeleteSchedule` operationId).
4862func (c *Client) DeleteSchedule(ctx context.Context, jobID ID, params *DeleteScheduleParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
4863	req, err := NewDeleteScheduleRequest(c.Server, jobID, params)
4864	if err != nil {
4865		return nil, err
4866	}
4867	req = req.WithContext(ctx)
4868	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4869		return nil, err
4870	}
4871	return c.Client.Do(req)
4872}
4873
4874// GetSchedule Read one schedule resource
4875//
4876// Corresponds with GET /extensions/schedule/jobs/{job_id} (the `GetSchedule` operationId).
4877func (c *Client) GetSchedule(ctx context.Context, jobID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
4878	req, err := NewGetScheduleRequest(c.Server, jobID)
4879	if err != nil {
4880		return nil, err
4881	}
4882	req = req.WithContext(ctx)
4883	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4884		return nil, err
4885	}
4886	return c.Client.Do(req)
4887}
4888
4889// PatchScheduleWithBody Edit a schedule resource
4890//
4891// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
4892//
4893// Takes any type of body and a specified content type.
4894//
4895// Corresponds with PATCH /extensions/schedule/jobs/{job_id} (the `PatchSchedule` operationId).
4896func (c *Client) PatchScheduleWithBody(ctx context.Context, jobID ID, params *PatchScheduleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4897	req, err := NewPatchScheduleRequestWithBody(c.Server, jobID, params, contentType, body)
4898	if err != nil {
4899		return nil, err
4900	}
4901	req = req.WithContext(ctx)
4902	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4903		return nil, err
4904	}
4905	return c.Client.Do(req)
4906}
4907
4908// PatchScheduleWithApplicationMergePatchPlusJSONBody Edit a schedule resource
4909//
4910// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
4911//
4912// Takes a body of the `application/merge-patch+json` content type.
4913//
4914// Corresponds with PATCH /extensions/schedule/jobs/{job_id} (the `PatchSchedule` operationId).
4915func (c *Client) PatchScheduleWithApplicationMergePatchPlusJSONBody(ctx context.Context, jobID ID, params *PatchScheduleParams, body PatchScheduleApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4916	req, err := NewPatchScheduleRequestWithApplicationMergePatchPlusJSONBody(c.Server, jobID, params, body)
4917	if err != nil {
4918		return nil, err
4919	}
4920	req = req.WithContext(ctx)
4921	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4922		return nil, err
4923	}
4924	return c.Client.Do(req)
4925}
4926
4927// ListWebSearchProviders List web search providers in the order a search tries them
4928//
4929// Requires enabled extension web-search. The global order lives in extensions.json.
4930//
4931// Corresponds with GET /extensions/web-search/providers (the `ListWebSearchProviders` operationId).
4932func (c *Client) ListWebSearchProviders(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
4933	req, err := NewListWebSearchProvidersRequest(c.Server)
4934	if err != nil {
4935		return nil, err
4936	}
4937	req = req.WithContext(ctx)
4938	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4939		return nil, err
4940	}
4941	return c.Client.Do(req)
4942}
4943
4944// ChangeWebSearchProviderWithBody Move a web search provider up or down, or turn it on or off
4945//
4946// A move past either end leaves the order as it was.
4947//
4948// Takes any type of body and a specified content type.
4949//
4950// Corresponds with POST /extensions/web-search/providers/{name} (the `ChangeWebSearchProvider` operationId).
4951func (c *Client) ChangeWebSearchProviderWithBody(ctx context.Context, name ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
4952	req, err := NewChangeWebSearchProviderRequestWithBody(c.Server, name, contentType, body)
4953	if err != nil {
4954		return nil, err
4955	}
4956	req = req.WithContext(ctx)
4957	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4958		return nil, err
4959	}
4960	return c.Client.Do(req)
4961}
4962
4963// ChangeWebSearchProvider Move a web search provider up or down, or turn it on or off
4964//
4965// A move past either end leaves the order as it was.
4966//
4967// Takes a body of the `application/json` content type.
4968//
4969// Corresponds with POST /extensions/web-search/providers/{name} (the `ChangeWebSearchProvider` operationId).
4970func (c *Client) ChangeWebSearchProvider(ctx context.Context, name ID, body ChangeWebSearchProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
4971	req, err := NewChangeWebSearchProviderRequest(c.Server, name, body)
4972	if err != nil {
4973		return nil, err
4974	}
4975	req = req.WithContext(ctx)
4976	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4977		return nil, err
4978	}
4979	return c.Client.Do(req)
4980}
4981
4982// GetDelivery Read an accepted delivery payload
4983//
4984// Corresponds with GET /extensions/webhooks/deliveries/{delivery_id} (the `GetDelivery` operationId).
4985func (c *Client) GetDelivery(ctx context.Context, deliveryID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
4986	req, err := NewGetDeliveryRequest(c.Server, deliveryID)
4987	if err != nil {
4988		return nil, err
4989	}
4990	req = req.WithContext(ctx)
4991	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
4992		return nil, err
4993	}
4994	return c.Client.Do(req)
4995}
4996
4997// ListHooks List hooks without secrets
4998//
4999// Corresponds with GET /extensions/webhooks/hooks (the `ListHooks` operationId).
5000func (c *Client) ListHooks(ctx context.Context, params *ListHooksParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5001	req, err := NewListHooksRequest(c.Server, params)
5002	if err != nil {
5003		return nil, err
5004	}
5005	req = req.WithContext(ctx)
5006	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5007		return nil, err
5008	}
5009	return c.Client.Do(req)
5010}
5011
5012// CreateHookWithBody Create a hook and disclose its secret once
5013//
5014// Default enabled=true, signature_header=X-Albedo-Signature and signature_prefix=sha256=. Missing secret generates one. Lost secret requires explicit rotation; never retry creation automatically.
5015//
5016// Takes any type of body and a specified content type.
5017//
5018// Corresponds with POST /extensions/webhooks/hooks (the `CreateHook` operationId).
5019func (c *Client) CreateHookWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5020	req, err := NewCreateHookRequestWithBody(c.Server, contentType, body)
5021	if err != nil {
5022		return nil, err
5023	}
5024	req = req.WithContext(ctx)
5025	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5026		return nil, err
5027	}
5028	return c.Client.Do(req)
5029}
5030
5031// CreateHook Create a hook and disclose its secret once
5032//
5033// Default enabled=true, signature_header=X-Albedo-Signature and signature_prefix=sha256=. Missing secret generates one. Lost secret requires explicit rotation; never retry creation automatically.
5034//
5035// Takes a body of the `application/json` content type.
5036//
5037// Corresponds with POST /extensions/webhooks/hooks (the `CreateHook` operationId).
5038func (c *Client) CreateHook(ctx context.Context, body CreateHookJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5039	req, err := NewCreateHookRequest(c.Server, body)
5040	if err != nil {
5041		return nil, err
5042	}
5043	req = req.WithContext(ctx)
5044	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5045		return nil, err
5046	}
5047	return c.Client.Do(req)
5048}
5049
5050// DeleteHook Delete a hook while retaining accepted deliveries
5051//
5052// Corresponds with DELETE /extensions/webhooks/hooks/{hook_id} (the `DeleteHook` operationId).
5053func (c *Client) DeleteHook(ctx context.Context, hookID ID, params *DeleteHookParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5054	req, err := NewDeleteHookRequest(c.Server, hookID, params)
5055	if err != nil {
5056		return nil, err
5057	}
5058	req = req.WithContext(ctx)
5059	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5060		return nil, err
5061	}
5062	return c.Client.Do(req)
5063}
5064
5065// GetHook Read hook state or canonical configuration
5066//
5067// ETag is present only on configuration view. Ordinary read exposes the configuration resource and validator plus runtime observations.
5068//
5069// Corresponds with GET /extensions/webhooks/hooks/{hook_id} (the `GetHook` operationId).
5070func (c *Client) GetHook(ctx context.Context, hookID ID, params *GetHookParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5071	req, err := NewGetHookRequest(c.Server, hookID, params)
5072	if err != nil {
5073		return nil, err
5074	}
5075	req = req.WithContext(ctx)
5076	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5077		return nil, err
5078	}
5079	return c.Client.Do(req)
5080}
5081
5082// PatchHookWithBody Edit the observed hook configuration
5083//
5084// Target session and secret are not writable. Agent callers need that session permission; HTTP bearer clients are operators.
5085//
5086// Takes any type of body and a specified content type.
5087//
5088// Corresponds with PATCH /extensions/webhooks/hooks/{hook_id} (the `PatchHook` operationId).
5089func (c *Client) PatchHookWithBody(ctx context.Context, hookID ID, params *PatchHookParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5090	req, err := NewPatchHookRequestWithBody(c.Server, hookID, params, contentType, body)
5091	if err != nil {
5092		return nil, err
5093	}
5094	req = req.WithContext(ctx)
5095	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5096		return nil, err
5097	}
5098	return c.Client.Do(req)
5099}
5100
5101// PatchHookWithApplicationMergePatchPlusJSONBody Edit the observed hook configuration
5102//
5103// Target session and secret are not writable. Agent callers need that session permission; HTTP bearer clients are operators.
5104//
5105// Takes a body of the `application/merge-patch+json` content type.
5106//
5107// Corresponds with PATCH /extensions/webhooks/hooks/{hook_id} (the `PatchHook` operationId).
5108func (c *Client) PatchHookWithApplicationMergePatchPlusJSONBody(ctx context.Context, hookID ID, params *PatchHookParams, body PatchHookApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5109	req, err := NewPatchHookRequestWithApplicationMergePatchPlusJSONBody(c.Server, hookID, params, body)
5110	if err != nil {
5111		return nil, err
5112	}
5113	req = req.WithContext(ctx)
5114	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5115		return nil, err
5116	}
5117	return c.Client.Do(req)
5118}
5119
5120// ListHookDeliveries Read accepted hook delivery metadata
5121//
5122// Historical reads remain available after hook deletion while retained deliveries exist.
5123//
5124// Corresponds with GET /extensions/webhooks/hooks/{hook_id}/deliveries (the `ListHookDeliveries` operationId).
5125func (c *Client) ListHookDeliveries(ctx context.Context, hookID ID, params *ListHookDeliveriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5126	req, err := NewListHookDeliveriesRequest(c.Server, hookID, params)
5127	if err != nil {
5128		return nil, err
5129	}
5130	req = req.WithContext(ctx)
5131	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5132		return nil, err
5133	}
5134	return c.Client.Do(req)
5135}
5136
5137// DeliverWebhookWithBody Accept signed external data durably
5138//
5139// Authenticate configured HMAC-SHA256 over the exact raw body. A daemon bearer is not a substitute. Signature header name and prefix come from hook configuration. Same event ID and body returns original admission; changed body conflicts. Pending inbox limit 1000. Raw body maximum 65536 bytes.
5140//
5141// Takes any type of body and a specified content type.
5142//
5143// Corresponds with POST /extensions/webhooks/hooks/{hook_id}/deliveries (the `DeliverWebhook` operationId).
5144func (c *Client) DeliverWebhookWithBody(ctx context.Context, hookID ID, params *DeliverWebhookParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5145	req, err := NewDeliverWebhookRequestWithBody(c.Server, hookID, params, contentType, body)
5146	if err != nil {
5147		return nil, err
5148	}
5149	req = req.WithContext(ctx)
5150	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5151		return nil, err
5152	}
5153	return c.Client.Do(req)
5154}
5155
5156// RotateHookSecretWithBody Rotate and disclose the hook secret once
5157//
5158// If-Match is the observed hook configuration validator. Missing secret generates one. No automatic retry after a lost response.
5159//
5160// Takes any type of body and a specified content type.
5161//
5162// Corresponds with POST /extensions/webhooks/hooks/{hook_id}/secret (the `RotateHookSecret` operationId).
5163func (c *Client) RotateHookSecretWithBody(ctx context.Context, hookID ID, params *RotateHookSecretParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5164	req, err := NewRotateHookSecretRequestWithBody(c.Server, hookID, params, contentType, body)
5165	if err != nil {
5166		return nil, err
5167	}
5168	req = req.WithContext(ctx)
5169	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5170		return nil, err
5171	}
5172	return c.Client.Do(req)
5173}
5174
5175// RotateHookSecret Rotate and disclose the hook secret once
5176//
5177// If-Match is the observed hook configuration validator. Missing secret generates one. No automatic retry after a lost response.
5178//
5179// Takes a body of the `application/json` content type.
5180//
5181// Corresponds with POST /extensions/webhooks/hooks/{hook_id}/secret (the `RotateHookSecret` operationId).
5182func (c *Client) RotateHookSecret(ctx context.Context, hookID ID, params *RotateHookSecretParams, body RotateHookSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5183	req, err := NewRotateHookSecretRequest(c.Server, hookID, params, body)
5184	if err != nil {
5185		return nil, err
5186	}
5187	req = req.WithContext(ctx)
5188	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5189		return nil, err
5190	}
5191	return c.Client.Do(req)
5192}
5193
5194// GetHookPermission Read agent hook-management permission
5195//
5196// Absent stored permission reads false with its initial canonical validator.
5197//
5198// Corresponds with GET /extensions/webhooks/permissions/{session_id} (the `GetHookPermission` operationId).
5199func (c *Client) GetHookPermission(ctx context.Context, sessionID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
5200	req, err := NewGetHookPermissionRequest(c.Server, sessionID)
5201	if err != nil {
5202		return nil, err
5203	}
5204	req = req.WithContext(ctx)
5205	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5206		return nil, err
5207	}
5208	return c.Client.Do(req)
5209}
5210
5211// PatchHookPermissionWithBody Set agent hook-management permission
5212//
5213// Only operator callers can grant permission. Omission retains it; turning off management keeps existing hooks enabled.
5214//
5215// Takes any type of body and a specified content type.
5216//
5217// Corresponds with PATCH /extensions/webhooks/permissions/{session_id} (the `PatchHookPermission` operationId).
5218func (c *Client) PatchHookPermissionWithBody(ctx context.Context, sessionID ID, params *PatchHookPermissionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5219	req, err := NewPatchHookPermissionRequestWithBody(c.Server, sessionID, params, contentType, body)
5220	if err != nil {
5221		return nil, err
5222	}
5223	req = req.WithContext(ctx)
5224	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5225		return nil, err
5226	}
5227	return c.Client.Do(req)
5228}
5229
5230// PatchHookPermissionWithApplicationMergePatchPlusJSONBody Set agent hook-management permission
5231//
5232// Only operator callers can grant permission. Omission retains it; turning off management keeps existing hooks enabled.
5233//
5234// Takes a body of the `application/merge-patch+json` content type.
5235//
5236// Corresponds with PATCH /extensions/webhooks/permissions/{session_id} (the `PatchHookPermission` operationId).
5237func (c *Client) PatchHookPermissionWithApplicationMergePatchPlusJSONBody(ctx context.Context, sessionID ID, params *PatchHookPermissionParams, body PatchHookPermissionApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5238	req, err := NewPatchHookPermissionRequestWithApplicationMergePatchPlusJSONBody(c.Server, sessionID, params, body)
5239	if err != nil {
5240		return nil, err
5241	}
5242	req = req.WithContext(ctx)
5243	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5244		return nil, err
5245	}
5246	return c.Client.Do(req)
5247}
5248
5249// ListWork List work resources
5250//
5251// Requires enabled extension work. Lists may include bounded page descriptors and glances.
5252//
5253// Corresponds with GET /extensions/work/items (the `ListWork` operationId).
5254func (c *Client) ListWork(ctx context.Context, params *ListWorkParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5255	req, err := NewListWorkRequest(c.Server, params)
5256	if err != nil {
5257		return nil, err
5258	}
5259	req = req.WithContext(ctx)
5260	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5261		return nil, err
5262	}
5263	return c.Client.Do(req)
5264}
5265
5266// CreateWorkWithBody Create a work resource
5267//
5268// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
5269//
5270// Takes any type of body and a specified content type.
5271//
5272// Corresponds with POST /extensions/work/items (the `CreateWork` operationId).
5273func (c *Client) CreateWorkWithBody(ctx context.Context, params *CreateWorkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5274	req, err := NewCreateWorkRequestWithBody(c.Server, params, contentType, body)
5275	if err != nil {
5276		return nil, err
5277	}
5278	req = req.WithContext(ctx)
5279	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5280		return nil, err
5281	}
5282	return c.Client.Do(req)
5283}
5284
5285// CreateWork Create a work resource
5286//
5287// No automatic lost-response retry. Notification outcome does not undo a committed domain edit.
5288//
5289// Takes a body of the `application/json` content type.
5290//
5291// Corresponds with POST /extensions/work/items (the `CreateWork` operationId).
5292func (c *Client) CreateWork(ctx context.Context, params *CreateWorkParams, body CreateWorkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5293	req, err := NewCreateWorkRequest(c.Server, params, body)
5294	if err != nil {
5295		return nil, err
5296	}
5297	req = req.WithContext(ctx)
5298	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5299		return nil, err
5300	}
5301	return c.Client.Do(req)
5302}
5303
5304// DeleteWork Delete a work resource
5305//
5306// Committed deletion remains successful if notification fails. Work items with children cannot be deleted.
5307//
5308// Corresponds with DELETE /extensions/work/items/{item_id} (the `DeleteWork` operationId).
5309func (c *Client) DeleteWork(ctx context.Context, itemID ID, params *DeleteWorkParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5310	req, err := NewDeleteWorkRequest(c.Server, itemID, params)
5311	if err != nil {
5312		return nil, err
5313	}
5314	req = req.WithContext(ctx)
5315	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5316		return nil, err
5317	}
5318	return c.Client.Do(req)
5319}
5320
5321// GetWork Read one work resource
5322//
5323// Corresponds with GET /extensions/work/items/{item_id} (the `GetWork` operationId).
5324func (c *Client) GetWork(ctx context.Context, itemID ID, params *GetWorkParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5325	req, err := NewGetWorkRequest(c.Server, itemID, params)
5326	if err != nil {
5327		return nil, err
5328	}
5329	req = req.WithContext(ctx)
5330	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5331		return nil, err
5332	}
5333	return c.Client.Do(req)
5334}
5335
5336// PatchWorkWithBody Edit a work resource
5337//
5338// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
5339//
5340// Takes any type of body and a specified content type.
5341//
5342// Corresponds with PATCH /extensions/work/items/{item_id} (the `PatchWork` operationId).
5343func (c *Client) PatchWorkWithBody(ctx context.Context, itemID ID, params *PatchWorkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5344	req, err := NewPatchWorkRequestWithBody(c.Server, itemID, params, contentType, body)
5345	if err != nil {
5346		return nil, err
5347	}
5348	req = req.WithContext(ctx)
5349	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5350		return nil, err
5351	}
5352	return c.Client.Do(req)
5353}
5354
5355// PatchWorkWithApplicationMergePatchPlusJSONBody Edit a work resource
5356//
5357// Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry.
5358//
5359// Takes a body of the `application/merge-patch+json` content type.
5360//
5361// Corresponds with PATCH /extensions/work/items/{item_id} (the `PatchWork` operationId).
5362func (c *Client) PatchWorkWithApplicationMergePatchPlusJSONBody(ctx context.Context, itemID ID, params *PatchWorkParams, body PatchWorkApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5363	req, err := NewPatchWorkRequestWithApplicationMergePatchPlusJSONBody(c.Server, itemID, params, body)
5364	if err != nil {
5365		return nil, err
5366	}
5367	req = req.WithContext(ctx)
5368	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5369		return nil, err
5370	}
5371	return c.Client.Do(req)
5372}
5373
5374// ListHosts Read known SSH hosts and cached state
5375//
5376// Requires capability `host_probes: 1`.
5377//
5378// Corresponds with GET /hosts (the `ListHosts` operationId).
5379func (c *Client) ListHosts(ctx context.Context, params *ListHostsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5380	req, err := NewListHostsRequest(c.Server, params)
5381	if err != nil {
5382		return nil, err
5383	}
5384	req = req.WithContext(ctx)
5385	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5386		return nil, err
5387	}
5388	return c.Client.Do(req)
5389}
5390
5391// ProbeHostWithBody Start or join a host probe
5392//
5393// Coalesce repeated probes. Authentication remains an explicit operator handoff; no background SSH sign-in. Requires capability `host_probes: 1`.
5394//
5395// Takes any type of body and a specified content type.
5396//
5397// Corresponds with POST /hosts/{host}/probe (the `ProbeHost` operationId).
5398func (c *Client) ProbeHostWithBody(ctx context.Context, host ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5399	req, err := NewProbeHostRequestWithBody(c.Server, host, contentType, body)
5400	if err != nil {
5401		return nil, err
5402	}
5403	req = req.WithContext(ctx)
5404	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5405		return nil, err
5406	}
5407	return c.Client.Do(req)
5408}
5409
5410// ProbeHost Start or join a host probe
5411//
5412// Coalesce repeated probes. Authentication remains an explicit operator handoff; no background SSH sign-in. Requires capability `host_probes: 1`.
5413//
5414// Takes a body of the `application/json` content type.
5415//
5416// Corresponds with POST /hosts/{host}/probe (the `ProbeHost` operationId).
5417func (c *Client) ProbeHost(ctx context.Context, host ID, body ProbeHostJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5418	req, err := NewProbeHostRequest(c.Server, host, body)
5419	if err != nil {
5420		return nil, err
5421	}
5422	req = req.WithContext(ctx)
5423	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5424		return nil, err
5425	}
5426	return c.Client.Do(req)
5427}
5428
5429// ListModels Read provider model metadata
5430//
5431// In catalogue view, exactly one of provider_profile/provider is required. Endpoint is allowed only with provider. Unknown facts are null. A manual unlisted ID remains usable. Optional model returns one metadata row, including cap_key, for an unlisted manual ID; unknown facts stay null.
5432//
5433// Corresponds with GET /models (the `ListModels` operationId).
5434func (c *Client) ListModels(ctx context.Context, params *ListModelsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5435	req, err := NewListModelsRequest(c.Server, params)
5436	if err != nil {
5437		return nil, err
5438	}
5439	req = req.WithContext(ctx)
5440	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5441		return nil, err
5442	}
5443	return c.Client.Do(req)
5444}
5445
5446// GetServer Read daemon identity and capabilities
5447//
5448// No startup or replacement. Authentication and protocol failures remain actionable errors. Pagination is valid only with include=quota_history.
5449//
5450// Corresponds with GET /server (the `GetServer` operationId).
5451func (c *Client) GetServer(ctx context.Context, params *GetServerParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5452	req, err := NewGetServerRequest(c.Server, params)
5453	if err != nil {
5454		return nil, err
5455	}
5456	req = req.WithContext(ctx)
5457	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5458		return nil, err
5459	}
5460	return c.Client.Do(req)
5461}
5462
5463// ShutdownServerWithBody Drain the identified daemon
5464//
5465// No automatic recovery or replay. The local launcher alone may offer replacement.
5466//
5467// Takes any type of body and a specified content type.
5468//
5469// Corresponds with POST /server/shutdown (the `ShutdownServer` operationId).
5470func (c *Client) ShutdownServerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5471	req, err := NewShutdownServerRequestWithBody(c.Server, contentType, body)
5472	if err != nil {
5473		return nil, err
5474	}
5475	req = req.WithContext(ctx)
5476	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5477		return nil, err
5478	}
5479	return c.Client.Do(req)
5480}
5481
5482// ShutdownServer Drain the identified daemon
5483//
5484// No automatic recovery or replay. The local launcher alone may offer replacement.
5485//
5486// Takes a body of the `application/json` content type.
5487//
5488// Corresponds with POST /server/shutdown (the `ShutdownServer` operationId).
5489func (c *Client) ShutdownServer(ctx context.Context, body ShutdownServerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5490	req, err := NewShutdownServerRequest(c.Server, body)
5491	if err != nil {
5492		return nil, err
5493	}
5494	req = req.WithContext(ctx)
5495	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5496		return nil, err
5497	}
5498	return c.Client.Do(req)
5499}
5500
5501// ListSessions Browse sessions or watch collection changes
5502//
5503// JSON defaults to roots, or all with parent/family. Parent and family are exclusive. Explicit roots with either is invalid. SSE accepts the same scope filters, excluding sort/limit/next; no cursor or replay. Subscribe, wait for ready, then read pages. Closure or overflow repeats this flow.
5504//
5505// Corresponds with GET /sessions (the `ListSessions` operationId).
5506func (c *Client) ListSessions(ctx context.Context, params *ListSessionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5507	req, err := NewListSessionsRequest(c.Server, params)
5508	if err != nil {
5509		return nil, err
5510	}
5511	req = req.WithContext(ctx)
5512	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5513		return nil, err
5514	}
5515	return c.Client.Do(req)
5516}
5517
5518// DeleteSession Delete a leaf or captured subtree
5519//
5520// Leaf requires idle and no children. Subtree requires family_revision, gates new children, interrupts captured members and deletes deepest first. Partial outcomes are explicit. Refresh before confirming a new attempt; never automatically replay after transport loss.
5521//
5522// Corresponds with DELETE /sessions/{session_id} (the `DeleteSession` operationId).
5523func (c *Client) DeleteSession(ctx context.Context, sessionID ID, params *DeleteSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5524	req, err := NewDeleteSessionRequest(c.Server, sessionID, params)
5525	if err != nil {
5526		return nil, err
5527	}
5528	req = req.WithContext(ctx)
5529	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5530		return nil, err
5531	}
5532	return c.Client.Do(req)
5533}
5534
5535// GetSession Read or watch one session
5536//
5537// JSON defaults to complete Session. Configuration JSON excludes tail and replay parameters. SSE accepts tail and after_generation/after_seq, without view. Initial subscription omits both cursors; reconnect keeps the fully consumed pair. A missing generation requests reset. after_generation without after_seq is invalid. Neither auth failure nor closure starts a daemon.
5538//
5539// Corresponds with GET /sessions/{session_id} (the `GetSession` operationId).
5540func (c *Client) GetSession(ctx context.Context, sessionID ID, params *GetSessionParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5541	req, err := NewGetSessionRequest(c.Server, sessionID, params)
5542	if err != nil {
5543		return nil, err
5544	}
5545	req = req.WithContext(ctx)
5546	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5547		return nil, err
5548	}
5549	return c.Client.Do(req)
5550}
5551
5552// PatchSessionWithBody Edit configuration or move workspace
5553//
5554// Use the observed configuration URL and validator. Workspace is a standalone change with family_revision. Busy target fails before commit; busy descendants follow a committed parent move at idle. Other configuration fields commit together. No automatic lost-response retry.
5555//
5556// Takes any type of body and a specified content type.
5557//
5558// Corresponds with PATCH /sessions/{session_id} (the `PatchSession` operationId).
5559func (c *Client) PatchSessionWithBody(ctx context.Context, sessionID ID, params *PatchSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5560	req, err := NewPatchSessionRequestWithBody(c.Server, sessionID, params, contentType, body)
5561	if err != nil {
5562		return nil, err
5563	}
5564	req = req.WithContext(ctx)
5565	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5566		return nil, err
5567	}
5568	return c.Client.Do(req)
5569}
5570
5571// PatchSessionWithApplicationMergePatchPlusJSONBody Edit configuration or move workspace
5572//
5573// Use the observed configuration URL and validator. Workspace is a standalone change with family_revision. Busy target fails before commit; busy descendants follow a committed parent move at idle. Other configuration fields commit together. No automatic lost-response retry.
5574//
5575// Takes a body of the `application/merge-patch+json` content type.
5576//
5577// Corresponds with PATCH /sessions/{session_id} (the `PatchSession` operationId).
5578func (c *Client) PatchSessionWithApplicationMergePatchPlusJSONBody(ctx context.Context, sessionID ID, params *PatchSessionParams, body PatchSessionApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5579	req, err := NewPatchSessionRequestWithApplicationMergePatchPlusJSONBody(c.Server, sessionID, params, body)
5580	if err != nil {
5581		return nil, err
5582	}
5583	req = req.WithContext(ctx)
5584	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5585		return nil, err
5586	}
5587	return c.Client.Do(req)
5588}
5589
5590// CreateSessionWithBody Create a new, forked or child session
5591//
5592// Session ID must be UUIDv7. If-None-Match:* is required. Retain the identity and submitted intent after response loss. An existing resource returns 412; GET creation.submitted proves original intent. Child membership and task admission commit together.
5593//
5594// Takes any type of body and a specified content type.
5595//
5596// Corresponds with PUT /sessions/{session_id} (the `CreateSession` operationId).
5597func (c *Client) CreateSessionWithBody(ctx context.Context, sessionID UUIDv7, params *CreateSessionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5598	req, err := NewCreateSessionRequestWithBody(c.Server, sessionID, params, contentType, body)
5599	if err != nil {
5600		return nil, err
5601	}
5602	req = req.WithContext(ctx)
5603	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5604		return nil, err
5605	}
5606	return c.Client.Do(req)
5607}
5608
5609// CreateSession Create a new, forked or child session
5610//
5611// Session ID must be UUIDv7. If-None-Match:* is required. Retain the identity and submitted intent after response loss. An existing resource returns 412; GET creation.submitted proves original intent. Child membership and task admission commit together.
5612//
5613// Takes a body of the `application/json` content type.
5614//
5615// Corresponds with PUT /sessions/{session_id} (the `CreateSession` operationId).
5616func (c *Client) CreateSession(ctx context.Context, sessionID UUIDv7, params *CreateSessionParams, body CreateSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5617	req, err := NewCreateSessionRequest(c.Server, sessionID, params, body)
5618	if err != nil {
5619		return nil, err
5620	}
5621	req = req.WithContext(ctx)
5622	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5623		return nil, err
5624	}
5625	return c.Client.Do(req)
5626}
5627
5628// GetActiveOutputContent Read unfinished output at a captured snapshot cutoff
5629//
5630// Pages contain at most 262144 UTF-8 bytes and remain within the captured cutoff. Preserve the required snapshot query when following next.
5631//
5632// Corresponds with GET /sessions/{session_id}/active-output/{content_id} (the `GetActiveOutputContent` operationId).
5633func (c *Client) GetActiveOutputContent(ctx context.Context, sessionID ID, contentID ID, params *GetActiveOutputContentParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5634	req, err := NewGetActiveOutputContentRequest(c.Server, sessionID, contentID, params)
5635	if err != nil {
5636		return nil, err
5637	}
5638	req = req.WithContext(ctx)
5639	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5640		return nil, err
5641	}
5642	return c.Client.Do(req)
5643}
5644
5645// GetCatalog Discover candidates, loaded commands and pages
5646//
5647// Discovery and loaded composition are separate. Reads do not reload. Continuation identifies its section; candidate revision guards discovery-based selection. Requires capability `catalog: 1`.
5648//
5649// Corresponds with GET /sessions/{session_id}/catalog (the `GetCatalog` operationId).
5650func (c *Client) GetCatalog(ctx context.Context, sessionID ID, params *GetCatalogParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5651	req, err := NewGetCatalogRequest(c.Server, sessionID, params)
5652	if err != nil {
5653		return nil, err
5654	}
5655	req = req.WithContext(ctx)
5656	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5657		return nil, err
5658	}
5659	return c.Client.Do(req)
5660}
5661
5662// CompactSessionWithBody Compact model context while retaining history
5663//
5664// Idle required. Selecting a strategy can succeed even if compaction later fails; report both. Full durable history stays intact. No automatic retry.
5665//
5666// Takes any type of body and a specified content type.
5667//
5668// Corresponds with POST /sessions/{session_id}/compaction (the `CompactSession` operationId).
5669func (c *Client) CompactSessionWithBody(ctx context.Context, sessionID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5670	req, err := NewCompactSessionRequestWithBody(c.Server, sessionID, contentType, body)
5671	if err != nil {
5672		return nil, err
5673	}
5674	req = req.WithContext(ctx)
5675	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5676		return nil, err
5677	}
5678	return c.Client.Do(req)
5679}
5680
5681// CompactSession Compact model context while retaining history
5682//
5683// Idle required. Selecting a strategy can succeed even if compaction later fails; report both. Full durable history stays intact. No automatic retry.
5684//
5685// Takes a body of the `application/json` content type.
5686//
5687// Corresponds with POST /sessions/{session_id}/compaction (the `CompactSession` operationId).
5688func (c *Client) CompactSession(ctx context.Context, sessionID ID, body CompactSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5689	req, err := NewCompactSessionRequest(c.Server, sessionID, body)
5690	if err != nil {
5691		return nil, err
5692	}
5693	req = req.WithContext(ctx)
5694	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5695		return nil, err
5696	}
5697	return c.Client.Do(req)
5698}
5699
5700// GetContext Inspect prepared context or request records
5701//
5702// Summary never prepares a request. Section requires snapshot_id, section_id, page and forbids request-pagination fields. Requests accepts after/limit/next. Stale snapshot is 410 context_changed, never another section. Requires capability `context: 1`.
5703//
5704// Corresponds with GET /sessions/{session_id}/context (the `GetContext` operationId).
5705func (c *Client) GetContext(ctx context.Context, sessionID ID, params *GetContextParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5706	req, err := NewGetContextRequest(c.Server, sessionID, params)
5707	if err != nil {
5708		return nil, err
5709	}
5710	req = req.WithContext(ctx)
5711	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5712		return nil, err
5713	}
5714	return c.Client.Do(req)
5715}
5716
5717// GetHistory Page history or fork checkpoints
5718//
5719// Use only one of before/after/next. Durable positions are independent of actor replay. Pages are ascending and preserve complete display groups where bounded.
5720//
5721// Corresponds with GET /sessions/{session_id}/history (the `GetHistory` operationId).
5722func (c *Client) GetHistory(ctx context.Context, sessionID ID, params *GetHistoryParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5723	req, err := NewGetHistoryRequest(c.Server, sessionID, params)
5724	if err != nil {
5725		return nil, err
5726	}
5727	req = req.WithContext(ctx)
5728	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5729		return nil, err
5730	}
5731	return c.Client.Do(req)
5732}
5733
5734// GetHistoryContent Read full content in bounded pieces
5735//
5736// Follow next until null. UTF-8 pieces end at character boundaries. Reconstruct stored content, not shortened previews. Image fields are not paged here; their references name the image resource.
5737//
5738// Corresponds with GET /sessions/{session_id}/history/{entry_id} (the `GetHistoryContent` operationId).
5739func (c *Client) GetHistoryContent(ctx context.Context, sessionID ID, entryID ID, params *GetHistoryContentParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
5740	req, err := NewGetHistoryContentRequest(c.Server, sessionID, entryID, params)
5741	if err != nil {
5742		return nil, err
5743	}
5744	req = req.WithContext(ctx)
5745	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5746		return nil, err
5747	}
5748	return c.Client.Do(req)
5749}
5750
5751// GetHistoryImage Read one image field as its own bytes
5752//
5753// Image references in history point here. The body is the stored image itself, not base64, and is never content-coded.
5754//
5755// Corresponds with GET /sessions/{session_id}/history/{entry_id}/{field} (the `GetHistoryImage` operationId).
5756func (c *Client) GetHistoryImage(ctx context.Context, sessionID ID, entryID ID, field string, reqEditors ...RequestEditorFn) (*http.Response, error) {
5757	req, err := NewGetHistoryImageRequest(c.Server, sessionID, entryID, field)
5758	if err != nil {
5759		return nil, err
5760	}
5761	req = req.WithContext(ctx)
5762	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5763		return nil, err
5764	}
5765	return c.Client.Do(req)
5766}
5767
5768// GetInput Read a durable input outcome
5769//
5770// Available after session deletion. Accepted is not consumed or answered. Retain pending and unfinished-turn identities; terminal decisions last seven days. Unknown old UUIDv7 returns 410, never a fresh admission.
5771//
5772// Corresponds with GET /sessions/{session_id}/inputs/{input_id} (the `GetInput` operationId).
5773func (c *Client) GetInput(ctx context.Context, sessionID ID, inputID ID, reqEditors ...RequestEditorFn) (*http.Response, error) {
5774	req, err := NewGetInputRequest(c.Server, sessionID, inputID)
5775	if err != nil {
5776		return nil, err
5777	}
5778	req = req.WithContext(ctx)
5779	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5780		return nil, err
5781	}
5782	return c.Client.Do(req)
5783}
5784
5785// PutInputWithBody Admit immutable identified input
5786//
5787// Input ID is UUIDv7. Duplicate lookup precedes mutable validation and returns the original admission status with current delivery. Queue-full rejection remains rejected. No If-None-Match. Preserve the exact intent and identity while recovering an uncertain response.
5788//
5789// Takes any type of body and a specified content type.
5790//
5791// Corresponds with PUT /sessions/{session_id}/inputs/{input_id} (the `PutInput` operationId).
5792func (c *Client) PutInputWithBody(ctx context.Context, sessionID ID, inputID UUIDv7, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5793	req, err := NewPutInputRequestWithBody(c.Server, sessionID, inputID, contentType, body)
5794	if err != nil {
5795		return nil, err
5796	}
5797	req = req.WithContext(ctx)
5798	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5799		return nil, err
5800	}
5801	return c.Client.Do(req)
5802}
5803
5804// PutInput Admit immutable identified input
5805//
5806// Input ID is UUIDv7. Duplicate lookup precedes mutable validation and returns the original admission status with current delivery. Queue-full rejection remains rejected. No If-None-Match. Preserve the exact intent and identity while recovering an uncertain response.
5807//
5808// Takes a body of the `application/json` content type.
5809//
5810// Corresponds with PUT /sessions/{session_id}/inputs/{input_id} (the `PutInput` operationId).
5811func (c *Client) PutInput(ctx context.Context, sessionID ID, inputID UUIDv7, body PutInputJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5812	req, err := NewPutInputRequest(c.Server, sessionID, inputID, body)
5813	if err != nil {
5814		return nil, err
5815	}
5816	req = req.WithContext(ctx)
5817	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5818		return nil, err
5819	}
5820	return c.Client.Do(req)
5821}
5822
5823// CancelInputWithBody Cancel or interrupt only this input
5824//
5825// Never interrupts a later unrelated turn. shared_running leaves a shared turn running; retry only inspects or acts on this same input.
5826//
5827// Takes any type of body and a specified content type.
5828//
5829// Corresponds with POST /sessions/{session_id}/inputs/{input_id}/cancel (the `CancelInput` operationId).
5830func (c *Client) CancelInputWithBody(ctx context.Context, sessionID ID, inputID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5831	req, err := NewCancelInputRequestWithBody(c.Server, sessionID, inputID, contentType, body)
5832	if err != nil {
5833		return nil, err
5834	}
5835	req = req.WithContext(ctx)
5836	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5837		return nil, err
5838	}
5839	return c.Client.Do(req)
5840}
5841
5842// CancelInput Cancel or interrupt only this input
5843//
5844// Never interrupts a later unrelated turn. shared_running leaves a shared turn running; retry only inspects or acts on this same input.
5845//
5846// Takes a body of the `application/json` content type.
5847//
5848// Corresponds with POST /sessions/{session_id}/inputs/{input_id}/cancel (the `CancelInput` operationId).
5849func (c *Client) CancelInput(ctx context.Context, sessionID ID, inputID ID, body CancelInputJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5850	req, err := NewCancelInputRequest(c.Server, sessionID, inputID, body)
5851	if err != nil {
5852		return nil, err
5853	}
5854	req = req.WithContext(ctx)
5855	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5856		return nil, err
5857	}
5858	return c.Client.Do(req)
5859}
5860
5861// InterruptSessionWithBody Interrupt a captured run and waiting prefix
5862//
5863// Capture run_id and through_input_order from the installed session. Retry cannot interrupt a later run or cancel newer inputs.
5864//
5865// Takes any type of body and a specified content type.
5866//
5867// Corresponds with POST /sessions/{session_id}/interrupt (the `InterruptSession` operationId).
5868func (c *Client) InterruptSessionWithBody(ctx context.Context, sessionID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5869	req, err := NewInterruptSessionRequestWithBody(c.Server, sessionID, contentType, body)
5870	if err != nil {
5871		return nil, err
5872	}
5873	req = req.WithContext(ctx)
5874	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5875		return nil, err
5876	}
5877	return c.Client.Do(req)
5878}
5879
5880// InterruptSession Interrupt a captured run and waiting prefix
5881//
5882// Capture run_id and through_input_order from the installed session. Retry cannot interrupt a later run or cancel newer inputs.
5883//
5884// Takes a body of the `application/json` content type.
5885//
5886// Corresponds with POST /sessions/{session_id}/interrupt (the `InterruptSession` operationId).
5887func (c *Client) InterruptSession(ctx context.Context, sessionID ID, body InterruptSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5888	req, err := NewInterruptSessionRequest(c.Server, sessionID, body)
5889	if err != nil {
5890		return nil, err
5891	}
5892	req = req.WithContext(ctx)
5893	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5894		return nil, err
5895	}
5896	return c.Client.Do(req)
5897}
5898
5899// UpgradeKernelWithBody Explicitly upgrade an idle kernel
5900//
5901// Stage and validate before swap. Report external jobs stopped during an unsuccessful upgrade; do not claim them restored. No automatic retry.
5902//
5903// Takes any type of body and a specified content type.
5904//
5905// Corresponds with POST /sessions/{session_id}/kernel/upgrade (the `UpgradeKernel` operationId).
5906func (c *Client) UpgradeKernelWithBody(ctx context.Context, sessionID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5907	req, err := NewUpgradeKernelRequestWithBody(c.Server, sessionID, contentType, body)
5908	if err != nil {
5909		return nil, err
5910	}
5911	req = req.WithContext(ctx)
5912	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5913		return nil, err
5914	}
5915	return c.Client.Do(req)
5916}
5917
5918// UpgradeKernel Explicitly upgrade an idle kernel
5919//
5920// Stage and validate before swap. Report external jobs stopped during an unsuccessful upgrade; do not claim them restored. No automatic retry.
5921//
5922// Takes a body of the `application/json` content type.
5923//
5924// Corresponds with POST /sessions/{session_id}/kernel/upgrade (the `UpgradeKernel` operationId).
5925func (c *Client) UpgradeKernel(ctx context.Context, sessionID ID, body UpgradeKernelJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5926	req, err := NewUpgradeKernelRequest(c.Server, sessionID, body)
5927	if err != nil {
5928		return nil, err
5929	}
5930	req = req.WithContext(ctx)
5931	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5932		return nil, err
5933	}
5934	return c.Client.Do(req)
5935}
5936
5937// ReloadSessionWithBody Reload composition, models or both
5938//
5939// Session reload requires idle. Both targets return separate outcomes, preserving confirmed success when the other fails. Lost-response replay is not automatic.
5940//
5941// Takes any type of body and a specified content type.
5942//
5943// Corresponds with POST /sessions/{session_id}/reload (the `ReloadSession` operationId).
5944func (c *Client) ReloadSessionWithBody(ctx context.Context, sessionID ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5945	req, err := NewReloadSessionRequestWithBody(c.Server, sessionID, contentType, body)
5946	if err != nil {
5947		return nil, err
5948	}
5949	req = req.WithContext(ctx)
5950	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5951		return nil, err
5952	}
5953	return c.Client.Do(req)
5954}
5955
5956// ReloadSession Reload composition, models or both
5957//
5958// Session reload requires idle. Both targets return separate outcomes, preserving confirmed success when the other fails. Lost-response replay is not automatic.
5959//
5960// Takes a body of the `application/json` content type.
5961//
5962// Corresponds with POST /sessions/{session_id}/reload (the `ReloadSession` operationId).
5963func (c *Client) ReloadSession(ctx context.Context, sessionID ID, body ReloadSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
5964	req, err := NewReloadSessionRequest(c.Server, sessionID, body)
5965	if err != nil {
5966		return nil, err
5967	}
5968	req = req.WithContext(ctx)
5969	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5970		return nil, err
5971	}
5972	return c.Client.Do(req)
5973}
5974
5975// RecordVisitWithBody Count one deliberate opening
5976//
5977// Visit ID is UUIDv7. Same identity increments once; reads and refreshes never count.
5978//
5979// Takes any type of body and a specified content type.
5980//
5981// Corresponds with PUT /sessions/{session_id}/visits/{visit_id} (the `RecordVisit` operationId).
5982func (c *Client) RecordVisitWithBody(ctx context.Context, sessionID ID, visitID UUIDv7, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
5983	req, err := NewRecordVisitRequestWithBody(c.Server, sessionID, visitID, contentType, body)
5984	if err != nil {
5985		return nil, err
5986	}
5987	req = req.WithContext(ctx)
5988	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
5989		return nil, err
5990	}
5991	return c.Client.Do(req)
5992}
5993
5994// RecordVisit Count one deliberate opening
5995//
5996// Visit ID is UUIDv7. Same identity increments once; reads and refreshes never count.
5997//
5998// Takes a body of the `application/json` content type.
5999//
6000// Corresponds with PUT /sessions/{session_id}/visits/{visit_id} (the `RecordVisit` operationId).
6001func (c *Client) RecordVisit(ctx context.Context, sessionID ID, visitID UUIDv7, body RecordVisitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
6002	req, err := NewRecordVisitRequest(c.Server, sessionID, visitID, body)
6003	if err != nil {
6004		return nil, err
6005	}
6006	req = req.WithContext(ctx)
6007	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
6008		return nil, err
6009	}
6010	return c.Client.Do(req)
6011}
6012
6013// GetSettings Read shared settings or one canonical group
6014//
6015// Without group, return Settings and observed group validators. With group, return that group only; the ETag covers that representation.
6016//
6017// Corresponds with GET /settings (the `GetSettings` operationId).
6018func (c *Client) GetSettings(ctx context.Context, params *GetSettingsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
6019	req, err := NewGetSettingsRequest(c.Server, params)
6020	if err != nil {
6021		return nil, err
6022	}
6023	req = req.WithContext(ctx)
6024	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
6025		return nil, err
6026	}
6027	return c.Client.Do(req)
6028}
6029
6030// PatchSettingsWithBody Atomically edit one settings group
6031//
6032// Query group selects its corresponding schema. Omitted fields keep values. Null removes only nullable fields or map entries. Candidate validation precedes the complete group commit. No lost-response retry.
6033//
6034// Takes any type of body and a specified content type.
6035//
6036// Corresponds with PATCH /settings (the `PatchSettings` operationId).
6037func (c *Client) PatchSettingsWithBody(ctx context.Context, params *PatchSettingsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
6038	req, err := NewPatchSettingsRequestWithBody(c.Server, params, contentType, body)
6039	if err != nil {
6040		return nil, err
6041	}
6042	req = req.WithContext(ctx)
6043	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
6044		return nil, err
6045	}
6046	return c.Client.Do(req)
6047}
6048
6049// PatchSettingsWithApplicationMergePatchPlusJSONBody Atomically edit one settings group
6050//
6051// Query group selects its corresponding schema. Omitted fields keep values. Null removes only nullable fields or map entries. Candidate validation precedes the complete group commit. No lost-response retry.
6052//
6053// Takes a body of the `application/merge-patch+json` content type.
6054//
6055// Corresponds with PATCH /settings (the `PatchSettings` operationId).
6056func (c *Client) PatchSettingsWithApplicationMergePatchPlusJSONBody(ctx context.Context, params *PatchSettingsParams, body PatchSettingsApplicationMergePatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
6057	req, err := NewPatchSettingsRequestWithApplicationMergePatchPlusJSONBody(c.Server, params, body)
6058	if err != nil {
6059		return nil, err
6060	}
6061	req = req.WithContext(ctx)
6062	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
6063		return nil, err
6064	}
6065	return c.Client.Do(req)
6066}
6067
6068// GetStorage Read storage accounting
6069//
6070// Each section has its own continuation. Totals cover complete storage. Paths never authorize local mutation. Requires capability `storage_report: 1`.
6071//
6072// Corresponds with GET /storage (the `GetStorage` operationId).
6073func (c *Client) GetStorage(ctx context.Context, params *GetStorageParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
6074	req, err := NewGetStorageRequest(c.Server, params)
6075	if err != nil {
6076		return nil, err
6077	}
6078	req = req.WithContext(ctx)
6079	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
6080		return nil, err
6081	}
6082	return c.Client.Do(req)
6083}
6084
6085// GetWorkspaces Browse recent locations or a directory
6086//
6087// Without location return recent workspaces. include=preview requires location. Paths resolve on the daemon host; cached host state does not perform SSH sign-in. Requires capability `workspace_browsing: 1`.
6088//
6089// Corresponds with GET /workspaces (the `GetWorkspaces` operationId).
6090func (c *Client) GetWorkspaces(ctx context.Context, params *GetWorkspacesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
6091	req, err := NewGetWorkspacesRequest(c.Server, params)
6092	if err != nil {
6093		return nil, err
6094	}
6095	req = req.WithContext(ctx)
6096	if err := c.applyEditors(ctx, req, reqEditors); err != nil {
6097		return nil, err
6098	}
6099	return c.Client.Do(req)
6100}
6101
6102// NewGetAuthRequest constructs an http.Request for the GetAuth method
6103func NewGetAuthRequest(server string) (*http.Request, error) {
6104	var err error
6105
6106	serverURL, err := url.Parse(server)
6107	if err != nil {
6108		return nil, err
6109	}
6110
6111	operationPath := fmt.Sprintf("/auth")
6112	if operationPath[0] == '/' {
6113		operationPath = "." + operationPath
6114	}
6115
6116	queryURL, err := serverURL.Parse(operationPath)
6117	if err != nil {
6118		return nil, err
6119	}
6120
6121	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
6122	if err != nil {
6123		return nil, err
6124	}
6125
6126	return req, nil
6127}
6128
6129// NewDeleteAccountRequest constructs an http.Request for the DeleteAccount method
6130func NewDeleteAccountRequest(server string, accountID ID) (*http.Request, error) {
6131	var err error
6132
6133	var pathParam0 string
6134
6135	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "account_id", accountID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6136	if err != nil {
6137		return nil, err
6138	}
6139
6140	serverURL, err := url.Parse(server)
6141	if err != nil {
6142		return nil, err
6143	}
6144
6145	operationPath := fmt.Sprintf("/auth/accounts/%s", pathParam0)
6146	if operationPath[0] == '/' {
6147		operationPath = "." + operationPath
6148	}
6149
6150	queryURL, err := serverURL.Parse(operationPath)
6151	if err != nil {
6152		return nil, err
6153	}
6154
6155	req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
6156	if err != nil {
6157		return nil, err
6158	}
6159
6160	return req, nil
6161}
6162
6163// NewCancelLoginRequest constructs an http.Request for the CancelLogin method
6164func NewCancelLoginRequest(server string, loginID ID) (*http.Request, error) {
6165	var err error
6166
6167	var pathParam0 string
6168
6169	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "login_id", loginID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6170	if err != nil {
6171		return nil, err
6172	}
6173
6174	serverURL, err := url.Parse(server)
6175	if err != nil {
6176		return nil, err
6177	}
6178
6179	operationPath := fmt.Sprintf("/auth/logins/%s", pathParam0)
6180	if operationPath[0] == '/' {
6181		operationPath = "." + operationPath
6182	}
6183
6184	queryURL, err := serverURL.Parse(operationPath)
6185	if err != nil {
6186		return nil, err
6187	}
6188
6189	req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
6190	if err != nil {
6191		return nil, err
6192	}
6193
6194	return req, nil
6195}
6196
6197// NewGetLoginRequest constructs an http.Request for the GetLogin method
6198func NewGetLoginRequest(server string, loginID ID) (*http.Request, error) {
6199	var err error
6200
6201	var pathParam0 string
6202
6203	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "login_id", loginID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6204	if err != nil {
6205		return nil, err
6206	}
6207
6208	serverURL, err := url.Parse(server)
6209	if err != nil {
6210		return nil, err
6211	}
6212
6213	operationPath := fmt.Sprintf("/auth/logins/%s", pathParam0)
6214	if operationPath[0] == '/' {
6215		operationPath = "." + operationPath
6216	}
6217
6218	queryURL, err := serverURL.Parse(operationPath)
6219	if err != nil {
6220		return nil, err
6221	}
6222
6223	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
6224	if err != nil {
6225		return nil, err
6226	}
6227
6228	return req, nil
6229}
6230
6231// NewAnswerLoginRequestWithApplicationMergePatchPlusJSONBody calls the generic AnswerLogin builder with application/merge-patch+json body
6232func NewAnswerLoginRequestWithApplicationMergePatchPlusJSONBody(server string, loginID ID, params *AnswerLoginParams, body AnswerLoginApplicationMergePatchPlusJSONRequestBody) (*http.Request, error) {
6233	var bodyReader io.Reader
6234	buf, err := json.Marshal(body)
6235	if err != nil {
6236		return nil, err
6237	}
6238	bodyReader = bytes.NewReader(buf)
6239	return NewAnswerLoginRequestWithBody(server, loginID, params, "application/merge-patch+json", bodyReader)
6240}
6241
6242// NewAnswerLoginRequestWithBody constructs an http.Request for the AnswerLogin method, with any body, and a specified content type
6243func NewAnswerLoginRequestWithBody(server string, loginID ID, params *AnswerLoginParams, contentType string, body io.Reader) (*http.Request, error) {
6244	var err error
6245
6246	var pathParam0 string
6247
6248	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "login_id", loginID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6249	if err != nil {
6250		return nil, err
6251	}
6252
6253	serverURL, err := url.Parse(server)
6254	if err != nil {
6255		return nil, err
6256	}
6257
6258	operationPath := fmt.Sprintf("/auth/logins/%s", pathParam0)
6259	if operationPath[0] == '/' {
6260		operationPath = "." + operationPath
6261	}
6262
6263	queryURL, err := serverURL.Parse(operationPath)
6264	if err != nil {
6265		return nil, err
6266	}
6267
6268	req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
6269	if err != nil {
6270		return nil, err
6271	}
6272
6273	req.Header.Add("Content-Type", contentType)
6274
6275	if params != nil {
6276
6277		var headerParam0 string
6278
6279		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
6280		if err != nil {
6281			return nil, err
6282		}
6283
6284		req.Header.Set("If-Match", headerParam0)
6285
6286	}
6287
6288	return req, nil
6289}
6290
6291// NewCreateLoginRequest calls the generic CreateLogin builder with application/json body
6292func NewCreateLoginRequest(server string, loginID UUIDv7, body CreateLoginJSONRequestBody) (*http.Request, error) {
6293	var bodyReader io.Reader
6294	buf, err := json.Marshal(body)
6295	if err != nil {
6296		return nil, err
6297	}
6298	bodyReader = bytes.NewReader(buf)
6299	return NewCreateLoginRequestWithBody(server, loginID, "application/json", bodyReader)
6300}
6301
6302// NewCreateLoginRequestWithBody constructs an http.Request for the CreateLogin method, with any body, and a specified content type
6303func NewCreateLoginRequestWithBody(server string, loginID UUIDv7, contentType string, body io.Reader) (*http.Request, error) {
6304	var err error
6305
6306	var pathParam0 string
6307
6308	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "login_id", loginID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"})
6309	if err != nil {
6310		return nil, err
6311	}
6312
6313	serverURL, err := url.Parse(server)
6314	if err != nil {
6315		return nil, err
6316	}
6317
6318	operationPath := fmt.Sprintf("/auth/logins/%s", pathParam0)
6319	if operationPath[0] == '/' {
6320		operationPath = "." + operationPath
6321	}
6322
6323	queryURL, err := serverURL.Parse(operationPath)
6324	if err != nil {
6325		return nil, err
6326	}
6327
6328	req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
6329	if err != nil {
6330		return nil, err
6331	}
6332
6333	req.Header.Add("Content-Type", contentType)
6334
6335	return req, nil
6336}
6337
6338// NewUnlinkWorkspaceRequest constructs an http.Request for the UnlinkWorkspace method
6339func NewUnlinkWorkspaceRequest(server string, params *UnlinkWorkspaceParams) (*http.Request, error) {
6340	var err error
6341
6342	serverURL, err := url.Parse(server)
6343	if err != nil {
6344		return nil, err
6345	}
6346
6347	operationPath := fmt.Sprintf("/extensions/links/groups")
6348	if operationPath[0] == '/' {
6349		operationPath = "." + operationPath
6350	}
6351
6352	queryURL, err := serverURL.Parse(operationPath)
6353	if err != nil {
6354		return nil, err
6355	}
6356
6357	if params != nil {
6358		// queryValues collects non-styled parameters (passthrough, JSON)
6359		// that are safe to round-trip through url.Values.Encode().
6360		queryValues := queryURL.Query()
6361		// rawQueryFragments collects pre-encoded query fragments from
6362		// styled parameters, preserving literal commas as delimiters
6363		// per the OpenAPI spec (e.g. "color=blue,black,brown").
6364		var rawQueryFragments []string
6365
6366		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6367			return nil, err
6368		} else {
6369			for _, qp := range strings.Split(queryFrag, "&") {
6370				rawQueryFragments = append(rawQueryFragments, qp)
6371			}
6372		}
6373
6374		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "member", params.Member, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6375			return nil, err
6376		} else {
6377			for _, qp := range strings.Split(queryFrag, "&") {
6378				rawQueryFragments = append(rawQueryFragments, qp)
6379			}
6380		}
6381
6382		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6383			return nil, err
6384		} else {
6385			for _, qp := range strings.Split(queryFrag, "&") {
6386				rawQueryFragments = append(rawQueryFragments, qp)
6387			}
6388		}
6389
6390		if encoded := queryValues.Encode(); encoded != "" {
6391			rawQueryFragments = append(rawQueryFragments, encoded)
6392		}
6393		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
6394	}
6395
6396	req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
6397	if err != nil {
6398		return nil, err
6399	}
6400
6401	if params != nil {
6402
6403		var headerParam0 string
6404
6405		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
6406		if err != nil {
6407			return nil, err
6408		}
6409
6410		req.Header.Set("If-Match", headerParam0)
6411
6412	}
6413
6414	return req, nil
6415}
6416
6417// NewGetLinkGroupRequest constructs an http.Request for the GetLinkGroup method
6418func NewGetLinkGroupRequest(server string, params *GetLinkGroupParams) (*http.Request, error) {
6419	var err error
6420
6421	serverURL, err := url.Parse(server)
6422	if err != nil {
6423		return nil, err
6424	}
6425
6426	operationPath := fmt.Sprintf("/extensions/links/groups")
6427	if operationPath[0] == '/' {
6428		operationPath = "." + operationPath
6429	}
6430
6431	queryURL, err := serverURL.Parse(operationPath)
6432	if err != nil {
6433		return nil, err
6434	}
6435
6436	if params != nil {
6437		// queryValues collects non-styled parameters (passthrough, JSON)
6438		// that are safe to round-trip through url.Values.Encode().
6439		queryValues := queryURL.Query()
6440		// rawQueryFragments collects pre-encoded query fragments from
6441		// styled parameters, preserving literal commas as delimiters
6442		// per the OpenAPI spec (e.g. "color=blue,black,brown").
6443		var rawQueryFragments []string
6444
6445		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6446			return nil, err
6447		} else {
6448			for _, qp := range strings.Split(queryFrag, "&") {
6449				rawQueryFragments = append(rawQueryFragments, qp)
6450			}
6451		}
6452
6453		if params.View != nil {
6454
6455			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", *params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6456				return nil, err
6457			} else {
6458				for _, qp := range strings.Split(queryFrag, "&") {
6459					rawQueryFragments = append(rawQueryFragments, qp)
6460				}
6461			}
6462
6463		}
6464
6465		if params.Limit != nil {
6466
6467			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
6468				return nil, err
6469			} else {
6470				for _, qp := range strings.Split(queryFrag, "&") {
6471					rawQueryFragments = append(rawQueryFragments, qp)
6472				}
6473			}
6474
6475		}
6476
6477		if params.Next != nil {
6478
6479			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6480				return nil, err
6481			} else {
6482				for _, qp := range strings.Split(queryFrag, "&") {
6483					rawQueryFragments = append(rawQueryFragments, qp)
6484				}
6485			}
6486
6487		}
6488
6489		if encoded := queryValues.Encode(); encoded != "" {
6490			rawQueryFragments = append(rawQueryFragments, encoded)
6491		}
6492		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
6493	}
6494
6495	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
6496	if err != nil {
6497		return nil, err
6498	}
6499
6500	return req, nil
6501}
6502
6503// NewMergeLinkGroupsRequest calls the generic MergeLinkGroups builder with application/json body
6504func NewMergeLinkGroupsRequest(server string, params *MergeLinkGroupsParams, body MergeLinkGroupsJSONRequestBody) (*http.Request, error) {
6505	var bodyReader io.Reader
6506	buf, err := json.Marshal(body)
6507	if err != nil {
6508		return nil, err
6509	}
6510	bodyReader = bytes.NewReader(buf)
6511	return NewMergeLinkGroupsRequestWithBody(server, params, "application/json", bodyReader)
6512}
6513
6514// NewMergeLinkGroupsRequestWithBody constructs an http.Request for the MergeLinkGroups method, with any body, and a specified content type
6515func NewMergeLinkGroupsRequestWithBody(server string, params *MergeLinkGroupsParams, contentType string, body io.Reader) (*http.Request, error) {
6516	var err error
6517
6518	serverURL, err := url.Parse(server)
6519	if err != nil {
6520		return nil, err
6521	}
6522
6523	operationPath := fmt.Sprintf("/extensions/links/groups")
6524	if operationPath[0] == '/' {
6525		operationPath = "." + operationPath
6526	}
6527
6528	queryURL, err := serverURL.Parse(operationPath)
6529	if err != nil {
6530		return nil, err
6531	}
6532
6533	if params != nil {
6534		// queryValues collects non-styled parameters (passthrough, JSON)
6535		// that are safe to round-trip through url.Values.Encode().
6536		queryValues := queryURL.Query()
6537		// rawQueryFragments collects pre-encoded query fragments from
6538		// styled parameters, preserving literal commas as delimiters
6539		// per the OpenAPI spec (e.g. "color=blue,black,brown").
6540		var rawQueryFragments []string
6541
6542		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6543			return nil, err
6544		} else {
6545			for _, qp := range strings.Split(queryFrag, "&") {
6546				rawQueryFragments = append(rawQueryFragments, qp)
6547			}
6548		}
6549
6550		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6551			return nil, err
6552		} else {
6553			for _, qp := range strings.Split(queryFrag, "&") {
6554				rawQueryFragments = append(rawQueryFragments, qp)
6555			}
6556		}
6557
6558		if encoded := queryValues.Encode(); encoded != "" {
6559			rawQueryFragments = append(rawQueryFragments, encoded)
6560		}
6561		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
6562	}
6563
6564	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
6565	if err != nil {
6566		return nil, err
6567	}
6568
6569	req.Header.Add("Content-Type", contentType)
6570
6571	if params != nil {
6572
6573		var headerParam0 string
6574
6575		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
6576		if err != nil {
6577			return nil, err
6578		}
6579
6580		req.Header.Set("If-Match", headerParam0)
6581
6582	}
6583
6584	return req, nil
6585}
6586
6587// NewListPaperclipsRequest constructs an http.Request for the ListPaperclips method
6588func NewListPaperclipsRequest(server string, params *ListPaperclipsParams) (*http.Request, error) {
6589	var err error
6590
6591	serverURL, err := url.Parse(server)
6592	if err != nil {
6593		return nil, err
6594	}
6595
6596	operationPath := fmt.Sprintf("/extensions/paperclips/items")
6597	if operationPath[0] == '/' {
6598		operationPath = "." + operationPath
6599	}
6600
6601	queryURL, err := serverURL.Parse(operationPath)
6602	if err != nil {
6603		return nil, err
6604	}
6605
6606	if params != nil {
6607		// queryValues collects non-styled parameters (passthrough, JSON)
6608		// that are safe to round-trip through url.Values.Encode().
6609		queryValues := queryURL.Query()
6610		// rawQueryFragments collects pre-encoded query fragments from
6611		// styled parameters, preserving literal commas as delimiters
6612		// per the OpenAPI spec (e.g. "color=blue,black,brown").
6613		var rawQueryFragments []string
6614
6615		if params.Limit != nil {
6616
6617			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
6618				return nil, err
6619			} else {
6620				for _, qp := range strings.Split(queryFrag, "&") {
6621					rawQueryFragments = append(rawQueryFragments, qp)
6622				}
6623			}
6624
6625		}
6626
6627		if params.Next != nil {
6628
6629			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
6630				return nil, err
6631			} else {
6632				for _, qp := range strings.Split(queryFrag, "&") {
6633					rawQueryFragments = append(rawQueryFragments, qp)
6634				}
6635			}
6636
6637		}
6638
6639		if encoded := queryValues.Encode(); encoded != "" {
6640			rawQueryFragments = append(rawQueryFragments, encoded)
6641		}
6642		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
6643	}
6644
6645	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
6646	if err != nil {
6647		return nil, err
6648	}
6649
6650	return req, nil
6651}
6652
6653// NewCreatePaperclipsRequest calls the generic CreatePaperclips builder with application/json body
6654func NewCreatePaperclipsRequest(server string, body CreatePaperclipsJSONRequestBody) (*http.Request, error) {
6655	var bodyReader io.Reader
6656	buf, err := json.Marshal(body)
6657	if err != nil {
6658		return nil, err
6659	}
6660	bodyReader = bytes.NewReader(buf)
6661	return NewCreatePaperclipsRequestWithBody(server, "application/json", bodyReader)
6662}
6663
6664// NewCreatePaperclipsRequestWithBody constructs an http.Request for the CreatePaperclips method, with any body, and a specified content type
6665func NewCreatePaperclipsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
6666	var err error
6667
6668	serverURL, err := url.Parse(server)
6669	if err != nil {
6670		return nil, err
6671	}
6672
6673	operationPath := fmt.Sprintf("/extensions/paperclips/items")
6674	if operationPath[0] == '/' {
6675		operationPath = "." + operationPath
6676	}
6677
6678	queryURL, err := serverURL.Parse(operationPath)
6679	if err != nil {
6680		return nil, err
6681	}
6682
6683	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
6684	if err != nil {
6685		return nil, err
6686	}
6687
6688	req.Header.Add("Content-Type", contentType)
6689
6690	return req, nil
6691}
6692
6693// NewDeletePaperclipsRequest constructs an http.Request for the DeletePaperclips method
6694func NewDeletePaperclipsRequest(server string, itemID ID, params *DeletePaperclipsParams) (*http.Request, error) {
6695	var err error
6696
6697	var pathParam0 string
6698
6699	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "item_id", itemID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6700	if err != nil {
6701		return nil, err
6702	}
6703
6704	serverURL, err := url.Parse(server)
6705	if err != nil {
6706		return nil, err
6707	}
6708
6709	operationPath := fmt.Sprintf("/extensions/paperclips/items/%s", pathParam0)
6710	if operationPath[0] == '/' {
6711		operationPath = "." + operationPath
6712	}
6713
6714	queryURL, err := serverURL.Parse(operationPath)
6715	if err != nil {
6716		return nil, err
6717	}
6718
6719	req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
6720	if err != nil {
6721		return nil, err
6722	}
6723
6724	if params != nil {
6725
6726		var headerParam0 string
6727
6728		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
6729		if err != nil {
6730			return nil, err
6731		}
6732
6733		req.Header.Set("If-Match", headerParam0)
6734
6735	}
6736
6737	return req, nil
6738}
6739
6740// NewGetPaperclipsRequest constructs an http.Request for the GetPaperclips method
6741func NewGetPaperclipsRequest(server string, itemID ID) (*http.Request, error) {
6742	var err error
6743
6744	var pathParam0 string
6745
6746	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "item_id", itemID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6747	if err != nil {
6748		return nil, err
6749	}
6750
6751	serverURL, err := url.Parse(server)
6752	if err != nil {
6753		return nil, err
6754	}
6755
6756	operationPath := fmt.Sprintf("/extensions/paperclips/items/%s", pathParam0)
6757	if operationPath[0] == '/' {
6758		operationPath = "." + operationPath
6759	}
6760
6761	queryURL, err := serverURL.Parse(operationPath)
6762	if err != nil {
6763		return nil, err
6764	}
6765
6766	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
6767	if err != nil {
6768		return nil, err
6769	}
6770
6771	return req, nil
6772}
6773
6774// NewPatchPaperclipsRequestWithApplicationMergePatchPlusJSONBody calls the generic PatchPaperclips builder with application/merge-patch+json body
6775func NewPatchPaperclipsRequestWithApplicationMergePatchPlusJSONBody(server string, itemID ID, params *PatchPaperclipsParams, body PatchPaperclipsApplicationMergePatchPlusJSONRequestBody) (*http.Request, error) {
6776	var bodyReader io.Reader
6777	buf, err := json.Marshal(body)
6778	if err != nil {
6779		return nil, err
6780	}
6781	bodyReader = bytes.NewReader(buf)
6782	return NewPatchPaperclipsRequestWithBody(server, itemID, params, "application/merge-patch+json", bodyReader)
6783}
6784
6785// NewPatchPaperclipsRequestWithBody constructs an http.Request for the PatchPaperclips method, with any body, and a specified content type
6786func NewPatchPaperclipsRequestWithBody(server string, itemID ID, params *PatchPaperclipsParams, contentType string, body io.Reader) (*http.Request, error) {
6787	var err error
6788
6789	var pathParam0 string
6790
6791	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "item_id", itemID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6792	if err != nil {
6793		return nil, err
6794	}
6795
6796	serverURL, err := url.Parse(server)
6797	if err != nil {
6798		return nil, err
6799	}
6800
6801	operationPath := fmt.Sprintf("/extensions/paperclips/items/%s", pathParam0)
6802	if operationPath[0] == '/' {
6803		operationPath = "." + operationPath
6804	}
6805
6806	queryURL, err := serverURL.Parse(operationPath)
6807	if err != nil {
6808		return nil, err
6809	}
6810
6811	req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
6812	if err != nil {
6813		return nil, err
6814	}
6815
6816	req.Header.Add("Content-Type", contentType)
6817
6818	if params != nil {
6819
6820		var headerParam0 string
6821
6822		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
6823		if err != nil {
6824			return nil, err
6825		}
6826
6827		req.Header.Set("If-Match", headerParam0)
6828
6829	}
6830
6831	return req, nil
6832}
6833
6834// NewCreateProxyCompletionRequest calls the generic CreateProxyCompletion builder with application/json body
6835func NewCreateProxyCompletionRequest(server string, body CreateProxyCompletionJSONRequestBody) (*http.Request, error) {
6836	var bodyReader io.Reader
6837	buf, err := json.Marshal(body)
6838	if err != nil {
6839		return nil, err
6840	}
6841	bodyReader = bytes.NewReader(buf)
6842	return NewCreateProxyCompletionRequestWithBody(server, "application/json", bodyReader)
6843}
6844
6845// NewCreateProxyCompletionRequestWithBody constructs an http.Request for the CreateProxyCompletion method, with any body, and a specified content type
6846func NewCreateProxyCompletionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
6847	var err error
6848
6849	serverURL, err := url.Parse(server)
6850	if err != nil {
6851		return nil, err
6852	}
6853
6854	operationPath := fmt.Sprintf("/extensions/proxy/v1/chat/completions")
6855	if operationPath[0] == '/' {
6856		operationPath = "." + operationPath
6857	}
6858
6859	queryURL, err := serverURL.Parse(operationPath)
6860	if err != nil {
6861		return nil, err
6862	}
6863
6864	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
6865	if err != nil {
6866		return nil, err
6867	}
6868
6869	req.Header.Add("Content-Type", contentType)
6870
6871	return req, nil
6872}
6873
6874// NewListProxyModelsRequest constructs an http.Request for the ListProxyModels method
6875func NewListProxyModelsRequest(server string) (*http.Request, error) {
6876	var err error
6877
6878	serverURL, err := url.Parse(server)
6879	if err != nil {
6880		return nil, err
6881	}
6882
6883	operationPath := fmt.Sprintf("/extensions/proxy/v1/models")
6884	if operationPath[0] == '/' {
6885		operationPath = "." + operationPath
6886	}
6887
6888	queryURL, err := serverURL.Parse(operationPath)
6889	if err != nil {
6890		return nil, err
6891	}
6892
6893	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
6894	if err != nil {
6895		return nil, err
6896	}
6897
6898	return req, nil
6899}
6900
6901// NewListJobsRequest constructs an http.Request for the ListJobs method
6902func NewListJobsRequest(server string, sessionID ID) (*http.Request, error) {
6903	var err error
6904
6905	var pathParam0 string
6906
6907	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6908	if err != nil {
6909		return nil, err
6910	}
6911
6912	serverURL, err := url.Parse(server)
6913	if err != nil {
6914		return nil, err
6915	}
6916
6917	operationPath := fmt.Sprintf("/extensions/run/sessions/%s/jobs", pathParam0)
6918	if operationPath[0] == '/' {
6919		operationPath = "." + operationPath
6920	}
6921
6922	queryURL, err := serverURL.Parse(operationPath)
6923	if err != nil {
6924		return nil, err
6925	}
6926
6927	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
6928	if err != nil {
6929		return nil, err
6930	}
6931
6932	return req, nil
6933}
6934
6935// NewStopJobRequest calls the generic StopJob builder with application/json body
6936func NewStopJobRequest(server string, sessionID ID, jobID ID, body StopJobJSONRequestBody) (*http.Request, error) {
6937	var bodyReader io.Reader
6938	buf, err := json.Marshal(body)
6939	if err != nil {
6940		return nil, err
6941	}
6942	bodyReader = bytes.NewReader(buf)
6943	return NewStopJobRequestWithBody(server, sessionID, jobID, "application/json", bodyReader)
6944}
6945
6946// NewStopJobRequestWithBody constructs an http.Request for the StopJob method, with any body, and a specified content type
6947func NewStopJobRequestWithBody(server string, sessionID ID, jobID ID, contentType string, body io.Reader) (*http.Request, error) {
6948	var err error
6949
6950	var pathParam0 string
6951
6952	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6953	if err != nil {
6954		return nil, err
6955	}
6956
6957	var pathParam1 string
6958
6959	pathParam1, err = runtime.StyleParamWithOptions("simple", false, "job_id", jobID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
6960	if err != nil {
6961		return nil, err
6962	}
6963
6964	serverURL, err := url.Parse(server)
6965	if err != nil {
6966		return nil, err
6967	}
6968
6969	operationPath := fmt.Sprintf("/extensions/run/sessions/%s/jobs/%s/stop", pathParam0, pathParam1)
6970	if operationPath[0] == '/' {
6971		operationPath = "." + operationPath
6972	}
6973
6974	queryURL, err := serverURL.Parse(operationPath)
6975	if err != nil {
6976		return nil, err
6977	}
6978
6979	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
6980	if err != nil {
6981		return nil, err
6982	}
6983
6984	req.Header.Add("Content-Type", contentType)
6985
6986	return req, nil
6987}
6988
6989// NewListScheduleRequest constructs an http.Request for the ListSchedule method
6990func NewListScheduleRequest(server string, params *ListScheduleParams) (*http.Request, error) {
6991	var err error
6992
6993	serverURL, err := url.Parse(server)
6994	if err != nil {
6995		return nil, err
6996	}
6997
6998	operationPath := fmt.Sprintf("/extensions/schedule/jobs")
6999	if operationPath[0] == '/' {
7000		operationPath = "." + operationPath
7001	}
7002
7003	queryURL, err := serverURL.Parse(operationPath)
7004	if err != nil {
7005		return nil, err
7006	}
7007
7008	if params != nil {
7009		// queryValues collects non-styled parameters (passthrough, JSON)
7010		// that are safe to round-trip through url.Values.Encode().
7011		queryValues := queryURL.Query()
7012		// rawQueryFragments collects pre-encoded query fragments from
7013		// styled parameters, preserving literal commas as delimiters
7014		// per the OpenAPI spec (e.g. "color=blue,black,brown").
7015		var rawQueryFragments []string
7016
7017		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "session_id", params.SessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7018			return nil, err
7019		} else {
7020			for _, qp := range strings.Split(queryFrag, "&") {
7021				rawQueryFragments = append(rawQueryFragments, qp)
7022			}
7023		}
7024
7025		if params.Limit != nil {
7026
7027			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
7028				return nil, err
7029			} else {
7030				for _, qp := range strings.Split(queryFrag, "&") {
7031					rawQueryFragments = append(rawQueryFragments, qp)
7032				}
7033			}
7034
7035		}
7036
7037		if params.Next != nil {
7038
7039			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7040				return nil, err
7041			} else {
7042				for _, qp := range strings.Split(queryFrag, "&") {
7043					rawQueryFragments = append(rawQueryFragments, qp)
7044				}
7045			}
7046
7047		}
7048
7049		if encoded := queryValues.Encode(); encoded != "" {
7050			rawQueryFragments = append(rawQueryFragments, encoded)
7051		}
7052		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
7053	}
7054
7055	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
7056	if err != nil {
7057		return nil, err
7058	}
7059
7060	return req, nil
7061}
7062
7063// NewCreateScheduleRequest calls the generic CreateSchedule builder with application/json body
7064func NewCreateScheduleRequest(server string, body CreateScheduleJSONRequestBody) (*http.Request, error) {
7065	var bodyReader io.Reader
7066	buf, err := json.Marshal(body)
7067	if err != nil {
7068		return nil, err
7069	}
7070	bodyReader = bytes.NewReader(buf)
7071	return NewCreateScheduleRequestWithBody(server, "application/json", bodyReader)
7072}
7073
7074// NewCreateScheduleRequestWithBody constructs an http.Request for the CreateSchedule method, with any body, and a specified content type
7075func NewCreateScheduleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
7076	var err error
7077
7078	serverURL, err := url.Parse(server)
7079	if err != nil {
7080		return nil, err
7081	}
7082
7083	operationPath := fmt.Sprintf("/extensions/schedule/jobs")
7084	if operationPath[0] == '/' {
7085		operationPath = "." + operationPath
7086	}
7087
7088	queryURL, err := serverURL.Parse(operationPath)
7089	if err != nil {
7090		return nil, err
7091	}
7092
7093	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
7094	if err != nil {
7095		return nil, err
7096	}
7097
7098	req.Header.Add("Content-Type", contentType)
7099
7100	return req, nil
7101}
7102
7103// NewDeleteScheduleRequest constructs an http.Request for the DeleteSchedule method
7104func NewDeleteScheduleRequest(server string, jobID ID, params *DeleteScheduleParams) (*http.Request, error) {
7105	var err error
7106
7107	var pathParam0 string
7108
7109	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "job_id", jobID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7110	if err != nil {
7111		return nil, err
7112	}
7113
7114	serverURL, err := url.Parse(server)
7115	if err != nil {
7116		return nil, err
7117	}
7118
7119	operationPath := fmt.Sprintf("/extensions/schedule/jobs/%s", pathParam0)
7120	if operationPath[0] == '/' {
7121		operationPath = "." + operationPath
7122	}
7123
7124	queryURL, err := serverURL.Parse(operationPath)
7125	if err != nil {
7126		return nil, err
7127	}
7128
7129	req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
7130	if err != nil {
7131		return nil, err
7132	}
7133
7134	if params != nil {
7135
7136		var headerParam0 string
7137
7138		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
7139		if err != nil {
7140			return nil, err
7141		}
7142
7143		req.Header.Set("If-Match", headerParam0)
7144
7145	}
7146
7147	return req, nil
7148}
7149
7150// NewGetScheduleRequest constructs an http.Request for the GetSchedule method
7151func NewGetScheduleRequest(server string, jobID ID) (*http.Request, error) {
7152	var err error
7153
7154	var pathParam0 string
7155
7156	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "job_id", jobID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7157	if err != nil {
7158		return nil, err
7159	}
7160
7161	serverURL, err := url.Parse(server)
7162	if err != nil {
7163		return nil, err
7164	}
7165
7166	operationPath := fmt.Sprintf("/extensions/schedule/jobs/%s", pathParam0)
7167	if operationPath[0] == '/' {
7168		operationPath = "." + operationPath
7169	}
7170
7171	queryURL, err := serverURL.Parse(operationPath)
7172	if err != nil {
7173		return nil, err
7174	}
7175
7176	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
7177	if err != nil {
7178		return nil, err
7179	}
7180
7181	return req, nil
7182}
7183
7184// NewPatchScheduleRequestWithApplicationMergePatchPlusJSONBody calls the generic PatchSchedule builder with application/merge-patch+json body
7185func NewPatchScheduleRequestWithApplicationMergePatchPlusJSONBody(server string, jobID ID, params *PatchScheduleParams, body PatchScheduleApplicationMergePatchPlusJSONRequestBody) (*http.Request, error) {
7186	var bodyReader io.Reader
7187	buf, err := json.Marshal(body)
7188	if err != nil {
7189		return nil, err
7190	}
7191	bodyReader = bytes.NewReader(buf)
7192	return NewPatchScheduleRequestWithBody(server, jobID, params, "application/merge-patch+json", bodyReader)
7193}
7194
7195// NewPatchScheduleRequestWithBody constructs an http.Request for the PatchSchedule method, with any body, and a specified content type
7196func NewPatchScheduleRequestWithBody(server string, jobID ID, params *PatchScheduleParams, contentType string, body io.Reader) (*http.Request, error) {
7197	var err error
7198
7199	var pathParam0 string
7200
7201	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "job_id", jobID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7202	if err != nil {
7203		return nil, err
7204	}
7205
7206	serverURL, err := url.Parse(server)
7207	if err != nil {
7208		return nil, err
7209	}
7210
7211	operationPath := fmt.Sprintf("/extensions/schedule/jobs/%s", pathParam0)
7212	if operationPath[0] == '/' {
7213		operationPath = "." + operationPath
7214	}
7215
7216	queryURL, err := serverURL.Parse(operationPath)
7217	if err != nil {
7218		return nil, err
7219	}
7220
7221	req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
7222	if err != nil {
7223		return nil, err
7224	}
7225
7226	req.Header.Add("Content-Type", contentType)
7227
7228	if params != nil {
7229
7230		var headerParam0 string
7231
7232		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
7233		if err != nil {
7234			return nil, err
7235		}
7236
7237		req.Header.Set("If-Match", headerParam0)
7238
7239	}
7240
7241	return req, nil
7242}
7243
7244// NewListWebSearchProvidersRequest constructs an http.Request for the ListWebSearchProviders method
7245func NewListWebSearchProvidersRequest(server string) (*http.Request, error) {
7246	var err error
7247
7248	serverURL, err := url.Parse(server)
7249	if err != nil {
7250		return nil, err
7251	}
7252
7253	operationPath := fmt.Sprintf("/extensions/web-search/providers")
7254	if operationPath[0] == '/' {
7255		operationPath = "." + operationPath
7256	}
7257
7258	queryURL, err := serverURL.Parse(operationPath)
7259	if err != nil {
7260		return nil, err
7261	}
7262
7263	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
7264	if err != nil {
7265		return nil, err
7266	}
7267
7268	return req, nil
7269}
7270
7271// NewChangeWebSearchProviderRequest calls the generic ChangeWebSearchProvider builder with application/json body
7272func NewChangeWebSearchProviderRequest(server string, name ID, body ChangeWebSearchProviderJSONRequestBody) (*http.Request, error) {
7273	var bodyReader io.Reader
7274	buf, err := json.Marshal(body)
7275	if err != nil {
7276		return nil, err
7277	}
7278	bodyReader = bytes.NewReader(buf)
7279	return NewChangeWebSearchProviderRequestWithBody(server, name, "application/json", bodyReader)
7280}
7281
7282// NewChangeWebSearchProviderRequestWithBody constructs an http.Request for the ChangeWebSearchProvider method, with any body, and a specified content type
7283func NewChangeWebSearchProviderRequestWithBody(server string, name ID, contentType string, body io.Reader) (*http.Request, error) {
7284	var err error
7285
7286	var pathParam0 string
7287
7288	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "name", name, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7289	if err != nil {
7290		return nil, err
7291	}
7292
7293	serverURL, err := url.Parse(server)
7294	if err != nil {
7295		return nil, err
7296	}
7297
7298	operationPath := fmt.Sprintf("/extensions/web-search/providers/%s", pathParam0)
7299	if operationPath[0] == '/' {
7300		operationPath = "." + operationPath
7301	}
7302
7303	queryURL, err := serverURL.Parse(operationPath)
7304	if err != nil {
7305		return nil, err
7306	}
7307
7308	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
7309	if err != nil {
7310		return nil, err
7311	}
7312
7313	req.Header.Add("Content-Type", contentType)
7314
7315	return req, nil
7316}
7317
7318// NewGetDeliveryRequest constructs an http.Request for the GetDelivery method
7319func NewGetDeliveryRequest(server string, deliveryID ID) (*http.Request, error) {
7320	var err error
7321
7322	var pathParam0 string
7323
7324	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "delivery_id", deliveryID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7325	if err != nil {
7326		return nil, err
7327	}
7328
7329	serverURL, err := url.Parse(server)
7330	if err != nil {
7331		return nil, err
7332	}
7333
7334	operationPath := fmt.Sprintf("/extensions/webhooks/deliveries/%s", pathParam0)
7335	if operationPath[0] == '/' {
7336		operationPath = "." + operationPath
7337	}
7338
7339	queryURL, err := serverURL.Parse(operationPath)
7340	if err != nil {
7341		return nil, err
7342	}
7343
7344	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
7345	if err != nil {
7346		return nil, err
7347	}
7348
7349	return req, nil
7350}
7351
7352// NewListHooksRequest constructs an http.Request for the ListHooks method
7353func NewListHooksRequest(server string, params *ListHooksParams) (*http.Request, error) {
7354	var err error
7355
7356	serverURL, err := url.Parse(server)
7357	if err != nil {
7358		return nil, err
7359	}
7360
7361	operationPath := fmt.Sprintf("/extensions/webhooks/hooks")
7362	if operationPath[0] == '/' {
7363		operationPath = "." + operationPath
7364	}
7365
7366	queryURL, err := serverURL.Parse(operationPath)
7367	if err != nil {
7368		return nil, err
7369	}
7370
7371	if params != nil {
7372		// queryValues collects non-styled parameters (passthrough, JSON)
7373		// that are safe to round-trip through url.Values.Encode().
7374		queryValues := queryURL.Query()
7375		// rawQueryFragments collects pre-encoded query fragments from
7376		// styled parameters, preserving literal commas as delimiters
7377		// per the OpenAPI spec (e.g. "color=blue,black,brown").
7378		var rawQueryFragments []string
7379
7380		if params.SessionID != nil {
7381
7382			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "session_id", *params.SessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7383				return nil, err
7384			} else {
7385				for _, qp := range strings.Split(queryFrag, "&") {
7386					rawQueryFragments = append(rawQueryFragments, qp)
7387				}
7388			}
7389
7390		}
7391
7392		if params.Limit != nil {
7393
7394			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
7395				return nil, err
7396			} else {
7397				for _, qp := range strings.Split(queryFrag, "&") {
7398					rawQueryFragments = append(rawQueryFragments, qp)
7399				}
7400			}
7401
7402		}
7403
7404		if params.Next != nil {
7405
7406			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7407				return nil, err
7408			} else {
7409				for _, qp := range strings.Split(queryFrag, "&") {
7410					rawQueryFragments = append(rawQueryFragments, qp)
7411				}
7412			}
7413
7414		}
7415
7416		if encoded := queryValues.Encode(); encoded != "" {
7417			rawQueryFragments = append(rawQueryFragments, encoded)
7418		}
7419		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
7420	}
7421
7422	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
7423	if err != nil {
7424		return nil, err
7425	}
7426
7427	return req, nil
7428}
7429
7430// NewCreateHookRequest calls the generic CreateHook builder with application/json body
7431func NewCreateHookRequest(server string, body CreateHookJSONRequestBody) (*http.Request, error) {
7432	var bodyReader io.Reader
7433	buf, err := json.Marshal(body)
7434	if err != nil {
7435		return nil, err
7436	}
7437	bodyReader = bytes.NewReader(buf)
7438	return NewCreateHookRequestWithBody(server, "application/json", bodyReader)
7439}
7440
7441// NewCreateHookRequestWithBody constructs an http.Request for the CreateHook method, with any body, and a specified content type
7442func NewCreateHookRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
7443	var err error
7444
7445	serverURL, err := url.Parse(server)
7446	if err != nil {
7447		return nil, err
7448	}
7449
7450	operationPath := fmt.Sprintf("/extensions/webhooks/hooks")
7451	if operationPath[0] == '/' {
7452		operationPath = "." + operationPath
7453	}
7454
7455	queryURL, err := serverURL.Parse(operationPath)
7456	if err != nil {
7457		return nil, err
7458	}
7459
7460	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
7461	if err != nil {
7462		return nil, err
7463	}
7464
7465	req.Header.Add("Content-Type", contentType)
7466
7467	return req, nil
7468}
7469
7470// NewDeleteHookRequest constructs an http.Request for the DeleteHook method
7471func NewDeleteHookRequest(server string, hookID ID, params *DeleteHookParams) (*http.Request, error) {
7472	var err error
7473
7474	var pathParam0 string
7475
7476	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "hook_id", hookID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7477	if err != nil {
7478		return nil, err
7479	}
7480
7481	serverURL, err := url.Parse(server)
7482	if err != nil {
7483		return nil, err
7484	}
7485
7486	operationPath := fmt.Sprintf("/extensions/webhooks/hooks/%s", pathParam0)
7487	if operationPath[0] == '/' {
7488		operationPath = "." + operationPath
7489	}
7490
7491	queryURL, err := serverURL.Parse(operationPath)
7492	if err != nil {
7493		return nil, err
7494	}
7495
7496	if params != nil {
7497		// queryValues collects non-styled parameters (passthrough, JSON)
7498		// that are safe to round-trip through url.Values.Encode().
7499		queryValues := queryURL.Query()
7500		// rawQueryFragments collects pre-encoded query fragments from
7501		// styled parameters, preserving literal commas as delimiters
7502		// per the OpenAPI spec (e.g. "color=blue,black,brown").
7503		var rawQueryFragments []string
7504
7505		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7506			return nil, err
7507		} else {
7508			for _, qp := range strings.Split(queryFrag, "&") {
7509				rawQueryFragments = append(rawQueryFragments, qp)
7510			}
7511		}
7512
7513		if encoded := queryValues.Encode(); encoded != "" {
7514			rawQueryFragments = append(rawQueryFragments, encoded)
7515		}
7516		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
7517	}
7518
7519	req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
7520	if err != nil {
7521		return nil, err
7522	}
7523
7524	if params != nil {
7525
7526		var headerParam0 string
7527
7528		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
7529		if err != nil {
7530			return nil, err
7531		}
7532
7533		req.Header.Set("If-Match", headerParam0)
7534
7535	}
7536
7537	return req, nil
7538}
7539
7540// NewGetHookRequest constructs an http.Request for the GetHook method
7541func NewGetHookRequest(server string, hookID ID, params *GetHookParams) (*http.Request, error) {
7542	var err error
7543
7544	var pathParam0 string
7545
7546	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "hook_id", hookID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7547	if err != nil {
7548		return nil, err
7549	}
7550
7551	serverURL, err := url.Parse(server)
7552	if err != nil {
7553		return nil, err
7554	}
7555
7556	operationPath := fmt.Sprintf("/extensions/webhooks/hooks/%s", pathParam0)
7557	if operationPath[0] == '/' {
7558		operationPath = "." + operationPath
7559	}
7560
7561	queryURL, err := serverURL.Parse(operationPath)
7562	if err != nil {
7563		return nil, err
7564	}
7565
7566	if params != nil {
7567		// queryValues collects non-styled parameters (passthrough, JSON)
7568		// that are safe to round-trip through url.Values.Encode().
7569		queryValues := queryURL.Query()
7570		// rawQueryFragments collects pre-encoded query fragments from
7571		// styled parameters, preserving literal commas as delimiters
7572		// per the OpenAPI spec (e.g. "color=blue,black,brown").
7573		var rawQueryFragments []string
7574
7575		if params.View != nil {
7576
7577			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", *params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7578				return nil, err
7579			} else {
7580				for _, qp := range strings.Split(queryFrag, "&") {
7581					rawQueryFragments = append(rawQueryFragments, qp)
7582				}
7583			}
7584
7585		}
7586
7587		if encoded := queryValues.Encode(); encoded != "" {
7588			rawQueryFragments = append(rawQueryFragments, encoded)
7589		}
7590		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
7591	}
7592
7593	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
7594	if err != nil {
7595		return nil, err
7596	}
7597
7598	return req, nil
7599}
7600
7601// NewPatchHookRequestWithApplicationMergePatchPlusJSONBody calls the generic PatchHook builder with application/merge-patch+json body
7602func NewPatchHookRequestWithApplicationMergePatchPlusJSONBody(server string, hookID ID, params *PatchHookParams, body PatchHookApplicationMergePatchPlusJSONRequestBody) (*http.Request, error) {
7603	var bodyReader io.Reader
7604	buf, err := json.Marshal(body)
7605	if err != nil {
7606		return nil, err
7607	}
7608	bodyReader = bytes.NewReader(buf)
7609	return NewPatchHookRequestWithBody(server, hookID, params, "application/merge-patch+json", bodyReader)
7610}
7611
7612// NewPatchHookRequestWithBody constructs an http.Request for the PatchHook method, with any body, and a specified content type
7613func NewPatchHookRequestWithBody(server string, hookID ID, params *PatchHookParams, contentType string, body io.Reader) (*http.Request, error) {
7614	var err error
7615
7616	var pathParam0 string
7617
7618	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "hook_id", hookID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7619	if err != nil {
7620		return nil, err
7621	}
7622
7623	serverURL, err := url.Parse(server)
7624	if err != nil {
7625		return nil, err
7626	}
7627
7628	operationPath := fmt.Sprintf("/extensions/webhooks/hooks/%s", pathParam0)
7629	if operationPath[0] == '/' {
7630		operationPath = "." + operationPath
7631	}
7632
7633	queryURL, err := serverURL.Parse(operationPath)
7634	if err != nil {
7635		return nil, err
7636	}
7637
7638	if params != nil {
7639		// queryValues collects non-styled parameters (passthrough, JSON)
7640		// that are safe to round-trip through url.Values.Encode().
7641		queryValues := queryURL.Query()
7642		// rawQueryFragments collects pre-encoded query fragments from
7643		// styled parameters, preserving literal commas as delimiters
7644		// per the OpenAPI spec (e.g. "color=blue,black,brown").
7645		var rawQueryFragments []string
7646
7647		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7648			return nil, err
7649		} else {
7650			for _, qp := range strings.Split(queryFrag, "&") {
7651				rawQueryFragments = append(rawQueryFragments, qp)
7652			}
7653		}
7654
7655		if encoded := queryValues.Encode(); encoded != "" {
7656			rawQueryFragments = append(rawQueryFragments, encoded)
7657		}
7658		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
7659	}
7660
7661	req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
7662	if err != nil {
7663		return nil, err
7664	}
7665
7666	req.Header.Add("Content-Type", contentType)
7667
7668	if params != nil {
7669
7670		var headerParam0 string
7671
7672		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
7673		if err != nil {
7674			return nil, err
7675		}
7676
7677		req.Header.Set("If-Match", headerParam0)
7678
7679	}
7680
7681	return req, nil
7682}
7683
7684// NewListHookDeliveriesRequest constructs an http.Request for the ListHookDeliveries method
7685func NewListHookDeliveriesRequest(server string, hookID ID, params *ListHookDeliveriesParams) (*http.Request, error) {
7686	var err error
7687
7688	var pathParam0 string
7689
7690	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "hook_id", hookID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7691	if err != nil {
7692		return nil, err
7693	}
7694
7695	serverURL, err := url.Parse(server)
7696	if err != nil {
7697		return nil, err
7698	}
7699
7700	operationPath := fmt.Sprintf("/extensions/webhooks/hooks/%s/deliveries", pathParam0)
7701	if operationPath[0] == '/' {
7702		operationPath = "." + operationPath
7703	}
7704
7705	queryURL, err := serverURL.Parse(operationPath)
7706	if err != nil {
7707		return nil, err
7708	}
7709
7710	if params != nil {
7711		// queryValues collects non-styled parameters (passthrough, JSON)
7712		// that are safe to round-trip through url.Values.Encode().
7713		queryValues := queryURL.Query()
7714		// rawQueryFragments collects pre-encoded query fragments from
7715		// styled parameters, preserving literal commas as delimiters
7716		// per the OpenAPI spec (e.g. "color=blue,black,brown").
7717		var rawQueryFragments []string
7718
7719		if params.State != nil {
7720
7721			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "state", *params.State, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7722				return nil, err
7723			} else {
7724				for _, qp := range strings.Split(queryFrag, "&") {
7725					rawQueryFragments = append(rawQueryFragments, qp)
7726				}
7727			}
7728
7729		}
7730
7731		if params.Limit != nil {
7732
7733			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
7734				return nil, err
7735			} else {
7736				for _, qp := range strings.Split(queryFrag, "&") {
7737					rawQueryFragments = append(rawQueryFragments, qp)
7738				}
7739			}
7740
7741		}
7742
7743		if params.Next != nil {
7744
7745			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
7746				return nil, err
7747			} else {
7748				for _, qp := range strings.Split(queryFrag, "&") {
7749					rawQueryFragments = append(rawQueryFragments, qp)
7750				}
7751			}
7752
7753		}
7754
7755		if encoded := queryValues.Encode(); encoded != "" {
7756			rawQueryFragments = append(rawQueryFragments, encoded)
7757		}
7758		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
7759	}
7760
7761	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
7762	if err != nil {
7763		return nil, err
7764	}
7765
7766	return req, nil
7767}
7768
7769// NewDeliverWebhookRequestWithBody constructs an http.Request for the DeliverWebhook method, with any body, and a specified content type
7770func NewDeliverWebhookRequestWithBody(server string, hookID ID, params *DeliverWebhookParams, contentType string, body io.Reader) (*http.Request, error) {
7771	var err error
7772
7773	var pathParam0 string
7774
7775	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "hook_id", hookID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7776	if err != nil {
7777		return nil, err
7778	}
7779
7780	serverURL, err := url.Parse(server)
7781	if err != nil {
7782		return nil, err
7783	}
7784
7785	operationPath := fmt.Sprintf("/extensions/webhooks/hooks/%s/deliveries", pathParam0)
7786	if operationPath[0] == '/' {
7787		operationPath = "." + operationPath
7788	}
7789
7790	queryURL, err := serverURL.Parse(operationPath)
7791	if err != nil {
7792		return nil, err
7793	}
7794
7795	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
7796	if err != nil {
7797		return nil, err
7798	}
7799
7800	req.Header.Add("Content-Type", contentType)
7801
7802	if params != nil {
7803
7804		if params.XAlbedoEventID != nil {
7805			var headerParam0 string
7806
7807			headerParam0, err = runtime.StyleParamWithOptions("simple", false, "X-Albedo-Event-Id", *params.XAlbedoEventID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
7808			if err != nil {
7809				return nil, err
7810			}
7811
7812			req.Header.Set("X-Albedo-Event-Id", headerParam0)
7813		}
7814
7815	}
7816
7817	return req, nil
7818}
7819
7820// NewRotateHookSecretRequest calls the generic RotateHookSecret builder with application/json body
7821func NewRotateHookSecretRequest(server string, hookID ID, params *RotateHookSecretParams, body RotateHookSecretJSONRequestBody) (*http.Request, error) {
7822	var bodyReader io.Reader
7823	buf, err := json.Marshal(body)
7824	if err != nil {
7825		return nil, err
7826	}
7827	bodyReader = bytes.NewReader(buf)
7828	return NewRotateHookSecretRequestWithBody(server, hookID, params, "application/json", bodyReader)
7829}
7830
7831// NewRotateHookSecretRequestWithBody constructs an http.Request for the RotateHookSecret method, with any body, and a specified content type
7832func NewRotateHookSecretRequestWithBody(server string, hookID ID, params *RotateHookSecretParams, contentType string, body io.Reader) (*http.Request, error) {
7833	var err error
7834
7835	var pathParam0 string
7836
7837	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "hook_id", hookID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7838	if err != nil {
7839		return nil, err
7840	}
7841
7842	serverURL, err := url.Parse(server)
7843	if err != nil {
7844		return nil, err
7845	}
7846
7847	operationPath := fmt.Sprintf("/extensions/webhooks/hooks/%s/secret", pathParam0)
7848	if operationPath[0] == '/' {
7849		operationPath = "." + operationPath
7850	}
7851
7852	queryURL, err := serverURL.Parse(operationPath)
7853	if err != nil {
7854		return nil, err
7855	}
7856
7857	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
7858	if err != nil {
7859		return nil, err
7860	}
7861
7862	req.Header.Add("Content-Type", contentType)
7863
7864	if params != nil {
7865
7866		var headerParam0 string
7867
7868		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
7869		if err != nil {
7870			return nil, err
7871		}
7872
7873		req.Header.Set("If-Match", headerParam0)
7874
7875	}
7876
7877	return req, nil
7878}
7879
7880// NewGetHookPermissionRequest constructs an http.Request for the GetHookPermission method
7881func NewGetHookPermissionRequest(server string, sessionID ID) (*http.Request, error) {
7882	var err error
7883
7884	var pathParam0 string
7885
7886	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7887	if err != nil {
7888		return nil, err
7889	}
7890
7891	serverURL, err := url.Parse(server)
7892	if err != nil {
7893		return nil, err
7894	}
7895
7896	operationPath := fmt.Sprintf("/extensions/webhooks/permissions/%s", pathParam0)
7897	if operationPath[0] == '/' {
7898		operationPath = "." + operationPath
7899	}
7900
7901	queryURL, err := serverURL.Parse(operationPath)
7902	if err != nil {
7903		return nil, err
7904	}
7905
7906	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
7907	if err != nil {
7908		return nil, err
7909	}
7910
7911	return req, nil
7912}
7913
7914// NewPatchHookPermissionRequestWithApplicationMergePatchPlusJSONBody calls the generic PatchHookPermission builder with application/merge-patch+json body
7915func NewPatchHookPermissionRequestWithApplicationMergePatchPlusJSONBody(server string, sessionID ID, params *PatchHookPermissionParams, body PatchHookPermissionApplicationMergePatchPlusJSONRequestBody) (*http.Request, error) {
7916	var bodyReader io.Reader
7917	buf, err := json.Marshal(body)
7918	if err != nil {
7919		return nil, err
7920	}
7921	bodyReader = bytes.NewReader(buf)
7922	return NewPatchHookPermissionRequestWithBody(server, sessionID, params, "application/merge-patch+json", bodyReader)
7923}
7924
7925// NewPatchHookPermissionRequestWithBody constructs an http.Request for the PatchHookPermission method, with any body, and a specified content type
7926func NewPatchHookPermissionRequestWithBody(server string, sessionID ID, params *PatchHookPermissionParams, contentType string, body io.Reader) (*http.Request, error) {
7927	var err error
7928
7929	var pathParam0 string
7930
7931	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
7932	if err != nil {
7933		return nil, err
7934	}
7935
7936	serverURL, err := url.Parse(server)
7937	if err != nil {
7938		return nil, err
7939	}
7940
7941	operationPath := fmt.Sprintf("/extensions/webhooks/permissions/%s", pathParam0)
7942	if operationPath[0] == '/' {
7943		operationPath = "." + operationPath
7944	}
7945
7946	queryURL, err := serverURL.Parse(operationPath)
7947	if err != nil {
7948		return nil, err
7949	}
7950
7951	req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
7952	if err != nil {
7953		return nil, err
7954	}
7955
7956	req.Header.Add("Content-Type", contentType)
7957
7958	if params != nil {
7959
7960		var headerParam0 string
7961
7962		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
7963		if err != nil {
7964			return nil, err
7965		}
7966
7967		req.Header.Set("If-Match", headerParam0)
7968
7969	}
7970
7971	return req, nil
7972}
7973
7974// NewListWorkRequest constructs an http.Request for the ListWork method
7975func NewListWorkRequest(server string, params *ListWorkParams) (*http.Request, error) {
7976	var err error
7977
7978	serverURL, err := url.Parse(server)
7979	if err != nil {
7980		return nil, err
7981	}
7982
7983	operationPath := fmt.Sprintf("/extensions/work/items")
7984	if operationPath[0] == '/' {
7985		operationPath = "." + operationPath
7986	}
7987
7988	queryURL, err := serverURL.Parse(operationPath)
7989	if err != nil {
7990		return nil, err
7991	}
7992
7993	if params != nil {
7994		// queryValues collects non-styled parameters (passthrough, JSON)
7995		// that are safe to round-trip through url.Values.Encode().
7996		queryValues := queryURL.Query()
7997		// rawQueryFragments collects pre-encoded query fragments from
7998		// styled parameters, preserving literal commas as delimiters
7999		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8000		var rawQueryFragments []string
8001
8002		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8003			return nil, err
8004		} else {
8005			for _, qp := range strings.Split(queryFrag, "&") {
8006				rawQueryFragments = append(rawQueryFragments, qp)
8007			}
8008		}
8009
8010		if params.Limit != nil {
8011
8012			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
8013				return nil, err
8014			} else {
8015				for _, qp := range strings.Split(queryFrag, "&") {
8016					rawQueryFragments = append(rawQueryFragments, qp)
8017				}
8018			}
8019
8020		}
8021
8022		if params.Next != nil {
8023
8024			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8025				return nil, err
8026			} else {
8027				for _, qp := range strings.Split(queryFrag, "&") {
8028					rawQueryFragments = append(rawQueryFragments, qp)
8029				}
8030			}
8031
8032		}
8033
8034		if encoded := queryValues.Encode(); encoded != "" {
8035			rawQueryFragments = append(rawQueryFragments, encoded)
8036		}
8037		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8038	}
8039
8040	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
8041	if err != nil {
8042		return nil, err
8043	}
8044
8045	return req, nil
8046}
8047
8048// NewCreateWorkRequest calls the generic CreateWork builder with application/json body
8049func NewCreateWorkRequest(server string, params *CreateWorkParams, body CreateWorkJSONRequestBody) (*http.Request, error) {
8050	var bodyReader io.Reader
8051	buf, err := json.Marshal(body)
8052	if err != nil {
8053		return nil, err
8054	}
8055	bodyReader = bytes.NewReader(buf)
8056	return NewCreateWorkRequestWithBody(server, params, "application/json", bodyReader)
8057}
8058
8059// NewCreateWorkRequestWithBody constructs an http.Request for the CreateWork method, with any body, and a specified content type
8060func NewCreateWorkRequestWithBody(server string, params *CreateWorkParams, contentType string, body io.Reader) (*http.Request, error) {
8061	var err error
8062
8063	serverURL, err := url.Parse(server)
8064	if err != nil {
8065		return nil, err
8066	}
8067
8068	operationPath := fmt.Sprintf("/extensions/work/items")
8069	if operationPath[0] == '/' {
8070		operationPath = "." + operationPath
8071	}
8072
8073	queryURL, err := serverURL.Parse(operationPath)
8074	if err != nil {
8075		return nil, err
8076	}
8077
8078	if params != nil {
8079		// queryValues collects non-styled parameters (passthrough, JSON)
8080		// that are safe to round-trip through url.Values.Encode().
8081		queryValues := queryURL.Query()
8082		// rawQueryFragments collects pre-encoded query fragments from
8083		// styled parameters, preserving literal commas as delimiters
8084		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8085		var rawQueryFragments []string
8086
8087		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8088			return nil, err
8089		} else {
8090			for _, qp := range strings.Split(queryFrag, "&") {
8091				rawQueryFragments = append(rawQueryFragments, qp)
8092			}
8093		}
8094
8095		if encoded := queryValues.Encode(); encoded != "" {
8096			rawQueryFragments = append(rawQueryFragments, encoded)
8097		}
8098		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8099	}
8100
8101	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
8102	if err != nil {
8103		return nil, err
8104	}
8105
8106	req.Header.Add("Content-Type", contentType)
8107
8108	return req, nil
8109}
8110
8111// NewDeleteWorkRequest constructs an http.Request for the DeleteWork method
8112func NewDeleteWorkRequest(server string, itemID ID, params *DeleteWorkParams) (*http.Request, error) {
8113	var err error
8114
8115	var pathParam0 string
8116
8117	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "item_id", itemID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
8118	if err != nil {
8119		return nil, err
8120	}
8121
8122	serverURL, err := url.Parse(server)
8123	if err != nil {
8124		return nil, err
8125	}
8126
8127	operationPath := fmt.Sprintf("/extensions/work/items/%s", pathParam0)
8128	if operationPath[0] == '/' {
8129		operationPath = "." + operationPath
8130	}
8131
8132	queryURL, err := serverURL.Parse(operationPath)
8133	if err != nil {
8134		return nil, err
8135	}
8136
8137	if params != nil {
8138		// queryValues collects non-styled parameters (passthrough, JSON)
8139		// that are safe to round-trip through url.Values.Encode().
8140		queryValues := queryURL.Query()
8141		// rawQueryFragments collects pre-encoded query fragments from
8142		// styled parameters, preserving literal commas as delimiters
8143		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8144		var rawQueryFragments []string
8145
8146		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8147			return nil, err
8148		} else {
8149			for _, qp := range strings.Split(queryFrag, "&") {
8150				rawQueryFragments = append(rawQueryFragments, qp)
8151			}
8152		}
8153
8154		if params.NotifySessionID != nil {
8155
8156			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "notify_session_id", *params.NotifySessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8157				return nil, err
8158			} else {
8159				for _, qp := range strings.Split(queryFrag, "&") {
8160					rawQueryFragments = append(rawQueryFragments, qp)
8161				}
8162			}
8163
8164		}
8165
8166		if encoded := queryValues.Encode(); encoded != "" {
8167			rawQueryFragments = append(rawQueryFragments, encoded)
8168		}
8169		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8170	}
8171
8172	req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
8173	if err != nil {
8174		return nil, err
8175	}
8176
8177	if params != nil {
8178
8179		var headerParam0 string
8180
8181		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
8182		if err != nil {
8183			return nil, err
8184		}
8185
8186		req.Header.Set("If-Match", headerParam0)
8187
8188	}
8189
8190	return req, nil
8191}
8192
8193// NewGetWorkRequest constructs an http.Request for the GetWork method
8194func NewGetWorkRequest(server string, itemID ID, params *GetWorkParams) (*http.Request, error) {
8195	var err error
8196
8197	var pathParam0 string
8198
8199	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "item_id", itemID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
8200	if err != nil {
8201		return nil, err
8202	}
8203
8204	serverURL, err := url.Parse(server)
8205	if err != nil {
8206		return nil, err
8207	}
8208
8209	operationPath := fmt.Sprintf("/extensions/work/items/%s", pathParam0)
8210	if operationPath[0] == '/' {
8211		operationPath = "." + operationPath
8212	}
8213
8214	queryURL, err := serverURL.Parse(operationPath)
8215	if err != nil {
8216		return nil, err
8217	}
8218
8219	if params != nil {
8220		// queryValues collects non-styled parameters (passthrough, JSON)
8221		// that are safe to round-trip through url.Values.Encode().
8222		queryValues := queryURL.Query()
8223		// rawQueryFragments collects pre-encoded query fragments from
8224		// styled parameters, preserving literal commas as delimiters
8225		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8226		var rawQueryFragments []string
8227
8228		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8229			return nil, err
8230		} else {
8231			for _, qp := range strings.Split(queryFrag, "&") {
8232				rawQueryFragments = append(rawQueryFragments, qp)
8233			}
8234		}
8235
8236		if encoded := queryValues.Encode(); encoded != "" {
8237			rawQueryFragments = append(rawQueryFragments, encoded)
8238		}
8239		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8240	}
8241
8242	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
8243	if err != nil {
8244		return nil, err
8245	}
8246
8247	return req, nil
8248}
8249
8250// NewPatchWorkRequestWithApplicationMergePatchPlusJSONBody calls the generic PatchWork builder with application/merge-patch+json body
8251func NewPatchWorkRequestWithApplicationMergePatchPlusJSONBody(server string, itemID ID, params *PatchWorkParams, body PatchWorkApplicationMergePatchPlusJSONRequestBody) (*http.Request, error) {
8252	var bodyReader io.Reader
8253	buf, err := json.Marshal(body)
8254	if err != nil {
8255		return nil, err
8256	}
8257	bodyReader = bytes.NewReader(buf)
8258	return NewPatchWorkRequestWithBody(server, itemID, params, "application/merge-patch+json", bodyReader)
8259}
8260
8261// NewPatchWorkRequestWithBody constructs an http.Request for the PatchWork method, with any body, and a specified content type
8262func NewPatchWorkRequestWithBody(server string, itemID ID, params *PatchWorkParams, contentType string, body io.Reader) (*http.Request, error) {
8263	var err error
8264
8265	var pathParam0 string
8266
8267	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "item_id", itemID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
8268	if err != nil {
8269		return nil, err
8270	}
8271
8272	serverURL, err := url.Parse(server)
8273	if err != nil {
8274		return nil, err
8275	}
8276
8277	operationPath := fmt.Sprintf("/extensions/work/items/%s", pathParam0)
8278	if operationPath[0] == '/' {
8279		operationPath = "." + operationPath
8280	}
8281
8282	queryURL, err := serverURL.Parse(operationPath)
8283	if err != nil {
8284		return nil, err
8285	}
8286
8287	if params != nil {
8288		// queryValues collects non-styled parameters (passthrough, JSON)
8289		// that are safe to round-trip through url.Values.Encode().
8290		queryValues := queryURL.Query()
8291		// rawQueryFragments collects pre-encoded query fragments from
8292		// styled parameters, preserving literal commas as delimiters
8293		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8294		var rawQueryFragments []string
8295
8296		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8297			return nil, err
8298		} else {
8299			for _, qp := range strings.Split(queryFrag, "&") {
8300				rawQueryFragments = append(rawQueryFragments, qp)
8301			}
8302		}
8303
8304		if encoded := queryValues.Encode(); encoded != "" {
8305			rawQueryFragments = append(rawQueryFragments, encoded)
8306		}
8307		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8308	}
8309
8310	req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
8311	if err != nil {
8312		return nil, err
8313	}
8314
8315	req.Header.Add("Content-Type", contentType)
8316
8317	if params != nil {
8318
8319		var headerParam0 string
8320
8321		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
8322		if err != nil {
8323			return nil, err
8324		}
8325
8326		req.Header.Set("If-Match", headerParam0)
8327
8328	}
8329
8330	return req, nil
8331}
8332
8333// NewListHostsRequest constructs an http.Request for the ListHosts method
8334func NewListHostsRequest(server string, params *ListHostsParams) (*http.Request, error) {
8335	var err error
8336
8337	serverURL, err := url.Parse(server)
8338	if err != nil {
8339		return nil, err
8340	}
8341
8342	operationPath := fmt.Sprintf("/hosts")
8343	if operationPath[0] == '/' {
8344		operationPath = "." + operationPath
8345	}
8346
8347	queryURL, err := serverURL.Parse(operationPath)
8348	if err != nil {
8349		return nil, err
8350	}
8351
8352	if params != nil {
8353		// queryValues collects non-styled parameters (passthrough, JSON)
8354		// that are safe to round-trip through url.Values.Encode().
8355		queryValues := queryURL.Query()
8356		// rawQueryFragments collects pre-encoded query fragments from
8357		// styled parameters, preserving literal commas as delimiters
8358		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8359		var rawQueryFragments []string
8360
8361		if params.Target != nil {
8362
8363			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "target", *params.Target, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8364				return nil, err
8365			} else {
8366				for _, qp := range strings.Split(queryFrag, "&") {
8367					rawQueryFragments = append(rawQueryFragments, qp)
8368				}
8369			}
8370
8371		}
8372
8373		if params.Limit != nil {
8374
8375			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
8376				return nil, err
8377			} else {
8378				for _, qp := range strings.Split(queryFrag, "&") {
8379					rawQueryFragments = append(rawQueryFragments, qp)
8380				}
8381			}
8382
8383		}
8384
8385		if params.Next != nil {
8386
8387			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8388				return nil, err
8389			} else {
8390				for _, qp := range strings.Split(queryFrag, "&") {
8391					rawQueryFragments = append(rawQueryFragments, qp)
8392				}
8393			}
8394
8395		}
8396
8397		if encoded := queryValues.Encode(); encoded != "" {
8398			rawQueryFragments = append(rawQueryFragments, encoded)
8399		}
8400		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8401	}
8402
8403	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
8404	if err != nil {
8405		return nil, err
8406	}
8407
8408	return req, nil
8409}
8410
8411// NewProbeHostRequest calls the generic ProbeHost builder with application/json body
8412func NewProbeHostRequest(server string, host ID, body ProbeHostJSONRequestBody) (*http.Request, error) {
8413	var bodyReader io.Reader
8414	buf, err := json.Marshal(body)
8415	if err != nil {
8416		return nil, err
8417	}
8418	bodyReader = bytes.NewReader(buf)
8419	return NewProbeHostRequestWithBody(server, host, "application/json", bodyReader)
8420}
8421
8422// NewProbeHostRequestWithBody constructs an http.Request for the ProbeHost method, with any body, and a specified content type
8423func NewProbeHostRequestWithBody(server string, host ID, contentType string, body io.Reader) (*http.Request, error) {
8424	var err error
8425
8426	var pathParam0 string
8427
8428	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "host", host, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
8429	if err != nil {
8430		return nil, err
8431	}
8432
8433	serverURL, err := url.Parse(server)
8434	if err != nil {
8435		return nil, err
8436	}
8437
8438	operationPath := fmt.Sprintf("/hosts/%s/probe", pathParam0)
8439	if operationPath[0] == '/' {
8440		operationPath = "." + operationPath
8441	}
8442
8443	queryURL, err := serverURL.Parse(operationPath)
8444	if err != nil {
8445		return nil, err
8446	}
8447
8448	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
8449	if err != nil {
8450		return nil, err
8451	}
8452
8453	req.Header.Add("Content-Type", contentType)
8454
8455	return req, nil
8456}
8457
8458// NewListModelsRequest constructs an http.Request for the ListModels method
8459func NewListModelsRequest(server string, params *ListModelsParams) (*http.Request, error) {
8460	var err error
8461
8462	serverURL, err := url.Parse(server)
8463	if err != nil {
8464		return nil, err
8465	}
8466
8467	operationPath := fmt.Sprintf("/models")
8468	if operationPath[0] == '/' {
8469		operationPath = "." + operationPath
8470	}
8471
8472	queryURL, err := serverURL.Parse(operationPath)
8473	if err != nil {
8474		return nil, err
8475	}
8476
8477	if params != nil {
8478		// queryValues collects non-styled parameters (passthrough, JSON)
8479		// that are safe to round-trip through url.Values.Encode().
8480		queryValues := queryURL.Query()
8481		// rawQueryFragments collects pre-encoded query fragments from
8482		// styled parameters, preserving literal commas as delimiters
8483		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8484		var rawQueryFragments []string
8485
8486		if params.View != nil {
8487
8488			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", *params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8489				return nil, err
8490			} else {
8491				for _, qp := range strings.Split(queryFrag, "&") {
8492					rawQueryFragments = append(rawQueryFragments, qp)
8493				}
8494			}
8495
8496		}
8497
8498		if params.Extension != nil {
8499
8500			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "extension", *params.Extension, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8501				return nil, err
8502			} else {
8503				for _, qp := range strings.Split(queryFrag, "&") {
8504					rawQueryFragments = append(rawQueryFragments, qp)
8505				}
8506			}
8507
8508		}
8509
8510		if params.Host != nil {
8511
8512			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "host", *params.Host, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8513				return nil, err
8514			} else {
8515				for _, qp := range strings.Split(queryFrag, "&") {
8516					rawQueryFragments = append(rawQueryFragments, qp)
8517				}
8518			}
8519
8520		}
8521
8522		if params.Model != nil {
8523
8524			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "model", *params.Model, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8525				return nil, err
8526			} else {
8527				for _, qp := range strings.Split(queryFrag, "&") {
8528					rawQueryFragments = append(rawQueryFragments, qp)
8529				}
8530			}
8531
8532		}
8533
8534		if params.ProviderProfile != nil {
8535
8536			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "provider_profile", *params.ProviderProfile, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8537				return nil, err
8538			} else {
8539				for _, qp := range strings.Split(queryFrag, "&") {
8540					rawQueryFragments = append(rawQueryFragments, qp)
8541				}
8542			}
8543
8544		}
8545
8546		if params.Provider != nil {
8547
8548			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "provider", *params.Provider, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8549				return nil, err
8550			} else {
8551				for _, qp := range strings.Split(queryFrag, "&") {
8552					rawQueryFragments = append(rawQueryFragments, qp)
8553				}
8554			}
8555
8556		}
8557
8558		if params.Endpoint != nil {
8559
8560			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "endpoint", *params.Endpoint, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "uri"}); err != nil {
8561				return nil, err
8562			} else {
8563				for _, qp := range strings.Split(queryFrag, "&") {
8564					rawQueryFragments = append(rawQueryFragments, qp)
8565				}
8566			}
8567
8568		}
8569
8570		if params.Limit != nil {
8571
8572			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
8573				return nil, err
8574			} else {
8575				for _, qp := range strings.Split(queryFrag, "&") {
8576					rawQueryFragments = append(rawQueryFragments, qp)
8577				}
8578			}
8579
8580		}
8581
8582		if params.Next != nil {
8583
8584			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8585				return nil, err
8586			} else {
8587				for _, qp := range strings.Split(queryFrag, "&") {
8588					rawQueryFragments = append(rawQueryFragments, qp)
8589				}
8590			}
8591
8592		}
8593
8594		if encoded := queryValues.Encode(); encoded != "" {
8595			rawQueryFragments = append(rawQueryFragments, encoded)
8596		}
8597		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8598	}
8599
8600	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
8601	if err != nil {
8602		return nil, err
8603	}
8604
8605	return req, nil
8606}
8607
8608// NewGetServerRequest constructs an http.Request for the GetServer method
8609func NewGetServerRequest(server string, params *GetServerParams) (*http.Request, error) {
8610	var err error
8611
8612	serverURL, err := url.Parse(server)
8613	if err != nil {
8614		return nil, err
8615	}
8616
8617	operationPath := fmt.Sprintf("/server")
8618	if operationPath[0] == '/' {
8619		operationPath = "." + operationPath
8620	}
8621
8622	queryURL, err := serverURL.Parse(operationPath)
8623	if err != nil {
8624		return nil, err
8625	}
8626
8627	if params != nil {
8628		// queryValues collects non-styled parameters (passthrough, JSON)
8629		// that are safe to round-trip through url.Values.Encode().
8630		queryValues := queryURL.Query()
8631		// rawQueryFragments collects pre-encoded query fragments from
8632		// styled parameters, preserving literal commas as delimiters
8633		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8634		var rawQueryFragments []string
8635
8636		if params.Include != nil {
8637
8638			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "include", *params.Include, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8639				return nil, err
8640			} else {
8641				for _, qp := range strings.Split(queryFrag, "&") {
8642					rawQueryFragments = append(rawQueryFragments, qp)
8643				}
8644			}
8645
8646		}
8647
8648		if params.Limit != nil {
8649
8650			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
8651				return nil, err
8652			} else {
8653				for _, qp := range strings.Split(queryFrag, "&") {
8654					rawQueryFragments = append(rawQueryFragments, qp)
8655				}
8656			}
8657
8658		}
8659
8660		if params.Next != nil {
8661
8662			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8663				return nil, err
8664			} else {
8665				for _, qp := range strings.Split(queryFrag, "&") {
8666					rawQueryFragments = append(rawQueryFragments, qp)
8667				}
8668			}
8669
8670		}
8671
8672		if params.QuotaProvider != nil {
8673
8674			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "quota_provider", *params.QuotaProvider, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8675				return nil, err
8676			} else {
8677				for _, qp := range strings.Split(queryFrag, "&") {
8678					rawQueryFragments = append(rawQueryFragments, qp)
8679				}
8680			}
8681
8682		}
8683
8684		if params.QuotaAccount != nil {
8685
8686			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "quota_account", *params.QuotaAccount, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8687				return nil, err
8688			} else {
8689				for _, qp := range strings.Split(queryFrag, "&") {
8690					rawQueryFragments = append(rawQueryFragments, qp)
8691				}
8692			}
8693
8694		}
8695
8696		if params.QuotaLimit != nil {
8697
8698			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "quota_limit", *params.QuotaLimit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8699				return nil, err
8700			} else {
8701				for _, qp := range strings.Split(queryFrag, "&") {
8702					rawQueryFragments = append(rawQueryFragments, qp)
8703				}
8704			}
8705
8706		}
8707
8708		if params.QuotaSince != nil {
8709
8710			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "quota_since", *params.QuotaSince, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil {
8711				return nil, err
8712			} else {
8713				for _, qp := range strings.Split(queryFrag, "&") {
8714					rawQueryFragments = append(rawQueryFragments, qp)
8715				}
8716			}
8717
8718		}
8719
8720		if encoded := queryValues.Encode(); encoded != "" {
8721			rawQueryFragments = append(rawQueryFragments, encoded)
8722		}
8723		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8724	}
8725
8726	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
8727	if err != nil {
8728		return nil, err
8729	}
8730
8731	return req, nil
8732}
8733
8734// NewShutdownServerRequest calls the generic ShutdownServer builder with application/json body
8735func NewShutdownServerRequest(server string, body ShutdownServerJSONRequestBody) (*http.Request, error) {
8736	var bodyReader io.Reader
8737	buf, err := json.Marshal(body)
8738	if err != nil {
8739		return nil, err
8740	}
8741	bodyReader = bytes.NewReader(buf)
8742	return NewShutdownServerRequestWithBody(server, "application/json", bodyReader)
8743}
8744
8745// NewShutdownServerRequestWithBody constructs an http.Request for the ShutdownServer method, with any body, and a specified content type
8746func NewShutdownServerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
8747	var err error
8748
8749	serverURL, err := url.Parse(server)
8750	if err != nil {
8751		return nil, err
8752	}
8753
8754	operationPath := fmt.Sprintf("/server/shutdown")
8755	if operationPath[0] == '/' {
8756		operationPath = "." + operationPath
8757	}
8758
8759	queryURL, err := serverURL.Parse(operationPath)
8760	if err != nil {
8761		return nil, err
8762	}
8763
8764	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
8765	if err != nil {
8766		return nil, err
8767	}
8768
8769	req.Header.Add("Content-Type", contentType)
8770
8771	return req, nil
8772}
8773
8774// NewListSessionsRequest constructs an http.Request for the ListSessions method
8775func NewListSessionsRequest(server string, params *ListSessionsParams) (*http.Request, error) {
8776	var err error
8777
8778	serverURL, err := url.Parse(server)
8779	if err != nil {
8780		return nil, err
8781	}
8782
8783	operationPath := fmt.Sprintf("/sessions")
8784	if operationPath[0] == '/' {
8785		operationPath = "." + operationPath
8786	}
8787
8788	queryURL, err := serverURL.Parse(operationPath)
8789	if err != nil {
8790		return nil, err
8791	}
8792
8793	if params != nil {
8794		// queryValues collects non-styled parameters (passthrough, JSON)
8795		// that are safe to round-trip through url.Values.Encode().
8796		queryValues := queryURL.Query()
8797		// rawQueryFragments collects pre-encoded query fragments from
8798		// styled parameters, preserving literal commas as delimiters
8799		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8800		var rawQueryFragments []string
8801
8802		if params.Scope != nil {
8803
8804			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "scope", *params.Scope, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8805				return nil, err
8806			} else {
8807				for _, qp := range strings.Split(queryFrag, "&") {
8808					rawQueryFragments = append(rawQueryFragments, qp)
8809				}
8810			}
8811
8812		}
8813
8814		if params.ParentID != nil {
8815
8816			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "parent_id", *params.ParentID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8817				return nil, err
8818			} else {
8819				for _, qp := range strings.Split(queryFrag, "&") {
8820					rawQueryFragments = append(rawQueryFragments, qp)
8821				}
8822			}
8823
8824		}
8825
8826		if params.FamilyID != nil {
8827
8828			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "family_id", *params.FamilyID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8829				return nil, err
8830			} else {
8831				for _, qp := range strings.Split(queryFrag, "&") {
8832					rawQueryFragments = append(rawQueryFragments, qp)
8833				}
8834			}
8835
8836		}
8837
8838		if params.Workspace != nil {
8839
8840			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "workspace", *params.Workspace, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8841				return nil, err
8842			} else {
8843				for _, qp := range strings.Split(queryFrag, "&") {
8844					rawQueryFragments = append(rawQueryFragments, qp)
8845				}
8846			}
8847
8848		}
8849
8850		if params.Search != nil {
8851
8852			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8853				return nil, err
8854			} else {
8855				for _, qp := range strings.Split(queryFrag, "&") {
8856					rawQueryFragments = append(rawQueryFragments, qp)
8857				}
8858			}
8859
8860		}
8861
8862		if params.Archived != nil {
8863
8864			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "archived", *params.Archived, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "boolean", Format: ""}); err != nil {
8865				return nil, err
8866			} else {
8867				for _, qp := range strings.Split(queryFrag, "&") {
8868					rawQueryFragments = append(rawQueryFragments, qp)
8869				}
8870			}
8871
8872		}
8873
8874		if params.NeedsReload != nil {
8875
8876			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "needs_reload", *params.NeedsReload, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "boolean", Format: ""}); err != nil {
8877				return nil, err
8878			} else {
8879				for _, qp := range strings.Split(queryFrag, "&") {
8880					rawQueryFragments = append(rawQueryFragments, qp)
8881				}
8882			}
8883
8884		}
8885
8886		if params.Sort != nil {
8887
8888			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sort", *params.Sort, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8889				return nil, err
8890			} else {
8891				for _, qp := range strings.Split(queryFrag, "&") {
8892					rawQueryFragments = append(rawQueryFragments, qp)
8893				}
8894			}
8895
8896		}
8897
8898		if params.Limit != nil {
8899
8900			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
8901				return nil, err
8902			} else {
8903				for _, qp := range strings.Split(queryFrag, "&") {
8904					rawQueryFragments = append(rawQueryFragments, qp)
8905				}
8906			}
8907
8908		}
8909
8910		if params.Next != nil {
8911
8912			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8913				return nil, err
8914			} else {
8915				for _, qp := range strings.Split(queryFrag, "&") {
8916					rawQueryFragments = append(rawQueryFragments, qp)
8917				}
8918			}
8919
8920		}
8921
8922		if encoded := queryValues.Encode(); encoded != "" {
8923			rawQueryFragments = append(rawQueryFragments, encoded)
8924		}
8925		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
8926	}
8927
8928	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
8929	if err != nil {
8930		return nil, err
8931	}
8932
8933	return req, nil
8934}
8935
8936// NewDeleteSessionRequest constructs an http.Request for the DeleteSession method
8937func NewDeleteSessionRequest(server string, sessionID ID, params *DeleteSessionParams) (*http.Request, error) {
8938	var err error
8939
8940	var pathParam0 string
8941
8942	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
8943	if err != nil {
8944		return nil, err
8945	}
8946
8947	serverURL, err := url.Parse(server)
8948	if err != nil {
8949		return nil, err
8950	}
8951
8952	operationPath := fmt.Sprintf("/sessions/%s", pathParam0)
8953	if operationPath[0] == '/' {
8954		operationPath = "." + operationPath
8955	}
8956
8957	queryURL, err := serverURL.Parse(operationPath)
8958	if err != nil {
8959		return nil, err
8960	}
8961
8962	if params != nil {
8963		// queryValues collects non-styled parameters (passthrough, JSON)
8964		// that are safe to round-trip through url.Values.Encode().
8965		queryValues := queryURL.Query()
8966		// rawQueryFragments collects pre-encoded query fragments from
8967		// styled parameters, preserving literal commas as delimiters
8968		// per the OpenAPI spec (e.g. "color=blue,black,brown").
8969		var rawQueryFragments []string
8970
8971		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8972			return nil, err
8973		} else {
8974			for _, qp := range strings.Split(queryFrag, "&") {
8975				rawQueryFragments = append(rawQueryFragments, qp)
8976			}
8977		}
8978
8979		if params.Scope != nil {
8980
8981			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "scope", *params.Scope, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8982				return nil, err
8983			} else {
8984				for _, qp := range strings.Split(queryFrag, "&") {
8985					rawQueryFragments = append(rawQueryFragments, qp)
8986				}
8987			}
8988
8989		}
8990
8991		if params.FamilyRevision != nil {
8992
8993			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "family_revision", *params.FamilyRevision, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
8994				return nil, err
8995			} else {
8996				for _, qp := range strings.Split(queryFrag, "&") {
8997					rawQueryFragments = append(rawQueryFragments, qp)
8998				}
8999			}
9000
9001		}
9002
9003		if encoded := queryValues.Encode(); encoded != "" {
9004			rawQueryFragments = append(rawQueryFragments, encoded)
9005		}
9006		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
9007	}
9008
9009	req, err := http.NewRequest(http.MethodDelete, queryURL.String(), nil)
9010	if err != nil {
9011		return nil, err
9012	}
9013
9014	if params != nil {
9015
9016		var headerParam0 string
9017
9018		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
9019		if err != nil {
9020			return nil, err
9021		}
9022
9023		req.Header.Set("If-Match", headerParam0)
9024
9025	}
9026
9027	return req, nil
9028}
9029
9030// NewGetSessionRequest constructs an http.Request for the GetSession method
9031func NewGetSessionRequest(server string, sessionID ID, params *GetSessionParams) (*http.Request, error) {
9032	var err error
9033
9034	var pathParam0 string
9035
9036	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9037	if err != nil {
9038		return nil, err
9039	}
9040
9041	serverURL, err := url.Parse(server)
9042	if err != nil {
9043		return nil, err
9044	}
9045
9046	operationPath := fmt.Sprintf("/sessions/%s", pathParam0)
9047	if operationPath[0] == '/' {
9048		operationPath = "." + operationPath
9049	}
9050
9051	queryURL, err := serverURL.Parse(operationPath)
9052	if err != nil {
9053		return nil, err
9054	}
9055
9056	if params != nil {
9057		// queryValues collects non-styled parameters (passthrough, JSON)
9058		// that are safe to round-trip through url.Values.Encode().
9059		queryValues := queryURL.Query()
9060		// rawQueryFragments collects pre-encoded query fragments from
9061		// styled parameters, preserving literal commas as delimiters
9062		// per the OpenAPI spec (e.g. "color=blue,black,brown").
9063		var rawQueryFragments []string
9064
9065		if params.View != nil {
9066
9067			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", *params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9068				return nil, err
9069			} else {
9070				for _, qp := range strings.Split(queryFrag, "&") {
9071					rawQueryFragments = append(rawQueryFragments, qp)
9072				}
9073			}
9074
9075		}
9076
9077		if params.Tail != nil {
9078
9079			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "tail", *params.Tail, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9080				return nil, err
9081			} else {
9082				for _, qp := range strings.Split(queryFrag, "&") {
9083					rawQueryFragments = append(rawQueryFragments, qp)
9084				}
9085			}
9086
9087		}
9088
9089		if params.AfterGeneration != nil {
9090
9091			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "after_generation", *params.AfterGeneration, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9092				return nil, err
9093			} else {
9094				for _, qp := range strings.Split(queryFrag, "&") {
9095					rawQueryFragments = append(rawQueryFragments, qp)
9096				}
9097			}
9098
9099		}
9100
9101		if params.AfterSeq != nil {
9102
9103			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "after_seq", *params.AfterSeq, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9104				return nil, err
9105			} else {
9106				for _, qp := range strings.Split(queryFrag, "&") {
9107					rawQueryFragments = append(rawQueryFragments, qp)
9108				}
9109			}
9110
9111		}
9112
9113		if encoded := queryValues.Encode(); encoded != "" {
9114			rawQueryFragments = append(rawQueryFragments, encoded)
9115		}
9116		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
9117	}
9118
9119	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
9120	if err != nil {
9121		return nil, err
9122	}
9123
9124	return req, nil
9125}
9126
9127// NewPatchSessionRequestWithApplicationMergePatchPlusJSONBody calls the generic PatchSession builder with application/merge-patch+json body
9128func NewPatchSessionRequestWithApplicationMergePatchPlusJSONBody(server string, sessionID ID, params *PatchSessionParams, body PatchSessionApplicationMergePatchPlusJSONRequestBody) (*http.Request, error) {
9129	var bodyReader io.Reader
9130	buf, err := json.Marshal(body)
9131	if err != nil {
9132		return nil, err
9133	}
9134	bodyReader = bytes.NewReader(buf)
9135	return NewPatchSessionRequestWithBody(server, sessionID, params, "application/merge-patch+json", bodyReader)
9136}
9137
9138// NewPatchSessionRequestWithBody constructs an http.Request for the PatchSession method, with any body, and a specified content type
9139func NewPatchSessionRequestWithBody(server string, sessionID ID, params *PatchSessionParams, contentType string, body io.Reader) (*http.Request, error) {
9140	var err error
9141
9142	var pathParam0 string
9143
9144	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9145	if err != nil {
9146		return nil, err
9147	}
9148
9149	serverURL, err := url.Parse(server)
9150	if err != nil {
9151		return nil, err
9152	}
9153
9154	operationPath := fmt.Sprintf("/sessions/%s", pathParam0)
9155	if operationPath[0] == '/' {
9156		operationPath = "." + operationPath
9157	}
9158
9159	queryURL, err := serverURL.Parse(operationPath)
9160	if err != nil {
9161		return nil, err
9162	}
9163
9164	if params != nil {
9165		// queryValues collects non-styled parameters (passthrough, JSON)
9166		// that are safe to round-trip through url.Values.Encode().
9167		queryValues := queryURL.Query()
9168		// rawQueryFragments collects pre-encoded query fragments from
9169		// styled parameters, preserving literal commas as delimiters
9170		// per the OpenAPI spec (e.g. "color=blue,black,brown").
9171		var rawQueryFragments []string
9172
9173		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9174			return nil, err
9175		} else {
9176			for _, qp := range strings.Split(queryFrag, "&") {
9177				rawQueryFragments = append(rawQueryFragments, qp)
9178			}
9179		}
9180
9181		if encoded := queryValues.Encode(); encoded != "" {
9182			rawQueryFragments = append(rawQueryFragments, encoded)
9183		}
9184		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
9185	}
9186
9187	req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
9188	if err != nil {
9189		return nil, err
9190	}
9191
9192	req.Header.Add("Content-Type", contentType)
9193
9194	if params != nil {
9195
9196		var headerParam0 string
9197
9198		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
9199		if err != nil {
9200			return nil, err
9201		}
9202
9203		req.Header.Set("If-Match", headerParam0)
9204
9205	}
9206
9207	return req, nil
9208}
9209
9210// NewCreateSessionRequest calls the generic CreateSession builder with application/json body
9211func NewCreateSessionRequest(server string, sessionID UUIDv7, params *CreateSessionParams, body CreateSessionJSONRequestBody) (*http.Request, error) {
9212	var bodyReader io.Reader
9213	buf, err := json.Marshal(body)
9214	if err != nil {
9215		return nil, err
9216	}
9217	bodyReader = bytes.NewReader(buf)
9218	return NewCreateSessionRequestWithBody(server, sessionID, params, "application/json", bodyReader)
9219}
9220
9221// NewCreateSessionRequestWithBody constructs an http.Request for the CreateSession method, with any body, and a specified content type
9222func NewCreateSessionRequestWithBody(server string, sessionID UUIDv7, params *CreateSessionParams, contentType string, body io.Reader) (*http.Request, error) {
9223	var err error
9224
9225	var pathParam0 string
9226
9227	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"})
9228	if err != nil {
9229		return nil, err
9230	}
9231
9232	serverURL, err := url.Parse(server)
9233	if err != nil {
9234		return nil, err
9235	}
9236
9237	operationPath := fmt.Sprintf("/sessions/%s", pathParam0)
9238	if operationPath[0] == '/' {
9239		operationPath = "." + operationPath
9240	}
9241
9242	queryURL, err := serverURL.Parse(operationPath)
9243	if err != nil {
9244		return nil, err
9245	}
9246
9247	req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
9248	if err != nil {
9249		return nil, err
9250	}
9251
9252	req.Header.Add("Content-Type", contentType)
9253
9254	if params != nil {
9255
9256		var headerParam0 string
9257
9258		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-None-Match", params.IfNoneMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
9259		if err != nil {
9260			return nil, err
9261		}
9262
9263		req.Header.Set("If-None-Match", headerParam0)
9264
9265	}
9266
9267	return req, nil
9268}
9269
9270// NewGetActiveOutputContentRequest constructs an http.Request for the GetActiveOutputContent method
9271func NewGetActiveOutputContentRequest(server string, sessionID ID, contentID ID, params *GetActiveOutputContentParams) (*http.Request, error) {
9272	var err error
9273
9274	var pathParam0 string
9275
9276	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9277	if err != nil {
9278		return nil, err
9279	}
9280
9281	var pathParam1 string
9282
9283	pathParam1, err = runtime.StyleParamWithOptions("simple", false, "content_id", contentID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9284	if err != nil {
9285		return nil, err
9286	}
9287
9288	serverURL, err := url.Parse(server)
9289	if err != nil {
9290		return nil, err
9291	}
9292
9293	operationPath := fmt.Sprintf("/sessions/%s/active-output/%s", pathParam0, pathParam1)
9294	if operationPath[0] == '/' {
9295		operationPath = "." + operationPath
9296	}
9297
9298	queryURL, err := serverURL.Parse(operationPath)
9299	if err != nil {
9300		return nil, err
9301	}
9302
9303	if params != nil {
9304		// queryValues collects non-styled parameters (passthrough, JSON)
9305		// that are safe to round-trip through url.Values.Encode().
9306		queryValues := queryURL.Query()
9307		// rawQueryFragments collects pre-encoded query fragments from
9308		// styled parameters, preserving literal commas as delimiters
9309		// per the OpenAPI spec (e.g. "color=blue,black,brown").
9310		var rawQueryFragments []string
9311
9312		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "snapshot", params.Snapshot, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9313			return nil, err
9314		} else {
9315			for _, qp := range strings.Split(queryFrag, "&") {
9316				rawQueryFragments = append(rawQueryFragments, qp)
9317			}
9318		}
9319
9320		if params.Next != nil {
9321
9322			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9323				return nil, err
9324			} else {
9325				for _, qp := range strings.Split(queryFrag, "&") {
9326					rawQueryFragments = append(rawQueryFragments, qp)
9327				}
9328			}
9329
9330		}
9331
9332		if encoded := queryValues.Encode(); encoded != "" {
9333			rawQueryFragments = append(rawQueryFragments, encoded)
9334		}
9335		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
9336	}
9337
9338	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
9339	if err != nil {
9340		return nil, err
9341	}
9342
9343	return req, nil
9344}
9345
9346// NewGetCatalogRequest constructs an http.Request for the GetCatalog method
9347func NewGetCatalogRequest(server string, sessionID ID, params *GetCatalogParams) (*http.Request, error) {
9348	var err error
9349
9350	var pathParam0 string
9351
9352	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9353	if err != nil {
9354		return nil, err
9355	}
9356
9357	serverURL, err := url.Parse(server)
9358	if err != nil {
9359		return nil, err
9360	}
9361
9362	operationPath := fmt.Sprintf("/sessions/%s/catalog", pathParam0)
9363	if operationPath[0] == '/' {
9364		operationPath = "." + operationPath
9365	}
9366
9367	queryURL, err := serverURL.Parse(operationPath)
9368	if err != nil {
9369		return nil, err
9370	}
9371
9372	if params != nil {
9373		// queryValues collects non-styled parameters (passthrough, JSON)
9374		// that are safe to round-trip through url.Values.Encode().
9375		queryValues := queryURL.Query()
9376		// rawQueryFragments collects pre-encoded query fragments from
9377		// styled parameters, preserving literal commas as delimiters
9378		// per the OpenAPI spec (e.g. "color=blue,black,brown").
9379		var rawQueryFragments []string
9380
9381		if params.Kind != nil {
9382
9383			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "kind", *params.Kind, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9384				return nil, err
9385			} else {
9386				for _, qp := range strings.Split(queryFrag, "&") {
9387					rawQueryFragments = append(rawQueryFragments, qp)
9388				}
9389			}
9390
9391		}
9392
9393		if params.Limit != nil {
9394
9395			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9396				return nil, err
9397			} else {
9398				for _, qp := range strings.Split(queryFrag, "&") {
9399					rawQueryFragments = append(rawQueryFragments, qp)
9400				}
9401			}
9402
9403		}
9404
9405		if params.Next != nil {
9406
9407			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9408				return nil, err
9409			} else {
9410				for _, qp := range strings.Split(queryFrag, "&") {
9411					rawQueryFragments = append(rawQueryFragments, qp)
9412				}
9413			}
9414
9415		}
9416
9417		if encoded := queryValues.Encode(); encoded != "" {
9418			rawQueryFragments = append(rawQueryFragments, encoded)
9419		}
9420		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
9421	}
9422
9423	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
9424	if err != nil {
9425		return nil, err
9426	}
9427
9428	return req, nil
9429}
9430
9431// NewCompactSessionRequest calls the generic CompactSession builder with application/json body
9432func NewCompactSessionRequest(server string, sessionID ID, body CompactSessionJSONRequestBody) (*http.Request, error) {
9433	var bodyReader io.Reader
9434	buf, err := json.Marshal(body)
9435	if err != nil {
9436		return nil, err
9437	}
9438	bodyReader = bytes.NewReader(buf)
9439	return NewCompactSessionRequestWithBody(server, sessionID, "application/json", bodyReader)
9440}
9441
9442// NewCompactSessionRequestWithBody constructs an http.Request for the CompactSession method, with any body, and a specified content type
9443func NewCompactSessionRequestWithBody(server string, sessionID ID, contentType string, body io.Reader) (*http.Request, error) {
9444	var err error
9445
9446	var pathParam0 string
9447
9448	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9449	if err != nil {
9450		return nil, err
9451	}
9452
9453	serverURL, err := url.Parse(server)
9454	if err != nil {
9455		return nil, err
9456	}
9457
9458	operationPath := fmt.Sprintf("/sessions/%s/compaction", pathParam0)
9459	if operationPath[0] == '/' {
9460		operationPath = "." + operationPath
9461	}
9462
9463	queryURL, err := serverURL.Parse(operationPath)
9464	if err != nil {
9465		return nil, err
9466	}
9467
9468	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
9469	if err != nil {
9470		return nil, err
9471	}
9472
9473	req.Header.Add("Content-Type", contentType)
9474
9475	return req, nil
9476}
9477
9478// NewGetContextRequest constructs an http.Request for the GetContext method
9479func NewGetContextRequest(server string, sessionID ID, params *GetContextParams) (*http.Request, error) {
9480	var err error
9481
9482	var pathParam0 string
9483
9484	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9485	if err != nil {
9486		return nil, err
9487	}
9488
9489	serverURL, err := url.Parse(server)
9490	if err != nil {
9491		return nil, err
9492	}
9493
9494	operationPath := fmt.Sprintf("/sessions/%s/context", pathParam0)
9495	if operationPath[0] == '/' {
9496		operationPath = "." + operationPath
9497	}
9498
9499	queryURL, err := serverURL.Parse(operationPath)
9500	if err != nil {
9501		return nil, err
9502	}
9503
9504	if params != nil {
9505		// queryValues collects non-styled parameters (passthrough, JSON)
9506		// that are safe to round-trip through url.Values.Encode().
9507		queryValues := queryURL.Query()
9508		// rawQueryFragments collects pre-encoded query fragments from
9509		// styled parameters, preserving literal commas as delimiters
9510		// per the OpenAPI spec (e.g. "color=blue,black,brown").
9511		var rawQueryFragments []string
9512
9513		if params.View != nil {
9514
9515			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", *params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9516				return nil, err
9517			} else {
9518				for _, qp := range strings.Split(queryFrag, "&") {
9519					rawQueryFragments = append(rawQueryFragments, qp)
9520				}
9521			}
9522
9523		}
9524
9525		if params.SnapshotID != nil {
9526
9527			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "snapshot_id", *params.SnapshotID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9528				return nil, err
9529			} else {
9530				for _, qp := range strings.Split(queryFrag, "&") {
9531					rawQueryFragments = append(rawQueryFragments, qp)
9532				}
9533			}
9534
9535		}
9536
9537		if params.SectionID != nil {
9538
9539			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "section_id", *params.SectionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9540				return nil, err
9541			} else {
9542				for _, qp := range strings.Split(queryFrag, "&") {
9543					rawQueryFragments = append(rawQueryFragments, qp)
9544				}
9545			}
9546
9547		}
9548
9549		if params.Page != nil {
9550
9551			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9552				return nil, err
9553			} else {
9554				for _, qp := range strings.Split(queryFrag, "&") {
9555					rawQueryFragments = append(rawQueryFragments, qp)
9556				}
9557			}
9558
9559		}
9560
9561		if params.After != nil {
9562
9563			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "after", *params.After, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9564				return nil, err
9565			} else {
9566				for _, qp := range strings.Split(queryFrag, "&") {
9567					rawQueryFragments = append(rawQueryFragments, qp)
9568				}
9569			}
9570
9571		}
9572
9573		if params.Limit != nil {
9574
9575			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9576				return nil, err
9577			} else {
9578				for _, qp := range strings.Split(queryFrag, "&") {
9579					rawQueryFragments = append(rawQueryFragments, qp)
9580				}
9581			}
9582
9583		}
9584
9585		if params.Next != nil {
9586
9587			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9588				return nil, err
9589			} else {
9590				for _, qp := range strings.Split(queryFrag, "&") {
9591					rawQueryFragments = append(rawQueryFragments, qp)
9592				}
9593			}
9594
9595		}
9596
9597		if encoded := queryValues.Encode(); encoded != "" {
9598			rawQueryFragments = append(rawQueryFragments, encoded)
9599		}
9600		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
9601	}
9602
9603	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
9604	if err != nil {
9605		return nil, err
9606	}
9607
9608	return req, nil
9609}
9610
9611// NewGetHistoryRequest constructs an http.Request for the GetHistory method
9612func NewGetHistoryRequest(server string, sessionID ID, params *GetHistoryParams) (*http.Request, error) {
9613	var err error
9614
9615	var pathParam0 string
9616
9617	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9618	if err != nil {
9619		return nil, err
9620	}
9621
9622	serverURL, err := url.Parse(server)
9623	if err != nil {
9624		return nil, err
9625	}
9626
9627	operationPath := fmt.Sprintf("/sessions/%s/history", pathParam0)
9628	if operationPath[0] == '/' {
9629		operationPath = "." + operationPath
9630	}
9631
9632	queryURL, err := serverURL.Parse(operationPath)
9633	if err != nil {
9634		return nil, err
9635	}
9636
9637	if params != nil {
9638		// queryValues collects non-styled parameters (passthrough, JSON)
9639		// that are safe to round-trip through url.Values.Encode().
9640		queryValues := queryURL.Query()
9641		// rawQueryFragments collects pre-encoded query fragments from
9642		// styled parameters, preserving literal commas as delimiters
9643		// per the OpenAPI spec (e.g. "color=blue,black,brown").
9644		var rawQueryFragments []string
9645
9646		if params.View != nil {
9647
9648			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "view", *params.View, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9649				return nil, err
9650			} else {
9651				for _, qp := range strings.Split(queryFrag, "&") {
9652					rawQueryFragments = append(rawQueryFragments, qp)
9653				}
9654			}
9655
9656		}
9657
9658		if params.Before != nil {
9659
9660			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "before", *params.Before, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9661				return nil, err
9662			} else {
9663				for _, qp := range strings.Split(queryFrag, "&") {
9664					rawQueryFragments = append(rawQueryFragments, qp)
9665				}
9666			}
9667
9668		}
9669
9670		if params.After != nil {
9671
9672			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "after", *params.After, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9673				return nil, err
9674			} else {
9675				for _, qp := range strings.Split(queryFrag, "&") {
9676					rawQueryFragments = append(rawQueryFragments, qp)
9677				}
9678			}
9679
9680		}
9681
9682		if params.Next != nil {
9683
9684			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9685				return nil, err
9686			} else {
9687				for _, qp := range strings.Split(queryFrag, "&") {
9688					rawQueryFragments = append(rawQueryFragments, qp)
9689				}
9690			}
9691
9692		}
9693
9694		if params.Limit != nil {
9695
9696			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
9697				return nil, err
9698			} else {
9699				for _, qp := range strings.Split(queryFrag, "&") {
9700					rawQueryFragments = append(rawQueryFragments, qp)
9701				}
9702			}
9703
9704		}
9705
9706		if encoded := queryValues.Encode(); encoded != "" {
9707			rawQueryFragments = append(rawQueryFragments, encoded)
9708		}
9709		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
9710	}
9711
9712	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
9713	if err != nil {
9714		return nil, err
9715	}
9716
9717	return req, nil
9718}
9719
9720// NewGetHistoryContentRequest constructs an http.Request for the GetHistoryContent method
9721func NewGetHistoryContentRequest(server string, sessionID ID, entryID ID, params *GetHistoryContentParams) (*http.Request, error) {
9722	var err error
9723
9724	var pathParam0 string
9725
9726	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9727	if err != nil {
9728		return nil, err
9729	}
9730
9731	var pathParam1 string
9732
9733	pathParam1, err = runtime.StyleParamWithOptions("simple", false, "entry_id", entryID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9734	if err != nil {
9735		return nil, err
9736	}
9737
9738	serverURL, err := url.Parse(server)
9739	if err != nil {
9740		return nil, err
9741	}
9742
9743	operationPath := fmt.Sprintf("/sessions/%s/history/%s", pathParam0, pathParam1)
9744	if operationPath[0] == '/' {
9745		operationPath = "." + operationPath
9746	}
9747
9748	queryURL, err := serverURL.Parse(operationPath)
9749	if err != nil {
9750		return nil, err
9751	}
9752
9753	if params != nil {
9754		// queryValues collects non-styled parameters (passthrough, JSON)
9755		// that are safe to round-trip through url.Values.Encode().
9756		queryValues := queryURL.Query()
9757		// rawQueryFragments collects pre-encoded query fragments from
9758		// styled parameters, preserving literal commas as delimiters
9759		// per the OpenAPI spec (e.g. "color=blue,black,brown").
9760		var rawQueryFragments []string
9761
9762		if params.Next != nil {
9763
9764			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
9765				return nil, err
9766			} else {
9767				for _, qp := range strings.Split(queryFrag, "&") {
9768					rawQueryFragments = append(rawQueryFragments, qp)
9769				}
9770			}
9771
9772		}
9773
9774		if encoded := queryValues.Encode(); encoded != "" {
9775			rawQueryFragments = append(rawQueryFragments, encoded)
9776		}
9777		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
9778	}
9779
9780	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
9781	if err != nil {
9782		return nil, err
9783	}
9784
9785	return req, nil
9786}
9787
9788// NewGetHistoryImageRequest constructs an http.Request for the GetHistoryImage method
9789func NewGetHistoryImageRequest(server string, sessionID ID, entryID ID, field string) (*http.Request, error) {
9790	var err error
9791
9792	var pathParam0 string
9793
9794	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9795	if err != nil {
9796		return nil, err
9797	}
9798
9799	var pathParam1 string
9800
9801	pathParam1, err = runtime.StyleParamWithOptions("simple", false, "entry_id", entryID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9802	if err != nil {
9803		return nil, err
9804	}
9805
9806	var pathParam2 string
9807
9808	pathParam2, err = runtime.StyleParamWithOptions("simple", false, "field", field, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9809	if err != nil {
9810		return nil, err
9811	}
9812
9813	serverURL, err := url.Parse(server)
9814	if err != nil {
9815		return nil, err
9816	}
9817
9818	operationPath := fmt.Sprintf("/sessions/%s/history/%s/%s", pathParam0, pathParam1, pathParam2)
9819	if operationPath[0] == '/' {
9820		operationPath = "." + operationPath
9821	}
9822
9823	queryURL, err := serverURL.Parse(operationPath)
9824	if err != nil {
9825		return nil, err
9826	}
9827
9828	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
9829	if err != nil {
9830		return nil, err
9831	}
9832
9833	return req, nil
9834}
9835
9836// NewGetInputRequest constructs an http.Request for the GetInput method
9837func NewGetInputRequest(server string, sessionID ID, inputID ID) (*http.Request, error) {
9838	var err error
9839
9840	var pathParam0 string
9841
9842	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9843	if err != nil {
9844		return nil, err
9845	}
9846
9847	var pathParam1 string
9848
9849	pathParam1, err = runtime.StyleParamWithOptions("simple", false, "input_id", inputID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9850	if err != nil {
9851		return nil, err
9852	}
9853
9854	serverURL, err := url.Parse(server)
9855	if err != nil {
9856		return nil, err
9857	}
9858
9859	operationPath := fmt.Sprintf("/sessions/%s/inputs/%s", pathParam0, pathParam1)
9860	if operationPath[0] == '/' {
9861		operationPath = "." + operationPath
9862	}
9863
9864	queryURL, err := serverURL.Parse(operationPath)
9865	if err != nil {
9866		return nil, err
9867	}
9868
9869	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
9870	if err != nil {
9871		return nil, err
9872	}
9873
9874	return req, nil
9875}
9876
9877// NewPutInputRequest calls the generic PutInput builder with application/json body
9878func NewPutInputRequest(server string, sessionID ID, inputID UUIDv7, body PutInputJSONRequestBody) (*http.Request, error) {
9879	var bodyReader io.Reader
9880	buf, err := json.Marshal(body)
9881	if err != nil {
9882		return nil, err
9883	}
9884	bodyReader = bytes.NewReader(buf)
9885	return NewPutInputRequestWithBody(server, sessionID, inputID, "application/json", bodyReader)
9886}
9887
9888// NewPutInputRequestWithBody constructs an http.Request for the PutInput method, with any body, and a specified content type
9889func NewPutInputRequestWithBody(server string, sessionID ID, inputID UUIDv7, contentType string, body io.Reader) (*http.Request, error) {
9890	var err error
9891
9892	var pathParam0 string
9893
9894	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9895	if err != nil {
9896		return nil, err
9897	}
9898
9899	var pathParam1 string
9900
9901	pathParam1, err = runtime.StyleParamWithOptions("simple", false, "input_id", inputID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"})
9902	if err != nil {
9903		return nil, err
9904	}
9905
9906	serverURL, err := url.Parse(server)
9907	if err != nil {
9908		return nil, err
9909	}
9910
9911	operationPath := fmt.Sprintf("/sessions/%s/inputs/%s", pathParam0, pathParam1)
9912	if operationPath[0] == '/' {
9913		operationPath = "." + operationPath
9914	}
9915
9916	queryURL, err := serverURL.Parse(operationPath)
9917	if err != nil {
9918		return nil, err
9919	}
9920
9921	req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
9922	if err != nil {
9923		return nil, err
9924	}
9925
9926	req.Header.Add("Content-Type", contentType)
9927
9928	return req, nil
9929}
9930
9931// NewCancelInputRequest calls the generic CancelInput builder with application/json body
9932func NewCancelInputRequest(server string, sessionID ID, inputID ID, body CancelInputJSONRequestBody) (*http.Request, error) {
9933	var bodyReader io.Reader
9934	buf, err := json.Marshal(body)
9935	if err != nil {
9936		return nil, err
9937	}
9938	bodyReader = bytes.NewReader(buf)
9939	return NewCancelInputRequestWithBody(server, sessionID, inputID, "application/json", bodyReader)
9940}
9941
9942// NewCancelInputRequestWithBody constructs an http.Request for the CancelInput method, with any body, and a specified content type
9943func NewCancelInputRequestWithBody(server string, sessionID ID, inputID ID, contentType string, body io.Reader) (*http.Request, error) {
9944	var err error
9945
9946	var pathParam0 string
9947
9948	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9949	if err != nil {
9950		return nil, err
9951	}
9952
9953	var pathParam1 string
9954
9955	pathParam1, err = runtime.StyleParamWithOptions("simple", false, "input_id", inputID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
9956	if err != nil {
9957		return nil, err
9958	}
9959
9960	serverURL, err := url.Parse(server)
9961	if err != nil {
9962		return nil, err
9963	}
9964
9965	operationPath := fmt.Sprintf("/sessions/%s/inputs/%s/cancel", pathParam0, pathParam1)
9966	if operationPath[0] == '/' {
9967		operationPath = "." + operationPath
9968	}
9969
9970	queryURL, err := serverURL.Parse(operationPath)
9971	if err != nil {
9972		return nil, err
9973	}
9974
9975	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
9976	if err != nil {
9977		return nil, err
9978	}
9979
9980	req.Header.Add("Content-Type", contentType)
9981
9982	return req, nil
9983}
9984
9985// NewInterruptSessionRequest calls the generic InterruptSession builder with application/json body
9986func NewInterruptSessionRequest(server string, sessionID ID, body InterruptSessionJSONRequestBody) (*http.Request, error) {
9987	var bodyReader io.Reader
9988	buf, err := json.Marshal(body)
9989	if err != nil {
9990		return nil, err
9991	}
9992	bodyReader = bytes.NewReader(buf)
9993	return NewInterruptSessionRequestWithBody(server, sessionID, "application/json", bodyReader)
9994}
9995
9996// NewInterruptSessionRequestWithBody constructs an http.Request for the InterruptSession method, with any body, and a specified content type
9997func NewInterruptSessionRequestWithBody(server string, sessionID ID, contentType string, body io.Reader) (*http.Request, error) {
9998	var err error
9999
10000	var pathParam0 string
10001
10002	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
10003	if err != nil {
10004		return nil, err
10005	}
10006
10007	serverURL, err := url.Parse(server)
10008	if err != nil {
10009		return nil, err
10010	}
10011
10012	operationPath := fmt.Sprintf("/sessions/%s/interrupt", pathParam0)
10013	if operationPath[0] == '/' {
10014		operationPath = "." + operationPath
10015	}
10016
10017	queryURL, err := serverURL.Parse(operationPath)
10018	if err != nil {
10019		return nil, err
10020	}
10021
10022	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
10023	if err != nil {
10024		return nil, err
10025	}
10026
10027	req.Header.Add("Content-Type", contentType)
10028
10029	return req, nil
10030}
10031
10032// NewUpgradeKernelRequest calls the generic UpgradeKernel builder with application/json body
10033func NewUpgradeKernelRequest(server string, sessionID ID, body UpgradeKernelJSONRequestBody) (*http.Request, error) {
10034	var bodyReader io.Reader
10035	buf, err := json.Marshal(body)
10036	if err != nil {
10037		return nil, err
10038	}
10039	bodyReader = bytes.NewReader(buf)
10040	return NewUpgradeKernelRequestWithBody(server, sessionID, "application/json", bodyReader)
10041}
10042
10043// NewUpgradeKernelRequestWithBody constructs an http.Request for the UpgradeKernel method, with any body, and a specified content type
10044func NewUpgradeKernelRequestWithBody(server string, sessionID ID, contentType string, body io.Reader) (*http.Request, error) {
10045	var err error
10046
10047	var pathParam0 string
10048
10049	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
10050	if err != nil {
10051		return nil, err
10052	}
10053
10054	serverURL, err := url.Parse(server)
10055	if err != nil {
10056		return nil, err
10057	}
10058
10059	operationPath := fmt.Sprintf("/sessions/%s/kernel/upgrade", pathParam0)
10060	if operationPath[0] == '/' {
10061		operationPath = "." + operationPath
10062	}
10063
10064	queryURL, err := serverURL.Parse(operationPath)
10065	if err != nil {
10066		return nil, err
10067	}
10068
10069	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
10070	if err != nil {
10071		return nil, err
10072	}
10073
10074	req.Header.Add("Content-Type", contentType)
10075
10076	return req, nil
10077}
10078
10079// NewReloadSessionRequest calls the generic ReloadSession builder with application/json body
10080func NewReloadSessionRequest(server string, sessionID ID, body ReloadSessionJSONRequestBody) (*http.Request, error) {
10081	var bodyReader io.Reader
10082	buf, err := json.Marshal(body)
10083	if err != nil {
10084		return nil, err
10085	}
10086	bodyReader = bytes.NewReader(buf)
10087	return NewReloadSessionRequestWithBody(server, sessionID, "application/json", bodyReader)
10088}
10089
10090// NewReloadSessionRequestWithBody constructs an http.Request for the ReloadSession method, with any body, and a specified content type
10091func NewReloadSessionRequestWithBody(server string, sessionID ID, contentType string, body io.Reader) (*http.Request, error) {
10092	var err error
10093
10094	var pathParam0 string
10095
10096	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
10097	if err != nil {
10098		return nil, err
10099	}
10100
10101	serverURL, err := url.Parse(server)
10102	if err != nil {
10103		return nil, err
10104	}
10105
10106	operationPath := fmt.Sprintf("/sessions/%s/reload", pathParam0)
10107	if operationPath[0] == '/' {
10108		operationPath = "." + operationPath
10109	}
10110
10111	queryURL, err := serverURL.Parse(operationPath)
10112	if err != nil {
10113		return nil, err
10114	}
10115
10116	req, err := http.NewRequest(http.MethodPost, queryURL.String(), body)
10117	if err != nil {
10118		return nil, err
10119	}
10120
10121	req.Header.Add("Content-Type", contentType)
10122
10123	return req, nil
10124}
10125
10126// NewRecordVisitRequest calls the generic RecordVisit builder with application/json body
10127func NewRecordVisitRequest(server string, sessionID ID, visitID UUIDv7, body RecordVisitJSONRequestBody) (*http.Request, error) {
10128	var bodyReader io.Reader
10129	buf, err := json.Marshal(body)
10130	if err != nil {
10131		return nil, err
10132	}
10133	bodyReader = bytes.NewReader(buf)
10134	return NewRecordVisitRequestWithBody(server, sessionID, visitID, "application/json", bodyReader)
10135}
10136
10137// NewRecordVisitRequestWithBody constructs an http.Request for the RecordVisit method, with any body, and a specified content type
10138func NewRecordVisitRequestWithBody(server string, sessionID ID, visitID UUIDv7, contentType string, body io.Reader) (*http.Request, error) {
10139	var err error
10140
10141	var pathParam0 string
10142
10143	pathParam0, err = runtime.StyleParamWithOptions("simple", false, "session_id", sessionID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""})
10144	if err != nil {
10145		return nil, err
10146	}
10147
10148	var pathParam1 string
10149
10150	pathParam1, err = runtime.StyleParamWithOptions("simple", false, "visit_id", visitID, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: "uuid"})
10151	if err != nil {
10152		return nil, err
10153	}
10154
10155	serverURL, err := url.Parse(server)
10156	if err != nil {
10157		return nil, err
10158	}
10159
10160	operationPath := fmt.Sprintf("/sessions/%s/visits/%s", pathParam0, pathParam1)
10161	if operationPath[0] == '/' {
10162		operationPath = "." + operationPath
10163	}
10164
10165	queryURL, err := serverURL.Parse(operationPath)
10166	if err != nil {
10167		return nil, err
10168	}
10169
10170	req, err := http.NewRequest(http.MethodPut, queryURL.String(), body)
10171	if err != nil {
10172		return nil, err
10173	}
10174
10175	req.Header.Add("Content-Type", contentType)
10176
10177	return req, nil
10178}
10179
10180// NewGetSettingsRequest constructs an http.Request for the GetSettings method
10181func NewGetSettingsRequest(server string, params *GetSettingsParams) (*http.Request, error) {
10182	var err error
10183
10184	serverURL, err := url.Parse(server)
10185	if err != nil {
10186		return nil, err
10187	}
10188
10189	operationPath := fmt.Sprintf("/settings")
10190	if operationPath[0] == '/' {
10191		operationPath = "." + operationPath
10192	}
10193
10194	queryURL, err := serverURL.Parse(operationPath)
10195	if err != nil {
10196		return nil, err
10197	}
10198
10199	if params != nil {
10200		// queryValues collects non-styled parameters (passthrough, JSON)
10201		// that are safe to round-trip through url.Values.Encode().
10202		queryValues := queryURL.Query()
10203		// rawQueryFragments collects pre-encoded query fragments from
10204		// styled parameters, preserving literal commas as delimiters
10205		// per the OpenAPI spec (e.g. "color=blue,black,brown").
10206		var rawQueryFragments []string
10207
10208		if params.Group != nil {
10209
10210			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "group", *params.Group, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
10211				return nil, err
10212			} else {
10213				for _, qp := range strings.Split(queryFrag, "&") {
10214					rawQueryFragments = append(rawQueryFragments, qp)
10215				}
10216			}
10217
10218		}
10219
10220		if encoded := queryValues.Encode(); encoded != "" {
10221			rawQueryFragments = append(rawQueryFragments, encoded)
10222		}
10223		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
10224	}
10225
10226	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
10227	if err != nil {
10228		return nil, err
10229	}
10230
10231	return req, nil
10232}
10233
10234// NewPatchSettingsRequestWithApplicationMergePatchPlusJSONBody calls the generic PatchSettings builder with application/merge-patch+json body
10235func NewPatchSettingsRequestWithApplicationMergePatchPlusJSONBody(server string, params *PatchSettingsParams, body PatchSettingsApplicationMergePatchPlusJSONRequestBody) (*http.Request, error) {
10236	var bodyReader io.Reader
10237	buf, err := json.Marshal(body)
10238	if err != nil {
10239		return nil, err
10240	}
10241	bodyReader = bytes.NewReader(buf)
10242	return NewPatchSettingsRequestWithBody(server, params, "application/merge-patch+json", bodyReader)
10243}
10244
10245// NewPatchSettingsRequestWithBody constructs an http.Request for the PatchSettings method, with any body, and a specified content type
10246func NewPatchSettingsRequestWithBody(server string, params *PatchSettingsParams, contentType string, body io.Reader) (*http.Request, error) {
10247	var err error
10248
10249	serverURL, err := url.Parse(server)
10250	if err != nil {
10251		return nil, err
10252	}
10253
10254	operationPath := fmt.Sprintf("/settings")
10255	if operationPath[0] == '/' {
10256		operationPath = "." + operationPath
10257	}
10258
10259	queryURL, err := serverURL.Parse(operationPath)
10260	if err != nil {
10261		return nil, err
10262	}
10263
10264	if params != nil {
10265		// queryValues collects non-styled parameters (passthrough, JSON)
10266		// that are safe to round-trip through url.Values.Encode().
10267		queryValues := queryURL.Query()
10268		// rawQueryFragments collects pre-encoded query fragments from
10269		// styled parameters, preserving literal commas as delimiters
10270		// per the OpenAPI spec (e.g. "color=blue,black,brown").
10271		var rawQueryFragments []string
10272
10273		if queryFrag, err := runtime.StyleParamWithOptions("form", true, "group", params.Group, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
10274			return nil, err
10275		} else {
10276			for _, qp := range strings.Split(queryFrag, "&") {
10277				rawQueryFragments = append(rawQueryFragments, qp)
10278			}
10279		}
10280
10281		if encoded := queryValues.Encode(); encoded != "" {
10282			rawQueryFragments = append(rawQueryFragments, encoded)
10283		}
10284		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
10285	}
10286
10287	req, err := http.NewRequest(http.MethodPatch, queryURL.String(), body)
10288	if err != nil {
10289		return nil, err
10290	}
10291
10292	req.Header.Add("Content-Type", contentType)
10293
10294	if params != nil {
10295
10296		var headerParam0 string
10297
10298		headerParam0, err = runtime.StyleParamWithOptions("simple", false, "If-Match", params.IfMatch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""})
10299		if err != nil {
10300			return nil, err
10301		}
10302
10303		req.Header.Set("If-Match", headerParam0)
10304
10305	}
10306
10307	return req, nil
10308}
10309
10310// NewGetStorageRequest constructs an http.Request for the GetStorage method
10311func NewGetStorageRequest(server string, params *GetStorageParams) (*http.Request, error) {
10312	var err error
10313
10314	serverURL, err := url.Parse(server)
10315	if err != nil {
10316		return nil, err
10317	}
10318
10319	operationPath := fmt.Sprintf("/storage")
10320	if operationPath[0] == '/' {
10321		operationPath = "." + operationPath
10322	}
10323
10324	queryURL, err := serverURL.Parse(operationPath)
10325	if err != nil {
10326		return nil, err
10327	}
10328
10329	if params != nil {
10330		// queryValues collects non-styled parameters (passthrough, JSON)
10331		// that are safe to round-trip through url.Values.Encode().
10332		queryValues := queryURL.Query()
10333		// rawQueryFragments collects pre-encoded query fragments from
10334		// styled parameters, preserving literal commas as delimiters
10335		// per the OpenAPI spec (e.g. "color=blue,black,brown").
10336		var rawQueryFragments []string
10337
10338		if params.SessionsNext != nil {
10339
10340			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sessions_next", *params.SessionsNext, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
10341				return nil, err
10342			} else {
10343				for _, qp := range strings.Split(queryFrag, "&") {
10344					rawQueryFragments = append(rawQueryFragments, qp)
10345				}
10346			}
10347
10348		}
10349
10350		if params.FilesNext != nil {
10351
10352			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "files_next", *params.FilesNext, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
10353				return nil, err
10354			} else {
10355				for _, qp := range strings.Split(queryFrag, "&") {
10356					rawQueryFragments = append(rawQueryFragments, qp)
10357				}
10358			}
10359
10360		}
10361
10362		if params.Limit != nil {
10363
10364			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
10365				return nil, err
10366			} else {
10367				for _, qp := range strings.Split(queryFrag, "&") {
10368					rawQueryFragments = append(rawQueryFragments, qp)
10369				}
10370			}
10371
10372		}
10373
10374		if encoded := queryValues.Encode(); encoded != "" {
10375			rawQueryFragments = append(rawQueryFragments, encoded)
10376		}
10377		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
10378	}
10379
10380	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
10381	if err != nil {
10382		return nil, err
10383	}
10384
10385	return req, nil
10386}
10387
10388// NewGetWorkspacesRequest constructs an http.Request for the GetWorkspaces method
10389func NewGetWorkspacesRequest(server string, params *GetWorkspacesParams) (*http.Request, error) {
10390	var err error
10391
10392	serverURL, err := url.Parse(server)
10393	if err != nil {
10394		return nil, err
10395	}
10396
10397	operationPath := fmt.Sprintf("/workspaces")
10398	if operationPath[0] == '/' {
10399		operationPath = "." + operationPath
10400	}
10401
10402	queryURL, err := serverURL.Parse(operationPath)
10403	if err != nil {
10404		return nil, err
10405	}
10406
10407	if params != nil {
10408		// queryValues collects non-styled parameters (passthrough, JSON)
10409		// that are safe to round-trip through url.Values.Encode().
10410		queryValues := queryURL.Query()
10411		// rawQueryFragments collects pre-encoded query fragments from
10412		// styled parameters, preserving literal commas as delimiters
10413		// per the OpenAPI spec (e.g. "color=blue,black,brown").
10414		var rawQueryFragments []string
10415
10416		if params.Location != nil {
10417
10418			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "location", *params.Location, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
10419				return nil, err
10420			} else {
10421				for _, qp := range strings.Split(queryFrag, "&") {
10422					rawQueryFragments = append(rawQueryFragments, qp)
10423				}
10424			}
10425
10426		}
10427
10428		if params.Include != nil {
10429
10430			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "include", *params.Include, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
10431				return nil, err
10432			} else {
10433				for _, qp := range strings.Split(queryFrag, "&") {
10434					rawQueryFragments = append(rawQueryFragments, qp)
10435				}
10436			}
10437
10438		}
10439
10440		if params.Limit != nil {
10441
10442			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: ""}); err != nil {
10443				return nil, err
10444			} else {
10445				for _, qp := range strings.Split(queryFrag, "&") {
10446					rawQueryFragments = append(rawQueryFragments, qp)
10447				}
10448			}
10449
10450		}
10451
10452		if params.Next != nil {
10453
10454			if queryFrag, err := runtime.StyleParamWithOptions("form", true, "next", *params.Next, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil {
10455				return nil, err
10456			} else {
10457				for _, qp := range strings.Split(queryFrag, "&") {
10458					rawQueryFragments = append(rawQueryFragments, qp)
10459				}
10460			}
10461
10462		}
10463
10464		if encoded := queryValues.Encode(); encoded != "" {
10465			rawQueryFragments = append(rawQueryFragments, encoded)
10466		}
10467		queryURL.RawQuery = strings.Join(rawQueryFragments, "&")
10468	}
10469
10470	req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
10471	if err != nil {
10472		return nil, err
10473	}
10474
10475	return req, nil
10476}
10477
10478func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
10479	for _, r := range c.RequestEditors {
10480		if err := r(ctx, req); err != nil {
10481			return err
10482		}
10483	}
10484	for _, r := range additionalEditors {
10485		if err := r(ctx, req); err != nil {
10486			return err
10487		}
10488	}
10489	return nil
10490}
10491
10492// Response decoding is owned by the daemon adapter.