@namzu/cli 16.0.0 → 16.1.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 +20 -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/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/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/store.js +25 -2
- package/dist/integrations/sessions/store.js.map +1 -1
- 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 +125 -0
- package/dist/integrations/state/report.d.ts.map +1 -0
- package/dist/integrations/state/report.js +784 -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.map +1 -1
- package/dist/integrations/subagents/runtime.js +45 -7
- package/dist/integrations/subagents/runtime.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 +231 -65
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +18 -2
- 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 +26 -5
- package/dist/user-commands/store.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,125 @@
|
|
|
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: 'unknown';
|
|
69
|
+
readonly detail: string;
|
|
70
|
+
};
|
|
71
|
+
export interface StateRootReport {
|
|
72
|
+
readonly path: string;
|
|
73
|
+
readonly roles: readonly ('project' | 'user')[];
|
|
74
|
+
readonly exists: boolean;
|
|
75
|
+
readonly complete: boolean;
|
|
76
|
+
readonly files: number;
|
|
77
|
+
readonly directories: number;
|
|
78
|
+
readonly logicalBytes: number;
|
|
79
|
+
readonly categories: Readonly<Record<StateCategory, StateMeasure>>;
|
|
80
|
+
readonly inventory: StateInventory;
|
|
81
|
+
readonly privacy: readonly StatePrivacyBoundary[];
|
|
82
|
+
readonly issues: readonly StateIssue[];
|
|
83
|
+
readonly omittedIssues: number;
|
|
84
|
+
}
|
|
85
|
+
export interface NamzuStateReport {
|
|
86
|
+
readonly version: 1;
|
|
87
|
+
readonly readOnly: true;
|
|
88
|
+
readonly snapshot: {
|
|
89
|
+
readonly consistency: 'best-effort-unlocked';
|
|
90
|
+
readonly detail: string;
|
|
91
|
+
};
|
|
92
|
+
readonly complete: boolean;
|
|
93
|
+
readonly scopeRoots: {
|
|
94
|
+
readonly project: string;
|
|
95
|
+
readonly user: string;
|
|
96
|
+
readonly overlap: boolean;
|
|
97
|
+
};
|
|
98
|
+
readonly physicalTotals: StateMeasure & {
|
|
99
|
+
readonly roots: number;
|
|
100
|
+
};
|
|
101
|
+
readonly roots: readonly StateRootReport[];
|
|
102
|
+
readonly projectConfig: {
|
|
103
|
+
readonly path: string;
|
|
104
|
+
readonly status: 'present' | 'absent' | 'unreadable' | 'unsupported';
|
|
105
|
+
readonly logicalBytes: number;
|
|
106
|
+
};
|
|
107
|
+
readonly projectBinding: ProjectBinding;
|
|
108
|
+
}
|
|
109
|
+
export interface InspectNamzuStateOptions {
|
|
110
|
+
readonly cwd?: string;
|
|
111
|
+
readonly home?: string;
|
|
112
|
+
readonly platform?: NodeJS.Platform;
|
|
113
|
+
readonly uid?: number;
|
|
114
|
+
/** Internal test seam; the production command uses the bounded default. */
|
|
115
|
+
readonly entryLimit?: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Inspect Namzu's filesystem estate without constructing a store or changing it.
|
|
119
|
+
*
|
|
120
|
+
* Store constructors are intentionally absent here. Several of them create or
|
|
121
|
+
* heal paths while opening, which would make a report about an untouched tree
|
|
122
|
+
* change the tree it claims to describe.
|
|
123
|
+
*/
|
|
124
|
+
export declare function inspectNamzuState(options?: InspectNamzuStateOptions): Promise<NamzuStateReport>;
|
|
125
|
+
//# sourceMappingURL=report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/integrations/state/report.ts"],"names":[],"mappings":"AAgCA,MAAM,MAAM,aAAa,GACtB,UAAU,GACV,eAAe,GACf,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,CAAA;AAEZ,MAA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