okami.mom/albedo
git clone https://git.nkp.pet/okami.mom/albedo
711d48a
main
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 { 21Detail string `json:"detail"` 22 23// ID Opaque identity. Never infer a resource type or route from its contents. 24ID ID `json:"id"` 25Kind string `json:"kind"` 26Label string `json:"label"` 27 28// Provider Opaque identity. Never infer a resource type or route from its contents. 29Provider ID `json:"provider"` 30SelectedByProfiles []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 { 35Body map [string ]Binding `json:"body"` 36Headers map [string ]Binding `json:"headers"` 37Method string `json:"method"` 38OperationID string `json:"operation_id"` 39Path map [string ]Binding `json:"path"` 40 41// PathTemplate Daemon-relative URL, including any representation query. No foreign origin or fragment. 42PathTemplate ResourceURL `json:"path_template"` 43Query 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. 46ResultSchema DynamicJSON `json:"result_schema"` 47 48// SuccessStatus Expected synchronous JSON success status. Omitted operations accept 200 or 201 for mutations and 200 for reads. 49SuccessStatus * 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 { 54Bytes Counter `json:"bytes"` 55ElapsedMs * int64 `json:"elapsed_ms" nullable:"true"` 56Kind string `json:"kind"` 57 58// MessageID Opaque identity. Never infer a resource type or route from its contents. 59MessageID ID `json:"message_id"` 60Reference * ContentReference `json:"reference" nullable:"true"` 61 62// RunID Opaque identity. Never infer a resource type or route from its contents. 63RunID ID `json:"run_id"` 64Text * string `json:"text" nullable:"true"` 65} 66 67// Activity defines model for Activity. 68type Activity struct { 69CurrentRequest * AgentRequest `json:"current_request,omitempty" nullable:"true"` 70LatestAnswer * struct { 71Bytes Counter `json:"bytes"` 72 73// MessageID Opaque identity. Never infer a resource type or route from its contents. 74MessageID ID `json:"message_id"` 75 }`json:"latest_answer" nullable:"true"` 76LatestInput * struct { 77Bytes Counter `json:"bytes"` 78 79// InputID Opaque identity. Never infer a resource type or route from its contents. 80InputID ID `json:"input_id"` 81Source string `json:"source"` 82 }`json:"latest_input" nullable:"true"` 83LatestProgress * string `json:"latest_progress,omitempty" nullable:"true"` 84Lines []struct { 85Kind string `json:"kind"` 86Text string `json:"text"` 87 }`json:"lines"` 88 89// ObservedAt UTC RFC 3339. 90ObservedAt Timestamp `json:"observed_at"` 91OutputScalars Counter `json:"output_scalars"` 92OutputUTF8Bytes Counter `json:"output_utf8_bytes"` 93} 94 95// ActivityEvent defines model for ActivityEvent. 96type ActivityEvent struct { 97Data struct { 98Activity Activity `json:"activity"` 99CurrentProgress []ToolProgress `json:"current_progress"` 100Cursor Cursor `json:"cursor"` 101 102// SessionID Opaque identity. Never infer a resource type or route from its contents. 103SessionID ID `json:"session_id"` 104Status SessionStatus `json:"status"` 105 }`json:"data"` 106Type string `json:"type"` 107} 108 109// AdmissionProblem defines model for AdmissionProblem. 110type AdmissionProblem struct { 111Code string `json:"code"` 112Detail string `json:"detail"` 113Fields []struct { 114Detail string `json:"detail"` 115Pointer string `json:"pointer"` 116 }`json:"fields,omitempty"` 117Status int64 `json:"status"` 118Title string `json:"title"` 119Type 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. 125InputID ID `json:"input_id"` 126Text string `json:"text"` 127} 128 129// Auth defines model for Auth. 130type Auth struct { 131Accounts []Account `json:"accounts"` 132Providers []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 { 140Checked string `json:"checked"` 141Clock string `json:"clock"` 142Evidence string `json:"evidence"` 143 144// ID Opaque identity. Never infer a resource type or route from its contents. 145ID ID `json:"id"` 146Layer string `json:"layer"` 147Match struct { 148Extension []string `json:"extension" nullable:"true"` 149Host []string `json:"host" nullable:"true"` 150Model []string `json:"model" nullable:"true"` 151 }`json:"match"` 152Note string `json:"note"` 153Policy string `json:"policy"` 154Read * float64 `json:"read" nullable:"true"` 155Source string `json:"source"` 156Survival * struct { 157Max * Counter `json:"max" nullable:"true"` 158Typical Counter `json:"typical"` 159 }`json:"survival" nullable:"true"` 160Tiers []struct { 161Seconds Counter `json:"seconds"` 162Write * float64 `json:"write" nullable:"true"` 163 }`json:"tiers" nullable:"true"` 164} 165 166// CachePolicyLayer defines model for CachePolicyLayer. 167type CachePolicyLayer struct { 168Error * SafeReason `json:"error" nullable:"true"` 169Loaded bool `json:"loaded"` 170Name string `json:"name"` 171Path string `json:"path"` 172} 173 174// CachePolicyPage defines model for CachePolicyPage. 175type CachePolicyPage struct { 176Entries []CachePolicyEntry `json:"entries"` 177Layers []CachePolicyLayer `json:"layers"` 178Matched * CachePolicyEntry `json:"matched" nullable:"true"` 179Next * PageToken `json:"next" nullable:"true"` 180} 181 182// CachePolicyReloadOutcome defines model for CachePolicyReloadOutcome. 183type CachePolicyReloadOutcome struct { 184Failure * SafeReason `json:"failure" nullable:"true"` 185State string `json:"state"` 186} 187 188// CachePrior defines model for CachePrior. 189type CachePrior struct { 190Model * ID `json:"model" nullable:"true"` 191 192// Provider Opaque identity. Never infer a resource type or route from its contents. 193Provider ID `json:"provider"` 194Source string `json:"source"` 195TTLSeconds * int64 `json:"ttl_seconds" nullable:"true"` 196} 197 198// CapabilitySettings defines model for CapabilitySettings. 199type CapabilitySettings struct { 200Preferences map [string ]bool `json:"preferences"` 201} 202 203// CapabilitySettingsChange defines model for CapabilitySettingsChange. 204type CapabilitySettingsChange struct { 205Application SettingsApplication `json:"application"` 206Group string `json:"group"` 207Resource 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. 213CatalogRevision ID `json:"catalog_revision"` 214 215// CatalogSessionID Opaque identity. Never infer a resource type or route from its contents. 216CatalogSessionID ID `json:"catalog_session_id"` 217Choices 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. 223ETag ETag `json:"etag"` 224 225// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 226URL ResourceURL `json:"url"` 227Value CapabilitySettings `json:"value"` 228} 229 230// Catalog Pagination is independent for discovered candidates and loaded commands; next tokens identify their section. 231type Catalog struct { 232Discovery * struct { 233Candidates []CatalogCandidate `json:"candidates"` 234Diagnostics []SafeReason `json:"diagnostics"` 235Next * PageToken `json:"next" nullable:"true"` 236 237// Revision Opaque identity. Never infer a resource type or route from its contents. 238Revision ID `json:"revision"` 239 240// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 241Workspace Workspace `json:"workspace"` 242 }`json:"discovery" nullable:"true"` 243DiscoveryFailure * SafeReason `json:"discovery_failure" nullable:"true"` 244Loaded struct { 245Commands []json.RawMessage `json:"commands"` 246Next * PageToken `json:"next" nullable:"true"` 247Revision * 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. 251NativeCommands []HTTPCommand `json:"native_commands,omitempty"` 252Pages []PageDescriptor `json:"pages,omitempty"` 253} 254 255// CatalogCandidate defines model for CatalogCandidate. 256type CatalogCandidate struct { 257Dependencies []ID `json:"dependencies"` 258Description string `json:"description"` 259Diagnostic * SafeReason `json:"diagnostic" nullable:"true"` 260EffectiveEnabled bool `json:"effective_enabled"` 261Eligible bool `json:"eligible"` 262 263// Extension Installed extension metadata for the inspector. Null for other candidate kinds. 264Extension * ExtensionMetadata `json:"extension" nullable:"true"` 265GlobalPreference * bool `json:"global_preference" nullable:"true"` 266 267// ID Opaque identity. Never infer a resource type or route from its contents. 268ID ID `json:"id"` 269Kind string `json:"kind"` 270PreferenceKey * ID `json:"preference_key" nullable:"true"` 271Quarantined bool `json:"quarantined"` 272ResolvedSource * string `json:"resolved_source" nullable:"true"` 273SessionOverride * bool `json:"session_override" nullable:"true"` 274ShadowedBy * ID `json:"shadowed_by" nullable:"true"` 275Source string `json:"source"` 276Title string `json:"title"` 277Valid 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. 283CheckpointID ID `json:"checkpoint_id"` 284Position Counter `json:"position"` 285Preview Preview `json:"preview"` 286Title string `json:"title"` 287TurnType string `json:"turn_type"` 288} 289 290// CheckpointPage defines model for CheckpointPage. 291type CheckpointPage struct { 292HighWater Counter `json:"high_water"` 293Items []Checkpoint `json:"items"` 294Newer * PageToken `json:"newer" nullable:"true"` 295Older * PageToken `json:"older" nullable:"true"` 296} 297 298// ChildSessionIntent defines model for ChildSessionIntent. 299type ChildSessionIntent struct { 300Address string `json:"address"` 301Effort * string `json:"effort" nullable:"true"` 302 303// InitialInputID Client-generated lowercase UUIDv7. Retained decisions are checked before timestamp expiry. 304InitialInputID UUIDv7 `json:"initial_input_id"` 305Kind string `json:"kind"` 306Model * ID `json:"model" nullable:"true"` 307Name string `json:"name"` 308 309// ParentID Opaque identity. Never infer a resource type or route from its contents. 310ParentID ID `json:"parent_id"` 311Task string `json:"task"` 312} 313 314// ChildSessionRequest defines model for ChildSessionRequest. 315type ChildSessionRequest struct { 316Address string `json:"address"` 317Effort * string `json:"effort,omitempty" nullable:"true"` 318 319// InitialInputID Client-generated lowercase UUIDv7. Retained decisions are checked before timestamp expiry. 320InitialInputID UUIDv7 `json:"initial_input_id"` 321Kind string `json:"kind"` 322Model * ID `json:"model,omitempty" nullable:"true"` 323Name string `json:"name"` 324 325// ParentID Opaque identity. Never infer a resource type or route from its contents. 326ParentID ID `json:"parent_id"` 327Task 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 { 335Data struct { 336ScopeDirty bool `json:"scope_dirty"` 337SessionIDs []ID `json:"session_ids"` 338Urls []ResourceURL `json:"urls"` 339 }`json:"data"` 340Type string `json:"type"` 341} 342 343// CollectionMailEvent defines model for CollectionMailEvent. 344type CollectionMailEvent struct { 345Data MailMetadata `json:"data"` 346Type string `json:"type"` 347} 348 349// CollectionOverflowEvent defines model for CollectionOverflowEvent. 350type CollectionOverflowEvent struct { 351Data EmptyRequest `json:"data"` 352Type string `json:"type"` 353} 354 355// CollectionReadyBatch Examples: {"events":[{"data":{},"type":"ready"},{"data":{"reason":"initial"},"type":"reset"}]} 356type CollectionReadyBatch struct { 357Events []interface {}`json:"events"` 358} 359 360// CollectionReadyEvent defines model for CollectionReadyEvent. 361type CollectionReadyEvent struct { 362Data EmptyRequest `json:"data"` 363Type string `json:"type"` 364} 365 366// CollectionResetEvent defines model for CollectionResetEvent. 367type CollectionResetEvent struct { 368Data struct { 369Reason string `json:"reason"` 370 }`json:"data"` 371Type 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 { 378Data 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. 384Arguments DynamicJSON `json:"arguments"` 385ClientID * string `json:"client_id,omitempty"` 386 387// CommandID Opaque identity. Never infer a resource type or route from its contents. 388CommandID ID `json:"command_id"` 389Kind string `json:"kind"` 390} 391 392// CompactionObservation defines model for CompactionObservation. 393type CompactionObservation struct { 394AfterTokens * Counter `json:"after_tokens" nullable:"true"` 395BeforeTokens * Counter `json:"before_tokens" nullable:"true"` 396EvictedEntries Counter `json:"evicted_entries"` 397Strategy * ID `json:"strategy" nullable:"true"` 398Summary 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. 404Strategy * ID `json:"strategy,omitempty"` 405} 406 407// CompactionResult defines model for CompactionResult. 408type CompactionResult struct { 409EffectiveStrategy * ID `json:"effective_strategy" nullable:"true"` 410Failure * SafeReason `json:"failure" nullable:"true"` 411Observation * CompactionObservation `json:"observation" nullable:"true"` 412SelectionApplied bool `json:"selection_applied"` 413State string `json:"state"` 414} 415 416// Composition defines model for Composition. 417type Composition struct { 418Availability map [string ]bool `json:"availability"` 419Dependencies map [string ][]ID `json:"dependencies"` 420 421// DesiredRevision Opaque identity. Never infer a resource type or route from its contents. 422DesiredRevision ID `json:"desired_revision"` 423LoadedRevision * ID `json:"loaded_revision" nullable:"true"` 424NeedsReload bool `json:"needs_reload"` 425Quarantine []QuarantineDiagnostic `json:"quarantine"` 426} 427 428// ContentPart Offsets count exact stored UTF-8 bytes. 429type ContentPart struct { 430Complete bool `json:"complete"` 431Encoding string `json:"encoding"` 432Field string `json:"field"` 433OffsetBytes Counter `json:"offset_bytes"` 434Text string `json:"text"` 435} 436 437// ContentReference defines model for ContentReference. 438type ContentReference struct { 439Bytes Counter `json:"bytes"` 440Field string `json:"field"` 441 442// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 443URL ResourceURL `json:"url"` 444} 445 446// ContextCompaction defines model for ContextCompaction. 447type ContextCompaction struct { 448AfterItems * Counter `json:"after_items" nullable:"true"` 449BeforeItems * Counter `json:"before_items" nullable:"true"` 450EstimateMethod * string `json:"estimate_method" nullable:"true"` 451EstimatedInputTokens * Counter `json:"estimated_input_tokens" nullable:"true"` 452InputLimitTokens * Counter `json:"input_limit_tokens" nullable:"true"` 453ProviderCachedInputTokens * Counter `json:"provider_cached_input_tokens" nullable:"true"` 454ProviderInputTokens * Counter `json:"provider_input_tokens" nullable:"true"` 455Source * string `json:"source" nullable:"true"` 456Status string `json:"status"` 457Strategy * ID `json:"strategy" nullable:"true"` 458TriggerFreePercent * 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. 467ID ID `json:"id"` 468ItemCount Counter `json:"item_count"` 469Kind string `json:"kind"` 470Label string `json:"label"` 471PageCount Counter `json:"page_count"` 472Preview Preview `json:"preview"` 473Source * string `json:"source" nullable:"true"` 474UTF8Bytes Counter `json:"utf8_bytes"` 475} 476 477// ContextSectionPage defines model for ContextSectionPage. 478type ContextSectionPage struct { 479Omitted * string `json:"omitted" nullable:"true"` 480Page Counter `json:"page"` 481PageCount Counter `json:"page_count"` 482 483// SectionID Opaque identity. Never infer a resource type or route from its contents. 484SectionID ID `json:"section_id"` 485 486// SnapshotID Opaque identity. Never infer a resource type or route from its contents. 487SnapshotID ID `json:"snapshot_id"` 488Text string `json:"text"` 489} 490 491// ContextSummary defines model for ContextSummary. 492type ContextSummary struct { 493CapturedAt * Timestamp `json:"captured_at" nullable:"true"` 494Compaction ContextCompaction `json:"compaction"` 495ContextWindowTokens * Counter `json:"context_window_tokens" nullable:"true"` 496Model * ID `json:"model" nullable:"true"` 497Protocol * string `json:"protocol" nullable:"true"` 498Provider * ID `json:"provider" nullable:"true"` 499Reason * SafeReason `json:"reason" nullable:"true"` 500Sections []ContextSection `json:"sections"` 501SnapshotID * ID `json:"snapshot_id" nullable:"true"` 502State string `json:"state"` 503} 504 505// ContinueInputRequest defines model for ContinueInputRequest. 506type ContinueInputRequest struct { 507ClientID * string `json:"client_id,omitempty"` 508Kind string `json:"kind"` 509} 510 511// Counter defines model for Counter. 512type Counter = int64 513 514// Creation defines model for Creation. 515type Creation struct { 516Resolved struct { 517Effort * string `json:"effort" nullable:"true"` 518Model * ID `json:"model" nullable:"true"` 519ProviderProfile * ID `json:"provider_profile" nullable:"true"` 520 521// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 522Workspace Workspace `json:"workspace"` 523 }`json:"resolved"` 524Submitted json.RawMessage `json:"submitted"` 525} 526 527// CreationDecision defines model for CreationDecision. 528type CreationDecision struct { 529Admission string `json:"admission"` 530Creation * Creation `json:"creation" nullable:"true"` 531DecidedAt * Timestamp `json:"decided_at" nullable:"true"` 532DeletedAt * Timestamp `json:"deleted_at" nullable:"true"` 533HTTPStatus int64 `json:"http_status"` 534Kind string `json:"kind"` 535 536// SessionID Opaque identity. Never infer a resource type or route from its contents. 537SessionID 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. 543Generation Generation `json:"generation"` 544Sequence Counter `json:"sequence"` 545} 546 547// Delivery defines model for Delivery. 548type Delivery struct { 549Attempts Counter `json:"attempts"` 550DeferralReason * SafeReason `json:"deferral_reason" nullable:"true"` 551DeliveredAt * Timestamp `json:"delivered_at" nullable:"true"` 552 553// HookID Opaque identity. Never infer a resource type or route from its contents. 554HookID ID `json:"hook_id"` 555 556// ID Opaque identity. Never infer a resource type or route from its contents. 557ID ID `json:"id"` 558 559// ReceivedAt UTC RFC 3339. 560ReceivedAt Timestamp `json:"received_at"` 561 562// SessionID Opaque identity. Never infer a resource type or route from its contents. 563SessionID ID `json:"session_id"` 564} 565 566// DeliveryDetail defines model for DeliveryDetail. 567type DeliveryDetail struct { 568Attempts Counter `json:"attempts"` 569DeferralReason * SafeReason `json:"deferral_reason" nullable:"true"` 570DeliveredAt * Timestamp `json:"delivered_at" nullable:"true"` 571 572// HookID Opaque identity. Never infer a resource type or route from its contents. 573HookID ID `json:"hook_id"` 574 575// ID Opaque identity. Never infer a resource type or route from its contents. 576ID ID `json:"id"` 577Payload struct { 578Data string `json:"data"` 579Encoding string `json:"encoding"` 580 }`json:"payload"` 581 582// ReceivedAt UTC RFC 3339. 583ReceivedAt Timestamp `json:"received_at"` 584 585// SessionID Opaque identity. Never infer a resource type or route from its contents. 586SessionID ID `json:"session_id"` 587} 588 589// DeliveryPage defines model for DeliveryPage. 590type DeliveryPage struct { 591Items []Delivery `json:"items"` 592Next * 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. 607EntryID ID `json:"entry_id"` 608Next * PageToken `json:"next" nullable:"true"` 609Parts []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. 615ID ID `json:"id"` 616Notification Notification `json:"notification"` 617} 618 619// ExtensionMetadata defines model for ExtensionMetadata. 620type ExtensionMetadata struct { 621Context bool `json:"context"` 622Plugins []ID `json:"plugins"` 623PythonModules []ID `json:"python_modules"` 624Tools []ID `json:"tools"` 625} 626 627// ExtensionSettings defines model for ExtensionSettings. 628type ExtensionSettings struct { 629Defaults map [string ]bool `json:"defaults"` 630} 631 632// ExtensionSettingsChange defines model for ExtensionSettingsChange. 633type ExtensionSettingsChange struct { 634Application SettingsApplication `json:"application"` 635Group string `json:"group"` 636Resource ExtensionSettingsResource `json:"resource"` 637} 638 639// ExtensionSettingsPatch defines model for ExtensionSettingsPatch. 640type ExtensionSettingsPatch struct { 641Defaults 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. 647ETag ETag `json:"etag"` 648 649// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 650URL ResourceURL `json:"url"` 651Value 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 { 658Cursor Counter `json:"cursor"` 659Events []FailureEvent `json:"events"` 660 661// Generation 128 random bits encoded as unpadded base64url; new for each session actor lifetime. 662Generation Generation `json:"generation"` 663} 664 665// FailureEvent defines model for FailureEvent. 666type FailureEvent struct { 667Data SafeReason `json:"data"` 668Type string `json:"type"` 669} 670 671// FileDiff defines model for FileDiff. 672type FileDiff struct { 673Added Counter `json:"added"` 674Diff string `json:"diff"` 675Kind string `json:"kind"` 676Path string `json:"path"` 677Removed Counter `json:"removed"` 678} 679 680// FileUnavailable defines model for FileUnavailable. 681type FileUnavailable struct { 682Kind string `json:"kind"` 683Path string `json:"path"` 684Reason 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. 690CheckpointID ID `json:"checkpoint_id"` 691Kind string `json:"kind"` 692Name * string `json:"name" nullable:"true"` 693 694// SourceSessionID Opaque identity. Never infer a resource type or route from its contents. 695SourceSessionID 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. 701CheckpointID ID `json:"checkpoint_id"` 702Kind string `json:"kind"` 703Name * string `json:"name,omitempty" nullable:"true"` 704 705// SourceSessionID Opaque identity. Never infer a resource type or route from its contents. 706SourceSessionID ID `json:"source_session_id"` 707} 708 709// FormField defines model for FormField. 710type FormField struct { 711Choices []struct { 712Label 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. 715Value 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. 719Default DynamicJSON `json:"default"` 720 721// DefaultBinding Prefill from the selected row or installed session, before showing the form. 722DefaultBinding * struct { 723Pointer string `json:"pointer"` 724Source string `json:"source"` 725 }`json:"default_binding,omitempty"` 726Description string `json:"description"` 727Label string `json:"label"` 728Maximum * float64 `json:"maximum" nullable:"true"` 729Minimum * float64 `json:"minimum" nullable:"true"` 730Name string `json:"name"` 731Required bool `json:"required"` 732Type 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 { 740Added * Counter `json:"added" nullable:"true"` 741Branch * string `json:"branch" nullable:"true"` 742Changed * Counter `json:"changed" nullable:"true"` 743Dirty * bool `json:"dirty" nullable:"true"` 744Kind string `json:"kind"` 745Modified * Counter `json:"modified" nullable:"true"` 746Removed * Counter `json:"removed" nullable:"true"` 747Revision * string `json:"revision" nullable:"true"` 748 749// Root Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 750Root Workspace `json:"root"` 751TouchedAt * 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. 757Data * DynamicJSON `json:"data,omitempty"` 758 759// Extension Opaque identity. Never infer a resource type or route from its contents. 760Extension ID `json:"extension"` 761Rows []PageRow `json:"rows"` 762Title string `json:"title"` 763 764// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 765URL ResourceURL `json:"url"` 766} 767 768// HTTPCommand defines model for HTTPCommand. 769type HTTPCommand struct { 770Arguments []FormField `json:"arguments"` 771CallerPermissions []string `json:"caller_permissions"` 772Delivery string `json:"delivery"` 773Description string `json:"description"` 774 775// ID Opaque identity. Never infer a resource type or route from its contents. 776ID 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. 779Operation ActionOperation `json:"operation"` 780SlashName string `json:"slash_name"` 781} 782 783// HistoryEntry defines model for HistoryEntry. 784type HistoryEntry struct { 785CheckpointID * ID `json:"checkpoint_id" nullable:"true"` 786Content []json.RawMessage `json:"content"` 787ContentComplete bool `json:"content_complete"` 788CreatedAt * Timestamp `json:"created_at" nullable:"true"` 789 790// ID Opaque identity. Never infer a resource type or route from its contents. 791ID ID `json:"id"` 792InputID * ID `json:"input_id" nullable:"true"` 793Kind string `json:"kind"` 794* HistoryMail `json:"mail,omitempty" nullable:"true"` 795Position Counter `json:"position"` 796 797// ThinkingDurationMs Observed thinking duration, when recorded. 798ThinkingDurationMs * Counter `json:"thinking_duration_ms,omitempty" nullable:"true"` 799Tool * struct { 800Name string `json:"name"` 801ProgressCallID * ID `json:"progress_call_id" nullable:"true"` 802 803// ToolCallID Opaque identity. Never infer a resource type or route from its contents. 804ToolCallID ID `json:"tool_call_id"` 805 }`json:"tool" nullable:"true"` 806TurnID * ID `json:"turn_id" nullable:"true"` 807TurnType * string `json:"turn_type,omitempty"` 808} 809 810// HistoryMail defines model for HistoryMail. 811type HistoryMail struct { 812Kind string `json:"kind"` 813 814// MailID Opaque identity. Never infer a resource type or route from its contents. 815MailID ID `json:"mail_id"` 816SenderLabel string `json:"sender_label"` 817SenderSessionID * ID `json:"sender_session_id" nullable:"true"` 818} 819 820// HistoryPage Examples: {"high_water":0,"items":[],"newer":null,"older":null} 821type HistoryPage struct { 822HighWater Counter `json:"high_water"` 823Items []HistoryEntry `json:"items"` 824Newer * PageToken `json:"newer" nullable:"true"` 825Older * 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 { 833ConfigurationResource HookConfigurationResource `json:"configuration_resource"` 834DeferralReason * SafeReason `json:"deferral_reason" nullable:"true"` 835DeliveryURL string `json:"delivery_url"` 836PendingCount 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 { 843Notification Notification `json:"notification"` 844Resource HookConfigurationResource `json:"resource"` 845Secret * string `json:"secret,omitempty"` 846} 847 848// HookConfiguration defines model for HookConfiguration. 849type HookConfiguration struct { 850Enabled bool `json:"enabled"` 851 852// ID Opaque identity. Never infer a resource type or route from its contents. 853ID ID `json:"id"` 854Name string `json:"name"` 855 856// Revision Opaque identity. Never infer a resource type or route from its contents. 857Revision ID `json:"revision"` 858 859// SessionID Opaque identity. Never infer a resource type or route from its contents. 860SessionID ID `json:"session_id"` 861SignatureHeader string `json:"signature_header"` 862SignaturePrefix 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. 868ETag ETag `json:"etag"` 869 870// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 871URL ResourceURL `json:"url"` 872Value HookConfiguration `json:"value"` 873} 874 875// HookCreate Examples: {"name":"ci","session_id":"01a0fcea-2b00-7000-8000-000000000001"} 876type HookCreate struct { 877Enabled * bool `json:"enabled,omitempty"` 878Name string `json:"name"` 879Secret * string `json:"secret,omitempty"` 880 881// SessionID Opaque identity. Never infer a resource type or route from its contents. 882SessionID ID `json:"session_id"` 883SignatureHeader * string `json:"signature_header,omitempty"` 884SignaturePrefix * string `json:"signature_prefix,omitempty"` 885} 886 887// HookPage defines model for HookPage. 888type HookPage struct { 889Items []Hook `json:"items"` 890Next * PageToken `json:"next" nullable:"true"` 891} 892 893// HookPatch defines model for HookPatch. 894type HookPatch struct { 895Enabled * bool `json:"enabled,omitempty"` 896Name * string `json:"name,omitempty"` 897SignatureHeader * string `json:"signature_header,omitempty"` 898SignaturePrefix * string `json:"signature_prefix,omitempty"` 899} 900 901// HookPermission defines model for HookPermission. 902type HookPermission struct { 903AgentManage bool `json:"agent_manage"` 904 905// Revision Opaque identity. Never infer a resource type or route from its contents. 906Revision ID `json:"revision"` 907 908// SessionID Opaque identity. Never infer a resource type or route from its contents. 909SessionID ID `json:"session_id"` 910} 911 912// HookPermissionChange defines model for HookPermissionChange. 913type HookPermissionChange struct { 914Notification Notification `json:"notification"` 915Resource HookPermissionResource `json:"resource"` 916} 917 918// HookPermissionPatch defines model for HookPermissionPatch. 919type HookPermissionPatch struct { 920AgentManage * 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. 926ETag ETag `json:"etag"` 927 928// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 929URL ResourceURL `json:"url"` 930Value HookPermission `json:"value"` 931} 932 933// HookSecretRequest defines model for HookSecretRequest. 934type HookSecretRequest struct { 935Secret * string `json:"secret,omitempty"` 936} 937 938// Host defines model for Host. 939type Host struct { 940Architecture * string `json:"architecture" nullable:"true"` 941Authentication * struct { 942ControlPath * string `json:"control_path" nullable:"true"` 943Instructions string `json:"instructions"` 944SSHTarget string `json:"ssh_target"` 945 }`json:"authentication" nullable:"true"` 946Detail * SafeReason `json:"detail" nullable:"true"` 947Home * Workspace `json:"home" nullable:"true"` 948ObservedAt * Timestamp `json:"observed_at" nullable:"true"` 949Os * string `json:"os" nullable:"true"` 950State string `json:"state"` 951 952// Step Current probe progress. Null when connecting or when no probe is running. 953Step * string `json:"step,omitempty" nullable:"true"` 954 955// Target Opaque identity. Never infer a resource type or route from its contents. 956Target ID `json:"target"` 957} 958 959// HostPage defines model for HostPage. 960type HostPage struct { 961Items []Host `json:"items"` 962Next * 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 { 970Image ImageMetadata `json:"image"` 971Kind string `json:"kind"` 972} 973 974// ImageMetadata defines model for ImageMetadata. 975type ImageMetadata struct { 976Height int64 `json:"height"` 977MimeType string `json:"mime_type"` 978OriginalBytes Counter `json:"original_bytes"` 979 980// Reference Its url is the image resource, which serves the decoded bytes. 981Reference ContentReference `json:"reference"` 982Width int64 `json:"width"` 983} 984 985// ImageUpload Strict base64; decoded dimensions and provider constraints are validated before admission. 986type ImageUpload struct { 987Data string `json:"data"` 988MimeType string `json:"mime_type"` 989} 990 991// Input defines model for Input. 992type Input struct { 993AcceptanceOrder * Counter `json:"acceptance_order" nullable:"true"` 994AcceptedAt * Timestamp `json:"accepted_at" nullable:"true"` 995Admission string `json:"admission"` 996BlockingReason * SafeReason `json:"blocking_reason" nullable:"true"` 997ClientID * string `json:"client_id" nullable:"true"` 998Delivery * string `json:"delivery" nullable:"true"` 999HTTPStatus int64 `json:"http_status"` 1000 1001// ID Opaque identity. Never infer a resource type or route from its contents. 1002ID ID `json:"id"` 1003Kind string `json:"kind"` 1004Problem * AdmissionProblem `json:"problem" nullable:"true"` 1005 1006// SessionID Opaque identity. Never infer a resource type or route from its contents. 1007SessionID ID `json:"session_id"` 1008TranscriptPosition * Counter `json:"transcript_position" nullable:"true"` 1009Turn * 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} 1015Input Input `json:"input"` 1016Result string `json:"result"` 1017} 1018 1019// InputCommand defines model for InputCommand. 1020type InputCommand struct { 1021Arguments []FormField `json:"arguments"` 1022CallerPermissions []string `json:"caller_permissions"` 1023 1024// CommandID Opaque identity. Never infer a resource type or route from its contents. 1025CommandID ID `json:"command_id"` 1026Delivery string `json:"delivery"` 1027Description string `json:"description"` 1028 1029// ID Opaque identity. Never infer a resource type or route from its contents. 1030ID ID `json:"id"` 1031SlashName 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} 1037Input Input `json:"input"` 1038Kind 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 { 1046RunID * ID `json:"run_id" nullable:"true"` 1047ThroughInputOrder Counter `json:"through_input_order"` 1048} 1049 1050// Interruption defines model for Interruption. 1051type Interruption struct { 1052CancelledInputIDs []ID `json:"cancelled_input_ids"` 1053RunID * ID `json:"run_id" nullable:"true"` 1054State string `json:"state"` 1055Warnings Warnings `json:"warnings"` 1056} 1057 1058// JJFacts defines model for JJFacts. 1059type JJFacts struct { 1060Bookmark * struct { 1061Ahead Counter `json:"ahead"` 1062Name string `json:"name"` 1063 }`json:"bookmark" nullable:"true"` 1064ChangeID * string `json:"change_id" nullable:"true"` 1065Changed * Counter `json:"changed" nullable:"true"` 1066Conflicts * bool `json:"conflicts" nullable:"true"` 1067Description * string `json:"description" nullable:"true"` 1068Dirty * bool `json:"dirty" nullable:"true"` 1069Kind string `json:"kind"` 1070Revision * string `json:"revision" nullable:"true"` 1071 1072// Root Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 1073Root Workspace `json:"root"` 1074TouchedAt * Timestamp `json:"touched_at" nullable:"true"` 1075} 1076 1077// JSONContent defines model for JSONContent. 1078type JSONContent struct { 1079Field string `json:"field"` 1080Kind 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. 1083Value 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 { 1088Items []KernelJob `json:"items"` 1089LiveJobCount Counter `json:"live_job_count"` 1090Page 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. 1096Stopped ID `json:"stopped"` 1097} 1098 1099// Kernel defines model for Kernel. 1100type Kernel struct { 1101Build * string `json:"build" nullable:"true"` 1102InstanceID * ID `json:"instance_id" nullable:"true"` 1103 1104// LiveJobCount Observed owned jobs. Null while booting or when the kernel owner is lost. 1105LiveJobCount * 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. 1108RunningJobs []KernelJob `json:"running_jobs" nullable:"true"` 1109Stage * string `json:"stage" nullable:"true"` 1110Stale bool `json:"stale"` 1111StalenessReasons []SafeReason `json:"staleness_reasons"` 1112State string `json:"state"` 1113} 1114 1115// KernelJob defines model for KernelJob. 1116type KernelJob struct { 1117Command string `json:"command"` 1118 1119// ID Opaque identity. Never infer a resource type or route from its contents. 1120ID ID `json:"id"` 1121Pid * 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. 1124StartedAt Counter `json:"started_at"` 1125} 1126 1127// KernelUpgradeResult defines model for KernelUpgradeResult. 1128type KernelUpgradeResult struct { 1129Failure * SafeReason `json:"failure" nullable:"true"` 1130NewBuild * string `json:"new_build" nullable:"true"` 1131NewKernelID * ID `json:"new_kernel_id" nullable:"true"` 1132OldBuild * string `json:"old_build" nullable:"true"` 1133OldKernelID * ID `json:"old_kernel_id" nullable:"true"` 1134State string `json:"state"` 1135StoppedJobs []struct { 1136// ID Opaque identity. Never infer a resource type or route from its contents. 1137ID ID `json:"id"` 1138Reason SafeReason `json:"reason"` 1139 }`json:"stopped_jobs"` 1140Warnings Warnings `json:"warnings"` 1141} 1142 1143// LinkChange defines model for LinkChange. 1144type LinkChange struct { 1145NotificationCount Counter `json:"notification_count"` 1146Notifications []TargetNotification `json:"notifications"` 1147Resource LinkConfigurationResource `json:"resource"` 1148Truncated 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. 1154GroupID ID `json:"group_id"` 1155Members []Workspace `json:"members"` 1156Next * PageToken `json:"next" nullable:"true"` 1157 1158// Revision Opaque identity. Never infer a resource type or route from its contents. 1159Revision ID `json:"revision"` 1160 1161// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 1162Workspace Workspace `json:"workspace"` 1163} 1164 1165// LinkConfigurationResource defines model for LinkConfigurationResource. 1166type LinkConfigurationResource struct { 1167// ETag Strong opaque validator for the complete canonical representation. 1168ETag ETag `json:"etag"` 1169 1170// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 1171URL ResourceURL `json:"url"` 1172Value LinkConfiguration `json:"value"` 1173} 1174 1175// LinkGroup defines model for LinkGroup. 1176type LinkGroup struct { 1177ConfigurationResource LinkConfigurationResource `json:"configuration_resource"` 1178Next * PageToken `json:"next" nullable:"true"` 1179Page * PageDescriptor `json:"page,omitempty"` 1180Presence []struct { 1181// Exists Observed directory presence. Null for an uninspected or unreachable location. 1182Exists * bool `json:"exists" nullable:"true"` 1183Host * Host `json:"host" nullable:"true"` 1184SessionCount Counter `json:"session_count"` 1185 1186// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 1187Workspace 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. 1194OtherEtag ETag `json:"other_etag"` 1195 1196// OtherWorkspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 1197OtherWorkspace 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 { 1202Accounts []Account `json:"accounts"` 1203 1204// ExpiresAt UTC RFC 3339. 1205ExpiresAt Timestamp `json:"expires_at"` 1206Failure * SafeReason `json:"failure" nullable:"true"` 1207 1208// ID Opaque identity. Never infer a resource type or route from its contents. 1209ID ID `json:"id"` 1210Instructions * string `json:"instructions" nullable:"true"` 1211Progress string `json:"progress"` 1212 1213// Provider Opaque identity. Never infer a resource type or route from its contents. 1214Provider ID `json:"provider"` 1215State string `json:"state"` 1216URL * string `json:"url" nullable:"true"` 1217} 1218 1219// LoginPatch defines model for LoginPatch. 1220type LoginPatch struct { 1221Response * string `json:"response,omitempty"` 1222} 1223 1224// LoginProvider defines model for LoginProvider. 1225type LoginProvider struct { 1226Detail string `json:"detail"` 1227Fields []FormField `json:"fields"` 1228Flows []string `json:"flows"` 1229 1230// ID Opaque identity. Never infer a resource type or route from its contents. 1231ID ID `json:"id"` 1232Kind string `json:"kind"` 1233Label 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 { 1238Flow * string `json:"flow,omitempty"` 1239 1240// Provider Opaque identity. Never infer a resource type or route from its contents. 1241Provider ID `json:"provider"` 1242Values map [string ]json.RawMessage `json:"values"` 1243} 1244 1245// MCPDefinition defines model for MCPDefinition. 1246type MCPDefinition struct { 1247Arguments []string `json:"arguments"` 1248BearerTokenEnvVar * string `json:"bearer_token_env_var" nullable:"true"` 1249CallTimeoutMs int64 `json:"call_timeout_ms"` 1250Command * string `json:"command" nullable:"true"` 1251Cwd * Workspace `json:"cwd" nullable:"true"` 1252DisabledTools []string `json:"disabled_tools"` 1253Enabled bool `json:"enabled"` 1254EnabledTools []string `json:"enabled_tools" nullable:"true"` 1255Environment map [string ]ValueSource `json:"environment"` 1256Headers map [string ]ValueSource `json:"headers"` 1257SecretPresence SecretPresence `json:"secret_presence"` 1258StartupTimeoutMs int64 `json:"startup_timeout_ms"` 1259Transport string `json:"transport"` 1260URL * 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 { 1265Arguments []string `json:"arguments,omitempty"` 1266BearerTokenEnvVar * string `json:"bearer_token_env_var,omitempty" nullable:"true"` 1267CallTimeoutMs * int64 `json:"call_timeout_ms,omitempty"` 1268Command * string `json:"command,omitempty" nullable:"true"` 1269Cwd * Workspace `json:"cwd,omitempty" nullable:"true"` 1270DisabledTools []string `json:"disabled_tools,omitempty"` 1271Enabled * bool `json:"enabled,omitempty"` 1272EnabledTools []string `json:"enabled_tools,omitempty" nullable:"true"` 1273Environment * map [string ]* ValueSource `json:"environment,omitempty" nullable:"true"` 1274Headers * map [string ]* ValueSource `json:"headers,omitempty" nullable:"true"` 1275Secrets * MCPSecretsPatch `json:"secrets,omitempty"` 1276StartupTimeoutMs * int64 `json:"startup_timeout_ms,omitempty"` 1277Transport * string `json:"transport,omitempty"` 1278URL * string `json:"url,omitempty" nullable:"true"` 1279} 1280 1281// MCPSecretsPatch defines model for MCPSecretsPatch. 1282type MCPSecretsPatch struct { 1283BearerToken * string `json:"bearer_token,omitempty" nullable:"true"` 1284Environment map [string ]* string `json:"environment,omitempty"` 1285Headers map [string ]* string `json:"headers,omitempty"` 1286} 1287 1288// MCPSettings defines model for MCPSettings. 1289type MCPSettings struct { 1290Definitions map [string ]MCPDefinition `json:"definitions"` 1291} 1292 1293// MCPSettingsChange defines model for MCPSettingsChange. 1294type MCPSettingsChange struct { 1295Application SettingsApplication `json:"application"` 1296Group string `json:"group"` 1297Resource 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 { 1304Definitions map [string ]* MCPDefinitionPatch `json:"definitions,omitempty"` 1305ValidateConnection * 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. 1311ETag ETag `json:"etag"` 1312 1313// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 1314URL ResourceURL `json:"url"` 1315Value MCPSettings `json:"value"` 1316} 1317 1318// MailMetadata defines model for MailMetadata. 1319type MailMetadata struct { 1320Bytes Counter `json:"bytes"` 1321Kind string `json:"kind"` 1322 1323// MailID Opaque identity. Never infer a resource type or route from its contents. 1324MailID ID `json:"mail_id"` 1325 1326// ReceiverSessionID Opaque identity. Never infer a resource type or route from its contents. 1327ReceiverSessionID ID `json:"receiver_session_id"` 1328SenderLabel * string `json:"sender_label" nullable:"true"` 1329SenderSessionID * 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 { 1334ClientID * string `json:"client_id,omitempty"` 1335 1336// Images Attached in order; the text's numbered image markers say where each was attached. 1337Images []ImageUpload `json:"images,omitempty"` 1338Kind string `json:"kind"` 1339 1340// Pastes Pasted text the text marks by number; a long one is saved to a file the model reads. 1341Pastes []string `json:"pastes,omitempty"` 1342Text string `json:"text"` 1343} 1344 1345// Model defines model for Model. 1346type Model struct { 1347CachePolicy struct { 1348Source * string `json:"source" nullable:"true"` 1349TTLSeconds * 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. 1353CapKey ID `json:"cap_key"` 1354DefaultContextTokens * Counter `json:"default_context_tokens" nullable:"true"` 1355EffectiveContextTokens * Counter `json:"effective_context_tokens" nullable:"true"` 1356Efforts []struct { 1357ID string `json:"id"` 1358Label string `json:"label"` 1359 }`json:"efforts"` 1360 1361// ID Opaque identity. Never infer a resource type or route from its contents. 1362ID ID `json:"id"` 1363ImageEdge * int64 `json:"image_edge" nullable:"true"` 1364InputModalities []string `json:"input_modalities"` 1365Label string `json:"label"` 1366MaxContextTokens * Counter `json:"max_context_tokens" nullable:"true"` 1367MaxOutputTokens * Counter `json:"max_output_tokens" nullable:"true"` 1368ObservedAt * Timestamp `json:"observed_at" nullable:"true"` 1369Raised bool `json:"raised"` 1370Source string `json:"source"` 1371} 1372 1373// ModelPage defines model for ModelPage. 1374type ModelPage struct { 1375Items []Model `json:"items"` 1376Next * 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 { 1384Failure * SafeReason `json:"failure" nullable:"true"` 1385ObservedAt * Timestamp `json:"observed_at" nullable:"true"` 1386 1387// Provider Opaque identity. Never infer a resource type or route from its contents. 1388Provider ID `json:"provider"` 1389State string `json:"state"` 1390} 1391 1392// ModelSettings defines model for ModelSettings. 1393type ModelSettings struct { 1394CacheTTLPriors []CachePrior `json:"cache_ttl_priors"` 1395RaisedCaps map [string ]bool `json:"raised_caps"` 1396} 1397 1398// ModelSettingsChange defines model for ModelSettingsChange. 1399type ModelSettingsChange struct { 1400Application SettingsApplication `json:"application"` 1401Group string `json:"group"` 1402Resource 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 { 1407RaisedCaps 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. 1413ETag ETag `json:"etag"` 1414 1415// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 1416URL ResourceURL `json:"url"` 1417Value ModelSettings `json:"value"` 1418} 1419 1420// NewSessionIntent defines model for NewSessionIntent. 1421type NewSessionIntent struct { 1422Effort * string `json:"effort" nullable:"true"` 1423Kind string `json:"kind"` 1424Model * ID `json:"model" nullable:"true"` 1425Name * string `json:"name" nullable:"true"` 1426ProviderProfile * ID `json:"provider_profile" nullable:"true"` 1427 1428// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 1429Workspace Workspace `json:"workspace"` 1430} 1431 1432// NewSessionRequest Examples: {"kind":"new","workspace":"/workspace/project"} 1433type NewSessionRequest struct { 1434Effort * string `json:"effort,omitempty" nullable:"true"` 1435Kind string `json:"kind"` 1436Model * ID `json:"model,omitempty" nullable:"true"` 1437Name * string `json:"name,omitempty" nullable:"true"` 1438ProviderProfile * ID `json:"provider_profile,omitempty" nullable:"true"` 1439 1440// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 1441Workspace Workspace `json:"workspace"` 1442} 1443 1444// Notification defines model for Notification. 1445type Notification struct { 1446Code * string `json:"code" nullable:"true"` 1447Detail * string `json:"detail" nullable:"true"` 1448State string `json:"state"` 1449} 1450 1451// PageAction defines model for PageAction. 1452type PageAction struct { 1453Confirmation * string `json:"confirmation" nullable:"true"` 1454Fields []FormField `json:"fields"` 1455 1456// ID Opaque identity. Never infer a resource type or route from its contents. 1457ID ID `json:"id"` 1458KeyboardHint * string `json:"keyboard_hint" nullable:"true"` 1459Label 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. 1462Operation ActionOperation `json:"operation"` 1463} 1464 1465// PageDescriptor defines model for PageDescriptor. 1466type PageDescriptor struct { 1467Actions []PageAction `json:"actions"` 1468EmptyState string `json:"empty_state"` 1469Glance * Glance `json:"glance" nullable:"true"` 1470Rows []PageRow `json:"rows"` 1471Summary string `json:"summary"` 1472Title string `json:"title"` 1473} 1474 1475// PageRow defines model for PageRow. 1476type PageRow struct { 1477Badge * string `json:"badge" nullable:"true"` 1478Detail * string `json:"detail" nullable:"true"` 1479 1480// ID Opaque identity. Never infer a resource type or route from its contents. 1481ID ID `json:"id"` 1482Resource * struct { 1483// ETag Strong opaque validator for the complete canonical representation. 1484ETag ETag `json:"etag"` 1485 1486// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 1487URL 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. 1490Value DynamicJSON `json:"value"` 1491 }`json:"resource" nullable:"true"` 1492Text string `json:"text"` 1493Tone 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. 1502CreatedAt Timestamp `json:"created_at"` 1503 1504// ID Opaque identity. Never infer a resource type or route from its contents. 1505ID ID `json:"id"` 1506Message string `json:"message"` 1507Reply string `json:"reply"` 1508Resolution string `json:"resolution"` 1509ResolvingSessionID * ID `json:"resolving_session_id" nullable:"true"` 1510 1511// Revision Opaque identity. Never infer a resource type or route from its contents. 1512Revision ID `json:"revision"` 1513SessionID * ID `json:"session_id" nullable:"true"` 1514Status string `json:"status"` 1515Suggestion string `json:"suggestion"` 1516Title string `json:"title"` 1517Topic string `json:"topic"` 1518 1519// UpdatedAt UTC RFC 3339. 1520UpdatedAt Timestamp `json:"updated_at"` 1521Workspace * Workspace `json:"workspace" nullable:"true"` 1522} 1523 1524// PaperclipChange defines model for PaperclipChange. 1525type PaperclipChange struct { 1526Notification Notification `json:"notification"` 1527Resource PaperclipResource `json:"resource"` 1528} 1529 1530// PaperclipCreate defines model for PaperclipCreate. 1531type PaperclipCreate struct { 1532Message string `json:"message"` 1533SessionID * ID `json:"session_id,omitempty" nullable:"true"` 1534Suggestion * string `json:"suggestion,omitempty"` 1535Title * string `json:"title,omitempty"` 1536Topic * string `json:"topic,omitempty"` 1537Workspace * Workspace `json:"workspace,omitempty" nullable:"true"` 1538} 1539 1540// PaperclipPage defines model for PaperclipPage. 1541type PaperclipPage struct { 1542Glance * Glance `json:"glance,omitempty"` 1543Items []PaperclipResource `json:"items"` 1544Next * PageToken `json:"next" nullable:"true"` 1545Page * PageDescriptor `json:"page,omitempty"` 1546} 1547 1548// PaperclipPatch Reply cannot accompany resolved or dismissed status. It acknowledges the item. 1549type PaperclipPatch struct { 1550Reply * string `json:"reply,omitempty"` 1551Resolution * string `json:"resolution,omitempty"` 1552Status * 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. 1558ETag ETag `json:"etag"` 1559 1560// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 1561URL ResourceURL `json:"url"` 1562Value Paperclip `json:"value"` 1563} 1564 1565// PendingInput defines model for PendingInput. 1566type PendingInput struct { 1567AcceptanceOrder Counter `json:"acceptance_order"` 1568 1569// AcceptedAt UTC RFC 3339. 1570AcceptedAt Timestamp `json:"accepted_at"` 1571BlockingReason * SafeReason `json:"blocking_reason" nullable:"true"` 1572Delivery string `json:"delivery"` 1573 1574// ID Opaque identity. Never infer a resource type or route from its contents. 1575ID ID `json:"id"` 1576Kind string `json:"kind"` 1577Preview Preview `json:"preview"` 1578} 1579 1580// PreferencePatch defines model for PreferencePatch. 1581type PreferencePatch struct { 1582Archived * bool `json:"archived,omitempty"` 1583Pinned * bool `json:"pinned,omitempty"` 1584} 1585 1586// Preview defines model for Preview. 1587type Preview struct { 1588Text string `json:"text"` 1589TranscriptCount Counter `json:"transcript_count"` 1590Truncated 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 { 1595Code string `json:"code"` 1596Decision json.RawMessage `json:"decision,omitempty"` 1597Detail string `json:"detail"` 1598Fields []struct { 1599Detail string `json:"detail"` 1600Pointer string `json:"pointer"` 1601 }`json:"fields,omitempty"` 1602Status int64 `json:"status"` 1603Title string `json:"title"` 1604Type string `json:"type"` 1605} 1606 1607// ProgressPreview defines model for ProgressPreview. 1608type ProgressPreview struct { 1609OffsetScalars Counter `json:"offset_scalars"` 1610Text string `json:"text"` 1611} 1612 1613// ProviderProfile defines model for ProviderProfile. 1614type ProviderProfile struct { 1615AccountID * ID `json:"account_id" nullable:"true"` 1616Effort * string `json:"effort" nullable:"true"` 1617Endpoint * string `json:"endpoint" nullable:"true"` 1618 1619// Extension Opaque identity. Never infer a resource type or route from its contents. 1620Extension ID `json:"extension"` 1621HasKey bool `json:"has_key"` 1622ImageEdge * int64 `json:"image_edge" nullable:"true"` 1623Location * string `json:"location" nullable:"true"` 1624 1625// Model Opaque identity. Never infer a resource type or route from its contents. 1626Model ID `json:"model"` 1627Project * string `json:"project" nullable:"true"` 1628Protocol string `json:"protocol"` 1629} 1630 1631// ProviderProfilePatch Partial existing profile; extension and model required when creating a new map entry. 1632type ProviderProfilePatch struct { 1633AccountID * ID `json:"account_id,omitempty" nullable:"true"` 1634APIKey * string `json:"api_key,omitempty" nullable:"true"` 1635Effort * string `json:"effort,omitempty" nullable:"true"` 1636Endpoint * string `json:"endpoint,omitempty" nullable:"true"` 1637 1638// Extension Opaque identity. Never infer a resource type or route from its contents. 1639Extension * ID `json:"extension,omitempty"` 1640ImageEdge * int64 `json:"image_edge,omitempty" nullable:"true"` 1641Location * string `json:"location,omitempty" nullable:"true"` 1642 1643// Model Opaque identity. Never infer a resource type or route from its contents. 1644Model * ID `json:"model,omitempty"` 1645Project * string `json:"project,omitempty" nullable:"true"` 1646Protocol * string `json:"protocol,omitempty"` 1647} 1648 1649// ProviderRequestRecord defines model for ProviderRequestRecord. 1650type ProviderRequestRecord struct { 1651AccountID * ID `json:"account_id" nullable:"true"` 1652CacheCreationTokens TokenObservation `json:"cache_creation_tokens"` 1653CacheMarks []struct { 1654Index * Counter `json:"index" nullable:"true"` 1655Through string `json:"through"` 1656TTLSeconds Counter `json:"ttl_seconds"` 1657 }`json:"cache_marks"` 1658CacheWrite1HTokens TokenObservation `json:"cache_write_1h_tokens"` 1659CacheWrite5MTokens TokenObservation `json:"cache_write_5m_tokens"` 1660CachedTokens TokenObservation `json:"cached_tokens"` 1661CompletionTokens TokenObservation `json:"completion_tokens"` 1662EndedAt * Timestamp `json:"ended_at" nullable:"true"` 1663Failure * SafeReason `json:"failure" nullable:"true"` 1664HeadHash string `json:"head_hash"` 1665HTTPStatus * int64 `json:"http_status" nullable:"true"` 1666InputCount Counter `json:"input_count"` 1667Kind string `json:"kind"` 1668 1669// Model Opaque identity. Never infer a resource type or route from its contents. 1670Model ID `json:"model"` 1671Outcome string `json:"outcome"` 1672ProjectionHash * string `json:"projection_hash" nullable:"true"` 1673PromptTokens TokenObservation `json:"prompt_tokens"` 1674 1675// Provider Opaque identity. Never infer a resource type or route from its contents. 1676Provider ID `json:"provider"` 1677 1678// ProviderProfile Opaque identity. Never infer a resource type or route from its contents. 1679ProviderProfile ID `json:"provider_profile"` 1680ReasoningTokens TokenObservation `json:"reasoning_tokens"` 1681ReplacedInputCount * Counter `json:"replaced_input_count" nullable:"true"` 1682RunID * ID `json:"run_id" nullable:"true"` 1683Sequence Counter `json:"sequence"` 1684 1685// StartedAt UTC RFC 3339. 1686StartedAt Timestamp `json:"started_at"` 1687Strategy * string `json:"strategy" nullable:"true"` 1688TranscriptPositions []Counter `json:"transcript_positions"` 1689} 1690 1691// ProviderSettings defines model for ProviderSettings. 1692type ProviderSettings struct { 1693DefaultProfile * ID `json:"default_profile" nullable:"true"` 1694Profiles map [string ]ProviderProfile `json:"profiles"` 1695} 1696 1697// ProviderSettingsChange defines model for ProviderSettingsChange. 1698type ProviderSettingsChange struct { 1699Application SettingsApplication `json:"application"` 1700Group string `json:"group"` 1701Resource 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 { 1708DefaultProfile * ID `json:"default_profile,omitempty" nullable:"true"` 1709Profiles 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. 1715ETag ETag `json:"etag"` 1716 1717// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 1718URL ResourceURL `json:"url"` 1719Value ProviderSettings `json:"value"` 1720} 1721 1722// ProxyChunk defines model for ProxyChunk. 1723type ProxyChunk struct { 1724Choices []struct { 1725Delta struct { 1726Content * string `json:"content,omitempty"` 1727ReasoningContent * string `json:"reasoning_content,omitempty"` 1728Role * string `json:"role,omitempty"` 1729ToolCalls []ProxyToolDelta `json:"tool_calls,omitempty"` 1730 }`json:"delta"` 1731FinishReason * string `json:"finish_reason" nullable:"true"` 1732Index Counter `json:"index"` 1733 }`json:"choices"` 1734Created Counter `json:"created"` 1735 1736// ID Opaque identity. Never infer a resource type or route from its contents. 1737ID ID `json:"id"` 1738Model string `json:"model"` 1739Object string `json:"object"` 1740Usage * 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 { 1745Choices []struct { 1746FinishReason string `json:"finish_reason"` 1747Index Counter `json:"index"` 1748Message struct { 1749Content * string `json:"content" nullable:"true"` 1750ReasoningContent * string `json:"reasoning_content,omitempty" nullable:"true"` 1751Role string `json:"role"` 1752ToolCalls []ProxyToolCall `json:"tool_calls,omitempty"` 1753 }`json:"message"` 1754 }`json:"choices"` 1755Created Counter `json:"created"` 1756 1757// ID Opaque identity. Never infer a resource type or route from its contents. 1758ID ID `json:"id"` 1759Model string `json:"model"` 1760Object string `json:"object"` 1761Usage * ProxyUsage `json:"usage" nullable:"true"` 1762} 1763 1764// ProxyCompletionRequest Examples: {"messages":[{"content":"Hello","role":"user"}],"model":"personal/example-model","stream":true} 1765type ProxyCompletionRequest struct { 1766MaxCompletionTokens * int64 `json:"max_completion_tokens,omitempty"` 1767MaxTokens * int64 `json:"max_tokens,omitempty"` 1768Messages []ProxyMessage `json:"messages"` 1769Model string `json:"model"` 1770ParallelToolCalls * bool `json:"parallel_tool_calls,omitempty"` 1771Reasoning * struct { 1772Effort string `json:"effort"` 1773 }`json:"reasoning,omitempty"` 1774ReasoningEffort * string `json:"reasoning_effort,omitempty"` 1775ResponseFormat json.RawMessage `json:"response_format,omitempty"` 1776Stop json.RawMessage `json:"stop,omitempty"` 1777Stream * bool `json:"stream,omitempty"` 1778StreamOptions * struct { 1779IncludeUsage * bool `json:"include_usage,omitempty"` 1780 }`json:"stream_options,omitempty"` 1781Temperature * float64 `json:"temperature,omitempty"` 1782ToolChoice json.RawMessage `json:"tool_choice,omitempty"` 1783Tools []ProxyToolDefinition `json:"tools,omitempty"` 1784TopP * float64 `json:"top_p,omitempty"` 1785} 1786 1787// ProxyError defines model for ProxyError. 1788type ProxyError struct { 1789Error struct { 1790Code * string `json:"code" nullable:"true"` 1791Message string `json:"message"` 1792Param * string `json:"param" nullable:"true"` 1793Type string `json:"type"` 1794 }`json:"error"` 1795} 1796 1797// ProxyImagePart defines model for ProxyImagePart. 1798type ProxyImagePart struct { 1799ImageURL struct { 1800Detail * string `json:"detail,omitempty"` 1801URL string `json:"url"` 1802 }`json:"image_url"` 1803Type 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 { 1808Content json.RawMessage `json:"content,omitempty" nullable:"true"` 1809Name * string `json:"name,omitempty"` 1810ReasoningContent * string `json:"reasoning_content,omitempty" nullable:"true"` 1811Role string `json:"role"` 1812ToolCallID * string `json:"tool_call_id,omitempty"` 1813ToolCalls []ProxyToolCall `json:"tool_calls,omitempty"` 1814} 1815 1816// ProxyModels defines model for ProxyModels. 1817type ProxyModels struct { 1818Data []struct { 1819Created Counter `json:"created"` 1820ID string `json:"id"` 1821Object string `json:"object"` 1822OwnedBy string `json:"owned_by"` 1823 }`json:"data"` 1824Errors []struct { 1825Message string `json:"message"` 1826 1827// Profile Opaque identity. Never infer a resource type or route from its contents. 1828Profile ID `json:"profile"` 1829 }`json:"errors,omitempty"` 1830Object 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 { 1835Data json.RawMessage `json:"data"` 1836} 1837 1838// ProxyTextPart defines model for ProxyTextPart. 1839type ProxyTextPart struct { 1840Text string `json:"text"` 1841Type string `json:"type"` 1842} 1843 1844// ProxyToolCall defines model for ProxyToolCall. 1845type ProxyToolCall struct { 1846Function struct { 1847Arguments string `json:"arguments"` 1848Name string `json:"name"` 1849 }`json:"function"` 1850ID string `json:"id"` 1851Type string `json:"type"` 1852} 1853 1854// ProxyToolDefinition defines model for ProxyToolDefinition. 1855type ProxyToolDefinition struct { 1856Function struct { 1857Description * string `json:"description,omitempty"` 1858Name 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. 1861Parameters * DynamicJSON `json:"parameters,omitempty"` 1862Strict * bool `json:"strict,omitempty"` 1863 }`json:"function"` 1864Type string `json:"type"` 1865} 1866 1867// ProxyToolDelta defines model for ProxyToolDelta. 1868type ProxyToolDelta struct { 1869Function * struct { 1870Arguments string `json:"arguments"` 1871Name string `json:"name"` 1872 }`json:"function,omitempty"` 1873ID * string `json:"id,omitempty"` 1874Index Counter `json:"index"` 1875Type * string `json:"type,omitempty"` 1876} 1877 1878// ProxyUsage defines model for ProxyUsage. 1879type ProxyUsage struct { 1880CompletionTokens Counter `json:"completion_tokens"` 1881CompletionTokensDetails * struct { 1882ReasoningTokens Counter `json:"reasoning_tokens"` 1883 }`json:"completion_tokens_details,omitempty"` 1884PromptTokens Counter `json:"prompt_tokens"` 1885PromptTokensDetails * struct { 1886CachedTokens Counter `json:"cached_tokens"` 1887 }`json:"prompt_tokens_details,omitempty"` 1888TotalTokens 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. 1894ID ID `json:"id"` 1895Reason 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. 1901AccountID ID `json:"account_id"` 1902Error * SafeReason `json:"error" nullable:"true"` 1903Label string `json:"label"` 1904LimitID string `json:"limit_id"` 1905 1906// ObservedAt UTC RFC 3339. 1907ObservedAt Timestamp `json:"observed_at"` 1908Plan * string `json:"plan" nullable:"true"` 1909 1910// Provider Opaque identity. Never infer a resource type or route from its contents. 1911Provider ID `json:"provider"` 1912ResetsAt * Timestamp `json:"resets_at" nullable:"true"` 1913Scope * string `json:"scope" nullable:"true"` 1914Sequence Counter `json:"sequence"` 1915Source string `json:"source"` 1916Status string `json:"status"` 1917UsedPercent * float64 `json:"used_percent" nullable:"true"` 1918WindowLabel * string `json:"window_label" nullable:"true"` 1919WindowSeconds * Counter `json:"window_seconds" nullable:"true"` 1920} 1921 1922// QuotaPage defines model for QuotaPage. 1923type QuotaPage struct { 1924Items []QuotaObservation `json:"items"` 1925Next * PageToken `json:"next" nullable:"true"` 1926} 1927 1928// RecentWorkspace defines model for RecentWorkspace. 1929type RecentWorkspace struct { 1930ActivityAt * Timestamp `json:"activity_at" nullable:"true"` 1931 1932// Location Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 1933Location Workspace `json:"location"` 1934UseCount Counter `json:"use_count"` 1935} 1936 1937// RecentWorkspacePage defines model for RecentWorkspacePage. 1938type RecentWorkspacePage struct { 1939Items []RecentWorkspace `json:"items"` 1940Next * PageToken `json:"next" nullable:"true"` 1941} 1942 1943// ReferenceContent defines model for ReferenceContent. 1944type ReferenceContent struct { 1945Kind string `json:"kind"` 1946Reference ContentReference `json:"reference"` 1947} 1948 1949// ReloadRequest defines model for ReloadRequest. 1950type ReloadRequest struct { 1951Target * string `json:"target,omitempty"` 1952} 1953 1954// ReloadResult defines model for ReloadResult. 1955type ReloadResult struct { 1956CachePolicy * CachePolicyReloadOutcome `json:"cache_policy" nullable:"true"` 1957Models []ModelReloadOutcome `json:"models"` 1958Session * 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 { 1965Cursor Counter `json:"cursor"` 1966Events []SessionEvent `json:"events"` 1967 1968// Generation 128 random bits encoded as unpadded base64url; new for each session actor lifetime. 1969Generation Generation `json:"generation"` 1970} 1971 1972// RequestRecordPage defines model for RequestRecordPage. 1973type RequestRecordPage struct { 1974Items []ProviderRequestRecord `json:"items"` 1975Next * 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 { 1982Cursor Counter `json:"cursor"` 1983Events []SessionEvent `json:"events"` 1984 1985// Generation 128 random bits encoded as unpadded base64url; new for each session actor lifetime. 1986Generation 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} 1989Snapshot Session `json:"snapshot"` 1990} 1991 1992// ResetEvent defines model for ResetEvent. 1993type ResetEvent struct { 1994Data struct { 1995Reason string `json:"reason"` 1996 }`json:"data"` 1997Type 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. 2006ETag ETag `json:"etag"` 2007 2008// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 2009URL ResourceURL `json:"url"` 2010} 2011 2012// SafeReason defines model for SafeReason. 2013type SafeReason struct { 2014Code string `json:"code"` 2015Detail string `json:"detail"` 2016} 2017 2018// ScheduleChange defines model for ScheduleChange. 2019type ScheduleChange struct { 2020Notification Notification `json:"notification"` 2021Resource ScheduleResource `json:"resource"` 2022} 2023 2024// ScheduleCreate defines model for ScheduleCreate. 2025type ScheduleCreate struct { 2026DelaySeconds * int64 `json:"delay_seconds,omitempty"` 2027EverySeconds * int64 `json:"every_seconds,omitempty"` 2028Kind string `json:"kind"` 2029Prompt string `json:"prompt"` 2030 2031// SessionID Opaque identity. Never infer a resource type or route from its contents. 2032SessionID 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. 2038CreatedAt * Timestamp `json:"created_at" nullable:"true"` 2039EverySeconds * int64 `json:"every_seconds" nullable:"true"` 2040 2041// ID Opaque identity. Never infer a resource type or route from its contents. 2042ID ID `json:"id"` 2043Kind string `json:"kind"` 2044 2045// NextAt UTC RFC 3339. 2046NextAt Timestamp `json:"next_at"` 2047Prompt string `json:"prompt"` 2048 2049// Revision Opaque identity. Never infer a resource type or route from its contents. 2050Revision ID `json:"revision"` 2051 2052// SessionID Opaque identity. Never infer a resource type or route from its contents. 2053SessionID ID `json:"session_id"` 2054 2055// UpdatedAt Null until a historical schedule records a new update. 2056UpdatedAt * Timestamp `json:"updated_at" nullable:"true"` 2057} 2058 2059// SchedulePage defines model for SchedulePage. 2060type SchedulePage struct { 2061Glance * Glance `json:"glance,omitempty"` 2062Items []ScheduleResource `json:"items"` 2063Next * PageToken `json:"next" nullable:"true"` 2064Page * PageDescriptor `json:"page,omitempty"` 2065} 2066 2067// SchedulePatch Validate complete candidate: once has null repetition; recurring and heartbeat require every_seconds. 2068type SchedulePatch struct { 2069DelaySeconds * int64 `json:"delay_seconds,omitempty"` 2070EverySeconds * int64 `json:"every_seconds,omitempty" nullable:"true"` 2071Kind * string `json:"kind,omitempty"` 2072Prompt * 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. 2078ETag ETag `json:"etag"` 2079 2080// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 2081URL ResourceURL `json:"url"` 2082Value ScheduleJob `json:"value"` 2083} 2084 2085// SecretPresence defines model for SecretPresence. 2086type SecretPresence struct { 2087BearerToken bool `json:"bearer_token"` 2088Environment []string `json:"environment"` 2089Headers []string `json:"headers"` 2090} 2091 2092// SelectionOverrides defines model for SelectionOverrides. 2093type SelectionOverrides struct { 2094Extensions map [string ]* bool `json:"extensions"` 2095Instructions map [string ]* bool `json:"instructions"` 2096MCP map [string ]* bool `json:"mcp"` 2097Skills 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 { 2102Extensions * map [string ]* bool `json:"extensions,omitempty" nullable:"true"` 2103Instructions * map [string ]* bool `json:"instructions,omitempty" nullable:"true"` 2104MCP * map [string ]* bool `json:"mcp,omitempty" nullable:"true"` 2105Skills * 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 { 2110Build * string `json:"build" nullable:"true"` 2111Capabilities map [string ]int64 `json:"capabilities"` 2112 2113// Digest Content digest of the running code tree; update information, not attachment compatibility. 2114Digest * string `json:"digest" nullable:"true"` 2115Extensions []struct { 2116// Name Opaque identity. Never infer a resource type or route from its contents. 2117Name ID `json:"name"` 2118Version int64 `json:"version"` 2119 }`json:"extensions"` 2120 2121// InstanceID Opaque identity. Never infer a resource type or route from its contents. 2122InstanceID ID `json:"instance_id"` 2123Notices []struct { 2124// ID Opaque identity. Never infer a resource type or route from its contents. 2125ID ID `json:"id"` 2126Kind string `json:"kind"` 2127Message string `json:"message"` 2128 }`json:"notices"` 2129Protocol int64 `json:"protocol"` 2130Quota []QuotaObservation `json:"quota" nullable:"true"` 2131QuotaHistory * QuotaPage `json:"quota_history,omitempty"` 2132State string `json:"state"` 2133} 2134 2135// Session defines model for Session. 2136type Session struct { 2137ActiveOutput []ActiveOutput `json:"active_output"` 2138Activity Activity `json:"activity"` 2139ActivityAt * Timestamp `json:"activity_at" nullable:"true"` 2140Address * string `json:"address" nullable:"true"` 2141AutomaticName string `json:"automatic_name"` 2142Closed bool `json:"closed"` 2143Composition Composition `json:"composition"` 2144ConfigurationResource SessionConfigurationResource `json:"configuration_resource"` 2145CreatedAt * 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. 2148Creation * Creation `json:"creation" nullable:"true"` 2149CurrentProgress []ToolProgress `json:"current_progress"` 2150Cursor * Cursor `json:"cursor" nullable:"true"` 2151Depth int64 `json:"depth"` 2152Effort * string `json:"effort" nullable:"true"` 2153 2154// FamilyRevision Opaque identity. Never infer a resource type or route from its contents. 2155FamilyRevision ID `json:"family_revision"` 2156Glances []Glance `json:"glances"` 2157 2158// History Examples: {"high_water":0,"items":[],"newer":null,"older":null} 2159History HistoryPage `json:"history"` 2160 2161// ID Opaque identity. Never infer a resource type or route from its contents. 2162ID ID `json:"id"` 2163InputOrder Counter `json:"input_order"` 2164Kernel Kernel `json:"kernel"` 2165 2166// Location Parsed workspace and daemon-resolved display label. Reading this metadata does not connect to the remote host. 2167Location SessionLocation `json:"location"` 2168Model * ID `json:"model" nullable:"true"` 2169Name string `json:"name"` 2170ParentID * ID `json:"parent_id" nullable:"true"` 2171PendingInputs []PendingInput `json:"pending_inputs"` 2172Preferences SessionPreferences `json:"preferences"` 2173Preview Preview `json:"preview"` 2174ProviderProfile * ID `json:"provider_profile" nullable:"true"` 2175 2176// Revision Opaque identity. Never infer a resource type or route from its contents. 2177Revision ID `json:"revision"` 2178 2179// RootID Opaque identity. Never infer a resource type or route from its contents. 2180RootID ID `json:"root_id"` 2181Selection SessionSelection `json:"selection"` 2182Status SessionStatus `json:"status"` 2183Usage Usage `json:"usage"` 2184 2185// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 2186Workspace Workspace `json:"workspace"` 2187WorkspaceChange * 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 { 2195Move * struct { 2196AppliedCount Counter `json:"applied_count"` 2197AppliedIDs []ID `json:"applied_ids"` 2198DeferredCount Counter `json:"deferred_count"` 2199DeferredIDs []ID `json:"deferred_ids"` 2200Truncated bool `json:"truncated"` 2201Warnings Warnings `json:"warnings"` 2202 }`json:"move" nullable:"true"` 2203Resource 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} 2206Session 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 { 2214Data struct { 2215HighWater Counter `json:"high_water"` 2216 2217// ReplacesAllLive Retire all provisional output for a model commit. 2218ReplacesAllLive bool `json:"replaces_all_live"` 2219ReplacesLiveIDs []ID `json:"replaces_live_ids"` 2220 }`json:"data"` 2221Sequence Counter `json:"sequence"` 2222Type string `json:"type"` 2223} 2224 2225// SessionCompactedEvent defines model for SessionCompactedEvent. 2226type SessionCompactedEvent struct { 2227Data CompactionObservation `json:"data"` 2228Sequence Counter `json:"sequence"` 2229Type 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 { 2234Effort * string `json:"effort" nullable:"true"` 2235 2236// FamilyRevision Opaque identity. Never infer a resource type or route from its contents. 2237FamilyRevision ID `json:"family_revision"` 2238 2239// ID Opaque identity. Never infer a resource type or route from its contents. 2240ID ID `json:"id"` 2241Model * 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. 2244Name * string `json:"name" nullable:"true"` 2245Preferences struct { 2246Archived bool `json:"archived"` 2247PinOrder * Counter `json:"pin_order" nullable:"true"` 2248Pinned bool `json:"pinned"` 2249 }`json:"preferences"` 2250ProviderProfile * ID `json:"provider_profile" nullable:"true"` 2251 2252// Revision Opaque identity. Never infer a resource type or route from its contents. 2253Revision ID `json:"revision"` 2254Selection SelectionOverrides `json:"selection"` 2255 2256// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 2257Workspace Workspace `json:"workspace"` 2258} 2259 2260// SessionConfigurationResource defines model for SessionConfigurationResource. 2261type SessionConfigurationResource struct { 2262// ETag Strong opaque validator for the complete canonical representation. 2263ETag ETag `json:"etag"` 2264 2265// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 2266URL 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"} 2269Value 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 { 2277DeletedCount Counter `json:"deleted_count"` 2278DeletedIDs []ID `json:"deleted_ids"` 2279Remaining []struct { 2280// ID Opaque identity. Never infer a resource type or route from its contents. 2281ID ID `json:"id"` 2282Reason SafeReason `json:"reason"` 2283 }`json:"remaining"` 2284RemainingCount Counter `json:"remaining_count"` 2285State string `json:"state"` 2286Truncated bool `json:"truncated"` 2287} 2288 2289// SessionErrorEvent defines model for SessionErrorEvent. 2290type SessionErrorEvent struct { 2291Data struct { 2292Code string `json:"code"` 2293Message string `json:"message"` 2294RunID * ID `json:"run_id" nullable:"true"` 2295 }`json:"data"` 2296Sequence Counter `json:"sequence"` 2297Type 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 { 2305Data 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} 2307Input Input `json:"input"` 2308 }`json:"data"` 2309Sequence Counter `json:"sequence"` 2310Type string `json:"type"` 2311} 2312 2313// SessionInvalidateEvent defines model for SessionInvalidateEvent. 2314type SessionInvalidateEvent struct { 2315Data struct { 2316Kind string `json:"kind"` 2317 2318// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 2319URL ResourceURL `json:"url"` 2320 }`json:"data"` 2321Sequence Counter `json:"sequence"` 2322Type 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 { 2327Host * string `json:"host" nullable:"true"` 2328Label * string `json:"label" nullable:"true"` 2329Path string `json:"path"` 2330User * string `json:"user" nullable:"true"` 2331} 2332 2333// SessionMessageEvent defines model for SessionMessageEvent. 2334type SessionMessageEvent struct { 2335Data struct { 2336Entry HistoryEntry `json:"entry"` 2337 }`json:"data"` 2338Sequence Counter `json:"sequence"` 2339Type string `json:"type"` 2340} 2341 2342// SessionNoteEvent defines model for SessionNoteEvent. 2343type SessionNoteEvent struct { 2344Data struct { 2345// EntryID Opaque identity. Never infer a resource type or route from its contents. 2346EntryID ID `json:"entry_id"` 2347* MailMetadata `json:"mail" nullable:"true"` 2348Origin string `json:"origin"` 2349Text string `json:"text"` 2350 }`json:"data"` 2351Sequence Counter `json:"sequence"` 2352Type 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 { 2357Family * struct { 2358// Revision Opaque identity. Never infer a resource type or route from its contents. 2359Revision ID `json:"revision"` 2360 2361// RootID Opaque identity. Never infer a resource type or route from its contents. 2362RootID ID `json:"root_id"` 2363 }`json:"family,omitempty"` 2364Items []SessionSummary `json:"items"` 2365Next * 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. 2373CatalogRevision * ID `json:"catalog_revision,omitempty"` 2374Effort * string `json:"effort,omitempty" nullable:"true"` 2375 2376// Model Opaque identity. Never infer a resource type or route from its contents. 2377Model * ID `json:"model,omitempty"` 2378Name * string `json:"name,omitempty" nullable:"true"` 2379Preferences * PreferencePatch `json:"preferences,omitempty"` 2380 2381// ProviderProfile Opaque identity. Never infer a resource type or route from its contents. 2382ProviderProfile * ID `json:"provider_profile,omitempty"` 2383 2384// Selection Null map entry clears that override. Null entire map clears all overrides of that kind. 2385Selection * SelectionPatch `json:"selection,omitempty"` 2386} 2387 2388// SessionPreferences defines model for SessionPreferences. 2389type SessionPreferences struct { 2390Archived bool `json:"archived"` 2391Opens Counter `json:"opens"` 2392PinOrder * Counter `json:"pin_order" nullable:"true"` 2393Pinned 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 { 2401Failure * SafeReason `json:"failure" nullable:"true"` 2402LoadedRevision * ID `json:"loaded_revision" nullable:"true"` 2403RestartRequired bool `json:"restart_required"` 2404State string `json:"state"` 2405Warnings Warnings `json:"warnings"` 2406} 2407 2408// SessionRetryEvent defines model for SessionRetryEvent. 2409type SessionRetryEvent struct { 2410Data struct { 2411Attempt int64 `json:"attempt"` 2412DelayMs Counter `json:"delay_ms"` 2413Reason SafeReason `json:"reason"` 2414 2415// RunID Opaque identity. Never infer a resource type or route from its contents. 2416RunID ID `json:"run_id"` 2417 }`json:"data"` 2418Sequence Counter `json:"sequence"` 2419Type 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 { 2426Data string `json:"data"` 2427} 2428 2429// SessionSelection defines model for SessionSelection. 2430type SessionSelection struct { 2431Effective struct { 2432Extensions map [string ]bool `json:"extensions"` 2433Instructions map [string ]bool `json:"instructions"` 2434MCP map [string ]bool `json:"mcp"` 2435Skills map [string ]bool `json:"skills"` 2436 }`json:"effective"` 2437Overrides SelectionOverrides `json:"overrides"` 2438} 2439 2440// SessionStatus defines model for SessionStatus. 2441type SessionStatus struct { 2442BlockingReason * SafeReason `json:"blocking_reason" nullable:"true"` 2443InterruptRequested bool `json:"interrupt_requested"` 2444Phase string `json:"phase"` 2445RunID * ID `json:"run_id" nullable:"true"` 2446} 2447 2448// SessionStatusEvent defines model for SessionStatusEvent. 2449type SessionStatusEvent struct { 2450Data SessionStatus `json:"data"` 2451Sequence Counter `json:"sequence"` 2452Type string `json:"type"` 2453} 2454 2455// SessionSummary Live fields and cursor are captured together. Extra response fields may be ignored. 2456type SessionSummary struct { 2457Activity Activity `json:"activity"` 2458ActivityAt * Timestamp `json:"activity_at" nullable:"true"` 2459Address * string `json:"address" nullable:"true"` 2460AutomaticName string `json:"automatic_name"` 2461Closed bool `json:"closed"` 2462CreatedAt * Timestamp `json:"created_at" nullable:"true"` 2463CurrentProgress []ToolProgress `json:"current_progress"` 2464Cursor * Cursor `json:"cursor" nullable:"true"` 2465Depth int64 `json:"depth"` 2466Effort * string `json:"effort" nullable:"true"` 2467 2468// ID Opaque identity. Never infer a resource type or route from its contents. 2469ID ID `json:"id"` 2470 2471// Location Parsed workspace and daemon-resolved display label. Reading this metadata does not connect to the remote host. 2472Location SessionLocation `json:"location"` 2473Model * ID `json:"model" nullable:"true"` 2474Name string `json:"name"` 2475ParentID * ID `json:"parent_id" nullable:"true"` 2476Preferences SessionPreferences `json:"preferences"` 2477Preview Preview `json:"preview"` 2478ProviderProfile * ID `json:"provider_profile" nullable:"true"` 2479 2480// RootID Opaque identity. Never infer a resource type or route from its contents. 2481RootID ID `json:"root_id"` 2482Status SessionStatus `json:"status"` 2483 2484// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 2485Workspace Workspace `json:"workspace"` 2486} 2487 2488// SessionTextEvent defines model for SessionTextEvent. 2489type SessionTextEvent struct { 2490Data struct { 2491// MessageID Opaque identity. Never infer a resource type or route from its contents. 2492MessageID ID `json:"message_id"` 2493 2494// RunID Opaque identity. Never infer a resource type or route from its contents. 2495RunID ID `json:"run_id"` 2496Text string `json:"text"` 2497 }`json:"data"` 2498Sequence Counter `json:"sequence"` 2499Type string `json:"type"` 2500} 2501 2502// SessionThinkingEvent defines model for SessionThinkingEvent. 2503type SessionThinkingEvent struct { 2504Data struct { 2505// ElapsedMs Completed thinking duration, when observed. 2506ElapsedMs * Counter `json:"elapsed_ms,omitempty"` 2507 2508// MessageID Opaque identity. Never infer a resource type or route from its contents. 2509MessageID ID `json:"message_id"` 2510 2511// RunID Opaque identity. Never infer a resource type or route from its contents. 2512RunID ID `json:"run_id"` 2513Text string `json:"text"` 2514 }`json:"data"` 2515Sequence Counter `json:"sequence"` 2516Type string `json:"type"` 2517} 2518 2519// SessionToolEvent defines model for SessionToolEvent. 2520type SessionToolEvent struct { 2521Data 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. 2523Arguments DynamicJSON `json:"arguments"` 2524ContentComplete bool `json:"content_complete"` 2525Name string `json:"name"` 2526 2527// ProgressCallID Opaque identity. Never infer a resource type or route from its contents. 2528ProgressCallID ID `json:"progress_call_id"` 2529Reference * 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. 2532Result DynamicJSON `json:"result"` 2533 2534// ToolCallID Opaque identity. Never infer a resource type or route from its contents. 2535ToolCallID ID `json:"tool_call_id"` 2536Trace * ToolTrace `json:"trace" nullable:"true"` 2537 }`json:"data"` 2538Sequence Counter `json:"sequence"` 2539Type string `json:"type"` 2540} 2541 2542// SessionToolProgressEvent defines model for SessionToolProgressEvent. 2543type SessionToolProgressEvent struct { 2544Data struct { 2545Progress * ToolProgress `json:"progress" nullable:"true"` 2546 }`json:"data"` 2547Sequence Counter `json:"sequence"` 2548Type string `json:"type"` 2549} 2550 2551// SessionTurnCompletedEvent defines model for SessionTurnCompletedEvent. 2552type SessionTurnCompletedEvent struct { 2553Data struct { 2554InputCount Counter `json:"input_count"` 2555InputIDs []ID `json:"input_ids"` 2556 2557// RunID Opaque identity. Never infer a resource type or route from its contents. 2558RunID ID `json:"run_id"` 2559State string `json:"state"` 2560Truncated bool `json:"truncated"` 2561 }`json:"data"` 2562Sequence Counter `json:"sequence"` 2563Type string `json:"type"` 2564} 2565 2566// SessionUsageEvent defines model for SessionUsageEvent. 2567type SessionUsageEvent struct { 2568Data Usage `json:"data"` 2569Sequence Counter `json:"sequence"` 2570Type string `json:"type"` 2571} 2572 2573// Settings defines model for Settings. 2574type Settings struct { 2575Capabilities CapabilitySettings `json:"capabilities"` 2576Extensions ExtensionSettings `json:"extensions"` 2577GroupResources struct { 2578Capabilities ResourceValidator `json:"capabilities"` 2579Extensions ResourceValidator `json:"extensions"` 2580MCP ResourceValidator `json:"mcp"` 2581Models ResourceValidator `json:"models"` 2582Providers ResourceValidator `json:"providers"` 2583UI ResourceValidator `json:"ui"` 2584 }`json:"group_resources"` 2585MCP MCPSettings `json:"mcp"` 2586Models ModelSettings `json:"models"` 2587Providers ProviderSettings `json:"providers"` 2588UI UISettings `json:"ui"` 2589} 2590 2591// SettingsApplication defines model for SettingsApplication. 2592type SettingsApplication struct { 2593ActiveServiceRevision * 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. 2596CompositionChanged bool `json:"composition_changed"` 2597 2598// DesiredRevision Opaque identity. Never infer a resource type or route from its contents. 2599DesiredRevision ID `json:"desired_revision"` 2600Validation string `json:"validation"` 2601Warnings 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. 2616InstanceID ID `json:"instance_id"` 2617State 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. 2623InstanceID ID `json:"instance_id"` 2624TimeoutMs * int64 `json:"timeout_ms,omitempty"` 2625} 2626 2627// SkillInputRequest defines model for SkillInputRequest. 2628type SkillInputRequest struct { 2629Arguments string `json:"arguments"` 2630 2631// CandidateID Opaque identity. Never infer a resource type or route from its contents. 2632CandidateID ID `json:"candidate_id"` 2633 2634// CatalogRevision Opaque identity. Never infer a resource type or route from its contents. 2635CatalogRevision ID `json:"catalog_revision"` 2636ClientID * string `json:"client_id,omitempty"` 2637Kind string `json:"kind"` 2638} 2639 2640// StorageFile defines model for StorageFile. 2641type StorageFile struct { 2642Bytes Counter `json:"bytes"` 2643Category string `json:"category"` 2644CleanupCandidate bool `json:"cleanup_candidate"` 2645CleanupReason * string `json:"cleanup_reason" nullable:"true"` 2646ModifiedAt * Timestamp `json:"modified_at" nullable:"true"` 2647Path string `json:"path"` 2648} 2649 2650// StorageFilePage defines model for StorageFilePage. 2651type StorageFilePage struct { 2652Items []StorageFile `json:"items"` 2653Next * PageToken `json:"next" nullable:"true"` 2654Totals struct { 2655BackupBytes Counter `json:"backup_bytes"` 2656KernelBytes Counter `json:"kernel_bytes"` 2657OtherBytes Counter `json:"other_bytes"` 2658RecentBackupBytes Counter `json:"recent_backup_bytes"` 2659RecentBackupCount 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 { 2665Database struct { 2666FreePageCount Counter `json:"free_page_count"` 2667MainFileBytes Counter `json:"main_file_bytes"` 2668PageCount Counter `json:"page_count"` 2669PageSizeBytes Counter `json:"page_size_bytes"` 2670UsedBytes Counter `json:"used_bytes"` 2671WalBytes Counter `json:"wal_bytes"` 2672 }`json:"database"` 2673Files StorageFilePage `json:"files"` 2674Images struct { 2675Bytes Counter `json:"bytes"` 2676Count Counter `json:"count"` 2677 }`json:"images"` 2678 2679// MeasuredAt UTC RFC 3339. 2680MeasuredAt Timestamp `json:"measured_at"` 2681Sessions StorageSessionPage `json:"sessions"` 2682} 2683 2684// StorageSession defines model for StorageSession. 2685type StorageSession struct { 2686ActivityAt * Timestamp `json:"activity_at" nullable:"true"` 2687CreatedAt * Timestamp `json:"created_at" nullable:"true"` 2688EstimatedContentBytes Counter `json:"estimated_content_bytes"` 2689 2690// ID Opaque identity. Never infer a resource type or route from its contents. 2691ID ID `json:"id"` 2692Title string `json:"title"` 2693 2694// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 2695Workspace Workspace `json:"workspace"` 2696} 2697 2698// StorageSessionPage defines model for StorageSessionPage. 2699type StorageSessionPage struct { 2700Items []StorageSession `json:"items"` 2701Next * PageToken `json:"next" nullable:"true"` 2702TotalCount Counter `json:"total_count"` 2703TotalEstimatedContentBytes Counter `json:"total_estimated_content_bytes"` 2704} 2705 2706// TargetNotification defines model for TargetNotification. 2707type TargetNotification struct { 2708Notification Notification `json:"notification"` 2709 2710// SessionID Opaque identity. Never infer a resource type or route from its contents. 2711SessionID ID `json:"session_id"` 2712} 2713 2714// TextContent defines model for TextContent. 2715type TextContent struct { 2716Kind string `json:"kind"` 2717Text string `json:"text"` 2718} 2719 2720// Timestamp UTC RFC 3339. 2721type Timestamp = string 2722 2723// TokenObservation defines model for TokenObservation. 2724type TokenObservation struct { 2725Estimated * Counter `json:"estimated" nullable:"true"` 2726Observed * Counter `json:"observed" nullable:"true"` 2727Source * 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. 2733Detail * string `json:"detail,omitempty"` 2734Kind string `json:"kind"` 2735Target 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. 2741CallID ID `json:"call_id"` 2742Intent string `json:"intent"` 2743Name string `json:"name"` 2744Phase string `json:"phase"` 2745Preview * ProgressPreview `json:"preview,omitempty"` 2746ToolCallID * string `json:"tool_call_id" nullable:"true"` 2747} 2748 2749// ToolTrace defines model for ToolTrace. 2750type ToolTrace struct { 2751Activities []ToolActivity `json:"activities"` 2752Changes []json.RawMessage `json:"changes"` 2753Truncated bool `json:"truncated"` 2754} 2755 2756// TraceContent defines model for TraceContent. 2757type TraceContent struct { 2758Kind string `json:"kind"` 2759Trace ToolTrace `json:"trace"` 2760} 2761 2762// TreeChild defines model for TreeChild. 2763type TreeChild struct { 2764Changed Counter `json:"changed"` 2765Kind string `json:"kind"` 2766Language * string `json:"language" nullable:"true"` 2767 2768// Location Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 2769Location Workspace `json:"location"` 2770Name string `json:"name"` 2771} 2772 2773// TreeEntry defines model for TreeEntry. 2774type TreeEntry struct { 2775Changed Counter `json:"changed"` 2776Children []TreeChild `json:"children"` 2777Kind string `json:"kind"` 2778Language * string `json:"language" nullable:"true"` 2779 2780// Location Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 2781Location Workspace `json:"location"` 2782More Counter `json:"more"` 2783Name string `json:"name"` 2784} 2785 2786// Turn defines model for Turn. 2787type Turn struct { 2788EndedAt * Timestamp `json:"ended_at" nullable:"true"` 2789 2790// ID Opaque identity. Never infer a resource type or route from its contents. 2791ID ID `json:"id"` 2792Outcome * SafeReason `json:"outcome" nullable:"true"` 2793 2794// StartedAt UTC RFC 3339. 2795StartedAt Timestamp `json:"started_at"` 2796State string `json:"state"` 2797} 2798 2799// UISettings defines model for UISettings. 2800type UISettings struct { 2801DismissedNotices []ID `json:"dismissed_notices"` 2802Thinking bool `json:"thinking"` 2803Tools bool `json:"tools"` 2804} 2805 2806// UISettingsChange defines model for UISettingsChange. 2807type UISettingsChange struct { 2808Application SettingsApplication `json:"application"` 2809Group string `json:"group"` 2810Resource UISettingsResource `json:"resource"` 2811} 2812 2813// UISettingsPatch defines model for UISettingsPatch. 2814type UISettingsPatch struct { 2815DismissedNotices []ID `json:"dismissed_notices,omitempty"` 2816Thinking * bool `json:"thinking,omitempty"` 2817Tools * 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. 2823ETag ETag `json:"etag"` 2824 2825// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 2826URL ResourceURL `json:"url"` 2827Value 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 { 2835CacheFade []struct { 2836// At UTC RFC 3339. 2837At Timestamp `json:"at"` 2838CachedTokens * Counter `json:"cached_tokens" nullable:"true"` 2839 }`json:"cache_fade"` 2840CacheTTLSeconds * Counter `json:"cache_ttl_seconds" nullable:"true"` 2841CacheWriteTokens * Counter `json:"cache_write_tokens" nullable:"true"` 2842CachedPromptTokens * Counter `json:"cached_prompt_tokens" nullable:"true"` 2843CompletionTokens * Counter `json:"completion_tokens" nullable:"true"` 2844ContextWindowTokens * Counter `json:"context_window_tokens" nullable:"true"` 2845ElapsedMs * float64 `json:"elapsed_ms" nullable:"true"` 2846Model * ID `json:"model" nullable:"true"` 2847ObservedAt * Timestamp `json:"observed_at" nullable:"true"` 2848PromptTokens * Counter `json:"prompt_tokens" nullable:"true"` 2849TokensPerSecond * float64 `json:"tokens_per_second" nullable:"true"` 2850TotalTokens * Counter `json:"total_tokens" nullable:"true"` 2851} 2852 2853// ValueSource For env, value is a daemon-host environment variable name. 2854type ValueSource struct { 2855Source string `json:"source"` 2856Value string `json:"value"` 2857} 2858 2859// Visit defines model for Visit. 2860type Visit struct { 2861Opens Counter `json:"opens"` 2862 2863// SessionID Opaque identity. Never infer a resource type or route from its contents. 2864SessionID ID `json:"session_id"` 2865 2866// VisitID Opaque identity. Never infer a resource type or route from its contents. 2867VisitID 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 { 2875Enabled bool `json:"enabled"` 2876Label string `json:"label"` 2877 2878// Name Opaque identity. Never infer a resource type or route from its contents. 2879Name ID `json:"name"` 2880Position int64 `json:"position"` 2881} 2882 2883// WebSearchProviderChange defines model for WebSearchProviderChange. 2884type WebSearchProviderChange struct { 2885Resource WebSearchProviderResource `json:"resource"` 2886} 2887 2888// WebSearchProviderChangeRequest defines model for WebSearchProviderChangeRequest. 2889type WebSearchProviderChangeRequest struct { 2890Change string `json:"change"` 2891} 2892 2893// WebSearchProviderPage defines model for WebSearchProviderPage. 2894type WebSearchProviderPage struct { 2895Items []WebSearchProviderResource `json:"items"` 2896Next any `json:"next" nullable:"true"` 2897Page PageDescriptor `json:"page"` 2898} 2899 2900// WebSearchProviderResource defines model for WebSearchProviderResource. 2901type WebSearchProviderResource struct { 2902// ETag Strong opaque validator for the complete canonical representation. 2903ETag ETag `json:"etag"` 2904 2905// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 2906URL ResourceURL `json:"url"` 2907Value 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 { 2912Notification Notification `json:"notification"` 2913Resource WorkResource `json:"resource"` 2914} 2915 2916// WorkCreate Examples: {"title":"Fix the parser"} 2917type WorkCreate struct { 2918Notes * string `json:"notes,omitempty"` 2919 2920// NotifySessionID Opaque identity. Never infer a resource type or route from its contents. 2921NotifySessionID * ID `json:"notify_session_id,omitempty"` 2922ParentID * ID `json:"parent_id,omitempty" nullable:"true"` 2923RunID * ID `json:"run_id,omitempty" nullable:"true"` 2924SessionID * ID `json:"session_id,omitempty" nullable:"true"` 2925Title string `json:"title"` 2926} 2927 2928// WorkItem defines model for WorkItem. 2929type WorkItem struct { 2930// CreatedAt UTC RFC 3339. 2931CreatedAt Timestamp `json:"created_at"` 2932 2933// ID Opaque identity. Never infer a resource type or route from its contents. 2934ID ID `json:"id"` 2935Notes string `json:"notes"` 2936ParentID * ID `json:"parent_id" nullable:"true"` 2937 2938// Revision Opaque identity. Never infer a resource type or route from its contents. 2939Revision ID `json:"revision"` 2940RunID * ID `json:"run_id" nullable:"true"` 2941SessionID * ID `json:"session_id" nullable:"true"` 2942Status string `json:"status"` 2943Title string `json:"title"` 2944 2945// UpdatedAt UTC RFC 3339. 2946UpdatedAt Timestamp `json:"updated_at"` 2947 2948// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 2949Workspace Workspace `json:"workspace"` 2950} 2951 2952// WorkPage defines model for WorkPage. 2953type WorkPage struct { 2954Glance * Glance `json:"glance,omitempty"` 2955Items []WorkResource `json:"items"` 2956Next * PageToken `json:"next" nullable:"true"` 2957Page * PageDescriptor `json:"page,omitempty"` 2958} 2959 2960// WorkPatch defines model for WorkPatch. 2961type WorkPatch struct { 2962Notes * string `json:"notes,omitempty"` 2963 2964// NotifySessionID Opaque identity. Never infer a resource type or route from its contents. 2965NotifySessionID * ID `json:"notify_session_id,omitempty"` 2966RunID * ID `json:"run_id,omitempty" nullable:"true"` 2967SessionID * ID `json:"session_id,omitempty" nullable:"true"` 2968Status * string `json:"status,omitempty"` 2969Title * 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. 2975ETag ETag `json:"etag"` 2976 2977// URL Daemon-relative URL, including any representation query. No foreign origin or fragment. 2978URL ResourceURL `json:"url"` 2979Value 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. 2988Active Workspace `json:"active"` 2989 2990// Desired Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 2991Desired Workspace `json:"desired"` 2992 2993// Revision Opaque identity. Never infer a resource type or route from its contents. 2994Revision ID `json:"revision"` 2995State 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. 3001Directory Workspace `json:"directory"` 3002Home * Workspace `json:"home" nullable:"true"` 3003Host * Host `json:"host" nullable:"true"` 3004Items []struct { 3005Hidden bool `json:"hidden"` 3006 3007// Location Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 3008Location Workspace `json:"location"` 3009ModifiedAt * Timestamp `json:"modified_at" nullable:"true"` 3010Name string `json:"name"` 3011Vcs * string `json:"vcs" nullable:"true"` 3012 }`json:"items"` 3013Next * PageToken `json:"next" nullable:"true"` 3014Parent * Workspace `json:"parent" nullable:"true"` 3015Preview * 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. 3021FamilyRevision ID `json:"family_revision"` 3022 3023// Workspace Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. 3024Workspace Workspace `json:"workspace"` 3025} 3026 3027// WorkspacePreview defines model for WorkspacePreview. 3028type WorkspacePreview struct { 3029Languages []struct { 3030Bytes Counter `json:"bytes"` 3031Color * string `json:"color" nullable:"true"` 3032Name string `json:"name"` 3033Share float64 `json:"share"` 3034 }`json:"languages"` 3035More Counter `json:"more"` 3036Repository json.RawMessage `json:"repository" nullable:"true"` 3037RepositoryDiagnostic * SafeReason `json:"repository_diagnostic" nullable:"true"` 3038Tree []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. 3101IfMatch IfMatch `json:"If-Match"` 3102} 3103 3104// UnlinkWorkspaceParams defines parameters for UnlinkWorkspace. 3105type UnlinkWorkspaceParams struct { 3106Workspace Workspace `form:"workspace" json:"workspace"` 3107Member Workspace `form:"member" json:"member"` 3108View string `form:"view" json:"view"` 3109 3110// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted. 3111IfMatch IfMatch `json:"If-Match"` 3112} 3113 3114// GetLinkGroupParams defines parameters for GetLinkGroup. 3115type GetLinkGroupParams struct { 3116Workspace Workspace `form:"workspace" json:"workspace"` 3117View * string `form:"view,omitempty" json:"view,omitempty"` 3118Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3119Next * Next `form:"next,omitempty" json:"next,omitempty"` 3120} 3121 3122// MergeLinkGroupsParams defines parameters for MergeLinkGroups. 3123type MergeLinkGroupsParams struct { 3124Workspace Workspace `form:"workspace" json:"workspace"` 3125View string `form:"view" json:"view"` 3126 3127// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted. 3128IfMatch IfMatch `json:"If-Match"` 3129} 3130 3131// ListPaperclipsParams defines parameters for ListPaperclips. 3132type ListPaperclipsParams struct { 3133Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3134Next * 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. 3140IfMatch 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. 3146IfMatch 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 { 3154SessionID ID `form:"session_id" json:"session_id"` 3155Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3156Next * 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. 3162IfMatch 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. 3168IfMatch IfMatch `json:"If-Match"` 3169} 3170 3171// ListHooksParams defines parameters for ListHooks. 3172type ListHooksParams struct { 3173SessionID * ID `form:"session_id,omitempty" json:"session_id,omitempty"` 3174Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3175Next * Next `form:"next,omitempty" json:"next,omitempty"` 3176} 3177 3178// DeleteHookParams defines parameters for DeleteHook. 3179type DeleteHookParams struct { 3180View string `form:"view" json:"view"` 3181 3182// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted. 3183IfMatch IfMatch `json:"If-Match"` 3184} 3185 3186// GetHookParams defines parameters for GetHook. 3187type GetHookParams struct { 3188View * string `form:"view,omitempty" json:"view,omitempty"` 3189} 3190 3191// PatchHookParams defines parameters for PatchHook. 3192type PatchHookParams struct { 3193View string `form:"view" json:"view"` 3194 3195// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted. 3196IfMatch IfMatch `json:"If-Match"` 3197} 3198 3199// ListHookDeliveriesParams defines parameters for ListHookDeliveries. 3200type ListHookDeliveriesParams struct { 3201State * string `form:"state,omitempty" json:"state,omitempty"` 3202Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3203Next * 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. 3209XAlbedoEventID * 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. 3215IfMatch 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. 3221IfMatch IfMatch `json:"If-Match"` 3222} 3223 3224// ListWorkParams defines parameters for ListWork. 3225type ListWorkParams struct { 3226Workspace Workspace `form:"workspace" json:"workspace"` 3227Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3228Next * Next `form:"next,omitempty" json:"next,omitempty"` 3229} 3230 3231// CreateWorkParams defines parameters for CreateWork. 3232type CreateWorkParams struct { 3233Workspace Workspace `form:"workspace" json:"workspace"` 3234} 3235 3236// DeleteWorkParams defines parameters for DeleteWork. 3237type DeleteWorkParams struct { 3238Workspace Workspace `form:"workspace" json:"workspace"` 3239 3240// NotifySessionID Queue the deletion note for this session after the durable edit. 3241NotifySessionID * 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. 3244IfMatch IfMatch `json:"If-Match"` 3245} 3246 3247// GetWorkParams defines parameters for GetWork. 3248type GetWorkParams struct { 3249Workspace Workspace `form:"workspace" json:"workspace"` 3250} 3251 3252// PatchWorkParams defines parameters for PatchWork. 3253type PatchWorkParams struct { 3254Workspace Workspace `form:"workspace" json:"workspace"` 3255 3256// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted. 3257IfMatch IfMatch `json:"If-Match"` 3258} 3259 3260// ListHostsParams defines parameters for ListHosts. 3261type ListHostsParams struct { 3262Target * ID `form:"target,omitempty" json:"target,omitempty"` 3263Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3264Next * Next `form:"next,omitempty" json:"next,omitempty"` 3265} 3266 3267// ListModelsParams defines parameters for ListModels. 3268type ListModelsParams struct { 3269View * string `form:"view,omitempty" json:"view,omitempty"` 3270 3271// Extension Cache-policy matching only; defaults to the empty selector. 3272Extension * string `form:"extension,omitempty" json:"extension,omitempty"` 3273 3274// Host Cache-policy matching only; defaults to the empty selector. 3275Host * string `form:"host,omitempty" json:"host,omitempty"` 3276Model * ID `form:"model,omitempty" json:"model,omitempty"` 3277ProviderProfile * ID `form:"provider_profile,omitempty" json:"provider_profile,omitempty"` 3278Provider * ID `form:"provider,omitempty" json:"provider,omitempty"` 3279Endpoint * string `form:"endpoint,omitempty" json:"endpoint,omitempty"` 3280Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3281Next * Next `form:"next,omitempty" json:"next,omitempty"` 3282} 3283 3284// GetServerParams defines parameters for GetServer. 3285type GetServerParams struct { 3286Include * string `form:"include,omitempty" json:"include,omitempty"` 3287Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3288Next * 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. 3291QuotaProvider * 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. 3294QuotaAccount * 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. 3297QuotaLimit * 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. 3300QuotaSince * Timestamp `form:"quota_since,omitempty" json:"quota_since,omitempty"` 3301} 3302 3303// ListSessionsParams defines parameters for ListSessions. 3304type ListSessionsParams struct { 3305Scope * string `form:"scope,omitempty" json:"scope,omitempty"` 3306ParentID * ID `form:"parent_id,omitempty" json:"parent_id,omitempty"` 3307FamilyID * ID `form:"family_id,omitempty" json:"family_id,omitempty"` 3308Workspace * Workspace `form:"workspace,omitempty" json:"workspace,omitempty"` 3309Search * string `form:"search,omitempty" json:"search,omitempty"` 3310Archived * bool `form:"archived,omitempty" json:"archived,omitempty"` 3311NeedsReload * bool `form:"needs_reload,omitempty" json:"needs_reload,omitempty"` 3312Sort * string `form:"sort,omitempty" json:"sort,omitempty"` 3313Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3314Next * Next `form:"next,omitempty" json:"next,omitempty"` 3315} 3316 3317// DeleteSessionParams defines parameters for DeleteSession. 3318type DeleteSessionParams struct { 3319View string `form:"view" json:"view"` 3320Scope * string `form:"scope,omitempty" json:"scope,omitempty"` 3321FamilyRevision * ID `form:"family_revision,omitempty" json:"family_revision,omitempty"` 3322 3323// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted. 3324IfMatch IfMatch `json:"If-Match"` 3325} 3326 3327// GetSessionParams defines parameters for GetSession. 3328type GetSessionParams struct { 3329View * string `form:"view,omitempty" json:"view,omitempty"` 3330Tail * int64 `form:"tail,omitempty" json:"tail,omitempty"` 3331AfterGeneration * Generation `form:"after_generation,omitempty" json:"after_generation,omitempty"` 3332AfterSeq * Counter `form:"after_seq,omitempty" json:"after_seq,omitempty"` 3333} 3334 3335// PatchSessionParams defines parameters for PatchSession. 3336type PatchSessionParams struct { 3337View string `form:"view" json:"view"` 3338 3339// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted. 3340IfMatch IfMatch `json:"If-Match"` 3341} 3342 3343// CreateSessionParams defines parameters for CreateSession. 3344type CreateSessionParams struct { 3345// IfNoneMatch Conditional creation only. 3346IfNoneMatch IfNoneMatch `json:"If-None-Match"` 3347} 3348 3349// GetActiveOutputContentParams defines parameters for GetActiveOutputContent. 3350type GetActiveOutputContentParams struct { 3351Snapshot PageToken `form:"snapshot" json:"snapshot"` 3352Next * PageToken `form:"next,omitempty" json:"next,omitempty"` 3353} 3354 3355// GetCatalogParams defines parameters for GetCatalog. 3356type GetCatalogParams struct { 3357Kind * string `form:"kind,omitempty" json:"kind,omitempty"` 3358Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3359Next * Next `form:"next,omitempty" json:"next,omitempty"` 3360} 3361 3362// GetContextParams defines parameters for GetContext. 3363type GetContextParams struct { 3364View * string `form:"view,omitempty" json:"view,omitempty"` 3365SnapshotID * ID `form:"snapshot_id,omitempty" json:"snapshot_id,omitempty"` 3366SectionID * ID `form:"section_id,omitempty" json:"section_id,omitempty"` 3367Page * Counter `form:"page,omitempty" json:"page,omitempty"` 3368After * Counter `form:"after,omitempty" json:"after,omitempty"` 3369Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3370Next * Next `form:"next,omitempty" json:"next,omitempty"` 3371} 3372 3373// GetHistoryParams defines parameters for GetHistory. 3374type GetHistoryParams struct { 3375View * string `form:"view,omitempty" json:"view,omitempty"` 3376Before * Counter `form:"before,omitempty" json:"before,omitempty"` 3377After * Counter `form:"after,omitempty" json:"after,omitempty"` 3378Next * Next `form:"next,omitempty" json:"next,omitempty"` 3379Limit * int64 `form:"limit,omitempty" json:"limit,omitempty"` 3380} 3381 3382// GetHistoryContentParams defines parameters for GetHistoryContent. 3383type GetHistoryContentParams struct { 3384Next * Next `form:"next,omitempty" json:"next,omitempty"` 3385} 3386 3387// GetSettingsParams defines parameters for GetSettings. 3388type GetSettingsParams struct { 3389Group * string `form:"group,omitempty" json:"group,omitempty"` 3390} 3391 3392// PatchSettingsParams defines parameters for PatchSettings. 3393type PatchSettingsParams struct { 3394Group string `form:"group" json:"group"` 3395 3396// IfMatch Observed canonical representation validator. Wildcards and weak validators are not accepted. 3397IfMatch IfMatch `json:"If-Match"` 3398} 3399 3400// GetStorageParams defines parameters for GetStorage. 3401type GetStorageParams struct { 3402SessionsNext * PageToken `form:"sessions_next,omitempty" json:"sessions_next,omitempty"` 3403FilesNext * PageToken `form:"files_next,omitempty" json:"files_next,omitempty"` 3404Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3405} 3406 3407// GetWorkspacesParams defines parameters for GetWorkspaces. 3408type GetWorkspacesParams struct { 3409Location * Workspace `form:"location,omitempty" json:"location,omitempty"` 3410Include * string `form:"include,omitempty" json:"include,omitempty"` 3411Limit * Limit `form:"limit,omitempty" json:"limit,omitempty"` 3412Next * 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 { 3506Do (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. 3515Server string 3516 3517// Doer for performing requests, typically a *http.Client with any 3518// customized settings, such as certificate chains. 3519Client HttpRequestDoer 3520 3521// A list of callbacks for modifying requests which are generated before sending over 3522// the network. 3523RequestEditors []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 3532client := Client { 3533Server :server , 3534 } 3535// mutate client and add all optional params 3536for _ ,o := range opts { 3537if err := o (& client );err != nil { 3538return nil ,err 3539 } 3540 } 3541// ensure the server URL always has a trailing slash 3542if ! strings .HasSuffix (client .Server ,"/" ) { 3543client .Server += "/" 3544 } 3545// create httpClient, if not already present 3546if client .Client == nil { 3547client .Client = & http.Client {} 3548 } 3549return & 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 { 3555return func (c * Client )error { 3556c .Client = doer 3557return 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 { 3564return func (c * Client )error { 3565c .RequestEditors = append (c .RequestEditors ,fn ) 3566return 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). 3578GetAuth (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). 3585DeleteAccount (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). 3592CancelLogin (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). 3599GetLogin (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). 3608AnswerLoginWithBody (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). 3617AnswerLoginWithApplicationMergePatchPlusJSONBody (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). 3626CreateLoginWithBody (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). 3635CreateLogin (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). 3642UnlinkWorkspace (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). 3649GetLinkGroup (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). 3658MergeLinkGroupsWithBody (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). 3667MergeLinkGroups (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). 3674ListPaperclips (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). 3683CreatePaperclipsWithBody (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). 3692CreatePaperclips (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). 3699DeletePaperclips (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). 3704GetPaperclips (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). 3713PatchPaperclipsWithBody (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). 3722PatchPaperclipsWithApplicationMergePatchPlusJSONBody (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). 3731CreateProxyCompletionWithBody (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). 3740CreateProxyCompletion (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). 3747ListProxyModels (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). 3752ListJobs (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). 3761StopJobWithBody (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). 3770StopJob (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). 3777ListSchedule (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). 3786CreateScheduleWithBody (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). 3795CreateSchedule (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). 3802DeleteSchedule (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). 3807GetSchedule (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). 3816PatchScheduleWithBody (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). 3825PatchScheduleWithApplicationMergePatchPlusJSONBody (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). 3832ListWebSearchProviders (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). 3841ChangeWebSearchProviderWithBody (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). 3850ChangeWebSearchProvider (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). 3855GetDelivery (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). 3860ListHooks (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). 3869CreateHookWithBody (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). 3878CreateHook (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). 3883DeleteHook (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). 3890GetHook (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). 3899PatchHookWithBody (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). 3908PatchHookWithApplicationMergePatchPlusJSONBody (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). 3915ListHookDeliveries (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). 3924DeliverWebhookWithBody (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). 3933RotateHookSecretWithBody (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). 3942RotateHookSecret (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). 3949GetHookPermission (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). 3958PatchHookPermissionWithBody (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). 3967PatchHookPermissionWithApplicationMergePatchPlusJSONBody (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). 3974ListWork (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). 3983CreateWorkWithBody (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). 3992CreateWork (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). 3999DeleteWork (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). 4004GetWork (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). 4013PatchWorkWithBody (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). 4022PatchWorkWithApplicationMergePatchPlusJSONBody (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). 4029ListHosts (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). 4038ProbeHostWithBody (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). 4047ProbeHost (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). 4054ListModels (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). 4061GetServer (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). 4070ShutdownServerWithBody (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). 4079ShutdownServer (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). 4086ListSessions (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). 4093DeleteSession (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). 4100GetSession (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). 4109PatchSessionWithBody (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). 4118PatchSessionWithApplicationMergePatchPlusJSONBody (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). 4127CreateSessionWithBody (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). 4136CreateSession (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). 4143GetActiveOutputContent (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). 4150GetCatalog (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). 4159CompactSessionWithBody (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). 4168CompactSession (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). 4175GetContext (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). 4182GetHistory (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). 4189GetHistoryContent (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). 4196GetHistoryImage (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). 4203GetInput (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). 4212PutInputWithBody (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). 4221PutInput (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). 4230CancelInputWithBody (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). 4239CancelInput (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). 4248InterruptSessionWithBody (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). 4257InterruptSession (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). 4266UpgradeKernelWithBody (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). 4275UpgradeKernel (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). 4284ReloadSessionWithBody (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). 4293ReloadSession (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). 4302RecordVisitWithBody (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). 4311RecordVisit (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). 4318GetSettings (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). 4327PatchSettingsWithBody (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). 4336PatchSettingsWithApplicationMergePatchPlusJSONBody (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). 4343GetStorage (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). 4350GetWorkspaces (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 ) { 4359req ,err := NewGetAuthRequest (c .Server ) 4360if err != nil { 4361return nil ,err 4362 } 4363req = req .WithContext (ctx ) 4364if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4365return nil ,err 4366 } 4367return 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 ) { 4376req ,err := NewDeleteAccountRequest (c .Server ,accountID ) 4377if err != nil { 4378return nil ,err 4379 } 4380req = req .WithContext (ctx ) 4381if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4382return nil ,err 4383 } 4384return 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 ) { 4393req ,err := NewCancelLoginRequest (c .Server ,loginID ) 4394if err != nil { 4395return nil ,err 4396 } 4397req = req .WithContext (ctx ) 4398if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4399return nil ,err 4400 } 4401return 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 ) { 4410req ,err := NewGetLoginRequest (c .Server ,loginID ) 4411if err != nil { 4412return nil ,err 4413 } 4414req = req .WithContext (ctx ) 4415if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4416return nil ,err 4417 } 4418return 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 ) { 4429req ,err := NewAnswerLoginRequestWithBody (c .Server ,loginID ,params ,contentType ,body ) 4430if err != nil { 4431return nil ,err 4432 } 4433req = req .WithContext (ctx ) 4434if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4435return nil ,err 4436 } 4437return 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 ) { 4448req ,err := NewAnswerLoginRequestWithApplicationMergePatchPlusJSONBody (c .Server ,loginID ,params ,body ) 4449if err != nil { 4450return nil ,err 4451 } 4452req = req .WithContext (ctx ) 4453if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4454return nil ,err 4455 } 4456return 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 ) { 4467req ,err := NewCreateLoginRequestWithBody (c .Server ,loginID ,contentType ,body ) 4468if err != nil { 4469return nil ,err 4470 } 4471req = req .WithContext (ctx ) 4472if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4473return nil ,err 4474 } 4475return 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 ) { 4486req ,err := NewCreateLoginRequest (c .Server ,loginID ,body ) 4487if err != nil { 4488return nil ,err 4489 } 4490req = req .WithContext (ctx ) 4491if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4492return nil ,err 4493 } 4494return 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 ) { 4503req ,err := NewUnlinkWorkspaceRequest (c .Server ,params ) 4504if err != nil { 4505return nil ,err 4506 } 4507req = req .WithContext (ctx ) 4508if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4509return nil ,err 4510 } 4511return 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 ) { 4520req ,err := NewGetLinkGroupRequest (c .Server ,params ) 4521if err != nil { 4522return nil ,err 4523 } 4524req = req .WithContext (ctx ) 4525if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4526return nil ,err 4527 } 4528return 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 ) { 4539req ,err := NewMergeLinkGroupsRequestWithBody (c .Server ,params ,contentType ,body ) 4540if err != nil { 4541return nil ,err 4542 } 4543req = req .WithContext (ctx ) 4544if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4545return nil ,err 4546 } 4547return 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 ) { 4558req ,err := NewMergeLinkGroupsRequest (c .Server ,params ,body ) 4559if err != nil { 4560return nil ,err 4561 } 4562req = req .WithContext (ctx ) 4563if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4564return nil ,err 4565 } 4566return 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 ) { 4575req ,err := NewListPaperclipsRequest (c .Server ,params ) 4576if err != nil { 4577return nil ,err 4578 } 4579req = req .WithContext (ctx ) 4580if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4581return nil ,err 4582 } 4583return 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 ) { 4594req ,err := NewCreatePaperclipsRequestWithBody (c .Server ,contentType ,body ) 4595if err != nil { 4596return nil ,err 4597 } 4598req = req .WithContext (ctx ) 4599if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4600return nil ,err 4601 } 4602return 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 ) { 4613req ,err := NewCreatePaperclipsRequest (c .Server ,body ) 4614if err != nil { 4615return nil ,err 4616 } 4617req = req .WithContext (ctx ) 4618if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4619return nil ,err 4620 } 4621return 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 ) { 4630req ,err := NewDeletePaperclipsRequest (c .Server ,itemID ,params ) 4631if err != nil { 4632return nil ,err 4633 } 4634req = req .WithContext (ctx ) 4635if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4636return nil ,err 4637 } 4638return 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 ) { 4645req ,err := NewGetPaperclipsRequest (c .Server ,itemID ) 4646if err != nil { 4647return nil ,err 4648 } 4649req = req .WithContext (ctx ) 4650if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4651return nil ,err 4652 } 4653return 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 ) { 4664req ,err := NewPatchPaperclipsRequestWithBody (c .Server ,itemID ,params ,contentType ,body ) 4665if err != nil { 4666return nil ,err 4667 } 4668req = req .WithContext (ctx ) 4669if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4670return nil ,err 4671 } 4672return 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 ) { 4683req ,err := NewPatchPaperclipsRequestWithApplicationMergePatchPlusJSONBody (c .Server ,itemID ,params ,body ) 4684if err != nil { 4685return nil ,err 4686 } 4687req = req .WithContext (ctx ) 4688if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4689return nil ,err 4690 } 4691return 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 ) { 4702req ,err := NewCreateProxyCompletionRequestWithBody (c .Server ,contentType ,body ) 4703if err != nil { 4704return nil ,err 4705 } 4706req = req .WithContext (ctx ) 4707if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4708return nil ,err 4709 } 4710return 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 ) { 4721req ,err := NewCreateProxyCompletionRequest (c .Server ,body ) 4722if err != nil { 4723return nil ,err 4724 } 4725req = req .WithContext (ctx ) 4726if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4727return nil ,err 4728 } 4729return 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 ) { 4738req ,err := NewListProxyModelsRequest (c .Server ) 4739if err != nil { 4740return nil ,err 4741 } 4742req = req .WithContext (ctx ) 4743if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4744return nil ,err 4745 } 4746return 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 ) { 4753req ,err := NewListJobsRequest (c .Server ,sessionID ) 4754if err != nil { 4755return nil ,err 4756 } 4757req = req .WithContext (ctx ) 4758if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4759return nil ,err 4760 } 4761return 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 ) { 4772req ,err := NewStopJobRequestWithBody (c .Server ,sessionID ,jobID ,contentType ,body ) 4773if err != nil { 4774return nil ,err 4775 } 4776req = req .WithContext (ctx ) 4777if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4778return nil ,err 4779 } 4780return 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 ) { 4791req ,err := NewStopJobRequest (c .Server ,sessionID ,jobID ,body ) 4792if err != nil { 4793return nil ,err 4794 } 4795req = req .WithContext (ctx ) 4796if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4797return nil ,err 4798 } 4799return 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 ) { 4808req ,err := NewListScheduleRequest (c .Server ,params ) 4809if err != nil { 4810return nil ,err 4811 } 4812req = req .WithContext (ctx ) 4813if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4814return nil ,err 4815 } 4816return 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 ) { 4827req ,err := NewCreateScheduleRequestWithBody (c .Server ,contentType ,body ) 4828if err != nil { 4829return nil ,err 4830 } 4831req = req .WithContext (ctx ) 4832if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4833return nil ,err 4834 } 4835return 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 ) { 4846req ,err := NewCreateScheduleRequest (c .Server ,body ) 4847if err != nil { 4848return nil ,err 4849 } 4850req = req .WithContext (ctx ) 4851if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4852return nil ,err 4853 } 4854return 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 ) { 4863req ,err := NewDeleteScheduleRequest (c .Server ,jobID ,params ) 4864if err != nil { 4865return nil ,err 4866 } 4867req = req .WithContext (ctx ) 4868if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4869return nil ,err 4870 } 4871return 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 ) { 4878req ,err := NewGetScheduleRequest (c .Server ,jobID ) 4879if err != nil { 4880return nil ,err 4881 } 4882req = req .WithContext (ctx ) 4883if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4884return nil ,err 4885 } 4886return 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 ) { 4897req ,err := NewPatchScheduleRequestWithBody (c .Server ,jobID ,params ,contentType ,body ) 4898if err != nil { 4899return nil ,err 4900 } 4901req = req .WithContext (ctx ) 4902if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4903return nil ,err 4904 } 4905return 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 ) { 4916req ,err := NewPatchScheduleRequestWithApplicationMergePatchPlusJSONBody (c .Server ,jobID ,params ,body ) 4917if err != nil { 4918return nil ,err 4919 } 4920req = req .WithContext (ctx ) 4921if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4922return nil ,err 4923 } 4924return 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 ) { 4933req ,err := NewListWebSearchProvidersRequest (c .Server ) 4934if err != nil { 4935return nil ,err 4936 } 4937req = req .WithContext (ctx ) 4938if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4939return nil ,err 4940 } 4941return 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 ) { 4952req ,err := NewChangeWebSearchProviderRequestWithBody (c .Server ,name ,contentType ,body ) 4953if err != nil { 4954return nil ,err 4955 } 4956req = req .WithContext (ctx ) 4957if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4958return nil ,err 4959 } 4960return 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 ) { 4971req ,err := NewChangeWebSearchProviderRequest (c .Server ,name ,body ) 4972if err != nil { 4973return nil ,err 4974 } 4975req = req .WithContext (ctx ) 4976if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4977return nil ,err 4978 } 4979return 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 ) { 4986req ,err := NewGetDeliveryRequest (c .Server ,deliveryID ) 4987if err != nil { 4988return nil ,err 4989 } 4990req = req .WithContext (ctx ) 4991if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 4992return nil ,err 4993 } 4994return 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 ) { 5001req ,err := NewListHooksRequest (c .Server ,params ) 5002if err != nil { 5003return nil ,err 5004 } 5005req = req .WithContext (ctx ) 5006if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5007return nil ,err 5008 } 5009return 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 ) { 5020req ,err := NewCreateHookRequestWithBody (c .Server ,contentType ,body ) 5021if err != nil { 5022return nil ,err 5023 } 5024req = req .WithContext (ctx ) 5025if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5026return nil ,err 5027 } 5028return 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 ) { 5039req ,err := NewCreateHookRequest (c .Server ,body ) 5040if err != nil { 5041return nil ,err 5042 } 5043req = req .WithContext (ctx ) 5044if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5045return nil ,err 5046 } 5047return 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 ) { 5054req ,err := NewDeleteHookRequest (c .Server ,hookID ,params ) 5055if err != nil { 5056return nil ,err 5057 } 5058req = req .WithContext (ctx ) 5059if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5060return nil ,err 5061 } 5062return 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 ) { 5071req ,err := NewGetHookRequest (c .Server ,hookID ,params ) 5072if err != nil { 5073return nil ,err 5074 } 5075req = req .WithContext (ctx ) 5076if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5077return nil ,err 5078 } 5079return 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 ) { 5090req ,err := NewPatchHookRequestWithBody (c .Server ,hookID ,params ,contentType ,body ) 5091if err != nil { 5092return nil ,err 5093 } 5094req = req .WithContext (ctx ) 5095if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5096return nil ,err 5097 } 5098return 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 ) { 5109req ,err := NewPatchHookRequestWithApplicationMergePatchPlusJSONBody (c .Server ,hookID ,params ,body ) 5110if err != nil { 5111return nil ,err 5112 } 5113req = req .WithContext (ctx ) 5114if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5115return nil ,err 5116 } 5117return 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 ) { 5126req ,err := NewListHookDeliveriesRequest (c .Server ,hookID ,params ) 5127if err != nil { 5128return nil ,err 5129 } 5130req = req .WithContext (ctx ) 5131if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5132return nil ,err 5133 } 5134return 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 ) { 5145req ,err := NewDeliverWebhookRequestWithBody (c .Server ,hookID ,params ,contentType ,body ) 5146if err != nil { 5147return nil ,err 5148 } 5149req = req .WithContext (ctx ) 5150if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5151return nil ,err 5152 } 5153return 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 ) { 5164req ,err := NewRotateHookSecretRequestWithBody (c .Server ,hookID ,params ,contentType ,body ) 5165if err != nil { 5166return nil ,err 5167 } 5168req = req .WithContext (ctx ) 5169if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5170return nil ,err 5171 } 5172return 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 ) { 5183req ,err := NewRotateHookSecretRequest (c .Server ,hookID ,params ,body ) 5184if err != nil { 5185return nil ,err 5186 } 5187req = req .WithContext (ctx ) 5188if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5189return nil ,err 5190 } 5191return 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 ) { 5200req ,err := NewGetHookPermissionRequest (c .Server ,sessionID ) 5201if err != nil { 5202return nil ,err 5203 } 5204req = req .WithContext (ctx ) 5205if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5206return nil ,err 5207 } 5208return 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 ) { 5219req ,err := NewPatchHookPermissionRequestWithBody (c .Server ,sessionID ,params ,contentType ,body ) 5220if err != nil { 5221return nil ,err 5222 } 5223req = req .WithContext (ctx ) 5224if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5225return nil ,err 5226 } 5227return 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 ) { 5238req ,err := NewPatchHookPermissionRequestWithApplicationMergePatchPlusJSONBody (c .Server ,sessionID ,params ,body ) 5239if err != nil { 5240return nil ,err 5241 } 5242req = req .WithContext (ctx ) 5243if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5244return nil ,err 5245 } 5246return 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 ) { 5255req ,err := NewListWorkRequest (c .Server ,params ) 5256if err != nil { 5257return nil ,err 5258 } 5259req = req .WithContext (ctx ) 5260if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5261return nil ,err 5262 } 5263return 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 ) { 5274req ,err := NewCreateWorkRequestWithBody (c .Server ,params ,contentType ,body ) 5275if err != nil { 5276return nil ,err 5277 } 5278req = req .WithContext (ctx ) 5279if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5280return nil ,err 5281 } 5282return 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 ) { 5293req ,err := NewCreateWorkRequest (c .Server ,params ,body ) 5294if err != nil { 5295return nil ,err 5296 } 5297req = req .WithContext (ctx ) 5298if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5299return nil ,err 5300 } 5301return 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 ) { 5310req ,err := NewDeleteWorkRequest (c .Server ,itemID ,params ) 5311if err != nil { 5312return nil ,err 5313 } 5314req = req .WithContext (ctx ) 5315if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5316return nil ,err 5317 } 5318return 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 ) { 5325req ,err := NewGetWorkRequest (c .Server ,itemID ,params ) 5326if err != nil { 5327return nil ,err 5328 } 5329req = req .WithContext (ctx ) 5330if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5331return nil ,err 5332 } 5333return 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 ) { 5344req ,err := NewPatchWorkRequestWithBody (c .Server ,itemID ,params ,contentType ,body ) 5345if err != nil { 5346return nil ,err 5347 } 5348req = req .WithContext (ctx ) 5349if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5350return nil ,err 5351 } 5352return 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 ) { 5363req ,err := NewPatchWorkRequestWithApplicationMergePatchPlusJSONBody (c .Server ,itemID ,params ,body ) 5364if err != nil { 5365return nil ,err 5366 } 5367req = req .WithContext (ctx ) 5368if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5369return nil ,err 5370 } 5371return 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 ) { 5380req ,err := NewListHostsRequest (c .Server ,params ) 5381if err != nil { 5382return nil ,err 5383 } 5384req = req .WithContext (ctx ) 5385if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5386return nil ,err 5387 } 5388return 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 ) { 5399req ,err := NewProbeHostRequestWithBody (c .Server ,host ,contentType ,body ) 5400if err != nil { 5401return nil ,err 5402 } 5403req = req .WithContext (ctx ) 5404if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5405return nil ,err 5406 } 5407return 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 ) { 5418req ,err := NewProbeHostRequest (c .Server ,host ,body ) 5419if err != nil { 5420return nil ,err 5421 } 5422req = req .WithContext (ctx ) 5423if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5424return nil ,err 5425 } 5426return 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 ) { 5435req ,err := NewListModelsRequest (c .Server ,params ) 5436if err != nil { 5437return nil ,err 5438 } 5439req = req .WithContext (ctx ) 5440if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5441return nil ,err 5442 } 5443return 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 ) { 5452req ,err := NewGetServerRequest (c .Server ,params ) 5453if err != nil { 5454return nil ,err 5455 } 5456req = req .WithContext (ctx ) 5457if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5458return nil ,err 5459 } 5460return 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 ) { 5471req ,err := NewShutdownServerRequestWithBody (c .Server ,contentType ,body ) 5472if err != nil { 5473return nil ,err 5474 } 5475req = req .WithContext (ctx ) 5476if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5477return nil ,err 5478 } 5479return 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 ) { 5490req ,err := NewShutdownServerRequest (c .Server ,body ) 5491if err != nil { 5492return nil ,err 5493 } 5494req = req .WithContext (ctx ) 5495if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5496return nil ,err 5497 } 5498return 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 ) { 5507req ,err := NewListSessionsRequest (c .Server ,params ) 5508if err != nil { 5509return nil ,err 5510 } 5511req = req .WithContext (ctx ) 5512if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5513return nil ,err 5514 } 5515return 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 ) { 5524req ,err := NewDeleteSessionRequest (c .Server ,sessionID ,params ) 5525if err != nil { 5526return nil ,err 5527 } 5528req = req .WithContext (ctx ) 5529if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5530return nil ,err 5531 } 5532return 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 ) { 5541req ,err := NewGetSessionRequest (c .Server ,sessionID ,params ) 5542if err != nil { 5543return nil ,err 5544 } 5545req = req .WithContext (ctx ) 5546if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5547return nil ,err 5548 } 5549return 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 ) { 5560req ,err := NewPatchSessionRequestWithBody (c .Server ,sessionID ,params ,contentType ,body ) 5561if err != nil { 5562return nil ,err 5563 } 5564req = req .WithContext (ctx ) 5565if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5566return nil ,err 5567 } 5568return 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 ) { 5579req ,err := NewPatchSessionRequestWithApplicationMergePatchPlusJSONBody (c .Server ,sessionID ,params ,body ) 5580if err != nil { 5581return nil ,err 5582 } 5583req = req .WithContext (ctx ) 5584if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5585return nil ,err 5586 } 5587return 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 ) { 5598req ,err := NewCreateSessionRequestWithBody (c .Server ,sessionID ,params ,contentType ,body ) 5599if err != nil { 5600return nil ,err 5601 } 5602req = req .WithContext (ctx ) 5603if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5604return nil ,err 5605 } 5606return 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 ) { 5617req ,err := NewCreateSessionRequest (c .Server ,sessionID ,params ,body ) 5618if err != nil { 5619return nil ,err 5620 } 5621req = req .WithContext (ctx ) 5622if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5623return nil ,err 5624 } 5625return 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 ) { 5634req ,err := NewGetActiveOutputContentRequest (c .Server ,sessionID ,contentID ,params ) 5635if err != nil { 5636return nil ,err 5637 } 5638req = req .WithContext (ctx ) 5639if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5640return nil ,err 5641 } 5642return 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 ) { 5651req ,err := NewGetCatalogRequest (c .Server ,sessionID ,params ) 5652if err != nil { 5653return nil ,err 5654 } 5655req = req .WithContext (ctx ) 5656if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5657return nil ,err 5658 } 5659return 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 ) { 5670req ,err := NewCompactSessionRequestWithBody (c .Server ,sessionID ,contentType ,body ) 5671if err != nil { 5672return nil ,err 5673 } 5674req = req .WithContext (ctx ) 5675if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5676return nil ,err 5677 } 5678return 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 ) { 5689req ,err := NewCompactSessionRequest (c .Server ,sessionID ,body ) 5690if err != nil { 5691return nil ,err 5692 } 5693req = req .WithContext (ctx ) 5694if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5695return nil ,err 5696 } 5697return 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 ) { 5706req ,err := NewGetContextRequest (c .Server ,sessionID ,params ) 5707if err != nil { 5708return nil ,err 5709 } 5710req = req .WithContext (ctx ) 5711if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5712return nil ,err 5713 } 5714return 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 ) { 5723req ,err := NewGetHistoryRequest (c .Server ,sessionID ,params ) 5724if err != nil { 5725return nil ,err 5726 } 5727req = req .WithContext (ctx ) 5728if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5729return nil ,err 5730 } 5731return 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 ) { 5740req ,err := NewGetHistoryContentRequest (c .Server ,sessionID ,entryID ,params ) 5741if err != nil { 5742return nil ,err 5743 } 5744req = req .WithContext (ctx ) 5745if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5746return nil ,err 5747 } 5748return 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 ) { 5757req ,err := NewGetHistoryImageRequest (c .Server ,sessionID ,entryID ,field ) 5758if err != nil { 5759return nil ,err 5760 } 5761req = req .WithContext (ctx ) 5762if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5763return nil ,err 5764 } 5765return 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 ) { 5774req ,err := NewGetInputRequest (c .Server ,sessionID ,inputID ) 5775if err != nil { 5776return nil ,err 5777 } 5778req = req .WithContext (ctx ) 5779if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5780return nil ,err 5781 } 5782return 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 ) { 5793req ,err := NewPutInputRequestWithBody (c .Server ,sessionID ,inputID ,contentType ,body ) 5794if err != nil { 5795return nil ,err 5796 } 5797req = req .WithContext (ctx ) 5798if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5799return nil ,err 5800 } 5801return 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 ) { 5812req ,err := NewPutInputRequest (c .Server ,sessionID ,inputID ,body ) 5813if err != nil { 5814return nil ,err 5815 } 5816req = req .WithContext (ctx ) 5817if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5818return nil ,err 5819 } 5820return 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 ) { 5831req ,err := NewCancelInputRequestWithBody (c .Server ,sessionID ,inputID ,contentType ,body ) 5832if err != nil { 5833return nil ,err 5834 } 5835req = req .WithContext (ctx ) 5836if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5837return nil ,err 5838 } 5839return 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 ) { 5850req ,err := NewCancelInputRequest (c .Server ,sessionID ,inputID ,body ) 5851if err != nil { 5852return nil ,err 5853 } 5854req = req .WithContext (ctx ) 5855if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5856return nil ,err 5857 } 5858return 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 ) { 5869req ,err := NewInterruptSessionRequestWithBody (c .Server ,sessionID ,contentType ,body ) 5870if err != nil { 5871return nil ,err 5872 } 5873req = req .WithContext (ctx ) 5874if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5875return nil ,err 5876 } 5877return 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 ) { 5888req ,err := NewInterruptSessionRequest (c .Server ,sessionID ,body ) 5889if err != nil { 5890return nil ,err 5891 } 5892req = req .WithContext (ctx ) 5893if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5894return nil ,err 5895 } 5896return 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 ) { 5907req ,err := NewUpgradeKernelRequestWithBody (c .Server ,sessionID ,contentType ,body ) 5908if err != nil { 5909return nil ,err 5910 } 5911req = req .WithContext (ctx ) 5912if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5913return nil ,err 5914 } 5915return 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 ) { 5926req ,err := NewUpgradeKernelRequest (c .Server ,sessionID ,body ) 5927if err != nil { 5928return nil ,err 5929 } 5930req = req .WithContext (ctx ) 5931if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5932return nil ,err 5933 } 5934return 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 ) { 5945req ,err := NewReloadSessionRequestWithBody (c .Server ,sessionID ,contentType ,body ) 5946if err != nil { 5947return nil ,err 5948 } 5949req = req .WithContext (ctx ) 5950if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5951return nil ,err 5952 } 5953return 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 ) { 5964req ,err := NewReloadSessionRequest (c .Server ,sessionID ,body ) 5965if err != nil { 5966return nil ,err 5967 } 5968req = req .WithContext (ctx ) 5969if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5970return nil ,err 5971 } 5972return 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 ) { 5983req ,err := NewRecordVisitRequestWithBody (c .Server ,sessionID ,visitID ,contentType ,body ) 5984if err != nil { 5985return nil ,err 5986 } 5987req = req .WithContext (ctx ) 5988if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 5989return nil ,err 5990 } 5991return 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 ) { 6002req ,err := NewRecordVisitRequest (c .Server ,sessionID ,visitID ,body ) 6003if err != nil { 6004return nil ,err 6005 } 6006req = req .WithContext (ctx ) 6007if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 6008return nil ,err 6009 } 6010return 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 ) { 6019req ,err := NewGetSettingsRequest (c .Server ,params ) 6020if err != nil { 6021return nil ,err 6022 } 6023req = req .WithContext (ctx ) 6024if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 6025return nil ,err 6026 } 6027return 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 ) { 6038req ,err := NewPatchSettingsRequestWithBody (c .Server ,params ,contentType ,body ) 6039if err != nil { 6040return nil ,err 6041 } 6042req = req .WithContext (ctx ) 6043if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 6044return nil ,err 6045 } 6046return 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 ) { 6057req ,err := NewPatchSettingsRequestWithApplicationMergePatchPlusJSONBody (c .Server ,params ,body ) 6058if err != nil { 6059return nil ,err 6060 } 6061req = req .WithContext (ctx ) 6062if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 6063return nil ,err 6064 } 6065return 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 ) { 6074req ,err := NewGetStorageRequest (c .Server ,params ) 6075if err != nil { 6076return nil ,err 6077 } 6078req = req .WithContext (ctx ) 6079if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 6080return nil ,err 6081 } 6082return 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 ) { 6091req ,err := NewGetWorkspacesRequest (c .Server ,params ) 6092if err != nil { 6093return nil ,err 6094 } 6095req = req .WithContext (ctx ) 6096if err := c .applyEditors (ctx ,req ,reqEditors );err != nil { 6097return nil ,err 6098 } 6099return c .Client .Do (req ) 6100} 6101 6102// NewGetAuthRequest constructs an http.Request for the GetAuth method 6103func NewGetAuthRequest (server string ) (* http.Request ,error ) { 6104var err error 6105 6106serverURL ,err := url .Parse (server ) 6107if err != nil { 6108return nil ,err 6109 } 6110 6111operationPath := fmt .Sprintf ("/auth" ) 6112if operationPath [0 ]== '/' { 6113operationPath = "." + operationPath 6114 } 6115 6116queryURL ,err := serverURL .Parse (operationPath ) 6117if err != nil { 6118return nil ,err 6119 } 6120 6121req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 6122if err != nil { 6123return nil ,err 6124 } 6125 6126return req ,nil 6127} 6128 6129// NewDeleteAccountRequest constructs an http.Request for the DeleteAccount method 6130func NewDeleteAccountRequest (server string ,accountID ID ) (* http.Request ,error ) { 6131var err error 6132 6133var pathParam0 string 6134 6135pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"account_id" ,accountID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6136if err != nil { 6137return nil ,err 6138 } 6139 6140serverURL ,err := url .Parse (server ) 6141if err != nil { 6142return nil ,err 6143 } 6144 6145operationPath := fmt .Sprintf ("/auth/accounts/%s" ,pathParam0 ) 6146if operationPath [0 ]== '/' { 6147operationPath = "." + operationPath 6148 } 6149 6150queryURL ,err := serverURL .Parse (operationPath ) 6151if err != nil { 6152return nil ,err 6153 } 6154 6155req ,err := http .NewRequest (http .MethodDelete ,queryURL .String (),nil ) 6156if err != nil { 6157return nil ,err 6158 } 6159 6160return req ,nil 6161} 6162 6163// NewCancelLoginRequest constructs an http.Request for the CancelLogin method 6164func NewCancelLoginRequest (server string ,loginID ID ) (* http.Request ,error ) { 6165var err error 6166 6167var pathParam0 string 6168 6169pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"login_id" ,loginID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6170if err != nil { 6171return nil ,err 6172 } 6173 6174serverURL ,err := url .Parse (server ) 6175if err != nil { 6176return nil ,err 6177 } 6178 6179operationPath := fmt .Sprintf ("/auth/logins/%s" ,pathParam0 ) 6180if operationPath [0 ]== '/' { 6181operationPath = "." + operationPath 6182 } 6183 6184queryURL ,err := serverURL .Parse (operationPath ) 6185if err != nil { 6186return nil ,err 6187 } 6188 6189req ,err := http .NewRequest (http .MethodDelete ,queryURL .String (),nil ) 6190if err != nil { 6191return nil ,err 6192 } 6193 6194return req ,nil 6195} 6196 6197// NewGetLoginRequest constructs an http.Request for the GetLogin method 6198func NewGetLoginRequest (server string ,loginID ID ) (* http.Request ,error ) { 6199var err error 6200 6201var pathParam0 string 6202 6203pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"login_id" ,loginID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6204if err != nil { 6205return nil ,err 6206 } 6207 6208serverURL ,err := url .Parse (server ) 6209if err != nil { 6210return nil ,err 6211 } 6212 6213operationPath := fmt .Sprintf ("/auth/logins/%s" ,pathParam0 ) 6214if operationPath [0 ]== '/' { 6215operationPath = "." + operationPath 6216 } 6217 6218queryURL ,err := serverURL .Parse (operationPath ) 6219if err != nil { 6220return nil ,err 6221 } 6222 6223req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 6224if err != nil { 6225return nil ,err 6226 } 6227 6228return 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 ) { 6233var bodyReader io.Reader 6234buf ,err := json .Marshal (body ) 6235if err != nil { 6236return nil ,err 6237 } 6238bodyReader = bytes .NewReader (buf ) 6239return 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 ) { 6244var err error 6245 6246var pathParam0 string 6247 6248pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"login_id" ,loginID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6249if err != nil { 6250return nil ,err 6251 } 6252 6253serverURL ,err := url .Parse (server ) 6254if err != nil { 6255return nil ,err 6256 } 6257 6258operationPath := fmt .Sprintf ("/auth/logins/%s" ,pathParam0 ) 6259if operationPath [0 ]== '/' { 6260operationPath = "." + operationPath 6261 } 6262 6263queryURL ,err := serverURL .Parse (operationPath ) 6264if err != nil { 6265return nil ,err 6266 } 6267 6268req ,err := http .NewRequest (http .MethodPatch ,queryURL .String (),body ) 6269if err != nil { 6270return nil ,err 6271 } 6272 6273req .Header .Add ("Content-Type" ,contentType ) 6274 6275if params != nil { 6276 6277var headerParam0 string 6278 6279headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 6280if err != nil { 6281return nil ,err 6282 } 6283 6284req .Header .Set ("If-Match" ,headerParam0 ) 6285 6286 } 6287 6288return 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 ) { 6293var bodyReader io.Reader 6294buf ,err := json .Marshal (body ) 6295if err != nil { 6296return nil ,err 6297 } 6298bodyReader = bytes .NewReader (buf ) 6299return 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 ) { 6304var err error 6305 6306var pathParam0 string 6307 6308pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"login_id" ,loginID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"uuid" }) 6309if err != nil { 6310return nil ,err 6311 } 6312 6313serverURL ,err := url .Parse (server ) 6314if err != nil { 6315return nil ,err 6316 } 6317 6318operationPath := fmt .Sprintf ("/auth/logins/%s" ,pathParam0 ) 6319if operationPath [0 ]== '/' { 6320operationPath = "." + operationPath 6321 } 6322 6323queryURL ,err := serverURL .Parse (operationPath ) 6324if err != nil { 6325return nil ,err 6326 } 6327 6328req ,err := http .NewRequest (http .MethodPut ,queryURL .String (),body ) 6329if err != nil { 6330return nil ,err 6331 } 6332 6333req .Header .Add ("Content-Type" ,contentType ) 6334 6335return req ,nil 6336} 6337 6338// NewUnlinkWorkspaceRequest constructs an http.Request for the UnlinkWorkspace method 6339func NewUnlinkWorkspaceRequest (server string ,params * UnlinkWorkspaceParams ) (* http.Request ,error ) { 6340var err error 6341 6342serverURL ,err := url .Parse (server ) 6343if err != nil { 6344return nil ,err 6345 } 6346 6347operationPath := fmt .Sprintf ("/extensions/links/groups" ) 6348if operationPath [0 ]== '/' { 6349operationPath = "." + operationPath 6350 } 6351 6352queryURL ,err := serverURL .Parse (operationPath ) 6353if err != nil { 6354return nil ,err 6355 } 6356 6357if params != nil { 6358// queryValues collects non-styled parameters (passthrough, JSON) 6359// that are safe to round-trip through url.Values.Encode(). 6360queryValues := 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"). 6364var rawQueryFragments []string 6365 6366if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6367return nil ,err 6368 }else { 6369for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6370rawQueryFragments = append (rawQueryFragments ,qp ) 6371 } 6372 } 6373 6374if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"member" ,params .Member , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6375return nil ,err 6376 }else { 6377for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6378rawQueryFragments = append (rawQueryFragments ,qp ) 6379 } 6380 } 6381 6382if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6383return nil ,err 6384 }else { 6385for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6386rawQueryFragments = append (rawQueryFragments ,qp ) 6387 } 6388 } 6389 6390if encoded := queryValues .Encode ();encoded != "" { 6391rawQueryFragments = append (rawQueryFragments ,encoded ) 6392 } 6393queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 6394 } 6395 6396req ,err := http .NewRequest (http .MethodDelete ,queryURL .String (),nil ) 6397if err != nil { 6398return nil ,err 6399 } 6400 6401if params != nil { 6402 6403var headerParam0 string 6404 6405headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 6406if err != nil { 6407return nil ,err 6408 } 6409 6410req .Header .Set ("If-Match" ,headerParam0 ) 6411 6412 } 6413 6414return req ,nil 6415} 6416 6417// NewGetLinkGroupRequest constructs an http.Request for the GetLinkGroup method 6418func NewGetLinkGroupRequest (server string ,params * GetLinkGroupParams ) (* http.Request ,error ) { 6419var err error 6420 6421serverURL ,err := url .Parse (server ) 6422if err != nil { 6423return nil ,err 6424 } 6425 6426operationPath := fmt .Sprintf ("/extensions/links/groups" ) 6427if operationPath [0 ]== '/' { 6428operationPath = "." + operationPath 6429 } 6430 6431queryURL ,err := serverURL .Parse (operationPath ) 6432if err != nil { 6433return nil ,err 6434 } 6435 6436if params != nil { 6437// queryValues collects non-styled parameters (passthrough, JSON) 6438// that are safe to round-trip through url.Values.Encode(). 6439queryValues := 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"). 6443var rawQueryFragments []string 6444 6445if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6446return nil ,err 6447 }else { 6448for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6449rawQueryFragments = append (rawQueryFragments ,qp ) 6450 } 6451 } 6452 6453if params .View != nil { 6454 6455if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,* params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6456return nil ,err 6457 }else { 6458for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6459rawQueryFragments = append (rawQueryFragments ,qp ) 6460 } 6461 } 6462 6463 } 6464 6465if params .Limit != nil { 6466 6467if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 6468return nil ,err 6469 }else { 6470for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6471rawQueryFragments = append (rawQueryFragments ,qp ) 6472 } 6473 } 6474 6475 } 6476 6477if params .Next != nil { 6478 6479if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6480return nil ,err 6481 }else { 6482for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6483rawQueryFragments = append (rawQueryFragments ,qp ) 6484 } 6485 } 6486 6487 } 6488 6489if encoded := queryValues .Encode ();encoded != "" { 6490rawQueryFragments = append (rawQueryFragments ,encoded ) 6491 } 6492queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 6493 } 6494 6495req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 6496if err != nil { 6497return nil ,err 6498 } 6499 6500return 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 ) { 6505var bodyReader io.Reader 6506buf ,err := json .Marshal (body ) 6507if err != nil { 6508return nil ,err 6509 } 6510bodyReader = bytes .NewReader (buf ) 6511return 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 ) { 6516var err error 6517 6518serverURL ,err := url .Parse (server ) 6519if err != nil { 6520return nil ,err 6521 } 6522 6523operationPath := fmt .Sprintf ("/extensions/links/groups" ) 6524if operationPath [0 ]== '/' { 6525operationPath = "." + operationPath 6526 } 6527 6528queryURL ,err := serverURL .Parse (operationPath ) 6529if err != nil { 6530return nil ,err 6531 } 6532 6533if params != nil { 6534// queryValues collects non-styled parameters (passthrough, JSON) 6535// that are safe to round-trip through url.Values.Encode(). 6536queryValues := 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"). 6540var rawQueryFragments []string 6541 6542if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6543return nil ,err 6544 }else { 6545for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6546rawQueryFragments = append (rawQueryFragments ,qp ) 6547 } 6548 } 6549 6550if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6551return nil ,err 6552 }else { 6553for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6554rawQueryFragments = append (rawQueryFragments ,qp ) 6555 } 6556 } 6557 6558if encoded := queryValues .Encode ();encoded != "" { 6559rawQueryFragments = append (rawQueryFragments ,encoded ) 6560 } 6561queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 6562 } 6563 6564req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 6565if err != nil { 6566return nil ,err 6567 } 6568 6569req .Header .Add ("Content-Type" ,contentType ) 6570 6571if params != nil { 6572 6573var headerParam0 string 6574 6575headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 6576if err != nil { 6577return nil ,err 6578 } 6579 6580req .Header .Set ("If-Match" ,headerParam0 ) 6581 6582 } 6583 6584return req ,nil 6585} 6586 6587// NewListPaperclipsRequest constructs an http.Request for the ListPaperclips method 6588func NewListPaperclipsRequest (server string ,params * ListPaperclipsParams ) (* http.Request ,error ) { 6589var err error 6590 6591serverURL ,err := url .Parse (server ) 6592if err != nil { 6593return nil ,err 6594 } 6595 6596operationPath := fmt .Sprintf ("/extensions/paperclips/items" ) 6597if operationPath [0 ]== '/' { 6598operationPath = "." + operationPath 6599 } 6600 6601queryURL ,err := serverURL .Parse (operationPath ) 6602if err != nil { 6603return nil ,err 6604 } 6605 6606if params != nil { 6607// queryValues collects non-styled parameters (passthrough, JSON) 6608// that are safe to round-trip through url.Values.Encode(). 6609queryValues := 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"). 6613var rawQueryFragments []string 6614 6615if params .Limit != nil { 6616 6617if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 6618return nil ,err 6619 }else { 6620for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6621rawQueryFragments = append (rawQueryFragments ,qp ) 6622 } 6623 } 6624 6625 } 6626 6627if params .Next != nil { 6628 6629if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 6630return nil ,err 6631 }else { 6632for _ ,qp := range strings .Split (queryFrag ,"&" ) { 6633rawQueryFragments = append (rawQueryFragments ,qp ) 6634 } 6635 } 6636 6637 } 6638 6639if encoded := queryValues .Encode ();encoded != "" { 6640rawQueryFragments = append (rawQueryFragments ,encoded ) 6641 } 6642queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 6643 } 6644 6645req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 6646if err != nil { 6647return nil ,err 6648 } 6649 6650return req ,nil 6651} 6652 6653// NewCreatePaperclipsRequest calls the generic CreatePaperclips builder with application/json body 6654func NewCreatePaperclipsRequest (server string ,body CreatePaperclipsJSONRequestBody ) (* http.Request ,error ) { 6655var bodyReader io.Reader 6656buf ,err := json .Marshal (body ) 6657if err != nil { 6658return nil ,err 6659 } 6660bodyReader = bytes .NewReader (buf ) 6661return 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 ) { 6666var err error 6667 6668serverURL ,err := url .Parse (server ) 6669if err != nil { 6670return nil ,err 6671 } 6672 6673operationPath := fmt .Sprintf ("/extensions/paperclips/items" ) 6674if operationPath [0 ]== '/' { 6675operationPath = "." + operationPath 6676 } 6677 6678queryURL ,err := serverURL .Parse (operationPath ) 6679if err != nil { 6680return nil ,err 6681 } 6682 6683req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 6684if err != nil { 6685return nil ,err 6686 } 6687 6688req .Header .Add ("Content-Type" ,contentType ) 6689 6690return 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 ) { 6695var err error 6696 6697var pathParam0 string 6698 6699pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"item_id" ,itemID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6700if err != nil { 6701return nil ,err 6702 } 6703 6704serverURL ,err := url .Parse (server ) 6705if err != nil { 6706return nil ,err 6707 } 6708 6709operationPath := fmt .Sprintf ("/extensions/paperclips/items/%s" ,pathParam0 ) 6710if operationPath [0 ]== '/' { 6711operationPath = "." + operationPath 6712 } 6713 6714queryURL ,err := serverURL .Parse (operationPath ) 6715if err != nil { 6716return nil ,err 6717 } 6718 6719req ,err := http .NewRequest (http .MethodDelete ,queryURL .String (),nil ) 6720if err != nil { 6721return nil ,err 6722 } 6723 6724if params != nil { 6725 6726var headerParam0 string 6727 6728headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 6729if err != nil { 6730return nil ,err 6731 } 6732 6733req .Header .Set ("If-Match" ,headerParam0 ) 6734 6735 } 6736 6737return req ,nil 6738} 6739 6740// NewGetPaperclipsRequest constructs an http.Request for the GetPaperclips method 6741func NewGetPaperclipsRequest (server string ,itemID ID ) (* http.Request ,error ) { 6742var err error 6743 6744var pathParam0 string 6745 6746pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"item_id" ,itemID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6747if err != nil { 6748return nil ,err 6749 } 6750 6751serverURL ,err := url .Parse (server ) 6752if err != nil { 6753return nil ,err 6754 } 6755 6756operationPath := fmt .Sprintf ("/extensions/paperclips/items/%s" ,pathParam0 ) 6757if operationPath [0 ]== '/' { 6758operationPath = "." + operationPath 6759 } 6760 6761queryURL ,err := serverURL .Parse (operationPath ) 6762if err != nil { 6763return nil ,err 6764 } 6765 6766req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 6767if err != nil { 6768return nil ,err 6769 } 6770 6771return 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 ) { 6776var bodyReader io.Reader 6777buf ,err := json .Marshal (body ) 6778if err != nil { 6779return nil ,err 6780 } 6781bodyReader = bytes .NewReader (buf ) 6782return 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 ) { 6787var err error 6788 6789var pathParam0 string 6790 6791pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"item_id" ,itemID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6792if err != nil { 6793return nil ,err 6794 } 6795 6796serverURL ,err := url .Parse (server ) 6797if err != nil { 6798return nil ,err 6799 } 6800 6801operationPath := fmt .Sprintf ("/extensions/paperclips/items/%s" ,pathParam0 ) 6802if operationPath [0 ]== '/' { 6803operationPath = "." + operationPath 6804 } 6805 6806queryURL ,err := serverURL .Parse (operationPath ) 6807if err != nil { 6808return nil ,err 6809 } 6810 6811req ,err := http .NewRequest (http .MethodPatch ,queryURL .String (),body ) 6812if err != nil { 6813return nil ,err 6814 } 6815 6816req .Header .Add ("Content-Type" ,contentType ) 6817 6818if params != nil { 6819 6820var headerParam0 string 6821 6822headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 6823if err != nil { 6824return nil ,err 6825 } 6826 6827req .Header .Set ("If-Match" ,headerParam0 ) 6828 6829 } 6830 6831return req ,nil 6832} 6833 6834// NewCreateProxyCompletionRequest calls the generic CreateProxyCompletion builder with application/json body 6835func NewCreateProxyCompletionRequest (server string ,body CreateProxyCompletionJSONRequestBody ) (* http.Request ,error ) { 6836var bodyReader io.Reader 6837buf ,err := json .Marshal (body ) 6838if err != nil { 6839return nil ,err 6840 } 6841bodyReader = bytes .NewReader (buf ) 6842return 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 ) { 6847var err error 6848 6849serverURL ,err := url .Parse (server ) 6850if err != nil { 6851return nil ,err 6852 } 6853 6854operationPath := fmt .Sprintf ("/extensions/proxy/v1/chat/completions" ) 6855if operationPath [0 ]== '/' { 6856operationPath = "." + operationPath 6857 } 6858 6859queryURL ,err := serverURL .Parse (operationPath ) 6860if err != nil { 6861return nil ,err 6862 } 6863 6864req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 6865if err != nil { 6866return nil ,err 6867 } 6868 6869req .Header .Add ("Content-Type" ,contentType ) 6870 6871return req ,nil 6872} 6873 6874// NewListProxyModelsRequest constructs an http.Request for the ListProxyModels method 6875func NewListProxyModelsRequest (server string ) (* http.Request ,error ) { 6876var err error 6877 6878serverURL ,err := url .Parse (server ) 6879if err != nil { 6880return nil ,err 6881 } 6882 6883operationPath := fmt .Sprintf ("/extensions/proxy/v1/models" ) 6884if operationPath [0 ]== '/' { 6885operationPath = "." + operationPath 6886 } 6887 6888queryURL ,err := serverURL .Parse (operationPath ) 6889if err != nil { 6890return nil ,err 6891 } 6892 6893req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 6894if err != nil { 6895return nil ,err 6896 } 6897 6898return req ,nil 6899} 6900 6901// NewListJobsRequest constructs an http.Request for the ListJobs method 6902func NewListJobsRequest (server string ,sessionID ID ) (* http.Request ,error ) { 6903var err error 6904 6905var pathParam0 string 6906 6907pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6908if err != nil { 6909return nil ,err 6910 } 6911 6912serverURL ,err := url .Parse (server ) 6913if err != nil { 6914return nil ,err 6915 } 6916 6917operationPath := fmt .Sprintf ("/extensions/run/sessions/%s/jobs" ,pathParam0 ) 6918if operationPath [0 ]== '/' { 6919operationPath = "." + operationPath 6920 } 6921 6922queryURL ,err := serverURL .Parse (operationPath ) 6923if err != nil { 6924return nil ,err 6925 } 6926 6927req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 6928if err != nil { 6929return nil ,err 6930 } 6931 6932return 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 ) { 6937var bodyReader io.Reader 6938buf ,err := json .Marshal (body ) 6939if err != nil { 6940return nil ,err 6941 } 6942bodyReader = bytes .NewReader (buf ) 6943return 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 ) { 6948var err error 6949 6950var pathParam0 string 6951 6952pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6953if err != nil { 6954return nil ,err 6955 } 6956 6957var pathParam1 string 6958 6959pathParam1 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"job_id" ,jobID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 6960if err != nil { 6961return nil ,err 6962 } 6963 6964serverURL ,err := url .Parse (server ) 6965if err != nil { 6966return nil ,err 6967 } 6968 6969operationPath := fmt .Sprintf ("/extensions/run/sessions/%s/jobs/%s/stop" ,pathParam0 ,pathParam1 ) 6970if operationPath [0 ]== '/' { 6971operationPath = "." + operationPath 6972 } 6973 6974queryURL ,err := serverURL .Parse (operationPath ) 6975if err != nil { 6976return nil ,err 6977 } 6978 6979req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 6980if err != nil { 6981return nil ,err 6982 } 6983 6984req .Header .Add ("Content-Type" ,contentType ) 6985 6986return req ,nil 6987} 6988 6989// NewListScheduleRequest constructs an http.Request for the ListSchedule method 6990func NewListScheduleRequest (server string ,params * ListScheduleParams ) (* http.Request ,error ) { 6991var err error 6992 6993serverURL ,err := url .Parse (server ) 6994if err != nil { 6995return nil ,err 6996 } 6997 6998operationPath := fmt .Sprintf ("/extensions/schedule/jobs" ) 6999if operationPath [0 ]== '/' { 7000operationPath = "." + operationPath 7001 } 7002 7003queryURL ,err := serverURL .Parse (operationPath ) 7004if err != nil { 7005return nil ,err 7006 } 7007 7008if params != nil { 7009// queryValues collects non-styled parameters (passthrough, JSON) 7010// that are safe to round-trip through url.Values.Encode(). 7011queryValues := 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"). 7015var rawQueryFragments []string 7016 7017if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"session_id" ,params .SessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7018return nil ,err 7019 }else { 7020for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7021rawQueryFragments = append (rawQueryFragments ,qp ) 7022 } 7023 } 7024 7025if params .Limit != nil { 7026 7027if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 7028return nil ,err 7029 }else { 7030for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7031rawQueryFragments = append (rawQueryFragments ,qp ) 7032 } 7033 } 7034 7035 } 7036 7037if params .Next != nil { 7038 7039if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7040return nil ,err 7041 }else { 7042for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7043rawQueryFragments = append (rawQueryFragments ,qp ) 7044 } 7045 } 7046 7047 } 7048 7049if encoded := queryValues .Encode ();encoded != "" { 7050rawQueryFragments = append (rawQueryFragments ,encoded ) 7051 } 7052queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 7053 } 7054 7055req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 7056if err != nil { 7057return nil ,err 7058 } 7059 7060return req ,nil 7061} 7062 7063// NewCreateScheduleRequest calls the generic CreateSchedule builder with application/json body 7064func NewCreateScheduleRequest (server string ,body CreateScheduleJSONRequestBody ) (* http.Request ,error ) { 7065var bodyReader io.Reader 7066buf ,err := json .Marshal (body ) 7067if err != nil { 7068return nil ,err 7069 } 7070bodyReader = bytes .NewReader (buf ) 7071return 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 ) { 7076var err error 7077 7078serverURL ,err := url .Parse (server ) 7079if err != nil { 7080return nil ,err 7081 } 7082 7083operationPath := fmt .Sprintf ("/extensions/schedule/jobs" ) 7084if operationPath [0 ]== '/' { 7085operationPath = "." + operationPath 7086 } 7087 7088queryURL ,err := serverURL .Parse (operationPath ) 7089if err != nil { 7090return nil ,err 7091 } 7092 7093req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 7094if err != nil { 7095return nil ,err 7096 } 7097 7098req .Header .Add ("Content-Type" ,contentType ) 7099 7100return 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 ) { 7105var err error 7106 7107var pathParam0 string 7108 7109pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"job_id" ,jobID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7110if err != nil { 7111return nil ,err 7112 } 7113 7114serverURL ,err := url .Parse (server ) 7115if err != nil { 7116return nil ,err 7117 } 7118 7119operationPath := fmt .Sprintf ("/extensions/schedule/jobs/%s" ,pathParam0 ) 7120if operationPath [0 ]== '/' { 7121operationPath = "." + operationPath 7122 } 7123 7124queryURL ,err := serverURL .Parse (operationPath ) 7125if err != nil { 7126return nil ,err 7127 } 7128 7129req ,err := http .NewRequest (http .MethodDelete ,queryURL .String (),nil ) 7130if err != nil { 7131return nil ,err 7132 } 7133 7134if params != nil { 7135 7136var headerParam0 string 7137 7138headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 7139if err != nil { 7140return nil ,err 7141 } 7142 7143req .Header .Set ("If-Match" ,headerParam0 ) 7144 7145 } 7146 7147return req ,nil 7148} 7149 7150// NewGetScheduleRequest constructs an http.Request for the GetSchedule method 7151func NewGetScheduleRequest (server string ,jobID ID ) (* http.Request ,error ) { 7152var err error 7153 7154var pathParam0 string 7155 7156pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"job_id" ,jobID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7157if err != nil { 7158return nil ,err 7159 } 7160 7161serverURL ,err := url .Parse (server ) 7162if err != nil { 7163return nil ,err 7164 } 7165 7166operationPath := fmt .Sprintf ("/extensions/schedule/jobs/%s" ,pathParam0 ) 7167if operationPath [0 ]== '/' { 7168operationPath = "." + operationPath 7169 } 7170 7171queryURL ,err := serverURL .Parse (operationPath ) 7172if err != nil { 7173return nil ,err 7174 } 7175 7176req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 7177if err != nil { 7178return nil ,err 7179 } 7180 7181return 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 ) { 7186var bodyReader io.Reader 7187buf ,err := json .Marshal (body ) 7188if err != nil { 7189return nil ,err 7190 } 7191bodyReader = bytes .NewReader (buf ) 7192return 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 ) { 7197var err error 7198 7199var pathParam0 string 7200 7201pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"job_id" ,jobID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7202if err != nil { 7203return nil ,err 7204 } 7205 7206serverURL ,err := url .Parse (server ) 7207if err != nil { 7208return nil ,err 7209 } 7210 7211operationPath := fmt .Sprintf ("/extensions/schedule/jobs/%s" ,pathParam0 ) 7212if operationPath [0 ]== '/' { 7213operationPath = "." + operationPath 7214 } 7215 7216queryURL ,err := serverURL .Parse (operationPath ) 7217if err != nil { 7218return nil ,err 7219 } 7220 7221req ,err := http .NewRequest (http .MethodPatch ,queryURL .String (),body ) 7222if err != nil { 7223return nil ,err 7224 } 7225 7226req .Header .Add ("Content-Type" ,contentType ) 7227 7228if params != nil { 7229 7230var headerParam0 string 7231 7232headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 7233if err != nil { 7234return nil ,err 7235 } 7236 7237req .Header .Set ("If-Match" ,headerParam0 ) 7238 7239 } 7240 7241return req ,nil 7242} 7243 7244// NewListWebSearchProvidersRequest constructs an http.Request for the ListWebSearchProviders method 7245func NewListWebSearchProvidersRequest (server string ) (* http.Request ,error ) { 7246var err error 7247 7248serverURL ,err := url .Parse (server ) 7249if err != nil { 7250return nil ,err 7251 } 7252 7253operationPath := fmt .Sprintf ("/extensions/web-search/providers" ) 7254if operationPath [0 ]== '/' { 7255operationPath = "." + operationPath 7256 } 7257 7258queryURL ,err := serverURL .Parse (operationPath ) 7259if err != nil { 7260return nil ,err 7261 } 7262 7263req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 7264if err != nil { 7265return nil ,err 7266 } 7267 7268return 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 ) { 7273var bodyReader io.Reader 7274buf ,err := json .Marshal (body ) 7275if err != nil { 7276return nil ,err 7277 } 7278bodyReader = bytes .NewReader (buf ) 7279return 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 ) { 7284var err error 7285 7286var pathParam0 string 7287 7288pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"name" ,name , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7289if err != nil { 7290return nil ,err 7291 } 7292 7293serverURL ,err := url .Parse (server ) 7294if err != nil { 7295return nil ,err 7296 } 7297 7298operationPath := fmt .Sprintf ("/extensions/web-search/providers/%s" ,pathParam0 ) 7299if operationPath [0 ]== '/' { 7300operationPath = "." + operationPath 7301 } 7302 7303queryURL ,err := serverURL .Parse (operationPath ) 7304if err != nil { 7305return nil ,err 7306 } 7307 7308req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 7309if err != nil { 7310return nil ,err 7311 } 7312 7313req .Header .Add ("Content-Type" ,contentType ) 7314 7315return req ,nil 7316} 7317 7318// NewGetDeliveryRequest constructs an http.Request for the GetDelivery method 7319func NewGetDeliveryRequest (server string ,deliveryID ID ) (* http.Request ,error ) { 7320var err error 7321 7322var pathParam0 string 7323 7324pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"delivery_id" ,deliveryID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7325if err != nil { 7326return nil ,err 7327 } 7328 7329serverURL ,err := url .Parse (server ) 7330if err != nil { 7331return nil ,err 7332 } 7333 7334operationPath := fmt .Sprintf ("/extensions/webhooks/deliveries/%s" ,pathParam0 ) 7335if operationPath [0 ]== '/' { 7336operationPath = "." + operationPath 7337 } 7338 7339queryURL ,err := serverURL .Parse (operationPath ) 7340if err != nil { 7341return nil ,err 7342 } 7343 7344req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 7345if err != nil { 7346return nil ,err 7347 } 7348 7349return req ,nil 7350} 7351 7352// NewListHooksRequest constructs an http.Request for the ListHooks method 7353func NewListHooksRequest (server string ,params * ListHooksParams ) (* http.Request ,error ) { 7354var err error 7355 7356serverURL ,err := url .Parse (server ) 7357if err != nil { 7358return nil ,err 7359 } 7360 7361operationPath := fmt .Sprintf ("/extensions/webhooks/hooks" ) 7362if operationPath [0 ]== '/' { 7363operationPath = "." + operationPath 7364 } 7365 7366queryURL ,err := serverURL .Parse (operationPath ) 7367if err != nil { 7368return nil ,err 7369 } 7370 7371if params != nil { 7372// queryValues collects non-styled parameters (passthrough, JSON) 7373// that are safe to round-trip through url.Values.Encode(). 7374queryValues := 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"). 7378var rawQueryFragments []string 7379 7380if params .SessionID != nil { 7381 7382if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"session_id" ,* params .SessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7383return nil ,err 7384 }else { 7385for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7386rawQueryFragments = append (rawQueryFragments ,qp ) 7387 } 7388 } 7389 7390 } 7391 7392if params .Limit != nil { 7393 7394if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 7395return nil ,err 7396 }else { 7397for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7398rawQueryFragments = append (rawQueryFragments ,qp ) 7399 } 7400 } 7401 7402 } 7403 7404if params .Next != nil { 7405 7406if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7407return nil ,err 7408 }else { 7409for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7410rawQueryFragments = append (rawQueryFragments ,qp ) 7411 } 7412 } 7413 7414 } 7415 7416if encoded := queryValues .Encode ();encoded != "" { 7417rawQueryFragments = append (rawQueryFragments ,encoded ) 7418 } 7419queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 7420 } 7421 7422req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 7423if err != nil { 7424return nil ,err 7425 } 7426 7427return req ,nil 7428} 7429 7430// NewCreateHookRequest calls the generic CreateHook builder with application/json body 7431func NewCreateHookRequest (server string ,body CreateHookJSONRequestBody ) (* http.Request ,error ) { 7432var bodyReader io.Reader 7433buf ,err := json .Marshal (body ) 7434if err != nil { 7435return nil ,err 7436 } 7437bodyReader = bytes .NewReader (buf ) 7438return 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 ) { 7443var err error 7444 7445serverURL ,err := url .Parse (server ) 7446if err != nil { 7447return nil ,err 7448 } 7449 7450operationPath := fmt .Sprintf ("/extensions/webhooks/hooks" ) 7451if operationPath [0 ]== '/' { 7452operationPath = "." + operationPath 7453 } 7454 7455queryURL ,err := serverURL .Parse (operationPath ) 7456if err != nil { 7457return nil ,err 7458 } 7459 7460req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 7461if err != nil { 7462return nil ,err 7463 } 7464 7465req .Header .Add ("Content-Type" ,contentType ) 7466 7467return 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 ) { 7472var err error 7473 7474var pathParam0 string 7475 7476pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"hook_id" ,hookID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7477if err != nil { 7478return nil ,err 7479 } 7480 7481serverURL ,err := url .Parse (server ) 7482if err != nil { 7483return nil ,err 7484 } 7485 7486operationPath := fmt .Sprintf ("/extensions/webhooks/hooks/%s" ,pathParam0 ) 7487if operationPath [0 ]== '/' { 7488operationPath = "." + operationPath 7489 } 7490 7491queryURL ,err := serverURL .Parse (operationPath ) 7492if err != nil { 7493return nil ,err 7494 } 7495 7496if params != nil { 7497// queryValues collects non-styled parameters (passthrough, JSON) 7498// that are safe to round-trip through url.Values.Encode(). 7499queryValues := 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"). 7503var rawQueryFragments []string 7504 7505if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7506return nil ,err 7507 }else { 7508for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7509rawQueryFragments = append (rawQueryFragments ,qp ) 7510 } 7511 } 7512 7513if encoded := queryValues .Encode ();encoded != "" { 7514rawQueryFragments = append (rawQueryFragments ,encoded ) 7515 } 7516queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 7517 } 7518 7519req ,err := http .NewRequest (http .MethodDelete ,queryURL .String (),nil ) 7520if err != nil { 7521return nil ,err 7522 } 7523 7524if params != nil { 7525 7526var headerParam0 string 7527 7528headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 7529if err != nil { 7530return nil ,err 7531 } 7532 7533req .Header .Set ("If-Match" ,headerParam0 ) 7534 7535 } 7536 7537return 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 ) { 7542var err error 7543 7544var pathParam0 string 7545 7546pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"hook_id" ,hookID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7547if err != nil { 7548return nil ,err 7549 } 7550 7551serverURL ,err := url .Parse (server ) 7552if err != nil { 7553return nil ,err 7554 } 7555 7556operationPath := fmt .Sprintf ("/extensions/webhooks/hooks/%s" ,pathParam0 ) 7557if operationPath [0 ]== '/' { 7558operationPath = "." + operationPath 7559 } 7560 7561queryURL ,err := serverURL .Parse (operationPath ) 7562if err != nil { 7563return nil ,err 7564 } 7565 7566if params != nil { 7567// queryValues collects non-styled parameters (passthrough, JSON) 7568// that are safe to round-trip through url.Values.Encode(). 7569queryValues := 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"). 7573var rawQueryFragments []string 7574 7575if params .View != nil { 7576 7577if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,* params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7578return nil ,err 7579 }else { 7580for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7581rawQueryFragments = append (rawQueryFragments ,qp ) 7582 } 7583 } 7584 7585 } 7586 7587if encoded := queryValues .Encode ();encoded != "" { 7588rawQueryFragments = append (rawQueryFragments ,encoded ) 7589 } 7590queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 7591 } 7592 7593req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 7594if err != nil { 7595return nil ,err 7596 } 7597 7598return 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 ) { 7603var bodyReader io.Reader 7604buf ,err := json .Marshal (body ) 7605if err != nil { 7606return nil ,err 7607 } 7608bodyReader = bytes .NewReader (buf ) 7609return 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 ) { 7614var err error 7615 7616var pathParam0 string 7617 7618pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"hook_id" ,hookID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7619if err != nil { 7620return nil ,err 7621 } 7622 7623serverURL ,err := url .Parse (server ) 7624if err != nil { 7625return nil ,err 7626 } 7627 7628operationPath := fmt .Sprintf ("/extensions/webhooks/hooks/%s" ,pathParam0 ) 7629if operationPath [0 ]== '/' { 7630operationPath = "." + operationPath 7631 } 7632 7633queryURL ,err := serverURL .Parse (operationPath ) 7634if err != nil { 7635return nil ,err 7636 } 7637 7638if params != nil { 7639// queryValues collects non-styled parameters (passthrough, JSON) 7640// that are safe to round-trip through url.Values.Encode(). 7641queryValues := 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"). 7645var rawQueryFragments []string 7646 7647if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7648return nil ,err 7649 }else { 7650for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7651rawQueryFragments = append (rawQueryFragments ,qp ) 7652 } 7653 } 7654 7655if encoded := queryValues .Encode ();encoded != "" { 7656rawQueryFragments = append (rawQueryFragments ,encoded ) 7657 } 7658queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 7659 } 7660 7661req ,err := http .NewRequest (http .MethodPatch ,queryURL .String (),body ) 7662if err != nil { 7663return nil ,err 7664 } 7665 7666req .Header .Add ("Content-Type" ,contentType ) 7667 7668if params != nil { 7669 7670var headerParam0 string 7671 7672headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 7673if err != nil { 7674return nil ,err 7675 } 7676 7677req .Header .Set ("If-Match" ,headerParam0 ) 7678 7679 } 7680 7681return 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 ) { 7686var err error 7687 7688var pathParam0 string 7689 7690pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"hook_id" ,hookID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7691if err != nil { 7692return nil ,err 7693 } 7694 7695serverURL ,err := url .Parse (server ) 7696if err != nil { 7697return nil ,err 7698 } 7699 7700operationPath := fmt .Sprintf ("/extensions/webhooks/hooks/%s/deliveries" ,pathParam0 ) 7701if operationPath [0 ]== '/' { 7702operationPath = "." + operationPath 7703 } 7704 7705queryURL ,err := serverURL .Parse (operationPath ) 7706if err != nil { 7707return nil ,err 7708 } 7709 7710if params != nil { 7711// queryValues collects non-styled parameters (passthrough, JSON) 7712// that are safe to round-trip through url.Values.Encode(). 7713queryValues := 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"). 7717var rawQueryFragments []string 7718 7719if params .State != nil { 7720 7721if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"state" ,* params .State , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7722return nil ,err 7723 }else { 7724for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7725rawQueryFragments = append (rawQueryFragments ,qp ) 7726 } 7727 } 7728 7729 } 7730 7731if params .Limit != nil { 7732 7733if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 7734return nil ,err 7735 }else { 7736for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7737rawQueryFragments = append (rawQueryFragments ,qp ) 7738 } 7739 } 7740 7741 } 7742 7743if params .Next != nil { 7744 7745if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 7746return nil ,err 7747 }else { 7748for _ ,qp := range strings .Split (queryFrag ,"&" ) { 7749rawQueryFragments = append (rawQueryFragments ,qp ) 7750 } 7751 } 7752 7753 } 7754 7755if encoded := queryValues .Encode ();encoded != "" { 7756rawQueryFragments = append (rawQueryFragments ,encoded ) 7757 } 7758queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 7759 } 7760 7761req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 7762if err != nil { 7763return nil ,err 7764 } 7765 7766return 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 ) { 7771var err error 7772 7773var pathParam0 string 7774 7775pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"hook_id" ,hookID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7776if err != nil { 7777return nil ,err 7778 } 7779 7780serverURL ,err := url .Parse (server ) 7781if err != nil { 7782return nil ,err 7783 } 7784 7785operationPath := fmt .Sprintf ("/extensions/webhooks/hooks/%s/deliveries" ,pathParam0 ) 7786if operationPath [0 ]== '/' { 7787operationPath = "." + operationPath 7788 } 7789 7790queryURL ,err := serverURL .Parse (operationPath ) 7791if err != nil { 7792return nil ,err 7793 } 7794 7795req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 7796if err != nil { 7797return nil ,err 7798 } 7799 7800req .Header .Add ("Content-Type" ,contentType ) 7801 7802if params != nil { 7803 7804if params .XAlbedoEventID != nil { 7805var headerParam0 string 7806 7807headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"X-Albedo-Event-Id" ,* params .XAlbedoEventID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 7808if err != nil { 7809return nil ,err 7810 } 7811 7812req .Header .Set ("X-Albedo-Event-Id" ,headerParam0 ) 7813 } 7814 7815 } 7816 7817return 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 ) { 7822var bodyReader io.Reader 7823buf ,err := json .Marshal (body ) 7824if err != nil { 7825return nil ,err 7826 } 7827bodyReader = bytes .NewReader (buf ) 7828return 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 ) { 7833var err error 7834 7835var pathParam0 string 7836 7837pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"hook_id" ,hookID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7838if err != nil { 7839return nil ,err 7840 } 7841 7842serverURL ,err := url .Parse (server ) 7843if err != nil { 7844return nil ,err 7845 } 7846 7847operationPath := fmt .Sprintf ("/extensions/webhooks/hooks/%s/secret" ,pathParam0 ) 7848if operationPath [0 ]== '/' { 7849operationPath = "." + operationPath 7850 } 7851 7852queryURL ,err := serverURL .Parse (operationPath ) 7853if err != nil { 7854return nil ,err 7855 } 7856 7857req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 7858if err != nil { 7859return nil ,err 7860 } 7861 7862req .Header .Add ("Content-Type" ,contentType ) 7863 7864if params != nil { 7865 7866var headerParam0 string 7867 7868headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 7869if err != nil { 7870return nil ,err 7871 } 7872 7873req .Header .Set ("If-Match" ,headerParam0 ) 7874 7875 } 7876 7877return req ,nil 7878} 7879 7880// NewGetHookPermissionRequest constructs an http.Request for the GetHookPermission method 7881func NewGetHookPermissionRequest (server string ,sessionID ID ) (* http.Request ,error ) { 7882var err error 7883 7884var pathParam0 string 7885 7886pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7887if err != nil { 7888return nil ,err 7889 } 7890 7891serverURL ,err := url .Parse (server ) 7892if err != nil { 7893return nil ,err 7894 } 7895 7896operationPath := fmt .Sprintf ("/extensions/webhooks/permissions/%s" ,pathParam0 ) 7897if operationPath [0 ]== '/' { 7898operationPath = "." + operationPath 7899 } 7900 7901queryURL ,err := serverURL .Parse (operationPath ) 7902if err != nil { 7903return nil ,err 7904 } 7905 7906req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 7907if err != nil { 7908return nil ,err 7909 } 7910 7911return 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 ) { 7916var bodyReader io.Reader 7917buf ,err := json .Marshal (body ) 7918if err != nil { 7919return nil ,err 7920 } 7921bodyReader = bytes .NewReader (buf ) 7922return 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 ) { 7927var err error 7928 7929var pathParam0 string 7930 7931pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 7932if err != nil { 7933return nil ,err 7934 } 7935 7936serverURL ,err := url .Parse (server ) 7937if err != nil { 7938return nil ,err 7939 } 7940 7941operationPath := fmt .Sprintf ("/extensions/webhooks/permissions/%s" ,pathParam0 ) 7942if operationPath [0 ]== '/' { 7943operationPath = "." + operationPath 7944 } 7945 7946queryURL ,err := serverURL .Parse (operationPath ) 7947if err != nil { 7948return nil ,err 7949 } 7950 7951req ,err := http .NewRequest (http .MethodPatch ,queryURL .String (),body ) 7952if err != nil { 7953return nil ,err 7954 } 7955 7956req .Header .Add ("Content-Type" ,contentType ) 7957 7958if params != nil { 7959 7960var headerParam0 string 7961 7962headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 7963if err != nil { 7964return nil ,err 7965 } 7966 7967req .Header .Set ("If-Match" ,headerParam0 ) 7968 7969 } 7970 7971return req ,nil 7972} 7973 7974// NewListWorkRequest constructs an http.Request for the ListWork method 7975func NewListWorkRequest (server string ,params * ListWorkParams ) (* http.Request ,error ) { 7976var err error 7977 7978serverURL ,err := url .Parse (server ) 7979if err != nil { 7980return nil ,err 7981 } 7982 7983operationPath := fmt .Sprintf ("/extensions/work/items" ) 7984if operationPath [0 ]== '/' { 7985operationPath = "." + operationPath 7986 } 7987 7988queryURL ,err := serverURL .Parse (operationPath ) 7989if err != nil { 7990return nil ,err 7991 } 7992 7993if params != nil { 7994// queryValues collects non-styled parameters (passthrough, JSON) 7995// that are safe to round-trip through url.Values.Encode(). 7996queryValues := 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"). 8000var rawQueryFragments []string 8001 8002if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8003return nil ,err 8004 }else { 8005for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8006rawQueryFragments = append (rawQueryFragments ,qp ) 8007 } 8008 } 8009 8010if params .Limit != nil { 8011 8012if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 8013return nil ,err 8014 }else { 8015for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8016rawQueryFragments = append (rawQueryFragments ,qp ) 8017 } 8018 } 8019 8020 } 8021 8022if params .Next != nil { 8023 8024if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8025return nil ,err 8026 }else { 8027for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8028rawQueryFragments = append (rawQueryFragments ,qp ) 8029 } 8030 } 8031 8032 } 8033 8034if encoded := queryValues .Encode ();encoded != "" { 8035rawQueryFragments = append (rawQueryFragments ,encoded ) 8036 } 8037queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8038 } 8039 8040req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 8041if err != nil { 8042return nil ,err 8043 } 8044 8045return 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 ) { 8050var bodyReader io.Reader 8051buf ,err := json .Marshal (body ) 8052if err != nil { 8053return nil ,err 8054 } 8055bodyReader = bytes .NewReader (buf ) 8056return 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 ) { 8061var err error 8062 8063serverURL ,err := url .Parse (server ) 8064if err != nil { 8065return nil ,err 8066 } 8067 8068operationPath := fmt .Sprintf ("/extensions/work/items" ) 8069if operationPath [0 ]== '/' { 8070operationPath = "." + operationPath 8071 } 8072 8073queryURL ,err := serverURL .Parse (operationPath ) 8074if err != nil { 8075return nil ,err 8076 } 8077 8078if params != nil { 8079// queryValues collects non-styled parameters (passthrough, JSON) 8080// that are safe to round-trip through url.Values.Encode(). 8081queryValues := 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"). 8085var rawQueryFragments []string 8086 8087if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8088return nil ,err 8089 }else { 8090for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8091rawQueryFragments = append (rawQueryFragments ,qp ) 8092 } 8093 } 8094 8095if encoded := queryValues .Encode ();encoded != "" { 8096rawQueryFragments = append (rawQueryFragments ,encoded ) 8097 } 8098queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8099 } 8100 8101req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 8102if err != nil { 8103return nil ,err 8104 } 8105 8106req .Header .Add ("Content-Type" ,contentType ) 8107 8108return 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 ) { 8113var err error 8114 8115var pathParam0 string 8116 8117pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"item_id" ,itemID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 8118if err != nil { 8119return nil ,err 8120 } 8121 8122serverURL ,err := url .Parse (server ) 8123if err != nil { 8124return nil ,err 8125 } 8126 8127operationPath := fmt .Sprintf ("/extensions/work/items/%s" ,pathParam0 ) 8128if operationPath [0 ]== '/' { 8129operationPath = "." + operationPath 8130 } 8131 8132queryURL ,err := serverURL .Parse (operationPath ) 8133if err != nil { 8134return nil ,err 8135 } 8136 8137if params != nil { 8138// queryValues collects non-styled parameters (passthrough, JSON) 8139// that are safe to round-trip through url.Values.Encode(). 8140queryValues := 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"). 8144var rawQueryFragments []string 8145 8146if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8147return nil ,err 8148 }else { 8149for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8150rawQueryFragments = append (rawQueryFragments ,qp ) 8151 } 8152 } 8153 8154if params .NotifySessionID != nil { 8155 8156if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"notify_session_id" ,* params .NotifySessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8157return nil ,err 8158 }else { 8159for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8160rawQueryFragments = append (rawQueryFragments ,qp ) 8161 } 8162 } 8163 8164 } 8165 8166if encoded := queryValues .Encode ();encoded != "" { 8167rawQueryFragments = append (rawQueryFragments ,encoded ) 8168 } 8169queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8170 } 8171 8172req ,err := http .NewRequest (http .MethodDelete ,queryURL .String (),nil ) 8173if err != nil { 8174return nil ,err 8175 } 8176 8177if params != nil { 8178 8179var headerParam0 string 8180 8181headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 8182if err != nil { 8183return nil ,err 8184 } 8185 8186req .Header .Set ("If-Match" ,headerParam0 ) 8187 8188 } 8189 8190return 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 ) { 8195var err error 8196 8197var pathParam0 string 8198 8199pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"item_id" ,itemID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 8200if err != nil { 8201return nil ,err 8202 } 8203 8204serverURL ,err := url .Parse (server ) 8205if err != nil { 8206return nil ,err 8207 } 8208 8209operationPath := fmt .Sprintf ("/extensions/work/items/%s" ,pathParam0 ) 8210if operationPath [0 ]== '/' { 8211operationPath = "." + operationPath 8212 } 8213 8214queryURL ,err := serverURL .Parse (operationPath ) 8215if err != nil { 8216return nil ,err 8217 } 8218 8219if params != nil { 8220// queryValues collects non-styled parameters (passthrough, JSON) 8221// that are safe to round-trip through url.Values.Encode(). 8222queryValues := 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"). 8226var rawQueryFragments []string 8227 8228if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8229return nil ,err 8230 }else { 8231for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8232rawQueryFragments = append (rawQueryFragments ,qp ) 8233 } 8234 } 8235 8236if encoded := queryValues .Encode ();encoded != "" { 8237rawQueryFragments = append (rawQueryFragments ,encoded ) 8238 } 8239queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8240 } 8241 8242req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 8243if err != nil { 8244return nil ,err 8245 } 8246 8247return 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 ) { 8252var bodyReader io.Reader 8253buf ,err := json .Marshal (body ) 8254if err != nil { 8255return nil ,err 8256 } 8257bodyReader = bytes .NewReader (buf ) 8258return 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 ) { 8263var err error 8264 8265var pathParam0 string 8266 8267pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"item_id" ,itemID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 8268if err != nil { 8269return nil ,err 8270 } 8271 8272serverURL ,err := url .Parse (server ) 8273if err != nil { 8274return nil ,err 8275 } 8276 8277operationPath := fmt .Sprintf ("/extensions/work/items/%s" ,pathParam0 ) 8278if operationPath [0 ]== '/' { 8279operationPath = "." + operationPath 8280 } 8281 8282queryURL ,err := serverURL .Parse (operationPath ) 8283if err != nil { 8284return nil ,err 8285 } 8286 8287if params != nil { 8288// queryValues collects non-styled parameters (passthrough, JSON) 8289// that are safe to round-trip through url.Values.Encode(). 8290queryValues := 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"). 8294var rawQueryFragments []string 8295 8296if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8297return nil ,err 8298 }else { 8299for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8300rawQueryFragments = append (rawQueryFragments ,qp ) 8301 } 8302 } 8303 8304if encoded := queryValues .Encode ();encoded != "" { 8305rawQueryFragments = append (rawQueryFragments ,encoded ) 8306 } 8307queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8308 } 8309 8310req ,err := http .NewRequest (http .MethodPatch ,queryURL .String (),body ) 8311if err != nil { 8312return nil ,err 8313 } 8314 8315req .Header .Add ("Content-Type" ,contentType ) 8316 8317if params != nil { 8318 8319var headerParam0 string 8320 8321headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 8322if err != nil { 8323return nil ,err 8324 } 8325 8326req .Header .Set ("If-Match" ,headerParam0 ) 8327 8328 } 8329 8330return req ,nil 8331} 8332 8333// NewListHostsRequest constructs an http.Request for the ListHosts method 8334func NewListHostsRequest (server string ,params * ListHostsParams ) (* http.Request ,error ) { 8335var err error 8336 8337serverURL ,err := url .Parse (server ) 8338if err != nil { 8339return nil ,err 8340 } 8341 8342operationPath := fmt .Sprintf ("/hosts" ) 8343if operationPath [0 ]== '/' { 8344operationPath = "." + operationPath 8345 } 8346 8347queryURL ,err := serverURL .Parse (operationPath ) 8348if err != nil { 8349return nil ,err 8350 } 8351 8352if params != nil { 8353// queryValues collects non-styled parameters (passthrough, JSON) 8354// that are safe to round-trip through url.Values.Encode(). 8355queryValues := 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"). 8359var rawQueryFragments []string 8360 8361if params .Target != nil { 8362 8363if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"target" ,* params .Target , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8364return nil ,err 8365 }else { 8366for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8367rawQueryFragments = append (rawQueryFragments ,qp ) 8368 } 8369 } 8370 8371 } 8372 8373if params .Limit != nil { 8374 8375if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 8376return nil ,err 8377 }else { 8378for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8379rawQueryFragments = append (rawQueryFragments ,qp ) 8380 } 8381 } 8382 8383 } 8384 8385if params .Next != nil { 8386 8387if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8388return nil ,err 8389 }else { 8390for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8391rawQueryFragments = append (rawQueryFragments ,qp ) 8392 } 8393 } 8394 8395 } 8396 8397if encoded := queryValues .Encode ();encoded != "" { 8398rawQueryFragments = append (rawQueryFragments ,encoded ) 8399 } 8400queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8401 } 8402 8403req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 8404if err != nil { 8405return nil ,err 8406 } 8407 8408return 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 ) { 8413var bodyReader io.Reader 8414buf ,err := json .Marshal (body ) 8415if err != nil { 8416return nil ,err 8417 } 8418bodyReader = bytes .NewReader (buf ) 8419return 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 ) { 8424var err error 8425 8426var pathParam0 string 8427 8428pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"host" ,host , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 8429if err != nil { 8430return nil ,err 8431 } 8432 8433serverURL ,err := url .Parse (server ) 8434if err != nil { 8435return nil ,err 8436 } 8437 8438operationPath := fmt .Sprintf ("/hosts/%s/probe" ,pathParam0 ) 8439if operationPath [0 ]== '/' { 8440operationPath = "." + operationPath 8441 } 8442 8443queryURL ,err := serverURL .Parse (operationPath ) 8444if err != nil { 8445return nil ,err 8446 } 8447 8448req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 8449if err != nil { 8450return nil ,err 8451 } 8452 8453req .Header .Add ("Content-Type" ,contentType ) 8454 8455return req ,nil 8456} 8457 8458// NewListModelsRequest constructs an http.Request for the ListModels method 8459func NewListModelsRequest (server string ,params * ListModelsParams ) (* http.Request ,error ) { 8460var err error 8461 8462serverURL ,err := url .Parse (server ) 8463if err != nil { 8464return nil ,err 8465 } 8466 8467operationPath := fmt .Sprintf ("/models" ) 8468if operationPath [0 ]== '/' { 8469operationPath = "." + operationPath 8470 } 8471 8472queryURL ,err := serverURL .Parse (operationPath ) 8473if err != nil { 8474return nil ,err 8475 } 8476 8477if params != nil { 8478// queryValues collects non-styled parameters (passthrough, JSON) 8479// that are safe to round-trip through url.Values.Encode(). 8480queryValues := 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"). 8484var rawQueryFragments []string 8485 8486if params .View != nil { 8487 8488if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,* params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8489return nil ,err 8490 }else { 8491for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8492rawQueryFragments = append (rawQueryFragments ,qp ) 8493 } 8494 } 8495 8496 } 8497 8498if params .Extension != nil { 8499 8500if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"extension" ,* params .Extension , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8501return nil ,err 8502 }else { 8503for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8504rawQueryFragments = append (rawQueryFragments ,qp ) 8505 } 8506 } 8507 8508 } 8509 8510if params .Host != nil { 8511 8512if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"host" ,* params .Host , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8513return nil ,err 8514 }else { 8515for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8516rawQueryFragments = append (rawQueryFragments ,qp ) 8517 } 8518 } 8519 8520 } 8521 8522if params .Model != nil { 8523 8524if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"model" ,* params .Model , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8525return nil ,err 8526 }else { 8527for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8528rawQueryFragments = append (rawQueryFragments ,qp ) 8529 } 8530 } 8531 8532 } 8533 8534if params .ProviderProfile != nil { 8535 8536if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"provider_profile" ,* params .ProviderProfile , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8537return nil ,err 8538 }else { 8539for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8540rawQueryFragments = append (rawQueryFragments ,qp ) 8541 } 8542 } 8543 8544 } 8545 8546if params .Provider != nil { 8547 8548if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"provider" ,* params .Provider , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8549return nil ,err 8550 }else { 8551for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8552rawQueryFragments = append (rawQueryFragments ,qp ) 8553 } 8554 } 8555 8556 } 8557 8558if params .Endpoint != nil { 8559 8560if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"endpoint" ,* params .Endpoint , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"uri" });err != nil { 8561return nil ,err 8562 }else { 8563for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8564rawQueryFragments = append (rawQueryFragments ,qp ) 8565 } 8566 } 8567 8568 } 8569 8570if params .Limit != nil { 8571 8572if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 8573return nil ,err 8574 }else { 8575for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8576rawQueryFragments = append (rawQueryFragments ,qp ) 8577 } 8578 } 8579 8580 } 8581 8582if params .Next != nil { 8583 8584if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8585return nil ,err 8586 }else { 8587for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8588rawQueryFragments = append (rawQueryFragments ,qp ) 8589 } 8590 } 8591 8592 } 8593 8594if encoded := queryValues .Encode ();encoded != "" { 8595rawQueryFragments = append (rawQueryFragments ,encoded ) 8596 } 8597queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8598 } 8599 8600req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 8601if err != nil { 8602return nil ,err 8603 } 8604 8605return req ,nil 8606} 8607 8608// NewGetServerRequest constructs an http.Request for the GetServer method 8609func NewGetServerRequest (server string ,params * GetServerParams ) (* http.Request ,error ) { 8610var err error 8611 8612serverURL ,err := url .Parse (server ) 8613if err != nil { 8614return nil ,err 8615 } 8616 8617operationPath := fmt .Sprintf ("/server" ) 8618if operationPath [0 ]== '/' { 8619operationPath = "." + operationPath 8620 } 8621 8622queryURL ,err := serverURL .Parse (operationPath ) 8623if err != nil { 8624return nil ,err 8625 } 8626 8627if params != nil { 8628// queryValues collects non-styled parameters (passthrough, JSON) 8629// that are safe to round-trip through url.Values.Encode(). 8630queryValues := 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"). 8634var rawQueryFragments []string 8635 8636if params .Include != nil { 8637 8638if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"include" ,* params .Include , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8639return nil ,err 8640 }else { 8641for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8642rawQueryFragments = append (rawQueryFragments ,qp ) 8643 } 8644 } 8645 8646 } 8647 8648if params .Limit != nil { 8649 8650if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 8651return nil ,err 8652 }else { 8653for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8654rawQueryFragments = append (rawQueryFragments ,qp ) 8655 } 8656 } 8657 8658 } 8659 8660if params .Next != nil { 8661 8662if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8663return nil ,err 8664 }else { 8665for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8666rawQueryFragments = append (rawQueryFragments ,qp ) 8667 } 8668 } 8669 8670 } 8671 8672if params .QuotaProvider != nil { 8673 8674if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"quota_provider" ,* params .QuotaProvider , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8675return nil ,err 8676 }else { 8677for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8678rawQueryFragments = append (rawQueryFragments ,qp ) 8679 } 8680 } 8681 8682 } 8683 8684if params .QuotaAccount != nil { 8685 8686if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"quota_account" ,* params .QuotaAccount , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8687return nil ,err 8688 }else { 8689for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8690rawQueryFragments = append (rawQueryFragments ,qp ) 8691 } 8692 } 8693 8694 } 8695 8696if params .QuotaLimit != nil { 8697 8698if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"quota_limit" ,* params .QuotaLimit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8699return nil ,err 8700 }else { 8701for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8702rawQueryFragments = append (rawQueryFragments ,qp ) 8703 } 8704 } 8705 8706 } 8707 8708if params .QuotaSince != nil { 8709 8710if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"quota_since" ,* params .QuotaSince , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"date-time" });err != nil { 8711return nil ,err 8712 }else { 8713for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8714rawQueryFragments = append (rawQueryFragments ,qp ) 8715 } 8716 } 8717 8718 } 8719 8720if encoded := queryValues .Encode ();encoded != "" { 8721rawQueryFragments = append (rawQueryFragments ,encoded ) 8722 } 8723queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8724 } 8725 8726req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 8727if err != nil { 8728return nil ,err 8729 } 8730 8731return req ,nil 8732} 8733 8734// NewShutdownServerRequest calls the generic ShutdownServer builder with application/json body 8735func NewShutdownServerRequest (server string ,body ShutdownServerJSONRequestBody ) (* http.Request ,error ) { 8736var bodyReader io.Reader 8737buf ,err := json .Marshal (body ) 8738if err != nil { 8739return nil ,err 8740 } 8741bodyReader = bytes .NewReader (buf ) 8742return 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 ) { 8747var err error 8748 8749serverURL ,err := url .Parse (server ) 8750if err != nil { 8751return nil ,err 8752 } 8753 8754operationPath := fmt .Sprintf ("/server/shutdown" ) 8755if operationPath [0 ]== '/' { 8756operationPath = "." + operationPath 8757 } 8758 8759queryURL ,err := serverURL .Parse (operationPath ) 8760if err != nil { 8761return nil ,err 8762 } 8763 8764req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 8765if err != nil { 8766return nil ,err 8767 } 8768 8769req .Header .Add ("Content-Type" ,contentType ) 8770 8771return req ,nil 8772} 8773 8774// NewListSessionsRequest constructs an http.Request for the ListSessions method 8775func NewListSessionsRequest (server string ,params * ListSessionsParams ) (* http.Request ,error ) { 8776var err error 8777 8778serverURL ,err := url .Parse (server ) 8779if err != nil { 8780return nil ,err 8781 } 8782 8783operationPath := fmt .Sprintf ("/sessions" ) 8784if operationPath [0 ]== '/' { 8785operationPath = "." + operationPath 8786 } 8787 8788queryURL ,err := serverURL .Parse (operationPath ) 8789if err != nil { 8790return nil ,err 8791 } 8792 8793if params != nil { 8794// queryValues collects non-styled parameters (passthrough, JSON) 8795// that are safe to round-trip through url.Values.Encode(). 8796queryValues := 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"). 8800var rawQueryFragments []string 8801 8802if params .Scope != nil { 8803 8804if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"scope" ,* params .Scope , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8805return nil ,err 8806 }else { 8807for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8808rawQueryFragments = append (rawQueryFragments ,qp ) 8809 } 8810 } 8811 8812 } 8813 8814if params .ParentID != nil { 8815 8816if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"parent_id" ,* params .ParentID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8817return nil ,err 8818 }else { 8819for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8820rawQueryFragments = append (rawQueryFragments ,qp ) 8821 } 8822 } 8823 8824 } 8825 8826if params .FamilyID != nil { 8827 8828if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"family_id" ,* params .FamilyID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8829return nil ,err 8830 }else { 8831for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8832rawQueryFragments = append (rawQueryFragments ,qp ) 8833 } 8834 } 8835 8836 } 8837 8838if params .Workspace != nil { 8839 8840if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"workspace" ,* params .Workspace , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8841return nil ,err 8842 }else { 8843for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8844rawQueryFragments = append (rawQueryFragments ,qp ) 8845 } 8846 } 8847 8848 } 8849 8850if params .Search != nil { 8851 8852if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"search" ,* params .Search , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8853return nil ,err 8854 }else { 8855for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8856rawQueryFragments = append (rawQueryFragments ,qp ) 8857 } 8858 } 8859 8860 } 8861 8862if params .Archived != nil { 8863 8864if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"archived" ,* params .Archived , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"boolean" ,Format :"" });err != nil { 8865return nil ,err 8866 }else { 8867for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8868rawQueryFragments = append (rawQueryFragments ,qp ) 8869 } 8870 } 8871 8872 } 8873 8874if params .NeedsReload != nil { 8875 8876if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"needs_reload" ,* params .NeedsReload , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"boolean" ,Format :"" });err != nil { 8877return nil ,err 8878 }else { 8879for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8880rawQueryFragments = append (rawQueryFragments ,qp ) 8881 } 8882 } 8883 8884 } 8885 8886if params .Sort != nil { 8887 8888if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"sort" ,* params .Sort , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8889return nil ,err 8890 }else { 8891for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8892rawQueryFragments = append (rawQueryFragments ,qp ) 8893 } 8894 } 8895 8896 } 8897 8898if params .Limit != nil { 8899 8900if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 8901return nil ,err 8902 }else { 8903for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8904rawQueryFragments = append (rawQueryFragments ,qp ) 8905 } 8906 } 8907 8908 } 8909 8910if params .Next != nil { 8911 8912if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8913return nil ,err 8914 }else { 8915for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8916rawQueryFragments = append (rawQueryFragments ,qp ) 8917 } 8918 } 8919 8920 } 8921 8922if encoded := queryValues .Encode ();encoded != "" { 8923rawQueryFragments = append (rawQueryFragments ,encoded ) 8924 } 8925queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 8926 } 8927 8928req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 8929if err != nil { 8930return nil ,err 8931 } 8932 8933return 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 ) { 8938var err error 8939 8940var pathParam0 string 8941 8942pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 8943if err != nil { 8944return nil ,err 8945 } 8946 8947serverURL ,err := url .Parse (server ) 8948if err != nil { 8949return nil ,err 8950 } 8951 8952operationPath := fmt .Sprintf ("/sessions/%s" ,pathParam0 ) 8953if operationPath [0 ]== '/' { 8954operationPath = "." + operationPath 8955 } 8956 8957queryURL ,err := serverURL .Parse (operationPath ) 8958if err != nil { 8959return nil ,err 8960 } 8961 8962if params != nil { 8963// queryValues collects non-styled parameters (passthrough, JSON) 8964// that are safe to round-trip through url.Values.Encode(). 8965queryValues := 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"). 8969var rawQueryFragments []string 8970 8971if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8972return nil ,err 8973 }else { 8974for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8975rawQueryFragments = append (rawQueryFragments ,qp ) 8976 } 8977 } 8978 8979if params .Scope != nil { 8980 8981if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"scope" ,* params .Scope , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8982return nil ,err 8983 }else { 8984for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8985rawQueryFragments = append (rawQueryFragments ,qp ) 8986 } 8987 } 8988 8989 } 8990 8991if params .FamilyRevision != nil { 8992 8993if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"family_revision" ,* params .FamilyRevision , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 8994return nil ,err 8995 }else { 8996for _ ,qp := range strings .Split (queryFrag ,"&" ) { 8997rawQueryFragments = append (rawQueryFragments ,qp ) 8998 } 8999 } 9000 9001 } 9002 9003if encoded := queryValues .Encode ();encoded != "" { 9004rawQueryFragments = append (rawQueryFragments ,encoded ) 9005 } 9006queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 9007 } 9008 9009req ,err := http .NewRequest (http .MethodDelete ,queryURL .String (),nil ) 9010if err != nil { 9011return nil ,err 9012 } 9013 9014if params != nil { 9015 9016var headerParam0 string 9017 9018headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 9019if err != nil { 9020return nil ,err 9021 } 9022 9023req .Header .Set ("If-Match" ,headerParam0 ) 9024 9025 } 9026 9027return 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 ) { 9032var err error 9033 9034var pathParam0 string 9035 9036pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9037if err != nil { 9038return nil ,err 9039 } 9040 9041serverURL ,err := url .Parse (server ) 9042if err != nil { 9043return nil ,err 9044 } 9045 9046operationPath := fmt .Sprintf ("/sessions/%s" ,pathParam0 ) 9047if operationPath [0 ]== '/' { 9048operationPath = "." + operationPath 9049 } 9050 9051queryURL ,err := serverURL .Parse (operationPath ) 9052if err != nil { 9053return nil ,err 9054 } 9055 9056if params != nil { 9057// queryValues collects non-styled parameters (passthrough, JSON) 9058// that are safe to round-trip through url.Values.Encode(). 9059queryValues := 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"). 9063var rawQueryFragments []string 9064 9065if params .View != nil { 9066 9067if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,* params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9068return nil ,err 9069 }else { 9070for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9071rawQueryFragments = append (rawQueryFragments ,qp ) 9072 } 9073 } 9074 9075 } 9076 9077if params .Tail != nil { 9078 9079if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"tail" ,* params .Tail , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9080return nil ,err 9081 }else { 9082for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9083rawQueryFragments = append (rawQueryFragments ,qp ) 9084 } 9085 } 9086 9087 } 9088 9089if params .AfterGeneration != nil { 9090 9091if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"after_generation" ,* params .AfterGeneration , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9092return nil ,err 9093 }else { 9094for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9095rawQueryFragments = append (rawQueryFragments ,qp ) 9096 } 9097 } 9098 9099 } 9100 9101if params .AfterSeq != nil { 9102 9103if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"after_seq" ,* params .AfterSeq , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9104return nil ,err 9105 }else { 9106for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9107rawQueryFragments = append (rawQueryFragments ,qp ) 9108 } 9109 } 9110 9111 } 9112 9113if encoded := queryValues .Encode ();encoded != "" { 9114rawQueryFragments = append (rawQueryFragments ,encoded ) 9115 } 9116queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 9117 } 9118 9119req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 9120if err != nil { 9121return nil ,err 9122 } 9123 9124return 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 ) { 9129var bodyReader io.Reader 9130buf ,err := json .Marshal (body ) 9131if err != nil { 9132return nil ,err 9133 } 9134bodyReader = bytes .NewReader (buf ) 9135return 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 ) { 9140var err error 9141 9142var pathParam0 string 9143 9144pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9145if err != nil { 9146return nil ,err 9147 } 9148 9149serverURL ,err := url .Parse (server ) 9150if err != nil { 9151return nil ,err 9152 } 9153 9154operationPath := fmt .Sprintf ("/sessions/%s" ,pathParam0 ) 9155if operationPath [0 ]== '/' { 9156operationPath = "." + operationPath 9157 } 9158 9159queryURL ,err := serverURL .Parse (operationPath ) 9160if err != nil { 9161return nil ,err 9162 } 9163 9164if params != nil { 9165// queryValues collects non-styled parameters (passthrough, JSON) 9166// that are safe to round-trip through url.Values.Encode(). 9167queryValues := 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"). 9171var rawQueryFragments []string 9172 9173if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9174return nil ,err 9175 }else { 9176for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9177rawQueryFragments = append (rawQueryFragments ,qp ) 9178 } 9179 } 9180 9181if encoded := queryValues .Encode ();encoded != "" { 9182rawQueryFragments = append (rawQueryFragments ,encoded ) 9183 } 9184queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 9185 } 9186 9187req ,err := http .NewRequest (http .MethodPatch ,queryURL .String (),body ) 9188if err != nil { 9189return nil ,err 9190 } 9191 9192req .Header .Add ("Content-Type" ,contentType ) 9193 9194if params != nil { 9195 9196var headerParam0 string 9197 9198headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 9199if err != nil { 9200return nil ,err 9201 } 9202 9203req .Header .Set ("If-Match" ,headerParam0 ) 9204 9205 } 9206 9207return 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 ) { 9212var bodyReader io.Reader 9213buf ,err := json .Marshal (body ) 9214if err != nil { 9215return nil ,err 9216 } 9217bodyReader = bytes .NewReader (buf ) 9218return 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 ) { 9223var err error 9224 9225var pathParam0 string 9226 9227pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"uuid" }) 9228if err != nil { 9229return nil ,err 9230 } 9231 9232serverURL ,err := url .Parse (server ) 9233if err != nil { 9234return nil ,err 9235 } 9236 9237operationPath := fmt .Sprintf ("/sessions/%s" ,pathParam0 ) 9238if operationPath [0 ]== '/' { 9239operationPath = "." + operationPath 9240 } 9241 9242queryURL ,err := serverURL .Parse (operationPath ) 9243if err != nil { 9244return nil ,err 9245 } 9246 9247req ,err := http .NewRequest (http .MethodPut ,queryURL .String (),body ) 9248if err != nil { 9249return nil ,err 9250 } 9251 9252req .Header .Add ("Content-Type" ,contentType ) 9253 9254if params != nil { 9255 9256var headerParam0 string 9257 9258headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-None-Match" ,params .IfNoneMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 9259if err != nil { 9260return nil ,err 9261 } 9262 9263req .Header .Set ("If-None-Match" ,headerParam0 ) 9264 9265 } 9266 9267return 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 ) { 9272var err error 9273 9274var pathParam0 string 9275 9276pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9277if err != nil { 9278return nil ,err 9279 } 9280 9281var pathParam1 string 9282 9283pathParam1 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"content_id" ,contentID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9284if err != nil { 9285return nil ,err 9286 } 9287 9288serverURL ,err := url .Parse (server ) 9289if err != nil { 9290return nil ,err 9291 } 9292 9293operationPath := fmt .Sprintf ("/sessions/%s/active-output/%s" ,pathParam0 ,pathParam1 ) 9294if operationPath [0 ]== '/' { 9295operationPath = "." + operationPath 9296 } 9297 9298queryURL ,err := serverURL .Parse (operationPath ) 9299if err != nil { 9300return nil ,err 9301 } 9302 9303if params != nil { 9304// queryValues collects non-styled parameters (passthrough, JSON) 9305// that are safe to round-trip through url.Values.Encode(). 9306queryValues := 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"). 9310var rawQueryFragments []string 9311 9312if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"snapshot" ,params .Snapshot , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9313return nil ,err 9314 }else { 9315for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9316rawQueryFragments = append (rawQueryFragments ,qp ) 9317 } 9318 } 9319 9320if params .Next != nil { 9321 9322if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9323return nil ,err 9324 }else { 9325for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9326rawQueryFragments = append (rawQueryFragments ,qp ) 9327 } 9328 } 9329 9330 } 9331 9332if encoded := queryValues .Encode ();encoded != "" { 9333rawQueryFragments = append (rawQueryFragments ,encoded ) 9334 } 9335queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 9336 } 9337 9338req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 9339if err != nil { 9340return nil ,err 9341 } 9342 9343return 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 ) { 9348var err error 9349 9350var pathParam0 string 9351 9352pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9353if err != nil { 9354return nil ,err 9355 } 9356 9357serverURL ,err := url .Parse (server ) 9358if err != nil { 9359return nil ,err 9360 } 9361 9362operationPath := fmt .Sprintf ("/sessions/%s/catalog" ,pathParam0 ) 9363if operationPath [0 ]== '/' { 9364operationPath = "." + operationPath 9365 } 9366 9367queryURL ,err := serverURL .Parse (operationPath ) 9368if err != nil { 9369return nil ,err 9370 } 9371 9372if params != nil { 9373// queryValues collects non-styled parameters (passthrough, JSON) 9374// that are safe to round-trip through url.Values.Encode(). 9375queryValues := 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"). 9379var rawQueryFragments []string 9380 9381if params .Kind != nil { 9382 9383if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"kind" ,* params .Kind , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9384return nil ,err 9385 }else { 9386for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9387rawQueryFragments = append (rawQueryFragments ,qp ) 9388 } 9389 } 9390 9391 } 9392 9393if params .Limit != nil { 9394 9395if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9396return nil ,err 9397 }else { 9398for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9399rawQueryFragments = append (rawQueryFragments ,qp ) 9400 } 9401 } 9402 9403 } 9404 9405if params .Next != nil { 9406 9407if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9408return nil ,err 9409 }else { 9410for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9411rawQueryFragments = append (rawQueryFragments ,qp ) 9412 } 9413 } 9414 9415 } 9416 9417if encoded := queryValues .Encode ();encoded != "" { 9418rawQueryFragments = append (rawQueryFragments ,encoded ) 9419 } 9420queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 9421 } 9422 9423req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 9424if err != nil { 9425return nil ,err 9426 } 9427 9428return 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 ) { 9433var bodyReader io.Reader 9434buf ,err := json .Marshal (body ) 9435if err != nil { 9436return nil ,err 9437 } 9438bodyReader = bytes .NewReader (buf ) 9439return 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 ) { 9444var err error 9445 9446var pathParam0 string 9447 9448pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9449if err != nil { 9450return nil ,err 9451 } 9452 9453serverURL ,err := url .Parse (server ) 9454if err != nil { 9455return nil ,err 9456 } 9457 9458operationPath := fmt .Sprintf ("/sessions/%s/compaction" ,pathParam0 ) 9459if operationPath [0 ]== '/' { 9460operationPath = "." + operationPath 9461 } 9462 9463queryURL ,err := serverURL .Parse (operationPath ) 9464if err != nil { 9465return nil ,err 9466 } 9467 9468req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 9469if err != nil { 9470return nil ,err 9471 } 9472 9473req .Header .Add ("Content-Type" ,contentType ) 9474 9475return 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 ) { 9480var err error 9481 9482var pathParam0 string 9483 9484pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9485if err != nil { 9486return nil ,err 9487 } 9488 9489serverURL ,err := url .Parse (server ) 9490if err != nil { 9491return nil ,err 9492 } 9493 9494operationPath := fmt .Sprintf ("/sessions/%s/context" ,pathParam0 ) 9495if operationPath [0 ]== '/' { 9496operationPath = "." + operationPath 9497 } 9498 9499queryURL ,err := serverURL .Parse (operationPath ) 9500if err != nil { 9501return nil ,err 9502 } 9503 9504if params != nil { 9505// queryValues collects non-styled parameters (passthrough, JSON) 9506// that are safe to round-trip through url.Values.Encode(). 9507queryValues := 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"). 9511var rawQueryFragments []string 9512 9513if params .View != nil { 9514 9515if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,* params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9516return nil ,err 9517 }else { 9518for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9519rawQueryFragments = append (rawQueryFragments ,qp ) 9520 } 9521 } 9522 9523 } 9524 9525if params .SnapshotID != nil { 9526 9527if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"snapshot_id" ,* params .SnapshotID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9528return nil ,err 9529 }else { 9530for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9531rawQueryFragments = append (rawQueryFragments ,qp ) 9532 } 9533 } 9534 9535 } 9536 9537if params .SectionID != nil { 9538 9539if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"section_id" ,* params .SectionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9540return nil ,err 9541 }else { 9542for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9543rawQueryFragments = append (rawQueryFragments ,qp ) 9544 } 9545 } 9546 9547 } 9548 9549if params .Page != nil { 9550 9551if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"page" ,* params .Page , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9552return nil ,err 9553 }else { 9554for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9555rawQueryFragments = append (rawQueryFragments ,qp ) 9556 } 9557 } 9558 9559 } 9560 9561if params .After != nil { 9562 9563if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"after" ,* params .After , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9564return nil ,err 9565 }else { 9566for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9567rawQueryFragments = append (rawQueryFragments ,qp ) 9568 } 9569 } 9570 9571 } 9572 9573if params .Limit != nil { 9574 9575if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9576return nil ,err 9577 }else { 9578for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9579rawQueryFragments = append (rawQueryFragments ,qp ) 9580 } 9581 } 9582 9583 } 9584 9585if params .Next != nil { 9586 9587if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9588return nil ,err 9589 }else { 9590for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9591rawQueryFragments = append (rawQueryFragments ,qp ) 9592 } 9593 } 9594 9595 } 9596 9597if encoded := queryValues .Encode ();encoded != "" { 9598rawQueryFragments = append (rawQueryFragments ,encoded ) 9599 } 9600queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 9601 } 9602 9603req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 9604if err != nil { 9605return nil ,err 9606 } 9607 9608return 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 ) { 9613var err error 9614 9615var pathParam0 string 9616 9617pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9618if err != nil { 9619return nil ,err 9620 } 9621 9622serverURL ,err := url .Parse (server ) 9623if err != nil { 9624return nil ,err 9625 } 9626 9627operationPath := fmt .Sprintf ("/sessions/%s/history" ,pathParam0 ) 9628if operationPath [0 ]== '/' { 9629operationPath = "." + operationPath 9630 } 9631 9632queryURL ,err := serverURL .Parse (operationPath ) 9633if err != nil { 9634return nil ,err 9635 } 9636 9637if params != nil { 9638// queryValues collects non-styled parameters (passthrough, JSON) 9639// that are safe to round-trip through url.Values.Encode(). 9640queryValues := 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"). 9644var rawQueryFragments []string 9645 9646if params .View != nil { 9647 9648if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"view" ,* params .View , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9649return nil ,err 9650 }else { 9651for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9652rawQueryFragments = append (rawQueryFragments ,qp ) 9653 } 9654 } 9655 9656 } 9657 9658if params .Before != nil { 9659 9660if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"before" ,* params .Before , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9661return nil ,err 9662 }else { 9663for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9664rawQueryFragments = append (rawQueryFragments ,qp ) 9665 } 9666 } 9667 9668 } 9669 9670if params .After != nil { 9671 9672if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"after" ,* params .After , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9673return nil ,err 9674 }else { 9675for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9676rawQueryFragments = append (rawQueryFragments ,qp ) 9677 } 9678 } 9679 9680 } 9681 9682if params .Next != nil { 9683 9684if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9685return nil ,err 9686 }else { 9687for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9688rawQueryFragments = append (rawQueryFragments ,qp ) 9689 } 9690 } 9691 9692 } 9693 9694if params .Limit != nil { 9695 9696if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 9697return nil ,err 9698 }else { 9699for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9700rawQueryFragments = append (rawQueryFragments ,qp ) 9701 } 9702 } 9703 9704 } 9705 9706if encoded := queryValues .Encode ();encoded != "" { 9707rawQueryFragments = append (rawQueryFragments ,encoded ) 9708 } 9709queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 9710 } 9711 9712req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 9713if err != nil { 9714return nil ,err 9715 } 9716 9717return 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 ) { 9722var err error 9723 9724var pathParam0 string 9725 9726pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9727if err != nil { 9728return nil ,err 9729 } 9730 9731var pathParam1 string 9732 9733pathParam1 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"entry_id" ,entryID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9734if err != nil { 9735return nil ,err 9736 } 9737 9738serverURL ,err := url .Parse (server ) 9739if err != nil { 9740return nil ,err 9741 } 9742 9743operationPath := fmt .Sprintf ("/sessions/%s/history/%s" ,pathParam0 ,pathParam1 ) 9744if operationPath [0 ]== '/' { 9745operationPath = "." + operationPath 9746 } 9747 9748queryURL ,err := serverURL .Parse (operationPath ) 9749if err != nil { 9750return nil ,err 9751 } 9752 9753if params != nil { 9754// queryValues collects non-styled parameters (passthrough, JSON) 9755// that are safe to round-trip through url.Values.Encode(). 9756queryValues := 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"). 9760var rawQueryFragments []string 9761 9762if params .Next != nil { 9763 9764if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 9765return nil ,err 9766 }else { 9767for _ ,qp := range strings .Split (queryFrag ,"&" ) { 9768rawQueryFragments = append (rawQueryFragments ,qp ) 9769 } 9770 } 9771 9772 } 9773 9774if encoded := queryValues .Encode ();encoded != "" { 9775rawQueryFragments = append (rawQueryFragments ,encoded ) 9776 } 9777queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 9778 } 9779 9780req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 9781if err != nil { 9782return nil ,err 9783 } 9784 9785return 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 ) { 9790var err error 9791 9792var pathParam0 string 9793 9794pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9795if err != nil { 9796return nil ,err 9797 } 9798 9799var pathParam1 string 9800 9801pathParam1 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"entry_id" ,entryID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9802if err != nil { 9803return nil ,err 9804 } 9805 9806var pathParam2 string 9807 9808pathParam2 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"field" ,field , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9809if err != nil { 9810return nil ,err 9811 } 9812 9813serverURL ,err := url .Parse (server ) 9814if err != nil { 9815return nil ,err 9816 } 9817 9818operationPath := fmt .Sprintf ("/sessions/%s/history/%s/%s" ,pathParam0 ,pathParam1 ,pathParam2 ) 9819if operationPath [0 ]== '/' { 9820operationPath = "." + operationPath 9821 } 9822 9823queryURL ,err := serverURL .Parse (operationPath ) 9824if err != nil { 9825return nil ,err 9826 } 9827 9828req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 9829if err != nil { 9830return nil ,err 9831 } 9832 9833return 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 ) { 9838var err error 9839 9840var pathParam0 string 9841 9842pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9843if err != nil { 9844return nil ,err 9845 } 9846 9847var pathParam1 string 9848 9849pathParam1 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"input_id" ,inputID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9850if err != nil { 9851return nil ,err 9852 } 9853 9854serverURL ,err := url .Parse (server ) 9855if err != nil { 9856return nil ,err 9857 } 9858 9859operationPath := fmt .Sprintf ("/sessions/%s/inputs/%s" ,pathParam0 ,pathParam1 ) 9860if operationPath [0 ]== '/' { 9861operationPath = "." + operationPath 9862 } 9863 9864queryURL ,err := serverURL .Parse (operationPath ) 9865if err != nil { 9866return nil ,err 9867 } 9868 9869req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 9870if err != nil { 9871return nil ,err 9872 } 9873 9874return 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 ) { 9879var bodyReader io.Reader 9880buf ,err := json .Marshal (body ) 9881if err != nil { 9882return nil ,err 9883 } 9884bodyReader = bytes .NewReader (buf ) 9885return 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 ) { 9890var err error 9891 9892var pathParam0 string 9893 9894pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9895if err != nil { 9896return nil ,err 9897 } 9898 9899var pathParam1 string 9900 9901pathParam1 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"input_id" ,inputID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"uuid" }) 9902if err != nil { 9903return nil ,err 9904 } 9905 9906serverURL ,err := url .Parse (server ) 9907if err != nil { 9908return nil ,err 9909 } 9910 9911operationPath := fmt .Sprintf ("/sessions/%s/inputs/%s" ,pathParam0 ,pathParam1 ) 9912if operationPath [0 ]== '/' { 9913operationPath = "." + operationPath 9914 } 9915 9916queryURL ,err := serverURL .Parse (operationPath ) 9917if err != nil { 9918return nil ,err 9919 } 9920 9921req ,err := http .NewRequest (http .MethodPut ,queryURL .String (),body ) 9922if err != nil { 9923return nil ,err 9924 } 9925 9926req .Header .Add ("Content-Type" ,contentType ) 9927 9928return 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 ) { 9933var bodyReader io.Reader 9934buf ,err := json .Marshal (body ) 9935if err != nil { 9936return nil ,err 9937 } 9938bodyReader = bytes .NewReader (buf ) 9939return 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 ) { 9944var err error 9945 9946var pathParam0 string 9947 9948pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9949if err != nil { 9950return nil ,err 9951 } 9952 9953var pathParam1 string 9954 9955pathParam1 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"input_id" ,inputID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 9956if err != nil { 9957return nil ,err 9958 } 9959 9960serverURL ,err := url .Parse (server ) 9961if err != nil { 9962return nil ,err 9963 } 9964 9965operationPath := fmt .Sprintf ("/sessions/%s/inputs/%s/cancel" ,pathParam0 ,pathParam1 ) 9966if operationPath [0 ]== '/' { 9967operationPath = "." + operationPath 9968 } 9969 9970queryURL ,err := serverURL .Parse (operationPath ) 9971if err != nil { 9972return nil ,err 9973 } 9974 9975req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 9976if err != nil { 9977return nil ,err 9978 } 9979 9980req .Header .Add ("Content-Type" ,contentType ) 9981 9982return 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 ) { 9987var bodyReader io.Reader 9988buf ,err := json .Marshal (body ) 9989if err != nil { 9990return nil ,err 9991 } 9992bodyReader = bytes .NewReader (buf ) 9993return 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 ) { 9998var err error 9999 10000var pathParam0 string 10001 10002pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 10003if err != nil { 10004return nil ,err 10005 } 10006 10007serverURL ,err := url .Parse (server ) 10008if err != nil { 10009return nil ,err 10010 } 10011 10012operationPath := fmt .Sprintf ("/sessions/%s/interrupt" ,pathParam0 ) 10013if operationPath [0 ]== '/' { 10014operationPath = "." + operationPath 10015 } 10016 10017queryURL ,err := serverURL .Parse (operationPath ) 10018if err != nil { 10019return nil ,err 10020 } 10021 10022req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 10023if err != nil { 10024return nil ,err 10025 } 10026 10027req .Header .Add ("Content-Type" ,contentType ) 10028 10029return 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 ) { 10034var bodyReader io.Reader 10035buf ,err := json .Marshal (body ) 10036if err != nil { 10037return nil ,err 10038 } 10039bodyReader = bytes .NewReader (buf ) 10040return 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 ) { 10045var err error 10046 10047var pathParam0 string 10048 10049pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 10050if err != nil { 10051return nil ,err 10052 } 10053 10054serverURL ,err := url .Parse (server ) 10055if err != nil { 10056return nil ,err 10057 } 10058 10059operationPath := fmt .Sprintf ("/sessions/%s/kernel/upgrade" ,pathParam0 ) 10060if operationPath [0 ]== '/' { 10061operationPath = "." + operationPath 10062 } 10063 10064queryURL ,err := serverURL .Parse (operationPath ) 10065if err != nil { 10066return nil ,err 10067 } 10068 10069req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 10070if err != nil { 10071return nil ,err 10072 } 10073 10074req .Header .Add ("Content-Type" ,contentType ) 10075 10076return 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 ) { 10081var bodyReader io.Reader 10082buf ,err := json .Marshal (body ) 10083if err != nil { 10084return nil ,err 10085 } 10086bodyReader = bytes .NewReader (buf ) 10087return 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 ) { 10092var err error 10093 10094var pathParam0 string 10095 10096pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 10097if err != nil { 10098return nil ,err 10099 } 10100 10101serverURL ,err := url .Parse (server ) 10102if err != nil { 10103return nil ,err 10104 } 10105 10106operationPath := fmt .Sprintf ("/sessions/%s/reload" ,pathParam0 ) 10107if operationPath [0 ]== '/' { 10108operationPath = "." + operationPath 10109 } 10110 10111queryURL ,err := serverURL .Parse (operationPath ) 10112if err != nil { 10113return nil ,err 10114 } 10115 10116req ,err := http .NewRequest (http .MethodPost ,queryURL .String (),body ) 10117if err != nil { 10118return nil ,err 10119 } 10120 10121req .Header .Add ("Content-Type" ,contentType ) 10122 10123return 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 ) { 10128var bodyReader io.Reader 10129buf ,err := json .Marshal (body ) 10130if err != nil { 10131return nil ,err 10132 } 10133bodyReader = bytes .NewReader (buf ) 10134return 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 ) { 10139var err error 10140 10141var pathParam0 string 10142 10143pathParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"session_id" ,sessionID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"" }) 10144if err != nil { 10145return nil ,err 10146 } 10147 10148var pathParam1 string 10149 10150pathParam1 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"visit_id" ,visitID , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationPath ,Type :"string" ,Format :"uuid" }) 10151if err != nil { 10152return nil ,err 10153 } 10154 10155serverURL ,err := url .Parse (server ) 10156if err != nil { 10157return nil ,err 10158 } 10159 10160operationPath := fmt .Sprintf ("/sessions/%s/visits/%s" ,pathParam0 ,pathParam1 ) 10161if operationPath [0 ]== '/' { 10162operationPath = "." + operationPath 10163 } 10164 10165queryURL ,err := serverURL .Parse (operationPath ) 10166if err != nil { 10167return nil ,err 10168 } 10169 10170req ,err := http .NewRequest (http .MethodPut ,queryURL .String (),body ) 10171if err != nil { 10172return nil ,err 10173 } 10174 10175req .Header .Add ("Content-Type" ,contentType ) 10176 10177return req ,nil 10178} 10179 10180// NewGetSettingsRequest constructs an http.Request for the GetSettings method 10181func NewGetSettingsRequest (server string ,params * GetSettingsParams ) (* http.Request ,error ) { 10182var err error 10183 10184serverURL ,err := url .Parse (server ) 10185if err != nil { 10186return nil ,err 10187 } 10188 10189operationPath := fmt .Sprintf ("/settings" ) 10190if operationPath [0 ]== '/' { 10191operationPath = "." + operationPath 10192 } 10193 10194queryURL ,err := serverURL .Parse (operationPath ) 10195if err != nil { 10196return nil ,err 10197 } 10198 10199if params != nil { 10200// queryValues collects non-styled parameters (passthrough, JSON) 10201// that are safe to round-trip through url.Values.Encode(). 10202queryValues := 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"). 10206var rawQueryFragments []string 10207 10208if params .Group != nil { 10209 10210if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"group" ,* params .Group , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 10211return nil ,err 10212 }else { 10213for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10214rawQueryFragments = append (rawQueryFragments ,qp ) 10215 } 10216 } 10217 10218 } 10219 10220if encoded := queryValues .Encode ();encoded != "" { 10221rawQueryFragments = append (rawQueryFragments ,encoded ) 10222 } 10223queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 10224 } 10225 10226req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 10227if err != nil { 10228return nil ,err 10229 } 10230 10231return 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 ) { 10236var bodyReader io.Reader 10237buf ,err := json .Marshal (body ) 10238if err != nil { 10239return nil ,err 10240 } 10241bodyReader = bytes .NewReader (buf ) 10242return 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 ) { 10247var err error 10248 10249serverURL ,err := url .Parse (server ) 10250if err != nil { 10251return nil ,err 10252 } 10253 10254operationPath := fmt .Sprintf ("/settings" ) 10255if operationPath [0 ]== '/' { 10256operationPath = "." + operationPath 10257 } 10258 10259queryURL ,err := serverURL .Parse (operationPath ) 10260if err != nil { 10261return nil ,err 10262 } 10263 10264if params != nil { 10265// queryValues collects non-styled parameters (passthrough, JSON) 10266// that are safe to round-trip through url.Values.Encode(). 10267queryValues := 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"). 10271var rawQueryFragments []string 10272 10273if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"group" ,params .Group , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 10274return nil ,err 10275 }else { 10276for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10277rawQueryFragments = append (rawQueryFragments ,qp ) 10278 } 10279 } 10280 10281if encoded := queryValues .Encode ();encoded != "" { 10282rawQueryFragments = append (rawQueryFragments ,encoded ) 10283 } 10284queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 10285 } 10286 10287req ,err := http .NewRequest (http .MethodPatch ,queryURL .String (),body ) 10288if err != nil { 10289return nil ,err 10290 } 10291 10292req .Header .Add ("Content-Type" ,contentType ) 10293 10294if params != nil { 10295 10296var headerParam0 string 10297 10298headerParam0 ,err = runtime .StyleParamWithOptions ("simple" ,false ,"If-Match" ,params .IfMatch , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationHeader ,Type :"string" ,Format :"" }) 10299if err != nil { 10300return nil ,err 10301 } 10302 10303req .Header .Set ("If-Match" ,headerParam0 ) 10304 10305 } 10306 10307return req ,nil 10308} 10309 10310// NewGetStorageRequest constructs an http.Request for the GetStorage method 10311func NewGetStorageRequest (server string ,params * GetStorageParams ) (* http.Request ,error ) { 10312var err error 10313 10314serverURL ,err := url .Parse (server ) 10315if err != nil { 10316return nil ,err 10317 } 10318 10319operationPath := fmt .Sprintf ("/storage" ) 10320if operationPath [0 ]== '/' { 10321operationPath = "." + operationPath 10322 } 10323 10324queryURL ,err := serverURL .Parse (operationPath ) 10325if err != nil { 10326return nil ,err 10327 } 10328 10329if params != nil { 10330// queryValues collects non-styled parameters (passthrough, JSON) 10331// that are safe to round-trip through url.Values.Encode(). 10332queryValues := 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"). 10336var rawQueryFragments []string 10337 10338if params .SessionsNext != nil { 10339 10340if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"sessions_next" ,* params .SessionsNext , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 10341return nil ,err 10342 }else { 10343for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10344rawQueryFragments = append (rawQueryFragments ,qp ) 10345 } 10346 } 10347 10348 } 10349 10350if params .FilesNext != nil { 10351 10352if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"files_next" ,* params .FilesNext , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 10353return nil ,err 10354 }else { 10355for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10356rawQueryFragments = append (rawQueryFragments ,qp ) 10357 } 10358 } 10359 10360 } 10361 10362if params .Limit != nil { 10363 10364if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 10365return nil ,err 10366 }else { 10367for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10368rawQueryFragments = append (rawQueryFragments ,qp ) 10369 } 10370 } 10371 10372 } 10373 10374if encoded := queryValues .Encode ();encoded != "" { 10375rawQueryFragments = append (rawQueryFragments ,encoded ) 10376 } 10377queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 10378 } 10379 10380req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 10381if err != nil { 10382return nil ,err 10383 } 10384 10385return req ,nil 10386} 10387 10388// NewGetWorkspacesRequest constructs an http.Request for the GetWorkspaces method 10389func NewGetWorkspacesRequest (server string ,params * GetWorkspacesParams ) (* http.Request ,error ) { 10390var err error 10391 10392serverURL ,err := url .Parse (server ) 10393if err != nil { 10394return nil ,err 10395 } 10396 10397operationPath := fmt .Sprintf ("/workspaces" ) 10398if operationPath [0 ]== '/' { 10399operationPath = "." + operationPath 10400 } 10401 10402queryURL ,err := serverURL .Parse (operationPath ) 10403if err != nil { 10404return nil ,err 10405 } 10406 10407if params != nil { 10408// queryValues collects non-styled parameters (passthrough, JSON) 10409// that are safe to round-trip through url.Values.Encode(). 10410queryValues := 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"). 10414var rawQueryFragments []string 10415 10416if params .Location != nil { 10417 10418if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"location" ,* params .Location , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 10419return nil ,err 10420 }else { 10421for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10422rawQueryFragments = append (rawQueryFragments ,qp ) 10423 } 10424 } 10425 10426 } 10427 10428if params .Include != nil { 10429 10430if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"include" ,* params .Include , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 10431return nil ,err 10432 }else { 10433for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10434rawQueryFragments = append (rawQueryFragments ,qp ) 10435 } 10436 } 10437 10438 } 10439 10440if params .Limit != nil { 10441 10442if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"limit" ,* params .Limit , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"integer" ,Format :"" });err != nil { 10443return nil ,err 10444 }else { 10445for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10446rawQueryFragments = append (rawQueryFragments ,qp ) 10447 } 10448 } 10449 10450 } 10451 10452if params .Next != nil { 10453 10454if queryFrag ,err := runtime .StyleParamWithOptions ("form" ,true ,"next" ,* params .Next , runtime.StyleParamOptions {ParamLocation :runtime .ParamLocationQuery ,Type :"string" ,Format :"" });err != nil { 10455return nil ,err 10456 }else { 10457for _ ,qp := range strings .Split (queryFrag ,"&" ) { 10458rawQueryFragments = append (rawQueryFragments ,qp ) 10459 } 10460 } 10461 10462 } 10463 10464if encoded := queryValues .Encode ();encoded != "" { 10465rawQueryFragments = append (rawQueryFragments ,encoded ) 10466 } 10467queryURL .RawQuery = strings .Join (rawQueryFragments ,"&" ) 10468 } 10469 10470req ,err := http .NewRequest (http .MethodGet ,queryURL .String (),nil ) 10471if err != nil { 10472return nil ,err 10473 } 10474 10475return req ,nil 10476} 10477 10478func (c * Client )applyEditors (ctx context.Context ,req * http.Request ,additionalEditors []RequestEditorFn )error { 10479for _ ,r := range c .RequestEditors { 10480if err := r (ctx ,req );err != nil { 10481return err 10482 } 10483 } 10484for _ ,r := range additionalEditors { 10485if err := r (ctx ,req );err != nil { 10486return err 10487 } 10488 } 10489return nil 10490} 10491 10492// Response decoding is owned by the daemon adapter.