@lore-co/core 0.1.14 → 0.1.16

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.
@@ -0,0 +1,222 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Context Guard runs Lore proactively at meaningful action boundaries.
4
+ *
5
+ * - `off`: Lore is query-only; no proactive checks run.
6
+ * - `assist`: relevant shared context is surfaced before important actions,
7
+ * but nothing is ever blocked.
8
+ * - `enforce`: in addition to assist behavior, actions that conflict with a
9
+ * `required` (governed) rule need explicit confirmation before they run.
10
+ */
11
+ export declare const GuardModeSchema: z.ZodEnum<{
12
+ off: "off";
13
+ assist: "assist";
14
+ enforce: "enforce";
15
+ }>;
16
+ export type GuardMode = z.infer<typeof GuardModeSchema>;
17
+ export declare const GuardRepoOverrideSchema: z.ZodObject<{
18
+ repo: z.ZodString;
19
+ mode: z.ZodEnum<{
20
+ off: "off";
21
+ assist: "assist";
22
+ enforce: "enforce";
23
+ }>;
24
+ updatedAt: z.ZodISODateTime;
25
+ }, z.core.$strict>;
26
+ export type GuardRepoOverride = z.infer<typeof GuardRepoOverrideSchema>;
27
+ export declare const WorkspaceGuardPolicySchema: z.ZodObject<{
28
+ workspaceId: z.ZodUUID;
29
+ mode: z.ZodEnum<{
30
+ off: "off";
31
+ assist: "assist";
32
+ enforce: "enforce";
33
+ }>;
34
+ overrides: z.ZodArray<z.ZodObject<{
35
+ repo: z.ZodString;
36
+ mode: z.ZodEnum<{
37
+ off: "off";
38
+ assist: "assist";
39
+ enforce: "enforce";
40
+ }>;
41
+ updatedAt: z.ZodISODateTime;
42
+ }, z.core.$strict>>;
43
+ updatedAt: z.ZodISODateTime;
44
+ }, z.core.$strict>;
45
+ export type WorkspaceGuardPolicy = z.infer<typeof WorkspaceGuardPolicySchema>;
46
+ export declare const UpdateWorkspaceGuardPolicySchema: z.ZodObject<{
47
+ mode: z.ZodOptional<z.ZodEnum<{
48
+ off: "off";
49
+ assist: "assist";
50
+ enforce: "enforce";
51
+ }>>;
52
+ setOverride: z.ZodOptional<z.ZodObject<{
53
+ repo: z.ZodString;
54
+ mode: z.ZodEnum<{
55
+ off: "off";
56
+ assist: "assist";
57
+ enforce: "enforce";
58
+ }>;
59
+ }, z.core.$strict>>;
60
+ removeOverride: z.ZodOptional<z.ZodObject<{
61
+ repo: z.ZodString;
62
+ }, z.core.$strict>>;
63
+ }, z.core.$strict>;
64
+ export type UpdateWorkspaceGuardPolicy = z.infer<typeof UpdateWorkspaceGuardPolicySchema>;
65
+ /** The action boundary that triggered a guard check. */
66
+ export declare const GuardActionSchema: z.ZodEnum<{
67
+ other: "other";
68
+ edit: "edit";
69
+ command: "command";
70
+ mcp: "mcp";
71
+ commit: "commit";
72
+ deploy: "deploy";
73
+ plan: "plan";
74
+ }>;
75
+ export type GuardAction = z.infer<typeof GuardActionSchema>;
76
+ export declare const GuardCheckRequestSchema: z.ZodObject<{
77
+ connector: z.ZodString;
78
+ agent: z.ZodString;
79
+ sessionId: z.ZodString;
80
+ action: z.ZodEnum<{
81
+ other: "other";
82
+ edit: "edit";
83
+ command: "command";
84
+ mcp: "mcp";
85
+ commit: "commit";
86
+ deploy: "deploy";
87
+ plan: "plan";
88
+ }>;
89
+ tool: z.ZodOptional<z.ZodString>;
90
+ task: z.ZodOptional<z.ZodString>;
91
+ repo: z.ZodOptional<z.ZodString>;
92
+ path: z.ZodOptional<z.ZodString>;
93
+ files: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>>;
94
+ command: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strict>;
96
+ export type GuardCheckRequest = z.infer<typeof GuardCheckRequestSchema>;
97
+ export declare const GuardItemSourceSchema: z.ZodObject<{
98
+ agent: z.ZodString;
99
+ sessionId: z.ZodNullable<z.ZodString>;
100
+ userId: z.ZodNullable<z.ZodUUID>;
101
+ createdAt: z.ZodISODateTime;
102
+ }, z.core.$strict>;
103
+ export type GuardItemSource = z.infer<typeof GuardItemSourceSchema>;
104
+ export declare const GuardItemSchema: z.ZodObject<{
105
+ memoryId: z.ZodUUID;
106
+ content: z.ZodString;
107
+ category: z.ZodEnum<{
108
+ architecture: "architecture";
109
+ convention: "convention";
110
+ correction: "correction";
111
+ gotcha: "gotcha";
112
+ known_gotcha: "known_gotcha";
113
+ deprecated: "deprecated";
114
+ behavior: "behavior";
115
+ review_feedback: "review_feedback";
116
+ other: "other";
117
+ }>;
118
+ scope: z.ZodObject<{
119
+ organization: z.ZodOptional<z.ZodString>;
120
+ project: z.ZodOptional<z.ZodString>;
121
+ repo: z.ZodOptional<z.ZodString>;
122
+ path: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
123
+ component: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strict>;
125
+ enforcement: z.ZodEnum<{
126
+ advisory: "advisory";
127
+ required: "required";
128
+ }>;
129
+ source: z.ZodObject<{
130
+ agent: z.ZodString;
131
+ sessionId: z.ZodNullable<z.ZodString>;
132
+ userId: z.ZodNullable<z.ZodUUID>;
133
+ createdAt: z.ZodISODateTime;
134
+ }, z.core.$strict>;
135
+ reasons: z.ZodArray<z.ZodString>;
136
+ }, z.core.$strict>;
137
+ export type GuardItem = z.infer<typeof GuardItemSchema>;
138
+ export declare const GuardConflictSchema: z.ZodObject<{
139
+ memoryIds: z.ZodArray<z.ZodUUID>;
140
+ summary: z.ZodString;
141
+ }, z.core.$strict>;
142
+ export type GuardConflict = z.infer<typeof GuardConflictSchema>;
143
+ export declare const GUARD_MAX_ITEMS = 3;
144
+ export declare const GuardCheckResponseSchema: z.ZodObject<{
145
+ checkId: z.ZodUUID;
146
+ mode: z.ZodEnum<{
147
+ off: "off";
148
+ assist: "assist";
149
+ enforce: "enforce";
150
+ }>;
151
+ modeSource: z.ZodEnum<{
152
+ workspace: "workspace";
153
+ repo_override: "repo_override";
154
+ }>;
155
+ relevant: z.ZodBoolean;
156
+ items: z.ZodArray<z.ZodObject<{
157
+ memoryId: z.ZodUUID;
158
+ content: z.ZodString;
159
+ category: z.ZodEnum<{
160
+ architecture: "architecture";
161
+ convention: "convention";
162
+ correction: "correction";
163
+ gotcha: "gotcha";
164
+ known_gotcha: "known_gotcha";
165
+ deprecated: "deprecated";
166
+ behavior: "behavior";
167
+ review_feedback: "review_feedback";
168
+ other: "other";
169
+ }>;
170
+ scope: z.ZodObject<{
171
+ organization: z.ZodOptional<z.ZodString>;
172
+ project: z.ZodOptional<z.ZodString>;
173
+ repo: z.ZodOptional<z.ZodString>;
174
+ path: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
175
+ component: z.ZodOptional<z.ZodString>;
176
+ }, z.core.$strict>;
177
+ enforcement: z.ZodEnum<{
178
+ advisory: "advisory";
179
+ required: "required";
180
+ }>;
181
+ source: z.ZodObject<{
182
+ agent: z.ZodString;
183
+ sessionId: z.ZodNullable<z.ZodString>;
184
+ userId: z.ZodNullable<z.ZodUUID>;
185
+ createdAt: z.ZodISODateTime;
186
+ }, z.core.$strict>;
187
+ reasons: z.ZodArray<z.ZodString>;
188
+ }, z.core.$strict>>;
189
+ conflicts: z.ZodArray<z.ZodObject<{
190
+ memoryIds: z.ZodArray<z.ZodUUID>;
191
+ summary: z.ZodString;
192
+ }, z.core.$strict>>;
193
+ requiresConfirmation: z.ZodBoolean;
194
+ confirm: z.ZodOptional<z.ZodObject<{
195
+ memoryIds: z.ZodArray<z.ZodUUID>;
196
+ command: z.ZodString;
197
+ expiresAt: z.ZodISODateTime;
198
+ }, z.core.$strict>>;
199
+ }, z.core.$strict>;
200
+ export type GuardCheckResponse = z.infer<typeof GuardCheckResponseSchema>;
201
+ export declare const GuardApproveRequestSchema: z.ZodObject<{
202
+ checkId: z.ZodUUID;
203
+ }, z.core.$strict>;
204
+ export type GuardApproveRequest = z.infer<typeof GuardApproveRequestSchema>;
205
+ export declare const GuardApproveResponseSchema: z.ZodObject<{
206
+ checkId: z.ZodUUID;
207
+ approved: z.ZodNumber;
208
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
209
+ }, z.core.$strict>;
210
+ export type GuardApproveResponse = z.infer<typeof GuardApproveResponseSchema>;
211
+ /** How long an approval (or pending confirmation) stays valid. */
212
+ export declare const GUARD_APPROVAL_TTL_MINUTES = 30;
213
+ /**
214
+ * Formats surfaced guard items the way agents should see them: a short,
215
+ * scannable block with content first and provenance below. Shared by every
216
+ * integration so all agents receive identical guard context.
217
+ */
218
+ export declare function formatGuardContext(response: {
219
+ items: readonly Pick<GuardItem, "content" | "source" | "scope">[];
220
+ conflicts: readonly GuardConflict[];
221
+ }): string;
222
+ //# sourceMappingURL=guard-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard-schemas.d.ts","sourceRoot":"","sources":["../src/guard-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;;EAAuC,CAAC;AACpE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAIxD,eAAO,MAAM,uBAAuB;;;;;;;;kBAMzB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;kBAO5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;kBAgB1C,CAAC;AACJ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,iBAAiB;;;;;;;;EAQ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AE;IAC3C,KAAK,EAAE,SAAS,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC,EAAE,CAAC;IAClE,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;CACrC,GAAG,MAAM,CAyBT"}
@@ -0,0 +1,159 @@
1
+ import { z } from "zod";
2
+ import { MemoryCategorySchema, MemoryEnforcementSchema, MemoryScopeSchema, RepositoryPathSchema, } from "./schemas.js";
3
+ import { ConnectorNameSchema } from "./pilot-schemas.js";
4
+ /**
5
+ * Context Guard runs Lore proactively at meaningful action boundaries.
6
+ *
7
+ * - `off`: Lore is query-only; no proactive checks run.
8
+ * - `assist`: relevant shared context is surfaced before important actions,
9
+ * but nothing is ever blocked.
10
+ * - `enforce`: in addition to assist behavior, actions that conflict with a
11
+ * `required` (governed) rule need explicit confirmation before they run.
12
+ */
13
+ export const GuardModeSchema = z.enum(["off", "assist", "enforce"]);
14
+ const GuardRepoSchema = z.string().trim().min(1).max(1_000);
15
+ export const GuardRepoOverrideSchema = z
16
+ .object({
17
+ repo: GuardRepoSchema,
18
+ mode: GuardModeSchema,
19
+ updatedAt: z.iso.datetime({ offset: true }),
20
+ })
21
+ .strict();
22
+ export const WorkspaceGuardPolicySchema = z
23
+ .object({
24
+ workspaceId: z.uuid(),
25
+ mode: GuardModeSchema,
26
+ overrides: z.array(GuardRepoOverrideSchema),
27
+ updatedAt: z.iso.datetime({ offset: true }),
28
+ })
29
+ .strict();
30
+ export const UpdateWorkspaceGuardPolicySchema = z
31
+ .object({
32
+ mode: GuardModeSchema.optional(),
33
+ setOverride: z
34
+ .object({ repo: GuardRepoSchema, mode: GuardModeSchema })
35
+ .strict()
36
+ .optional(),
37
+ removeOverride: z.object({ repo: GuardRepoSchema }).strict().optional(),
38
+ })
39
+ .strict()
40
+ .refine((input) => input.mode !== undefined ||
41
+ input.setOverride !== undefined ||
42
+ input.removeOverride !== undefined, { message: "At least one guard policy field is required" });
43
+ /** The action boundary that triggered a guard check. */
44
+ export const GuardActionSchema = z.enum([
45
+ "edit",
46
+ "command",
47
+ "mcp",
48
+ "commit",
49
+ "deploy",
50
+ "plan",
51
+ "other",
52
+ ]);
53
+ export const GuardCheckRequestSchema = z
54
+ .object({
55
+ connector: ConnectorNameSchema,
56
+ agent: z.string().trim().min(1).max(100),
57
+ sessionId: z.string().trim().min(1).max(500),
58
+ action: GuardActionSchema,
59
+ tool: z.string().trim().min(1).max(200).optional(),
60
+ task: z.string().trim().min(1).max(20_000).optional(),
61
+ repo: GuardRepoSchema.optional(),
62
+ path: z.string().trim().min(1).max(2_000).optional(),
63
+ files: z.array(RepositoryPathSchema).max(100).optional(),
64
+ command: z.string().trim().min(1).max(10_000).optional(),
65
+ })
66
+ .strict();
67
+ export const GuardItemSourceSchema = z
68
+ .object({
69
+ agent: z.string().trim().min(1).max(100),
70
+ sessionId: z.string().trim().min(1).max(500).nullable(),
71
+ userId: z.uuid().nullable(),
72
+ createdAt: z.iso.datetime({ offset: true }),
73
+ })
74
+ .strict();
75
+ export const GuardItemSchema = z
76
+ .object({
77
+ memoryId: z.uuid(),
78
+ content: z.string().trim().min(1),
79
+ category: MemoryCategorySchema,
80
+ scope: MemoryScopeSchema,
81
+ enforcement: MemoryEnforcementSchema,
82
+ source: GuardItemSourceSchema,
83
+ reasons: z.array(z.string().trim().min(1).max(100)),
84
+ })
85
+ .strict();
86
+ export const GuardConflictSchema = z
87
+ .object({
88
+ memoryIds: z.array(z.uuid()).min(2),
89
+ summary: z.string().trim().min(1).max(2_000),
90
+ })
91
+ .strict();
92
+ export const GUARD_MAX_ITEMS = 3;
93
+ export const GuardCheckResponseSchema = z
94
+ .object({
95
+ checkId: z.uuid(),
96
+ /** The effective mode after repo-override resolution. */
97
+ mode: GuardModeSchema,
98
+ /** Where the effective mode came from. */
99
+ modeSource: z.enum(["workspace", "repo_override"]),
100
+ relevant: z.boolean(),
101
+ items: z.array(GuardItemSchema).max(GUARD_MAX_ITEMS),
102
+ conflicts: z.array(GuardConflictSchema),
103
+ requiresConfirmation: z.boolean(),
104
+ /** Present when requiresConfirmation is true. */
105
+ confirm: z
106
+ .object({
107
+ memoryIds: z.array(z.uuid()).min(1),
108
+ command: z.string().trim().min(1).max(200),
109
+ expiresAt: z.iso.datetime({ offset: true }),
110
+ })
111
+ .strict()
112
+ .optional(),
113
+ })
114
+ .strict();
115
+ export const GuardApproveRequestSchema = z
116
+ .object({
117
+ checkId: z.uuid(),
118
+ })
119
+ .strict();
120
+ export const GuardApproveResponseSchema = z
121
+ .object({
122
+ checkId: z.uuid(),
123
+ approved: z.number().int().nonnegative(),
124
+ expiresAt: z.iso.datetime({ offset: true }).nullable(),
125
+ })
126
+ .strict();
127
+ /** How long an approval (or pending confirmation) stays valid. */
128
+ export const GUARD_APPROVAL_TTL_MINUTES = 30;
129
+ /**
130
+ * Formats surfaced guard items the way agents should see them: a short,
131
+ * scannable block with content first and provenance below. Shared by every
132
+ * integration so all agents receive identical guard context.
133
+ */
134
+ export function formatGuardContext(response) {
135
+ if (response.items.length === 0) {
136
+ return "";
137
+ }
138
+ const lines = ["Relevant Lore context:"];
139
+ for (const item of response.items) {
140
+ lines.push(`- ${item.content}`);
141
+ }
142
+ lines.push("", "Sources:");
143
+ for (const item of response.items) {
144
+ const scope = item.scope.repo !== undefined
145
+ ? `${item.scope.repo} repo`
146
+ : item.scope.organization !== undefined
147
+ ? "organization rule"
148
+ : "workspace knowledge";
149
+ lines.push(`- ${scope} · ${item.source.agent} session`);
150
+ }
151
+ if (response.conflicts.length > 0) {
152
+ lines.push("", "Conflicting Lore context (do not silently pick a winner):");
153
+ for (const conflict of response.conflicts) {
154
+ lines.push(`- ${conflict.summary}`);
155
+ }
156
+ }
157
+ return lines.join("\n");
158
+ }
159
+ //# sourceMappingURL=guard-schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard-schemas.js","sourceRoot":"","sources":["../src/guard-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MA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,GACT,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;YAC3B,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO;YAC3B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS;gBACrC,CAAC,CAAC,mBAAmB;gBACrB,CAAC,CAAC,qBAAqB,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,UAAU,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,2DAA2D,CAAC,CAAC;QAC5E,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,SAAS,EAAE,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./schemas.js";
2
2
  export * from "./pilot-schemas.js";
3
+ export * from "./guard-schemas.js";
3
4
  export * from "./auth-schemas.js";
4
5
  export * from "./session-schemas.js";
5
6
  export { AuthenticatedWorkspaceSchema, type AuthenticatedWorkspace, } from "./auth-schemas.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,4BAA4B,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./schemas.js";
2
2
  export * from "./pilot-schemas.js";
3
+ export * from "./guard-schemas.js";
3
4
  export * from "./auth-schemas.js";
4
5
  export * from "./session-schemas.js";
5
6
  export { AuthenticatedWorkspaceSchema, } from "./auth-schemas.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,4BAA4B,GAE7B,MAAM,mBAAmB,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,4BAA4B,GAE7B,MAAM,mBAAmB,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}