@compozy/client 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2845,24 +2845,24 @@ export class openai extends HeyApiClient {
2845
2845
  });
2846
2846
  }
2847
2847
  }
2848
- export class profiles extends HeyApiClient {
2848
+ export class sessions extends HeyApiClient {
2849
2849
  /**
2850
- * List profiles
2850
+ * List processes grouped by session, including left-running processes
2851
2851
  */
2852
- listProfiles(options) {
2852
+ listProcesses(options) {
2853
2853
  return (options?.client ?? this.client).get({
2854
2854
  responseStyle: "data",
2855
- url: "/api/profiles",
2855
+ url: "/api/processes",
2856
2856
  ...options,
2857
2857
  });
2858
2858
  }
2859
2859
  /**
2860
- * Create a profile
2860
+ * Terminate identity-verified processes with missing or retained session owners
2861
2861
  */
2862
- createProfile(options) {
2862
+ terminateProcesses(options) {
2863
2863
  return (options.client ?? this.client).post({
2864
2864
  responseStyle: "data",
2865
- url: "/api/profiles",
2865
+ url: "/api/processes/terminate",
2866
2866
  ...options,
2867
2867
  headers: {
2868
2868
  "Content-Type": "application/json",
@@ -2871,184 +2871,180 @@ export class profiles extends HeyApiClient {
2871
2871
  });
2872
2872
  }
2873
2873
  /**
2874
- * List profile lifecycle operations
2874
+ * List sessions
2875
2875
  */
2876
- listProfileOperations(options) {
2876
+ listSessions(options) {
2877
2877
  return (options?.client ?? this.client).get({
2878
2878
  responseStyle: "data",
2879
- url: "/api/profiles/ops",
2879
+ url: "/api/sessions",
2880
2880
  ...options,
2881
2881
  });
2882
2882
  }
2883
2883
  /**
2884
- * Retry a profile lifecycle operation
2884
+ * Create a session
2885
2885
  */
2886
- retryProfileOperation(options) {
2886
+ createSession(options) {
2887
2887
  return (options.client ?? this.client).post({
2888
2888
  responseStyle: "data",
2889
- url: "/api/profiles/ops/{op_id}/retry",
2889
+ url: "/api/sessions",
2890
2890
  ...options,
2891
+ headers: {
2892
+ "Content-Type": "application/json",
2893
+ ...options.headers,
2894
+ },
2891
2895
  });
2892
2896
  }
2893
2897
  /**
2894
- * Read profile selections
2898
+ * Get exact session attention counts
2895
2899
  */
2896
- getProfileSelections(options) {
2900
+ getSessionAttentionSummary(options) {
2897
2901
  return (options?.client ?? this.client).get({
2898
2902
  responseStyle: "data",
2899
- url: "/api/profiles/selection",
2903
+ url: "/api/sessions/attention-summary",
2900
2904
  ...options,
2901
2905
  });
2902
2906
  }
2903
2907
  /**
2904
- * Remember a profile selection
2908
+ * Count session catalog facets
2905
2909
  */
2906
- putProfileSelection(options) {
2907
- return (options.client ?? this.client).put({
2910
+ listSessionFacets(options) {
2911
+ return (options?.client ?? this.client).get({
2908
2912
  responseStyle: "data",
2909
- url: "/api/profiles/selection",
2913
+ url: "/api/sessions/facets",
2910
2914
  ...options,
2911
- headers: {
2912
- "Content-Type": "application/json",
2913
- ...options.headers,
2914
- },
2915
2915
  });
2916
2916
  }
2917
2917
  /**
2918
- * Delete a profile
2918
+ * Get one session snapshot by id
2919
2919
  */
2920
- deleteProfile(options) {
2921
- return (options.client ?? this.client).delete({
2920
+ getSessionByID(options) {
2921
+ return (options.client ?? this.client).get({
2922
2922
  responseStyle: "data",
2923
- url: "/api/profiles/{name}",
2923
+ url: "/api/sessions/{session_id}",
2924
2924
  ...options,
2925
2925
  });
2926
2926
  }
2927
2927
  /**
2928
- * Get a profile
2928
+ * List persisted session events for a Global session
2929
2929
  */
2930
- getProfile(options) {
2930
+ listGlobalSessionEvents(options) {
2931
2931
  return (options.client ?? this.client).get({
2932
2932
  responseStyle: "data",
2933
- url: "/api/profiles/{name}",
2933
+ url: "/api/sessions/{session_id}/events",
2934
2934
  ...options,
2935
2935
  });
2936
2936
  }
2937
2937
  /**
2938
- * Update profile identity
2938
+ * List grouped session turn history for a Global session
2939
2939
  */
2940
- updateProfile(options) {
2941
- return (options.client ?? this.client).patch({
2940
+ getGlobalSessionHistory(options) {
2941
+ return (options.client ?? this.client).get({
2942
2942
  responseStyle: "data",
2943
- url: "/api/profiles/{name}",
2943
+ url: "/api/sessions/{session_id}/history",
2944
2944
  ...options,
2945
- headers: {
2946
- "Content-Type": "application/json",
2947
- ...options.headers,
2948
- },
2949
2945
  });
2950
2946
  }
2951
2947
  /**
2952
- * Archive a profile
2948
+ * Get a session owner; Global history has an empty workspace id
2953
2949
  */
2954
- archiveProfile(options) {
2950
+ getSessionOwner(options) {
2951
+ return (options.client ?? this.client).get({
2952
+ responseStyle: "data",
2953
+ url: "/api/sessions/{session_id}/owner",
2954
+ ...options,
2955
+ });
2956
+ }
2957
+ /**
2958
+ * Refresh a session pull request
2959
+ */
2960
+ refreshSessionPullRequest(options) {
2955
2961
  return (options.client ?? this.client).post({
2956
2962
  responseStyle: "data",
2957
- url: "/api/profiles/{name}/archive",
2963
+ url: "/api/sessions/{session_id}/pull-request/refresh",
2958
2964
  ...options,
2959
- headers: {
2960
- "Content-Type": "application/json",
2961
- ...options.headers,
2962
- },
2963
2965
  });
2964
2966
  }
2965
2967
  /**
2966
- * Preview profile archival
2968
+ * Read compact session status and wake eligibility for a Global session
2967
2969
  */
2968
- prepareProfileArchive(options) {
2970
+ getGlobalSessionStatus(options) {
2969
2971
  return (options.client ?? this.client).get({
2970
2972
  responseStyle: "data",
2971
- url: "/api/profiles/{name}/archive-plan",
2973
+ url: "/api/sessions/{session_id}/status",
2972
2974
  ...options,
2973
2975
  });
2974
2976
  }
2975
2977
  /**
2976
- * Preview profile deletion
2978
+ * Get a bounded materialized transcript page for a Global session
2977
2979
  */
2978
- prepareProfileDelete(options) {
2980
+ getGlobalSessionTranscript(options) {
2979
2981
  return (options.client ?? this.client).get({
2980
2982
  responseStyle: "data",
2981
- url: "/api/profiles/{name}/delete-plan",
2983
+ url: "/api/sessions/{session_id}/transcript",
2982
2984
  ...options,
2983
2985
  });
2984
2986
  }
2985
2987
  /**
2986
- * Rename a profile
2988
+ * Get the full retained operator-message trail with reply previews for a Global session
2987
2989
  */
2988
- renameProfile(options) {
2989
- return (options.client ?? this.client).post({
2990
+ getGlobalSessionTranscriptOutline(options) {
2991
+ return (options.client ?? this.client).get({
2990
2992
  responseStyle: "data",
2991
- url: "/api/profiles/{name}/rename",
2993
+ url: "/api/sessions/{session_id}/transcript/outline",
2992
2994
  ...options,
2993
- headers: {
2994
- "Content-Type": "application/json",
2995
- ...options.headers,
2996
- },
2997
2995
  });
2998
2996
  }
2999
2997
  /**
3000
- * Preview a profile rename
2998
+ * Search retained transcript messages with bounded literal matches for a Global session
3001
2999
  */
3002
- prepareProfileRename(options) {
3000
+ searchGlobalSessionTranscript(options) {
3003
3001
  return (options.client ?? this.client).get({
3004
3002
  responseStyle: "data",
3005
- url: "/api/profiles/{name}/rename-plan",
3003
+ url: "/api/sessions/{session_id}/transcript/search",
3006
3004
  ...options,
3007
3005
  });
3008
3006
  }
3009
3007
  /**
3010
- * Unarchive a profile
3008
+ * List session folders in manual order
3011
3009
  */
3012
- unarchiveProfile(options) {
3013
- return (options.client ?? this.client).post({
3010
+ listSessionFolders(options) {
3011
+ return (options.client ?? this.client).get({
3014
3012
  responseStyle: "data",
3015
- url: "/api/profiles/{name}/unarchive",
3013
+ url: "/api/workspaces/{workspace_id}/session-folders",
3016
3014
  ...options,
3017
- headers: {
3018
- "Content-Type": "application/json",
3019
- ...options.headers,
3020
- },
3021
3015
  });
3022
3016
  }
3023
- }
3024
- export class resources extends HeyApiClient {
3025
3017
  /**
3026
- * List desired-state resources on the local operator control plane
3018
+ * Create a session folder
3027
3019
  */
3028
- listResources(options) {
3029
- return (options?.client ?? this.client).get({
3020
+ createSessionFolder(options) {
3021
+ return (options.client ?? this.client).post({
3030
3022
  responseStyle: "data",
3031
- url: "/api/resources",
3023
+ url: "/api/workspaces/{workspace_id}/session-folders",
3032
3024
  ...options,
3025
+ headers: {
3026
+ "Content-Type": "application/json",
3027
+ ...options.headers,
3028
+ },
3033
3029
  });
3034
3030
  }
3035
3031
  /**
3036
- * List one desired-state resource kind on the local operator control plane
3032
+ * Delete a session folder; its sessions return to the workspace root
3037
3033
  */
3038
- listResourcesByKind(options) {
3039
- return (options.client ?? this.client).get({
3034
+ deleteSessionFolder(options) {
3035
+ return (options.client ?? this.client).delete({
3040
3036
  responseStyle: "data",
3041
- url: "/api/resources/{kind}",
3037
+ url: "/api/workspaces/{workspace_id}/session-folders/{folder_id}",
3042
3038
  ...options,
3043
3039
  });
3044
3040
  }
3045
3041
  /**
3046
- * Delete one desired-state resource on the local operator control plane
3042
+ * Rename a session folder
3047
3043
  */
3048
- deleteResource(options) {
3049
- return (options.client ?? this.client).delete({
3044
+ renameSessionFolder(options) {
3045
+ return (options.client ?? this.client).patch({
3050
3046
  responseStyle: "data",
3051
- url: "/api/resources/{kind}/{id}",
3047
+ url: "/api/workspaces/{workspace_id}/session-folders/{folder_id}",
3052
3048
  ...options,
3053
3049
  headers: {
3054
3050
  "Content-Type": "application/json",
@@ -3057,22 +3053,26 @@ export class resources extends HeyApiClient {
3057
3053
  });
3058
3054
  }
3059
3055
  /**
3060
- * Read one desired-state resource on the local operator control plane
3056
+ * Set the complete session folder order
3061
3057
  */
3062
- getResource(options) {
3063
- return (options.client ?? this.client).get({
3058
+ reorderSessionFolders(options) {
3059
+ return (options.client ?? this.client).put({
3064
3060
  responseStyle: "data",
3065
- url: "/api/resources/{kind}/{id}",
3061
+ url: "/api/workspaces/{workspace_id}/session-order/folders",
3066
3062
  ...options,
3063
+ headers: {
3064
+ "Content-Type": "application/json",
3065
+ ...options.headers,
3066
+ },
3067
3067
  });
3068
3068
  }
3069
3069
  /**
3070
- * Create or replace one desired-state resource on the local operator control plane
3070
+ * Set the manual session order in a folder or the workspace root
3071
3071
  */
3072
- putResource(options) {
3072
+ reorderSessions(options) {
3073
3073
  return (options.client ?? this.client).put({
3074
3074
  responseStyle: "data",
3075
- url: "/api/resources/{kind}/{id}",
3075
+ url: "/api/workspaces/{workspace_id}/session-order/sessions",
3076
3076
  ...options,
3077
3077
  headers: {
3078
3078
  "Content-Type": "application/json",
@@ -3080,51 +3080,43 @@ export class resources extends HeyApiClient {
3080
3080
  },
3081
3081
  });
3082
3082
  }
3083
- }
3084
- export class roles extends HeyApiClient {
3085
3083
  /**
3086
- * List effective background role configuration
3084
+ * List sessions
3087
3085
  */
3088
- listRoles(options) {
3089
- return (options?.client ?? this.client).get({
3086
+ listWorkspaceSessions(options) {
3087
+ return (options.client ?? this.client).get({
3090
3088
  responseStyle: "data",
3091
- url: "/api/roles",
3089
+ url: "/api/workspaces/{workspace_id}/sessions",
3092
3090
  ...options,
3093
3091
  });
3094
3092
  }
3095
3093
  /**
3096
- * Get effective background role configuration
3094
+ * Delete one session and remove it from persisted history
3097
3095
  */
3098
- getRole(options) {
3099
- return (options.client ?? this.client).get({
3096
+ deleteSession(options) {
3097
+ return (options.client ?? this.client).delete({
3100
3098
  responseStyle: "data",
3101
- url: "/api/roles/{role}",
3099
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
3102
3100
  ...options,
3103
3101
  });
3104
3102
  }
3105
- }
3106
- export class tasks extends HeyApiClient {
3107
3103
  /**
3108
- * Force fail a bounded set of queued or claimed task runs
3104
+ * Get one session snapshot
3109
3105
  */
3110
- bulkForceFailTaskRuns(options) {
3111
- return (options.client ?? this.client).post({
3106
+ getSession(options) {
3107
+ return (options.client ?? this.client).get({
3112
3108
  responseStyle: "data",
3113
- url: "/api/runs/bulk/fail",
3109
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
3114
3110
  ...options,
3115
- headers: {
3116
- "Content-Type": "application/json",
3117
- ...options.headers,
3118
- },
3119
3111
  });
3120
3112
  }
3121
3113
  /**
3122
- * Force release a bounded set of claimed task runs
3114
+ * Rename one user session
3123
3115
  */
3124
- bulkForceReleaseTaskRuns(options) {
3125
- return (options.client ?? this.client).post({
3116
+ renameSession(options) {
3117
+ return (options.client ?? this.client).patch({
3126
3118
  responseStyle: "data",
3127
- url: "/api/runs/bulk/release",
3119
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
3128
3120
  ...options,
3129
3121
  headers: {
3130
3122
  "Content-Type": "application/json",
@@ -3133,12 +3125,12 @@ export class tasks extends HeyApiClient {
3133
3125
  });
3134
3126
  }
3135
3127
  /**
3136
- * Force fail one queued or claimed task run
3128
+ * Approve or deny an interactive permission request
3137
3129
  */
3138
- forceFailTaskRun(options) {
3130
+ approveSession(options) {
3139
3131
  return (options.client ?? this.client).post({
3140
3132
  responseStyle: "data",
3141
- url: "/api/runs/{id}/fail",
3133
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/approve",
3142
3134
  ...options,
3143
3135
  headers: {
3144
3136
  "Content-Type": "application/json",
@@ -3147,22 +3139,22 @@ export class tasks extends HeyApiClient {
3147
3139
  });
3148
3140
  }
3149
3141
  /**
3150
- * Inspect one task run with diagnostics
3142
+ * Archive a stopped session, or stop and archive a live session with stop=true
3151
3143
  */
3152
- inspectRun(options) {
3153
- return (options.client ?? this.client).get({
3144
+ archiveSession(options) {
3145
+ return (options.client ?? this.client).post({
3154
3146
  responseStyle: "data",
3155
- url: "/api/runs/{id}/inspect",
3147
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/archive",
3156
3148
  ...options,
3157
3149
  });
3158
3150
  }
3159
3151
  /**
3160
- * Recover one needs_attention task run
3152
+ * Attach to a resumable live session
3161
3153
  */
3162
- recoverTaskRun(options) {
3154
+ attachSession(options) {
3163
3155
  return (options.client ?? this.client).post({
3164
3156
  responseStyle: "data",
3165
- url: "/api/runs/{id}/recover",
3157
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attach",
3166
3158
  ...options,
3167
3159
  headers: {
3168
3160
  "Content-Type": "application/json",
@@ -3171,112 +3163,107 @@ export class tasks extends HeyApiClient {
3171
3163
  });
3172
3164
  }
3173
3165
  /**
3174
- * Force release one claimed task run
3166
+ * Upload a session attachment
3175
3167
  */
3176
- forceReleaseTaskRun(options) {
3168
+ uploadSessionAttachment(options) {
3177
3169
  return (options.client ?? this.client).post({
3170
+ ...formDataBodySerializer,
3178
3171
  responseStyle: "data",
3179
- url: "/api/runs/{id}/release",
3172
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments",
3180
3173
  ...options,
3181
3174
  headers: {
3182
- "Content-Type": "application/json",
3175
+ "Content-Type": null,
3183
3176
  ...options.headers,
3184
3177
  },
3185
3178
  });
3186
3179
  }
3187
3180
  /**
3188
- * Retry one failed task run
3181
+ * Delete a session attachment
3189
3182
  */
3190
- retryTaskRun(options) {
3191
- return (options.client ?? this.client).post({
3183
+ deleteSessionAttachment(options) {
3184
+ return (options.client ?? this.client).delete({
3192
3185
  responseStyle: "data",
3193
- url: "/api/runs/{id}/retry",
3186
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments/{attachment_id}",
3194
3187
  ...options,
3195
- headers: {
3196
- "Content-Type": "application/json",
3197
- ...options.headers,
3198
- },
3199
3188
  });
3200
3189
  }
3201
3190
  /**
3202
- * Get scheduler pause state and queue pressure
3191
+ * Read session attachment bytes
3203
3192
  */
3204
- getScheduler(options) {
3205
- return (options?.client ?? this.client).get({
3193
+ readSessionAttachmentBytes(options) {
3194
+ return (options.client ?? this.client).get({
3206
3195
  responseStyle: "data",
3207
- url: "/api/scheduler",
3196
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments/{attachment_id}/bytes",
3208
3197
  ...options,
3209
3198
  });
3210
3199
  }
3211
3200
  /**
3212
- * List queued scheduler backlog rows
3201
+ * List the live pending clarification for a session
3213
3202
  */
3214
- getSchedulerBacklog(options) {
3215
- return (options?.client ?? this.client).get({
3203
+ listSessionClarifications(options) {
3204
+ return (options.client ?? this.client).get({
3216
3205
  responseStyle: "data",
3217
- url: "/api/scheduler/backlog",
3206
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clarifications",
3218
3207
  ...options,
3219
3208
  });
3220
3209
  }
3221
3210
  /**
3222
- * Pause the scheduler and wait for active claims to drain
3211
+ * Answer a live session clarification
3223
3212
  */
3224
- drainScheduler(options) {
3225
- return (options?.client ?? this.client).post({
3213
+ answerSessionClarification(options) {
3214
+ return (options.client ?? this.client).post({
3226
3215
  responseStyle: "data",
3227
- url: "/api/scheduler/drain",
3216
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clarifications/{request_id}/answer",
3228
3217
  ...options,
3229
3218
  headers: {
3230
3219
  "Content-Type": "application/json",
3231
- ...options?.headers,
3220
+ ...options.headers,
3232
3221
  },
3233
3222
  });
3234
3223
  }
3235
3224
  /**
3236
- * Pause scheduler dispatch and task-run claims
3225
+ * Clear conversation history and restart the session context
3237
3226
  */
3238
- pauseScheduler(options) {
3239
- return (options?.client ?? this.client).post({
3227
+ clearSessionConversation(options) {
3228
+ return (options.client ?? this.client).post({
3240
3229
  responseStyle: "data",
3241
- url: "/api/scheduler/pause",
3230
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clear",
3242
3231
  ...options,
3243
- headers: {
3244
- "Content-Type": "application/json",
3245
- ...options?.headers,
3246
- },
3247
3232
  });
3248
3233
  }
3249
3234
  /**
3250
- * Resume scheduler dispatch and task-run claims
3235
+ * List commands available to a session
3251
3236
  */
3252
- resumeScheduler(options) {
3253
- return (options?.client ?? this.client).post({
3237
+ getSessionCommands(options) {
3238
+ return (options.client ?? this.client).get({
3254
3239
  responseStyle: "data",
3255
- url: "/api/scheduler/resume",
3240
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/commands",
3256
3241
  ...options,
3257
- headers: {
3258
- "Content-Type": "application/json",
3259
- ...options?.headers,
3260
- },
3261
3242
  });
3262
3243
  }
3263
3244
  /**
3264
- * Get one task-run review
3245
+ * Request advertised native agent compaction (experimental)
3246
+ *
3247
+ * @stability experimental
3265
3248
  */
3266
- getTaskRunReview(options) {
3267
- return (options.client ?? this.client).get({
3249
+ compactSession(options) {
3250
+ return (options.client ?? this.client).post({
3268
3251
  responseStyle: "data",
3269
- url: "/api/task-reviews/{id}",
3252
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/compact",
3270
3253
  ...options,
3254
+ headers: {
3255
+ "Content-Type": "application/json",
3256
+ ...options.headers,
3257
+ },
3271
3258
  });
3272
3259
  }
3273
3260
  /**
3274
- * Submit one task-run review verdict
3261
+ * Continue a session with another agent, runtime, or declared route
3275
3262
  */
3276
- submitTaskRunReviewVerdict(options) {
3263
+ continueSession(options) {
3277
3264
  return (options.client ?? this.client).post({
3278
3265
  responseStyle: "data",
3279
- url: "/api/task-reviews/{id}/verdict",
3266
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/continue",
3280
3267
  ...options,
3281
3268
  headers: {
3282
3269
  "Content-Type": "application/json",
@@ -3285,50 +3272,42 @@ export class tasks extends HeyApiClient {
3285
3272
  });
3286
3273
  }
3287
3274
  /**
3288
- * Get one task run detail
3275
+ * Preview what a continue or fork of a session would carry
3289
3276
  */
3290
- getTaskRun(options) {
3277
+ previewSessionDerive(options) {
3291
3278
  return (options.client ?? this.client).get({
3292
3279
  responseStyle: "data",
3293
- url: "/api/task-runs/{id}",
3280
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/derive/preview",
3294
3281
  ...options,
3295
3282
  });
3296
3283
  }
3297
3284
  /**
3298
- * Attach an existing session to one task run
3285
+ * List persisted session events
3299
3286
  */
3300
- attachTaskRunSession(options) {
3301
- return (options.client ?? this.client).post({
3287
+ listSessionEvents(options) {
3288
+ return (options.client ?? this.client).get({
3302
3289
  responseStyle: "data",
3303
- url: "/api/task-runs/{id}/attach-session",
3290
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/events",
3304
3291
  ...options,
3305
- headers: {
3306
- "Content-Type": "application/json",
3307
- ...options.headers,
3308
- },
3309
3292
  });
3310
3293
  }
3311
3294
  /**
3312
- * Cancel one task run
3295
+ * Search files and folders under a session's working directory
3313
3296
  */
3314
- cancelTaskRun(options) {
3315
- return (options.client ?? this.client).post({
3297
+ searchSessionFiles(options) {
3298
+ return (options.client ?? this.client).get({
3316
3299
  responseStyle: "data",
3317
- url: "/api/task-runs/{id}/cancel",
3300
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/files",
3318
3301
  ...options,
3319
- headers: {
3320
- "Content-Type": "application/json",
3321
- ...options.headers,
3322
- },
3323
3302
  });
3324
3303
  }
3325
3304
  /**
3326
- * Complete one running task run
3305
+ * Fork a session with the same agent, whole or through one user message and its turn
3327
3306
  */
3328
- completeTaskRun(options) {
3307
+ forkSession(options) {
3329
3308
  return (options.client ?? this.client).post({
3330
3309
  responseStyle: "data",
3331
- url: "/api/task-runs/{id}/complete",
3310
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/fork",
3332
3311
  ...options,
3333
3312
  headers: {
3334
3313
  "Content-Type": "application/json",
@@ -3337,84 +3316,72 @@ export class tasks extends HeyApiClient {
3337
3316
  });
3338
3317
  }
3339
3318
  /**
3340
- * Fail one task run
3319
+ * Read metadata-only session health and wake eligibility
3341
3320
  */
3342
- failTaskRun(options) {
3343
- return (options.client ?? this.client).post({
3321
+ getSessionHealth(options) {
3322
+ return (options.client ?? this.client).get({
3344
3323
  responseStyle: "data",
3345
- url: "/api/task-runs/{id}/fail",
3324
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/health",
3346
3325
  ...options,
3347
- headers: {
3348
- "Content-Type": "application/json",
3349
- ...options.headers,
3350
- },
3351
3326
  });
3352
3327
  }
3353
3328
  /**
3354
- * Read one exact byte page from a task-run result
3329
+ * List grouped session turn history
3355
3330
  */
3356
- readTaskRunResult(options) {
3331
+ getSessionHistory(options) {
3357
3332
  return (options.client ?? this.client).get({
3358
3333
  responseStyle: "data",
3359
- url: "/api/task-runs/{id}/result",
3334
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/history",
3360
3335
  ...options,
3361
3336
  });
3362
3337
  }
3363
3338
  /**
3364
- * List reviews for one task run
3339
+ * Inspect session health, wake audit, and policy correlation metadata
3365
3340
  */
3366
- listTaskRunReviews(options) {
3341
+ inspectSession(options) {
3367
3342
  return (options.client ?? this.client).get({
3368
3343
  responseStyle: "data",
3369
- url: "/api/task-runs/{id}/reviews",
3344
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/inspect",
3370
3345
  ...options,
3371
3346
  });
3372
3347
  }
3373
3348
  /**
3374
- * Request review for one terminal task run
3349
+ * List pending session interactions
3375
3350
  */
3376
- requestTaskRunReview(options) {
3377
- return (options.client ?? this.client).post({
3351
+ listSessionInteractions(options) {
3352
+ return (options.client ?? this.client).get({
3378
3353
  responseStyle: "data",
3379
- url: "/api/task-runs/{id}/reviews",
3354
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/interactions",
3380
3355
  ...options,
3381
- headers: {
3382
- "Content-Type": "application/json",
3383
- ...options.headers,
3384
- },
3385
3356
  });
3386
3357
  }
3387
3358
  /**
3388
- * Start one claimed task run
3359
+ * List a session's monitors
3389
3360
  */
3390
- startTaskRun(options) {
3391
- return (options.client ?? this.client).post({
3361
+ listSessionMonitors(options) {
3362
+ return (options.client ?? this.client).get({
3392
3363
  responseStyle: "data",
3393
- url: "/api/task-runs/{id}/start",
3364
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/monitors",
3394
3365
  ...options,
3395
- headers: {
3396
- "Content-Type": "application/json",
3397
- ...options.headers,
3398
- },
3399
3366
  });
3400
3367
  }
3401
3368
  /**
3402
- * List a bounded task catalog page
3369
+ * Cancel a session monitor without waking the session
3403
3370
  */
3404
- listTasks(options) {
3405
- return (options?.client ?? this.client).get({
3371
+ cancelSessionMonitor(options) {
3372
+ return (options.client ?? this.client).post({
3406
3373
  responseStyle: "data",
3407
- url: "/api/tasks",
3374
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/monitors/{monitor_id}/cancel",
3408
3375
  ...options,
3409
3376
  });
3410
3377
  }
3411
3378
  /**
3412
- * Create a task
3379
+ * Move a session into a folder or back to the workspace root
3413
3380
  */
3414
- createTask(options) {
3381
+ moveSession(options) {
3415
3382
  return (options.client ?? this.client).post({
3416
3383
  responseStyle: "data",
3417
- url: "/api/tasks",
3384
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/move",
3418
3385
  ...options,
3419
3386
  headers: {
3420
3387
  "Content-Type": "application/json",
@@ -3423,32 +3390,22 @@ export class tasks extends HeyApiClient {
3423
3390
  });
3424
3391
  }
3425
3392
  /**
3426
- * Delete one task
3393
+ * Make an adopted child session top-level again
3427
3394
  */
3428
- deleteTask(options) {
3395
+ clearSessionParent(options) {
3429
3396
  return (options.client ?? this.client).delete({
3430
3397
  responseStyle: "data",
3431
- url: "/api/tasks/{id}",
3432
- ...options,
3433
- });
3434
- }
3435
- /**
3436
- * Get one task with detail
3437
- */
3438
- getTask(options) {
3439
- return (options.client ?? this.client).get({
3440
- responseStyle: "data",
3441
- url: "/api/tasks/{id}",
3398
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/parent",
3442
3399
  ...options,
3443
3400
  });
3444
3401
  }
3445
3402
  /**
3446
- * Update one task
3403
+ * Adopt a parentless user session as a child of another session
3447
3404
  */
3448
- updateTask(options) {
3449
- return (options.client ?? this.client).patch({
3405
+ setSessionParent(options) {
3406
+ return (options.client ?? this.client).put({
3450
3407
  responseStyle: "data",
3451
- url: "/api/tasks/{id}",
3408
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/parent",
3452
3409
  ...options,
3453
3410
  headers: {
3454
3411
  "Content-Type": "application/json",
@@ -3457,12 +3414,12 @@ export class tasks extends HeyApiClient {
3457
3414
  });
3458
3415
  }
3459
3416
  /**
3460
- * Approve one approval-gated task and enqueue executable work
3417
+ * Update operator session presence
3461
3418
  */
3462
- approveTask(options) {
3419
+ updateSessionPresence(options) {
3463
3420
  return (options.client ?? this.client).post({
3464
3421
  responseStyle: "data",
3465
- url: "/api/tasks/{id}/approve",
3422
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/presence",
3466
3423
  ...options,
3467
3424
  headers: {
3468
3425
  "Content-Type": "application/json",
@@ -3471,22 +3428,22 @@ export class tasks extends HeyApiClient {
3471
3428
  });
3472
3429
  }
3473
3430
  /**
3474
- * List typed task blocks
3431
+ * List attributed session processes
3475
3432
  */
3476
- listTaskBlocks(options) {
3433
+ listSessionProcesses(options) {
3477
3434
  return (options.client ?? this.client).get({
3478
3435
  responseStyle: "data",
3479
- url: "/api/tasks/{id}/blocks",
3436
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/processes",
3480
3437
  ...options,
3481
3438
  });
3482
3439
  }
3483
3440
  /**
3484
- * Create one typed task block
3441
+ * Terminate identity-verified session processes
3485
3442
  */
3486
- blockTask(options) {
3443
+ terminateSessionProcesses(options) {
3487
3444
  return (options.client ?? this.client).post({
3488
3445
  responseStyle: "data",
3489
- url: "/api/tasks/{id}/blocks",
3446
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/processes/terminate",
3490
3447
  ...options,
3491
3448
  headers: {
3492
3449
  "Content-Type": "application/json",
@@ -3495,112 +3452,100 @@ export class tasks extends HeyApiClient {
3495
3452
  });
3496
3453
  }
3497
3454
  /**
3498
- * Clear one typed task block
3455
+ * Cancel the active session prompt
3499
3456
  */
3500
- clearTaskBlock(options) {
3457
+ cancelSessionPrompt(options) {
3501
3458
  return (options.client ?? this.client).post({
3502
3459
  responseStyle: "data",
3503
- url: "/api/tasks/{id}/blocks/{block_id}/clear",
3460
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/cancel",
3504
3461
  ...options,
3505
- headers: {
3506
- "Content-Type": "application/json",
3507
- ...options.headers,
3508
- },
3509
3462
  });
3510
3463
  }
3511
3464
  /**
3512
- * Cancel one task tree
3465
+ * Clear queued input with attributed per-entry traces
3513
3466
  */
3514
- cancelTask(options) {
3515
- return (options.client ?? this.client).post({
3467
+ clearSessionInputs(options) {
3468
+ return (options.client ?? this.client).delete({
3516
3469
  responseStyle: "data",
3517
- url: "/api/tasks/{id}/cancel",
3470
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue",
3518
3471
  ...options,
3519
- headers: {
3520
- "Content-Type": "application/json",
3521
- ...options.headers,
3522
- },
3523
3472
  });
3524
3473
  }
3525
3474
  /**
3526
- * Create one child task
3475
+ * List pending session input
3527
3476
  */
3528
- createChildTask(options) {
3529
- return (options.client ?? this.client).post({
3477
+ listSessionInputs(options) {
3478
+ return (options.client ?? this.client).get({
3530
3479
  responseStyle: "data",
3531
- url: "/api/tasks/{id}/children",
3480
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue",
3532
3481
  ...options,
3533
- headers: {
3534
- "Content-Type": "application/json",
3535
- ...options.headers,
3536
- },
3537
3482
  });
3538
3483
  }
3539
3484
  /**
3540
- * Add one task dependency
3485
+ * Cancel a queued session prompt entry
3541
3486
  */
3542
- addTaskDependency(options) {
3543
- return (options.client ?? this.client).post({
3487
+ cancelQueuedSessionPrompt(options) {
3488
+ return (options.client ?? this.client).delete({
3544
3489
  responseStyle: "data",
3545
- url: "/api/tasks/{id}/dependencies",
3490
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}",
3546
3491
  ...options,
3547
- headers: {
3548
- "Content-Type": "application/json",
3549
- ...options.headers,
3550
- },
3551
3492
  });
3552
3493
  }
3553
3494
  /**
3554
- * Remove one task dependency
3495
+ * Replace queued session input atomically
3555
3496
  */
3556
- removeTaskDependency(options) {
3557
- return (options.client ?? this.client).delete({
3497
+ replaceSessionInput(options) {
3498
+ return (options.client ?? this.client).put({
3558
3499
  responseStyle: "data",
3559
- url: "/api/tasks/{id}/dependencies/{depends_on_id}",
3500
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}",
3560
3501
  ...options,
3502
+ headers: {
3503
+ "Content-Type": "application/json",
3504
+ ...options.headers,
3505
+ },
3561
3506
  });
3562
3507
  }
3563
3508
  /**
3564
- * Delete one task execution profile
3509
+ * Promote queued session input to steering
3565
3510
  */
3566
- deleteTaskExecutionProfile(options) {
3567
- return (options.client ?? this.client).delete({
3511
+ promoteSessionInput(options) {
3512
+ return (options.client ?? this.client).post({
3568
3513
  responseStyle: "data",
3569
- url: "/api/tasks/{id}/execution-profile",
3514
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}/steer",
3570
3515
  ...options,
3516
+ headers: {
3517
+ "Content-Type": "application/json",
3518
+ ...options.headers,
3519
+ },
3571
3520
  });
3572
3521
  }
3573
3522
  /**
3574
- * Get one task execution profile
3523
+ * Get a deterministic session recap
3575
3524
  */
3576
- getTaskExecutionProfile(options) {
3525
+ getSessionRecap(options) {
3577
3526
  return (options.client ?? this.client).get({
3578
3527
  responseStyle: "data",
3579
- url: "/api/tasks/{id}/execution-profile",
3528
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/recap",
3580
3529
  ...options,
3581
3530
  });
3582
3531
  }
3583
3532
  /**
3584
- * Replace one task execution profile
3533
+ * Inspect and repair an interrupted session transcript
3585
3534
  */
3586
- setTaskExecutionProfile(options) {
3587
- return (options.client ?? this.client).put({
3535
+ repairSession(options) {
3536
+ return (options.client ?? this.client).post({
3588
3537
  responseStyle: "data",
3589
- url: "/api/tasks/{id}/execution-profile",
3538
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/repair",
3590
3539
  ...options,
3591
- headers: {
3592
- "Content-Type": "application/json",
3593
- ...options.headers,
3594
- },
3595
3540
  });
3596
3541
  }
3597
3542
  /**
3598
- * Set one task worktree policy
3543
+ * Rewind a conversation before one durable user message
3599
3544
  */
3600
- setTaskWorktreePolicy(options) {
3601
- return (options.client ?? this.client).patch({
3545
+ rewindSessionConversation(options) {
3546
+ return (options.client ?? this.client).post({
3602
3547
  responseStyle: "data",
3603
- url: "/api/tasks/{id}/execution-profile/worktree",
3548
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/rewind",
3604
3549
  ...options,
3605
3550
  headers: {
3606
3551
  "Content-Type": "application/json",
@@ -3609,22 +3554,22 @@ export class tasks extends HeyApiClient {
3609
3554
  });
3610
3555
  }
3611
3556
  /**
3612
- * Inspect one task with diagnostics
3557
+ * Clear the default runtime for future prompts
3613
3558
  */
3614
- inspectTask(options) {
3615
- return (options.client ?? this.client).get({
3559
+ clearSessionRuntime(options) {
3560
+ return (options.client ?? this.client).delete({
3616
3561
  responseStyle: "data",
3617
- url: "/api/tasks/{id}/inspect",
3562
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/runtime",
3618
3563
  ...options,
3619
3564
  });
3620
3565
  }
3621
3566
  /**
3622
- * Pause one task for future scheduler claims
3567
+ * Select the default runtime for future prompts
3623
3568
  */
3624
- pauseTask(options) {
3625
- return (options.client ?? this.client).post({
3569
+ setSessionRuntime(options) {
3570
+ return (options.client ?? this.client).put({
3626
3571
  responseStyle: "data",
3627
- url: "/api/tasks/{id}/pause",
3572
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/runtime",
3628
3573
  ...options,
3629
3574
  headers: {
3630
3575
  "Content-Type": "application/json",
@@ -3633,12 +3578,12 @@ export class tasks extends HeyApiClient {
3633
3578
  });
3634
3579
  }
3635
3580
  /**
3636
- * Publish one draft task and enqueue executable work
3581
+ * Refresh an idle session's Soul snapshot through body-level CAS
3637
3582
  */
3638
- publishTask(options) {
3583
+ refreshSessionSoul(options) {
3639
3584
  return (options.client ?? this.client).post({
3640
3585
  responseStyle: "data",
3641
- url: "/api/tasks/{id}/publish",
3586
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/soul/refresh",
3642
3587
  ...options,
3643
3588
  headers: {
3644
3589
  "Content-Type": "application/json",
@@ -3647,36 +3592,36 @@ export class tasks extends HeyApiClient {
3647
3592
  });
3648
3593
  }
3649
3594
  /**
3650
- * Recover one task from needs_attention
3595
+ * Read compact session status and wake eligibility
3651
3596
  */
3652
- recoverTask(options) {
3653
- return (options.client ?? this.client).post({
3597
+ getSessionStatus(options) {
3598
+ return (options.client ?? this.client).get({
3654
3599
  responseStyle: "data",
3655
- url: "/api/tasks/{id}/recover",
3600
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/status",
3656
3601
  ...options,
3657
- headers: {
3658
- "Content-Type": "application/json",
3659
- ...options.headers,
3660
- },
3661
3602
  });
3662
3603
  }
3663
3604
  /**
3664
- * Reject one approval-gated task
3605
+ * Stage steering input for the active session turn
3665
3606
  */
3666
- rejectTask(options) {
3607
+ steerSessionPrompt(options) {
3667
3608
  return (options.client ?? this.client).post({
3668
3609
  responseStyle: "data",
3669
- url: "/api/tasks/{id}/reject",
3610
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/steer",
3670
3611
  ...options,
3612
+ headers: {
3613
+ "Content-Type": "application/json",
3614
+ ...options.headers,
3615
+ },
3671
3616
  });
3672
3617
  }
3673
3618
  /**
3674
- * Resume one paused task for future scheduler claims
3619
+ * Stop a session without deleting persisted history
3675
3620
  */
3676
- resumeTask(options) {
3621
+ stopSession(options) {
3677
3622
  return (options.client ?? this.client).post({
3678
3623
  responseStyle: "data",
3679
- url: "/api/tasks/{id}/resume",
3624
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/stop",
3680
3625
  ...options,
3681
3626
  headers: {
3682
3627
  "Content-Type": "application/json",
@@ -3685,32 +3630,32 @@ export class tasks extends HeyApiClient {
3685
3630
  });
3686
3631
  }
3687
3632
  /**
3688
- * List task-run reviews for one task
3633
+ * List a session's subagents
3689
3634
  */
3690
- listTaskReviews(options) {
3635
+ listSessionSubagents(options) {
3691
3636
  return (options.client ?? this.client).get({
3692
3637
  responseStyle: "data",
3693
- url: "/api/tasks/{id}/reviews",
3638
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/subagents",
3694
3639
  ...options,
3695
3640
  });
3696
3641
  }
3697
3642
  /**
3698
- * List runs for one task
3643
+ * List session-callable registry tools
3699
3644
  */
3700
- listTaskRuns(options) {
3645
+ listSessionTools(options) {
3701
3646
  return (options.client ?? this.client).get({
3702
3647
  responseStyle: "data",
3703
- url: "/api/tasks/{id}/runs",
3648
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/tools",
3704
3649
  ...options,
3705
3650
  });
3706
3651
  }
3707
3652
  /**
3708
- * Enqueue one task run
3653
+ * Search session-callable registry tools
3709
3654
  */
3710
- enqueueTaskRun(options) {
3655
+ searchSessionTools(options) {
3711
3656
  return (options.client ?? this.client).post({
3712
3657
  responseStyle: "data",
3713
- url: "/api/tasks/{id}/runs",
3658
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/tools/search",
3714
3659
  ...options,
3715
3660
  headers: {
3716
3661
  "Content-Type": "application/json",
@@ -3719,102 +3664,96 @@ export class tasks extends HeyApiClient {
3719
3664
  });
3720
3665
  }
3721
3666
  /**
3722
- * Enqueue designated sibling runs for one task
3667
+ * Get a bounded materialized transcript page
3723
3668
  */
3724
- fanOutTaskRuns(options) {
3725
- return (options.client ?? this.client).post({
3669
+ getSessionTranscript(options) {
3670
+ return (options.client ?? this.client).get({
3726
3671
  responseStyle: "data",
3727
- url: "/api/tasks/{id}/runs/fan-out",
3672
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript",
3728
3673
  ...options,
3729
- headers: {
3730
- "Content-Type": "application/json",
3731
- ...options.headers,
3732
- },
3733
3674
  });
3734
3675
  }
3735
3676
  /**
3736
- * Start one task by enqueueing executable work
3677
+ * Get the full retained operator-message trail with reply previews
3737
3678
  */
3738
- startTask(options) {
3739
- return (options.client ?? this.client).post({
3679
+ getSessionTranscriptOutline(options) {
3680
+ return (options.client ?? this.client).get({
3740
3681
  responseStyle: "data",
3741
- url: "/api/tasks/{id}/start",
3682
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript/outline",
3742
3683
  ...options,
3743
- headers: {
3744
- "Content-Type": "application/json",
3745
- ...options.headers,
3746
- },
3747
3684
  });
3748
3685
  }
3749
3686
  /**
3750
- * Get one task timeline
3687
+ * Search retained transcript messages with bounded literal matches
3751
3688
  */
3752
- getTaskTimeline(options) {
3689
+ searchSessionTranscript(options) {
3753
3690
  return (options.client ?? this.client).get({
3754
3691
  responseStyle: "data",
3755
- url: "/api/tasks/{id}/timeline",
3692
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript/search",
3756
3693
  ...options,
3757
3694
  });
3758
3695
  }
3759
3696
  /**
3760
- * Get one task tree live view
3697
+ * Restore an archived session
3761
3698
  */
3762
- getTaskTree(options) {
3763
- return (options.client ?? this.client).get({
3699
+ unarchiveSession(options) {
3700
+ return (options.client ?? this.client).post({
3764
3701
  responseStyle: "data",
3765
- url: "/api/tasks/{id}/tree",
3702
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/unarchive",
3766
3703
  ...options,
3767
3704
  });
3768
3705
  }
3769
3706
  /**
3770
- * Archive one task inbox item
3707
+ * Get aggregated token usage for a session
3771
3708
  */
3772
- archiveTask(options) {
3773
- return (options.client ?? this.client).post({
3709
+ getSessionUsage(options) {
3710
+ return (options.client ?? this.client).get({
3774
3711
  responseStyle: "data",
3775
- url: "/api/tasks/{id}/triage/archive",
3712
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/usage",
3776
3713
  ...options,
3777
3714
  });
3778
3715
  }
3779
3716
  /**
3780
- * Dismiss one task inbox item
3717
+ * Get per-turn session usage and native compaction markers
3781
3718
  */
3782
- dismissTask(options) {
3783
- return (options.client ?? this.client).post({
3719
+ getSessionUsageTurns(options) {
3720
+ return (options.client ?? this.client).get({
3784
3721
  responseStyle: "data",
3785
- url: "/api/tasks/{id}/triage/dismiss",
3722
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/usage/turns",
3786
3723
  ...options,
3787
3724
  });
3788
3725
  }
3789
3726
  /**
3790
- * Mark one task inbox item as read
3727
+ * Wait for a session state
3791
3728
  */
3792
- markTaskRead(options) {
3729
+ waitForSession(options) {
3793
3730
  return (options.client ?? this.client).post({
3794
3731
  responseStyle: "data",
3795
- url: "/api/tasks/{id}/triage/read",
3732
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/wait",
3796
3733
  ...options,
3734
+ headers: {
3735
+ "Content-Type": "application/json",
3736
+ ...options.headers,
3737
+ },
3797
3738
  });
3798
3739
  }
3799
- }
3800
- export class sessions extends HeyApiClient {
3801
3740
  /**
3802
- * List sessions
3741
+ * Return an idle session to the workspace root in place
3803
3742
  */
3804
- listSessions(options) {
3805
- return (options?.client ?? this.client).get({
3743
+ unbindSessionWorktree(options) {
3744
+ return (options.client ?? this.client).delete({
3806
3745
  responseStyle: "data",
3807
- url: "/api/sessions",
3746
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree",
3808
3747
  ...options,
3809
3748
  });
3810
3749
  }
3811
3750
  /**
3812
- * Create a session
3751
+ * Bind an idle existing session to a ready worktree in place
3813
3752
  */
3814
- createSession(options) {
3815
- return (options.client ?? this.client).post({
3753
+ bindSessionWorktree(options) {
3754
+ return (options.client ?? this.client).put({
3816
3755
  responseStyle: "data",
3817
- url: "/api/sessions",
3756
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree",
3818
3757
  ...options,
3819
3758
  headers: {
3820
3759
  "Content-Type": "application/json",
@@ -3823,132 +3762,154 @@ export class sessions extends HeyApiClient {
3823
3762
  });
3824
3763
  }
3825
3764
  /**
3826
- * Get exact session attention counts
3765
+ * Fork a live session into a worktree
3827
3766
  */
3828
- getSessionAttentionSummary(options) {
3829
- return (options?.client ?? this.client).get({
3767
+ forkSessionToWorktree(options) {
3768
+ return (options.client ?? this.client).post({
3830
3769
  responseStyle: "data",
3831
- url: "/api/sessions/attention-summary",
3770
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree-fork",
3832
3771
  ...options,
3772
+ headers: {
3773
+ "Content-Type": "application/json",
3774
+ ...options.headers,
3775
+ },
3833
3776
  });
3834
3777
  }
3835
3778
  /**
3836
- * Count session catalog facets
3779
+ * Read one subagent
3837
3780
  */
3838
- listSessionFacets(options) {
3839
- return (options?.client ?? this.client).get({
3781
+ getSubagent(options) {
3782
+ return (options.client ?? this.client).get({
3840
3783
  responseStyle: "data",
3841
- url: "/api/sessions/facets",
3784
+ url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}",
3842
3785
  ...options,
3843
3786
  });
3844
3787
  }
3845
3788
  /**
3846
- * Get one session snapshot by id
3789
+ * Cancel a delegated subagent
3847
3790
  */
3848
- getSessionByID(options) {
3849
- return (options.client ?? this.client).get({
3791
+ cancelSubagent(options) {
3792
+ return (options.client ?? this.client).post({
3850
3793
  responseStyle: "data",
3851
- url: "/api/sessions/{session_id}",
3794
+ url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}/cancel",
3852
3795
  ...options,
3796
+ headers: {
3797
+ "Content-Type": "application/json",
3798
+ ...options.headers,
3799
+ },
3853
3800
  });
3854
3801
  }
3802
+ }
3803
+ export class profiles extends HeyApiClient {
3855
3804
  /**
3856
- * List persisted session events for a Global session
3805
+ * List profiles
3857
3806
  */
3858
- listGlobalSessionEvents(options) {
3859
- return (options.client ?? this.client).get({
3807
+ listProfiles(options) {
3808
+ return (options?.client ?? this.client).get({
3860
3809
  responseStyle: "data",
3861
- url: "/api/sessions/{session_id}/events",
3810
+ url: "/api/profiles",
3862
3811
  ...options,
3863
3812
  });
3864
3813
  }
3865
3814
  /**
3866
- * List grouped session turn history for a Global session
3815
+ * Create a profile
3867
3816
  */
3868
- getGlobalSessionHistory(options) {
3869
- return (options.client ?? this.client).get({
3817
+ createProfile(options) {
3818
+ return (options.client ?? this.client).post({
3870
3819
  responseStyle: "data",
3871
- url: "/api/sessions/{session_id}/history",
3820
+ url: "/api/profiles",
3872
3821
  ...options,
3822
+ headers: {
3823
+ "Content-Type": "application/json",
3824
+ ...options.headers,
3825
+ },
3873
3826
  });
3874
3827
  }
3875
3828
  /**
3876
- * Get a session owner; Global history has an empty workspace id
3829
+ * List profile lifecycle operations
3877
3830
  */
3878
- getSessionOwner(options) {
3879
- return (options.client ?? this.client).get({
3831
+ listProfileOperations(options) {
3832
+ return (options?.client ?? this.client).get({
3880
3833
  responseStyle: "data",
3881
- url: "/api/sessions/{session_id}/owner",
3834
+ url: "/api/profiles/ops",
3882
3835
  ...options,
3883
3836
  });
3884
3837
  }
3885
3838
  /**
3886
- * Refresh a session pull request
3839
+ * Retry a profile lifecycle operation
3887
3840
  */
3888
- refreshSessionPullRequest(options) {
3841
+ retryProfileOperation(options) {
3889
3842
  return (options.client ?? this.client).post({
3890
3843
  responseStyle: "data",
3891
- url: "/api/sessions/{session_id}/pull-request/refresh",
3844
+ url: "/api/profiles/ops/{op_id}/retry",
3892
3845
  ...options,
3893
3846
  });
3894
3847
  }
3895
3848
  /**
3896
- * Read compact session status and wake eligibility for a Global session
3849
+ * Read profile selections
3897
3850
  */
3898
- getGlobalSessionStatus(options) {
3899
- return (options.client ?? this.client).get({
3851
+ getProfileSelections(options) {
3852
+ return (options?.client ?? this.client).get({
3900
3853
  responseStyle: "data",
3901
- url: "/api/sessions/{session_id}/status",
3854
+ url: "/api/profiles/selection",
3902
3855
  ...options,
3903
3856
  });
3904
3857
  }
3905
3858
  /**
3906
- * Get a bounded materialized transcript page for a Global session
3859
+ * Remember a profile selection
3907
3860
  */
3908
- getGlobalSessionTranscript(options) {
3909
- return (options.client ?? this.client).get({
3861
+ putProfileSelection(options) {
3862
+ return (options.client ?? this.client).put({
3910
3863
  responseStyle: "data",
3911
- url: "/api/sessions/{session_id}/transcript",
3864
+ url: "/api/profiles/selection",
3912
3865
  ...options,
3866
+ headers: {
3867
+ "Content-Type": "application/json",
3868
+ ...options.headers,
3869
+ },
3913
3870
  });
3914
3871
  }
3915
3872
  /**
3916
- * Get the full retained operator-message trail with reply previews for a Global session
3873
+ * Delete a profile
3917
3874
  */
3918
- getGlobalSessionTranscriptOutline(options) {
3919
- return (options.client ?? this.client).get({
3875
+ deleteProfile(options) {
3876
+ return (options.client ?? this.client).delete({
3920
3877
  responseStyle: "data",
3921
- url: "/api/sessions/{session_id}/transcript/outline",
3878
+ url: "/api/profiles/{name}",
3922
3879
  ...options,
3923
3880
  });
3924
3881
  }
3925
3882
  /**
3926
- * Search retained transcript messages with bounded literal matches for a Global session
3883
+ * Get a profile
3927
3884
  */
3928
- searchGlobalSessionTranscript(options) {
3885
+ getProfile(options) {
3929
3886
  return (options.client ?? this.client).get({
3930
3887
  responseStyle: "data",
3931
- url: "/api/sessions/{session_id}/transcript/search",
3888
+ url: "/api/profiles/{name}",
3932
3889
  ...options,
3933
3890
  });
3934
3891
  }
3935
3892
  /**
3936
- * List session folders in manual order
3893
+ * Update profile identity
3937
3894
  */
3938
- listSessionFolders(options) {
3939
- return (options.client ?? this.client).get({
3895
+ updateProfile(options) {
3896
+ return (options.client ?? this.client).patch({
3940
3897
  responseStyle: "data",
3941
- url: "/api/workspaces/{workspace_id}/session-folders",
3898
+ url: "/api/profiles/{name}",
3942
3899
  ...options,
3900
+ headers: {
3901
+ "Content-Type": "application/json",
3902
+ ...options.headers,
3903
+ },
3943
3904
  });
3944
3905
  }
3945
3906
  /**
3946
- * Create a session folder
3907
+ * Archive a profile
3947
3908
  */
3948
- createSessionFolder(options) {
3909
+ archiveProfile(options) {
3949
3910
  return (options.client ?? this.client).post({
3950
3911
  responseStyle: "data",
3951
- url: "/api/workspaces/{workspace_id}/session-folders",
3912
+ url: "/api/profiles/{name}/archive",
3952
3913
  ...options,
3953
3914
  headers: {
3954
3915
  "Content-Type": "application/json",
@@ -3957,36 +3918,32 @@ export class sessions extends HeyApiClient {
3957
3918
  });
3958
3919
  }
3959
3920
  /**
3960
- * Delete a session folder; its sessions return to the workspace root
3921
+ * Preview profile archival
3961
3922
  */
3962
- deleteSessionFolder(options) {
3963
- return (options.client ?? this.client).delete({
3923
+ prepareProfileArchive(options) {
3924
+ return (options.client ?? this.client).get({
3964
3925
  responseStyle: "data",
3965
- url: "/api/workspaces/{workspace_id}/session-folders/{folder_id}",
3926
+ url: "/api/profiles/{name}/archive-plan",
3966
3927
  ...options,
3967
3928
  });
3968
3929
  }
3969
3930
  /**
3970
- * Rename a session folder
3931
+ * Preview profile deletion
3971
3932
  */
3972
- renameSessionFolder(options) {
3973
- return (options.client ?? this.client).patch({
3933
+ prepareProfileDelete(options) {
3934
+ return (options.client ?? this.client).get({
3974
3935
  responseStyle: "data",
3975
- url: "/api/workspaces/{workspace_id}/session-folders/{folder_id}",
3936
+ url: "/api/profiles/{name}/delete-plan",
3976
3937
  ...options,
3977
- headers: {
3978
- "Content-Type": "application/json",
3979
- ...options.headers,
3980
- },
3981
3938
  });
3982
3939
  }
3983
3940
  /**
3984
- * Set the complete session folder order
3941
+ * Rename a profile
3985
3942
  */
3986
- reorderSessionFolders(options) {
3987
- return (options.client ?? this.client).put({
3943
+ renameProfile(options) {
3944
+ return (options.client ?? this.client).post({
3988
3945
  responseStyle: "data",
3989
- url: "/api/workspaces/{workspace_id}/session-order/folders",
3946
+ url: "/api/profiles/{name}/rename",
3990
3947
  ...options,
3991
3948
  headers: {
3992
3949
  "Content-Type": "application/json",
@@ -3995,12 +3952,22 @@ export class sessions extends HeyApiClient {
3995
3952
  });
3996
3953
  }
3997
3954
  /**
3998
- * Set the manual session order in a folder or the workspace root
3955
+ * Preview a profile rename
3999
3956
  */
4000
- reorderSessions(options) {
4001
- return (options.client ?? this.client).put({
3957
+ prepareProfileRename(options) {
3958
+ return (options.client ?? this.client).get({
4002
3959
  responseStyle: "data",
4003
- url: "/api/workspaces/{workspace_id}/session-order/sessions",
3960
+ url: "/api/profiles/{name}/rename-plan",
3961
+ ...options,
3962
+ });
3963
+ }
3964
+ /**
3965
+ * Unarchive a profile
3966
+ */
3967
+ unarchiveProfile(options) {
3968
+ return (options.client ?? this.client).post({
3969
+ responseStyle: "data",
3970
+ url: "/api/profiles/{name}/unarchive",
4004
3971
  ...options,
4005
3972
  headers: {
4006
3973
  "Content-Type": "application/json",
@@ -4008,43 +3975,59 @@ export class sessions extends HeyApiClient {
4008
3975
  },
4009
3976
  });
4010
3977
  }
3978
+ }
3979
+ export class resources extends HeyApiClient {
4011
3980
  /**
4012
- * List sessions
3981
+ * List desired-state resources on the local operator control plane
4013
3982
  */
4014
- listWorkspaceSessions(options) {
3983
+ listResources(options) {
3984
+ return (options?.client ?? this.client).get({
3985
+ responseStyle: "data",
3986
+ url: "/api/resources",
3987
+ ...options,
3988
+ });
3989
+ }
3990
+ /**
3991
+ * List one desired-state resource kind on the local operator control plane
3992
+ */
3993
+ listResourcesByKind(options) {
4015
3994
  return (options.client ?? this.client).get({
4016
3995
  responseStyle: "data",
4017
- url: "/api/workspaces/{workspace_id}/sessions",
3996
+ url: "/api/resources/{kind}",
4018
3997
  ...options,
4019
3998
  });
4020
3999
  }
4021
4000
  /**
4022
- * Delete one session and remove it from persisted history
4001
+ * Delete one desired-state resource on the local operator control plane
4023
4002
  */
4024
- deleteSession(options) {
4003
+ deleteResource(options) {
4025
4004
  return (options.client ?? this.client).delete({
4026
4005
  responseStyle: "data",
4027
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
4006
+ url: "/api/resources/{kind}/{id}",
4028
4007
  ...options,
4008
+ headers: {
4009
+ "Content-Type": "application/json",
4010
+ ...options.headers,
4011
+ },
4029
4012
  });
4030
4013
  }
4031
4014
  /**
4032
- * Get one session snapshot
4015
+ * Read one desired-state resource on the local operator control plane
4033
4016
  */
4034
- getSession(options) {
4017
+ getResource(options) {
4035
4018
  return (options.client ?? this.client).get({
4036
4019
  responseStyle: "data",
4037
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
4020
+ url: "/api/resources/{kind}/{id}",
4038
4021
  ...options,
4039
4022
  });
4040
4023
  }
4041
4024
  /**
4042
- * Rename one user session
4025
+ * Create or replace one desired-state resource on the local operator control plane
4043
4026
  */
4044
- renameSession(options) {
4045
- return (options.client ?? this.client).patch({
4027
+ putResource(options) {
4028
+ return (options.client ?? this.client).put({
4046
4029
  responseStyle: "data",
4047
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
4030
+ url: "/api/resources/{kind}/{id}",
4048
4031
  ...options,
4049
4032
  headers: {
4050
4033
  "Content-Type": "application/json",
@@ -4052,37 +4035,37 @@ export class sessions extends HeyApiClient {
4052
4035
  },
4053
4036
  });
4054
4037
  }
4038
+ }
4039
+ export class roles extends HeyApiClient {
4055
4040
  /**
4056
- * Approve or deny an interactive permission request
4041
+ * List effective background role configuration
4057
4042
  */
4058
- approveSession(options) {
4059
- return (options.client ?? this.client).post({
4043
+ listRoles(options) {
4044
+ return (options?.client ?? this.client).get({
4060
4045
  responseStyle: "data",
4061
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/approve",
4046
+ url: "/api/roles",
4062
4047
  ...options,
4063
- headers: {
4064
- "Content-Type": "application/json",
4065
- ...options.headers,
4066
- },
4067
4048
  });
4068
4049
  }
4069
4050
  /**
4070
- * Archive a stopped session, or stop and archive a live session with stop=true
4051
+ * Get effective background role configuration
4071
4052
  */
4072
- archiveSession(options) {
4073
- return (options.client ?? this.client).post({
4053
+ getRole(options) {
4054
+ return (options.client ?? this.client).get({
4074
4055
  responseStyle: "data",
4075
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/archive",
4056
+ url: "/api/roles/{role}",
4076
4057
  ...options,
4077
4058
  });
4078
4059
  }
4060
+ }
4061
+ export class tasks extends HeyApiClient {
4079
4062
  /**
4080
- * Attach to a resumable live session
4063
+ * Force fail a bounded set of queued or claimed task runs
4081
4064
  */
4082
- attachSession(options) {
4065
+ bulkForceFailTaskRuns(options) {
4083
4066
  return (options.client ?? this.client).post({
4084
4067
  responseStyle: "data",
4085
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attach",
4068
+ url: "/api/runs/bulk/fail",
4086
4069
  ...options,
4087
4070
  headers: {
4088
4071
  "Content-Type": "application/json",
@@ -4091,57 +4074,64 @@ export class sessions extends HeyApiClient {
4091
4074
  });
4092
4075
  }
4093
4076
  /**
4094
- * Upload a session attachment
4077
+ * Force release a bounded set of claimed task runs
4095
4078
  */
4096
- uploadSessionAttachment(options) {
4079
+ bulkForceReleaseTaskRuns(options) {
4097
4080
  return (options.client ?? this.client).post({
4098
- ...formDataBodySerializer,
4099
4081
  responseStyle: "data",
4100
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments",
4082
+ url: "/api/runs/bulk/release",
4101
4083
  ...options,
4102
4084
  headers: {
4103
- "Content-Type": null,
4085
+ "Content-Type": "application/json",
4104
4086
  ...options.headers,
4105
4087
  },
4106
4088
  });
4107
4089
  }
4108
4090
  /**
4109
- * Delete a session attachment
4091
+ * Force fail one queued or claimed task run
4110
4092
  */
4111
- deleteSessionAttachment(options) {
4112
- return (options.client ?? this.client).delete({
4093
+ forceFailTaskRun(options) {
4094
+ return (options.client ?? this.client).post({
4113
4095
  responseStyle: "data",
4114
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments/{attachment_id}",
4096
+ url: "/api/runs/{id}/fail",
4115
4097
  ...options,
4098
+ headers: {
4099
+ "Content-Type": "application/json",
4100
+ ...options.headers,
4101
+ },
4116
4102
  });
4117
4103
  }
4118
4104
  /**
4119
- * Read session attachment bytes
4105
+ * Inspect one task run with diagnostics
4120
4106
  */
4121
- readSessionAttachmentBytes(options) {
4107
+ inspectRun(options) {
4122
4108
  return (options.client ?? this.client).get({
4123
4109
  responseStyle: "data",
4124
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments/{attachment_id}/bytes",
4110
+ url: "/api/runs/{id}/inspect",
4125
4111
  ...options,
4126
4112
  });
4127
4113
  }
4128
4114
  /**
4129
- * List the live pending clarification for a session
4115
+ * Recover one needs_attention task run
4130
4116
  */
4131
- listSessionClarifications(options) {
4132
- return (options.client ?? this.client).get({
4117
+ recoverTaskRun(options) {
4118
+ return (options.client ?? this.client).post({
4133
4119
  responseStyle: "data",
4134
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clarifications",
4120
+ url: "/api/runs/{id}/recover",
4135
4121
  ...options,
4122
+ headers: {
4123
+ "Content-Type": "application/json",
4124
+ ...options.headers,
4125
+ },
4136
4126
  });
4137
4127
  }
4138
4128
  /**
4139
- * Answer a live session clarification
4129
+ * Force release one claimed task run
4140
4130
  */
4141
- answerSessionClarification(options) {
4131
+ forceReleaseTaskRun(options) {
4142
4132
  return (options.client ?? this.client).post({
4143
4133
  responseStyle: "data",
4144
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clarifications/{request_id}/answer",
4134
+ url: "/api/runs/{id}/release",
4145
4135
  ...options,
4146
4136
  headers: {
4147
4137
  "Content-Type": "application/json",
@@ -4150,92 +4140,122 @@ export class sessions extends HeyApiClient {
4150
4140
  });
4151
4141
  }
4152
4142
  /**
4153
- * Clear conversation history and restart the session context
4143
+ * Retry one failed task run
4154
4144
  */
4155
- clearSessionConversation(options) {
4145
+ retryTaskRun(options) {
4156
4146
  return (options.client ?? this.client).post({
4157
4147
  responseStyle: "data",
4158
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clear",
4148
+ url: "/api/runs/{id}/retry",
4159
4149
  ...options,
4150
+ headers: {
4151
+ "Content-Type": "application/json",
4152
+ ...options.headers,
4153
+ },
4160
4154
  });
4161
4155
  }
4162
4156
  /**
4163
- * List commands available to a session
4157
+ * Get scheduler pause state and queue pressure
4164
4158
  */
4165
- getSessionCommands(options) {
4166
- return (options.client ?? this.client).get({
4159
+ getScheduler(options) {
4160
+ return (options?.client ?? this.client).get({
4167
4161
  responseStyle: "data",
4168
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/commands",
4162
+ url: "/api/scheduler",
4169
4163
  ...options,
4170
4164
  });
4171
4165
  }
4172
4166
  /**
4173
- * Request advertised native agent compaction (experimental)
4174
- *
4175
- * @stability experimental
4167
+ * List queued scheduler backlog rows
4176
4168
  */
4177
- compactSession(options) {
4178
- return (options.client ?? this.client).post({
4169
+ getSchedulerBacklog(options) {
4170
+ return (options?.client ?? this.client).get({
4179
4171
  responseStyle: "data",
4180
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/compact",
4172
+ url: "/api/scheduler/backlog",
4173
+ ...options,
4174
+ });
4175
+ }
4176
+ /**
4177
+ * Pause the scheduler and wait for active claims to drain
4178
+ */
4179
+ drainScheduler(options) {
4180
+ return (options?.client ?? this.client).post({
4181
+ responseStyle: "data",
4182
+ url: "/api/scheduler/drain",
4181
4183
  ...options,
4182
4184
  headers: {
4183
4185
  "Content-Type": "application/json",
4184
- ...options.headers,
4186
+ ...options?.headers,
4185
4187
  },
4186
4188
  });
4187
4189
  }
4188
4190
  /**
4189
- * Continue a session with another agent, runtime, or declared route
4191
+ * Pause scheduler dispatch and task-run claims
4190
4192
  */
4191
- continueSession(options) {
4192
- return (options.client ?? this.client).post({
4193
+ pauseScheduler(options) {
4194
+ return (options?.client ?? this.client).post({
4193
4195
  responseStyle: "data",
4194
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/continue",
4196
+ url: "/api/scheduler/pause",
4195
4197
  ...options,
4196
4198
  headers: {
4197
4199
  "Content-Type": "application/json",
4198
- ...options.headers,
4200
+ ...options?.headers,
4199
4201
  },
4200
4202
  });
4201
4203
  }
4202
4204
  /**
4203
- * Preview what a continue or fork of a session would carry
4205
+ * Resume scheduler dispatch and task-run claims
4204
4206
  */
4205
- previewSessionDerive(options) {
4206
- return (options.client ?? this.client).get({
4207
+ resumeScheduler(options) {
4208
+ return (options?.client ?? this.client).post({
4207
4209
  responseStyle: "data",
4208
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/derive/preview",
4210
+ url: "/api/scheduler/resume",
4209
4211
  ...options,
4212
+ headers: {
4213
+ "Content-Type": "application/json",
4214
+ ...options?.headers,
4215
+ },
4210
4216
  });
4211
4217
  }
4212
4218
  /**
4213
- * List persisted session events
4219
+ * Get one task-run review
4214
4220
  */
4215
- listSessionEvents(options) {
4221
+ getTaskRunReview(options) {
4216
4222
  return (options.client ?? this.client).get({
4217
4223
  responseStyle: "data",
4218
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/events",
4224
+ url: "/api/task-reviews/{id}",
4219
4225
  ...options,
4220
4226
  });
4221
4227
  }
4222
4228
  /**
4223
- * Search files and folders under a session's working directory
4229
+ * Submit one task-run review verdict
4224
4230
  */
4225
- searchSessionFiles(options) {
4231
+ submitTaskRunReviewVerdict(options) {
4232
+ return (options.client ?? this.client).post({
4233
+ responseStyle: "data",
4234
+ url: "/api/task-reviews/{id}/verdict",
4235
+ ...options,
4236
+ headers: {
4237
+ "Content-Type": "application/json",
4238
+ ...options.headers,
4239
+ },
4240
+ });
4241
+ }
4242
+ /**
4243
+ * Get one task run detail
4244
+ */
4245
+ getTaskRun(options) {
4226
4246
  return (options.client ?? this.client).get({
4227
4247
  responseStyle: "data",
4228
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/files",
4248
+ url: "/api/task-runs/{id}",
4229
4249
  ...options,
4230
4250
  });
4231
4251
  }
4232
4252
  /**
4233
- * Fork a session with the same agent, whole or through one user message and its turn
4253
+ * Attach an existing session to one task run
4234
4254
  */
4235
- forkSession(options) {
4255
+ attachTaskRunSession(options) {
4236
4256
  return (options.client ?? this.client).post({
4237
4257
  responseStyle: "data",
4238
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/fork",
4258
+ url: "/api/task-runs/{id}/attach-session",
4239
4259
  ...options,
4240
4260
  headers: {
4241
4261
  "Content-Type": "application/json",
@@ -4244,72 +4264,88 @@ export class sessions extends HeyApiClient {
4244
4264
  });
4245
4265
  }
4246
4266
  /**
4247
- * Read metadata-only session health and wake eligibility
4267
+ * Cancel one task run
4248
4268
  */
4249
- getSessionHealth(options) {
4250
- return (options.client ?? this.client).get({
4269
+ cancelTaskRun(options) {
4270
+ return (options.client ?? this.client).post({
4251
4271
  responseStyle: "data",
4252
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/health",
4272
+ url: "/api/task-runs/{id}/cancel",
4253
4273
  ...options,
4274
+ headers: {
4275
+ "Content-Type": "application/json",
4276
+ ...options.headers,
4277
+ },
4254
4278
  });
4255
4279
  }
4256
4280
  /**
4257
- * List grouped session turn history
4281
+ * Complete one running task run
4258
4282
  */
4259
- getSessionHistory(options) {
4260
- return (options.client ?? this.client).get({
4283
+ completeTaskRun(options) {
4284
+ return (options.client ?? this.client).post({
4261
4285
  responseStyle: "data",
4262
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/history",
4286
+ url: "/api/task-runs/{id}/complete",
4263
4287
  ...options,
4288
+ headers: {
4289
+ "Content-Type": "application/json",
4290
+ ...options.headers,
4291
+ },
4264
4292
  });
4265
4293
  }
4266
4294
  /**
4267
- * Inspect session health, wake audit, and policy correlation metadata
4295
+ * Fail one task run
4268
4296
  */
4269
- inspectSession(options) {
4270
- return (options.client ?? this.client).get({
4297
+ failTaskRun(options) {
4298
+ return (options.client ?? this.client).post({
4271
4299
  responseStyle: "data",
4272
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/inspect",
4300
+ url: "/api/task-runs/{id}/fail",
4273
4301
  ...options,
4302
+ headers: {
4303
+ "Content-Type": "application/json",
4304
+ ...options.headers,
4305
+ },
4274
4306
  });
4275
4307
  }
4276
4308
  /**
4277
- * List pending session interactions
4309
+ * Read one exact byte page from a task-run result
4278
4310
  */
4279
- listSessionInteractions(options) {
4311
+ readTaskRunResult(options) {
4280
4312
  return (options.client ?? this.client).get({
4281
4313
  responseStyle: "data",
4282
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/interactions",
4314
+ url: "/api/task-runs/{id}/result",
4283
4315
  ...options,
4284
4316
  });
4285
4317
  }
4286
4318
  /**
4287
- * List a session's monitors
4319
+ * List reviews for one task run
4288
4320
  */
4289
- listSessionMonitors(options) {
4321
+ listTaskRunReviews(options) {
4290
4322
  return (options.client ?? this.client).get({
4291
4323
  responseStyle: "data",
4292
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/monitors",
4324
+ url: "/api/task-runs/{id}/reviews",
4293
4325
  ...options,
4294
4326
  });
4295
4327
  }
4296
4328
  /**
4297
- * Cancel a session monitor without waking the session
4329
+ * Request review for one terminal task run
4298
4330
  */
4299
- cancelSessionMonitor(options) {
4331
+ requestTaskRunReview(options) {
4300
4332
  return (options.client ?? this.client).post({
4301
4333
  responseStyle: "data",
4302
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/monitors/{monitor_id}/cancel",
4334
+ url: "/api/task-runs/{id}/reviews",
4303
4335
  ...options,
4336
+ headers: {
4337
+ "Content-Type": "application/json",
4338
+ ...options.headers,
4339
+ },
4304
4340
  });
4305
4341
  }
4306
4342
  /**
4307
- * Move a session into a folder or back to the workspace root
4343
+ * Start one claimed task run
4308
4344
  */
4309
- moveSession(options) {
4345
+ startTaskRun(options) {
4310
4346
  return (options.client ?? this.client).post({
4311
4347
  responseStyle: "data",
4312
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/move",
4348
+ url: "/api/task-runs/{id}/start",
4313
4349
  ...options,
4314
4350
  headers: {
4315
4351
  "Content-Type": "application/json",
@@ -4318,22 +4354,22 @@ export class sessions extends HeyApiClient {
4318
4354
  });
4319
4355
  }
4320
4356
  /**
4321
- * Make an adopted child session top-level again
4357
+ * List a bounded task catalog page
4322
4358
  */
4323
- clearSessionParent(options) {
4324
- return (options.client ?? this.client).delete({
4359
+ listTasks(options) {
4360
+ return (options?.client ?? this.client).get({
4325
4361
  responseStyle: "data",
4326
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/parent",
4362
+ url: "/api/tasks",
4327
4363
  ...options,
4328
4364
  });
4329
4365
  }
4330
4366
  /**
4331
- * Adopt a parentless user session as a child of another session
4367
+ * Create a task
4332
4368
  */
4333
- setSessionParent(options) {
4334
- return (options.client ?? this.client).put({
4369
+ createTask(options) {
4370
+ return (options.client ?? this.client).post({
4335
4371
  responseStyle: "data",
4336
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/parent",
4372
+ url: "/api/tasks",
4337
4373
  ...options,
4338
4374
  headers: {
4339
4375
  "Content-Type": "application/json",
@@ -4342,12 +4378,32 @@ export class sessions extends HeyApiClient {
4342
4378
  });
4343
4379
  }
4344
4380
  /**
4345
- * Update operator session presence
4381
+ * Delete one task
4346
4382
  */
4347
- updateSessionPresence(options) {
4348
- return (options.client ?? this.client).post({
4383
+ deleteTask(options) {
4384
+ return (options.client ?? this.client).delete({
4349
4385
  responseStyle: "data",
4350
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/presence",
4386
+ url: "/api/tasks/{id}",
4387
+ ...options,
4388
+ });
4389
+ }
4390
+ /**
4391
+ * Get one task with detail
4392
+ */
4393
+ getTask(options) {
4394
+ return (options.client ?? this.client).get({
4395
+ responseStyle: "data",
4396
+ url: "/api/tasks/{id}",
4397
+ ...options,
4398
+ });
4399
+ }
4400
+ /**
4401
+ * Update one task
4402
+ */
4403
+ updateTask(options) {
4404
+ return (options.client ?? this.client).patch({
4405
+ responseStyle: "data",
4406
+ url: "/api/tasks/{id}",
4351
4407
  ...options,
4352
4408
  headers: {
4353
4409
  "Content-Type": "application/json",
@@ -4356,52 +4412,64 @@ export class sessions extends HeyApiClient {
4356
4412
  });
4357
4413
  }
4358
4414
  /**
4359
- * Cancel the active session prompt
4415
+ * Approve one approval-gated task and enqueue executable work
4360
4416
  */
4361
- cancelSessionPrompt(options) {
4417
+ approveTask(options) {
4362
4418
  return (options.client ?? this.client).post({
4363
4419
  responseStyle: "data",
4364
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/cancel",
4420
+ url: "/api/tasks/{id}/approve",
4365
4421
  ...options,
4422
+ headers: {
4423
+ "Content-Type": "application/json",
4424
+ ...options.headers,
4425
+ },
4366
4426
  });
4367
4427
  }
4368
4428
  /**
4369
- * Clear queued input with attributed per-entry traces
4429
+ * List typed task blocks
4370
4430
  */
4371
- clearSessionInputs(options) {
4372
- return (options.client ?? this.client).delete({
4431
+ listTaskBlocks(options) {
4432
+ return (options.client ?? this.client).get({
4373
4433
  responseStyle: "data",
4374
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue",
4434
+ url: "/api/tasks/{id}/blocks",
4375
4435
  ...options,
4376
4436
  });
4377
4437
  }
4378
4438
  /**
4379
- * List pending session input
4439
+ * Create one typed task block
4380
4440
  */
4381
- listSessionInputs(options) {
4382
- return (options.client ?? this.client).get({
4441
+ blockTask(options) {
4442
+ return (options.client ?? this.client).post({
4383
4443
  responseStyle: "data",
4384
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue",
4444
+ url: "/api/tasks/{id}/blocks",
4385
4445
  ...options,
4446
+ headers: {
4447
+ "Content-Type": "application/json",
4448
+ ...options.headers,
4449
+ },
4386
4450
  });
4387
4451
  }
4388
4452
  /**
4389
- * Cancel a queued session prompt entry
4453
+ * Clear one typed task block
4390
4454
  */
4391
- cancelQueuedSessionPrompt(options) {
4392
- return (options.client ?? this.client).delete({
4455
+ clearTaskBlock(options) {
4456
+ return (options.client ?? this.client).post({
4393
4457
  responseStyle: "data",
4394
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}",
4458
+ url: "/api/tasks/{id}/blocks/{block_id}/clear",
4395
4459
  ...options,
4460
+ headers: {
4461
+ "Content-Type": "application/json",
4462
+ ...options.headers,
4463
+ },
4396
4464
  });
4397
4465
  }
4398
4466
  /**
4399
- * Replace queued session input atomically
4467
+ * Cancel one task tree
4400
4468
  */
4401
- replaceSessionInput(options) {
4402
- return (options.client ?? this.client).put({
4469
+ cancelTask(options) {
4470
+ return (options.client ?? this.client).post({
4403
4471
  responseStyle: "data",
4404
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}",
4472
+ url: "/api/tasks/{id}/cancel",
4405
4473
  ...options,
4406
4474
  headers: {
4407
4475
  "Content-Type": "application/json",
@@ -4410,12 +4478,12 @@ export class sessions extends HeyApiClient {
4410
4478
  });
4411
4479
  }
4412
4480
  /**
4413
- * Promote queued session input to steering
4481
+ * Create one child task
4414
4482
  */
4415
- promoteSessionInput(options) {
4483
+ createChildTask(options) {
4416
4484
  return (options.client ?? this.client).post({
4417
4485
  responseStyle: "data",
4418
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}/steer",
4486
+ url: "/api/tasks/{id}/children",
4419
4487
  ...options,
4420
4488
  headers: {
4421
4489
  "Content-Type": "application/json",
@@ -4424,56 +4492,56 @@ export class sessions extends HeyApiClient {
4424
4492
  });
4425
4493
  }
4426
4494
  /**
4427
- * Get a deterministic session recap
4495
+ * Add one task dependency
4428
4496
  */
4429
- getSessionRecap(options) {
4430
- return (options.client ?? this.client).get({
4497
+ addTaskDependency(options) {
4498
+ return (options.client ?? this.client).post({
4431
4499
  responseStyle: "data",
4432
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/recap",
4500
+ url: "/api/tasks/{id}/dependencies",
4433
4501
  ...options,
4502
+ headers: {
4503
+ "Content-Type": "application/json",
4504
+ ...options.headers,
4505
+ },
4434
4506
  });
4435
4507
  }
4436
4508
  /**
4437
- * Inspect and repair an interrupted session transcript
4509
+ * Remove one task dependency
4438
4510
  */
4439
- repairSession(options) {
4440
- return (options.client ?? this.client).post({
4511
+ removeTaskDependency(options) {
4512
+ return (options.client ?? this.client).delete({
4441
4513
  responseStyle: "data",
4442
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/repair",
4514
+ url: "/api/tasks/{id}/dependencies/{depends_on_id}",
4443
4515
  ...options,
4444
4516
  });
4445
4517
  }
4446
4518
  /**
4447
- * Rewind a conversation before one durable user message
4519
+ * Delete one task execution profile
4448
4520
  */
4449
- rewindSessionConversation(options) {
4450
- return (options.client ?? this.client).post({
4521
+ deleteTaskExecutionProfile(options) {
4522
+ return (options.client ?? this.client).delete({
4451
4523
  responseStyle: "data",
4452
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/rewind",
4524
+ url: "/api/tasks/{id}/execution-profile",
4453
4525
  ...options,
4454
- headers: {
4455
- "Content-Type": "application/json",
4456
- ...options.headers,
4457
- },
4458
4526
  });
4459
4527
  }
4460
4528
  /**
4461
- * Clear the default runtime for future prompts
4529
+ * Get one task execution profile
4462
4530
  */
4463
- clearSessionRuntime(options) {
4464
- return (options.client ?? this.client).delete({
4531
+ getTaskExecutionProfile(options) {
4532
+ return (options.client ?? this.client).get({
4465
4533
  responseStyle: "data",
4466
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/runtime",
4534
+ url: "/api/tasks/{id}/execution-profile",
4467
4535
  ...options,
4468
4536
  });
4469
4537
  }
4470
4538
  /**
4471
- * Select the default runtime for future prompts
4539
+ * Replace one task execution profile
4472
4540
  */
4473
- setSessionRuntime(options) {
4541
+ setTaskExecutionProfile(options) {
4474
4542
  return (options.client ?? this.client).put({
4475
4543
  responseStyle: "data",
4476
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/runtime",
4544
+ url: "/api/tasks/{id}/execution-profile",
4477
4545
  ...options,
4478
4546
  headers: {
4479
4547
  "Content-Type": "application/json",
@@ -4482,12 +4550,12 @@ export class sessions extends HeyApiClient {
4482
4550
  });
4483
4551
  }
4484
4552
  /**
4485
- * Refresh an idle session's Soul snapshot through body-level CAS
4553
+ * Set one task worktree policy
4486
4554
  */
4487
- refreshSessionSoul(options) {
4488
- return (options.client ?? this.client).post({
4555
+ setTaskWorktreePolicy(options) {
4556
+ return (options.client ?? this.client).patch({
4489
4557
  responseStyle: "data",
4490
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/soul/refresh",
4558
+ url: "/api/tasks/{id}/execution-profile/worktree",
4491
4559
  ...options,
4492
4560
  headers: {
4493
4561
  "Content-Type": "application/json",
@@ -4496,22 +4564,22 @@ export class sessions extends HeyApiClient {
4496
4564
  });
4497
4565
  }
4498
4566
  /**
4499
- * Read compact session status and wake eligibility
4567
+ * Inspect one task with diagnostics
4500
4568
  */
4501
- getSessionStatus(options) {
4569
+ inspectTask(options) {
4502
4570
  return (options.client ?? this.client).get({
4503
4571
  responseStyle: "data",
4504
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/status",
4572
+ url: "/api/tasks/{id}/inspect",
4505
4573
  ...options,
4506
4574
  });
4507
4575
  }
4508
4576
  /**
4509
- * Stage steering input for the active session turn
4577
+ * Pause one task for future scheduler claims
4510
4578
  */
4511
- steerSessionPrompt(options) {
4579
+ pauseTask(options) {
4512
4580
  return (options.client ?? this.client).post({
4513
4581
  responseStyle: "data",
4514
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/steer",
4582
+ url: "/api/tasks/{id}/pause",
4515
4583
  ...options,
4516
4584
  headers: {
4517
4585
  "Content-Type": "application/json",
@@ -4520,12 +4588,12 @@ export class sessions extends HeyApiClient {
4520
4588
  });
4521
4589
  }
4522
4590
  /**
4523
- * Stop a session without deleting persisted history
4591
+ * Publish one draft task and enqueue executable work
4524
4592
  */
4525
- stopSession(options) {
4593
+ publishTask(options) {
4526
4594
  return (options.client ?? this.client).post({
4527
4595
  responseStyle: "data",
4528
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/stop",
4596
+ url: "/api/tasks/{id}/publish",
4529
4597
  ...options,
4530
4598
  headers: {
4531
4599
  "Content-Type": "application/json",
@@ -4534,32 +4602,36 @@ export class sessions extends HeyApiClient {
4534
4602
  });
4535
4603
  }
4536
4604
  /**
4537
- * List a session's subagents
4605
+ * Recover one task from needs_attention
4538
4606
  */
4539
- listSessionSubagents(options) {
4540
- return (options.client ?? this.client).get({
4607
+ recoverTask(options) {
4608
+ return (options.client ?? this.client).post({
4541
4609
  responseStyle: "data",
4542
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/subagents",
4610
+ url: "/api/tasks/{id}/recover",
4543
4611
  ...options,
4612
+ headers: {
4613
+ "Content-Type": "application/json",
4614
+ ...options.headers,
4615
+ },
4544
4616
  });
4545
4617
  }
4546
4618
  /**
4547
- * List session-callable registry tools
4619
+ * Reject one approval-gated task
4548
4620
  */
4549
- listSessionTools(options) {
4550
- return (options.client ?? this.client).get({
4621
+ rejectTask(options) {
4622
+ return (options.client ?? this.client).post({
4551
4623
  responseStyle: "data",
4552
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/tools",
4624
+ url: "/api/tasks/{id}/reject",
4553
4625
  ...options,
4554
4626
  });
4555
4627
  }
4556
4628
  /**
4557
- * Search session-callable registry tools
4629
+ * Resume one paused task for future scheduler claims
4558
4630
  */
4559
- searchSessionTools(options) {
4631
+ resumeTask(options) {
4560
4632
  return (options.client ?? this.client).post({
4561
4633
  responseStyle: "data",
4562
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/tools/search",
4634
+ url: "/api/tasks/{id}/resume",
4563
4635
  ...options,
4564
4636
  headers: {
4565
4637
  "Content-Type": "application/json",
@@ -4568,115 +4640,115 @@ export class sessions extends HeyApiClient {
4568
4640
  });
4569
4641
  }
4570
4642
  /**
4571
- * Get a bounded materialized transcript page
4643
+ * List task-run reviews for one task
4572
4644
  */
4573
- getSessionTranscript(options) {
4645
+ listTaskReviews(options) {
4574
4646
  return (options.client ?? this.client).get({
4575
4647
  responseStyle: "data",
4576
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript",
4648
+ url: "/api/tasks/{id}/reviews",
4577
4649
  ...options,
4578
4650
  });
4579
4651
  }
4580
4652
  /**
4581
- * Get the full retained operator-message trail with reply previews
4653
+ * List runs for one task
4582
4654
  */
4583
- getSessionTranscriptOutline(options) {
4655
+ listTaskRuns(options) {
4584
4656
  return (options.client ?? this.client).get({
4585
4657
  responseStyle: "data",
4586
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript/outline",
4658
+ url: "/api/tasks/{id}/runs",
4587
4659
  ...options,
4588
4660
  });
4589
4661
  }
4590
4662
  /**
4591
- * Search retained transcript messages with bounded literal matches
4663
+ * Enqueue one task run
4592
4664
  */
4593
- searchSessionTranscript(options) {
4594
- return (options.client ?? this.client).get({
4665
+ enqueueTaskRun(options) {
4666
+ return (options.client ?? this.client).post({
4595
4667
  responseStyle: "data",
4596
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript/search",
4668
+ url: "/api/tasks/{id}/runs",
4597
4669
  ...options,
4670
+ headers: {
4671
+ "Content-Type": "application/json",
4672
+ ...options.headers,
4673
+ },
4598
4674
  });
4599
4675
  }
4600
4676
  /**
4601
- * Restore an archived session
4677
+ * Enqueue designated sibling runs for one task
4602
4678
  */
4603
- unarchiveSession(options) {
4679
+ fanOutTaskRuns(options) {
4604
4680
  return (options.client ?? this.client).post({
4605
4681
  responseStyle: "data",
4606
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/unarchive",
4682
+ url: "/api/tasks/{id}/runs/fan-out",
4607
4683
  ...options,
4684
+ headers: {
4685
+ "Content-Type": "application/json",
4686
+ ...options.headers,
4687
+ },
4608
4688
  });
4609
4689
  }
4610
4690
  /**
4611
- * Get aggregated token usage for a session
4691
+ * Start one task by enqueueing executable work
4612
4692
  */
4613
- getSessionUsage(options) {
4614
- return (options.client ?? this.client).get({
4693
+ startTask(options) {
4694
+ return (options.client ?? this.client).post({
4615
4695
  responseStyle: "data",
4616
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/usage",
4696
+ url: "/api/tasks/{id}/start",
4617
4697
  ...options,
4698
+ headers: {
4699
+ "Content-Type": "application/json",
4700
+ ...options.headers,
4701
+ },
4618
4702
  });
4619
4703
  }
4620
4704
  /**
4621
- * Get per-turn session usage and native compaction markers
4705
+ * Get one task timeline
4622
4706
  */
4623
- getSessionUsageTurns(options) {
4707
+ getTaskTimeline(options) {
4624
4708
  return (options.client ?? this.client).get({
4625
4709
  responseStyle: "data",
4626
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/usage/turns",
4710
+ url: "/api/tasks/{id}/timeline",
4627
4711
  ...options,
4628
4712
  });
4629
4713
  }
4630
4714
  /**
4631
- * Wait for a session state
4715
+ * Get one task tree live view
4632
4716
  */
4633
- waitForSession(options) {
4634
- return (options.client ?? this.client).post({
4717
+ getTaskTree(options) {
4718
+ return (options.client ?? this.client).get({
4635
4719
  responseStyle: "data",
4636
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/wait",
4720
+ url: "/api/tasks/{id}/tree",
4637
4721
  ...options,
4638
- headers: {
4639
- "Content-Type": "application/json",
4640
- ...options.headers,
4641
- },
4642
4722
  });
4643
4723
  }
4644
4724
  /**
4645
- * Fork a live session into a worktree
4725
+ * Archive one task inbox item
4646
4726
  */
4647
- forkSessionToWorktree(options) {
4727
+ archiveTask(options) {
4648
4728
  return (options.client ?? this.client).post({
4649
4729
  responseStyle: "data",
4650
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree-fork",
4730
+ url: "/api/tasks/{id}/triage/archive",
4651
4731
  ...options,
4652
- headers: {
4653
- "Content-Type": "application/json",
4654
- ...options.headers,
4655
- },
4656
4732
  });
4657
4733
  }
4658
4734
  /**
4659
- * Read one subagent
4735
+ * Dismiss one task inbox item
4660
4736
  */
4661
- getSubagent(options) {
4662
- return (options.client ?? this.client).get({
4737
+ dismissTask(options) {
4738
+ return (options.client ?? this.client).post({
4663
4739
  responseStyle: "data",
4664
- url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}",
4740
+ url: "/api/tasks/{id}/triage/dismiss",
4665
4741
  ...options,
4666
4742
  });
4667
4743
  }
4668
4744
  /**
4669
- * Cancel a delegated subagent
4745
+ * Mark one task inbox item as read
4670
4746
  */
4671
- cancelSubagent(options) {
4747
+ markTaskRead(options) {
4672
4748
  return (options.client ?? this.client).post({
4673
4749
  responseStyle: "data",
4674
- url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}/cancel",
4750
+ url: "/api/tasks/{id}/triage/read",
4675
4751
  ...options,
4676
- headers: {
4677
- "Content-Type": "application/json",
4678
- ...options.headers,
4679
- },
4680
4752
  });
4681
4753
  }
4682
4754
  }
@@ -4818,7 +4890,97 @@ export class workspaces extends HeyApiClient {
4818
4890
  });
4819
4891
  }
4820
4892
  /**
4821
- * List registered workspaces
4893
+ * Read the profile's workspace folders and manual workspace order
4894
+ */
4895
+ getWorkspaceLayout(options) {
4896
+ return (options?.client ?? this.client).get({
4897
+ responseStyle: "data",
4898
+ url: "/api/workspace-folders",
4899
+ ...options,
4900
+ });
4901
+ }
4902
+ /**
4903
+ * Create a root workspace folder
4904
+ */
4905
+ createWorkspaceFolder(options) {
4906
+ return (options.client ?? this.client).post({
4907
+ responseStyle: "data",
4908
+ url: "/api/workspace-folders",
4909
+ ...options,
4910
+ headers: {
4911
+ "Content-Type": "application/json",
4912
+ ...options.headers,
4913
+ },
4914
+ });
4915
+ }
4916
+ /**
4917
+ * Delete a workspace folder; its workspaces return to the root
4918
+ */
4919
+ deleteWorkspaceFolder(options) {
4920
+ return (options.client ?? this.client).delete({
4921
+ responseStyle: "data",
4922
+ url: "/api/workspace-folders/{folder_id}",
4923
+ ...options,
4924
+ });
4925
+ }
4926
+ /**
4927
+ * Rename a workspace folder
4928
+ */
4929
+ renameWorkspaceFolder(options) {
4930
+ return (options.client ?? this.client).patch({
4931
+ responseStyle: "data",
4932
+ url: "/api/workspace-folders/{folder_id}",
4933
+ ...options,
4934
+ headers: {
4935
+ "Content-Type": "application/json",
4936
+ ...options.headers,
4937
+ },
4938
+ });
4939
+ }
4940
+ /**
4941
+ * Set the complete workspace folder order
4942
+ */
4943
+ reorderWorkspaceFolders(options) {
4944
+ return (options.client ?? this.client).put({
4945
+ responseStyle: "data",
4946
+ url: "/api/workspace-order/folders",
4947
+ ...options,
4948
+ headers: {
4949
+ "Content-Type": "application/json",
4950
+ ...options.headers,
4951
+ },
4952
+ });
4953
+ }
4954
+ /**
4955
+ * Move a workspace into a folder or back to the root
4956
+ */
4957
+ moveWorkspace(options) {
4958
+ return (options.client ?? this.client).post({
4959
+ responseStyle: "data",
4960
+ url: "/api/workspace-order/move",
4961
+ ...options,
4962
+ headers: {
4963
+ "Content-Type": "application/json",
4964
+ ...options.headers,
4965
+ },
4966
+ });
4967
+ }
4968
+ /**
4969
+ * Set the manual workspace order in a folder or the root
4970
+ */
4971
+ reorderWorkspaces(options) {
4972
+ return (options.client ?? this.client).put({
4973
+ responseStyle: "data",
4974
+ url: "/api/workspace-order/workspaces",
4975
+ ...options,
4976
+ headers: {
4977
+ "Content-Type": "application/json",
4978
+ ...options.headers,
4979
+ },
4980
+ });
4981
+ }
4982
+ /**
4983
+ * List active or archived workspaces
4822
4984
  */
4823
4985
  listWorkspaces(options) {
4824
4986
  return (options?.client ?? this.client).get({
@@ -4889,6 +5051,26 @@ export class workspaces extends HeyApiClient {
4889
5051
  },
4890
5052
  });
4891
5053
  }
5054
+ /**
5055
+ * archive a workspace without removing its data
5056
+ */
5057
+ archiveWorkspace(options) {
5058
+ return (options.client ?? this.client).post({
5059
+ responseStyle: "data",
5060
+ url: "/api/workspaces/{id}/archive",
5061
+ ...options,
5062
+ });
5063
+ }
5064
+ /**
5065
+ * unarchive a workspace without removing its data
5066
+ */
5067
+ unarchiveWorkspace(options) {
5068
+ return (options.client ?? this.client).post({
5069
+ responseStyle: "data",
5070
+ url: "/api/workspaces/{id}/unarchive",
5071
+ ...options,
5072
+ });
5073
+ }
4892
5074
  /**
4893
5075
  * List workspace terminals
4894
5076
  */
@@ -5688,6 +5870,10 @@ export class Compozy extends HeyApiClient {
5688
5870
  get openai() {
5689
5871
  return (this._openai ??= new openai({ client: this.client }));
5690
5872
  }
5873
+ _sessions;
5874
+ get sessions() {
5875
+ return (this._sessions ??= new sessions({ client: this.client }));
5876
+ }
5691
5877
  _profiles;
5692
5878
  get profiles() {
5693
5879
  return (this._profiles ??= new profiles({ client: this.client }));
@@ -5704,10 +5890,6 @@ export class Compozy extends HeyApiClient {
5704
5890
  get tasks() {
5705
5891
  return (this._tasks ??= new tasks({ client: this.client }));
5706
5892
  }
5707
- _sessions;
5708
- get sessions() {
5709
- return (this._sessions ??= new sessions({ client: this.client }));
5710
- }
5711
5893
  _skills;
5712
5894
  get skills() {
5713
5895
  return (this._skills ??= new skills({ client: this.client }));