Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a declarative
kadai:inputfrontmatter system that allows actions to declare their interactive inputs upfront. Declared inputs are collected as a form in the interactive menu, exposed as typed parameters in MCP tool calls, and automatically replayed by--rerun.The
.last-actionfile format is upgraded from a plain action ID string to a JSON record ({ actionId, inputs }) with backward-compatible parsing for old plain-text format. Sensitive inputs are filtered before saving so secrets are never persisted to disk.Changes
src/core/inputs.ts— new module withrunWithStdinRecording,buildInjection,buildStdinStream, andfilterSensitiveInputshelperssrc/core/last-action.ts— upgraded.last-actionformat to JSONLastActionRecord; backward compat for old plain-string formatsrc/core/commands.ts—handleRunsupports recording and replay modes;handleRerunpasses saved input values back throughsrc/core/mcp.ts— declared inputs become typed Zod-validated MCP tool parameterssrc/types.ts— addedActionInput,InputValues, andLastActionRecordtypessrc/cli.tsx— wires recording mode and sensitive input filtering into the interactive menu flowsrc/core/init-wizard.ts— documents input declaration syntax and injection behaviorREADME.md— full documentation forkadai:inputsyntax, injection mechanics, and--reruntest/commands.test.ts,test/last-action.test.ts— updated tests for new record format and input handlingtest/fixtures/*/. kadai/.last-action— fixture files updated to JSON format