cortad 0.1.2 → 0.1.3

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 (2) hide show
  1. package/local.mjs +6 -0
  2. package/package.json +1 -1
package/local.mjs CHANGED
@@ -59,6 +59,11 @@ const SKIP_DIR = /^(node_modules|\.git|dist|build|out|coverage|vendor|venv|\.ven
59
59
  // Env files by any name (scripts/books.env is one), keys, and data rather than code.
60
60
  const SKIP_FILE = /^\.env(\..*)?$|^\.envrc$|\.env$|\.(pem|key|p12|pfx|jks|keystore|sqlite|sqlite3|db|log|lock|map|zip|tar|gz|tgz|7z|rar|png|jpe?g|gif|webp|ico|svg|mp3|mp4|wav|mov|pdf|woff2?|ttf|otf|eot|bin|exe|dll|so|dylib|wasm|onnx|pt|pth|safetensors|parquet|csv|tsv|jsonl|ndjson|xlsx?|numbers|DS_Store)$/i;
61
61
  const MAX_FILE = 1_000_000;
62
+ // A JSON or YAML file this large is a dataset (exports, catalogues, fixtures), not code or a prompt,
63
+ // and datasets are where projects keep what they would never paste into a chat.
64
+ const MAX_DATA = 200_000;
65
+ const DATA_FILE = /\.(json|ya?ml)$/i;
66
+ const MANIFEST_FILE = /^(package|tsconfig|composer|app|manifest)\.json$/i;
62
67
  const MAX_TOTAL = 80_000_000;
63
68
  const ENV_FILE = /^\.env(\.(local|staging|stage|development|dev|test|example|sample))?$/;
64
69
 
@@ -74,6 +79,7 @@ function walk(dir, depth, out, envs, total) {
74
79
  let size;
75
80
  try { size = statSync(full).size; } catch { continue; }
76
81
  if (size > MAX_FILE || total + size > MAX_TOTAL) continue;
82
+ if (size > MAX_DATA && DATA_FILE.test(e.name) && !MANIFEST_FILE.test(e.name)) continue;
77
83
  if (!shareable(relative(root, full))) continue;
78
84
  out.push(relative(root, full));
79
85
  total += size;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortad",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Connects the AI app on your machine to Cortad for test conversations. No dependencies.",
5
5
  "bin": {
6
6
  "cortad": "local.mjs"