@heyditto/cli 2.4.1 → 2.5.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.
Files changed (49) hide show
  1. package/README.md +93 -0
  2. package/dist/agents/launch.d.ts +6 -0
  3. package/dist/agents/launch.js +13 -1
  4. package/dist/agents/launch.js.map +1 -1
  5. package/dist/cli.js +2 -0
  6. package/dist/cli.js.map +1 -1
  7. package/dist/teleport/api.d.ts +139 -0
  8. package/dist/teleport/api.js +61 -0
  9. package/dist/teleport/api.js.map +1 -0
  10. package/dist/teleport/bundle.d.ts +35 -0
  11. package/dist/teleport/bundle.js +102 -0
  12. package/dist/teleport/bundle.js.map +1 -0
  13. package/dist/teleport/chunks.d.ts +13 -0
  14. package/dist/teleport/chunks.js +57 -0
  15. package/dist/teleport/chunks.js.map +1 -0
  16. package/dist/teleport/commands.d.ts +76 -0
  17. package/dist/teleport/commands.js +492 -0
  18. package/dist/teleport/commands.js.map +1 -0
  19. package/dist/teleport/discover.d.ts +13 -0
  20. package/dist/teleport/discover.js +64 -0
  21. package/dist/teleport/discover.js.map +1 -0
  22. package/dist/teleport/git.d.ts +18 -0
  23. package/dist/teleport/git.js +41 -0
  24. package/dist/teleport/git.js.map +1 -0
  25. package/dist/teleport/harness.d.ts +29 -0
  26. package/dist/teleport/harness.js +121 -0
  27. package/dist/teleport/harness.js.map +1 -0
  28. package/dist/teleport/offload.d.ts +32 -0
  29. package/dist/teleport/offload.js +83 -0
  30. package/dist/teleport/offload.js.map +1 -0
  31. package/dist/teleport/pull.d.ts +12 -0
  32. package/dist/teleport/pull.js +118 -0
  33. package/dist/teleport/pull.js.map +1 -0
  34. package/dist/teleport/push.d.ts +49 -0
  35. package/dist/teleport/push.js +261 -0
  36. package/dist/teleport/push.js.map +1 -0
  37. package/dist/teleport/restore.d.ts +16 -0
  38. package/dist/teleport/restore.js +163 -0
  39. package/dist/teleport/restore.js.map +1 -0
  40. package/dist/teleport/storage.d.ts +53 -0
  41. package/dist/teleport/storage.js +43 -0
  42. package/dist/teleport/storage.js.map +1 -0
  43. package/dist/teleport/types.d.ts +100 -0
  44. package/dist/teleport/types.js +85 -0
  45. package/dist/teleport/types.js.map +1 -0
  46. package/dist/teleport/worktree.d.ts +28 -0
  47. package/dist/teleport/worktree.js +120 -0
  48. package/dist/teleport/worktree.js.map +1 -0
  49. package/package.json +1 -1
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Teleport data model. A capsule is one teleportable root (a repo or a folder
3
+ * of repos) plus the coding-harness session that was working in it. Every
4
+ * push appends an immutable generation; only content-addressed chunks
5
+ * (≤ 24 MiB) ever reach object storage, and the manifest is itself a chunk.
6
+ *
7
+ * The manifest shape mirrors the backend's Go structs in
8
+ * pkg/services/teleport/manifest.go field for field (json tags). A copy of
9
+ * those structs lives in test/fixtures/manifest.go and a contract test fails
10
+ * when the two drift, so change both together.
11
+ */
12
+ /** Chunk size: below the storage providers' 25 MB single-object cap. */
13
+ export declare const CHUNK_BYTES: number;
14
+ /** `v` in the manifest; the backend validates it equals 1. */
15
+ export declare const MANIFEST_VERSION = 1;
16
+ export type RootKind = "repo" | "folder";
17
+ export type HarnessKind = "claude-code" | "codex" | "none";
18
+ /** Tar compression used for worktree and harness captures; detected from the bytes on restore. */
19
+ export type Compression = "zstd" | "gzip";
20
+ export interface ChunkRef {
21
+ sha256: string;
22
+ size: number;
23
+ }
24
+ export interface RepoPack {
25
+ kind: "full" | "thin";
26
+ chunks: ChunkRef[];
27
+ /** Generation whose head the thin bundle assumes present; omitted for full bundles. */
28
+ basisGeneration?: number;
29
+ }
30
+ export interface RepoRemote {
31
+ name: string;
32
+ url: string;
33
+ }
34
+ export interface RepoHead {
35
+ sha: string;
36
+ /** Current branch; omitted when detached. */
37
+ branch?: string;
38
+ /** Upstream ref such as origin/main; omitted when not configured. */
39
+ upstream?: string;
40
+ }
41
+ export interface RepoWorktree {
42
+ chunks: ChunkRef[];
43
+ entries: number;
44
+ bytes: number;
45
+ }
46
+ export interface RepoManifest {
47
+ head: RepoHead;
48
+ relPath: string;
49
+ remotes: RepoRemote[];
50
+ /** Local branch names carried by the bundle. */
51
+ branches?: string[];
52
+ tags?: string[];
53
+ /** Branch name → "<remote>/<branch>" for branches tracking one of `remotes`; omitted when empty. */
54
+ branchUpstreams?: Record<string, string>;
55
+ /** "<remote>/<branch>" → the remote-tracking ref's 40-hex sha at push time, for every upstream above. */
56
+ upstreamTips?: Record<string, string>;
57
+ stashes?: string[];
58
+ packs: RepoPack[];
59
+ ignoredIncludes?: string[];
60
+ /** Modified + untracked files; empty chunks when the tree was clean. */
61
+ worktree: RepoWorktree;
62
+ }
63
+ export interface HarnessState {
64
+ kind: HarnessKind;
65
+ sessionId?: string;
66
+ /** Absolute working directory the harness session was recorded under. */
67
+ cwd?: string;
68
+ chunks: ChunkRef[];
69
+ }
70
+ export interface Manifest {
71
+ v: number;
72
+ capsuleId: string;
73
+ generation: number;
74
+ /** generation - 1; 0 for the first generation. */
75
+ parentGeneration: number;
76
+ createdAt: string;
77
+ machine: Record<string, unknown>;
78
+ root: {
79
+ kind: RootKind;
80
+ name: string;
81
+ };
82
+ repos: RepoManifest[];
83
+ excludes?: string[];
84
+ harness: HarnessState;
85
+ totals: {
86
+ chunks: number;
87
+ bytes: number;
88
+ dedupedBytes?: number;
89
+ };
90
+ }
91
+ /** Paths that never travel in a capsule: secrets, caches and build output. */
92
+ export declare const DEFAULT_EXCLUDES: readonly string[];
93
+ /** Claude Code keys its project dir on the absolute cwd with `/` and `:` replaced by `-`. */
94
+ export declare function cwdSlug(cwd: string): string;
95
+ export declare function machineInfo(cliVersion: string): Manifest["machine"];
96
+ /** True when a repo-relative path matches one of the exclude globs. */
97
+ export declare function isExcluded(relPath: string, excludes?: readonly string[]): boolean;
98
+ /** Minimal glob: `*` matches within a name; `?` one char. Case-sensitive. */
99
+ export declare function globMatch(pattern: string, name: string): boolean;
100
+ export declare function formatBytes(n: number): string;
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Teleport data model. A capsule is one teleportable root (a repo or a folder
3
+ * of repos) plus the coding-harness session that was working in it. Every
4
+ * push appends an immutable generation; only content-addressed chunks
5
+ * (≤ 24 MiB) ever reach object storage, and the manifest is itself a chunk.
6
+ *
7
+ * The manifest shape mirrors the backend's Go structs in
8
+ * pkg/services/teleport/manifest.go field for field (json tags). A copy of
9
+ * those structs lives in test/fixtures/manifest.go and a contract test fails
10
+ * when the two drift, so change both together.
11
+ */
12
+ import os from "node:os";
13
+ /** Chunk size: below the storage providers' 25 MB single-object cap. */
14
+ export const CHUNK_BYTES = 24 * 1024 * 1024;
15
+ /** `v` in the manifest; the backend validates it equals 1. */
16
+ export const MANIFEST_VERSION = 1;
17
+ /** Paths that never travel in a capsule: secrets, caches and build output. */
18
+ export const DEFAULT_EXCLUDES = [
19
+ ".env",
20
+ ".env.*",
21
+ "*.pem",
22
+ "*.key",
23
+ "*.p12",
24
+ "*.pfx",
25
+ "id_rsa*",
26
+ "id_ed25519*",
27
+ ".npmrc",
28
+ ".netrc",
29
+ "node_modules/",
30
+ ".venv/",
31
+ "venv/",
32
+ "__pycache__/",
33
+ "target/",
34
+ "dist/",
35
+ "build/",
36
+ ".next/",
37
+ ".turbo/",
38
+ ".cache/",
39
+ ".gobuildtmp/",
40
+ ".worktrees/",
41
+ ];
42
+ /** Claude Code keys its project dir on the absolute cwd with `/` and `:` replaced by `-`. */
43
+ export function cwdSlug(cwd) {
44
+ return cwd.replace(/[:\\/]/g, "-");
45
+ }
46
+ export function machineInfo(cliVersion) {
47
+ return { hostname: os.hostname(), os: process.platform, arch: process.arch, cliVersion };
48
+ }
49
+ /** True when a repo-relative path matches one of the exclude globs. */
50
+ export function isExcluded(relPath, excludes = DEFAULT_EXCLUDES) {
51
+ const segments = relPath.split("/");
52
+ const base = segments[segments.length - 1];
53
+ for (const pattern of excludes) {
54
+ if (pattern.endsWith("/")) {
55
+ const dir = pattern.slice(0, -1);
56
+ if (segments.slice(0, -1).includes(dir))
57
+ return true;
58
+ continue;
59
+ }
60
+ if (globMatch(pattern, base))
61
+ return true;
62
+ }
63
+ return false;
64
+ }
65
+ /** Minimal glob: `*` matches within a name; `?` one char. Case-sensitive. */
66
+ export function globMatch(pattern, name) {
67
+ const re = new RegExp(`^${pattern
68
+ .split("")
69
+ .map((ch) => (ch === "*" ? ".*" : ch === "?" ? "." : ch.replace(/[.+^${}()|[\]\\]/g, "\\$&")))
70
+ .join("")}$`);
71
+ return re.test(name);
72
+ }
73
+ export function formatBytes(n) {
74
+ if (n < 1024)
75
+ return `${n} B`;
76
+ const units = ["KiB", "MiB", "GiB", "TiB"];
77
+ let v = n / 1024;
78
+ let i = 0;
79
+ while (v >= 1024 && i < units.length - 1) {
80
+ v /= 1024;
81
+ i++;
82
+ }
83
+ return `${v.toFixed(v >= 100 ? 0 : 1)} ${units[i]}`;
84
+ }
85
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/teleport/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,wEAAwE;AACxE,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AA+ElC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,SAAS;IACT,aAAa;IACb,QAAQ;IACR,QAAQ;IACR,eAAe;IACf,QAAQ;IACR,OAAO;IACP,cAAc;IACd,SAAS;IACT,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,SAAS;IACT,cAAc;IACd,aAAa;CACd,CAAC;AAEF,6FAA6F;AAC7F,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,OAAO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AAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC,CAAC;SAC7F,IAAI,CAAC,EAAE,CAAC,GAAG,CACf,CAAC;IACF,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,CAAS;IACnC,IAAI,CAAC,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,IAAI,CAAC;IAC9B,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,CAAC,IAAI,IAAI,CAAC;QACV,CAAC,EAAE,CAAC;IACN,CAAC;IACD,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACtD,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { type Compression } from "./types.js";
2
+ export interface WorktreeCapture {
3
+ file: string;
4
+ compression: Compression;
5
+ entries: number;
6
+ paths: string[];
7
+ }
8
+ /**
9
+ * The tracked-but-modified and untracked files of a repository, minus excluded
10
+ * paths and anything git ignores (unless force-included). This is the dirty
11
+ * state a plain clone would not reproduce.
12
+ */
13
+ export declare function dirtyPaths(repoDir: string, ignoredIncludes?: string[]): string[];
14
+ export declare function pickCompression(): Compression;
15
+ /** Tars the given repo-relative paths into `outFile`, compressed. Empty list → null. */
16
+ export declare function captureWorktree(repoDir: string, paths: string[], outFile: string, compression?: Compression): Promise<WorktreeCapture | null>;
17
+ /** Reads the compression of a captured tar from its magic bytes (the manifest does not record it). */
18
+ export declare function detectCompression(file: string): Compression;
19
+ /** Extracts a worktree tar into `destDir`; compression is detected from the file when not given. */
20
+ export interface ExtractOptions {
21
+ /** Override zstd binary detection (tests). */
22
+ zstdAvailable?: boolean;
23
+ /** Allow decompressing with Node's zlib when the zstd binary is missing (default true). */
24
+ allowNodeFallback?: boolean;
25
+ }
26
+ export declare function extractWorktree(file: string, destDir: string, compression?: Compression, opts?: ExtractOptions): void;
27
+ /** Opens a readable stream for a captured file, for chunking. */
28
+ export declare function openFile(file: string): NodeJS.ReadableStream;
@@ -0,0 +1,120 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { closeSync, createReadStream, openSync, readFileSync, readSync, rmSync, writeFileSync } from "node:fs";
3
+ import { mkdir, rm } from "node:fs/promises";
4
+ import path from "node:path";
5
+ import zlib from "node:zlib";
6
+ import { binaryAvailable, git } from "./git.js";
7
+ import { DEFAULT_EXCLUDES, isExcluded } from "./types.js";
8
+ /**
9
+ * The tracked-but-modified and untracked files of a repository, minus excluded
10
+ * paths and anything git ignores (unless force-included). This is the dirty
11
+ * state a plain clone would not reproduce.
12
+ */
13
+ export function dirtyPaths(repoDir, ignoredIncludes = []) {
14
+ const modified = git(["diff", "--name-only", "HEAD"], repoDir);
15
+ const untracked = git(["ls-files", "--others", "--exclude-standard"], repoDir);
16
+ const set = new Set();
17
+ for (const out of [modified, untracked]) {
18
+ if (!out.ok)
19
+ continue;
20
+ for (const raw of out.stdout.split("\n")) {
21
+ const p = raw.trim();
22
+ if (p && !isExcluded(p))
23
+ set.add(p);
24
+ }
25
+ }
26
+ // A repo with no commits yet: capture everything git would track.
27
+ if (!git(["rev-parse", "--verify", "HEAD"], repoDir).ok) {
28
+ const all = git(["ls-files", "--others", "--exclude-standard", "--cached"], repoDir);
29
+ if (all.ok)
30
+ for (const raw of all.stdout.split("\n")) {
31
+ const p = raw.trim();
32
+ if (p && !isExcluded(p))
33
+ set.add(p);
34
+ }
35
+ }
36
+ for (const pattern of ignoredIncludes) {
37
+ const forced = git(["ls-files", "--others", "--ignored", "--exclude-standard", "--", pattern], repoDir);
38
+ if (forced.ok)
39
+ for (const raw of forced.stdout.split("\n")) {
40
+ const p = raw.trim();
41
+ if (p && !isExcluded(p, DEFAULT_EXCLUDES.filter((e) => !matchesForce(pattern, e))))
42
+ set.add(p);
43
+ }
44
+ }
45
+ return [...set].sort();
46
+ }
47
+ function matchesForce(pattern, exclude) {
48
+ return pattern === exclude || pattern.replace(/\/$/, "") === exclude.replace(/\/$/, "");
49
+ }
50
+ export function pickCompression() {
51
+ return binaryAvailable("zstd") ? "zstd" : "gzip";
52
+ }
53
+ /** Tars the given repo-relative paths into `outFile`, compressed. Empty list → null. */
54
+ export async function captureWorktree(repoDir, paths, outFile, compression = pickCompression()) {
55
+ if (paths.length === 0)
56
+ return null;
57
+ await mkdir(path.dirname(outFile), { recursive: true });
58
+ const flag = compression === "zstd" ? "--zstd" : "--gzip";
59
+ // -T - reads the file list from stdin (NUL-safe), so odd filenames survive.
60
+ const res = spawnSync("tar", ["-c", flag, "-f", outFile, "-C", repoDir, "--null", "-T", "-"], {
61
+ input: `${paths.join("\0")}\0`,
62
+ maxBuffer: 64 * 1024 * 1024,
63
+ });
64
+ if (res.status !== 0) {
65
+ await rm(outFile, { force: true });
66
+ throw new Error(`tar failed for ${repoDir}: ${res.stderr?.toString().trim()}`);
67
+ }
68
+ return { file: outFile, compression, entries: paths.length, paths };
69
+ }
70
+ /** Reads the compression of a captured tar from its magic bytes (the manifest does not record it). */
71
+ export function detectCompression(file) {
72
+ const fd = openSync(file, "r");
73
+ try {
74
+ const head = Buffer.alloc(4);
75
+ const n = readSync(fd, head, 0, 4, 0);
76
+ if (n >= 4 && head[0] === 0x28 && head[1] === 0xb5 && head[2] === 0x2f && head[3] === 0xfd)
77
+ return "zstd";
78
+ return "gzip";
79
+ }
80
+ finally {
81
+ closeSync(fd);
82
+ }
83
+ }
84
+ export function extractWorktree(file, destDir, compression = detectCompression(file), opts = {}) {
85
+ if (compression === "zstd") {
86
+ const haveBinary = opts.zstdAvailable ?? binaryAvailable("zstd");
87
+ if (!haveBinary) {
88
+ const zstdDecompressSync = zlib.zstdDecompressSync;
89
+ if ((opts.allowNodeFallback ?? true) && typeof zstdDecompressSync === "function") {
90
+ // No zstd binary here, but this Node can inflate zstd itself.
91
+ const plain = `${file}.tar`;
92
+ writeFileSync(plain, zstdDecompressSync(readFileSync(file)));
93
+ try {
94
+ extractPlainTar(plain, destDir);
95
+ }
96
+ finally {
97
+ rmSync(plain, { force: true });
98
+ }
99
+ return;
100
+ }
101
+ throw new Error("this capsule's worktree is zstd-compressed but the 'zstd' binary is not installed on this machine " +
102
+ "(install it: `brew install zstd` on macOS, `apt install zstd` on Debian/Ubuntu) and this Node version " +
103
+ "cannot decompress zstd itself (needs zlib.zstdDecompressSync).");
104
+ }
105
+ }
106
+ const flag = compression === "zstd" ? "--zstd" : "--gzip";
107
+ const res = spawnSync("tar", ["-x", flag, "-f", file, "-C", destDir], { maxBuffer: 64 * 1024 * 1024 });
108
+ if (res.status !== 0)
109
+ throw new Error(`tar extract failed: ${res.stderr?.toString().trim()}`);
110
+ }
111
+ function extractPlainTar(file, destDir) {
112
+ const res = spawnSync("tar", ["-x", "-f", file, "-C", destDir], { maxBuffer: 64 * 1024 * 1024 });
113
+ if (res.status !== 0)
114
+ throw new Error(`tar extract failed: ${res.stderr?.toString().trim()}`);
115
+ }
116
+ /** Opens a readable stream for a captured file, for chunking. */
117
+ export function openFile(file) {
118
+ return createReadStream(file);
119
+ }
120
+ //# sourceMappingURL=worktree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../src/teleport/worktree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAA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json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyditto/cli",
3
- "version": "2.4.1",
3
+ "version": "2.5.1",
4
4
  "description": "Ditto Memory CLI — save, search, fetch, and traverse the Ditto memory graph from the shell.",
5
5
  "type": "module",
6
6
  "bin": {