pi-jarvis 1.8.0 → 1.9.1
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/AGENTS.md +11 -4
- package/README.md +42 -5
- package/dist/archive-config.d.ts.map +1 -1
- package/dist/archive-config.js +33 -6
- package/dist/archive-config.js.map +1 -1
- package/dist/archive-import.d.ts +74 -0
- package/dist/archive-import.d.ts.map +1 -0
- package/dist/archive-import.js +327 -0
- package/dist/archive-import.js.map +1 -0
- package/dist/archive-service.d.ts +9 -0
- package/dist/archive-service.d.ts.map +1 -1
- package/dist/archive-service.js +230 -89
- package/dist/archive-service.js.map +1 -1
- package/dist/archive-store.d.ts.map +1 -1
- package/dist/archive-store.js +50 -17
- package/dist/archive-store.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Project Scope
|
|
4
4
|
- `pi-jarvis` is a Pi extension that opens a `/jarvis` side-conversation overlay.
|
|
5
|
-
- Core runtime files: `index.ts`, `side-session.ts`, `native-mcp.ts`, `overlay.ts`, `overlay-layout.ts`, `draft-editor.ts`, `transcript-viewport.ts`, `jarvis-branding.ts`, `model-picker.ts`, `jarvis-config.ts`, `session-ref.ts`, `memory-{types,config,content,store,service,extension}.ts`, and `archive-{types,config,store,service,extension}.ts`.
|
|
5
|
+
- Core runtime files: `index.ts`, `side-session.ts`, `native-mcp.ts`, `overlay.ts`, `overlay-layout.ts`, `draft-editor.ts`, `transcript-viewport.ts`, `jarvis-branding.ts`, `model-picker.ts`, `jarvis-config.ts`, `session-ref.ts`, `memory-{types,config,content,store,service,extension}.ts`, and `archive-{types,config,store,service,extension,import}.ts`.
|
|
6
6
|
- Current baseline: Pi 1.0.0 (`@earendil-works` packages), Node.js >=22.19.0. Older Pi hosts are not supported.
|
|
7
7
|
|
|
8
8
|
## Current `/jarvis-model` and `/jarvis-thinking` Behavior
|
|
@@ -62,13 +62,20 @@
|
|
|
62
62
|
|
|
63
63
|
## Optional full-session archive (1.8.0)
|
|
64
64
|
- `archive-{types,config,store,service,extension}.ts` implement an independent OFF-by-default archive, explicitly mounted in main and Jarvis. Defaults enabled=false/capture=true/modelAccess=false; per-field project > global > defaults except explicit global enabled=false is master-off. Untrusted/config errors pause everything. Never enable/import real user data in tests.
|
|
65
|
-
- Separate settings: `<agentDir>/extensions/pi-jarvis-archive.json` and `.pi/jarvis-archive.json`, top-level `archive`. Controls default global. on/model-access on/clear require `--confirm-sensitive`; clear removes settings, not data, and fallback can re-enable. Archive tools are read-only and need modelAccess; humans can inspect with only capture/modelAccess off, but not full off.
|
|
65
|
+
- Separate settings: `<agentDir>/extensions/pi-jarvis-archive.json` and `.pi/jarvis-archive.json`, top-level `archive`. Controls default global. Settings writers may retry only a raced inode/unlink preflight read once under the existing cooperative lock; policy readers and locked-read races remain fail-closed, with no uncertain write replay. on/model-access on/clear require `--confirm-sensitive`; clear removes settings, not data, and fallback can re-enable. Archive tools are read-only and need modelAccess; humans can inspect with only capture/modelAccess off, but not full off.
|
|
66
66
|
- `/jarvis-archive` and overlay `/archive` commands are local, immediate, no provider/boot/queue work. Search/read/session default current-project; all-project access is explicit. Model tools cannot change controls, import, or delete. No auto context injection.
|
|
67
67
|
- Archive accepted finalized journal entries unredacted, including exposed thinking/tool/system/custom/error/inline-image data. Never capture intermediate message_end/tool_result/raw-provider payloads before later redactors. Baseline existing entry IDs on activation, never auto-backfill; parent/header provenance retained. Snapshots are not crash-safe audit logging and cannot recover unpersisted events, earlier truncation or external referenced files. Warn on storage/observation failures, not silent replay.
|
|
68
|
-
- Lazy private SQLite FTS5 at `<agentDir>/extensions/pi-jarvis-archive/archive.sqlite`, no automatic retention eviction. 64 MiB raw-entry/index budgets and 64K UTF-16 normalization-context hard rejection, no truncation of accepted raw JSON or silent partial indexing. Identical serialized payloads deduplicate across lanes; conflicting payloads for one identity fail without replacement. Search/read output max 24,000 JSON bytes plus notice; raw read offsets count Unicode codepoints and preserve pagination through output shrinking. Oversized display provenance is explicitly abbreviated; read(part=metadata) / read --metadata pages exact original metadata so every accepted entry stays accessible. Images/signatures are raw-retained, not text-indexed. Never load full payloads for search or scan all raw bodies on open.
|
|
69
|
-
- Explicit human import streams one selected regular v3 JSONL file, honors its header's project/session provenance, checks live capture/epoch/cancellation at chunk/record boundaries, reports partial commits, never mutates source. No directory scans
|
|
68
|
+
- Lazy private SQLite FTS5 at `<agentDir>/extensions/pi-jarvis-archive/archive.sqlite`, no automatic retention eviction. 64 MiB raw-entry/index budgets and 64K UTF-16 normalization-context hard rejection, no truncation of accepted raw JSON or silent partial indexing. Identical serialized payloads deduplicate across lanes; conflicting payloads for one identity fail without replacement. Search/read output max 24,000 JSON bytes plus notice; raw read offsets count Unicode codepoints and preserve pagination through output shrinking. Oversized display provenance is explicitly abbreviated; read(part=metadata) / read --metadata pages exact original metadata so every accepted entry stays accessible. Images/signatures are raw-retained, not text-indexed. Never load full payloads for search or scan all raw bodies on open. Inspection uses read-only schema snapshots and bounded observation of a version-zero, truly empty database while a concurrent creator initializes it; release each empty snapshot before waiting. Never let readers initialize/reset storage or retry record writes; unknown nonempty schemas reject.
|
|
69
|
+
- Explicit human single-file import streams one selected regular v3 JSONL file, honors its header's project/session provenance, checks live capture/epoch/cancellation at chunk/record boundaries, reports partial commits, never mutates source. No automatic directory scans or legacy auto-migration. Scoped forget-session/prune require --confirm; tombstones stop identical entry resurrection, not all copies. No encryption, sandbox, forensic erase, or hard total-disk-quota claims.
|
|
70
70
|
- Keep live trust/settings and per-binding stale-definition guards independent of Repo tools. Reader permission changes must not discard pending recording. Main owner closes storage after final archive snapshot; the side owner snapshots finalized entries before revoking its lifetime/context, without closing the shared service. Preserve archive finalization before main boot-generation invalidation. Settings observations propagate between mounted lanes, not by a cross-process watcher.
|
|
71
71
|
|
|
72
|
+
## Bulk archive import (1.9.0)
|
|
73
|
+
- `archive-import.ts` owns bounded discovery and the shared streaming reader. `/jarvis-archive import-all [absolute-directory]` is an explicit metadata-only recursive preview, defaulting to `<agentDir>/sessions` (older Jarvis side history lives under `<agentDir>/jarvis-sessions` and needs an explicit root). Require enabled recording/trust before scanning; never read transcript bodies or open archive records for preview. No startup scan, model import tool, or implicit history backfill.
|
|
74
|
+
- Confirmation requires `import-all --confirm-sensitive --preview <id>` and consumes the 10-minute preview once. Pin the exact reviewed set, root/directory/file identities and metadata; do not rescan or add newly discovered files. Bind to cwd/session and live permission/import generations; new previews replace old ones. Cancellation/revocation/session change stops remaining work, without replay or rollback promises.
|
|
75
|
+
- Bounded sequential discovery/import: 10,000 candidates, 50,000 entries visited, depth 64, approximately 8 MiB manifest. Skip nested symlinks, hardlinks and nonregular files. Fail incomplete/over-limit previews explicitly. Recheck opened FDs and directory identities, cap bulk reads at reviewed size, check mutation at streaming boundaries; do not claim a filesystem snapshot/sandbox.
|
|
76
|
+
- Preserve single-file import compatibility, v3/header provenance, dedup/conflict/tombstone semantics and partial counts. Per-file source failures continue; cancellation/permission/storage-wide failure stops the batch. Sources are never intentionally written. Tests use temporary synthetic session directories only.
|
|
77
|
+
- `import-report <id> [offset]` pages the latest ephemeral per-file report under the same project/session owner, with enabled archive but no model-access/capture requirement. Bound JSON output to 24,000 bytes, explicitly abbreviate oversized paths and preserve pagination progress. `import-cancel` cancels local imports/previews without changing settings and works while off. No persisted report or automatic context injection.
|
|
78
|
+
|
|
72
79
|
## Git and Release Policy
|
|
73
80
|
- Every new commit MUST have an annotated **stable version tag `vX.Y.Z`**. No `dev`, alpha, beta, release-candidate, build-metadata, or SHA-only tags. This is a released extension, not a prerelease channel.
|
|
74
81
|
- Before committing, choose the next unused stable version and update package metadata, lockfile, README, and a dated changelog entry together. Tag every commit, including intermediate and merge commits; never leave a new commit untagged. Run `npm run check:tags`, then push the commit and version tag atomically. Do not move or replace existing tags or rewrite shared history.
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
`pi-jarvis` adds `/jarvis`: a polished overlay where you can ask for status, inspect the repo when you explicitly allow it, and send a quiet note or a confirmed redirect back to the main lane.
|
|
12
12
|
|
|
13
|
-
**Remember what matters. Find the original history when you need it.** Main Pi and Jarvis share [persistent memory](#shared-memory); the separate, opt-in [full-session archive](#full-session-archive) adds indexed history search across sessions and, when explicitly requested, projects.
|
|
13
|
+
**Remember what matters. Find the original history when you need it.** Main Pi and Jarvis share [persistent memory](#shared-memory); the separate, opt-in [full-session archive](#full-session-archive) adds indexed history search across sessions and, when explicitly requested, projects. **New in the 1.9 series: bulk-import existing Pi sessions with a preview and explicit confirmation.**
|
|
14
14
|
|
|
15
15
|
[](https://github.com/crustyhacker/pi-jarvis/actions/workflows/ci.yml)
|
|
16
16
|
[](https://www.npmjs.com/package/pi-jarvis)
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
[](https://github.com/crustyhacker/pi-jarvis)
|
|
19
19
|
[](./package.json)
|
|
20
20
|
|
|
21
|
-
<p><strong>Current version:</strong> 1.
|
|
21
|
+
<p><strong>Current version:</strong> 1.9.1</p>
|
|
22
22
|
|
|
23
23
|
<p>
|
|
24
24
|
<strong>Shared persistent memory</strong> ·
|
|
25
25
|
<strong>Optional indexed session archive</strong> ·
|
|
26
|
+
<strong>Confirmed bulk history import</strong> ·
|
|
26
27
|
<strong>Persistent side session</strong> ·
|
|
27
28
|
<strong>Live main-session awareness</strong> ·
|
|
28
29
|
<strong>Opt-in local tools + native MCP</strong> ·
|
|
@@ -98,7 +99,7 @@ Both work across main Pi and Jarvis, independently of **Repo tools** and whether
|
|
|
98
99
|
| Capability | What you get |
|
|
99
100
|
|---|---|
|
|
100
101
|
| **Shared memory** | Main Pi and Jarvis remember useful discussions across sessions; enabled by default, with global/project controls and a master off switch |
|
|
101
|
-
| **Optional full-session archive** | Off by default; raw finalized entries, local indexed cross-session search, separate model permission and
|
|
102
|
+
| **Optional full-session archive** | Off by default; raw finalized entries, local indexed cross-session search, separate model permission, and preview-confirmed bulk history import |
|
|
102
103
|
| **Persistent side lane** | `/jarvis` keeps its own isolated conversation state and restores prior side-session history |
|
|
103
104
|
| **Live awareness** | Jarvis sees the current main-session summary plus a delta since the last `/jarvis` turn |
|
|
104
105
|
| **Permission-gated tools** | Local `read`, `bash`, `edit`, `write`, and configured native MCP stay off until you enable Repo tools |
|
|
@@ -296,7 +297,43 @@ Search/session pages return bounded excerpts of normalized indexing text with ID
|
|
|
296
297
|
|
|
297
298
|
Global accessibility is within the **same active Pi agent directory**, not cloud sync or other users' machines. Project controls govern operations initiated here; existing records from a paused project remain accessible through explicit all-project queries from another allowed project. Disabling is not deletion. Returned model-tool results persist normally in Pi and can be captured again as part of a later journal entry.
|
|
298
299
|
|
|
299
|
-
###
|
|
300
|
+
### Import all existing Pi sessions
|
|
301
|
+
|
|
302
|
+
With archive recording enabled, run:
|
|
303
|
+
|
|
304
|
+
```text
|
|
305
|
+
/jarvis-archive import-all
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
This **previews** `.jsonl` candidates recursively under the active Pi agent directory's `sessions` folder (normally `~/.pi/agent/sessions`). It shows the candidate file count before any transcript body is read or archived. Then paste the confirmation command supplied by the preview:
|
|
309
|
+
|
|
310
|
+
```text
|
|
311
|
+
/jarvis-archive import-all --confirm-sensitive --preview <preview-id>
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
For a different session directory, preview it explicitly:
|
|
315
|
+
|
|
316
|
+
```text
|
|
317
|
+
/jarvis-archive import-all /absolute/path/to/session-directory
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
The default covers Pi's standard main-session directory across projects. For older Jarvis side sessions, repeat the preview for `<active-agent-dir>/jarvis-sessions`; custom `--session-dir` locations also need an explicit directory preview.
|
|
321
|
+
|
|
322
|
+
The confirmation token selects the **exact reviewed file list**, not a fresh scan. Files created afterward are not silently added. Existing identical entries are skipped, and each source file keeps its original project/session identity. Bad/legacy files are reported individually rather than hiding failures or abandoning the rest of the batch. Original transcripts are never rewritten.
|
|
323
|
+
|
|
324
|
+
```text
|
|
325
|
+
/jarvis-archive import-report <report-id> # paged per-file results
|
|
326
|
+
/jarvis-archive import-report <report-id> <nextOffset> # follow the returned offset
|
|
327
|
+
/jarvis-archive import-cancel # stop pending/active imports
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Previews expire after 10 minutes and are bound to the current project/session and permission generation. A new preview replaces the old one; confirmation consumes it once. The latest report is kept only in memory, not persisted or supplied to models. Policy/session changes, cancellation, or storage-wide failure stop remaining work; completed entries remain, with partial counts reported. The start notice supplies the report ID; progress counts update as each file settles, not on every entry. Counts cover acknowledged writes; a storage failure can leave an uncertain final commit. Re-preview explicitly to retry—imports are never automatically replayed.
|
|
331
|
+
|
|
332
|
+
Discovery skips symlinks below the selected root, hardlinked/nonregular files, and unrelated extensions. Unreadable directories or discovery limits abort the preview rather than calling a partial scan “all”: at most 10,000 candidates, 50,000 visited entries, depth 64, and an 8 MiB manifest budget. Opened files and reviewed directory identities are checked for substitution; bulk reads are limited to the reviewed size, with mutation checks during streaming. These are defensive checks, **not an immutable filesystem snapshot or sandbox**. Pause active sessions for the most reliable historical import; changed files are reported and may need a fresh preview.
|
|
333
|
+
|
|
334
|
+
Bulk import is a human command, not a model tool. It requires enabled recording in the initiating trusted project but does not require model access or Repo tools. Like single-file import, it can ingest sensitive unredacted history from multiple projects; no automatic startup scan or import occurs.
|
|
335
|
+
|
|
336
|
+
### Single-file import and retention
|
|
300
337
|
|
|
301
338
|
```text
|
|
302
339
|
/jarvis-archive import --confirm-sensitive /absolute/path/to/session.jsonl
|
|
@@ -305,7 +342,7 @@ Global accessibility is within the **same active Pi agent directory**, not cloud
|
|
|
305
342
|
/jarvis-archive prune --all --confirm 2026-01-01T00:00:00.000Z
|
|
306
343
|
```
|
|
307
344
|
|
|
308
|
-
|
|
345
|
+
Single-file import is **human-only**, requires enabled recording and an explicit regular v3 JSONL file, and preserves the source header's project/session identity—even if different from the current project. Directory discovery happens only through the explicit bulk preview above; no silent historical import occurs. Both import modes require v3 session files; legacy session versions require a separately reviewed conversion first. Completed entries survive a partial/cancelled import, with counts reported; duplicate entries are skipped, differing payloads for an existing identity are rejected, and originals are never modified. Deletion defaults to this project; `--all` is explicit. Stable identity tombstones prevent re-import of deleted entries, not every semantic copy or other previously unarchived entry.
|
|
309
346
|
|
|
310
347
|
Storage is lazy SQLite under `<active-agent-dir>/extensions/pi-jarvis-archive/archive.sqlite`, defaulting to `~/.pi/agent/extensions/pi-jarvis-archive/archive.sqlite`. Owned directories/files use private permissions where supported, with defensive link/type checks and concurrent-writer transactions. There is no background watcher: observed settings changes are propagated between mounted lanes, while other processes recheck at operation boundaries. Deletion does not erase original Pi files, prior search-result copies, already-sent model context or backups, and does not guarantee reclaimed disk space or forensic erasure. For a complete reset, stop all Pi processes using the store and remove only its archive directory yourself; that also removes tombstones. Shared memory stays separate and unchanged. To stop both Jarvis persistence layers, use both `/jarvis-archive off` and `/jarvis-memory off`; neither disables Pi's original session transcripts.
|
|
311
348
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-config.d.ts","sourceRoot":"","sources":["../archive-config.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,KAAK,KAAK,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"archive-config.d.ts","sourceRoot":"","sources":["../archive-config.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,KAAK,KAAK,GAAG,YAAY,CAAC;AAa1B,4FAA4F;AAC5F,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAGrF;AAED,4GAA4G;AAC5G,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,UAAO,GAAG;IACpF,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;CACxC,CAoBA;AAED,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAOlH;AAED,kFAAkF;AAClF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAMpF"}
|
package/dist/archive-config.js
CHANGED
|
@@ -8,6 +8,11 @@ const LOCK_WAIT_MS = 2_000;
|
|
|
8
8
|
const LOCK_POLL_MS = 20;
|
|
9
9
|
const sleep = new Int32Array(new SharedArrayBuffer(4));
|
|
10
10
|
const noFollow = constants.O_NOFOLLOW ?? 0;
|
|
11
|
+
// A cooperative writer can atomically replace a file during the unlocked
|
|
12
|
+
// no-op preflight. Only writers retry that read once under the lock; policy
|
|
13
|
+
// readers and races during the locked read still fail closed.
|
|
14
|
+
class ArchiveSettingsReadRace extends Error {
|
|
15
|
+
}
|
|
11
16
|
/** Caller-spelled settings path, without I/O. Access canonicalizes only the chosen root. */
|
|
12
17
|
export function archiveConfigPath(cwd, agentDir, scope) {
|
|
13
18
|
if (scope !== "global" && scope !== "project")
|
|
@@ -160,6 +165,10 @@ function regularFile(path) {
|
|
|
160
165
|
return undefined;
|
|
161
166
|
throw error;
|
|
162
167
|
}
|
|
168
|
+
// A pathname lookup can retain the old inode while a concurrent rename or
|
|
169
|
+
// lock release unlinks it, so even lstat may legitimately report nlink=0.
|
|
170
|
+
if (stat.isFile() && !stat.isSymbolicLink() && stat.nlink === 0)
|
|
171
|
+
throw new ArchiveSettingsReadRace("Archive settings path was unlinked during lookup.");
|
|
163
172
|
if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink !== 1)
|
|
164
173
|
throw new Error("Unsafe archive settings file.");
|
|
165
174
|
return stat;
|
|
@@ -177,9 +186,11 @@ function readConfig(path) {
|
|
|
177
186
|
let text;
|
|
178
187
|
try {
|
|
179
188
|
const opened = fstatSync(fd);
|
|
180
|
-
if (
|
|
181
|
-
throw new
|
|
189
|
+
if (opened.isFile() && (opened.nlink === 0 || (opened.nlink === 1 && (opened.dev !== stat.dev || opened.ino !== stat.ino)))) {
|
|
190
|
+
throw new ArchiveSettingsReadRace("Archive settings changed while opening.");
|
|
182
191
|
}
|
|
192
|
+
if (!opened.isFile() || opened.nlink !== 1)
|
|
193
|
+
throw new Error("Unsafe archive settings file.");
|
|
183
194
|
if (opened.size > CONFIG_LIMIT_BYTES)
|
|
184
195
|
throw new Error("Archive settings exceed the size limit.");
|
|
185
196
|
// A bounded buffer also handles growth after fstat: readFileSync could allocate
|
|
@@ -219,9 +230,17 @@ function changeConfig(cwd, agentDir, scope, change) {
|
|
|
219
230
|
try {
|
|
220
231
|
const path = settingsPath(cwd, agentDir, scope);
|
|
221
232
|
// Avoid creating directories/lock files for absent clears or already-applied changes.
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
233
|
+
try {
|
|
234
|
+
const existing = readConfig(path);
|
|
235
|
+
if (!change({ ...existing }))
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
if (!(error instanceof ArchiveSettingsReadRace))
|
|
240
|
+
throw error;
|
|
241
|
+
// No write has occurred. Re-read/validate the current file under the
|
|
242
|
+
// existing cooperative lock rather than replaying an uncertain write.
|
|
243
|
+
}
|
|
225
244
|
directories(dirname(path), true);
|
|
226
245
|
withLock(path, () => {
|
|
227
246
|
const config = readConfig(path) ?? {};
|
|
@@ -246,7 +265,15 @@ function withLock(path, run) {
|
|
|
246
265
|
catch (error) {
|
|
247
266
|
if (error?.code !== "EEXIST")
|
|
248
267
|
throw error;
|
|
249
|
-
|
|
268
|
+
try {
|
|
269
|
+
regularFile(lock);
|
|
270
|
+
} // Reject symlink/nonregular/hardlinked locks.
|
|
271
|
+
catch (lookupError) {
|
|
272
|
+
// The owner released it during lookup. Only a later exclusive open
|
|
273
|
+
// can acquire the path; keep the existing deadline and never unlink it.
|
|
274
|
+
if (!(lookupError instanceof ArchiveSettingsReadRace))
|
|
275
|
+
throw lookupError;
|
|
276
|
+
}
|
|
250
277
|
const remaining = deadline - performance.now();
|
|
251
278
|
if (remaining <= 0)
|
|
252
279
|
throw new Error("Archive settings lock timed out.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-config.js","sourceRoot":"","sources":["../archive-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAC1E,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,GAC7D,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpE,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAU,CAAC;AAC9D,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,CAAC;AACvC,MAAM,YAAY,GAAG,KAAK,CAAC;AAC3B,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,MAAM,QAAQ,GAAG,SAAS,CAAC,UAAU,IAAI,CAAC,CAAC;AAE3C,4FAA4F;AAC5F,MAAM,UAAU,iBAAiB,CAAC,GAA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,CAAC,+BAA+B,CAAC,CAAC;QACzE,CAAC;IACF,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ArchiveInput } from "./archive-types.js";
|
|
2
|
+
export declare const ARCHIVE_IMPORT_LIMITS: Readonly<{
|
|
3
|
+
candidates: 10000;
|
|
4
|
+
entries: 50000;
|
|
5
|
+
depth: 64;
|
|
6
|
+
manifestBytes: number;
|
|
7
|
+
previewMs: number;
|
|
8
|
+
}>;
|
|
9
|
+
type DirectoryIdentity = {
|
|
10
|
+
dev: bigint;
|
|
11
|
+
ino: bigint;
|
|
12
|
+
mtimeNs: bigint;
|
|
13
|
+
ctimeNs: bigint;
|
|
14
|
+
};
|
|
15
|
+
type FileIdentity = DirectoryIdentity & {
|
|
16
|
+
size: bigint;
|
|
17
|
+
};
|
|
18
|
+
export interface ImportDirectory {
|
|
19
|
+
path: string;
|
|
20
|
+
identity: DirectoryIdentity;
|
|
21
|
+
parent?: ImportDirectory;
|
|
22
|
+
}
|
|
23
|
+
export interface ImportCandidate {
|
|
24
|
+
index: number;
|
|
25
|
+
path: string;
|
|
26
|
+
identity: FileIdentity;
|
|
27
|
+
parent: ImportDirectory;
|
|
28
|
+
}
|
|
29
|
+
export interface ImportInventory {
|
|
30
|
+
root: string;
|
|
31
|
+
candidates: ImportCandidate[];
|
|
32
|
+
skipped: number;
|
|
33
|
+
}
|
|
34
|
+
/** Reasons are fixed, human-safe strings, never native/parser input snippets. */
|
|
35
|
+
export declare class ArchiveImportFailure extends Error {
|
|
36
|
+
readonly reason: string;
|
|
37
|
+
readonly stop: boolean;
|
|
38
|
+
readonly changed: boolean;
|
|
39
|
+
constructor(reason: string, stop?: boolean, changed?: boolean);
|
|
40
|
+
}
|
|
41
|
+
/** Metadata-only, sequential discovery. Any incomplete scan rejects the entire
|
|
42
|
+
* preview; no partial inventory is advertised as 'all'. Nested links are never
|
|
43
|
+
* intentionally followed. The selected root alias is resolved exactly once. */
|
|
44
|
+
export declare function discoverArchiveImports(path: string, check: () => void): Promise<ImportInventory>;
|
|
45
|
+
export interface ImportCounts {
|
|
46
|
+
saved: number;
|
|
47
|
+
duplicates: number;
|
|
48
|
+
deleted: number;
|
|
49
|
+
}
|
|
50
|
+
export interface TranscriptImportResult extends ImportCounts {
|
|
51
|
+
complete: boolean;
|
|
52
|
+
line: number;
|
|
53
|
+
project?: string;
|
|
54
|
+
sessionId?: string;
|
|
55
|
+
reason?: string;
|
|
56
|
+
stop?: boolean;
|
|
57
|
+
changed?: boolean;
|
|
58
|
+
cleanupFailed?: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface TranscriptImportOptions {
|
|
61
|
+
check: () => void;
|
|
62
|
+
append: (input: ArchiveInput) => "saved" | "duplicate" | "deleted";
|
|
63
|
+
project: (path: string) => string;
|
|
64
|
+
headerEntry: (header: {
|
|
65
|
+
timestamp?: unknown;
|
|
66
|
+
}) => ArchiveInput["entry"];
|
|
67
|
+
candidate?: ImportCandidate;
|
|
68
|
+
}
|
|
69
|
+
/** Shared streaming v3 importer. Bulk reads are frozen at the reviewed size and
|
|
70
|
+
* verify nanosecond metadata before/after each bounded FD read and at EOF.
|
|
71
|
+
* Single-file callers retain their established counts/text and streaming gates. */
|
|
72
|
+
export declare function importArchiveTranscript(path: string, options: TranscriptImportOptions): Promise<TranscriptImportResult>;
|
|
73
|
+
export {};
|
|
74
|
+
//# sourceMappingURL=archive-import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive-import.d.ts","sourceRoot":"","sources":["../archive-import.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,eAAO,MAAM,qBAAqB;;;;;;EAA+H,CAAC;AAKlK,KAAK,iBAAiB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM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