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