project-cypher 0.21.0 → 0.21.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 (2) hide show
  1. package/bin/cypher.js +4 -3
  2. package/package.json +1 -1
package/bin/cypher.js CHANGED
@@ -40,7 +40,7 @@ const listSessions = (cwd, current) => {
40
40
  };
41
41
  const ROOT_TEMPLATE = (machine, ws) => `# Root
42
42
 
43
- You are **Root**, the control assistant for this computer (${machine}). You talk to the user through the Project Cypher phone app. You are not a project and you do not build things yourself: projects have their own chats.
43
+ You are **Root**, the control assistant for this computer (${machine}). You talk to the user through the Project Cypher phone app. Projects have their own chats for building, but you can do anything on this computer the owner asks.
44
44
 
45
45
  Files (this folder): \`projects.json\` is the registry the app reads. \`CLAUDE.md\` is this file: instructions plus your memory.
46
46
  Workspace: ${ws} (new projects are created inside it)
@@ -56,7 +56,7 @@ Workspace: ${ws} (new projects are created inside it)
56
56
  - projects.json must stay valid JSON: read it, change it, write the whole file back.
57
57
  - Replies are short, plain text, for a phone screen.
58
58
  - When a project is added or created, tell the user to open it from the Projects list to build.
59
- - Never run destructive commands. Do not change files outside this folder and the workspace.
59
+ - You are the owner's assistant on their own computer: you may run any command and change any file the user asks for. Be careful with irreversible actions (deleting data, force-pushing) and confirm first when unsure.
60
60
 
61
61
  ## Memory
62
62
  (nothing yet)
@@ -70,6 +70,7 @@ function ensureRoot(workspace) {
70
70
  if (c.workspace !== ws) { c.workspace = ws; save(c); }
71
71
  return ws;
72
72
  }
73
+ // (unused) Root is no longer restricted; kept for reference
73
74
  const ROOT_TOOLS = 'Read,Edit,Write,Glob,Grep,Bash(ls:*),Bash(mkdir:*),Bash(git init:*),Bash(cat:*),Bash(uptime),Bash(df:*),Bash(free:*),Bash(uname:*),Bash(hostname),Bash(whoami),Bash(date),Bash(pwd)';
74
75
  const slug = p => path.basename(p).toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'project';
75
76
  const httpOf = s => s.replace(/\/$/, ''), wsOf = s => httpOf(s).replace(/^http/, 'ws');
@@ -380,7 +381,7 @@ const cmds = {
380
381
  }
381
382
  try { for (const d of fs.readdirSync(path.join(CFG_DIR, 'uploads'))) for (const f of fs.readdirSync(path.join(CFG_DIR, 'uploads', d))) { const fp = path.join(CFG_DIR, 'uploads', d, f); if (Date.now() - fs.statSync(fp).mtimeMs > 7 * 864e5) fs.rmSync(fp, { force: true }); } } catch {}
382
383
  const cfg = load(); const args = ['-p', text, '--output-format', 'stream-json', '--verbose', '--permission-mode', cfg.permissionMode || 'acceptEdits'];
383
- if (proj.root) { const wsd = rawCfg().workspace; args.push('--allowedTools', ROOT_TOOLS); if (wsd) args.push('--add-dir', wsd); }
384
+ if (proj.root) { const wsd = rawCfg().workspace; if (wsd) args.push('--add-dir', wsd); }
384
385
  if (saved.length) args.push('--add-dir', upDir);
385
386
  if (typeof m.model === 'string' && /^[a-z][a-z0-9.\-\[\]]{0,60}$/i.test(m.model) && m.model !== 'default') args.push('--model', m.model);
386
387
  if (cfg.sessions?.[proj.id]) args.push('--resume', cfg.sessions[proj.id]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-cypher",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "Connect your machine's Claude Code projects to the Project Cypher phone app.",
5
5
  "bin": {
6
6
  "cypher": "bin/cypher.js"