@mukulaggarwal/pacman 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/README.md +174 -18
- package/dist/{chunk-VCDPIN57.js → chunk-WH3UMGHQ.js} +21 -16
- package/dist/chunk-WH3UMGHQ.js.map +1 -0
- package/dist/index.js +44 -40
- package/dist/index.js.map +1 -1
- package/dist/mcp-compat.js +3 -3
- package/dist/mcp-compat.js.map +1 -1
- package/dist/onboarding-server.js +529 -46
- package/dist/onboarding-server.js.map +1 -1
- package/dist/onboarding-web/assets/index-BOAOMlJT.css +1 -0
- package/dist/onboarding-web/assets/index-DBwmBIzA.js +71 -0
- package/dist/onboarding-web/index.html +5 -5
- package/dist/slack-listener.d.ts +3 -0
- package/dist/slack-listener.js +145 -6
- package/dist/slack-listener.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-VCDPIN57.js.map +0 -1
- package/dist/onboarding-web/assets/index-IBoT-KD4.js +0 -75
- package/dist/onboarding-web/assets/index-ag5J9F2y.css +0 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
installCodexMcp,
|
|
5
5
|
resolvePacmanServerCommand,
|
|
6
6
|
startMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WH3UMGHQ.js";
|
|
8
8
|
import {
|
|
9
9
|
createIndexer
|
|
10
10
|
} from "./chunk-3QNXXON5.js";
|
|
@@ -36,6 +36,8 @@ var TOOL_GROUPS = [
|
|
|
36
36
|
"- Sync: `sync_run_now`, `sync_status`, `sync_list_integrations`",
|
|
37
37
|
"- Events: `events_ping`"
|
|
38
38
|
];
|
|
39
|
+
var MCP_SERVER_NAME = "pacman";
|
|
40
|
+
var CLAUDE_START_COMMAND = "/pacman start <project_name>";
|
|
39
41
|
function getStorageDescription(config) {
|
|
40
42
|
return config.storage.mode === "local" ? `Local workspace at: ${config.storage.workspacePath}` : `Google Drive folder: ${config.storage.folderName} (ID: ${config.storage.folderId})`;
|
|
41
43
|
}
|
|
@@ -58,7 +60,7 @@ Read context in this order:
|
|
|
58
60
|
## Retrieval rule
|
|
59
61
|
|
|
60
62
|
When the user asks about responsibilities, projects, stakeholders, status, history, routines, or prior decisions:
|
|
61
|
-
- Call the
|
|
63
|
+
- Call the Pac-Man MCP tools first
|
|
62
64
|
- Use \`context_search\` to find relevant files
|
|
63
65
|
- Use \`context_read_file\` or \`context_read_section\` for specific content
|
|
64
66
|
- Answer only from retrieved context files
|
|
@@ -80,7 +82,7 @@ When the conversation creates stable new context (new ownership, priority change
|
|
|
80
82
|
|
|
81
83
|
## MCP usage
|
|
82
84
|
|
|
83
|
-
This project uses the
|
|
85
|
+
This project uses the Pac-Man MCP server. All context operations go through MCP tools:
|
|
84
86
|
${TOOL_GROUPS.join("\n")}
|
|
85
87
|
|
|
86
88
|
## User profile
|
|
@@ -91,14 +93,14 @@ ${TOOL_GROUPS.join("\n")}
|
|
|
91
93
|
`;
|
|
92
94
|
}
|
|
93
95
|
function buildClaudeProjectMemory(config) {
|
|
94
|
-
return `#
|
|
96
|
+
return `# Pac-Man Project Rules
|
|
95
97
|
|
|
96
98
|
This project uses a local or Google Drive based context manager.
|
|
97
99
|
|
|
98
100
|
${buildSharedProjectSections(config)}`;
|
|
99
101
|
}
|
|
100
102
|
function buildCodexProjectGuidance(config) {
|
|
101
|
-
return `#
|
|
103
|
+
return `# Pac-Man Project Instructions
|
|
102
104
|
|
|
103
105
|
This repository uses a local or Google Drive based context manager.
|
|
104
106
|
|
|
@@ -106,30 +108,30 @@ ${buildSharedProjectSections(config)}
|
|
|
106
108
|
|
|
107
109
|
## Codex startup rule
|
|
108
110
|
|
|
109
|
-
- If
|
|
111
|
+
- If Pac-Man MCP tools are unavailable, tell the user to run \`pacman mcp codex install\`
|
|
110
112
|
- If the package is not installed globally, show the fallback command:
|
|
111
|
-
\`codex mcp add
|
|
113
|
+
\`codex mcp add ${MCP_SERVER_NAME} --env PA_WORKSPACE=$HOME/.personal-assistant -- npx -y pacman mcp serve\`
|
|
112
114
|
- Tell the user to restart Codex after installing or updating the MCP registration
|
|
113
115
|
`;
|
|
114
116
|
}
|
|
115
117
|
function buildClaudeSkillContent() {
|
|
116
118
|
return `---
|
|
117
|
-
name:
|
|
118
|
-
description: Start the
|
|
119
|
+
name: pacman
|
|
120
|
+
description: Start the Pac-Man workflow for a project using local or Google Drive context through MCP.
|
|
119
121
|
argument-hint: start [project_name]
|
|
120
|
-
allowed-tools:
|
|
122
|
+
allowed-tools: mcp__pacman__*
|
|
121
123
|
---
|
|
122
124
|
|
|
123
|
-
#
|
|
125
|
+
# Pac-Man Skill
|
|
124
126
|
|
|
125
|
-
When this skill is invoked with
|
|
127
|
+
When this skill is invoked with \`${CLAUDE_START_COMMAND}\`:
|
|
126
128
|
|
|
127
129
|
## Steps
|
|
128
130
|
|
|
129
131
|
1. **Check MCP availability**:
|
|
130
|
-
- If
|
|
132
|
+
- If Pac-Man MCP tools are unavailable, stop and tell the user to install them with \`pacman mcp claude install\`
|
|
131
133
|
- If the package is not installed globally, show the fallback command:
|
|
132
|
-
\`claude mcp add -s user --env=PA_WORKSPACE=$HOME/.personal-assistant
|
|
134
|
+
\`claude mcp add -s user --env=PA_WORKSPACE=$HOME/.personal-assistant ${MCP_SERVER_NAME} -- npx -y pacman mcp serve\`
|
|
133
135
|
- Tell the user to restart Claude Code after installing or updating the MCP registration
|
|
134
136
|
|
|
135
137
|
2. **Check MCP health**:
|
|
@@ -170,20 +172,20 @@ When this skill is invoked with \`/personal-assistant start <project_name>\`:
|
|
|
170
172
|
}
|
|
171
173
|
function buildCodexSkillContent() {
|
|
172
174
|
return `---
|
|
173
|
-
name:
|
|
174
|
-
description: Use when the user asks to start, load, refresh, or inspect
|
|
175
|
+
name: pacman
|
|
176
|
+
description: Use when the user asks to start, load, refresh, or inspect Pac-Man project context stored through the Pac-Man MCP workspace.
|
|
175
177
|
---
|
|
176
178
|
|
|
177
|
-
#
|
|
179
|
+
# Pac-Man
|
|
178
180
|
|
|
179
|
-
Use this skill when the user asks to load or refresh
|
|
181
|
+
Use this skill when the user asks to load or refresh Pac-Man context for a project.
|
|
180
182
|
|
|
181
183
|
## Steps
|
|
182
184
|
|
|
183
185
|
1. **Check MCP availability**:
|
|
184
|
-
- If
|
|
186
|
+
- If Pac-Man MCP tools are unavailable, stop and tell the user to install them with \`pacman mcp codex install\`
|
|
185
187
|
- If the package is not installed globally, show the fallback command:
|
|
186
|
-
\`codex mcp add
|
|
188
|
+
\`codex mcp add ${MCP_SERVER_NAME} --env PA_WORKSPACE=$HOME/.personal-assistant -- npx -y pacman mcp serve\`
|
|
187
189
|
- Tell the user to restart Codex after installing or updating the MCP registration
|
|
188
190
|
|
|
189
191
|
2. **Check MCP health**:
|
|
@@ -234,12 +236,14 @@ async function generateClaudeMd(projectPath, config) {
|
|
|
234
236
|
await fs.writeFile(path.join(projectPath, "CLAUDE.md"), buildClaudeProjectMemory(config), "utf-8");
|
|
235
237
|
}
|
|
236
238
|
async function generateGlobalSkill() {
|
|
237
|
-
const
|
|
239
|
+
const skillsRoot = path.join(
|
|
238
240
|
process.env.HOME ?? process.env.USERPROFILE ?? "~",
|
|
239
241
|
".claude",
|
|
240
|
-
"skills"
|
|
241
|
-
"personal-assistant"
|
|
242
|
+
"skills"
|
|
242
243
|
);
|
|
244
|
+
const legacySkillDir = path.join(skillsRoot, "personal-assistant");
|
|
245
|
+
const globalSkillDir = path.join(skillsRoot, "pacman");
|
|
246
|
+
await fs.rm(legacySkillDir, { recursive: true, force: true });
|
|
243
247
|
await fs.mkdir(globalSkillDir, { recursive: true });
|
|
244
248
|
await fs.writeFile(path.join(globalSkillDir, "SKILL.md"), buildClaudeSkillContent(), "utf-8");
|
|
245
249
|
}
|
|
@@ -263,12 +267,14 @@ async function generateAgentsMd(projectPath, config) {
|
|
|
263
267
|
);
|
|
264
268
|
}
|
|
265
269
|
async function generateGlobalSkill2() {
|
|
266
|
-
const
|
|
270
|
+
const skillsRoot = path2.join(
|
|
267
271
|
process.env.HOME ?? process.env.USERPROFILE ?? "~",
|
|
268
272
|
".codex",
|
|
269
|
-
"skills"
|
|
270
|
-
"personal-assistant"
|
|
273
|
+
"skills"
|
|
271
274
|
);
|
|
275
|
+
const legacySkillDir = path2.join(skillsRoot, "personal-assistant");
|
|
276
|
+
const globalSkillDir = path2.join(skillsRoot, "pacman");
|
|
277
|
+
await fs2.rm(legacySkillDir, { recursive: true, force: true });
|
|
272
278
|
await fs2.mkdir(globalSkillDir, { recursive: true });
|
|
273
279
|
await fs2.writeFile(
|
|
274
280
|
path2.join(globalSkillDir, "SKILL.md"),
|
|
@@ -291,11 +297,11 @@ async function resolveWorkspacePath(dirOpt) {
|
|
|
291
297
|
return path3.resolve(dirOpt);
|
|
292
298
|
}
|
|
293
299
|
var program = new Command();
|
|
294
|
-
program.name("pacman").description("Claude Code and Codex compatible, file-backed personal context manager").version("0.1.
|
|
295
|
-
program.command("init").description("Initialize
|
|
300
|
+
program.name("pacman").description("Claude Code and Codex compatible, file-backed personal context manager").version("0.1.3");
|
|
301
|
+
program.command("init").description("Initialize Pac-Man and open onboarding UI").option("-p, --port <port>", "Port for onboarding server", "3847").option("-d, --dir <dir>", "Workspace directory", ".personal-assistant").action(async (opts) => {
|
|
296
302
|
const workspacePath = path3.resolve(opts.dir);
|
|
297
303
|
const port = parseInt(opts.port, 10);
|
|
298
|
-
console.log(`Initializing
|
|
304
|
+
console.log(`Initializing Pac-Man workspace at ${workspacePath}...`);
|
|
299
305
|
await fs3.mkdir(workspacePath, { recursive: true });
|
|
300
306
|
const storage = createLocalStorage(workspacePath);
|
|
301
307
|
const contextManager = createContextManager(storage);
|
|
@@ -338,13 +344,13 @@ program.command("claude").description("Claude integration management").command("
|
|
|
338
344
|
});
|
|
339
345
|
console.log("Claude Code integration installed:");
|
|
340
346
|
console.log(` - ${projectPath}/CLAUDE.md`);
|
|
341
|
-
console.log(` - ~/.claude/skills/
|
|
347
|
+
console.log(` - ~/.claude/skills/pacman/SKILL.md`);
|
|
342
348
|
console.log("");
|
|
343
349
|
console.log("Next, register the MCP server with:");
|
|
344
350
|
console.log(" pacman mcp claude install");
|
|
345
351
|
console.log("");
|
|
346
352
|
console.log("Restart Claude Code after the MCP install, then use:");
|
|
347
|
-
console.log(" /
|
|
353
|
+
console.log(" /pacman start <project_name>");
|
|
348
354
|
});
|
|
349
355
|
program.command("codex").description("Codex integration management").command("install").description("Install Codex integration (AGENTS.md, skill)").option("-d, --dir <dir>", "Project directory", ".").option("-w, --workspace <workspace>", "Workspace directory", ".personal-assistant").action(async (opts) => {
|
|
350
356
|
const projectPath = path3.resolve(opts.dir);
|
|
@@ -368,38 +374,36 @@ program.command("codex").description("Codex integration management").command("in
|
|
|
368
374
|
});
|
|
369
375
|
console.log("Codex integration installed:");
|
|
370
376
|
console.log(` - ${projectPath}/AGENTS.md`);
|
|
371
|
-
console.log(` - ~/.codex/skills/
|
|
377
|
+
console.log(` - ~/.codex/skills/pacman/SKILL.md`);
|
|
372
378
|
console.log("");
|
|
373
379
|
console.log("Next, register the MCP server with:");
|
|
374
380
|
console.log(" pacman mcp codex install");
|
|
375
381
|
console.log("");
|
|
376
382
|
console.log("Restart Codex after the MCP install, then ask it to load or refresh");
|
|
377
|
-
console.log("your
|
|
383
|
+
console.log("your Pac-Man context for a project.");
|
|
378
384
|
});
|
|
379
385
|
var mcpCommand = program.command("mcp").description("MCP server management");
|
|
380
|
-
mcpCommand.command("serve").description("Start the
|
|
386
|
+
mcpCommand.command("serve").description("Start the Pac-Man MCP server over stdio").option("-w, --workspace <workspace>", "Workspace directory", ".personal-assistant").action(async (opts) => {
|
|
381
387
|
const workspacePath = await resolveWorkspacePath(opts.workspace);
|
|
382
388
|
await startMcpServer(workspacePath);
|
|
383
389
|
});
|
|
384
|
-
mcpCommand.command("claude").description("Claude MCP integration management").command("install").description("Register the
|
|
390
|
+
mcpCommand.command("claude").description("Claude MCP integration management").command("install").description("Register the Pac-Man MCP server with Claude Code").option("-w, --workspace <workspace>", "Workspace directory", ".personal-assistant").action(async (opts) => {
|
|
385
391
|
const workspacePath = await resolveWorkspacePath(opts.workspace);
|
|
386
392
|
await installClaudeMcp(workspacePath, resolvePacmanServerCommand);
|
|
387
393
|
console.log("Claude MCP registration installed:");
|
|
388
394
|
console.log(" - managed by Claude Code CLI");
|
|
389
395
|
console.log(` - PA_WORKSPACE=${workspacePath}`);
|
|
390
396
|
console.log("");
|
|
391
|
-
console.log("Restart Claude Code to reload the
|
|
392
|
-
console.log("Legacy alias still available: personal-assistant-mcp claude install");
|
|
397
|
+
console.log("Restart Claude Code to reload the Pac-Man MCP server.");
|
|
393
398
|
});
|
|
394
|
-
mcpCommand.command("codex").description("Codex MCP integration management").command("install").description("Register the
|
|
399
|
+
mcpCommand.command("codex").description("Codex MCP integration management").command("install").description("Register the Pac-Man MCP server with Codex").option("-w, --workspace <workspace>", "Workspace directory", ".personal-assistant").action(async (opts) => {
|
|
395
400
|
const workspacePath = await resolveWorkspacePath(opts.workspace);
|
|
396
401
|
await installCodexMcp(workspacePath, resolvePacmanServerCommand);
|
|
397
402
|
console.log("Codex MCP registration installed:");
|
|
398
403
|
console.log(" - managed by Codex CLI");
|
|
399
404
|
console.log(` - PA_WORKSPACE=${workspacePath}`);
|
|
400
405
|
console.log("");
|
|
401
|
-
console.log("Restart Codex to reload the
|
|
402
|
-
console.log("Legacy alias still available: personal-assistant-mcp codex install");
|
|
406
|
+
console.log("Restart Codex to reload the Pac-Man MCP server.");
|
|
403
407
|
});
|
|
404
408
|
program.command("sync").description("Run a one-time sync").option("-d, --dir <dir>", "Workspace directory", ".personal-assistant").action(async (opts) => {
|
|
405
409
|
const workspacePath = await resolveWorkspacePath(opts.dir);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../../claude-installer/dist/index.js","../../client-guidance/dist/index.js","../../codex-installer/dist/index.js"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from 'commander';\nimport * as path from 'node:path';\nimport * as fs from 'node:fs/promises';\nimport { createLocalStorage } from '@personal-assistant/storage-local';\nimport { createGDriveStorage } from '@personal-assistant/storage-gdrive';\nimport { createConfigManager } from '@personal-assistant/config-manager';\nimport { createContextManager } from '@personal-assistant/context-manager';\nimport { createIndexer } from '@personal-assistant/indexer';\nimport { renderTemplate, getTemplate } from '@personal-assistant/template-engine';\nimport { installClaude } from '@personal-assistant/claude-installer';\nimport { installCodex } from '@personal-assistant/codex-installer';\nimport { createNoopEventClient } from '@personal-assistant/event-client';\nimport type { StorageBackend, GDriveStorageConfig } from '@personal-assistant/core-types';\nimport {\n installClaudeMcp,\n installCodexMcp,\n resolvePacmanServerCommand,\n} from './mcp-installers.js';\nimport { startMcpServer } from './mcp-server.js';\n\n// Resolve workspace path: the pointer file written during `init` always wins\n// so all commands automatically find the configured workspace without --dir.\n// Pass an explicit absolute path via --dir to override (e.g. for multi-workspace setups).\nasync function resolveWorkspacePath(dirOpt: string): Promise<string> {\n const rcPath = path.join(\n process.env.HOME ?? process.env.USERPROFILE ?? '~',\n '.personal-assistant-rc.json',\n );\n try {\n const rc = JSON.parse(await fs.readFile(rcPath, 'utf-8')) as { workspacePath?: string };\n if (rc.workspacePath) return rc.workspacePath;\n } catch {\n // no pointer yet — fall through to explicit path\n }\n return path.resolve(dirOpt);\n}\n\nconst program = new Command();\n\nprogram\n .name('pacman')\n .description('Claude Code and Codex compatible, file-backed personal context manager')\n .version('0.1.0');\n\n// ---- init command ----\nprogram\n .command('init')\n .description('Initialize the personal assistant and open onboarding UI')\n .option('-p, --port <port>', 'Port for onboarding server', '3847')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = path.resolve(opts.dir);\n const port = parseInt(opts.port, 10);\n\n console.log(`Initializing Personal Assistant workspace at ${workspacePath}...`);\n\n // Create workspace directory\n await fs.mkdir(workspacePath, { recursive: true });\n\n // Initialize storage and context\n const storage = createLocalStorage(workspacePath);\n const contextManager = createContextManager(storage);\n await contextManager.initWorkspace();\n\n console.log('Workspace initialized. Starting onboarding server...');\n\n // Start onboarding server\n const { startOnboardingServer } = await import('./onboarding-server.js');\n await startOnboardingServer(port, workspacePath);\n });\n\n// ---- daemon command ----\nprogram\n .command('daemon')\n .description('Start the sync daemon')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.dir);\n console.log(`Starting daemon with workspace at ${workspacePath}...`);\n\n const { startDaemon } = await import('./daemon.js');\n await startDaemon(workspacePath);\n });\n\n// ---- slack command ----\nprogram\n .command('slack')\n .description('Slack runtime management')\n .command('listen')\n .description('Start the real-time Slack listener')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.dir);\n console.log(`Starting Slack listener with workspace at ${workspacePath}...`);\n\n const { startSlackListener } = await import('./slack-listener.js');\n await startSlackListener(workspacePath);\n });\n\n// ---- claude install command ----\nprogram\n .command('claude')\n .description('Claude integration management')\n .command('install')\n .description('Install Claude Code integration (CLAUDE.md, settings, skill)')\n .option('-d, --dir <dir>', 'Project directory', '.')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const projectPath = path.resolve(opts.dir);\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n\n console.log('Installing Claude Code integration...');\n\n const storage = createLocalStorage(workspacePath);\n const configManager = createConfigManager(storage);\n\n let config;\n try {\n config = await configManager.loadConfig();\n } catch {\n console.error(\n 'Error: No configuration found. Run `pacman init` first.',\n );\n process.exit(1);\n }\n\n await installClaude({\n projectPath,\n workspacePath,\n config,\n });\n\n console.log('Claude Code integration installed:');\n console.log(` - ${projectPath}/CLAUDE.md`);\n console.log(` - ~/.claude/skills/personal-assistant/SKILL.md`);\n console.log('');\n console.log('Next, register the MCP server with:');\n console.log(' pacman mcp claude install');\n console.log('');\n console.log('Restart Claude Code after the MCP install, then use:');\n console.log(' /personal-assistant start <project_name>');\n });\n\n// ---- codex install command ----\nprogram\n .command('codex')\n .description('Codex integration management')\n .command('install')\n .description('Install Codex integration (AGENTS.md, skill)')\n .option('-d, --dir <dir>', 'Project directory', '.')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const projectPath = path.resolve(opts.dir);\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n\n console.log('Installing Codex integration...');\n\n const storage = createLocalStorage(workspacePath);\n const configManager = createConfigManager(storage);\n\n let config;\n try {\n config = await configManager.loadConfig();\n } catch {\n console.error(\n 'Error: No configuration found. Run `pacman init` first.',\n );\n process.exit(1);\n }\n\n await installCodex({\n projectPath,\n workspacePath,\n config,\n });\n\n console.log('Codex integration installed:');\n console.log(` - ${projectPath}/AGENTS.md`);\n console.log(` - ~/.codex/skills/personal-assistant/SKILL.md`);\n console.log('');\n console.log('Next, register the MCP server with:');\n console.log(' pacman mcp codex install');\n console.log('');\n console.log('Restart Codex after the MCP install, then ask it to load or refresh');\n console.log('your Personal Assistant context for a project.');\n });\n\n// ---- mcp command ----\nconst mcpCommand = program\n .command('mcp')\n .description('MCP server management');\n\nmcpCommand\n .command('serve')\n .description('Start the Personal Assistant MCP server over stdio')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n await startMcpServer(workspacePath);\n });\n\nmcpCommand\n .command('claude')\n .description('Claude MCP integration management')\n .command('install')\n .description('Register the Personal Assistant MCP server with Claude Code')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n\n await installClaudeMcp(workspacePath, resolvePacmanServerCommand);\n\n console.log('Claude MCP registration installed:');\n console.log(' - managed by Claude Code CLI');\n console.log(` - PA_WORKSPACE=${workspacePath}`);\n console.log('');\n console.log('Restart Claude Code to reload the Personal Assistant MCP server.');\n console.log('Legacy alias still available: personal-assistant-mcp claude install');\n });\n\nmcpCommand\n .command('codex')\n .description('Codex MCP integration management')\n .command('install')\n .description('Register the Personal Assistant MCP server with Codex')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n\n await installCodexMcp(workspacePath, resolvePacmanServerCommand);\n\n console.log('Codex MCP registration installed:');\n console.log(' - managed by Codex CLI');\n console.log(` - PA_WORKSPACE=${workspacePath}`);\n console.log('');\n console.log('Restart Codex to reload the Personal Assistant MCP server.');\n console.log('Legacy alias still available: personal-assistant-mcp codex install');\n });\n\n// ---- sync command ----\nprogram\n .command('sync')\n .description('Run a one-time sync')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.dir);\n console.log('Running sync...');\n\n // Bootstrap: read config from local to determine storage backend\n const localStore = createLocalStorage(workspacePath);\n const bootConfigManager = createConfigManager(localStore);\n\n // Resolve storage — all operations use the user's chosen backend\n let resolvedStorage: StorageBackend = localStore;\n try {\n const config = await bootConfigManager.loadConfig();\n if (config.storage.mode === 'gdrive') {\n const gdriveConfig = config.storage as GDriveStorageConfig;\n const resolvedCachePath = path.isAbsolute(gdriveConfig.cachePath)\n ? gdriveConfig.cachePath\n : path.resolve(path.dirname(workspacePath), gdriveConfig.cachePath);\n\n const gdriveStorage = createGDriveStorage({\n ...gdriveConfig,\n cachePath: resolvedCachePath,\n });\n await gdriveStorage.initialize();\n resolvedStorage = gdriveStorage;\n console.log('Using Google Drive storage backend');\n }\n } catch {\n // Config not readable — continue with local storage\n }\n\n const indexer = createIndexer(resolvedStorage);\n await indexer.buildIndexes();\n\n console.log('Sync complete. Indexes rebuilt.');\n });\n\n// ---- status command ----\nprogram\n .command('status')\n .description('Show current configuration and status')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.dir);\n\n const storage = createLocalStorage(workspacePath);\n const configManager = createConfigManager(storage);\n\n try {\n const config = await configManager.loadConfig();\n console.log('Personal Assistant Status');\n console.log('========================');\n console.log(`Workspace: ${workspacePath}`);\n console.log(`User: ${config.user.name}`);\n console.log(`Assistant: ${config.user.assistantName}`);\n console.log(`Profile: ${config.user.profileType}`);\n console.log(`Storage: ${config.storage.mode}`);\n console.log(`Active Project: ${config.activeProject ?? 'none'}`);\n console.log(`Integrations: ${config.integrations.filter((i) => i.enabled).map((i) => i.type).join(', ') || 'none'}`);\n console.log(`Sync Time: ${config.sync.dailySyncTime} ${config.sync.timezone}`);\n console.log(`Slack Runtime: ${config.slackRuntime?.enabled ? `${config.slackRuntime.transport} (${config.slackRuntime.reviewMode})` : 'disabled'}`);\n } catch {\n console.log('No configuration found. Run `pacman init` first.');\n }\n });\n\nprogram.parse();\n","// src/index.ts\nimport * as fs from \"fs/promises\";\nimport * as path from \"path\";\nimport {\n buildClaudeProjectMemory,\n buildClaudeSkillContent\n} from \"@personal-assistant/client-guidance\";\nasync function installClaude(options) {\n const { projectPath, config } = options;\n await Promise.all([\n generateClaudeMd(projectPath, config),\n generateGlobalSkill()\n ]);\n}\nasync function generateClaudeMd(projectPath, config) {\n await fs.mkdir(projectPath, { recursive: true });\n await fs.writeFile(path.join(projectPath, \"CLAUDE.md\"), buildClaudeProjectMemory(config), \"utf-8\");\n}\nasync function generateGlobalSkill() {\n const globalSkillDir = path.join(\n process.env.HOME ?? process.env.USERPROFILE ?? \"~\",\n \".claude\",\n \"skills\",\n \"personal-assistant\"\n );\n await fs.mkdir(globalSkillDir, { recursive: true });\n await fs.writeFile(path.join(globalSkillDir, \"SKILL.md\"), buildClaudeSkillContent(), \"utf-8\");\n}\nexport {\n installClaude\n};\n","// src/index.ts\nvar TOOL_GROUPS = [\n \"- Config: `config_get`, `config_get_storage_mode`, `config_get_active_project`, `config_set_active_project`\",\n \"- Projects: `project_list`, `project_suggest`, `project_get_context`\",\n \"- Read: `context_search`, `context_read_file`, `context_read_section`, `context_list_recent_updates`, `context_get_daily_summary`\",\n \"- Update: `context_propose_update`, `context_apply_update`, `context_append_note`, `context_rebuild_indexes`\",\n \"- Sync: `sync_run_now`, `sync_status`, `sync_list_integrations`\",\n \"- Events: `events_ping`\"\n];\nfunction getStorageDescription(config) {\n return config.storage.mode === \"local\" ? `Local workspace at: ${config.storage.workspacePath}` : `Google Drive folder: ${config.storage.folderName} (ID: ${config.storage.folderId})`;\n}\nfunction buildSharedProjectSections(config) {\n return `## Context source of truth\n\nAll context is stored in:\n- ${getStorageDescription(config)}\n\nDo not assume any cloud database exists. Never store raw context outside user-controlled storage.\n\n## Context structure\n\nRead context in this order:\n1. context/canonical/ - long-lived, human-readable context (role, projects, stakeholders)\n2. context/derived/daily/ - machine-generated daily summaries\n3. context/derived/indexes/entities.json - extracted entities index\n4. context/raw/ - only when deeper detail is needed from integration data\n\n## Retrieval rule\n\nWhen the user asks about responsibilities, projects, stakeholders, status, history, routines, or prior decisions:\n- Call the Personal Assistant MCP tools first\n- Use \\`context_search\\` to find relevant files\n- Use \\`context_read_file\\` or \\`context_read_section\\` for specific content\n- Answer only from retrieved context files\n- State uncertainty if context is missing or insufficient\n\n## Update rule\n\nWhen the conversation creates stable new context (new ownership, priority changes, new contacts):\n- Call \\`context_propose_update\\` with the target file, section, proposed content, and reason\n- If the auto-apply policy allows, call \\`context_apply_update\\`\n- Never silently mutate canonical context without proposing first\n\n## Project rule\n\n- If an active project is set, prefer project-specific files from context/canonical/projects/\n- If no project is set, call \\`project_suggest\\` to infer likely project\n- If multiple candidates exist, ask the user to confirm\n- Use \\`config_set_active_project\\` to set the active project\n\n## MCP usage\n\nThis project uses the Personal Assistant MCP server. All context operations go through MCP tools:\n${TOOL_GROUPS.join(\"\\n\")}\n\n## User profile\n\n- Name: ${config.user.name}\n- Assistant name: ${config.user.assistantName}\n- Profile: ${config.user.profileType}\n`;\n}\nfunction buildClaudeProjectMemory(config) {\n return `# Personal Assistant Project Rules\n\nThis project uses a local or Google Drive based context manager.\n\n${buildSharedProjectSections(config)}`;\n}\nfunction buildCodexProjectGuidance(config) {\n return `# Personal Assistant Project Instructions\n\nThis repository uses a local or Google Drive based context manager.\n\n${buildSharedProjectSections(config)}\n\n## Codex startup rule\n\n- If Personal Assistant MCP tools are unavailable, tell the user to run \\`pacman mcp codex install\\`\n- If the package is not installed globally, show the fallback command:\n \\`codex mcp add personal_assistant --env PA_WORKSPACE=$HOME/.personal-assistant -- npx -y pacman mcp serve\\`\n- Tell the user to restart Codex after installing or updating the MCP registration\n`;\n}\nfunction buildClaudeSkillContent() {\n return `---\nname: personal-assistant\ndescription: Start the personal assistant workflow for a project using local or Google Drive context through MCP.\nargument-hint: start [project_name]\nallowed-tools: mcp__personal_assistant__*\n---\n\n# Personal Assistant Skill\n\nWhen this skill is invoked with \\`/personal-assistant start <project_name>\\`:\n\n## Steps\n\n1. **Check MCP availability**:\n - If Personal Assistant MCP tools are unavailable, stop and tell the user to install them with \\`pacman mcp claude install\\`\n - If the package is not installed globally, show the fallback command:\n \\`claude mcp add -s user --env=PA_WORKSPACE=$HOME/.personal-assistant personal_assistant -- npx -y pacman mcp serve\\`\n - Tell the user to restart Claude Code after installing or updating the MCP registration\n\n2. **Check MCP health**:\n - Call \\`sync_status\\` before doing project selection\n - If the response shows an unhealthy storage backend, summarize the reason, fix steps, and restart steps, then stop\n - If the response shows failing integrations, warn the user that sync inputs may be stale and continue unless they want to troubleshoot first\n\n3. **Parse arguments**: Extract the project name from the command arguments.\n\n4. **Set active project**: If a project name is provided:\n - Call \\`config_set_active_project\\` with the project name\n - Call \\`project_get_context\\` to retrieve project-scoped context\n\n5. **Suggest project**: If no project name is provided:\n - Call \\`project_suggest\\` to get a suggested project\n - If one strong candidate exists (confidence > 0.7), suggest it to the user\n - If multiple candidates or low confidence, call \\`project_list\\` and ask the user to choose\n\n6. **Load context**: Once the project is set:\n - Read the project's canonical file from context/canonical/projects/\n - Read the latest daily summary from context/derived/daily/\n - Read the entities index for relevant people and services\n - Present a brief status summary to the user\n\n7. **Continue with MCP**: For all subsequent questions:\n - Use MCP tools to search and retrieve context\n - Answer only from retrieved context files\n - Propose updates when stable new facts emerge\n - State uncertainty when context is insufficient\n\n## Important rules\n\n- Never fabricate context that isn't in the retrieved files\n- Always use MCP tools for context operations\n- Propose updates rather than silently modifying canonical files\n- Respect the context hierarchy: canonical > derived > raw\n`;\n}\nfunction buildCodexSkillContent() {\n return `---\nname: personal-assistant\ndescription: Use when the user asks to start, load, refresh, or inspect Personal Assistant project context stored through the Personal Assistant MCP workspace.\n---\n\n# Personal Assistant\n\nUse this skill when the user asks to load or refresh personal assistant context for a project.\n\n## Steps\n\n1. **Check MCP availability**:\n - If Personal Assistant MCP tools are unavailable, stop and tell the user to install them with \\`pacman mcp codex install\\`\n - If the package is not installed globally, show the fallback command:\n \\`codex mcp add personal_assistant --env PA_WORKSPACE=$HOME/.personal-assistant -- npx -y pacman mcp serve\\`\n - Tell the user to restart Codex after installing or updating the MCP registration\n\n2. **Check MCP health**:\n - Call \\`sync_status\\` before doing project selection\n - If the response shows an unhealthy storage backend, summarize the reason, fix steps, and restart steps, then stop\n - If the response shows failing integrations, warn the user that sync inputs may be stale and continue unless they want to troubleshoot first\n\n3. **Parse the project name**:\n - Extract the project name from the user's request if one is provided\n\n4. **Set or suggest the project**:\n - If a project name is provided, call \\`config_set_active_project\\` and then \\`project_get_context\\`\n - If no project name is provided, call \\`project_suggest\\`\n - If one strong candidate exists (confidence > 0.7), suggest it to the user\n - If multiple candidates or low confidence, call \\`project_list\\` and ask the user to choose\n\n5. **Load context**:\n - Read the project's canonical file from context/canonical/projects/\n - Read the latest daily summary from context/derived/daily/\n - Read the entities index for relevant people and services\n - Present a brief status summary to the user\n\n6. **Continue with MCP**:\n - Use MCP tools to search and retrieve context\n - Answer only from retrieved context files\n - Propose updates when stable new facts emerge\n - State uncertainty when context is insufficient\n\n## Important rules\n\n- Never fabricate context that isn't in the retrieved files\n- Always use MCP tools for context operations\n- Propose updates rather than silently modifying canonical files\n- Respect the context hierarchy: canonical > derived > raw\n`;\n}\nexport {\n buildClaudeProjectMemory,\n buildClaudeSkillContent,\n buildCodexProjectGuidance,\n buildCodexSkillContent\n};\n","// src/index.ts\nimport * as fs from \"fs/promises\";\nimport * as path from \"path\";\nimport {\n buildCodexProjectGuidance,\n buildCodexSkillContent\n} from \"@personal-assistant/client-guidance\";\nasync function installCodex(options) {\n const { projectPath, config } = options;\n await Promise.all([\n generateAgentsMd(projectPath, config),\n generateGlobalSkill()\n ]);\n}\nasync function generateAgentsMd(projectPath, config) {\n await fs.mkdir(projectPath, { recursive: true });\n await fs.writeFile(\n path.join(projectPath, \"AGENTS.md\"),\n buildCodexProjectGuidance(config),\n \"utf-8\"\n );\n}\nasync function generateGlobalSkill() {\n const globalSkillDir = path.join(\n process.env.HOME ?? process.env.USERPROFILE ?? \"~\",\n \".codex\",\n \"skills\",\n \"personal-assistant\"\n );\n await fs.mkdir(globalSkillDir, { recursive: true });\n await fs.writeFile(\n path.join(globalSkillDir, \"SKILL.md\"),\n buildCodexSkillContent(),\n \"utf-8\"\n );\n}\nexport {\n installCodex\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,eAAe;AACxB,YAAYA,WAAU;AACtB,YAAYC,SAAQ;;;ACHpB,YAAY,QAAQ;AACpB,YAAY,UAAU;;;ACDtB,IAAI,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,SAAS,sBAAsB,QAAQ;AACrC,SAAO,OAAO,QAAQ,SAAS,UAAU,uBAAuB,OAAO,QAAQ,aAAa,KAAK,wBAAwB,OAAO,QAAQ,UAAU,SAAS,OAAO,QAAQ,QAAQ;AACpL;AACA,SAAS,2BAA2B,QAAQ;AAC1C,SAAO;AAAA;AAAA;AAAA,IAGL,sBAAsB,MAA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kD;AAAA,EAChE;AACF,CAAC;AAEH,QAAQ,MAAM;","names":["path","fs","fs","path","generateGlobalSkill"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../../claude-installer/dist/index.js","../../client-guidance/dist/index.js","../../codex-installer/dist/index.js"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from 'commander';\nimport * as path from 'node:path';\nimport * as fs from 'node:fs/promises';\nimport { createLocalStorage } from '@personal-assistant/storage-local';\nimport { createGDriveStorage } from '@personal-assistant/storage-gdrive';\nimport { createConfigManager } from '@personal-assistant/config-manager';\nimport { createContextManager } from '@personal-assistant/context-manager';\nimport { createIndexer } from '@personal-assistant/indexer';\nimport { renderTemplate, getTemplate } from '@personal-assistant/template-engine';\nimport { installClaude } from '@personal-assistant/claude-installer';\nimport { installCodex } from '@personal-assistant/codex-installer';\nimport { createNoopEventClient } from '@personal-assistant/event-client';\nimport type { StorageBackend, GDriveStorageConfig } from '@personal-assistant/core-types';\nimport {\n installClaudeMcp,\n installCodexMcp,\n resolvePacmanServerCommand,\n} from './mcp-installers.js';\nimport { startMcpServer } from './mcp-server.js';\n\n// Resolve workspace path: the pointer file written during `init` always wins\n// so all commands automatically find the configured workspace without --dir.\n// Pass an explicit absolute path via --dir to override (e.g. for multi-workspace setups).\nasync function resolveWorkspacePath(dirOpt: string): Promise<string> {\n const rcPath = path.join(\n process.env.HOME ?? process.env.USERPROFILE ?? '~',\n '.personal-assistant-rc.json',\n );\n try {\n const rc = JSON.parse(await fs.readFile(rcPath, 'utf-8')) as { workspacePath?: string };\n if (rc.workspacePath) return rc.workspacePath;\n } catch {\n // no pointer yet — fall through to explicit path\n }\n return path.resolve(dirOpt);\n}\n\nconst program = new Command();\n\nprogram\n .name('pacman')\n .description('Claude Code and Codex compatible, file-backed personal context manager')\n .version('0.1.3');\n\n// ---- init command ----\nprogram\n .command('init')\n .description('Initialize Pac-Man and open onboarding UI')\n .option('-p, --port <port>', 'Port for onboarding server', '3847')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = path.resolve(opts.dir);\n const port = parseInt(opts.port, 10);\n\n console.log(`Initializing Pac-Man workspace at ${workspacePath}...`);\n\n // Create workspace directory\n await fs.mkdir(workspacePath, { recursive: true });\n\n // Initialize storage and context\n const storage = createLocalStorage(workspacePath);\n const contextManager = createContextManager(storage);\n await contextManager.initWorkspace();\n\n console.log('Workspace initialized. Starting onboarding server...');\n\n // Start onboarding server\n const { startOnboardingServer } = await import('./onboarding-server.js');\n await startOnboardingServer(port, workspacePath);\n });\n\n// ---- daemon command ----\nprogram\n .command('daemon')\n .description('Start the sync daemon')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.dir);\n console.log(`Starting daemon with workspace at ${workspacePath}...`);\n\n const { startDaemon } = await import('./daemon.js');\n await startDaemon(workspacePath);\n });\n\n// ---- slack command ----\nprogram\n .command('slack')\n .description('Slack runtime management')\n .command('listen')\n .description('Start the real-time Slack listener')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.dir);\n console.log(`Starting Slack listener with workspace at ${workspacePath}...`);\n\n const { startSlackListener } = await import('./slack-listener.js');\n await startSlackListener(workspacePath);\n });\n\n// ---- claude install command ----\nprogram\n .command('claude')\n .description('Claude integration management')\n .command('install')\n .description('Install Claude Code integration (CLAUDE.md, settings, skill)')\n .option('-d, --dir <dir>', 'Project directory', '.')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const projectPath = path.resolve(opts.dir);\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n\n console.log('Installing Claude Code integration...');\n\n const storage = createLocalStorage(workspacePath);\n const configManager = createConfigManager(storage);\n\n let config;\n try {\n config = await configManager.loadConfig();\n } catch {\n console.error(\n 'Error: No configuration found. Run `pacman init` first.',\n );\n process.exit(1);\n }\n\n await installClaude({\n projectPath,\n workspacePath,\n config,\n });\n\n console.log('Claude Code integration installed:');\n console.log(` - ${projectPath}/CLAUDE.md`);\n console.log(` - ~/.claude/skills/pacman/SKILL.md`);\n console.log('');\n console.log('Next, register the MCP server with:');\n console.log(' pacman mcp claude install');\n console.log('');\n console.log('Restart Claude Code after the MCP install, then use:');\n console.log(' /pacman start <project_name>');\n });\n\n// ---- codex install command ----\nprogram\n .command('codex')\n .description('Codex integration management')\n .command('install')\n .description('Install Codex integration (AGENTS.md, skill)')\n .option('-d, --dir <dir>', 'Project directory', '.')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const projectPath = path.resolve(opts.dir);\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n\n console.log('Installing Codex integration...');\n\n const storage = createLocalStorage(workspacePath);\n const configManager = createConfigManager(storage);\n\n let config;\n try {\n config = await configManager.loadConfig();\n } catch {\n console.error(\n 'Error: No configuration found. Run `pacman init` first.',\n );\n process.exit(1);\n }\n\n await installCodex({\n projectPath,\n workspacePath,\n config,\n });\n\n console.log('Codex integration installed:');\n console.log(` - ${projectPath}/AGENTS.md`);\n console.log(` - ~/.codex/skills/pacman/SKILL.md`);\n console.log('');\n console.log('Next, register the MCP server with:');\n console.log(' pacman mcp codex install');\n console.log('');\n console.log('Restart Codex after the MCP install, then ask it to load or refresh');\n console.log('your Pac-Man context for a project.');\n });\n\n// ---- mcp command ----\nconst mcpCommand = program\n .command('mcp')\n .description('MCP server management');\n\nmcpCommand\n .command('serve')\n .description('Start the Pac-Man MCP server over stdio')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n await startMcpServer(workspacePath);\n });\n\nmcpCommand\n .command('claude')\n .description('Claude MCP integration management')\n .command('install')\n .description('Register the Pac-Man MCP server with Claude Code')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n\n await installClaudeMcp(workspacePath, resolvePacmanServerCommand);\n\n console.log('Claude MCP registration installed:');\n console.log(' - managed by Claude Code CLI');\n console.log(` - PA_WORKSPACE=${workspacePath}`);\n console.log('');\n console.log('Restart Claude Code to reload the Pac-Man MCP server.');\n });\n\nmcpCommand\n .command('codex')\n .description('Codex MCP integration management')\n .command('install')\n .description('Register the Pac-Man MCP server with Codex')\n .option('-w, --workspace <workspace>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.workspace);\n\n await installCodexMcp(workspacePath, resolvePacmanServerCommand);\n\n console.log('Codex MCP registration installed:');\n console.log(' - managed by Codex CLI');\n console.log(` - PA_WORKSPACE=${workspacePath}`);\n console.log('');\n console.log('Restart Codex to reload the Pac-Man MCP server.');\n });\n\n// ---- sync command ----\nprogram\n .command('sync')\n .description('Run a one-time sync')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.dir);\n console.log('Running sync...');\n\n // Bootstrap: read config from local to determine storage backend\n const localStore = createLocalStorage(workspacePath);\n const bootConfigManager = createConfigManager(localStore);\n\n // Resolve storage — all operations use the user's chosen backend\n let resolvedStorage: StorageBackend = localStore;\n try {\n const config = await bootConfigManager.loadConfig();\n if (config.storage.mode === 'gdrive') {\n const gdriveConfig = config.storage as GDriveStorageConfig;\n const resolvedCachePath = path.isAbsolute(gdriveConfig.cachePath)\n ? gdriveConfig.cachePath\n : path.resolve(path.dirname(workspacePath), gdriveConfig.cachePath);\n\n const gdriveStorage = createGDriveStorage({\n ...gdriveConfig,\n cachePath: resolvedCachePath,\n });\n await gdriveStorage.initialize();\n resolvedStorage = gdriveStorage;\n console.log('Using Google Drive storage backend');\n }\n } catch {\n // Config not readable — continue with local storage\n }\n\n const indexer = createIndexer(resolvedStorage);\n await indexer.buildIndexes();\n\n console.log('Sync complete. Indexes rebuilt.');\n });\n\n// ---- status command ----\nprogram\n .command('status')\n .description('Show current configuration and status')\n .option('-d, --dir <dir>', 'Workspace directory', '.personal-assistant')\n .action(async (opts) => {\n const workspacePath = await resolveWorkspacePath(opts.dir);\n\n const storage = createLocalStorage(workspacePath);\n const configManager = createConfigManager(storage);\n\n try {\n const config = await configManager.loadConfig();\n console.log('Personal Assistant Status');\n console.log('========================');\n console.log(`Workspace: ${workspacePath}`);\n console.log(`User: ${config.user.name}`);\n console.log(`Assistant: ${config.user.assistantName}`);\n console.log(`Profile: ${config.user.profileType}`);\n console.log(`Storage: ${config.storage.mode}`);\n console.log(`Active Project: ${config.activeProject ?? 'none'}`);\n console.log(`Integrations: ${config.integrations.filter((i) => i.enabled).map((i) => i.type).join(', ') || 'none'}`);\n console.log(`Sync Time: ${config.sync.dailySyncTime} ${config.sync.timezone}`);\n console.log(`Slack Runtime: ${config.slackRuntime?.enabled ? `${config.slackRuntime.transport} (${config.slackRuntime.reviewMode})` : 'disabled'}`);\n } catch {\n console.log('No configuration found. Run `pacman init` first.');\n }\n });\n\nprogram.parse();\n","// src/index.ts\nimport * as fs from \"fs/promises\";\nimport * as path from \"path\";\nimport {\n buildClaudeProjectMemory,\n buildClaudeSkillContent\n} from \"@personal-assistant/client-guidance\";\nasync function installClaude(options) {\n const { projectPath, config } = options;\n await Promise.all([\n generateClaudeMd(projectPath, config),\n generateGlobalSkill()\n ]);\n}\nasync function generateClaudeMd(projectPath, config) {\n await fs.mkdir(projectPath, { recursive: true });\n await fs.writeFile(path.join(projectPath, \"CLAUDE.md\"), buildClaudeProjectMemory(config), \"utf-8\");\n}\nasync function generateGlobalSkill() {\n const skillsRoot = path.join(\n process.env.HOME ?? process.env.USERPROFILE ?? \"~\",\n \".claude\",\n \"skills\"\n );\n const legacySkillDir = path.join(skillsRoot, \"personal-assistant\");\n const globalSkillDir = path.join(skillsRoot, \"pacman\");\n await fs.rm(legacySkillDir, { recursive: true, force: true });\n await fs.mkdir(globalSkillDir, { recursive: true });\n await fs.writeFile(path.join(globalSkillDir, \"SKILL.md\"), buildClaudeSkillContent(), \"utf-8\");\n}\nexport {\n installClaude\n};\n","// src/index.ts\nvar TOOL_GROUPS = [\n \"- Config: `config_get`, `config_get_storage_mode`, `config_get_active_project`, `config_set_active_project`\",\n \"- Projects: `project_list`, `project_suggest`, `project_get_context`\",\n \"- Read: `context_search`, `context_read_file`, `context_read_section`, `context_list_recent_updates`, `context_get_daily_summary`\",\n \"- Update: `context_propose_update`, `context_apply_update`, `context_append_note`, `context_rebuild_indexes`\",\n \"- Sync: `sync_run_now`, `sync_status`, `sync_list_integrations`\",\n \"- Events: `events_ping`\"\n];\nvar MCP_SERVER_NAME = \"pacman\";\nvar CLAUDE_START_COMMAND = \"/pacman start <project_name>\";\nfunction getStorageDescription(config) {\n return config.storage.mode === \"local\" ? `Local workspace at: ${config.storage.workspacePath}` : `Google Drive folder: ${config.storage.folderName} (ID: ${config.storage.folderId})`;\n}\nfunction buildSharedProjectSections(config) {\n return `## Context source of truth\n\nAll context is stored in:\n- ${getStorageDescription(config)}\n\nDo not assume any cloud database exists. Never store raw context outside user-controlled storage.\n\n## Context structure\n\nRead context in this order:\n1. context/canonical/ - long-lived, human-readable context (role, projects, stakeholders)\n2. context/derived/daily/ - machine-generated daily summaries\n3. context/derived/indexes/entities.json - extracted entities index\n4. context/raw/ - only when deeper detail is needed from integration data\n\n## Retrieval rule\n\nWhen the user asks about responsibilities, projects, stakeholders, status, history, routines, or prior decisions:\n- Call the Pac-Man MCP tools first\n- Use \\`context_search\\` to find relevant files\n- Use \\`context_read_file\\` or \\`context_read_section\\` for specific content\n- Answer only from retrieved context files\n- State uncertainty if context is missing or insufficient\n\n## Update rule\n\nWhen the conversation creates stable new context (new ownership, priority changes, new contacts):\n- Call \\`context_propose_update\\` with the target file, section, proposed content, and reason\n- If the auto-apply policy allows, call \\`context_apply_update\\`\n- Never silently mutate canonical context without proposing first\n\n## Project rule\n\n- If an active project is set, prefer project-specific files from context/canonical/projects/\n- If no project is set, call \\`project_suggest\\` to infer likely project\n- If multiple candidates exist, ask the user to confirm\n- Use \\`config_set_active_project\\` to set the active project\n\n## MCP usage\n\nThis project uses the Pac-Man MCP server. All context operations go through MCP tools:\n${TOOL_GROUPS.join(\"\\n\")}\n\n## User profile\n\n- Name: ${config.user.name}\n- Assistant name: ${config.user.assistantName}\n- Profile: ${config.user.profileType}\n`;\n}\nfunction buildClaudeProjectMemory(config) {\n return `# Pac-Man Project Rules\n\nThis project uses a local or Google Drive based context manager.\n\n${buildSharedProjectSections(config)}`;\n}\nfunction buildCodexProjectGuidance(config) {\n return `# Pac-Man Project Instructions\n\nThis repository uses a local or Google Drive based context manager.\n\n${buildSharedProjectSections(config)}\n\n## Codex startup rule\n\n- If Pac-Man MCP tools are unavailable, tell the user to run \\`pacman mcp codex install\\`\n- If the package is not installed globally, show the fallback command:\n \\`codex mcp add ${MCP_SERVER_NAME} --env PA_WORKSPACE=$HOME/.personal-assistant -- npx -y pacman mcp serve\\`\n- Tell the user to restart Codex after installing or updating the MCP registration\n`;\n}\nfunction buildClaudeSkillContent() {\n return `---\nname: pacman\ndescription: Start the Pac-Man workflow for a project using local or Google Drive context through MCP.\nargument-hint: start [project_name]\nallowed-tools: mcp__pacman__*\n---\n\n# Pac-Man Skill\n\nWhen this skill is invoked with \\`${CLAUDE_START_COMMAND}\\`:\n\n## Steps\n\n1. **Check MCP availability**:\n - If Pac-Man MCP tools are unavailable, stop and tell the user to install them with \\`pacman mcp claude install\\`\n - If the package is not installed globally, show the fallback command:\n \\`claude mcp add -s user --env=PA_WORKSPACE=$HOME/.personal-assistant ${MCP_SERVER_NAME} -- npx -y pacman mcp serve\\`\n - Tell the user to restart Claude Code after installing or updating the MCP registration\n\n2. **Check MCP health**:\n - Call \\`sync_status\\` before doing project selection\n - If the response shows an unhealthy storage backend, summarize the reason, fix steps, and restart steps, then stop\n - If the response shows failing integrations, warn the user that sync inputs may be stale and continue unless they want to troubleshoot first\n\n3. **Parse arguments**: Extract the project name from the command arguments.\n\n4. **Set active project**: If a project name is provided:\n - Call \\`config_set_active_project\\` with the project name\n - Call \\`project_get_context\\` to retrieve project-scoped context\n\n5. **Suggest project**: If no project name is provided:\n - Call \\`project_suggest\\` to get a suggested project\n - If one strong candidate exists (confidence > 0.7), suggest it to the user\n - If multiple candidates or low confidence, call \\`project_list\\` and ask the user to choose\n\n6. **Load context**: Once the project is set:\n - Read the project's canonical file from context/canonical/projects/\n - Read the latest daily summary from context/derived/daily/\n - Read the entities index for relevant people and services\n - Present a brief status summary to the user\n\n7. **Continue with MCP**: For all subsequent questions:\n - Use MCP tools to search and retrieve context\n - Answer only from retrieved context files\n - Propose updates when stable new facts emerge\n - State uncertainty when context is insufficient\n\n## Important rules\n\n- Never fabricate context that isn't in the retrieved files\n- Always use MCP tools for context operations\n- Propose updates rather than silently modifying canonical files\n- Respect the context hierarchy: canonical > derived > raw\n`;\n}\nfunction buildCodexSkillContent() {\n return `---\nname: pacman\ndescription: Use when the user asks to start, load, refresh, or inspect Pac-Man project context stored through the Pac-Man MCP workspace.\n---\n\n# Pac-Man\n\nUse this skill when the user asks to load or refresh Pac-Man context for a project.\n\n## Steps\n\n1. **Check MCP availability**:\n - If Pac-Man MCP tools are unavailable, stop and tell the user to install them with \\`pacman mcp codex install\\`\n - If the package is not installed globally, show the fallback command:\n \\`codex mcp add ${MCP_SERVER_NAME} --env PA_WORKSPACE=$HOME/.personal-assistant -- npx -y pacman mcp serve\\`\n - Tell the user to restart Codex after installing or updating the MCP registration\n\n2. **Check MCP health**:\n - Call \\`sync_status\\` before doing project selection\n - If the response shows an unhealthy storage backend, summarize the reason, fix steps, and restart steps, then stop\n - If the response shows failing integrations, warn the user that sync inputs may be stale and continue unless they want to troubleshoot first\n\n3. **Parse the project name**:\n - Extract the project name from the user's request if one is provided\n\n4. **Set or suggest the project**:\n - If a project name is provided, call \\`config_set_active_project\\` and then \\`project_get_context\\`\n - If no project name is provided, call \\`project_suggest\\`\n - If one strong candidate exists (confidence > 0.7), suggest it to the user\n - If multiple candidates or low confidence, call \\`project_list\\` and ask the user to choose\n\n5. **Load context**:\n - Read the project's canonical file from context/canonical/projects/\n - Read the latest daily summary from context/derived/daily/\n - Read the entities index for relevant people and services\n - Present a brief status summary to the user\n\n6. **Continue with MCP**:\n - Use MCP tools to search and retrieve context\n - Answer only from retrieved context files\n - Propose updates when stable new facts emerge\n - State uncertainty when context is insufficient\n\n## Important rules\n\n- Never fabricate context that isn't in the retrieved files\n- Always use MCP tools for context operations\n- Propose updates rather than silently modifying canonical files\n- Respect the context hierarchy: canonical > derived > raw\n`;\n}\nexport {\n buildClaudeProjectMemory,\n buildClaudeSkillContent,\n buildCodexProjectGuidance,\n buildCodexSkillContent\n};\n","// src/index.ts\nimport * as fs from \"fs/promises\";\nimport * as path from \"path\";\nimport {\n buildCodexProjectGuidance,\n buildCodexSkillContent\n} from \"@personal-assistant/client-guidance\";\nasync function installCodex(options) {\n const { projectPath, config } = options;\n await Promise.all([\n generateAgentsMd(projectPath, config),\n generateGlobalSkill()\n ]);\n}\nasync function generateAgentsMd(projectPath, config) {\n await fs.mkdir(projectPath, { recursive: true });\n await fs.writeFile(\n path.join(projectPath, \"AGENTS.md\"),\n buildCodexProjectGuidance(config),\n \"utf-8\"\n );\n}\nasync function generateGlobalSkill() {\n const skillsRoot = path.join(\n process.env.HOME ?? process.env.USERPROFILE ?? \"~\",\n \".codex\",\n \"skills\"\n );\n const legacySkillDir = path.join(skillsRoot, \"personal-assistant\");\n const globalSkillDir = path.join(skillsRoot, \"pacman\");\n await fs.rm(legacySkillDir, { recursive: true, force: true });\n await fs.mkdir(globalSkillDir, { recursive: true });\n await fs.writeFile(\n path.join(globalSkillDir, \"SKILL.md\"),\n buildCodexSkillContent(),\n \"utf-8\"\n );\n}\nexport {\n installCodex\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,eAAe;AACxB,YAAYA,WAAU;AACtB,YAAYC,SAAQ;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I,0BAA0B;AACtC,YAAQ,IAAI,cAAc,aAAa,EAAE;AACzC,YAAQ,IAAI,SAAS,OAAO,KAAK,IAAI,EAAE;AACvC,YAAQ,IAAI,cAAc,OAAO,KAAK,aAAa,EAAE;AACrD,YAAQ,IAAI,YAAY,OAAO,KAAK,WAAW,EAAE;AACjD,YAAQ,IAAI,YAAY,OAAO,QAAQ,IAAI,EAAE;AAC7C,YAAQ,IAAI,mBAAmB,OAAO,iBAAiB,MAAM,EAAE;AAC/D,YAAQ,IAAI,iBAAiB,OAAO,aAAa,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,IAAI,KAAK,MAAM,EAAE;AACnH,YAAQ,IAAI,cAAc,OAAO,KAAK,aAAa,IAAI,OAAO,KAAK,QAAQ,EAAE;AAC7E,YAAQ,IAAI,kBAAkB,OAAO,cAAc,UAAU,GAAG,OAAO,aAAa,SAAS,KAAK,OAAO,aAAa,UAAU,MAAM,UAAU,EAAE;AAAA,EACpJ,QAAQ;AACN,YAAQ,IAAI,kDAAkD;AAAA,EAChE;AACF,CAAC;AAEH,QAAQ,MAAM;","names":["path","fs","fs","path","generateGlobalSkill"]}
|
package/dist/mcp-compat.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
resolveCompatServerCommand,
|
|
7
7
|
resolveWorkspacePath,
|
|
8
8
|
startMcpServer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WH3UMGHQ.js";
|
|
10
10
|
import "./chunk-3QNXXON5.js";
|
|
11
11
|
import "./chunk-DNI6TIXZ.js";
|
|
12
12
|
import "./chunk-UWT6AFJB.js";
|
|
@@ -54,7 +54,7 @@ async function main() {
|
|
|
54
54
|
console.log("Preferred command going forward: `pacman mcp claude install`");
|
|
55
55
|
console.log(`PA_WORKSPACE=${workspacePath}`);
|
|
56
56
|
console.log("");
|
|
57
|
-
console.log("Restart Claude Code to reload the
|
|
57
|
+
console.log("Restart Claude Code to reload the Pac-Man MCP server.");
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
if (args[0] === "codex" && args[1] === "install") {
|
|
@@ -64,7 +64,7 @@ async function main() {
|
|
|
64
64
|
console.log("Preferred command going forward: `pacman mcp codex install`");
|
|
65
65
|
console.log(`PA_WORKSPACE=${workspacePath}`);
|
|
66
66
|
console.log("");
|
|
67
|
-
console.log("Restart Codex to reload the
|
|
67
|
+
console.log("Restart Codex to reload the Pac-Man MCP server.");
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
printHelp();
|
package/dist/mcp-compat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/mcp-compat.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport * as path from 'node:path';\nimport {\n DEFAULT_WORKSPACE,\n installClaudeMcp,\n installCodexMcp,\n resolveCompatServerCommand,\n resolveWorkspacePath,\n} from './mcp-installers.js';\nimport { startMcpServer } from './mcp-server.js';\n\nfunction printHelp(): void {\n console.log(`personal-assistant-mcp\n\nLegacy compatibility entrypoint. Prefer:\n pacman mcp serve\n pacman mcp claude install\n pacman mcp codex install\n\nUsage:\n personal-assistant-mcp\n personal-assistant-mcp claude install [--workspace <path>]\n personal-assistant-mcp codex install [--workspace <path>]\n`);\n}\n\nfunction parseWorkspaceArg(args: string[]): string | undefined {\n for (let index = 0; index < args.length; index += 1) {\n if (args[index] === '-w' || args[index] === '--workspace') {\n return args[index + 1];\n }\n }\n return undefined;\n}\n\nasync function main(): Promise<void> {\n const args = process.argv.slice(2);\n\n if (args.length === 0) {\n const workspacePath = path.resolve(process.env.PA_WORKSPACE ?? DEFAULT_WORKSPACE);\n await startMcpServer(workspacePath);\n return;\n }\n\n if (args.length === 1 && (args[0] === '-h' || args[0] === '--help')) {\n printHelp();\n return;\n }\n\n if (args[0] === 'claude' && args[1] === 'install') {\n const workspacePath = await resolveWorkspacePath(parseWorkspaceArg(args.slice(2)));\n await installClaudeMcp(workspacePath, resolveCompatServerCommand);\n\n console.log('Claude MCP registration installed.');\n console.log('Preferred command going forward: `pacman mcp claude install`');\n console.log(`PA_WORKSPACE=${workspacePath}`);\n console.log('');\n console.log('Restart Claude Code to reload the
|
|
1
|
+
{"version":3,"sources":["../src/mcp-compat.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport * as path from 'node:path';\nimport {\n DEFAULT_WORKSPACE,\n installClaudeMcp,\n installCodexMcp,\n resolveCompatServerCommand,\n resolveWorkspacePath,\n} from './mcp-installers.js';\nimport { startMcpServer } from './mcp-server.js';\n\nfunction printHelp(): void {\n console.log(`personal-assistant-mcp\n\nLegacy compatibility entrypoint. Prefer:\n pacman mcp serve\n pacman mcp claude install\n pacman mcp codex install\n\nUsage:\n personal-assistant-mcp\n personal-assistant-mcp claude install [--workspace <path>]\n personal-assistant-mcp codex install [--workspace <path>]\n`);\n}\n\nfunction parseWorkspaceArg(args: string[]): string | undefined {\n for (let index = 0; index < args.length; index += 1) {\n if (args[index] === '-w' || args[index] === '--workspace') {\n return args[index + 1];\n }\n }\n return undefined;\n}\n\nasync function main(): Promise<void> {\n const args = process.argv.slice(2);\n\n if (args.length === 0) {\n const workspacePath = path.resolve(process.env.PA_WORKSPACE ?? DEFAULT_WORKSPACE);\n await startMcpServer(workspacePath);\n return;\n }\n\n if (args.length === 1 && (args[0] === '-h' || args[0] === '--help')) {\n printHelp();\n return;\n }\n\n if (args[0] === 'claude' && args[1] === 'install') {\n const workspacePath = await resolveWorkspacePath(parseWorkspaceArg(args.slice(2)));\n await installClaudeMcp(workspacePath, resolveCompatServerCommand);\n\n console.log('Claude MCP registration installed.');\n console.log('Preferred command going forward: `pacman mcp claude install`');\n console.log(`PA_WORKSPACE=${workspacePath}`);\n console.log('');\n console.log('Restart Claude Code to reload the Pac-Man MCP server.');\n return;\n }\n\n if (args[0] === 'codex' && args[1] === 'install') {\n const workspacePath = await resolveWorkspacePath(parseWorkspaceArg(args.slice(2)));\n await installCodexMcp(workspacePath, resolveCompatServerCommand);\n\n console.log('Codex MCP registration installed.');\n console.log('Preferred command going forward: `pacman mcp codex install`');\n console.log(`PA_WORKSPACE=${workspacePath}`);\n console.log('');\n console.log('Restart Codex to reload the Pac-Man MCP server.');\n return;\n }\n\n printHelp();\n process.exitCode = 1;\n}\n\nmain().catch((err) => {\n console.error('MCP server error:', err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;AAEA,YAAY,UAAU;AAUtB,SAAS,YAAkB;AACzB,UAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAWb;AACD;AAEA,SAAS,kBAAkB,MAAoC;AAC7D,WAAS,QAAQ,GAAG,QAAQ,KAAK,QAAQ,SAAS,GAAG;AACnD,QAAI,KAAK,KAAK,MAAM,QAAQ,KAAK,KAAK,MAAM,eAAe;AACzD,aAAO,KAAK,QAAQ,CAAC;AAAA,IACvB;AAAA,EACF;AACA,SAAO;AACT;AAEA,eAAe,OAAsB;AACnC,QAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,MAAI,KAAK,WAAW,GAAG;AACrB,UAAM,gBAAqB,aAAQ,QAAQ,IAAI,gBAAgB,iBAAiB;AAChF,UAAM,eAAe,aAAa;AAClC;AAAA,EACF;AAEA,MAAI,KAAK,WAAW,MAAM,KAAK,CAAC,MAAM,QAAQ,KAAK,CAAC,MAAM,WAAW;AACnE,cAAU;AACV;AAAA,EACF;AAEA,MAAI,KAAK,CAAC,MAAM,YAAY,KAAK,CAAC,MAAM,WAAW;AACjD,UAAM,gBAAgB,MAAM,qBAAqB,kBAAkB,KAAK,MAAM,CAAC,CAAC,CAAC;AACjF,UAAM,iBAAiB,eAAe,0BAA0B;AAEhE,YAAQ,IAAI,oCAAoC;AAChD,YAAQ,IAAI,8DAA8D;AAC1E,YAAQ,IAAI,gBAAgB,aAAa,EAAE;AAC3C,YAAQ,IAAI,EAAE;AACd,YAAQ,I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