pinokiod 8.0.31 → 8.0.32

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.
@@ -16,6 +16,8 @@ const FUNCTION_KEYS = new Set([...ACTION_KEYS, ...STATUS_KEYS])
16
16
  const BUILTIN_TOOL_ALIASES = {
17
17
  claude: "pinokio/run/plugin/claude",
18
18
  codex: "pinokio/run/plugin/codex",
19
+ grok: "pinokio/run/plugin/grok",
20
+ "grok-build": "pinokio/run/plugin/grok",
19
21
  antigravity: "pinokio/run/plugin/antigravity-cli",
20
22
  "antigravity-cli": "pinokio/run/plugin/antigravity-cli",
21
23
  "code/claude": "pinokio/run/plugin/claude",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "8.0.31",
3
+ "version": "8.0.32",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
Binary file
@@ -0,0 +1,44 @@
1
+ module.exports = {
2
+ title: "Grok Build",
3
+ icon: "grok.png",
4
+ link: "https://github.com/xai-org/grok-build",
5
+ run: [{
6
+ when: "{{platform === 'win32'}}",
7
+ id: "run",
8
+ method: "shell.run",
9
+ params: {
10
+ shell: "{{kernel.path('bin/miniforge/Library/bin/bash.exe')}}",
11
+ conda: {
12
+ skip: true
13
+ },
14
+ message: {
15
+ _: [
16
+ "npx",
17
+ "-y",
18
+ "@xai-official/grok@latest",
19
+ "{{args.prompt || undefined}}"
20
+ ]
21
+ },
22
+ path: "{{args.cwd}}",
23
+ input: true,
24
+ buffer: 1024
25
+ }
26
+ }, {
27
+ when: "{{platform !== 'win32'}}",
28
+ id: "run",
29
+ method: "shell.run",
30
+ params: {
31
+ message: {
32
+ _: [
33
+ "npx",
34
+ "-y",
35
+ "@xai-official/grok@latest",
36
+ "{{args.prompt || undefined}}"
37
+ ]
38
+ },
39
+ path: "{{args.cwd}}",
40
+ input: true,
41
+ buffer: 1024
42
+ }
43
+ }]
44
+ }
Binary file
@@ -0,0 +1,20 @@
1
+ const grok = require("../grok/pinokio")
2
+
3
+ module.exports = {
4
+ ...grok,
5
+ title: "Grok Build Auto",
6
+ description: "Grok Build with tool permission prompts automatically approved unless explicitly denied.",
7
+ run: grok.run.map((step) => ({
8
+ ...step,
9
+ params: {
10
+ ...step.params,
11
+ message: {
12
+ _: [
13
+ ...step.params.message._.slice(0, 3),
14
+ "--always-approve",
15
+ ...step.params.message._.slice(3)
16
+ ]
17
+ }
18
+ }
19
+ }))
20
+ }
@@ -0,0 +1,78 @@
1
+ const assert = require("node:assert/strict")
2
+ const fs = require("node:fs")
3
+ const path = require("node:path")
4
+ const test = require("node:test")
5
+
6
+ const grok = require("../system/plugin/grok/pinokio")
7
+ const grokAuto = require("../system/plugin/grok-auto/pinokio")
8
+
9
+ test("Grok Build exposes a minimal npx-backed terminal plugin", () => {
10
+ assert.equal(grok.title, "Grok Build")
11
+ assert.equal(grok.icon, "grok.png")
12
+ assert.equal(grok.link, "https://github.com/xai-org/grok-build")
13
+ assert.equal(fs.existsSync(path.join(__dirname, "..", "system", "plugin", "grok", grok.icon)), true)
14
+
15
+ for (const action of ["install", "update", "uninstall", "installed"]) {
16
+ assert.equal(Object.prototype.hasOwnProperty.call(grok, action), false)
17
+ }
18
+
19
+ assert.equal(grok.run.length, 2)
20
+ for (const step of grok.run) {
21
+ assert.equal(step.id, "run")
22
+ assert.equal(step.method, "shell.run")
23
+ assert.deepEqual(step.params.message, {
24
+ _: [
25
+ "npx",
26
+ "-y",
27
+ "@xai-official/grok@latest",
28
+ "{{args.prompt || undefined}}"
29
+ ]
30
+ })
31
+ assert.equal(step.params.path, "{{args.cwd}}")
32
+ assert.equal(step.params.input, true)
33
+ assert.equal(step.params.buffer, 1024)
34
+ }
35
+
36
+ assert.match(grok.run[0].when, /win32/)
37
+ assert.match(grok.run[0].params.shell, /bash\.exe/)
38
+ assert.equal(grok.run[0].params.conda.skip, true)
39
+ assert.equal(Object.prototype.hasOwnProperty.call(grok.run[1].params, "shell"), false)
40
+ })
41
+
42
+ test("Grok Build Auto shares the base wrapper and enables always-approve", () => {
43
+ assert.equal(grokAuto.title, "Grok Build Auto")
44
+ assert.equal(grokAuto.icon, grok.icon)
45
+ assert.equal(grokAuto.link, grok.link)
46
+ assert.match(grokAuto.description, /automatically approved/)
47
+ assert.equal(fs.existsSync(path.join(__dirname, "..", "system", "plugin", "grok-auto", grokAuto.icon)), true)
48
+
49
+ for (const action of ["install", "update", "uninstall", "installed"]) {
50
+ assert.equal(Object.prototype.hasOwnProperty.call(grokAuto, action), false)
51
+ }
52
+
53
+ assert.equal(grokAuto.run.length, grok.run.length)
54
+ for (let index = 0; index < grok.run.length; index += 1) {
55
+ const baseStep = grok.run[index]
56
+ const autoStep = grokAuto.run[index]
57
+
58
+ assert.equal(autoStep.when, baseStep.when)
59
+ assert.equal(autoStep.id, baseStep.id)
60
+ assert.equal(autoStep.method, baseStep.method)
61
+ assert.equal(autoStep.params.path, baseStep.params.path)
62
+ assert.equal(autoStep.params.input, baseStep.params.input)
63
+ assert.equal(autoStep.params.buffer, baseStep.params.buffer)
64
+ assert.equal(autoStep.params.shell, baseStep.params.shell)
65
+ assert.deepEqual(autoStep.params.conda, baseStep.params.conda)
66
+ assert.deepEqual(autoStep.params.message, {
67
+ _: [
68
+ "npx",
69
+ "-y",
70
+ "@xai-official/grok@latest",
71
+ "--always-approve",
72
+ "{{args.prompt || undefined}}"
73
+ ]
74
+ })
75
+ }
76
+
77
+ assert.equal(grok.run.every((step) => !step.params.message._.includes("--always-approve")), true)
78
+ })
@@ -18,6 +18,14 @@ test("resolveLauncherPluginSelection returns app-dev plugin query paths", () =>
18
18
  PluginSources.resolveLauncherPluginSelection("codex-auto"),
19
19
  "/plugin/codex-auto/pinokio.js"
20
20
  )
21
+ assert.strictEqual(
22
+ PluginSources.resolveLauncherPluginSelection("grok"),
23
+ "/pinokio/run/plugin/grok/pinokio.js"
24
+ )
25
+ assert.strictEqual(
26
+ PluginSources.resolveLauncherPluginSelection("grok-build"),
27
+ "/pinokio/run/plugin/grok/pinokio.js"
28
+ )
21
29
  assert.strictEqual(
22
30
  PluginSources.resolveLauncherPluginSelection("plugin/local-tool"),
23
31
  "/plugin/local-tool/pinokio.js"
@@ -208,10 +216,20 @@ module.exports = {
208
216
  const systemPlugins = menu.filter((item) => item.source === "system")
209
217
  const localPlugins = menu.filter((item) => item.source === "local")
210
218
 
211
- assert.strictEqual(systemPlugins.length, 12)
219
+ assert.strictEqual(systemPlugins.length, 14)
212
220
  assert.ok(systemPlugins.every((item) => item.system === true))
213
221
  assert.ok(systemPlugins.every((item) => item.href.startsWith("/pinokio/run/plugin/")))
214
222
  assert.ok(systemPlugins.every((item) => item.image.startsWith("/pinokio/asset/plugin/")))
223
+ assert.ok(systemPlugins.some((item) => (
224
+ item.title === "Grok Build" &&
225
+ item.href === "/pinokio/run/plugin/grok/pinokio.js" &&
226
+ item.image === "/pinokio/asset/plugin/grok/grok.png"
227
+ )))
228
+ assert.ok(systemPlugins.some((item) => (
229
+ item.title === "Grok Build Auto" &&
230
+ item.href === "/pinokio/run/plugin/grok-auto/pinokio.js" &&
231
+ item.image === "/pinokio/asset/plugin/grok-auto/grok.png"
232
+ )))
215
233
 
216
234
  assert.deepStrictEqual(localPlugins.map((item) => item.title), ["Local Tool"])
217
235
  assert.strictEqual(localPlugins[0].href, "/run/plugin/local-tool/pinokio.js")