@quantiya/codevibe-claude-plugin 2.0.17 → 2.0.19

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 (47) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/server.js +18 -18
  3. package/node_modules/@quantiya/codevibe-core/dist/__tests__/mobile-prompt-input.test.d.ts +1 -0
  4. package/node_modules/@quantiya/codevibe-core/dist/appsync/__tests__/group-operation-result.test.d.ts +1 -0
  5. package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +155 -0
  6. package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +14 -0
  7. package/node_modules/@quantiya/codevibe-core/dist/crypto/__tests__/crypto-service.test.d.ts +1 -0
  8. package/node_modules/@quantiya/codevibe-core/dist/crypto/crypto-service.d.ts +7 -0
  9. package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +2 -0
  10. package/node_modules/@quantiya/codevibe-core/dist/index.js +525 -304
  11. package/node_modules/@quantiya/codevibe-core/dist/local-executor/local-executor-impl.d.ts +34 -0
  12. package/node_modules/@quantiya/codevibe-core/dist/local-executor/snapshot-merge.d.ts +6 -0
  13. package/node_modules/@quantiya/codevibe-core/dist/local-executor/types.d.ts +6 -0
  14. package/node_modules/@quantiya/codevibe-core/dist/mobile-prompt-input.d.ts +13 -0
  15. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/decision-attempt-live-handoff.test.d.ts +1 -0
  16. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/decision-attempt-recovery.test.d.ts +1 -0
  17. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/decision-attempt-session-serialization.test.d.ts +1 -0
  18. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/decision-attempt.test.d.ts +1 -0
  19. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/decision-effect.test.d.ts +1 -0
  20. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/gate-resolution-event.test.d.ts +1 -0
  21. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/supervision-catch-up.test.d.ts +1 -0
  22. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/workspace-outcome.test.d.ts +1 -0
  23. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/workspace-terminal-coordinator.test.d.ts +1 -0
  24. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.d.ts +3 -0
  25. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +5621 -1758
  26. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/ConversationPane.d.ts +2 -1
  27. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/GatePromptEntry.d.ts +1 -0
  28. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/decision-attempt-recovery.d.ts +70 -0
  29. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/decision-attempt.d.ts +211 -0
  30. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/decision-effect.d.ts +39 -0
  31. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/emit-shell-event.d.ts +20 -2
  32. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-decision-submit.d.ts +20 -2
  33. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-prompts.d.ts +4 -0
  34. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-resolution-event.d.ts +10 -0
  35. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +6 -2
  36. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/quorum-loop.d.ts +11 -0
  37. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/supervision-catch-up.d.ts +7 -0
  38. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +57 -0
  39. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/workspace-outcome.d.ts +20 -0
  40. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/workspace-terminal-coordinator.d.ts +114 -0
  41. package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +7 -0
  42. package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +2 -0
  43. package/node_modules/@quantiya/codevibe-core/package.json +1 -1
  44. package/node_modules/fs-ext/build/Makefile +1 -1
  45. package/node_modules/fs-ext/build/Release/fs_ext.node +0 -0
  46. package/node_modules/fs-ext/build/config.gypi +0 -2
  47. package/package.json +2 -2
@@ -5,6 +5,7 @@ import type { InvocationUsageSnapshot } from '../reviewer/token-usage';
5
5
  import type { CreateTaskGroupInput, CreateTaskGroupResult, SubmitMergeGateVerdictInput, SubmitMergeGateVerdictResult, SubmitTrackVerificationOutcomeInput, SubmitTrackVerificationOutcomeResult, ClaimGroupDecisionInput, ClaimGroupDecisionResult } from '../local-executor/task-group-types';
6
6
  import type { ReviewScopeContext, ReviewerVerdict, ReviewerRole, AgentKind as ReviewerAgentKind } from '../reviewer/types';
7
7
  import type { PlannerDecision } from '../planner/types';
8
+ import { type CanonicalGateDecisionRequest, type CanonicalGroupDecisionRequest, type DecisionAttemptResult, type DecisionSubmissionResult } from '../orchestration-shell/decision-attempt';
8
9
  /**
9
10
  * Dispose a watcher/subscription WebSocket without crashing the process
10
11
  * (#657 D-1 fix-forward — the clean-quit session/admission leak).
@@ -102,6 +103,38 @@ export interface TaskGroupStatusResult {
102
103
  status: string;
103
104
  haltReason?: string;
104
105
  }
106
+ export type GroupTerminalOperationKind = 'PROMOTE' | 'KEEP' | 'REVERT';
107
+ export type GroupOperationState = 'PROVISIONAL' | 'AUTHORIZED' | 'PROMOTING' | 'REVERTING' | 'READY_TO_COMMIT' | 'COMMITTED' | 'OUTCOME_RECORDED' | 'CANCELLED';
108
+ export type GroupOperationCallStatus = 'APPLIED' | 'ALREADY_APPLIED' | 'PENDING_RECOVERY' | 'CANCELLED' | 'REJECTED';
109
+ export interface GroupOperationResult {
110
+ taskGroupId: string;
111
+ groupGeneration: number;
112
+ operationKind: GroupTerminalOperationKind | null;
113
+ callStatus: GroupOperationCallStatus;
114
+ authorizationState: GroupOperationState | null;
115
+ anchorId: string | null;
116
+ anchorTimestamp: string | null;
117
+ manifestHash: string | null;
118
+ memberCount: number | null;
119
+ operationHash: string | null;
120
+ operationToken: string | null;
121
+ decisionClaimId: string | null;
122
+ operationReceiptHash: string | null;
123
+ promotionCompletionKind: 'FRESH_APPLIED' | 'RECONCILED_APPLIED' | 'ROLLED_BACK_NO_CHANGE' | null;
124
+ revertCompletionKind: 'REVERTED' | 'PARTIALLY_REVERTED' | 'NO_CHANGE' | null;
125
+ committedAt: string | null;
126
+ rejectionCode: string | null;
127
+ }
128
+ export interface GroupDecisionCommitResult {
129
+ taskGroupId: string;
130
+ decisionClaimId: string;
131
+ commitStatus: 'COMMITTED' | 'ALREADY_COMMITTED' | 'PENDING_RECOVERY';
132
+ workflowStatus: 'COMPLETE' | 'PENDING_ERROR';
133
+ groupStatus: 'COMPLETE' | 'HALTED' | null;
134
+ committedAt: string | null;
135
+ }
136
+ /** @internal Exported for the closed protocol-fixture suite. */
137
+ export declare function parseGroupOperationResult(raw: unknown, operation: string): GroupOperationResult;
105
138
  /**
106
139
  * A1e hosted blind-hold upload input. These are the ONLY client-supplied
107
140
  * plaintext fields permitted by the shared-context ZK boundary. `expiresAt`
@@ -342,6 +375,12 @@ export interface UserDecisionAppliedEvent {
342
375
  /** The parsed `PostDecisionAction` (from the AWSJSON `payload`). */
343
376
  action: PostDecisionAction;
344
377
  }
378
+ /** P16/P20 authoritative claim-time retirement of one prompt's actions. */
379
+ export interface PromptActionFence {
380
+ sessionId: string;
381
+ promptId: string;
382
+ decisionClaimId: string | null;
383
+ }
345
384
  /**
346
385
  * CP-1.f — decides whether a subscribed event should be delivered to the
347
386
  * caller's `onEvent` callback.
@@ -431,6 +470,7 @@ export declare class AppSyncClient {
431
470
  private deviceKeyWatcher;
432
471
  private sessionUpdateWatchers;
433
472
  private applyUserDecisionWatchers;
473
+ private promptActionWatchers;
434
474
  private statusWriteChains;
435
475
  private environment;
436
476
  constructor();
@@ -597,6 +637,27 @@ export declare class AppSyncClient {
597
637
  * List events for a session
598
638
  */
599
639
  listEvents(sessionId: string, source?: EventSource, limit?: number): Promise<Event[]>;
640
+ /**
641
+ * Strongly-consistent, paginated supervision history used to close the
642
+ * realtime subscribe-before-catch-up gap. The caller owns pagination so it
643
+ * can merge each page through the same strict event classifier as live data.
644
+ */
645
+ listSupervisionEvents(input: {
646
+ sessionId: string;
647
+ sessionGenerationId?: string;
648
+ rescanHorizonSeconds?: number;
649
+ nextToken?: string;
650
+ limit?: number;
651
+ }): Promise<{
652
+ items: Event[];
653
+ nextToken: string | null;
654
+ }>;
655
+ /**
656
+ * P16/P20 cold-open action-fence authority. The backend derives the owner
657
+ * from Cognito; this method exhausts the partition and returns only claimed,
658
+ * non-actionable Gate markers for the requested session.
659
+ */
660
+ listClaimedGatePrompts(sessionId: string): Promise<PromptActionFence[]>;
600
661
  /**
601
662
  * List the authenticated user's sessions. Paginates automatically
602
663
  * via nextToken so callers always get the complete set.
@@ -815,6 +876,85 @@ export declare class AppSyncClient {
815
876
  * ergonomics (e.g. dispatcher routing without re-mapping the
816
877
  * UPPER_SNAKE wire value).
817
878
  */
879
+ /**
880
+ * P16/P20 durable Gate decision admission. Unlike the legacy mutation this
881
+ * result is deliberately not subscribed: it fences the submitting client but
882
+ * never stands in for the durable GATE_RESOLUTION Event.
883
+ */
884
+ submitGateDecisionV2(request: CanonicalGateDecisionRequest, canonicalRequestHash: string): Promise<DecisionSubmissionResult>;
885
+ /** P16/P20 TaskGroup-native decision admission (CLAIM, not workflow COMMIT). */
886
+ submitGroupDecisionV2(request: CanonicalGroupDecisionRequest, canonicalRequestHash: string): Promise<DecisionSubmissionResult>;
887
+ authorizeGroupTerminalOperation(input: {
888
+ sessionId: string;
889
+ taskGroupId: string;
890
+ groupGeneration: number;
891
+ operationKind: GroupTerminalOperationKind;
892
+ decisionClaimId?: string;
893
+ }): Promise<GroupOperationResult>;
894
+ beginGroupPromotion(input: {
895
+ sessionId: string;
896
+ taskGroupId: string;
897
+ groupGeneration: number;
898
+ anchorId: string;
899
+ operationHash: string;
900
+ promotionToken: string;
901
+ }): Promise<GroupOperationResult>;
902
+ completeGroupPromotion(input: {
903
+ sessionId: string;
904
+ taskGroupId: string;
905
+ groupGeneration: number;
906
+ anchorId: string;
907
+ operationHash: string;
908
+ promotionToken: string;
909
+ operationReceiptHash: string;
910
+ completionKind: 'FRESH_APPLIED' | 'RECONCILED_APPLIED' | 'ROLLED_BACK_NO_CHANGE';
911
+ }): Promise<GroupOperationResult>;
912
+ beginGroupRevert(input: {
913
+ sessionId: string;
914
+ taskGroupId: string;
915
+ groupGeneration: number;
916
+ decisionClaimId: string;
917
+ anchorId: string;
918
+ operationHash: string;
919
+ revertToken: string;
920
+ }): Promise<GroupOperationResult>;
921
+ completeGroupRevert(input: {
922
+ sessionId: string;
923
+ taskGroupId: string;
924
+ groupGeneration: number;
925
+ decisionClaimId: string;
926
+ anchorId: string;
927
+ operationHash: string;
928
+ revertToken: string;
929
+ operationReceiptHash: string;
930
+ completionKind: 'REVERTED' | 'PARTIALLY_REVERTED' | 'NO_CHANGE';
931
+ }): Promise<GroupOperationResult>;
932
+ prepareGroupKeep(input: {
933
+ sessionId: string;
934
+ taskGroupId: string;
935
+ groupGeneration: number;
936
+ decisionClaimId: string;
937
+ anchorId: string;
938
+ operationHash: string;
939
+ operationReceiptHash: string;
940
+ }): Promise<GroupOperationResult>;
941
+ commitGroupDecisionV2(input: {
942
+ sessionId: string;
943
+ taskGroupId: string;
944
+ decisionClaimId: string;
945
+ operationReceiptHash: string;
946
+ }): Promise<GroupDecisionCommitResult>;
947
+ /** Owner-scoped recovery point-read for a locally durable attempt receipt. */
948
+ getDecisionAttempt(input: {
949
+ sessionId: string;
950
+ promptId: string;
951
+ decisionAttemptId: string;
952
+ }): Promise<DecisionAttemptResult>;
953
+ /** Owner-scoped durable resolution point read for receipt recovery. */
954
+ getGateResolution(input: {
955
+ sessionId: string;
956
+ promptId: string;
957
+ }): Promise<unknown>;
818
958
  applyUserDecision(input: {
819
959
  gateId: string;
820
960
  taskId: string;
@@ -1245,6 +1385,21 @@ export declare class AppSyncClient {
1245
1385
  private resetSessionUpdateWatcherKeepAlive;
1246
1386
  private handleSessionUpdateWatcherError;
1247
1387
  private cleanupSessionUpdateWatcherState;
1388
+ /**
1389
+ * Subscribe to the owner-filtered prompt-state fan-out for one session. Only
1390
+ * a GATE row with `mobileActionable=false` is surfaced. `onSubscribed` runs
1391
+ * after AppSync start_ack so callers can perform the exhaustive snapshot
1392
+ * without a subscribe-before-catch-up gap.
1393
+ */
1394
+ subscribeToPromptActions(sessionId: string, onActionFence: (event: PromptActionFence) => void, onSubscribed?: (isReconnect: boolean) => void | Promise<void>, onError?: (error: Error) => void): {
1395
+ stop: () => void;
1396
+ };
1397
+ private createPromptActionWatcherConnection;
1398
+ private handlePromptActionPayload;
1399
+ private sendPromptActionWatcherStart;
1400
+ private resetPromptActionWatcherKeepAlive;
1401
+ private handlePromptActionWatcherError;
1402
+ private cleanupPromptActionWatcherState;
1248
1403
  /**
1249
1404
  * PHASE-CP-10-MIN (#585) §2.3 / Codex-H3 — subscribe to the cross-device
1250
1405
  * `onApplyUserDecision` echo for a session. The orchestration shell uses
@@ -1,6 +1,10 @@
1
1
  export declare const queries: {
2
2
  getSession: string;
3
3
  listEvents: string;
4
+ listSupervisionEvents: string;
5
+ getDecisionAttempt: string;
6
+ getGateResolution: string;
7
+ listOpenPrompts: string;
4
8
  listUserDeviceKeys: string;
5
9
  listServiceDeviceKeys: string;
6
10
  /**
@@ -40,6 +44,15 @@ export declare const mutations: {
40
44
  classifyPlannerPrompt: string;
41
45
  pingPlanner: string;
42
46
  applyUserDecision: string;
47
+ submitGateDecisionV2: string;
48
+ submitGroupDecisionV2: string;
49
+ authorizeGroupTerminalOperation: string;
50
+ beginGroupPromotion: string;
51
+ completeGroupPromotion: string;
52
+ beginGroupRevert: string;
53
+ completeGroupRevert: string;
54
+ prepareGroupKeep: string;
55
+ commitGroupDecisionV2: string;
43
56
  recordContinuationPacketWritten: string;
44
57
  createTaskGroup: string;
45
58
  submitMergeGateVerdict: string;
@@ -55,4 +68,5 @@ export declare const subscriptions: {
55
68
  onSessionUpdated: string;
56
69
  onClassBPacket: string;
57
70
  onApplyUserDecision: string;
71
+ onPromptStateChanged: string;
58
72
  };
@@ -9,6 +9,13 @@ export declare class CryptoError extends Error {
9
9
  * Current encryption version for future algorithm upgrades
10
10
  */
11
11
  export declare const ENCRYPTION_VERSION = 1;
12
+ /**
13
+ * Return the fixed-width SEC1 representation of a valid P-256 private scalar.
14
+ * Node's ECDH getPrivateKey() may omit leading zero bytes, while JWK signing
15
+ * requires the full 32-byte `d` value. Left-padding preserves the scalar value
16
+ * and also keeps newly persisted device identities in one canonical format.
17
+ */
18
+ export declare function normalizeP256PrivateScalar(scalar: Buffer): Buffer;
12
19
  /**
13
20
  * Service for end-to-end encryption operations
14
21
  */
@@ -21,6 +21,8 @@ export type { Config, Environment } from './config';
21
21
  export { Logger, logger, createLogger } from './logger';
22
22
  export { parseInteractivePrompt, normalizeSnapshot, } from './prompt-parser';
23
23
  export type { ParsedInteractivePrompt, PromptKind, InteractivePromptOption, } from './prompt-parser';
24
+ export { classifyMobilePromptInput } from './mobile-prompt-input';
25
+ export type { MobilePromptInputIntent } from './mobile-prompt-input';
24
26
  export { resumeOrCreateSession, prepareSessionEncryption, rekeySessionForNewDevices, startDeviceKeyWatcher, registerDeviceEncryptionKey, RetiredSessionCannotReactivateError, isRetiredSessionCannotReactivateError, prepareEventTimestamp, _resetPrepareEventTimestampForTesting, } from './session';
25
27
  export type { ResumeOrCreateSessionInput, ResumeOrCreateSessionResult } from './session';
26
28
  export { detectInstalledAgents, pushDetectedAgents, V1_ORCHESTRATION_PROMPT_KIND, V1_ORCHESTRATION_OPTIONS, mapOptionNumberToUserDecisionKind, mapOptionToUserDecisionKind, } from './orchestration';