@agent-phonon/protocol 0.2.10 → 0.3.0

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.
@@ -3810,6 +3810,822 @@ export declare const METHODS: {
3810
3810
  }[];
3811
3811
  }>;
3812
3812
  };
3813
+ readonly "skill.dirs": {
3814
+ readonly direction: "s2p";
3815
+ readonly kind: "request";
3816
+ readonly params: z.ZodObject<{
3817
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
3818
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3819
+ scope: z.ZodOptional<z.ZodEnum<["global", "project"]>>;
3820
+ }, "strip", z.ZodTypeAny, {
3821
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3822
+ scope?: "project" | "global" | undefined;
3823
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3824
+ }, {
3825
+ agent?: string | undefined;
3826
+ scope?: "project" | "global" | undefined;
3827
+ projectId?: string | undefined;
3828
+ }>;
3829
+ readonly result: z.ZodObject<{
3830
+ directories: z.ZodArray<z.ZodObject<{
3831
+ name: z.ZodString;
3832
+ scope: z.ZodEnum<["global", "project"]>;
3833
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
3834
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3835
+ rootPath: z.ZodString;
3836
+ path: z.ZodString;
3837
+ exists: z.ZodBoolean;
3838
+ }, "strip", z.ZodTypeAny, {
3839
+ path: string;
3840
+ name: string;
3841
+ scope: "project" | "global";
3842
+ rootPath: string;
3843
+ exists: boolean;
3844
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3845
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3846
+ }, {
3847
+ path: string;
3848
+ name: string;
3849
+ scope: "project" | "global";
3850
+ rootPath: string;
3851
+ exists: boolean;
3852
+ agent?: string | undefined;
3853
+ projectId?: string | undefined;
3854
+ }>, "many">;
3855
+ }, "strip", z.ZodTypeAny, {
3856
+ directories: {
3857
+ path: string;
3858
+ name: string;
3859
+ scope: "project" | "global";
3860
+ rootPath: string;
3861
+ exists: boolean;
3862
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3863
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3864
+ }[];
3865
+ }, {
3866
+ directories: {
3867
+ path: string;
3868
+ name: string;
3869
+ scope: "project" | "global";
3870
+ rootPath: string;
3871
+ exists: boolean;
3872
+ agent?: string | undefined;
3873
+ projectId?: string | undefined;
3874
+ }[];
3875
+ }>;
3876
+ };
3877
+ readonly "workflow.run": {
3878
+ readonly direction: "s2p";
3879
+ readonly kind: "request";
3880
+ readonly params: z.ZodObject<{
3881
+ project: z.ZodBranded<z.ZodString, "ProjectId">;
3882
+ worktreeId: z.ZodOptional<z.ZodString>;
3883
+ plan: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
3884
+ mode: z.ZodLiteral<"dag">;
3885
+ nodes: z.ZodArray<z.ZodObject<{
3886
+ nodeId: z.ZodString;
3887
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
3888
+ model: z.ZodString;
3889
+ role: z.ZodOptional<z.ZodString>;
3890
+ input: z.ZodOptional<z.ZodString>;
3891
+ systemPrompt: z.ZodOptional<z.ZodString>;
3892
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3893
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
3894
+ agentConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3895
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3896
+ }, "strip", z.ZodTypeAny, {
3897
+ agent: string & z.BRAND<"AgentId">;
3898
+ model: string;
3899
+ nodeId: string;
3900
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
3901
+ role?: string | undefined;
3902
+ agentConfig?: Record<string, unknown> | undefined;
3903
+ input?: string | undefined;
3904
+ systemPrompt?: string | undefined;
3905
+ dependsOn?: string[] | undefined;
3906
+ metadata?: Record<string, unknown> | undefined;
3907
+ }, {
3908
+ agent: string;
3909
+ model: string;
3910
+ nodeId: string;
3911
+ sessionId?: string | undefined;
3912
+ role?: string | undefined;
3913
+ agentConfig?: Record<string, unknown> | undefined;
3914
+ input?: string | undefined;
3915
+ systemPrompt?: string | undefined;
3916
+ dependsOn?: string[] | undefined;
3917
+ metadata?: Record<string, unknown> | undefined;
3918
+ }>, "many">;
3919
+ edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
3920
+ edgeId: z.ZodOptional<z.ZodString>;
3921
+ from: z.ZodString;
3922
+ to: z.ZodString;
3923
+ label: z.ZodOptional<z.ZodString>;
3924
+ condition: z.ZodOptional<z.ZodString>;
3925
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3926
+ }, "strip", z.ZodTypeAny, {
3927
+ from: string;
3928
+ to: string;
3929
+ label?: string | undefined;
3930
+ metadata?: Record<string, unknown> | undefined;
3931
+ edgeId?: string | undefined;
3932
+ condition?: string | undefined;
3933
+ }, {
3934
+ from: string;
3935
+ to: string;
3936
+ label?: string | undefined;
3937
+ metadata?: Record<string, unknown> | undefined;
3938
+ edgeId?: string | undefined;
3939
+ condition?: string | undefined;
3940
+ }>, "many">>;
3941
+ finalNodeId: z.ZodOptional<z.ZodString>;
3942
+ }, "strip", z.ZodTypeAny, {
3943
+ mode: "dag";
3944
+ nodes: {
3945
+ agent: string & z.BRAND<"AgentId">;
3946
+ model: string;
3947
+ nodeId: string;
3948
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
3949
+ role?: string | undefined;
3950
+ agentConfig?: Record<string, unknown> | undefined;
3951
+ input?: string | undefined;
3952
+ systemPrompt?: string | undefined;
3953
+ dependsOn?: string[] | undefined;
3954
+ metadata?: Record<string, unknown> | undefined;
3955
+ }[];
3956
+ edges?: {
3957
+ from: string;
3958
+ to: string;
3959
+ label?: string | undefined;
3960
+ metadata?: Record<string, unknown> | undefined;
3961
+ edgeId?: string | undefined;
3962
+ condition?: string | undefined;
3963
+ }[] | undefined;
3964
+ finalNodeId?: string | undefined;
3965
+ }, {
3966
+ mode: "dag";
3967
+ nodes: {
3968
+ agent: string;
3969
+ model: string;
3970
+ nodeId: string;
3971
+ sessionId?: string | undefined;
3972
+ role?: string | undefined;
3973
+ agentConfig?: Record<string, unknown> | undefined;
3974
+ input?: string | undefined;
3975
+ systemPrompt?: string | undefined;
3976
+ dependsOn?: string[] | undefined;
3977
+ metadata?: Record<string, unknown> | undefined;
3978
+ }[];
3979
+ edges?: {
3980
+ from: string;
3981
+ to: string;
3982
+ label?: string | undefined;
3983
+ metadata?: Record<string, unknown> | undefined;
3984
+ edgeId?: string | undefined;
3985
+ condition?: string | undefined;
3986
+ }[] | undefined;
3987
+ finalNodeId?: string | undefined;
3988
+ }>, z.ZodObject<{
3989
+ mode: z.ZodLiteral<"graph">;
3990
+ executor: z.ZodObject<{
3991
+ nodeId: z.ZodString;
3992
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
3993
+ model: z.ZodString;
3994
+ role: z.ZodDefault<z.ZodLiteral<"executor">>;
3995
+ systemPrompt: z.ZodOptional<z.ZodString>;
3996
+ agentConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3997
+ }, "strip", z.ZodTypeAny, {
3998
+ agent: string & z.BRAND<"AgentId">;
3999
+ role: "executor";
4000
+ model: string;
4001
+ nodeId: string;
4002
+ agentConfig?: Record<string, unknown> | undefined;
4003
+ systemPrompt?: string | undefined;
4004
+ }, {
4005
+ agent: string;
4006
+ model: string;
4007
+ nodeId: string;
4008
+ role?: "executor" | undefined;
4009
+ agentConfig?: Record<string, unknown> | undefined;
4010
+ systemPrompt?: string | undefined;
4011
+ }>;
4012
+ workers: z.ZodArray<z.ZodObject<{
4013
+ nodeId: z.ZodString;
4014
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
4015
+ model: z.ZodString;
4016
+ role: z.ZodOptional<z.ZodString>;
4017
+ input: z.ZodOptional<z.ZodString>;
4018
+ systemPrompt: z.ZodOptional<z.ZodString>;
4019
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4020
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
4021
+ agentConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4022
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4023
+ }, "strip", z.ZodTypeAny, {
4024
+ agent: string & z.BRAND<"AgentId">;
4025
+ model: string;
4026
+ nodeId: string;
4027
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4028
+ role?: string | undefined;
4029
+ agentConfig?: Record<string, unknown> | undefined;
4030
+ input?: string | undefined;
4031
+ systemPrompt?: string | undefined;
4032
+ dependsOn?: string[] | undefined;
4033
+ metadata?: Record<string, unknown> | undefined;
4034
+ }, {
4035
+ agent: string;
4036
+ model: string;
4037
+ nodeId: string;
4038
+ sessionId?: string | undefined;
4039
+ role?: string | undefined;
4040
+ agentConfig?: Record<string, unknown> | undefined;
4041
+ input?: string | undefined;
4042
+ systemPrompt?: string | undefined;
4043
+ dependsOn?: string[] | undefined;
4044
+ metadata?: Record<string, unknown> | undefined;
4045
+ }>, "many">;
4046
+ communicationGraph: z.ZodObject<{
4047
+ edges: z.ZodDefault<z.ZodArray<z.ZodObject<{
4048
+ edgeId: z.ZodOptional<z.ZodString>;
4049
+ from: z.ZodString;
4050
+ to: z.ZodString;
4051
+ label: z.ZodOptional<z.ZodString>;
4052
+ condition: z.ZodOptional<z.ZodString>;
4053
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4054
+ }, "strip", z.ZodTypeAny, {
4055
+ from: string;
4056
+ to: string;
4057
+ label?: string | undefined;
4058
+ metadata?: Record<string, unknown> | undefined;
4059
+ edgeId?: string | undefined;
4060
+ condition?: string | undefined;
4061
+ }, {
4062
+ from: string;
4063
+ to: string;
4064
+ label?: string | undefined;
4065
+ metadata?: Record<string, unknown> | undefined;
4066
+ edgeId?: string | undefined;
4067
+ condition?: string | undefined;
4068
+ }>, "many">>;
4069
+ allowSelfLoop: z.ZodDefault<z.ZodBoolean>;
4070
+ maxIterations: z.ZodDefault<z.ZodNumber>;
4071
+ }, "strip", z.ZodTypeAny, {
4072
+ edges: {
4073
+ from: string;
4074
+ to: string;
4075
+ label?: string | undefined;
4076
+ metadata?: Record<string, unknown> | undefined;
4077
+ edgeId?: string | undefined;
4078
+ condition?: string | undefined;
4079
+ }[];
4080
+ allowSelfLoop: boolean;
4081
+ maxIterations: number;
4082
+ }, {
4083
+ edges?: {
4084
+ from: string;
4085
+ to: string;
4086
+ label?: string | undefined;
4087
+ metadata?: Record<string, unknown> | undefined;
4088
+ edgeId?: string | undefined;
4089
+ condition?: string | undefined;
4090
+ }[] | undefined;
4091
+ allowSelfLoop?: boolean | undefined;
4092
+ maxIterations?: number | undefined;
4093
+ }>;
4094
+ }, "strip", z.ZodTypeAny, {
4095
+ mode: "graph";
4096
+ executor: {
4097
+ agent: string & z.BRAND<"AgentId">;
4098
+ role: "executor";
4099
+ model: string;
4100
+ nodeId: string;
4101
+ agentConfig?: Record<string, unknown> | undefined;
4102
+ systemPrompt?: string | undefined;
4103
+ };
4104
+ workers: {
4105
+ agent: string & z.BRAND<"AgentId">;
4106
+ model: string;
4107
+ nodeId: string;
4108
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4109
+ role?: string | undefined;
4110
+ agentConfig?: Record<string, unknown> | undefined;
4111
+ input?: string | undefined;
4112
+ systemPrompt?: string | undefined;
4113
+ dependsOn?: string[] | undefined;
4114
+ metadata?: Record<string, unknown> | undefined;
4115
+ }[];
4116
+ communicationGraph: {
4117
+ edges: {
4118
+ from: string;
4119
+ to: string;
4120
+ label?: string | undefined;
4121
+ metadata?: Record<string, unknown> | undefined;
4122
+ edgeId?: string | undefined;
4123
+ condition?: string | undefined;
4124
+ }[];
4125
+ allowSelfLoop: boolean;
4126
+ maxIterations: number;
4127
+ };
4128
+ }, {
4129
+ mode: "graph";
4130
+ executor: {
4131
+ agent: string;
4132
+ model: string;
4133
+ nodeId: string;
4134
+ role?: "executor" | undefined;
4135
+ agentConfig?: Record<string, unknown> | undefined;
4136
+ systemPrompt?: string | undefined;
4137
+ };
4138
+ workers: {
4139
+ agent: string;
4140
+ model: string;
4141
+ nodeId: string;
4142
+ sessionId?: string | undefined;
4143
+ role?: string | undefined;
4144
+ agentConfig?: Record<string, unknown> | undefined;
4145
+ input?: string | undefined;
4146
+ systemPrompt?: string | undefined;
4147
+ dependsOn?: string[] | undefined;
4148
+ metadata?: Record<string, unknown> | undefined;
4149
+ }[];
4150
+ communicationGraph: {
4151
+ edges?: {
4152
+ from: string;
4153
+ to: string;
4154
+ label?: string | undefined;
4155
+ metadata?: Record<string, unknown> | undefined;
4156
+ edgeId?: string | undefined;
4157
+ condition?: string | undefined;
4158
+ }[] | undefined;
4159
+ allowSelfLoop?: boolean | undefined;
4160
+ maxIterations?: number | undefined;
4161
+ };
4162
+ }>]>;
4163
+ input: z.ZodOptional<z.ZodString>;
4164
+ clientRequestId: z.ZodOptional<z.ZodString>;
4165
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4166
+ }, "strip", z.ZodTypeAny, {
4167
+ project: string & z.BRAND<"ProjectId">;
4168
+ plan: {
4169
+ mode: "dag";
4170
+ nodes: {
4171
+ agent: string & z.BRAND<"AgentId">;
4172
+ model: string;
4173
+ nodeId: string;
4174
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4175
+ role?: string | undefined;
4176
+ agentConfig?: Record<string, unknown> | undefined;
4177
+ input?: string | undefined;
4178
+ systemPrompt?: string | undefined;
4179
+ dependsOn?: string[] | undefined;
4180
+ metadata?: Record<string, unknown> | undefined;
4181
+ }[];
4182
+ edges?: {
4183
+ from: string;
4184
+ to: string;
4185
+ label?: string | undefined;
4186
+ metadata?: Record<string, unknown> | undefined;
4187
+ edgeId?: string | undefined;
4188
+ condition?: string | undefined;
4189
+ }[] | undefined;
4190
+ finalNodeId?: string | undefined;
4191
+ } | {
4192
+ mode: "graph";
4193
+ executor: {
4194
+ agent: string & z.BRAND<"AgentId">;
4195
+ role: "executor";
4196
+ model: string;
4197
+ nodeId: string;
4198
+ agentConfig?: Record<string, unknown> | undefined;
4199
+ systemPrompt?: string | undefined;
4200
+ };
4201
+ workers: {
4202
+ agent: string & z.BRAND<"AgentId">;
4203
+ model: string;
4204
+ nodeId: string;
4205
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4206
+ role?: string | undefined;
4207
+ agentConfig?: Record<string, unknown> | undefined;
4208
+ input?: string | undefined;
4209
+ systemPrompt?: string | undefined;
4210
+ dependsOn?: string[] | undefined;
4211
+ metadata?: Record<string, unknown> | undefined;
4212
+ }[];
4213
+ communicationGraph: {
4214
+ edges: {
4215
+ from: string;
4216
+ to: string;
4217
+ label?: string | undefined;
4218
+ metadata?: Record<string, unknown> | undefined;
4219
+ edgeId?: string | undefined;
4220
+ condition?: string | undefined;
4221
+ }[];
4222
+ allowSelfLoop: boolean;
4223
+ maxIterations: number;
4224
+ };
4225
+ };
4226
+ clientRequestId?: string | undefined;
4227
+ worktreeId?: string | undefined;
4228
+ input?: string | undefined;
4229
+ metadata?: Record<string, unknown> | undefined;
4230
+ }, {
4231
+ project: string;
4232
+ plan: {
4233
+ mode: "dag";
4234
+ nodes: {
4235
+ agent: string;
4236
+ model: string;
4237
+ nodeId: string;
4238
+ sessionId?: string | undefined;
4239
+ role?: string | undefined;
4240
+ agentConfig?: Record<string, unknown> | undefined;
4241
+ input?: string | undefined;
4242
+ systemPrompt?: string | undefined;
4243
+ dependsOn?: string[] | undefined;
4244
+ metadata?: Record<string, unknown> | undefined;
4245
+ }[];
4246
+ edges?: {
4247
+ from: string;
4248
+ to: string;
4249
+ label?: string | undefined;
4250
+ metadata?: Record<string, unknown> | undefined;
4251
+ edgeId?: string | undefined;
4252
+ condition?: string | undefined;
4253
+ }[] | undefined;
4254
+ finalNodeId?: string | undefined;
4255
+ } | {
4256
+ mode: "graph";
4257
+ executor: {
4258
+ agent: string;
4259
+ model: string;
4260
+ nodeId: string;
4261
+ role?: "executor" | undefined;
4262
+ agentConfig?: Record<string, unknown> | undefined;
4263
+ systemPrompt?: string | undefined;
4264
+ };
4265
+ workers: {
4266
+ agent: string;
4267
+ model: string;
4268
+ nodeId: string;
4269
+ sessionId?: string | undefined;
4270
+ role?: string | undefined;
4271
+ agentConfig?: Record<string, unknown> | undefined;
4272
+ input?: string | undefined;
4273
+ systemPrompt?: string | undefined;
4274
+ dependsOn?: string[] | undefined;
4275
+ metadata?: Record<string, unknown> | undefined;
4276
+ }[];
4277
+ communicationGraph: {
4278
+ edges?: {
4279
+ from: string;
4280
+ to: string;
4281
+ label?: string | undefined;
4282
+ metadata?: Record<string, unknown> | undefined;
4283
+ edgeId?: string | undefined;
4284
+ condition?: string | undefined;
4285
+ }[] | undefined;
4286
+ allowSelfLoop?: boolean | undefined;
4287
+ maxIterations?: number | undefined;
4288
+ };
4289
+ };
4290
+ clientRequestId?: string | undefined;
4291
+ worktreeId?: string | undefined;
4292
+ input?: string | undefined;
4293
+ metadata?: Record<string, unknown> | undefined;
4294
+ }>;
4295
+ readonly result: z.ZodObject<{
4296
+ workflowId: z.ZodString;
4297
+ status: z.ZodEnum<["queued", "running", "completed", "failed", "cancelled", "timeout"]>;
4298
+ createdAt: z.ZodString;
4299
+ }, "strip", z.ZodTypeAny, {
4300
+ status: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled";
4301
+ createdAt: string;
4302
+ workflowId: string;
4303
+ }, {
4304
+ status: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled";
4305
+ createdAt: string;
4306
+ workflowId: string;
4307
+ }>;
4308
+ };
4309
+ readonly "workflow.status": {
4310
+ readonly direction: "s2p";
4311
+ readonly kind: "request";
4312
+ readonly params: z.ZodObject<{
4313
+ workflowId: z.ZodString;
4314
+ }, "strip", z.ZodTypeAny, {
4315
+ workflowId: string;
4316
+ }, {
4317
+ workflowId: string;
4318
+ }>;
4319
+ readonly result: z.ZodObject<{
4320
+ workflowId: z.ZodString;
4321
+ status: z.ZodEnum<["queued", "running", "completed", "failed", "cancelled", "timeout"]>;
4322
+ project: z.ZodBranded<z.ZodString, "ProjectId">;
4323
+ mode: z.ZodEnum<["dag", "graph"]>;
4324
+ nodes: z.ZodArray<z.ZodObject<{
4325
+ nodeId: z.ZodString;
4326
+ status: z.ZodEnum<["pending", "ready", "running", "completed", "failed", "skipped", "cancelled"]>;
4327
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
4328
+ model: z.ZodString;
4329
+ role: z.ZodOptional<z.ZodString>;
4330
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
4331
+ turnId: z.ZodOptional<z.ZodString>;
4332
+ startedAt: z.ZodOptional<z.ZodString>;
4333
+ completedAt: z.ZodOptional<z.ZodString>;
4334
+ error: z.ZodOptional<z.ZodString>;
4335
+ }, "strip", z.ZodTypeAny, {
4336
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4337
+ agent: string & z.BRAND<"AgentId">;
4338
+ model: string;
4339
+ nodeId: string;
4340
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4341
+ role?: string | undefined;
4342
+ turnId?: string | undefined;
4343
+ error?: string | undefined;
4344
+ startedAt?: string | undefined;
4345
+ completedAt?: string | undefined;
4346
+ }, {
4347
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4348
+ agent: string;
4349
+ model: string;
4350
+ nodeId: string;
4351
+ sessionId?: string | undefined;
4352
+ role?: string | undefined;
4353
+ turnId?: string | undefined;
4354
+ error?: string | undefined;
4355
+ startedAt?: string | undefined;
4356
+ completedAt?: string | undefined;
4357
+ }>, "many">;
4358
+ createdAt: z.ZodString;
4359
+ updatedAt: z.ZodString;
4360
+ completedAt: z.ZodOptional<z.ZodString>;
4361
+ error: z.ZodOptional<z.ZodString>;
4362
+ }, "strip", z.ZodTypeAny, {
4363
+ status: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled";
4364
+ project: string & z.BRAND<"ProjectId">;
4365
+ createdAt: string;
4366
+ mode: "dag" | "graph";
4367
+ updatedAt: string;
4368
+ nodes: {
4369
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4370
+ agent: string & z.BRAND<"AgentId">;
4371
+ model: string;
4372
+ nodeId: string;
4373
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4374
+ role?: string | undefined;
4375
+ turnId?: string | undefined;
4376
+ error?: string | undefined;
4377
+ startedAt?: string | undefined;
4378
+ completedAt?: string | undefined;
4379
+ }[];
4380
+ workflowId: string;
4381
+ error?: string | undefined;
4382
+ completedAt?: string | undefined;
4383
+ }, {
4384
+ status: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled";
4385
+ project: string;
4386
+ createdAt: string;
4387
+ mode: "dag" | "graph";
4388
+ updatedAt: string;
4389
+ nodes: {
4390
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4391
+ agent: string;
4392
+ model: string;
4393
+ nodeId: string;
4394
+ sessionId?: string | undefined;
4395
+ role?: string | undefined;
4396
+ turnId?: string | undefined;
4397
+ error?: string | undefined;
4398
+ startedAt?: string | undefined;
4399
+ completedAt?: string | undefined;
4400
+ }[];
4401
+ workflowId: string;
4402
+ error?: string | undefined;
4403
+ completedAt?: string | undefined;
4404
+ }>;
4405
+ };
4406
+ readonly "workflow.cancel": {
4407
+ readonly direction: "s2p";
4408
+ readonly kind: "request";
4409
+ readonly params: z.ZodObject<{
4410
+ workflowId: z.ZodString;
4411
+ reason: z.ZodOptional<z.ZodString>;
4412
+ }, "strip", z.ZodTypeAny, {
4413
+ workflowId: string;
4414
+ reason?: string | undefined;
4415
+ }, {
4416
+ workflowId: string;
4417
+ reason?: string | undefined;
4418
+ }>;
4419
+ readonly result: z.ZodObject<{
4420
+ workflowId: z.ZodString;
4421
+ status: z.ZodLiteral<"cancelled">;
4422
+ }, "strip", z.ZodTypeAny, {
4423
+ status: "cancelled";
4424
+ workflowId: string;
4425
+ }, {
4426
+ status: "cancelled";
4427
+ workflowId: string;
4428
+ }>;
4429
+ };
4430
+ readonly "workflow.list": {
4431
+ readonly direction: "s2p";
4432
+ readonly kind: "request";
4433
+ readonly params: z.ZodObject<{
4434
+ status: z.ZodOptional<z.ZodEnum<["queued", "running", "completed", "failed", "cancelled", "timeout"]>>;
4435
+ limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
4436
+ cursor: z.ZodOptional<z.ZodString>;
4437
+ }, "strip", z.ZodTypeAny, {
4438
+ status?: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled" | undefined;
4439
+ limit?: number | undefined;
4440
+ cursor?: string | undefined;
4441
+ }, {
4442
+ status?: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled" | undefined;
4443
+ limit?: number | undefined;
4444
+ cursor?: string | undefined;
4445
+ }>;
4446
+ readonly result: z.ZodObject<{
4447
+ workflows: z.ZodArray<z.ZodObject<{
4448
+ workflowId: z.ZodString;
4449
+ status: z.ZodEnum<["queued", "running", "completed", "failed", "cancelled", "timeout"]>;
4450
+ project: z.ZodBranded<z.ZodString, "ProjectId">;
4451
+ mode: z.ZodEnum<["dag", "graph"]>;
4452
+ nodes: z.ZodArray<z.ZodObject<{
4453
+ nodeId: z.ZodString;
4454
+ status: z.ZodEnum<["pending", "ready", "running", "completed", "failed", "skipped", "cancelled"]>;
4455
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
4456
+ model: z.ZodString;
4457
+ role: z.ZodOptional<z.ZodString>;
4458
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
4459
+ turnId: z.ZodOptional<z.ZodString>;
4460
+ startedAt: z.ZodOptional<z.ZodString>;
4461
+ completedAt: z.ZodOptional<z.ZodString>;
4462
+ error: z.ZodOptional<z.ZodString>;
4463
+ }, "strip", z.ZodTypeAny, {
4464
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4465
+ agent: string & z.BRAND<"AgentId">;
4466
+ model: string;
4467
+ nodeId: string;
4468
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4469
+ role?: string | undefined;
4470
+ turnId?: string | undefined;
4471
+ error?: string | undefined;
4472
+ startedAt?: string | undefined;
4473
+ completedAt?: string | undefined;
4474
+ }, {
4475
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4476
+ agent: string;
4477
+ model: string;
4478
+ nodeId: string;
4479
+ sessionId?: string | undefined;
4480
+ role?: string | undefined;
4481
+ turnId?: string | undefined;
4482
+ error?: string | undefined;
4483
+ startedAt?: string | undefined;
4484
+ completedAt?: string | undefined;
4485
+ }>, "many">;
4486
+ createdAt: z.ZodString;
4487
+ updatedAt: z.ZodString;
4488
+ completedAt: z.ZodOptional<z.ZodString>;
4489
+ error: z.ZodOptional<z.ZodString>;
4490
+ }, "strip", z.ZodTypeAny, {
4491
+ status: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled";
4492
+ project: string & z.BRAND<"ProjectId">;
4493
+ createdAt: string;
4494
+ mode: "dag" | "graph";
4495
+ updatedAt: string;
4496
+ nodes: {
4497
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4498
+ agent: string & z.BRAND<"AgentId">;
4499
+ model: string;
4500
+ nodeId: string;
4501
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4502
+ role?: string | undefined;
4503
+ turnId?: string | undefined;
4504
+ error?: string | undefined;
4505
+ startedAt?: string | undefined;
4506
+ completedAt?: string | undefined;
4507
+ }[];
4508
+ workflowId: string;
4509
+ error?: string | undefined;
4510
+ completedAt?: string | undefined;
4511
+ }, {
4512
+ status: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled";
4513
+ project: string;
4514
+ createdAt: string;
4515
+ mode: "dag" | "graph";
4516
+ updatedAt: string;
4517
+ nodes: {
4518
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4519
+ agent: string;
4520
+ model: string;
4521
+ nodeId: string;
4522
+ sessionId?: string | undefined;
4523
+ role?: string | undefined;
4524
+ turnId?: string | undefined;
4525
+ error?: string | undefined;
4526
+ startedAt?: string | undefined;
4527
+ completedAt?: string | undefined;
4528
+ }[];
4529
+ workflowId: string;
4530
+ error?: string | undefined;
4531
+ completedAt?: string | undefined;
4532
+ }>, "many">;
4533
+ nextCursor: z.ZodOptional<z.ZodString>;
4534
+ }, "strip", z.ZodTypeAny, {
4535
+ workflows: {
4536
+ status: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled";
4537
+ project: string & z.BRAND<"ProjectId">;
4538
+ createdAt: string;
4539
+ mode: "dag" | "graph";
4540
+ updatedAt: string;
4541
+ nodes: {
4542
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4543
+ agent: string & z.BRAND<"AgentId">;
4544
+ model: string;
4545
+ nodeId: string;
4546
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4547
+ role?: string | undefined;
4548
+ turnId?: string | undefined;
4549
+ error?: string | undefined;
4550
+ startedAt?: string | undefined;
4551
+ completedAt?: string | undefined;
4552
+ }[];
4553
+ workflowId: string;
4554
+ error?: string | undefined;
4555
+ completedAt?: string | undefined;
4556
+ }[];
4557
+ nextCursor?: string | undefined;
4558
+ }, {
4559
+ workflows: {
4560
+ status: "running" | "queued" | "completed" | "failed" | "timeout" | "cancelled";
4561
+ project: string;
4562
+ createdAt: string;
4563
+ mode: "dag" | "graph";
4564
+ updatedAt: string;
4565
+ nodes: {
4566
+ status: "running" | "completed" | "failed" | "pending" | "cancelled" | "ready" | "skipped";
4567
+ agent: string;
4568
+ model: string;
4569
+ nodeId: string;
4570
+ sessionId?: string | undefined;
4571
+ role?: string | undefined;
4572
+ turnId?: string | undefined;
4573
+ error?: string | undefined;
4574
+ startedAt?: string | undefined;
4575
+ completedAt?: string | undefined;
4576
+ }[];
4577
+ workflowId: string;
4578
+ error?: string | undefined;
4579
+ completedAt?: string | undefined;
4580
+ }[];
4581
+ nextCursor?: string | undefined;
4582
+ }>;
4583
+ };
4584
+ readonly "workflow.event": {
4585
+ readonly direction: "p2s";
4586
+ readonly kind: "notification";
4587
+ readonly params: z.ZodObject<{
4588
+ workflowId: z.ZodString;
4589
+ seq: z.ZodNumber;
4590
+ type: z.ZodEnum<["workflow.status", "node.status", "node.stream", "edge.route", "executor.decision"]>;
4591
+ nodeId: z.ZodOptional<z.ZodString>;
4592
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
4593
+ turnId: z.ZodOptional<z.ZodString>;
4594
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
4595
+ model: z.ZodOptional<z.ZodString>;
4596
+ role: z.ZodOptional<z.ZodString>;
4597
+ status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["queued", "running", "completed", "failed", "cancelled", "timeout"]>, z.ZodEnum<["pending", "ready", "running", "completed", "failed", "skipped", "cancelled"]>]>>;
4598
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4599
+ timestamp: z.ZodString;
4600
+ }, "strip", z.ZodTypeAny, {
4601
+ type: "workflow.status" | "node.status" | "node.stream" | "edge.route" | "executor.decision";
4602
+ seq: number;
4603
+ workflowId: string;
4604
+ timestamp: string;
4605
+ status?: "running" | "queued" | "completed" | "failed" | "timeout" | "pending" | "cancelled" | "ready" | "skipped" | undefined;
4606
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
4607
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
4608
+ role?: string | undefined;
4609
+ model?: string | undefined;
4610
+ turnId?: string | undefined;
4611
+ payload?: Record<string, unknown> | undefined;
4612
+ nodeId?: string | undefined;
4613
+ }, {
4614
+ type: "workflow.status" | "node.status" | "node.stream" | "edge.route" | "executor.decision";
4615
+ seq: number;
4616
+ workflowId: string;
4617
+ timestamp: string;
4618
+ status?: "running" | "queued" | "completed" | "failed" | "timeout" | "pending" | "cancelled" | "ready" | "skipped" | undefined;
4619
+ sessionId?: string | undefined;
4620
+ agent?: string | undefined;
4621
+ role?: string | undefined;
4622
+ model?: string | undefined;
4623
+ turnId?: string | undefined;
4624
+ payload?: Record<string, unknown> | undefined;
4625
+ nodeId?: string | undefined;
4626
+ }>;
4627
+ readonly result: z.ZodUndefined;
4628
+ };
3813
4629
  };
3814
4630
  export type MethodName = keyof typeof METHODS;
3815
4631
  export type MethodSpec = (typeof METHODS)[MethodName];