@zcloak/ai-agent 1.0.7 → 1.0.9
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/identity.d.ts +28 -12
- package/dist/identity.js +64 -30
- package/dist/identity.js.map +1 -1
- package/dist/identity_cmd.d.ts +6 -7
- package/dist/identity_cmd.js +27 -51
- package/dist/identity_cmd.js.map +1 -1
- package/dist/session.d.ts +4 -2
- package/dist/session.js +4 -2
- package/dist/session.js.map +1 -1
- package/dist/types/registry.d.ts +1 -1
- package/dist/types/registry.js +1 -1
- package/dist/types/sign-event.d.ts +1 -1
- package/dist/types/sign-event.js +1 -1
- package/package.json +1 -1
package/dist/identity.d.ts
CHANGED
|
@@ -1,35 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* zCloak.ai Identity Management Module
|
|
3
3
|
*
|
|
4
|
-
* Loads ECDSA secp256k1 identity from
|
|
5
|
-
* Replaces the original `dfx identity get-principal` and similar commands.
|
|
4
|
+
* Loads ECDSA secp256k1 identity from a zCloak-managed PEM file for signing operations.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* The CLI uses a dedicated default path under ~/.config/zcloak/ai-id.pem rather than
|
|
7
|
+
* reusing dfx's default identity location. This keeps the agent identity stable and
|
|
8
|
+
* separate from any existing dfx identity the user may already have.
|
|
9
9
|
*
|
|
10
10
|
* PEM file location priority:
|
|
11
11
|
* 1. --identity=<path> command line argument
|
|
12
|
-
* 2.
|
|
13
|
-
* 3. ~/.config/dfx/identity/default/identity.pem (dfx default location)
|
|
12
|
+
* 2. ~/.config/zcloak/ai-id.pem (zCloak default location, auto-created if missing)
|
|
14
13
|
*/
|
|
15
14
|
import { Secp256k1KeyIdentity } from '@dfinity/identity-secp256k1';
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
18
|
-
* Unified for macOS and Linux: ~/.config/
|
|
16
|
+
* zCloak default identity PEM file path
|
|
17
|
+
* Unified for macOS and Linux: ~/.config/zcloak/ai-id.pem
|
|
19
18
|
*/
|
|
20
19
|
export declare const DEFAULT_PEM_PATH: string;
|
|
20
|
+
/**
|
|
21
|
+
* Expand CLI paths like ~/foo.pem to an absolute path.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveCliPath(rawPath: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Ensure a PEM file exists at the requested path.
|
|
26
|
+
* If the file already exists, validate and reuse it unless force=true.
|
|
27
|
+
* If the file does not exist, create parent directories and generate a new key.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ensureIdentityFile(pemPath: string, options?: {
|
|
30
|
+
force?: boolean;
|
|
31
|
+
}): {
|
|
32
|
+
path: string;
|
|
33
|
+
created: boolean;
|
|
34
|
+
};
|
|
21
35
|
/**
|
|
22
36
|
* Get PEM file path.
|
|
23
|
-
* Searches by priority: --identity argument >
|
|
37
|
+
* Searches by priority: --identity argument > zCloak default location.
|
|
38
|
+
* The zCloak default location is created automatically on first use.
|
|
24
39
|
*
|
|
25
40
|
* When called with an explicit argv array, uses that instead of process.argv.
|
|
26
41
|
* This enables deterministic, testable behavior without global state dependency.
|
|
27
42
|
*
|
|
28
|
-
|
|
43
|
+
* @param argv - Optional explicit argument array (defaults to process.argv)
|
|
44
|
+
* @param defaultPemPath - Override for tests
|
|
29
45
|
* @returns Absolute path to PEM file
|
|
30
|
-
* @throws {Error} If
|
|
46
|
+
* @throws {Error} If an explicitly specified path does not exist
|
|
31
47
|
*/
|
|
32
|
-
export declare function getPemPath(argv?: string[]): string;
|
|
48
|
+
export declare function getPemPath(argv?: string[], defaultPemPath?: string): string;
|
|
33
49
|
/**
|
|
34
50
|
* Load an ECDSA secp256k1 identity directly from a given PEM file path.
|
|
35
51
|
*
|
package/dist/identity.js
CHANGED
|
@@ -1,66 +1,100 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* zCloak.ai Identity Management Module
|
|
3
3
|
*
|
|
4
|
-
* Loads ECDSA secp256k1 identity from
|
|
5
|
-
* Replaces the original `dfx identity get-principal` and similar commands.
|
|
4
|
+
* Loads ECDSA secp256k1 identity from a zCloak-managed PEM file for signing operations.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* The CLI uses a dedicated default path under ~/.config/zcloak/ai-id.pem rather than
|
|
7
|
+
* reusing dfx's default identity location. This keeps the agent identity stable and
|
|
8
|
+
* separate from any existing dfx identity the user may already have.
|
|
9
9
|
*
|
|
10
10
|
* PEM file location priority:
|
|
11
11
|
* 1. --identity=<path> command line argument
|
|
12
|
-
* 2.
|
|
13
|
-
* 3. ~/.config/dfx/identity/default/identity.pem (dfx default location)
|
|
12
|
+
* 2. ~/.config/zcloak/ai-id.pem (zCloak default location, auto-created if missing)
|
|
14
13
|
*/
|
|
15
14
|
import fs from 'fs';
|
|
16
15
|
import path from 'path';
|
|
17
16
|
import os from 'os';
|
|
17
|
+
import { generateKeyPairSync } from 'crypto';
|
|
18
18
|
import { Secp256k1KeyIdentity } from '@dfinity/identity-secp256k1';
|
|
19
19
|
// ========== PEM File Lookup ==========
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* Unified for macOS and Linux: ~/.config/
|
|
21
|
+
* zCloak default identity PEM file path
|
|
22
|
+
* Unified for macOS and Linux: ~/.config/zcloak/ai-id.pem
|
|
23
23
|
*/
|
|
24
|
-
export const DEFAULT_PEM_PATH = path.join(os.homedir(), '.config', '
|
|
24
|
+
export const DEFAULT_PEM_PATH = path.join(os.homedir(), '.config', 'zcloak', 'ai-id.pem');
|
|
25
|
+
/**
|
|
26
|
+
* Expand CLI paths like ~/foo.pem to an absolute path.
|
|
27
|
+
*/
|
|
28
|
+
export function resolveCliPath(rawPath) {
|
|
29
|
+
if (rawPath === '~') {
|
|
30
|
+
return os.homedir();
|
|
31
|
+
}
|
|
32
|
+
if (rawPath.startsWith(`~${path.sep}`)) {
|
|
33
|
+
return path.join(os.homedir(), rawPath.slice(2));
|
|
34
|
+
}
|
|
35
|
+
if (rawPath.startsWith('~/')) {
|
|
36
|
+
return path.join(os.homedir(), rawPath.slice(2));
|
|
37
|
+
}
|
|
38
|
+
return path.resolve(rawPath);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Ensure a PEM file exists at the requested path.
|
|
42
|
+
* If the file already exists, validate and reuse it unless force=true.
|
|
43
|
+
* If the file does not exist, create parent directories and generate a new key.
|
|
44
|
+
*/
|
|
45
|
+
export function ensureIdentityFile(pemPath, options) {
|
|
46
|
+
const resolved = resolveCliPath(pemPath);
|
|
47
|
+
const force = !!options?.force;
|
|
48
|
+
if (fs.existsSync(resolved) && !force) {
|
|
49
|
+
try {
|
|
50
|
+
loadIdentityFromPath(resolved);
|
|
51
|
+
return { path: resolved, created: false };
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
throw new Error(`Identity file exists but is not a valid PEM: ${resolved}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const dir = path.dirname(resolved);
|
|
58
|
+
if (!fs.existsSync(dir)) {
|
|
59
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
60
|
+
}
|
|
61
|
+
const { privateKey } = generateKeyPairSync('ec', { namedCurve: 'secp256k1' });
|
|
62
|
+
const pem = privateKey.export({ type: 'sec1', format: 'pem' });
|
|
63
|
+
fs.writeFileSync(resolved, pem, { mode: 0o600 });
|
|
64
|
+
return { path: resolved, created: true };
|
|
65
|
+
}
|
|
25
66
|
/**
|
|
26
67
|
* Get PEM file path.
|
|
27
|
-
* Searches by priority: --identity argument >
|
|
68
|
+
* Searches by priority: --identity argument > zCloak default location.
|
|
69
|
+
* The zCloak default location is created automatically on first use.
|
|
28
70
|
*
|
|
29
71
|
* When called with an explicit argv array, uses that instead of process.argv.
|
|
30
72
|
* This enables deterministic, testable behavior without global state dependency.
|
|
31
73
|
*
|
|
32
|
-
|
|
74
|
+
* @param argv - Optional explicit argument array (defaults to process.argv)
|
|
75
|
+
* @param defaultPemPath - Override for tests
|
|
33
76
|
* @returns Absolute path to PEM file
|
|
34
|
-
* @throws {Error} If
|
|
77
|
+
* @throws {Error} If an explicitly specified path does not exist
|
|
35
78
|
*/
|
|
36
|
-
export function getPemPath(argv) {
|
|
79
|
+
export function getPemPath(argv, defaultPemPath = DEFAULT_PEM_PATH) {
|
|
37
80
|
const effectiveArgv = argv ?? process.argv;
|
|
81
|
+
const resolvedDefault = resolveCliPath(defaultPemPath);
|
|
38
82
|
// 1. Get from --identity=<path> argument
|
|
39
83
|
const identityArg = effectiveArgv.find(a => a.startsWith('--identity='));
|
|
40
84
|
if (identityArg) {
|
|
41
85
|
const p = identityArg.split('=').slice(1).join('='); // Support paths containing =
|
|
42
|
-
const resolved =
|
|
86
|
+
const resolved = resolveCliPath(p);
|
|
43
87
|
if (!fs.existsSync(resolved)) {
|
|
88
|
+
if (resolved === resolvedDefault) {
|
|
89
|
+
ensureIdentityFile(resolvedDefault);
|
|
90
|
+
return resolvedDefault;
|
|
91
|
+
}
|
|
44
92
|
throw new Error(`Specified PEM file does not exist: ${resolved}`);
|
|
45
93
|
}
|
|
46
94
|
return resolved;
|
|
47
95
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const resolved = path.resolve(process.env.ZCLOAK_IDENTITY);
|
|
51
|
-
if (!fs.existsSync(resolved)) {
|
|
52
|
-
throw new Error(`PEM file specified by ZCLOAK_IDENTITY does not exist: ${resolved}`);
|
|
53
|
-
}
|
|
54
|
-
return resolved;
|
|
55
|
-
}
|
|
56
|
-
// 3. Use dfx default location
|
|
57
|
-
if (fs.existsSync(DEFAULT_PEM_PATH)) {
|
|
58
|
-
return DEFAULT_PEM_PATH;
|
|
59
|
-
}
|
|
60
|
-
throw new Error('Identity PEM file not found. Provide one via:\n' +
|
|
61
|
-
' 1. --identity=<pem_file_path>\n' +
|
|
62
|
-
' 2. Set environment variable ZCLOAK_IDENTITY=<pem_file_path>\n' +
|
|
63
|
-
` 3. Ensure dfx default identity exists: ${DEFAULT_PEM_PATH}`);
|
|
96
|
+
ensureIdentityFile(resolvedDefault);
|
|
97
|
+
return resolvedDefault;
|
|
64
98
|
}
|
|
65
99
|
// ========== Identity Management ==========
|
|
66
100
|
/**
|
package/dist/identity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGnE,wCAAwC;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAW,IAAI,CAAC,IAAI,CAC/C,EAAE,CAAC,OAAO,EAAE,EACZ,SAAS,EAAE,QAAQ,EAAE,WAAW,CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IACD,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAA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CACb,gDAAgD,OAAO,KAAM,GAAa,CAAC,OAAO,EAAE,CACrF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/identity_cmd.d.ts
CHANGED
|
@@ -3,18 +3,17 @@
|
|
|
3
3
|
* zCloak.ai Identity Key Management Script
|
|
4
4
|
*
|
|
5
5
|
* Generates and inspects ECDSA secp256k1 identity PEM files without requiring dfx.
|
|
6
|
-
* Uses
|
|
6
|
+
* Uses a dedicated zCloak identity path by default: ~/.config/zcloak/ai-id.pem.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* regenerate a new key (the old key will be permanently lost).
|
|
8
|
+
* By default the CLI keeps using the same agent identity at the zCloak-managed path.
|
|
9
|
+
* If the default file does not exist, it is created automatically and then reused
|
|
10
|
+
* on subsequent commands.
|
|
12
11
|
*
|
|
13
12
|
* Usage:
|
|
14
|
-
* zcloak-ai identity generate [--output=<path>] [--force]
|
|
13
|
+
* zcloak-ai identity generate [--output=<path>] [--identity=<path>] [--force]
|
|
15
14
|
* If a PEM file already exists at the target path, read and reuse it.
|
|
16
15
|
* Only generates a new key when no existing file is found.
|
|
17
|
-
* Default output: ~/.config/
|
|
16
|
+
* Default output: ~/.config/zcloak/ai-id.pem
|
|
18
17
|
* Use --force to overwrite an existing file with a brand-new key.
|
|
19
18
|
*
|
|
20
19
|
* zcloak-ai identity show
|
package/dist/identity_cmd.js
CHANGED
|
@@ -3,45 +3,41 @@
|
|
|
3
3
|
* zCloak.ai Identity Key Management Script
|
|
4
4
|
*
|
|
5
5
|
* Generates and inspects ECDSA secp256k1 identity PEM files without requiring dfx.
|
|
6
|
-
* Uses
|
|
6
|
+
* Uses a dedicated zCloak identity path by default: ~/.config/zcloak/ai-id.pem.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* regenerate a new key (the old key will be permanently lost).
|
|
8
|
+
* By default the CLI keeps using the same agent identity at the zCloak-managed path.
|
|
9
|
+
* If the default file does not exist, it is created automatically and then reused
|
|
10
|
+
* on subsequent commands.
|
|
12
11
|
*
|
|
13
12
|
* Usage:
|
|
14
|
-
* zcloak-ai identity generate [--output=<path>] [--force]
|
|
13
|
+
* zcloak-ai identity generate [--output=<path>] [--identity=<path>] [--force]
|
|
15
14
|
* If a PEM file already exists at the target path, read and reuse it.
|
|
16
15
|
* Only generates a new key when no existing file is found.
|
|
17
|
-
* Default output: ~/.config/
|
|
16
|
+
* Default output: ~/.config/zcloak/ai-id.pem
|
|
18
17
|
* Use --force to overwrite an existing file with a brand-new key.
|
|
19
18
|
*
|
|
20
19
|
* zcloak-ai identity show
|
|
21
20
|
* Print the PEM path and principal ID of the current identity.
|
|
22
21
|
*/
|
|
23
|
-
import
|
|
24
|
-
import path from 'path';
|
|
25
|
-
import { generateKeyPairSync } from 'crypto';
|
|
26
|
-
import { DEFAULT_PEM_PATH, loadIdentityFromPath } from './identity.js';
|
|
22
|
+
import { DEFAULT_PEM_PATH, ensureIdentityFile, loadIdentityFromPath, resolveCliPath } from './identity.js';
|
|
27
23
|
// ========== Help ==========
|
|
28
24
|
function showHelp() {
|
|
29
25
|
console.log('zCloak.ai Identity Key Management');
|
|
30
26
|
console.log('');
|
|
31
27
|
console.log('Usage:');
|
|
32
|
-
console.log(' zcloak-ai identity generate [--output=<path>] [--force]');
|
|
28
|
+
console.log(' zcloak-ai identity generate [--output=<path>] [--identity=<path>] [--force]');
|
|
33
29
|
console.log(' Ensure an ECDSA secp256k1 PEM key exists (no dfx required).');
|
|
34
|
-
console.log(' If a PEM file already exists, reuse it
|
|
35
|
-
console.log('
|
|
36
|
-
console.log(' Default path: ~/.config/
|
|
30
|
+
console.log(' If a PEM file already exists, reuse it.');
|
|
31
|
+
console.log(' If the default zCloak identity does not exist yet, create it automatically.');
|
|
32
|
+
console.log(' Default path: ~/.config/zcloak/ai-id.pem');
|
|
37
33
|
console.log('');
|
|
38
34
|
console.log(' zcloak-ai identity show');
|
|
39
35
|
console.log(' Print PEM file path and principal ID of the current identity');
|
|
40
36
|
console.log('');
|
|
41
37
|
console.log('Options:');
|
|
42
38
|
console.log(' --output=<path> Custom output path for the PEM file');
|
|
39
|
+
console.log(' --identity=<path> Generate to or show from a specific identity PEM path');
|
|
43
40
|
console.log(' --force Force regenerate a NEW key (overwrites existing!)');
|
|
44
|
-
console.log(' --identity=<path> Use a specific identity PEM (for "show" command)');
|
|
45
41
|
console.log('');
|
|
46
42
|
console.log('Examples:');
|
|
47
43
|
console.log(' zcloak-ai identity generate');
|
|
@@ -66,45 +62,25 @@ function showHelp() {
|
|
|
66
62
|
* loadable by Secp256k1KeyIdentity.fromPem().
|
|
67
63
|
*/
|
|
68
64
|
function cmdGenerate(args) {
|
|
69
|
-
// Determine output path: --output flag or
|
|
70
|
-
const outputRaw = args['output']
|
|
65
|
+
// Determine output path: --output flag or zCloak default
|
|
66
|
+
const outputRaw = typeof args['output'] === 'string'
|
|
67
|
+
? args['output']
|
|
68
|
+
: typeof args['identity'] === 'string'
|
|
69
|
+
? args['identity']
|
|
70
|
+
: undefined;
|
|
71
71
|
const outputPath = typeof outputRaw === 'string'
|
|
72
|
-
?
|
|
72
|
+
? resolveCliPath(outputRaw)
|
|
73
73
|
: DEFAULT_PEM_PATH;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
const identity = loadIdentityFromPath(outputPath);
|
|
81
|
-
console.log(`Existing identity found, reusing: ${outputPath}`);
|
|
82
|
-
console.log(`Principal ID: ${identity.getPrincipal().toText()}`);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
catch {
|
|
86
|
-
// The existing file is corrupt or not a valid PEM — warn the user and
|
|
87
|
-
// refuse to silently overwrite it. They must use --force intentionally.
|
|
88
|
-
console.error(`Error: file exists but is not a valid PEM: ${outputPath}`);
|
|
89
|
-
console.error('Use --force to overwrite with a new key.');
|
|
90
|
-
process.exit(1);
|
|
91
|
-
}
|
|
74
|
+
const { path: ensuredPath, created } = ensureIdentityFile(outputPath, {
|
|
75
|
+
force: !!args['force'],
|
|
76
|
+
});
|
|
77
|
+
const identity = loadIdentityFromPath(ensuredPath);
|
|
78
|
+
if (created) {
|
|
79
|
+
console.log(`Identity PEM generated: ${ensuredPath}`);
|
|
92
80
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (!fs.existsSync(dir)) {
|
|
96
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
81
|
+
else {
|
|
82
|
+
console.log(`Existing identity found, reusing: ${ensuredPath}`);
|
|
97
83
|
}
|
|
98
|
-
// Generate EC key pair and export as SEC1 PEM (same format as dfx)
|
|
99
|
-
const { privateKey } = generateKeyPairSync('ec', { namedCurve: 'secp256k1' });
|
|
100
|
-
const pem = privateKey.export({ type: 'sec1', format: 'pem' });
|
|
101
|
-
// Write with owner-only permissions (0600), matching how dfx stores identity files
|
|
102
|
-
fs.writeFileSync(outputPath, pem, { mode: 0o600 });
|
|
103
|
-
console.log(`Identity PEM generated: ${outputPath}`);
|
|
104
|
-
// Derive and display the Principal from the newly written file so the user
|
|
105
|
-
// can verify immediately. We use loadIdentityFromPath() to bypass the global
|
|
106
|
-
// argv / cache lookup — no process.argv mutation needed.
|
|
107
|
-
const identity = loadIdentityFromPath(outputPath);
|
|
108
84
|
console.log(`Principal ID: ${identity.getPrincipal().toText()}`);
|
|
109
85
|
}
|
|
110
86
|
/**
|
package/dist/identity_cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity_cmd.js","sourceRoot":"","sources":["../src/identity_cmd.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"identity_cmd.js","sourceRoot":"","sources":["../src/identity_cmd.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,cAAc,E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CAAC,CAAC;AAC5C,CAAC;AAED,0DAA0D;AAE1D;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,OAAgB;IAClC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE1B,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC7C,QAAQ,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,CAAC;QACH,QAAQ,GAAG,EAAE,CAAC;YACZ,KAAK,UAAU;gBACb,WAAW,CAAC,IAAI,CAAC,CAAC;gBAClB,MAAM;YACR,KAAK,MAAM;gBACT,OAAO,CAAC,OAAO,CAAC,CAAC;gBACjB,MAAM;YACR;gBACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC;gBACzC,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;gBACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,qBAAqB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/session.d.ts
CHANGED
|
@@ -57,14 +57,16 @@ export declare class Session {
|
|
|
57
57
|
/**
|
|
58
58
|
* Get the resolved PEM file path for this session.
|
|
59
59
|
* Uses the same resolution priority as getIdentity():
|
|
60
|
-
* --identity=<path> >
|
|
60
|
+
* --identity=<path> > ~/.config/zcloak/ai-id.pem
|
|
61
|
+
*
|
|
62
|
+
* The default zCloak identity is created automatically on first use.
|
|
61
63
|
*/
|
|
62
64
|
getPemPath(): string;
|
|
63
65
|
/**
|
|
64
66
|
* Get the ECDSA secp256k1 identity for this session.
|
|
65
67
|
* Loaded from PEM file on first call, then cached.
|
|
66
68
|
*
|
|
67
|
-
* PEM path resolution: --identity=<path> >
|
|
69
|
+
* PEM path resolution: --identity=<path> > ~/.config/zcloak/ai-id.pem
|
|
68
70
|
*/
|
|
69
71
|
getIdentity(): Secp256k1KeyIdentity;
|
|
70
72
|
/** Get the current identity's Principal ID as text */
|
package/dist/session.js
CHANGED
|
@@ -58,7 +58,9 @@ export class Session {
|
|
|
58
58
|
/**
|
|
59
59
|
* Get the resolved PEM file path for this session.
|
|
60
60
|
* Uses the same resolution priority as getIdentity():
|
|
61
|
-
* --identity=<path> >
|
|
61
|
+
* --identity=<path> > ~/.config/zcloak/ai-id.pem
|
|
62
|
+
*
|
|
63
|
+
* The default zCloak identity is created automatically on first use.
|
|
62
64
|
*/
|
|
63
65
|
getPemPath() {
|
|
64
66
|
return getPemPath(this._argv);
|
|
@@ -67,7 +69,7 @@ export class Session {
|
|
|
67
69
|
* Get the ECDSA secp256k1 identity for this session.
|
|
68
70
|
* Loaded from PEM file on first call, then cached.
|
|
69
71
|
*
|
|
70
|
-
* PEM path resolution: --identity=<path> >
|
|
72
|
+
* PEM path resolution: --identity=<path> > ~/.config/zcloak/ai-id.pem
|
|
71
73
|
*/
|
|
72
74
|
getIdentity() {
|
|
73
75
|
if (!this._identity) {
|
package/dist/session.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAsB,MAAM,gBAAgB,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE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
|
5
5
|
* Source: registryIdlFactory in src/idl.ts
|
|
6
|
-
* Generated: 2026-03-
|
|
6
|
+
* Generated: 2026-03-07T04:58:47.403Z
|
|
7
7
|
*
|
|
8
8
|
* These types are derived from the Candid IDL definitions and correspond to
|
|
9
9
|
* the canister's runtime interface. Edit idl.ts to change type definitions.
|
package/dist/types/registry.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Run `npm run generate-types` to regenerate this file.
|
|
5
5
|
* Source: registryIdlFactory in src/idl.ts
|
|
6
|
-
* Generated: 2026-03-
|
|
6
|
+
* Generated: 2026-03-07T04:58:47.403Z
|
|
7
7
|
*
|
|
8
8
|
* These types are derived from the Candid IDL definitions and correspond to
|
|
9
9
|
* the canister's runtime interface. Edit idl.ts to change type definitions.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Run `npm run generate-types` to regenerate this file.
|
|
5
5
|
* Source: signIdlFactory in src/idl.ts
|
|
6
|
-
* Generated: 2026-03-
|
|
6
|
+
* Generated: 2026-03-07T04:58:47.402Z
|
|
7
7
|
*
|
|
8
8
|
* These types are derived from the Candid IDL definitions and correspond to
|
|
9
9
|
* the canister's runtime interface. Edit idl.ts to change type definitions.
|
package/dist/types/sign-event.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Run `npm run generate-types` to regenerate this file.
|
|
5
5
|
* Source: signIdlFactory in src/idl.ts
|
|
6
|
-
* Generated: 2026-03-
|
|
6
|
+
* Generated: 2026-03-07T04:58:47.402Z
|
|
7
7
|
*
|
|
8
8
|
* These types are derived from the Candid IDL definitions and correspond to
|
|
9
9
|
* the canister's runtime interface. Edit idl.ts to change type definitions.
|