@zetaloop/chappie 1.0.0 → 1.1.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.
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/dist/{chunk-DM523QRR.js → chunk-3MLW5U2C.js} +2 -2
- package/dist/{chunk-DN7OHZK6.js → chunk-DDBZIUBF.js} +1 -1
- package/dist/{chunk-5CKVVDZ2.js → chunk-G4LG7HH2.js} +3 -9
- package/dist/{chunk-K2VE2MDU.js → chunk-QNDFCQ66.js} +2 -2
- package/dist/{chunk-OWAAWZNT.js → chunk-QTALHBOI.js} +1 -1
- package/dist/{chunk-GX4JWLHH.js → chunk-RQKWETGT.js} +1 -1
- package/dist/cli.js +18 -11
- package/dist/{codex-RI2XL4HV.js → codex-XVRO56TR.js} +735 -135
- package/dist/{codex-plugin-NSKWB3WS.js → codex-plugin-BFH2DWSA.js} +40 -14
- package/dist/index.js +6 -18
- package/dist/omp.js +10 -22
- package/dist/opencode.js +7 -8
- package/dist/{stdio-KJVCYPXJ.js → stdio-OC7FLZCL.js} +9 -9
- package/docs/setup.md +23 -22
- package/docs/tools.md +24 -24
- package/package.json +1 -1
- package/dist/{chunk-GWYP7B66.js → chunk-ASDHNBR2.js} +1321 -1321
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
toolResult,
|
|
13
13
|
transferDescription,
|
|
14
14
|
transferInput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ASDHNBR2.js";
|
|
16
16
|
|
|
17
17
|
// src/local.ts
|
|
18
18
|
var definitions = [
|
|
@@ -87,7 +87,7 @@ var definitions = [
|
|
|
87
87
|
)
|
|
88
88
|
];
|
|
89
89
|
function localTools(session) {
|
|
90
|
-
return definitions.map((tool2) => ({
|
|
90
|
+
return definitions.filter((tool2) => session.localTools || tool2.name === "transfer").map((tool2) => ({
|
|
91
91
|
...tool2,
|
|
92
92
|
async execute(args, signal, update) {
|
|
93
93
|
const result = await tool2.execute(session, args, signal, update);
|
|
@@ -3,7 +3,7 @@ import { createRequire } from "node:module"; const require = createRequire(impor
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@zetaloop/chappie",
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.1.0",
|
|
7
7
|
description: "Connect ChatGPT and coding agents across devices",
|
|
8
8
|
devDependencies: {
|
|
9
9
|
"@ai-sdk/provider": "^3.0.8",
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resourceSessionId,
|
|
12
12
|
transferFiles,
|
|
13
13
|
transferResult
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ASDHNBR2.js";
|
|
15
15
|
import {
|
|
16
16
|
__callDispose,
|
|
17
17
|
__using
|
|
@@ -179,10 +179,7 @@ var Session = class {
|
|
|
179
179
|
this.#config = config;
|
|
180
180
|
}
|
|
181
181
|
get localTools() {
|
|
182
|
-
return Boolean(this.#config.localTools
|
|
183
|
-
}
|
|
184
|
-
get active() {
|
|
185
|
-
return this.#host.active();
|
|
182
|
+
return Boolean(this.#config.localTools);
|
|
186
183
|
}
|
|
187
184
|
deliveries() {
|
|
188
185
|
return this.#receivedDeliveries.splice(0);
|
|
@@ -481,13 +478,11 @@ var Session = class {
|
|
|
481
478
|
update() {
|
|
482
479
|
const active = this.#host.active();
|
|
483
480
|
const id = this.#host.describe().id;
|
|
484
|
-
|
|
485
|
-
if (changed) {
|
|
481
|
+
if (this.#sessionId !== id || this.#provider !== active) {
|
|
486
482
|
if (this.#connection) this.close();
|
|
487
483
|
else this.resetInputs();
|
|
488
484
|
}
|
|
489
485
|
this.#provider = active;
|
|
490
|
-
if (!active && !this.#config.localTools) return changed;
|
|
491
486
|
if (!this.#connection) {
|
|
492
487
|
this.#connection = new IpcClient(getDirectory(), this.#config.connect, {
|
|
493
488
|
onOpen: async () => {
|
|
@@ -516,7 +511,6 @@ var Session = class {
|
|
|
516
511
|
void this.#sync().catch(() => {
|
|
517
512
|
});
|
|
518
513
|
}
|
|
519
|
-
return changed;
|
|
520
514
|
}
|
|
521
515
|
#description(sessionId = this.#sessionId) {
|
|
522
516
|
if (sessionId !== this.#sessionId)
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ZodIssueCode,
|
|
4
4
|
coerce_exports,
|
|
5
5
|
iso_exports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RQKWETGT.js";
|
|
7
7
|
import {
|
|
8
8
|
NEVER,
|
|
9
9
|
_enum,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
union,
|
|
29
29
|
unknown,
|
|
30
30
|
url
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ASDHNBR2.js";
|
|
32
32
|
|
|
33
33
|
// node_modules/.pnpm/@modelcontextprotocol+server@2.0.0/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs
|
|
34
34
|
var __create = Object.create;
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
package_default
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DDBZIUBF.js";
|
|
6
6
|
import "./chunk-UOFCCHBS.js";
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
@@ -12,31 +12,38 @@ var { values, positionals } = parseArgs({
|
|
|
12
12
|
options: {
|
|
13
13
|
help: { type: "boolean", short: "h" },
|
|
14
14
|
version: { type: "boolean", short: "v" },
|
|
15
|
-
provider: { type: "boolean" }
|
|
16
|
-
chatgpt: { type: "boolean" }
|
|
15
|
+
provider: { type: "boolean" }
|
|
17
16
|
}
|
|
18
17
|
});
|
|
18
|
+
var usage = "Usage: chappie [codex [setup]]";
|
|
19
19
|
if (values.help) {
|
|
20
20
|
console.log(
|
|
21
|
-
|
|
21
|
+
`${usage}
|
|
22
|
+
|
|
23
|
+
Run the broker and ChatGPT MCP server.
|
|
24
|
+
The codex command runs the installed Codex plugin.
|
|
25
|
+
Use codex setup to write the model catalog to ~/.chappie/codex.json.`
|
|
22
26
|
);
|
|
23
27
|
} else if (values.version) {
|
|
24
28
|
console.log(package_default.version);
|
|
25
29
|
} else {
|
|
26
30
|
try {
|
|
27
|
-
if (positionals.length ===
|
|
31
|
+
if (positionals.length === 2 && positionals[0] === "codex" && positionals[1] === "setup" && !values.provider) {
|
|
32
|
+
const { setupCodex } = await import("./codex-plugin-BFH2DWSA.js");
|
|
33
|
+
console.log(await setupCodex());
|
|
34
|
+
} else if (positionals.length === 1 && positionals[0] === "codex") {
|
|
28
35
|
if (values.provider) {
|
|
29
|
-
const { serveCodex } = await import("./codex-
|
|
36
|
+
const { serveCodex } = await import("./codex-XVRO56TR.js");
|
|
30
37
|
await serveCodex();
|
|
31
38
|
} else {
|
|
32
|
-
const { serveCodexPlugin } = await import("./codex-plugin-
|
|
33
|
-
await serveCodexPlugin(
|
|
39
|
+
const { serveCodexPlugin } = await import("./codex-plugin-BFH2DWSA.js");
|
|
40
|
+
await serveCodexPlugin();
|
|
34
41
|
}
|
|
35
|
-
} else if (positionals.length === 0 && !values.provider
|
|
36
|
-
const { serve } = await import("./stdio-
|
|
42
|
+
} else if (positionals.length === 0 && !values.provider) {
|
|
43
|
+
const { serve } = await import("./stdio-OC7FLZCL.js");
|
|
37
44
|
await serve();
|
|
38
45
|
} else {
|
|
39
|
-
throw new Error(
|
|
46
|
+
throw new Error(usage);
|
|
40
47
|
}
|
|
41
48
|
} catch (error) {
|
|
42
49
|
const message = error instanceof Error ? error.message : String(error);
|