@linxiraos/pi-messenger 1.1.0 → 1.3.0

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 (66) hide show
  1. package/CHANGELOG.md +741 -676
  2. package/LICENSE +45 -0
  3. package/README.md +424 -424
  4. package/THIRD-PARTY-NOTICES.txt +22951 -0
  5. package/config-overlay.ts +175 -171
  6. package/config.ts +221 -209
  7. package/crew/agents/crew-plan-sync.md +66 -64
  8. package/crew/agents/crew-planner.md +173 -172
  9. package/crew/agents/crew-reviewer.md +58 -58
  10. package/crew/agents/crew-worker.md +130 -129
  11. package/crew/agents.ts +507 -434
  12. package/crew/handlers/coordination.ts +350 -332
  13. package/crew/handlers/plan.ts +988 -906
  14. package/crew/handlers/review.ts +354 -333
  15. package/crew/handlers/revise.ts +400 -376
  16. package/crew/handlers/status.ts +303 -295
  17. package/crew/handlers/sync.ts +237 -233
  18. package/crew/handlers/task.ts +820 -792
  19. package/crew/handlers/team.ts +294 -235
  20. package/crew/handlers/work.ts +467 -425
  21. package/crew/id-allocator.ts +30 -30
  22. package/crew/index.ts +297 -257
  23. package/crew/live-progress.ts +58 -58
  24. package/crew/lobby.ts +504 -473
  25. package/crew/prompt.ts +262 -252
  26. package/crew/registry.ts +114 -114
  27. package/crew/spawn.ts +135 -111
  28. package/crew/state-autonomous.ts +163 -164
  29. package/crew/state-planning.ts +264 -263
  30. package/crew/state.ts +20 -20
  31. package/crew/store.ts +646 -642
  32. package/crew/task-actions.ts +162 -131
  33. package/crew/team/store.ts +572 -479
  34. package/crew/team/subagent-roles.ts +105 -87
  35. package/crew/team/types.ts +50 -50
  36. package/crew/types.ts +194 -194
  37. package/crew/utils/artifacts.ts +57 -62
  38. package/crew/utils/config.ts +158 -156
  39. package/crew/utils/discover.ts +221 -219
  40. package/crew/utils/install.ts +94 -85
  41. package/crew/utils/migrations.ts +126 -0
  42. package/crew/utils/progress.ts +191 -187
  43. package/crew/utils/result.ts +16 -16
  44. package/crew/utils/risk-labels.ts +5 -7
  45. package/crew/utils/task-format.ts +14 -14
  46. package/crew/utils/team-roles.ts +44 -28
  47. package/crew/utils/truncate.ts +76 -79
  48. package/crew/utils/verdict.ts +55 -55
  49. package/editor-binary.ts +150 -0
  50. package/editor-command.ts +107 -0
  51. package/editor-target.ts +40 -0
  52. package/feed.ts +321 -268
  53. package/handlers.ts +1041 -1107
  54. package/index.ts +1314 -1206
  55. package/install.mjs +187 -189
  56. package/lib.ts +587 -467
  57. package/overlay-actions.ts +519 -511
  58. package/overlay-coordinator.ts +150 -150
  59. package/overlay-render.ts +770 -676
  60. package/overlay.ts +872 -830
  61. package/package.json +64 -60
  62. package/paths.ts +60 -0
  63. package/skills/pi-messenger-crew/SKILL.md +375 -347
  64. package/store.ts +1147 -1139
  65. package/teamagent-command.ts +321 -0
  66. package/vitest.config.ts +10 -10
package/package.json CHANGED
@@ -1,62 +1,66 @@
1
1
  {
2
- "name": "@linxiraos/pi-messenger",
3
- "version": "1.1.0",
4
- "description": "Inter-agent messaging and file reservation system for pi coding agent",
5
- "type": "module",
6
- "author": "Nico Bailon",
7
- "license": "MIT",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/nicobailon/pi-messenger.git"
11
- },
12
- "homepage": "https://github.com/nicobailon/pi-messenger#readme",
13
- "bugs": {
14
- "url": "https://github.com/nicobailon/pi-messenger/issues"
15
- },
16
- "keywords": [
17
- "pi-package",
18
- "pi",
19
- "pi-coding-agent",
20
- "extension",
21
- "messaging",
22
- "multi-agent",
23
- "coordination",
24
- "ai",
25
- "agents",
26
- "cli"
27
- ],
28
- "bin": {
29
- "pi-messenger": "install.mjs"
30
- },
31
- "files": [
32
- "*.ts",
33
- "*.mjs",
34
- "crew/**",
35
- "skills/**",
36
- "README.md",
37
- "CHANGELOG.md"
38
- ],
39
- "scripts": {
40
- "test": "vitest run",
41
- "test:watch": "vitest"
42
- },
43
- "peerDependencies": {
44
- "@earendil-works/pi-ai": "*",
45
- "@earendil-works/pi-agent-core": "*",
46
- "@earendil-works/pi-coding-agent": "*",
47
- "@earendil-works/pi-tui": "*",
48
- "typebox": "*"
49
- },
50
- "devDependencies": {
51
- "vitest": "^2.1.8"
52
- },
53
- "pi": {
54
- "extensions": [
55
- "./index.ts"
56
- ],
57
- "skills": [
58
- "./skills"
59
- ]
60
- },
61
- "main": "index.ts"
2
+ "name": "@linxiraos/pi-messenger",
3
+ "version": "1.3.0",
4
+ "description": "Inter-agent messaging and file reservation system for pi coding agent",
5
+ "keywords": [
6
+ "agents",
7
+ "ai",
8
+ "cli",
9
+ "coordination",
10
+ "extension",
11
+ "messaging",
12
+ "multi-agent",
13
+ "pi",
14
+ "pi-coding-agent",
15
+ "pi-package"
16
+ ],
17
+ "homepage": "https://github.com/Linxira-OS/linxira-zeta/tree/main/plugins/official/pi-messenger#readme",
18
+ "bugs": {
19
+ "url": "https://github.com/nicobailon/pi-messenger/issues"
20
+ },
21
+ "license": "MIT",
22
+ "author": "Nico Bailon",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/Linxira-OS/linxira-zeta.git",
26
+ "directory": "plugins/official/pi-messenger"
27
+ },
28
+ "bin": {
29
+ "pi-messenger": "install.mjs"
30
+ },
31
+ "files": [
32
+ "*.ts",
33
+ "*.mjs",
34
+ "crew/**",
35
+ "skills/**",
36
+ "README.md",
37
+ "CHANGELOG.md",
38
+ "LICENSE",
39
+ "THIRD-PARTY-NOTICES.txt"
40
+ ],
41
+ "type": "module",
42
+ "main": "index.ts",
43
+ "scripts": {
44
+ "test": "vitest run",
45
+ "test:watch": "vitest"
46
+ },
47
+ "devDependencies": {
48
+ "vitest": "^2.1.8"
49
+ },
50
+ "peerDependencies": {
51
+ "@linxiraos/pi-agent-core": "*",
52
+ "@linxiraos/pi-ai": "*",
53
+ "@linxiraos/pi-tui": "*",
54
+ "@linxiraos/pi-utils": "*",
55
+ "@linxiraos/zeta": "*",
56
+ "typebox": "*"
57
+ },
58
+ "pi": {
59
+ "extensions": [
60
+ "./index.ts"
61
+ ],
62
+ "skills": [
63
+ "./skills"
64
+ ]
65
+ }
62
66
  }
package/paths.ts ADDED
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Pi Messenger - Path Resolution
3
+ *
4
+ * Single source of truth for every directory this extension owns. State lives
5
+ * in the zeta tree (getAgentDir() = ~/.zeta/agent), never in the legacy ~/.pi
6
+ * tree — one-time migrations for pre-existing state live in
7
+ * ./crew/utils/migrations.ts.
8
+ */
9
+
10
+ import * as os from "node:os";
11
+ import * as path from "node:path";
12
+ import { getAgentDir } from "@linxiraos/pi-utils/dirs";
13
+
14
+ /**
15
+ * Global messenger state (~/.zeta/agent/messenger by default).
16
+ * PI_MESSENGER_DIR overrides — kept for test isolation and exotic setups.
17
+ */
18
+ export function getGlobalMessengerDir(): string {
19
+ return process.env.PI_MESSENGER_DIR || path.join(getAgentDir(), "messenger");
20
+ }
21
+
22
+ /** Global extension config (~/.zeta/agent/pi-messenger.json). */
23
+ export function getGlobalConfigPath(): string {
24
+ return path.join(getAgentDir(), "pi-messenger.json");
25
+ }
26
+
27
+ /** Project messenger state (<project>/.zeta/messenger). */
28
+ export function getProjectMessengerDir(cwd: string): string {
29
+ return path.join(cwd, ".zeta", "messenger");
30
+ }
31
+
32
+ /** Project crew state (<project>/.zeta/messenger/crew). */
33
+ export function getProjectCrewDir(cwd: string): string {
34
+ return path.join(getProjectMessengerDir(cwd), "crew");
35
+ }
36
+
37
+ /** Project extension config (<project>/.zeta/pi-messenger.json). */
38
+ export function getProjectConfigPath(cwd: string): string {
39
+ return path.join(cwd, ".zeta", "pi-messenger.json");
40
+ }
41
+
42
+ /**
43
+ * Legacy trees this extension owned before the zeta migration. Read only by
44
+ * crew/utils/migrations.ts to move pre-existing state out of them.
45
+ */
46
+ export function getLegacyGlobalMessengerDir(homeDir = os.homedir()): string {
47
+ return path.join(homeDir, ".pi", "agent", "messenger");
48
+ }
49
+
50
+ export function getLegacyGlobalConfigPath(homeDir = os.homedir()): string {
51
+ return path.join(homeDir, ".pi", "agent", "pi-messenger.json");
52
+ }
53
+
54
+ export function getLegacyProjectMessengerDir(cwd: string): string {
55
+ return path.join(cwd, ".pi", "messenger");
56
+ }
57
+
58
+ export function getLegacyProjectConfigPath(cwd: string): string {
59
+ return path.join(cwd, ".pi", "pi-messenger.json");
60
+ }