shadok-ai 0.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.
Files changed (66) hide show
  1. package/README.md +196 -0
  2. package/dist/args.d.ts +8 -0
  3. package/dist/args.js +17 -0
  4. package/dist/args.js.map +1 -0
  5. package/dist/channels.d.ts +61 -0
  6. package/dist/channels.js +169 -0
  7. package/dist/channels.js.map +1 -0
  8. package/dist/cli.d.ts +2 -0
  9. package/dist/cli.js +100 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/config.d.ts +31 -0
  12. package/dist/config.js +59 -0
  13. package/dist/config.js.map +1 -0
  14. package/dist/detect.d.ts +17 -0
  15. package/dist/detect.js +41 -0
  16. package/dist/detect.js.map +1 -0
  17. package/dist/extract.d.ts +55 -0
  18. package/dist/extract.js +269 -0
  19. package/dist/extract.js.map +1 -0
  20. package/dist/main.d.ts +2 -0
  21. package/dist/main.js +90 -0
  22. package/dist/main.js.map +1 -0
  23. package/dist/pace.d.ts +33 -0
  24. package/dist/pace.js +53 -0
  25. package/dist/pace.js.map +1 -0
  26. package/dist/retry.d.ts +15 -0
  27. package/dist/retry.js +40 -0
  28. package/dist/retry.js.map +1 -0
  29. package/dist/secrets.d.ts +21 -0
  30. package/dist/secrets.js +71 -0
  31. package/dist/secrets.js.map +1 -0
  32. package/dist/server.d.ts +1 -0
  33. package/dist/server.js +854 -0
  34. package/dist/server.js.map +1 -0
  35. package/dist/session.d.ts +74 -0
  36. package/dist/session.js +244 -0
  37. package/dist/session.js.map +1 -0
  38. package/dist/setup-prompt.d.ts +6 -0
  39. package/dist/setup-prompt.js +25 -0
  40. package/dist/setup-prompt.js.map +1 -0
  41. package/dist/supervisor.d.ts +55 -0
  42. package/dist/supervisor.js +61 -0
  43. package/dist/supervisor.js.map +1 -0
  44. package/dist/tail.d.ts +66 -0
  45. package/dist/tail.js +244 -0
  46. package/dist/tail.js.map +1 -0
  47. package/dist/telegram.d.ts +48 -0
  48. package/dist/telegram.js +565 -0
  49. package/dist/telegram.js.map +1 -0
  50. package/dist/tmux.d.ts +69 -0
  51. package/dist/tmux.js +267 -0
  52. package/dist/tmux.js.map +1 -0
  53. package/dist/update-flag.d.ts +13 -0
  54. package/dist/update-flag.js +36 -0
  55. package/dist/update-flag.js.map +1 -0
  56. package/dist/updater.d.ts +18 -0
  57. package/dist/updater.js +45 -0
  58. package/dist/updater.js.map +1 -0
  59. package/dist/usage.d.ts +23 -0
  60. package/dist/usage.js +125 -0
  61. package/dist/usage.js.map +1 -0
  62. package/dist/worktree.d.ts +63 -0
  63. package/dist/worktree.js +153 -0
  64. package/dist/worktree.js.map +1 -0
  65. package/package.json +44 -0
  66. package/public/index.html +2583 -0
@@ -0,0 +1,63 @@
1
+ export interface Worktree {
2
+ /** Working directory of the isolated checkout. */
3
+ path: string;
4
+ /** Branch created for this session. */
5
+ branch: string;
6
+ /** Commit the branch forked from (diff baseline). */
7
+ baseSha: string;
8
+ /** The original repository the worktree belongs to. */
9
+ repo: string;
10
+ }
11
+ /** True if `cwd` is inside a git working tree. */
12
+ export declare function isGitRepo(cwd: string): boolean;
13
+ /**
14
+ * Creates an isolated git worktree off the repo's current HEAD, on a fresh
15
+ * branch, so an agent's edits stay contained until the user merges them.
16
+ * The checkout lives under ~/.shadok-ai/worktrees to avoid polluting the repo.
17
+ */
18
+ export declare function createWorktree(repo: string, tag: string): Worktree;
19
+ /**
20
+ * Removes a worktree only if it has no uncommitted changes (git refuses a
21
+ * dirty removal without --force, which we intentionally don't pass — work is
22
+ * never discarded automatically).
23
+ */
24
+ export declare function removeWorktreeIfClean(wt: Worktree): void;
25
+ /**
26
+ * Ensures a worktree checkout exists at `dir` for `branch`, recreating it
27
+ * from the branch if it was removed. Lets a past session be reopened even
28
+ * after its folder was reclaimed (the branch always survives).
29
+ */
30
+ export declare function ensureWorktreeCheckout(repo: string, branch: string, dir: string): boolean;
31
+ export interface PastSession {
32
+ branch: string;
33
+ /** Full session id (from the transcript), or null if none was recorded. */
34
+ sessionId: string | null;
35
+ /** Worktree checkout path (may not exist on disk). */
36
+ cwd: string;
37
+ dirExists: boolean;
38
+ /** First user prompt of the session, for recognition. */
39
+ preview: string;
40
+ /** Commits ahead of the base branch. */
41
+ commits: number;
42
+ /** Whether the branch has any diff vs the base. */
43
+ hasChanges: boolean;
44
+ /** Last activity (ms since epoch). */
45
+ mtime: number;
46
+ }
47
+ /**
48
+ * Lists every past shadok-ai worktree session of a repo — recoverable from
49
+ * their branch even if the checkout was reclaimed — newest first, so
50
+ * unfinished work can be reopened and continued.
51
+ */
52
+ export declare function listPastSessions(repo: string): PastSession[];
53
+ export interface DiffResult {
54
+ status: string;
55
+ diff: string;
56
+ branch: string | null;
57
+ }
58
+ /**
59
+ * Returns the changes made in `cwd`: `git status` plus the full diff. With a
60
+ * known baseline (worktree), diffs against the fork point so committed work
61
+ * shows too; otherwise diffs the working tree against HEAD.
62
+ */
63
+ export declare function gitDiff(cwd: string, baseSha?: string | null): DiffResult;
@@ -0,0 +1,153 @@
1
+ import { execFileSync } from "node:child_process";
2
+ import fs from "node:fs";
3
+ import os from "node:os";
4
+ import path from "node:path";
5
+ import { listSessions } from "./extract.js";
6
+ function git(cwd, args) {
7
+ return execFileSync("git", ["-C", cwd, ...args], {
8
+ encoding: "utf8",
9
+ timeout: 15_000,
10
+ maxBuffer: 16 * 1024 * 1024,
11
+ stdio: ["ignore", "pipe", "pipe"],
12
+ }).trimEnd();
13
+ }
14
+ /** True if `cwd` is inside a git working tree. */
15
+ export function isGitRepo(cwd) {
16
+ try {
17
+ return git(cwd, ["rev-parse", "--is-inside-work-tree"]) === "true";
18
+ }
19
+ catch {
20
+ return false;
21
+ }
22
+ }
23
+ /**
24
+ * Creates an isolated git worktree off the repo's current HEAD, on a fresh
25
+ * branch, so an agent's edits stay contained until the user merges them.
26
+ * The checkout lives under ~/.shadok-ai/worktrees to avoid polluting the repo.
27
+ */
28
+ export function createWorktree(repo, tag) {
29
+ const baseSha = git(repo, ["rev-parse", "HEAD"]);
30
+ const repoName = path.basename(path.resolve(repo)).replace(/[^a-zA-Z0-9._-]/g, "-");
31
+ const branch = `shadok-ai/${tag}`;
32
+ const dir = path.join(os.homedir(), ".shadok-ai", "worktrees", `${repoName}-${tag}`);
33
+ fs.mkdirSync(path.dirname(dir), { recursive: true });
34
+ git(repo, ["worktree", "add", "-b", branch, dir, baseSha]);
35
+ return { path: dir, branch, baseSha, repo };
36
+ }
37
+ /**
38
+ * Removes a worktree only if it has no uncommitted changes (git refuses a
39
+ * dirty removal without --force, which we intentionally don't pass — work is
40
+ * never discarded automatically).
41
+ */
42
+ export function removeWorktreeIfClean(wt) {
43
+ try {
44
+ git(wt.repo, ["worktree", "remove", wt.path]);
45
+ }
46
+ catch {
47
+ // Dirty or has commits: leave it in place for the user to merge/inspect.
48
+ }
49
+ }
50
+ /**
51
+ * Ensures a worktree checkout exists at `dir` for `branch`, recreating it
52
+ * from the branch if it was removed. Lets a past session be reopened even
53
+ * after its folder was reclaimed (the branch always survives).
54
+ */
55
+ export function ensureWorktreeCheckout(repo, branch, dir) {
56
+ if (fs.existsSync(dir))
57
+ return true;
58
+ try {
59
+ fs.mkdirSync(path.dirname(dir), { recursive: true });
60
+ git(repo, ["worktree", "add", dir, branch]);
61
+ return true;
62
+ }
63
+ catch {
64
+ return false;
65
+ }
66
+ }
67
+ /**
68
+ * Lists every past shadok-ai worktree session of a repo — recoverable from
69
+ * their branch even if the checkout was reclaimed — newest first, so
70
+ * unfinished work can be reopened and continued.
71
+ */
72
+ export function listPastSessions(repo) {
73
+ let base = "main";
74
+ try {
75
+ base = git(repo, ["rev-parse", "--abbrev-ref", "HEAD"]);
76
+ }
77
+ catch {
78
+ return [];
79
+ }
80
+ let branches;
81
+ try {
82
+ branches = git(repo, ["branch", "--list", "shadok-ai/*", "--format=%(refname:short)"])
83
+ .split("\n")
84
+ .filter(Boolean);
85
+ }
86
+ catch {
87
+ return [];
88
+ }
89
+ const repoName = path.basename(path.resolve(repo)).replace(/[^a-zA-Z0-9._-]/g, "-");
90
+ const out = [];
91
+ for (const branch of branches) {
92
+ const tag = branch.replace(/^shadok-ai\//, "");
93
+ const cwd = path.join(os.homedir(), ".shadok-ai", "worktrees", `${repoName}-${tag}`);
94
+ // The transcript lives in the worktree's project dir even if the checkout
95
+ // was removed — read the full session id and preview from there.
96
+ const sess = listSessions(cwd)[0] ?? null;
97
+ let commits = 0;
98
+ let hasChanges = false;
99
+ try {
100
+ commits = Number(git(repo, ["rev-list", "--count", `${base}..${branch}`]) || "0");
101
+ hasChanges = git(repo, ["diff", "--shortstat", base, branch]).trim() !== "";
102
+ }
103
+ catch {
104
+ // ignore
105
+ }
106
+ out.push({
107
+ branch,
108
+ sessionId: sess?.id ?? null,
109
+ cwd,
110
+ dirExists: fs.existsSync(cwd),
111
+ preview: sess?.preview ?? "",
112
+ commits,
113
+ hasChanges,
114
+ mtime: sess?.mtime ?? 0,
115
+ });
116
+ }
117
+ return out.sort((a, b) => b.mtime - a.mtime);
118
+ }
119
+ /**
120
+ * Returns the changes made in `cwd`: `git status` plus the full diff. With a
121
+ * known baseline (worktree), diffs against the fork point so committed work
122
+ * shows too; otherwise diffs the working tree against HEAD.
123
+ */
124
+ export function gitDiff(cwd, baseSha) {
125
+ let status = "", diff = "", branch = null;
126
+ try {
127
+ branch = git(cwd, ["rev-parse", "--abbrev-ref", "HEAD"]);
128
+ status = git(cwd, ["status", "--short"]);
129
+ diff = git(cwd, ["diff", baseSha ?? "HEAD"]);
130
+ // Include untracked files (diff doesn't show them).
131
+ const untracked = git(cwd, ["ls-files", "--others", "--exclude-standard"])
132
+ .split("\n")
133
+ .filter(Boolean);
134
+ if (untracked.length) {
135
+ const shown = untracked.map((f) => {
136
+ try {
137
+ const body = git(cwd, ["diff", "--no-index", "/dev/null", f]);
138
+ return body;
139
+ }
140
+ catch (e) {
141
+ // --no-index exits non-zero when files differ; its stdout has the diff.
142
+ return e?.stdout ? String(e.stdout).trimEnd() : `+++ ${f} (untracked)`;
143
+ }
144
+ });
145
+ diff = [diff, ...shown].filter(Boolean).join("\n");
146
+ }
147
+ }
148
+ catch {
149
+ // not a repo, or git error — return whatever we gathered
150
+ }
151
+ return { status, diff, branch };
152
+ }
153
+ //# sourceMappingURL=worktree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree.js","sourceRoot":"","sources":["../src/worktree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAa5C,SAAS,GAAG,CAAC,GAAW,EAAE,IAAc;IACtC,OAAO,YAAY,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,EAAE;QAC/C,QAAQ,EAAE,MAAM;QAChB,OAAO,EAAE,MAAM;QACf,SAAS,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;QAC3B,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;KAClC,CAAC,CAAC,OAAO,EAAE,CAAC;AACf,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,IAAI,CAAC;QACH,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC,KAAK,MAAM,CAAC;IACrE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC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AI,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC;QAC7C,oDAAoD;QACpD,MAAM,SAAS,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC;aACvE,KAAK,CAAC,IAAI,CAAC;aACX,MAAM,CAAC,OAAO,CAAC,CAAC;QACnB,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;YACrB,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBAChC,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;oBAC9D,OAAO,IAAI,CAAC;gBACd,CAAC;gBAAC,OAAO,CAAM,EAAE,CAAC;oBAChB,wEAAwE;oBACxE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;gBACzE,CAAC;YACH,CAAC,CAAC,CAAC;YACH,IAAI,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,yDAAyD;IAC3D,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAClC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "shadok-ai",
3
+ "version": "0.1.0",
4
+ "main": "dist/session.js",
5
+ "scripts": {
6
+ "test": "node --import tsx --test test/*.ts .claude/skills/shadok-ai-agents/test/",
7
+ "build": "tsc",
8
+ "dev": "tsx src/cli.ts",
9
+ "postinstall": "chmod +x node_modules/node-pty/prebuilds/darwin-*/spawn-helper 2>/dev/null || true",
10
+ "prepublishOnly": "npm run build",
11
+ "web": "node dist/server.js"
12
+ },
13
+ "keywords": [],
14
+ "author": "",
15
+ "license": "ISC",
16
+ "description": "Web cockpit that drives multiple real Claude Code TUI sessions in parallel, with Telegram control",
17
+ "type": "module",
18
+ "engines": {
19
+ "node": ">=20"
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "public"
24
+ ],
25
+ "dependencies": {
26
+ "@xterm/headless": "^6.0.0",
27
+ "express": "^5.2.1",
28
+ "marked": "^18.0.6",
29
+ "node-pty": "^1.1.0",
30
+ "ws": "^8.21.1"
31
+ },
32
+ "devDependencies": {
33
+ "@types/express": "^5.0.6",
34
+ "@types/node": "^26.1.1",
35
+ "@types/ws": "^8.18.1",
36
+ "tsx": "^4.23.1",
37
+ "typescript": "^7.0.2"
38
+ },
39
+ "types": "dist/session.d.ts",
40
+ "bin": {
41
+ "shadok-ai": "dist/main.js",
42
+ "shadok-ai-run": "dist/cli.js"
43
+ }
44
+ }