@lore-co/core 0.1.15 → 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.
- package/dist/guard-schemas.d.ts +222 -0
- package/dist/guard-schemas.d.ts.map +1 -0
- package/dist/guard-schemas.js +159 -0
- package/dist/guard-schemas.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pilot-schemas.d.ts +60 -0
- package/dist/pilot-schemas.d.ts.map +1 -1
- package/dist/pilot-schemas.js +1 -0
- package/dist/pilot-schemas.js.map +1 -1
- package/dist/schemas.d.ts +138 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +8 -0
- package/dist/schemas.js.map +1 -1
- package/dist/session-schemas.d.ts +17 -0
- package/dist/session-schemas.d.ts.map +1 -1
- package/package.json +5 -1
|
@@ -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;;;;;;;;EAQ5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;kBAazB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;;kBAOvB,CAAC;AACZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUjB,CAAC;AACZ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,mBAAmB;;;kBAKrB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAqB1B,CAAC;AACZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,yBAAyB;;kBAI3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;;;kBAM5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,kEAAkE;AAClE,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE;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,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAGpE,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAE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AAC,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";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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
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"}
|
package/dist/pilot-schemas.d.ts
CHANGED
|
@@ -469,6 +469,7 @@ export declare const ConnectorEventTypeSchema: z.ZodEnum<{
|
|
|
469
469
|
observation: "observation";
|
|
470
470
|
paired_turn: "paired_turn";
|
|
471
471
|
context_delivery: "context_delivery";
|
|
472
|
+
guard_check: "guard_check";
|
|
472
473
|
}>;
|
|
473
474
|
export type ConnectorEventType = z.infer<typeof ConnectorEventTypeSchema>;
|
|
474
475
|
export declare const ConnectorEventSchema: z.ZodObject<{
|
|
@@ -480,6 +481,7 @@ export declare const ConnectorEventSchema: z.ZodObject<{
|
|
|
480
481
|
observation: "observation";
|
|
481
482
|
paired_turn: "paired_turn";
|
|
482
483
|
context_delivery: "context_delivery";
|
|
484
|
+
guard_check: "guard_check";
|
|
483
485
|
}>;
|
|
484
486
|
agent: z.ZodString;
|
|
485
487
|
sessionId: z.ZodString;
|
|
@@ -545,6 +547,7 @@ export declare const LearningInspectionProvenanceSchema: z.ZodObject<{
|
|
|
545
547
|
observation: "observation";
|
|
546
548
|
paired_turn: "paired_turn";
|
|
547
549
|
context_delivery: "context_delivery";
|
|
550
|
+
guard_check: "guard_check";
|
|
548
551
|
}>;
|
|
549
552
|
agent: z.ZodString;
|
|
550
553
|
sessionId: z.ZodString;
|
|
@@ -604,6 +607,10 @@ export declare const LearningInspectionResponseSchema: z.ZodObject<{
|
|
|
604
607
|
implicit: "implicit";
|
|
605
608
|
explicit: "explicit";
|
|
606
609
|
}>>;
|
|
610
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
611
|
+
advisory: "advisory";
|
|
612
|
+
required: "required";
|
|
613
|
+
}>>;
|
|
607
614
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
608
615
|
fingerprint: z.ZodString;
|
|
609
616
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -621,6 +628,7 @@ export declare const LearningInspectionResponseSchema: z.ZodObject<{
|
|
|
621
628
|
observation: "observation";
|
|
622
629
|
paired_turn: "paired_turn";
|
|
623
630
|
context_delivery: "context_delivery";
|
|
631
|
+
guard_check: "guard_check";
|
|
624
632
|
}>;
|
|
625
633
|
agent: z.ZodString;
|
|
626
634
|
sessionId: z.ZodString;
|
|
@@ -663,6 +671,7 @@ export declare const LearningInspectionResponseSchema: z.ZodObject<{
|
|
|
663
671
|
observation: "observation";
|
|
664
672
|
paired_turn: "paired_turn";
|
|
665
673
|
context_delivery: "context_delivery";
|
|
674
|
+
guard_check: "guard_check";
|
|
666
675
|
}>;
|
|
667
676
|
agent: z.ZodString;
|
|
668
677
|
sessionId: z.ZodString;
|
|
@@ -720,6 +729,10 @@ export declare const LearningInspectionResponseSchema: z.ZodObject<{
|
|
|
720
729
|
implicit: "implicit";
|
|
721
730
|
explicit: "explicit";
|
|
722
731
|
}>>;
|
|
732
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
733
|
+
advisory: "advisory";
|
|
734
|
+
required: "required";
|
|
735
|
+
}>>;
|
|
723
736
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
724
737
|
fingerprint: z.ZodString;
|
|
725
738
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -773,6 +786,10 @@ export declare const LearningInspectionResponseSchema: z.ZodObject<{
|
|
|
773
786
|
implicit: "implicit";
|
|
774
787
|
explicit: "explicit";
|
|
775
788
|
}>>;
|
|
789
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
790
|
+
advisory: "advisory";
|
|
791
|
+
required: "required";
|
|
792
|
+
}>>;
|
|
776
793
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
777
794
|
fingerprint: z.ZodString;
|
|
778
795
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -928,6 +945,7 @@ export declare const DeliveryReceiptDetailSchema: z.ZodObject<{
|
|
|
928
945
|
observation: "observation";
|
|
929
946
|
paired_turn: "paired_turn";
|
|
930
947
|
context_delivery: "context_delivery";
|
|
948
|
+
guard_check: "guard_check";
|
|
931
949
|
}>;
|
|
932
950
|
agent: z.ZodString;
|
|
933
951
|
sessionId: z.ZodString;
|
|
@@ -984,6 +1002,10 @@ export declare const DeliveryReceiptDetailSchema: z.ZodObject<{
|
|
|
984
1002
|
implicit: "implicit";
|
|
985
1003
|
explicit: "explicit";
|
|
986
1004
|
}>>;
|
|
1005
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1006
|
+
advisory: "advisory";
|
|
1007
|
+
required: "required";
|
|
1008
|
+
}>>;
|
|
987
1009
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
988
1010
|
fingerprint: z.ZodString;
|
|
989
1011
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -1066,6 +1088,10 @@ export declare const DeliveryFeedbackResponseSchema: z.ZodObject<{
|
|
|
1066
1088
|
implicit: "implicit";
|
|
1067
1089
|
explicit: "explicit";
|
|
1068
1090
|
}>>;
|
|
1091
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1092
|
+
advisory: "advisory";
|
|
1093
|
+
required: "required";
|
|
1094
|
+
}>>;
|
|
1069
1095
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
1070
1096
|
fingerprint: z.ZodString;
|
|
1071
1097
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -1086,6 +1112,7 @@ export declare const ContextDeliveryResponseSchema: z.ZodObject<{
|
|
|
1086
1112
|
observation: "observation";
|
|
1087
1113
|
paired_turn: "paired_turn";
|
|
1088
1114
|
context_delivery: "context_delivery";
|
|
1115
|
+
guard_check: "guard_check";
|
|
1089
1116
|
}>;
|
|
1090
1117
|
agent: z.ZodString;
|
|
1091
1118
|
sessionId: z.ZodString;
|
|
@@ -1196,6 +1223,10 @@ export declare const ContextDeliveryResponseSchema: z.ZodObject<{
|
|
|
1196
1223
|
implicit: "implicit";
|
|
1197
1224
|
explicit: "explicit";
|
|
1198
1225
|
}>>;
|
|
1226
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1227
|
+
advisory: "advisory";
|
|
1228
|
+
required: "required";
|
|
1229
|
+
}>>;
|
|
1199
1230
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
1200
1231
|
fingerprint: z.ZodString;
|
|
1201
1232
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -1250,6 +1281,10 @@ export declare const ContextDeliveryResponseSchema: z.ZodObject<{
|
|
|
1250
1281
|
implicit: "implicit";
|
|
1251
1282
|
explicit: "explicit";
|
|
1252
1283
|
}>>;
|
|
1284
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1285
|
+
advisory: "advisory";
|
|
1286
|
+
required: "required";
|
|
1287
|
+
}>>;
|
|
1253
1288
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
1254
1289
|
fingerprint: z.ZodString;
|
|
1255
1290
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -1342,6 +1377,7 @@ export declare const ActivityItemSchema: z.ZodObject<{
|
|
|
1342
1377
|
observation: "observation";
|
|
1343
1378
|
paired_turn: "paired_turn";
|
|
1344
1379
|
context_delivery: "context_delivery";
|
|
1380
|
+
guard_check: "guard_check";
|
|
1345
1381
|
}>;
|
|
1346
1382
|
agent: z.ZodString;
|
|
1347
1383
|
sessionId: z.ZodString;
|
|
@@ -1463,6 +1499,7 @@ export declare const ActivityQuerySchema: z.ZodObject<{
|
|
|
1463
1499
|
observation: "observation";
|
|
1464
1500
|
paired_turn: "paired_turn";
|
|
1465
1501
|
context_delivery: "context_delivery";
|
|
1502
|
+
guard_check: "guard_check";
|
|
1466
1503
|
}>>;
|
|
1467
1504
|
agent: z.ZodOptional<z.ZodString>;
|
|
1468
1505
|
connector: z.ZodOptional<z.ZodString>;
|
|
@@ -1483,6 +1520,7 @@ export declare const ActivityListResponseSchema: z.ZodObject<{
|
|
|
1483
1520
|
observation: "observation";
|
|
1484
1521
|
paired_turn: "paired_turn";
|
|
1485
1522
|
context_delivery: "context_delivery";
|
|
1523
|
+
guard_check: "guard_check";
|
|
1486
1524
|
}>;
|
|
1487
1525
|
agent: z.ZodString;
|
|
1488
1526
|
sessionId: z.ZodString;
|
|
@@ -1650,6 +1688,10 @@ export declare const TurnObservationSchema: z.ZodObject<{
|
|
|
1650
1688
|
implicit: "implicit";
|
|
1651
1689
|
explicit: "explicit";
|
|
1652
1690
|
}>>;
|
|
1691
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1692
|
+
advisory: "advisory";
|
|
1693
|
+
required: "required";
|
|
1694
|
+
}>>;
|
|
1653
1695
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
1654
1696
|
fingerprint: z.ZodString;
|
|
1655
1697
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -1710,6 +1752,10 @@ export declare const ObservationResponseSchema: z.ZodObject<{
|
|
|
1710
1752
|
implicit: "implicit";
|
|
1711
1753
|
explicit: "explicit";
|
|
1712
1754
|
}>>;
|
|
1755
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1756
|
+
advisory: "advisory";
|
|
1757
|
+
required: "required";
|
|
1758
|
+
}>>;
|
|
1713
1759
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
1714
1760
|
fingerprint: z.ZodString;
|
|
1715
1761
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -1731,6 +1777,7 @@ export declare const ObservationResponseSchema: z.ZodObject<{
|
|
|
1731
1777
|
observation: "observation";
|
|
1732
1778
|
paired_turn: "paired_turn";
|
|
1733
1779
|
context_delivery: "context_delivery";
|
|
1780
|
+
guard_check: "guard_check";
|
|
1734
1781
|
}>;
|
|
1735
1782
|
agent: z.ZodString;
|
|
1736
1783
|
sessionId: z.ZodString;
|
|
@@ -1756,6 +1803,7 @@ export declare const PairedTurnResponseSchema: z.ZodObject<{
|
|
|
1756
1803
|
observation: "observation";
|
|
1757
1804
|
paired_turn: "paired_turn";
|
|
1758
1805
|
context_delivery: "context_delivery";
|
|
1806
|
+
guard_check: "guard_check";
|
|
1759
1807
|
}>;
|
|
1760
1808
|
agent: z.ZodString;
|
|
1761
1809
|
sessionId: z.ZodString;
|
|
@@ -1814,6 +1862,10 @@ export declare const PairedTurnResponseSchema: z.ZodObject<{
|
|
|
1814
1862
|
implicit: "implicit";
|
|
1815
1863
|
explicit: "explicit";
|
|
1816
1864
|
}>>;
|
|
1865
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1866
|
+
advisory: "advisory";
|
|
1867
|
+
required: "required";
|
|
1868
|
+
}>>;
|
|
1817
1869
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
1818
1870
|
fingerprint: z.ZodString;
|
|
1819
1871
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -1873,6 +1925,10 @@ export declare const PairedTurnResponseSchema: z.ZodObject<{
|
|
|
1873
1925
|
implicit: "implicit";
|
|
1874
1926
|
explicit: "explicit";
|
|
1875
1927
|
}>>;
|
|
1928
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1929
|
+
advisory: "advisory";
|
|
1930
|
+
required: "required";
|
|
1931
|
+
}>>;
|
|
1876
1932
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
1877
1933
|
fingerprint: z.ZodString;
|
|
1878
1934
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|
|
@@ -1927,6 +1983,10 @@ export declare const PairedTurnResponseSchema: z.ZodObject<{
|
|
|
1927
1983
|
implicit: "implicit";
|
|
1928
1984
|
explicit: "explicit";
|
|
1929
1985
|
}>>;
|
|
1986
|
+
enforcement: z.ZodOptional<z.ZodEnum<{
|
|
1987
|
+
advisory: "advisory";
|
|
1988
|
+
required: "required";
|
|
1989
|
+
}>>;
|
|
1930
1990
|
reconciliationKey: z.ZodOptional<z.ZodString>;
|
|
1931
1991
|
fingerprint: z.ZodString;
|
|
1932
1992
|
supersedesMemoryId: z.ZodNullable<z.ZodUUID>;
|