@tai42/api-client 13.3.0 → 15.0.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.
package/dist/client.d.ts CHANGED
@@ -46,9 +46,7 @@ export interface ApiKeyBody {
46
46
  readonly description: string;
47
47
  readonly scopes: string[];
48
48
  readonly policy_data?: Record<string, unknown> | null;
49
- readonly condition?: string | null;
50
- readonly condition_id?: string | null;
51
- readonly condition_kwargs?: Record<string, unknown> | null;
49
+ readonly condition?: s.TemplatedText | null;
52
50
  }
53
51
  /**
54
52
  * Body for one-time claim-link creation (POST `/api/auth/claim-links`). The
@@ -61,16 +59,13 @@ export interface ClaimLinkBody {
61
59
  readonly ttl_seconds?: number | null;
62
60
  }
63
61
  /**
64
- * Body for the fail-closed jq guard (POST `/api/auth/validate-condition`).
65
- * `condition` (inline jq) and `condition_id` (named template) are mutually
66
- * exclusive — send exactly one. `sample_context` is a `JqAuthContext`-shaped
67
- * sample; when present the guard also evaluates the condition against it and
68
- * returns the boolean `result` (else `result` is `null`).
62
+ * Body for the fail-closed jq guard (POST `/api/auth/validate-condition`). The guard
63
+ * compile-checks the inline jq `condition` the author typed. `sample_context` is a
64
+ * `JqAuthContext`-shaped sample; when present the guard also evaluates the condition
65
+ * against it and returns the boolean `result` (else `result` is `null`).
69
66
  */
70
67
  export interface ValidateConditionBody {
71
68
  readonly condition?: string;
72
- readonly condition_id?: string;
73
- readonly condition_kwargs?: Record<string, unknown>;
74
69
  readonly sample_context?: Record<string, unknown>;
75
70
  }
76
71
  /**
@@ -167,6 +162,7 @@ export interface CreatePresetBody {
167
162
  readonly extensions?: readonly s.PresetExtensionElement[][];
168
163
  readonly output_schema?: Record<string, unknown> | null;
169
164
  readonly input_schema?: Record<string, unknown> | null;
165
+ readonly state_binding?: s.StateBinding | null;
170
166
  }
171
167
  /**
172
168
  * Body for saving a new preset version (POST `/api/presets/{name}/versions`). At
@@ -174,10 +170,11 @@ export interface CreatePresetBody {
174
170
  * sentinel is uniform: omitted carries the active version's value forward; an
175
171
  * explicit `[]` clears `extensions`, and an explicit `null` clears `output_schema`
176
172
  * or `input_schema`. `input_schema` is the optional author-set input JSON Schema and
177
- * follows the same carry-forward sentinel as `output_schema`. `description` carries
178
- * forward when omitted; an explicit non-empty string sets it (the API rejects an
179
- * explicit empty one). Categorization tags are not a version field — they live in the
180
- * tool_meta overlay.
173
+ * follows the same carry-forward sentinel as `output_schema`. `state_binding` is the
174
+ * optional door-layer binding and follows the same sentinel: omitted carries the active
175
+ * one forward, an explicit `null` clears it. `description` carries forward when omitted;
176
+ * an explicit non-empty string sets it (the API rejects an explicit empty one).
177
+ * Categorization tags are not a version field — they live in the tool_meta overlay.
181
178
  */
182
179
  export interface SavePresetVersionBody {
183
180
  readonly fixed_kwargs?: Record<string, unknown>;
@@ -185,6 +182,7 @@ export interface SavePresetVersionBody {
185
182
  readonly extensions?: readonly s.PresetExtensionElement[][];
186
183
  readonly output_schema?: Record<string, unknown> | null;
187
184
  readonly input_schema?: Record<string, unknown> | null;
185
+ readonly state_binding?: s.StateBinding | null;
188
186
  }
189
187
  /**
190
188
  * Body for the dry-run validate door (POST `/api/presets/validate`). `name` is
@@ -201,6 +199,7 @@ export interface ValidatePresetBody {
201
199
  readonly extensions?: readonly s.PresetExtensionElement[][];
202
200
  readonly output_schema?: Record<string, unknown> | null;
203
201
  readonly input_schema?: Record<string, unknown> | null;
202
+ readonly state_binding?: s.StateBinding | null;
204
203
  }
205
204
  /**
206
205
  * Merge-patch body for a tool's overlay row (PATCH
@@ -399,8 +398,8 @@ export interface StateDeclarationBody {
399
398
  readonly default_subject_kind: string;
400
399
  readonly retention_days?: number | null;
401
400
  }
402
- /** A state-module document write body (`PUT /api/state-modules/{name}`, the platform half). */
403
- export interface StateModuleBody {
401
+ /** A state-template document write body (`PUT /api/state-templates/{name}`, the platform half). */
402
+ export interface StateTemplateBody {
404
403
  readonly name: string;
405
404
  readonly description?: string;
406
405
  readonly parameters?: Record<string, unknown>;
@@ -409,11 +408,12 @@ export interface StateModuleBody {
409
408
  readonly declarations?: Record<string, unknown> | null;
410
409
  readonly trace?: Record<string, unknown>;
411
410
  }
412
- /** A module mount / re-mount body (`PUT|PATCH /api/states/{name}/mounts/{module}`). */
413
- export interface StateMountBody {
411
+ /** A template attach / re-attach body (`PUT|PATCH /api/states/{name}/attachments/{template}`). */
412
+ export interface StateAttachmentBody {
414
413
  readonly path?: string[];
415
414
  readonly parameters?: Record<string, unknown>;
416
415
  readonly declarations?: Record<string, unknown>;
416
+ readonly options?: Record<string, unknown>;
417
417
  }
418
418
  /** The four-part subject a record route addresses in its path. */
419
419
  export interface StateSubjectRef {
@@ -502,6 +502,7 @@ export declare function createApiClient(config: ApiConfig): {
502
502
  config: Record<string, unknown>;
503
503
  })[][];
504
504
  output_schema: Record<string, unknown> | null;
505
+ input_schema: Record<string, unknown> | null;
505
506
  conflicted: boolean;
506
507
  conflicted_reason: string | null;
507
508
  uses: string[];
@@ -517,6 +518,7 @@ export declare function createApiClient(config: ApiConfig): {
517
518
  config: Record<string, unknown>;
518
519
  })[][];
519
520
  output_schema: Record<string, unknown> | null;
521
+ input_schema: Record<string, unknown> | null;
520
522
  conflicted: boolean;
521
523
  conflicted_reason: string | null;
522
524
  uses: string[];
@@ -532,6 +534,7 @@ export declare function createApiClient(config: ApiConfig): {
532
534
  config: Record<string, unknown>;
533
535
  })[][];
534
536
  output_schema: Record<string, unknown> | null;
537
+ input_schema: Record<string, unknown> | null;
535
538
  conflicted: boolean;
536
539
  conflicted_reason: string | null;
537
540
  uses: string[];
@@ -549,6 +552,50 @@ export declare function createApiClient(config: ApiConfig): {
549
552
  config: Record<string, unknown>;
550
553
  })[][];
551
554
  output_schema: Record<string, unknown> | null;
555
+ input_schema: Record<string, unknown> | null;
556
+ state_binding: {
557
+ states: {
558
+ state: string;
559
+ templates: string[];
560
+ subject_expr: {
561
+ content?: string | undefined;
562
+ id?: string | undefined;
563
+ kwargs?: Record<string, unknown> | undefined;
564
+ };
565
+ scope_expr: {
566
+ content?: string | undefined;
567
+ id?: string | undefined;
568
+ kwargs?: Record<string, unknown> | undefined;
569
+ } | null;
570
+ input_injections: {
571
+ template_jq: string | null;
572
+ jq: {
573
+ content?: string | undefined;
574
+ id?: string | undefined;
575
+ kwargs?: Record<string, unknown> | undefined;
576
+ } | null;
577
+ into: string;
578
+ }[];
579
+ updates: {
580
+ template_jq: string | null;
581
+ jq: {
582
+ content?: string | undefined;
583
+ id?: string | undefined;
584
+ kwargs?: Record<string, unknown> | undefined;
585
+ } | null;
586
+ adapter: {
587
+ content?: string | undefined;
588
+ id?: string | undefined;
589
+ kwargs?: Record<string, unknown> | undefined;
590
+ } | null;
591
+ op_id: {
592
+ content?: string | undefined;
593
+ id?: string | undefined;
594
+ kwargs?: Record<string, unknown> | undefined;
595
+ } | null;
596
+ }[];
597
+ }[];
598
+ } | null;
552
599
  };
553
600
  tags: string[];
554
601
  created_at: string;
@@ -565,6 +612,50 @@ export declare function createApiClient(config: ApiConfig): {
565
612
  config: Record<string, unknown>;
566
613
  })[][];
567
614
  output_schema: Record<string, unknown> | null;
615
+ input_schema: Record<string, unknown> | null;
616
+ state_binding: {
617
+ states: {
618
+ state: string;
619
+ templates: string[];
620
+ subject_expr: {
621
+ content?: string | undefined;
622
+ id?: string | undefined;
623
+ kwargs?: Record<string, unknown> | undefined;
624
+ };
625
+ scope_expr: {
626
+ content?: string | undefined;
627
+ id?: string | undefined;
628
+ kwargs?: Record<string, unknown> | undefined;
629
+ } | null;
630
+ input_injections: {
631
+ template_jq: string | null;
632
+ jq: {
633
+ content?: string | undefined;
634
+ id?: string | undefined;
635
+ kwargs?: Record<string, unknown> | undefined;
636
+ } | null;
637
+ into: string;
638
+ }[];
639
+ updates: {
640
+ template_jq: string | null;
641
+ jq: {
642
+ content?: string | undefined;
643
+ id?: string | undefined;
644
+ kwargs?: Record<string, unknown> | undefined;
645
+ } | null;
646
+ adapter: {
647
+ content?: string | undefined;
648
+ id?: string | undefined;
649
+ kwargs?: Record<string, unknown> | undefined;
650
+ } | null;
651
+ op_id: {
652
+ content?: string | undefined;
653
+ id?: string | undefined;
654
+ kwargs?: Record<string, unknown> | undefined;
655
+ } | null;
656
+ }[];
657
+ }[];
658
+ } | null;
568
659
  };
569
660
  tags: string[];
570
661
  created_at: string;
@@ -581,6 +672,50 @@ export declare function createApiClient(config: ApiConfig): {
581
672
  config: Record<string, unknown>;
582
673
  })[][];
583
674
  output_schema: Record<string, unknown> | null;
675
+ input_schema: Record<string, unknown> | null;
676
+ state_binding: {
677
+ states: {
678
+ state: string;
679
+ templates: string[];
680
+ subject_expr: {
681
+ content?: string | undefined;
682
+ id?: string | undefined;
683
+ kwargs?: Record<string, unknown> | undefined;
684
+ };
685
+ scope_expr: {
686
+ content?: string | undefined;
687
+ id?: string | undefined;
688
+ kwargs?: Record<string, unknown> | undefined;
689
+ } | null;
690
+ input_injections: {
691
+ template_jq: string | null;
692
+ jq: {
693
+ content?: string | undefined;
694
+ id?: string | undefined;
695
+ kwargs?: Record<string, unknown> | undefined;
696
+ } | null;
697
+ into: string;
698
+ }[];
699
+ updates: {
700
+ template_jq: string | null;
701
+ jq: {
702
+ content?: string | undefined;
703
+ id?: string | undefined;
704
+ kwargs?: Record<string, unknown> | undefined;
705
+ } | null;
706
+ adapter: {
707
+ content?: string | undefined;
708
+ id?: string | undefined;
709
+ kwargs?: Record<string, unknown> | undefined;
710
+ } | null;
711
+ op_id: {
712
+ content?: string | undefined;
713
+ id?: string | undefined;
714
+ kwargs?: Record<string, unknown> | undefined;
715
+ } | null;
716
+ }[];
717
+ }[];
718
+ } | null;
584
719
  };
585
720
  tags: string[];
586
721
  created_at: string;
@@ -630,8 +765,8 @@ export declare function createApiClient(config: ApiConfig): {
630
765
  subject_kinds: string[];
631
766
  default_subject_kind: string;
632
767
  retention_days: number | null;
633
- mounts: {
634
- module: string;
768
+ attachments: {
769
+ template: string;
635
770
  path: string[];
636
771
  parameters: Record<string, unknown>;
637
772
  declarations: Record<string, unknown>;
@@ -646,8 +781,8 @@ export declare function createApiClient(config: ApiConfig): {
646
781
  subject_kinds: string[];
647
782
  default_subject_kind: string;
648
783
  retention_days: number | null;
649
- mounts: {
650
- module: string;
784
+ attachments: {
785
+ template: string;
651
786
  path: string[];
652
787
  parameters: Record<string, unknown>;
653
788
  declarations: Record<string, unknown>;
@@ -665,32 +800,32 @@ export declare function createApiClient(config: ApiConfig): {
665
800
  per_kind: Record<string, number>;
666
801
  consumers: number;
667
802
  }>;
668
- readonly listStateMounts: (name: string, signal?: AbortSignal) => Promise<{
669
- module: string;
803
+ readonly listStateAttachments: (name: string, signal?: AbortSignal) => Promise<{
804
+ template: string;
670
805
  path: string[];
671
806
  parameters: Record<string, unknown>;
672
807
  declarations: Record<string, unknown>;
673
808
  }[]>;
674
- readonly getStateMount: (name: string, module: string, signal?: AbortSignal) => Promise<{
675
- module: string;
809
+ readonly getStateAttachment: (name: string, template: string, signal?: AbortSignal) => Promise<{
810
+ template: string;
676
811
  path: string[];
677
812
  parameters: Record<string, unknown>;
678
813
  declarations: Record<string, unknown>;
679
814
  }>;
680
- readonly mountStateModule: (name: string, module: string, body: StateMountBody) => Promise<{
681
- mounted: true;
815
+ readonly attachStateTemplate: (name: string, template: string, body: StateAttachmentBody) => Promise<{
816
+ attached: true;
682
817
  state: string;
683
- module: string;
818
+ template: string;
684
819
  }>;
685
- readonly patchStateMount: (name: string, module: string, body: StateMountBody) => Promise<{
820
+ readonly patchStateAttachment: (name: string, template: string, body: StateAttachmentBody) => Promise<{
686
821
  updated: true;
687
822
  state: string;
688
- module: string;
823
+ template: string;
689
824
  }>;
690
- readonly unmountStateModule: (name: string, module: string) => Promise<{
691
- unmounted: true;
825
+ readonly detachStateTemplate: (name: string, template: string) => Promise<{
826
+ detached: true;
692
827
  state: string;
693
- module: string;
828
+ template: string;
694
829
  }>;
695
830
  readonly listStateSubjects: (name: string, params: {
696
831
  kind?: string;
@@ -795,6 +930,21 @@ export declare function createApiClient(config: ApiConfig): {
795
930
  seq: number | null;
796
931
  skipped: Record<string, unknown>[];
797
932
  }>;
933
+ readonly evalTemplateJq: (name: string, subject: StateSubjectRef, jqName: string, params?: Record<string, unknown>, signal?: AbortSignal) => Promise<{
934
+ name: string;
935
+ purpose: "input";
936
+ value: unknown;
937
+ }>;
938
+ readonly applyTemplateJq: (name: string, subject: StateSubjectRef, jqName: string, body?: {
939
+ input?: unknown;
940
+ op_id?: string;
941
+ }) => Promise<{
942
+ name: string;
943
+ applied: boolean;
944
+ data: Record<string, unknown> | null;
945
+ seq: number | null;
946
+ skipped: Record<string, unknown>[];
947
+ }>;
798
948
  readonly deleteStateRecord: (name: string, subject: StateSubjectRef) => Promise<{
799
949
  erased: true;
800
950
  }>;
@@ -840,39 +990,147 @@ export declare function createApiClient(config: ApiConfig): {
840
990
  } | null;
841
991
  unavailable: string | null;
842
992
  }[]>;
843
- readonly listStateModules: (signal?: AbortSignal) => Promise<{
844
- kind: "state-module";
993
+ readonly listStateTemplates: (signal?: AbortSignal) => Promise<{
994
+ kind: "state-template";
845
995
  name: string;
846
996
  description: string;
847
997
  parameters: Record<string, unknown>;
848
998
  schema: Record<string, unknown>;
849
999
  regimes: Record<string, unknown>[];
850
- declarations: Record<string, unknown> | null;
1000
+ declarations: {
1001
+ schema: Record<string, unknown>;
1002
+ check: {
1003
+ content?: string | undefined;
1004
+ id?: string | undefined;
1005
+ kwargs?: Record<string, unknown> | undefined;
1006
+ } | null;
1007
+ } | null;
851
1008
  trace: Record<string, unknown>;
852
- mounted_on: number;
1009
+ template_jq: Record<string, {
1010
+ description: string;
1011
+ purpose: "input" | "update";
1012
+ params: string[];
1013
+ reads: string[][];
1014
+ writes: string[][];
1015
+ jq: {
1016
+ content?: string | undefined;
1017
+ id?: string | undefined;
1018
+ kwargs?: Record<string, unknown> | undefined;
1019
+ };
1020
+ }> | null;
1021
+ reconcile: {
1022
+ orphans: {
1023
+ content?: string | undefined;
1024
+ id?: string | undefined;
1025
+ kwargs?: Record<string, unknown> | undefined;
1026
+ };
1027
+ close: {
1028
+ content?: string | undefined;
1029
+ id?: string | undefined;
1030
+ kwargs?: Record<string, unknown> | undefined;
1031
+ };
1032
+ resolutions: {
1033
+ content?: string | undefined;
1034
+ id?: string | undefined;
1035
+ kwargs?: Record<string, unknown> | undefined;
1036
+ };
1037
+ } | null;
1038
+ attached_to: number;
853
1039
  shipped_default: boolean;
854
1040
  }[]>;
855
- readonly getStateModule: (name: string, signal?: AbortSignal) => Promise<{
856
- kind: "state-module";
1041
+ readonly getStateTemplate: (name: string, signal?: AbortSignal) => Promise<{
1042
+ kind: "state-template";
857
1043
  name: string;
858
1044
  description: string;
859
1045
  parameters: Record<string, unknown>;
860
1046
  schema: Record<string, unknown>;
861
1047
  regimes: Record<string, unknown>[];
862
- declarations: Record<string, unknown> | null;
1048
+ declarations: {
1049
+ schema: Record<string, unknown>;
1050
+ check: {
1051
+ content?: string | undefined;
1052
+ id?: string | undefined;
1053
+ kwargs?: Record<string, unknown> | undefined;
1054
+ } | null;
1055
+ } | null;
863
1056
  trace: Record<string, unknown>;
1057
+ template_jq: Record<string, {
1058
+ description: string;
1059
+ purpose: "input" | "update";
1060
+ params: string[];
1061
+ reads: string[][];
1062
+ writes: string[][];
1063
+ jq: {
1064
+ content?: string | undefined;
1065
+ id?: string | undefined;
1066
+ kwargs?: Record<string, unknown> | undefined;
1067
+ };
1068
+ }> | null;
1069
+ reconcile: {
1070
+ orphans: {
1071
+ content?: string | undefined;
1072
+ id?: string | undefined;
1073
+ kwargs?: Record<string, unknown> | undefined;
1074
+ };
1075
+ close: {
1076
+ content?: string | undefined;
1077
+ id?: string | undefined;
1078
+ kwargs?: Record<string, unknown> | undefined;
1079
+ };
1080
+ resolutions: {
1081
+ content?: string | undefined;
1082
+ id?: string | undefined;
1083
+ kwargs?: Record<string, unknown> | undefined;
1084
+ };
1085
+ } | null;
864
1086
  }>;
865
- readonly putStateModule: (name: string, body: StateModuleBody, replace?: boolean) => Promise<{
866
- kind: "state-module";
1087
+ readonly putStateTemplate: (name: string, body: StateTemplateBody, replace?: boolean) => Promise<{
1088
+ kind: "state-template";
867
1089
  name: string;
868
1090
  description: string;
869
1091
  parameters: Record<string, unknown>;
870
1092
  schema: Record<string, unknown>;
871
1093
  regimes: Record<string, unknown>[];
872
- declarations: Record<string, unknown> | null;
1094
+ declarations: {
1095
+ schema: Record<string, unknown>;
1096
+ check: {
1097
+ content?: string | undefined;
1098
+ id?: string | undefined;
1099
+ kwargs?: Record<string, unknown> | undefined;
1100
+ } | null;
1101
+ } | null;
873
1102
  trace: Record<string, unknown>;
1103
+ template_jq: Record<string, {
1104
+ description: string;
1105
+ purpose: "input" | "update";
1106
+ params: string[];
1107
+ reads: string[][];
1108
+ writes: string[][];
1109
+ jq: {
1110
+ content?: string | undefined;
1111
+ id?: string | undefined;
1112
+ kwargs?: Record<string, unknown> | undefined;
1113
+ };
1114
+ }> | null;
1115
+ reconcile: {
1116
+ orphans: {
1117
+ content?: string | undefined;
1118
+ id?: string | undefined;
1119
+ kwargs?: Record<string, unknown> | undefined;
1120
+ };
1121
+ close: {
1122
+ content?: string | undefined;
1123
+ id?: string | undefined;
1124
+ kwargs?: Record<string, unknown> | undefined;
1125
+ };
1126
+ resolutions: {
1127
+ content?: string | undefined;
1128
+ id?: string | undefined;
1129
+ kwargs?: Record<string, unknown> | undefined;
1130
+ };
1131
+ } | null;
874
1132
  }>;
875
- readonly deleteStateModule: (name: string) => Promise<{
1133
+ readonly deleteStateTemplate: (name: string) => Promise<{
876
1134
  name: string;
877
1135
  deleted: true;
878
1136
  }>;
@@ -1050,11 +1308,7 @@ export declare function createApiClient(config: ApiConfig): {
1050
1308
  path: string;
1051
1309
  deleted: true;
1052
1310
  }>;
1053
- readonly renderTemplate: (body: {
1054
- content?: string;
1055
- template_id?: string;
1056
- kwargs?: Record<string, unknown>;
1057
- }) => Promise<{
1311
+ readonly renderTemplate: (text: s.TemplatedText) => Promise<{
1058
1312
  rendered: string;
1059
1313
  }>;
1060
1314
  readonly clearTemplatesCache: () => Promise<{
@@ -1826,6 +2080,49 @@ export declare function createApiClient(config: ApiConfig): {
1826
2080
  turns_per_hour_override: number | null;
1827
2081
  error_reply_text: string | null;
1828
2082
  execution_key_fingerprint: string;
2083
+ state_binding: {
2084
+ states: {
2085
+ state: string;
2086
+ templates: string[];
2087
+ subject_expr: {
2088
+ content?: string | undefined;
2089
+ id?: string | undefined;
2090
+ kwargs?: Record<string, unknown> | undefined;
2091
+ };
2092
+ scope_expr: {
2093
+ content?: string | undefined;
2094
+ id?: string | undefined;
2095
+ kwargs?: Record<string, unknown> | undefined;
2096
+ } | null;
2097
+ input_injections: {
2098
+ template_jq: string | null;
2099
+ jq: {
2100
+ content?: string | undefined;
2101
+ id?: string | undefined;
2102
+ kwargs?: Record<string, unknown> | undefined;
2103
+ } | null;
2104
+ into: string;
2105
+ }[];
2106
+ updates: {
2107
+ template_jq: string | null;
2108
+ jq: {
2109
+ content?: string | undefined;
2110
+ id?: string | undefined;
2111
+ kwargs?: Record<string, unknown> | undefined;
2112
+ } | null;
2113
+ adapter: {
2114
+ content?: string | undefined;
2115
+ id?: string | undefined;
2116
+ kwargs?: Record<string, unknown> | undefined;
2117
+ } | null;
2118
+ op_id: {
2119
+ content?: string | undefined;
2120
+ id?: string | undefined;
2121
+ kwargs?: Record<string, unknown> | undefined;
2122
+ } | null;
2123
+ }[];
2124
+ }[];
2125
+ } | null;
1829
2126
  }[];
1830
2127
  total: number;
1831
2128
  }>;
@@ -1847,6 +2144,49 @@ export declare function createApiClient(config: ApiConfig): {
1847
2144
  turns_per_hour_override: number | null;
1848
2145
  error_reply_text: string | null;
1849
2146
  execution_key_fingerprint: string;
2147
+ state_binding: {
2148
+ states: {
2149
+ state: string;
2150
+ templates: string[];
2151
+ subject_expr: {
2152
+ content?: string | undefined;
2153
+ id?: string | undefined;
2154
+ kwargs?: Record<string, unknown> | undefined;
2155
+ };
2156
+ scope_expr: {
2157
+ content?: string | undefined;
2158
+ id?: string | undefined;
2159
+ kwargs?: Record<string, unknown> | undefined;
2160
+ } | null;
2161
+ input_injections: {
2162
+ template_jq: string | null;
2163
+ jq: {
2164
+ content?: string | undefined;
2165
+ id?: string | undefined;
2166
+ kwargs?: Record<string, unknown> | undefined;
2167
+ } | null;
2168
+ into: string;
2169
+ }[];
2170
+ updates: {
2171
+ template_jq: string | null;
2172
+ jq: {
2173
+ content?: string | undefined;
2174
+ id?: string | undefined;
2175
+ kwargs?: Record<string, unknown> | undefined;
2176
+ } | null;
2177
+ adapter: {
2178
+ content?: string | undefined;
2179
+ id?: string | undefined;
2180
+ kwargs?: Record<string, unknown> | undefined;
2181
+ } | null;
2182
+ op_id: {
2183
+ content?: string | undefined;
2184
+ id?: string | undefined;
2185
+ kwargs?: Record<string, unknown> | undefined;
2186
+ } | null;
2187
+ }[];
2188
+ }[];
2189
+ } | null;
1850
2190
  };
1851
2191
  callback_secret: string | null;
1852
2192
  }>;
@@ -2076,12 +2416,59 @@ export declare function createApiClient(config: ApiConfig): {
2076
2416
  kind: string;
2077
2417
  key_expr: string;
2078
2418
  } | null;
2079
- condition: string | null;
2080
- condition_id: string | null;
2081
- condition_kwargs: Record<string, unknown>;
2082
- expr: string | null;
2083
- expr_id: string | null;
2084
- expr_kwargs: Record<string, unknown>;
2419
+ condition: {
2420
+ content?: string | undefined;
2421
+ id?: string | undefined;
2422
+ kwargs?: Record<string, unknown> | undefined;
2423
+ } | null;
2424
+ expr: {
2425
+ content?: string | undefined;
2426
+ id?: string | undefined;
2427
+ kwargs?: Record<string, unknown> | undefined;
2428
+ } | null;
2429
+ state_binding: {
2430
+ states: {
2431
+ state: string;
2432
+ templates: string[];
2433
+ subject_expr: {
2434
+ content?: string | undefined;
2435
+ id?: string | undefined;
2436
+ kwargs?: Record<string, unknown> | undefined;
2437
+ };
2438
+ scope_expr: {
2439
+ content?: string | undefined;
2440
+ id?: string | undefined;
2441
+ kwargs?: Record<string, unknown> | undefined;
2442
+ } | null;
2443
+ input_injections: {
2444
+ template_jq: string | null;
2445
+ jq: {
2446
+ content?: string | undefined;
2447
+ id?: string | undefined;
2448
+ kwargs?: Record<string, unknown> | undefined;
2449
+ } | null;
2450
+ into: string;
2451
+ }[];
2452
+ updates: {
2453
+ template_jq: string | null;
2454
+ jq: {
2455
+ content?: string | undefined;
2456
+ id?: string | undefined;
2457
+ kwargs?: Record<string, unknown> | undefined;
2458
+ } | null;
2459
+ adapter: {
2460
+ content?: string | undefined;
2461
+ id?: string | undefined;
2462
+ kwargs?: Record<string, unknown> | undefined;
2463
+ } | null;
2464
+ op_id: {
2465
+ content?: string | undefined;
2466
+ id?: string | undefined;
2467
+ kwargs?: Record<string, unknown> | undefined;
2468
+ } | null;
2469
+ }[];
2470
+ }[];
2471
+ } | null;
2085
2472
  }[];
2086
2473
  total: number;
2087
2474
  topic_verifiers: Record<string, {
@@ -2185,9 +2572,11 @@ export declare function createApiClient(config: ApiConfig): {
2185
2572
  name: string;
2186
2573
  description: string;
2187
2574
  scopes: string[];
2188
- condition: string | null;
2189
- condition_id: string | null;
2190
- condition_kwargs: unknown;
2575
+ condition: {
2576
+ content?: string | undefined;
2577
+ id?: string | undefined;
2578
+ kwargs?: Record<string, unknown> | undefined;
2579
+ } | null;
2191
2580
  base_tier: string | null;
2192
2581
  allow_all: boolean;
2193
2582
  grants: Record<string, "none" | "read" | "write">;
@@ -2196,9 +2585,11 @@ export declare function createApiClient(config: ApiConfig): {
2196
2585
  name: string;
2197
2586
  description: string;
2198
2587
  scopes: string[];
2199
- condition: string | null;
2200
- condition_id: string | null;
2201
- condition_kwargs: unknown;
2588
+ condition: {
2589
+ content?: string | undefined;
2590
+ id?: string | undefined;
2591
+ kwargs?: Record<string, unknown> | undefined;
2592
+ } | null;
2202
2593
  base_tier: string | null;
2203
2594
  allow_all: boolean;
2204
2595
  grants: Record<string, "none" | "read" | "write">;
@@ -2207,9 +2598,11 @@ export declare function createApiClient(config: ApiConfig): {
2207
2598
  name: string;
2208
2599
  description: string;
2209
2600
  scopes: string[];
2210
- condition: string | null;
2211
- condition_id: string | null;
2212
- condition_kwargs: unknown;
2601
+ condition: {
2602
+ content?: string | undefined;
2603
+ id?: string | undefined;
2604
+ kwargs?: Record<string, unknown> | undefined;
2605
+ } | null;
2213
2606
  base_tier: string | null;
2214
2607
  allow_all: boolean;
2215
2608
  grants: Record<string, "none" | "read" | "write">;
@@ -2225,9 +2618,11 @@ export declare function createApiClient(config: ApiConfig): {
2225
2618
  name: string;
2226
2619
  description: string;
2227
2620
  scopes: string[];
2228
- condition: string | null;
2229
- condition_id: string | null;
2230
- condition_kwargs: unknown;
2621
+ condition: {
2622
+ content?: string | undefined;
2623
+ id?: string | undefined;
2624
+ kwargs?: Record<string, unknown> | undefined;
2625
+ } | null;
2231
2626
  base_tier: string | null;
2232
2627
  allow_all: boolean;
2233
2628
  grants: Record<string, "none" | "read" | "write">;
@@ -2253,9 +2648,11 @@ export declare function createApiClient(config: ApiConfig): {
2253
2648
  name: string;
2254
2649
  description: string;
2255
2650
  scopes: string[];
2256
- condition: string | null;
2257
- condition_id: string | null;
2258
- condition_kwargs: unknown;
2651
+ condition: {
2652
+ content?: string | undefined;
2653
+ id?: string | undefined;
2654
+ kwargs?: Record<string, unknown> | undefined;
2655
+ } | null;
2259
2656
  base_tier: string | null;
2260
2657
  allow_all: boolean;
2261
2658
  grants: Record<string, "none" | "read" | "write">;
@@ -2265,9 +2662,11 @@ export declare function createApiClient(config: ApiConfig): {
2265
2662
  description: string;
2266
2663
  scopes: string[];
2267
2664
  policy_data: unknown;
2268
- condition?: string | null | undefined;
2269
- condition_id?: string | null | undefined;
2270
- condition_kwargs?: unknown;
2665
+ condition?: {
2666
+ content?: string | undefined;
2667
+ id?: string | undefined;
2668
+ kwargs?: Record<string, unknown> | undefined;
2669
+ } | null | undefined;
2271
2670
  }[]>;
2272
2671
  readonly createApiKey: (body: ApiKeyBody) => Promise<string>;
2273
2672
  readonly editApiKey: (userId: string, body: Omit<ApiKeyBody, "user_id">) => Promise<{
@@ -2362,9 +2761,11 @@ export declare function createApiClient(config: ApiConfig): {
2362
2761
  body: {
2363
2762
  scopes: string[];
2364
2763
  policy_data: unknown;
2365
- condition: string | null;
2366
- condition_id: string | null;
2367
- condition_kwargs: unknown;
2764
+ condition: {
2765
+ content?: string | undefined;
2766
+ id?: string | undefined;
2767
+ kwargs?: Record<string, unknown> | undefined;
2768
+ } | null;
2368
2769
  };
2369
2770
  tags: string[];
2370
2771
  created_at: string;
@@ -2445,6 +2846,7 @@ export declare function createApiClient(config: ApiConfig): {
2445
2846
  tool_name: string;
2446
2847
  tool_kwargs: Record<string, unknown>;
2447
2848
  schedule_kwargs: Record<string, unknown>;
2849
+ state_binding?: s.StateBinding | null;
2448
2850
  }) => Promise<unknown>;
2449
2851
  readonly deleteSchedule: (name: string) => Promise<unknown>;
2450
2852
  readonly getObservabilityMetrics: (params?: MetricsQuery, signal?: AbortSignal) => Promise<{