@compozy/client 0.4.5 → 0.4.7

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,60 +3338,52 @@ 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
+ * Stop a session and its children and park them in Later, with an optional reason and return time
3414
3382
  */
3415
- startTaskRun(options) {
3383
+ moveSessionToLater(options) {
3416
3384
  return (options.client ?? this.client).post({
3417
3385
  responseStyle: "data",
3418
- url: "/api/task-runs/{id}/start",
3386
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/later",
3419
3387
  ...options,
3420
3388
  headers: {
3421
3389
  "Content-Type": "application/json",
@@ -3424,56 +3392,56 @@ class tasks extends HeyApiClient {
3424
3392
  });
3425
3393
  }
3426
3394
  /**
3427
- * List a bounded task catalog page
3395
+ * List a session's monitors
3428
3396
  */
3429
- listTasks(options) {
3430
- return (options?.client ?? this.client).get({
3397
+ listSessionMonitors(options) {
3398
+ return (options.client ?? this.client).get({
3431
3399
  responseStyle: "data",
3432
- url: "/api/tasks",
3400
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/monitors",
3433
3401
  ...options,
3434
3402
  });
3435
3403
  }
3436
3404
  /**
3437
- * Create a task
3405
+ * Cancel a session monitor without waking the session
3438
3406
  */
3439
- createTask(options) {
3407
+ cancelSessionMonitor(options) {
3440
3408
  return (options.client ?? this.client).post({
3441
3409
  responseStyle: "data",
3442
- url: "/api/tasks",
3410
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/monitors/{monitor_id}/cancel",
3443
3411
  ...options,
3444
- headers: {
3445
- "Content-Type": "application/json",
3446
- ...options.headers,
3447
- },
3448
3412
  });
3449
3413
  }
3450
3414
  /**
3451
- * Delete one task
3415
+ * Move a session into a folder or back to the workspace root
3452
3416
  */
3453
- deleteTask(options) {
3454
- return (options.client ?? this.client).delete({
3417
+ moveSession(options) {
3418
+ return (options.client ?? this.client).post({
3455
3419
  responseStyle: "data",
3456
- url: "/api/tasks/{id}",
3420
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/move",
3457
3421
  ...options,
3422
+ headers: {
3423
+ "Content-Type": "application/json",
3424
+ ...options.headers,
3425
+ },
3458
3426
  });
3459
3427
  }
3460
3428
  /**
3461
- * Get one task with detail
3429
+ * Make an adopted child session top-level again
3462
3430
  */
3463
- getTask(options) {
3464
- return (options.client ?? this.client).get({
3431
+ clearSessionParent(options) {
3432
+ return (options.client ?? this.client).delete({
3465
3433
  responseStyle: "data",
3466
- url: "/api/tasks/{id}",
3434
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/parent",
3467
3435
  ...options,
3468
3436
  });
3469
3437
  }
3470
3438
  /**
3471
- * Update one task
3439
+ * Adopt a parentless user session as a child of another session
3472
3440
  */
3473
- updateTask(options) {
3474
- return (options.client ?? this.client).patch({
3441
+ setSessionParent(options) {
3442
+ return (options.client ?? this.client).put({
3475
3443
  responseStyle: "data",
3476
- url: "/api/tasks/{id}",
3444
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/parent",
3477
3445
  ...options,
3478
3446
  headers: {
3479
3447
  "Content-Type": "application/json",
@@ -3482,12 +3450,12 @@ class tasks extends HeyApiClient {
3482
3450
  });
3483
3451
  }
3484
3452
  /**
3485
- * Approve one approval-gated task and enqueue executable work
3453
+ * Update operator session presence
3486
3454
  */
3487
- approveTask(options) {
3455
+ updateSessionPresence(options) {
3488
3456
  return (options.client ?? this.client).post({
3489
3457
  responseStyle: "data",
3490
- url: "/api/tasks/{id}/approve",
3458
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/presence",
3491
3459
  ...options,
3492
3460
  headers: {
3493
3461
  "Content-Type": "application/json",
@@ -3496,22 +3464,22 @@ class tasks extends HeyApiClient {
3496
3464
  });
3497
3465
  }
3498
3466
  /**
3499
- * List typed task blocks
3467
+ * List attributed session processes
3500
3468
  */
3501
- listTaskBlocks(options) {
3469
+ listSessionProcesses(options) {
3502
3470
  return (options.client ?? this.client).get({
3503
3471
  responseStyle: "data",
3504
- url: "/api/tasks/{id}/blocks",
3472
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/processes",
3505
3473
  ...options,
3506
3474
  });
3507
3475
  }
3508
3476
  /**
3509
- * Create one typed task block
3477
+ * Terminate identity-verified session processes
3510
3478
  */
3511
- blockTask(options) {
3479
+ terminateSessionProcesses(options) {
3512
3480
  return (options.client ?? this.client).post({
3513
3481
  responseStyle: "data",
3514
- url: "/api/tasks/{id}/blocks",
3482
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/processes/terminate",
3515
3483
  ...options,
3516
3484
  headers: {
3517
3485
  "Content-Type": "application/json",
@@ -3520,98 +3488,52 @@ class tasks extends HeyApiClient {
3520
3488
  });
3521
3489
  }
3522
3490
  /**
3523
- * Clear one typed task block
3491
+ * Cancel the active session prompt
3524
3492
  */
3525
- clearTaskBlock(options) {
3493
+ cancelSessionPrompt(options) {
3526
3494
  return (options.client ?? this.client).post({
3527
3495
  responseStyle: "data",
3528
- url: "/api/tasks/{id}/blocks/{block_id}/clear",
3496
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/cancel",
3529
3497
  ...options,
3530
- headers: {
3531
- "Content-Type": "application/json",
3532
- ...options.headers,
3533
- },
3534
3498
  });
3535
3499
  }
3536
3500
  /**
3537
- * Cancel one task tree
3501
+ * Clear queued input with attributed per-entry traces
3538
3502
  */
3539
- cancelTask(options) {
3540
- return (options.client ?? this.client).post({
3503
+ clearSessionInputs(options) {
3504
+ return (options.client ?? this.client).delete({
3541
3505
  responseStyle: "data",
3542
- url: "/api/tasks/{id}/cancel",
3506
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue",
3543
3507
  ...options,
3544
- headers: {
3545
- "Content-Type": "application/json",
3546
- ...options.headers,
3547
- },
3548
3508
  });
3549
3509
  }
3550
3510
  /**
3551
- * Create one child task
3511
+ * List pending session input
3552
3512
  */
3553
- createChildTask(options) {
3554
- return (options.client ?? this.client).post({
3513
+ listSessionInputs(options) {
3514
+ return (options.client ?? this.client).get({
3555
3515
  responseStyle: "data",
3556
- url: "/api/tasks/{id}/children",
3516
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue",
3557
3517
  ...options,
3558
- headers: {
3559
- "Content-Type": "application/json",
3560
- ...options.headers,
3561
- },
3562
3518
  });
3563
3519
  }
3564
3520
  /**
3565
- * Add one task dependency
3521
+ * Cancel a queued session prompt entry
3566
3522
  */
3567
- addTaskDependency(options) {
3568
- return (options.client ?? this.client).post({
3523
+ cancelQueuedSessionPrompt(options) {
3524
+ return (options.client ?? this.client).delete({
3569
3525
  responseStyle: "data",
3570
- url: "/api/tasks/{id}/dependencies",
3526
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}",
3571
3527
  ...options,
3572
- headers: {
3573
- "Content-Type": "application/json",
3574
- ...options.headers,
3575
- },
3576
3528
  });
3577
3529
  }
3578
3530
  /**
3579
- * Remove one task dependency
3580
- */
3581
- removeTaskDependency(options) {
3582
- return (options.client ?? this.client).delete({
3583
- responseStyle: "data",
3584
- url: "/api/tasks/{id}/dependencies/{depends_on_id}",
3585
- ...options,
3586
- });
3587
- }
3588
- /**
3589
- * Delete one task execution profile
3590
- */
3591
- deleteTaskExecutionProfile(options) {
3592
- return (options.client ?? this.client).delete({
3593
- responseStyle: "data",
3594
- url: "/api/tasks/{id}/execution-profile",
3595
- ...options,
3596
- });
3597
- }
3598
- /**
3599
- * Get one task execution profile
3600
- */
3601
- getTaskExecutionProfile(options) {
3602
- return (options.client ?? this.client).get({
3603
- responseStyle: "data",
3604
- url: "/api/tasks/{id}/execution-profile",
3605
- ...options,
3606
- });
3607
- }
3608
- /**
3609
- * Replace one task execution profile
3531
+ * Replace queued session input atomically
3610
3532
  */
3611
- setTaskExecutionProfile(options) {
3533
+ replaceSessionInput(options) {
3612
3534
  return (options.client ?? this.client).put({
3613
3535
  responseStyle: "data",
3614
- url: "/api/tasks/{id}/execution-profile",
3536
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}",
3615
3537
  ...options,
3616
3538
  headers: {
3617
3539
  "Content-Type": "application/json",
@@ -3620,12 +3542,12 @@ class tasks extends HeyApiClient {
3620
3542
  });
3621
3543
  }
3622
3544
  /**
3623
- * Set one task worktree policy
3545
+ * Promote queued session input to steering
3624
3546
  */
3625
- setTaskWorktreePolicy(options) {
3626
- return (options.client ?? this.client).patch({
3547
+ promoteSessionInput(options) {
3548
+ return (options.client ?? this.client).post({
3627
3549
  responseStyle: "data",
3628
- url: "/api/tasks/{id}/execution-profile/worktree",
3550
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}/steer",
3629
3551
  ...options,
3630
3552
  headers: {
3631
3553
  "Content-Type": "application/json",
@@ -3634,36 +3556,32 @@ class tasks extends HeyApiClient {
3634
3556
  });
3635
3557
  }
3636
3558
  /**
3637
- * Inspect one task with diagnostics
3559
+ * Get a deterministic session recap
3638
3560
  */
3639
- inspectTask(options) {
3561
+ getSessionRecap(options) {
3640
3562
  return (options.client ?? this.client).get({
3641
3563
  responseStyle: "data",
3642
- url: "/api/tasks/{id}/inspect",
3564
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/recap",
3643
3565
  ...options,
3644
3566
  });
3645
3567
  }
3646
3568
  /**
3647
- * Pause one task for future scheduler claims
3569
+ * Inspect and repair an interrupted session transcript
3648
3570
  */
3649
- pauseTask(options) {
3571
+ repairSession(options) {
3650
3572
  return (options.client ?? this.client).post({
3651
3573
  responseStyle: "data",
3652
- url: "/api/tasks/{id}/pause",
3574
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/repair",
3653
3575
  ...options,
3654
- headers: {
3655
- "Content-Type": "application/json",
3656
- ...options.headers,
3657
- },
3658
3576
  });
3659
3577
  }
3660
3578
  /**
3661
- * Publish one draft task and enqueue executable work
3579
+ * Return a parked session, and optionally its parked children, to the normal flow
3662
3580
  */
3663
- publishTask(options) {
3581
+ resumeSessionFromLater(options) {
3664
3582
  return (options.client ?? this.client).post({
3665
3583
  responseStyle: "data",
3666
- url: "/api/tasks/{id}/publish",
3584
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/resume-later",
3667
3585
  ...options,
3668
3586
  headers: {
3669
3587
  "Content-Type": "application/json",
@@ -3672,12 +3590,12 @@ class tasks extends HeyApiClient {
3672
3590
  });
3673
3591
  }
3674
3592
  /**
3675
- * Recover one task from needs_attention
3593
+ * Rewind a conversation before one durable user message
3676
3594
  */
3677
- recoverTask(options) {
3595
+ rewindSessionConversation(options) {
3678
3596
  return (options.client ?? this.client).post({
3679
3597
  responseStyle: "data",
3680
- url: "/api/tasks/{id}/recover",
3598
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/rewind",
3681
3599
  ...options,
3682
3600
  headers: {
3683
3601
  "Content-Type": "application/json",
@@ -3686,22 +3604,22 @@ class tasks extends HeyApiClient {
3686
3604
  });
3687
3605
  }
3688
3606
  /**
3689
- * Reject one approval-gated task
3607
+ * Clear the default runtime for future prompts
3690
3608
  */
3691
- rejectTask(options) {
3692
- return (options.client ?? this.client).post({
3609
+ clearSessionRuntime(options) {
3610
+ return (options.client ?? this.client).delete({
3693
3611
  responseStyle: "data",
3694
- url: "/api/tasks/{id}/reject",
3612
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/runtime",
3695
3613
  ...options,
3696
3614
  });
3697
3615
  }
3698
3616
  /**
3699
- * Resume one paused task for future scheduler claims
3617
+ * Select the default runtime for future prompts
3700
3618
  */
3701
- resumeTask(options) {
3702
- return (options.client ?? this.client).post({
3619
+ setSessionRuntime(options) {
3620
+ return (options.client ?? this.client).put({
3703
3621
  responseStyle: "data",
3704
- url: "/api/tasks/{id}/resume",
3622
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/runtime",
3705
3623
  ...options,
3706
3624
  headers: {
3707
3625
  "Content-Type": "application/json",
@@ -3710,32 +3628,36 @@ class tasks extends HeyApiClient {
3710
3628
  });
3711
3629
  }
3712
3630
  /**
3713
- * List task-run reviews for one task
3631
+ * Refresh an idle session's Soul snapshot through body-level CAS
3714
3632
  */
3715
- listTaskReviews(options) {
3716
- return (options.client ?? this.client).get({
3633
+ refreshSessionSoul(options) {
3634
+ return (options.client ?? this.client).post({
3717
3635
  responseStyle: "data",
3718
- url: "/api/tasks/{id}/reviews",
3636
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/soul/refresh",
3719
3637
  ...options,
3638
+ headers: {
3639
+ "Content-Type": "application/json",
3640
+ ...options.headers,
3641
+ },
3720
3642
  });
3721
3643
  }
3722
3644
  /**
3723
- * List runs for one task
3645
+ * Read compact session status and wake eligibility
3724
3646
  */
3725
- listTaskRuns(options) {
3647
+ getSessionStatus(options) {
3726
3648
  return (options.client ?? this.client).get({
3727
3649
  responseStyle: "data",
3728
- url: "/api/tasks/{id}/runs",
3650
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/status",
3729
3651
  ...options,
3730
3652
  });
3731
3653
  }
3732
3654
  /**
3733
- * Enqueue one task run
3655
+ * Stage steering input for the active session turn
3734
3656
  */
3735
- enqueueTaskRun(options) {
3657
+ steerSessionPrompt(options) {
3736
3658
  return (options.client ?? this.client).post({
3737
3659
  responseStyle: "data",
3738
- url: "/api/tasks/{id}/runs",
3660
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/steer",
3739
3661
  ...options,
3740
3662
  headers: {
3741
3663
  "Content-Type": "application/json",
@@ -3744,12 +3666,12 @@ class tasks extends HeyApiClient {
3744
3666
  });
3745
3667
  }
3746
3668
  /**
3747
- * Enqueue designated sibling runs for one task
3669
+ * Stop a session without deleting persisted history
3748
3670
  */
3749
- fanOutTaskRuns(options) {
3671
+ stopSession(options) {
3750
3672
  return (options.client ?? this.client).post({
3751
3673
  responseStyle: "data",
3752
- url: "/api/tasks/{id}/runs/fan-out",
3674
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/stop",
3753
3675
  ...options,
3754
3676
  headers: {
3755
3677
  "Content-Type": "application/json",
@@ -3758,12 +3680,32 @@ class tasks extends HeyApiClient {
3758
3680
  });
3759
3681
  }
3760
3682
  /**
3761
- * Start one task by enqueueing executable work
3683
+ * List a session's subagents
3762
3684
  */
3763
- startTask(options) {
3685
+ listSessionSubagents(options) {
3686
+ return (options.client ?? this.client).get({
3687
+ responseStyle: "data",
3688
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/subagents",
3689
+ ...options,
3690
+ });
3691
+ }
3692
+ /**
3693
+ * List session-callable registry tools
3694
+ */
3695
+ listSessionTools(options) {
3696
+ return (options.client ?? this.client).get({
3697
+ responseStyle: "data",
3698
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/tools",
3699
+ ...options,
3700
+ });
3701
+ }
3702
+ /**
3703
+ * Search session-callable registry tools
3704
+ */
3705
+ searchSessionTools(options) {
3764
3706
  return (options.client ?? this.client).post({
3765
3707
  responseStyle: "data",
3766
- url: "/api/tasks/{id}/start",
3708
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/tools/search",
3767
3709
  ...options,
3768
3710
  headers: {
3769
3711
  "Content-Type": "application/json",
@@ -3772,75 +3714,72 @@ class tasks extends HeyApiClient {
3772
3714
  });
3773
3715
  }
3774
3716
  /**
3775
- * Get one task timeline
3717
+ * Get a bounded materialized transcript page
3776
3718
  */
3777
- getTaskTimeline(options) {
3719
+ getSessionTranscript(options) {
3778
3720
  return (options.client ?? this.client).get({
3779
3721
  responseStyle: "data",
3780
- url: "/api/tasks/{id}/timeline",
3722
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript",
3781
3723
  ...options,
3782
3724
  });
3783
3725
  }
3784
3726
  /**
3785
- * Get one task tree live view
3727
+ * Get the full retained operator-message trail with reply previews
3786
3728
  */
3787
- getTaskTree(options) {
3729
+ getSessionTranscriptOutline(options) {
3788
3730
  return (options.client ?? this.client).get({
3789
3731
  responseStyle: "data",
3790
- url: "/api/tasks/{id}/tree",
3732
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript/outline",
3791
3733
  ...options,
3792
3734
  });
3793
3735
  }
3794
3736
  /**
3795
- * Archive one task inbox item
3737
+ * Search retained transcript messages with bounded literal matches
3796
3738
  */
3797
- archiveTask(options) {
3798
- return (options.client ?? this.client).post({
3739
+ searchSessionTranscript(options) {
3740
+ return (options.client ?? this.client).get({
3799
3741
  responseStyle: "data",
3800
- url: "/api/tasks/{id}/triage/archive",
3742
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript/search",
3801
3743
  ...options,
3802
3744
  });
3803
3745
  }
3804
3746
  /**
3805
- * Dismiss one task inbox item
3747
+ * Restore an archived session
3806
3748
  */
3807
- dismissTask(options) {
3749
+ unarchiveSession(options) {
3808
3750
  return (options.client ?? this.client).post({
3809
3751
  responseStyle: "data",
3810
- url: "/api/tasks/{id}/triage/dismiss",
3752
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/unarchive",
3811
3753
  ...options,
3812
3754
  });
3813
3755
  }
3814
3756
  /**
3815
- * Mark one task inbox item as read
3757
+ * Get aggregated token usage for a session
3816
3758
  */
3817
- markTaskRead(options) {
3818
- return (options.client ?? this.client).post({
3759
+ getSessionUsage(options) {
3760
+ return (options.client ?? this.client).get({
3819
3761
  responseStyle: "data",
3820
- url: "/api/tasks/{id}/triage/read",
3762
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/usage",
3821
3763
  ...options,
3822
3764
  });
3823
3765
  }
3824
- }
3825
- exports.tasks = tasks;
3826
- class sessions extends HeyApiClient {
3827
3766
  /**
3828
- * List sessions
3767
+ * Get per-turn session usage and native compaction markers
3829
3768
  */
3830
- listSessions(options) {
3831
- return (options?.client ?? this.client).get({
3769
+ getSessionUsageTurns(options) {
3770
+ return (options.client ?? this.client).get({
3832
3771
  responseStyle: "data",
3833
- url: "/api/sessions",
3772
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/usage/turns",
3834
3773
  ...options,
3835
3774
  });
3836
3775
  }
3837
3776
  /**
3838
- * Create a session
3777
+ * Wait for a session state
3839
3778
  */
3840
- createSession(options) {
3779
+ waitForSession(options) {
3841
3780
  return (options.client ?? this.client).post({
3842
3781
  responseStyle: "data",
3843
- url: "/api/sessions",
3782
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/wait",
3844
3783
  ...options,
3845
3784
  headers: {
3846
3785
  "Content-Type": "application/json",
@@ -3849,132 +3788,213 @@ class sessions extends HeyApiClient {
3849
3788
  });
3850
3789
  }
3851
3790
  /**
3852
- * Get exact session attention counts
3791
+ * Return an idle session to the workspace root in place
3853
3792
  */
3854
- getSessionAttentionSummary(options) {
3855
- return (options?.client ?? this.client).get({
3793
+ unbindSessionWorktree(options) {
3794
+ return (options.client ?? this.client).delete({
3856
3795
  responseStyle: "data",
3857
- url: "/api/sessions/attention-summary",
3796
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree",
3858
3797
  ...options,
3859
3798
  });
3860
3799
  }
3861
3800
  /**
3862
- * Count session catalog facets
3801
+ * Bind an idle existing session to a ready worktree in place
3863
3802
  */
3864
- listSessionFacets(options) {
3865
- return (options?.client ?? this.client).get({
3803
+ bindSessionWorktree(options) {
3804
+ return (options.client ?? this.client).put({
3866
3805
  responseStyle: "data",
3867
- url: "/api/sessions/facets",
3806
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree",
3868
3807
  ...options,
3808
+ headers: {
3809
+ "Content-Type": "application/json",
3810
+ ...options.headers,
3811
+ },
3869
3812
  });
3870
3813
  }
3871
3814
  /**
3872
- * Get one session snapshot by id
3815
+ * Fork a live session into a worktree
3873
3816
  */
3874
- getSessionByID(options) {
3875
- return (options.client ?? this.client).get({
3817
+ forkSessionToWorktree(options) {
3818
+ return (options.client ?? this.client).post({
3876
3819
  responseStyle: "data",
3877
- url: "/api/sessions/{session_id}",
3820
+ url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree-fork",
3878
3821
  ...options,
3822
+ headers: {
3823
+ "Content-Type": "application/json",
3824
+ ...options.headers,
3825
+ },
3879
3826
  });
3880
3827
  }
3881
3828
  /**
3882
- * List persisted session events for a Global session
3829
+ * Read one subagent
3883
3830
  */
3884
- listGlobalSessionEvents(options) {
3831
+ getSubagent(options) {
3885
3832
  return (options.client ?? this.client).get({
3886
3833
  responseStyle: "data",
3887
- url: "/api/sessions/{session_id}/events",
3834
+ url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}",
3888
3835
  ...options,
3889
3836
  });
3890
3837
  }
3891
3838
  /**
3892
- * List grouped session turn history for a Global session
3839
+ * Cancel a delegated subagent
3893
3840
  */
3894
- getGlobalSessionHistory(options) {
3895
- return (options.client ?? this.client).get({
3841
+ cancelSubagent(options) {
3842
+ return (options.client ?? this.client).post({
3896
3843
  responseStyle: "data",
3897
- url: "/api/sessions/{session_id}/history",
3844
+ url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}/cancel",
3898
3845
  ...options,
3846
+ headers: {
3847
+ "Content-Type": "application/json",
3848
+ ...options.headers,
3849
+ },
3899
3850
  });
3900
3851
  }
3852
+ }
3853
+ exports.sessions = sessions;
3854
+ class profiles extends HeyApiClient {
3901
3855
  /**
3902
- * Get a session owner; Global history has an empty workspace id
3856
+ * List profiles
3903
3857
  */
3904
- getSessionOwner(options) {
3905
- return (options.client ?? this.client).get({
3858
+ listProfiles(options) {
3859
+ return (options?.client ?? this.client).get({
3906
3860
  responseStyle: "data",
3907
- url: "/api/sessions/{session_id}/owner",
3861
+ url: "/api/profiles",
3908
3862
  ...options,
3909
3863
  });
3910
3864
  }
3911
3865
  /**
3912
- * Refresh a session pull request
3866
+ * Create a profile
3913
3867
  */
3914
- refreshSessionPullRequest(options) {
3868
+ createProfile(options) {
3915
3869
  return (options.client ?? this.client).post({
3916
3870
  responseStyle: "data",
3917
- url: "/api/sessions/{session_id}/pull-request/refresh",
3871
+ url: "/api/profiles",
3918
3872
  ...options,
3873
+ headers: {
3874
+ "Content-Type": "application/json",
3875
+ ...options.headers,
3876
+ },
3919
3877
  });
3920
3878
  }
3921
3879
  /**
3922
- * Read compact session status and wake eligibility for a Global session
3880
+ * List profile lifecycle operations
3923
3881
  */
3924
- getGlobalSessionStatus(options) {
3925
- return (options.client ?? this.client).get({
3882
+ listProfileOperations(options) {
3883
+ return (options?.client ?? this.client).get({
3926
3884
  responseStyle: "data",
3927
- url: "/api/sessions/{session_id}/status",
3885
+ url: "/api/profiles/ops",
3928
3886
  ...options,
3929
3887
  });
3930
3888
  }
3931
3889
  /**
3932
- * Get a bounded materialized transcript page for a Global session
3890
+ * Retry a profile lifecycle operation
3933
3891
  */
3934
- getGlobalSessionTranscript(options) {
3935
- return (options.client ?? this.client).get({
3892
+ retryProfileOperation(options) {
3893
+ return (options.client ?? this.client).post({
3936
3894
  responseStyle: "data",
3937
- url: "/api/sessions/{session_id}/transcript",
3895
+ url: "/api/profiles/ops/{op_id}/retry",
3938
3896
  ...options,
3939
3897
  });
3940
3898
  }
3941
3899
  /**
3942
- * Get the full retained operator-message trail with reply previews for a Global session
3900
+ * Read profile selections
3943
3901
  */
3944
- getGlobalSessionTranscriptOutline(options) {
3902
+ getProfileSelections(options) {
3903
+ return (options?.client ?? this.client).get({
3904
+ responseStyle: "data",
3905
+ url: "/api/profiles/selection",
3906
+ ...options,
3907
+ });
3908
+ }
3909
+ /**
3910
+ * Remember a profile selection
3911
+ */
3912
+ putProfileSelection(options) {
3913
+ return (options.client ?? this.client).put({
3914
+ responseStyle: "data",
3915
+ url: "/api/profiles/selection",
3916
+ ...options,
3917
+ headers: {
3918
+ "Content-Type": "application/json",
3919
+ ...options.headers,
3920
+ },
3921
+ });
3922
+ }
3923
+ /**
3924
+ * Delete a profile
3925
+ */
3926
+ deleteProfile(options) {
3927
+ return (options.client ?? this.client).delete({
3928
+ responseStyle: "data",
3929
+ url: "/api/profiles/{name}",
3930
+ ...options,
3931
+ });
3932
+ }
3933
+ /**
3934
+ * Get a profile
3935
+ */
3936
+ getProfile(options) {
3945
3937
  return (options.client ?? this.client).get({
3946
3938
  responseStyle: "data",
3947
- url: "/api/sessions/{session_id}/transcript/outline",
3939
+ url: "/api/profiles/{name}",
3948
3940
  ...options,
3949
3941
  });
3950
3942
  }
3951
3943
  /**
3952
- * Search retained transcript messages with bounded literal matches for a Global session
3944
+ * Update profile identity
3953
3945
  */
3954
- searchGlobalSessionTranscript(options) {
3946
+ updateProfile(options) {
3947
+ return (options.client ?? this.client).patch({
3948
+ responseStyle: "data",
3949
+ url: "/api/profiles/{name}",
3950
+ ...options,
3951
+ headers: {
3952
+ "Content-Type": "application/json",
3953
+ ...options.headers,
3954
+ },
3955
+ });
3956
+ }
3957
+ /**
3958
+ * Archive a profile
3959
+ */
3960
+ archiveProfile(options) {
3961
+ return (options.client ?? this.client).post({
3962
+ responseStyle: "data",
3963
+ url: "/api/profiles/{name}/archive",
3964
+ ...options,
3965
+ headers: {
3966
+ "Content-Type": "application/json",
3967
+ ...options.headers,
3968
+ },
3969
+ });
3970
+ }
3971
+ /**
3972
+ * Preview profile archival
3973
+ */
3974
+ prepareProfileArchive(options) {
3955
3975
  return (options.client ?? this.client).get({
3956
3976
  responseStyle: "data",
3957
- url: "/api/sessions/{session_id}/transcript/search",
3977
+ url: "/api/profiles/{name}/archive-plan",
3958
3978
  ...options,
3959
3979
  });
3960
3980
  }
3961
3981
  /**
3962
- * List session folders in manual order
3982
+ * Preview profile deletion
3963
3983
  */
3964
- listSessionFolders(options) {
3984
+ prepareProfileDelete(options) {
3965
3985
  return (options.client ?? this.client).get({
3966
3986
  responseStyle: "data",
3967
- url: "/api/workspaces/{workspace_id}/session-folders",
3987
+ url: "/api/profiles/{name}/delete-plan",
3968
3988
  ...options,
3969
3989
  });
3970
3990
  }
3971
3991
  /**
3972
- * Create a session folder
3992
+ * Rename a profile
3973
3993
  */
3974
- createSessionFolder(options) {
3994
+ renameProfile(options) {
3975
3995
  return (options.client ?? this.client).post({
3976
3996
  responseStyle: "data",
3977
- url: "/api/workspaces/{workspace_id}/session-folders",
3997
+ url: "/api/profiles/{name}/rename",
3978
3998
  ...options,
3979
3999
  headers: {
3980
4000
  "Content-Type": "application/json",
@@ -3983,22 +4003,22 @@ class sessions extends HeyApiClient {
3983
4003
  });
3984
4004
  }
3985
4005
  /**
3986
- * Delete a session folder; its sessions return to the workspace root
4006
+ * Preview a profile rename
3987
4007
  */
3988
- deleteSessionFolder(options) {
3989
- return (options.client ?? this.client).delete({
4008
+ prepareProfileRename(options) {
4009
+ return (options.client ?? this.client).get({
3990
4010
  responseStyle: "data",
3991
- url: "/api/workspaces/{workspace_id}/session-folders/{folder_id}",
4011
+ url: "/api/profiles/{name}/rename-plan",
3992
4012
  ...options,
3993
4013
  });
3994
4014
  }
3995
4015
  /**
3996
- * Rename a session folder
4016
+ * Unarchive a profile
3997
4017
  */
3998
- renameSessionFolder(options) {
3999
- return (options.client ?? this.client).patch({
4018
+ unarchiveProfile(options) {
4019
+ return (options.client ?? this.client).post({
4000
4020
  responseStyle: "data",
4001
- url: "/api/workspaces/{workspace_id}/session-folders/{folder_id}",
4021
+ url: "/api/profiles/{name}/unarchive",
4002
4022
  ...options,
4003
4023
  headers: {
4004
4024
  "Content-Type": "application/json",
@@ -4006,13 +4026,36 @@ class sessions extends HeyApiClient {
4006
4026
  },
4007
4027
  });
4008
4028
  }
4029
+ }
4030
+ exports.profiles = profiles;
4031
+ class resources extends HeyApiClient {
4009
4032
  /**
4010
- * Set the complete session folder order
4033
+ * List desired-state resources on the local operator control plane
4011
4034
  */
4012
- reorderSessionFolders(options) {
4013
- return (options.client ?? this.client).put({
4035
+ listResources(options) {
4036
+ return (options?.client ?? this.client).get({
4014
4037
  responseStyle: "data",
4015
- url: "/api/workspaces/{workspace_id}/session-order/folders",
4038
+ url: "/api/resources",
4039
+ ...options,
4040
+ });
4041
+ }
4042
+ /**
4043
+ * List one desired-state resource kind on the local operator control plane
4044
+ */
4045
+ listResourcesByKind(options) {
4046
+ return (options.client ?? this.client).get({
4047
+ responseStyle: "data",
4048
+ url: "/api/resources/{kind}",
4049
+ ...options,
4050
+ });
4051
+ }
4052
+ /**
4053
+ * Delete one desired-state resource on the local operator control plane
4054
+ */
4055
+ deleteResource(options) {
4056
+ return (options.client ?? this.client).delete({
4057
+ responseStyle: "data",
4058
+ url: "/api/resources/{kind}/{id}",
4016
4059
  ...options,
4017
4060
  headers: {
4018
4061
  "Content-Type": "application/json",
@@ -4021,12 +4064,22 @@ class sessions extends HeyApiClient {
4021
4064
  });
4022
4065
  }
4023
4066
  /**
4024
- * Set the manual session order in a folder or the workspace root
4067
+ * Read one desired-state resource on the local operator control plane
4025
4068
  */
4026
- reorderSessions(options) {
4069
+ getResource(options) {
4070
+ return (options.client ?? this.client).get({
4071
+ responseStyle: "data",
4072
+ url: "/api/resources/{kind}/{id}",
4073
+ ...options,
4074
+ });
4075
+ }
4076
+ /**
4077
+ * Create or replace one desired-state resource on the local operator control plane
4078
+ */
4079
+ putResource(options) {
4027
4080
  return (options.client ?? this.client).put({
4028
4081
  responseStyle: "data",
4029
- url: "/api/workspaces/{workspace_id}/session-order/sessions",
4082
+ url: "/api/resources/{kind}/{id}",
4030
4083
  ...options,
4031
4084
  headers: {
4032
4085
  "Content-Type": "application/json",
@@ -4034,43 +4087,53 @@ class sessions extends HeyApiClient {
4034
4087
  },
4035
4088
  });
4036
4089
  }
4090
+ }
4091
+ exports.resources = resources;
4092
+ class roles extends HeyApiClient {
4037
4093
  /**
4038
- * List sessions
4094
+ * List effective background role configuration
4039
4095
  */
4040
- listWorkspaceSessions(options) {
4041
- return (options.client ?? this.client).get({
4096
+ listRoles(options) {
4097
+ return (options?.client ?? this.client).get({
4042
4098
  responseStyle: "data",
4043
- url: "/api/workspaces/{workspace_id}/sessions",
4099
+ url: "/api/roles",
4044
4100
  ...options,
4045
4101
  });
4046
4102
  }
4047
4103
  /**
4048
- * Delete one session and remove it from persisted history
4104
+ * Get effective background role configuration
4049
4105
  */
4050
- deleteSession(options) {
4051
- return (options.client ?? this.client).delete({
4106
+ getRole(options) {
4107
+ return (options.client ?? this.client).get({
4052
4108
  responseStyle: "data",
4053
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
4109
+ url: "/api/roles/{role}",
4054
4110
  ...options,
4055
4111
  });
4056
4112
  }
4113
+ }
4114
+ exports.roles = roles;
4115
+ class tasks extends HeyApiClient {
4057
4116
  /**
4058
- * Get one session snapshot
4117
+ * Force fail a bounded set of queued or claimed task runs
4059
4118
  */
4060
- getSession(options) {
4061
- return (options.client ?? this.client).get({
4119
+ bulkForceFailTaskRuns(options) {
4120
+ return (options.client ?? this.client).post({
4062
4121
  responseStyle: "data",
4063
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
4122
+ url: "/api/runs/bulk/fail",
4064
4123
  ...options,
4124
+ headers: {
4125
+ "Content-Type": "application/json",
4126
+ ...options.headers,
4127
+ },
4065
4128
  });
4066
4129
  }
4067
4130
  /**
4068
- * Rename one user session
4131
+ * Force release a bounded set of claimed task runs
4069
4132
  */
4070
- renameSession(options) {
4071
- return (options.client ?? this.client).patch({
4133
+ bulkForceReleaseTaskRuns(options) {
4134
+ return (options.client ?? this.client).post({
4072
4135
  responseStyle: "data",
4073
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}",
4136
+ url: "/api/runs/bulk/release",
4074
4137
  ...options,
4075
4138
  headers: {
4076
4139
  "Content-Type": "application/json",
@@ -4079,12 +4142,12 @@ class sessions extends HeyApiClient {
4079
4142
  });
4080
4143
  }
4081
4144
  /**
4082
- * Approve or deny an interactive permission request
4145
+ * Force fail one queued or claimed task run
4083
4146
  */
4084
- approveSession(options) {
4147
+ forceFailTaskRun(options) {
4085
4148
  return (options.client ?? this.client).post({
4086
4149
  responseStyle: "data",
4087
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/approve",
4150
+ url: "/api/runs/{id}/fail",
4088
4151
  ...options,
4089
4152
  headers: {
4090
4153
  "Content-Type": "application/json",
@@ -4093,22 +4156,36 @@ class sessions extends HeyApiClient {
4093
4156
  });
4094
4157
  }
4095
4158
  /**
4096
- * Archive a stopped session, or stop and archive a live session with stop=true
4159
+ * Inspect one task run with diagnostics
4097
4160
  */
4098
- archiveSession(options) {
4161
+ inspectRun(options) {
4162
+ return (options.client ?? this.client).get({
4163
+ responseStyle: "data",
4164
+ url: "/api/runs/{id}/inspect",
4165
+ ...options,
4166
+ });
4167
+ }
4168
+ /**
4169
+ * Recover one needs_attention task run
4170
+ */
4171
+ recoverTaskRun(options) {
4099
4172
  return (options.client ?? this.client).post({
4100
4173
  responseStyle: "data",
4101
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/archive",
4174
+ url: "/api/runs/{id}/recover",
4102
4175
  ...options,
4176
+ headers: {
4177
+ "Content-Type": "application/json",
4178
+ ...options.headers,
4179
+ },
4103
4180
  });
4104
4181
  }
4105
4182
  /**
4106
- * Attach to a resumable live session
4183
+ * Force release one claimed task run
4107
4184
  */
4108
- attachSession(options) {
4185
+ forceReleaseTaskRun(options) {
4109
4186
  return (options.client ?? this.client).post({
4110
4187
  responseStyle: "data",
4111
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attach",
4188
+ url: "/api/runs/{id}/release",
4112
4189
  ...options,
4113
4190
  headers: {
4114
4191
  "Content-Type": "application/json",
@@ -4117,57 +4194,98 @@ class sessions extends HeyApiClient {
4117
4194
  });
4118
4195
  }
4119
4196
  /**
4120
- * Upload a session attachment
4197
+ * Retry one failed task run
4121
4198
  */
4122
- uploadSessionAttachment(options) {
4199
+ retryTaskRun(options) {
4123
4200
  return (options.client ?? this.client).post({
4124
- ...index_js_1.formDataBodySerializer,
4125
4201
  responseStyle: "data",
4126
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments",
4202
+ url: "/api/runs/{id}/retry",
4127
4203
  ...options,
4128
4204
  headers: {
4129
- "Content-Type": null,
4205
+ "Content-Type": "application/json",
4130
4206
  ...options.headers,
4131
4207
  },
4132
4208
  });
4133
4209
  }
4134
4210
  /**
4135
- * Delete a session attachment
4211
+ * Get scheduler pause state and queue pressure
4136
4212
  */
4137
- deleteSessionAttachment(options) {
4138
- return (options.client ?? this.client).delete({
4213
+ getScheduler(options) {
4214
+ return (options?.client ?? this.client).get({
4139
4215
  responseStyle: "data",
4140
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments/{attachment_id}",
4216
+ url: "/api/scheduler",
4141
4217
  ...options,
4142
4218
  });
4143
4219
  }
4144
4220
  /**
4145
- * Read session attachment bytes
4221
+ * List queued scheduler backlog rows
4146
4222
  */
4147
- readSessionAttachmentBytes(options) {
4148
- return (options.client ?? this.client).get({
4223
+ getSchedulerBacklog(options) {
4224
+ return (options?.client ?? this.client).get({
4225
+ responseStyle: "data",
4226
+ url: "/api/scheduler/backlog",
4227
+ ...options,
4228
+ });
4229
+ }
4230
+ /**
4231
+ * Pause the scheduler and wait for active claims to drain
4232
+ */
4233
+ drainScheduler(options) {
4234
+ return (options?.client ?? this.client).post({
4235
+ responseStyle: "data",
4236
+ url: "/api/scheduler/drain",
4237
+ ...options,
4238
+ headers: {
4239
+ "Content-Type": "application/json",
4240
+ ...options?.headers,
4241
+ },
4242
+ });
4243
+ }
4244
+ /**
4245
+ * Pause scheduler dispatch and task-run claims
4246
+ */
4247
+ pauseScheduler(options) {
4248
+ return (options?.client ?? this.client).post({
4249
+ responseStyle: "data",
4250
+ url: "/api/scheduler/pause",
4251
+ ...options,
4252
+ headers: {
4253
+ "Content-Type": "application/json",
4254
+ ...options?.headers,
4255
+ },
4256
+ });
4257
+ }
4258
+ /**
4259
+ * Resume scheduler dispatch and task-run claims
4260
+ */
4261
+ resumeScheduler(options) {
4262
+ return (options?.client ?? this.client).post({
4149
4263
  responseStyle: "data",
4150
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/attachments/{attachment_id}/bytes",
4264
+ url: "/api/scheduler/resume",
4151
4265
  ...options,
4266
+ headers: {
4267
+ "Content-Type": "application/json",
4268
+ ...options?.headers,
4269
+ },
4152
4270
  });
4153
4271
  }
4154
4272
  /**
4155
- * List the live pending clarification for a session
4273
+ * Get one task-run review
4156
4274
  */
4157
- listSessionClarifications(options) {
4275
+ getTaskRunReview(options) {
4158
4276
  return (options.client ?? this.client).get({
4159
4277
  responseStyle: "data",
4160
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clarifications",
4278
+ url: "/api/task-reviews/{id}",
4161
4279
  ...options,
4162
4280
  });
4163
4281
  }
4164
4282
  /**
4165
- * Answer a live session clarification
4283
+ * Submit one task-run review verdict
4166
4284
  */
4167
- answerSessionClarification(options) {
4285
+ submitTaskRunReviewVerdict(options) {
4168
4286
  return (options.client ?? this.client).post({
4169
4287
  responseStyle: "data",
4170
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clarifications/{request_id}/answer",
4288
+ url: "/api/task-reviews/{id}/verdict",
4171
4289
  ...options,
4172
4290
  headers: {
4173
4291
  "Content-Type": "application/json",
@@ -4176,34 +4294,36 @@ class sessions extends HeyApiClient {
4176
4294
  });
4177
4295
  }
4178
4296
  /**
4179
- * Clear conversation history and restart the session context
4297
+ * Get one task run detail
4180
4298
  */
4181
- clearSessionConversation(options) {
4182
- return (options.client ?? this.client).post({
4299
+ getTaskRun(options) {
4300
+ return (options.client ?? this.client).get({
4183
4301
  responseStyle: "data",
4184
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/clear",
4302
+ url: "/api/task-runs/{id}",
4185
4303
  ...options,
4186
4304
  });
4187
4305
  }
4188
4306
  /**
4189
- * List commands available to a session
4307
+ * Attach an existing session to one task run
4190
4308
  */
4191
- getSessionCommands(options) {
4192
- return (options.client ?? this.client).get({
4309
+ attachTaskRunSession(options) {
4310
+ return (options.client ?? this.client).post({
4193
4311
  responseStyle: "data",
4194
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/commands",
4312
+ url: "/api/task-runs/{id}/attach-session",
4195
4313
  ...options,
4314
+ headers: {
4315
+ "Content-Type": "application/json",
4316
+ ...options.headers,
4317
+ },
4196
4318
  });
4197
4319
  }
4198
4320
  /**
4199
- * Request advertised native agent compaction (experimental)
4200
- *
4201
- * @stability experimental
4321
+ * Cancel one task run
4202
4322
  */
4203
- compactSession(options) {
4323
+ cancelTaskRun(options) {
4204
4324
  return (options.client ?? this.client).post({
4205
4325
  responseStyle: "data",
4206
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/compact",
4326
+ url: "/api/task-runs/{id}/cancel",
4207
4327
  ...options,
4208
4328
  headers: {
4209
4329
  "Content-Type": "application/json",
@@ -4212,12 +4332,12 @@ class sessions extends HeyApiClient {
4212
4332
  });
4213
4333
  }
4214
4334
  /**
4215
- * Continue a session with another agent, runtime, or declared route
4335
+ * Complete one running task run
4216
4336
  */
4217
- continueSession(options) {
4337
+ completeTaskRun(options) {
4218
4338
  return (options.client ?? this.client).post({
4219
4339
  responseStyle: "data",
4220
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/continue",
4340
+ url: "/api/task-runs/{id}/complete",
4221
4341
  ...options,
4222
4342
  headers: {
4223
4343
  "Content-Type": "application/json",
@@ -4226,42 +4346,46 @@ class sessions extends HeyApiClient {
4226
4346
  });
4227
4347
  }
4228
4348
  /**
4229
- * Preview what a continue or fork of a session would carry
4349
+ * Fail one task run
4230
4350
  */
4231
- previewSessionDerive(options) {
4232
- return (options.client ?? this.client).get({
4351
+ failTaskRun(options) {
4352
+ return (options.client ?? this.client).post({
4233
4353
  responseStyle: "data",
4234
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/derive/preview",
4354
+ url: "/api/task-runs/{id}/fail",
4235
4355
  ...options,
4356
+ headers: {
4357
+ "Content-Type": "application/json",
4358
+ ...options.headers,
4359
+ },
4236
4360
  });
4237
4361
  }
4238
4362
  /**
4239
- * List persisted session events
4363
+ * Read one exact byte page from a task-run result
4240
4364
  */
4241
- listSessionEvents(options) {
4365
+ readTaskRunResult(options) {
4242
4366
  return (options.client ?? this.client).get({
4243
4367
  responseStyle: "data",
4244
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/events",
4368
+ url: "/api/task-runs/{id}/result",
4245
4369
  ...options,
4246
4370
  });
4247
4371
  }
4248
4372
  /**
4249
- * Search files and folders under a session's working directory
4373
+ * List reviews for one task run
4250
4374
  */
4251
- searchSessionFiles(options) {
4375
+ listTaskRunReviews(options) {
4252
4376
  return (options.client ?? this.client).get({
4253
4377
  responseStyle: "data",
4254
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/files",
4378
+ url: "/api/task-runs/{id}/reviews",
4255
4379
  ...options,
4256
4380
  });
4257
4381
  }
4258
4382
  /**
4259
- * Fork a session with the same agent, whole or through one user message and its turn
4383
+ * Request review for one terminal task run
4260
4384
  */
4261
- forkSession(options) {
4385
+ requestTaskRunReview(options) {
4262
4386
  return (options.client ?? this.client).post({
4263
4387
  responseStyle: "data",
4264
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/fork",
4388
+ url: "/api/task-runs/{id}/reviews",
4265
4389
  ...options,
4266
4390
  headers: {
4267
4391
  "Content-Type": "application/json",
@@ -4270,72 +4394,84 @@ class sessions extends HeyApiClient {
4270
4394
  });
4271
4395
  }
4272
4396
  /**
4273
- * Read metadata-only session health and wake eligibility
4397
+ * Start one claimed task run
4274
4398
  */
4275
- getSessionHealth(options) {
4276
- return (options.client ?? this.client).get({
4399
+ startTaskRun(options) {
4400
+ return (options.client ?? this.client).post({
4277
4401
  responseStyle: "data",
4278
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/health",
4402
+ url: "/api/task-runs/{id}/start",
4279
4403
  ...options,
4404
+ headers: {
4405
+ "Content-Type": "application/json",
4406
+ ...options.headers,
4407
+ },
4280
4408
  });
4281
4409
  }
4282
4410
  /**
4283
- * List grouped session turn history
4411
+ * List a bounded task catalog page
4284
4412
  */
4285
- getSessionHistory(options) {
4286
- return (options.client ?? this.client).get({
4413
+ listTasks(options) {
4414
+ return (options?.client ?? this.client).get({
4287
4415
  responseStyle: "data",
4288
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/history",
4416
+ url: "/api/tasks",
4289
4417
  ...options,
4290
4418
  });
4291
4419
  }
4292
4420
  /**
4293
- * Inspect session health, wake audit, and policy correlation metadata
4421
+ * Create a task
4294
4422
  */
4295
- inspectSession(options) {
4296
- return (options.client ?? this.client).get({
4423
+ createTask(options) {
4424
+ return (options.client ?? this.client).post({
4297
4425
  responseStyle: "data",
4298
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/inspect",
4426
+ url: "/api/tasks",
4299
4427
  ...options,
4428
+ headers: {
4429
+ "Content-Type": "application/json",
4430
+ ...options.headers,
4431
+ },
4300
4432
  });
4301
4433
  }
4302
4434
  /**
4303
- * List pending session interactions
4435
+ * Delete one task
4304
4436
  */
4305
- listSessionInteractions(options) {
4306
- return (options.client ?? this.client).get({
4437
+ deleteTask(options) {
4438
+ return (options.client ?? this.client).delete({
4307
4439
  responseStyle: "data",
4308
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/interactions",
4440
+ url: "/api/tasks/{id}",
4309
4441
  ...options,
4310
4442
  });
4311
4443
  }
4312
4444
  /**
4313
- * List a session's monitors
4445
+ * Get one task with detail
4314
4446
  */
4315
- listSessionMonitors(options) {
4447
+ getTask(options) {
4316
4448
  return (options.client ?? this.client).get({
4317
4449
  responseStyle: "data",
4318
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/monitors",
4450
+ url: "/api/tasks/{id}",
4319
4451
  ...options,
4320
4452
  });
4321
4453
  }
4322
4454
  /**
4323
- * Cancel a session monitor without waking the session
4455
+ * Update one task
4324
4456
  */
4325
- cancelSessionMonitor(options) {
4326
- return (options.client ?? this.client).post({
4457
+ updateTask(options) {
4458
+ return (options.client ?? this.client).patch({
4327
4459
  responseStyle: "data",
4328
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/monitors/{monitor_id}/cancel",
4460
+ url: "/api/tasks/{id}",
4329
4461
  ...options,
4462
+ headers: {
4463
+ "Content-Type": "application/json",
4464
+ ...options.headers,
4465
+ },
4330
4466
  });
4331
4467
  }
4332
4468
  /**
4333
- * Move a session into a folder or back to the workspace root
4469
+ * Approve one approval-gated task and enqueue executable work
4334
4470
  */
4335
- moveSession(options) {
4471
+ approveTask(options) {
4336
4472
  return (options.client ?? this.client).post({
4337
4473
  responseStyle: "data",
4338
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/move",
4474
+ url: "/api/tasks/{id}/approve",
4339
4475
  ...options,
4340
4476
  headers: {
4341
4477
  "Content-Type": "application/json",
@@ -4344,22 +4480,22 @@ class sessions extends HeyApiClient {
4344
4480
  });
4345
4481
  }
4346
4482
  /**
4347
- * Make an adopted child session top-level again
4483
+ * List typed task blocks
4348
4484
  */
4349
- clearSessionParent(options) {
4350
- return (options.client ?? this.client).delete({
4485
+ listTaskBlocks(options) {
4486
+ return (options.client ?? this.client).get({
4351
4487
  responseStyle: "data",
4352
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/parent",
4488
+ url: "/api/tasks/{id}/blocks",
4353
4489
  ...options,
4354
4490
  });
4355
4491
  }
4356
4492
  /**
4357
- * Adopt a parentless user session as a child of another session
4493
+ * Create one typed task block
4358
4494
  */
4359
- setSessionParent(options) {
4360
- return (options.client ?? this.client).put({
4495
+ blockTask(options) {
4496
+ return (options.client ?? this.client).post({
4361
4497
  responseStyle: "data",
4362
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/parent",
4498
+ url: "/api/tasks/{id}/blocks",
4363
4499
  ...options,
4364
4500
  headers: {
4365
4501
  "Content-Type": "application/json",
@@ -4368,12 +4504,12 @@ class sessions extends HeyApiClient {
4368
4504
  });
4369
4505
  }
4370
4506
  /**
4371
- * Update operator session presence
4507
+ * Clear one typed task block
4372
4508
  */
4373
- updateSessionPresence(options) {
4509
+ clearTaskBlock(options) {
4374
4510
  return (options.client ?? this.client).post({
4375
4511
  responseStyle: "data",
4376
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/presence",
4512
+ url: "/api/tasks/{id}/blocks/{block_id}/clear",
4377
4513
  ...options,
4378
4514
  headers: {
4379
4515
  "Content-Type": "application/json",
@@ -4382,52 +4518,12 @@ class sessions extends HeyApiClient {
4382
4518
  });
4383
4519
  }
4384
4520
  /**
4385
- * Cancel the active session prompt
4521
+ * Cancel one task tree
4386
4522
  */
4387
- cancelSessionPrompt(options) {
4523
+ cancelTask(options) {
4388
4524
  return (options.client ?? this.client).post({
4389
4525
  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}",
4526
+ url: "/api/tasks/{id}/cancel",
4431
4527
  ...options,
4432
4528
  headers: {
4433
4529
  "Content-Type": "application/json",
@@ -4436,12 +4532,12 @@ class sessions extends HeyApiClient {
4436
4532
  });
4437
4533
  }
4438
4534
  /**
4439
- * Promote queued session input to steering
4535
+ * Create one child task
4440
4536
  */
4441
- promoteSessionInput(options) {
4537
+ createChildTask(options) {
4442
4538
  return (options.client ?? this.client).post({
4443
4539
  responseStyle: "data",
4444
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/prompt/queue/{queue_entry_id}/steer",
4540
+ url: "/api/tasks/{id}/children",
4445
4541
  ...options,
4446
4542
  headers: {
4447
4543
  "Content-Type": "application/json",
@@ -4450,56 +4546,56 @@ class sessions extends HeyApiClient {
4450
4546
  });
4451
4547
  }
4452
4548
  /**
4453
- * Get a deterministic session recap
4549
+ * Add one task dependency
4454
4550
  */
4455
- getSessionRecap(options) {
4456
- return (options.client ?? this.client).get({
4551
+ addTaskDependency(options) {
4552
+ return (options.client ?? this.client).post({
4457
4553
  responseStyle: "data",
4458
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/recap",
4554
+ url: "/api/tasks/{id}/dependencies",
4459
4555
  ...options,
4556
+ headers: {
4557
+ "Content-Type": "application/json",
4558
+ ...options.headers,
4559
+ },
4460
4560
  });
4461
4561
  }
4462
4562
  /**
4463
- * Inspect and repair an interrupted session transcript
4563
+ * Remove one task dependency
4464
4564
  */
4465
- repairSession(options) {
4466
- return (options.client ?? this.client).post({
4565
+ removeTaskDependency(options) {
4566
+ return (options.client ?? this.client).delete({
4467
4567
  responseStyle: "data",
4468
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/repair",
4568
+ url: "/api/tasks/{id}/dependencies/{depends_on_id}",
4469
4569
  ...options,
4470
4570
  });
4471
4571
  }
4472
4572
  /**
4473
- * Rewind a conversation before one durable user message
4573
+ * Delete one task execution profile
4474
4574
  */
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
- },
4575
+ deleteTaskExecutionProfile(options) {
4576
+ return (options.client ?? this.client).delete({
4577
+ responseStyle: "data",
4578
+ url: "/api/tasks/{id}/execution-profile",
4579
+ ...options,
4484
4580
  });
4485
4581
  }
4486
4582
  /**
4487
- * Clear the default runtime for future prompts
4583
+ * Get one task execution profile
4488
4584
  */
4489
- clearSessionRuntime(options) {
4490
- return (options.client ?? this.client).delete({
4585
+ getTaskExecutionProfile(options) {
4586
+ return (options.client ?? this.client).get({
4491
4587
  responseStyle: "data",
4492
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/runtime",
4588
+ url: "/api/tasks/{id}/execution-profile",
4493
4589
  ...options,
4494
4590
  });
4495
4591
  }
4496
4592
  /**
4497
- * Select the default runtime for future prompts
4593
+ * Replace one task execution profile
4498
4594
  */
4499
- setSessionRuntime(options) {
4595
+ setTaskExecutionProfile(options) {
4500
4596
  return (options.client ?? this.client).put({
4501
4597
  responseStyle: "data",
4502
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/runtime",
4598
+ url: "/api/tasks/{id}/execution-profile",
4503
4599
  ...options,
4504
4600
  headers: {
4505
4601
  "Content-Type": "application/json",
@@ -4508,12 +4604,12 @@ class sessions extends HeyApiClient {
4508
4604
  });
4509
4605
  }
4510
4606
  /**
4511
- * Refresh an idle session's Soul snapshot through body-level CAS
4607
+ * Set one task worktree policy
4512
4608
  */
4513
- refreshSessionSoul(options) {
4514
- return (options.client ?? this.client).post({
4609
+ setTaskWorktreePolicy(options) {
4610
+ return (options.client ?? this.client).patch({
4515
4611
  responseStyle: "data",
4516
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/soul/refresh",
4612
+ url: "/api/tasks/{id}/execution-profile/worktree",
4517
4613
  ...options,
4518
4614
  headers: {
4519
4615
  "Content-Type": "application/json",
@@ -4522,22 +4618,22 @@ class sessions extends HeyApiClient {
4522
4618
  });
4523
4619
  }
4524
4620
  /**
4525
- * Read compact session status and wake eligibility
4621
+ * Inspect one task with diagnostics
4526
4622
  */
4527
- getSessionStatus(options) {
4623
+ inspectTask(options) {
4528
4624
  return (options.client ?? this.client).get({
4529
4625
  responseStyle: "data",
4530
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/status",
4626
+ url: "/api/tasks/{id}/inspect",
4531
4627
  ...options,
4532
4628
  });
4533
4629
  }
4534
4630
  /**
4535
- * Stage steering input for the active session turn
4631
+ * Pause one task for future scheduler claims
4536
4632
  */
4537
- steerSessionPrompt(options) {
4633
+ pauseTask(options) {
4538
4634
  return (options.client ?? this.client).post({
4539
4635
  responseStyle: "data",
4540
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/steer",
4636
+ url: "/api/tasks/{id}/pause",
4541
4637
  ...options,
4542
4638
  headers: {
4543
4639
  "Content-Type": "application/json",
@@ -4546,12 +4642,12 @@ class sessions extends HeyApiClient {
4546
4642
  });
4547
4643
  }
4548
4644
  /**
4549
- * Stop a session without deleting persisted history
4645
+ * Publish one draft task and enqueue executable work
4550
4646
  */
4551
- stopSession(options) {
4647
+ publishTask(options) {
4552
4648
  return (options.client ?? this.client).post({
4553
4649
  responseStyle: "data",
4554
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/stop",
4650
+ url: "/api/tasks/{id}/publish",
4555
4651
  ...options,
4556
4652
  headers: {
4557
4653
  "Content-Type": "application/json",
@@ -4560,32 +4656,36 @@ class sessions extends HeyApiClient {
4560
4656
  });
4561
4657
  }
4562
4658
  /**
4563
- * List a session's subagents
4659
+ * Recover one task from needs_attention
4564
4660
  */
4565
- listSessionSubagents(options) {
4566
- return (options.client ?? this.client).get({
4661
+ recoverTask(options) {
4662
+ return (options.client ?? this.client).post({
4567
4663
  responseStyle: "data",
4568
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/subagents",
4664
+ url: "/api/tasks/{id}/recover",
4569
4665
  ...options,
4666
+ headers: {
4667
+ "Content-Type": "application/json",
4668
+ ...options.headers,
4669
+ },
4570
4670
  });
4571
4671
  }
4572
4672
  /**
4573
- * List session-callable registry tools
4673
+ * Reject one approval-gated task
4574
4674
  */
4575
- listSessionTools(options) {
4576
- return (options.client ?? this.client).get({
4675
+ rejectTask(options) {
4676
+ return (options.client ?? this.client).post({
4577
4677
  responseStyle: "data",
4578
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/tools",
4678
+ url: "/api/tasks/{id}/reject",
4579
4679
  ...options,
4580
4680
  });
4581
4681
  }
4582
4682
  /**
4583
- * Search session-callable registry tools
4683
+ * Resume one paused task for future scheduler claims
4584
4684
  */
4585
- searchSessionTools(options) {
4685
+ resumeTask(options) {
4586
4686
  return (options.client ?? this.client).post({
4587
4687
  responseStyle: "data",
4588
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/tools/search",
4688
+ url: "/api/tasks/{id}/resume",
4589
4689
  ...options,
4590
4690
  headers: {
4591
4691
  "Content-Type": "application/json",
@@ -4594,72 +4694,60 @@ class sessions extends HeyApiClient {
4594
4694
  });
4595
4695
  }
4596
4696
  /**
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
4697
+ * List task-run reviews for one task
4608
4698
  */
4609
- getSessionTranscriptOutline(options) {
4699
+ listTaskReviews(options) {
4610
4700
  return (options.client ?? this.client).get({
4611
4701
  responseStyle: "data",
4612
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript/outline",
4702
+ url: "/api/tasks/{id}/reviews",
4613
4703
  ...options,
4614
4704
  });
4615
4705
  }
4616
4706
  /**
4617
- * Search retained transcript messages with bounded literal matches
4707
+ * List runs for one task
4618
4708
  */
4619
- searchSessionTranscript(options) {
4709
+ listTaskRuns(options) {
4620
4710
  return (options.client ?? this.client).get({
4621
4711
  responseStyle: "data",
4622
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/transcript/search",
4712
+ url: "/api/tasks/{id}/runs",
4623
4713
  ...options,
4624
4714
  });
4625
4715
  }
4626
4716
  /**
4627
- * Restore an archived session
4717
+ * Enqueue one task run
4628
4718
  */
4629
- unarchiveSession(options) {
4719
+ enqueueTaskRun(options) {
4630
4720
  return (options.client ?? this.client).post({
4631
4721
  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",
4722
+ url: "/api/tasks/{id}/runs",
4643
4723
  ...options,
4724
+ headers: {
4725
+ "Content-Type": "application/json",
4726
+ ...options.headers,
4727
+ },
4644
4728
  });
4645
4729
  }
4646
4730
  /**
4647
- * Get per-turn session usage and native compaction markers
4731
+ * Enqueue designated sibling runs for one task
4648
4732
  */
4649
- getSessionUsageTurns(options) {
4650
- return (options.client ?? this.client).get({
4733
+ fanOutTaskRuns(options) {
4734
+ return (options.client ?? this.client).post({
4651
4735
  responseStyle: "data",
4652
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/usage/turns",
4736
+ url: "/api/tasks/{id}/runs/fan-out",
4653
4737
  ...options,
4738
+ headers: {
4739
+ "Content-Type": "application/json",
4740
+ ...options.headers,
4741
+ },
4654
4742
  });
4655
4743
  }
4656
4744
  /**
4657
- * Wait for a session state
4745
+ * Start one task by enqueueing executable work
4658
4746
  */
4659
- waitForSession(options) {
4747
+ startTask(options) {
4660
4748
  return (options.client ?? this.client).post({
4661
4749
  responseStyle: "data",
4662
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/wait",
4750
+ url: "/api/tasks/{id}/start",
4663
4751
  ...options,
4664
4752
  headers: {
4665
4753
  "Content-Type": "application/json",
@@ -4668,69 +4756,57 @@ class sessions extends HeyApiClient {
4668
4756
  });
4669
4757
  }
4670
4758
  /**
4671
- * Return an idle session to the workspace root in place
4759
+ * Get one task timeline
4672
4760
  */
4673
- unbindSessionWorktree(options) {
4674
- return (options.client ?? this.client).delete({
4761
+ getTaskTimeline(options) {
4762
+ return (options.client ?? this.client).get({
4675
4763
  responseStyle: "data",
4676
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree",
4764
+ url: "/api/tasks/{id}/timeline",
4677
4765
  ...options,
4678
4766
  });
4679
4767
  }
4680
4768
  /**
4681
- * Bind an idle existing session to a ready worktree in place
4769
+ * Get one task tree live view
4682
4770
  */
4683
- bindSessionWorktree(options) {
4684
- return (options.client ?? this.client).put({
4771
+ getTaskTree(options) {
4772
+ return (options.client ?? this.client).get({
4685
4773
  responseStyle: "data",
4686
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree",
4774
+ url: "/api/tasks/{id}/tree",
4687
4775
  ...options,
4688
- headers: {
4689
- "Content-Type": "application/json",
4690
- ...options.headers,
4691
- },
4692
4776
  });
4693
4777
  }
4694
4778
  /**
4695
- * Fork a live session into a worktree
4779
+ * Archive one task inbox item
4696
4780
  */
4697
- forkSessionToWorktree(options) {
4781
+ archiveTask(options) {
4698
4782
  return (options.client ?? this.client).post({
4699
4783
  responseStyle: "data",
4700
- url: "/api/workspaces/{workspace_id}/sessions/{session_id}/worktree-fork",
4784
+ url: "/api/tasks/{id}/triage/archive",
4701
4785
  ...options,
4702
- headers: {
4703
- "Content-Type": "application/json",
4704
- ...options.headers,
4705
- },
4706
4786
  });
4707
4787
  }
4708
4788
  /**
4709
- * Read one subagent
4789
+ * Dismiss one task inbox item
4710
4790
  */
4711
- getSubagent(options) {
4712
- return (options.client ?? this.client).get({
4791
+ dismissTask(options) {
4792
+ return (options.client ?? this.client).post({
4713
4793
  responseStyle: "data",
4714
- url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}",
4794
+ url: "/api/tasks/{id}/triage/dismiss",
4715
4795
  ...options,
4716
4796
  });
4717
4797
  }
4718
4798
  /**
4719
- * Cancel a delegated subagent
4799
+ * Mark one task inbox item as read
4720
4800
  */
4721
- cancelSubagent(options) {
4801
+ markTaskRead(options) {
4722
4802
  return (options.client ?? this.client).post({
4723
4803
  responseStyle: "data",
4724
- url: "/api/workspaces/{workspace_id}/subagents/{subagent_id}/cancel",
4804
+ url: "/api/tasks/{id}/triage/read",
4725
4805
  ...options,
4726
- headers: {
4727
- "Content-Type": "application/json",
4728
- ...options.headers,
4729
- },
4730
4806
  });
4731
4807
  }
4732
4808
  }
4733
- exports.sessions = sessions;
4809
+ exports.tasks = tasks;
4734
4810
  class skills extends HeyApiClient {
4735
4811
  /**
4736
4812
  * List effective skills for the selected global, workspace, or agent scope
@@ -4870,6 +4946,96 @@ class workspaces extends HeyApiClient {
4870
4946
  ...options,
4871
4947
  });
4872
4948
  }
4949
+ /**
4950
+ * Read the profile's workspace folders and manual workspace order
4951
+ */
4952
+ getWorkspaceLayout(options) {
4953
+ return (options?.client ?? this.client).get({
4954
+ responseStyle: "data",
4955
+ url: "/api/workspace-folders",
4956
+ ...options,
4957
+ });
4958
+ }
4959
+ /**
4960
+ * Create a root workspace folder
4961
+ */
4962
+ createWorkspaceFolder(options) {
4963
+ return (options.client ?? this.client).post({
4964
+ responseStyle: "data",
4965
+ url: "/api/workspace-folders",
4966
+ ...options,
4967
+ headers: {
4968
+ "Content-Type": "application/json",
4969
+ ...options.headers,
4970
+ },
4971
+ });
4972
+ }
4973
+ /**
4974
+ * Delete a workspace folder; its workspaces return to the root
4975
+ */
4976
+ deleteWorkspaceFolder(options) {
4977
+ return (options.client ?? this.client).delete({
4978
+ responseStyle: "data",
4979
+ url: "/api/workspace-folders/{folder_id}",
4980
+ ...options,
4981
+ });
4982
+ }
4983
+ /**
4984
+ * Rename a workspace folder
4985
+ */
4986
+ renameWorkspaceFolder(options) {
4987
+ return (options.client ?? this.client).patch({
4988
+ responseStyle: "data",
4989
+ url: "/api/workspace-folders/{folder_id}",
4990
+ ...options,
4991
+ headers: {
4992
+ "Content-Type": "application/json",
4993
+ ...options.headers,
4994
+ },
4995
+ });
4996
+ }
4997
+ /**
4998
+ * Set the complete workspace folder order
4999
+ */
5000
+ reorderWorkspaceFolders(options) {
5001
+ return (options.client ?? this.client).put({
5002
+ responseStyle: "data",
5003
+ url: "/api/workspace-order/folders",
5004
+ ...options,
5005
+ headers: {
5006
+ "Content-Type": "application/json",
5007
+ ...options.headers,
5008
+ },
5009
+ });
5010
+ }
5011
+ /**
5012
+ * Move a workspace into a folder or back to the root
5013
+ */
5014
+ moveWorkspace(options) {
5015
+ return (options.client ?? this.client).post({
5016
+ responseStyle: "data",
5017
+ url: "/api/workspace-order/move",
5018
+ ...options,
5019
+ headers: {
5020
+ "Content-Type": "application/json",
5021
+ ...options.headers,
5022
+ },
5023
+ });
5024
+ }
5025
+ /**
5026
+ * Set the manual workspace order in a folder or the root
5027
+ */
5028
+ reorderWorkspaces(options) {
5029
+ return (options.client ?? this.client).put({
5030
+ responseStyle: "data",
5031
+ url: "/api/workspace-order/workspaces",
5032
+ ...options,
5033
+ headers: {
5034
+ "Content-Type": "application/json",
5035
+ ...options.headers,
5036
+ },
5037
+ });
5038
+ }
4873
5039
  /**
4874
5040
  * List active or archived workspaces
4875
5041
  */
@@ -5766,6 +5932,10 @@ class Compozy extends HeyApiClient {
5766
5932
  get openai() {
5767
5933
  return (this._openai ??= new openai({ client: this.client }));
5768
5934
  }
5935
+ _sessions;
5936
+ get sessions() {
5937
+ return (this._sessions ??= new sessions({ client: this.client }));
5938
+ }
5769
5939
  _profiles;
5770
5940
  get profiles() {
5771
5941
  return (this._profiles ??= new profiles({ client: this.client }));
@@ -5782,10 +5952,6 @@ class Compozy extends HeyApiClient {
5782
5952
  get tasks() {
5783
5953
  return (this._tasks ??= new tasks({ client: this.client }));
5784
5954
  }
5785
- _sessions;
5786
- get sessions() {
5787
- return (this._sessions ??= new sessions({ client: this.client }));
5788
- }
5789
5955
  _skills;
5790
5956
  get skills() {
5791
5957
  return (this._skills ??= new skills({ client: this.client }));