@deepraxis/sdk 0.1.1-dev.f44c601 → 0.1.1-dev.f5b174e

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.
@@ -2333,6 +2333,14 @@ export type AgentSseEvent = ({
2333
2333
  * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
2334
2334
  */
2335
2335
  processed_at: string;
2336
+ /**
2337
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
2338
+ */
2339
+ message_id?: string;
2340
+ /**
2341
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
2342
+ */
2343
+ session_thread_id?: string | null;
2336
2344
  };
2337
2345
  } | {
2338
2346
  /**
@@ -2491,6 +2499,14 @@ export type AgentSseEvent = ({
2491
2499
  * message_id of the agent message in the parent session up to which the conversation was copied.
2492
2500
  */
2493
2501
  forked_from_message_id: string;
2502
+ /**
2503
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
2504
+ */
2505
+ message_id?: string;
2506
+ /**
2507
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
2508
+ */
2509
+ session_thread_id?: string | null;
2494
2510
  };
2495
2511
  } | {
2496
2512
  /**
@@ -2611,6 +2627,14 @@ export type AgentSseEvent = ({
2611
2627
  */
2612
2628
  updated_at: number;
2613
2629
  } | null;
2630
+ /**
2631
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
2632
+ */
2633
+ message_id?: string;
2634
+ /**
2635
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
2636
+ */
2637
+ session_thread_id?: string | null;
2614
2638
  };
2615
2639
  } | {
2616
2640
  /**
@@ -2670,6 +2694,718 @@ export type AgentSseEvent = ({
2670
2694
  */
2671
2695
  next_action?: string;
2672
2696
  };
2697
+ /**
2698
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
2699
+ */
2700
+ message_id?: string;
2701
+ /**
2702
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
2703
+ */
2704
+ session_thread_id?: string | null;
2705
+ };
2706
+ } | {
2707
+ /**
2708
+ * Always `cognition.surfaced`. SSE event name of this frame; its data is a cognition.surfaced payload. A worker session reached a boundary and surfaced in this session.
2709
+ */
2710
+ event?: 'cognition.surfaced';
2711
+ /**
2712
+ * Praxis extension (own face only): a worker session reached a boundary and surfaced in this session. It names the worker, how its span ended and where its experience is filed, never the experience's own content.
2713
+ */
2714
+ data?: {
2715
+ /**
2716
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
2717
+ */
2718
+ id: string;
2719
+ /**
2720
+ * Always `cognition.surfaced`. A worker session reached a boundary and surfaced in this session.
2721
+ */
2722
+ type: 'cognition.surfaced';
2723
+ /**
2724
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
2725
+ */
2726
+ processed_at: string;
2727
+ /**
2728
+ * Public sesn_ id of the worker session that reached the boundary; the internal ags_ id never appears here.
2729
+ */
2730
+ worker_session_id: string;
2731
+ /**
2732
+ * Name the worker session was opened under, as the session list shows it.
2733
+ */
2734
+ name: string;
2735
+ /**
2736
+ * How the worker's span ended.
2737
+ */
2738
+ state: 'done' | 'waiting' | 'failed' | 'archived';
2739
+ /**
2740
+ * Engram that filed the worker's experience, when a recap was written; absent when there is no node to name.
2741
+ */
2742
+ experience_id?: string;
2743
+ /**
2744
+ * What the worker handed over at this boundary: its last message, the addresses it named, the files it delivered and any operation the platform still holds. Absent when it handed nothing over.
2745
+ */
2746
+ result?: {
2747
+ /**
2748
+ * The worker's last message to this session, whitespace-collapsed and capped by the agent service.
2749
+ */
2750
+ message?: string;
2751
+ /**
2752
+ * Absolute http(s) addresses the delivered message names, in order of appearance.
2753
+ */
2754
+ links?: Array<string>;
2755
+ /**
2756
+ * Files the worker registered as delivered in this span.
2757
+ */
2758
+ files?: Array<{
2759
+ /**
2760
+ * Path of the delivered file, relative to the session's outputs directory.
2761
+ */
2762
+ name?: string;
2763
+ /**
2764
+ * Address the reply used to point at the file; absent when it named none.
2765
+ */
2766
+ href?: string;
2767
+ }>;
2768
+ /**
2769
+ * Operations the platform held at this boundary that nobody has answered yet.
2770
+ */
2771
+ held?: Array<{
2772
+ /**
2773
+ * Approval id of the held operation, the one user.tool_confirmation answers.
2774
+ */
2775
+ id?: string;
2776
+ /**
2777
+ * One line saying what the held operation would do.
2778
+ */
2779
+ summary?: string;
2780
+ /**
2781
+ * Effect class of the held operation: outward, or irreversible.
2782
+ */
2783
+ effect?: string;
2784
+ /**
2785
+ * HTTP method of the held request.
2786
+ */
2787
+ method?: string;
2788
+ /**
2789
+ * Path of the held request, as the door canonicalized it.
2790
+ */
2791
+ path?: string;
2792
+ /**
2793
+ * When the request stops being answerable, RFC 3339.
2794
+ */
2795
+ expires_at?: string;
2796
+ }>;
2797
+ };
2798
+ };
2799
+ } | {
2800
+ /**
2801
+ * Always `cognition.intention_woken`. SSE event name of this frame; its data is a cognition.intention_woken payload. The idle pass woke the session about one open intention.
2802
+ */
2803
+ event?: 'cognition.intention_woken';
2804
+ /**
2805
+ * Praxis extension (own face only): the idle pass woke this session about one open intention. It names the intention and why it was picked, never the intention's own text.
2806
+ */
2807
+ data?: {
2808
+ /**
2809
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
2810
+ */
2811
+ id: string;
2812
+ /**
2813
+ * Always `cognition.intention_woken`. The idle pass woke the session about one open intention.
2814
+ */
2815
+ type: 'cognition.intention_woken';
2816
+ /**
2817
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
2818
+ */
2819
+ processed_at: string;
2820
+ /**
2821
+ * Engram of the intention the wake was about.
2822
+ */
2823
+ node_id: string;
2824
+ /**
2825
+ * Why this intention was picked.
2826
+ */
2827
+ reason: 'open_engram' | 'assignment';
2828
+ };
2829
+ } | {
2830
+ /**
2831
+ * Always `agent.operation_approval_requested`. SSE event name of this frame; its data is a agent.operation_approval_requested payload. The door held an outward or irreversible operation for the person to approve.
2832
+ */
2833
+ event?: 'agent.operation_approval_requested';
2834
+ /**
2835
+ * Praxis extension (#2371, own face only): the apps/api door held an outward or irreversible operation for the person. The interface builds its confirmation card from these facts and their deadline.
2836
+ */
2837
+ data?: {
2838
+ /**
2839
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
2840
+ */
2841
+ id: string;
2842
+ /**
2843
+ * Always `agent.operation_approval_requested`. The door held an outward or irreversible operation for the person to approve.
2844
+ */
2845
+ type: 'agent.operation_approval_requested';
2846
+ /**
2847
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
2848
+ */
2849
+ processed_at: string;
2850
+ /**
2851
+ * Id of the held request; user.tool_confirmation answers it and agent.operation_approval_decided settles it.
2852
+ */
2853
+ approval_id: string;
2854
+ /**
2855
+ * Operation the agent called, as the platform names it in its API reference.
2856
+ */
2857
+ operation_id: string;
2858
+ /**
2859
+ * Why the call was held.
2860
+ */
2861
+ effect: 'outward' | 'irreversible';
2862
+ /**
2863
+ * HTTP method of the request that was held.
2864
+ */
2865
+ method: string;
2866
+ /**
2867
+ * Path of the request that was held, as the door canonicalized it.
2868
+ */
2869
+ path: string;
2870
+ /**
2871
+ * One line naming the operation and its address, for the card's title.
2872
+ */
2873
+ summary: string;
2874
+ /**
2875
+ * When the request stops being answerable, RFC 3339; a request nobody answered within 24 hours settles as expired.
2876
+ */
2877
+ expires_at: string;
2878
+ /**
2879
+ * Public sesn_ id of the worker session whose operation was held; absent when this session made the call itself.
2880
+ */
2881
+ worker_session_id?: string;
2882
+ /**
2883
+ * Name of that worker session, for the card to say which desk is asking; absent when this session made the call itself.
2884
+ */
2885
+ worker_name?: string;
2886
+ };
2887
+ } | {
2888
+ /**
2889
+ * Always `agent.operation_approval_decided`. SSE event name of this frame; its data is a agent.operation_approval_decided payload. A held operation was approved, refused, or expired unanswered.
2890
+ */
2891
+ event?: 'agent.operation_approval_decided';
2892
+ /**
2893
+ * Praxis extension (#2371, own face only): the person answered a held operation, or its deadline passed.
2894
+ */
2895
+ data?: {
2896
+ /**
2897
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
2898
+ */
2899
+ id: string;
2900
+ /**
2901
+ * Always `agent.operation_approval_decided`. A held operation was approved, refused, or expired unanswered.
2902
+ */
2903
+ type: 'agent.operation_approval_decided';
2904
+ /**
2905
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
2906
+ */
2907
+ processed_at: string;
2908
+ /**
2909
+ * Id of the held request this settles, matching agent.operation_approval_requested.
2910
+ */
2911
+ approval_id: string;
2912
+ /**
2913
+ * How the held request ended.
2914
+ */
2915
+ status: 'approved' | 'refused' | 'expired';
2916
+ };
2917
+ } | {
2918
+ /**
2919
+ * Always `session.prompt_configuration_mismatch`. SSE event name of this frame; its data is a session.prompt_configuration_mismatch payload. A pinned session runs a configuration revision its agent has since left.
2920
+ */
2921
+ event?: 'session.prompt_configuration_mismatch';
2922
+ /**
2923
+ * Praxis extension (#4345, ADR-199 四 分支 A, own face only): a pinned session is running a configuration revision its agent has since left. Two identifiers and nothing else: it says which configuration ran, never what it said.
2924
+ */
2925
+ data?: {
2926
+ /**
2927
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
2928
+ */
2929
+ id: string;
2930
+ /**
2931
+ * Always `session.prompt_configuration_mismatch`. A pinned session runs a configuration revision its agent has since left.
2932
+ */
2933
+ type: 'session.prompt_configuration_mismatch';
2934
+ /**
2935
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
2936
+ */
2937
+ processed_at: string;
2938
+ /**
2939
+ * Agent configuration revision this session pinned when it started (agr_…).
2940
+ */
2941
+ pinned_revision_id: string;
2942
+ /**
2943
+ * Configuration revision the agent publishes now (agr_…); it differs from the pinned one, which is what makes this event.
2944
+ */
2945
+ current_revision_id: string;
2946
+ };
2947
+ } | {
2948
+ /**
2949
+ * Always `session.prompt_rev_changed`. SSE event name of this frame; its data is a session.prompt_rev_changed payload. A platform input (a prompt section, the catalog, the tool descriptions) moved without a version moving.
2950
+ */
2951
+ event?: 'session.prompt_rev_changed';
2952
+ /**
2953
+ * Praxis extension (#4345, ADR-199 四 分支 C, own face only): a platform input (a prompt section, the component catalog, the tool descriptions) moved without any configuration version moving. It names the inputs and their Revs, never the text behind them.
2954
+ */
2955
+ data?: {
2956
+ /**
2957
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
2958
+ */
2959
+ id: string;
2960
+ /**
2961
+ * Always `session.prompt_rev_changed`. A platform input (a prompt section, the catalog, the tool descriptions) moved without a version moving.
2962
+ */
2963
+ type: 'session.prompt_rev_changed';
2964
+ /**
2965
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
2966
+ */
2967
+ processed_at: string;
2968
+ /**
2969
+ * Configuration revision the session ran this turn (agr_…); it does not move when only platform inputs move.
2970
+ */
2971
+ config_revision_id: string;
2972
+ /**
2973
+ * The platform inputs that moved, sorted by name; empty never happens, because no move means no event.
2974
+ */
2975
+ changed: Array<{
2976
+ /**
2977
+ * Input name, for example section:cards, catalog or tools.
2978
+ */
2979
+ name: string;
2980
+ /**
2981
+ * Content Rev after the move, or null when the input was removed; the projection drops an entry that is neither.
2982
+ */
2983
+ rev: string | null;
2984
+ }>;
2985
+ };
2986
+ } | {
2987
+ /**
2988
+ * Always `session.computer_tier`. SSE event name of this frame; its data is a session.computer_tier payload. The session's machine escalated, came back, or reported its tier status.
2989
+ */
2990
+ event?: 'session.computer_tier';
2991
+ /**
2992
+ * Praxis extension (own face only, only when the own face asks for observability): the session's machine escalated to the heavy tier, came back, or reported its status.
2993
+ */
2994
+ data?: {
2995
+ /**
2996
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
2997
+ */
2998
+ id: string;
2999
+ /**
3000
+ * Always `session.computer_tier`. The session's machine escalated, came back, or reported its tier status.
3001
+ */
3002
+ type: 'session.computer_tier';
3003
+ /**
3004
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
3005
+ */
3006
+ processed_at: string;
3007
+ /**
3008
+ * Which step of the tier move this reports.
3009
+ */
3010
+ action: 'escalating' | 'escalated' | 'escalate_failed' | 'rerun' | 'status';
3011
+ /**
3012
+ * Machine the session is on for this report.
3013
+ */
3014
+ tier: 'light' | 'heavy';
3015
+ /**
3016
+ * How long the reported step took, in milliseconds.
3017
+ */
3018
+ duration_ms: number;
3019
+ /**
3020
+ * Why an escalation failed; present only on escalate_failed.
3021
+ */
3022
+ error_code?: string;
3023
+ /**
3024
+ * The machine's own status when the controller reported one, with the progress counters the console shows while a move runs.
3025
+ */
3026
+ status?: {
3027
+ /**
3028
+ * State of the machine at this report.
3029
+ */
3030
+ kind?: 'light_idle' | 'light_busy' | 'escalating' | 'heavy_burst' | 'heavy_resident' | 'releasing' | 'heavy_parked' | 'cooldown';
3031
+ /**
3032
+ * Step of the move in progress.
3033
+ */
3034
+ step?: 'prepare' | 'scan' | 'sync' | 'switch' | 'drain' | 'pull' | 'verify' | 'pause';
3035
+ /**
3036
+ * Progress of the whole move, from 0 to 100.
3037
+ */
3038
+ percent?: number;
3039
+ /**
3040
+ * Files synchronized so far.
3041
+ */
3042
+ files_done?: number;
3043
+ /**
3044
+ * Files to synchronize in this move.
3045
+ */
3046
+ files_total?: number;
3047
+ /**
3048
+ * Epoch milliseconds when an idle heavy machine is released.
3049
+ */
3050
+ idle_release_at?: number;
3051
+ /**
3052
+ * Epoch milliseconds of the next attempt after a failure.
3053
+ */
3054
+ retry_at?: number;
3055
+ /**
3056
+ * Lease epoch of the controller, bumped on every escalation to heavy.
3057
+ */
3058
+ epoch?: number;
3059
+ /**
3060
+ * The heavy machine's own status read without waking it, or null when there is none.
3061
+ */
3062
+ heavy_instance?: string | null;
3063
+ /**
3064
+ * True when a heavy machine exists and is paused, so its disk is kept.
3065
+ */
3066
+ heavy_paused?: boolean;
3067
+ };
3068
+ };
3069
+ } | {
3070
+ /**
3071
+ * Always `agent.artifact_delivered`. SSE event name of this frame; its data is a agent.artifact_delivered payload. A file, canvas or media asset the agent delivered was recorded as an artifact.
3072
+ */
3073
+ event?: 'agent.artifact_delivered';
3074
+ /**
3075
+ * Praxis extension (ADR-140 / #1989, own face only, only when the own face asks for observability): a file, canvas or media asset the agent delivered was recorded as an artifact of the session.
3076
+ */
3077
+ data?: {
3078
+ /**
3079
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
3080
+ */
3081
+ id: string;
3082
+ /**
3083
+ * Always `agent.artifact_delivered`. A file, canvas or media asset the agent delivered was recorded as an artifact.
3084
+ */
3085
+ type: 'agent.artifact_delivered';
3086
+ /**
3087
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
3088
+ */
3089
+ processed_at: string;
3090
+ /**
3091
+ * The artifact as the session recorded it: one file of the outputs directory, or one canvas or media asset the reply pointed at.
3092
+ */
3093
+ artifact: {
3094
+ /**
3095
+ * Object type tag; always artifact for a delivered output.
3096
+ */
3097
+ object: 'artifact';
3098
+ /**
3099
+ * Artifact id (art_…); delivering the same path again keeps it.
3100
+ */
3101
+ id: string;
3102
+ /**
3103
+ * Session that owns the artifact.
3104
+ */
3105
+ session_id: string;
3106
+ /**
3107
+ * Run that produced it, or null when that cannot be told.
3108
+ */
3109
+ run_id: string | null;
3110
+ /**
3111
+ * Path of the artifact relative to the outputs directory, for example report.pdf.
3112
+ */
3113
+ name: string;
3114
+ /**
3115
+ * Version of this artifact: one more each time the same path is delivered again in this session.
3116
+ */
3117
+ version: number;
3118
+ /**
3119
+ * What the artifact holds: a delivered file (kind file, with file_id, filename, mime_type and bytes) or a platform object (kind object, with object_type, object_id, href and title).
3120
+ */
3121
+ parts: Array<{
3122
+ [key: string]: unknown;
3123
+ }>;
3124
+ /**
3125
+ * Link addresses in the reply that point at this artifact, verbatim.
3126
+ */
3127
+ source_hrefs: Array<string>;
3128
+ /**
3129
+ * When the artifact was first registered, RFC 3339.
3130
+ */
3131
+ create_time: string;
3132
+ /**
3133
+ * When the latest version was registered, RFC 3339.
3134
+ */
3135
+ update_time: string;
3136
+ };
3137
+ };
3138
+ } | {
3139
+ /**
3140
+ * Always `agent.image_generation`. SSE event name of this frame; its data is a agent.image_generation payload. Retired imagine tool: one image request and how it ended. Old sessions still replay it.
3141
+ */
3142
+ event?: 'agent.image_generation';
3143
+ /**
3144
+ * Retired imagine tool (ADR-094 §4, own face only): one image request and how it ended. Nothing emits it now; sessions that recorded it still replay it through history, catch-up and the stream.
3145
+ */
3146
+ data?: {
3147
+ /**
3148
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
3149
+ */
3150
+ id: string;
3151
+ /**
3152
+ * Always `agent.image_generation`. Retired imagine tool: one image request and how it ended. Old sessions still replay it.
3153
+ */
3154
+ type: 'agent.image_generation';
3155
+ /**
3156
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
3157
+ */
3158
+ processed_at: string;
3159
+ /**
3160
+ * The imagine tool call this report belongs to.
3161
+ */
3162
+ tool_use_id: string;
3163
+ /**
3164
+ * Which picture of the call this is, from 0.
3165
+ */
3166
+ index: number;
3167
+ /**
3168
+ * How many pictures the call asked for.
3169
+ */
3170
+ total: number;
3171
+ /**
3172
+ * Step of the picture at the time it was recorded: queued, drawing, completed, failed or cancelled.
3173
+ */
3174
+ status: string;
3175
+ /**
3176
+ * How the picture was produced: generate, edit or set.
3177
+ */
3178
+ mode?: string;
3179
+ /**
3180
+ * Aspect ratio requested for the picture, for example 1:1.
3181
+ */
3182
+ aspect?: string;
3183
+ /**
3184
+ * Prompt the model passed for this picture.
3185
+ */
3186
+ prompt?: string;
3187
+ /**
3188
+ * Model that drew the picture; absent when none was chosen.
3189
+ */
3190
+ model?: string;
3191
+ /**
3192
+ * File of the finished picture; absent until it completed.
3193
+ */
3194
+ file_id?: string;
3195
+ /**
3196
+ * Conversation label the picture was given, for example 图3.
3197
+ */
3198
+ label?: string;
3199
+ /**
3200
+ * Width of the produced picture in pixels.
3201
+ */
3202
+ width?: number;
3203
+ /**
3204
+ * Height of the produced picture in pixels.
3205
+ */
3206
+ height?: number;
3207
+ /**
3208
+ * Prompt the provider rewrote before drawing, when it rewrote one.
3209
+ */
3210
+ revised_prompt?: string;
3211
+ /**
3212
+ * Pictures this one was made from, by their conversation labels.
3213
+ */
3214
+ source_labels?: Array<string>;
3215
+ /**
3216
+ * Caption the reply gave the picture.
3217
+ */
3218
+ caption?: string;
3219
+ /**
3220
+ * Slot of the picture inside a planned set; null when it was not part of one.
3221
+ */
3222
+ slot?: number | null;
3223
+ /**
3224
+ * Label of the picture this version replaces.
3225
+ */
3226
+ replaces?: string;
3227
+ /**
3228
+ * Version of the labelled picture: one more per replacement.
3229
+ */
3230
+ version?: number;
3231
+ /**
3232
+ * Why the picture failed; present only when it failed.
3233
+ */
3234
+ failure?: {
3235
+ /**
3236
+ * Failure class: moderation, quota, rate_limited, timeout, invalid_request, provider_error or interrupted.
3237
+ */
3238
+ reason?: string;
3239
+ };
3240
+ };
3241
+ } | {
3242
+ /**
3243
+ * Always `session.image_labeled`. SSE event name of this frame; its data is a session.image_labeled payload. Retired imagine tool: a picture was labelled in the session. Old sessions still replay it.
3244
+ */
3245
+ event?: 'session.image_labeled';
3246
+ /**
3247
+ * Retired imagine tool (ADR-094 §4, own face only): a picture was labelled in the session. Nothing emits it now; sessions that recorded it still replay it.
3248
+ */
3249
+ data?: {
3250
+ /**
3251
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
3252
+ */
3253
+ id: string;
3254
+ /**
3255
+ * Always `session.image_labeled`. Retired imagine tool: a picture was labelled in the session. Old sessions still replay it.
3256
+ */
3257
+ type: 'session.image_labeled';
3258
+ /**
3259
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
3260
+ */
3261
+ processed_at: string;
3262
+ /**
3263
+ * Conversation label the picture was given, for example 图3.
3264
+ */
3265
+ label: string;
3266
+ /**
3267
+ * File the label points at.
3268
+ */
3269
+ file_id: string;
3270
+ /**
3271
+ * Where the picture came from.
3272
+ */
3273
+ origin: 'generated' | 'uploaded';
3274
+ /**
3275
+ * Name of the file the label points at.
3276
+ */
3277
+ filename: string;
3278
+ /**
3279
+ * Imagine call that produced the label, when one did.
3280
+ */
3281
+ tool_use_id?: string;
3282
+ /**
3283
+ * Version of the labelled picture: one more per replacement.
3284
+ */
3285
+ version?: number;
3286
+ /**
3287
+ * File this label pointed at before the replacement, when it was replaced.
3288
+ */
3289
+ replaced_file_id?: string;
3290
+ };
3291
+ } | {
3292
+ /**
3293
+ * Always `session.image_set_planned`. SSE event name of this frame; its data is a session.image_set_planned payload. Retired imagine tool: one call planned a set of pictures. Old sessions still replay it.
3294
+ */
3295
+ event?: 'session.image_set_planned';
3296
+ /**
3297
+ * Retired imagine tool (ADR-094 §4, own face only): one imagine call planned a set of pictures. Nothing emits it now; sessions that recorded it still replay it.
3298
+ */
3299
+ data?: {
3300
+ /**
3301
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
3302
+ */
3303
+ id: string;
3304
+ /**
3305
+ * Always `session.image_set_planned`. Retired imagine tool: one call planned a set of pictures. Old sessions still replay it.
3306
+ */
3307
+ type: 'session.image_set_planned';
3308
+ /**
3309
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
3310
+ */
3311
+ processed_at: string;
3312
+ /**
3313
+ * Imagine call that planned the set.
3314
+ */
3315
+ tool_use_id: string;
3316
+ /**
3317
+ * The pictures the set planned, in the order the call listed them.
3318
+ */
3319
+ items: Array<unknown>;
3320
+ /**
3321
+ * Title given to the set, when the call named one.
3322
+ */
3323
+ title?: string;
3324
+ };
3325
+ } | {
3326
+ /**
3327
+ * Always `session.project_attached`. SSE event name of this frame; its data is a session.project_attached payload. The main session attached a project; it names the project, never its instructions.
3328
+ */
3329
+ event?: 'session.project_attached';
3330
+ /**
3331
+ * Praxis extension (#4395, ADR-202, own face only): the main session attached a project. It names the project's id, name and folder, never its instructions.
3332
+ */
3333
+ data?: {
3334
+ /**
3335
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
3336
+ */
3337
+ id: string;
3338
+ /**
3339
+ * Always `session.project_attached`. The main session attached a project; it names the project, never its instructions.
3340
+ */
3341
+ type: 'session.project_attached';
3342
+ /**
3343
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
3344
+ */
3345
+ processed_at: string;
3346
+ /**
3347
+ * The project the main session is now attached to.
3348
+ */
3349
+ project: {
3350
+ /**
3351
+ * Registered project id, as the conversation's project list returns it.
3352
+ */
3353
+ id: string;
3354
+ /**
3355
+ * Project name as it was registered; a label, not a unique key.
3356
+ */
3357
+ name: string;
3358
+ /**
3359
+ * Folder of the project on the session's computer, the directory its desks work in.
3360
+ */
3361
+ path: string;
3362
+ };
3363
+ /**
3364
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
3365
+ */
3366
+ message_id?: string;
3367
+ /**
3368
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
3369
+ */
3370
+ session_thread_id?: string | null;
3371
+ };
3372
+ } | {
3373
+ /**
3374
+ * Always `session.project_detached`. SSE event name of this frame; its data is a session.project_detached payload. The main session's project attachment ended.
3375
+ */
3376
+ event?: 'session.project_detached';
3377
+ /**
3378
+ * Praxis extension (#4395, ADR-202, own face only): the main session's project attachment ended.
3379
+ */
3380
+ data?: {
3381
+ /**
3382
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
3383
+ */
3384
+ id: string;
3385
+ /**
3386
+ * Always `session.project_detached`. The main session's project attachment ended.
3387
+ */
3388
+ type: 'session.project_detached';
3389
+ /**
3390
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
3391
+ */
3392
+ processed_at: string;
3393
+ /**
3394
+ * Id of the project the session was attached to; it is the same id the attach event carried.
3395
+ */
3396
+ project_id: string;
3397
+ /**
3398
+ * Present only when the project left the registry rather than the session detaching it.
3399
+ */
3400
+ reason?: 'project_removed';
3401
+ /**
3402
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
3403
+ */
3404
+ message_id?: string;
3405
+ /**
3406
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
3407
+ */
3408
+ session_thread_id?: string | null;
2673
3409
  };
2674
3410
  } | {
2675
3411
  /**
@@ -2813,7 +3549,7 @@ export type AgentSseEvent = ({
2813
3549
  /**
2814
3550
  * Server-Sent Events event name of this frame.
2815
3551
  */
2816
- event: 'system.message' | 'user.message' | 'user.interrupt' | 'agent.message' | 'agent.thinking' | 'session.status_running' | 'session.status_rescheduled' | 'session.status_idle' | 'session.status_terminated' | 'agent.thread_context_compacting' | 'agent.thread_context_compacted' | 'agent.thread_context_reset' | 'session.updated' | 'session.error' | 'session.usage' | 'span.model_request_start' | 'span.model_request_end' | 'agent.tool_use' | 'agent.tool_result' | 'agent.mcp_tool_use' | 'agent.mcp_tool_result' | 'user.tool_confirmation' | 'agent.custom_tool_use' | 'user.custom_tool_result' | 'session.thread_created' | 'session.thread_status_running' | 'session.thread_status_idle' | 'session.thread_status_rescheduled' | 'session.thread_status_terminated' | 'agent.thread_message_sent' | 'agent.thread_message_received' | 'user.withdraw' | 'user.steer' | 'system.notification' | 'system.notification_suppressed' | 'system.notification_recorded' | 'session.forked' | 'session.goal_changed' | 'session.goal_verification' | 'event_start' | 'event_delta' | 'ping' | 'error';
3552
+ event: 'system.message' | 'user.message' | 'user.interrupt' | 'agent.message' | 'agent.thinking' | 'session.status_running' | 'session.status_rescheduled' | 'session.status_idle' | 'session.status_terminated' | 'agent.thread_context_compacting' | 'agent.thread_context_compacted' | 'agent.thread_context_reset' | 'session.updated' | 'session.error' | 'session.usage' | 'span.model_request_start' | 'span.model_request_end' | 'agent.tool_use' | 'agent.tool_result' | 'agent.mcp_tool_use' | 'agent.mcp_tool_result' | 'user.tool_confirmation' | 'agent.custom_tool_use' | 'user.custom_tool_result' | 'session.thread_created' | 'session.thread_status_running' | 'session.thread_status_idle' | 'session.thread_status_rescheduled' | 'session.thread_status_terminated' | 'agent.thread_message_sent' | 'agent.thread_message_received' | 'user.withdraw' | 'user.steer' | 'system.notification' | 'system.notification_suppressed' | 'system.notification_recorded' | 'session.forked' | 'session.goal_changed' | 'session.goal_verification' | 'cognition.surfaced' | 'cognition.intention_woken' | 'agent.operation_approval_requested' | 'agent.operation_approval_decided' | 'session.prompt_configuration_mismatch' | 'session.prompt_rev_changed' | 'session.computer_tier' | 'agent.artifact_delivered' | 'agent.image_generation' | 'session.image_labeled' | 'session.image_set_planned' | 'session.project_attached' | 'session.project_detached' | 'event_start' | 'event_delta' | 'ping' | 'error';
2817
3553
  data: AgentSseData;
2818
3554
  };
2819
3555
  /**
@@ -2843,7 +3579,7 @@ export type BrowserSessionCreateParams = {
2843
3579
  */
2844
3580
  visibility?: 'private' | 'organization';
2845
3581
  /**
2846
- * false 时最后一个客户端断开且无人观看后结束会话;true 时保留至关闭或超时。
3582
+ * false 时最后一个客户端断开且无人观看后结束会话;true 时保留至关闭或超时。两种情况都仍受健康检查约束:浏览器连续 2 次健康检查失败时结束会话(closeReason=watchdog)。
2847
3583
  */
2848
3584
  keepAlive?: boolean;
2849
3585
  /**
@@ -2968,7 +3704,7 @@ export type BrowserSessionCreateResult = {
2968
3704
  */
2969
3705
  status: 'PENDING' | 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED';
2970
3706
  /**
2971
- * API 创建的会话是否在客户端断开后保留;true 不因空闲释放,仍受最长寿命限制。
3707
+ * API 创建的会话是否在客户端断开后保留;true 不因空闲释放,仍受最长寿命限制。健康检查失败(closeReason=watchdog)时无论 keepAlive 为何都会结束。
2972
3708
  */
2973
3709
  keepAlive: boolean;
2974
3710
  /**
@@ -3078,7 +3814,7 @@ export type BrowserSessionCreateResult = {
3078
3814
  expiresAt: string;
3079
3815
  } | null;
3080
3816
  /**
3081
- * 自带凭证的 CDP WebSocket 地址,有效期覆盖会话寿命;连接无需额外 API Key。
3817
+ * 自带凭证的 CDP WebSocket 地址,有效期覆盖会话寿命;连接无需额外 API Key。真指针事件(触摸、拖拽、按坐标点击)的 CDP 命令从这里发送。
3082
3818
  */
3083
3819
  connectUrl: string;
3084
3820
  /**
@@ -3110,7 +3846,7 @@ export type BrowserSession = {
3110
3846
  */
3111
3847
  status: 'PENDING' | 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED';
3112
3848
  /**
3113
- * API 创建的会话是否在客户端断开后保留;true 不因空闲释放,仍受最长寿命限制。
3849
+ * API 创建的会话是否在客户端断开后保留;true 不因空闲释放,仍受最长寿命限制。健康检查失败(closeReason=watchdog)时无论 keepAlive 为何都会结束。
3114
3850
  */
3115
3851
  keepAlive: boolean;
3116
3852
  /**
@@ -3234,7 +3970,7 @@ export type BrowserSessionGetResult = {
3234
3970
  */
3235
3971
  status: 'PENDING' | 'RUNNING' | 'ERROR' | 'TIMED_OUT' | 'COMPLETED';
3236
3972
  /**
3237
- * API 创建的会话是否在客户端断开后保留;true 不因空闲释放,仍受最长寿命限制。
3973
+ * API 创建的会话是否在客户端断开后保留;true 不因空闲释放,仍受最长寿命限制。健康检查失败(closeReason=watchdog)时无论 keepAlive 为何都会结束。
3238
3974
  */
3239
3975
  keepAlive: boolean;
3240
3976
  /**
@@ -3371,7 +4107,7 @@ export type BrowserSessionLiveUrls = {
3371
4107
  */
3372
4108
  debuggerUrl: string;
3373
4109
  /**
3374
- * 连接当前会话的 CDP WebSocket 地址,自带 signingKey,无需额外 API Key。
4110
+ * 连接当前会话的 CDP WebSocket 地址,自带 signingKey,无需额外 API Key;会话结束后再用它建立 CDP 连接返回 409 SESSION_ENDED。
3375
4111
  */
3376
4112
  wsUrl: string;
3377
4113
  /**
@@ -14233,7 +14969,7 @@ export type CustomerGrantCode = {
14233
14969
  expires_at?: string;
14234
14970
  };
14235
14971
  /**
14236
- * Exactly one credential to exchange.
14972
+ * Exactly one credential to exchange. A publishable_key may be accompanied by the continuation_token of an earlier anonymous answer.
14237
14973
  */
14238
14974
  export type CustomerAccessTokenInput = {
14239
14975
  /**
@@ -14241,9 +14977,13 @@ export type CustomerAccessTokenInput = {
14241
14977
  */
14242
14978
  grant_code?: string;
14243
14979
  /**
14244
- * A publishable key (pk_…) for an anonymous visitor; the exchange creates a new anonymous end user bound to the request Origin.
14980
+ * A publishable key (pk_…) for an anonymous visitor; the exchange creates a new anonymous end user bound to the request Origin, unless continuation_token continues an earlier visitor of this key's organization.
14245
14981
  */
14246
14982
  publishable_key?: string;
14983
+ /**
14984
+ * The continuation_token of an earlier anonymous answer, kept by the page's own storage. A live one continues that anonymous end user (a new sign-in of seven days, with a rotated token); an unknown, expired, revoked, merged, blocked or foreign-organization one is treated as absent, so the answer never reveals whether it exists. It also continues the visitor when the page presents another publishable key of the same organization, but the resources it may reach are only those of the key presented now. Only accepted with publishable_key.
14985
+ */
14986
+ continuation_token?: string;
14247
14987
  };
14248
14988
  /**
14249
14989
  * The short Praxis customer access token the Kit carries, with the sign-in behind it.
@@ -14269,6 +15009,10 @@ export type CustomerAccessToken = {
14269
15009
  * Id of the sign-in (csi_…) this token was issued from, which the renewal and the sign-out act on.
14270
15010
  */
14271
15011
  sign_in_id?: string;
15012
+ /**
15013
+ * Present on an anonymous answer only. An opaque credential the embed page stores in its own first-party storage and sends back with the next publishable-key exchange, so a returning visitor keeps the same anonymous end user after the access token has expired. It also carries the visitor across a change of publishable key within the same organization, while the accessible resources follow the key presented. It lasts as long as the sign-in (seven days) and is replaced on every anonymous exchange; sign-out ends it. Never put it in a URL or share it across origins.
15014
+ */
15015
+ continuation_token?: string;
14272
15016
  /**
14273
15017
  * The end user the token belongs to.
14274
15018
  */
@@ -15177,9 +15921,9 @@ export type CutExport = {
15177
15921
  */
15178
15922
  checks?: Array<{
15179
15923
  /**
15180
- * BLACK_FIRST_FRAME: the first frame is black or empty. PLACEHOLDER_TEXT: a text or caption looks like unfinished placeholder text (TODO, XXX, ___). UPSCALED_SOURCE: a source is enlarged more than 1.5x and will look soft. CAPTION_TOO_SHORT: a caption is on screen too briefly to read. CAPTION_OUT_OF_SAFE_AREA: a caption or text box reaches into the frame edge where players crop or overlay controls. CAPTION_TEXT_MISMATCH: a caption's words differ from the speech the timeline keeps under it (a caption edited without its sound, or sound kept after its caption was removed). CAPTION_DRIFT: a caption starts or ends more than 0.2 s away from its words. FILLER_REMAINING: a filler, verbal tic, repetition or restart that media labelled with confidence 0.7 or more is still in the timeline. SUSPECT_TYPO: a word the correction model doubted and left uncorrected (a possible homophone or misheard name) is still in the timeline. LOUDNESS_TRUE_PEAK_OVER: the delivered file's measured true peak is above the export's true-peak target.
15924
+ * BLACK_FIRST_FRAME: the first frame is black or empty. PLACEHOLDER_TEXT: a text or caption looks like unfinished placeholder text (TODO, XXX, ___). UPSCALED_SOURCE: a source is enlarged more than 1.5x and will look soft. CAPTION_TOO_SHORT: a caption is on screen too briefly to read. CAPTION_OUT_OF_SAFE_AREA: a caption or text box reaches into the frame edge where players crop or overlay controls. CAPTION_TEXT_MISMATCH: a caption's words differ from the speech the timeline keeps under it (a caption edited without its sound, or sound kept after its caption was removed). CAPTION_DRIFT: a caption starts or ends more than 0.2 s away from its words. FILLER_REMAINING: a filler, verbal tic, repetition or restart that media labelled with confidence 0.7 or more is still in the timeline. SUSPECT_TYPO: a word the correction model doubted and left uncorrected (a possible homophone or misheard name) is still in the timeline. LOUDNESS_TRUE_PEAK_OVER: the delivered file's measured true peak is above the export's true-peak target. RENDER_FALLBACK: a parallel render worker failed, so some chunks are being rendered again on the main machine; it appears while the export is still rendering, the export continues and takes longer, and nothing needs to be done.
15181
15925
  */
15182
- code: 'BLACK_FIRST_FRAME' | 'PLACEHOLDER_TEXT' | 'UPSCALED_SOURCE' | 'CAPTION_TOO_SHORT' | 'CAPTION_OUT_OF_SAFE_AREA' | 'CAPTION_TEXT_MISMATCH' | 'CAPTION_DRIFT' | 'FILLER_REMAINING' | 'SUSPECT_TYPO' | 'LOUDNESS_TRUE_PEAK_OVER';
15926
+ code: 'BLACK_FIRST_FRAME' | 'PLACEHOLDER_TEXT' | 'UPSCALED_SOURCE' | 'CAPTION_TOO_SHORT' | 'CAPTION_OUT_OF_SAFE_AREA' | 'CAPTION_TEXT_MISMATCH' | 'CAPTION_DRIFT' | 'FILLER_REMAINING' | 'SUSPECT_TYPO' | 'LOUDNESS_TRUE_PEAK_OVER' | 'RENDER_FALLBACK';
15183
15927
  /**
15184
15928
  * Always warning in this version.
15185
15929
  */
@@ -16593,9 +17337,9 @@ export type DevopsRun = {
16593
17337
  */
16594
17338
  state: 'queued' | 'provisioning' | 'running' | 'reporting' | 'finished';
16595
17339
  /**
16596
- * The verdict. Pending means no verdict yet, not success; cancelled and timed_out are outcomes of the run itself, not of the cases.
17340
+ * The verdict. Pending means no verdict yet, not success; cancelled and timed_out are outcomes of the run itself, not of the cases; no_tests means the run finished having executed no case at all, which is not a pass.
16597
17341
  */
16598
- result: 'pending' | 'passed' | 'failed' | 'errored' | 'cancelled' | 'timed_out';
17342
+ result: 'pending' | 'passed' | 'failed' | 'errored' | 'cancelled' | 'timed_out' | 'no_tests';
16599
17343
  counts: DevopsResultCounts;
16600
17344
  /**
16601
17345
  * The external tool that produced the results, present for runs whose results arrived as an uploaded report.
@@ -25702,6 +26446,23 @@ export type TicketComment = {
25702
26446
  * Present only when something in the body could not be resolved; absent when it all resolved.
25703
26447
  */
25704
26448
  warnings?: Array<string>;
26449
+ /**
26450
+ * Present only on a create or edit answer, and only when some `@handle` reached nobody. The comment is always written; send those people with `mentions` to reach them.
26451
+ */
26452
+ unresolved?: Array<string>;
26453
+ /**
26454
+ * Present only on a create or edit answer, and only when some `@handle` named more than one actor. Send the one you mean with `mentions` (handle and subject).
26455
+ */
26456
+ ambiguous?: Array<{
26457
+ /**
26458
+ * The `@handle` as written, without the `@`.
26459
+ */
26460
+ handle: string;
26461
+ /**
26462
+ * How many actors answer to it; none of them was notified.
26463
+ */
26464
+ candidates: number;
26465
+ }>;
25705
26466
  };
25706
26467
  /**
25707
26468
  * A repository label.
@@ -27481,6 +28242,14 @@ export type AgentSseData = {
27481
28242
  * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
27482
28243
  */
27483
28244
  processed_at: string;
28245
+ /**
28246
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
28247
+ */
28248
+ message_id?: string;
28249
+ /**
28250
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
28251
+ */
28252
+ session_thread_id?: string | null;
27484
28253
  } | {
27485
28254
  /**
27486
28255
  * Text of the block.
@@ -27603,6 +28372,14 @@ export type AgentSseData = {
27603
28372
  * message_id of the agent message in the parent session up to which the conversation was copied.
27604
28373
  */
27605
28374
  forked_from_message_id: string;
28375
+ /**
28376
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
28377
+ */
28378
+ message_id?: string;
28379
+ /**
28380
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
28381
+ */
28382
+ session_thread_id?: string | null;
27606
28383
  } | {
27607
28384
  /**
27608
28385
  * Event id, unique within the session.
@@ -27714,6 +28491,14 @@ export type AgentSseData = {
27714
28491
  */
27715
28492
  updated_at: number;
27716
28493
  } | null;
28494
+ /**
28495
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
28496
+ */
28497
+ message_id?: string;
28498
+ /**
28499
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
28500
+ */
28501
+ session_thread_id?: string | null;
27717
28502
  } | {
27718
28503
  /**
27719
28504
  * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
@@ -27764,6 +28549,601 @@ export type AgentSseData = {
27764
28549
  */
27765
28550
  next_action?: string;
27766
28551
  };
28552
+ /**
28553
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
28554
+ */
28555
+ message_id?: string;
28556
+ /**
28557
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
28558
+ */
28559
+ session_thread_id?: string | null;
28560
+ } | {
28561
+ /**
28562
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28563
+ */
28564
+ id: string;
28565
+ /**
28566
+ * Always `cognition.surfaced`. A worker session reached a boundary and surfaced in this session.
28567
+ */
28568
+ type: 'cognition.surfaced';
28569
+ /**
28570
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28571
+ */
28572
+ processed_at: string;
28573
+ /**
28574
+ * Public sesn_ id of the worker session that reached the boundary; the internal ags_ id never appears here.
28575
+ */
28576
+ worker_session_id: string;
28577
+ /**
28578
+ * Name the worker session was opened under, as the session list shows it.
28579
+ */
28580
+ name: string;
28581
+ /**
28582
+ * How the worker's span ended.
28583
+ */
28584
+ state: 'done' | 'waiting' | 'failed' | 'archived';
28585
+ /**
28586
+ * Engram that filed the worker's experience, when a recap was written; absent when there is no node to name.
28587
+ */
28588
+ experience_id?: string;
28589
+ /**
28590
+ * What the worker handed over at this boundary: its last message, the addresses it named, the files it delivered and any operation the platform still holds. Absent when it handed nothing over.
28591
+ */
28592
+ result?: {
28593
+ /**
28594
+ * The worker's last message to this session, whitespace-collapsed and capped by the agent service.
28595
+ */
28596
+ message?: string;
28597
+ /**
28598
+ * Absolute http(s) addresses the delivered message names, in order of appearance.
28599
+ */
28600
+ links?: Array<string>;
28601
+ /**
28602
+ * Files the worker registered as delivered in this span.
28603
+ */
28604
+ files?: Array<{
28605
+ /**
28606
+ * Path of the delivered file, relative to the session's outputs directory.
28607
+ */
28608
+ name?: string;
28609
+ /**
28610
+ * Address the reply used to point at the file; absent when it named none.
28611
+ */
28612
+ href?: string;
28613
+ }>;
28614
+ /**
28615
+ * Operations the platform held at this boundary that nobody has answered yet.
28616
+ */
28617
+ held?: Array<{
28618
+ /**
28619
+ * Approval id of the held operation, the one user.tool_confirmation answers.
28620
+ */
28621
+ id?: string;
28622
+ /**
28623
+ * One line saying what the held operation would do.
28624
+ */
28625
+ summary?: string;
28626
+ /**
28627
+ * Effect class of the held operation: outward, or irreversible.
28628
+ */
28629
+ effect?: string;
28630
+ /**
28631
+ * HTTP method of the held request.
28632
+ */
28633
+ method?: string;
28634
+ /**
28635
+ * Path of the held request, as the door canonicalized it.
28636
+ */
28637
+ path?: string;
28638
+ /**
28639
+ * When the request stops being answerable, RFC 3339.
28640
+ */
28641
+ expires_at?: string;
28642
+ }>;
28643
+ };
28644
+ } | {
28645
+ /**
28646
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28647
+ */
28648
+ id: string;
28649
+ /**
28650
+ * Always `cognition.intention_woken`. The idle pass woke the session about one open intention.
28651
+ */
28652
+ type: 'cognition.intention_woken';
28653
+ /**
28654
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28655
+ */
28656
+ processed_at: string;
28657
+ /**
28658
+ * Engram of the intention the wake was about.
28659
+ */
28660
+ node_id: string;
28661
+ /**
28662
+ * Why this intention was picked.
28663
+ */
28664
+ reason: 'open_engram' | 'assignment';
28665
+ } | {
28666
+ /**
28667
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28668
+ */
28669
+ id: string;
28670
+ /**
28671
+ * Always `agent.operation_approval_requested`. The door held an outward or irreversible operation for the person to approve.
28672
+ */
28673
+ type: 'agent.operation_approval_requested';
28674
+ /**
28675
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28676
+ */
28677
+ processed_at: string;
28678
+ /**
28679
+ * Id of the held request; user.tool_confirmation answers it and agent.operation_approval_decided settles it.
28680
+ */
28681
+ approval_id: string;
28682
+ /**
28683
+ * Operation the agent called, as the platform names it in its API reference.
28684
+ */
28685
+ operation_id: string;
28686
+ /**
28687
+ * Why the call was held.
28688
+ */
28689
+ effect: 'outward' | 'irreversible';
28690
+ /**
28691
+ * HTTP method of the request that was held.
28692
+ */
28693
+ method: string;
28694
+ /**
28695
+ * Path of the request that was held, as the door canonicalized it.
28696
+ */
28697
+ path: string;
28698
+ /**
28699
+ * One line naming the operation and its address, for the card's title.
28700
+ */
28701
+ summary: string;
28702
+ /**
28703
+ * When the request stops being answerable, RFC 3339; a request nobody answered within 24 hours settles as expired.
28704
+ */
28705
+ expires_at: string;
28706
+ /**
28707
+ * Public sesn_ id of the worker session whose operation was held; absent when this session made the call itself.
28708
+ */
28709
+ worker_session_id?: string;
28710
+ /**
28711
+ * Name of that worker session, for the card to say which desk is asking; absent when this session made the call itself.
28712
+ */
28713
+ worker_name?: string;
28714
+ } | {
28715
+ /**
28716
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28717
+ */
28718
+ id: string;
28719
+ /**
28720
+ * Always `agent.operation_approval_decided`. A held operation was approved, refused, or expired unanswered.
28721
+ */
28722
+ type: 'agent.operation_approval_decided';
28723
+ /**
28724
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28725
+ */
28726
+ processed_at: string;
28727
+ /**
28728
+ * Id of the held request this settles, matching agent.operation_approval_requested.
28729
+ */
28730
+ approval_id: string;
28731
+ /**
28732
+ * How the held request ended.
28733
+ */
28734
+ status: 'approved' | 'refused' | 'expired';
28735
+ } | {
28736
+ /**
28737
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28738
+ */
28739
+ id: string;
28740
+ /**
28741
+ * Always `session.prompt_configuration_mismatch`. A pinned session runs a configuration revision its agent has since left.
28742
+ */
28743
+ type: 'session.prompt_configuration_mismatch';
28744
+ /**
28745
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28746
+ */
28747
+ processed_at: string;
28748
+ /**
28749
+ * Agent configuration revision this session pinned when it started (agr_…).
28750
+ */
28751
+ pinned_revision_id: string;
28752
+ /**
28753
+ * Configuration revision the agent publishes now (agr_…); it differs from the pinned one, which is what makes this event.
28754
+ */
28755
+ current_revision_id: string;
28756
+ } | {
28757
+ /**
28758
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28759
+ */
28760
+ id: string;
28761
+ /**
28762
+ * Always `session.prompt_rev_changed`. A platform input (a prompt section, the catalog, the tool descriptions) moved without a version moving.
28763
+ */
28764
+ type: 'session.prompt_rev_changed';
28765
+ /**
28766
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28767
+ */
28768
+ processed_at: string;
28769
+ /**
28770
+ * Configuration revision the session ran this turn (agr_…); it does not move when only platform inputs move.
28771
+ */
28772
+ config_revision_id: string;
28773
+ /**
28774
+ * The platform inputs that moved, sorted by name; empty never happens, because no move means no event.
28775
+ */
28776
+ changed: Array<{
28777
+ /**
28778
+ * Input name, for example section:cards, catalog or tools.
28779
+ */
28780
+ name: string;
28781
+ /**
28782
+ * Content Rev after the move, or null when the input was removed; the projection drops an entry that is neither.
28783
+ */
28784
+ rev: string | null;
28785
+ }>;
28786
+ } | {
28787
+ /**
28788
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28789
+ */
28790
+ id: string;
28791
+ /**
28792
+ * Always `session.computer_tier`. The session's machine escalated, came back, or reported its tier status.
28793
+ */
28794
+ type: 'session.computer_tier';
28795
+ /**
28796
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28797
+ */
28798
+ processed_at: string;
28799
+ /**
28800
+ * Which step of the tier move this reports.
28801
+ */
28802
+ action: 'escalating' | 'escalated' | 'escalate_failed' | 'rerun' | 'status';
28803
+ /**
28804
+ * Machine the session is on for this report.
28805
+ */
28806
+ tier: 'light' | 'heavy';
28807
+ /**
28808
+ * How long the reported step took, in milliseconds.
28809
+ */
28810
+ duration_ms: number;
28811
+ /**
28812
+ * Why an escalation failed; present only on escalate_failed.
28813
+ */
28814
+ error_code?: string;
28815
+ /**
28816
+ * The machine's own status when the controller reported one, with the progress counters the console shows while a move runs.
28817
+ */
28818
+ status?: {
28819
+ /**
28820
+ * State of the machine at this report.
28821
+ */
28822
+ kind?: 'light_idle' | 'light_busy' | 'escalating' | 'heavy_burst' | 'heavy_resident' | 'releasing' | 'heavy_parked' | 'cooldown';
28823
+ /**
28824
+ * Step of the move in progress.
28825
+ */
28826
+ step?: 'prepare' | 'scan' | 'sync' | 'switch' | 'drain' | 'pull' | 'verify' | 'pause';
28827
+ /**
28828
+ * Progress of the whole move, from 0 to 100.
28829
+ */
28830
+ percent?: number;
28831
+ /**
28832
+ * Files synchronized so far.
28833
+ */
28834
+ files_done?: number;
28835
+ /**
28836
+ * Files to synchronize in this move.
28837
+ */
28838
+ files_total?: number;
28839
+ /**
28840
+ * Epoch milliseconds when an idle heavy machine is released.
28841
+ */
28842
+ idle_release_at?: number;
28843
+ /**
28844
+ * Epoch milliseconds of the next attempt after a failure.
28845
+ */
28846
+ retry_at?: number;
28847
+ /**
28848
+ * Lease epoch of the controller, bumped on every escalation to heavy.
28849
+ */
28850
+ epoch?: number;
28851
+ /**
28852
+ * The heavy machine's own status read without waking it, or null when there is none.
28853
+ */
28854
+ heavy_instance?: string | null;
28855
+ /**
28856
+ * True when a heavy machine exists and is paused, so its disk is kept.
28857
+ */
28858
+ heavy_paused?: boolean;
28859
+ };
28860
+ } | {
28861
+ /**
28862
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28863
+ */
28864
+ id: string;
28865
+ /**
28866
+ * Always `agent.artifact_delivered`. A file, canvas or media asset the agent delivered was recorded as an artifact.
28867
+ */
28868
+ type: 'agent.artifact_delivered';
28869
+ /**
28870
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28871
+ */
28872
+ processed_at: string;
28873
+ /**
28874
+ * The artifact as the session recorded it: one file of the outputs directory, or one canvas or media asset the reply pointed at.
28875
+ */
28876
+ artifact: {
28877
+ /**
28878
+ * Object type tag; always artifact for a delivered output.
28879
+ */
28880
+ object: 'artifact';
28881
+ /**
28882
+ * Artifact id (art_…); delivering the same path again keeps it.
28883
+ */
28884
+ id: string;
28885
+ /**
28886
+ * Session that owns the artifact.
28887
+ */
28888
+ session_id: string;
28889
+ /**
28890
+ * Run that produced it, or null when that cannot be told.
28891
+ */
28892
+ run_id: string | null;
28893
+ /**
28894
+ * Path of the artifact relative to the outputs directory, for example report.pdf.
28895
+ */
28896
+ name: string;
28897
+ /**
28898
+ * Version of this artifact: one more each time the same path is delivered again in this session.
28899
+ */
28900
+ version: number;
28901
+ /**
28902
+ * What the artifact holds: a delivered file (kind file, with file_id, filename, mime_type and bytes) or a platform object (kind object, with object_type, object_id, href and title).
28903
+ */
28904
+ parts: Array<{
28905
+ [key: string]: unknown;
28906
+ }>;
28907
+ /**
28908
+ * Link addresses in the reply that point at this artifact, verbatim.
28909
+ */
28910
+ source_hrefs: Array<string>;
28911
+ /**
28912
+ * When the artifact was first registered, RFC 3339.
28913
+ */
28914
+ create_time: string;
28915
+ /**
28916
+ * When the latest version was registered, RFC 3339.
28917
+ */
28918
+ update_time: string;
28919
+ };
28920
+ } | {
28921
+ /**
28922
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
28923
+ */
28924
+ id: string;
28925
+ /**
28926
+ * Always `agent.image_generation`. Retired imagine tool: one image request and how it ended. Old sessions still replay it.
28927
+ */
28928
+ type: 'agent.image_generation';
28929
+ /**
28930
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
28931
+ */
28932
+ processed_at: string;
28933
+ /**
28934
+ * The imagine tool call this report belongs to.
28935
+ */
28936
+ tool_use_id: string;
28937
+ /**
28938
+ * Which picture of the call this is, from 0.
28939
+ */
28940
+ index: number;
28941
+ /**
28942
+ * How many pictures the call asked for.
28943
+ */
28944
+ total: number;
28945
+ /**
28946
+ * Step of the picture at the time it was recorded: queued, drawing, completed, failed or cancelled.
28947
+ */
28948
+ status: string;
28949
+ /**
28950
+ * How the picture was produced: generate, edit or set.
28951
+ */
28952
+ mode?: string;
28953
+ /**
28954
+ * Aspect ratio requested for the picture, for example 1:1.
28955
+ */
28956
+ aspect?: string;
28957
+ /**
28958
+ * Prompt the model passed for this picture.
28959
+ */
28960
+ prompt?: string;
28961
+ /**
28962
+ * Model that drew the picture; absent when none was chosen.
28963
+ */
28964
+ model?: string;
28965
+ /**
28966
+ * File of the finished picture; absent until it completed.
28967
+ */
28968
+ file_id?: string;
28969
+ /**
28970
+ * Conversation label the picture was given, for example 图3.
28971
+ */
28972
+ label?: string;
28973
+ /**
28974
+ * Width of the produced picture in pixels.
28975
+ */
28976
+ width?: number;
28977
+ /**
28978
+ * Height of the produced picture in pixels.
28979
+ */
28980
+ height?: number;
28981
+ /**
28982
+ * Prompt the provider rewrote before drawing, when it rewrote one.
28983
+ */
28984
+ revised_prompt?: string;
28985
+ /**
28986
+ * Pictures this one was made from, by their conversation labels.
28987
+ */
28988
+ source_labels?: Array<string>;
28989
+ /**
28990
+ * Caption the reply gave the picture.
28991
+ */
28992
+ caption?: string;
28993
+ /**
28994
+ * Slot of the picture inside a planned set; null when it was not part of one.
28995
+ */
28996
+ slot?: number | null;
28997
+ /**
28998
+ * Label of the picture this version replaces.
28999
+ */
29000
+ replaces?: string;
29001
+ /**
29002
+ * Version of the labelled picture: one more per replacement.
29003
+ */
29004
+ version?: number;
29005
+ /**
29006
+ * Why the picture failed; present only when it failed.
29007
+ */
29008
+ failure?: {
29009
+ /**
29010
+ * Failure class: moderation, quota, rate_limited, timeout, invalid_request, provider_error or interrupted.
29011
+ */
29012
+ reason?: string;
29013
+ };
29014
+ } | {
29015
+ /**
29016
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
29017
+ */
29018
+ id: string;
29019
+ /**
29020
+ * Always `session.image_labeled`. Retired imagine tool: a picture was labelled in the session. Old sessions still replay it.
29021
+ */
29022
+ type: 'session.image_labeled';
29023
+ /**
29024
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
29025
+ */
29026
+ processed_at: string;
29027
+ /**
29028
+ * Conversation label the picture was given, for example 图3.
29029
+ */
29030
+ label: string;
29031
+ /**
29032
+ * File the label points at.
29033
+ */
29034
+ file_id: string;
29035
+ /**
29036
+ * Where the picture came from.
29037
+ */
29038
+ origin: 'generated' | 'uploaded';
29039
+ /**
29040
+ * Name of the file the label points at.
29041
+ */
29042
+ filename: string;
29043
+ /**
29044
+ * Imagine call that produced the label, when one did.
29045
+ */
29046
+ tool_use_id?: string;
29047
+ /**
29048
+ * Version of the labelled picture: one more per replacement.
29049
+ */
29050
+ version?: number;
29051
+ /**
29052
+ * File this label pointed at before the replacement, when it was replaced.
29053
+ */
29054
+ replaced_file_id?: string;
29055
+ } | {
29056
+ /**
29057
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
29058
+ */
29059
+ id: string;
29060
+ /**
29061
+ * Always `session.image_set_planned`. Retired imagine tool: one call planned a set of pictures. Old sessions still replay it.
29062
+ */
29063
+ type: 'session.image_set_planned';
29064
+ /**
29065
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
29066
+ */
29067
+ processed_at: string;
29068
+ /**
29069
+ * Imagine call that planned the set.
29070
+ */
29071
+ tool_use_id: string;
29072
+ /**
29073
+ * The pictures the set planned, in the order the call listed them.
29074
+ */
29075
+ items: Array<unknown>;
29076
+ /**
29077
+ * Title given to the set, when the call named one.
29078
+ */
29079
+ title?: string;
29080
+ } | {
29081
+ /**
29082
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
29083
+ */
29084
+ id: string;
29085
+ /**
29086
+ * Always `session.project_attached`. The main session attached a project; it names the project, never its instructions.
29087
+ */
29088
+ type: 'session.project_attached';
29089
+ /**
29090
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
29091
+ */
29092
+ processed_at: string;
29093
+ /**
29094
+ * The project the main session is now attached to.
29095
+ */
29096
+ project: {
29097
+ /**
29098
+ * Registered project id, as the conversation's project list returns it.
29099
+ */
29100
+ id: string;
29101
+ /**
29102
+ * Project name as it was registered; a label, not a unique key.
29103
+ */
29104
+ name: string;
29105
+ /**
29106
+ * Folder of the project on the session's computer, the directory its desks work in.
29107
+ */
29108
+ path: string;
29109
+ };
29110
+ /**
29111
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
29112
+ */
29113
+ message_id?: string;
29114
+ /**
29115
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
29116
+ */
29117
+ session_thread_id?: string | null;
29118
+ } | {
29119
+ /**
29120
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
29121
+ */
29122
+ id: string;
29123
+ /**
29124
+ * Always `session.project_detached`. The main session's project attachment ended.
29125
+ */
29126
+ type: 'session.project_detached';
29127
+ /**
29128
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
29129
+ */
29130
+ processed_at: string;
29131
+ /**
29132
+ * Id of the project the session was attached to; it is the same id the attach event carried.
29133
+ */
29134
+ project_id: string;
29135
+ /**
29136
+ * Present only when the project left the registry rather than the session detaching it.
29137
+ */
29138
+ reason?: 'project_removed';
29139
+ /**
29140
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
29141
+ */
29142
+ message_id?: string;
29143
+ /**
29144
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
29145
+ */
29146
+ session_thread_id?: string | null;
27767
29147
  } | {
27768
29148
  /**
27769
29149
  * Always `event_start`. Preview that an event of the requested delta types has started.
@@ -32916,7 +34296,7 @@ export type OrganizationReconcileItem = {
32916
34296
  */
32917
34297
  binding: string | null;
32918
34298
  /**
32919
- * Why the block is not ready, for the failed and waiting_human states; null when there is nothing to say.
34299
+ * Why the block is not ready, for the failed, waiting_human and not_applicable states; null when there is nothing to say.
32920
34300
  */
32921
34301
  message: string | null;
32922
34302
  };
@@ -38338,7 +39718,7 @@ export type MediaUnderstanding = {
38338
39718
  */
38339
39719
  asset_version: number;
38340
39720
  /**
38341
- * Result kind: caption is a visual description, tags are recognized labels, ocr is text recognized in the image, transcript is speech text, and frame is a description of a video segment. audio describes sampled speech, music, ambient sound and silence; overview is a full-video summary with chapters, IAB categories and an unverified location; embedding reports a failed embedding step. loudness is the measured BS.1770-4 loudness of the audio (integrated loudness, loudness range, true and sample peak, a one-point-per-second series and the clipped sections); beats is the measured tempo, beat and bar grid with the sections of the music, recorded as not_applicable with a reason when the asset has no music; content is derived from those measurements and from the transcript into speech, music and silence percentages and sections. Their time values are seconds and their data is not model output.
39721
+ * Result kind: caption is a visual description, tags are recognized labels, ocr is text recognized in the image, transcript is speech text, and frame is a description of a video segment. audio describes sampled speech, music, ambient sound and silence; overview is a full-video summary with chapters, IAB categories and an unverified location; embedding reports a failed embedding step. loudness is the measured BS.1770-4 loudness of the audio (integrated loudness, loudness range, true and sample peak, a one-point-per-second series, the clipped sections and waveform, 200 or fewer peak values from 0 to 1 with bucket_s seconds per value, mapped from momentary loudness between -60 and 0 LUFS; assets measured before this field existed have no waveform until they are measured again with reprocess measure); beats is the measured tempo, beat and bar grid with the sections of the music, recorded as not_applicable with a reason when the asset has no music; content is derived from those measurements and from the transcript into speech, music and silence percentages and sections. Their time values are seconds and their data is not model output.
38342
39722
  */
38343
39723
  kind: MediaUnderstandingKind;
38344
39724
  /**
@@ -46003,7 +47383,7 @@ export type MediaTranscriptCorrection = {
46003
47383
  */
46004
47384
  export type MediaUnderstandingId = string;
46005
47385
  /**
46006
- * Result kind: caption is a visual description, tags are recognized labels, ocr is text recognized in the image, transcript is speech text, and frame is a description of a video segment. audio describes sampled speech, music, ambient sound and silence; overview is a full-video summary with chapters, IAB categories and an unverified location; embedding reports a failed embedding step. loudness is the measured BS.1770-4 loudness of the audio (integrated loudness, loudness range, true and sample peak, a one-point-per-second series and the clipped sections); beats is the measured tempo, beat and bar grid with the sections of the music, recorded as not_applicable with a reason when the asset has no music; content is derived from those measurements and from the transcript into speech, music and silence percentages and sections. Their time values are seconds and their data is not model output.
47386
+ * Result kind: caption is a visual description, tags are recognized labels, ocr is text recognized in the image, transcript is speech text, and frame is a description of a video segment. audio describes sampled speech, music, ambient sound and silence; overview is a full-video summary with chapters, IAB categories and an unverified location; embedding reports a failed embedding step. loudness is the measured BS.1770-4 loudness of the audio (integrated loudness, loudness range, true and sample peak, a one-point-per-second series, the clipped sections and waveform, 200 or fewer peak values from 0 to 1 with bucket_s seconds per value, mapped from momentary loudness between -60 and 0 LUFS; assets measured before this field existed have no waveform until they are measured again with reprocess measure); beats is the measured tempo, beat and bar grid with the sections of the music, recorded as not_applicable with a reason when the asset has no music; content is derived from those measurements and from the transcript into speech, music and silence percentages and sections. Their time values are seconds and their data is not model output.
46007
47387
  */
46008
47388
  export type MediaUnderstandingKind = 'caption' | 'tags' | 'ocr' | 'transcript' | 'frame' | 'overview' | 'audio' | 'loudness' | 'beats' | 'content' | 'embedding' | 'colors';
46009
47389
  /**
@@ -48926,7 +50306,7 @@ export type MediaUnderstandingWritable = {
48926
50306
  */
48927
50307
  asset_version: number;
48928
50308
  /**
48929
- * Result kind: caption is a visual description, tags are recognized labels, ocr is text recognized in the image, transcript is speech text, and frame is a description of a video segment. audio describes sampled speech, music, ambient sound and silence; overview is a full-video summary with chapters, IAB categories and an unverified location; embedding reports a failed embedding step. loudness is the measured BS.1770-4 loudness of the audio (integrated loudness, loudness range, true and sample peak, a one-point-per-second series and the clipped sections); beats is the measured tempo, beat and bar grid with the sections of the music, recorded as not_applicable with a reason when the asset has no music; content is derived from those measurements and from the transcript into speech, music and silence percentages and sections. Their time values are seconds and their data is not model output.
50309
+ * Result kind: caption is a visual description, tags are recognized labels, ocr is text recognized in the image, transcript is speech text, and frame is a description of a video segment. audio describes sampled speech, music, ambient sound and silence; overview is a full-video summary with chapters, IAB categories and an unverified location; embedding reports a failed embedding step. loudness is the measured BS.1770-4 loudness of the audio (integrated loudness, loudness range, true and sample peak, a one-point-per-second series, the clipped sections and waveform, 200 or fewer peak values from 0 to 1 with bucket_s seconds per value, mapped from momentary loudness between -60 and 0 LUFS; assets measured before this field existed have no waveform until they are measured again with reprocess measure); beats is the measured tempo, beat and bar grid with the sections of the music, recorded as not_applicable with a reason when the asset has no music; content is derived from those measurements and from the transcript into speech, music and silence percentages and sections. Their time values are seconds and their data is not model output.
48930
50310
  */
48931
50311
  kind: MediaUnderstandingKind;
48932
50312
  /**
@@ -50293,6 +51673,14 @@ export type ListAgentEventsResponses = {
50293
51673
  * message_id of the agent message in the parent session up to which the conversation was copied.
50294
51674
  */
50295
51675
  forked_from_message_id: string;
51676
+ /**
51677
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
51678
+ */
51679
+ message_id?: string;
51680
+ /**
51681
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
51682
+ */
51683
+ session_thread_id?: string | null;
50296
51684
  } | {
50297
51685
  /**
50298
51686
  * Event id, unique within the session.
@@ -50404,6 +51792,14 @@ export type ListAgentEventsResponses = {
50404
51792
  */
50405
51793
  updated_at: number;
50406
51794
  } | null;
51795
+ /**
51796
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
51797
+ */
51798
+ message_id?: string;
51799
+ /**
51800
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
51801
+ */
51802
+ session_thread_id?: string | null;
50407
51803
  } | {
50408
51804
  /**
50409
51805
  * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
@@ -50454,6 +51850,14 @@ export type ListAgentEventsResponses = {
50454
51850
  */
50455
51851
  next_action?: string;
50456
51852
  };
51853
+ /**
51854
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
51855
+ */
51856
+ message_id?: string;
51857
+ /**
51858
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
51859
+ */
51860
+ session_thread_id?: string | null;
50457
51861
  } | {
50458
51862
  /**
50459
51863
  * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
@@ -50471,6 +51875,601 @@ export type ListAgentEventsResponses = {
50471
51875
  * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
50472
51876
  */
50473
51877
  processed_at: string;
51878
+ /**
51879
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
51880
+ */
51881
+ message_id?: string;
51882
+ /**
51883
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
51884
+ */
51885
+ session_thread_id?: string | null;
51886
+ } | {
51887
+ /**
51888
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
51889
+ */
51890
+ id: string;
51891
+ /**
51892
+ * Always `cognition.surfaced`. A worker session reached a boundary and surfaced in this session.
51893
+ */
51894
+ type: 'cognition.surfaced';
51895
+ /**
51896
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
51897
+ */
51898
+ processed_at: string;
51899
+ /**
51900
+ * Public sesn_ id of the worker session that reached the boundary; the internal ags_ id never appears here.
51901
+ */
51902
+ worker_session_id: string;
51903
+ /**
51904
+ * Name the worker session was opened under, as the session list shows it.
51905
+ */
51906
+ name: string;
51907
+ /**
51908
+ * How the worker's span ended.
51909
+ */
51910
+ state: 'done' | 'waiting' | 'failed' | 'archived';
51911
+ /**
51912
+ * Engram that filed the worker's experience, when a recap was written; absent when there is no node to name.
51913
+ */
51914
+ experience_id?: string;
51915
+ /**
51916
+ * What the worker handed over at this boundary: its last message, the addresses it named, the files it delivered and any operation the platform still holds. Absent when it handed nothing over.
51917
+ */
51918
+ result?: {
51919
+ /**
51920
+ * The worker's last message to this session, whitespace-collapsed and capped by the agent service.
51921
+ */
51922
+ message?: string;
51923
+ /**
51924
+ * Absolute http(s) addresses the delivered message names, in order of appearance.
51925
+ */
51926
+ links?: Array<string>;
51927
+ /**
51928
+ * Files the worker registered as delivered in this span.
51929
+ */
51930
+ files?: Array<{
51931
+ /**
51932
+ * Path of the delivered file, relative to the session's outputs directory.
51933
+ */
51934
+ name?: string;
51935
+ /**
51936
+ * Address the reply used to point at the file; absent when it named none.
51937
+ */
51938
+ href?: string;
51939
+ }>;
51940
+ /**
51941
+ * Operations the platform held at this boundary that nobody has answered yet.
51942
+ */
51943
+ held?: Array<{
51944
+ /**
51945
+ * Approval id of the held operation, the one user.tool_confirmation answers.
51946
+ */
51947
+ id?: string;
51948
+ /**
51949
+ * One line saying what the held operation would do.
51950
+ */
51951
+ summary?: string;
51952
+ /**
51953
+ * Effect class of the held operation: outward, or irreversible.
51954
+ */
51955
+ effect?: string;
51956
+ /**
51957
+ * HTTP method of the held request.
51958
+ */
51959
+ method?: string;
51960
+ /**
51961
+ * Path of the held request, as the door canonicalized it.
51962
+ */
51963
+ path?: string;
51964
+ /**
51965
+ * When the request stops being answerable, RFC 3339.
51966
+ */
51967
+ expires_at?: string;
51968
+ }>;
51969
+ };
51970
+ } | {
51971
+ /**
51972
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
51973
+ */
51974
+ id: string;
51975
+ /**
51976
+ * Always `cognition.intention_woken`. The idle pass woke the session about one open intention.
51977
+ */
51978
+ type: 'cognition.intention_woken';
51979
+ /**
51980
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
51981
+ */
51982
+ processed_at: string;
51983
+ /**
51984
+ * Engram of the intention the wake was about.
51985
+ */
51986
+ node_id: string;
51987
+ /**
51988
+ * Why this intention was picked.
51989
+ */
51990
+ reason: 'open_engram' | 'assignment';
51991
+ } | {
51992
+ /**
51993
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
51994
+ */
51995
+ id: string;
51996
+ /**
51997
+ * Always `agent.operation_approval_requested`. The door held an outward or irreversible operation for the person to approve.
51998
+ */
51999
+ type: 'agent.operation_approval_requested';
52000
+ /**
52001
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52002
+ */
52003
+ processed_at: string;
52004
+ /**
52005
+ * Id of the held request; user.tool_confirmation answers it and agent.operation_approval_decided settles it.
52006
+ */
52007
+ approval_id: string;
52008
+ /**
52009
+ * Operation the agent called, as the platform names it in its API reference.
52010
+ */
52011
+ operation_id: string;
52012
+ /**
52013
+ * Why the call was held.
52014
+ */
52015
+ effect: 'outward' | 'irreversible';
52016
+ /**
52017
+ * HTTP method of the request that was held.
52018
+ */
52019
+ method: string;
52020
+ /**
52021
+ * Path of the request that was held, as the door canonicalized it.
52022
+ */
52023
+ path: string;
52024
+ /**
52025
+ * One line naming the operation and its address, for the card's title.
52026
+ */
52027
+ summary: string;
52028
+ /**
52029
+ * When the request stops being answerable, RFC 3339; a request nobody answered within 24 hours settles as expired.
52030
+ */
52031
+ expires_at: string;
52032
+ /**
52033
+ * Public sesn_ id of the worker session whose operation was held; absent when this session made the call itself.
52034
+ */
52035
+ worker_session_id?: string;
52036
+ /**
52037
+ * Name of that worker session, for the card to say which desk is asking; absent when this session made the call itself.
52038
+ */
52039
+ worker_name?: string;
52040
+ } | {
52041
+ /**
52042
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52043
+ */
52044
+ id: string;
52045
+ /**
52046
+ * Always `agent.operation_approval_decided`. A held operation was approved, refused, or expired unanswered.
52047
+ */
52048
+ type: 'agent.operation_approval_decided';
52049
+ /**
52050
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52051
+ */
52052
+ processed_at: string;
52053
+ /**
52054
+ * Id of the held request this settles, matching agent.operation_approval_requested.
52055
+ */
52056
+ approval_id: string;
52057
+ /**
52058
+ * How the held request ended.
52059
+ */
52060
+ status: 'approved' | 'refused' | 'expired';
52061
+ } | {
52062
+ /**
52063
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52064
+ */
52065
+ id: string;
52066
+ /**
52067
+ * Always `session.prompt_configuration_mismatch`. A pinned session runs a configuration revision its agent has since left.
52068
+ */
52069
+ type: 'session.prompt_configuration_mismatch';
52070
+ /**
52071
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52072
+ */
52073
+ processed_at: string;
52074
+ /**
52075
+ * Agent configuration revision this session pinned when it started (agr_…).
52076
+ */
52077
+ pinned_revision_id: string;
52078
+ /**
52079
+ * Configuration revision the agent publishes now (agr_…); it differs from the pinned one, which is what makes this event.
52080
+ */
52081
+ current_revision_id: string;
52082
+ } | {
52083
+ /**
52084
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52085
+ */
52086
+ id: string;
52087
+ /**
52088
+ * Always `session.prompt_rev_changed`. A platform input (a prompt section, the catalog, the tool descriptions) moved without a version moving.
52089
+ */
52090
+ type: 'session.prompt_rev_changed';
52091
+ /**
52092
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52093
+ */
52094
+ processed_at: string;
52095
+ /**
52096
+ * Configuration revision the session ran this turn (agr_…); it does not move when only platform inputs move.
52097
+ */
52098
+ config_revision_id: string;
52099
+ /**
52100
+ * The platform inputs that moved, sorted by name; empty never happens, because no move means no event.
52101
+ */
52102
+ changed: Array<{
52103
+ /**
52104
+ * Input name, for example section:cards, catalog or tools.
52105
+ */
52106
+ name: string;
52107
+ /**
52108
+ * Content Rev after the move, or null when the input was removed; the projection drops an entry that is neither.
52109
+ */
52110
+ rev: string | null;
52111
+ }>;
52112
+ } | {
52113
+ /**
52114
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52115
+ */
52116
+ id: string;
52117
+ /**
52118
+ * Always `session.computer_tier`. The session's machine escalated, came back, or reported its tier status.
52119
+ */
52120
+ type: 'session.computer_tier';
52121
+ /**
52122
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52123
+ */
52124
+ processed_at: string;
52125
+ /**
52126
+ * Which step of the tier move this reports.
52127
+ */
52128
+ action: 'escalating' | 'escalated' | 'escalate_failed' | 'rerun' | 'status';
52129
+ /**
52130
+ * Machine the session is on for this report.
52131
+ */
52132
+ tier: 'light' | 'heavy';
52133
+ /**
52134
+ * How long the reported step took, in milliseconds.
52135
+ */
52136
+ duration_ms: number;
52137
+ /**
52138
+ * Why an escalation failed; present only on escalate_failed.
52139
+ */
52140
+ error_code?: string;
52141
+ /**
52142
+ * The machine's own status when the controller reported one, with the progress counters the console shows while a move runs.
52143
+ */
52144
+ status?: {
52145
+ /**
52146
+ * State of the machine at this report.
52147
+ */
52148
+ kind?: 'light_idle' | 'light_busy' | 'escalating' | 'heavy_burst' | 'heavy_resident' | 'releasing' | 'heavy_parked' | 'cooldown';
52149
+ /**
52150
+ * Step of the move in progress.
52151
+ */
52152
+ step?: 'prepare' | 'scan' | 'sync' | 'switch' | 'drain' | 'pull' | 'verify' | 'pause';
52153
+ /**
52154
+ * Progress of the whole move, from 0 to 100.
52155
+ */
52156
+ percent?: number;
52157
+ /**
52158
+ * Files synchronized so far.
52159
+ */
52160
+ files_done?: number;
52161
+ /**
52162
+ * Files to synchronize in this move.
52163
+ */
52164
+ files_total?: number;
52165
+ /**
52166
+ * Epoch milliseconds when an idle heavy machine is released.
52167
+ */
52168
+ idle_release_at?: number;
52169
+ /**
52170
+ * Epoch milliseconds of the next attempt after a failure.
52171
+ */
52172
+ retry_at?: number;
52173
+ /**
52174
+ * Lease epoch of the controller, bumped on every escalation to heavy.
52175
+ */
52176
+ epoch?: number;
52177
+ /**
52178
+ * The heavy machine's own status read without waking it, or null when there is none.
52179
+ */
52180
+ heavy_instance?: string | null;
52181
+ /**
52182
+ * True when a heavy machine exists and is paused, so its disk is kept.
52183
+ */
52184
+ heavy_paused?: boolean;
52185
+ };
52186
+ } | {
52187
+ /**
52188
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52189
+ */
52190
+ id: string;
52191
+ /**
52192
+ * Always `agent.artifact_delivered`. A file, canvas or media asset the agent delivered was recorded as an artifact.
52193
+ */
52194
+ type: 'agent.artifact_delivered';
52195
+ /**
52196
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52197
+ */
52198
+ processed_at: string;
52199
+ /**
52200
+ * The artifact as the session recorded it: one file of the outputs directory, or one canvas or media asset the reply pointed at.
52201
+ */
52202
+ artifact: {
52203
+ /**
52204
+ * Object type tag; always artifact for a delivered output.
52205
+ */
52206
+ object: 'artifact';
52207
+ /**
52208
+ * Artifact id (art_…); delivering the same path again keeps it.
52209
+ */
52210
+ id: string;
52211
+ /**
52212
+ * Session that owns the artifact.
52213
+ */
52214
+ session_id: string;
52215
+ /**
52216
+ * Run that produced it, or null when that cannot be told.
52217
+ */
52218
+ run_id: string | null;
52219
+ /**
52220
+ * Path of the artifact relative to the outputs directory, for example report.pdf.
52221
+ */
52222
+ name: string;
52223
+ /**
52224
+ * Version of this artifact: one more each time the same path is delivered again in this session.
52225
+ */
52226
+ version: number;
52227
+ /**
52228
+ * What the artifact holds: a delivered file (kind file, with file_id, filename, mime_type and bytes) or a platform object (kind object, with object_type, object_id, href and title).
52229
+ */
52230
+ parts: Array<{
52231
+ [key: string]: unknown;
52232
+ }>;
52233
+ /**
52234
+ * Link addresses in the reply that point at this artifact, verbatim.
52235
+ */
52236
+ source_hrefs: Array<string>;
52237
+ /**
52238
+ * When the artifact was first registered, RFC 3339.
52239
+ */
52240
+ create_time: string;
52241
+ /**
52242
+ * When the latest version was registered, RFC 3339.
52243
+ */
52244
+ update_time: string;
52245
+ };
52246
+ } | {
52247
+ /**
52248
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52249
+ */
52250
+ id: string;
52251
+ /**
52252
+ * Always `agent.image_generation`. Retired imagine tool: one image request and how it ended. Old sessions still replay it.
52253
+ */
52254
+ type: 'agent.image_generation';
52255
+ /**
52256
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52257
+ */
52258
+ processed_at: string;
52259
+ /**
52260
+ * The imagine tool call this report belongs to.
52261
+ */
52262
+ tool_use_id: string;
52263
+ /**
52264
+ * Which picture of the call this is, from 0.
52265
+ */
52266
+ index: number;
52267
+ /**
52268
+ * How many pictures the call asked for.
52269
+ */
52270
+ total: number;
52271
+ /**
52272
+ * Step of the picture at the time it was recorded: queued, drawing, completed, failed or cancelled.
52273
+ */
52274
+ status: string;
52275
+ /**
52276
+ * How the picture was produced: generate, edit or set.
52277
+ */
52278
+ mode?: string;
52279
+ /**
52280
+ * Aspect ratio requested for the picture, for example 1:1.
52281
+ */
52282
+ aspect?: string;
52283
+ /**
52284
+ * Prompt the model passed for this picture.
52285
+ */
52286
+ prompt?: string;
52287
+ /**
52288
+ * Model that drew the picture; absent when none was chosen.
52289
+ */
52290
+ model?: string;
52291
+ /**
52292
+ * File of the finished picture; absent until it completed.
52293
+ */
52294
+ file_id?: string;
52295
+ /**
52296
+ * Conversation label the picture was given, for example 图3.
52297
+ */
52298
+ label?: string;
52299
+ /**
52300
+ * Width of the produced picture in pixels.
52301
+ */
52302
+ width?: number;
52303
+ /**
52304
+ * Height of the produced picture in pixels.
52305
+ */
52306
+ height?: number;
52307
+ /**
52308
+ * Prompt the provider rewrote before drawing, when it rewrote one.
52309
+ */
52310
+ revised_prompt?: string;
52311
+ /**
52312
+ * Pictures this one was made from, by their conversation labels.
52313
+ */
52314
+ source_labels?: Array<string>;
52315
+ /**
52316
+ * Caption the reply gave the picture.
52317
+ */
52318
+ caption?: string;
52319
+ /**
52320
+ * Slot of the picture inside a planned set; null when it was not part of one.
52321
+ */
52322
+ slot?: number | null;
52323
+ /**
52324
+ * Label of the picture this version replaces.
52325
+ */
52326
+ replaces?: string;
52327
+ /**
52328
+ * Version of the labelled picture: one more per replacement.
52329
+ */
52330
+ version?: number;
52331
+ /**
52332
+ * Why the picture failed; present only when it failed.
52333
+ */
52334
+ failure?: {
52335
+ /**
52336
+ * Failure class: moderation, quota, rate_limited, timeout, invalid_request, provider_error or interrupted.
52337
+ */
52338
+ reason?: string;
52339
+ };
52340
+ } | {
52341
+ /**
52342
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52343
+ */
52344
+ id: string;
52345
+ /**
52346
+ * Always `session.image_labeled`. Retired imagine tool: a picture was labelled in the session. Old sessions still replay it.
52347
+ */
52348
+ type: 'session.image_labeled';
52349
+ /**
52350
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52351
+ */
52352
+ processed_at: string;
52353
+ /**
52354
+ * Conversation label the picture was given, for example 图3.
52355
+ */
52356
+ label: string;
52357
+ /**
52358
+ * File the label points at.
52359
+ */
52360
+ file_id: string;
52361
+ /**
52362
+ * Where the picture came from.
52363
+ */
52364
+ origin: 'generated' | 'uploaded';
52365
+ /**
52366
+ * Name of the file the label points at.
52367
+ */
52368
+ filename: string;
52369
+ /**
52370
+ * Imagine call that produced the label, when one did.
52371
+ */
52372
+ tool_use_id?: string;
52373
+ /**
52374
+ * Version of the labelled picture: one more per replacement.
52375
+ */
52376
+ version?: number;
52377
+ /**
52378
+ * File this label pointed at before the replacement, when it was replaced.
52379
+ */
52380
+ replaced_file_id?: string;
52381
+ } | {
52382
+ /**
52383
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52384
+ */
52385
+ id: string;
52386
+ /**
52387
+ * Always `session.image_set_planned`. Retired imagine tool: one call planned a set of pictures. Old sessions still replay it.
52388
+ */
52389
+ type: 'session.image_set_planned';
52390
+ /**
52391
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52392
+ */
52393
+ processed_at: string;
52394
+ /**
52395
+ * Imagine call that planned the set.
52396
+ */
52397
+ tool_use_id: string;
52398
+ /**
52399
+ * The pictures the set planned, in the order the call listed them.
52400
+ */
52401
+ items: Array<unknown>;
52402
+ /**
52403
+ * Title given to the set, when the call named one.
52404
+ */
52405
+ title?: string;
52406
+ } | {
52407
+ /**
52408
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52409
+ */
52410
+ id: string;
52411
+ /**
52412
+ * Always `session.project_attached`. The main session attached a project; it names the project, never its instructions.
52413
+ */
52414
+ type: 'session.project_attached';
52415
+ /**
52416
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52417
+ */
52418
+ processed_at: string;
52419
+ /**
52420
+ * The project the main session is now attached to.
52421
+ */
52422
+ project: {
52423
+ /**
52424
+ * Registered project id, as the conversation's project list returns it.
52425
+ */
52426
+ id: string;
52427
+ /**
52428
+ * Project name as it was registered; a label, not a unique key.
52429
+ */
52430
+ name: string;
52431
+ /**
52432
+ * Folder of the project on the session's computer, the directory its desks work in.
52433
+ */
52434
+ path: string;
52435
+ };
52436
+ /**
52437
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
52438
+ */
52439
+ message_id?: string;
52440
+ /**
52441
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
52442
+ */
52443
+ session_thread_id?: string | null;
52444
+ } | {
52445
+ /**
52446
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
52447
+ */
52448
+ id: string;
52449
+ /**
52450
+ * Always `session.project_detached`. The main session's project attachment ended.
52451
+ */
52452
+ type: 'session.project_detached';
52453
+ /**
52454
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
52455
+ */
52456
+ processed_at: string;
52457
+ /**
52458
+ * Id of the project the session was attached to; it is the same id the attach event carried.
52459
+ */
52460
+ project_id: string;
52461
+ /**
52462
+ * Present only when the project left the registry rather than the session detaching it.
52463
+ */
52464
+ reason?: 'project_removed';
52465
+ /**
52466
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
52467
+ */
52468
+ message_id?: string;
52469
+ /**
52470
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
52471
+ */
52472
+ session_thread_id?: string | null;
50474
52473
  }>;
50475
52474
  /**
50476
52475
  * Opaque cursor for the next page: pass it unchanged as page to continue. Null when this is the last page.
@@ -50602,6 +52601,14 @@ export type SendAgentEventsResponses = {
50602
52601
  * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
50603
52602
  */
50604
52603
  processed_at: string;
52604
+ /**
52605
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
52606
+ */
52607
+ message_id?: string;
52608
+ /**
52609
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
52610
+ */
52611
+ session_thread_id?: string | null;
50605
52612
  }>;
50606
52613
  };
50607
52614
  };
@@ -51654,6 +53661,10 @@ export type ApplyAgentVersionResponses = {
51654
53661
  * Change explanation supplied as version_note when this version was saved; null when omitted or for historical versions. Immutable after creation.
51655
53662
  */
51656
53663
  note: string | null;
53664
+ /**
53665
+ * How many of this agent's live deployments are not on its active version: pinned to a version other than active_version, not archived, counted once each. It counts both a pin older than the active version and a pin newer than it that was saved without being applied, so read it as "not on the active version", never as "older than". Following deployments are never counted (they run the active version by definition). Null when the deployment side could not be read. Returned by update and apply too, so those answers equal the read that follows them.
53666
+ */
53667
+ deployments_behind: number | null;
51657
53668
  /**
51658
53669
  * Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A resource binding may also carry customer_access (read_only by default): it caps what a terminal customer's session (a visitor, ADR-163 §3) may do with that one resource, at the intersection of customer_access and the binding's own access — invoke (call) and read_write (change) are different axes, so only a matching pair keeps its access and any other pair falls to read_only. Its value must be one the type can grant: read_only or read_write for database, vector_store and media_library, read_only for file, and read_only or invoke for model, workflow and script. A member's session ignores it, so raising it never widens what members may do. A visitor's session never receives a whole-service binding (the default ticket service included) or an agent resource. A service binding opens one service, or one sub-tree of one, and carries only enabled: search, browser, ticket, crm, canvas, cut, studio, feedback or workspace. workspace opens development units — list one, read one, start, stop, exec inside one, fetch, push, connect, and open a unit for a change — and opens neither publishing nor any production operation. The ticket service is bound by default: a service agent whose list has no ticket entry may call the ticket API, and {"type": "ticket", "enabled": false} removes it. Every other service stays closed until it is bound. An open service allows every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access, customer_access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for the default: the ticket service only. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time.
51659
53670
  */
@@ -52901,6 +54912,10 @@ export type UnarchiveAgentResponses = {
52901
54912
  * Change explanation supplied as version_note when this version was saved; null when omitted or for historical versions. Immutable after creation.
52902
54913
  */
52903
54914
  note: string | null;
54915
+ /**
54916
+ * How many of this agent's live deployments are not on its active version: pinned to a version other than active_version, not archived, counted once each. It counts both a pin older than the active version and a pin newer than it that was saved without being applied, so read it as "not on the active version", never as "older than". Following deployments are never counted (they run the active version by definition). Null when the deployment side could not be read. Returned by update and apply too, so those answers equal the read that follows them.
54917
+ */
54918
+ deployments_behind: number | null;
52904
54919
  /**
52905
54920
  * Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A resource binding may also carry customer_access (read_only by default): it caps what a terminal customer's session (a visitor, ADR-163 §3) may do with that one resource, at the intersection of customer_access and the binding's own access — invoke (call) and read_write (change) are different axes, so only a matching pair keeps its access and any other pair falls to read_only. Its value must be one the type can grant: read_only or read_write for database, vector_store and media_library, read_only for file, and read_only or invoke for model, workflow and script. A member's session ignores it, so raising it never widens what members may do. A visitor's session never receives a whole-service binding (the default ticket service included) or an agent resource. A service binding opens one service, or one sub-tree of one, and carries only enabled: search, browser, ticket, crm, canvas, cut, studio, feedback or workspace. workspace opens development units — list one, read one, start, stop, exec inside one, fetch, push, connect, and open a unit for a change — and opens neither publishing nor any production operation. The ticket service is bound by default: a service agent whose list has no ticket entry may call the ticket API, and {"type": "ticket", "enabled": false} removes it. Every other service stays closed until it is bound. An open service allows every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access, customer_access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for the default: the ticket service only. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time.
52906
54921
  */
@@ -64592,6 +66607,73 @@ export type ListSessionRequestsResponses = {
64592
66607
  };
64593
66608
  };
64594
66609
  export type ListSessionRequestsResponse = ListSessionRequestsResponses[keyof ListSessionRequestsResponses];
66610
+ export type CreateSessionDictationData = {
66611
+ body?: {
66612
+ /**
66613
+ * Words the recogniser should favour, at most 50.
66614
+ */
66615
+ hotwords?: Array<string>;
66616
+ };
66617
+ path: {
66618
+ /**
66619
+ * Session id from session creation or listing.
66620
+ */
66621
+ session_id: string;
66622
+ };
66623
+ query?: never;
66624
+ url: '/agent/v1/sessions/{session_id}/dictations';
66625
+ };
66626
+ export type CreateSessionDictationErrors = {
66627
+ /**
66628
+ * Invalid request: more than 50 hotwords, or an unsupported field.
66629
+ */
66630
+ 400: unknown;
66631
+ /**
66632
+ * Authenticate with an organization credential or a customer access token.
66633
+ */
66634
+ 401: unknown;
66635
+ /**
66636
+ * permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
66637
+ */
66638
+ 403: AgentError;
66639
+ /**
66640
+ * Session not found or not readable by this caller.
66641
+ */
66642
+ 404: unknown;
66643
+ /**
66644
+ * DICTATION_UNCONFIGURED: the model dictation resolved to cannot transcribe a live stream.
66645
+ */
66646
+ 409: unknown;
66647
+ /**
66648
+ * Agent service failed
66649
+ */
66650
+ 502: unknown;
66651
+ /**
66652
+ * DICTATION_UNAVAILABLE: dictation is not available in this environment; try again later.
66653
+ */
66654
+ 503: unknown;
66655
+ };
66656
+ export type CreateSessionDictationError = CreateSessionDictationErrors[keyof CreateSessionDictationErrors];
66657
+ export type CreateSessionDictationResponses = {
66658
+ /**
66659
+ * The dictation stream and the address to push audio to
66660
+ */
66661
+ 201: {
66662
+ /**
66663
+ * The stream's id (mst_...).
66664
+ */
66665
+ id: string;
66666
+ /**
66667
+ * The WebSocket address to push audio to (wss://...). It carries a short-lived capability: treat it as a secret, never store or log it, and open it once.
66668
+ */
66669
+ push_url: string;
66670
+ /**
66671
+ * When the address stops accepting a new connection, RFC 3339.
66672
+ */
66673
+ expires_at: string;
66674
+ };
66675
+ };
66676
+ export type CreateSessionDictationResponse = CreateSessionDictationResponses[keyof CreateSessionDictationResponses];
64595
66677
  export type ListSessionBackgroundTasksData = {
64596
66678
  body?: never;
64597
66679
  path: {
@@ -74006,15 +76088,15 @@ export type ListOrganizationNotificationLettersResponses = {
74006
76088
  */
74007
76089
  id: string;
74008
76090
  /**
74009
- * The sender's display name. Never an address or an internal id; an address the directory does not know reads 「某位成员」.
76091
+ * The sender's display name. Never an address or an internal id; an address the directory does not know reads 「未知成员」.
74010
76092
  */
74011
76093
  sender: string;
74012
76094
  /**
74013
- * One line saying what the letter asks or tells.
76095
+ * One line saying what the letter asks or tells, written for this reader (addresses already rendered as display names).
74014
76096
  */
74015
76097
  summary: string;
74016
76098
  /**
74017
- * The whole letter, for the detail view.
76099
+ * The whole letter, for the detail view, written for this reader: every human:/agent: address already rendered as a display name (or 「未知成员」).
74018
76100
  */
74019
76101
  body: string;
74020
76102
  /**
@@ -74225,6 +76307,10 @@ export type GetOrganizationNotificationPreferencesResponses = {
74225
76307
  * One more line of copy, when the category has one.
74226
76308
  */
74227
76309
  description?: string;
76310
+ /**
76311
+ * How this category looks (ADR-193 §1): display only — high is red, medium orange, low uncoloured, none is not shown. It never decides which channels are used.
76312
+ */
76313
+ severity: 'high' | 'medium' | 'low' | 'none';
74228
76314
  /**
74229
76315
  * At least one of its channels stays on whatever anyone else says.
74230
76316
  */
@@ -79063,6 +81149,10 @@ export type AgentsListResponses = {
79063
81149
  * Change explanation supplied as version_note when this version was saved; null when omitted or for historical versions. Immutable after creation.
79064
81150
  */
79065
81151
  note: string | null;
81152
+ /**
81153
+ * How many of this agent's live deployments are not on its active version: pinned to a version other than active_version, not archived, counted once each. It counts both a pin older than the active version and a pin newer than it that was saved without being applied, so read it as "not on the active version", never as "older than". Following deployments are never counted (they run the active version by definition). Null when the deployment side could not be read. Returned by update and apply too, so those answers equal the read that follows them.
81154
+ */
81155
+ deployments_behind: number | null;
79066
81156
  /**
79067
81157
  * Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A resource binding may also carry customer_access (read_only by default): it caps what a terminal customer's session (a visitor, ADR-163 §3) may do with that one resource, at the intersection of customer_access and the binding's own access — invoke (call) and read_write (change) are different axes, so only a matching pair keeps its access and any other pair falls to read_only. Its value must be one the type can grant: read_only or read_write for database, vector_store and media_library, read_only for file, and read_only or invoke for model, workflow and script. A member's session ignores it, so raising it never widens what members may do. A visitor's session never receives a whole-service binding (the default ticket service included) or an agent resource. A service binding opens one service, or one sub-tree of one, and carries only enabled: search, browser, ticket, crm, canvas, cut, studio, feedback or workspace. workspace opens development units — list one, read one, start, stop, exec inside one, fetch, push, connect, and open a unit for a change — and opens neither publishing nor any production operation. The ticket service is bound by default: a service agent whose list has no ticket entry may call the ticket API, and {"type": "ticket", "enabled": false} removes it. Every other service stays closed until it is bound. An open service allows every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access, customer_access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for the default: the ticket service only. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time.
79068
81158
  */
@@ -80263,6 +82353,10 @@ export type AgentsCreateResponses = {
80263
82353
  * Change explanation supplied as version_note when this version was saved; null when omitted or for historical versions. Immutable after creation.
80264
82354
  */
80265
82355
  note: string | null;
82356
+ /**
82357
+ * How many of this agent's live deployments are not on its active version: pinned to a version other than active_version, not archived, counted once each. It counts both a pin older than the active version and a pin newer than it that was saved without being applied, so read it as "not on the active version", never as "older than". Following deployments are never counted (they run the active version by definition). Null when the deployment side could not be read. Returned by update and apply too, so those answers equal the read that follows them.
82358
+ */
82359
+ deployments_behind: number | null;
80266
82360
  /**
80267
82361
  * Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A resource binding may also carry customer_access (read_only by default): it caps what a terminal customer's session (a visitor, ADR-163 §3) may do with that one resource, at the intersection of customer_access and the binding's own access — invoke (call) and read_write (change) are different axes, so only a matching pair keeps its access and any other pair falls to read_only. Its value must be one the type can grant: read_only or read_write for database, vector_store and media_library, read_only for file, and read_only or invoke for model, workflow and script. A member's session ignores it, so raising it never widens what members may do. A visitor's session never receives a whole-service binding (the default ticket service included) or an agent resource. A service binding opens one service, or one sub-tree of one, and carries only enabled: search, browser, ticket, crm, canvas, cut, studio, feedback or workspace. workspace opens development units — list one, read one, start, stop, exec inside one, fetch, push, connect, and open a unit for a change — and opens neither publishing nor any production operation. The ticket service is bound by default: a service agent whose list has no ticket entry may call the ticket API, and {"type": "ticket", "enabled": false} removes it. Every other service stays closed until it is bound. An open service allows every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access, customer_access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for the default: the ticket service only. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time.
80268
82362
  */
@@ -80921,6 +83015,10 @@ export type AgentsRetrieveResponses = {
80921
83015
  * Change explanation supplied as version_note when this version was saved; null when omitted or for historical versions. Immutable after creation.
80922
83016
  */
80923
83017
  note: string | null;
83018
+ /**
83019
+ * How many of this agent's live deployments are not on its active version: pinned to a version other than active_version, not archived, counted once each. It counts both a pin older than the active version and a pin newer than it that was saved without being applied, so read it as "not on the active version", never as "older than". Following deployments are never counted (they run the active version by definition). Null when the deployment side could not be read. Returned by update and apply too, so those answers equal the read that follows them.
83020
+ */
83021
+ deployments_behind: number | null;
80924
83022
  /**
80925
83023
  * Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A resource binding may also carry customer_access (read_only by default): it caps what a terminal customer's session (a visitor, ADR-163 §3) may do with that one resource, at the intersection of customer_access and the binding's own access — invoke (call) and read_write (change) are different axes, so only a matching pair keeps its access and any other pair falls to read_only. Its value must be one the type can grant: read_only or read_write for database, vector_store and media_library, read_only for file, and read_only or invoke for model, workflow and script. A member's session ignores it, so raising it never widens what members may do. A visitor's session never receives a whole-service binding (the default ticket service included) or an agent resource. A service binding opens one service, or one sub-tree of one, and carries only enabled: search, browser, ticket, crm, canvas, cut, studio, feedback or workspace. workspace opens development units — list one, read one, start, stop, exec inside one, fetch, push, connect, and open a unit for a change — and opens neither publishing nor any production operation. The ticket service is bound by default: a service agent whose list has no ticket entry may call the ticket API, and {"type": "ticket", "enabled": false} removes it. Every other service stays closed until it is bound. An open service allows every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access, customer_access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for the default: the ticket service only. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time.
80926
83024
  */
@@ -82143,6 +84241,10 @@ export type AgentsUpdateResponses = {
82143
84241
  * Change explanation supplied as version_note when this version was saved; null when omitted or for historical versions. Immutable after creation.
82144
84242
  */
82145
84243
  note: string | null;
84244
+ /**
84245
+ * How many of this agent's live deployments are not on its active version: pinned to a version other than active_version, not archived, counted once each. It counts both a pin older than the active version and a pin newer than it that was saved without being applied, so read it as "not on the active version", never as "older than". Following deployments are never counted (they run the active version by definition). Null when the deployment side could not be read. Returned by update and apply too, so those answers equal the read that follows them.
84246
+ */
84247
+ deployments_behind: number | null;
82146
84248
  /**
82147
84249
  * Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A resource binding may also carry customer_access (read_only by default): it caps what a terminal customer's session (a visitor, ADR-163 §3) may do with that one resource, at the intersection of customer_access and the binding's own access — invoke (call) and read_write (change) are different axes, so only a matching pair keeps its access and any other pair falls to read_only. Its value must be one the type can grant: read_only or read_write for database, vector_store and media_library, read_only for file, and read_only or invoke for model, workflow and script. A member's session ignores it, so raising it never widens what members may do. A visitor's session never receives a whole-service binding (the default ticket service included) or an agent resource. A service binding opens one service, or one sub-tree of one, and carries only enabled: search, browser, ticket, crm, canvas, cut, studio, feedback or workspace. workspace opens development units — list one, read one, start, stop, exec inside one, fetch, push, connect, and open a unit for a change — and opens neither publishing nor any production operation. The ticket service is bound by default: a service agent whose list has no ticket entry may call the ticket API, and {"type": "ticket", "enabled": false} removes it. Every other service stays closed until it is bound. An open service allows every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access, customer_access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for the default: the ticket service only. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time.
82148
84250
  */
@@ -82787,6 +84889,10 @@ export type AgentsArchiveResponses = {
82787
84889
  * Change explanation supplied as version_note when this version was saved; null when omitted or for historical versions. Immutable after creation.
82788
84890
  */
82789
84891
  note: string | null;
84892
+ /**
84893
+ * How many of this agent's live deployments are not on its active version: pinned to a version other than active_version, not archived, counted once each. It counts both a pin older than the active version and a pin newer than it that was saved without being applied, so read it as "not on the active version", never as "older than". Following deployments are never counted (they run the active version by definition). Null when the deployment side could not be read. Returned by update and apply too, so those answers equal the read that follows them.
84894
+ */
84895
+ deployments_behind: number | null;
82790
84896
  /**
82791
84897
  * Platform resources and services this service agent's codemode may reach, as one list of typed bindings. Only kind=service accepts a nonempty list; general agents return 400. There are two kinds. A resource binding names one resource with id and access: database (id db_..., read_only or read_write), vector_store (id vs_..., read_only or read_write), file (id file- plus 24 letters or digits, as the File API returns it; read_only), media_library (any id without ':' or whitespace, read_only or read_write), model (a model catalog id, invoke), workflow and script (id <namespace>/<name>, invoke). A resource binding may also carry customer_access (read_only by default): it caps what a terminal customer's session (a visitor, ADR-163 §3) may do with that one resource, at the intersection of customer_access and the binding's own access — invoke (call) and read_write (change) are different axes, so only a matching pair keeps its access and any other pair falls to read_only. Its value must be one the type can grant: read_only or read_write for database, vector_store and media_library, read_only for file, and read_only or invoke for model, workflow and script. A member's session ignores it, so raising it never widens what members may do. A visitor's session never receives a whole-service binding (the default ticket service included) or an agent resource. A service binding opens one service, or one sub-tree of one, and carries only enabled: search, browser, ticket, crm, canvas, cut, studio, feedback or workspace. workspace opens development units — list one, read one, start, stop, exec inside one, fetch, push, connect, and open a unit for a change — and opens neither publishing nor any production operation. The ticket service is bound by default: a service agent whose list has no ticket entry may call the ticket API, and {"type": "ticket", "enabled": false} removes it. Every other service stays closed until it is bound. An open service allows every public method of that service. At most 20 bindings per type, no repeated type and id, and each service type at most once. A session is authorized by the agent version it runs: newly added bindings apply only to new sessions, and a version saved with apply=false changes no access until it is applied. Applying a version that disables, removes or downgrades a binding revokes it immediately in running sessions on older versions. A resource that is not bound returns 404, a service that is not opened returns 403, and a write to a resource bound read_only returns 403 BINDING_READ_ONLY. Unknown types, fields on the wrong kind (id, access, customer_access or instructions on a service binding), wrong access and malformed ids return 400. The former databases, vector_stores and files fields are removed and return 400. Omit on create for the default: the ticket service only. Saving checks added or changed database, vector_store, media_library and file bindings in the organization: unknown or deleted ids return 400. If an owner is unavailable or takes more than 3 seconds, saving succeeds with verified=false for the affected bindings. Unchanged bindings keep their previous verification result and are not rechecked. workflow and script ids are not verified at save time.
82792
84898
  */
@@ -85484,6 +87590,14 @@ export type SessionsEventsListResponses = {
85484
87590
  * message_id of the agent message in the parent session up to which the conversation was copied.
85485
87591
  */
85486
87592
  forked_from_message_id: string;
87593
+ /**
87594
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
87595
+ */
87596
+ message_id?: string;
87597
+ /**
87598
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
87599
+ */
87600
+ session_thread_id?: string | null;
85487
87601
  } | {
85488
87602
  /**
85489
87603
  * Event id, unique within the session.
@@ -85595,6 +87709,14 @@ export type SessionsEventsListResponses = {
85595
87709
  */
85596
87710
  updated_at: number;
85597
87711
  } | null;
87712
+ /**
87713
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
87714
+ */
87715
+ message_id?: string;
87716
+ /**
87717
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
87718
+ */
87719
+ session_thread_id?: string | null;
85598
87720
  } | {
85599
87721
  /**
85600
87722
  * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
@@ -85645,6 +87767,14 @@ export type SessionsEventsListResponses = {
85645
87767
  */
85646
87768
  next_action?: string;
85647
87769
  };
87770
+ /**
87771
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
87772
+ */
87773
+ message_id?: string;
87774
+ /**
87775
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
87776
+ */
87777
+ session_thread_id?: string | null;
85648
87778
  } | {
85649
87779
  /**
85650
87780
  * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
@@ -85662,6 +87792,601 @@ export type SessionsEventsListResponses = {
85662
87792
  * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
85663
87793
  */
85664
87794
  processed_at: string;
87795
+ /**
87796
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
87797
+ */
87798
+ message_id?: string;
87799
+ /**
87800
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
87801
+ */
87802
+ session_thread_id?: string | null;
87803
+ } | {
87804
+ /**
87805
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
87806
+ */
87807
+ id: string;
87808
+ /**
87809
+ * Always `cognition.surfaced`. A worker session reached a boundary and surfaced in this session.
87810
+ */
87811
+ type: 'cognition.surfaced';
87812
+ /**
87813
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
87814
+ */
87815
+ processed_at: string;
87816
+ /**
87817
+ * Public sesn_ id of the worker session that reached the boundary; the internal ags_ id never appears here.
87818
+ */
87819
+ worker_session_id: string;
87820
+ /**
87821
+ * Name the worker session was opened under, as the session list shows it.
87822
+ */
87823
+ name: string;
87824
+ /**
87825
+ * How the worker's span ended.
87826
+ */
87827
+ state: 'done' | 'waiting' | 'failed' | 'archived';
87828
+ /**
87829
+ * Engram that filed the worker's experience, when a recap was written; absent when there is no node to name.
87830
+ */
87831
+ experience_id?: string;
87832
+ /**
87833
+ * What the worker handed over at this boundary: its last message, the addresses it named, the files it delivered and any operation the platform still holds. Absent when it handed nothing over.
87834
+ */
87835
+ result?: {
87836
+ /**
87837
+ * The worker's last message to this session, whitespace-collapsed and capped by the agent service.
87838
+ */
87839
+ message?: string;
87840
+ /**
87841
+ * Absolute http(s) addresses the delivered message names, in order of appearance.
87842
+ */
87843
+ links?: Array<string>;
87844
+ /**
87845
+ * Files the worker registered as delivered in this span.
87846
+ */
87847
+ files?: Array<{
87848
+ /**
87849
+ * Path of the delivered file, relative to the session's outputs directory.
87850
+ */
87851
+ name?: string;
87852
+ /**
87853
+ * Address the reply used to point at the file; absent when it named none.
87854
+ */
87855
+ href?: string;
87856
+ }>;
87857
+ /**
87858
+ * Operations the platform held at this boundary that nobody has answered yet.
87859
+ */
87860
+ held?: Array<{
87861
+ /**
87862
+ * Approval id of the held operation, the one user.tool_confirmation answers.
87863
+ */
87864
+ id?: string;
87865
+ /**
87866
+ * One line saying what the held operation would do.
87867
+ */
87868
+ summary?: string;
87869
+ /**
87870
+ * Effect class of the held operation: outward, or irreversible.
87871
+ */
87872
+ effect?: string;
87873
+ /**
87874
+ * HTTP method of the held request.
87875
+ */
87876
+ method?: string;
87877
+ /**
87878
+ * Path of the held request, as the door canonicalized it.
87879
+ */
87880
+ path?: string;
87881
+ /**
87882
+ * When the request stops being answerable, RFC 3339.
87883
+ */
87884
+ expires_at?: string;
87885
+ }>;
87886
+ };
87887
+ } | {
87888
+ /**
87889
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
87890
+ */
87891
+ id: string;
87892
+ /**
87893
+ * Always `cognition.intention_woken`. The idle pass woke the session about one open intention.
87894
+ */
87895
+ type: 'cognition.intention_woken';
87896
+ /**
87897
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
87898
+ */
87899
+ processed_at: string;
87900
+ /**
87901
+ * Engram of the intention the wake was about.
87902
+ */
87903
+ node_id: string;
87904
+ /**
87905
+ * Why this intention was picked.
87906
+ */
87907
+ reason: 'open_engram' | 'assignment';
87908
+ } | {
87909
+ /**
87910
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
87911
+ */
87912
+ id: string;
87913
+ /**
87914
+ * Always `agent.operation_approval_requested`. The door held an outward or irreversible operation for the person to approve.
87915
+ */
87916
+ type: 'agent.operation_approval_requested';
87917
+ /**
87918
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
87919
+ */
87920
+ processed_at: string;
87921
+ /**
87922
+ * Id of the held request; user.tool_confirmation answers it and agent.operation_approval_decided settles it.
87923
+ */
87924
+ approval_id: string;
87925
+ /**
87926
+ * Operation the agent called, as the platform names it in its API reference.
87927
+ */
87928
+ operation_id: string;
87929
+ /**
87930
+ * Why the call was held.
87931
+ */
87932
+ effect: 'outward' | 'irreversible';
87933
+ /**
87934
+ * HTTP method of the request that was held.
87935
+ */
87936
+ method: string;
87937
+ /**
87938
+ * Path of the request that was held, as the door canonicalized it.
87939
+ */
87940
+ path: string;
87941
+ /**
87942
+ * One line naming the operation and its address, for the card's title.
87943
+ */
87944
+ summary: string;
87945
+ /**
87946
+ * When the request stops being answerable, RFC 3339; a request nobody answered within 24 hours settles as expired.
87947
+ */
87948
+ expires_at: string;
87949
+ /**
87950
+ * Public sesn_ id of the worker session whose operation was held; absent when this session made the call itself.
87951
+ */
87952
+ worker_session_id?: string;
87953
+ /**
87954
+ * Name of that worker session, for the card to say which desk is asking; absent when this session made the call itself.
87955
+ */
87956
+ worker_name?: string;
87957
+ } | {
87958
+ /**
87959
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
87960
+ */
87961
+ id: string;
87962
+ /**
87963
+ * Always `agent.operation_approval_decided`. A held operation was approved, refused, or expired unanswered.
87964
+ */
87965
+ type: 'agent.operation_approval_decided';
87966
+ /**
87967
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
87968
+ */
87969
+ processed_at: string;
87970
+ /**
87971
+ * Id of the held request this settles, matching agent.operation_approval_requested.
87972
+ */
87973
+ approval_id: string;
87974
+ /**
87975
+ * How the held request ended.
87976
+ */
87977
+ status: 'approved' | 'refused' | 'expired';
87978
+ } | {
87979
+ /**
87980
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
87981
+ */
87982
+ id: string;
87983
+ /**
87984
+ * Always `session.prompt_configuration_mismatch`. A pinned session runs a configuration revision its agent has since left.
87985
+ */
87986
+ type: 'session.prompt_configuration_mismatch';
87987
+ /**
87988
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
87989
+ */
87990
+ processed_at: string;
87991
+ /**
87992
+ * Agent configuration revision this session pinned when it started (agr_…).
87993
+ */
87994
+ pinned_revision_id: string;
87995
+ /**
87996
+ * Configuration revision the agent publishes now (agr_…); it differs from the pinned one, which is what makes this event.
87997
+ */
87998
+ current_revision_id: string;
87999
+ } | {
88000
+ /**
88001
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
88002
+ */
88003
+ id: string;
88004
+ /**
88005
+ * Always `session.prompt_rev_changed`. A platform input (a prompt section, the catalog, the tool descriptions) moved without a version moving.
88006
+ */
88007
+ type: 'session.prompt_rev_changed';
88008
+ /**
88009
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
88010
+ */
88011
+ processed_at: string;
88012
+ /**
88013
+ * Configuration revision the session ran this turn (agr_…); it does not move when only platform inputs move.
88014
+ */
88015
+ config_revision_id: string;
88016
+ /**
88017
+ * The platform inputs that moved, sorted by name; empty never happens, because no move means no event.
88018
+ */
88019
+ changed: Array<{
88020
+ /**
88021
+ * Input name, for example section:cards, catalog or tools.
88022
+ */
88023
+ name: string;
88024
+ /**
88025
+ * Content Rev after the move, or null when the input was removed; the projection drops an entry that is neither.
88026
+ */
88027
+ rev: string | null;
88028
+ }>;
88029
+ } | {
88030
+ /**
88031
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
88032
+ */
88033
+ id: string;
88034
+ /**
88035
+ * Always `session.computer_tier`. The session's machine escalated, came back, or reported its tier status.
88036
+ */
88037
+ type: 'session.computer_tier';
88038
+ /**
88039
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
88040
+ */
88041
+ processed_at: string;
88042
+ /**
88043
+ * Which step of the tier move this reports.
88044
+ */
88045
+ action: 'escalating' | 'escalated' | 'escalate_failed' | 'rerun' | 'status';
88046
+ /**
88047
+ * Machine the session is on for this report.
88048
+ */
88049
+ tier: 'light' | 'heavy';
88050
+ /**
88051
+ * How long the reported step took, in milliseconds.
88052
+ */
88053
+ duration_ms: number;
88054
+ /**
88055
+ * Why an escalation failed; present only on escalate_failed.
88056
+ */
88057
+ error_code?: string;
88058
+ /**
88059
+ * The machine's own status when the controller reported one, with the progress counters the console shows while a move runs.
88060
+ */
88061
+ status?: {
88062
+ /**
88063
+ * State of the machine at this report.
88064
+ */
88065
+ kind?: 'light_idle' | 'light_busy' | 'escalating' | 'heavy_burst' | 'heavy_resident' | 'releasing' | 'heavy_parked' | 'cooldown';
88066
+ /**
88067
+ * Step of the move in progress.
88068
+ */
88069
+ step?: 'prepare' | 'scan' | 'sync' | 'switch' | 'drain' | 'pull' | 'verify' | 'pause';
88070
+ /**
88071
+ * Progress of the whole move, from 0 to 100.
88072
+ */
88073
+ percent?: number;
88074
+ /**
88075
+ * Files synchronized so far.
88076
+ */
88077
+ files_done?: number;
88078
+ /**
88079
+ * Files to synchronize in this move.
88080
+ */
88081
+ files_total?: number;
88082
+ /**
88083
+ * Epoch milliseconds when an idle heavy machine is released.
88084
+ */
88085
+ idle_release_at?: number;
88086
+ /**
88087
+ * Epoch milliseconds of the next attempt after a failure.
88088
+ */
88089
+ retry_at?: number;
88090
+ /**
88091
+ * Lease epoch of the controller, bumped on every escalation to heavy.
88092
+ */
88093
+ epoch?: number;
88094
+ /**
88095
+ * The heavy machine's own status read without waking it, or null when there is none.
88096
+ */
88097
+ heavy_instance?: string | null;
88098
+ /**
88099
+ * True when a heavy machine exists and is paused, so its disk is kept.
88100
+ */
88101
+ heavy_paused?: boolean;
88102
+ };
88103
+ } | {
88104
+ /**
88105
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
88106
+ */
88107
+ id: string;
88108
+ /**
88109
+ * Always `agent.artifact_delivered`. A file, canvas or media asset the agent delivered was recorded as an artifact.
88110
+ */
88111
+ type: 'agent.artifact_delivered';
88112
+ /**
88113
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
88114
+ */
88115
+ processed_at: string;
88116
+ /**
88117
+ * The artifact as the session recorded it: one file of the outputs directory, or one canvas or media asset the reply pointed at.
88118
+ */
88119
+ artifact: {
88120
+ /**
88121
+ * Object type tag; always artifact for a delivered output.
88122
+ */
88123
+ object: 'artifact';
88124
+ /**
88125
+ * Artifact id (art_…); delivering the same path again keeps it.
88126
+ */
88127
+ id: string;
88128
+ /**
88129
+ * Session that owns the artifact.
88130
+ */
88131
+ session_id: string;
88132
+ /**
88133
+ * Run that produced it, or null when that cannot be told.
88134
+ */
88135
+ run_id: string | null;
88136
+ /**
88137
+ * Path of the artifact relative to the outputs directory, for example report.pdf.
88138
+ */
88139
+ name: string;
88140
+ /**
88141
+ * Version of this artifact: one more each time the same path is delivered again in this session.
88142
+ */
88143
+ version: number;
88144
+ /**
88145
+ * What the artifact holds: a delivered file (kind file, with file_id, filename, mime_type and bytes) or a platform object (kind object, with object_type, object_id, href and title).
88146
+ */
88147
+ parts: Array<{
88148
+ [key: string]: unknown;
88149
+ }>;
88150
+ /**
88151
+ * Link addresses in the reply that point at this artifact, verbatim.
88152
+ */
88153
+ source_hrefs: Array<string>;
88154
+ /**
88155
+ * When the artifact was first registered, RFC 3339.
88156
+ */
88157
+ create_time: string;
88158
+ /**
88159
+ * When the latest version was registered, RFC 3339.
88160
+ */
88161
+ update_time: string;
88162
+ };
88163
+ } | {
88164
+ /**
88165
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
88166
+ */
88167
+ id: string;
88168
+ /**
88169
+ * Always `agent.image_generation`. Retired imagine tool: one image request and how it ended. Old sessions still replay it.
88170
+ */
88171
+ type: 'agent.image_generation';
88172
+ /**
88173
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
88174
+ */
88175
+ processed_at: string;
88176
+ /**
88177
+ * The imagine tool call this report belongs to.
88178
+ */
88179
+ tool_use_id: string;
88180
+ /**
88181
+ * Which picture of the call this is, from 0.
88182
+ */
88183
+ index: number;
88184
+ /**
88185
+ * How many pictures the call asked for.
88186
+ */
88187
+ total: number;
88188
+ /**
88189
+ * Step of the picture at the time it was recorded: queued, drawing, completed, failed or cancelled.
88190
+ */
88191
+ status: string;
88192
+ /**
88193
+ * How the picture was produced: generate, edit or set.
88194
+ */
88195
+ mode?: string;
88196
+ /**
88197
+ * Aspect ratio requested for the picture, for example 1:1.
88198
+ */
88199
+ aspect?: string;
88200
+ /**
88201
+ * Prompt the model passed for this picture.
88202
+ */
88203
+ prompt?: string;
88204
+ /**
88205
+ * Model that drew the picture; absent when none was chosen.
88206
+ */
88207
+ model?: string;
88208
+ /**
88209
+ * File of the finished picture; absent until it completed.
88210
+ */
88211
+ file_id?: string;
88212
+ /**
88213
+ * Conversation label the picture was given, for example 图3.
88214
+ */
88215
+ label?: string;
88216
+ /**
88217
+ * Width of the produced picture in pixels.
88218
+ */
88219
+ width?: number;
88220
+ /**
88221
+ * Height of the produced picture in pixels.
88222
+ */
88223
+ height?: number;
88224
+ /**
88225
+ * Prompt the provider rewrote before drawing, when it rewrote one.
88226
+ */
88227
+ revised_prompt?: string;
88228
+ /**
88229
+ * Pictures this one was made from, by their conversation labels.
88230
+ */
88231
+ source_labels?: Array<string>;
88232
+ /**
88233
+ * Caption the reply gave the picture.
88234
+ */
88235
+ caption?: string;
88236
+ /**
88237
+ * Slot of the picture inside a planned set; null when it was not part of one.
88238
+ */
88239
+ slot?: number | null;
88240
+ /**
88241
+ * Label of the picture this version replaces.
88242
+ */
88243
+ replaces?: string;
88244
+ /**
88245
+ * Version of the labelled picture: one more per replacement.
88246
+ */
88247
+ version?: number;
88248
+ /**
88249
+ * Why the picture failed; present only when it failed.
88250
+ */
88251
+ failure?: {
88252
+ /**
88253
+ * Failure class: moderation, quota, rate_limited, timeout, invalid_request, provider_error or interrupted.
88254
+ */
88255
+ reason?: string;
88256
+ };
88257
+ } | {
88258
+ /**
88259
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
88260
+ */
88261
+ id: string;
88262
+ /**
88263
+ * Always `session.image_labeled`. Retired imagine tool: a picture was labelled in the session. Old sessions still replay it.
88264
+ */
88265
+ type: 'session.image_labeled';
88266
+ /**
88267
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
88268
+ */
88269
+ processed_at: string;
88270
+ /**
88271
+ * Conversation label the picture was given, for example 图3.
88272
+ */
88273
+ label: string;
88274
+ /**
88275
+ * File the label points at.
88276
+ */
88277
+ file_id: string;
88278
+ /**
88279
+ * Where the picture came from.
88280
+ */
88281
+ origin: 'generated' | 'uploaded';
88282
+ /**
88283
+ * Name of the file the label points at.
88284
+ */
88285
+ filename: string;
88286
+ /**
88287
+ * Imagine call that produced the label, when one did.
88288
+ */
88289
+ tool_use_id?: string;
88290
+ /**
88291
+ * Version of the labelled picture: one more per replacement.
88292
+ */
88293
+ version?: number;
88294
+ /**
88295
+ * File this label pointed at before the replacement, when it was replaced.
88296
+ */
88297
+ replaced_file_id?: string;
88298
+ } | {
88299
+ /**
88300
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
88301
+ */
88302
+ id: string;
88303
+ /**
88304
+ * Always `session.image_set_planned`. Retired imagine tool: one call planned a set of pictures. Old sessions still replay it.
88305
+ */
88306
+ type: 'session.image_set_planned';
88307
+ /**
88308
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
88309
+ */
88310
+ processed_at: string;
88311
+ /**
88312
+ * Imagine call that planned the set.
88313
+ */
88314
+ tool_use_id: string;
88315
+ /**
88316
+ * The pictures the set planned, in the order the call listed them.
88317
+ */
88318
+ items: Array<unknown>;
88319
+ /**
88320
+ * Title given to the set, when the call named one.
88321
+ */
88322
+ title?: string;
88323
+ } | {
88324
+ /**
88325
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
88326
+ */
88327
+ id: string;
88328
+ /**
88329
+ * Always `session.project_attached`. The main session attached a project; it names the project, never its instructions.
88330
+ */
88331
+ type: 'session.project_attached';
88332
+ /**
88333
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
88334
+ */
88335
+ processed_at: string;
88336
+ /**
88337
+ * The project the main session is now attached to.
88338
+ */
88339
+ project: {
88340
+ /**
88341
+ * Registered project id, as the conversation's project list returns it.
88342
+ */
88343
+ id: string;
88344
+ /**
88345
+ * Project name as it was registered; a label, not a unique key.
88346
+ */
88347
+ name: string;
88348
+ /**
88349
+ * Folder of the project on the session's computer, the directory its desks work in.
88350
+ */
88351
+ path: string;
88352
+ };
88353
+ /**
88354
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
88355
+ */
88356
+ message_id?: string;
88357
+ /**
88358
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
88359
+ */
88360
+ session_thread_id?: string | null;
88361
+ } | {
88362
+ /**
88363
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
88364
+ */
88365
+ id: string;
88366
+ /**
88367
+ * Always `session.project_detached`. The main session's project attachment ended.
88368
+ */
88369
+ type: 'session.project_detached';
88370
+ /**
88371
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
88372
+ */
88373
+ processed_at: string;
88374
+ /**
88375
+ * Id of the project the session was attached to; it is the same id the attach event carried.
88376
+ */
88377
+ project_id: string;
88378
+ /**
88379
+ * Present only when the project left the registry rather than the session detaching it.
88380
+ */
88381
+ reason?: 'project_removed';
88382
+ /**
88383
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
88384
+ */
88385
+ message_id?: string;
88386
+ /**
88387
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
88388
+ */
88389
+ session_thread_id?: string | null;
85665
88390
  }>;
85666
88391
  /**
85667
88392
  * Opaque cursor for the next page: pass it unchanged as page to continue. Null when this is the last page.
@@ -85805,6 +88530,14 @@ export type SessionsEventsSendResponses = {
85805
88530
  * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
85806
88531
  */
85807
88532
  processed_at: string;
88533
+ /**
88534
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
88535
+ */
88536
+ message_id?: string;
88537
+ /**
88538
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
88539
+ */
88540
+ session_thread_id?: string | null;
85808
88541
  }>;
85809
88542
  };
85810
88543
  };
@@ -86579,6 +89312,14 @@ export type SessionsThreadsEventsListResponses = {
86579
89312
  * message_id of the agent message in the parent session up to which the conversation was copied.
86580
89313
  */
86581
89314
  forked_from_message_id: string;
89315
+ /**
89316
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
89317
+ */
89318
+ message_id?: string;
89319
+ /**
89320
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
89321
+ */
89322
+ session_thread_id?: string | null;
86582
89323
  } | {
86583
89324
  /**
86584
89325
  * Event id, unique within the session.
@@ -86690,6 +89431,14 @@ export type SessionsThreadsEventsListResponses = {
86690
89431
  */
86691
89432
  updated_at: number;
86692
89433
  } | null;
89434
+ /**
89435
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
89436
+ */
89437
+ message_id?: string;
89438
+ /**
89439
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
89440
+ */
89441
+ session_thread_id?: string | null;
86693
89442
  } | {
86694
89443
  /**
86695
89444
  * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
@@ -86740,6 +89489,14 @@ export type SessionsThreadsEventsListResponses = {
86740
89489
  */
86741
89490
  next_action?: string;
86742
89491
  };
89492
+ /**
89493
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
89494
+ */
89495
+ message_id?: string;
89496
+ /**
89497
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
89498
+ */
89499
+ session_thread_id?: string | null;
86743
89500
  } | {
86744
89501
  /**
86745
89502
  * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
@@ -86757,6 +89514,601 @@ export type SessionsThreadsEventsListResponses = {
86757
89514
  * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
86758
89515
  */
86759
89516
  processed_at: string;
89517
+ /**
89518
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
89519
+ */
89520
+ message_id?: string;
89521
+ /**
89522
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
89523
+ */
89524
+ session_thread_id?: string | null;
89525
+ } | {
89526
+ /**
89527
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89528
+ */
89529
+ id: string;
89530
+ /**
89531
+ * Always `cognition.surfaced`. A worker session reached a boundary and surfaced in this session.
89532
+ */
89533
+ type: 'cognition.surfaced';
89534
+ /**
89535
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89536
+ */
89537
+ processed_at: string;
89538
+ /**
89539
+ * Public sesn_ id of the worker session that reached the boundary; the internal ags_ id never appears here.
89540
+ */
89541
+ worker_session_id: string;
89542
+ /**
89543
+ * Name the worker session was opened under, as the session list shows it.
89544
+ */
89545
+ name: string;
89546
+ /**
89547
+ * How the worker's span ended.
89548
+ */
89549
+ state: 'done' | 'waiting' | 'failed' | 'archived';
89550
+ /**
89551
+ * Engram that filed the worker's experience, when a recap was written; absent when there is no node to name.
89552
+ */
89553
+ experience_id?: string;
89554
+ /**
89555
+ * What the worker handed over at this boundary: its last message, the addresses it named, the files it delivered and any operation the platform still holds. Absent when it handed nothing over.
89556
+ */
89557
+ result?: {
89558
+ /**
89559
+ * The worker's last message to this session, whitespace-collapsed and capped by the agent service.
89560
+ */
89561
+ message?: string;
89562
+ /**
89563
+ * Absolute http(s) addresses the delivered message names, in order of appearance.
89564
+ */
89565
+ links?: Array<string>;
89566
+ /**
89567
+ * Files the worker registered as delivered in this span.
89568
+ */
89569
+ files?: Array<{
89570
+ /**
89571
+ * Path of the delivered file, relative to the session's outputs directory.
89572
+ */
89573
+ name?: string;
89574
+ /**
89575
+ * Address the reply used to point at the file; absent when it named none.
89576
+ */
89577
+ href?: string;
89578
+ }>;
89579
+ /**
89580
+ * Operations the platform held at this boundary that nobody has answered yet.
89581
+ */
89582
+ held?: Array<{
89583
+ /**
89584
+ * Approval id of the held operation, the one user.tool_confirmation answers.
89585
+ */
89586
+ id?: string;
89587
+ /**
89588
+ * One line saying what the held operation would do.
89589
+ */
89590
+ summary?: string;
89591
+ /**
89592
+ * Effect class of the held operation: outward, or irreversible.
89593
+ */
89594
+ effect?: string;
89595
+ /**
89596
+ * HTTP method of the held request.
89597
+ */
89598
+ method?: string;
89599
+ /**
89600
+ * Path of the held request, as the door canonicalized it.
89601
+ */
89602
+ path?: string;
89603
+ /**
89604
+ * When the request stops being answerable, RFC 3339.
89605
+ */
89606
+ expires_at?: string;
89607
+ }>;
89608
+ };
89609
+ } | {
89610
+ /**
89611
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89612
+ */
89613
+ id: string;
89614
+ /**
89615
+ * Always `cognition.intention_woken`. The idle pass woke the session about one open intention.
89616
+ */
89617
+ type: 'cognition.intention_woken';
89618
+ /**
89619
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89620
+ */
89621
+ processed_at: string;
89622
+ /**
89623
+ * Engram of the intention the wake was about.
89624
+ */
89625
+ node_id: string;
89626
+ /**
89627
+ * Why this intention was picked.
89628
+ */
89629
+ reason: 'open_engram' | 'assignment';
89630
+ } | {
89631
+ /**
89632
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89633
+ */
89634
+ id: string;
89635
+ /**
89636
+ * Always `agent.operation_approval_requested`. The door held an outward or irreversible operation for the person to approve.
89637
+ */
89638
+ type: 'agent.operation_approval_requested';
89639
+ /**
89640
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89641
+ */
89642
+ processed_at: string;
89643
+ /**
89644
+ * Id of the held request; user.tool_confirmation answers it and agent.operation_approval_decided settles it.
89645
+ */
89646
+ approval_id: string;
89647
+ /**
89648
+ * Operation the agent called, as the platform names it in its API reference.
89649
+ */
89650
+ operation_id: string;
89651
+ /**
89652
+ * Why the call was held.
89653
+ */
89654
+ effect: 'outward' | 'irreversible';
89655
+ /**
89656
+ * HTTP method of the request that was held.
89657
+ */
89658
+ method: string;
89659
+ /**
89660
+ * Path of the request that was held, as the door canonicalized it.
89661
+ */
89662
+ path: string;
89663
+ /**
89664
+ * One line naming the operation and its address, for the card's title.
89665
+ */
89666
+ summary: string;
89667
+ /**
89668
+ * When the request stops being answerable, RFC 3339; a request nobody answered within 24 hours settles as expired.
89669
+ */
89670
+ expires_at: string;
89671
+ /**
89672
+ * Public sesn_ id of the worker session whose operation was held; absent when this session made the call itself.
89673
+ */
89674
+ worker_session_id?: string;
89675
+ /**
89676
+ * Name of that worker session, for the card to say which desk is asking; absent when this session made the call itself.
89677
+ */
89678
+ worker_name?: string;
89679
+ } | {
89680
+ /**
89681
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89682
+ */
89683
+ id: string;
89684
+ /**
89685
+ * Always `agent.operation_approval_decided`. A held operation was approved, refused, or expired unanswered.
89686
+ */
89687
+ type: 'agent.operation_approval_decided';
89688
+ /**
89689
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89690
+ */
89691
+ processed_at: string;
89692
+ /**
89693
+ * Id of the held request this settles, matching agent.operation_approval_requested.
89694
+ */
89695
+ approval_id: string;
89696
+ /**
89697
+ * How the held request ended.
89698
+ */
89699
+ status: 'approved' | 'refused' | 'expired';
89700
+ } | {
89701
+ /**
89702
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89703
+ */
89704
+ id: string;
89705
+ /**
89706
+ * Always `session.prompt_configuration_mismatch`. A pinned session runs a configuration revision its agent has since left.
89707
+ */
89708
+ type: 'session.prompt_configuration_mismatch';
89709
+ /**
89710
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89711
+ */
89712
+ processed_at: string;
89713
+ /**
89714
+ * Agent configuration revision this session pinned when it started (agr_…).
89715
+ */
89716
+ pinned_revision_id: string;
89717
+ /**
89718
+ * Configuration revision the agent publishes now (agr_…); it differs from the pinned one, which is what makes this event.
89719
+ */
89720
+ current_revision_id: string;
89721
+ } | {
89722
+ /**
89723
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89724
+ */
89725
+ id: string;
89726
+ /**
89727
+ * Always `session.prompt_rev_changed`. A platform input (a prompt section, the catalog, the tool descriptions) moved without a version moving.
89728
+ */
89729
+ type: 'session.prompt_rev_changed';
89730
+ /**
89731
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89732
+ */
89733
+ processed_at: string;
89734
+ /**
89735
+ * Configuration revision the session ran this turn (agr_…); it does not move when only platform inputs move.
89736
+ */
89737
+ config_revision_id: string;
89738
+ /**
89739
+ * The platform inputs that moved, sorted by name; empty never happens, because no move means no event.
89740
+ */
89741
+ changed: Array<{
89742
+ /**
89743
+ * Input name, for example section:cards, catalog or tools.
89744
+ */
89745
+ name: string;
89746
+ /**
89747
+ * Content Rev after the move, or null when the input was removed; the projection drops an entry that is neither.
89748
+ */
89749
+ rev: string | null;
89750
+ }>;
89751
+ } | {
89752
+ /**
89753
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89754
+ */
89755
+ id: string;
89756
+ /**
89757
+ * Always `session.computer_tier`. The session's machine escalated, came back, or reported its tier status.
89758
+ */
89759
+ type: 'session.computer_tier';
89760
+ /**
89761
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89762
+ */
89763
+ processed_at: string;
89764
+ /**
89765
+ * Which step of the tier move this reports.
89766
+ */
89767
+ action: 'escalating' | 'escalated' | 'escalate_failed' | 'rerun' | 'status';
89768
+ /**
89769
+ * Machine the session is on for this report.
89770
+ */
89771
+ tier: 'light' | 'heavy';
89772
+ /**
89773
+ * How long the reported step took, in milliseconds.
89774
+ */
89775
+ duration_ms: number;
89776
+ /**
89777
+ * Why an escalation failed; present only on escalate_failed.
89778
+ */
89779
+ error_code?: string;
89780
+ /**
89781
+ * The machine's own status when the controller reported one, with the progress counters the console shows while a move runs.
89782
+ */
89783
+ status?: {
89784
+ /**
89785
+ * State of the machine at this report.
89786
+ */
89787
+ kind?: 'light_idle' | 'light_busy' | 'escalating' | 'heavy_burst' | 'heavy_resident' | 'releasing' | 'heavy_parked' | 'cooldown';
89788
+ /**
89789
+ * Step of the move in progress.
89790
+ */
89791
+ step?: 'prepare' | 'scan' | 'sync' | 'switch' | 'drain' | 'pull' | 'verify' | 'pause';
89792
+ /**
89793
+ * Progress of the whole move, from 0 to 100.
89794
+ */
89795
+ percent?: number;
89796
+ /**
89797
+ * Files synchronized so far.
89798
+ */
89799
+ files_done?: number;
89800
+ /**
89801
+ * Files to synchronize in this move.
89802
+ */
89803
+ files_total?: number;
89804
+ /**
89805
+ * Epoch milliseconds when an idle heavy machine is released.
89806
+ */
89807
+ idle_release_at?: number;
89808
+ /**
89809
+ * Epoch milliseconds of the next attempt after a failure.
89810
+ */
89811
+ retry_at?: number;
89812
+ /**
89813
+ * Lease epoch of the controller, bumped on every escalation to heavy.
89814
+ */
89815
+ epoch?: number;
89816
+ /**
89817
+ * The heavy machine's own status read without waking it, or null when there is none.
89818
+ */
89819
+ heavy_instance?: string | null;
89820
+ /**
89821
+ * True when a heavy machine exists and is paused, so its disk is kept.
89822
+ */
89823
+ heavy_paused?: boolean;
89824
+ };
89825
+ } | {
89826
+ /**
89827
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89828
+ */
89829
+ id: string;
89830
+ /**
89831
+ * Always `agent.artifact_delivered`. A file, canvas or media asset the agent delivered was recorded as an artifact.
89832
+ */
89833
+ type: 'agent.artifact_delivered';
89834
+ /**
89835
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89836
+ */
89837
+ processed_at: string;
89838
+ /**
89839
+ * The artifact as the session recorded it: one file of the outputs directory, or one canvas or media asset the reply pointed at.
89840
+ */
89841
+ artifact: {
89842
+ /**
89843
+ * Object type tag; always artifact for a delivered output.
89844
+ */
89845
+ object: 'artifact';
89846
+ /**
89847
+ * Artifact id (art_…); delivering the same path again keeps it.
89848
+ */
89849
+ id: string;
89850
+ /**
89851
+ * Session that owns the artifact.
89852
+ */
89853
+ session_id: string;
89854
+ /**
89855
+ * Run that produced it, or null when that cannot be told.
89856
+ */
89857
+ run_id: string | null;
89858
+ /**
89859
+ * Path of the artifact relative to the outputs directory, for example report.pdf.
89860
+ */
89861
+ name: string;
89862
+ /**
89863
+ * Version of this artifact: one more each time the same path is delivered again in this session.
89864
+ */
89865
+ version: number;
89866
+ /**
89867
+ * What the artifact holds: a delivered file (kind file, with file_id, filename, mime_type and bytes) or a platform object (kind object, with object_type, object_id, href and title).
89868
+ */
89869
+ parts: Array<{
89870
+ [key: string]: unknown;
89871
+ }>;
89872
+ /**
89873
+ * Link addresses in the reply that point at this artifact, verbatim.
89874
+ */
89875
+ source_hrefs: Array<string>;
89876
+ /**
89877
+ * When the artifact was first registered, RFC 3339.
89878
+ */
89879
+ create_time: string;
89880
+ /**
89881
+ * When the latest version was registered, RFC 3339.
89882
+ */
89883
+ update_time: string;
89884
+ };
89885
+ } | {
89886
+ /**
89887
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89888
+ */
89889
+ id: string;
89890
+ /**
89891
+ * Always `agent.image_generation`. Retired imagine tool: one image request and how it ended. Old sessions still replay it.
89892
+ */
89893
+ type: 'agent.image_generation';
89894
+ /**
89895
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89896
+ */
89897
+ processed_at: string;
89898
+ /**
89899
+ * The imagine tool call this report belongs to.
89900
+ */
89901
+ tool_use_id: string;
89902
+ /**
89903
+ * Which picture of the call this is, from 0.
89904
+ */
89905
+ index: number;
89906
+ /**
89907
+ * How many pictures the call asked for.
89908
+ */
89909
+ total: number;
89910
+ /**
89911
+ * Step of the picture at the time it was recorded: queued, drawing, completed, failed or cancelled.
89912
+ */
89913
+ status: string;
89914
+ /**
89915
+ * How the picture was produced: generate, edit or set.
89916
+ */
89917
+ mode?: string;
89918
+ /**
89919
+ * Aspect ratio requested for the picture, for example 1:1.
89920
+ */
89921
+ aspect?: string;
89922
+ /**
89923
+ * Prompt the model passed for this picture.
89924
+ */
89925
+ prompt?: string;
89926
+ /**
89927
+ * Model that drew the picture; absent when none was chosen.
89928
+ */
89929
+ model?: string;
89930
+ /**
89931
+ * File of the finished picture; absent until it completed.
89932
+ */
89933
+ file_id?: string;
89934
+ /**
89935
+ * Conversation label the picture was given, for example 图3.
89936
+ */
89937
+ label?: string;
89938
+ /**
89939
+ * Width of the produced picture in pixels.
89940
+ */
89941
+ width?: number;
89942
+ /**
89943
+ * Height of the produced picture in pixels.
89944
+ */
89945
+ height?: number;
89946
+ /**
89947
+ * Prompt the provider rewrote before drawing, when it rewrote one.
89948
+ */
89949
+ revised_prompt?: string;
89950
+ /**
89951
+ * Pictures this one was made from, by their conversation labels.
89952
+ */
89953
+ source_labels?: Array<string>;
89954
+ /**
89955
+ * Caption the reply gave the picture.
89956
+ */
89957
+ caption?: string;
89958
+ /**
89959
+ * Slot of the picture inside a planned set; null when it was not part of one.
89960
+ */
89961
+ slot?: number | null;
89962
+ /**
89963
+ * Label of the picture this version replaces.
89964
+ */
89965
+ replaces?: string;
89966
+ /**
89967
+ * Version of the labelled picture: one more per replacement.
89968
+ */
89969
+ version?: number;
89970
+ /**
89971
+ * Why the picture failed; present only when it failed.
89972
+ */
89973
+ failure?: {
89974
+ /**
89975
+ * Failure class: moderation, quota, rate_limited, timeout, invalid_request, provider_error or interrupted.
89976
+ */
89977
+ reason?: string;
89978
+ };
89979
+ } | {
89980
+ /**
89981
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
89982
+ */
89983
+ id: string;
89984
+ /**
89985
+ * Always `session.image_labeled`. Retired imagine tool: a picture was labelled in the session. Old sessions still replay it.
89986
+ */
89987
+ type: 'session.image_labeled';
89988
+ /**
89989
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
89990
+ */
89991
+ processed_at: string;
89992
+ /**
89993
+ * Conversation label the picture was given, for example 图3.
89994
+ */
89995
+ label: string;
89996
+ /**
89997
+ * File the label points at.
89998
+ */
89999
+ file_id: string;
90000
+ /**
90001
+ * Where the picture came from.
90002
+ */
90003
+ origin: 'generated' | 'uploaded';
90004
+ /**
90005
+ * Name of the file the label points at.
90006
+ */
90007
+ filename: string;
90008
+ /**
90009
+ * Imagine call that produced the label, when one did.
90010
+ */
90011
+ tool_use_id?: string;
90012
+ /**
90013
+ * Version of the labelled picture: one more per replacement.
90014
+ */
90015
+ version?: number;
90016
+ /**
90017
+ * File this label pointed at before the replacement, when it was replaced.
90018
+ */
90019
+ replaced_file_id?: string;
90020
+ } | {
90021
+ /**
90022
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
90023
+ */
90024
+ id: string;
90025
+ /**
90026
+ * Always `session.image_set_planned`. Retired imagine tool: one call planned a set of pictures. Old sessions still replay it.
90027
+ */
90028
+ type: 'session.image_set_planned';
90029
+ /**
90030
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
90031
+ */
90032
+ processed_at: string;
90033
+ /**
90034
+ * Imagine call that planned the set.
90035
+ */
90036
+ tool_use_id: string;
90037
+ /**
90038
+ * The pictures the set planned, in the order the call listed them.
90039
+ */
90040
+ items: Array<unknown>;
90041
+ /**
90042
+ * Title given to the set, when the call named one.
90043
+ */
90044
+ title?: string;
90045
+ } | {
90046
+ /**
90047
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
90048
+ */
90049
+ id: string;
90050
+ /**
90051
+ * Always `session.project_attached`. The main session attached a project; it names the project, never its instructions.
90052
+ */
90053
+ type: 'session.project_attached';
90054
+ /**
90055
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
90056
+ */
90057
+ processed_at: string;
90058
+ /**
90059
+ * The project the main session is now attached to.
90060
+ */
90061
+ project: {
90062
+ /**
90063
+ * Registered project id, as the conversation's project list returns it.
90064
+ */
90065
+ id: string;
90066
+ /**
90067
+ * Project name as it was registered; a label, not a unique key.
90068
+ */
90069
+ name: string;
90070
+ /**
90071
+ * Folder of the project on the session's computer, the directory its desks work in.
90072
+ */
90073
+ path: string;
90074
+ };
90075
+ /**
90076
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
90077
+ */
90078
+ message_id?: string;
90079
+ /**
90080
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
90081
+ */
90082
+ session_thread_id?: string | null;
90083
+ } | {
90084
+ /**
90085
+ * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
90086
+ */
90087
+ id: string;
90088
+ /**
90089
+ * Always `session.project_detached`. The main session's project attachment ended.
90090
+ */
90091
+ type: 'session.project_detached';
90092
+ /**
90093
+ * RFC 3339 time at which the server processed the event; null while a queued input has not started running.
90094
+ */
90095
+ processed_at: string;
90096
+ /**
90097
+ * Id of the project the session was attached to; it is the same id the attach event carried.
90098
+ */
90099
+ project_id: string;
90100
+ /**
90101
+ * Present only when the project left the registry rather than the session detaching it.
90102
+ */
90103
+ reason?: 'project_removed';
90104
+ /**
90105
+ * Envelope field, not part of this event's own payload: the transcript message id of the row, added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event stamps a message id today, so it is declared for the frame shape rather than produced here.
90106
+ */
90107
+ message_id?: string;
90108
+ /**
90109
+ * Envelope field, not part of this event's own payload: the public sthr_ thread id of the row (null when the row has none), added by the shared projection in apps/api/src/routes/managed-session-events.ts whenever the row carries one (#4480). No writer of this event runs under a thread today, so it is declared for the frame shape rather than produced here.
90110
+ */
90111
+ session_thread_id?: string | null;
86760
90112
  }>;
86761
90113
  /**
86762
90114
  * Opaque cursor for the next page: pass it unchanged as page to continue. Null when this is the last page.
@@ -87306,7 +90658,7 @@ export type DeploymentsListResponses = {
87306
90658
  */
87307
90659
  id: string;
87308
90660
  /**
87309
- * Agent reference pinned to a concrete version. The own face also accepts model, permission_mode and cwd overrides for new sessions.
90661
+ * Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
87310
90662
  */
87311
90663
  agent: {
87312
90664
  /**
@@ -87321,6 +90673,14 @@ export type DeploymentsListResponses = {
87321
90673
  * The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified.
87322
90674
  */
87323
90675
  version: number;
90676
+ /**
90677
+ * The version this deployment is pinned to; null when it follows the agent's active version.
90678
+ */
90679
+ pinned_version?: number | null;
90680
+ /**
90681
+ * The agent's currently effective version, the one a run would use now; null when the agent cannot be read.
90682
+ */
90683
+ active_version?: number | null;
87324
90684
  } | {
87325
90685
  /**
87326
90686
  * The `agent` ID.
@@ -87360,7 +90720,7 @@ export type DeploymentsListResponses = {
87360
90720
  speed?: null | 'standard' | 'fast';
87361
90721
  };
87362
90722
  /**
87363
- * The specific `agent` version to use. Omit to use the latest version.
90723
+ * The agent version this deployment uses now; while the deployment follows the agent this is the active version, otherwise the version it is pinned to.
87364
90724
  */
87365
90725
  version: number;
87366
90726
  };
@@ -87490,7 +90850,7 @@ export type DeploymentsCreateData = {
87490
90850
  speed?: null | 'standard' | 'fast';
87491
90851
  };
87492
90852
  /**
87493
- * The specific `agent` version to use. Omit to use the latest version.
90853
+ * Agent version to use; omit it to follow the agent's active version, so each run uses whichever version is in effect then, and name one to pin it.
87494
90854
  */
87495
90855
  version?: number;
87496
90856
  };
@@ -87564,6 +90924,10 @@ export type DeploymentsCreateErrors = {
87564
90924
  * permission_error: the credential's role or bound resources do not allow this operation. Use a key with access to the agent domain and its resources.
87565
90925
  */
87566
90926
  403: AgentError;
90927
+ /**
90928
+ * AGENT_VERSION_NOT_APPLIED: the named version is saved but not applied (apply false), so nothing runs it yet. Apply it first, or omit the version to follow the active one. A version that does not exist answers 404 AGENT_VERSION_NOT_FOUND instead.
90929
+ */
90930
+ 409: AgentError;
87567
90931
  };
87568
90932
  export type DeploymentsCreateError = DeploymentsCreateErrors[keyof DeploymentsCreateErrors];
87569
90933
  export type DeploymentsCreateResponses = {
@@ -87576,7 +90940,7 @@ export type DeploymentsCreateResponses = {
87576
90940
  */
87577
90941
  id: string;
87578
90942
  /**
87579
- * Agent reference pinned to a concrete version. The own face also accepts model, permission_mode and cwd overrides for new sessions.
90943
+ * Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
87580
90944
  */
87581
90945
  agent: {
87582
90946
  /**
@@ -87591,6 +90955,14 @@ export type DeploymentsCreateResponses = {
87591
90955
  * The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified.
87592
90956
  */
87593
90957
  version: number;
90958
+ /**
90959
+ * The version this deployment is pinned to; null when it follows the agent's active version.
90960
+ */
90961
+ pinned_version?: number | null;
90962
+ /**
90963
+ * The agent's currently effective version, the one a run would use now; null when the agent cannot be read.
90964
+ */
90965
+ active_version?: number | null;
87594
90966
  } | {
87595
90967
  /**
87596
90968
  * The `agent` ID.
@@ -87630,7 +91002,7 @@ export type DeploymentsCreateResponses = {
87630
91002
  speed?: null | 'standard' | 'fast';
87631
91003
  };
87632
91004
  /**
87633
- * The specific `agent` version to use. Omit to use the latest version.
91005
+ * The agent version this deployment uses now; while the deployment follows the agent this is the active version, otherwise the version it is pinned to.
87634
91006
  */
87635
91007
  version: number;
87636
91008
  };
@@ -87745,7 +91117,7 @@ export type DeploymentsRetrieveResponses = {
87745
91117
  */
87746
91118
  id: string;
87747
91119
  /**
87748
- * Agent reference pinned to a concrete version. The own face also accepts model, permission_mode and cwd overrides for new sessions.
91120
+ * Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
87749
91121
  */
87750
91122
  agent: {
87751
91123
  /**
@@ -87760,6 +91132,14 @@ export type DeploymentsRetrieveResponses = {
87760
91132
  * The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified.
87761
91133
  */
87762
91134
  version: number;
91135
+ /**
91136
+ * The version this deployment is pinned to; null when it follows the agent's active version.
91137
+ */
91138
+ pinned_version?: number | null;
91139
+ /**
91140
+ * The agent's currently effective version, the one a run would use now; null when the agent cannot be read.
91141
+ */
91142
+ active_version?: number | null;
87763
91143
  } | {
87764
91144
  /**
87765
91145
  * The `agent` ID.
@@ -87799,7 +91179,7 @@ export type DeploymentsRetrieveResponses = {
87799
91179
  speed?: null | 'standard' | 'fast';
87800
91180
  };
87801
91181
  /**
87802
- * The specific `agent` version to use. Omit to use the latest version.
91182
+ * The agent version this deployment uses now; while the deployment follows the agent this is the active version, otherwise the version it is pinned to.
87803
91183
  */
87804
91184
  version: number;
87805
91185
  };
@@ -87924,7 +91304,7 @@ export type DeploymentsUpdateData = {
87924
91304
  speed?: null | 'standard' | 'fast';
87925
91305
  };
87926
91306
  /**
87927
- * The specific `agent` version to use. Omit to use the latest version.
91307
+ * Agent version to use; omit it to follow the agent's active version, so each run uses whichever version is in effect then, and name one to pin it.
87928
91308
  */
87929
91309
  version?: number;
87930
91310
  };
@@ -88010,7 +91390,7 @@ export type DeploymentsUpdateErrors = {
88010
91390
  */
88011
91391
  404: AgentError;
88012
91392
  /**
88013
- * The deployment is archived and cannot be updated.
91393
+ * The deployment is archived and cannot be updated, or the supplied agent version is saved but not applied (AGENT_VERSION_NOT_APPLIED): apply it first, or send only the agent id to follow the active version.
88014
91394
  */
88015
91395
  409: AgentError;
88016
91396
  };
@@ -88025,7 +91405,7 @@ export type DeploymentsUpdateResponses = {
88025
91405
  */
88026
91406
  id: string;
88027
91407
  /**
88028
- * Agent reference pinned to a concrete version. The own face also accepts model, permission_mode and cwd overrides for new sessions.
91408
+ * Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
88029
91409
  */
88030
91410
  agent: {
88031
91411
  /**
@@ -88040,6 +91420,14 @@ export type DeploymentsUpdateResponses = {
88040
91420
  * The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified.
88041
91421
  */
88042
91422
  version: number;
91423
+ /**
91424
+ * The version this deployment is pinned to; null when it follows the agent's active version.
91425
+ */
91426
+ pinned_version?: number | null;
91427
+ /**
91428
+ * The agent's currently effective version, the one a run would use now; null when the agent cannot be read.
91429
+ */
91430
+ active_version?: number | null;
88043
91431
  } | {
88044
91432
  /**
88045
91433
  * The `agent` ID.
@@ -88079,7 +91467,7 @@ export type DeploymentsUpdateResponses = {
88079
91467
  speed?: null | 'standard' | 'fast';
88080
91468
  };
88081
91469
  /**
88082
- * The specific `agent` version to use. Omit to use the latest version.
91470
+ * The agent version this deployment uses now; while the deployment follows the agent this is the active version, otherwise the version it is pinned to.
88083
91471
  */
88084
91472
  version: number;
88085
91473
  };
@@ -88194,7 +91582,7 @@ export type DeploymentsArchiveResponses = {
88194
91582
  */
88195
91583
  id: string;
88196
91584
  /**
88197
- * Agent reference pinned to a concrete version. The own face also accepts model, permission_mode and cwd overrides for new sessions.
91585
+ * Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
88198
91586
  */
88199
91587
  agent: {
88200
91588
  /**
@@ -88209,6 +91597,14 @@ export type DeploymentsArchiveResponses = {
88209
91597
  * The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified.
88210
91598
  */
88211
91599
  version: number;
91600
+ /**
91601
+ * The version this deployment is pinned to; null when it follows the agent's active version.
91602
+ */
91603
+ pinned_version?: number | null;
91604
+ /**
91605
+ * The agent's currently effective version, the one a run would use now; null when the agent cannot be read.
91606
+ */
91607
+ active_version?: number | null;
88212
91608
  } | {
88213
91609
  /**
88214
91610
  * The `agent` ID.
@@ -88248,7 +91644,7 @@ export type DeploymentsArchiveResponses = {
88248
91644
  speed?: null | 'standard' | 'fast';
88249
91645
  };
88250
91646
  /**
88251
- * The specific `agent` version to use. Omit to use the latest version.
91647
+ * The agent version this deployment uses now; while the deployment follows the agent this is the active version, otherwise the version it is pinned to.
88252
91648
  */
88253
91649
  version: number;
88254
91650
  };
@@ -88367,7 +91763,7 @@ export type DeploymentsPauseResponses = {
88367
91763
  */
88368
91764
  id: string;
88369
91765
  /**
88370
- * Agent reference pinned to a concrete version. The own face also accepts model, permission_mode and cwd overrides for new sessions.
91766
+ * Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
88371
91767
  */
88372
91768
  agent: {
88373
91769
  /**
@@ -88382,6 +91778,14 @@ export type DeploymentsPauseResponses = {
88382
91778
  * The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified.
88383
91779
  */
88384
91780
  version: number;
91781
+ /**
91782
+ * The version this deployment is pinned to; null when it follows the agent's active version.
91783
+ */
91784
+ pinned_version?: number | null;
91785
+ /**
91786
+ * The agent's currently effective version, the one a run would use now; null when the agent cannot be read.
91787
+ */
91788
+ active_version?: number | null;
88385
91789
  } | {
88386
91790
  /**
88387
91791
  * The `agent` ID.
@@ -88421,7 +91825,7 @@ export type DeploymentsPauseResponses = {
88421
91825
  speed?: null | 'standard' | 'fast';
88422
91826
  };
88423
91827
  /**
88424
- * The specific `agent` version to use. Omit to use the latest version.
91828
+ * The agent version this deployment uses now; while the deployment follows the agent this is the active version, otherwise the version it is pinned to.
88425
91829
  */
88426
91830
  version: number;
88427
91831
  };
@@ -88540,7 +91944,7 @@ export type DeploymentsUnpauseResponses = {
88540
91944
  */
88541
91945
  id: string;
88542
91946
  /**
88543
- * Agent reference pinned to a concrete version. The own face also accepts model, permission_mode and cwd overrides for new sessions.
91947
+ * Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
88544
91948
  */
88545
91949
  agent: {
88546
91950
  /**
@@ -88555,6 +91959,14 @@ export type DeploymentsUnpauseResponses = {
88555
91959
  * The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified.
88556
91960
  */
88557
91961
  version: number;
91962
+ /**
91963
+ * The version this deployment is pinned to; null when it follows the agent's active version.
91964
+ */
91965
+ pinned_version?: number | null;
91966
+ /**
91967
+ * The agent's currently effective version, the one a run would use now; null when the agent cannot be read.
91968
+ */
91969
+ active_version?: number | null;
88558
91970
  } | {
88559
91971
  /**
88560
91972
  * The `agent` ID.
@@ -88594,7 +92006,7 @@ export type DeploymentsUnpauseResponses = {
88594
92006
  speed?: null | 'standard' | 'fast';
88595
92007
  };
88596
92008
  /**
88597
- * The specific `agent` version to use. Omit to use the latest version.
92009
+ * The agent version this deployment uses now; while the deployment follows the agent this is the active version, otherwise the version it is pinned to.
88598
92010
  */
88599
92011
  version: number;
88600
92012
  };
@@ -110839,7 +114251,7 @@ export type MediaGenerateImageData = {
110839
114251
  model?: string;
110840
114252
  tier?: MediaMediaTier;
110841
114253
  /**
110842
- * Folder the produced asset is filed under; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out.
114254
+ * Folder the produced asset is filed under; when omitted it is 生成/YYYY-MM-DD, the UTC date the job was created. Send an empty string to file it in the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out.
110843
114255
  */
110844
114256
  asset_folder?: string;
110845
114257
  /**
@@ -110995,7 +114407,7 @@ export type MediaGenerateVideoData = {
110995
114407
  model?: string;
110996
114408
  tier?: MediaMediaTier;
110997
114409
  /**
110998
- * Folder the produced asset is filed under; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out.
114410
+ * Folder the produced asset is filed under; when omitted it is 生成/YYYY-MM-DD, the UTC date the job was created. Send an empty string to file it in the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out.
110999
114411
  */
111000
114412
  asset_folder?: string;
111001
114413
  /**