@schuttdev/gigai 0.3.1 → 0.3.3
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.
- package/README.md +41 -0
- package/dist/{chunk-FW3JH5IG.js → chunk-75GPR4GR.js} +3 -3
- package/dist/{chunk-O45SW2HC.js → chunk-GIUPSQGA.js} +2 -2
- package/dist/{dist-DTBR4X7U.js → dist-2BIIMXAI.js} +5 -5
- package/dist/{filesystem-JSSD3C2D-FJH6SPOF.js → filesystem-FWNLRLL6-LQG7PWAF.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{shell-B35UFUCJ-LJUZUNM6.js → shell-Z3WUF2GW-TVEYB5OM.js} +1 -1
- package/package.json +9 -7
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @schuttdev/gigai
|
|
2
|
+
|
|
3
|
+
Server CLI for [Kon](https://github.com/Kaden-Schutt/kon) — runs on your machine and exposes tools to Claude over HTTPS.
|
|
4
|
+
|
|
5
|
+
Manages tool registration, MCP server wrapping, authentication, cron scheduling, and HTTPS setup via Tailscale Funnel or Cloudflare Tunnel.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @schuttdev/gigai
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quickstart
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
gigai init # interactive setup wizard
|
|
17
|
+
gigai pair # generate a pairing code for Claude
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
gigai start # start the server
|
|
24
|
+
gigai stop # stop the server
|
|
25
|
+
gigai status # check if running
|
|
26
|
+
gigai pair # generate a new pairing code
|
|
27
|
+
gigai install # install as background service (launchd / systemd)
|
|
28
|
+
gigai uninstall # remove background service
|
|
29
|
+
gigai mcp add <n> -- <cmd> # add an MCP server
|
|
30
|
+
gigai wrap cli|mcp|script # add a tool interactively
|
|
31
|
+
gigai unwrap <name> # remove a tool
|
|
32
|
+
gigai cron add ... # schedule a task
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Documentation
|
|
36
|
+
|
|
37
|
+
See the [full documentation](https://github.com/Kaden-Schutt/kon) for setup guides, tool configuration, and architecture details.
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
MIT
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
GigaiError
|
|
5
5
|
} from "./chunk-P53UVHTF.js";
|
|
6
6
|
|
|
7
|
-
// ../server/dist/chunk-
|
|
7
|
+
// ../server/dist/chunk-OZTLH66B.mjs
|
|
8
8
|
import {
|
|
9
9
|
readFile as fsReadFile,
|
|
10
10
|
writeFile as fsWriteFile,
|
|
@@ -26,7 +26,7 @@ async function validatePath(targetPath, allowedPaths) {
|
|
|
26
26
|
const isAllowed = allowedPaths.some((allowed) => {
|
|
27
27
|
const resolvedAllowed = resolve(allowed);
|
|
28
28
|
const allowedPrefix = resolvedAllowed.endsWith("/") ? resolvedAllowed : resolvedAllowed + "/";
|
|
29
|
-
return real === resolvedAllowed || real.startsWith(allowedPrefix)
|
|
29
|
+
return real === resolvedAllowed || real.startsWith(allowedPrefix);
|
|
30
30
|
});
|
|
31
31
|
if (!isAllowed) {
|
|
32
32
|
throw new GigaiError(
|
|
@@ -34,7 +34,7 @@ async function validatePath(targetPath, allowedPaths) {
|
|
|
34
34
|
`Path not within allowed directories: ${targetPath}`
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return real;
|
|
38
38
|
}
|
|
39
39
|
async function readFileSafe(path, allowedPaths) {
|
|
40
40
|
const safePath = await validatePath(path, allowedPaths);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
GigaiError
|
|
5
5
|
} from "./chunk-P53UVHTF.js";
|
|
6
6
|
|
|
7
|
-
// ../server/dist/chunk-
|
|
7
|
+
// ../server/dist/chunk-APX4HM32.mjs
|
|
8
8
|
import { spawn } from "child_process";
|
|
9
9
|
var SHELL_INTERPRETERS = /* @__PURE__ */ new Set([
|
|
10
10
|
"sh",
|
|
@@ -44,7 +44,7 @@ async function execCommandSafe(command, args, config) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
return new Promise((resolve, reject) => {
|
|
47
|
-
const child = spawn(command, args, {
|
|
47
|
+
const child = spawn(command, ["--", ...args], {
|
|
48
48
|
shell: false,
|
|
49
49
|
stdio: ["ignore", "pipe", "pipe"]
|
|
50
50
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
execCommandSafe
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GIUPSQGA.js";
|
|
5
5
|
import {
|
|
6
6
|
editBuiltin,
|
|
7
7
|
globBuiltin,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
readFileSafe,
|
|
12
12
|
searchFilesSafe,
|
|
13
13
|
writeBuiltin
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-75GPR4GR.js";
|
|
15
15
|
import {
|
|
16
16
|
ErrorCode,
|
|
17
17
|
GigaiConfigSchema,
|
|
@@ -367,7 +367,7 @@ function executeTool(entry, args, timeout) {
|
|
|
367
367
|
switch (entry.type) {
|
|
368
368
|
case "cli":
|
|
369
369
|
command = entry.config.command;
|
|
370
|
-
spawnArgs = [...entry.config.args ?? [], ...sanitized];
|
|
370
|
+
spawnArgs = [...entry.config.args ?? [], "--", ...sanitized];
|
|
371
371
|
cwd = entry.config.cwd;
|
|
372
372
|
env = entry.config.env;
|
|
373
373
|
break;
|
|
@@ -794,7 +794,7 @@ var cronPlugin = fp5(async (server, opts) => {
|
|
|
794
794
|
const executor = async (tool, args) => {
|
|
795
795
|
const entry = server.registry.get(tool);
|
|
796
796
|
if (entry.type === "builtin") {
|
|
797
|
-
const { execCommandSafe: execCommandSafe2 } = await import("./shell-
|
|
797
|
+
const { execCommandSafe: execCommandSafe2 } = await import("./shell-Z3WUF2GW-TVEYB5OM.js");
|
|
798
798
|
const {
|
|
799
799
|
readFileSafe: readFileSafe2,
|
|
800
800
|
listDirSafe: listDirSafe2,
|
|
@@ -804,7 +804,7 @@ var cronPlugin = fp5(async (server, opts) => {
|
|
|
804
804
|
editBuiltin: editBuiltin2,
|
|
805
805
|
globBuiltin: globBuiltin2,
|
|
806
806
|
grepBuiltin: grepBuiltin2
|
|
807
|
-
} = await import("./filesystem-
|
|
807
|
+
} = await import("./filesystem-FWNLRLL6-LQG7PWAF.js");
|
|
808
808
|
const builtinConfig = entry.config.config ?? {};
|
|
809
809
|
switch (entry.config.builtin) {
|
|
810
810
|
case "filesystem": {
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
import { defineCommand, runMain } from "citty";
|
|
5
5
|
|
|
6
6
|
// src/version.ts
|
|
7
|
-
var VERSION = "0.3.
|
|
7
|
+
var VERSION = "0.3.3";
|
|
8
8
|
|
|
9
9
|
// src/index.ts
|
|
10
10
|
async function requireServer() {
|
|
11
11
|
try {
|
|
12
|
-
return await import("./dist-
|
|
12
|
+
return await import("./dist-2BIIMXAI.js");
|
|
13
13
|
} catch {
|
|
14
14
|
console.error("Server dependencies not installed.");
|
|
15
15
|
console.error("Run: npm install -g @schuttdev/gigai");
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schuttdev/gigai",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"bin": {
|
|
6
7
|
"gigai": "dist/index.js"
|
|
7
8
|
},
|
|
@@ -12,7 +13,8 @@
|
|
|
12
13
|
}
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
16
18
|
],
|
|
17
19
|
"scripts": {
|
|
18
20
|
"build": "tsup",
|
|
@@ -23,11 +25,11 @@
|
|
|
23
25
|
"dependencies": {
|
|
24
26
|
"citty": "^0.1.6",
|
|
25
27
|
"zod": "^3.22.0",
|
|
26
|
-
"fastify": "^
|
|
27
|
-
"@fastify/cors": "^
|
|
28
|
-
"@fastify/rate-limit": "^
|
|
29
|
-
"@fastify/multipart": "^
|
|
30
|
-
"fastify-plugin": "^
|
|
28
|
+
"fastify": "^5.8.2",
|
|
29
|
+
"@fastify/cors": "^10.0.0",
|
|
30
|
+
"@fastify/rate-limit": "^10.0.0",
|
|
31
|
+
"@fastify/multipart": "^9.0.0",
|
|
32
|
+
"fastify-plugin": "^5.0.0",
|
|
31
33
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
32
34
|
"@inquirer/prompts": "^7.0.0",
|
|
33
35
|
"nanoid": "^5.0.0"
|