@ai-matrx/api 0.1.9 → 0.1.10

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 (135) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +1 -1
  3. package/dist/account.d.cts +1 -1
  4. package/dist/account.d.ts +1 -1
  5. package/dist/agents.cjs +12 -12
  6. package/dist/agents.d.cts +1 -1
  7. package/dist/agents.d.ts +1 -1
  8. package/dist/agents.js +2 -2
  9. package/dist/ai.cjs +3 -3
  10. package/dist/ai.d.cts +1 -1
  11. package/dist/ai.d.ts +1 -1
  12. package/dist/ai.js +2 -2
  13. package/dist/apps.cjs +6 -6
  14. package/dist/apps.d.cts +1 -1
  15. package/dist/apps.d.ts +1 -1
  16. package/dist/apps.js +2 -2
  17. package/dist/architecture.cjs +11 -11
  18. package/dist/architecture.d.cts +1 -1
  19. package/dist/architecture.d.ts +1 -1
  20. package/dist/architecture.js +2 -2
  21. package/dist/audio.cjs +5 -5
  22. package/dist/audio.d.cts +1 -1
  23. package/dist/audio.d.ts +1 -1
  24. package/dist/audio.js +2 -2
  25. package/dist/chat.cjs +12 -12
  26. package/dist/chat.d.cts +1 -1
  27. package/dist/chat.d.ts +1 -1
  28. package/dist/chat.js +2 -2
  29. package/dist/{chunk-PIVTHTVR.js → chunk-FLANGLCG.js} +260 -36
  30. package/dist/{chunk-KIEAFMKB.js → chunk-PIPE5OML.js} +100 -46
  31. package/dist/{chunk-2SXAAKGV.cjs → chunk-PKYPPATQ.cjs} +100 -45
  32. package/dist/{chunk-PMGKZ4FT.cjs → chunk-SPASYIUH.cjs} +268 -34
  33. package/dist/code.cjs +7 -7
  34. package/dist/code.d.cts +1 -1
  35. package/dist/code.d.ts +1 -1
  36. package/dist/code.js +2 -2
  37. package/dist/commerce.d.cts +1 -1
  38. package/dist/commerce.d.ts +1 -1
  39. package/dist/communications.cjs +5 -5
  40. package/dist/communications.d.cts +1 -1
  41. package/dist/communications.d.ts +1 -1
  42. package/dist/communications.js +2 -2
  43. package/dist/computer.cjs +4 -4
  44. package/dist/computer.d.cts +1 -1
  45. package/dist/computer.d.ts +1 -1
  46. package/dist/computer.js +2 -2
  47. package/dist/content.cjs +5 -5
  48. package/dist/content.d.cts +1 -1
  49. package/dist/content.d.ts +1 -1
  50. package/dist/content.js +2 -2
  51. package/dist/crm.cjs +3 -3
  52. package/dist/crm.d.cts +1 -1
  53. package/dist/crm.d.ts +1 -1
  54. package/dist/crm.js +2 -2
  55. package/dist/data.d.cts +1 -1
  56. package/dist/data.d.ts +1 -1
  57. package/dist/education.cjs +5 -5
  58. package/dist/education.d.cts +1 -1
  59. package/dist/education.d.ts +1 -1
  60. package/dist/education.js +2 -2
  61. package/dist/files.cjs +21 -21
  62. package/dist/files.d.cts +1 -1
  63. package/dist/files.d.ts +1 -1
  64. package/dist/files.js +2 -2
  65. package/dist/human-resources.d.cts +1 -1
  66. package/dist/human-resources.d.ts +1 -1
  67. package/dist/{index-C3ZlP3BI.d.cts → index-Gj30ybjE.d.cts} +42 -3
  68. package/dist/{index-C3ZlP3BI.d.ts → index-Gj30ybjE.d.ts} +42 -3
  69. package/dist/index.cjs +183 -288
  70. package/dist/index.d.cts +129 -180
  71. package/dist/index.d.ts +129 -180
  72. package/dist/index.js +76 -206
  73. package/dist/integrations.cjs +4 -4
  74. package/dist/integrations.d.cts +1 -1
  75. package/dist/integrations.d.ts +1 -1
  76. package/dist/integrations.js +2 -2
  77. package/dist/intelligence.cjs +10 -8
  78. package/dist/intelligence.d.cts +13 -13
  79. package/dist/intelligence.d.ts +13 -13
  80. package/dist/intelligence.js +5 -3
  81. package/dist/{keys.generated-CK_C5UXG.d.cts → keys.generated-DZUiM-uA.d.cts} +5 -3
  82. package/dist/{keys.generated-CK_C5UXG.d.ts → keys.generated-DZUiM-uA.d.ts} +5 -3
  83. package/dist/knowledge.cjs +43 -43
  84. package/dist/knowledge.d.cts +13 -13
  85. package/dist/knowledge.d.ts +13 -13
  86. package/dist/knowledge.js +2 -2
  87. package/dist/legal.cjs +7 -7
  88. package/dist/legal.d.cts +1 -1
  89. package/dist/legal.d.ts +1 -1
  90. package/dist/legal.js +2 -2
  91. package/dist/marketing.cjs +77 -77
  92. package/dist/marketing.d.cts +27 -27
  93. package/dist/marketing.d.ts +27 -27
  94. package/dist/marketing.js +2 -2
  95. package/dist/masterwork.cjs +33 -33
  96. package/dist/masterwork.d.cts +1 -1
  97. package/dist/masterwork.d.ts +1 -1
  98. package/dist/masterwork.js +2 -2
  99. package/dist/media.cjs +12 -12
  100. package/dist/media.d.cts +1 -1
  101. package/dist/media.d.ts +1 -1
  102. package/dist/media.js +2 -2
  103. package/dist/net.cjs +19 -20
  104. package/dist/net.d.cts +41 -41
  105. package/dist/net.d.ts +41 -41
  106. package/dist/net.js +1 -2
  107. package/dist/platform.cjs +4 -4
  108. package/dist/platform.d.cts +1 -1
  109. package/dist/platform.d.ts +1 -1
  110. package/dist/platform.js +2 -2
  111. package/dist/publish.cjs +8 -8
  112. package/dist/publish.d.cts +1 -1
  113. package/dist/publish.d.ts +1 -1
  114. package/dist/publish.js +2 -2
  115. package/dist/schemas.d.cts +78 -15
  116. package/dist/schemas.d.ts +78 -15
  117. package/dist/stream.cjs +11 -11
  118. package/dist/stream.d.cts +1 -1
  119. package/dist/stream.d.ts +1 -1
  120. package/dist/stream.js +2 -2
  121. package/dist/types.cjs +2 -0
  122. package/dist/types.d.cts +49823 -0
  123. package/dist/types.d.ts +49823 -0
  124. package/dist/types.js +1 -0
  125. package/dist/web.cjs +27 -27
  126. package/dist/web.d.cts +17 -17
  127. package/dist/web.d.ts +17 -17
  128. package/dist/web.js +2 -2
  129. package/dist/workflows.cjs +14 -14
  130. package/dist/workflows.d.cts +23 -26
  131. package/dist/workflows.d.ts +23 -26
  132. package/dist/workflows.js +2 -2
  133. package/package.json +14 -4
  134. package/dist/chunk-FNIYADWI.cjs +0 -59
  135. package/dist/chunk-YTEOFGFC.js +0 -57
@@ -1,5 +1,5 @@
1
- import { A as Api, C as CallOptions, a as ApiStream, N as NdjsonEvent, S as SseEvent } from './index-C3ZlP3BI.cjs';
2
- import { JsonValue, RunNowResponse, ClientContext, UserOverrides, ContextAnchor, ComputeNextDueResponse, ValidateCronRequest, ValidateCronResponse } from './schemas.cjs';
1
+ import { A as Api, C as CallOptions, a as ApiStream, N as NdjsonEvent, S as SseEvent } from './index-Gj30ybjE.cjs';
2
+ import { JsonValue, ClientContext, UserOverrides, ContextAnchor, RunNowResponse, ComputeNextDueResponse, ValidateCronRequest, ValidateCronResponse } from './schemas.cjs';
3
3
  import '@ai-matrx/auth/credentials';
4
4
 
5
5
  /**
@@ -9,17 +9,17 @@ import '@ai-matrx/auth/credentials';
9
9
 
10
10
  /** AddEdgeOp */
11
11
  type AddEdgeOp = {
12
- op?: "add_edge";
12
+ op: "add_edge";
13
13
  edge: EdgeDef;
14
14
  };
15
15
  /** AddNodeOp */
16
16
  type AddNodeOp_Input = {
17
- op?: "add_node";
17
+ op: "add_node";
18
18
  node: NodeDef;
19
19
  };
20
20
  /** AddNodeOp */
21
21
  type AddNodeOp_Output = {
22
- op?: "add_node";
22
+ op: "add_node";
23
23
  node: NodeDef;
24
24
  };
25
25
  /** HTTP form of the workflow batch input with client-injected scope support. */
@@ -397,8 +397,7 @@ type BulkOpResult = {
397
397
  };
398
398
  /** CartesianPlan */
399
399
  type CartesianPlan = {
400
- /** Materialize the Cartesian product of all variable option lists. */
401
- strategy?: "cartesian";
400
+ strategy: "cartesian";
402
401
  /** Variable names mapped to the options used in the Cartesian product. */
403
402
  variables: {
404
403
  [key: string]: JsonValue[];
@@ -535,8 +534,7 @@ type ContractAuditReport = {
535
534
  };
536
535
  /** CoordinatedRowsPlan */
537
536
  type CoordinatedRowsPlan = {
538
- /** Use caller-supplied rows whose values stay paired. */
539
- strategy?: "coordinated_rows";
537
+ strategy: "coordinated_rows";
540
538
  /** Paired value rows to materialize as assignment items. */
541
539
  rows: AssignmentRow[];
542
540
  /** Whether rows keep declared order or are securely shuffled once. */
@@ -876,7 +874,7 @@ type EdgeDef = {
876
874
  };
877
875
  /** Replace the failed invocation's inputs and retry. */
878
876
  type EditInputsRetryProposal = {
879
- action?: "edit_inputs_retry";
877
+ action: "edit_inputs_retry";
880
878
  node_id: string;
881
879
  inputs: {
882
880
  [key: string]: unknown;
@@ -884,7 +882,7 @@ type EditInputsRetryProposal = {
884
882
  };
885
883
  /** A typed graph edit (config / structure / variables). Applied with one */
886
884
  type EditWorkflowProposal = {
887
- action?: "edit_workflow";
885
+ action: "edit_workflow";
888
886
  node_id?: string | null;
889
887
  patch: DefinitionPatch_Output;
890
888
  rationale: string;
@@ -1037,7 +1035,7 @@ type ForceDisableResponse = {
1037
1035
  };
1038
1036
  /** The agent recommends giving up on this run. */
1039
1037
  type ForceFailProposal = {
1040
- action?: "force_fail";
1038
+ action: "force_fail";
1041
1039
  rationale: string;
1042
1040
  };
1043
1041
  /** ForceFailRunResponse */
@@ -1122,8 +1120,7 @@ type IdempotentDuplicateRunResponse = {
1122
1120
  };
1123
1121
  /** IndependentRandomPlan */
1124
1122
  type IndependentRandomPlan = {
1125
- /** Draw each variable independently from its option list. */
1126
- strategy?: "independent_random";
1123
+ strategy: "independent_random";
1127
1124
  /** Variable names mapped to their non-empty candidate value lists. */
1128
1125
  variables: {
1129
1126
  [key: string]: JsonValue[];
@@ -1260,7 +1257,7 @@ type LauncherConversation = {
1260
1257
  type LeakRule = "any" | "object" | "bare_container" | "extra_allow" | "unbound_typevar" | "unknown_type" | "acknowledged_dynamic";
1261
1258
  /** User-supplied output for the failed node. */
1262
1259
  type ManualResultProposal = {
1263
- action?: "manual_result";
1260
+ action: "manual_result";
1264
1261
  node_id: string;
1265
1262
  output: {
1266
1263
  [key: string]: unknown;
@@ -1817,32 +1814,32 @@ type RefreshNodeTypesResponse = {
1817
1814
  };
1818
1815
  /** RemoveEdgeOp */
1819
1816
  type RemoveEdgeOp = {
1820
- op?: "remove_edge";
1817
+ op: "remove_edge";
1821
1818
  edge_id: string;
1822
1819
  };
1823
1820
  /** Remove a node. Edges touching it are removed too (a dangling edge */
1824
1821
  type RemoveNodeOp = {
1825
- op?: "remove_node";
1822
+ op: "remove_node";
1826
1823
  node_id: string;
1827
1824
  };
1828
1825
  /** RemoveVariableOp */
1829
1826
  type RemoveVariableOp = {
1830
- op?: "remove_variable";
1827
+ op: "remove_variable";
1831
1828
  name: string;
1832
1829
  };
1833
1830
  /** Replace an existing edge WHOLE (source, target, handles, data). */
1834
1831
  type ReplaceEdgeOp = {
1835
- op?: "replace_edge";
1832
+ op: "replace_edge";
1836
1833
  edge: EdgeDef;
1837
1834
  };
1838
1835
  /** Replace an existing node WHOLE — type, position and data all become */
1839
1836
  type ReplaceNodeOp_Input = {
1840
- op?: "replace_node";
1837
+ op: "replace_node";
1841
1838
  node: NodeDef;
1842
1839
  };
1843
1840
  /** Replace an existing node WHOLE — type, position and data all become */
1844
1841
  type ReplaceNodeOp_Output = {
1845
- op?: "replace_node";
1842
+ op: "replace_node";
1846
1843
  node: NodeDef;
1847
1844
  };
1848
1845
  /** RerunFromRequest */
@@ -1929,7 +1926,7 @@ type RetryNodeRequest = {
1929
1926
  };
1930
1927
  /** Re-run the failed node with the same (or edited) inputs. */
1931
1928
  type RetryProposal = {
1932
- action?: "retry";
1929
+ action: "retry";
1933
1930
  node_id: string;
1934
1931
  inputs?: {
1935
1932
  [key: string]: unknown;
@@ -2276,7 +2273,7 @@ type SetShapeRequest = {
2276
2273
  };
2277
2274
  /** Upsert a declared run variable by name. */
2278
2275
  type SetVariableOp = {
2279
- op?: "set_variable";
2276
+ op: "set_variable";
2280
2277
  variable: VariableSpec;
2281
2278
  };
2282
2279
  /** SettlePlanRequest */
@@ -2386,7 +2383,7 @@ type SkipNodeRequest = {
2386
2383
  };
2387
2384
  /** Synthesize a (possibly empty) output and continue. */
2388
2385
  type SkipProposal = {
2389
- action?: "skip";
2386
+ action: "skip";
2390
2387
  node_id: string;
2391
2388
  output?: {
2392
2389
  [key: string]: unknown;
@@ -2718,7 +2715,7 @@ type UnarchiveWorkflowResponse = {
2718
2715
  };
2719
2716
  /** Deep-merge ``data`` into an existing node's ``data`` payload. */
2720
2717
  type UpdateNodeDataOp = {
2721
- op?: "update_node_data";
2718
+ op: "update_node_data";
2722
2719
  node_id: string;
2723
2720
  data: {
2724
2721
  [key: string]: unknown;
@@ -2726,7 +2723,7 @@ type UpdateNodeDataOp = {
2726
2723
  };
2727
2724
  /** Replace an existing node's top-level React Flow renderer type. */
2728
2725
  type UpdateNodeTypeOp = {
2729
- op?: "update_node_type";
2726
+ op: "update_node_type";
2730
2727
  node_id: string;
2731
2728
  type: string;
2732
2729
  };
@@ -1,5 +1,5 @@
1
- import { A as Api, C as CallOptions, a as ApiStream, N as NdjsonEvent, S as SseEvent } from './index-C3ZlP3BI.js';
2
- import { JsonValue, RunNowResponse, ClientContext, UserOverrides, ContextAnchor, ComputeNextDueResponse, ValidateCronRequest, ValidateCronResponse } from './schemas.js';
1
+ import { A as Api, C as CallOptions, a as ApiStream, N as NdjsonEvent, S as SseEvent } from './index-Gj30ybjE.js';
2
+ import { JsonValue, ClientContext, UserOverrides, ContextAnchor, RunNowResponse, ComputeNextDueResponse, ValidateCronRequest, ValidateCronResponse } from './schemas.js';
3
3
  import '@ai-matrx/auth/credentials';
4
4
 
5
5
  /**
@@ -9,17 +9,17 @@ import '@ai-matrx/auth/credentials';
9
9
 
10
10
  /** AddEdgeOp */
11
11
  type AddEdgeOp = {
12
- op?: "add_edge";
12
+ op: "add_edge";
13
13
  edge: EdgeDef;
14
14
  };
15
15
  /** AddNodeOp */
16
16
  type AddNodeOp_Input = {
17
- op?: "add_node";
17
+ op: "add_node";
18
18
  node: NodeDef;
19
19
  };
20
20
  /** AddNodeOp */
21
21
  type AddNodeOp_Output = {
22
- op?: "add_node";
22
+ op: "add_node";
23
23
  node: NodeDef;
24
24
  };
25
25
  /** HTTP form of the workflow batch input with client-injected scope support. */
@@ -397,8 +397,7 @@ type BulkOpResult = {
397
397
  };
398
398
  /** CartesianPlan */
399
399
  type CartesianPlan = {
400
- /** Materialize the Cartesian product of all variable option lists. */
401
- strategy?: "cartesian";
400
+ strategy: "cartesian";
402
401
  /** Variable names mapped to the options used in the Cartesian product. */
403
402
  variables: {
404
403
  [key: string]: JsonValue[];
@@ -535,8 +534,7 @@ type ContractAuditReport = {
535
534
  };
536
535
  /** CoordinatedRowsPlan */
537
536
  type CoordinatedRowsPlan = {
538
- /** Use caller-supplied rows whose values stay paired. */
539
- strategy?: "coordinated_rows";
537
+ strategy: "coordinated_rows";
540
538
  /** Paired value rows to materialize as assignment items. */
541
539
  rows: AssignmentRow[];
542
540
  /** Whether rows keep declared order or are securely shuffled once. */
@@ -876,7 +874,7 @@ type EdgeDef = {
876
874
  };
877
875
  /** Replace the failed invocation's inputs and retry. */
878
876
  type EditInputsRetryProposal = {
879
- action?: "edit_inputs_retry";
877
+ action: "edit_inputs_retry";
880
878
  node_id: string;
881
879
  inputs: {
882
880
  [key: string]: unknown;
@@ -884,7 +882,7 @@ type EditInputsRetryProposal = {
884
882
  };
885
883
  /** A typed graph edit (config / structure / variables). Applied with one */
886
884
  type EditWorkflowProposal = {
887
- action?: "edit_workflow";
885
+ action: "edit_workflow";
888
886
  node_id?: string | null;
889
887
  patch: DefinitionPatch_Output;
890
888
  rationale: string;
@@ -1037,7 +1035,7 @@ type ForceDisableResponse = {
1037
1035
  };
1038
1036
  /** The agent recommends giving up on this run. */
1039
1037
  type ForceFailProposal = {
1040
- action?: "force_fail";
1038
+ action: "force_fail";
1041
1039
  rationale: string;
1042
1040
  };
1043
1041
  /** ForceFailRunResponse */
@@ -1122,8 +1120,7 @@ type IdempotentDuplicateRunResponse = {
1122
1120
  };
1123
1121
  /** IndependentRandomPlan */
1124
1122
  type IndependentRandomPlan = {
1125
- /** Draw each variable independently from its option list. */
1126
- strategy?: "independent_random";
1123
+ strategy: "independent_random";
1127
1124
  /** Variable names mapped to their non-empty candidate value lists. */
1128
1125
  variables: {
1129
1126
  [key: string]: JsonValue[];
@@ -1260,7 +1257,7 @@ type LauncherConversation = {
1260
1257
  type LeakRule = "any" | "object" | "bare_container" | "extra_allow" | "unbound_typevar" | "unknown_type" | "acknowledged_dynamic";
1261
1258
  /** User-supplied output for the failed node. */
1262
1259
  type ManualResultProposal = {
1263
- action?: "manual_result";
1260
+ action: "manual_result";
1264
1261
  node_id: string;
1265
1262
  output: {
1266
1263
  [key: string]: unknown;
@@ -1817,32 +1814,32 @@ type RefreshNodeTypesResponse = {
1817
1814
  };
1818
1815
  /** RemoveEdgeOp */
1819
1816
  type RemoveEdgeOp = {
1820
- op?: "remove_edge";
1817
+ op: "remove_edge";
1821
1818
  edge_id: string;
1822
1819
  };
1823
1820
  /** Remove a node. Edges touching it are removed too (a dangling edge */
1824
1821
  type RemoveNodeOp = {
1825
- op?: "remove_node";
1822
+ op: "remove_node";
1826
1823
  node_id: string;
1827
1824
  };
1828
1825
  /** RemoveVariableOp */
1829
1826
  type RemoveVariableOp = {
1830
- op?: "remove_variable";
1827
+ op: "remove_variable";
1831
1828
  name: string;
1832
1829
  };
1833
1830
  /** Replace an existing edge WHOLE (source, target, handles, data). */
1834
1831
  type ReplaceEdgeOp = {
1835
- op?: "replace_edge";
1832
+ op: "replace_edge";
1836
1833
  edge: EdgeDef;
1837
1834
  };
1838
1835
  /** Replace an existing node WHOLE — type, position and data all become */
1839
1836
  type ReplaceNodeOp_Input = {
1840
- op?: "replace_node";
1837
+ op: "replace_node";
1841
1838
  node: NodeDef;
1842
1839
  };
1843
1840
  /** Replace an existing node WHOLE — type, position and data all become */
1844
1841
  type ReplaceNodeOp_Output = {
1845
- op?: "replace_node";
1842
+ op: "replace_node";
1846
1843
  node: NodeDef;
1847
1844
  };
1848
1845
  /** RerunFromRequest */
@@ -1929,7 +1926,7 @@ type RetryNodeRequest = {
1929
1926
  };
1930
1927
  /** Re-run the failed node with the same (or edited) inputs. */
1931
1928
  type RetryProposal = {
1932
- action?: "retry";
1929
+ action: "retry";
1933
1930
  node_id: string;
1934
1931
  inputs?: {
1935
1932
  [key: string]: unknown;
@@ -2276,7 +2273,7 @@ type SetShapeRequest = {
2276
2273
  };
2277
2274
  /** Upsert a declared run variable by name. */
2278
2275
  type SetVariableOp = {
2279
- op?: "set_variable";
2276
+ op: "set_variable";
2280
2277
  variable: VariableSpec;
2281
2278
  };
2282
2279
  /** SettlePlanRequest */
@@ -2386,7 +2383,7 @@ type SkipNodeRequest = {
2386
2383
  };
2387
2384
  /** Synthesize a (possibly empty) output and continue. */
2388
2385
  type SkipProposal = {
2389
- action?: "skip";
2386
+ action: "skip";
2390
2387
  node_id: string;
2391
2388
  output?: {
2392
2389
  [key: string]: unknown;
@@ -2718,7 +2715,7 @@ type UnarchiveWorkflowResponse = {
2718
2715
  };
2719
2716
  /** Deep-merge ``data`` into an existing node's ``data`` payload. */
2720
2717
  type UpdateNodeDataOp = {
2721
- op?: "update_node_data";
2718
+ op: "update_node_data";
2722
2719
  node_id: string;
2723
2720
  data: {
2724
2721
  [key: string]: unknown;
@@ -2726,7 +2723,7 @@ type UpdateNodeDataOp = {
2726
2723
  };
2727
2724
  /** Replace an existing node's top-level React Flow renderer type. */
2728
2725
  type UpdateNodeTypeOp = {
2729
- op?: "update_node_type";
2726
+ op: "update_node_type";
2730
2727
  node_id: string;
2731
2728
  type: string;
2732
2729
  };
package/dist/workflows.js CHANGED
@@ -1,5 +1,5 @@
1
- import { openStream } from './chunk-PIVTHTVR.js';
2
- import './chunk-KIEAFMKB.js';
1
+ import { openStream } from './chunk-FLANGLCG.js';
2
+ import './chunk-PIPE5OML.js';
3
3
 
4
4
  // src/generated/workflows.ts
5
5
  var $runAssignments = { m: "POST", p: "/ai/agent-assignments", d: "aidream", a: "guest", o: "required", s: "ndjson", n: "workflows.run_assignments" };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/api",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "The one way every app talks to every AI Matrx server: generated from the server contract, split by domain so an app loads only the requests it calls. Transport, five credential kinds, organization binding, streams, job follow. No screens, app state or database code.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -81,6 +81,16 @@
81
81
  "default": "./dist/schemas.cjs"
82
82
  }
83
83
  },
84
+ "./types": {
85
+ "import": {
86
+ "types": "./dist/types.d.ts",
87
+ "default": "./dist/types.js"
88
+ },
89
+ "require": {
90
+ "types": "./dist/types.d.cts",
91
+ "default": "./dist/types.cjs"
92
+ }
93
+ },
84
94
  "./account": {
85
95
  "import": {
86
96
  "types": "./dist/account.d.ts",
@@ -364,8 +374,8 @@
364
374
  "./package.json": "./package.json"
365
375
  },
366
376
  "dependencies": {
367
- "@ai-matrx/kit": "latest",
368
- "@ai-matrx/auth": "latest"
377
+ "@ai-matrx/auth": "latest",
378
+ "@ai-matrx/kit": "latest"
369
379
  },
370
380
  "devDependencies": {
371
381
  "@arethetypeswrong/cli": "^0.18.5",
@@ -417,5 +427,5 @@
417
427
  "check:sections": "node scripts/section-probe.mjs \"$PWD\"",
418
428
  "verify:tarball": "node scripts/verify-tarball.mjs"
419
429
  },
420
- "gitHead": "a6ea2f0c54759da6ee884dd6be281ecb6d279815"
430
+ "gitHead": "c1a92de76cd4552254694187200516d771f52571"
421
431
  }
@@ -1,59 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk2SXAAKGV_cjs = require('./chunk-2SXAAKGV.cjs');
4
-
5
- // src/net/stream-monitor.ts
6
- var DEFAULTS = {
7
- heartbeatTimeoutMs: 3e4,
8
- maxLifetimeMs: 6e5
9
- };
10
- async function* monitorStream(source, opts = {}) {
11
- const heartbeatTimeoutMs = opts.heartbeatTimeoutMs ?? DEFAULTS.heartbeatTimeoutMs;
12
- const maxLifetimeMs = opts.maxLifetimeMs ?? DEFAULTS.maxLifetimeMs;
13
- const abort = opts.abortController;
14
- const startedAt = Date.now();
15
- const iter = source[Symbol.asyncIterator]();
16
- while (true) {
17
- const elapsed = Date.now() - startedAt;
18
- const remainingLifetime = maxLifetimeMs - elapsed;
19
- if (remainingLifetime <= 0) {
20
- abort?.abort("total-timeout");
21
- throw new chunk2SXAAKGV_cjs.TotalTimeoutError(maxLifetimeMs);
22
- }
23
- const deadline = Math.min(heartbeatTimeoutMs, remainingLifetime);
24
- let timer = null;
25
- let timedOutKind = null;
26
- const timeoutPromise = new Promise((_, reject) => {
27
- timer = setTimeout(() => {
28
- timedOutKind = deadline === remainingLifetime ? "total" : "heartbeat";
29
- abort?.abort(
30
- timedOutKind === "total" ? "total-timeout" : "heartbeat-timeout"
31
- );
32
- reject(
33
- timedOutKind === "total" ? new chunk2SXAAKGV_cjs.TotalTimeoutError(maxLifetimeMs) : new chunk2SXAAKGV_cjs.HeartbeatTimeoutError(heartbeatTimeoutMs)
34
- );
35
- }, deadline);
36
- });
37
- let result;
38
- try {
39
- result = await Promise.race([iter.next(), timeoutPromise]);
40
- } catch (err) {
41
- if (timer !== null) clearTimeout(timer);
42
- try {
43
- const cleanup = iter.return?.(void 0);
44
- if (cleanup) {
45
- void Promise.resolve(cleanup).catch(() => {
46
- });
47
- }
48
- } catch {
49
- }
50
- throw err;
51
- }
52
- if (timer !== null) clearTimeout(timer);
53
- if (result.done) return;
54
- opts.onHeartbeat?.(Date.now());
55
- yield result.value;
56
- }
57
- }
58
-
59
- exports.monitorStream = monitorStream;
@@ -1,57 +0,0 @@
1
- import { TotalTimeoutError, HeartbeatTimeoutError } from './chunk-KIEAFMKB.js';
2
-
3
- // src/net/stream-monitor.ts
4
- var DEFAULTS = {
5
- heartbeatTimeoutMs: 3e4,
6
- maxLifetimeMs: 6e5
7
- };
8
- async function* monitorStream(source, opts = {}) {
9
- const heartbeatTimeoutMs = opts.heartbeatTimeoutMs ?? DEFAULTS.heartbeatTimeoutMs;
10
- const maxLifetimeMs = opts.maxLifetimeMs ?? DEFAULTS.maxLifetimeMs;
11
- const abort = opts.abortController;
12
- const startedAt = Date.now();
13
- const iter = source[Symbol.asyncIterator]();
14
- while (true) {
15
- const elapsed = Date.now() - startedAt;
16
- const remainingLifetime = maxLifetimeMs - elapsed;
17
- if (remainingLifetime <= 0) {
18
- abort?.abort("total-timeout");
19
- throw new TotalTimeoutError(maxLifetimeMs);
20
- }
21
- const deadline = Math.min(heartbeatTimeoutMs, remainingLifetime);
22
- let timer = null;
23
- let timedOutKind = null;
24
- const timeoutPromise = new Promise((_, reject) => {
25
- timer = setTimeout(() => {
26
- timedOutKind = deadline === remainingLifetime ? "total" : "heartbeat";
27
- abort?.abort(
28
- timedOutKind === "total" ? "total-timeout" : "heartbeat-timeout"
29
- );
30
- reject(
31
- timedOutKind === "total" ? new TotalTimeoutError(maxLifetimeMs) : new HeartbeatTimeoutError(heartbeatTimeoutMs)
32
- );
33
- }, deadline);
34
- });
35
- let result;
36
- try {
37
- result = await Promise.race([iter.next(), timeoutPromise]);
38
- } catch (err) {
39
- if (timer !== null) clearTimeout(timer);
40
- try {
41
- const cleanup = iter.return?.(void 0);
42
- if (cleanup) {
43
- void Promise.resolve(cleanup).catch(() => {
44
- });
45
- }
46
- } catch {
47
- }
48
- throw err;
49
- }
50
- if (timer !== null) clearTimeout(timer);
51
- if (result.done) return;
52
- opts.onHeartbeat?.(Date.now());
53
- yield result.value;
54
- }
55
- }
56
-
57
- export { monitorStream };