Repository navigation
feat(workflows): Kiro Workflows frontend data layer - #25466
kyleseaman wants to merge 2 commits into
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. This PR adds the API client, the run model, hooks and catalog strings, and no Notes
[UX-REVIEWED] 4d6b99b Description read[DESCRIPTION-READ] 474eb086d648e8c92f14754d9ca79b8ad082f1354c6a6de12e22b9d230da443c That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change adds only client-side data-layer code behind Notes
[DESIGN-REVIEWED] 4d6b99b Description read[DESCRIPTION-READ] a8d4b2ce7824effdb33a3b3eebc992651b57c3e85ab86f142c6af8dd1c49db52 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: the feature is off by default behind Notes
What this change shipsInventory (9 items) — 7 justifiedIntent: let a developer who has opted in launch, watch, answer and control Kiro Agent workflow runs from the dashboard. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 4d6b99b Description read[DESCRIPTION-READ] 19e8f184f061e24c560cee2a44f82835293a63a92e43b69daffa1e1135e26b2b That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed at 74cce3b.
This reads well as a data layer. I checked every client method against the routes registered on the base branch, and the request field names against their handlers: they match. Every hook stays inert unless the engine probe answers kas, and the run model maps server-decided controls and actions instead of deciding them itself, which keeps the UI from offering an action the engine would refuse. The launch helper's rollback on a refused launch is tested.
One non-blocking finding inline: the transcript fold treats any tool whose name ends in send_message after a separator as Kiro Agent's step note, which also matches Crew's own namespaced send_message tool.
Not merge-ready yet for process reasons only: the base is a stacked branch, not main, and PR Readiness is still pending at this head. I will look again once it is rebased onto main.
|
|
||
| /** A step turn's `send_message` is Kiro Agent's step-completion signal AND the | ||
| * step's note to the run's parent chat; the step pane draws it as its own card. */ | ||
| const PARENT_MESSAGE_RE = /(^|[._/@])send_message$/i |
There was a problem hiding this comment.
A step calling Crew's own send_message tool is drawn as the step's note to its parent
PARENT_MESSAGE_RE accepts any separator before send_message, so a step tool named @kirocrew-core/send_message (or any other namespaced send_message) matches. foldReplies then renders it as a parent card, and lastStepNote can pick its text as the question a parked step asked. The backend already avoids this collision on purpose (kas_workflows/chat.py leaves send_message out of the chat tools because Crew's tool of that name means a dashboard notification), and servedByMcp in this same file exists for the same reason, but this regex does not use either guard.
const PARENT_MESSAGE_RE = /(^|[._/@])send_message$/iSuggestion: match only the name Kiro Agent itself reports for its native tool (anchor on the exact name, or exclude names carrying an MCP server prefix), and add a case to kasModel.test.ts for isParentMessageTool / parseParentMessage with both a native and a namespaced name. Neither function has a test in this PR.
Rule: a display decision keyed on a tool name must not match a different tool that shares the suffix.
There was a problem hiding this comment.
Fixed in d9bfbb0. PARENT_MESSAGE_RE is now /^send_message$/: only the bare name Kiro Agent records for its own tool counts, so @kirocrew-core/send_message, mcp_kirocrew_core_send_message and any other prefixed send_message stay ordinary tool rows. kasModel.test.ts adds cases for isParentMessageTool, lastStepNote and foldReplies with the native name and four namespaced ones, plus a parked step whose question must not be replaced by a later Crew notification; the namespaced cases fail on the old regex.
|
Hold: this PR is based on the stacked branch What would clear it:
The rest reads well so far: the launch helper rolls back the chat on a refused launch, the rewind guard treats unknown timestamps as blocking, and the — crew-pr-reviewer (r134) |
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
Requesting changes at 74cce3b3e6.
- The
send_messagematch also catches Kiro Crew's own notification tool.kasModel.ts:929(PARENT_MESSAGE_RE = /(^|[._/@])send_message$/i), which matches@kirocrew-core/send_messageandmcp_kirocrew_core_send_message. A Crew notification call would then be drawn as the step's note to its parent, or as a parked step's question. bolichen97's inline comment on this is unanswered. Narrowing the pattern to the bare KAS tool name breaks no test, so please also add a test that a Crewsend_messagecall is not taken as a step note. - The base is
feat/kas-wf-3-person-holds, notmain. Only 23 checks ran and the main CI never ran on this code; it needs a run against main before merge. The stack also fails the line cap onkas_workflows/router.py(2,829 lines), which comes from #25449 and will block every PR in it.
Notes: opt-in and off by default, so default users see no change. Nothing in this PR uses the new modules yet; they are imported by #25471, so this should not merge without it. kasRewindGuard.ts is untested (letting unknown timestamps through breaks nothing). 241 vitest pass; i18n-check passes for all 13 locales.
af54535 to
9cb242b
Compare
74cce3b to
d9bfbb0
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Comment only. This PR is stacked on feat/kas-wf-3-person-holds, not main, and @buluoray's change request is still open, so I am not approving.
Checked at d9bfbb0:
- RC point 1 (
send_messagematch): addressed.kasModel.ts:932is nowPARENT_MESSAGE_RE = /^send_message$/, so only Kiro Agent's bare tool name counts as a step note.kasModel.test.ts:338checks that@kirocrew-core/send_message,mcp_kirocrew_core_send_message,kirocrew-core.send_messageandother_send_messagestay ordinary tool rows. Line 348 covers a mixed list. - RC point 2 (non-main base): still open. The base is
feat/kas-wf-3-person-holds, so this head has nomainCI run. The gate shows 9 cancelled lanes (Automated Rule Check, GPT 6.1 Review, Issue Gate, Screenshot Evidence, Sensitive Change Review ×2, Inclusive Language, SAST, PR Hygiene) plus one AWS CodeBuild failure. None of them gives a code finding. They need a clean run once the stack lands onmainor this PR is retargeted.
Once the base is main and CI is green, @buluoray can re-check point 1 and clear the request.
|
@iamwhatever @buluoray restacked onto #25449's new head; the launch fix and the send_message fix are now in commit 910d46a (unchanged). The data-layer commit also drops the approveChatSlot type widening: the chat's own question card it served is gone, since those questions now use main's elicitation card. |
45f6b67 to
a9dd6c0
Compare
910d46a to
af6a434
Compare
a9dd6c0 to
0ef14fe
Compare
af6a434 to
0607a89
Compare
|
HOLD at 0607a89. What blocks:
My r141 defect is fixed: The AI lanes' notes do not block a data-layer PR behind an opt-in: the stray — crew-pr-reviewer (r149) |
0ef14fe to
9b882db
Compare
0607a89 to
57c934b
Compare
9b882db to
a94e626
Compare
57c934b to
4d6b99b
Compare
The dashboard's client side of the Kiro Workflows routes, with no UI yet: the API client methods for /api/workflows/kas/* (api/client/workflows.ts), the run model that turns run rows into what each surface draws (step tally, controls, waits, loop iterations, needs-you), the query hooks and recipe hooks, the launch helper that opens a chat and starts a run in it, the rewind guard, and the shared test fixtures. Ships the catalog strings the model itself formats, in every locale.
…s own send_message as a step note - launchKasWorkflow no longer discards the chat when the launch answers 2xx but its body cannot be read (AcceptedBodyUnreadable from jAccepted): the server accepted the run, and deleting the chat would cancel it. The error is passed on, as appSendWire.ts does. A refused launch still removes the empty chat. Covers the launch form, the /workflow-run command and every other caller, which all go through launchKasWorkflow. - PARENT_MESSAGE_RE matches only the bare send_message name, so Crew's own namespaced send_message tool stays an ordinary tool row. - Test the rewind guard.
a94e626 to
3abb813
Compare
4d6b99b to
a3df4ae
Compare
Off by default behind
agent.kas_workflows(Developer › Feature Previews); with it off, behaviour is main's.Problem / Motivation
Goal: When Crew's agent backend is Kiro Agent (KAS), a developer can turn on Kiro Workflows and launch, watch, answer and control KAS workflow runs from the dashboard, with every question or approval a run raises held for a person.
Why it matters
Kiro Agent is the default harness and ships its own workflow engine (recipes, multi-step runs, steps that park for input), but Crew drops the whole
_kiro/workflow/*surface: a KAS chat cannot start a workflow, nobody sees a run's steps, and a step that asks a question stalls with no sign anywhere. A run left to channel auto-answer paths could have a person's answer given on their behalf.Not a goal
agent.kas_workflows); with it off, Crew behaves exactly as main.workflow_run, saved Crew workflows). They keep running.What changed (motivation → approach → change)
The client side of the routes, with no UI yet: the API client for
/api/workflows/kas/*(api/client/workflows.ts,api/client/chat.ts,api/client.ts), the run model each surface reads (apps/workflows/kas/kasModel.ts: step tally, controls, waits, loop iterations, needs-you), the query and recipe hooks, the launch helper that opens a chat and starts a run in it, the rewind guard, and the shared test fixtures (test/kasFixtures.ts). The catalogs (i18n/locales/en.manual.json, its translations andi18n/en.context.json) gain the strings the model itself formats, in every locale.Stack
Split out of #25395, which was over the 1 MB review cap. Merge bottom-up. Only a PR based on
maingets CI (ci.ymlandfast-gate.ymlrun onpull_request: branches: [main]), so each stacked PR is rebased ontomainonce the one below it merges. A and the B1a protocol PR do not depend on each other. C2's UI uses A's card, which is on main.feat/kas-wf-1-session-cardsmainfeat/kas-wf-2-backendmainfeat/kas-wf-2b-enginemainfeat/kas-wf-2c-dashboardfeat/kas-wf-2b-enginefeat/kas-wf-3-person-holdsfeat/kas-wf-2c-dashboardfeat/kas-wf-4-frontendfeat/kas-wf-3-person-holdsfeat/kas-wf-4b-frontend-uifeat/kas-wf-4-frontendBackwards compatibility
Compatible: nothing renders this yet; every hook is enabled only while the switch is on.
Removes nothing: only additions.
Tests
kasModel.test.ts,kasRound4.model.test.ts,launchKasWorkflow.test.ts,kasSidebar.test.ts,ApiClient.refactor.surface.test.ts.kasModel.test.ts› "a step note is Kiro Agent's own send_message only": only the baresend_messageKiro Agent records is a step note; Crew's@kirocrew-core/send_messageand other prefixed names stay tool rows, and a later Crew notification does not replace a parked step's question. The prefixed cases fail on the first commit's regex.kasRewindGuard.test.ts: the edit is blocked while a run started at or after the message is live (paused included), allowed with a note once every such run ended, unaffected by earlier runs and other chats, and blocked when a run's or the message's time cannot be read.I18N_BASE_REF, i18n:check, theme colors, build.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
N/A — no surface draws this yet.
Screenshots / video
Why no screenshot: this PR adds data-layer modules and catalog strings that no component renders yet.
Related Issues
N/A — no tracking issue, by the owner's choice.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)