@run402/sdk 4.97.0 → 4.99.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/README.md +2 -2
- package/core-dist/binding-file.d.ts +14 -0
- package/core-dist/binding-file.js +28 -1
- package/core-dist/wallet.js +3 -3
- package/dist/errors.d.ts +24 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +44 -2
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +18 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/kernel.d.ts +34 -0
- package/dist/kernel.d.ts.map +1 -1
- package/dist/kernel.js +15 -1
- package/dist/kernel.js.map +1 -1
- package/dist/namespaces/admin.d.ts.map +1 -1
- package/dist/namespaces/admin.js +8 -0
- package/dist/namespaces/admin.js.map +1 -1
- package/dist/namespaces/agent.d.ts +2 -2
- package/dist/namespaces/agent.d.ts.map +1 -1
- package/dist/namespaces/agent.js +4 -0
- package/dist/namespaces/agent.js.map +1 -1
- package/dist/namespaces/agent.types.d.ts +5 -0
- package/dist/namespaces/agent.types.d.ts.map +1 -1
- package/dist/namespaces/apps.d.ts.map +1 -1
- package/dist/namespaces/apps.js +2 -0
- package/dist/namespaces/apps.js.map +1 -1
- package/dist/namespaces/auth.d.ts.map +1 -1
- package/dist/namespaces/auth.js +9 -0
- package/dist/namespaces/auth.js.map +1 -1
- package/dist/namespaces/branches.d.ts.map +1 -1
- package/dist/namespaces/branches.js +2 -0
- package/dist/namespaces/branches.js.map +1 -1
- package/dist/namespaces/ci.d.ts.map +1 -1
- package/dist/namespaces/ci.js +2 -0
- package/dist/namespaces/ci.js.map +1 -1
- package/dist/namespaces/credentials.d.ts +0 -23
- package/dist/namespaces/credentials.d.ts.map +1 -1
- package/dist/namespaces/credentials.js +29 -0
- package/dist/namespaces/credentials.js.map +1 -1
- package/dist/namespaces/escalations.d.ts.map +1 -1
- package/dist/namespaces/escalations.js +2 -0
- package/dist/namespaces/escalations.js.map +1 -1
- package/dist/namespaces/grants.d.ts.map +1 -1
- package/dist/namespaces/grants.js +4 -0
- package/dist/namespaces/grants.js.map +1 -1
- package/dist/namespaces/live.d.ts +0 -16
- package/dist/namespaces/live.d.ts.map +1 -1
- package/dist/namespaces/live.js +19 -0
- package/dist/namespaces/live.js.map +1 -1
- package/dist/namespaces/me.d.ts.map +1 -1
- package/dist/namespaces/me.js +3 -0
- package/dist/namespaces/me.js.map +1 -1
- package/dist/namespaces/org.d.ts.map +1 -1
- package/dist/namespaces/org.js +3 -0
- package/dist/namespaces/org.js.map +1 -1
- package/dist/namespaces/projects.d.ts.map +1 -1
- package/dist/namespaces/projects.js +5 -0
- package/dist/namespaces/projects.js.map +1 -1
- package/dist/namespaces/repos.d.ts.map +1 -1
- package/dist/namespaces/repos.js +5 -0
- package/dist/namespaces/repos.js.map +1 -1
- package/dist/namespaces/rooms.d.ts.map +1 -1
- package/dist/namespaces/rooms.js +3 -0
- package/dist/namespaces/rooms.js.map +1 -1
- package/dist/namespaces/session.d.ts.map +1 -1
- package/dist/namespaces/session.js +18 -0
- package/dist/namespaces/session.js.map +1 -1
- package/dist/namespaces/transfers.d.ts.map +1 -1
- package/dist/namespaces/transfers.js +3 -0
- package/dist/namespaces/transfers.js.map +1 -1
- package/dist/namespaces/wallets.d.ts.map +1 -1
- package/dist/namespaces/wallets.js +2 -0
- package/dist/namespaces/wallets.js.map +1 -1
- package/dist/namespaces/write-approval.d.ts.map +1 -1
- package/dist/namespaces/write-approval.js +3 -0
- package/dist/namespaces/write-approval.js.map +1 -1
- package/dist/node/actions-node.d.ts.map +1 -1
- package/dist/node/actions-node.js +3 -0
- package/dist/node/actions-node.js.map +1 -1
- package/dist/node/buzz-doctor-contract.d.ts +155 -0
- package/dist/node/buzz-doctor-contract.d.ts.map +1 -0
- package/dist/node/buzz-doctor-contract.js +385 -0
- package/dist/node/buzz-doctor-contract.js.map +1 -0
- package/dist/node/buzz-doctor.d.ts +155 -0
- package/dist/node/buzz-doctor.d.ts.map +1 -0
- package/dist/node/buzz-doctor.js +810 -0
- package/dist/node/buzz-doctor.js.map +1 -0
- package/dist/node/credentials.d.ts +9 -4
- package/dist/node/credentials.d.ts.map +1 -1
- package/dist/node/credentials.js +1 -1
- package/dist/node/credentials.js.map +1 -1
- package/dist/node/diagnostics.d.ts +45 -0
- package/dist/node/diagnostics.d.ts.map +1 -0
- package/dist/node/diagnostics.js +67 -0
- package/dist/node/diagnostics.js.map +1 -0
- package/dist/node/doctor.d.ts +101 -0
- package/dist/node/doctor.d.ts.map +1 -0
- package/dist/node/doctor.js +618 -0
- package/dist/node/doctor.js.map +1 -0
- package/dist/node/index.d.ts +57 -5
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +36 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/init.d.ts +137 -0
- package/dist/node/init.d.ts.map +1 -0
- package/dist/node/init.js +507 -0
- package/dist/node/init.js.map +1 -0
- package/dist/node/lightning-wallet.d.ts +61 -0
- package/dist/node/lightning-wallet.d.ts.map +1 -0
- package/dist/node/lightning-wallet.js +126 -0
- package/dist/node/lightning-wallet.js.map +1 -0
- package/dist/node/local-actions.d.ts +23 -0
- package/dist/node/local-actions.d.ts.map +1 -0
- package/dist/node/local-actions.js +38 -0
- package/dist/node/local-actions.js.map +1 -0
- package/dist/node/org-context.d.ts +169 -0
- package/dist/node/org-context.d.ts.map +1 -0
- package/dist/node/org-context.js +403 -0
- package/dist/node/org-context.js.map +1 -0
- package/dist/node/status.d.ts +62 -0
- package/dist/node/status.d.ts.map +1 -0
- package/dist/node/status.js +132 -0
- package/dist/node/status.js.map +1 -0
- package/dist/node/vault-target.d.ts +49 -0
- package/dist/node/vault-target.d.ts.map +1 -0
- package/dist/node/vault-target.js +109 -0
- package/dist/node/vault-target.js.map +1 -0
- package/dist/node/wallets.d.ts +242 -0
- package/dist/node/wallets.d.ts.map +1 -0
- package/dist/node/wallets.js +484 -0
- package/dist/node/wallets.js.map +1 -0
- package/dist/secret-gate.d.ts +377 -0
- package/dist/secret-gate.d.ts.map +1 -0
- package/dist/secret-gate.js +273 -0
- package/dist/secret-gate.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Which vault does this repository mean": the targeting chain `run402 repos`
|
|
3
|
+
* verbs and `doctor`'s vault check share. A verb run standing inside a
|
|
4
|
+
* repository that already names its own vault acts on THAT repository, not on
|
|
5
|
+
* the profile's active project — git muscle memory.
|
|
6
|
+
*
|
|
7
|
+
* Order, highest first:
|
|
8
|
+
* 1. an explicit repo id / project id (the caller's `--repo` / `--project`)
|
|
9
|
+
* 2. the pinned `r402.repoId` in local git config (no network)
|
|
10
|
+
* 3. the repository's `run402` / `origin` remote address — id-form parsed
|
|
11
|
+
* from the string, slug-form resolved with one read-only
|
|
12
|
+
* `repos.resolveAddress` (never a pin, never a push-to-create)
|
|
13
|
+
* 4. `RUN402_PROJECT_ID`
|
|
14
|
+
* 5. the profile's active project
|
|
15
|
+
*
|
|
16
|
+
* Outside a repository only tiers 4 and 5 apply. The protocol reads it
|
|
17
|
+
* composes (`readPinnedVaultRepo`, `resolveAddress`) live in the SDK already;
|
|
18
|
+
* this adds only the precedence.
|
|
19
|
+
*/
|
|
20
|
+
import { type Repos } from "../namespaces/repos.js";
|
|
21
|
+
export interface RepoOwnVaultTarget {
|
|
22
|
+
repo_id: string | null;
|
|
23
|
+
project_id: string | null;
|
|
24
|
+
source: "pin" | "remote";
|
|
25
|
+
remote_name?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface VaultTarget {
|
|
28
|
+
repo_id?: string;
|
|
29
|
+
project_id?: string | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The repository's OWN target, independent of any flag: the pin, then the
|
|
33
|
+
* `run402`/`origin` remote. Null when there is neither, when this is not a
|
|
34
|
+
* repository, or when a slug-form remote fails to resolve — a miss is
|
|
35
|
+
* ordinary, never thrown.
|
|
36
|
+
*/
|
|
37
|
+
export declare function repoOwnVaultTarget(repos: Pick<Repos, "resolveAddress">, repoDir: string): Promise<RepoOwnVaultTarget | null>;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve `{ repo_id?, project_id? }` for a vault verb. An explicit value
|
|
40
|
+
* wins; `warn` receives one line when it disagrees with the repository's own
|
|
41
|
+
* target (the pin for a repo id, the remote for a project id).
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveVaultTarget(repos: Pick<Repos, "resolveAddress">, { repoDir, explicitProjectId, explicitRepoId, warn, }?: {
|
|
44
|
+
repoDir?: string;
|
|
45
|
+
explicitProjectId?: string | null;
|
|
46
|
+
explicitRepoId?: string | null;
|
|
47
|
+
warn?: (line: string) => void;
|
|
48
|
+
}): Promise<VaultTarget>;
|
|
49
|
+
//# sourceMappingURL=vault-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-target.d.ts","sourceRoot":"","sources":["../../src/node/vault-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAA+C,KAAK,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAIjG,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAgBD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CA8BlI;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,EACpC,EACE,OAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,IAA4C,GAC7C,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAAO,GAC7H,OAAO,CAAC,WAAW,CAAC,CAqBtB"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Which vault does this repository mean": the targeting chain `run402 repos`
|
|
3
|
+
* verbs and `doctor`'s vault check share. A verb run standing inside a
|
|
4
|
+
* repository that already names its own vault acts on THAT repository, not on
|
|
5
|
+
* the profile's active project — git muscle memory.
|
|
6
|
+
*
|
|
7
|
+
* Order, highest first:
|
|
8
|
+
* 1. an explicit repo id / project id (the caller's `--repo` / `--project`)
|
|
9
|
+
* 2. the pinned `r402.repoId` in local git config (no network)
|
|
10
|
+
* 3. the repository's `run402` / `origin` remote address — id-form parsed
|
|
11
|
+
* from the string, slug-form resolved with one read-only
|
|
12
|
+
* `repos.resolveAddress` (never a pin, never a push-to-create)
|
|
13
|
+
* 4. `RUN402_PROJECT_ID`
|
|
14
|
+
* 5. the profile's active project
|
|
15
|
+
*
|
|
16
|
+
* Outside a repository only tiers 4 and 5 apply. The protocol reads it
|
|
17
|
+
* composes (`readPinnedVaultRepo`, `resolveAddress`) live in the SDK already;
|
|
18
|
+
* this adds only the precedence.
|
|
19
|
+
*/
|
|
20
|
+
import { getActiveProjectId } from "../../core-dist/keystore.js";
|
|
21
|
+
import { parseVaultRemoteUrl, vaultRemoteAddressForm } from "../namespaces/repos.js";
|
|
22
|
+
import { hardenedGit } from "./vault-snapshot.js";
|
|
23
|
+
import { readPinnedVaultRepo } from "./vault-address.js";
|
|
24
|
+
/** Tiers 4 and 5, never throwing: a caller with nothing to target reports that itself. */
|
|
25
|
+
function envOrActiveProjectId() {
|
|
26
|
+
return (process.env.RUN402_PROJECT_ID || "").trim() || getActiveProjectId() || null;
|
|
27
|
+
}
|
|
28
|
+
async function isInsideGitRepo(repoDir) {
|
|
29
|
+
try {
|
|
30
|
+
await hardenedGit(repoDir, ["rev-parse", "--git-dir"]);
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The repository's OWN target, independent of any flag: the pin, then the
|
|
39
|
+
* `run402`/`origin` remote. Null when there is neither, when this is not a
|
|
40
|
+
* repository, or when a slug-form remote fails to resolve — a miss is
|
|
41
|
+
* ordinary, never thrown.
|
|
42
|
+
*/
|
|
43
|
+
export async function repoOwnVaultTarget(repos, repoDir) {
|
|
44
|
+
if (!(await isInsideGitRepo(repoDir)))
|
|
45
|
+
return null;
|
|
46
|
+
const pinned = await readPinnedVaultRepo(repoDir);
|
|
47
|
+
if (pinned)
|
|
48
|
+
return { repo_id: pinned.repo_id, project_id: null, source: "pin" };
|
|
49
|
+
for (const name of ["run402", "origin"]) {
|
|
50
|
+
let url;
|
|
51
|
+
try {
|
|
52
|
+
url = (await hardenedGit(repoDir, ["remote", "get-url", name])).text().trim();
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (!url)
|
|
58
|
+
continue;
|
|
59
|
+
let address;
|
|
60
|
+
try {
|
|
61
|
+
address = parseVaultRemoteUrl(url);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (!address)
|
|
67
|
+
continue;
|
|
68
|
+
if (vaultRemoteAddressForm(address) === "id") {
|
|
69
|
+
return { repo_id: null, project_id: address.project_id, source: "remote", remote_name: name };
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
const resolved = await repos.resolveAddress(address);
|
|
73
|
+
return { repo_id: resolved.repo_id, project_id: resolved.project_id, source: "remote", remote_name: name };
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Resolve `{ repo_id?, project_id? }` for a vault verb. An explicit value
|
|
83
|
+
* wins; `warn` receives one line when it disagrees with the repository's own
|
|
84
|
+
* target (the pin for a repo id, the remote for a project id).
|
|
85
|
+
*/
|
|
86
|
+
export async function resolveVaultTarget(repos, { repoDir = process.cwd(), explicitProjectId, explicitRepoId, warn = (line) => console.error(line), } = {}) {
|
|
87
|
+
const needsOwn = explicitRepoId == null || explicitProjectId == null;
|
|
88
|
+
const own = needsOwn ? await repoOwnVaultTarget(repos, repoDir) : null;
|
|
89
|
+
if (explicitRepoId != null && own?.source === "pin" && own.repo_id !== explicitRepoId) {
|
|
90
|
+
warn(`warning: --repo ${explicitRepoId} does not match this repo's pinned vault ${own.repo_id} — using --repo ${explicitRepoId}.`);
|
|
91
|
+
}
|
|
92
|
+
if (explicitProjectId != null && own?.source === "remote" && own.project_id && own.project_id !== explicitProjectId) {
|
|
93
|
+
warn(`warning: --project ${explicitProjectId} does not match this repo's '${own.remote_name}' remote project ${own.project_id} — using --project ${explicitProjectId}.`);
|
|
94
|
+
}
|
|
95
|
+
if (explicitRepoId != null || explicitProjectId != null) {
|
|
96
|
+
const result = {};
|
|
97
|
+
if (explicitRepoId != null)
|
|
98
|
+
result.repo_id = explicitRepoId;
|
|
99
|
+
if (explicitProjectId != null)
|
|
100
|
+
result.project_id = explicitProjectId;
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
if (own?.source === "pin")
|
|
104
|
+
return { repo_id: own.repo_id };
|
|
105
|
+
if (own?.source === "remote" && own.project_id)
|
|
106
|
+
return { project_id: own.project_id };
|
|
107
|
+
return { project_id: envOrActiveProjectId() };
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=vault-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-target.js","sourceRoot":"","sources":["../../src/node/vault-target.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAc,MAAM,wBAAwB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAczD,0FAA0F;AAC1F,SAAS,oBAAoB;IAC3B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,kBAAkB,EAAE,IAAI,IAAI,CAAC;AACtF,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,OAAe;IAC5C,IAAI,CAAC;QACH,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAoC,EAAE,OAAe;IAC5F,IAAI,CAAC,CAAC,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACnD,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAClD,IAAI,MAAM;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,E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,QAAQ,IAAI,GAAG,CAAC,UAAU;QAAE,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC;IACtF,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Named wallets (profiles) and wallet selection, owned by the Node SDK.
|
|
3
|
+
*
|
|
4
|
+
* Each named wallet is a self-contained profile directory under
|
|
5
|
+
* `{config_dir}/profiles/<name>/` with its own key, project keystore, and
|
|
6
|
+
* non-secret `meta.json`; the reserved `default` wallet lives at the
|
|
7
|
+
* config-dir root. This module is the one implementation of:
|
|
8
|
+
*
|
|
9
|
+
* - the SELECTION precedence chain (`resolveWalletSelection`), highest first:
|
|
10
|
+
* 1. an explicit flag value (`--wallet <name>` / `--profile <name>`)
|
|
11
|
+
* 2. `RUN402_WALLET` / `RUN402_PROFILE`
|
|
12
|
+
* 3. the nearest `.run402.local.json` / `.run402.json` binding, walking up
|
|
13
|
+
* 4. the global default recorded by `wallets use` (base `config.json`)
|
|
14
|
+
* 5. `default`
|
|
15
|
+
* An env value that disagrees with a directory binding is a hard error
|
|
16
|
+
* (`WALLET_SELECTION_CONFLICT`) unless the caller is the wallet-management
|
|
17
|
+
* surface itself, which must keep working while selection is ambiguous.
|
|
18
|
+
* - the MANAGEMENT verbs on `r.wallets` (`list`, `current`, `create`, `use`,
|
|
19
|
+
* `rename`, `bind`, `unbind`, `import`, `remove`), which operate on explicit
|
|
20
|
+
* named targets and are independent of the active selection.
|
|
21
|
+
*
|
|
22
|
+
* The CLI (`run402 wallets …`, the `--wallet` pre-resolution in `cli.mjs`) and
|
|
23
|
+
* the MCP server consume these; neither adds a precedence rule of its own.
|
|
24
|
+
*
|
|
25
|
+
* A rejected name is a value we know nothing about — a private key pasted
|
|
26
|
+
* into `RUN402_WALLET` is a demonstrated case — so every refusal routes the
|
|
27
|
+
* value through `describeRejectedValue()`: a short typo shows in full, anything
|
|
28
|
+
* secret-shaped is redacted.
|
|
29
|
+
*/
|
|
30
|
+
import { type WalletData } from "../../core-dist/wallet.js";
|
|
31
|
+
import { LocalError, type NextAction } from "../errors.js";
|
|
32
|
+
import type { Client } from "../kernel.js";
|
|
33
|
+
import { Wallets, type WalletCreateResult } from "../namespaces/wallets.js";
|
|
34
|
+
/**
|
|
35
|
+
* The active profile's wallet, or null when there is none. A file that exists
|
|
36
|
+
* but cannot be read as a wallet is `BAD_WALLET_FILE`, naming the file and
|
|
37
|
+
* the way to recreate it, never the parser's own failure.
|
|
38
|
+
*/
|
|
39
|
+
export declare function readLocalWallet(): WalletData | null;
|
|
40
|
+
/** Where the active wallet came from, highest precedence first. `config` is the global `wallets use` default. */
|
|
41
|
+
export type WalletSelectionSource = "flag" | "env" | "binding" | "config" | "default";
|
|
42
|
+
/** A flag value handed to the resolver, e.g. `{ flag: "--wallet", value: "kychon" }`; `value` undefined when the flag had none. */
|
|
43
|
+
export interface WalletFlag {
|
|
44
|
+
flag: string;
|
|
45
|
+
value: string | undefined;
|
|
46
|
+
}
|
|
47
|
+
export interface WalletSelection {
|
|
48
|
+
name: string;
|
|
49
|
+
source: WalletSelectionSource;
|
|
50
|
+
/** The flag, env var, binding file, or `wallets use` that decided; null for the bare default. */
|
|
51
|
+
sourceDetail: string | null;
|
|
52
|
+
}
|
|
53
|
+
export interface ResolveWalletSelectionOptions {
|
|
54
|
+
walletFlag?: WalletFlag | null;
|
|
55
|
+
env?: Record<string, string | undefined>;
|
|
56
|
+
/** Directory the binding walk starts from. Default `process.cwd()`. */
|
|
57
|
+
cwd?: string;
|
|
58
|
+
/** Skip the env-vs-binding conflict error (the wallet-management surface itself). */
|
|
59
|
+
allowConflict?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A wallet selection refused: bad name, env-vs-binding conflict, or a named
|
|
63
|
+
* wallet that does not exist locally. A {@link LocalError} carrying `code`,
|
|
64
|
+
* `hint`, and `details`, never exiting the process, so a caller mid-protocol
|
|
65
|
+
* (the git remote helper) can report it on its own channel.
|
|
66
|
+
*/
|
|
67
|
+
export declare class WalletSelectionError extends LocalError {
|
|
68
|
+
constructor({ code, message, hint, details }: {
|
|
69
|
+
code: string;
|
|
70
|
+
message: string;
|
|
71
|
+
hint?: string;
|
|
72
|
+
details?: unknown;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/** Nearest wallet binding walking up from `startDir` to the filesystem root. */
|
|
76
|
+
export declare function findWalletBinding(startDir: string): {
|
|
77
|
+
wallet: string;
|
|
78
|
+
file: string;
|
|
79
|
+
} | null;
|
|
80
|
+
/**
|
|
81
|
+
* The one precedence chain. Pure: reads the environment it is handed, the
|
|
82
|
+
* binding files above `cwd`, and the global default; never prompts, never
|
|
83
|
+
* exits. Throws {@link WalletSelectionError}.
|
|
84
|
+
*/
|
|
85
|
+
export declare function resolveWalletSelection({ walletFlag, env, cwd, allowConflict, }?: ResolveWalletSelectionOptions): WalletSelection;
|
|
86
|
+
/**
|
|
87
|
+
* Fail closed when a non-default selection names a wallet that does not exist
|
|
88
|
+
* locally. Throws {@link WalletSelectionError} `WALLET_NOT_FOUND`.
|
|
89
|
+
*/
|
|
90
|
+
export declare function assertWalletExists({ name, source }: Pick<WalletSelection, "name" | "source">): void;
|
|
91
|
+
/** The environment variable carrying the published selection's provenance. */
|
|
92
|
+
export declare const ACTIVE_WALLET_CONTEXT_ENV = "RUN402_ACTIVE_WALLET_JSON";
|
|
93
|
+
export interface ActiveWalletContext {
|
|
94
|
+
name: string;
|
|
95
|
+
source: WalletSelectionSource;
|
|
96
|
+
sourceDetail: string | null;
|
|
97
|
+
binding: {
|
|
98
|
+
wallet: string;
|
|
99
|
+
file: string;
|
|
100
|
+
} | null;
|
|
101
|
+
envName: string | null;
|
|
102
|
+
diverged: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface SelectWalletOptions extends ResolveWalletSelectionOptions {
|
|
105
|
+
/** Skip the fail-closed existence check (surfaces that create wallets). */
|
|
106
|
+
allowMissing?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Resolve, fail closed, and PUBLISH the selection to `env` so every core path
|
|
110
|
+
* function resolves under it: `RUN402_WALLET` names the wallet and
|
|
111
|
+
* `RUN402_ACTIVE_WALLET_JSON` carries how it was chosen (read back by
|
|
112
|
+
* `r.wallets.current()`, since the env var alone no longer can say). Call
|
|
113
|
+
* once per process, before any client reads a path.
|
|
114
|
+
*/
|
|
115
|
+
export declare function selectWallet(opts?: SelectWalletOptions): WalletSelection;
|
|
116
|
+
/** The published selection context, or null when no surface published one. */
|
|
117
|
+
export declare function readActiveWalletContext(env?: Record<string, string | undefined>): ActiveWalletContext | null;
|
|
118
|
+
export type WalletRail = "x402" | "mpp" | "lightning";
|
|
119
|
+
export interface WalletDescriptor {
|
|
120
|
+
local_label: string;
|
|
121
|
+
server_label: string | null;
|
|
122
|
+
address: string | null;
|
|
123
|
+
address_short: string | null;
|
|
124
|
+
rail: string | null;
|
|
125
|
+
active: boolean;
|
|
126
|
+
}
|
|
127
|
+
export interface WalletWarning {
|
|
128
|
+
code: string;
|
|
129
|
+
message: string;
|
|
130
|
+
hint: string;
|
|
131
|
+
}
|
|
132
|
+
export interface CurrentWalletResult {
|
|
133
|
+
local_label: string;
|
|
134
|
+
source: WalletSelectionSource | "unknown";
|
|
135
|
+
source_detail: string | null;
|
|
136
|
+
address: string | null;
|
|
137
|
+
server_label: string | null;
|
|
138
|
+
configured: boolean;
|
|
139
|
+
created: string | null;
|
|
140
|
+
rail: string | null;
|
|
141
|
+
faucet_used: boolean;
|
|
142
|
+
path: string;
|
|
143
|
+
next_actions?: NextAction[];
|
|
144
|
+
warnings: WalletWarning[];
|
|
145
|
+
}
|
|
146
|
+
export interface CreatedWalletProfile {
|
|
147
|
+
local_label: string;
|
|
148
|
+
address: string;
|
|
149
|
+
rail: WalletRail;
|
|
150
|
+
created: true;
|
|
151
|
+
/** The first next action's command, kept beside `next_actions` for plain readers. */
|
|
152
|
+
next: string;
|
|
153
|
+
next_actions: NextAction[];
|
|
154
|
+
}
|
|
155
|
+
export interface WalletBindResult {
|
|
156
|
+
wallet: string;
|
|
157
|
+
file: ".run402.json";
|
|
158
|
+
bound: true;
|
|
159
|
+
safe_to_commit: true;
|
|
160
|
+
note: string;
|
|
161
|
+
binding: Record<string, unknown> | null;
|
|
162
|
+
warning?: string;
|
|
163
|
+
}
|
|
164
|
+
export interface WalletUnbindResult {
|
|
165
|
+
file: ".run402.json";
|
|
166
|
+
unbound: boolean;
|
|
167
|
+
removed: boolean;
|
|
168
|
+
binding: Record<string, unknown> | null;
|
|
169
|
+
}
|
|
170
|
+
/** Builds a client signing as another named wallet (the label push signs as its target). */
|
|
171
|
+
export type WalletClientFactory = (paths: {
|
|
172
|
+
walletPath: string;
|
|
173
|
+
keystorePath: string;
|
|
174
|
+
}) => {
|
|
175
|
+
wallet(address: string): {
|
|
176
|
+
setLabel(label: string): Promise<{
|
|
177
|
+
ok: boolean;
|
|
178
|
+
}>;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* `r.wallets` on the Node entry: the isomorphic local-wallet and label verbs
|
|
183
|
+
* plus the named-wallet (profile) management verbs.
|
|
184
|
+
*/
|
|
185
|
+
export declare class NodeWallets extends Wallets {
|
|
186
|
+
#private;
|
|
187
|
+
constructor(client: Client, opts?: {
|
|
188
|
+
clientFor?: WalletClientFactory;
|
|
189
|
+
});
|
|
190
|
+
/** Every local wallet, without loading any private key. */
|
|
191
|
+
list(): Promise<WalletDescriptor[]>;
|
|
192
|
+
/** The active wallet: its name, how it was selected, and the local wallet file's facts. */
|
|
193
|
+
current(): Promise<CurrentWalletResult>;
|
|
194
|
+
/**
|
|
195
|
+
* With no name: create the ACTIVE profile's wallet file (the isomorphic
|
|
196
|
+
* behaviour). With a name: create a new named wallet (its key stays local)
|
|
197
|
+
* on `rail` (default `x402`); `default` creates the root wallet. Refused on
|
|
198
|
+
* the sandbox surface: it writes a private key.
|
|
199
|
+
*/
|
|
200
|
+
create(): Promise<WalletCreateResult>;
|
|
201
|
+
create(name: string, opts?: {
|
|
202
|
+
rail?: string;
|
|
203
|
+
}): Promise<CreatedWalletProfile>;
|
|
204
|
+
/** Set the global default wallet (`wallets use`). */
|
|
205
|
+
use(name: string): Promise<{
|
|
206
|
+
local_label: string;
|
|
207
|
+
active: true;
|
|
208
|
+
}>;
|
|
209
|
+
/** Rename a wallet; renaming `default` moves it under `profiles/`. */
|
|
210
|
+
rename(oldName: string, newName: string): Promise<{
|
|
211
|
+
from: string;
|
|
212
|
+
to: string;
|
|
213
|
+
renamed: true;
|
|
214
|
+
}>;
|
|
215
|
+
/** Bind a directory (default cwd) to a wallet by writing its name into `./.run402.json`. */
|
|
216
|
+
bind(name?: string, opts?: {
|
|
217
|
+
cwd?: string;
|
|
218
|
+
}): Promise<WalletBindResult>;
|
|
219
|
+
/** Remove only the `wallet` key from `./.run402.json`; the file goes when nothing else is left in it. */
|
|
220
|
+
unbind(opts?: {
|
|
221
|
+
cwd?: string;
|
|
222
|
+
}): Promise<WalletUnbindResult>;
|
|
223
|
+
/**
|
|
224
|
+
* Adopt an existing private key as a new named wallet. `privateKey` may be a
|
|
225
|
+
* function, called only after the name checks pass, so a caller reading the
|
|
226
|
+
* key from a file or stdin reads nothing for a refused name. Refused on the
|
|
227
|
+
* sandbox surface: its input is a private key.
|
|
228
|
+
*/
|
|
229
|
+
import(name: string, privateKey: string | (() => string)): Promise<{
|
|
230
|
+
local_label: string;
|
|
231
|
+
address: string;
|
|
232
|
+
imported: true;
|
|
233
|
+
}>;
|
|
234
|
+
/** Delete a named wallet and its keys. Requires `{ confirm: true }`; `default` is protected. */
|
|
235
|
+
remove(name: string, opts?: {
|
|
236
|
+
confirm?: boolean;
|
|
237
|
+
}): Promise<{
|
|
238
|
+
local_label: string;
|
|
239
|
+
removed: true;
|
|
240
|
+
}>;
|
|
241
|
+
}
|
|
242
|
+
//# sourceM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