@av-pi-studio/protocol 0.0.98 → 0.0.100

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.
@@ -36,6 +36,7 @@ export declare const SERVER_FEATURES: {
36
36
  readonly extensionPacks: "extensionPacks";
37
37
  readonly providerAuth: "providerAuth";
38
38
  readonly extensionUi: "extensionUi";
39
+ readonly thinkingLevels: "thinkingLevels";
39
40
  };
40
41
  export type ServerFeatureKey = keyof typeof SERVER_FEATURES;
41
42
  export type ServerFeature = (typeof SERVER_FEATURES)[ServerFeatureKey];
@@ -40,6 +40,7 @@ export const SERVER_FEATURES = {
40
40
  extensionPacks: "extensionPacks",
41
41
  providerAuth: "providerAuth",
42
42
  extensionUi: "extensionUi",
43
+ thinkingLevels: "thinkingLevels",
43
44
  };
44
45
  /**
45
46
  * COMPAT annotations for each server feature flag (version added + removal date). The removal dates
@@ -73,6 +74,8 @@ export const SERVER_FEATURE_COMPAT = {
73
74
  providerAuth: COMPAT({ name: "providerAuth", addedIn: "0.0.0", removeBy: "TBD" }),
74
75
  // COMPAT(extensionUi): added 0.0.0, remove by TBD
75
76
  extensionUi: COMPAT({ name: "extensionUi", addedIn: "0.0.0", removeBy: "TBD" }),
77
+ // COMPAT(thinkingLevels): added 0.0.0, remove by TBD
78
+ thinkingLevels: COMPAT({ name: "thinkingLevels", addedIn: "0.0.0", removeBy: "TBD" }),
76
79
  };
77
80
  /**
78
81
  * Returns true only if `flag` is advertised by `caps`. Used at serialization time to gate new wire
@@ -2828,6 +2828,133 @@ export declare const agentCycleModelResponseSchema: z.ZodObject<{
2828
2828
  }, z.ZodTypeAny, "passthrough">>;
2829
2829
  }, z.ZodTypeAny, "passthrough">>;
2830
2830
  export type AgentCycleModelResponse = z.infer<typeof agentCycleModelResponseSchema>;
2831
+ /** Thinking level (set) — sprint-070. `level` is a dynamic string (per-model discovery), not an
2832
+ * enum, matching `agentSessionConfigSchema.thinkingOptionId`'s convention. The response's
2833
+ * `payload.level` is the EFFECTIVE (possibly Pi-clamped) level, never the requested one. */
2834
+ export declare const agentSetThinkingRequestSchema: z.ZodObject<{
2835
+ type: z.ZodLiteral<"agent_set_thinking_request">;
2836
+ requestId: z.ZodString;
2837
+ agentId: z.ZodString;
2838
+ level: z.ZodString;
2839
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2840
+ type: z.ZodLiteral<"agent_set_thinking_request">;
2841
+ requestId: z.ZodString;
2842
+ agentId: z.ZodString;
2843
+ level: z.ZodString;
2844
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2845
+ type: z.ZodLiteral<"agent_set_thinking_request">;
2846
+ requestId: z.ZodString;
2847
+ agentId: z.ZodString;
2848
+ level: z.ZodString;
2849
+ }, z.ZodTypeAny, "passthrough">>;
2850
+ export type AgentSetThinkingRequest = z.infer<typeof agentSetThinkingRequestSchema>;
2851
+ export declare const agentSetThinkingResponseSchema: z.ZodObject<{
2852
+ type: z.ZodLiteral<"agent_set_thinking_response">;
2853
+ requestId: z.ZodString;
2854
+ payload: z.ZodObject<{
2855
+ agentId: z.ZodString;
2856
+ /** Effective level after provider clamping. */
2857
+ level: z.ZodString;
2858
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2859
+ agentId: z.ZodString;
2860
+ /** Effective level after provider clamping. */
2861
+ level: z.ZodString;
2862
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2863
+ agentId: z.ZodString;
2864
+ /** Effective level after provider clamping. */
2865
+ level: z.ZodString;
2866
+ }, z.ZodTypeAny, "passthrough">>;
2867
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2868
+ type: z.ZodLiteral<"agent_set_thinking_response">;
2869
+ requestId: z.ZodString;
2870
+ payload: z.ZodObject<{
2871
+ agentId: z.ZodString;
2872
+ /** Effective level after provider clamping. */
2873
+ level: z.ZodString;
2874
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2875
+ agentId: z.ZodString;
2876
+ /** Effective level after provider clamping. */
2877
+ level: z.ZodString;
2878
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2879
+ agentId: z.ZodString;
2880
+ /** Effective level after provider clamping. */
2881
+ level: z.ZodString;
2882
+ }, z.ZodTypeAny, "passthrough">>;
2883
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2884
+ type: z.ZodLiteral<"agent_set_thinking_response">;
2885
+ requestId: z.ZodString;
2886
+ payload: z.ZodObject<{
2887
+ agentId: z.ZodString;
2888
+ /** Effective level after provider clamping. */
2889
+ level: z.ZodString;
2890
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2891
+ agentId: z.ZodString;
2892
+ /** Effective level after provider clamping. */
2893
+ level: z.ZodString;
2894
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2895
+ agentId: z.ZodString;
2896
+ /** Effective level after provider clamping. */
2897
+ level: z.ZodString;
2898
+ }, z.ZodTypeAny, "passthrough">>;
2899
+ }, z.ZodTypeAny, "passthrough">>;
2900
+ export type AgentSetThinkingResponse = z.infer<typeof agentSetThinkingResponseSchema>;
2901
+ /** Thinking levels (list) — sprint-070. Live sessions only; drafts answer from the model
2902
+ * catalogue client-side (features/thinking-level-selector.md § Level discovery). */
2903
+ export declare const agentThinkingLevelsRequestSchema: z.ZodObject<{
2904
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
2905
+ requestId: z.ZodString;
2906
+ agentId: z.ZodString;
2907
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2908
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
2909
+ requestId: z.ZodString;
2910
+ agentId: z.ZodString;
2911
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2912
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
2913
+ requestId: z.ZodString;
2914
+ agentId: z.ZodString;
2915
+ }, z.ZodTypeAny, "passthrough">>;
2916
+ export type AgentThinkingLevelsRequest = z.infer<typeof agentThinkingLevelsRequestSchema>;
2917
+ export declare const agentThinkingLevelsResponseSchema: z.ZodObject<{
2918
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
2919
+ requestId: z.ZodString;
2920
+ payload: z.ZodObject<{
2921
+ agentId: z.ZodString;
2922
+ levels: z.ZodArray<z.ZodString, "many">;
2923
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2924
+ agentId: z.ZodString;
2925
+ levels: z.ZodArray<z.ZodString, "many">;
2926
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2927
+ agentId: z.ZodString;
2928
+ levels: z.ZodArray<z.ZodString, "many">;
2929
+ }, z.ZodTypeAny, "passthrough">>;
2930
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2931
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
2932
+ requestId: z.ZodString;
2933
+ payload: z.ZodObject<{
2934
+ agentId: z.ZodString;
2935
+ levels: z.ZodArray<z.ZodString, "many">;
2936
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2937
+ agentId: z.ZodString;
2938
+ levels: z.ZodArray<z.ZodString, "many">;
2939
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2940
+ agentId: z.ZodString;
2941
+ levels: z.ZodArray<z.ZodString, "many">;
2942
+ }, z.ZodTypeAny, "passthrough">>;
2943
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2944
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
2945
+ requestId: z.ZodString;
2946
+ payload: z.ZodObject<{
2947
+ agentId: z.ZodString;
2948
+ levels: z.ZodArray<z.ZodString, "many">;
2949
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2950
+ agentId: z.ZodString;
2951
+ levels: z.ZodArray<z.ZodString, "many">;
2952
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2953
+ agentId: z.ZodString;
2954
+ levels: z.ZodArray<z.ZodString, "many">;
2955
+ }, z.ZodTypeAny, "passthrough">>;
2956
+ }, z.ZodTypeAny, "passthrough">>;
2957
+ export type AgentThinkingLevelsResponse = z.infer<typeof agentThinkingLevelsResponseSchema>;
2831
2958
  /** `/copy` — mirrors Pi RPC `get_last_assistant_text`. */
2832
2959
  export declare const agentLastAssistantTextRequestSchema: z.ZodObject<{
2833
2960
  type: z.ZodLiteral<"agent_last_assistant_text_request">;
@@ -9022,6 +9149,120 @@ export declare const sessionMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
9022
9149
  thinkingLevel: z.ZodOptional<z.ZodString>;
9023
9150
  isScoped: z.ZodOptional<z.ZodBoolean>;
9024
9151
  }, z.ZodTypeAny, "passthrough">>;
9152
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
9153
+ type: z.ZodLiteral<"agent_set_thinking_request">;
9154
+ requestId: z.ZodString;
9155
+ agentId: z.ZodString;
9156
+ level: z.ZodString;
9157
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9158
+ type: z.ZodLiteral<"agent_set_thinking_request">;
9159
+ requestId: z.ZodString;
9160
+ agentId: z.ZodString;
9161
+ level: z.ZodString;
9162
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9163
+ type: z.ZodLiteral<"agent_set_thinking_request">;
9164
+ requestId: z.ZodString;
9165
+ agentId: z.ZodString;
9166
+ level: z.ZodString;
9167
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
9168
+ type: z.ZodLiteral<"agent_set_thinking_response">;
9169
+ requestId: z.ZodString;
9170
+ payload: z.ZodObject<{
9171
+ agentId: z.ZodString;
9172
+ /** Effective level after provider clamping. */
9173
+ level: z.ZodString;
9174
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9175
+ agentId: z.ZodString;
9176
+ /** Effective level after provider clamping. */
9177
+ level: z.ZodString;
9178
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9179
+ agentId: z.ZodString;
9180
+ /** Effective level after provider clamping. */
9181
+ level: z.ZodString;
9182
+ }, z.ZodTypeAny, "passthrough">>;
9183
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9184
+ type: z.ZodLiteral<"agent_set_thinking_response">;
9185
+ requestId: z.ZodString;
9186
+ payload: z.ZodObject<{
9187
+ agentId: z.ZodString;
9188
+ /** Effective level after provider clamping. */
9189
+ level: z.ZodString;
9190
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9191
+ agentId: z.ZodString;
9192
+ /** Effective level after provider clamping. */
9193
+ level: z.ZodString;
9194
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9195
+ agentId: z.ZodString;
9196
+ /** Effective level after provider clamping. */
9197
+ level: z.ZodString;
9198
+ }, z.ZodTypeAny, "passthrough">>;
9199
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9200
+ type: z.ZodLiteral<"agent_set_thinking_response">;
9201
+ requestId: z.ZodString;
9202
+ payload: z.ZodObject<{
9203
+ agentId: z.ZodString;
9204
+ /** Effective level after provider clamping. */
9205
+ level: z.ZodString;
9206
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9207
+ agentId: z.ZodString;
9208
+ /** Effective level after provider clamping. */
9209
+ level: z.ZodString;
9210
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9211
+ agentId: z.ZodString;
9212
+ /** Effective level after provider clamping. */
9213
+ level: z.ZodString;
9214
+ }, z.ZodTypeAny, "passthrough">>;
9215
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
9216
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
9217
+ requestId: z.ZodString;
9218
+ agentId: z.ZodString;
9219
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9220
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
9221
+ requestId: z.ZodString;
9222
+ agentId: z.ZodString;
9223
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9224
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
9225
+ requestId: z.ZodString;
9226
+ agentId: z.ZodString;
9227
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
9228
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
9229
+ requestId: z.ZodString;
9230
+ payload: z.ZodObject<{
9231
+ agentId: z.ZodString;
9232
+ levels: z.ZodArray<z.ZodString, "many">;
9233
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9234
+ agentId: z.ZodString;
9235
+ levels: z.ZodArray<z.ZodString, "many">;
9236
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9237
+ agentId: z.ZodString;
9238
+ levels: z.ZodArray<z.ZodString, "many">;
9239
+ }, z.ZodTypeAny, "passthrough">>;
9240
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9241
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
9242
+ requestId: z.ZodString;
9243
+ payload: z.ZodObject<{
9244
+ agentId: z.ZodString;
9245
+ levels: z.ZodArray<z.ZodString, "many">;
9246
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9247
+ agentId: z.ZodString;
9248
+ levels: z.ZodArray<z.ZodString, "many">;
9249
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9250
+ agentId: z.ZodString;
9251
+ levels: z.ZodArray<z.ZodString, "many">;
9252
+ }, z.ZodTypeAny, "passthrough">>;
9253
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9254
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
9255
+ requestId: z.ZodString;
9256
+ payload: z.ZodObject<{
9257
+ agentId: z.ZodString;
9258
+ levels: z.ZodArray<z.ZodString, "many">;
9259
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9260
+ agentId: z.ZodString;
9261
+ levels: z.ZodArray<z.ZodString, "many">;
9262
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9263
+ agentId: z.ZodString;
9264
+ levels: z.ZodArray<z.ZodString, "many">;
9265
+ }, z.ZodTypeAny, "passthrough">>;
9025
9266
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
9026
9267
  type: z.ZodLiteral<"agent_last_assistant_text_request">;
9027
9268
  requestId: z.ZodString;
@@ -14541,6 +14782,120 @@ export declare const sessionEnvelopeSchema: z.ZodObject<{
14541
14782
  thinkingLevel: z.ZodOptional<z.ZodString>;
14542
14783
  isScoped: z.ZodOptional<z.ZodBoolean>;
14543
14784
  }, z.ZodTypeAny, "passthrough">>;
14785
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
14786
+ type: z.ZodLiteral<"agent_set_thinking_request">;
14787
+ requestId: z.ZodString;
14788
+ agentId: z.ZodString;
14789
+ level: z.ZodString;
14790
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14791
+ type: z.ZodLiteral<"agent_set_thinking_request">;
14792
+ requestId: z.ZodString;
14793
+ agentId: z.ZodString;
14794
+ level: z.ZodString;
14795
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14796
+ type: z.ZodLiteral<"agent_set_thinking_request">;
14797
+ requestId: z.ZodString;
14798
+ agentId: z.ZodString;
14799
+ level: z.ZodString;
14800
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
14801
+ type: z.ZodLiteral<"agent_set_thinking_response">;
14802
+ requestId: z.ZodString;
14803
+ payload: z.ZodObject<{
14804
+ agentId: z.ZodString;
14805
+ /** Effective level after provider clamping. */
14806
+ level: z.ZodString;
14807
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14808
+ agentId: z.ZodString;
14809
+ /** Effective level after provider clamping. */
14810
+ level: z.ZodString;
14811
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14812
+ agentId: z.ZodString;
14813
+ /** Effective level after provider clamping. */
14814
+ level: z.ZodString;
14815
+ }, z.ZodTypeAny, "passthrough">>;
14816
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14817
+ type: z.ZodLiteral<"agent_set_thinking_response">;
14818
+ requestId: z.ZodString;
14819
+ payload: z.ZodObject<{
14820
+ agentId: z.ZodString;
14821
+ /** Effective level after provider clamping. */
14822
+ level: z.ZodString;
14823
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14824
+ agentId: z.ZodString;
14825
+ /** Effective level after provider clamping. */
14826
+ level: z.ZodString;
14827
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14828
+ agentId: z.ZodString;
14829
+ /** Effective level after provider clamping. */
14830
+ level: z.ZodString;
14831
+ }, z.ZodTypeAny, "passthrough">>;
14832
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14833
+ type: z.ZodLiteral<"agent_set_thinking_response">;
14834
+ requestId: z.ZodString;
14835
+ payload: z.ZodObject<{
14836
+ agentId: z.ZodString;
14837
+ /** Effective level after provider clamping. */
14838
+ level: z.ZodString;
14839
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14840
+ agentId: z.ZodString;
14841
+ /** Effective level after provider clamping. */
14842
+ level: z.ZodString;
14843
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14844
+ agentId: z.ZodString;
14845
+ /** Effective level after provider clamping. */
14846
+ level: z.ZodString;
14847
+ }, z.ZodTypeAny, "passthrough">>;
14848
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
14849
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
14850
+ requestId: z.ZodString;
14851
+ agentId: z.ZodString;
14852
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14853
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
14854
+ requestId: z.ZodString;
14855
+ agentId: z.ZodString;
14856
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14857
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
14858
+ requestId: z.ZodString;
14859
+ agentId: z.ZodString;
14860
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
14861
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
14862
+ requestId: z.ZodString;
14863
+ payload: z.ZodObject<{
14864
+ agentId: z.ZodString;
14865
+ levels: z.ZodArray<z.ZodString, "many">;
14866
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14867
+ agentId: z.ZodString;
14868
+ levels: z.ZodArray<z.ZodString, "many">;
14869
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14870
+ agentId: z.ZodString;
14871
+ levels: z.ZodArray<z.ZodString, "many">;
14872
+ }, z.ZodTypeAny, "passthrough">>;
14873
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14874
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
14875
+ requestId: z.ZodString;
14876
+ payload: z.ZodObject<{
14877
+ agentId: z.ZodString;
14878
+ levels: z.ZodArray<z.ZodString, "many">;
14879
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14880
+ agentId: z.ZodString;
14881
+ levels: z.ZodArray<z.ZodString, "many">;
14882
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14883
+ agentId: z.ZodString;
14884
+ levels: z.ZodArray<z.ZodString, "many">;
14885
+ }, z.ZodTypeAny, "passthrough">>;
14886
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14887
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
14888
+ requestId: z.ZodString;
14889
+ payload: z.ZodObject<{
14890
+ agentId: z.ZodString;
14891
+ levels: z.ZodArray<z.ZodString, "many">;
14892
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14893
+ agentId: z.ZodString;
14894
+ levels: z.ZodArray<z.ZodString, "many">;
14895
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14896
+ agentId: z.ZodString;
14897
+ levels: z.ZodArray<z.ZodString, "many">;
14898
+ }, z.ZodTypeAny, "passthrough">>;
14544
14899
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
14545
14900
  type: z.ZodLiteral<"agent_last_assistant_text_request">;
14546
14901
  requestId: z.ZodString;
@@ -18562,6 +18917,44 @@ export declare const sessionEnvelopeSchema: z.ZodObject<{
18562
18917
  thinkingLevel: z.ZodOptional<z.ZodString>;
18563
18918
  isScoped: z.ZodOptional<z.ZodBoolean>;
18564
18919
  }, z.ZodTypeAny, "passthrough">>;
18920
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
18921
+ type: z.ZodLiteral<"agent_set_thinking_request">;
18922
+ requestId: z.ZodString;
18923
+ agentId: z.ZodString;
18924
+ level: z.ZodString;
18925
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
18926
+ type: z.ZodLiteral<"agent_set_thinking_response">;
18927
+ requestId: z.ZodString;
18928
+ payload: z.ZodObject<{
18929
+ agentId: z.ZodString;
18930
+ /** Effective level after provider clamping. */
18931
+ level: z.ZodString;
18932
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
18933
+ agentId: z.ZodString;
18934
+ /** Effective level after provider clamping. */
18935
+ level: z.ZodString;
18936
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
18937
+ agentId: z.ZodString;
18938
+ /** Effective level after provider clamping. */
18939
+ level: z.ZodString;
18940
+ }, z.ZodTypeAny, "passthrough">>;
18941
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
18942
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
18943
+ requestId: z.ZodString;
18944
+ agentId: z.ZodString;
18945
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
18946
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
18947
+ requestId: z.ZodString;
18948
+ payload: z.ZodObject<{
18949
+ agentId: z.ZodString;
18950
+ levels: z.ZodArray<z.ZodString, "many">;
18951
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
18952
+ agentId: z.ZodString;
18953
+ levels: z.ZodArray<z.ZodString, "many">;
18954
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
18955
+ agentId: z.ZodString;
18956
+ levels: z.ZodArray<z.ZodString, "many">;
18957
+ }, z.ZodTypeAny, "passthrough">>;
18565
18958
  }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
18566
18959
  type: z.ZodLiteral<"agent_last_assistant_text_request">;
18567
18960
  requestId: z.ZodString;
@@ -20285,6 +20678,44 @@ export declare const sessionEnvelopeSchema: z.ZodObject<{
20285
20678
  thinkingLevel: z.ZodOptional<z.ZodString>;
20286
20679
  isScoped: z.ZodOptional<z.ZodBoolean>;
20287
20680
  }, z.ZodTypeAny, "passthrough">>;
20681
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
20682
+ type: z.ZodLiteral<"agent_set_thinking_request">;
20683
+ requestId: z.ZodString;
20684
+ agentId: z.ZodString;
20685
+ level: z.ZodString;
20686
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
20687
+ type: z.ZodLiteral<"agent_set_thinking_response">;
20688
+ requestId: z.ZodString;
20689
+ payload: z.ZodObject<{
20690
+ agentId: z.ZodString;
20691
+ /** Effective level after provider clamping. */
20692
+ level: z.ZodString;
20693
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
20694
+ agentId: z.ZodString;
20695
+ /** Effective level after provider clamping. */
20696
+ level: z.ZodString;
20697
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
20698
+ agentId: z.ZodString;
20699
+ /** Effective level after provider clamping. */
20700
+ level: z.ZodString;
20701
+ }, z.ZodTypeAny, "passthrough">>;
20702
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
20703
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
20704
+ requestId: z.ZodString;
20705
+ agentId: z.ZodString;
20706
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
20707
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
20708
+ requestId: z.ZodString;
20709
+ payload: z.ZodObject<{
20710
+ agentId: z.ZodString;
20711
+ levels: z.ZodArray<z.ZodString, "many">;
20712
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
20713
+ agentId: z.ZodString;
20714
+ levels: z.ZodArray<z.ZodString, "many">;
20715
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
20716
+ agentId: z.ZodString;
20717
+ levels: z.ZodArray<z.ZodString, "many">;
20718
+ }, z.ZodTypeAny, "passthrough">>;
20288
20719
  }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
20289
20720
  type: z.ZodLiteral<"agent_last_assistant_text_request">;
20290
20721
  requestId: z.ZodString;
@@ -23591,6 +24022,120 @@ export declare const topLevelEnvelopeSchema: z.ZodDiscriminatedUnion<"type", [z.
23591
24022
  thinkingLevel: z.ZodOptional<z.ZodString>;
23592
24023
  isScoped: z.ZodOptional<z.ZodBoolean>;
23593
24024
  }, z.ZodTypeAny, "passthrough">>;
24025
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
24026
+ type: z.ZodLiteral<"agent_set_thinking_request">;
24027
+ requestId: z.ZodString;
24028
+ agentId: z.ZodString;
24029
+ level: z.ZodString;
24030
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24031
+ type: z.ZodLiteral<"agent_set_thinking_request">;
24032
+ requestId: z.ZodString;
24033
+ agentId: z.ZodString;
24034
+ level: z.ZodString;
24035
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24036
+ type: z.ZodLiteral<"agent_set_thinking_request">;
24037
+ requestId: z.ZodString;
24038
+ agentId: z.ZodString;
24039
+ level: z.ZodString;
24040
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
24041
+ type: z.ZodLiteral<"agent_set_thinking_response">;
24042
+ requestId: z.ZodString;
24043
+ payload: z.ZodObject<{
24044
+ agentId: z.ZodString;
24045
+ /** Effective level after provider clamping. */
24046
+ level: z.ZodString;
24047
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24048
+ agentId: z.ZodString;
24049
+ /** Effective level after provider clamping. */
24050
+ level: z.ZodString;
24051
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24052
+ agentId: z.ZodString;
24053
+ /** Effective level after provider clamping. */
24054
+ level: z.ZodString;
24055
+ }, z.ZodTypeAny, "passthrough">>;
24056
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24057
+ type: z.ZodLiteral<"agent_set_thinking_response">;
24058
+ requestId: z.ZodString;
24059
+ payload: z.ZodObject<{
24060
+ agentId: z.ZodString;
24061
+ /** Effective level after provider clamping. */
24062
+ level: z.ZodString;
24063
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24064
+ agentId: z.ZodString;
24065
+ /** Effective level after provider clamping. */
24066
+ level: z.ZodString;
24067
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24068
+ agentId: z.ZodString;
24069
+ /** Effective level after provider clamping. */
24070
+ level: z.ZodString;
24071
+ }, z.ZodTypeAny, "passthrough">>;
24072
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24073
+ type: z.ZodLiteral<"agent_set_thinking_response">;
24074
+ requestId: z.ZodString;
24075
+ payload: z.ZodObject<{
24076
+ agentId: z.ZodString;
24077
+ /** Effective level after provider clamping. */
24078
+ level: z.ZodString;
24079
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24080
+ agentId: z.ZodString;
24081
+ /** Effective level after provider clamping. */
24082
+ level: z.ZodString;
24083
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24084
+ agentId: z.ZodString;
24085
+ /** Effective level after provider clamping. */
24086
+ level: z.ZodString;
24087
+ }, z.ZodTypeAny, "passthrough">>;
24088
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
24089
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
24090
+ requestId: z.ZodString;
24091
+ agentId: z.ZodString;
24092
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24093
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
24094
+ requestId: z.ZodString;
24095
+ agentId: z.ZodString;
24096
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24097
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
24098
+ requestId: z.ZodString;
24099
+ agentId: z.ZodString;
24100
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
24101
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
24102
+ requestId: z.ZodString;
24103
+ payload: z.ZodObject<{
24104
+ agentId: z.ZodString;
24105
+ levels: z.ZodArray<z.ZodString, "many">;
24106
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24107
+ agentId: z.ZodString;
24108
+ levels: z.ZodArray<z.ZodString, "many">;
24109
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24110
+ agentId: z.ZodString;
24111
+ levels: z.ZodArray<z.ZodString, "many">;
24112
+ }, z.ZodTypeAny, "passthrough">>;
24113
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24114
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
24115
+ requestId: z.ZodString;
24116
+ payload: z.ZodObject<{
24117
+ agentId: z.ZodString;
24118
+ levels: z.ZodArray<z.ZodString, "many">;
24119
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24120
+ agentId: z.ZodString;
24121
+ levels: z.ZodArray<z.ZodString, "many">;
24122
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24123
+ agentId: z.ZodString;
24124
+ levels: z.ZodArray<z.ZodString, "many">;
24125
+ }, z.ZodTypeAny, "passthrough">>;
24126
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24127
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
24128
+ requestId: z.ZodString;
24129
+ payload: z.ZodObject<{
24130
+ agentId: z.ZodString;
24131
+ levels: z.ZodArray<z.ZodString, "many">;
24132
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24133
+ agentId: z.ZodString;
24134
+ levels: z.ZodArray<z.ZodString, "many">;
24135
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
24136
+ agentId: z.ZodString;
24137
+ levels: z.ZodArray<z.ZodString, "many">;
24138
+ }, z.ZodTypeAny, "passthrough">>;
23594
24139
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
23595
24140
  type: z.ZodLiteral<"agent_last_assistant_text_request">;
23596
24141
  requestId: z.ZodString;
@@ -27612,6 +28157,44 @@ export declare const topLevelEnvelopeSchema: z.ZodDiscriminatedUnion<"type", [z.
27612
28157
  thinkingLevel: z.ZodOptional<z.ZodString>;
27613
28158
  isScoped: z.ZodOptional<z.ZodBoolean>;
27614
28159
  }, z.ZodTypeAny, "passthrough">>;
28160
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
28161
+ type: z.ZodLiteral<"agent_set_thinking_request">;
28162
+ requestId: z.ZodString;
28163
+ agentId: z.ZodString;
28164
+ level: z.ZodString;
28165
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
28166
+ type: z.ZodLiteral<"agent_set_thinking_response">;
28167
+ requestId: z.ZodString;
28168
+ payload: z.ZodObject<{
28169
+ agentId: z.ZodString;
28170
+ /** Effective level after provider clamping. */
28171
+ level: z.ZodString;
28172
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
28173
+ agentId: z.ZodString;
28174
+ /** Effective level after provider clamping. */
28175
+ level: z.ZodString;
28176
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
28177
+ agentId: z.ZodString;
28178
+ /** Effective level after provider clamping. */
28179
+ level: z.ZodString;
28180
+ }, z.ZodTypeAny, "passthrough">>;
28181
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
28182
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
28183
+ requestId: z.ZodString;
28184
+ agentId: z.ZodString;
28185
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
28186
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
28187
+ requestId: z.ZodString;
28188
+ payload: z.ZodObject<{
28189
+ agentId: z.ZodString;
28190
+ levels: z.ZodArray<z.ZodString, "many">;
28191
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
28192
+ agentId: z.ZodString;
28193
+ levels: z.ZodArray<z.ZodString, "many">;
28194
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
28195
+ agentId: z.ZodString;
28196
+ levels: z.ZodArray<z.ZodString, "many">;
28197
+ }, z.ZodTypeAny, "passthrough">>;
27615
28198
  }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
27616
28199
  type: z.ZodLiteral<"agent_last_assistant_text_request">;
27617
28200
  requestId: z.ZodString;
@@ -29335,6 +29918,44 @@ export declare const topLevelEnvelopeSchema: z.ZodDiscriminatedUnion<"type", [z.
29335
29918
  thinkingLevel: z.ZodOptional<z.ZodString>;
29336
29919
  isScoped: z.ZodOptional<z.ZodBoolean>;
29337
29920
  }, z.ZodTypeAny, "passthrough">>;
29921
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
29922
+ type: z.ZodLiteral<"agent_set_thinking_request">;
29923
+ requestId: z.ZodString;
29924
+ agentId: z.ZodString;
29925
+ level: z.ZodString;
29926
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
29927
+ type: z.ZodLiteral<"agent_set_thinking_response">;
29928
+ requestId: z.ZodString;
29929
+ payload: z.ZodObject<{
29930
+ agentId: z.ZodString;
29931
+ /** Effective level after provider clamping. */
29932
+ level: z.ZodString;
29933
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
29934
+ agentId: z.ZodString;
29935
+ /** Effective level after provider clamping. */
29936
+ level: z.ZodString;
29937
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
29938
+ agentId: z.ZodString;
29939
+ /** Effective level after provider clamping. */
29940
+ level: z.ZodString;
29941
+ }, z.ZodTypeAny, "passthrough">>;
29942
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
29943
+ type: z.ZodLiteral<"agent_thinking_levels_request">;
29944
+ requestId: z.ZodString;
29945
+ agentId: z.ZodString;
29946
+ }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
29947
+ type: z.ZodLiteral<"agent_thinking_levels_response">;
29948
+ requestId: z.ZodString;
29949
+ payload: z.ZodObject<{
29950
+ agentId: z.ZodString;
29951
+ levels: z.ZodArray<z.ZodString, "many">;
29952
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
29953
+ agentId: z.ZodString;
29954
+ levels: z.ZodArray<z.ZodString, "many">;
29955
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
29956
+ agentId: z.ZodString;
29957
+ levels: z.ZodArray<z.ZodString, "many">;
29958
+ }, z.ZodTypeAny, "passthrough">>;
29338
29959
  }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
29339
29960
  type: z.ZodLiteral<"agent_last_assistant_text_request">;
29340
29961
  requestId: z.ZodString;
package/dist/messages.js CHANGED
@@ -576,6 +576,51 @@ export const agentCycleModelResponseSchema = z
576
576
  .passthrough(),
577
577
  })
578
578
  .passthrough();
579
+ /** Thinking level (set) — sprint-070. `level` is a dynamic string (per-model discovery), not an
580
+ * enum, matching `agentSessionConfigSchema.thinkingOptionId`'s convention. The response's
581
+ * `payload.level` is the EFFECTIVE (possibly Pi-clamped) level, never the requested one. */
582
+ export const agentSetThinkingRequestSchema = z
583
+ .object({
584
+ type: z.literal("agent_set_thinking_request"),
585
+ requestId: z.string(),
586
+ agentId: z.string(),
587
+ level: z.string(),
588
+ })
589
+ .passthrough();
590
+ export const agentSetThinkingResponseSchema = z
591
+ .object({
592
+ type: z.literal("agent_set_thinking_response"),
593
+ requestId: z.string(),
594
+ payload: z
595
+ .object({
596
+ agentId: z.string(),
597
+ /** Effective level after provider clamping. */
598
+ level: z.string(),
599
+ })
600
+ .passthrough(),
601
+ })
602
+ .passthrough();
603
+ /** Thinking levels (list) — sprint-070. Live sessions only; drafts answer from the model
604
+ * catalogue client-side (features/thinking-level-selector.md § Level discovery). */
605
+ export const agentThinkingLevelsRequestSchema = z
606
+ .object({
607
+ type: z.literal("agent_thinking_levels_request"),
608
+ requestId: z.string(),
609
+ agentId: z.string(),
610
+ })
611
+ .passthrough();
612
+ export const agentThinkingLevelsResponseSchema = z
613
+ .object({
614
+ type: z.literal("agent_thinking_levels_response"),
615
+ requestId: z.string(),
616
+ payload: z
617
+ .object({
618
+ agentId: z.string(),
619
+ levels: z.array(z.string()),
620
+ })
621
+ .passthrough(),
622
+ })
623
+ .passthrough();
579
624
  /** `/copy` — mirrors Pi RPC `get_last_assistant_text`. */
580
625
  export const agentLastAssistantTextRequestSchema = z
581
626
  .object({
@@ -1079,6 +1124,10 @@ export const sessionMessageSchema = z.discriminatedUnion("type", [
1079
1124
  agentSetModelResponseSchema,
1080
1125
  agentCycleModelRequestSchema,
1081
1126
  agentCycleModelResponseSchema,
1127
+ agentSetThinkingRequestSchema,
1128
+ agentSetThinkingResponseSchema,
1129
+ agentThinkingLevelsRequestSchema,
1130
+ agentThinkingLevelsResponseSchema,
1082
1131
  agentLastAssistantTextRequestSchema,
1083
1132
  agentLastAssistantTextResponseSchema,
1084
1133
  steerAgentRequestSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@av-pi-studio/protocol",
3
- "version": "0.0.98",
3
+ "version": "0.0.100",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.map",