@claudexor/cli 3.19.0 → 3.22.0
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/dist/account-catalog.d.ts +5 -6
- package/dist/account-catalog.d.ts.map +1 -1
- package/dist/account-catalog.js +24 -9
- package/dist/account-catalog.js.map +1 -1
- package/dist/account-observations.d.ts +31 -0
- package/dist/account-observations.d.ts.map +1 -0
- package/dist/account-observations.js +135 -0
- package/dist/account-observations.js.map +1 -0
- package/dist/accounts-projection.d.ts +5 -9
- package/dist/accounts-projection.d.ts.map +1 -1
- package/dist/accounts-projection.js +22 -41
- package/dist/accounts-projection.js.map +1 -1
- package/dist/accounts-services.d.ts +10 -1
- package/dist/accounts-services.d.ts.map +1 -1
- package/dist/accounts-services.js +50 -34
- package/dist/accounts-services.js.map +1 -1
- package/dist/acp-surface-runner.d.ts.map +1 -1
- package/dist/acp-surface-runner.js +2 -0
- package/dist/acp-surface-runner.js.map +1 -1
- package/dist/agy-quota-source.d.ts.map +1 -1
- package/dist/agy-quota-source.js +19 -33
- package/dist/agy-quota-source.js.map +1 -1
- package/dist/claude-oauth-credential.d.ts +16 -0
- package/dist/claude-oauth-credential.d.ts.map +1 -0
- package/dist/claude-oauth-credential.js +82 -0
- package/dist/claude-oauth-credential.js.map +1 -0
- package/dist/claude-oauth-fetch.d.ts +9 -0
- package/dist/claude-oauth-fetch.d.ts.map +1 -0
- package/dist/claude-oauth-fetch.js +67 -0
- package/dist/claude-oauth-fetch.js.map +1 -0
- package/dist/claude-oauth-usage.d.ts +7 -38
- package/dist/claude-oauth-usage.d.ts.map +1 -1
- package/dist/claude-oauth-usage.js +166 -180
- package/dist/claude-oauth-usage.js.map +1 -1
- package/dist/claudexord.d.ts.map +1 -1
- package/dist/claudexord.js +2 -2
- package/dist/claudexord.js.map +1 -1
- package/dist/cli-io.d.ts +2 -0
- package/dist/cli-io.d.ts.map +1 -1
- package/dist/cli-io.js +6 -5
- package/dist/cli-io.js.map +1 -1
- package/dist/codex-quota-source.d.ts +6 -2
- package/dist/codex-quota-source.d.ts.map +1 -1
- package/dist/codex-quota-source.js +62 -95
- package/dist/codex-quota-source.js.map +1 -1
- package/dist/continue-from-run.d.ts +27 -0
- package/dist/continue-from-run.d.ts.map +1 -0
- package/dist/continue-from-run.js +77 -0
- package/dist/continue-from-run.js.map +1 -0
- package/dist/control-services.d.ts +36 -3
- package/dist/control-services.d.ts.map +1 -1
- package/dist/control-services.js +15 -20
- package/dist/control-services.js.map +1 -1
- package/dist/credential-commands.d.ts.map +1 -1
- package/dist/credential-commands.js +12 -6
- package/dist/credential-commands.js.map +1 -1
- package/dist/daemon-agent-runner.d.ts.map +1 -1
- package/dist/daemon-agent-runner.js +4 -6
- package/dist/daemon-agent-runner.js.map +1 -1
- package/dist/gc-receipt-notes.d.ts +14 -0
- package/dist/gc-receipt-notes.d.ts.map +1 -0
- package/dist/gc-receipt-notes.js +28 -0
- package/dist/gc-receipt-notes.js.map +1 -0
- package/dist/harness-command-specs.d.ts +1 -1
- package/dist/harness-command-specs.d.ts.map +1 -1
- package/dist/harness-command-specs.js +8 -1
- package/dist/harness-command-specs.js.map +1 -1
- package/dist/harness-install-proof.d.ts.map +1 -1
- package/dist/harness-install-proof.js +14 -18
- package/dist/harness-install-proof.js.map +1 -1
- package/dist/harness-install-recipes.d.ts +2 -1
- package/dist/harness-install-recipes.d.ts.map +1 -1
- package/dist/harness-install-recipes.js +12 -9
- package/dist/harness-install-recipes.js.map +1 -1
- package/dist/harness-installer.d.ts +1 -1
- package/dist/harness-installer.d.ts.map +1 -1
- package/dist/harness-installer.js +8 -9
- package/dist/harness-installer.js.map +1 -1
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +8 -7
- package/dist/live.js.map +1 -1
- package/dist/mcp-catalog-query.js +3 -3
- package/dist/mcp-catalog-query.js.map +1 -1
- package/dist/mcp-run-projections.d.ts +17 -1
- package/dist/mcp-run-projections.d.ts.map +1 -1
- package/dist/mcp-run-projections.js +27 -1
- package/dist/mcp-run-projections.js.map +1 -1
- package/dist/model-account-evidence.d.ts +18 -0
- package/dist/model-account-evidence.d.ts.map +1 -0
- package/dist/model-account-evidence.js +71 -0
- package/dist/model-account-evidence.js.map +1 -0
- package/dist/model-services.d.ts.map +1 -1
- package/dist/model-services.js +78 -83
- package/dist/model-services.js.map +1 -1
- package/dist/native-login.d.ts +5 -0
- package/dist/native-login.d.ts.map +1 -1
- package/dist/native-login.js +18 -2
- package/dist/native-login.js.map +1 -1
- package/dist/ops-commands.d.ts.map +1 -1
- package/dist/ops-commands.js +22 -25
- package/dist/ops-commands.js.map +1 -1
- package/dist/orphan-sweeper.d.ts.map +1 -1
- package/dist/orphan-sweeper.js +11 -1
- package/dist/orphan-sweeper.js.map +1 -1
- package/dist/plugins.js +1 -1
- package/dist/plugins.js.map +1 -1
- package/dist/quota-command.js +3 -4
- package/dist/quota-command.js.map +1 -1
- package/dist/quota-refresh-diagnostics.d.ts +33 -0
- package/dist/quota-refresh-diagnostics.d.ts.map +1 -0
- package/dist/quota-refresh-diagnostics.js +9 -0
- package/dist/quota-refresh-diagnostics.js.map +1 -0
- package/dist/quota-refreshers.d.ts +5 -4
- package/dist/quota-refreshers.d.ts.map +1 -1
- package/dist/quota-refreshers.js +11 -4
- package/dist/quota-refreshers.js.map +1 -1
- package/dist/quota-services.d.ts +20 -2
- package/dist/quota-services.d.ts.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +6 -2
- package/dist/registry.js.map +1 -1
- package/dist/retention-service.d.ts +7 -1
- package/dist/retention-service.d.ts.map +1 -1
- package/dist/retention-service.js +84 -5
- package/dist/retention-service.js.map +1 -1
- package/dist/run-orchestrator.d.ts +0 -6
- package/dist/run-orchestrator.d.ts.map +1 -1
- package/dist/run-orchestrator.js +41 -10
- package/dist/run-orchestrator.js.map +1 -1
- package/dist/settings-service.d.ts +14 -6
- package/dist/settings-service.d.ts.map +1 -1
- package/dist/settings-service.js +11 -5
- package/dist/settings-service.js.map +1 -1
- package/dist/setup-jobs.js +6 -6
- package/dist/setup-jobs.js.map +1 -1
- package/dist/setup-login-capability.d.ts.map +1 -1
- package/dist/setup-login-capability.js +6 -2
- package/dist/setup-login-capability.js.map +1 -1
- package/dist/setup-login-child-lifecycle.d.ts.map +1 -1
- package/dist/setup-login-child-lifecycle.js +16 -4
- package/dist/setup-login-child-lifecycle.js.map +1 -1
- package/dist/setup-login-fallback.d.ts +54 -0
- package/dist/setup-login-fallback.d.ts.map +1 -0
- package/dist/setup-login-fallback.js +95 -0
- package/dist/setup-login-fallback.js.map +1 -0
- package/dist/setup-login-inline.d.ts +8 -46
- package/dist/setup-login-inline.d.ts.map +1 -1
- package/dist/setup-login-inline.js +79 -104
- package/dist/setup-login-inline.js.map +1 -1
- package/dist/setup-login-input-prompt.d.ts +7 -0
- package/dist/setup-login-input-prompt.d.ts.map +1 -0
- package/dist/setup-login-input-prompt.js +27 -0
- package/dist/setup-login-input-prompt.js.map +1 -0
- package/dist/setup-login-runner.d.ts.map +1 -1
- package/dist/setup-login-runner.js +15 -11
- package/dist/setup-login-runner.js.map +1 -1
- package/dist/status-projection-cache.d.ts +3 -0
- package/dist/status-projection-cache.d.ts.map +1 -1
- package/dist/status-projection-cache.js +4 -1
- package/dist/status-projection-cache.js.map +1 -1
- package/dist/thread-delivery.d.ts.map +1 -1
- package/dist/thread-delivery.js +14 -13
- package/dist/thread-delivery.js.map +1 -1
- package/dist/thread-purge.d.ts +52 -0
- package/dist/thread-purge.d.ts.map +1 -0
- package/dist/thread-purge.js +27 -0
- package/dist/thread-purge.js.map +1 -0
- package/package.json +25 -24
package/dist/thread-delivery.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { verifyAndDeliver } from "@claudexor/delivery";
|
|
1
|
+
import { PR_SECRET_LIKE_REFUSAL, verifyAndDeliver } from "@claudexor/delivery";
|
|
2
2
|
import { advanceThreadWorktree, captureWorkingTreeTransient, git, snapshotTree, } from "@claudexor/workspace";
|
|
3
|
-
import { containsSecretLikeToken } from "@claudexor/util";
|
|
4
3
|
/** Deliver an isolated thread and advance its persistent branch/watermark. */
|
|
5
4
|
export async function applyThreadDiff(threads, id, opts) {
|
|
6
5
|
const thread = threads.getThread(id);
|
|
@@ -22,15 +21,6 @@ export async function applyThreadDiff(threads, id, opts) {
|
|
|
22
21
|
detail: "no changes to apply",
|
|
23
22
|
delivery: null,
|
|
24
23
|
};
|
|
25
|
-
if (containsSecretLikeToken(patch) || captured.binarySecretLike) {
|
|
26
|
-
return {
|
|
27
|
-
applied: false,
|
|
28
|
-
status: "rejected",
|
|
29
|
-
headMoved: false,
|
|
30
|
-
detail: "patch contains a secret-like token; refusing apply",
|
|
31
|
-
delivery: null,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
24
|
let headMoved = false;
|
|
35
25
|
try {
|
|
36
26
|
const head = (await git(projectRoot, ["rev-parse", "HEAD"])).stdout.trim();
|
|
@@ -41,13 +31,24 @@ export async function applyThreadDiff(threads, id, opts) {
|
|
|
41
31
|
// Advisory only; the exact preimage check remains authoritative.
|
|
42
32
|
}
|
|
43
33
|
const mode = (["apply", "branch", "commit", "pr"].includes(opts.mode) ? opts.mode : "apply");
|
|
44
|
-
|
|
34
|
+
// INV-062: the thread applies its LIVE worktree capture (exact bytes), so a
|
|
35
|
+
// local apply/branch/commit keeps secret-like strings where the agent wrote
|
|
36
|
+
// them. Only `pr` refuses — inside the one delivery owner, before any push —
|
|
37
|
+
// for a text match and for a blob-only binary finding alike.
|
|
38
|
+
const delivered = await verifyAndDeliver(projectRoot, patch, {
|
|
39
|
+
mode,
|
|
40
|
+
branch: opts.branch,
|
|
41
|
+
message: opts.message,
|
|
42
|
+
secretLikeBinary: captured.binarySecretPaths.length > 0,
|
|
43
|
+
}, opts.gates ?? []);
|
|
45
44
|
if (delivered.applied) {
|
|
46
45
|
const targetSha = await snapshotTree(projectRoot);
|
|
47
46
|
threads.setThreadWorktree(id, ws.worktree_path, await advanceThreadWorktree(projectRoot, id, ws.worktree_path, targetSha), thread.head_run_id ?? undefined);
|
|
48
47
|
}
|
|
49
48
|
const status = !delivered.applied
|
|
50
|
-
?
|
|
49
|
+
? delivered.detail === PR_SECRET_LIKE_REFUSAL
|
|
50
|
+
? "rejected"
|
|
51
|
+
: "conflict"
|
|
51
52
|
: mode === "branch"
|
|
52
53
|
? "branched"
|
|
53
54
|
: mode === "commit"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thread-delivery.js","sourceRoot":"","sources":["../src/thread-delivery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"thread-delivery.js","sourceRoot":"","sources":["../src/thread-delivery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,GAAG,EACH,YAAY,GACb,MAAM,sBAAsB,CAAC;AAU9B,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAA0B,EAC1B,EAAU,EACV,IAAwB;IAQxB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,CAAC,MAAM;QAAE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACtF,MAAM,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;IAC5B,IAAI,EAAE,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,EAAE,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAChE,MAAM,MAAM,CAAC,MAAM,CACjB,IAAI,KAAK,CAAC,4EAA4E,CAAC,EACvF,EAAE,MAA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AAI,KAAK,EAAE;KAC9E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE owner of thread byte deletion (owner decision E2): the purge route
|
|
3
|
+
* and the retention pass both call it. The purge is journaled FIRST, so the
|
|
4
|
+
* explicit authority exists before any byte goes, and validation can never
|
|
5
|
+
* fail after user state was removed. Then the thread's daemon-owned
|
|
6
|
+
* directories go: the isolated worktree with its `claudexor/thread-*` branch,
|
|
7
|
+
* and every lane home (INV-034 lifecycle owner (a)).
|
|
8
|
+
*
|
|
9
|
+
* A directory error after the journal commit (ENOTEMPTY, EBUSY, a Windows
|
|
10
|
+
* lock) leaves a purged thread that every listing hides while its directories
|
|
11
|
+
* remain. Calling the owner again journals nothing new (the reducer keeps a
|
|
12
|
+
* purged thread as it is) and deletes what is left; `hasPurgeLeftovers` names
|
|
13
|
+
* exactly the directories this owner deletes, so the retention pass retries a
|
|
14
|
+
* purge until they are gone and never loops on a directory it cannot own.
|
|
15
|
+
*/
|
|
16
|
+
import type { ProjectPartitions } from "@claudexor/daemon";
|
|
17
|
+
import type { Thread } from "@claudexor/schema";
|
|
18
|
+
export declare function threadPurgeOwner(threads: Pick<ProjectPartitions, "getThread" | "purgeThread">, noProjectRoot: string): {
|
|
19
|
+
purgeThread: (id: string) => Promise<{
|
|
20
|
+
schema_version: 2;
|
|
21
|
+
id: string;
|
|
22
|
+
created_at: string;
|
|
23
|
+
updated_at: string;
|
|
24
|
+
repo: {
|
|
25
|
+
root: string;
|
|
26
|
+
base_ref: string;
|
|
27
|
+
} | null;
|
|
28
|
+
title: string | null;
|
|
29
|
+
folder: string | null;
|
|
30
|
+
mode: "agent" | "ask" | "plan";
|
|
31
|
+
auth_preference: "api_key" | "auto" | "subscription";
|
|
32
|
+
access: "external_sandbox_full" | "full" | "inherit_native" | "readonly" | "workspace_write" | null;
|
|
33
|
+
credential_profile_id: string | null;
|
|
34
|
+
primary_harness: string | null;
|
|
35
|
+
eligible_harnesses: string[];
|
|
36
|
+
workspace: {
|
|
37
|
+
mode: "in_place" | "isolated";
|
|
38
|
+
worktree_path: string | null;
|
|
39
|
+
base_sha: string | null;
|
|
40
|
+
delivered_through_run_id: string | null;
|
|
41
|
+
};
|
|
42
|
+
run_ids: string[];
|
|
43
|
+
head_run_id: string | null;
|
|
44
|
+
state: "active" | "closed" | "purged" | "trashed";
|
|
45
|
+
trashed_at: string | null;
|
|
46
|
+
purge_after: string | null;
|
|
47
|
+
pre_trash_state: "active" | "closed" | null;
|
|
48
|
+
}>;
|
|
49
|
+
/** Whether a directory this owner deletes for the thread is still on disk. */
|
|
50
|
+
hasPurgeLeftovers: (thread: Thread) => boolean;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=thread-purge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-purge.d.ts","sourceRoot":"","sources":["../src/thread-purge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAQhD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,aAAa,CAAC,EAC7D,aAAa,EAAE,MAAM;IAMnB,WAAW,OAAa,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAW9B,8EAA8E;IAC9E,iBAAiB,WAAW,MAAM,KAAG,OAAO;EAQ/C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { purgeThreadLanes, purgeThreadWorktree, threadLanesExist, threadWorktreeDirExists, } from "@claudexor/workspace";
|
|
2
|
+
export function threadPurgeOwner(threads, noProjectRoot) {
|
|
3
|
+
const isolatedRoot = (thread) => thread.repo && thread.workspace.mode === "isolated" ? thread.repo.root : null;
|
|
4
|
+
const lanesRoot = (thread) => thread.repo?.root ?? noProjectRoot;
|
|
5
|
+
return {
|
|
6
|
+
purgeThread: async (id) => {
|
|
7
|
+
const thread = threads.getThread(id);
|
|
8
|
+
if (!thread)
|
|
9
|
+
throw Object.assign(new Error(`no such thread: ${id}`), { status: 404 });
|
|
10
|
+
const purged = threads.purgeThread(id);
|
|
11
|
+
const worktreeRoot = isolatedRoot(thread);
|
|
12
|
+
if (worktreeRoot)
|
|
13
|
+
await purgeThreadWorktree(worktreeRoot, id);
|
|
14
|
+
// Lane homes exist regardless of workspace mode (in_place threads have
|
|
15
|
+
// them too), so they go for EVERY purged thread.
|
|
16
|
+
purgeThreadLanes(lanesRoot(thread), id);
|
|
17
|
+
return purged;
|
|
18
|
+
},
|
|
19
|
+
/** Whether a directory this owner deletes for the thread is still on disk. */
|
|
20
|
+
hasPurgeLeftovers: (thread) => {
|
|
21
|
+
const worktreeRoot = isolatedRoot(thread);
|
|
22
|
+
return ((worktreeRoot !== null && threadWorktreeDirExists(worktreeRoot, thread.id)) ||
|
|
23
|
+
threadLanesExist(lanesRoot(thread), thread.id));
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=thread-purge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-purge.js","sourceRoot":"","sources":["../src/thread-purge.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,UAAU,gBAAgB,CAC9B,OAA6D,EAC7D,aAAqB;IAErB,MAAM,YAAY,GAAG,CAAC,MAAc,EAAiB,EAAE,CACrD,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAChF,MAAM,SAAS,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,IAAI,aAAa,CAAC;IACjF,OAAO;QACL,WAAW,EAAE,KAAK,EAAE,EAAU,EAAE,EAAE;YAChC,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,CAAC,MAAM;gBAAE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACtF,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YACvC,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,YAAY;gBAAE,MAAM,mBAAmB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;YAC9D,uEAAuE;YACvE,iDAAiD;YACjD,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;YACxC,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,8EAA8E;QAC9E,iBAAiB,EAAE,CAAC,MAAc,EAAW,EAAE;YAC7C,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;YAC1C,OAAO,CACL,CAAC,YAAY,KAAK,IAAI,IAAI,uBAAuB,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;gBAC3E,gBAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAC/C,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudexor/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Claudexor CLI (claudexor). Thin surface over the orchestrator.",
|
|
6
6
|
"type": "module",
|
|
@@ -10,29 +10,30 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@claudexor/
|
|
14
|
-
"@claudexor/
|
|
15
|
-
"@claudexor/
|
|
16
|
-
"@claudexor/control-api": "3.
|
|
17
|
-
"@claudexor/
|
|
18
|
-
"@claudexor/
|
|
19
|
-
"@claudexor/delivery": "3.
|
|
20
|
-
"@claudexor/gateway": "3.
|
|
21
|
-
"@claudexor/harness-agy": "3.
|
|
22
|
-
"@claudexor/harness-
|
|
23
|
-
"@claudexor/harness-
|
|
24
|
-
"@claudexor/harness-cursor": "3.
|
|
25
|
-
"@claudexor/harness-
|
|
26
|
-
"@claudexor/harness-
|
|
27
|
-
"@claudexor/harness-raw-api": "3.
|
|
28
|
-
"@claudexor/journal": "3.
|
|
29
|
-
"@claudexor/
|
|
30
|
-
"@claudexor/
|
|
31
|
-
"@claudexor/review": "3.
|
|
32
|
-
"@claudexor/
|
|
33
|
-
"@claudexor/secrets": "3.
|
|
34
|
-
"@claudexor/
|
|
35
|
-
"@claudexor/
|
|
13
|
+
"@claudexor/acp-server": "3.22.0",
|
|
14
|
+
"@claudexor/artifact-store": "3.22.0",
|
|
15
|
+
"@claudexor/config": "3.22.0",
|
|
16
|
+
"@claudexor/control-api": "3.22.0",
|
|
17
|
+
"@claudexor/core": "3.22.0",
|
|
18
|
+
"@claudexor/daemon": "3.22.0",
|
|
19
|
+
"@claudexor/delivery": "3.22.0",
|
|
20
|
+
"@claudexor/gateway": "3.22.0",
|
|
21
|
+
"@claudexor/harness-agy": "3.22.0",
|
|
22
|
+
"@claudexor/harness-claude": "3.22.0",
|
|
23
|
+
"@claudexor/harness-codex": "3.22.0",
|
|
24
|
+
"@claudexor/harness-cursor": "3.22.0",
|
|
25
|
+
"@claudexor/harness-fake": "3.22.0",
|
|
26
|
+
"@claudexor/harness-opencode": "3.22.0",
|
|
27
|
+
"@claudexor/harness-raw-api": "3.22.0",
|
|
28
|
+
"@claudexor/journal": "3.22.0",
|
|
29
|
+
"@claudexor/orchestrator": "3.22.0",
|
|
30
|
+
"@claudexor/mcp-server": "3.22.0",
|
|
31
|
+
"@claudexor/review": "3.22.0",
|
|
32
|
+
"@claudexor/schema": "3.22.0",
|
|
33
|
+
"@claudexor/secrets": "3.22.0",
|
|
34
|
+
"@claudexor/util": "3.22.0",
|
|
35
|
+
"@claudexor/harness-acp": "3.22.0",
|
|
36
|
+
"@claudexor/workspace": "3.22.0"
|
|
36
37
|
},
|
|
37
38
|
"repository": {
|
|
38
39
|
"type": "git",
|