@quantiya/codevibe-claude-plugin 2.0.76 → 2.0.77
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.
- package/.claude-plugin/plugin.json +1 -1
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +41 -10
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +4 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/session-freshness.d.ts +12 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.js +643 -562
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/brainstorm-context.d.ts +11 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.d.ts +11 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +55627 -53046
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/conductor-reply.d.ts +37 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/context-items.d.ts +64 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +44 -2
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/resume-modal.d.ts +19 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/slash-router.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +48 -2
- package/node_modules/@quantiya/codevibe-core/dist/session/pending-session-create.d.ts +31 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/ResumePicker.d.ts +21 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/carry-over.d.ts +81 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/clean-exit.d.ts +33 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/cli-resume.d.ts +41 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/completeness-copy.d.ts +52 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/create-outcome.d.ts +43 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/e2e-fault.d.ts +28 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/hosted-loader.d.ts +88 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/local-completeness.d.ts +10 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/local-records.d.ts +121 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/picker-rows.d.ts +17 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/publish-retire.d.ts +40 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/relaunch.d.ts +72 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/restore-conversation.d.ts +27 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-candidates.d.ts +52 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-chosen.d.ts +103 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-create.d.ts +121 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-entry.d.ts +87 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-header.d.ts +25 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-io.d.ts +34 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-ledger.d.ts +107 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-messages.d.ts +68 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-rows.d.ts +24 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/resume-target.d.ts +65 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/shell-resume-io.d.ts +25 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/shell-resume.d.ts +34 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/source-choice.d.ts +37 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/successor-carry-over.d.ts +54 -0
- package/node_modules/@quantiya/codevibe-core/dist/session-resume/will-retire.d.ts +24 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +67 -0
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P61 INV-5 (design §8.5) for an interrupted resume found at a resume entry
|
|
3
|
+
* point (§6.2 step 2): S's shell starts, and S's create is replayed, only on a
|
|
4
|
+
* verified local carry-over that ends in its marker for P.
|
|
5
|
+
*
|
|
6
|
+
* S's log is first classified with the read-only reader (B-8), so nothing in
|
|
7
|
+
* S's directory changes on the way to a refusal. When the log cannot show the
|
|
8
|
+
* marker, the three INV-5 cases apply:
|
|
9
|
+
* - keychain unavailable: fail closed with the §8.1 keychain copy;
|
|
10
|
+
* - P still inside its window: S's log is set aside (exact-path rename to the
|
|
11
|
+
* shipped `log.jsonl.unrecoverable-<ms>` shape, never deleted) and the
|
|
12
|
+
* carry-over is rebuilt from P as a fresh log, re-verified and re-sealed;
|
|
13
|
+
* - otherwise: fail closed with the applicable §8.1 copy.
|
|
14
|
+
* The rebuild runs under P's resume lock, as S's recorded owner (INV-1).
|
|
15
|
+
*/
|
|
16
|
+
import type { ContextItem, ReadOnlyContextLogResult } from '../orchestration-shell/context-items';
|
|
17
|
+
import { type ResumeChosenDeps } from './resume-chosen';
|
|
18
|
+
import { type ResumeLedgerRecord } from './resume-ledger';
|
|
19
|
+
/** Why S's log does not show a verified carry-over ending in its marker. */
|
|
20
|
+
export type SuccessorLogFailure = 'absent' | 'integrity' | 'unreadable' | 'no-marker';
|
|
21
|
+
export type SuccessorLogState = {
|
|
22
|
+
kind: 'verified';
|
|
23
|
+
items: ContextItem[];
|
|
24
|
+
marker: ContextItem;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'keychain-unavailable';
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'unverifiable';
|
|
29
|
+
reason: SuccessorLogFailure;
|
|
30
|
+
};
|
|
31
|
+
/** Classify a read-only read of S's log against the ledger's sealed marker. */
|
|
32
|
+
export declare function classifySuccessorLog(read: ReadOnlyContextLogResult, marker: ResumeLedgerRecord['marker']): SuccessorLogState;
|
|
33
|
+
export type SuccessorRebuildResult = {
|
|
34
|
+
kind: 'rebuilt';
|
|
35
|
+
record: ResumeLedgerRecord;
|
|
36
|
+
items: ContextItem[];
|
|
37
|
+
marker: ContextItem;
|
|
38
|
+
warnings: string[];
|
|
39
|
+
} | {
|
|
40
|
+
kind: 'refused';
|
|
41
|
+
text: string;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'cancelled';
|
|
44
|
+
};
|
|
45
|
+
/** INV-5's second and third cases. The caller holds P's lock and has taken over S's owner record. */
|
|
46
|
+
export declare function rebuildSuccessorCarryOver(args: {
|
|
47
|
+
record: ResumeLedgerRecord;
|
|
48
|
+
reason: SuccessorLogFailure;
|
|
49
|
+
/** The targeted resume in a terminal; any other replay never prompts. */
|
|
50
|
+
interactive: boolean;
|
|
51
|
+
chosen: ResumeChosenDeps;
|
|
52
|
+
/** Rename S's log aside by exact path, if it exists. */
|
|
53
|
+
setAsideSuccessorLog(successorSessionId: string): Promise<void>;
|
|
54
|
+
}): Promise<SuccessorRebuildResult>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P61 `willRetire` (SESSION-RESUME-DESIGN.md §6.2 step 3): the shared
|
|
3
|
+
* definition of a row this launch retires. The `--continue` comparison and the
|
|
4
|
+
* pre-listing retire both evaluate it on the same step-1 `listSessions` read,
|
|
5
|
+
* so they can never disagree (C2-F5).
|
|
6
|
+
*/
|
|
7
|
+
import { type SessionFreshnessFields } from '../appsync/session-freshness';
|
|
8
|
+
import type { OwnerRecordState } from './local-records';
|
|
9
|
+
/** The plain-launch orphan threshold the pre-listing sweep shares (`cli.ts` sweep). */
|
|
10
|
+
export declare const PRE_LISTING_STALE_THRESHOLD_MS: number;
|
|
11
|
+
export interface RetireCandidateRow extends SessionFreshnessFields {
|
|
12
|
+
sessionId: string;
|
|
13
|
+
agentType: string;
|
|
14
|
+
status: string;
|
|
15
|
+
}
|
|
16
|
+
export interface WillRetireContext {
|
|
17
|
+
nowMs: number;
|
|
18
|
+
/** The session running in this process, never retired. */
|
|
19
|
+
ownSessionId?: string;
|
|
20
|
+
/** This computer's owner-record state for the row's session. */
|
|
21
|
+
ownerState: OwnerRecordState;
|
|
22
|
+
staleThresholdMs?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function willRetire(row: RetireCandidateRow, ctx: WillRetireContext): boolean;
|
|
@@ -69,6 +69,8 @@ export interface Session {
|
|
|
69
69
|
* which case the client stamps SESSION_KEY_GEN_ABSENT_SENTINEL.
|
|
70
70
|
*/
|
|
71
71
|
sessionKeyGen?: string;
|
|
72
|
+
/** P61 — the predecessor this session resumed; selected only by the resume create. */
|
|
73
|
+
resumedFromSessionId?: string | null;
|
|
72
74
|
}
|
|
73
75
|
/**
|
|
74
76
|
* GraphQL input for creating sessions
|
|
@@ -91,6 +93,19 @@ export interface CreateSessionInput {
|
|
|
91
93
|
* User.orchestrationEnabledDefault (option 6a auto-populate).
|
|
92
94
|
*/
|
|
93
95
|
orchestrationEnabled?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* P61 session resume: the ended CODEVIBE session this create continues.
|
|
98
|
+
* Idempotent (creationRequestId) CODEVIBE creates only; the backend claims
|
|
99
|
+
* the predecessor atomically with admission. Absent on every plain create.
|
|
100
|
+
*/
|
|
101
|
+
resumedFromSessionId?: string;
|
|
102
|
+
}
|
|
103
|
+
/** P61 clean-exit tail of the context log (design §9.4). */
|
|
104
|
+
export interface ContextTailInput {
|
|
105
|
+
/** The tail item's seq (canonical Crockford ULID). */
|
|
106
|
+
seq: string;
|
|
107
|
+
/** Lowercase SHA-256 hex of the tail item's plaintext JSON. */
|
|
108
|
+
itemSha256: string;
|
|
94
109
|
}
|
|
95
110
|
/**
|
|
96
111
|
* GraphQL input for updating sessions
|
|
@@ -105,4 +120,56 @@ export interface UpdateSessionInput {
|
|
|
105
120
|
* were retired by A6; current clients do not set this from the CLI.
|
|
106
121
|
*/
|
|
107
122
|
orchestrationEnabled?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* P61 clean-exit fields (design §9.4). The backend stores them only on the
|
|
125
|
+
* owner's live→INACTIVE transition of a CODEVIBE session, write-once.
|
|
126
|
+
*/
|
|
127
|
+
contextTail?: ContextTailInput;
|
|
128
|
+
contextTailIsResumeMarker?: boolean;
|
|
129
|
+
encryptedLastPrompt?: string;
|
|
130
|
+
}
|
|
131
|
+
/** P61 refusal reasons on ResumeDetails (design §9.2). */
|
|
132
|
+
export type ResumeRefusalReason = 'NOT_ORCHESTRATION' | 'STILL_ACTIVE' | 'ALREADY_RESUMED' | 'WINDOW_CLOSED';
|
|
133
|
+
/** P61 owner-only resume read contract (design §9.2). */
|
|
134
|
+
export interface ResumeDetails {
|
|
135
|
+
sessionId: string;
|
|
136
|
+
agentType: AgentType;
|
|
137
|
+
status: SessionStatus;
|
|
138
|
+
createdAt: string;
|
|
139
|
+
lastHeartbeatAt: string | null;
|
|
140
|
+
/** Epoch seconds; null while live. */
|
|
141
|
+
expiresAt: number | null;
|
|
142
|
+
/** Epoch seconds; null until the live→INACTIVE transition. */
|
|
143
|
+
resumableUntil: number | null;
|
|
144
|
+
resumedFromSessionId: string | null;
|
|
145
|
+
resumedAs: {
|
|
146
|
+
successorSessionId: string;
|
|
147
|
+
claimedAt: string;
|
|
148
|
+
} | null;
|
|
149
|
+
resumable: boolean;
|
|
150
|
+
notResumableReason: ResumeRefusalReason | null;
|
|
151
|
+
/** Ciphertext, as on Session. */
|
|
152
|
+
projectPath: string;
|
|
153
|
+
encryptedLastPrompt: string | null;
|
|
154
|
+
encryptedKeys: EncryptedSessionKey[] | null;
|
|
155
|
+
sessionKeyGen: string | null;
|
|
156
|
+
creatorDeviceId: string | null;
|
|
157
|
+
contextTailSeq: string | null;
|
|
158
|
+
contextTailSha256: string | null;
|
|
159
|
+
contextTailIsResumeMarker: boolean | null;
|
|
160
|
+
}
|
|
161
|
+
export interface ResumableSessionPage {
|
|
162
|
+
items: ResumeDetails[];
|
|
163
|
+
nextToken: string | null;
|
|
164
|
+
}
|
|
165
|
+
/** A hosted ContextItem row: routing ids and ciphertext only (design §9.3). */
|
|
166
|
+
export interface ContextItemRowWire {
|
|
167
|
+
seq: string;
|
|
168
|
+
taskId: string | null;
|
|
169
|
+
trackId: string | null;
|
|
170
|
+
ciphertext: string;
|
|
171
|
+
}
|
|
172
|
+
export interface ContextItemPage {
|
|
173
|
+
items: ContextItemRowWire[];
|
|
174
|
+
nextToken: string | null;
|
|
108
175
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quantiya/codevibe-claude-plugin",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.77",
|
|
4
4
|
"description": "Control Claude Code 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": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"node": ">=22.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@quantiya/codevibe-core": "^2.0.
|
|
51
|
+
"@quantiya/codevibe-core": "^2.0.72",
|
|
52
52
|
"@quantiya/quorum-core": "^1.0.1",
|
|
53
53
|
"dotenv": "^16.6.1",
|
|
54
54
|
"express": "^5.1.0",
|