Skip to content

Release 0.2.0: turn-policy, prompt bridge, foreground-default rescue contract - #1

Merged
oppnc merged 3 commits into
mainfrom
release/0.2.0
Jul 30, 2026
Merged

oppnc merged 3 commits into
mainfrom
release/0.2.0

Conversation

@oppnc

@oppnc oppnc commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

0.2.0 release. Bridge core alignment with kimi-plugin-codex 0.2.0, plus a rescue contract fix based on the openai/codex-plugin-cc precedent (PR #214 + #325).

Changes

Bridge core (shared with kimi-plugin-codex)

  • lib/turn-policy.mjs (new): Mode A empty retry + Mode B incomplete continue
  • lib/prompt.mjs (new): optional KIMI_BRIDGE_HANDOFF bridge notes (default off)
  • lib/acceptance.mjs (new): outcome classification helpers
  • lib/render.mjs: phase/progress/resume-hint + empty+continue notes
  • lib/acp-client.mjs: Mode A 2× fresh retry + 1× same-session recovery; Mode B continue
  • lib/workspace.mjs: export HOST_CWD_ENV (fixes workspace test env-key drift)
  • kimi-companion.mjs: PHASE/progress/bridge flags; setupNextSteps host-specific

Rescue contract (foreground-default)

Aligns with openai/codex-plugin-cc PR #214: inner task call must always run in foreground.

  • Foreground is the default for all UI work (open-ended + bounded)
  • --background demoted to explicit-user-detach only; parent owns polling
  • Host-timeout contract: ~14s kill / Exit 124 / empty stdout ≠ Mode A
  • Re-dispatch: timeout_ms: 86400000 tool field, never --background as workaround

Entry parity

  • plan / goal / task / sessions commands (explicit-only where applicable)

Tests

  • New: turn-policy, prompt, host-free-attack
  • Fixed: workspace (env-key drift via shared HOST_CWD_ENV)
  • 62/62 pass

Test plan

  • node --test tests/*.test.mjs → 62/62
  • node scripts/validate-plugin.mjs → claude --strict + grok validate OK
  • Live ACP smoke (setup/yolo/plan/tools/media/sessions/resume) passed on prior run

🤖 Generated with ZCode

oppnc added 2 commits July 30, 2026 19:07
- Setup reports workspace, Node, soft Kimi compat, and nextSteps for frontend handoff
- Standardized [kimi-plugin] errors with Fix lists; media paths resolve against workspace
- Happy-path docs and stronger frontend/video triggers for /kimi:rescue
- Bump to 0.1.2; add errors/workspace unit tests
…ct, foreground-default rescue

Bridge core alignment with kimi-plugin-codex 0.2.0:

- lib/turn-policy.mjs: Mode A empty retry + Mode B incomplete continue (shared)
- lib/prompt.mjs + KIMI_BRIDGE_HANDOFF: optional bridge notes (default off)
- lib/acceptance.mjs: outcome classification helpers
- lib/render.mjs: phase/progress/resume-hint + empty+continue notes
- lib/acp-client.mjs: Mode A 2x fresh retry + 1x same-session recovery; Mode B continue
- lib/workspace.mjs: export HOST_CWD_ENV (fixes workspace test env drift)
- kimi-companion.mjs: PHASE/progress/bridge flags; setupNextSteps host-specific

Rescue contract (aligns with openai/codex-plugin-cc PR #214):
- Foreground is the default for ALL UI (inner task call must always run foreground)
- --background demoted to explicit-user-detach only; parent owns polling
- Host-timeout contract: ~14s kill / Exit 124 / empty stdout != Mode A
- Re-dispatch: timeout_ms:86400000 tool field, never --background as workaround

Entry parity: plan/goal/task/sessions commands (explicit-only where applicable)
Tests: turn-policy, prompt, host-free-attack, workspace (62/62 pass)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e60c15a735

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const local = path.join(LIB, "turn-policy.mjs");
const sibling = path.join(SIBLING_LIB, "turn-policy.mjs");
assert.ok(fs.existsSync(local), "local turn-policy");
assert.ok(fs.existsSync(sibling), "sibling turn-policy (monorepo layout)");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid requiring a sibling repo in npm test

In a standalone checkout of this repo, these new attack tests make the committed npm test fail because /workspace/kimi-plugin-codex is not present; I ran npm test and the three “attack (b)” cases fail on the sibling existence/read assertions. Since this package is a public standalone repo and the release instructions require npm test after a bump, the test suite should either skip/soft-gate the isomorphism check when the sibling repo is absent or move it out of the default test script.

AGENTS.md reference: AGENTS.md:L32-L32

Useful? React with 👍 / 👎.

…ecked out

The (b) attack tests sha256-compare lib files against the sibling
kimi-plugin-codex checkout (monorepo layout). In CI's single-repo
checkout the sibling is absent, causing 3 failures. Guard with
HAS_SIBLING -> test skip with reason instead of hard fail.
@oppnc
oppnc merged commit c0db1e4 into main Jul 30, 2026
1 check passed
@oppnc
oppnc deleted the release/0.2.0 branch July 30, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant