@quantiya/codevibe-claude-plugin 2.0.21 → 2.0.23
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/diagnostics/shape-only.d.ts +11 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.js +321 -282
- package/node_modules/@quantiya/codevibe-core/dist/local-executor/process-tree.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/__tests__/o5-diagnostics.test.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +517 -115
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/quorum-loop.d.ts +8 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/reducer.d.ts +4 -5
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/provider.d.ts +7 -7
- package/node_modules/@quantiya/codevibe-core/dist/substrate/command-runner.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/substrate/sandbox-exec.d.ts +3 -2
- package/node_modules/@quantiya/codevibe-core/dist/substrate/types.d.ts +20 -0
- package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/apikey-bootstrap.d.ts +32 -1
- package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/engage-substrate.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/sanitized-env.d.ts +6 -0
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/node_modules/fs-ext/build/Makefile +1 -1
- package/node_modules/fs-ext/build/Release/fs_ext.node +0 -0
- package/node_modules/fs-ext/build/config.gypi +0 -2
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ import { captureWorkspaceRootAuthority } from '../local-executor/workspace-autho
|
|
|
16
16
|
import { type TeamExecution } from '../local-executor/team-execution-flag';
|
|
17
17
|
import { type RenderedConflict, type TrackIntentDiff } from '../local-executor/wb2-review-bundle';
|
|
18
18
|
import { ReviewerRegistry } from '../reviewer/registry';
|
|
19
|
-
import { type ReviewerFailureReason } from '../reviewer/provider';
|
|
19
|
+
import { type ReviewerError, type ReviewerFailureReason } from '../reviewer/provider';
|
|
20
20
|
import type { SubstrateHandle } from '../substrate/types';
|
|
21
21
|
import type { VerdictClassifier } from '../reviewer/verdict-classifier';
|
|
22
22
|
import type { AgentKind as ReviewerAgentKind, ReviewerRole, VerdictKind } from '../reviewer/types';
|
|
@@ -27,6 +27,13 @@ import type { PostDecisionAction, Tier } from './types';
|
|
|
27
27
|
import type { ContinuationPacketWriter } from '../continuation/packet-writer';
|
|
28
28
|
import type { ContinuationPacketReader } from '../continuation/packet-reader';
|
|
29
29
|
import type { HandoffReason } from '../continuation/types';
|
|
30
|
+
/**
|
|
31
|
+
* Project a `ReviewerError` into the variant-specific diagnostic fields worth
|
|
32
|
+
* logging without persisting reviewer-controlled bytes. The discriminator is
|
|
33
|
+
* logged separately. The exhaustive switch forces any future raw-carrying
|
|
34
|
+
* variant to choose an explicit safe projection.
|
|
35
|
+
*/
|
|
36
|
+
export declare function describeReviewerErrorDetail(detail: ReviewerError): Record<string, unknown>;
|
|
30
37
|
/**
|
|
31
38
|
* CP-1.f — the clean, user-facing one-liner for a synthesized ESCALATE verdict
|
|
32
39
|
* whose origin is a reviewer subprocess failure. Built ONLY from the closed
|
|
@@ -8,10 +8,9 @@ export declare const CONVERSATION_BUFFER_MAX = 500;
|
|
|
8
8
|
export declare function reducer(state: OrchestrationState, action: OrchestrationAction): OrchestrationState;
|
|
9
9
|
/**
|
|
10
10
|
* P10 E3 r6/r8 — "is a single-implementor task actually running?" from the
|
|
11
|
-
* TRUTHFUL `sessionTasks` lifecycle
|
|
12
|
-
* `
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* SET guard below.
|
|
11
|
+
* TRUTHFUL `sessionTasks` lifecycle. Shared by the `/status` running line,
|
|
12
|
+
* `deriveCurrentTaskState` (the planner packet), and the reviewer-line SET
|
|
13
|
+
* guard below. `runningTasks` is terminalized in parallel for its independent
|
|
14
|
+
* task-start size heuristic.
|
|
16
15
|
*/
|
|
17
16
|
export declare function hasRunningSingleTask(state: OrchestrationState): boolean;
|
|
@@ -179,10 +179,10 @@ export type ReviewerError = {
|
|
|
179
179
|
kind: 'spawn_failed';
|
|
180
180
|
agent: AgentKind;
|
|
181
181
|
/**
|
|
182
|
-
* Human-readable cause. **MAY carry raw stderr** —
|
|
183
|
-
* audit
|
|
184
|
-
* `reasoning` (CP-1.f sanitization invariant).
|
|
185
|
-
* the user-facing one-liner instead.
|
|
182
|
+
* Human-readable cause. **MAY carry raw stderr** — keep it transient and
|
|
183
|
+
* shape-project it before any durable log/audit. NEVER promote this into
|
|
184
|
+
* synthesized verdict wire `reasoning` (CP-1.f sanitization invariant).
|
|
185
|
+
* Use `failureReason` for the user-facing one-liner instead.
|
|
186
186
|
*/
|
|
187
187
|
reason: string;
|
|
188
188
|
/**
|
|
@@ -197,11 +197,11 @@ export type ReviewerError = {
|
|
|
197
197
|
failureReason?: ReviewerFailureReason;
|
|
198
198
|
} | {
|
|
199
199
|
/** Reviewer returned but its output couldn't be parsed into a valid
|
|
200
|
-
* verdict. Raw output
|
|
200
|
+
* verdict. Raw output remains transient for classification and is
|
|
201
|
+
* shape-projected before any durable diagnostic. */
|
|
201
202
|
kind: 'parse_failure';
|
|
202
203
|
agent: AgentKind;
|
|
203
|
-
/** Raw output
|
|
204
|
-
* needed). */
|
|
204
|
+
/** Raw output; consumers must never persist or surface its bytes. */
|
|
205
205
|
raw_output: string;
|
|
206
206
|
} | {
|
|
207
207
|
/** Reviewer was cancelled by the engine before completing (e.g.,
|
|
@@ -91,8 +91,9 @@ homedir?: string,
|
|
|
91
91
|
*/
|
|
92
92
|
auditDir?: string | null,
|
|
93
93
|
/**
|
|
94
|
-
* Extra dirs that the agent may read/write. Used
|
|
95
|
-
* config/runtime dir; the broker-token
|
|
94
|
+
* Extra dirs that the agent may read/write. Used for the mutable CLI
|
|
95
|
+
* config/runtime dir and the unique Claude scratch root; the broker-token
|
|
96
|
+
* helper stays in `extraReadDirs`.
|
|
96
97
|
*/
|
|
97
98
|
extraWriteDirs?: readonly string[],
|
|
98
99
|
/**
|
|
@@ -92,6 +92,19 @@ export interface SubstrateSpec {
|
|
|
92
92
|
/** Writable mount/grant point inside the sandbox. */
|
|
93
93
|
sandboxDir: string;
|
|
94
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* O5 — unique short writable Claude scratch root for A5. It is created by
|
|
97
|
+
* the host with mode 0700, granted as one exact subtree, and removed through
|
|
98
|
+
* identity-bound teardown. Docker does not need this extra mount/grant.
|
|
99
|
+
*/
|
|
100
|
+
agentScratch?: {
|
|
101
|
+
/** Canonical host path used by the Seatbelt grant. */
|
|
102
|
+
hostDir: string;
|
|
103
|
+
/** Short path spelling exported as CLAUDE_CODE_TMPDIR. */
|
|
104
|
+
sandboxDir: string;
|
|
105
|
+
/** Exact scratch-root incarnation captured through its creation descriptor. */
|
|
106
|
+
authority: WorkspaceRootAuthority;
|
|
107
|
+
};
|
|
95
108
|
/**
|
|
96
109
|
* CP-7 W3 — Stage-2 r1 HIGH (A5 audit-readability). OPTIONAL, additive. The
|
|
97
110
|
* RESOLVED per-task audit DIR (the sibling `.codevibe/audit/<group>/<track>/`
|
|
@@ -256,5 +269,12 @@ export interface CommandRunner {
|
|
|
256
269
|
cwd?: string;
|
|
257
270
|
/** Exact cwd incarnation held through native process creation. */
|
|
258
271
|
cwdAuthority?: WorkspaceRootAuthority;
|
|
272
|
+
/**
|
|
273
|
+
* Additional directory incarnations that the trusted POSIX process host
|
|
274
|
+
* must authenticate synchronously at the final target-spawn boundary.
|
|
275
|
+
* These paths may be referenced by the child env/profile even though
|
|
276
|
+
* they are not its cwd (for example Claude's private scratch root).
|
|
277
|
+
*/
|
|
278
|
+
launchPathAuthorities?: readonly WorkspaceRootAuthority[];
|
|
259
279
|
}): RunnerProc;
|
|
260
280
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { VendorProvider } from "../credential-broker/types";
|
|
2
|
+
import type { WorkspaceRootAuthority } from "../local-executor/workspace-authority";
|
|
2
3
|
/** The fixed filenames inside the bootstrap dir (host + sandbox agree). */
|
|
3
4
|
export declare const HELPER_SCRIPT_NAME = "broker-apikey-helper.sh";
|
|
4
5
|
export declare const TOKEN_FILE_NAME = "broker-token";
|
|
@@ -49,6 +50,18 @@ export interface ApiKeyBootstrapInput {
|
|
|
49
50
|
configDirEqualsHostDir?: boolean;
|
|
50
51
|
/** Override the host root for the bootstrap dir (default os.tmpdir()). */
|
|
51
52
|
hostRoot?: string;
|
|
53
|
+
/**
|
|
54
|
+
* A5/macOS only: parent for Claude's short, private per-seat scratch root.
|
|
55
|
+
* `engageSubstrate` passes `/tmp`, which is canonicalized before `mkdtemp`;
|
|
56
|
+
* the resulting `/private/tmp/cvXXXXXX` path remains under 30 bytes and
|
|
57
|
+
* prevents Claude's Bash child-process temp path from falling back to the
|
|
58
|
+
* shared `/tmp/claude-<uid>` namespace. Omitted for Docker/direct callers.
|
|
59
|
+
*/
|
|
60
|
+
claudeScratchHostRoot?: string;
|
|
61
|
+
/** @internal deterministic race seam after mkdtemp identity capture. */
|
|
62
|
+
beforeClaudeScratchOpen?: (path: string) => Promise<void> | void;
|
|
63
|
+
/** @internal deterministic race seam before atomic scratch quarantine. */
|
|
64
|
+
beforeClaudeScratchCleanupCommit?: (path: string) => Promise<void> | void;
|
|
52
65
|
/**
|
|
53
66
|
* The host path of the agent's rw WORKDIR mount (the worktree). The token
|
|
54
67
|
* file + helper MUST live OUTSIDE this dir — otherwise the broker token (and
|
|
@@ -78,6 +91,14 @@ export declare class ApiKeyBootstrap {
|
|
|
78
91
|
readonly configSandboxDir: string;
|
|
79
92
|
/** Host path of the token file (the LE rewrites this on rotation). */
|
|
80
93
|
private readonly tokenFileHostPath;
|
|
94
|
+
/** Canonical host path of the unique Claude scratch root, if allocated. */
|
|
95
|
+
readonly claudeScratchHostDir: string | null;
|
|
96
|
+
/** Short in-sandbox spelling exported as CLAUDE_CODE_TMPDIR. */
|
|
97
|
+
readonly claudeScratchSandboxDir: string | null;
|
|
98
|
+
/** Creation identity used to refuse cleanup of a replaced path. */
|
|
99
|
+
private readonly claudeScratchIdentity;
|
|
100
|
+
/** Test-only pause seam retained with the task-owned scratch authority. */
|
|
101
|
+
private readonly beforeClaudeScratchCleanupCommit;
|
|
81
102
|
private constructor();
|
|
82
103
|
/**
|
|
83
104
|
* Materialize the bootstrap: create the host dir (0700), write the token file
|
|
@@ -95,6 +116,12 @@ export declare class ApiKeyBootstrap {
|
|
|
95
116
|
hostDir: string;
|
|
96
117
|
sandboxDir: string;
|
|
97
118
|
};
|
|
119
|
+
/** The unique writable Claude scratch grant, absent on Docker/Codex paths. */
|
|
120
|
+
get claudeScratchSpec(): {
|
|
121
|
+
hostDir: string;
|
|
122
|
+
sandboxDir: string;
|
|
123
|
+
authority: WorkspaceRootAuthority;
|
|
124
|
+
} | null;
|
|
98
125
|
/**
|
|
99
126
|
* REFRESH the broker token (rotation / on a broker 401). Atomically rewrites
|
|
100
127
|
* the token file (write a temp + rename) so the agent never reads a partial
|
|
@@ -102,6 +129,10 @@ export declare class ApiKeyBootstrap {
|
|
|
102
129
|
* the new value. The agent's mount is read-only, so ONLY the host can do this.
|
|
103
130
|
*/
|
|
104
131
|
refresh(token: string): Promise<void>;
|
|
105
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Remove the bootstrap, config, and unique Claude scratch dirs. Scratch
|
|
134
|
+
* cleanup is identity-bound: a replaced pathname is retained and reported,
|
|
135
|
+
* never recursively removed as though it still belonged to this seat.
|
|
136
|
+
*/
|
|
106
137
|
destroy(): Promise<void>;
|
|
107
138
|
}
|
|
@@ -76,6 +76,8 @@ export interface EngageSubstrateInput {
|
|
|
76
76
|
tokenRefreshIntervalMs?: number;
|
|
77
77
|
/** Bootstrap host-root override (tests). */
|
|
78
78
|
bootstrapHostRoot?: string;
|
|
79
|
+
/** A5 Claude short-scratch parent override (tests; production is `/tmp`). */
|
|
80
|
+
claudeScratchHostRoot?: string;
|
|
79
81
|
/** Safe locale source for the sanitized env (default: none). */
|
|
80
82
|
localeSource?: Readonly<Record<string, string | undefined>>;
|
|
81
83
|
}
|
|
@@ -42,6 +42,12 @@ export interface SanitizedEnvInput {
|
|
|
42
42
|
* Required for the substrate path; the I1 allow-list still drops every cred.
|
|
43
43
|
*/
|
|
44
44
|
sandboxBootstrapDir: string;
|
|
45
|
+
/**
|
|
46
|
+
* Optional Claude-only short private scratch root. A5 supplies a unique
|
|
47
|
+
* canonical `/private/tmp/cvXXXXXX` path; Docker keeps using its isolated
|
|
48
|
+
* config dir.
|
|
49
|
+
*/
|
|
50
|
+
claudeScratchDir?: string;
|
|
45
51
|
/**
|
|
46
52
|
* A SAFE source for the hygiene values (LANG/TERM/…). Defaults to a minimal
|
|
47
53
|
* fixed map. The LE may pass a curated subset of `process.env` for locale, but
|
|
@@ -332,7 +332,7 @@ endif
|
|
|
332
332
|
|
|
333
333
|
quiet_cmd_regen_makefile = ACTION Regenerating $@
|
|
334
334
|
cmd_regen_makefile = cd $(srcdir); /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/hendryyeh/Library/Caches/node-gyp/24.4.0" "-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/Users/hendryyeh/Library/Caches/node-gyp/24.4.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/hendryyeh/Workspace/CodeVibe/codevibe-claude-plugin/node_modules/fs-ext" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/Users/hendryyeh/Workspace/CodeVibe/codevibe-claude-plugin/node_modules/fs-ext/build/config.gypi -I/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/hendryyeh/Library/Caches/node-gyp/24.4.0/include/node/common.gypi "--toplevel-dir=." binding.gyp
|
|
335
|
-
Makefile: $(srcdir)/build/config.gypi $(srcdir)/../../../../../Library/Caches/node-gyp/24.4.0/include/node/common.gypi $(srcdir)/binding.gyp
|
|
335
|
+
Makefile: $(srcdir)/build/config.gypi $(srcdir)/../../../../../../../opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/../../../../../Library/Caches/node-gyp/24.4.0/include/node/common.gypi $(srcdir)/binding.gyp
|
|
336
336
|
$(call do_cmd,regen_makefile)
|
|
337
337
|
|
|
338
338
|
# "all" is a concatenation of the "all" targets from all the included
|
|
Binary file
|
|
@@ -489,7 +489,6 @@
|
|
|
489
489
|
"nodedir": "/Users/hendryyeh/Library/Caches/node-gyp/24.4.0",
|
|
490
490
|
"python": "/opt/homebrew/opt/python@3.14/bin/python3.14",
|
|
491
491
|
"standalone_static_library": 1,
|
|
492
|
-
"audit": "",
|
|
493
492
|
"global_prefix": "/opt/homebrew",
|
|
494
493
|
"local_prefix": "/Users/hendryyeh/Workspace/CodeVibe/codevibe-claude-plugin",
|
|
495
494
|
"globalconfig": "/opt/homebrew/etc/npmrc",
|
|
@@ -498,7 +497,6 @@
|
|
|
498
497
|
"npm_version": "11.4.2",
|
|
499
498
|
"node_gyp": "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",
|
|
500
499
|
"cache": "/Users/hendryyeh/.npm",
|
|
501
|
-
"fund": "",
|
|
502
500
|
"user_agent": "npm/11.4.2 node/v24.4.0 darwin arm64 workspaces/false",
|
|
503
501
|
"prefix": "/opt/homebrew"
|
|
504
502
|
}
|
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.23",
|
|
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.19",
|
|
52
52
|
"@quantiya/quorum-core": "^1.0.1",
|
|
53
53
|
"dotenv": "^16.6.1",
|
|
54
54
|
"express": "^5.1.0",
|