@quantiya/codevibe-codex-plugin 2.0.10 → 2.0.11

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 (48) hide show
  1. package/node_modules/@quantiya/codevibe-core/dist/appsync/__tests__/appsync-client-flag-locator.test.d.ts +1 -0
  2. package/node_modules/@quantiya/codevibe-core/dist/appsync/__tests__/dispose-watcher-socket.test.d.ts +1 -0
  3. package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +62 -0
  4. package/node_modules/@quantiya/codevibe-core/dist/auth/__tests__/keychain-cli-nudge.test.d.ts +1 -0
  5. package/node_modules/@quantiya/codevibe-core/dist/auth/keychain-cli.d.ts +8 -0
  6. package/node_modules/@quantiya/codevibe-core/dist/index.js +523 -351
  7. package/node_modules/@quantiya/codevibe-core/dist/keychain/__tests__/migrate-nudge.test.d.ts +1 -0
  8. package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-migrate.d.ts +17 -0
  9. package/node_modules/@quantiya/codevibe-core/dist/keychain/migrate-nudge.d.ts +38 -0
  10. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/protocol-backlog-wiring.test.d.ts +1 -0
  11. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/protocol-backlog.test.d.ts +1 -0
  12. package/node_modules/@quantiya/codevibe-core/dist/local-executor/__tests__/workspace-cleanup-audit.test.d.ts +1 -0
  13. package/node_modules/@quantiya/codevibe-core/dist/local-executor/anchored-fs.d.ts +7 -0
  14. package/node_modules/@quantiya/codevibe-core/dist/local-executor/bounded-directory.d.ts +14 -0
  15. package/node_modules/@quantiya/codevibe-core/dist/local-executor/process-identity.d.ts +30 -0
  16. package/node_modules/@quantiya/codevibe-core/dist/local-executor/process-tree.d.ts +1 -1
  17. package/node_modules/@quantiya/codevibe-core/dist/local-executor/protocol-backlog.d.ts +62 -0
  18. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-cleanup-audit.d.ts +3 -0
  19. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-materializer.d.ts +23 -2
  20. package/node_modules/@quantiya/codevibe-core/dist/local-executor/workspace-shadow.d.ts +2 -0
  21. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/direct-file-delete.test.d.ts +1 -0
  22. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/flag-command.test.d.ts +1 -0
  23. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/halt-message-wire-content.test.d.ts +1 -0
  24. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/audit-browser.d.ts +54 -1
  25. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.d.ts +10 -0
  26. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +2711 -1474
  27. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/context-items.d.ts +3 -0
  28. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/direct-file-delete.d.ts +22 -0
  29. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/flag-command.d.ts +81 -0
  30. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-prompts.d.ts +41 -0
  31. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +31 -6
  32. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/quorum-loop.d.ts +42 -1
  33. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/task-progress.d.ts +3 -0
  34. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +58 -0
  35. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/workspace-shutdown.d.ts +20 -0
  36. package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/codex.d.ts +5 -3
  37. package/node_modules/@quantiya/codevibe-core/dist/reviewer/token-usage.d.ts +41 -12
  38. package/node_modules/@quantiya/codevibe-core/dist/reviewer/types.d.ts +3 -0
  39. package/node_modules/@quantiya/codevibe-core/dist/substrate/__tests__/command-runner.test.d.ts +1 -0
  40. package/node_modules/@quantiya/codevibe-core/dist/substrate/types.d.ts +8 -0
  41. package/node_modules/@quantiya/codevibe-core/dist/track-presentation.d.ts +2 -0
  42. package/node_modules/@quantiya/codevibe-core/dist/track-presentation.test.d.ts +1 -0
  43. package/node_modules/@quantiya/codevibe-core/package.json +1 -1
  44. package/node_modules/fs-ext/build/Makefile +2 -2
  45. package/node_modules/fs-ext/build/Release/fs_ext.node +0 -0
  46. package/node_modules/fs-ext/build/Release/obj.target/fs_ext/fs-ext.o +0 -0
  47. package/node_modules/fs-ext/build/config.gypi +1 -1
  48. package/package.json +2 -2
@@ -1,8 +1,30 @@
1
+ import WebSocket from 'ws';
1
2
  import { CreateEventInput, CreateSessionInput, UpdateSessionInput, UpdateEventStatusInput, Event, Session, EventSource, DeviceKey, GrantSessionKeyInput, UpdateReviewerPolicyInput, UserReviewerPolicySnapshot } from '../types';
2
3
  import type { PostDecisionAction } from '../orchestration-shell/types';
4
+ import type { InvocationUsageSnapshot } from '../reviewer/token-usage';
3
5
  import type { CreateTaskGroupInput, CreateTaskGroupResult, SubmitMergeGateVerdictInput, SubmitMergeGateVerdictResult, SubmitTrackVerificationOutcomeInput, SubmitTrackVerificationOutcomeResult, ClaimGroupDecisionInput, ClaimGroupDecisionResult } from '../local-executor/task-group-types';
4
6
  import type { ReviewerVerdict, ReviewerRole, AgentKind as ReviewerAgentKind } from '../reviewer/types';
5
7
  import type { PlannerDecision } from '../planner/types';
8
+ /**
9
+ * Dispose a watcher/subscription WebSocket without crashing the process
10
+ * (#657 D-1 fix-forward — the clean-quit session/admission leak).
11
+ *
12
+ * `ws.close()` on a still-CONNECTING socket aborts the handshake and emits an
13
+ * ASYNC 'error' ("WebSocket was closed before the connection was established")
14
+ * on a LATER tick. Every prior disposal site paired `close(1000)` with
15
+ * `removeAllListeners()` — in either order — so that late emission always
16
+ * found a listener-less socket and crashed Node with an unhandled 'error'
17
+ * mid-teardown, BEFORE `retireHostedSession` could land the session INACTIVE
18
+ * mutation. Net effect: every clean `/quit` whose Class B watcher (or any
19
+ * other watcher) was mid-(re)connect leaked an ACTIVE session row AND an
20
+ * `activeSessionAdmissionCount` slot (#101 class), hard-capping the
21
+ * 19-scenario GA baseline after exactly the free headroom.
22
+ *
23
+ * Order is load-bearing: strip stale handlers FIRST, re-arm a swallow-all
24
+ * 'error' handler, THEN close. Exported for the regression test only — not
25
+ * part of the public SDK surface.
26
+ */
27
+ export declare function disposeWatcherSocket(ws: WebSocket, subscriptionId?: string): void;
6
28
  /**
7
29
  * One assigned reviewer seat returned by `getInReviewAssignments`. Mirrors the
8
30
  * engine `InReviewAssignment` serde (camelCase) in
@@ -101,6 +123,24 @@ export interface RecordExecutionEventInput {
101
123
  /** Free-form JSON; encrypted before crossing AppSync. */
102
124
  payload: unknown;
103
125
  dedupKeyHex: string;
126
+ /**
127
+ * O1 C1 (#652) §3.1 item 3 — the plaintext flag-target locator, REQUIRED
128
+ * when `kind = 'FLAG_BAD_APPROVAL'` and absent otherwise (non-flag events
129
+ * stay byte-identical to the pre-O1-C1 wire). Row COORDINATES only — zero
130
+ * content. Field names mirror the Rust handler DTO
131
+ * (`RecordExecutionEventInput` in core-rs `types.rs`, camelCase serde) —
132
+ * the wire-shape source of truth. The server rejects a request whose
133
+ * `taskId` ≠ `flaggedTaskId` (the per-task dedup-partition pin).
134
+ */
135
+ flaggedTaskId?: string;
136
+ /**
137
+ * The flagged row's audit-table sort key — the zero-padded 16-digit
138
+ * `seqNum` string exactly as surfaced by `queryAudit`'s additive
139
+ * `AuditEntryWireRow.seqNum` projection.
140
+ */
141
+ flaggedSeqNum?: string;
142
+ /** The flagged entry's `entry_id` (also the dedup-key derivation input). */
143
+ flaggedEntryId?: string;
104
144
  }
105
145
  /**
106
146
  * PHASE-CP-1-F.1 Part A (LOCK L2) — tolerant `AWSJSON!` object read.
@@ -180,8 +220,29 @@ export interface TaskReviewSummaryDurations {
180
220
  }
181
221
  export interface TaskReviewSummaryTokenUsage {
182
222
  knownTotal?: number;
223
+ knownInput?: number;
224
+ knownOutput?: number;
225
+ knownCachedInput?: number;
183
226
  availability: string;
184
227
  unavailableRoles: string[];
228
+ invocations?: TaskReviewSummaryTokenInvocation[];
229
+ }
230
+ export interface TaskReviewSummaryTokenInvocation {
231
+ role: string;
232
+ agent: string;
233
+ taskId?: string;
234
+ trackIndex?: number;
235
+ round?: number;
236
+ gateId?: string;
237
+ seatId?: number;
238
+ reviewerRole?: string;
239
+ inputTokens?: number;
240
+ outputTokens?: number;
241
+ cachedInputTokens?: number;
242
+ totalTokens?: number;
243
+ elapsedMs?: number;
244
+ availability: string;
245
+ unavailableReason?: string;
185
246
  }
186
247
  /** One round in the per-round summary (decrypted). */
187
248
  export interface TaskReviewSummaryRound {
@@ -862,6 +923,7 @@ export declare class AppSyncClient {
862
923
  sessionId: string;
863
924
  roundNumber: number;
864
925
  rawOutput: string;
926
+ usage?: InvocationUsageSnapshot;
865
927
  }, sessionKeyBase64: string): Promise<{
866
928
  gateId: string;
867
929
  workflowState: string;
@@ -4,3 +4,11 @@
4
4
  * the raw process argv (node, script, "keychain", subcommand, flags…).
5
5
  */
6
6
  export declare function runKeychainCli(argv: string[]): Promise<number>;
7
+ /**
8
+ * Advisory nudge for `codevibe login` / `codevibe status` (GA follow-up to #642):
9
+ * when this machine still holds file-backed credentials, has NOT migrated, and the
10
+ * OS keyring is actually usable, print the `keychain migrate` suggestion. Purely
11
+ * additive output — never throws, never mutates state, silent on any ambiguity
12
+ * (see migrate-nudge.ts invariants).
13
+ */
14
+ export declare function maybePrintKeychainMigrationNudge(print?: (line: string) => void): Promise<void>;