agents-bridge 0.1.1 → 0.1.2

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.
Files changed (64) hide show
  1. package/README.md +12 -12
  2. package/dist/agents/agent-resolver.d.ts +12 -0
  3. package/dist/agents/agent-resolver.js +1 -0
  4. package/dist/agents/agent-resolver.js.map +1 -1
  5. package/dist/agents/agent-router.d.ts +8 -0
  6. package/dist/agents/cli-output.d.ts +35 -0
  7. package/dist/agents/cli-output.d.ts.map +1 -0
  8. package/dist/agents/cli-output.js +277 -0
  9. package/dist/agents/cli-output.js.map +1 -0
  10. package/dist/agents/cli-output.test.d.ts +2 -0
  11. package/dist/agents/cli-output.test.d.ts.map +1 -0
  12. package/dist/agents/cli-output.test.js +56 -0
  13. package/dist/agents/cli-output.test.js.map +1 -0
  14. package/dist/agents/cli-runner.d.ts +23 -0
  15. package/dist/agents/cli-runner.d.ts.map +1 -1
  16. package/dist/agents/cli-runner.js +196 -157
  17. package/dist/agents/cli-runner.js.map +1 -1
  18. package/dist/agents/cli-runner.test.d.ts +2 -0
  19. package/dist/agents/cli-runner.test.d.ts.map +1 -0
  20. package/dist/agents/cli-runner.test.js +119 -0
  21. package/dist/agents/cli-runner.test.js.map +1 -0
  22. package/dist/agents/cli-session-store.d.ts +47 -0
  23. package/dist/agents/cli-session-store.d.ts.map +1 -1
  24. package/dist/agents/cli-session-store.js +29 -0
  25. package/dist/agents/cli-session-store.js.map +1 -1
  26. package/dist/agents/cli-session-store.test.d.ts +2 -0
  27. package/dist/agents/cli-session-store.test.d.ts.map +1 -0
  28. package/dist/agents/cli-session-store.test.js +30 -0
  29. package/dist/agents/cli-session-store.test.js.map +1 -0
  30. package/dist/agents/codex-app-server-runtime.d.ts +72 -0
  31. package/dist/agents/codex-app-server-runtime.d.ts.map +1 -0
  32. package/dist/agents/codex-app-server-runtime.js +772 -0
  33. package/dist/agents/codex-app-server-runtime.js.map +1 -0
  34. package/dist/agents/codex-app-server-runtime.test.d.ts +2 -0
  35. package/dist/agents/codex-app-server-runtime.test.d.ts.map +1 -0
  36. package/dist/agents/codex-app-server-runtime.test.js +164 -0
  37. package/dist/agents/codex-app-server-runtime.test.js.map +1 -0
  38. package/dist/agents/model-selection.d.ts +3 -2
  39. package/dist/agents/model-selection.js +1 -1
  40. package/dist/channels/botlink.d.ts +2 -0
  41. package/dist/cli/cmd-start.d.ts.map +1 -1
  42. package/dist/cli/cmd-start.js +154 -16
  43. package/dist/cli/cmd-start.js.map +1 -1
  44. package/dist/cli/run-main.js +27 -27
  45. package/dist/config/paths.d.ts +4 -0
  46. package/dist/config/paths.d.ts.map +1 -1
  47. package/dist/config/paths.js +7 -0
  48. package/dist/config/paths.js.map +1 -1
  49. package/dist/config/zod-schema.d.ts +656 -51
  50. package/dist/config/zod-schema.d.ts.map +1 -1
  51. package/dist/config/zod-schema.js +16 -0
  52. package/dist/config/zod-schema.js.map +1 -1
  53. package/dist/entry.d.ts +1 -1
  54. package/dist/logger.d.ts +1 -0
  55. package/dist/logger.d.ts.map +1 -1
  56. package/dist/logger.js +28 -5
  57. package/dist/logger.js.map +1 -1
  58. package/dist/types/index.d.ts +39 -0
  59. package/dist/types/index.d.ts.map +1 -1
  60. package/package.json +1 -1
  61. package/dist/console-encoding.d.ts +0 -6
  62. package/dist/console-encoding.d.ts.map +0 -1
  63. package/dist/console-encoding.js +0 -35
  64. package/dist/console-encoding.js.map +0 -1
@@ -108,6 +108,47 @@ export declare const CliBackendConfigSchema: z.ZodObject<{
108
108
  args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
109
109
  output: z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>;
110
110
  resumeOutput: z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>;
111
+ runtimeMode: z.ZodOptional<z.ZodEnum<["exec", "app-server"]>>;
112
+ appServer: z.ZodOptional<z.ZodObject<{
113
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
114
+ listen: z.ZodOptional<z.ZodString>;
115
+ sessionSource: z.ZodOptional<z.ZodString>;
116
+ startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
117
+ requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
118
+ serviceName: z.ZodOptional<z.ZodString>;
119
+ experimentalApi: z.ZodOptional<z.ZodBoolean>;
120
+ optOutNotificationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
121
+ approvalPolicy: z.ZodOptional<z.ZodEnum<["untrusted", "on-failure", "on-request", "never"]>>;
122
+ sandbox: z.ZodOptional<z.ZodEnum<["read-only", "workspace-write", "danger-full-access"]>>;
123
+ persistExtendedHistory: z.ZodOptional<z.ZodBoolean>;
124
+ experimentalRawEvents: z.ZodOptional<z.ZodBoolean>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ args?: string[] | undefined;
127
+ listen?: string | undefined;
128
+ sessionSource?: string | undefined;
129
+ startupTimeoutMs?: number | undefined;
130
+ requestTimeoutMs?: number | undefined;
131
+ serviceName?: string | undefined;
132
+ experimentalApi?: boolean | undefined;
133
+ optOutNotificationMethods?: string[] | undefined;
134
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
135
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
136
+ persistExtendedHistory?: boolean | undefined;
137
+ experimentalRawEvents?: boolean | undefined;
138
+ }, {
139
+ args?: string[] | undefined;
140
+ listen?: string | undefined;
141
+ sessionSource?: string | undefined;
142
+ startupTimeoutMs?: number | undefined;
143
+ requestTimeoutMs?: number | undefined;
144
+ serviceName?: string | undefined;
145
+ experimentalApi?: boolean | undefined;
146
+ optOutNotificationMethods?: string[] | undefined;
147
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
148
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
149
+ persistExtendedHistory?: boolean | undefined;
150
+ experimentalRawEvents?: boolean | undefined;
151
+ }>>;
111
152
  input: z.ZodOptional<z.ZodEnum<["arg", "stdin"]>>;
112
153
  maxPromptArgChars: z.ZodOptional<z.ZodNumber>;
113
154
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -222,6 +263,21 @@ export declare const CliBackendConfigSchema: z.ZodObject<{
222
263
  args?: string[] | undefined;
223
264
  output?: "json" | "jsonl" | "text" | undefined;
224
265
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
266
+ runtimeMode?: "exec" | "app-server" | undefined;
267
+ appServer?: {
268
+ args?: string[] | undefined;
269
+ listen?: string | undefined;
270
+ sessionSource?: string | undefined;
271
+ startupTimeoutMs?: number | undefined;
272
+ requestTimeoutMs?: number | undefined;
273
+ serviceName?: string | undefined;
274
+ experimentalApi?: boolean | undefined;
275
+ optOutNotificationMethods?: string[] | undefined;
276
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
277
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
278
+ persistExtendedHistory?: boolean | undefined;
279
+ experimentalRawEvents?: boolean | undefined;
280
+ } | undefined;
225
281
  input?: "arg" | "stdin" | undefined;
226
282
  maxPromptArgChars?: number | undefined;
227
283
  env?: Record<string, string> | undefined;
@@ -260,6 +316,21 @@ export declare const CliBackendConfigSchema: z.ZodObject<{
260
316
  args?: string[] | undefined;
261
317
  output?: "json" | "jsonl" | "text" | undefined;
262
318
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
319
+ runtimeMode?: "exec" | "app-server" | undefined;
320
+ appServer?: {
321
+ args?: string[] | undefined;
322
+ listen?: string | undefined;
323
+ sessionSource?: string | undefined;
324
+ startupTimeoutMs?: number | undefined;
325
+ requestTimeoutMs?: number | undefined;
326
+ serviceName?: string | undefined;
327
+ experimentalApi?: boolean | undefined;
328
+ optOutNotificationMethods?: string[] | undefined;
329
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
330
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
331
+ persistExtendedHistory?: boolean | undefined;
332
+ experimentalRawEvents?: boolean | undefined;
333
+ } | undefined;
263
334
  input?: "arg" | "stdin" | undefined;
264
335
  maxPromptArgChars?: number | undefined;
265
336
  env?: Record<string, string> | undefined;
@@ -320,6 +391,47 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
320
391
  args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
321
392
  output: z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>;
322
393
  resumeOutput: z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>;
394
+ runtimeMode: z.ZodOptional<z.ZodEnum<["exec", "app-server"]>>;
395
+ appServer: z.ZodOptional<z.ZodObject<{
396
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
397
+ listen: z.ZodOptional<z.ZodString>;
398
+ sessionSource: z.ZodOptional<z.ZodString>;
399
+ startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
400
+ requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
401
+ serviceName: z.ZodOptional<z.ZodString>;
402
+ experimentalApi: z.ZodOptional<z.ZodBoolean>;
403
+ optOutNotificationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
404
+ approvalPolicy: z.ZodOptional<z.ZodEnum<["untrusted", "on-failure", "on-request", "never"]>>;
405
+ sandbox: z.ZodOptional<z.ZodEnum<["read-only", "workspace-write", "danger-full-access"]>>;
406
+ persistExtendedHistory: z.ZodOptional<z.ZodBoolean>;
407
+ experimentalRawEvents: z.ZodOptional<z.ZodBoolean>;
408
+ }, "strip", z.ZodTypeAny, {
409
+ args?: string[] | undefined;
410
+ listen?: string | undefined;
411
+ sessionSource?: string | undefined;
412
+ startupTimeoutMs?: number | undefined;
413
+ requestTimeoutMs?: number | undefined;
414
+ serviceName?: string | undefined;
415
+ experimentalApi?: boolean | undefined;
416
+ optOutNotificationMethods?: string[] | undefined;
417
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
418
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
419
+ persistExtendedHistory?: boolean | undefined;
420
+ experimentalRawEvents?: boolean | undefined;
421
+ }, {
422
+ args?: string[] | undefined;
423
+ listen?: string | undefined;
424
+ sessionSource?: string | undefined;
425
+ startupTimeoutMs?: number | undefined;
426
+ requestTimeoutMs?: number | undefined;
427
+ serviceName?: string | undefined;
428
+ experimentalApi?: boolean | undefined;
429
+ optOutNotificationMethods?: string[] | undefined;
430
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
431
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
432
+ persistExtendedHistory?: boolean | undefined;
433
+ experimentalRawEvents?: boolean | undefined;
434
+ }>>;
323
435
  input: z.ZodOptional<z.ZodEnum<["arg", "stdin"]>>;
324
436
  maxPromptArgChars: z.ZodOptional<z.ZodNumber>;
325
437
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -434,6 +546,21 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
434
546
  args?: string[] | undefined;
435
547
  output?: "json" | "jsonl" | "text" | undefined;
436
548
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
549
+ runtimeMode?: "exec" | "app-server" | undefined;
550
+ appServer?: {
551
+ args?: string[] | undefined;
552
+ listen?: string | undefined;
553
+ sessionSource?: string | undefined;
554
+ startupTimeoutMs?: number | undefined;
555
+ requestTimeoutMs?: number | undefined;
556
+ serviceName?: string | undefined;
557
+ experimentalApi?: boolean | undefined;
558
+ optOutNotificationMethods?: string[] | undefined;
559
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
560
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
561
+ persistExtendedHistory?: boolean | undefined;
562
+ experimentalRawEvents?: boolean | undefined;
563
+ } | undefined;
437
564
  input?: "arg" | "stdin" | undefined;
438
565
  maxPromptArgChars?: number | undefined;
439
566
  env?: Record<string, string> | undefined;
@@ -472,6 +599,21 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
472
599
  args?: string[] | undefined;
473
600
  output?: "json" | "jsonl" | "text" | undefined;
474
601
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
602
+ runtimeMode?: "exec" | "app-server" | undefined;
603
+ appServer?: {
604
+ args?: string[] | undefined;
605
+ listen?: string | undefined;
606
+ sessionSource?: string | undefined;
607
+ startupTimeoutMs?: number | undefined;
608
+ requestTimeoutMs?: number | undefined;
609
+ serviceName?: string | undefined;
610
+ experimentalApi?: boolean | undefined;
611
+ optOutNotificationMethods?: string[] | undefined;
612
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
613
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
614
+ persistExtendedHistory?: boolean | undefined;
615
+ experimentalRawEvents?: boolean | undefined;
616
+ } | undefined;
475
617
  input?: "arg" | "stdin" | undefined;
476
618
  maxPromptArgChars?: number | undefined;
477
619
  env?: Record<string, string> | undefined;
@@ -531,6 +673,21 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
531
673
  args?: string[] | undefined;
532
674
  output?: "json" | "jsonl" | "text" | undefined;
533
675
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
676
+ runtimeMode?: "exec" | "app-server" | undefined;
677
+ appServer?: {
678
+ args?: string[] | undefined;
679
+ listen?: string | undefined;
680
+ sessionSource?: string | undefined;
681
+ startupTimeoutMs?: number | undefined;
682
+ requestTimeoutMs?: number | undefined;
683
+ serviceName?: string | undefined;
684
+ experimentalApi?: boolean | undefined;
685
+ optOutNotificationMethods?: string[] | undefined;
686
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
687
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
688
+ persistExtendedHistory?: boolean | undefined;
689
+ experimentalRawEvents?: boolean | undefined;
690
+ } | undefined;
534
691
  input?: "arg" | "stdin" | undefined;
535
692
  maxPromptArgChars?: number | undefined;
536
693
  env?: Record<string, string> | undefined;
@@ -582,6 +739,21 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
582
739
  args?: string[] | undefined;
583
740
  output?: "json" | "jsonl" | "text" | undefined;
584
741
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
742
+ runtimeMode?: "exec" | "app-server" | undefined;
743
+ appServer?: {
744
+ args?: string[] | undefined;
745
+ listen?: string | undefined;
746
+ sessionSource?: string | undefined;
747
+ startupTimeoutMs?: number | undefined;
748
+ requestTimeoutMs?: number | undefined;
749
+ serviceName?: string | undefined;
750
+ experimentalApi?: boolean | undefined;
751
+ optOutNotificationMethods?: string[] | undefined;
752
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
753
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
754
+ persistExtendedHistory?: boolean | undefined;
755
+ experimentalRawEvents?: boolean | undefined;
756
+ } | undefined;
585
757
  input?: "arg" | "stdin" | undefined;
586
758
  maxPromptArgChars?: number | undefined;
587
759
  env?: Record<string, string> | undefined;
@@ -638,12 +810,54 @@ export declare const AgentConfigSchema: z.ZodObject<{
638
810
  fallbacks?: string[] | undefined;
639
811
  }>, z.ZodString]>>;
640
812
  workspace: z.ZodOptional<z.ZodString>;
813
+ cliSessionId: z.ZodOptional<z.ZodString>;
641
814
  systemPrompt: z.ZodOptional<z.ZodString>;
642
815
  cliBackends: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
643
816
  command: z.ZodOptional<z.ZodString>;
644
817
  args: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
645
818
  output: z.ZodOptional<z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>>;
646
819
  resumeOutput: z.ZodOptional<z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>>;
820
+ runtimeMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<["exec", "app-server"]>>>;
821
+ appServer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
822
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
823
+ listen: z.ZodOptional<z.ZodString>;
824
+ sessionSource: z.ZodOptional<z.ZodString>;
825
+ startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
826
+ requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
827
+ serviceName: z.ZodOptional<z.ZodString>;
828
+ experimentalApi: z.ZodOptional<z.ZodBoolean>;
829
+ optOutNotificationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
830
+ approvalPolicy: z.ZodOptional<z.ZodEnum<["untrusted", "on-failure", "on-request", "never"]>>;
831
+ sandbox: z.ZodOptional<z.ZodEnum<["read-only", "workspace-write", "danger-full-access"]>>;
832
+ persistExtendedHistory: z.ZodOptional<z.ZodBoolean>;
833
+ experimentalRawEvents: z.ZodOptional<z.ZodBoolean>;
834
+ }, "strip", z.ZodTypeAny, {
835
+ args?: string[] | undefined;
836
+ listen?: string | undefined;
837
+ sessionSource?: string | undefined;
838
+ startupTimeoutMs?: number | undefined;
839
+ requestTimeoutMs?: number | undefined;
840
+ serviceName?: string | undefined;
841
+ experimentalApi?: boolean | undefined;
842
+ optOutNotificationMethods?: string[] | undefined;
843
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
844
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
845
+ persistExtendedHistory?: boolean | undefined;
846
+ experimentalRawEvents?: boolean | undefined;
847
+ }, {
848
+ args?: string[] | undefined;
849
+ listen?: string | undefined;
850
+ sessionSource?: string | undefined;
851
+ startupTimeoutMs?: number | undefined;
852
+ requestTimeoutMs?: number | undefined;
853
+ serviceName?: string | undefined;
854
+ experimentalApi?: boolean | undefined;
855
+ optOutNotificationMethods?: string[] | undefined;
856
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
857
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
858
+ persistExtendedHistory?: boolean | undefined;
859
+ experimentalRawEvents?: boolean | undefined;
860
+ }>>>;
647
861
  input: z.ZodOptional<z.ZodOptional<z.ZodEnum<["arg", "stdin"]>>>;
648
862
  maxPromptArgChars: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
649
863
  env: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
@@ -754,10 +968,25 @@ export declare const AgentConfigSchema: z.ZodObject<{
754
968
  } | undefined;
755
969
  }>>>;
756
970
  }, "strip", z.ZodTypeAny, {
757
- command?: string | undefined;
758
971
  args?: string[] | undefined;
972
+ command?: string | undefined;
759
973
  output?: "json" | "jsonl" | "text" | undefined;
760
974
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
975
+ runtimeMode?: "exec" | "app-server" | undefined;
976
+ appServer?: {
977
+ args?: string[] | undefined;
978
+ listen?: string | undefined;
979
+ sessionSource?: string | undefined;
980
+ startupTimeoutMs?: number | undefined;
981
+ requestTimeoutMs?: number | undefined;
982
+ serviceName?: string | undefined;
983
+ experimentalApi?: boolean | undefined;
984
+ optOutNotificationMethods?: string[] | undefined;
985
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
986
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
987
+ persistExtendedHistory?: boolean | undefined;
988
+ experimentalRawEvents?: boolean | undefined;
989
+ } | undefined;
761
990
  input?: "arg" | "stdin" | undefined;
762
991
  maxPromptArgChars?: number | undefined;
763
992
  env?: Record<string, string> | undefined;
@@ -792,10 +1021,25 @@ export declare const AgentConfigSchema: z.ZodObject<{
792
1021
  } | undefined;
793
1022
  } | undefined;
794
1023
  }, {
795
- command?: string | undefined;
796
1024
  args?: string[] | undefined;
1025
+ command?: string | undefined;
797
1026
  output?: "json" | "jsonl" | "text" | undefined;
798
1027
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
1028
+ runtimeMode?: "exec" | "app-server" | undefined;
1029
+ appServer?: {
1030
+ args?: string[] | undefined;
1031
+ listen?: string | undefined;
1032
+ sessionSource?: string | undefined;
1033
+ startupTimeoutMs?: number | undefined;
1034
+ requestTimeoutMs?: number | undefined;
1035
+ serviceName?: string | undefined;
1036
+ experimentalApi?: boolean | undefined;
1037
+ optOutNotificationMethods?: string[] | undefined;
1038
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1039
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1040
+ persistExtendedHistory?: boolean | undefined;
1041
+ experimentalRawEvents?: boolean | undefined;
1042
+ } | undefined;
799
1043
  input?: "arg" | "stdin" | undefined;
800
1044
  maxPromptArgChars?: number | undefined;
801
1045
  env?: Record<string, string> | undefined;
@@ -855,17 +1099,33 @@ export declare const AgentConfigSchema: z.ZodObject<{
855
1099
  }>>;
856
1100
  }, "strip", z.ZodTypeAny, {
857
1101
  id: string;
1102
+ default?: boolean | undefined;
1103
+ env?: Record<string, string> | undefined;
1104
+ clearEnv?: string[] | undefined;
858
1105
  model?: string | {
859
1106
  primary: string;
860
1107
  fallbacks?: string[] | undefined;
861
1108
  } | undefined;
862
- env?: Record<string, string> | undefined;
863
- clearEnv?: string[] | undefined;
864
1109
  cliBackends?: Record<string, {
865
- command?: string | undefined;
866
1110
  args?: string[] | undefined;
1111
+ command?: string | undefined;
867
1112
  output?: "json" | "jsonl" | "text" | undefined;
868
1113
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
1114
+ runtimeMode?: "exec" | "app-server" | undefined;
1115
+ appServer?: {
1116
+ args?: string[] | undefined;
1117
+ listen?: string | undefined;
1118
+ sessionSource?: string | undefined;
1119
+ startupTimeoutMs?: number | undefined;
1120
+ requestTimeoutMs?: number | undefined;
1121
+ serviceName?: string | undefined;
1122
+ experimentalApi?: boolean | undefined;
1123
+ optOutNotificationMethods?: string[] | undefined;
1124
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1125
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1126
+ persistExtendedHistory?: boolean | undefined;
1127
+ experimentalRawEvents?: boolean | undefined;
1128
+ } | undefined;
869
1129
  input?: "arg" | "stdin" | undefined;
870
1130
  maxPromptArgChars?: number | undefined;
871
1131
  env?: Record<string, string> | undefined;
@@ -904,9 +1164,9 @@ export declare const AgentConfigSchema: z.ZodObject<{
904
1164
  allow?: string[] | undefined;
905
1165
  deny?: string[] | undefined;
906
1166
  } | undefined;
907
- default?: boolean | undefined;
908
1167
  name?: string | undefined;
909
1168
  workspace?: string | undefined;
1169
+ cliSessionId?: string | undefined;
910
1170
  systemPrompt?: string | undefined;
911
1171
  skills?: string[] | undefined;
912
1172
  identity?: {
@@ -915,17 +1175,33 @@ export declare const AgentConfigSchema: z.ZodObject<{
915
1175
  } | undefined;
916
1176
  }, {
917
1177
  id: string;
1178
+ default?: boolean | undefined;
1179
+ env?: Record<string, string> | undefined;
1180
+ clearEnv?: string[] | undefined;
918
1181
  model?: string | {
919
1182
  primary: string;
920
1183
  fallbacks?: string[] | undefined;
921
1184
  } | undefined;
922
- env?: Record<string, string> | undefined;
923
- clearEnv?: string[] | undefined;
924
1185
  cliBackends?: Record<string, {
925
- command?: string | undefined;
926
1186
  args?: string[] | undefined;
1187
+ command?: string | undefined;
927
1188
  output?: "json" | "jsonl" | "text" | undefined;
928
1189
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
1190
+ runtimeMode?: "exec" | "app-server" | undefined;
1191
+ appServer?: {
1192
+ args?: string[] | undefined;
1193
+ listen?: string | undefined;
1194
+ sessionSource?: string | undefined;
1195
+ startupTimeoutMs?: number | undefined;
1196
+ requestTimeoutMs?: number | undefined;
1197
+ serviceName?: string | undefined;
1198
+ experimentalApi?: boolean | undefined;
1199
+ optOutNotificationMethods?: string[] | undefined;
1200
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1201
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1202
+ persistExtendedHistory?: boolean | undefined;
1203
+ experimentalRawEvents?: boolean | undefined;
1204
+ } | undefined;
929
1205
  input?: "arg" | "stdin" | undefined;
930
1206
  maxPromptArgChars?: number | undefined;
931
1207
  env?: Record<string, string> | undefined;
@@ -964,9 +1240,9 @@ export declare const AgentConfigSchema: z.ZodObject<{
964
1240
  allow?: string[] | undefined;
965
1241
  deny?: string[] | undefined;
966
1242
  } | undefined;
967
- default?: boolean | undefined;
968
1243
  name?: string | undefined;
969
1244
  workspace?: string | undefined;
1245
+ cliSessionId?: string | undefined;
970
1246
  systemPrompt?: string | undefined;
971
1247
  skills?: string[] | undefined;
972
1248
  identity?: {
@@ -990,16 +1266,16 @@ export declare const BindingMatchSchema: z.ZodObject<{
990
1266
  }>>;
991
1267
  userId: z.ZodOptional<z.ZodString>;
992
1268
  }, "strip", z.ZodTypeAny, {
993
- channel?: string | undefined;
994
1269
  accountId?: string | undefined;
1270
+ channel?: string | undefined;
995
1271
  peer?: {
996
1272
  id?: string | undefined;
997
1273
  kind?: "private" | "group" | "multi_bot" | undefined;
998
1274
  } | undefined;
999
1275
  userId?: string | undefined;
1000
1276
  }, {
1001
- channel?: string | undefined;
1002
1277
  accountId?: string | undefined;
1278
+ channel?: string | undefined;
1003
1279
  peer?: {
1004
1280
  id?: string | undefined;
1005
1281
  kind?: "private" | "group" | "multi_bot" | undefined;
@@ -1024,16 +1300,16 @@ export declare const AgentBindingSchema: z.ZodObject<{
1024
1300
  }>>;
1025
1301
  userId: z.ZodOptional<z.ZodString>;
1026
1302
  }, "strip", z.ZodTypeAny, {
1027
- channel?: string | undefined;
1028
1303
  accountId?: string | undefined;
1304
+ channel?: string | undefined;
1029
1305
  peer?: {
1030
1306
  id?: string | undefined;
1031
1307
  kind?: "private" | "group" | "multi_bot" | undefined;
1032
1308
  } | undefined;
1033
1309
  userId?: string | undefined;
1034
1310
  }, {
1035
- channel?: string | undefined;
1036
1311
  accountId?: string | undefined;
1312
+ channel?: string | undefined;
1037
1313
  peer?: {
1038
1314
  id?: string | undefined;
1039
1315
  kind?: "private" | "group" | "multi_bot" | undefined;
@@ -1043,8 +1319,8 @@ export declare const AgentBindingSchema: z.ZodObject<{
1043
1319
  }, "strip", z.ZodTypeAny, {
1044
1320
  agentId: string;
1045
1321
  match: {
1046
- channel?: string | undefined;
1047
1322
  accountId?: string | undefined;
1323
+ channel?: string | undefined;
1048
1324
  peer?: {
1049
1325
  id?: string | undefined;
1050
1326
  kind?: "private" | "group" | "multi_bot" | undefined;
@@ -1055,8 +1331,8 @@ export declare const AgentBindingSchema: z.ZodObject<{
1055
1331
  }, {
1056
1332
  agentId: string;
1057
1333
  match: {
1058
- channel?: string | undefined;
1059
1334
  accountId?: string | undefined;
1335
+ channel?: string | undefined;
1060
1336
  peer?: {
1061
1337
  id?: string | undefined;
1062
1338
  kind?: "private" | "group" | "multi_bot" | undefined;
@@ -1221,6 +1497,47 @@ export declare const AppConfigSchema: z.ZodObject<{
1221
1497
  args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1222
1498
  output: z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>;
1223
1499
  resumeOutput: z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>;
1500
+ runtimeMode: z.ZodOptional<z.ZodEnum<["exec", "app-server"]>>;
1501
+ appServer: z.ZodOptional<z.ZodObject<{
1502
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1503
+ listen: z.ZodOptional<z.ZodString>;
1504
+ sessionSource: z.ZodOptional<z.ZodString>;
1505
+ startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
1506
+ requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
1507
+ serviceName: z.ZodOptional<z.ZodString>;
1508
+ experimentalApi: z.ZodOptional<z.ZodBoolean>;
1509
+ optOutNotificationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1510
+ approvalPolicy: z.ZodOptional<z.ZodEnum<["untrusted", "on-failure", "on-request", "never"]>>;
1511
+ sandbox: z.ZodOptional<z.ZodEnum<["read-only", "workspace-write", "danger-full-access"]>>;
1512
+ persistExtendedHistory: z.ZodOptional<z.ZodBoolean>;
1513
+ experimentalRawEvents: z.ZodOptional<z.ZodBoolean>;
1514
+ }, "strip", z.ZodTypeAny, {
1515
+ args?: string[] | undefined;
1516
+ listen?: string | undefined;
1517
+ sessionSource?: string | undefined;
1518
+ startupTimeoutMs?: number | undefined;
1519
+ requestTimeoutMs?: number | undefined;
1520
+ serviceName?: string | undefined;
1521
+ experimentalApi?: boolean | undefined;
1522
+ optOutNotificationMethods?: string[] | undefined;
1523
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1524
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1525
+ persistExtendedHistory?: boolean | undefined;
1526
+ experimentalRawEvents?: boolean | undefined;
1527
+ }, {
1528
+ args?: string[] | undefined;
1529
+ listen?: string | undefined;
1530
+ sessionSource?: string | undefined;
1531
+ startupTimeoutMs?: number | undefined;
1532
+ requestTimeoutMs?: number | undefined;
1533
+ serviceName?: string | undefined;
1534
+ experimentalApi?: boolean | undefined;
1535
+ optOutNotificationMethods?: string[] | undefined;
1536
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1537
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1538
+ persistExtendedHistory?: boolean | undefined;
1539
+ experimentalRawEvents?: boolean | undefined;
1540
+ }>>;
1224
1541
  input: z.ZodOptional<z.ZodEnum<["arg", "stdin"]>>;
1225
1542
  maxPromptArgChars: z.ZodOptional<z.ZodNumber>;
1226
1543
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1335,6 +1652,21 @@ export declare const AppConfigSchema: z.ZodObject<{
1335
1652
  args?: string[] | undefined;
1336
1653
  output?: "json" | "jsonl" | "text" | undefined;
1337
1654
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
1655
+ runtimeMode?: "exec" | "app-server" | undefined;
1656
+ appServer?: {
1657
+ args?: string[] | undefined;
1658
+ listen?: string | undefined;
1659
+ sessionSource?: string | undefined;
1660
+ startupTimeoutMs?: number | undefined;
1661
+ requestTimeoutMs?: number | undefined;
1662
+ serviceName?: string | undefined;
1663
+ experimentalApi?: boolean | undefined;
1664
+ optOutNotificationMethods?: string[] | undefined;
1665
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1666
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1667
+ persistExtendedHistory?: boolean | undefined;
1668
+ experimentalRawEvents?: boolean | undefined;
1669
+ } | undefined;
1338
1670
  input?: "arg" | "stdin" | undefined;
1339
1671
  maxPromptArgChars?: number | undefined;
1340
1672
  env?: Record<string, string> | undefined;
@@ -1373,6 +1705,21 @@ export declare const AppConfigSchema: z.ZodObject<{
1373
1705
  args?: string[] | undefined;
1374
1706
  output?: "json" | "jsonl" | "text" | undefined;
1375
1707
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
1708
+ runtimeMode?: "exec" | "app-server" | undefined;
1709
+ appServer?: {
1710
+ args?: string[] | undefined;
1711
+ listen?: string | undefined;
1712
+ sessionSource?: string | undefined;
1713
+ startupTimeoutMs?: number | undefined;
1714
+ requestTimeoutMs?: number | undefined;
1715
+ serviceName?: string | undefined;
1716
+ experimentalApi?: boolean | undefined;
1717
+ optOutNotificationMethods?: string[] | undefined;
1718
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1719
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1720
+ persistExtendedHistory?: boolean | undefined;
1721
+ experimentalRawEvents?: boolean | undefined;
1722
+ } | undefined;
1376
1723
  input?: "arg" | "stdin" | undefined;
1377
1724
  maxPromptArgChars?: number | undefined;
1378
1725
  env?: Record<string, string> | undefined;
@@ -1432,6 +1779,21 @@ export declare const AppConfigSchema: z.ZodObject<{
1432
1779
  args?: string[] | undefined;
1433
1780
  output?: "json" | "jsonl" | "text" | undefined;
1434
1781
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
1782
+ runtimeMode?: "exec" | "app-server" | undefined;
1783
+ appServer?: {
1784
+ args?: string[] | undefined;
1785
+ listen?: string | undefined;
1786
+ sessionSource?: string | undefined;
1787
+ startupTimeoutMs?: number | undefined;
1788
+ requestTimeoutMs?: number | undefined;
1789
+ serviceName?: string | undefined;
1790
+ experimentalApi?: boolean | undefined;
1791
+ optOutNotificationMethods?: string[] | undefined;
1792
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1793
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1794
+ persistExtendedHistory?: boolean | undefined;
1795
+ experimentalRawEvents?: boolean | undefined;
1796
+ } | undefined;
1435
1797
  input?: "arg" | "stdin" | undefined;
1436
1798
  maxPromptArgChars?: number | undefined;
1437
1799
  env?: Record<string, string> | undefined;
@@ -1483,6 +1845,21 @@ export declare const AppConfigSchema: z.ZodObject<{
1483
1845
  args?: string[] | undefined;
1484
1846
  output?: "json" | "jsonl" | "text" | undefined;
1485
1847
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
1848
+ runtimeMode?: "exec" | "app-server" | undefined;
1849
+ appServer?: {
1850
+ args?: string[] | undefined;
1851
+ listen?: string | undefined;
1852
+ sessionSource?: string | undefined;
1853
+ startupTimeoutMs?: number | undefined;
1854
+ requestTimeoutMs?: number | undefined;
1855
+ serviceName?: string | undefined;
1856
+ experimentalApi?: boolean | undefined;
1857
+ optOutNotificationMethods?: string[] | undefined;
1858
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1859
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1860
+ persistExtendedHistory?: boolean | undefined;
1861
+ experimentalRawEvents?: boolean | undefined;
1862
+ } | undefined;
1486
1863
  input?: "arg" | "stdin" | undefined;
1487
1864
  maxPromptArgChars?: number | undefined;
1488
1865
  env?: Record<string, string> | undefined;
@@ -1538,12 +1915,54 @@ export declare const AppConfigSchema: z.ZodObject<{
1538
1915
  fallbacks?: string[] | undefined;
1539
1916
  }>, z.ZodString]>>;
1540
1917
  workspace: z.ZodOptional<z.ZodString>;
1918
+ cliSessionId: z.ZodOptional<z.ZodString>;
1541
1919
  systemPrompt: z.ZodOptional<z.ZodString>;
1542
1920
  cliBackends: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1543
1921
  command: z.ZodOptional<z.ZodString>;
1544
1922
  args: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1545
1923
  output: z.ZodOptional<z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>>;
1546
1924
  resumeOutput: z.ZodOptional<z.ZodOptional<z.ZodEnum<["json", "jsonl", "text"]>>>;
1925
+ runtimeMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<["exec", "app-server"]>>>;
1926
+ appServer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
1927
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1928
+ listen: z.ZodOptional<z.ZodString>;
1929
+ sessionSource: z.ZodOptional<z.ZodString>;
1930
+ startupTimeoutMs: z.ZodOptional<z.ZodNumber>;
1931
+ requestTimeoutMs: z.ZodOptional<z.ZodNumber>;
1932
+ serviceName: z.ZodOptional<z.ZodString>;
1933
+ experimentalApi: z.ZodOptional<z.ZodBoolean>;
1934
+ optOutNotificationMethods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1935
+ approvalPolicy: z.ZodOptional<z.ZodEnum<["untrusted", "on-failure", "on-request", "never"]>>;
1936
+ sandbox: z.ZodOptional<z.ZodEnum<["read-only", "workspace-write", "danger-full-access"]>>;
1937
+ persistExtendedHistory: z.ZodOptional<z.ZodBoolean>;
1938
+ experimentalRawEvents: z.ZodOptional<z.ZodBoolean>;
1939
+ }, "strip", z.ZodTypeAny, {
1940
+ args?: string[] | undefined;
1941
+ listen?: string | undefined;
1942
+ sessionSource?: string | undefined;
1943
+ startupTimeoutMs?: number | undefined;
1944
+ requestTimeoutMs?: number | undefined;
1945
+ serviceName?: string | undefined;
1946
+ experimentalApi?: boolean | undefined;
1947
+ optOutNotificationMethods?: string[] | undefined;
1948
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1949
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1950
+ persistExtendedHistory?: boolean | undefined;
1951
+ experimentalRawEvents?: boolean | undefined;
1952
+ }, {
1953
+ args?: string[] | undefined;
1954
+ listen?: string | undefined;
1955
+ sessionSource?: string | undefined;
1956
+ startupTimeoutMs?: number | undefined;
1957
+ requestTimeoutMs?: number | undefined;
1958
+ serviceName?: string | undefined;
1959
+ experimentalApi?: boolean | undefined;
1960
+ optOutNotificationMethods?: string[] | undefined;
1961
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
1962
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
1963
+ persistExtendedHistory?: boolean | undefined;
1964
+ experimentalRawEvents?: boolean | undefined;
1965
+ }>>>;
1547
1966
  input: z.ZodOptional<z.ZodOptional<z.ZodEnum<["arg", "stdin"]>>>;
1548
1967
  maxPromptArgChars: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
1549
1968
  env: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
@@ -1654,10 +2073,25 @@ export declare const AppConfigSchema: z.ZodObject<{
1654
2073
  } | undefined;
1655
2074
  }>>>;
1656
2075
  }, "strip", z.ZodTypeAny, {
1657
- command?: string | undefined;
1658
2076
  args?: string[] | undefined;
2077
+ command?: string | undefined;
1659
2078
  output?: "json" | "jsonl" | "text" | undefined;
1660
2079
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2080
+ runtimeMode?: "exec" | "app-server" | undefined;
2081
+ appServer?: {
2082
+ args?: string[] | undefined;
2083
+ listen?: string | undefined;
2084
+ sessionSource?: string | undefined;
2085
+ startupTimeoutMs?: number | undefined;
2086
+ requestTimeoutMs?: number | undefined;
2087
+ serviceName?: string | undefined;
2088
+ experimentalApi?: boolean | undefined;
2089
+ optOutNotificationMethods?: string[] | undefined;
2090
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2091
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2092
+ persistExtendedHistory?: boolean | undefined;
2093
+ experimentalRawEvents?: boolean | undefined;
2094
+ } | undefined;
1661
2095
  input?: "arg" | "stdin" | undefined;
1662
2096
  maxPromptArgChars?: number | undefined;
1663
2097
  env?: Record<string, string> | undefined;
@@ -1692,10 +2126,25 @@ export declare const AppConfigSchema: z.ZodObject<{
1692
2126
  } | undefined;
1693
2127
  } | undefined;
1694
2128
  }, {
1695
- command?: string | undefined;
1696
2129
  args?: string[] | undefined;
2130
+ command?: string | undefined;
1697
2131
  output?: "json" | "jsonl" | "text" | undefined;
1698
2132
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2133
+ runtimeMode?: "exec" | "app-server" | undefined;
2134
+ appServer?: {
2135
+ args?: string[] | undefined;
2136
+ listen?: string | undefined;
2137
+ sessionSource?: string | undefined;
2138
+ startupTimeoutMs?: number | undefined;
2139
+ requestTimeoutMs?: number | undefined;
2140
+ serviceName?: string | undefined;
2141
+ experimentalApi?: boolean | undefined;
2142
+ optOutNotificationMethods?: string[] | undefined;
2143
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2144
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2145
+ persistExtendedHistory?: boolean | undefined;
2146
+ experimentalRawEvents?: boolean | undefined;
2147
+ } | undefined;
1699
2148
  input?: "arg" | "stdin" | undefined;
1700
2149
  maxPromptArgChars?: number | undefined;
1701
2150
  env?: Record<string, string> | undefined;
@@ -1755,17 +2204,33 @@ export declare const AppConfigSchema: z.ZodObject<{
1755
2204
  }>>;
1756
2205
  }, "strip", z.ZodTypeAny, {
1757
2206
  id: string;
2207
+ default?: boolean | undefined;
2208
+ env?: Record<string, string> | undefined;
2209
+ clearEnv?: string[] | undefined;
1758
2210
  model?: string | {
1759
2211
  primary: string;
1760
2212
  fallbacks?: string[] | undefined;
1761
2213
  } | undefined;
1762
- env?: Record<string, string> | undefined;
1763
- clearEnv?: string[] | undefined;
1764
2214
  cliBackends?: Record<string, {
1765
- command?: string | undefined;
1766
2215
  args?: string[] | undefined;
2216
+ command?: string | undefined;
1767
2217
  output?: "json" | "jsonl" | "text" | undefined;
1768
2218
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2219
+ runtimeMode?: "exec" | "app-server" | undefined;
2220
+ appServer?: {
2221
+ args?: string[] | undefined;
2222
+ listen?: string | undefined;
2223
+ sessionSource?: string | undefined;
2224
+ startupTimeoutMs?: number | undefined;
2225
+ requestTimeoutMs?: number | undefined;
2226
+ serviceName?: string | undefined;
2227
+ experimentalApi?: boolean | undefined;
2228
+ optOutNotificationMethods?: string[] | undefined;
2229
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2230
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2231
+ persistExtendedHistory?: boolean | undefined;
2232
+ experimentalRawEvents?: boolean | undefined;
2233
+ } | undefined;
1769
2234
  input?: "arg" | "stdin" | undefined;
1770
2235
  maxPromptArgChars?: number | undefined;
1771
2236
  env?: Record<string, string> | undefined;
@@ -1804,9 +2269,9 @@ export declare const AppConfigSchema: z.ZodObject<{
1804
2269
  allow?: string[] | undefined;
1805
2270
  deny?: string[] | undefined;
1806
2271
  } | undefined;
1807
- default?: boolean | undefined;
1808
2272
  name?: string | undefined;
1809
2273
  workspace?: string | undefined;
2274
+ cliSessionId?: string | undefined;
1810
2275
  systemPrompt?: string | undefined;
1811
2276
  skills?: string[] | undefined;
1812
2277
  identity?: {
@@ -1815,17 +2280,33 @@ export declare const AppConfigSchema: z.ZodObject<{
1815
2280
  } | undefined;
1816
2281
  }, {
1817
2282
  id: string;
2283
+ default?: boolean | undefined;
2284
+ env?: Record<string, string> | undefined;
2285
+ clearEnv?: string[] | undefined;
1818
2286
  model?: string | {
1819
2287
  primary: string;
1820
2288
  fallbacks?: string[] | undefined;
1821
2289
  } | undefined;
1822
- env?: Record<string, string> | undefined;
1823
- clearEnv?: string[] | undefined;
1824
2290
  cliBackends?: Record<string, {
1825
- command?: string | undefined;
1826
2291
  args?: string[] | undefined;
2292
+ command?: string | undefined;
1827
2293
  output?: "json" | "jsonl" | "text" | undefined;
1828
2294
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2295
+ runtimeMode?: "exec" | "app-server" | undefined;
2296
+ appServer?: {
2297
+ args?: string[] | undefined;
2298
+ listen?: string | undefined;
2299
+ sessionSource?: string | undefined;
2300
+ startupTimeoutMs?: number | undefined;
2301
+ requestTimeoutMs?: number | undefined;
2302
+ serviceName?: string | undefined;
2303
+ experimentalApi?: boolean | undefined;
2304
+ optOutNotificationMethods?: string[] | undefined;
2305
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2306
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2307
+ persistExtendedHistory?: boolean | undefined;
2308
+ experimentalRawEvents?: boolean | undefined;
2309
+ } | undefined;
1829
2310
  input?: "arg" | "stdin" | undefined;
1830
2311
  maxPromptArgChars?: number | undefined;
1831
2312
  env?: Record<string, string> | undefined;
@@ -1864,9 +2345,9 @@ export declare const AppConfigSchema: z.ZodObject<{
1864
2345
  allow?: string[] | undefined;
1865
2346
  deny?: string[] | undefined;
1866
2347
  } | undefined;
1867
- default?: boolean | undefined;
1868
2348
  name?: string | undefined;
1869
2349
  workspace?: string | undefined;
2350
+ cliSessionId?: string | undefined;
1870
2351
  systemPrompt?: string | undefined;
1871
2352
  skills?: string[] | undefined;
1872
2353
  identity?: {
@@ -1887,6 +2368,21 @@ export declare const AppConfigSchema: z.ZodObject<{
1887
2368
  args?: string[] | undefined;
1888
2369
  output?: "json" | "jsonl" | "text" | undefined;
1889
2370
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2371
+ runtimeMode?: "exec" | "app-server" | undefined;
2372
+ appServer?: {
2373
+ args?: string[] | undefined;
2374
+ listen?: string | undefined;
2375
+ sessionSource?: string | undefined;
2376
+ startupTimeoutMs?: number | undefined;
2377
+ requestTimeoutMs?: number | undefined;
2378
+ serviceName?: string | undefined;
2379
+ experimentalApi?: boolean | undefined;
2380
+ optOutNotificationMethods?: string[] | undefined;
2381
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2382
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2383
+ persistExtendedHistory?: boolean | undefined;
2384
+ experimentalRawEvents?: boolean | undefined;
2385
+ } | undefined;
1890
2386
  input?: "arg" | "stdin" | undefined;
1891
2387
  maxPromptArgChars?: number | undefined;
1892
2388
  env?: Record<string, string> | undefined;
@@ -1929,17 +2425,33 @@ export declare const AppConfigSchema: z.ZodObject<{
1929
2425
  };
1930
2426
  list?: {
1931
2427
  id: string;
2428
+ default?: boolean | undefined;
2429
+ env?: Record<string, string> | undefined;
2430
+ clearEnv?: string[] | undefined;
1932
2431
  model?: string | {
1933
2432
  primary: string;
1934
2433
  fallbacks?: string[] | undefined;
1935
2434
  } | undefined;
1936
- env?: Record<string, string> | undefined;
1937
- clearEnv?: string[] | undefined;
1938
2435
  cliBackends?: Record<string, {
1939
- command?: string | undefined;
1940
2436
  args?: string[] | undefined;
2437
+ command?: string | undefined;
1941
2438
  output?: "json" | "jsonl" | "text" | undefined;
1942
2439
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2440
+ runtimeMode?: "exec" | "app-server" | undefined;
2441
+ appServer?: {
2442
+ args?: string[] | undefined;
2443
+ listen?: string | undefined;
2444
+ sessionSource?: string | undefined;
2445
+ startupTimeoutMs?: number | undefined;
2446
+ requestTimeoutMs?: number | undefined;
2447
+ serviceName?: string | undefined;
2448
+ experimentalApi?: boolean | undefined;
2449
+ optOutNotificationMethods?: string[] | undefined;
2450
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2451
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2452
+ persistExtendedHistory?: boolean | undefined;
2453
+ experimentalRawEvents?: boolean | undefined;
2454
+ } | undefined;
1943
2455
  input?: "arg" | "stdin" | undefined;
1944
2456
  maxPromptArgChars?: number | undefined;
1945
2457
  env?: Record<string, string> | undefined;
@@ -1978,9 +2490,9 @@ export declare const AppConfigSchema: z.ZodObject<{
1978
2490
  allow?: string[] | undefined;
1979
2491
  deny?: string[] | undefined;
1980
2492
  } | undefined;
1981
- default?: boolean | undefined;
1982
2493
  name?: string | undefined;
1983
2494
  workspace?: string | undefined;
2495
+ cliSessionId?: string | undefined;
1984
2496
  systemPrompt?: string | undefined;
1985
2497
  skills?: string[] | undefined;
1986
2498
  identity?: {
@@ -2001,6 +2513,21 @@ export declare const AppConfigSchema: z.ZodObject<{
2001
2513
  args?: string[] | undefined;
2002
2514
  output?: "json" | "jsonl" | "text" | undefined;
2003
2515
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2516
+ runtimeMode?: "exec" | "app-server" | undefined;
2517
+ appServer?: {
2518
+ args?: string[] | undefined;
2519
+ listen?: string | undefined;
2520
+ sessionSource?: string | undefined;
2521
+ startupTimeoutMs?: number | undefined;
2522
+ requestTimeoutMs?: number | undefined;
2523
+ serviceName?: string | undefined;
2524
+ experimentalApi?: boolean | undefined;
2525
+ optOutNotificationMethods?: string[] | undefined;
2526
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2527
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2528
+ persistExtendedHistory?: boolean | undefined;
2529
+ experimentalRawEvents?: boolean | undefined;
2530
+ } | undefined;
2004
2531
  input?: "arg" | "stdin" | undefined;
2005
2532
  maxPromptArgChars?: number | undefined;
2006
2533
  env?: Record<string, string> | undefined;
@@ -2043,17 +2570,33 @@ export declare const AppConfigSchema: z.ZodObject<{
2043
2570
  };
2044
2571
  list?: {
2045
2572
  id: string;
2573
+ default?: boolean | undefined;
2574
+ env?: Record<string, string> | undefined;
2575
+ clearEnv?: string[] | undefined;
2046
2576
  model?: string | {
2047
2577
  primary: string;
2048
2578
  fallbacks?: string[] | undefined;
2049
2579
  } | undefined;
2050
- env?: Record<string, string> | undefined;
2051
- clearEnv?: string[] | undefined;
2052
2580
  cliBackends?: Record<string, {
2053
- command?: string | undefined;
2054
2581
  args?: string[] | undefined;
2582
+ command?: string | undefined;
2055
2583
  output?: "json" | "jsonl" | "text" | undefined;
2056
2584
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2585
+ runtimeMode?: "exec" | "app-server" | undefined;
2586
+ appServer?: {
2587
+ args?: string[] | undefined;
2588
+ listen?: string | undefined;
2589
+ sessionSource?: string | undefined;
2590
+ startupTimeoutMs?: number | undefined;
2591
+ requestTimeoutMs?: number | undefined;
2592
+ serviceName?: string | undefined;
2593
+ experimentalApi?: boolean | undefined;
2594
+ optOutNotificationMethods?: string[] | undefined;
2595
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2596
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2597
+ persistExtendedHistory?: boolean | undefined;
2598
+ experimentalRawEvents?: boolean | undefined;
2599
+ } | undefined;
2057
2600
  input?: "arg" | "stdin" | undefined;
2058
2601
  maxPromptArgChars?: number | undefined;
2059
2602
  env?: Record<string, string> | undefined;
@@ -2092,9 +2635,9 @@ export declare const AppConfigSchema: z.ZodObject<{
2092
2635
  allow?: string[] | undefined;
2093
2636
  deny?: string[] | undefined;
2094
2637
  } | undefined;
2095
- default?: boolean | undefined;
2096
2638
  name?: string | undefined;
2097
2639
  workspace?: string | undefined;
2640
+ cliSessionId?: string | undefined;
2098
2641
  systemPrompt?: string | undefined;
2099
2642
  skills?: string[] | undefined;
2100
2643
  identity?: {
@@ -2121,16 +2664,16 @@ export declare const AppConfigSchema: z.ZodObject<{
2121
2664
  }>>;
2122
2665
  userId: z.ZodOptional<z.ZodString>;
2123
2666
  }, "strip", z.ZodTypeAny, {
2124
- channel?: string | undefined;
2125
2667
  accountId?: string | undefined;
2668
+ channel?: string | undefined;
2126
2669
  peer?: {
2127
2670
  id?: string | undefined;
2128
2671
  kind?: "private" | "group" | "multi_bot" | undefined;
2129
2672
  } | undefined;
2130
2673
  userId?: string | undefined;
2131
2674
  }, {
2132
- channel?: string | undefined;
2133
2675
  accountId?: string | undefined;
2676
+ channel?: string | undefined;
2134
2677
  peer?: {
2135
2678
  id?: string | undefined;
2136
2679
  kind?: "private" | "group" | "multi_bot" | undefined;
@@ -2140,8 +2683,8 @@ export declare const AppConfigSchema: z.ZodObject<{
2140
2683
  }, "strip", z.ZodTypeAny, {
2141
2684
  agentId: string;
2142
2685
  match: {
2143
- channel?: string | undefined;
2144
2686
  accountId?: string | undefined;
2687
+ channel?: string | undefined;
2145
2688
  peer?: {
2146
2689
  id?: string | undefined;
2147
2690
  kind?: "private" | "group" | "multi_bot" | undefined;
@@ -2152,8 +2695,8 @@ export declare const AppConfigSchema: z.ZodObject<{
2152
2695
  }, {
2153
2696
  agentId: string;
2154
2697
  match: {
2155
- channel?: string | undefined;
2156
2698
  accountId?: string | undefined;
2699
+ channel?: string | undefined;
2157
2700
  peer?: {
2158
2701
  id?: string | undefined;
2159
2702
  kind?: "private" | "group" | "multi_bot" | undefined;
@@ -2190,6 +2733,9 @@ export declare const AppConfigSchema: z.ZodObject<{
2190
2733
  pretty?: boolean | undefined;
2191
2734
  }>>;
2192
2735
  }, "strip", z.ZodTypeAny, {
2736
+ skills: {
2737
+ dirs: string[];
2738
+ };
2193
2739
  channels: {
2194
2740
  botlink: {
2195
2741
  poll_timeout: number;
@@ -2219,6 +2765,21 @@ export declare const AppConfigSchema: z.ZodObject<{
2219
2765
  args?: string[] | undefined;
2220
2766
  output?: "json" | "jsonl" | "text" | undefined;
2221
2767
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2768
+ runtimeMode?: "exec" | "app-server" | undefined;
2769
+ appServer?: {
2770
+ args?: string[] | undefined;
2771
+ listen?: string | undefined;
2772
+ sessionSource?: string | undefined;
2773
+ startupTimeoutMs?: number | undefined;
2774
+ requestTimeoutMs?: number | undefined;
2775
+ serviceName?: string | undefined;
2776
+ experimentalApi?: boolean | undefined;
2777
+ optOutNotificationMethods?: string[] | undefined;
2778
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2779
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2780
+ persistExtendedHistory?: boolean | undefined;
2781
+ experimentalRawEvents?: boolean | undefined;
2782
+ } | undefined;
2222
2783
  input?: "arg" | "stdin" | undefined;
2223
2784
  maxPromptArgChars?: number | undefined;
2224
2785
  env?: Record<string, string> | undefined;
@@ -2261,17 +2822,33 @@ export declare const AppConfigSchema: z.ZodObject<{
2261
2822
  };
2262
2823
  list?: {
2263
2824
  id: string;
2825
+ default?: boolean | undefined;
2826
+ env?: Record<string, string> | undefined;
2827
+ clearEnv?: string[] | undefined;
2264
2828
  model?: string | {
2265
2829
  primary: string;
2266
2830
  fallbacks?: string[] | undefined;
2267
2831
  } | undefined;
2268
- env?: Record<string, string> | undefined;
2269
- clearEnv?: string[] | undefined;
2270
2832
  cliBackends?: Record<string, {
2271
- command?: string | undefined;
2272
2833
  args?: string[] | undefined;
2834
+ command?: string | undefined;
2273
2835
  output?: "json" | "jsonl" | "text" | undefined;
2274
2836
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2837
+ runtimeMode?: "exec" | "app-server" | undefined;
2838
+ appServer?: {
2839
+ args?: string[] | undefined;
2840
+ listen?: string | undefined;
2841
+ sessionSource?: string | undefined;
2842
+ startupTimeoutMs?: number | undefined;
2843
+ requestTimeoutMs?: number | undefined;
2844
+ serviceName?: string | undefined;
2845
+ experimentalApi?: boolean | undefined;
2846
+ optOutNotificationMethods?: string[] | undefined;
2847
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2848
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2849
+ persistExtendedHistory?: boolean | undefined;
2850
+ experimentalRawEvents?: boolean | undefined;
2851
+ } | undefined;
2275
2852
  input?: "arg" | "stdin" | undefined;
2276
2853
  maxPromptArgChars?: number | undefined;
2277
2854
  env?: Record<string, string> | undefined;
@@ -2310,9 +2887,9 @@ export declare const AppConfigSchema: z.ZodObject<{
2310
2887
  allow?: string[] | undefined;
2311
2888
  deny?: string[] | undefined;
2312
2889
  } | undefined;
2313
- default?: boolean | undefined;
2314
2890
  name?: string | undefined;
2315
2891
  workspace?: string | undefined;
2892
+ cliSessionId?: string | undefined;
2316
2893
  systemPrompt?: string | undefined;
2317
2894
  skills?: string[] | undefined;
2318
2895
  identity?: {
@@ -2321,9 +2898,6 @@ export declare const AppConfigSchema: z.ZodObject<{
2321
2898
  } | undefined;
2322
2899
  }[] | undefined;
2323
2900
  };
2324
- skills: {
2325
- dirs: string[];
2326
- };
2327
2901
  files: {
2328
2902
  temp_dir: string;
2329
2903
  max_file_size: number;
@@ -2335,8 +2909,8 @@ export declare const AppConfigSchema: z.ZodObject<{
2335
2909
  bindings?: {
2336
2910
  agentId: string;
2337
2911
  match: {
2338
- channel?: string | undefined;
2339
2912
  accountId?: string | undefined;
2913
+ channel?: string | undefined;
2340
2914
  peer?: {
2341
2915
  id?: string | undefined;
2342
2916
  kind?: "private" | "group" | "multi_bot" | undefined;
@@ -2375,6 +2949,21 @@ export declare const AppConfigSchema: z.ZodObject<{
2375
2949
  args?: string[] | undefined;
2376
2950
  output?: "json" | "jsonl" | "text" | undefined;
2377
2951
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
2952
+ runtimeMode?: "exec" | "app-server" | undefined;
2953
+ appServer?: {
2954
+ args?: string[] | undefined;
2955
+ listen?: string | undefined;
2956
+ sessionSource?: string | undefined;
2957
+ startupTimeoutMs?: number | undefined;
2958
+ requestTimeoutMs?: number | undefined;
2959
+ serviceName?: string | undefined;
2960
+ experimentalApi?: boolean | undefined;
2961
+ optOutNotificationMethods?: string[] | undefined;
2962
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
2963
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
2964
+ persistExtendedHistory?: boolean | undefined;
2965
+ experimentalRawEvents?: boolean | undefined;
2966
+ } | undefined;
2378
2967
  input?: "arg" | "stdin" | undefined;
2379
2968
  maxPromptArgChars?: number | undefined;
2380
2969
  env?: Record<string, string> | undefined;
@@ -2417,17 +3006,33 @@ export declare const AppConfigSchema: z.ZodObject<{
2417
3006
  };
2418
3007
  list?: {
2419
3008
  id: string;
3009
+ default?: boolean | undefined;
3010
+ env?: Record<string, string> | undefined;
3011
+ clearEnv?: string[] | undefined;
2420
3012
  model?: string | {
2421
3013
  primary: string;
2422
3014
  fallbacks?: string[] | undefined;
2423
3015
  } | undefined;
2424
- env?: Record<string, string> | undefined;
2425
- clearEnv?: string[] | undefined;
2426
3016
  cliBackends?: Record<string, {
2427
- command?: string | undefined;
2428
3017
  args?: string[] | undefined;
3018
+ command?: string | undefined;
2429
3019
  output?: "json" | "jsonl" | "text" | undefined;
2430
3020
  resumeOutput?: "json" | "jsonl" | "text" | undefined;
3021
+ runtimeMode?: "exec" | "app-server" | undefined;
3022
+ appServer?: {
3023
+ args?: string[] | undefined;
3024
+ listen?: string | undefined;
3025
+ sessionSource?: string | undefined;
3026
+ startupTimeoutMs?: number | undefined;
3027
+ requestTimeoutMs?: number | undefined;
3028
+ serviceName?: string | undefined;
3029
+ experimentalApi?: boolean | undefined;
3030
+ optOutNotificationMethods?: string[] | undefined;
3031
+ approvalPolicy?: "untrusted" | "on-failure" | "on-request" | "never" | undefined;
3032
+ sandbox?: "read-only" | "workspace-write" | "danger-full-access" | undefined;
3033
+ persistExtendedHistory?: boolean | undefined;
3034
+ experimentalRawEvents?: boolean | undefined;
3035
+ } | undefined;
2431
3036
  input?: "arg" | "stdin" | undefined;
2432
3037
  maxPromptArgChars?: number | undefined;
2433
3038
  env?: Record<string, string> | undefined;
@@ -2466,9 +3071,9 @@ export declare const AppConfigSchema: z.ZodObject<{
2466
3071
  allow?: string[] | undefined;
2467
3072
  deny?: string[] | undefined;
2468
3073
  } | undefined;
2469
- default?: boolean | undefined;
2470
3074
  name?: string | undefined;
2471
3075
  workspace?: string | undefined;
3076
+ cliSessionId?: string | undefined;
2472
3077
  systemPrompt?: string | undefined;
2473
3078
  skills?: string[] | undefined;
2474
3079
  identity?: {
@@ -2483,8 +3088,8 @@ export declare const AppConfigSchema: z.ZodObject<{
2483
3088
  bindings?: {
2484
3089
  agentId: string;
2485
3090
  match: {
2486
- channel?: string | undefined;
2487
3091
  accountId?: string | undefined;
3092
+ channel?: string | undefined;
2488
3093
  peer?: {
2489
3094
  id?: string | undefined;
2490
3095
  kind?: "private" | "group" | "multi_bot" | undefined;