8000 refactor(harness): write mikan tools as pi-durable tool registrations by geminixiang · Pull Request #189 · geminixiang/mikan · GitHub
[go: up one dir, main page]

Skip to content

refactor(harness): write mikan tools as pi-durable tool registrations - #189

Merged
geminixiang merged 1 commit into
mainfrom
refactor/durable-tool-registrations
Oct 17, 2026
Merged

geminixiang merged 1 commit into
mainfrom
refactor/durable-tool-registrations

Conversation

@geminixiang
@geminixiang geminixiang commented Oct 17, 2026 •
Copy link
Copy Markdown
Owner

Builds on #188 (merged).

Pi 1.0 moved tools to pi-durable, but mikan still wrote ~20 tools (core tools, GitHub and Slack packs) as pi-agent-core AgentTools and adapted each with adaptAgentTool, tagged with a symbol marker so the session could tell the shapes apart. Every tool is now a ToolRegistration: progress through api.details, cancellation from context.abortSignal, control.terminate for handoffs. The adapter, the marker, and MikanHarnessTool/MikanToolInput are gone.

pi-agent-core was then imported only for types pi-ai already exports (AgentMessage = Message, ThinkingLevel = ModelThinkingLevel), so it is removed from dependencies. Readers checked: package.json, package-lock.json, ARCHITECTURE.md; no transitive dependent.

Compatibility: PlatformToolPack.tools is now ToolRegistration[]. It is not in the package's public declarations (snapshot unchanged).

Tests: tool unit tests call tools through the existing callableTool test helper. Two tests that covered only the removed adapter were deleted: the harness-tool marker after redaction, and the adapter dropping progress content, which no longer exists.

Acceptance

Case main branch
Full suite 2153 pass 2151 pass (2 adapter-only tests removed)
Public API snapshot pass pass (unchanged)
tool-label-contract pass pass

Verification

  • Full gate (lint, fmt, knip, build, typecheck, test) passes on the branch.
  • Real-platform check and Slack E2E (slack-e2e.yml) not yet run: this changes the run loop and its tools, so it is on the Slack message path; they wait for approval.

Research: docs/research/pi-1.3-retirement-2026-10.md (added in #186).

@cloudflare-workers-and-pages
cloudflare-workers-and-pages Bot commented Oct 17, 2026 •
Copy link
Copy Markdown

Deploying mikan with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0a15647
Status: ✅  Deploy successful!
Preview URL: https://fee8f04c.mikan-1wv.pages.dev
Branch Preview URL: https://refactor-durable-tool-regist.mikan-1wv.pages.dev

View logs

Base automatically changed from refactor/pi-tool-result to main October 17, 2026 15:04
Pi 1.0 moved tools to pi-durable, but mikan kept writing them as pi-agent-core AgentTools and adapted each one with adaptAgentTool, tagged with a marker so the session could tell the two shapes apart. Every tool, including platform tool packs, is now a ToolRegistration that reports progress with api.details and reads cancellation from its context, so the adapter and the marker are gone.

pi-agent-core was then imported only for types that pi-ai already exports (Message, ModelThinkingLevel), so it is removed from the dependencies. Its only other reader was ARCHITECTURE.md.
@geminixiang
geminixiang force-pushed the refactor/durable-tool-registrations branch from bf07ae2 to 0a15647 Compare October 17, 2026 15:06
@geminixiang
geminixiang merged commit 0c78d9f into main Oct 17, 2026
6 checks passed
@geminixiang
geminixiang deleted the refactor/durable-tool-registrations branch October 17, 2026 15:20
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

0