@quantiya/codevibe-core 2.0.80 → 2.0.81

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.
@@ -1041,7 +1041,9 @@ export declare class AppSyncClient {
1041
1041
  /**
1042
1042
  * Update a session
1043
1043
  */
1044
- updateSession(input: UpdateSessionInput): Promise<Session>;
1044
+ updateSession(input: UpdateSessionInput, options?: {
1045
+ expectedUserId?: string;
1046
+ }): Promise<Session>;
1045
1047
  private doUpdateSession;
1046
1048
  /**
1047
1049
  * Get a session
@@ -9,7 +9,7 @@ export { KeychainVendorKeyStore } from "./vendor-key-store";
9
9
  export { BrokerTokenMinter, type RotationHandle } from "./broker-token";
10
10
  export { CHATGPT_UPSTREAM_CONFIG, chatGptUpstreamUrl, CHATGPT_TOKEN_ENDPOINT, CHATGPT_OAUTH_CLIENT_ID, CHATGPT_REFRESH_CONTENT_TYPE, } from "./chatgpt-config";
11
11
  export { FetchRefreshTransport, refreshOAuthToken, buildRefreshBody, type RefreshTransport, type RefreshOutcome, } from "./oauth-refresh";
12
- export { OAuthAccountLock, createOAuthAccountLock, defaultOAuthLockDir, type OAuthAccountLockOptions, type LockHandle, type LockOwner, } from "./oauth-account-lock";
12
+ export { OAuthAccountLock, LocalLockBusyError, type LocalLockRole, createOAuthAccountLock, defaultOAuthLockDir, type OAuthAccountLockOptions, type LockHandle, type LockOwner, } from "./oauth-account-lock";
13
13
  export { buildCanonicalRequest, selfCredentialGuard, requestSha256, CanonicalRejectError, } from "./canonical";
14
14
  export type { CanonicalInput, CanonicalRequest } from "./canonical";
15
15
  export { scrubRequestBody } from "./scrubber";
@@ -1,5 +1,26 @@
1
1
  /** Liveness of a recorded lock owner (only `dead` is ever reclaimed). */
2
2
  export type OwnerLiveness = "alive" | "dead" | "unknown";
3
+ export type LocalLockRole = "oauth-account" | "sync-journal" | "sync-journal-store" | "tool-sync-recovery";
4
+ /** Contention, not proof of corrupt persisted work. Never authorizes reclaim. */
5
+ export declare class LocalLockBusyError extends Error {
6
+ readonly diagnostic: {
7
+ role: LocalLockRole;
8
+ lockId: string;
9
+ holderPid: number | null;
10
+ holderState: OwnerLiveness | "absent" | "unreadable";
11
+ heldMs: number | null;
12
+ waitMs: number;
13
+ };
14
+ readonly code = "LOCAL_LOCK_BUSY";
15
+ constructor(diagnostic: {
16
+ role: LocalLockRole;
17
+ lockId: string;
18
+ holderPid: number | null;
19
+ holderState: OwnerLiveness | "absent" | "unreadable";
20
+ heldMs: number | null;
21
+ waitMs: number;
22
+ });
23
+ }
3
24
  /** The `owner.json` record written once per acquisition. */
4
25
  export interface LockOwner {
5
26
  pid: number;
@@ -12,6 +33,7 @@ export interface LockOwner {
12
33
  export interface OAuthAccountLockOptions {
13
34
  /** The canonical lockdir path (keyed to the OAuth account). */
14
35
  lockDir: string;
36
+ role?: LocalLockRole;
15
37
  /** GC callers must retain their recovery index unless unlink/rmdir succeeds.
16
38
  * Default callers keep the existing best-effort release behavior. */
17
39
  requireRemovalOnRelease?: boolean;
@@ -66,6 +88,7 @@ export interface LockHandle {
66
88
  /** The portable cross-process OAuth-account lock (§5 / AMEND-1). */
67
89
  export declare class OAuthAccountLock {
68
90
  private readonly lockDir;
91
+ private readonly role;
69
92
  private readonly requireRemovalOnRelease;
70
93
  private readonly ownerFile;
71
94
  private readonly reclaimGuardDir;
@@ -90,6 +113,7 @@ export declare class OAuthAccountLock {
90
113
  * ZERO side effects on the persisted bundle on any fail-closed path.
91
114
  */
92
115
  acquire(): Promise<LockHandle>;
116
+ private contentionError;
93
117
  /** Whether the EXISTING lockdir holder is reclaimable (dead), an ownerless strand
94
118
  * (F6), or must be waited on. */
95
119
  private classifyExistingHolder;
package/dist/index.d.ts CHANGED
@@ -59,6 +59,7 @@ export * as AuditKeys from './audit-keys';
59
59
  export * as Substrate from './substrate';
60
60
  export { buildSeatbeltProfile, SandboxExecSubstrate } from './substrate';
61
61
  export * as CredentialBroker from './credential-broker';
62
+ export { LocalLockBusyError } from './credential-broker/oauth-account-lock';
62
63
  export * as SubstrateLaunch from './substrate-launch';
63
64
  export * from './types';
64
65
  export * as Planner from './planner';