pullfrog 0.1.13 → 0.1.15
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 +1 -1
- package/dist/agents/gateServer.d.ts +6 -0
- package/dist/agents/opencodeShared.d.ts +1 -1
- package/dist/agents/postRun.d.ts +13 -0
- package/dist/cli.mjs +63846 -59777
- package/dist/index.js +63733 -59682
- package/dist/internal/index.d.ts +2 -0
- package/dist/internal.js +105 -10
- package/dist/toolState.d.ts +1 -1
- package/dist/utils/apiKeys.d.ts +11 -2
- package/dist/utils/byokFallback.d.ts +14 -25
- package/dist/utils/codexHome.d.ts +17 -4
- package/dist/utils/codexOAuth.d.ts +60 -0
- package/dist/utils/gitAuth.d.ts +15 -6
- package/dist/utils/gitAuthServer.d.ts +9 -3
- package/dist/utils/lifecycle.d.ts +12 -0
- package/dist/utils/openCodeModels.d.ts +11 -0
- package/dist/utils/packageManager.d.ts +32 -0
- package/dist/utils/providerErrors.d.ts +18 -0
- package/dist/utils/runErrorRenderer.d.ts +23 -8
- package/dist/utils/runLifecycle.d.ts +7 -0
- package/package.json +2 -1
- package/dist/agents/opencodePlugin.d.ts +0 -60
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Source for the opencode plugin we drop into the per-run tmpdir at
|
|
3
|
-
* `<XDG_CONFIG_HOME>/opencode/plugin/pullfrog-events.ts`. The harness already
|
|
4
|
-
* redirects `XDG_CONFIG_HOME` to `ctx.tmpdir/.config` (see `opencode.ts`
|
|
5
|
-
* `homeEnv`), so opencode's auto-discovery scans the tmpdir, never the user's
|
|
6
|
-
* working tree. opencode's `Global.Path.config` resolves to
|
|
7
|
-
* `path.join(xdgConfig, "opencode")` and the config layer auto-discovers
|
|
8
|
-
* plugins from every directory in its scan list — including
|
|
9
|
-
* `Global.Path.config` — by globbing `{plugin,plugins}/*.{ts,js}` via
|
|
10
|
-
* `ConfigPlugin.load(dir)`.
|
|
11
|
-
*
|
|
12
|
-
* We MUST NOT write into the user's repo working tree. The repo is a checkout
|
|
13
|
-
* the agent operates on; only the agent's own tools (gated by
|
|
14
|
-
* `OPENCODE_PERMISSION`) may modify it. The whole reason we redirect HOME and
|
|
15
|
-
* XDG_CONFIG_HOME is so harness-side files (config, plugins, scratch state)
|
|
16
|
-
* land in the tmpdir.
|
|
17
|
-
*
|
|
18
|
-
* Why this plugin exists: opencode's `task` tool runs subagents in-process and
|
|
19
|
-
* the CLI's `cli/cmd/run.ts` event loop filters `part.sessionID !== sessionID`,
|
|
20
|
-
* so subagent-internal `message.part.updated` events are silently discarded
|
|
21
|
-
* before reaching our parent NDJSON stream. plugins, by contrast, receive
|
|
22
|
-
* EVERY bus event via `bus.subscribeAll()` regardless of session.
|
|
23
|
-
*
|
|
24
|
-
* The plugin re-emits every relevant bus event onto opencode's stdout as a
|
|
25
|
-
* single JSON line wrapped in a sentinel envelope. our `runOpenCode` parser
|
|
26
|
-
* recognises the envelope, unpacks it, and routes the inner part through the
|
|
27
|
-
* existing handlers with a per-session label from `SessionLabeler` so each
|
|
28
|
-
* subagent's tool calls / text appear inline alongside the orchestrator's.
|
|
29
|
-
*
|
|
30
|
-
* Dumb plugin / smart parent split: the plugin emits every part for every
|
|
31
|
-
* session. the parent dedupes against the orchestrator's own session id (which
|
|
32
|
-
* it already knows from the `init` event). this keeps the plugin trivial and
|
|
33
|
-
* keeps the per-session attribution logic on the parent side where the
|
|
34
|
-
* SessionLabeler already lives.
|
|
35
|
-
*
|
|
36
|
-
* Event-name prefixing: the wrapped event-type sentinel is
|
|
37
|
-
* `pullfrog_bus_event` — picked to be unmistakably ours so a future opencode
|
|
38
|
-
* release that introduces a coincidentally-named event type won't collide.
|
|
39
|
-
*/
|
|
40
|
-
export declare const PULLFROG_BUS_EVENT_TYPE: "pullfrog_bus_event";
|
|
41
|
-
export declare const PULLFROG_OPENCODE_PLUGIN_FILENAME: "pullfrog-events.ts";
|
|
42
|
-
/**
|
|
43
|
-
* Source written verbatim to `<XDG_CONFIG_HOME>/opencode/plugin/pullfrog-events.ts`.
|
|
44
|
-
*
|
|
45
|
-
* - Structural typing only (no runtime import of `@opencode-ai/plugin`):
|
|
46
|
-
* opencode installs that dep into the directory containing the plugin
|
|
47
|
-
* alongside discovery, but a) the dep isn't required for the structural
|
|
48
|
-
* shape we use, and b) keeping zero imports avoids any module-resolution
|
|
49
|
-
* coupling to opencode's plugin-loader internals across versions.
|
|
50
|
-
* - default export is the plugin factory (opencode's plugin loader accepts
|
|
51
|
-
* default exports as the server entrypoint).
|
|
52
|
-
* - we only forward `message.part.updated`. that's where the user-visible
|
|
53
|
-
* subagent activity (tool calls, text, step transitions) lives. add more
|
|
54
|
-
* event types here if the parent needs them.
|
|
55
|
-
* - JSON.stringify+single write keeps the line atomic up to PIPE_BUF (4KB on
|
|
56
|
-
* Linux). longer parts may interleave with concurrent stdout writers; the
|
|
57
|
-
* parser tolerates non-JSON lines (logs them at debug) so a torn line is a
|
|
58
|
-
* missed event, not a crash.
|
|
59
|
-
*/
|
|
60
|
-
export declare const PULLFROG_OPENCODE_PLUGIN_SOURCE: string;
|