@lore-co/core 0.2.7 → 0.2.8

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.
@@ -123,8 +123,8 @@ export declare const GuardItemSchema: z.ZodObject<{
123
123
  component: z.ZodOptional<z.ZodString>;
124
124
  }, z.core.$strict>;
125
125
  enforcement: z.ZodEnum<{
126
- advisory: "advisory";
127
126
  required: "required";
127
+ advisory: "advisory";
128
128
  }>;
129
129
  source: z.ZodObject<{
130
130
  agent: z.ZodString;
@@ -146,17 +146,17 @@ export declare const GuardItemSchema: z.ZodObject<{
146
146
  }>>;
147
147
  matchedTerms: z.ZodArray<z.ZodString>;
148
148
  provenance: z.ZodObject<{
149
- eventId: z.ZodOptional<z.ZodUUID>;
150
149
  sessionId: z.ZodOptional<z.ZodString>;
151
150
  workspaceId: z.ZodOptional<z.ZodUUID>;
152
151
  agent: z.ZodString;
152
+ eventId: z.ZodOptional<z.ZodUUID>;
153
153
  messageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
154
154
  userId: z.ZodOptional<z.ZodUUID>;
155
155
  redacted: z.ZodOptional<z.ZodBoolean>;
156
156
  }, z.core.$strict>;
157
157
  status: z.ZodEnum<{
158
- active: "active";
159
158
  proposed: "proposed";
159
+ active: "active";
160
160
  suppressed: "suppressed";
161
161
  superseded: "superseded";
162
162
  deleted: "deleted";
@@ -220,8 +220,8 @@ export declare const GuardCheckResponseSchema: z.ZodObject<{
220
220
  component: z.ZodOptional<z.ZodString>;
221
221
  }, z.core.$strict>;
222
222
  enforcement: z.ZodEnum<{
223
- advisory: "advisory";
224
223
  required: "required";
224
+ advisory: "advisory";
225
225
  }>;
226
226
  source: z.ZodObject<{
227
227
  agent: z.ZodString;
@@ -243,17 +243,17 @@ export declare const GuardCheckResponseSchema: z.ZodObject<{
243
243
  }>>;
244
244
  matchedTerms: z.ZodArray<z.ZodString>;
245
245
  provenance: z.ZodObject<{
246
- eventId: z.ZodOptional<z.ZodUUID>;
247
246
  sessionId: z.ZodOptional<z.ZodString>;
248
247
  workspaceId: z.ZodOptional<z.ZodUUID>;
249
248
  agent: z.ZodString;
249
+ eventId: z.ZodOptional<z.ZodUUID>;
250
250
  messageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
251
251
  userId: z.ZodOptional<z.ZodUUID>;
252
252
  redacted: z.ZodOptional<z.ZodBoolean>;
253
253
  }, z.core.$strict>;
254
254
  status: z.ZodEnum<{
255
- active: "active";
256
255
  proposed: "proposed";
256
+ active: "active";
257
257
  suppressed: "suppressed";
258
258
  superseded: "superseded";
259
259
  deleted: "deleted";
package/dist/index.d.ts CHANGED
@@ -29,4 +29,6 @@ export * from "./recovery-packet-schemas.js";
29
29
  export * from "./product-usage.js";
30
30
  export * from "./repository-policy.js";
31
31
  export * from "./prepared-context.js";
32
+ export * from "./learning-drafts.js";
33
+ export * from "./approaches.js";
32
34
  //# sourceMappingURL=index.d.ts.map
@@ -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,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,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,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,C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AAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AAErC,cAAc,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -29,4 +29,6 @@ export * from "./recovery-packet-schemas.js";
29
29
  export * from "./product-usage.js";
30
30
  export * from "./repository-policy.js";
31
31
  export * from "./prepared-context.js";
32
+ export * from "./learning-drafts.js";
33
+ export * from "./approaches.js";
32
34
  //# sourceMappingURL=index.js.map
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,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,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,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAE7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,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,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,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,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAE7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AAErC,cAAc,iBAAiB,CAAC"}
@@ -28,9 +28,9 @@ export declare const ReliabilityIntegrationManifestSchema: z.ZodObject<{
28
28
  pre_action: "pre_action";
29
29
  }>;
30
30
  captureDurability: z.ZodEnum<{
31
+ none: "none";
31
32
  memory: "memory";
32
33
  server: "server";
33
- none: "none";
34
34
  local_disk: "local_disk";
35
35
  }>;
36
36
  guardBoundaryCoverage: z.ZodEnum<{
@@ -48,15 +48,15 @@ export declare const ReliabilityIntegrationManifestSchema: z.ZodObject<{
48
48
  plan: "plan";
49
49
  }>>;
50
50
  enforcement: z.ZodEnum<{
51
- confirm: "confirm";
52
51
  none: "none";
52
+ confirm: "confirm";
53
53
  context_only: "context_only";
54
54
  deny: "deny";
55
55
  }>;
56
56
  stateDurability: z.ZodEnum<{
57
+ none: "none";
57
58
  memory: "memory";
58
59
  server: "server";
59
- none: "none";
60
60
  local_disk: "local_disk";
61
61
  }>;
62
62
  runtimeCoverage: z.ZodArray<z.ZodEnum<{
@@ -247,11 +247,11 @@ export declare const CLAUDE_RELIABILITY_INTEGRATION: {
247
247
  readonly contractVersion: "reliability-v1";
248
248
  readonly agent: string;
249
249
  readonly contextDelivery: "none" | "prompt" | "pre_action";
250
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
250
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
251
251
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
252
252
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
253
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
254
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
253
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
254
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
255
255
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
256
256
  };
257
257
  readonly operations: {
@@ -275,11 +275,11 @@ export declare const CODEX_RELIABILITY_INTEGRATION: {
275
275
  readonly contractVersion: "reliability-v1";
276
276
  readonly agent: string;
277
277
  readonly contextDelivery: "none" | "prompt" | "pre_action";
278
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
278
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
279
279
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
280
280
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
281
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
282
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
281
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
282
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
283
283
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
284
284
  };
285
285
  readonly operations: {
@@ -303,11 +303,11 @@ export declare const CURSOR_RELIABILITY_INTEGRATION: {
303
303
  readonly contractVersion: "reliability-v1";
304
304
  readonly agent: string;
305
305
  readonly contextDelivery: "none" | "prompt" | "pre_action";
306
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
306
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
307
307
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
308
308
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
309
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
310
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
309
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
310
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
311
311
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
312
312
  };
313
313
  readonly operations: {
@@ -331,11 +331,11 @@ export declare const COPILOT_CLI_RELIABILITY_INTEGRATION: {
331
331
  readonly contractVersion: "reliability-v1";
332
332
  readonly agent: string;
333
333
  readonly contextDelivery: "none" | "prompt" | "pre_action";
334
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
334
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
335
335
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
336
336
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
337
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
338
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
337
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
338
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
339
339
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
340
340
  };
341
341
  readonly operations: {
@@ -359,11 +359,11 @@ export declare const COPILOT_VSCODE_PREVIEW_RELIABILITY_INTEGRATION: {
359
359
  readonly contractVersion: "reliability-v1";
360
360
  readonly agent: string;
361
361
  readonly contextDelivery: "none" | "prompt" | "pre_action";
362
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
362
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
363
363
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
364
364
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
365
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
366
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
365
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
366
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
367
367
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
368
368
  };
369
369
  readonly operations: {
@@ -387,11 +387,11 @@ export declare const COPILOT_CLOUD_MCP_RELIABILITY_INTEGRATION: {
387
387
  readonly contractVersion: "reliability-v1";
388
388
  readonly agent: string;
389
389
  readonly contextDelivery: "none" | "prompt" | "pre_action";
390
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
390
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
391
391
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
392
392
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
393
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
394
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
393
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
394
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
395
395
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
396
396
  };
397
397
  readonly operations: {
@@ -415,11 +415,11 @@ export declare const POLYTOKEN_RELIABILITY_INTEGRATION: {
415
415
  readonly contractVersion: "reliability-v1";
416
416
  readonly agent: string;
417
417
  readonly contextDelivery: "none" | "prompt" | "pre_action";
418
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
418
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
419
419
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
420
420
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
421
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
422
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
421
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
422
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
423
423
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
424
424
  };
425
425
  readonly operations: {
@@ -443,11 +443,11 @@ export declare const OPENCODE_RELIABILITY_INTEGRATION: {
443
443
  readonly contractVersion: "reliability-v1";
444
444
  readonly agent: string;
445
445
  readonly contextDelivery: "none" | "prompt" | "pre_action";
446
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
446
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
447
447
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
448
448
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
449
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
450
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
449
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
450
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
451
451
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
452
452
  };
453
453
  readonly operations: {
@@ -471,11 +471,11 @@ export declare const DEVIN_RELIABILITY_INTEGRATION: {
471
471
  readonly contractVersion: "reliability-v1";
472
472
  readonly agent: string;
473
473
  readonly contextDelivery: "none" | "prompt" | "pre_action";
474
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
474
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
475
475
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
476
476
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
477
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
478
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
477
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
478
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
479
479
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
480
480
  };
481
481
  readonly operations: {
@@ -499,11 +499,11 @@ export declare const GENERIC_ADAPTER_RELIABILITY_INTEGRATION: {
499
499
  readonly contractVersion: "reliability-v1";
500
500
  readonly agent: string;
501
501
  readonly contextDelivery: "none" | "prompt" | "pre_action";
502
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
502
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
503
503
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
504
504
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
505
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
506
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
505
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
506
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
507
507
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
508
508
  };
509
509
  readonly operations: {
@@ -527,11 +527,11 @@ export declare const BEDROCK_RELIABILITY_INTEGRATION: {
527
527
  readonly contractVersion: "reliability-v1";
528
528
  readonly agent: string;
529
529
  readonly contextDelivery: "none" | "prompt" | "pre_action";
530
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
530
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
531
531
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
532
532
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
533
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
534
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
533
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
534
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
535
535
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
536
536
  };
537
537
  readonly operations: {
@@ -555,11 +555,11 @@ export declare const MCP_RELIABILITY_INTEGRATION: {
555
555
  readonly contractVersion: "reliability-v1";
556
556
  readonly agent: string;
557
557
  readonly contextDelivery: "none" | "prompt" | "pre_action";
558
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
558
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
559
559
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
560
560
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
561
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
562
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
561
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
562
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
563
563
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
564
564
  };
565
565
  readonly operations: {
@@ -583,11 +583,11 @@ export declare const CLAUDE_COWORK_MCP_RELIABILITY_INTEGRATION: {
583
583
  readonly contractVersion: "reliability-v1";
584
584
  readonly agent: string;
585
585
  readonly contextDelivery: "none" | "prompt" | "pre_action";
586
- readonly captureDurability: "memory" | "server" | "none" | "local_disk";
586
+ readonly captureDurability: "none" | "memory" | "server" | "local_disk";
587
587
  readonly guardBoundaryCoverage: "none" | "partial" | "full";
588
588
  readonly guardedActions: readonly ("other" | "edit" | "command" | "mcp" | "commit" | "deploy" | "plan")[];
589
- readonly enforcement: "confirm" | "none" | "context_only" | "deny";
590
- readonly stateDurability: "memory" | "server" | "none" | "local_disk";
589
+ readonly enforcement: "none" | "confirm" | "context_only" | "deny";
590
+ readonly stateDurability: "none" | "memory" | "server" | "local_disk";
591
591
  readonly runtimeCoverage: readonly ("local" | "cloud")[];
592
592
  };
593
593
  readonly operations: {
@@ -15,6 +15,8 @@ export declare function isTemporaryTeaching(text: string): boolean;
15
15
  export declare function contradictoryObligations(left: string, right: string): boolean;
16
16
  /** Rank lexical candidates before applying the storage query's limit. */
17
17
  export declare function candidateKeywordScore(content: string, keywords: readonly string[]): number;
18
+ /** Host-generated suggestion jobs describe a task, not the team's decisions. */
19
+ export declare function isSuggestionJobText(value: string): boolean;
18
20
  /** Questions, task requests and output instructions are not lasting engineering facts. */
19
21
  export declare function isTaskOnlyText(value: string): boolean;
20
22
  //# sourceMappingURL=knowledge-quality.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"knowledge-quality.d.ts","sourceRoot":"","sources":["../src/knowledge-quality.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,eAAO,MAAM,4BAA4B,QAAwB,CAAC;AAElE,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,OAAa,GAAG,OAAO,CAE1G;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKzD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAc7E;AAED,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAG1F;AACD,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAerD"}
1
+ {"version":3,"file":"knowledge-quality.d.ts","sourceRoot":"","sources":["../src/knowledge-quality.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,eAAO,MAAM,4BAA4B,QAAwB,CAAC;AAElE,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,OAAa,GAAG,OAAO,CAE1G;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKzD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAc7E;AAED,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAG1F;AACD,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAI1D;AAED,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CA0BrD"}
@@ -38,21 +38,39 @@ export function candidateKeywordScore(content, keywords) {
38
38
  const normalized = content.toLocaleLowerCase();
39
39
  return keywords.reduce((score, keyword) => score + Number(normalized.includes(keyword.toLocaleLowerCase())), 0);
40
40
  }
41
+ /** Host-generated suggestion jobs describe a task, not the team's decisions. */
42
+ export function isSuggestionJobText(value) {
43
+ const text = userMessageText(value).trim();
44
+ const instruction = text.replace(/^(?:#{1,6}[^\n]*\n\s*)+/u, "").replace(/^# Overview\s+/u, "");
45
+ return /^(?:please\s+)?(?:generate|suggest|recommend)\b[^\n.!?]{0,180}\b(?:suggestions|tasks|ideas|next steps)\b/iu.test(instruction);
46
+ }
41
47
  /** Questions, task requests and output instructions are not lasting engineering facts. */
42
48
  export function isTaskOnlyText(value) {
43
- const text = userMessageText(value).trim();
44
- if (!text)
49
+ // Examples and quoted material are not the user's own confirmation. Ignore
50
+ // them when deciding whether the surrounding prose teaches anything.
51
+ const text = userMessageText(value)
52
+ .replace(/^[ \t]*(`{3,}|~{3,})[^\n]*\n[\s\S]*?(?:^[ \t]*\1[ \t]*$|(?![\s\S]))/gmu, "")
53
+ .replace(/^[ \t]*>.*$/gmu, "")
54
+ .replace(/^[ \t]*(?:"[^"\n]+"|“[^”\n]+”)[ \t]*$/gmu, "")
55
+ .replace(/(`+)[^\n]*?\1/gu, "")
56
+ .trim();
57
+ if (!text || isSuggestionJobText(text))
45
58
  return true;
46
- // Host-generated suggestion jobs contain imperative rules, but those rules
47
- // describe the current job rather than the team's engineering knowledge.
48
- const instruction = text.replace(/^(?:#{1,6}[^\n]*\n\s*)+/u, "").replace(/^# Overview\s+/u, "");
49
- if (/^(?:please\s+)?(?:generate|suggest|recommend)\b[^\n.!?]{0,180}\b(?:suggestions|tasks|ideas|next steps)\b/iu.test(instruction))
59
+ if (/(?:^|\n)[ \t]*Remember(?:\s+this)?(?:\s+(?:project|repository|repo|team|organization))?(?:\s+rule)?[ \t]*:/iu.test(text))
60
+ return false;
61
+ if (/^[^.!?\n]*\?/u.test(text))
50
62
  return true;
51
- if (/(?:^|\n)[ \t]*Remember(?:\s+this)?(?:\s+(?:project|repository|repo|team|organization))?(?:\s+rule)?[ \t]*:/iu.test(text) || /^(?:Never|Always)\b/iu.test(text))
63
+ if (/^(?:Never|Always)\b/iu.test(text))
52
64
  return false;
53
65
  // Keep behavior statements such as "Return 404 when an account is missing"
54
66
  // and "Return values are nullable". A verb alone is not task evidence.
55
67
  return /\?\s*(?:tell me[.!]?)?$/iu.test(text)
68
+ // A question stays a question when followed by a note or command. A word
69
+ // such as "mean" inside it must not turn the whole message into a fact.
70
+ || /(?:^|[.!?]\s+|\n\s*)(?:what|why|how|when|where|who|can|could|would|do|does|did|is|are|should)\b[^?\n]*\?/iu.test(text)
71
+ || /^[^.!?\n]+:\s*$/u.test(text)
72
+ || /^(?:maybe|perhaps|what if)\b/iu.test(text)
73
+ || /^(?:you\s+(?:said|wrote|suggested)|the\s+(?:assistant|agent|tool)\s+(?:said|says|wrote|suggested|claims?)|this\s+was\s+proposed)\s*:/iu.test(text)
56
74
  || /^(?:okay[,!]?\s+|ok[,!]?\s+)?let['’]s\s+(?:remove|list|run|check|fix|review|implement|create|show)\b/iu.test(text)
57
75
  || /^(?:please\s+)?(?:review|inspect|check|explain|show|tell|summari[sz]e|implement|fix|run|execute)\b/iu.test(text)
58
76
  || /^(?:please\s+)?(?:return|respond(?:\s+with)?|output)\s+(?:(?:only|valid|strict)\s+)*(?:json\b[^.!?]*\b(?:matching|schema|format)|(?:your|the)\s+(?:answer|response|review)\b)/iu.test(text)
@@ -1 +1 @@
1
- {"version":3,"file":"knowledge-quality.js","sourceRoot":"","sources":["../src/knowledge-quality.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;AAElE,sEAAsE;AACtE,MAAM,UAAU,iBAAiB,CAAC,MAA6C,EAAE,GAAG,GAAG,IAAI,IAAI,EAAE;IAC/F,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,4BAA4B,CAAC;AACpH,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,yEAAyE;IACzE,0EAA0E;IAC1E,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,iFAAiF,EAAE,IAAI,CAAC,CAAC;IACzH,OAAO,sSAAsS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACjU,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAY,EAAE,KAAa;IAClE,SAAS,UAAU,CAAC,IAAY;QAC9B,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,iBAAiB,EAAE;aAC1D,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAA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AC,IAAI,CAAC;WACvH,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;WAC7B,gCAAgC,CAAC,IAAI,CAAC,IAAI,CAAC;WAC3C,wIAAwI,CAAC,IAAI,CAAC,IAAI,CAAC;WACnJ,wGAAwG,CAAC,IAAI,CAAC,IAAI,CAAC;WACnH,sGAAsG,CAAC,IAAI,CAAC,IAAI,CAAC;WACjH,iLAAiL,CAAC,IAAI,CAAC,IAAI,CAAC;WAC5L,yFAAyF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5G,CAAC"}
@@ -0,0 +1,75 @@
1
+ import { z } from "zod";
2
+ import { type WorkSession } from "./session-schemas.js";
3
+ /** Internal captured records, before display snippets are shortened. */
4
+ export interface LearningReviewSource {
5
+ session: WorkSession;
6
+ events: Array<{
7
+ id: string;
8
+ type: string;
9
+ occurredAt: string;
10
+ payload: Record<string, unknown>;
11
+ }>;
12
+ limited: boolean;
13
+ }
14
+ export declare const SessionLearningSourceSchema: z.ZodObject<{
15
+ id: z.ZodString;
16
+ role: z.ZodEnum<{
17
+ user: "user";
18
+ assistant: "assistant";
19
+ }>;
20
+ content: z.ZodString;
21
+ source: z.ZodObject<{
22
+ agent: z.ZodString;
23
+ sessionId: z.ZodOptional<z.ZodString>;
24
+ messageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ rawText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ workspaceId: z.ZodOptional<z.ZodUUID>;
27
+ eventId: z.ZodOptional<z.ZodUUID>;
28
+ userId: z.ZodOptional<z.ZodUUID>;
29
+ redacted: z.ZodOptional<z.ZodBoolean>;
30
+ }, z.core.$strict>;
31
+ capturedAt: z.ZodISODateTime;
32
+ }, z.core.$strict>;
33
+ export type SessionLearningSource = z.infer<typeof SessionLearningSourceSchema>;
34
+ export declare const SessionLearningSourcesSchema: z.ZodObject<{
35
+ session: z.ZodObject<{
36
+ id: z.ZodUUID;
37
+ workspaceId: z.ZodUUID;
38
+ connector: z.ZodString;
39
+ externalSessionId: z.ZodString;
40
+ agent: z.ZodString;
41
+ project: z.ZodNullable<z.ZodString>;
42
+ repo: z.ZodNullable<z.ZodString>;
43
+ title: z.ZodNullable<z.ZodString>;
44
+ parentSessionId: z.ZodNullable<z.ZodUUID>;
45
+ rootSessionId: z.ZodNullable<z.ZodUUID>;
46
+ machineId: z.ZodNullable<z.ZodUUID>;
47
+ startedAt: z.ZodISODateTime;
48
+ lastActivityAt: z.ZodISODateTime;
49
+ endedAt: z.ZodNullable<z.ZodISODateTime>;
50
+ eventCount: z.ZodNumber;
51
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
52
+ }, z.core.$strict>;
53
+ items: z.ZodArray<z.ZodObject<{
54
+ id: z.ZodString;
55
+ role: z.ZodEnum<{
56
+ user: "user";
57
+ assistant: "assistant";
58
+ }>;
59
+ content: z.ZodString;
60
+ source: z.ZodObject<{
61
+ agent: z.ZodString;
62
+ sessionId: z.ZodOptional<z.ZodString>;
63
+ messageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
+ rawText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
+ workspaceId: z.ZodOptional<z.ZodUUID>;
66
+ eventId: z.ZodOptional<z.ZodUUID>;
67
+ userId: z.ZodOptional<z.ZodUUID>;
68
+ redacted: z.ZodOptional<z.ZodBoolean>;
69
+ }, z.core.$strict>;
70
+ capturedAt: z.ZodISODateTime;
71
+ }, z.core.$strict>>;
72
+ limited: z.ZodBoolean;
73
+ }, z.core.$strict>;
74
+ export type SessionLearningSources = z.infer<typeof SessionLearningSourcesSchema>;
75
+ //# sourceMappingURL=learning-drafts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-drafts.d.ts","sourceRoot":"","sources":["../src/learning-drafts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE3E,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAClG,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;kBAM7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAI9B,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ import { MemorySourceSchema } from "./schemas.js";
3
+ import { WorkSessionSchema } from "./session-schemas.js";
4
+ export const SessionLearningSourceSchema = z.object({
5
+ id: z.string().min(1),
6
+ role: z.enum(["user", "assistant"]),
7
+ content: z.string().min(1).max(120_000),
8
+ source: MemorySourceSchema,
9
+ capturedAt: z.iso.datetime({ offset: true }),
10
+ }).strict();
11
+ export const SessionLearningSourcesSchema = z.object({
12
+ session: WorkSessionSchema,
13
+ items: z.array(SessionLearningSourceSchema).max(1000),
14
+ limited: z.boolean(),
15
+ }).strict();
16
+ //# sourceMappingURL=learning-drafts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"learning-drafts.js","sourceRoot":"","sources":["../src/learning-drafts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAoB,MAAM,sBAAsB,CAAC;AAS3E,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;IACvC,MAAM,EAAE,kBAAkB;IAC1B,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACrD,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC,MAAM,EAAE,CAAC"}