@modootoday/pmcp 0.17.4 → 0.18.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.
Files changed (272) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +2 -2
  4. package/.mcp.json +1 -1
  5. package/CHANGELOG.md +152 -0
  6. package/CONTRIBUTING.md +71 -0
  7. package/README.md +98 -201
  8. package/SECURITY.md +17 -1
  9. package/dist/apply-JUTGS5WZ.js +242 -0
  10. package/dist/{attachment-tU5FZrgZ.d.ts → attachment-D84OGI6n.d.ts} +1 -1
  11. package/dist/available-DBSIVVJ6.js +73 -0
  12. package/dist/broadcast-CBMVOV3G.js +18 -0
  13. package/dist/chunk-26WLNWDG.js +93 -0
  14. package/dist/chunk-2FIV63WC.js +252 -0
  15. package/dist/chunk-2P4Z2NUX.js +28 -0
  16. package/dist/chunk-34DECPVC.js +22 -0
  17. package/dist/chunk-3FCFAQDG.js +42 -0
  18. package/dist/chunk-3IDXEV5E.js +1934 -0
  19. package/dist/chunk-3PW4FI7U.js +32 -0
  20. package/dist/chunk-3Y3HDMHA.js +108 -0
  21. package/dist/chunk-47O3X4VS.js +113 -0
  22. package/dist/chunk-4NDEP7HU.js +26 -0
  23. package/dist/chunk-5OMOPUE6.js +39 -0
  24. package/dist/chunk-5QQWS4US.js +53 -0
  25. package/dist/chunk-5ZABTVSW.js +48 -0
  26. package/dist/chunk-65KAQSJP.js +7 -0
  27. package/dist/chunk-6STKGOCW.js +27 -0
  28. package/dist/chunk-6WXMJOMI.js +9 -0
  29. package/dist/chunk-73AKO4UL.js +24 -0
  30. package/dist/chunk-7DLZC73N.js +29 -0
  31. package/dist/chunk-7GBYECSK.js +72 -0
  32. package/dist/chunk-7HFIGCSL.js +419 -0
  33. package/dist/chunk-7TD53M7L.js +13 -0
  34. package/dist/chunk-7UCZAN4J.js +778 -0
  35. package/dist/chunk-A4PKLESO.js +112 -0
  36. package/dist/chunk-A7VF7A35.js +1025 -0
  37. package/dist/chunk-ABTJQ4QV.js +74 -0
  38. package/dist/chunk-AJ4VXM2U.js +349 -0
  39. package/dist/chunk-BBTBJCFA.js +380 -0
  40. package/dist/chunk-BU65MNVU.js +13 -0
  41. package/dist/chunk-C4NHQGHL.js +142 -0
  42. package/dist/chunk-CJTKR6K6.js +1213 -0
  43. package/dist/chunk-D77IRGHO.js +1246 -0
  44. package/dist/chunk-DCU2EXQV.js +78 -0
  45. package/dist/chunk-DMZHQZ7P.js +104 -0
  46. package/dist/chunk-DZ2MRTYT.js +135 -0
  47. package/dist/chunk-E2YOZ2FF.js +207 -0
  48. package/dist/chunk-E3DQB5LS.js +48 -0
  49. package/dist/chunk-EATCUWGG.js +66 -0
  50. package/dist/chunk-EAWPJHJ7.js +155 -0
  51. package/dist/chunk-EIDIVIAD.js +33 -0
  52. package/dist/chunk-F5QYZK7E.js +396 -0
  53. package/dist/chunk-F5XMGOOX.js +28 -0
  54. package/dist/chunk-FENOGX3U.js +31 -0
  55. package/dist/chunk-GZHHEHKY.js +44 -0
  56. package/dist/chunk-HDMBVLCZ.js +53 -0
  57. package/dist/chunk-HQOB7OQS.js +81 -0
  58. package/dist/chunk-I2ZP2PSA.js +211 -0
  59. package/dist/chunk-IG33DXLT.js +151 -0
  60. package/dist/chunk-IJBSOWHK.js +86 -0
  61. package/dist/chunk-INT7QLEU.js +114 -0
  62. package/dist/chunk-J7UYNJCR.js +9 -0
  63. package/dist/chunk-JEL35P7S.js +53 -0
  64. package/dist/chunk-JGJ4INEN.js +32 -0
  65. package/dist/chunk-JS5RTH4I.js +84 -0
  66. package/dist/chunk-JWRZDYB5.js +59 -0
  67. package/dist/chunk-KMXRRSKT.js +660 -0
  68. package/dist/chunk-LBXO4VPG.js +73 -0
  69. package/dist/chunk-LLBPVZXM.js +67 -0
  70. package/dist/chunk-LLT5FQBE.js +57 -0
  71. package/dist/chunk-LMT3PPXJ.js +17 -0
  72. package/dist/chunk-LMUBBIE2.js +83 -0
  73. package/dist/chunk-LTZH5E3G.js +479 -0
  74. package/dist/chunk-LW4TG7EL.js +39 -0
  75. package/dist/chunk-MPSQXSC6.js +346 -0
  76. package/dist/chunk-MVFH26QT.js +97 -0
  77. package/dist/chunk-NLEXKE7U.js +67 -0
  78. package/dist/chunk-NQPURJT5.js +44 -0
  79. package/dist/chunk-NRBQK6UX.js +105 -0
  80. package/dist/chunk-OEH47H6A.js +48 -0
  81. package/dist/chunk-OG7QR2DP.js +75 -0
  82. package/dist/chunk-OPYFEHKG.js +52 -0
  83. package/dist/chunk-P4N7DBD5.js +83 -0
  84. package/dist/chunk-PAX3QXX2.js +140 -0
  85. package/dist/chunk-PKODFR5F.js +102 -0
  86. package/dist/chunk-PMJG2CXF.js +122 -0
  87. package/dist/chunk-Q5H3L6Y4.js +23 -0
  88. package/dist/chunk-QEF7EK3T.js +28 -0
  89. package/dist/chunk-QEW4J3IZ.js +74 -0
  90. package/dist/chunk-QPL7E2HW.js +464 -0
  91. package/dist/chunk-R2GPCZUX.js +22 -0
  92. package/dist/chunk-R5MT42JS.js +284 -0
  93. package/dist/chunk-RMATE45Z.js +197 -0
  94. package/dist/chunk-RPQOBHVU.js +87 -0
  95. package/dist/chunk-S3PIAMXV.js +230 -0
  96. package/dist/chunk-T3LKX23M.js +168 -0
  97. package/dist/chunk-T6GOWHK6.js +30 -0
  98. package/dist/chunk-TIA4SPU2.js +10 -0
  99. package/dist/chunk-TNCZ6444.js +57 -0
  100. package/dist/chunk-TVL5RTE6.js +269 -0
  101. package/dist/chunk-TXQ7L33K.js +45 -0
  102. package/dist/chunk-UPQTAHUK.js +189 -0
  103. package/dist/chunk-V4NPDK6X.js +14 -0
  104. package/dist/chunk-VJFEN6DJ.js +38 -0
  105. package/dist/chunk-VMHUEOT5.js +643 -0
  106. package/dist/chunk-VRPMYPZU.js +4985 -0
  107. package/dist/chunk-WIW772I3.js +25 -0
  108. package/dist/chunk-XELAZAIM.js +136 -0
  109. package/dist/chunk-XNML2KIC.js +23 -0
  110. package/dist/chunk-XP2U3LO3.js +30 -0
  111. package/dist/chunk-YGOWIJPE.js +51 -0
  112. package/dist/chunk-YIXDHQYE.js +11 -0
  113. package/dist/chunk-YSAWTGNA.js +117 -0
  114. package/dist/claude-U2JC2DNQ.js +77 -0
  115. package/dist/cli-MI4ZCAZ3.js +41 -0
  116. package/dist/cli-ZN7ZVDEZ.js +46 -0
  117. package/dist/cli.js +144 -16197
  118. package/dist/completion-ILSRB3LW.js +142 -0
  119. package/dist/config-DnpLL2kT.d.ts +46 -0
  120. package/dist/{service-qpCsOXkQ.d.ts → core-C1LPjxK6.d.ts} +2 -6
  121. package/dist/diagnostics-XKXVVQWH.js +93 -0
  122. package/dist/doctor-O2E63YGO.js +538 -0
  123. package/dist/entry-X6CSYQRQ.js +305 -0
  124. package/dist/exec-mcp-2PMWBPD7.js +365 -0
  125. package/dist/harness-L2KSI2ZB.js +177 -0
  126. package/dist/harness-egress-bridge.js +4 -4
  127. package/dist/harness-launch-gate.js +47 -940
  128. package/dist/harness-pane-runner.js +13 -80
  129. package/dist/harness-worker.js +21 -2703
  130. package/dist/hook-body.js +5222 -0
  131. package/dist/hook-spec-C5fWTSCH.d.ts +100 -0
  132. package/dist/hook.js +26 -0
  133. package/dist/hooks-BHTA44X7.js +21 -0
  134. package/dist/host-UIZAXXQH.js +22 -0
  135. package/dist/host-UWK754BW.js +210 -0
  136. package/dist/host-run-BI2OTZDZ.js +307 -0
  137. package/dist/http.d.ts +5 -42
  138. package/dist/http.js +21 -2234
  139. package/dist/import-mcp-GPKJI7DI.js +400 -0
  140. package/dist/index.d.ts +146 -168
  141. package/dist/index.js +133 -4948
  142. package/dist/init-3C2Y7BNJ.js +14 -0
  143. package/dist/install-GG7HHZK2.js +796 -0
  144. package/dist/invoke-44CJRVMK.js +23 -0
  145. package/dist/list-MCP2FXUF.js +68 -0
  146. package/dist/list-WL6L4J5H.js +65 -0
  147. package/dist/load-BEUBABtB.d.ts +21 -0
  148. package/dist/logout-F5EJ5MOU.js +44 -0
  149. package/dist/logs-TBUA4UWU.js +107 -0
  150. package/dist/mailbox/index.d.ts +10 -5
  151. package/dist/mailbox/index.js +53 -1572
  152. package/dist/mailbox-BMTZOSZ7.js +285 -0
  153. package/dist/mailbox-GDJ7BWQN.js +189 -0
  154. package/dist/mainline-KAD2ERLP.js +639 -0
  155. package/dist/marketplace-G4VQET5W.js +191 -0
  156. package/dist/mcp-235QZN2A.js +15 -0
  157. package/dist/mcp-FJ2UQ4RH.js +193 -0
  158. package/dist/models-ISU4DCMA.js +32 -0
  159. package/dist/opencode-CN7JLQYO.js +60 -0
  160. package/dist/pause-7LILUVGL.js +18 -0
  161. package/dist/preview-DT7DWG5F.js +91 -0
  162. package/dist/project/hook-adapter.d.ts +5 -2
  163. package/dist/project/hook-adapter.js +41 -27
  164. package/dist/project-5YV5CUEG.js +70 -0
  165. package/dist/pty-XTJ4MIWK.js +94 -0
  166. package/dist/recovery-U6QB3PMT.js +100 -0
  167. package/dist/reindex-Y27QJFDB.js +22 -0
  168. package/dist/resume-26VFAAMH.js +18 -0
  169. package/dist/run-3AXTZSR7.js +126 -0
  170. package/dist/run-3SOVRQIA.js +19 -0
  171. package/dist/serve-DQMKTFIV.js +104 -0
  172. package/dist/session-XM2CR425.js +159 -0
  173. package/dist/setup-DTKZLZUT.js +18 -0
  174. package/dist/start-login-YTZV6KMF.js +416 -0
  175. package/dist/status-A2OUTNGK.js +9 -0
  176. package/dist/status-H2VAHIDV.js +10 -0
  177. package/dist/status-MROQ7WR7.js +43 -0
  178. package/dist/status-RO55QPKV.js +55 -0
  179. package/dist/status-UME2L33L.js +286 -0
  180. package/dist/stdio.d.ts +3 -13
  181. package/dist/stdio.js +16 -3186
  182. package/dist/sweep-35LGQTTO.js +18 -0
  183. package/dist/test-AGZOJLRZ.js +561 -0
  184. package/dist/tools-gpHNq9Dh.d.ts +328 -0
  185. package/dist/tui-G5LLWCSV.js +153 -0
  186. package/dist/unbroadcast-5QNGAJR2.js +18 -0
  187. package/dist/validate-IU52H2IC.js +46 -0
  188. package/dist/worker-QZ5T6LJD.js +80 -0
  189. package/dist/worktree-create-PZSRB7PH.js +89 -0
  190. package/dist/worktree-list-JYB6VXLW.js +51 -0
  191. package/dist/worktree-sync-UF5CXPWV.js +30 -0
  192. package/docs/authoring.md +82 -0
  193. package/docs/browser-and-desktop.md +46 -0
  194. package/docs/commands.md +325 -0
  195. package/docs/compare.md +35 -0
  196. package/docs/compatibility.md +55 -0
  197. package/docs/embeddings.md +1 -1
  198. package/docs/getting-started.md +105 -0
  199. package/docs/git-workflow.md +60 -0
  200. package/docs/glossary.md +31 -0
  201. package/docs/hooks/capabilities/antigravity.json +199 -0
  202. package/docs/hooks/capabilities/claude.json +179 -0
  203. package/docs/hooks/capabilities/codex.json +179 -0
  204. package/docs/hooks/capabilities/gemini.json +196 -0
  205. package/docs/hooks/capabilities/grok.json +192 -0
  206. package/docs/hooks/capabilities/opencode.json +184 -0
  207. package/docs/hooks.md +264 -0
  208. package/docs/install.md +72 -0
  209. package/docs/library-skills.md +132 -0
  210. package/docs/mailbox.md +16 -5
  211. package/docs/project-configuration.md +540 -58
  212. package/docs/sessions.md +64 -0
  213. package/docs/skills.md +4 -45
  214. package/docs/terminal-harness.md +92 -44
  215. package/docs/terminal-workspace.md +81 -169
  216. package/gemini-extension.json +2 -2
  217. package/mcp.json +1 -1
  218. package/package.json +16 -2
  219. package/plugin.json +2 -2
  220. package/plugins/pmcp/.claude-plugin/plugin.json +4 -2
  221. package/plugins/pmcp/.mcp.json +1 -1
  222. package/plugins/pmcp/gemini-extension.json +2 -2
  223. package/plugins/pmcp/mcp.json +1 -1
  224. package/plugins/pmcp/mod/commands.ts +72 -0
  225. package/plugins/pmcp/mod/contract.d.ts +39 -0
  226. package/plugins/pmcp/mod/draw.tsx +216 -0
  227. package/plugins/pmcp/mod/guard.ts +42 -0
  228. package/plugins/pmcp/mod/hooks.json +4 -0
  229. package/plugins/pmcp/mod/host.ts +46 -0
  230. package/plugins/pmcp/mod/model.ts +144 -0
  231. package/plugins/pmcp/mod/reader/index.ts +18 -0
  232. package/plugins/pmcp/mod/reader/read.ts +76 -0
  233. package/plugins/pmcp/mod/reader/settings.ts +54 -0
  234. package/plugins/pmcp/mod/reader/types.ts +38 -0
  235. package/plugins/pmcp/mod/register.tsx +73 -0
  236. package/plugins/pmcp/mod/sessions/format.ts +91 -0
  237. package/plugins/pmcp/mod/sessions/types.ts +162 -0
  238. package/plugins/pmcp/mod/snapshot.ts +75 -0
  239. package/plugins/pmcp/mod/spinner.tsx +30 -0
  240. package/plugins/pmcp/mod/state.ts +28 -0
  241. package/plugins/pmcp/plugin.json +2 -2
  242. package/plugins/pmcp/skills/agent-assets-migrate/SKILL.md +96 -0
  243. package/plugins/pmcp/skills/headless-agents-ci-scaffold/SKILL.md +101 -0
  244. package/plugins/pmcp/skills/marketplace-plugin-scaffold/SKILL.md +87 -0
  245. package/plugins/pmcp/skills/package-skill-catalog/SKILL.md +51 -15
  246. package/plugins/pmcp/skills/pmcp-browser/SKILL.md +27 -0
  247. package/plugins/pmcp/skills/pmcp-desktop/SKILL.md +25 -0
  248. package/plugins/pmcp/skills/pmcp-project-init/SKILL.md +153 -0
  249. package/plugins/pmcp/skills/pmcp-sessions-and-git/SKILL.md +96 -0
  250. package/plugins/pmcp/skills/skill-package-scaffold/SKILL.md +89 -0
  251. package/schema/catalog-v1.json +187 -0
  252. package/schema/library.json +196 -0
  253. package/schema/marketplace-manifest.json +144 -0
  254. package/schema/plugin-manifest.json +59 -0
  255. package/schema/skill-frontmatter.json +170 -0
  256. package/schema/skill-metadata-core.json +131 -0
  257. package/skills/agent-assets-migrate/SKILL.md +96 -0
  258. package/skills/headless-agents-ci-scaffold/SKILL.md +101 -0
  259. package/skills/marketplace-plugin-scaffold/SKILL.md +87 -0
  260. package/skills/package-skill-catalog/SKILL.md +51 -15
  261. package/skills/pmcp-browser/SKILL.md +27 -0
  262. package/skills/pmcp-desktop/SKILL.md +25 -0
  263. package/skills/pmcp-project-init/SKILL.md +153 -0
  264. package/skills/pmcp-sessions-and-git/SKILL.md +96 -0
  265. package/skills/skill-package-scaffold/SKILL.md +89 -0
  266. package/dist/config-BkSpjUG6.d.ts +0 -50
  267. package/dist/embed-DRROSD3F.d.ts +0 -53
  268. package/dist/hook-spec-CSJJySsH.d.ts +0 -11
  269. package/dist/server-VWSY3Shw.d.ts +0 -543
  270. package/dist/tui-worker.js +0 -6549
  271. package/docs/manual-library-skills.md +0 -74
  272. /package/dist/{tui-worker.d.ts → hook.d.ts} +0 -0
@@ -0,0 +1,328 @@
1
+ import { z } from 'zod';
2
+
3
+ type MetadataLeaf = string | readonly string[];
4
+ type MetadataValue = MetadataLeaf | {
5
+ readonly [key: string]: MetadataLeaf;
6
+ };
7
+ declare function frontmatterObject(source: string): Record<string, unknown> | null;
8
+ declare const NAME_MAX = 64;
9
+ declare const DESCRIPTION_MAX = 1024;
10
+ declare const COMPATIBILITY_MAX = 500;
11
+ declare function specProblems(front: Record<string, unknown> | null, directory: string): string[];
12
+
13
+ declare const ASSET_KINDS: readonly ["skill", "agent", "hook", "mcp"];
14
+ declare const kindOf: (entry: Pick<SkillEntry, "kind">) => AssetKind;
15
+ declare const SKIPPED_DIRS: ReadonlySet<string>;
16
+ declare const MAX_SKILL_DEPTH = 3;
17
+
18
+ interface SkillEntry {
19
+ readonly name: string;
20
+ readonly package: string;
21
+ readonly slug: string;
22
+ readonly description: string;
23
+ readonly path: string;
24
+ readonly tier?: string;
25
+ readonly metadata?: Readonly<Record<string, MetadataValue>>;
26
+ readonly keywords?: readonly string[];
27
+ readonly kind?: AssetKind;
28
+ readonly root?: string;
29
+ }
30
+ type AssetKind = (typeof ASSET_KINDS)[number];
31
+ interface CatalogOptions {
32
+ readonly roots: readonly string[];
33
+ readonly scopes?: readonly string[];
34
+ readonly marketplaces?: readonly string[];
35
+ readonly packages?: readonly string[];
36
+ readonly workspaces?: readonly string[];
37
+ readonly onReject?: (rejection: {
38
+ path: string;
39
+ reason: string;
40
+ }) => void;
41
+ readonly onWarning?: (warning: {
42
+ path: string;
43
+ reason: string;
44
+ }) => void;
45
+ }
46
+
47
+ interface IntentCacheStats {
48
+ readonly hits: number;
49
+ readonly misses: number;
50
+ readonly mismatched: number;
51
+ readonly rows: number;
52
+ readonly provider?: string;
53
+ }
54
+ interface IntentCache {
55
+ get(intent: string): Float32Array | null;
56
+ put(intent: string, vector: Float32Array): void;
57
+ stats(): IntentCacheStats;
58
+ close(): void;
59
+ }
60
+ declare function normaliseIntent(intent: string): string;
61
+
62
+ type Ranking = "semantic" | "lexical";
63
+ interface Match {
64
+ readonly name: string;
65
+ readonly package: string;
66
+ readonly description: string;
67
+ readonly score: number;
68
+ }
69
+ interface FindResult {
70
+ readonly ranking: Ranking;
71
+ readonly matches: readonly Match[];
72
+ }
73
+ interface Embedder {
74
+ readonly modelId: string;
75
+ readonly indexKey?: string;
76
+ readonly dims: number;
77
+ embed(text: string): Promise<Float32Array>;
78
+ embedPassage?(text: string): Promise<Float32Array>;
79
+ }
80
+ interface FindOptions {
81
+ readonly entries: readonly SkillEntry[];
82
+ readonly intent: string;
83
+ readonly limit?: number;
84
+ readonly embedder?: Embedder;
85
+ readonly cache?: IntentCache;
86
+ readonly vectors?: ReadonlyMap<string, Float32Array>;
87
+ }
88
+ declare const DEFAULT_FIND_LIMIT = 5;
89
+ declare function lexicalScore(intent: string, description: string): number;
90
+ declare function cosine(a: Float32Array, b: Float32Array): number;
91
+ declare function find(options: FindOptions): Promise<FindResult>;
92
+
93
+ interface SkillFile {
94
+ readonly path: string;
95
+ readonly bytes: number;
96
+ readonly sha256: string;
97
+ }
98
+ interface SkillFileListing {
99
+ readonly files: readonly SkillFile[];
100
+ readonly truncated: boolean;
101
+ }
102
+ declare function listSkillFiles(root: string, limit?: number): SkillFileListing;
103
+
104
+ interface BundleFile extends SkillFile {
105
+ readonly uri: string;
106
+ readonly mimeType: string;
107
+ }
108
+ interface SkillBundle {
109
+ readonly name: string;
110
+ readonly files: readonly BundleFile[];
111
+ readonly truncated: boolean;
112
+ }
113
+ declare function bundleSkill(entry: SkillEntry): SkillBundle;
114
+
115
+ declare const RUNTIMES: readonly ["claude-code", "codex-cli", "gemini-cli", "grok-cli", "antigravity"];
116
+ type Runtime = (typeof RUNTIMES)[number];
117
+ declare function verifiedRuntimesOf(metadata: Readonly<Record<string, MetadataValue>> | undefined): Runtime[];
118
+ declare function runtimeOfClient(name: string | undefined): Runtime | null;
119
+ interface ClientSource {
120
+ readonly server?: {
121
+ getClientVersion?: () => {
122
+ readonly name?: string;
123
+ } | undefined;
124
+ };
125
+ }
126
+ interface RequestContext {
127
+ readonly mcpReq?: {
128
+ readonly envelope?: object;
129
+ };
130
+ }
131
+ declare function detectRuntime(server: ClientSource, ctx?: RequestContext): Runtime | null;
132
+
133
+ type KindFilter = AssetKind | "any";
134
+ interface SkillFilters {
135
+ readonly kind?: KindFilter;
136
+ readonly tier?: string;
137
+ readonly package?: string;
138
+ readonly level?: string;
139
+ readonly domain?: string;
140
+ readonly medium?: string;
141
+ readonly runtime?: Runtime;
142
+ readonly verifiedOnly?: boolean;
143
+ }
144
+ interface SkillServerOptions extends CatalogOptions {
145
+ readonly embedder?: Embedder;
146
+ readonly cache?: IntentCache;
147
+ readonly vectors?: ReadonlyMap<string, Float32Array>;
148
+ readonly loadCatalog?: (options: CatalogOptions) => SkillEntry[];
149
+ readonly rankByClientRuntime?: boolean;
150
+ }
151
+ interface CallResponse {
152
+ readonly name: string;
153
+ readonly body: string;
154
+ readonly files: readonly BundleFile[];
155
+ readonly filesTruncated: boolean;
156
+ }
157
+ type SkillTools = ReturnType<typeof createSkillTools>;
158
+
159
+ declare const catalogItemSchema: z.ZodObject<{
160
+ name: z.ZodString;
161
+ description: z.ZodString;
162
+ tier: z.ZodOptional<z.ZodString>;
163
+ kind: z.ZodOptional<z.ZodEnum<{
164
+ skill: "skill";
165
+ agent: "agent";
166
+ hook: "hook";
167
+ mcp: "mcp";
168
+ }>>;
169
+ verifiedRuntimes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
170
+ "claude-code": "claude-code";
171
+ "codex-cli": "codex-cli";
172
+ "gemini-cli": "gemini-cli";
173
+ "grok-cli": "grok-cli";
174
+ antigravity: "antigravity";
175
+ }>>>;
176
+ verified: z.ZodOptional<z.ZodBoolean>;
177
+ }, z.core.$loose>;
178
+ declare const catalogResponseSchema: z.ZodObject<{
179
+ count: z.ZodNumber;
180
+ page: z.ZodNumber;
181
+ totalPages: z.ZodNumber;
182
+ hasNext: z.ZodBoolean;
183
+ packages: z.ZodArray<z.ZodObject<{
184
+ package: z.ZodString;
185
+ skills: z.ZodArray<z.ZodObject<{
186
+ name: z.ZodString;
187
+ description: z.ZodString;
188
+ tier: z.ZodOptional<z.ZodString>;
189
+ kind: z.ZodOptional<z.ZodEnum<{
190
+ skill: "skill";
191
+ agent: "agent";
192
+ hook: "hook";
193
+ mcp: "mcp";
194
+ }>>;
195
+ verifiedRuntimes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
196
+ "claude-code": "claude-code";
197
+ "codex-cli": "codex-cli";
198
+ "gemini-cli": "gemini-cli";
199
+ "grok-cli": "grok-cli";
200
+ antigravity: "antigravity";
201
+ }>>>;
202
+ verified: z.ZodOptional<z.ZodBoolean>;
203
+ }, z.core.$loose>>;
204
+ }, z.core.$loose>>;
205
+ }, z.core.$loose>;
206
+ declare const findResultSchema: z.ZodObject<{
207
+ ranking: z.ZodEnum<{
208
+ semantic: "semantic";
209
+ lexical: "lexical";
210
+ }>;
211
+ runtime: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
212
+ "claude-code": "claude-code";
213
+ "codex-cli": "codex-cli";
214
+ "gemini-cli": "gemini-cli";
215
+ "grok-cli": "grok-cli";
216
+ antigravity: "antigravity";
217
+ }>>>;
218
+ matches: z.ZodArray<z.ZodObject<{
219
+ name: z.ZodString;
220
+ package: z.ZodString;
221
+ description: z.ZodString;
222
+ score: z.ZodNumber;
223
+ verifiedRuntimes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
224
+ "claude-code": "claude-code";
225
+ "codex-cli": "codex-cli";
226
+ "gemini-cli": "gemini-cli";
227
+ "grok-cli": "grok-cli";
228
+ antigravity: "antigravity";
229
+ }>>>;
230
+ verified: z.ZodOptional<z.ZodBoolean>;
231
+ }, z.core.$loose>>;
232
+ }, z.core.$loose>;
233
+ declare const describeResponseSchema: z.ZodObject<{
234
+ name: z.ZodString;
235
+ kind: z.ZodEnum<{
236
+ skill: "skill";
237
+ agent: "agent";
238
+ hook: "hook";
239
+ mcp: "mcp";
240
+ }>;
241
+ package: z.ZodString;
242
+ description: z.ZodString;
243
+ tier: z.ZodOptional<z.ZodString>;
244
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString>>]>>;
245
+ frontmatter: z.ZodString;
246
+ files: z.ZodArray<z.ZodObject<{
247
+ path: z.ZodString;
248
+ bytes: z.ZodNumber;
249
+ sha256: z.ZodString;
250
+ }, z.core.$loose>>;
251
+ filesTruncated: z.ZodBoolean;
252
+ }, z.core.$loose>;
253
+ declare const bundleResponseSchema: z.ZodObject<{
254
+ name: z.ZodString;
255
+ truncated: z.ZodBoolean;
256
+ files: z.ZodArray<z.ZodObject<{
257
+ path: z.ZodString;
258
+ bytes: z.ZodNumber;
259
+ sha256: z.ZodString;
260
+ uri: z.ZodString;
261
+ mimeType: z.ZodString;
262
+ }, z.core.$loose>>;
263
+ }, z.core.$loose>;
264
+ type CatalogItem = z.infer<typeof catalogItemSchema>;
265
+ type CatalogResponse = z.infer<typeof catalogResponseSchema>;
266
+ type FindResponse = z.infer<typeof findResultSchema>;
267
+ type DescribeResponse = z.infer<typeof describeResponseSchema>;
268
+
269
+ declare function mimeOf(path: string): string | null;
270
+ declare function isUtf8Text(bytes: Uint8Array): boolean;
271
+ type FileKind = "text" | "image" | "audio" | "blob";
272
+ interface Classified {
273
+ readonly kind: FileKind;
274
+ readonly mimeType: string;
275
+ }
276
+ declare function classify(path: string, bytes: Uint8Array): Classified;
277
+
278
+ type FileRefusal = {
279
+ readonly ok: false;
280
+ readonly error: "path_outside_skill" | "no_such_file";
281
+ readonly detail: string;
282
+ };
283
+
284
+ declare const READ_BUDGET_BYTES: number;
285
+ interface SkillFileContent {
286
+ readonly ok: true;
287
+ readonly name: string;
288
+ readonly path: string;
289
+ readonly bytes: number;
290
+ readonly sha256: string;
291
+ readonly mimeType: string;
292
+ readonly kind: FileKind;
293
+ readonly text?: string;
294
+ readonly blob?: string;
295
+ }
296
+ type ReadResult = SkillFileContent | FileRefusal | {
297
+ readonly ok: false;
298
+ readonly error: "over_budget";
299
+ readonly detail: string;
300
+ };
301
+ declare function readSkillFile(entry: SkillEntry, wanted?: string, budget?: number): ReadResult;
302
+
303
+ declare function createSkillTools(options: SkillServerOptions): {
304
+ catalog(request?: {
305
+ page?: number;
306
+ pageSize?: number;
307
+ tier?: string;
308
+ kind?: KindFilter;
309
+ runtime?: Runtime;
310
+ verifiedOnly?: boolean;
311
+ clientRuntime?: Runtime | null;
312
+ }): CatalogResponse;
313
+ find(intent: string, limit?: number, filters?: SkillFilters, clientRuntime?: Runtime | null): Promise<FindResponse>;
314
+ describe(name: string): DescribeResponse | null;
315
+ read(name: string, path?: string): ReadResult | {
316
+ ok: false;
317
+ error: "unknown_skill";
318
+ detail: string;
319
+ };
320
+ bundle(name: string): SkillBundle | null;
321
+ call(name: string): CallResponse | null;
322
+ entry: (name: string) => SkillEntry | null;
323
+ refresh(): void;
324
+ entries: () => Omit<SkillEntry, "path">[];
325
+ skills: () => readonly SkillEntry[];
326
+ };
327
+
328
+ export { normaliseIntent as $, ASSET_KINDS as A, type BundleFile as B, type CatalogOptions as C, DEFAULT_FIND_LIMIT as D, type Embedder as E, type FileKind as F, bundleResponseSchema as G, bundleSkill as H, type IntentCache as I, catalogResponseSchema as J, type KindFilter as K, classify as L, type MetadataValue as M, NAME_MAX as N, cosine as O, createSkillTools as P, describeResponseSchema as Q, type Runtime as R, type SkillServerOptions as S, detectRuntime as T, find as U, findResultSchema as V, isUtf8Text as W, kindOf as X, lexicalScore as Y, listSkillFiles as Z, mimeOf as _, type SkillEntry as a, frontmatterObject as a0, readSkillFile as a1, runtimeOfClient as a2, specProblems as a3, type Ranking as b, type SkillTools as c, type AssetKind as d, COMPATIBILITY_MAX as e, type CallResponse as f, type CatalogItem as g, type CatalogResponse as h, type Classified as i, DESCRIPTION_MAX as j, type FindOptions as k, type FindResult as l, type IntentCacheStats as m, MAX_SKILL_DEPTH as n, type Match as o, type MetadataLeaf as p, READ_BUDGET_BYTES as q, RUNTIMES as r, type ReadResult as s, SKIPPED_DIRS as t, type SkillBundle as u, verifiedRuntimesOf as v, type SkillFile as w, type SkillFileContent as x, type SkillFileListing as y, type SkillFilters as z };
@@ -0,0 +1,153 @@
1
+ import {
2
+ unsupportedHost,
3
+ unsupportedReceipt
4
+ } from "./chunk-F5XMGOOX.js";
5
+ import {
6
+ tuiSpec
7
+ } from "./chunk-3Y3HDMHA.js";
8
+ import {
9
+ ArgumentError,
10
+ one
11
+ } from "./chunk-A4PKLESO.js";
12
+ import {
13
+ ConfigError
14
+ } from "./chunk-QPL7E2HW.js";
15
+ import "./chunk-PMJG2CXF.js";
16
+
17
+ // src/commands/tui/invocation.ts
18
+ var allowed = {
19
+ launch: ["config", "runtime", "yes", "new"],
20
+ plan: ["config", "runtime"],
21
+ recovery: ["config"],
22
+ "start-worker": ["config", "runtime", "memory-mb"],
23
+ doctor: []
24
+ };
25
+ var REMOVED = /* @__PURE__ */ new Set([
26
+ "create",
27
+ "inspect",
28
+ "open",
29
+ "main",
30
+ "observe",
31
+ "control",
32
+ "release",
33
+ "history",
34
+ "mailbox",
35
+ "resize",
36
+ "stop",
37
+ "detach",
38
+ "disconnect",
39
+ "close",
40
+ "dismiss",
41
+ "management",
42
+ "worker-menu",
43
+ "check"
44
+ ]);
45
+ function parseTui(args) {
46
+ const [action = "launch", ...extra] = args.positional;
47
+ if (REMOVED.has(action))
48
+ throw new ArgumentError(
49
+ `tui ${action} was a tmux view operation and is removed; run pmcp tui, which opens pmcp-tui on the group's pmcp-pty host`
50
+ );
51
+ const options = allowed[action];
52
+ if (!options || extra.length)
53
+ throw new ArgumentError("Provide one supported TUI operation");
54
+ for (const key of [...args.options.keys(), ...args.flags])
55
+ if (!options.includes(key))
56
+ throw new ArgumentError(`--${key} is not supported by tui ${action}`);
57
+ const required = (key) => {
58
+ const value = one(args, key);
59
+ if (!value) throw new ArgumentError(`Provide --${key}`);
60
+ return value;
61
+ };
62
+ const number = (key) => {
63
+ const value = one(args, key);
64
+ if (value === void 0) return void 0;
65
+ if (!/^\d+$/.test(value) || !Number.isSafeInteger(Number(value)))
66
+ throw new ArgumentError(`--${key} requires an integer`);
67
+ return Number(value);
68
+ };
69
+ if (action === "doctor") return { action };
70
+ if (action === "start-worker")
71
+ return {
72
+ action,
73
+ startup: {
74
+ config: one(args, "config"),
75
+ runtime: required("runtime"),
76
+ memoryMb: number("memory-mb")
77
+ }
78
+ };
79
+ return {
80
+ action,
81
+ startup: {
82
+ config: one(args, "config"),
83
+ runtime: one(args, "runtime"),
84
+ fresh: args.flags.has("new"),
85
+ confirmed: args.flags.has("yes")
86
+ }
87
+ };
88
+ }
89
+
90
+ // src/commands/tui.ts
91
+ function failed(error) {
92
+ const message = error instanceof Error ? error.message : "tui_failed";
93
+ const [code, ...detail] = message.split(": ");
94
+ return {
95
+ schemaVersion: 1,
96
+ ok: false,
97
+ error: code,
98
+ ...detail.length ? { hint: detail.join(": ") } : {},
99
+ inputReplayed: false
100
+ };
101
+ }
102
+ var tuiCommand = {
103
+ ...tuiSpec,
104
+ async run(context) {
105
+ const invocation = parseTui(context.args);
106
+ const unsupported = unsupportedHost();
107
+ if (unsupported) {
108
+ context.ui.data(`${JSON.stringify(unsupportedReceipt(unsupported))}
109
+ `);
110
+ return 1;
111
+ }
112
+ try {
113
+ let receipt;
114
+ if (invocation.action === "doctor") {
115
+ const { inspectTerminalHost } = await import("./diagnostics-XKXVVQWH.js");
116
+ receipt = inspectTerminalHost();
117
+ } else if (invocation.action === "start-worker") {
118
+ const { startWorkspaceWorker } = await import("./worker-QZ5T6LJD.js");
119
+ receipt = await startWorkspaceWorker(
120
+ { config: invocation.startup?.config, cwd: context.cwd },
121
+ invocation.startup.runtime,
122
+ invocation.startup?.memoryMb
123
+ );
124
+ } else if (invocation.action === "recovery") {
125
+ const { inspectStartupRecovery } = await import("./recovery-U6QB3PMT.js");
126
+ receipt = inspectStartupRecovery({
127
+ ...invocation.startup,
128
+ cwd: context.cwd
129
+ });
130
+ } else {
131
+ const { launchStartup, planStartup } = await import("./entry-X6CSYQRQ.js");
132
+ const request = { ...invocation.startup, cwd: context.cwd };
133
+ receipt = invocation.action === "plan" ? planStartup(request) : await launchStartup(
134
+ request,
135
+ invocation.startup?.confirmed === true
136
+ );
137
+ }
138
+ if (invocation.action !== "launch" || receipt.ok !== true)
139
+ context.ui.data(`${JSON.stringify(receipt)}
140
+ `);
141
+ return receipt.ok === true ? 0 : 1;
142
+ } catch (error) {
143
+ if (error instanceof ConfigError) throw new ArgumentError(error.message);
144
+ context.ui.data(`${JSON.stringify(failed(error))}
145
+ `);
146
+ return 1;
147
+ }
148
+ }
149
+ };
150
+ export {
151
+ tuiCommand
152
+ };
153
+ //# sourceMappingURL=tui-G5LLWCSV.js.map
@@ -0,0 +1,18 @@
1
+ import {
2
+ change
3
+ } from "./chunk-LBXO4VPG.js";
4
+ import "./chunk-26WLNWDG.js";
5
+ import "./chunk-LTZH5E3G.js";
6
+ import "./chunk-C4NHQGHL.js";
7
+ import "./chunk-A4PKLESO.js";
8
+ import "./chunk-OEH47H6A.js";
9
+ import "./chunk-IJBSOWHK.js";
10
+ import "./chunk-QPL7E2HW.js";
11
+ import "./chunk-PMJG2CXF.js";
12
+
13
+ // src/sessions/cli/unbroadcast.ts
14
+ var run = (context) => change(context, "unbroadcast");
15
+ export {
16
+ run
17
+ };
18
+ //# sourceMappingURL=unbroadcast-5QNGAJR2.js.map
@@ -0,0 +1,46 @@
1
+ import {
2
+ catalogOptionsFrom
3
+ } from "./chunk-5QQWS4US.js";
4
+ import {
5
+ configFrom
6
+ } from "./chunk-7DLZC73N.js";
7
+ import {
8
+ validateCatalog,
9
+ validateSkillDir
10
+ } from "./chunk-AJ4VXM2U.js";
11
+ import "./chunk-73AKO4UL.js";
12
+ import {
13
+ validateSpec
14
+ } from "./chunk-INT7QLEU.js";
15
+ import "./chunk-JEL35P7S.js";
16
+ import "./chunk-A4PKLESO.js";
17
+ import "./chunk-KMXRRSKT.js";
18
+ import "./chunk-YSAWTGNA.js";
19
+ import "./chunk-QPL7E2HW.js";
20
+ import "./chunk-PMJG2CXF.js";
21
+
22
+ // src/commands/validate.ts
23
+ var validateCommand = {
24
+ ...validateSpec,
25
+ run(context) {
26
+ const dirs = context.args.positional;
27
+ const settings = configFrom(context)?.catalog.validation ?? {};
28
+ const findings = dirs.length > 0 ? dirs.flatMap((dir) => validateSkillDir(dir, settings)) : validateCatalog(catalogOptionsFrom(context), settings);
29
+ const errors = findings.filter((f) => f.level === "error").length;
30
+ if (context.args.flags.has("json")) {
31
+ context.ui.data(`${JSON.stringify({ findings }, null, 2)}
32
+ `);
33
+ return errors > 0 ? 1 : 0;
34
+ }
35
+ for (const finding of findings) {
36
+ const report = finding.level === "error" ? context.ui.error : context.ui.warn;
37
+ report.call(context.ui, finding.reason, finding.path);
38
+ }
39
+ if (findings.length === 0) context.ui.success("every skill is valid");
40
+ return errors > 0 ? 1 : 0;
41
+ }
42
+ };
43
+ export {
44
+ validateCommand
45
+ };
46
+ //# sourceMappingURL=validate-IU52H2IC.js.map
@@ -0,0 +1,80 @@
1
+ import {
2
+ invoke
3
+ } from "./chunk-2FIV63WC.js";
4
+ import {
5
+ readStartup,
6
+ startupFile,
7
+ startupSettings
8
+ } from "./chunk-PAX3QXX2.js";
9
+ import "./chunk-DZ2MRTYT.js";
10
+ import "./chunk-3IDXEV5E.js";
11
+ import "./chunk-LW4TG7EL.js";
12
+ import {
13
+ locateExecutable
14
+ } from "./chunk-R2GPCZUX.js";
15
+ import "./chunk-7UCZAN4J.js";
16
+ import "./chunk-34DECPVC.js";
17
+ import "./chunk-DMZHQZ7P.js";
18
+ import "./chunk-7HFIGCSL.js";
19
+ import "./chunk-OEH47H6A.js";
20
+ import "./chunk-IJBSOWHK.js";
21
+ import "./chunk-65KAQSJP.js";
22
+ import "./chunk-QPL7E2HW.js";
23
+ import "./chunk-PMJG2CXF.js";
24
+ import {
25
+ GroupStore
26
+ } from "./chunk-TVL5RTE6.js";
27
+ import "./chunk-5OMOPUE6.js";
28
+ import {
29
+ runtimeExecutables
30
+ } from "./chunk-BU65MNVU.js";
31
+
32
+ // src/tui/startup/worker.ts
33
+ async function startWorkspaceWorker(request, runtime, memoryMb) {
34
+ if (!Object.hasOwn(runtimeExecutables, runtime))
35
+ throw new Error("unsupported_runtime");
36
+ const settings = startupSettings({
37
+ cwd: request.cwd,
38
+ config: request.config
39
+ });
40
+ const state = readStartup(
41
+ startupFile(settings.projectRoot),
42
+ settings.projectRoot
43
+ );
44
+ if (!state || state.phase !== "ready" || !state.groupFile || !state.generation)
45
+ throw new Error("startup_requires_recovery");
46
+ const store = new GroupStore(state.groupFile);
47
+ const group = store.state.group;
48
+ if (group.projectRoot !== settings.projectRoot)
49
+ throw new Error("startup_project_mismatch");
50
+ if (group.generation !== state.generation)
51
+ throw new Error("stale_group_generation");
52
+ if (group.state === "paused") throw new Error("startup_group_paused");
53
+ if (group.state !== "ready") throw new Error("startup_group_not_ready");
54
+ if (group.profile === "native" && !locateExecutable(runtimeExecutables[runtime], request.cwd))
55
+ throw new Error("runtime_executable_unavailable");
56
+ const observed = await invoke({
57
+ family: "session",
58
+ action: "list",
59
+ groupFile: store.path
60
+ });
61
+ if (observed.ok !== true) return observed;
62
+ const sessions = observed.sessions;
63
+ if (!sessions.some((session) => session.role === "main" && session.alive))
64
+ throw new Error("startup_main_unavailable");
65
+ return invoke({
66
+ family: "session",
67
+ action: "start",
68
+ groupFile: store.path,
69
+ generation: group.generation,
70
+ input: {
71
+ runtime,
72
+ role: "worker",
73
+ memoryMb: memoryMb ?? settings.sessionMemoryMb
74
+ }
75
+ });
76
+ }
77
+ export {
78
+ startWorkspaceWorker
79
+ };
80
+ //# sourceMappingURL=worker-QZ5T6LJD.js.map