@shinobiapps/shinobi 0.1.3 → 0.1.5

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.
package/SECURITY.md CHANGED
@@ -11,7 +11,7 @@ If you've found a security issue in Shinobi, **please do not open a public
11
11
  GitHub issue**. Instead, email:
12
12
 
13
13
  ```
14
- contact@shinobi-apps.hr
14
+ contact@shinobi-apps.com
15
15
  ```
16
16
 
17
17
  Include:
package/dist/cli.js CHANGED
@@ -38,30 +38,30 @@ function readVersion() {
38
38
  }
39
39
  }
40
40
  function printUsage() {
41
- stdout.write(`shinobi — local-first task spine + memory layer for AI coding agents
42
-
43
- Usage:
44
- shinobi <command> [options]
45
-
46
- Commands:
47
- init Bootstrap ~/.shinobi/ and write MCP config (.mcp.json + .cursor/mcp.json)
48
- init --print-config Print the MCP server JSON snippet to stdout (for Cline / Continue / Zed)
49
- mcp Run the MCP server over stdio (invoked by the MCP client)
50
- migrate Apply pending SQL migrations
51
- sync init <path> [branch] Configure a local git repo as the cross-machine sync target
52
- sync push Snapshot the DB and commit it to the sync repo
53
- sync pull Restore the DB from the sync repo's snapshot
54
- sync status Show last push/pull timestamps and git status
55
- dashboard Start the web dashboard on localhost (default port 8765)
56
- cost ingest [--since H] Parse Claude Code transcripts under ~/.claude/projects/ and upsert per-session AI token cost (USD)
57
- cost ingest --source <dir> Override transcript root (e.g. another machine's mirrored directory)
58
- digest [--workspace W] [--telegram] Render weekly Markdown summary → ~/.shinobi/digests/YYYY-WW.md
59
- digest --since YYYY-MM-DD --until YYYY-MM-DD Custom window (otherwise last 7 days)
60
-
61
- Options:
62
- --version, -v Print the installed shinobi version and exit
63
- --help, -h Print this help and exit
64
- --force For \`init\`, overwrite an existing .mcp.json or .env
41
+ stdout.write(`shinobi — local-first task spine + memory layer for AI coding agents
42
+
43
+ Usage:
44
+ shinobi <command> [options]
45
+
46
+ Commands:
47
+ init Bootstrap ~/.shinobi/ and write MCP config (.mcp.json + .cursor/mcp.json)
48
+ init --print-config Print the MCP server JSON snippet to stdout (for Cline / Continue / Zed)
49
+ mcp Run the MCP server over stdio (invoked by the MCP client)
50
+ migrate Apply pending SQL migrations
51
+ sync init <path> [branch] Configure a local git repo as the cross-machine sync target
52
+ sync push Snapshot the DB and commit it to the sync repo
53
+ sync pull Restore the DB from the sync repo's snapshot
54
+ sync status Show last push/pull timestamps and git status
55
+ dashboard Start the web dashboard on localhost (default port 8765)
56
+ cost ingest [--since H] Parse Claude Code transcripts under ~/.claude/projects/ and upsert per-session AI token cost (USD)
57
+ cost ingest --source <dir> Override transcript root (e.g. another machine's mirrored directory)
58
+ digest [--workspace W] [--telegram] Render weekly Markdown summary → ~/.shinobi/digests/YYYY-WW.md
59
+ digest --since YYYY-MM-DD --until YYYY-MM-DD Custom window (otherwise last 7 days)
60
+
61
+ Options:
62
+ --version, -v Print the installed shinobi version and exit
63
+ --help, -h Print this help and exit
64
+ --force For \`init\`, overwrite an existing .mcp.json or .env
65
65
  `);
66
66
  }
67
67
  async function runMigrate() {
@@ -5,17 +5,17 @@ import { fileURLToPath } from 'node:url';
5
5
  import { configDir, saveConfig } from '../lib/config.js';
6
6
  import { getDbPath } from '../lib/db.js';
7
7
  import { applyPendingMigrations } from '../lib/migrations.js';
8
- const ENV_TEMPLATE = `# Shinobi configuration — values here are loaded by the CLI/server.
9
- # Uncomment and edit to override defaults.
10
-
11
- # Override the SQLite path (default: ~/.shinobi/shinobi.db)
12
- # SHINOBI_DB_PATH=/path/to/shinobi.db
13
-
14
- # Recall mode: fulltext (default in v0.0.1) or semantic (embeddings, v0.1+)
15
- # SHINOBI_RECALL_MODE=fulltext
16
-
17
- # Override the migrations directory (default: <package>/migrations)
18
- # SHINOBI_MIGRATIONS_DIR=/path/to/migrations
8
+ const ENV_TEMPLATE = `# Shinobi configuration — values here are loaded by the CLI/server.
9
+ # Uncomment and edit to override defaults.
10
+
11
+ # Override the SQLite path (default: ~/.shinobi/shinobi.db)
12
+ # SHINOBI_DB_PATH=/path/to/shinobi.db
13
+
14
+ # Recall mode: fulltext (default in v0.0.1) or semantic (embeddings, v0.1+)
15
+ # SHINOBI_RECALL_MODE=fulltext
16
+
17
+ # Override the migrations directory (default: <package>/migrations)
18
+ # SHINOBI_MIGRATIONS_DIR=/path/to/migrations
19
19
  `;
20
20
  function mcpSnippet() {
21
21
  // Use the running Node binary + the absolute path to this package's CLI
@@ -84,11 +84,11 @@ export function createAuthMiddleware(opts) {
84
84
  const accept = c.req.header('accept') ?? '';
85
85
  if (accept.includes('text/html')) {
86
86
  const hint = escHtml(opts.tokenPath ?? '~/.shinobi/dashboard-token');
87
- return c.html(`<!doctype html><html><head><meta charset="utf-8"><title>Shinobi — unauthorized</title></head>
88
- <body style="font-family:-apple-system,Segoe UI,sans-serif;padding:24px;background:#0f1216;color:#d8dee9">
89
- <h2 style="color:#eceff4">Shinobi dashboard — unauthorized</h2>
90
- <p>Append <code>?token=YOUR_TOKEN</code> once (we set a cookie) or send <code>Authorization: Bearer YOUR_TOKEN</code>.</p>
91
- <p>Token source: env <code>SHINOBI_DASHBOARD_TOKEN</code> or file <code>${hint}</code>.</p>
87
+ return c.html(`<!doctype html><html><head><meta charset="utf-8"><title>Shinobi — unauthorized</title></head>
88
+ <body style="font-family:-apple-system,Segoe UI,sans-serif;padding:24px;background:#0f1216;color:#d8dee9">
89
+ <h2 style="color:#eceff4">Shinobi dashboard — unauthorized</h2>
90
+ <p>Append <code>?token=YOUR_TOKEN</code> once (we set a cookie) or send <code>Authorization: Bearer YOUR_TOKEN</code>.</p>
91
+ <p>Token source: env <code>SHINOBI_DASHBOARD_TOKEN</code> or file <code>${hint}</code>.</p>
92
92
  </body></html>`, 401);
93
93
  }
94
94
  return c.json({ error: 'unauthorized' }, 401);