@parall/cli 1.66.0 → 1.68.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 (41) hide show
  1. package/dist/commands/agents.d.ts +2 -0
  2. package/dist/commands/agents.d.ts.map +1 -1
  3. package/dist/commands/apps-db.d.ts +8 -0
  4. package/dist/commands/apps-db.d.ts.map +1 -0
  5. package/dist/commands/apps-db.js +17 -0
  6. package/dist/commands/apps-publish.d.ts +23 -0
  7. package/dist/commands/apps-publish.d.ts.map +1 -0
  8. package/dist/commands/apps-publish.js +288 -0
  9. package/dist/commands/apps-scaffold.d.ts +9 -0
  10. package/dist/commands/apps-scaffold.d.ts.map +1 -0
  11. package/dist/commands/apps-scaffold.js +379 -0
  12. package/dist/commands/apps.d.ts +12 -0
  13. package/dist/commands/apps.d.ts.map +1 -0
  14. package/dist/commands/apps.js +172 -0
  15. package/dist/commands/clip.d.ts.map +1 -1
  16. package/dist/commands/clip.js +55 -10
  17. package/dist/commands/db-plane.d.ts +41 -0
  18. package/dist/commands/db-plane.d.ts.map +1 -0
  19. package/dist/commands/db-plane.js +237 -0
  20. package/dist/commands/dbs.d.ts +16 -0
  21. package/dist/commands/dbs.d.ts.map +1 -0
  22. package/dist/commands/dbs.js +147 -0
  23. package/dist/commands/triggers.d.ts +14 -1
  24. package/dist/commands/triggers.d.ts.map +1 -1
  25. package/dist/commands/triggers.js +64 -0
  26. package/dist/commands/watch.d.ts +1 -1
  27. package/dist/commands/watch.d.ts.map +1 -1
  28. package/dist/commands/watch.js +21 -11
  29. package/dist/commands/wiki-changesets.d.ts +3 -0
  30. package/dist/commands/wiki-changesets.d.ts.map +1 -0
  31. package/dist/commands/wiki-changesets.js +176 -0
  32. package/dist/commands/wiki.d.ts.map +1 -1
  33. package/dist/commands/wiki.js +4 -173
  34. package/dist/index.js +20 -16
  35. package/dist/lib/wiki-tool-definition.d.ts +23 -0
  36. package/dist/lib/wiki-tool-definition.d.ts.map +1 -0
  37. package/dist/lib/wiki-tool-definition.js +17 -0
  38. package/dist/lib/wiki-tools.d.ts +2 -24
  39. package/dist/lib/wiki-tools.d.ts.map +1 -1
  40. package/dist/lib/wiki-tools.js +11 -16
  41. package/package.json +6 -4
@@ -1,3 +1,4 @@
1
+ import { finalizeWikiTool, jsonText } from './wiki-tool-definition.js';
1
2
  import { promises as fs } from 'node:fs';
2
3
  import * as z from 'zod/v4';
3
4
  import { resolveRuntimeContext } from './client.js';
@@ -10,10 +11,16 @@ import { getWikiBlob, getWikiChangesetDiff, getWikiOutline, getWikiSection, getW
10
11
  * `wiki file get` has no such cap (it streams to stdout / a file).
11
12
  */
12
13
  const WIKI_FILE_INLINE_MAX_BYTES = 64 * 1024;
13
- /** Pretty-print a value as 2-space-indented JSON for a tool's human-readable `text` field. */
14
- function jsonText(value) {
15
- return JSON.stringify(value, null, 2);
16
- }
14
+ /**
15
+ * Shared Parall wiki native tool registry.
16
+ *
17
+ * Single source of truth for the wiki tool surface consumed by:
18
+ * - the MCP server (`commands/mcp.ts`), which registers each definition
19
+ * - the eval harness (`@parall/eval`), which benchmarks the real tools
20
+ *
21
+ * Keep the schemas and handlers here behavior-identical to what the MCP
22
+ * server used to define inline. Do not fork an eval-only clone.
23
+ */
17
24
  /**
18
25
  * Strictly decode base64 from a tool argument. `Buffer.from(s, 'base64')` is
19
26
  * lenient — it silently drops non-base64 characters and tolerates wrong-length
@@ -28,18 +35,6 @@ function decodeBase64Strict(value) {
28
35
  }
29
36
  return Buffer.from(normalized, 'base64');
30
37
  }
31
- /**
32
- * Wrap a tool definition so its handler validates raw args against the tool's
33
- * `inputSchema` before running. Returns a copy with the handler replaced; the
34
- * wrapped handler throws a Zod parse error on invalid/missing input.
35
- */
36
- function finalizeWikiTool(tool) {
37
- const inputParser = z.object(tool.inputSchema);
38
- return {
39
- ...tool,
40
- handler: async (args) => tool.handler(inputParser.parse(args ?? {})),
41
- };
42
- }
43
38
  /**
44
39
  * Build the full wiki native tool registry bound to a Parall context (credentials,
45
40
  * agent env, local mount). Returns one definition per wiki capability (list, tree,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parall/cli",
3
- "version": "1.66.0",
3
+ "version": "1.68.0",
4
4
  "description": "CLI client for Parall — universal agent & human access to Parall API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,16 +36,18 @@
36
36
  "diff": "^8.0.3",
37
37
  "js-yaml": "^4.1.0",
38
38
  "node-diff3": "3.2.1",
39
+ "tar-stream": "^3.2.1",
39
40
  "zod": "^4.3.6",
40
- "@parall/agent-core": "1.66.0",
41
- "@parall/sdk": "1.66.0"
41
+ "@parall/agent-core": "1.68.0",
42
+ "@parall/sdk": "1.68.0"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@types/js-yaml": "^4.0.9",
45
46
  "@types/node": "^22.0.0",
47
+ "@types/tar-stream": "^3.1.4",
46
48
  "esbuild": "^0.25.0",
47
49
  "typescript": "^5.7.0",
48
- "@parall/agent-core": "1.66.0"
50
+ "@parall/agent-core": "1.68.0"
49
51
  },
50
52
  "scripts": {
51
53
  "build": "tsc",