zilmate 1.6.0 → 1.6.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zilmate",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "ZilMate CLI multi-agent assistant for ZiloShift workflows.",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
@@ -78,6 +78,7 @@
78
78
  "files": [
79
79
  "dist",
80
80
  "src/doc",
81
+ "scripts/",
81
82
  "agent-docs.md",
82
83
  "README.md",
83
84
  ".env.example",
@@ -0,0 +1,42 @@
1
+ // postinstall.mjs
2
+ import { mkdir, writeFile } from 'node:fs/promises';
3
+ import { existsSync } from 'node:fs';
4
+ import path from 'node:path';
5
+ import { homedir } from 'node:os';
6
+
7
+ const root = process.env.ZILMATE_WORKSPACE?.trim()
8
+ ? path.resolve(process.env.ZILMATE_WORKSPACE.trim())
9
+ : process.platform === 'win32' || process.platform === 'darwin'
10
+ ? path.join(homedir(), 'Downloads', 'ZilMate')
11
+ : path.join(homedir(), 'ZilMate');
12
+
13
+ const dirs = [
14
+ root,
15
+ path.join(root, 'skills'),
16
+ path.join(root, 'outputs', 'osint'),
17
+ path.join(root, 'outputs', 'pentest'),
18
+ path.join(root, 'outputs', 'images'),
19
+ path.join(root, 'logs'),
20
+ path.join(root, 'projects'),
21
+ path.join(root, 'attachments'),
22
+ path.join(root, 'backups'),
23
+ path.join(root, 'config'),
24
+ path.join(root, 'scratch'),
25
+ path.join(root, 'data'),
26
+ ];
27
+
28
+ for (const dir of dirs) {
29
+ await mkdir(dir, { recursive: true });
30
+ }
31
+
32
+ const notebook = path.join(root, 'notebook.md');
33
+ if (!existsSync(notebook)) {
34
+ await writeFile(notebook, '# ZilMate Notebook\n\n', 'utf8');
35
+ }
36
+
37
+ const memory = path.join(root, 'memory.json');
38
+ if (!existsSync(memory)) {
39
+ await writeFile(memory, '[]\n', 'utf8');
40
+ }
41
+
42
+ console.log(`ZilMate workspace ready at ${root}`);
@@ -0,0 +1,90 @@
1
+ import { execFileSync } from 'node:child_process';
2
+ import { readFileSync, writeFileSync } from 'node:fs';
3
+ import { join } from 'node:path';
4
+ import { tmpdir } from 'node:os';
5
+
6
+ const args = new Set(process.argv.slice(2));
7
+ const dryRun = args.has('--dry-run');
8
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
9
+ const version = pkg.version;
10
+ const tag = `v${version}`;
11
+ const title = `ZilMate ${tag}`;
12
+
13
+ const notes = `# ${title}
14
+
15
+ ZilMate ${tag} — workspace-first assistant with merge setup, documents, skills.sh, heal, and richer CLI UX.
16
+
17
+ ## Install
18
+
19
+ \`\`\`powershell
20
+ npm install -g zilmate@${version}
21
+ zilmate setup
22
+ zilmate doctor --live
23
+ \`\`\`
24
+
25
+ ## Highlights
26
+
27
+ - **Merge setup** — \`zilmate setup\` preserves existing \`.env\` values; only adds missing keys.
28
+ - **ZilMate workspace** — \`~/Downloads/ZilMate\` with notebook, knowledge graph, skills, outputs, logs.
29
+ - **PDF & slide decks** — \`generatePdf\` / \`generateSlideDeck\` tools (Kimi-style .pptx + reports).
30
+ - **skills.sh ecosystem** — \`searchSkillsRegistry\` + \`installRegistrySkill\` via \`npx skills\`.
31
+ - **Powerful heal** — two-pass session review: memory, contacts, projects, action items, friction log.
32
+ - **Desktop notifications** — agent can toast the user when approval or attention is needed.
33
+ - **CLI UX** — spinner while thinking, arrow/space selection for agent questions.
34
+ - **QStash + Cloudflare** — optional tunnel during setup; \`zilmate jobs listen --tunnel\`.
35
+
36
+ ## Quick Checks
37
+
38
+ \`\`\`powershell
39
+ zilmate workspace
40
+ zilmate heal "session summary"
41
+ zilmate jobs listen --tunnel
42
+ \`\`\`
43
+
44
+ ## npm
45
+
46
+ Published package: \`zilmate@${version}\`
47
+ `;
48
+
49
+ const run = (command, commandArgs, options = {}) => {
50
+ return execFileSync(command, commandArgs, {
51
+ encoding: 'utf8',
52
+ stdio: options.stdio ?? 'pipe',
53
+ ...options,
54
+ });
55
+ };
56
+
57
+ if (dryRun) {
58
+ console.log(`Tag: ${tag}`);
59
+ console.log(`Title: ${title}`);
60
+ console.log('');
61
+ console.log(notes);
62
+ process.exit(0);
63
+ }
64
+
65
+ try {
66
+ run('gh', ['auth', 'status'], { stdio: 'pipe' });
67
+ } catch {
68
+ console.error('GitHub CLI is not authenticated. Run: gh auth login -h github.com');
69
+ process.exit(1);
70
+ }
71
+
72
+ const notesPath = join(tmpdir(), `zilmate-${version}-github-release.md`);
73
+ writeFileSync(notesPath, notes);
74
+
75
+ run(
76
+ 'gh',
77
+ [
78
+ 'release',
79
+ 'create',
80
+ tag,
81
+ '--repo',
82
+ 'zester4/zilo-manager',
83
+ '--title',
84
+ title,
85
+ '--notes-file',
86
+ notesPath,
87
+ '--latest',
88
+ ],
89
+ { stdio: 'inherit' },
90
+ );