@quantiya/codevibe-codex-plugin 2.0.63 → 2.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/server.js +38 -36
  2. package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +302 -8
  3. package/node_modules/@quantiya/codevibe-core/dist/appsync/index.d.ts +25 -1
  4. package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +10 -0
  5. package/node_modules/@quantiya/codevibe-core/dist/appsync/standalone-companion-status.d.ts +6 -0
  6. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-deferred-inputs.d.ts +104 -0
  7. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-desktop-registration.d.ts +133 -0
  8. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-event-client.d.ts +110 -0
  9. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-inbound-journal.d.ts +142 -0
  10. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-input-delivery.d.ts +13 -0
  11. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-live-connection.d.ts +87 -0
  12. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-mobile-echo.d.ts +289 -0
  13. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-operation-journal.d.ts +236 -0
  14. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-prompt-publication.d.ts +153 -0
  15. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-prompt-resolution.d.ts +38 -0
  16. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-prompt-retention.d.ts +99 -0
  17. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-read-client.d.ts +131 -0
  18. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-resolution-recovery.d.ts +29 -0
  19. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-security-posture.d.ts +32 -0
  20. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-session-retirement.d.ts +30 -0
  21. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-shell-source.d.ts +151 -0
  22. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-source-cursor.d.ts +529 -0
  23. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-source-file.d.ts +33 -0
  24. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-source-pair.d.ts +33 -0
  25. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-state.d.ts +51 -0
  26. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-usage-warning.d.ts +33 -0
  27. package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-workspace-outcome.d.ts +23 -0
  28. package/node_modules/@quantiya/codevibe-core/dist/config/config.d.ts +3 -0
  29. package/node_modules/@quantiya/codevibe-core/dist/credential-broker/oauth-account-lock.d.ts +4 -0
  30. package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +26 -0
  31. package/node_modules/@quantiya/codevibe-core/dist/index.js +584 -537
  32. package/node_modules/@quantiya/codevibe-core/dist/local-executor/local-executor-impl.d.ts +11 -11
  33. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.d.ts +9 -4
  34. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +50680 -44643
  35. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/OrchestrationApp.d.ts +6 -0
  36. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/StatusBar.d.ts +2 -0
  37. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/decision-attempt-recovery.d.ts +2 -0
  38. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/emit-shell-event.d.ts +31 -8
  39. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-prompts.d.ts +4 -0
  40. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +8 -7
  41. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/planner-offer-e1.d.ts +5 -1
  42. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/quorum-loop.d.ts +9 -2
  43. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/shell-sync-recovery.d.ts +23 -0
  44. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/slash-routes/reviewers.d.ts +3 -1
  45. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +8 -8
  46. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/workspace-terminal-coordinator.d.ts +1 -1
  47. package/node_modules/@quantiya/codevibe-core/dist/planner/types.d.ts +2 -2
  48. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/atomic-file.d.ts +13 -3
  49. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/consolidator.d.ts +10 -2
  50. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/index.d.ts +1 -0
  51. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/ledger.d.ts +17 -9
  52. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/outbox.d.ts +20 -2
  53. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/replay-cursor.d.ts +2 -2
  54. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/sync-transport.d.ts +53 -0
  55. package/node_modules/@quantiya/codevibe-core/dist/tool-activity/types.d.ts +28 -24
  56. package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +3 -0
  57. package/node_modules/@quantiya/codevibe-core/dist/types/reviewer.d.ts +14 -4
  58. package/node_modules/@quantiya/codevibe-core/package.json +1 -1
  59. package/package.json +2 -2
@@ -0,0 +1,53 @@
1
+ import { DurableDesktopSyncWriter, type DesktopSyncSessionScope } from '../appsync/sync-operation-journal';
2
+ import type { ToolActivityTransport } from './consolidator';
3
+ import type { ToolActivityOutbox } from './outbox';
4
+ import type { ToolActivityLedger } from './ledger';
5
+ import type { ConfirmDesktopSyncRetirementInput, SyncSessionRetirementReceipt } from '../appsync/sync-session-retirement';
6
+ export interface ToolActivitySyncEncryption extends DesktopSyncSessionScope {
7
+ sessionKey: string;
8
+ sessionKeyGen: string | null;
9
+ }
10
+ export interface ToolActivitySyncTransportOptions {
11
+ sessionScope: DesktopSyncSessionScope;
12
+ /** The account- and session-scoped AppSync journal, never a legacy writer. */
13
+ writer: DurableDesktopSyncWriter;
14
+ /** One coherent live key/generation snapshot, read only for a new operation. */
15
+ getEncryptionContext(): Promise<ToolActivitySyncEncryption>;
16
+ /** Recovery may retry existing records, never prepare a missing operation. */
17
+ recoveryOnly?: boolean;
18
+ }
19
+ /** Terminal source-owner path; never retries an Event or invents an outcome. */
20
+ export declare function retireToolActivityWindows(options: {
21
+ sessionScope: DesktopSyncSessionScope;
22
+ outbox: ToolActivityOutbox;
23
+ writer: DurableDesktopSyncWriter;
24
+ expectedSessionKeyGen: string;
25
+ confirm(input: ConfirmDesktopSyncRetirementInput): Promise<SyncSessionRetirementReceipt>;
26
+ }): Promise<{
27
+ windowsRemoved: number;
28
+ operationsRemoved: number;
29
+ }>;
30
+ /**
31
+ * Shared metered tool transport. An existing ULID window maps deterministically
32
+ * to a namespaced UUIDv8 operation; no rollout rescan or retry remints it.
33
+ * Ciphertext is sealed in the journal before the first network attempt. A
34
+ * restart reads that exact record BEFORE consulting a possibly rotated key.
35
+ * The consolidator calls settled only after its durable native-occurrence
36
+ * ledger records ACCEPTED/OMITTED, then prunes the source window.
37
+ */
38
+ export declare function createToolActivitySyncTransport(options: ToolActivitySyncTransportOptions): ToolActivityTransport;
39
+ /**
40
+ * Drain saved R2 operations before selecting a live generation. Neither an
41
+ * active Session row nor a live encryption key is needed for existing journal
42
+ * outcomes. A source window sealed before journal preparation stays untouched
43
+ * for normal same-generation delivery (or explicit migration); it is not a
44
+ * license to remint into a replacement session. Ambiguity/corruption stops the
45
+ * pass, leaving all unfinished source/journal state intact.
46
+ * The provider holds its normal single-writer ownership throughout this call.
47
+ */
48
+ export declare function recoverToolActivityWindows(options: {
49
+ sessionId: string;
50
+ outbox: ToolActivityOutbox;
51
+ ledger: ToolActivityLedger;
52
+ transportForGeneration(generation: string): ToolActivityTransport;
53
+ }): Promise<void>;
@@ -66,11 +66,11 @@ export declare const ToolActivityGroupSchema: z.ZodObject<{
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
  detail?: {
75
75
  i: number;
76
76
  digest: string;
@@ -78,11 +78,11 @@ export declare const ToolActivityGroupSchema: z.ZodObject<{
78
78
  target?: string | 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
  detail?: {
87
87
  i: number;
88
88
  digest: string;
@@ -130,11 +130,11 @@ export declare const ToolActivityManifestSchema: z.ZodObject<{
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
  detail?: {
139
139
  i: number;
140
140
  digest: string;
@@ -142,11 +142,11 @@ export declare const ToolActivityManifestSchema: z.ZodObject<{
142
142
  target?: string | 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
  detail?: {
151
151
  i: number;
152
152
  digest: string;
@@ -157,40 +157,40 @@ export declare const ToolActivityManifestSchema: z.ZodObject<{
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
  detail?: {
166
166
  i: number;
167
167
  digest: string;
168
168
  }[] | undefined;
169
169
  target?: string | undefined;
170
170
  }[];
171
- trackId?: string | null | undefined;
172
171
  windowStart?: string | undefined;
173
172
  windowEnd?: string | undefined;
174
173
  totalInvocations?: number | undefined;
174
+ trackId?: string | null | undefined;
175
175
  continues?: boolean | undefined;
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
  detail?: {
185
185
  i: number;
186
186
  digest: string;
187
187
  }[] | undefined;
188
188
  target?: string | undefined;
189
189
  }[];
190
- trackId?: string | null | undefined;
191
190
  windowStart?: string | undefined;
192
191
  windowEnd?: string | undefined;
193
192
  totalInvocations?: number | undefined;
193
+ trackId?: string | null | undefined;
194
194
  continues?: boolean | undefined;
195
195
  }>;
196
196
  export type ToolActivityManifest = z.infer<typeof ToolActivityManifestSchema>;
@@ -212,6 +212,8 @@ export declare const ToolActivityOutboxEnvelopeSchema: z.ZodObject<{
212
212
  clientEventId: z.ZodString;
213
213
  /** The plugin's backend session id this window belongs to (routing, X2a). */
214
214
  backendSessionId: z.ZodString;
215
+ /** Present only for R2-sealed windows. Never silently convert legacy or another generation on recovery. */
216
+ syncSessionGenerationId: z.ZodOptional<z.ZodString>;
215
217
  /** ISO-8601 ms — the event row sort key `(sessionId, windowStart)` (§4.9). */
216
218
  windowStart: z.ZodString;
217
219
  /** The plaintext manifest (encrypted only at send). */
@@ -247,11 +249,11 @@ export declare const ToolActivityOutboxEnvelopeSchema: z.ZodObject<{
247
249
  }>, "many">>;
248
250
  }, "strip", z.ZodTypeAny, {
249
251
  count: number;
252
+ tool: string;
250
253
  occurrences: {
251
254
  id: string;
252
255
  ts: string;
253
256
  }[];
254
- tool: string;
255
257
  detail?: {
256
258
  i: number;
257
259
  digest: string;
@@ -259,11 +261,11 @@ export declare const ToolActivityOutboxEnvelopeSchema: z.ZodObject<{
259
261
  target?: string | undefined;
260
262
  }, {
261
263
  count: number;
264
+ tool: string;
262
265
  occurrences: {
263
266
  id: string;
264
267
  ts: string;
265
268
  }[];
266
- tool: string;
267
269
  detail?: {
268
270
  i: number;
269
271
  digest: string;
@@ -274,95 +276,97 @@ export declare const ToolActivityOutboxEnvelopeSchema: z.ZodObject<{
274
276
  }, "strip", z.ZodTypeAny, {
275
277
  groups: {
276
278
  count: number;
279
+ tool: string;
277
280
  occurrences: {
278
281
  id: string;
279
282
  ts: string;
280
283
  }[];
281
- tool: string;
282
284
  detail?: {
283
285
  i: number;
284
286
  digest: string;
285
287
  }[] | undefined;
286
288
  target?: string | undefined;
287
289
  }[];
288
- trackId?: string | null | undefined;
289
290
  windowStart?: string | undefined;
290
291
  windowEnd?: string | undefined;
291
292
  totalInvocations?: number | undefined;
293
+ trackId?: string | null | undefined;
292
294
  continues?: boolean | undefined;
293
295
  }, {
294
296
  groups: {
295
297
  count: number;
298
+ tool: string;
296
299
  occurrences: {
297
300
  id: string;
298
301
  ts: string;
299
302
  }[];
300
- tool: string;
301
303
  detail?: {
302
304
  i: number;
303
305
  digest: string;
304
306
  }[] | undefined;
305
307
  target?: string | undefined;
306
308
  }[];
307
- trackId?: string | null | undefined;
308
309
  windowStart?: string | undefined;
309
310
  windowEnd?: string | undefined;
310
311
  totalInvocations?: number | undefined;
312
+ trackId?: string | null | undefined;
311
313
  continues?: boolean | undefined;
312
314
  }>;
313
315
  /** Native invocation ids in this window (ledger reconciliation + render dedup). */
314
316
  invocationIds: z.ZodArray<z.ZodString, "many">;
315
317
  }, "strip", z.ZodTypeAny, {
316
318
  isEncrypted: false;
319
+ windowStart: string;
320
+ clientEventId: string;
321
+ backendSessionId: string;
317
322
  manifest: {
318
323
  groups: {
319
324
  count: number;
325
+ tool: string;
320
326
  occurrences: {
321
327
  id: string;
322
328
  ts: string;
323
329
  }[];
324
- tool: string;
325
330
  detail?: {
326
331
  i: number;
327
332
  digest: string;
328
333
  }[] | undefined;
329
334
  target?: string | undefined;
330
335
  }[];
331
- trackId?: string | null | undefined;
332
336
  windowStart?: string | undefined;
333
337
  windowEnd?: string | undefined;
334
338
  totalInvocations?: number | undefined;
339
+ trackId?: string | null | undefined;
335
340
  continues?: boolean | undefined;
336
341
  };
337
- windowStart: string;
338
- clientEventId: string;
339
- backendSessionId: string;
340
342
  invocationIds: string[];
343
+ syncSessionGenerationId?: string | undefined;
341
344
  }, {
342
345
  isEncrypted: false;
346
+ windowStart: string;
347
+ clientEventId: string;
348
+ backendSessionId: string;
343
349
  manifest: {
344
350
  groups: {
345
351
  count: number;
352
+ tool: string;
346
353
  occurrences: {
347
354
  id: string;
348
355
  ts: string;
349
356
  }[];
350
- tool: string;
351
357
  detail?: {
352
358
  i: number;
353
359
  digest: string;
354
360
  }[] | undefined;
355
361
  target?: string | undefined;
356
362
  }[];
357
- trackId?: string | null | undefined;
358
363
  windowStart?: string | undefined;
359
364
  windowEnd?: string | undefined;
360
365
  totalInvocations?: number | undefined;
366
+ trackId?: string | null | undefined;
361
367
  continues?: boolean | undefined;
362
368
  };
363
- windowStart: string;
364
- clientEventId: string;
365
- backendSessionId: string;
366
369
  invocationIds: string[];
370
+ syncSessionGenerationId?: string | undefined;
367
371
  }>;
368
372
  export type ToolActivityOutboxEnvelope = z.infer<typeof ToolActivityOutboxEnvelopeSchema>;
@@ -61,6 +61,9 @@ export interface Attachment {
61
61
  export interface Event {
62
62
  eventId: string;
63
63
  sessionId: string;
64
+ sessionGenerationId?: string | null;
65
+ /** Server-authored R2 lifecycle marker, preserved by the authenticated sync reader. */
66
+ syncLifecycleVersion?: number;
64
67
  type: EventType;
65
68
  source: EventSource;
66
69
  content: string;
@@ -24,7 +24,8 @@ export declare enum ReviewerRole {
24
24
  }
25
25
  /**
26
26
  * One seat in a user's reviewer panel. `seat_id` is the panel position
27
- * (0-indexed: Pro has seats 0–1, Max has 0–2). `role` is the review lens
27
+ * (0-indexed: Pro permits seat 0, Max permits seats 0–1 and may use only one).
28
+ * `role` is the review lens
28
29
  * — unique within a policy. `agent` (CLAUDE | GEMINI | CODEX | ANTIGRAVITY —
29
30
  * AGY-2.0 Phase A reviewer-type contract, task #51) may repeat across seats
30
31
  * — single-vendor users get multiple same-kind seats with distinct roles.
@@ -42,15 +43,23 @@ export interface ReviewerAgentSpecInput {
42
43
  modelHint?: string | null;
43
44
  }
44
45
  /**
45
- * Input for updateReviewerPolicy. Fields are independent:
46
- * - orchestrationEnabledDefault: set to true/false to persist the user's
47
- * opt-in preference for new sessions. Null = leave unchanged.
46
+ * Input for updateReviewerPolicy:
47
+ * - orchestrationEnabledDefault is a legacy type-only field; not sent by 2.0.
48
48
  * - reviewerSeats: non-empty array sets a custom panel. Empty array
49
49
  * resets to tier defaults. Null = leave unchanged.
50
+ * - reviewerQuorum is a complete configuration paired with reviewerSeats;
51
+ * a panel-only update selects default quorum rules/revision depth.
50
52
  */
53
+ export interface ReviewerQuorumSettings {
54
+ autoRevisionRounds: number;
55
+ passRule: 'UNANIMOUS' | 'AT_LEAST_N';
56
+ requiredApprovals?: number | null;
57
+ }
51
58
  export interface UpdateReviewerPolicyInput {
52
59
  orchestrationEnabledDefault?: boolean | null;
53
60
  reviewerSeats?: ReviewerAgentSpecInput[] | null;
61
+ /** Complete settings, saved atomically with reviewerSeats. Panel-only resets defaults. */
62
+ reviewerQuorum?: ReviewerQuorumSettings | null;
54
63
  }
55
64
  /**
56
65
  * User record returned by updateAvailableAgents and updateReviewerPolicy.
@@ -63,5 +72,6 @@ export interface UserReviewerPolicySnapshot {
63
72
  availableAgents?: Array<'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY'> | null;
64
73
  orchestrationEnabledDefault?: boolean | null;
65
74
  reviewerSeats?: ReviewerAgentSpec[] | null;
75
+ reviewerQuorum?: ReviewerQuorumSettings | null;
66
76
  updatedAt: string;
67
77
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantiya/codevibe-core",
3
- "version": "2.0.56",
3
+ "version": "2.0.57",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantiya/codevibe-codex-plugin",
3
- "version": "2.0.63",
3
+ "version": "2.0.65",
4
4
  "description": "Control OpenAI Codex CLI from your iPhone and Android — real-time sync, approve file edits, send prompts by voice. Part of CodeVibe.",
5
5
  "main": "dist/server.js",
6
6
  "codevibe": {
@@ -47,7 +47,7 @@
47
47
  "node": ">=22.0.0"
48
48
  },
49
49
  "dependencies": {
50
- "@quantiya/codevibe-core": "^2.0.56",
50
+ "@quantiya/codevibe-core": "^2.0.57",
51
51
  "@quantiya/quorum-core": "^1.0.1",
52
52
  "chokidar": "^4.0.0",
53
53
  "dotenv": "^16.6.1",