@pinixai/core 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/manifest.ts +22 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinixai/core",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Clip framework for Pinix — define once, run as CLI / MCP / Pinix bridge",
5
5
  "main": "src/index.ts",
6
6
  "module": "src/index.ts",
package/src/manifest.ts CHANGED
@@ -15,6 +15,8 @@ export interface IPCManifest {
15
15
  description?: string;
16
16
  commands: IPCCommandInfo[];
17
17
  dependencies: Record<string, { package: string; version: string }>;
18
+ patterns?: string[];
19
+ entities?: Record<string, unknown>;
18
20
  package?: string;
19
21
  version?: string;
20
22
  }
@@ -207,10 +209,29 @@ export function createIPCManifest(clip: Clip): IPCManifest {
207
209
  commands.push(cmd);
208
210
  }
209
211
 
210
- return {
212
+ const manifest: IPCManifest = {
211
213
  domain: clip.domain,
212
214
  commands,
213
215
  dependencies: clip.dependencies,
214
216
  ...pkgInfo,
215
217
  };
218
+
219
+ if (clip.patterns.length > 0) {
220
+ manifest.patterns = clip.patterns;
221
+ }
222
+
223
+ const entityEntries = Object.entries(clip.entities);
224
+ if (entityEntries.length > 0) {
225
+ const entities: Record<string, unknown> = {};
226
+ for (const [name, schema] of entityEntries) {
227
+ try {
228
+ entities[name] = z.toJSONSchema(schema);
229
+ } catch {}
230
+ }
231
+ if (Object.keys(entities).length > 0) {
232
+ manifest.entities = entities;
233
+ }
234
+ }
235
+
236
+ return manifest;
216
237
  }