@quantiya/codevibe-core 2.0.20 → 2.0.22

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.
@@ -9,7 +9,7 @@ import type { AuditFlagIndex } from './types';
9
9
  * Shape-only: coordinates + wire kind + the precomputed flaggable bit; the
10
10
  * decrypted payload never leaves the render.
11
11
  */
12
- export declare function buildAuditFlagIndex(taskId: string, model: AuditBrowserModel): AuditFlagIndex;
12
+ export declare function buildAuditFlagIndex(taskId: string, model: AuditBrowserModel, sessionId?: string): AuditFlagIndex;
13
13
  /**
14
14
  * The minimal AppSync surface `/flag` needs — the existing
15
15
  * `recordExecutionEvent` Class-A method (D4: the full plumbing below it
@@ -37,6 +37,9 @@ export interface RunFlagCommandDeps {
37
37
  export type RunFlagCommandResult = {
38
38
  kind: 'no_index';
39
39
  line: string;
40
+ } | {
41
+ kind: 'cross_session_unsupported';
42
+ line: string;
40
43
  } | {
41
44
  kind: 'unknown_entry';
42
45
  line: string;
@@ -234,7 +234,7 @@ export { CONTEXT_SESSION_PSEUDO_TASK_NAMESPACE, deriveSessionPseudoTaskId, audit
234
234
  export { configureContextItemsHostedSync, wakeContextItemsHostedSync, drainContextItemsHostedSync, clearContextItemsHostedSync, contextItemsHostedSyncStatePath, type ContextItemsHostedSyncDeps, } from './context-items-hosted-sync';
235
235
  export { compactSessionContext, maybeFireCompactionSafetyValve, rehydrateSessionContext, renderRehydratedSessionContext, distillItems, projectDistilledForRole, loadCompactionCache, compactionCachePath, onTaskBoundary, gcContextItemLogs, scheduleContextItemsGc, COMPACTION_SAFETY_VALVE_TAIL_BYTES, COMPACTION_KEEP_HOT_RECENT_ITEMS, CONTEXT_ITEMS_RETENTION_MS, SESSION_CONTEXT_SECTION_MAX_CHARS, type DistilledFact, type DistilledTaskSummary, type SessionCompactionCache, type CompactionResult, type RehydratedSessionContext, } from './context-compaction';
236
236
  export { routeSlashCommand, applySlashOutput, type SlashOutput, type ShellAction, } from './slash-router';
237
- export { buildAuditBrowserModel, routeAuditEntry, auditKindLabel, auditKindCopy, renderAuditBrowserText, renderAuditEntryText, ENTRY_DETAILS_UNAVAILABLE, NO_AUDIT_ENTRIES, AUDIT_LOG_TOO_LARGE, AUDIT_LOG_TITLE, AUDIT_BROWSER_MAX_HEADLINE, WIRE_PUBLIC_PLAINTEXT_KINDS, type AuditBrowserModel, type AuditEntryModel, type AuditReviewerVerdictModel, type AuditTaskAuthorizedModel, type DecryptContentFn, } from './audit-browser';
237
+ export { buildAuditBrowserModel, routeAuditEntry, auditKindLabel, auditKindCopy, renderAuditBrowserText, renderAuditEntryText, ENTRY_DETAILS_UNAVAILABLE, NO_AUDIT_ENTRIES, AUDIT_LOG_TOO_LARGE, AUDIT_LOG_TITLE, AUDIT_BROWSER_MAX_HEADLINE, WIRE_PUBLIC_PLAINTEXT_KINDS, formatAuditExport, type AuditDetailRow, type AuditFilterOptions, type AuditExportFormat, type AuditExportPayload, type AuditBrowserModel, type AuditEntryModel, type AuditReviewerVerdictModel, type AuditTaskAuthorizedModel, type DecryptContentFn, } from './audit-browser';
238
238
  export { runAuditBrowser, renderAuditResultText, AUDIT_BROWSER_UPGRADE_HINT, type RunAuditBrowserResult, type RunAuditBrowserDeps, } from './audit-runner';
239
239
  export { buildAuditFlagIndex, runFlagCommand, renderFlagResultText, FLAG_NO_INDEX_LINE, type RunFlagCommandResult, type RunFlagCommandDeps, type FlagAppSyncClient, } from './flag-command';
240
240
  export { AuditLogPanel } from './components/AuditLogPanel';
@@ -807,7 +807,13 @@ export interface HandleShellUserInputDeps extends StructuralSummaryRunDeps {
807
807
  * `args.session.sessionId`. Tests inject a stub to drive the PENDING-marker
808
808
  * rewrite without live fetch / decrypt.
809
809
  */
810
- runAuditBrowserFn?: (taskId: string) => Promise<RunAuditBrowserResult>;
810
+ runAuditBrowserFn?: (taskId: string, options?: {
811
+ kind?: string;
812
+ verdictsOnly?: boolean;
813
+ limit?: number;
814
+ offset?: number;
815
+ sessionId?: string;
816
+ }) => Promise<RunAuditBrowserResult>;
811
817
  /**
812
818
  * O1 C1 (#652) — Test seam for the async `/flag <entry-id>` dispatch.
813
819
  * Defaults to `runFlagCommand` over `args.appsyncClient` + the retained
@@ -933,6 +939,14 @@ export declare function buildContinuationActionDeps(args: RunOrchestrationShellA
933
939
  * The URL regex is copied from `protectUrls` (unexported in local-advisory.ts).
934
940
  */
935
941
  export declare function detectBrowseFastPath(text: string, pending: PendingClarification | null): string[] | null;
942
+ /**
943
+ * Tokenize a command line string respecting single/double quotes and backslash escapes.
944
+ * Returns tokens array or error if unclosed quote / trailing escape.
945
+ */
946
+ export declare function tokenizeCommandLine(input: string): {
947
+ tokens: string[];
948
+ error?: string;
949
+ };
936
950
  export declare function handleShellUserInput(deps: HandleShellUserInputDeps): Promise<void>;
937
951
  /**
938
952
  * [A1g] Stage-2 round-4 (Codex round-3 MEDIUM) — the EXPLICIT per-turn panel-
@@ -775,6 +775,8 @@ export interface AuditFlagEntryRecord {
775
775
  export interface AuditFlagIndex {
776
776
  /** The task whose listing was rendered — becomes `flaggedTaskId`. */
777
777
  taskId: string;
778
+ /** The session under which the audit was browsed (for session key + emit scoping). */
779
+ sessionId?: string;
778
780
  /** `entryId → record` for every entry in the last-rendered listing. */
779
781
  entries: Map<string, AuditFlagEntryRecord>;
780
782
  /** Entry ids flagged this session (dedup no-op render on repeat `/flag`). */
@@ -28,11 +28,11 @@ export declare const ToolActivityDetailSchema: z.ZodObject<{
28
28
  i: z.ZodNumber;
29
29
  digest: z.ZodString;
30
30
  }, "strip", z.ZodTypeAny, {
31
- digest: string;
32
31
  i: number;
33
- }, {
34
32
  digest: string;
33
+ }, {
35
34
  i: number;
35
+ digest: string;
36
36
  }>;
37
37
  export type ToolActivityDetail = z.infer<typeof ToolActivityDetailSchema>;
38
38
  /**
@@ -58,35 +58,35 @@ export declare const ToolActivityGroupSchema: z.ZodObject<{
58
58
  i: z.ZodNumber;
59
59
  digest: z.ZodString;
60
60
  }, "strip", z.ZodTypeAny, {
61
- digest: string;
62
61
  i: number;
63
- }, {
64
62
  digest: string;
63
+ }, {
65
64
  i: number;
65
+ digest: string;
66
66
  }>, "many">>;
67
67
  }, "strip", z.ZodTypeAny, {
68
68
  count: number;
69
+ tool: string;
69
70
  occurrences: {
70
71
  id: string;
71
72
  ts: string;
72
73
  }[];
73
- tool: string;
74
74
  target?: string | undefined;
75
75
  detail?: {
76
- digest: string;
77
76
  i: number;
77
+ digest: string;
78
78
  }[] | undefined;
79
79
  }, {
80
80
  count: number;
81
+ tool: string;
81
82
  occurrences: {
82
83
  id: string;
83
84
  ts: string;
84
85
  }[];
85
- tool: string;
86
86
  target?: string | undefined;
87
87
  detail?: {
88
- digest: string;
89
88
  i: number;
89
+ digest: string;
90
90
  }[] | undefined;
91
91
  }>;
92
92
  export type ToolActivityGroup = z.infer<typeof ToolActivityGroupSchema>;
@@ -122,50 +122,50 @@ export declare const ToolActivityManifestSchema: z.ZodObject<{
122
122
  i: z.ZodNumber;
123
123
  digest: z.ZodString;
124
124
  }, "strip", z.ZodTypeAny, {
125
- digest: string;
126
125
  i: number;
127
- }, {
128
126
  digest: string;
127
+ }, {
129
128
  i: number;
129
+ digest: string;
130
130
  }>, "many">>;
131
131
  }, "strip", z.ZodTypeAny, {
132
132
  count: number;
133
+ tool: string;
133
134
  occurrences: {
134
135
  id: string;
135
136
  ts: string;
136
137
  }[];
137
- tool: string;
138
138
  target?: string | undefined;
139
139
  detail?: {
140
- digest: string;
141
140
  i: number;
141
+ digest: string;
142
142
  }[] | undefined;
143
143
  }, {
144
144
  count: number;
145
+ tool: string;
145
146
  occurrences: {
146
147
  id: string;
147
148
  ts: string;
148
149
  }[];
149
- tool: string;
150
150
  target?: string | undefined;
151
151
  detail?: {
152
- digest: string;
153
152
  i: number;
153
+ digest: string;
154
154
  }[] | undefined;
155
155
  }>, "many">;
156
156
  continues: z.ZodOptional<z.ZodBoolean>;
157
157
  }, "strip", z.ZodTypeAny, {
158
158
  groups: {
159
159
  count: number;
160
+ tool: string;
160
161
  occurrences: {
161
162
  id: string;
162
163
  ts: string;
163
164
  }[];
164
- tool: string;
165
165
  target?: string | undefined;
166
166
  detail?: {
167
- digest: string;
168
167
  i: number;
168
+ digest: string;
169
169
  }[] | undefined;
170
170
  }[];
171
171
  trackId?: string | null | undefined;
@@ -176,15 +176,15 @@ export declare const ToolActivityManifestSchema: z.ZodObject<{
176
176
  }, {
177
177
  groups: {
178
178
  count: number;
179
+ tool: string;
179
180
  occurrences: {
180
181
  id: string;
181
182
  ts: string;
182
183
  }[];
183
- tool: string;
184
184
  target?: string | undefined;
185
185
  detail?: {
186
- digest: string;
187
186
  i: number;
187
+ digest: string;
188
188
  }[] | undefined;
189
189
  }[];
190
190
  trackId?: string | null | undefined;
@@ -239,50 +239,50 @@ export declare const ToolActivityOutboxEnvelopeSchema: z.ZodObject<{
239
239
  i: z.ZodNumber;
240
240
  digest: z.ZodString;
241
241
  }, "strip", z.ZodTypeAny, {
242
- digest: string;
243
242
  i: number;
244
- }, {
245
243
  digest: string;
244
+ }, {
246
245
  i: number;
246
+ digest: string;
247
247
  }>, "many">>;
248
248
  }, "strip", z.ZodTypeAny, {
249
249
  count: number;
250
+ tool: string;
250
251
  occurrences: {
251
252
  id: string;
252
253
  ts: string;
253
254
  }[];
254
- tool: string;
255
255
  target?: string | undefined;
256
256
  detail?: {
257
- digest: string;
258
257
  i: number;
258
+ digest: string;
259
259
  }[] | undefined;
260
260
  }, {
261
261
  count: number;
262
+ tool: string;
262
263
  occurrences: {
263
264
  id: string;
264
265
  ts: string;
265
266
  }[];
266
- tool: string;
267
267
  target?: string | undefined;
268
268
  detail?: {
269
- digest: string;
270
269
  i: number;
270
+ digest: string;
271
271
  }[] | undefined;
272
272
  }>, "many">;
273
273
  continues: z.ZodOptional<z.ZodBoolean>;
274
274
  }, "strip", z.ZodTypeAny, {
275
275
  groups: {
276
276
  count: number;
277
+ tool: string;
277
278
  occurrences: {
278
279
  id: string;
279
280
  ts: string;
280
281
  }[];
281
- tool: string;
282
282
  target?: string | undefined;
283
283
  detail?: {
284
- digest: string;
285
284
  i: number;
285
+ digest: string;
286
286
  }[] | undefined;
287
287
  }[];
288
288
  trackId?: string | null | undefined;
@@ -293,15 +293,15 @@ export declare const ToolActivityOutboxEnvelopeSchema: z.ZodObject<{
293
293
  }, {
294
294
  groups: {
295
295
  count: number;
296
+ tool: string;
296
297
  occurrences: {
297
298
  id: string;
298
299
  ts: string;
299
300
  }[];
300
- tool: string;
301
301
  target?: string | undefined;
302
302
  detail?: {
303
- digest: string;
304
303
  i: number;
304
+ digest: string;
305
305
  }[] | undefined;
306
306
  }[];
307
307
  trackId?: string | null | undefined;
@@ -317,15 +317,15 @@ export declare const ToolActivityOutboxEnvelopeSchema: z.ZodObject<{
317
317
  manifest: {
318
318
  groups: {
319
319
  count: number;
320
+ tool: string;
320
321
  occurrences: {
321
322
  id: string;
322
323
  ts: string;
323
324
  }[];
324
- tool: string;
325
325
  target?: string | undefined;
326
326
  detail?: {
327
- digest: string;
328
327
  i: number;
328
+ digest: string;
329
329
  }[] | undefined;
330
330
  }[];
331
331
  trackId?: string | null | undefined;
@@ -343,15 +343,15 @@ export declare const ToolActivityOutboxEnvelopeSchema: z.ZodObject<{
343
343
  manifest: {
344
344
  groups: {
345
345
  count: number;
346
+ tool: string;
346
347
  occurrences: {
347
348
  id: string;
348
349
  ts: string;
349
350
  }[];
350
- tool: string;
351
351
  target?: string | undefined;
352
352
  detail?: {
353
- digest: string;
354
353
  i: number;
354
+ digest: string;
355
355
  }[] | undefined;
356
356
  }[];
357
357
  trackId?: string | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantiya/codevibe-core",
3
- "version": "2.0.20",
3
+ "version": "2.0.22",
4
4
  "description": "Core library for CodeVibe plugins - shared keychain, crypto, AppSync, and auth functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",