@namzu/cli 16.0.0 → 17.0.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 +34 -6
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +43 -8
- package/dist/cli.js.map +1 -1
- package/dist/commands/drain.d.ts.map +1 -1
- package/dist/commands/drain.js +23 -1
- package/dist/commands/drain.js.map +1 -1
- package/dist/commands/run-stream.d.ts +3 -2
- package/dist/commands/run-stream.d.ts.map +1 -1
- package/dist/commands/run-stream.js +32 -37
- package/dist/commands/run-stream.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +26 -24
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/state.d.ts +9 -0
- package/dist/commands/state.d.ts.map +1 -0
- package/dist/commands/state.js +110 -0
- package/dist/commands/state.js.map +1 -0
- package/dist/config/load.d.ts +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +3 -4
- package/dist/config/load.js.map +1 -1
- package/dist/doctor/checks/chain.d.ts +1 -1
- package/dist/doctor/checks/chain.d.ts.map +1 -1
- package/dist/doctor/checks/chain.js +2 -4
- package/dist/doctor/checks/chain.js.map +1 -1
- package/dist/integrations/files/attachment-store.d.ts.map +1 -1
- package/dist/integrations/files/attachment-store.js +3 -3
- package/dist/integrations/files/attachment-store.js.map +1 -1
- package/dist/integrations/plugins/runtime.d.ts.map +1 -1
- package/dist/integrations/plugins/runtime.js +4 -2
- package/dist/integrations/plugins/runtime.js.map +1 -1
- package/dist/integrations/providers/credential-store.d.ts.map +1 -1
- package/dist/integrations/providers/credential-store.js +13 -12
- package/dist/integrations/providers/credential-store.js.map +1 -1
- package/dist/integrations/providers/preferences.d.ts.map +1 -1
- package/dist/integrations/providers/preferences.js +5 -5
- package/dist/integrations/providers/preferences.js.map +1 -1
- package/dist/integrations/sessions/store.d.ts +31 -9
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/store.js +308 -63
- package/dist/integrations/sessions/store.js.map +1 -1
- package/dist/integrations/state/home.d.ts +25 -0
- package/dist/integrations/state/home.d.ts.map +1 -0
- package/dist/integrations/state/home.js +53 -0
- package/dist/integrations/state/home.js.map +1 -0
- package/dist/integrations/state/private-directory.d.ts +15 -0
- package/dist/integrations/state/private-directory.d.ts.map +1 -0
- package/dist/integrations/state/private-directory.js +41 -0
- package/dist/integrations/state/private-directory.js.map +1 -0
- package/dist/integrations/state/report.d.ts +129 -0
- package/dist/integrations/state/report.d.ts.map +1 -0
- package/dist/integrations/state/report.js +831 -0
- package/dist/integrations/state/report.js.map +1 -0
- package/dist/integrations/subagents/activity.d.ts +18 -0
- package/dist/integrations/subagents/activity.d.ts.map +1 -1
- package/dist/integrations/subagents/activity.js +64 -7
- package/dist/integrations/subagents/activity.js.map +1 -1
- package/dist/integrations/subagents/runtime.d.ts +3 -1
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.js +46 -7
- package/dist/integrations/subagents/runtime.js.map +1 -1
- package/dist/integrations/trust/store.d.ts.map +1 -1
- package/dist/integrations/trust/store.js +6 -6
- package/dist/integrations/trust/store.js.map +1 -1
- package/dist/memory/store.d.ts.map +1 -1
- package/dist/memory/store.js +7 -7
- package/dist/memory/store.js.map +1 -1
- package/dist/skills/store.d.ts +2 -1
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/store.js +11 -4
- package/dist/skills/store.js.map +1 -1
- package/dist/tui/AgentExplorer.d.ts +26 -5
- package/dist/tui/AgentExplorer.d.ts.map +1 -1
- package/dist/tui/AgentExplorer.js +125 -14
- package/dist/tui/AgentExplorer.js.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +263 -96
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/agent.d.ts +10 -2
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +87 -21
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/slashCommands.d.ts +1 -1
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +2 -2
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/user-commands/store.d.ts.map +1 -1
- package/dist/user-commands/store.js +29 -7
- package/dist/user-commands/store.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { lstatSync, realpathSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { parse, resolve } from 'node:path';
|
|
4
|
+
export class NamzuHomeError extends Error {
|
|
5
|
+
name = 'NamzuHomeError';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the user-level Namzu application home without creating it.
|
|
9
|
+
*
|
|
10
|
+
* `NAMZU_HOME` is an explicit operator assertion, so it is validated more
|
|
11
|
+
* strictly than the default: it must already be a real directory and its
|
|
12
|
+
* canonical identity is returned. The default remains creatable on first use.
|
|
13
|
+
*/
|
|
14
|
+
export function resolveNamzuHome(options = {}) {
|
|
15
|
+
const env = options.env ?? process.env;
|
|
16
|
+
const configured = env.NAMZU_HOME;
|
|
17
|
+
if (configured === undefined || configured.length === 0) {
|
|
18
|
+
return resolve(options.home ?? homedir(), '.namzu');
|
|
19
|
+
}
|
|
20
|
+
if (configured.includes('\0')) {
|
|
21
|
+
throw new NamzuHomeError('NAMZU_HOME contains a NUL byte and cannot name a directory.');
|
|
22
|
+
}
|
|
23
|
+
let entry;
|
|
24
|
+
try {
|
|
25
|
+
entry = lstatSync(configured);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
throw new NamzuHomeError(`NAMZU_HOME points to ${JSON.stringify(configured)}, but that path cannot be read: ${error instanceof Error ? error.message : String(error)}`);
|
|
29
|
+
}
|
|
30
|
+
if (entry.isSymbolicLink() || !entry.isDirectory()) {
|
|
31
|
+
throw new NamzuHomeError(`NAMZU_HOME points to ${JSON.stringify(configured)}, but it is not a real directory.`);
|
|
32
|
+
}
|
|
33
|
+
let canonical;
|
|
34
|
+
try {
|
|
35
|
+
canonical = realpathSync(configured);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
throw new NamzuHomeError(`NAMZU_HOME ${JSON.stringify(configured)} could not be canonicalized: ${error instanceof Error ? error.message : String(error)}`);
|
|
39
|
+
}
|
|
40
|
+
if (canonical === parse(canonical).root) {
|
|
41
|
+
throw new NamzuHomeError(`NAMZU_HOME must not be a filesystem root: ${JSON.stringify(canonical)}. Choose a dedicated directory.`);
|
|
42
|
+
}
|
|
43
|
+
return canonical;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Compatibility helper for APIs whose existing `home` argument means the OS
|
|
47
|
+
* home, not the application directory. An explicit argument remains the test
|
|
48
|
+
* seam it has always been; production defaults honor `NAMZU_HOME`.
|
|
49
|
+
*/
|
|
50
|
+
export function namzuHomePath(home) {
|
|
51
|
+
return home === undefined ? resolveNamzuHome() : resolve(home, '.namzu');
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/integrations/state/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAU1C,MAAM,OAAO,cAAe,SAAQ,KAAK;IACtB,IAAI,GAAG,gBAAgB,CAAA;CACzC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAmC,EAAE;IACrE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAA;IACtC,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,CAAA;IACjC,IAAI,UAAU,KAAK,SAAS,IAAI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vB,6CAA6C,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,iCAAiC,CACvG,CAAA;IACF,CAAC;IACD,OAAO,SAAS,CAAA;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAAa;IAC1C,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AACzE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create one generated-state partition without changing authored `.namzu`
|
|
3
|
+
* content such as project commands and plugins.
|
|
4
|
+
*
|
|
5
|
+
* The partition is the privacy boundary: store files may inherit portable
|
|
6
|
+
* defaults, but an owner-only parent keeps transcripts, generated memory and
|
|
7
|
+
* task state private to the account running Namzu. Existing directories are
|
|
8
|
+
* tightened too; otherwise upgrading would protect only newly-created repos.
|
|
9
|
+
*
|
|
10
|
+
* Symlinks are refused before chmod. Following a project-controlled
|
|
11
|
+
* `.namzu/memory` link would both write state outside the project and chmod a
|
|
12
|
+
* directory the caller did not name.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ensurePrivateStateDirectory(stateRoot: string, segment: string): string;
|
|
15
|
+
//# sourceMappingURL=private-directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-directory.d.ts","sourceRoot":"","sources":["../../../src/integrations/state/private-directory.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAsBtF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { chmodSync, lstatSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { restrictToOwner } from '../providers/credential-store.js';
|
|
4
|
+
const PRIVATE_DIRECTORY_MODE = 0o700;
|
|
5
|
+
/**
|
|
6
|
+
* Create one generated-state partition without changing authored `.namzu`
|
|
7
|
+
* content such as project commands and plugins.
|
|
8
|
+
*
|
|
9
|
+
* The partition is the privacy boundary: store files may inherit portable
|
|
10
|
+
* defaults, but an owner-only parent keeps transcripts, generated memory and
|
|
11
|
+
* task state private to the account running Namzu. Existing directories are
|
|
12
|
+
* tightened too; otherwise upgrading would protect only newly-created repos.
|
|
13
|
+
*
|
|
14
|
+
* Symlinks are refused before chmod. Following a project-controlled
|
|
15
|
+
* `.namzu/memory` link would both write state outside the project and chmod a
|
|
16
|
+
* directory the caller did not name.
|
|
17
|
+
*/
|
|
18
|
+
export function ensurePrivateStateDirectory(stateRoot, segment) {
|
|
19
|
+
if (!/^[A-Za-z0-9_-]+$/u.test(segment)) {
|
|
20
|
+
throw new Error(`Namzu state partition must be one safe path segment: ${segment}`);
|
|
21
|
+
}
|
|
22
|
+
mkdirSync(stateRoot, { recursive: true });
|
|
23
|
+
const rootEntry = lstatSync(stateRoot);
|
|
24
|
+
if (rootEntry.isSymbolicLink() || !rootEntry.isDirectory()) {
|
|
25
|
+
throw new Error(`Namzu state root must be a real directory: ${stateRoot}`);
|
|
26
|
+
}
|
|
27
|
+
const path = join(stateRoot, segment);
|
|
28
|
+
mkdirSync(path, { recursive: true, mode: PRIVATE_DIRECTORY_MODE });
|
|
29
|
+
const entry = lstatSync(path);
|
|
30
|
+
if (entry.isSymbolicLink() || !entry.isDirectory()) {
|
|
31
|
+
throw new Error(`Namzu state partition must be a real directory: ${path}`);
|
|
32
|
+
}
|
|
33
|
+
if (process.platform !== 'win32')
|
|
34
|
+
chmodSync(path, PRIVATE_DIRECTORY_MODE);
|
|
35
|
+
// POSIX reads back the tightened mode; Windows replaces inheritance with a
|
|
36
|
+
// single current-user ACL and reads that descriptor back. A mode-only branch
|
|
37
|
+
// on Windows would prove nothing because chmod controls only read-only there.
|
|
38
|
+
restrictToOwner(path);
|
|
39
|
+
return path;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=private-directory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-directory.js","sourceRoot":"","sources":["../../../src/integrations/state/private-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAElE,MAAM,sBAAsB,GAAG,KAAK,CAAA;AAEpC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,2BAA2B,CAAC,SAAiB,EAAE,OAAe;IAC7E,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,wDAAwD,OAAO,EAAE,CAAC,CAAA;IACnF,CAAC;IACD,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACzC,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAA;IACtC,IAAI,SAAS,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;QAC5D,MAAM,IAAI,KAAK,CAAC,8CAA8C,SAAS,EAAE,CAAC,CAAA;IAC3E,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACrC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC,CAAA;IAClE,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;IAC7B,IAAI,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,mDAAmD,IAAI,EAAE,CAAC,CAAA;IAC3E,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAAE,SAAS,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAA;IACzE,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,eAAe,CAAC,IAAI,CAAC,CAAA;IACrB,OAAO,IAAI,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export type StateCategory = 'authored' | 'configuration' | 'runtime' | 'control' | 'transient' | 'unknown';
|
|
2
|
+
export interface StateMeasure {
|
|
3
|
+
readonly files: number;
|
|
4
|
+
readonly logicalBytes: number;
|
|
5
|
+
}
|
|
6
|
+
export interface StateIssue {
|
|
7
|
+
readonly code: 'corrupt_metadata' | 'entry_changed' | 'inspection_skipped' | 'owner_mismatch' | 'permission_denied' | 'symlink_not_followed' | 'unsupported_entry' | 'unreadable';
|
|
8
|
+
readonly path: string;
|
|
9
|
+
readonly detail: string;
|
|
10
|
+
}
|
|
11
|
+
export interface StatePrivacyBoundary {
|
|
12
|
+
readonly path: string;
|
|
13
|
+
readonly status: 'secure' | 'insecure' | 'unknown';
|
|
14
|
+
readonly detail: string;
|
|
15
|
+
}
|
|
16
|
+
export interface StateInventory {
|
|
17
|
+
readonly sessions: StateMeasure & {
|
|
18
|
+
readonly directories: number;
|
|
19
|
+
readonly invalidOrMissingRecords: number;
|
|
20
|
+
};
|
|
21
|
+
readonly originOnlySessionCandidates: StateMeasure & {
|
|
22
|
+
readonly complete: boolean;
|
|
23
|
+
readonly limitation: string;
|
|
24
|
+
};
|
|
25
|
+
readonly runs: StateMeasure & {
|
|
26
|
+
readonly directories: number;
|
|
27
|
+
readonly invalidOrMissingRecords: number;
|
|
28
|
+
};
|
|
29
|
+
readonly checkpointFiles: StateMeasure;
|
|
30
|
+
readonly emergencyDumpFiles: StateMeasure;
|
|
31
|
+
readonly attachments: StateMeasure & {
|
|
32
|
+
readonly pairs: number;
|
|
33
|
+
readonly orphanedDataFiles: number;
|
|
34
|
+
readonly orphanedTypeFiles: number;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export type ProjectBinding = {
|
|
38
|
+
readonly status: 'uninitialized';
|
|
39
|
+
readonly detail: string;
|
|
40
|
+
} | {
|
|
41
|
+
readonly status: 'missing-pointer';
|
|
42
|
+
readonly detail: string;
|
|
43
|
+
} | {
|
|
44
|
+
readonly status: 'invalid-pointer';
|
|
45
|
+
readonly detail: string;
|
|
46
|
+
} | {
|
|
47
|
+
readonly status: 'missing-project';
|
|
48
|
+
readonly projectId: string;
|
|
49
|
+
readonly detail: string;
|
|
50
|
+
} | {
|
|
51
|
+
readonly status: 'corrupt-project';
|
|
52
|
+
readonly projectId: string;
|
|
53
|
+
readonly detail: string;
|
|
54
|
+
} | {
|
|
55
|
+
readonly status: 'legacy-unbound';
|
|
56
|
+
readonly projectId: string;
|
|
57
|
+
readonly detail: string;
|
|
58
|
+
} | {
|
|
59
|
+
readonly status: 'root-mismatch';
|
|
60
|
+
readonly projectId: string;
|
|
61
|
+
readonly recordedRoot: string;
|
|
62
|
+
readonly detail: string;
|
|
63
|
+
} | {
|
|
64
|
+
readonly status: 'bound';
|
|
65
|
+
readonly projectId: string;
|
|
66
|
+
readonly detail: string;
|
|
67
|
+
} | {
|
|
68
|
+
readonly status: 'split';
|
|
69
|
+
readonly detail: string;
|
|
70
|
+
} | {
|
|
71
|
+
readonly status: 'unknown';
|
|
72
|
+
readonly detail: string;
|
|
73
|
+
};
|
|
74
|
+
export interface StateRootReport {
|
|
75
|
+
readonly path: string;
|
|
76
|
+
readonly roles: readonly ('project' | 'user')[];
|
|
77
|
+
readonly exists: boolean;
|
|
78
|
+
readonly complete: boolean;
|
|
79
|
+
readonly files: number;
|
|
80
|
+
readonly directories: number;
|
|
81
|
+
readonly logicalBytes: number;
|
|
82
|
+
readonly categories: Readonly<Record<StateCategory, StateMeasure>>;
|
|
83
|
+
readonly inventory: StateInventory;
|
|
84
|
+
readonly privacy: readonly StatePrivacyBoundary[];
|
|
85
|
+
readonly issues: readonly StateIssue[];
|
|
86
|
+
readonly omittedIssues: number;
|
|
87
|
+
}
|
|
88
|
+
export interface NamzuStateReport {
|
|
89
|
+
readonly version: 1;
|
|
90
|
+
readonly readOnly: true;
|
|
91
|
+
readonly snapshot: {
|
|
92
|
+
readonly consistency: 'best-effort-unlocked';
|
|
93
|
+
readonly detail: string;
|
|
94
|
+
};
|
|
95
|
+
readonly complete: boolean;
|
|
96
|
+
readonly scopeRoots: {
|
|
97
|
+
readonly project: string;
|
|
98
|
+
readonly user: string;
|
|
99
|
+
readonly overlap: boolean;
|
|
100
|
+
};
|
|
101
|
+
readonly physicalTotals: StateMeasure & {
|
|
102
|
+
readonly roots: number;
|
|
103
|
+
};
|
|
104
|
+
readonly roots: readonly StateRootReport[];
|
|
105
|
+
readonly projectConfig: {
|
|
106
|
+
readonly path: string;
|
|
107
|
+
readonly status: 'present' | 'absent' | 'unreadable' | 'unsupported';
|
|
108
|
+
readonly logicalBytes: number;
|
|
109
|
+
};
|
|
110
|
+
readonly projectBinding: ProjectBinding;
|
|
111
|
+
}
|
|
112
|
+
export interface InspectNamzuStateOptions {
|
|
113
|
+
readonly cwd?: string;
|
|
114
|
+
readonly home?: string;
|
|
115
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
116
|
+
readonly platform?: NodeJS.Platform;
|
|
117
|
+
readonly uid?: number;
|
|
118
|
+
/** Internal test seam; the production command uses the bounded default. */
|
|
119
|
+
readonly entryLimit?: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Inspect Namzu's filesystem estate without changing it.
|
|
123
|
+
*
|
|
124
|
+
* Collection uses direct bounded filesystem reads. The one store object below
|
|
125
|
+
* is used only for its read-only root-binding lookup; it does not create or
|
|
126
|
+
* heal paths. A report about an untouched tree must leave that tree untouched.
|
|
127
|
+
*/
|
|
128
|
+
export declare function inspectNamzuState(options?: InspectNamzuStateOptions): Promise<NamzuStateReport>;
|
|
129
|
+
//# source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