fix+feat: deploy end-to-end, Urban human front-end for the review task, Biome linting - #4
Merged
Merged
Conversation
Two independent defects stopped `npm run deploy` from running against a Nano gateway: 1. Loader — the scripts ran `node --experimental-strip-types`, which cannot compile the TypeScript parameter property in `EffectClient`'s constructor (`ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`), so it failed to parse. Switch the scripts to `--experimental-transform-types` and rewrite the constructor to an explicit field assignment so the source is also portable to strip-only tooling. 2. Transport — the worker-start null-transport race on the Falcon path (jwulf/nano-sdk-js#12, nanobpm/nano-ide#415), now fixed upstream. Adopt `@nanobpm/workflow` ^0.13.1 + `@nanobpm/nano-sdk` 1.2.7 (floored via `overrides`, as workflow only requires ^1.2.5), and make transport selectable via `CAMUNDA_TRANSPORT` (default `auto`). Verified end-to-end on the Falcon path: deploy → 8 job workers start → instance created → jobs (classify, search-web, search-kb, synthesize) complete, with no null-transport crash. `npm run typecheck` passes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The `human(review)` step parks each instance on a user task that nothing in `npm run deploy` completes, so the convergence loop never resolves. Add a thin `@nanobpm/urban` app that reuses the built-in `taskInbox` surface (ADR 0026) to act on it — no bespoke UI, no embedded engine, no duplicated workers: - `nano.app.json` — manifest enabling `surfaces.taskInbox` and declaring the form under `models.forms`. - `resources/forms/research-review.form` — form-js schema (read-only question + drafted answer, required approve/revise verdict, conditional revision notes); field keys match the `review` task I/O. - `urban-app.ts` — `runFromEnv` deploys the form and mounts the surface against the same engine `npm run deploy` targets; `npm run app` script. Verified end-to-end against a live node: the surface lists the task, renders the form, and completing it converges the loop (approve → publish → archive; revise → record-revision → re-synthesize → fresh review). Also add Biome for linting + formatting and make the project compliant: - `biome.json` (recommended lint, 2-space/120 formatter), `lint`/`lint:fix` scripts, and a CI lint step. - Format the existing sources to comply; fix an unused parameter. - Correct the stale `--experimental-strip-types` prereq note (scripts use `--experimental-transform-types`). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
npm run deploy run end-to-end (TS loader + Falcon worker-start race)There was a problem hiding this comment.
Pull request overview
This PR fixes end-to-end deploy execution against a Nano gateway, adds an Urban-based human task inbox to complete the review user task (so the workflow can converge), and introduces Biome for linting/formatting with CI enforcement.
Changes:
- Switch Node TS execution to
--experimental-transform-typesand adjust code to avoid unsupported TS syntax in runtime execution. - Add an Urban “taskInbox” app + form schema to act on the
reviewtask and complete the converge loop. - Add Biome configuration, scripts, and a CI lint step; reformat sources accordingly.
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| urban-app.ts | New Urban app entrypoint to deploy forms and mount the taskInbox surface against the target engine. |
| tsconfig.json | Includes urban-app.ts in TypeScript compilation. |
| test/worker.test.ts | Formatting/import order updates to align with Biome and project style. |
| test/model.test.ts | Import order update for Biome/style compliance. |
| test/agents.test.ts | Import order/formatting updates for Biome/style compliance. |
| src/model/research-agent.ts | Import split/ordering adjustments (type vs value) for style/TS hygiene. |
| src/main.ts | Adds CAMUNDA_TRANSPORT support and updates deploy runtime wiring/formatting. |
| src/effect/worker.ts | Formatting/type layout changes; refactors some call formatting for readability. |
| src/effect/Llm.ts | Formatting change to satisfy lint/formatter rules. |
| src/effect/client.ts | Removes TS parameter property in constructor (runtime TS transform compatibility). |
| src/agents/util.ts | Formatting/refactor for lint/formatter compliance. |
| src/agents/search.ts | Formatting/refactor for lint/formatter compliance. |
| src/agents/index.ts | Import ordering adjustments. |
| scripts/emit-bpmn.ts | Import ordering adjustment. |
| resources/forms/research-review.form | New form schema to render/complete the review task with approve/revise flow. |
| README.md | Documents transform-types runtime, lint scripts, and how to run the Urban task inbox. |
| package.json | Adds Urban/Biome deps, new scripts (lint, lint:fix, app), and dependency overrides. |
| package-lock.json | Locks new dependencies (Urban, Biome) and updated workflow/nano-sdk versions. |
| nano.app.json | New Urban app manifest enabling taskInbox and declaring form models. |
| biome.json | New Biome configuration for formatting/linting scope and rules. |
| .github/workflows/ci.yml | Adds CI step to run Biome linting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Validate CAMUNDA_TRANSPORT against the supported set (auto|falcon|rest) and fail fast with a clear error instead of coercing via a type assertion. - Pin the @nanobpm/nano-sdk override to exact 1.2.7 so a fresh install cannot drift onto an untested minor and reintroduce the transport race. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Josh Wulf <josh@magikcraft.io>
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.
This PR started as the
npm run deployfix and now also adds the human front-end that lets thereviewtask be acted on, plus Biome linting.1. Make
npm run deployrun end-to-endnpm run deploycouldn't run against a Nano gateway. Two independent defects:node --experimental-strip-types, which can't compileEffectClient'sprivate constructor(private readonly client: WorkflowClient) {}(needs an emit) →ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX. Fix: switch scripts to--experimental-transform-typesand rewrite the constructor to an explicit field assignment.Cannot read properties of null (reading 'subscribe')inNanoJobWorker.start. Fixed upstream in NanoJobWorker.start() null-transport crash when started before bindTransport() (Falcon race) jwulf/nano-sdk-js#12 + @nanobpm/workflow eagerly starts nano-sdk worker, racing async transport bind (null-transport crash) nano-ide#415 (both closed). Fix: adopt@nanobpm/workflow^0.13.1 +@nanobpm/nano-sdk1.2.7 (floored viaoverrides), and make transport selectable viaCAMUNDA_TRANSPORT(defaultauto).2. Urban human front-end for the
reviewtaskThe
human(review)step parks each instance on a user task nothing completes, so the convergence loop never resolves. Rather than a bespoke reviewer UI, mount@nanobpm/urban's built-intaskInboxsurface (ADR 0026) — no embedded engine, no duplicated workers:nano.app.json— enablessurfaces.taskInbox, declares the form undermodels.forms.resources/forms/research-review.form— form-js schema (read-onlyquestion+ draftedfinalAnswer, required approve/reviseverdict, conditionalrevisionNotes); field keys match thereviewtask I/O.urban-app.ts—runFromEnvdeploys the form and mounts the surface against the same enginenpm run deploytargets; run withnpm run app(default:8090/tasks). Embeds in the console at/console/app-view/research-agent/tasks(ADR 0057).3. Biome linting
biome.json(recommended lint + 2-space/120 formatter),lint/lint:fixscripts, CI lint step.Verification
auto/Falcon transport — deploy → 8 workers → instance → agent jobs complete, no null-transport crash.taskInboxsurface lists thereviewtask and serves theresearch-reviewform (keysquestion/finalAnswer/verdict/revisionNotes). Completing via the surface converges the loop: approve →publish→archive→COMPLETED; revise →record-revision→ re-synthesize→ freshreview.npm run lint,npm run typecheck, andnpm test(14/14) all pass.