mcproc 0.0.0-stage → 0.14.2

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.
@@ -0,0 +1,47 @@
1
+ # Worktrees
2
+
3
+ An isolated checkout per branch, each with its own slot, project slug, ports and containers, so stands do not collide:
4
+
5
+ ```yaml
6
+ worktree:
7
+ dir: ../demo.worktrees # default: <repo>.worktrees next to the repository
8
+ copy: [.env.local] # files copied into every new worktree
9
+ link: [node_modules/.cache] # symlinked to the main checkout's
10
+ install: npm ci # default: by the lockfile (bun, yarn, pnpm, npm); false = none
11
+ slots: 9 # how many worktrees at most (1 to 99)
12
+ ```
13
+
14
+ ```bash
15
+ mcproc worktree add feat/x [--from main] [--slot 2] [--slug demo-x] [--no-install]
16
+ mcproc worktree ls
17
+ mcproc worktree remove feat/x [--force] # by branch, path or slot
18
+ ```
19
+
20
+ `worktree add` does, in order: claims the lowest free slot (or `--slot`) in the registry, makes `git worktree add` on the
21
+ branch (a new branch starts at `--from`, default the main checkout's HEAD), then reads the new worktree's own manifest
22
+ (the main checkout's only when the worktree has none that loads) for the rest: it writes `.mcproc/mcproc.local.yaml` there
23
+ with `repo`, `project` (`--slug`, default `<project>-w<slot>`) and, when that manifest declares a `slot` var, `vars.slot`,
24
+ copies and links what that manifest declares, and runs its install. So a branch that introduces the slot scheme gets a
25
+ correct worktree from the first try, whatever the main checkout's manifest says. It prints the path, which manifest
26
+ decided, and how to go on; if git fails the slot is given back.
27
+
28
+ Machine-local extras stay out of the repository: the main checkout's own `.mcproc/mcproc.local.yaml` may add to the
29
+ lists, and every link, from either source, is written as a root-anchored pattern to git's exclude file of the repository
30
+ (the file `git rev-parse --git-path info/exclude` names, usually `.git/info/exclude`, shared by its worktrees, never
31
+ tracked), so a linked folder does not show as untracked (when git
32
+ cannot name that file, mcproc says so and the link stays visible to `git status`):
33
+
34
+ ```yaml
35
+ # .mcproc/mcproc.local.yaml of the main checkout
36
+ worktree:
37
+ copy: [.env.local]
38
+ link: [notes] # a folder the repository itself must not name
39
+ ```
40
+
41
+ `worktree ls` reads only: each checkout's slot (0 is the main one), project slug, branch, apps online, lease state and
42
+ path; a slot whose folder is gone shows `(gone)`, and `add` and `remove` reclaim it. `worktree remove` stops and deletes
43
+ the worktree's apps (freeing its leases), removes the checkout and frees the slot; the branch stays. Uncommitted or
44
+ untracked changes refuse it unless `--force`, and the main checkout is never removed. The registry is
45
+ `<state>/slots/<project>-<hash>.json`.
46
+
47
+ The agent then passes `project: <worktree path>` on every call for that stand (`start`, `wait`, `logs`...).
package/package.json CHANGED
@@ -1,6 +1,78 @@
1
1
  {
2
2
  "name": "mcproc",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.14.2",
4
+ "description": "pm2 process control for agents over MCP: local and remote hosts, per-app ports, one manifest per project",
5
+ "keywords": [
6
+ "mcp",
7
+ "mcp-server",
8
+ "model-context-protocol",
9
+ "pm2",
10
+ "process-manager",
11
+ "ai-agents",
12
+ "coding-agents",
13
+ "claude-code",
14
+ "developer-tools",
15
+ "cli",
16
+ "tui",
17
+ "terminal-dashboard",
18
+ "typescript",
19
+ "nodejs",
20
+ "ssh",
21
+ "docker",
22
+ "dev-server",
23
+ "log-monitoring",
24
+ "monorepo",
25
+ "turborepo"
26
+ ],
27
+ "homepage": "https://github.com/kiwagu/mcproc#readme",
28
+ "bugs": {
29
+ "url": "https://github.com/kiwagu/mcproc/issues"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/kiwagu/mcproc.git"
34
+ },
35
+ "type": "module",
36
+ "license": "MIT",
37
+ "author": "Kiwagu",
38
+ "bin": {
39
+ "mcproc": "dist/cli.js"
40
+ },
41
+ "files": [
42
+ "dist",
43
+ "runtime/package.json",
44
+ "runtime/package-lock.json",
45
+ "README.md",
46
+ "docs"
47
+ ],
48
+ "engines": {
49
+ "node": ">=22"
50
+ },
51
+ "scripts": {
52
+ "build": "tsup",
53
+ "prepublishOnly": "bun run build",
54
+ "typecheck": "tsc --noEmit",
55
+ "test": "vitest run",
56
+ "test:it": "MCPROC_IT=1 vitest run test/integration",
57
+ "format": "biome format --write .",
58
+ "lint": "biome lint .",
59
+ "check": "biome check .",
60
+ "dev": "tsx src/cli.ts"
61
+ },
62
+ "dependencies": {
63
+ "@modelcontextprotocol/sdk": "^1.32.1",
64
+ "@pm2/blessed": "0.1.81",
65
+ "commander": "^15.0.0",
66
+ "pm2": "7.0.4",
67
+ "yaml": "^2.9.1",
68
+ "zod": "^3.25"
69
+ },
70
+ "devDependencies": {
71
+ "@biomejs/biome": "^2.5.15",
72
+ "@types/node": "^26.6.5",
73
+ "tsup": "^8.5.1",
74
+ "tsx": "^4.23.15",
75
+ "typescript": "^7.0.2",
76
+ "vitest": "^5.0.3"
77
+ }
78
+ }