pullfrog 0.1.14 → 0.1.16

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.
@@ -0,0 +1,49 @@
1
+ export type SupportedPackageManager = "npm" | "pnpm" | "yarn" | "bun";
2
+ export interface PackageManagerSpec {
3
+ name: SupportedPackageManager;
4
+ /**
5
+ * either a concrete semver (e.g. "11.1.1") or a range (e.g. "^11.0.0").
6
+ * `concrete` distinguishes — corepack only accepts concrete versions.
7
+ */
8
+ version: string;
9
+ concrete: boolean;
10
+ /** which package.json field this came from */
11
+ source: "devEngines" | "packageManager";
12
+ }
13
+ /**
14
+ * resolve the project's intended package manager from package.json. precedence
15
+ * matches pnpm 11+: `devEngines.packageManager` wins over `packageManager`.
16
+ * when both are present, a concrete `packageManager` that satisfies a
17
+ * `devEngines` range is preferred (we can pin it via corepack); otherwise
18
+ * we warn on disagreement and stick with `devEngines`.
19
+ */
20
+ export declare function resolvePackageManagerSpec(cwd: string): Promise<PackageManagerSpec | null>;
21
+ /** the per-run directory the corepack shim is installed into. deliberately
22
+ * NOT the node bin dir: that's npm's `-g` target, and a corepack shim sitting
23
+ * there makes a customer setup script's `npm i -g pnpm` abort with EEXIST
24
+ * (npm refuses to clobber a binary it doesn't own). lives under the run
25
+ * tmpdir so it's cleaned up with everything else. */
26
+ export declare function packageManagerBinDir(tmpdir: string): string;
27
+ export interface EnsurePackageManagerParams {
28
+ spec: PackageManagerSpec;
29
+ /** directory to install the corepack shim into (see `packageManagerBinDir`).
30
+ * prepended to PATH so the pinned binary resolves by name. */
31
+ binDir: string;
32
+ }
33
+ /**
34
+ * ensure the requested package manager is on PATH at the declared version,
35
+ * provisioning via corepack when applicable. returns true if PATH now
36
+ * resolves to that version, false if we couldn't pin it (in which case
37
+ * the caller should treat PATH as untrusted and may fall back to its
38
+ * legacy install path).
39
+ *
40
+ * the corepack shim is installed into `params.binDir` (prepended to PATH),
41
+ * not the node bin dir, so a later `npm i -g pnpm` in a setup hook can't
42
+ * collide with it. our dir wins the PATH lookup, so the pinned version is
43
+ * also what resolves even if that `npm i -g` succeeds into the node bin dir.
44
+ *
45
+ * never throws: network failure, missing corepack, range-only versions —
46
+ * all degrade to "log warning, return false". the existing PATH binary
47
+ * still works; we just don't get our version guarantee.
48
+ */
49
+ export declare function ensurePackageManager(params: EnsurePackageManagerParams): Promise<boolean>;
@@ -1,9 +1,9 @@
1
1
  import type { AgentResult } from "../agents/shared.ts";
2
2
  import type { MainResult } from "../main.ts";
3
- import type { ToolState } from "../toolState.ts";
3
+ import type { ToolContext } from "../mcp/server.ts";
4
4
  export interface HandleAgentResultParams {
5
5
  result: AgentResult;
6
- toolState: ToolState;
6
+ toolContext: ToolContext;
7
7
  silent: boolean | undefined;
8
8
  }
9
9
  export declare function handleAgentResult(ctx: HandleAgentResultParams): Promise<MainResult>;
@@ -33,8 +33,10 @@
33
33
  * `toolState.agentDiagnostic`; `formatAgentHangBody` renders that as
34
34
  * a markdown block.
35
35
  *
36
- * 6. Default — a generic `❌ Pullfrog failed` block with the raw error
37
- * message in a fenced code block. Same body for both surfaces.
36
+ * 6. Default — a plain-English lead sentence explaining the run failed,
37
+ * followed by the raw error message in a fenced code block (so the user
38
+ * never sees a bare internal string). The job summary adds the
39
+ * `### ❌ Pullfrog failed` banner on top of the same body.
38
40
  *
39
41
  * The hang body and the API-key body diverge between the two surfaces only
40
42
  * in that the job summary wraps them in the `### ❌ Pullfrog failed` H3
@@ -46,11 +46,12 @@ export declare function persistRunArtifacts(toolContext: ToolContext): Promise<v
46
46
  * prepended below in step 4) — same classifier as the catch path so
47
47
  * the user sees it instead of a deleted-comment void / empty summary
48
48
  * tab
49
- * 3. when the run succeeded and the progress comment was never finalized
50
- * via `report_progress`, delete it (three sub-cases — orphan
51
- * "Leaping into action" comment, abandoned checklist, agent wrote
52
- * a substantive artifact via another MCP write tool but skipped
53
- * report_progress)
49
+ * 3. when the run succeeded, some write landed (`wasUpdated`), but the
50
+ * progress comment was never finalized via `report_progress`, delete
51
+ * the stranded comment (abandoned checklist, or a substantive artifact
52
+ * written via another MCP write tool that skipped report_progress). a
53
+ * run where NO write landed keeps its comment for handleAgentResult to
54
+ * salvage into — see the `wasUpdated` guard below and #868
54
55
  * 4. write the GitHub Actions step summary (best-effort — a write
55
56
  * failure must not throw past this point because we'd hit the outer
56
57
  * catch and clobber any progress comment we just wrote)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",
@@ -26,11 +26,12 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@actions/core": "^1.11.1",
29
- "@anthropic-ai/claude-code": "2.1.112",
29
+ "@anthropic-ai/claude-code": "2.1.150",
30
30
  "@ark/fs": "0.56.0",
31
31
  "@ark/util": "0.56.0",
32
32
  "@clack/prompts": "^1.2.0",
33
33
  "@modelcontextprotocol/sdk": "^1.26.0",
34
+ "@opencode-ai/sdk": "1.2.27",
34
35
  "@octokit/plugin-throttling": "^11.0.3",
35
36
  "@octokit/rest": "^22.0.0",
36
37
  "@octokit/webhooks-types": "^7.6.1",
@@ -50,7 +51,7 @@
50
51
  "fastmcp": "^3.34.0",
51
52
  "file-type": "^21.3.0",
52
53
  "husky": "^9.0.0",
53
- "opencode-ai": "1.15.1",
54
+ "opencode-ai": "1.15.13",
54
55
  "package-manager-detector": "^1.6.0",
55
56
  "picocolors": "^1.1.1",
56
57
  "semver": "^7.7.3",
@@ -58,6 +59,7 @@
58
59
  "table": "^6.9.0",
59
60
  "turndown": "^7.2.0",
60
61
  "typescript": "^5.9.3",
62
+ "undici": "^7.22.0",
61
63
  "vitest": "^4.0.17",
62
64
  "yaml": "^2.8.2"
63
65
  },