@usestratus/sdk 0.12.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.
Files changed (117) hide show
  1. package/dist/azure/chat-completions-model.d.ts +23 -0
  2. package/dist/azure/chat-completions-model.d.ts.map +1 -0
  3. package/dist/azure/chat-completions-model.js +293 -0
  4. package/dist/azure/chat-completions-model.js.map +1 -0
  5. package/dist/azure/endpoint.d.ts +18 -0
  6. package/dist/azure/endpoint.d.ts.map +1 -0
  7. package/dist/azure/endpoint.js +57 -0
  8. package/dist/azure/endpoint.js.map +1 -0
  9. package/dist/azure/index.d.ts +5 -0
  10. package/dist/azure/index.d.ts.map +1 -0
  11. package/dist/azure/index.js +3 -0
  12. package/dist/azure/index.js.map +1 -0
  13. package/dist/azure/responses-model.d.ts +25 -0
  14. package/dist/azure/responses-model.d.ts.map +1 -0
  15. package/dist/azure/responses-model.js +557 -0
  16. package/dist/azure/responses-model.js.map +1 -0
  17. package/dist/azure/sse-parser.d.ts +2 -0
  18. package/dist/azure/sse-parser.d.ts.map +1 -0
  19. package/dist/azure/sse-parser.js +39 -0
  20. package/dist/azure/sse-parser.js.map +1 -0
  21. package/dist/core/agent.d.ts +47 -0
  22. package/dist/core/agent.d.ts.map +1 -0
  23. package/dist/core/agent.js +74 -0
  24. package/dist/core/agent.js.map +1 -0
  25. package/dist/core/builtin-tools.d.ts +41 -0
  26. package/dist/core/builtin-tools.d.ts.map +1 -0
  27. package/dist/core/builtin-tools.js +80 -0
  28. package/dist/core/builtin-tools.js.map +1 -0
  29. package/dist/core/codemode/executor.d.ts +62 -0
  30. package/dist/core/codemode/executor.d.ts.map +1 -0
  31. package/dist/core/codemode/executor.js +188 -0
  32. package/dist/core/codemode/executor.js.map +1 -0
  33. package/dist/core/codemode/index.d.ts +62 -0
  34. package/dist/core/codemode/index.d.ts.map +1 -0
  35. package/dist/core/codemode/index.js +104 -0
  36. package/dist/core/codemode/index.js.map +1 -0
  37. package/dist/core/codemode/types.d.ts +24 -0
  38. package/dist/core/codemode/types.d.ts.map +1 -0
  39. package/dist/core/codemode/types.js +405 -0
  40. package/dist/core/codemode/types.js.map +1 -0
  41. package/dist/core/context.d.ts +10 -0
  42. package/dist/core/context.d.ts.map +1 -0
  43. package/dist/core/context.js +32 -0
  44. package/dist/core/context.js.map +1 -0
  45. package/dist/core/cost.d.ts +9 -0
  46. package/dist/core/cost.d.ts.map +1 -0
  47. package/dist/core/cost.js +14 -0
  48. package/dist/core/cost.js.map +1 -0
  49. package/dist/core/errors.d.ts +48 -0
  50. package/dist/core/errors.d.ts.map +1 -0
  51. package/dist/core/errors.js +85 -0
  52. package/dist/core/errors.js.map +1 -0
  53. package/dist/core/guardrails.d.ts +39 -0
  54. package/dist/core/guardrails.d.ts.map +1 -0
  55. package/dist/core/guardrails.js +40 -0
  56. package/dist/core/guardrails.js.map +1 -0
  57. package/dist/core/handoff.d.ts +35 -0
  58. package/dist/core/handoff.d.ts.map +1 -0
  59. package/dist/core/handoff.js +39 -0
  60. package/dist/core/handoff.js.map +1 -0
  61. package/dist/core/hooks.d.ts +154 -0
  62. package/dist/core/hooks.d.ts.map +1 -0
  63. package/dist/core/hooks.js +2 -0
  64. package/dist/core/hooks.js.map +1 -0
  65. package/dist/core/hosted-tool.d.ts +11 -0
  66. package/dist/core/hosted-tool.d.ts.map +1 -0
  67. package/dist/core/hosted-tool.js +7 -0
  68. package/dist/core/hosted-tool.js.map +1 -0
  69. package/dist/core/index.d.ts +35 -0
  70. package/dist/core/index.d.ts.map +1 -0
  71. package/dist/core/index.js +18 -0
  72. package/dist/core/index.js.map +1 -0
  73. package/dist/core/model.d.ts +56 -0
  74. package/dist/core/model.d.ts.map +1 -0
  75. package/dist/core/model.js +2 -0
  76. package/dist/core/model.js.map +1 -0
  77. package/dist/core/result.d.ts +34 -0
  78. package/dist/core/result.d.ts.map +1 -0
  79. package/dist/core/result.js +31 -0
  80. package/dist/core/result.js.map +1 -0
  81. package/dist/core/run.d.ts +52 -0
  82. package/dist/core/run.d.ts.map +1 -0
  83. package/dist/core/run.js +972 -0
  84. package/dist/core/run.js.map +1 -0
  85. package/dist/core/session.d.ts +77 -0
  86. package/dist/core/session.d.ts.map +1 -0
  87. package/dist/core/session.js +160 -0
  88. package/dist/core/session.js.map +1 -0
  89. package/dist/core/subagent.d.ts +30 -0
  90. package/dist/core/subagent.d.ts.map +1 -0
  91. package/dist/core/subagent.js +52 -0
  92. package/dist/core/subagent.js.map +1 -0
  93. package/dist/core/todo.d.ts +56 -0
  94. package/dist/core/todo.d.ts.map +1 -0
  95. package/dist/core/todo.js +76 -0
  96. package/dist/core/todo.js.map +1 -0
  97. package/dist/core/tool.d.ts +26 -0
  98. package/dist/core/tool.d.ts.map +1 -0
  99. package/dist/core/tool.js +23 -0
  100. package/dist/core/tool.js.map +1 -0
  101. package/dist/core/tracing.d.ts +31 -0
  102. package/dist/core/tracing.d.ts.map +1 -0
  103. package/dist/core/tracing.js +62 -0
  104. package/dist/core/tracing.js.map +1 -0
  105. package/dist/core/types.d.ts +106 -0
  106. package/dist/core/types.d.ts.map +1 -0
  107. package/dist/core/types.js +2 -0
  108. package/dist/core/types.js.map +1 -0
  109. package/dist/core/utils/zod.d.ts +5 -0
  110. package/dist/core/utils/zod.d.ts.map +1 -0
  111. package/dist/core/utils/zod.js +7 -0
  112. package/dist/core/utils/zod.js.map +1 -0
  113. package/dist/index.d.ts +3 -0
  114. package/dist/index.d.ts.map +1 -0
  115. package/dist/index.js +3 -0
  116. package/dist/index.js.map +1 -0
  117. package/package.json +36 -0
@@ -0,0 +1,31 @@
1
+ export interface Span {
2
+ name: string;
3
+ type: "model_call" | "tool_execution" | "handoff" | "guardrail" | "subagent" | "custom";
4
+ startTime: number;
5
+ endTime: number;
6
+ duration: number;
7
+ metadata?: Record<string, unknown>;
8
+ children: Span[];
9
+ }
10
+ export interface Trace {
11
+ id: string;
12
+ name: string;
13
+ startTime: number;
14
+ endTime?: number;
15
+ duration?: number;
16
+ spans: Span[];
17
+ }
18
+ export declare class TraceContext {
19
+ readonly trace: Trace;
20
+ private spanStack;
21
+ constructor(name: string);
22
+ startSpan(name: string, type: Span["type"], metadata?: Record<string, unknown>): Span;
23
+ endSpan(span: Span, metadata?: Record<string, unknown>): void;
24
+ finish(): Trace;
25
+ }
26
+ export declare function getCurrentTrace(): TraceContext | undefined;
27
+ export declare function withTrace<T>(name: string, fn: (trace: TraceContext) => T | Promise<T>): Promise<{
28
+ result: T;
29
+ trace: Trace;
30
+ }>;
31
+ //# sourceMappingURL=tracing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/core/tracing.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,IAAI;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,GAAG,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,QAAQ,EAAE,IAAI,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,KAAK;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,IAAI,EAAE,CAAC;CACd;AAED,qBAAa,YAAY;IACxB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,OAAO,CAAC,SAAS,CAAS;gBAEd,IAAI,EAAE,MAAM;IAUxB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAsBrF,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAa7D,MAAM,IAAI,KAAK;CAKf;AAID,wBAAgB,eAAe,IAAI,YAAY,GAAG,SAAS,CAE1D;AAED,wBAAsB,SAAS,CAAC,CAAC,EAChC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GACzC,OAAO,CAAC;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC,CAKtC"}
@@ -0,0 +1,62 @@
1
+ import { AsyncLocalStorage } from "node:async_hooks";
2
+ export class TraceContext {
3
+ trace;
4
+ spanStack;
5
+ constructor(name) {
6
+ this.trace = {
7
+ id: crypto.randomUUID(),
8
+ name,
9
+ startTime: performance.now(),
10
+ spans: [],
11
+ };
12
+ this.spanStack = [];
13
+ }
14
+ startSpan(name, type, metadata) {
15
+ const span = {
16
+ name,
17
+ type,
18
+ startTime: performance.now(),
19
+ endTime: 0,
20
+ duration: 0,
21
+ metadata,
22
+ children: [],
23
+ };
24
+ const parent = this.spanStack[this.spanStack.length - 1];
25
+ if (parent) {
26
+ parent.children.push(span);
27
+ }
28
+ else {
29
+ this.trace.spans.push(span);
30
+ }
31
+ this.spanStack.push(span);
32
+ return span;
33
+ }
34
+ endSpan(span, metadata) {
35
+ span.endTime = performance.now();
36
+ span.duration = span.endTime - span.startTime;
37
+ if (metadata) {
38
+ span.metadata = { ...span.metadata, ...metadata };
39
+ }
40
+ // Pop the matching span; handle out-of-order or missing endSpan calls
41
+ const idx = this.spanStack.lastIndexOf(span);
42
+ if (idx >= 0) {
43
+ this.spanStack.splice(idx, 1);
44
+ }
45
+ }
46
+ finish() {
47
+ this.trace.endTime = performance.now();
48
+ this.trace.duration = this.trace.endTime - this.trace.startTime;
49
+ return this.trace;
50
+ }
51
+ }
52
+ const traceStorage = new AsyncLocalStorage();
53
+ export function getCurrentTrace() {
54
+ return traceStorage.getStore();
55
+ }
56
+ export async function withTrace(name, fn) {
57
+ const traceCtx = new TraceContext(name);
58
+ const result = await traceStorage.run(traceCtx, () => fn(traceCtx));
59
+ const trace = traceCtx.finish();
60
+ return { result, trace };
61
+ }
62
+ //# sourceMappingURL=tracing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/core/tracing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAqBrD,MAAM,OAAO,YAAY;IACf,KAAK,CAAQ;IACd,SAAS,CAAS;IAE1B,YAAY,IAAY;QACvB,IAAI,CAAC,KAAK,GAAG;YACZ,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE;YACvB,IAAI;YACJ,SAAS,EAAE,WAAW,CAAC,GAAG,EAAE;YAC5B,KAAK,EAAE,EAAE;SACT,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,SAAS,CAAC,IAAY,EAAE,IAAkB,EAAE,QAAkC;QAC7E,MAAM,IAAI,GAAS;YAClB,IAAI;YACJ,IAAI;YACJ,SAAS,EAAE,WAAW,CAAC,GAAG,EAAE;YAC5B,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,CAAC;YACX,QAAQ;YACR,QAAQ,EAAE,EAAE;SACZ,CAAC;QAEF,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACzD,IAAI,MAAM,EAAE,CAAC;YACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,KAAK,CAAC,KAA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CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpE,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,106 @@
1
+ export interface SystemMessage {
2
+ role: "system";
3
+ content: string;
4
+ }
5
+ export interface TextContentPart {
6
+ type: "text";
7
+ text: string;
8
+ }
9
+ export interface ImageContentPart {
10
+ type: "image_url";
11
+ image_url: {
12
+ url: string;
13
+ detail?: "auto" | "low" | "high";
14
+ };
15
+ }
16
+ export type ContentPart = TextContentPart | ImageContentPart;
17
+ export interface UserMessage {
18
+ role: "user";
19
+ content: string | ContentPart[];
20
+ }
21
+ export interface AssistantMessage {
22
+ role: "assistant";
23
+ content: string | null;
24
+ tool_calls?: ToolCall[];
25
+ }
26
+ export interface ToolMessage {
27
+ role: "tool";
28
+ tool_call_id: string;
29
+ content: string;
30
+ }
31
+ export interface DeveloperMessage {
32
+ role: "developer";
33
+ content: string;
34
+ }
35
+ export type ChatMessage = SystemMessage | DeveloperMessage | UserMessage | AssistantMessage | ToolMessage;
36
+ export interface ToolCall {
37
+ id: string;
38
+ type: "function";
39
+ function: {
40
+ name: string;
41
+ arguments: string;
42
+ };
43
+ }
44
+ export type ToolChoice = "auto" | "none" | "required" | {
45
+ type: "function";
46
+ function: {
47
+ name: string;
48
+ };
49
+ };
50
+ export type ToolUseBehavior = "run_llm_again" | "stop_on_first_tool" | {
51
+ stopAtToolNames: string[];
52
+ } | ((toolResults: {
53
+ toolName: string;
54
+ result: string;
55
+ }[]) => boolean | Promise<boolean>);
56
+ export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
57
+ export type ReasoningSummary = "auto" | "concise" | "detailed";
58
+ export type Truncation = "auto" | "disabled";
59
+ export interface ModelSettings {
60
+ temperature?: number;
61
+ topP?: number;
62
+ maxTokens?: number;
63
+ maxCompletionTokens?: number;
64
+ stop?: string[];
65
+ presencePenalty?: number;
66
+ frequencyPenalty?: number;
67
+ toolChoice?: ToolChoice;
68
+ parallelToolCalls?: boolean;
69
+ seed?: number;
70
+ reasoningEffort?: ReasoningEffort;
71
+ reasoningSummary?: ReasoningSummary;
72
+ promptCacheKey?: string;
73
+ truncation?: Truncation;
74
+ store?: boolean;
75
+ metadata?: Record<string, string>;
76
+ user?: string;
77
+ logprobs?: boolean;
78
+ topLogprobs?: number;
79
+ }
80
+ export type ResponseFormat = {
81
+ type: "text";
82
+ } | {
83
+ type: "json_object";
84
+ } | {
85
+ type: "json_schema";
86
+ json_schema: {
87
+ name: string;
88
+ description?: string;
89
+ schema: Record<string, unknown>;
90
+ strict?: boolean;
91
+ };
92
+ };
93
+ export interface ToolDefinition {
94
+ type: "function";
95
+ function: {
96
+ name: string;
97
+ description: string;
98
+ parameters: Record<string, unknown>;
99
+ strict?: boolean;
100
+ };
101
+ }
102
+ export interface HostedToolDefinition {
103
+ type: string;
104
+ [key: string]: unknown;
105
+ }
106
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;KAAE,CAAC;CAC7D;AAED,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAE7D,MAAM,WAAW,WAAW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C;CACD,CAAC;AAEL,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,MAAM,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;CACF;AAED,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { type ZodTypeAny } from "zod";
2
+ type JsonSchema = Record<string, unknown>;
3
+ export declare function zodToJsonSchema(schema: ZodTypeAny): JsonSchema;
4
+ export {};
5
+ //# sourceMappingURL=zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../src/core/utils/zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,KAAK,CAAC;AAEpD,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAI9D"}
@@ -0,0 +1,7 @@
1
+ import { toJSONSchema } from "zod";
2
+ export function zodToJsonSchema(schema) {
3
+ const result = toJSONSchema(schema);
4
+ result.$schema = undefined;
5
+ return result;
6
+ }
7
+ //# sourceMappingURL=zod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.js","sourceRoot":"","sources":["../../../src/core/utils/zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,KAAK,CAAC;AAIpD,MAAM,UAAU,eAAe,CAAC,MAAkB;IACjD,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAe,CAAC;IAClD,MAAM,CAAC,OAAO,GAAG,SAAS,CAAC;IAC3B,OAAO,MAAM,CAAC;AACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./core/index";
2
+ export * from "./azure/index";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./core/index";
2
+ export * from "./azure/index";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@usestratus/sdk",
3
+ "version": "0.12.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ },
12
+ "./core": {
13
+ "types": "./dist/core/index.d.ts",
14
+ "import": "./dist/core/index.js"
15
+ },
16
+ "./azure": {
17
+ "types": "./dist/azure/index.d.ts",
18
+ "import": "./dist/azure/index.js"
19
+ }
20
+ },
21
+ "keywords": ["azure", "openai", "agent", "ai", "llm", "typescript", "tools", "streaming"],
22
+ "files": ["dist", "README.md"],
23
+ "scripts": {
24
+ "build": "tsc -p tsconfig.build.json",
25
+ "typecheck": "tsc --noEmit",
26
+ "lint": "biome check .",
27
+ "lint:fix": "biome check --write .",
28
+ "test": "bun test"
29
+ },
30
+ "peerDependencies": {
31
+ "zod": "^4.0.0"
32
+ },
33
+ "devDependencies": {
34
+ "zod": "^4.0.0"
35
+ }
36
+ }