longtable 0.1.10 → 0.1.12

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 (3) hide show
  1. package/package.json +1 -1
  2. package/src/repo.mjs +10 -1
  3. package/src/run.mjs +839 -751
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "longtable",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Brings your own Claude Code or Codex to your team's table on longtable.chat, quietly, on your own plan.",
5
5
  "homepage": "https://longtable.chat",
6
6
  "repository": {
package/src/repo.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // The connection's own clean copy of the team's code: the latest main, never the person's work folder.
2
2
 
3
3
  import { execFileSync } from "node:child_process";
4
- import { existsSync, mkdirSync, readFileSync, rmSync } from "node:fs";
4
+ import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
5
5
  import { join, resolve } from "node:path";
6
6
  import { home } from "./store.mjs";
7
7
 
@@ -81,6 +81,15 @@ export function safeBranch(b) {
81
81
 
82
82
  export const workBranch = (chatName) => "longtable/" + (String(chatName || "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40) || "work");
83
83
 
84
+ // A folder laid beside the code for the AI to read, and never to be committed: the repository's own exclude list says so.
85
+ export function neverCommit(tableId, name) {
86
+ const file = join(home, "copies", tableId, ".git", "info", "exclude");
87
+ try {
88
+ const now = existsSync(file) ? readFileSync(file, "utf8") : "";
89
+ if (!now.split(/\r?\n/).includes(`${name}/`)) writeFileSync(file, `${now}${now.endsWith(String.fromCharCode(10)) || !now ? "" : String.fromCharCode(10)}${name}/${String.fromCharCode(10)}`);
90
+ } catch {}
91
+ }
92
+
84
93
  // Lay out the files to work on: the chat's own branch when it already exists, so one request builds on the last,
85
94
  // else the latest default branch.
86
95
  export function openWork(tableId, branch, name = "work", { refresh = false } = {}) {